@wexio/messenger-widget-react 1.4.1 → 1.5.1

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 (111) hide show
  1. package/CHANGELOG.md +130 -0
  2. package/README.md +2 -1
  3. package/dist/widget-react-0MqeP0VG2.js +201 -0
  4. package/dist/widget-react-12srXq362.js +201 -0
  5. package/dist/widget-react-13R6Vrt62.js +201 -0
  6. package/dist/widget-react-1FPhjaT7.js +2 -0
  7. package/dist/widget-react-1a5mHYv6.js +4 -0
  8. package/dist/widget-react-B-zdiXnI.js +2 -0
  9. package/dist/widget-react-B1v9X8dK2.js +201 -0
  10. package/dist/widget-react-B6W6yHa9.js +2 -0
  11. package/dist/widget-react-BAzh_M3R.js +201 -0
  12. package/dist/widget-react-BEeSy_sM.js +201 -0
  13. package/dist/widget-react-BGg29YDq.js +2 -0
  14. package/dist/widget-react-BKZZeBk72.js +201 -0
  15. package/dist/widget-react-BNsA7Hq8.js +2 -0
  16. package/dist/widget-react-BP_S1jOe2.js +2 -0
  17. package/dist/widget-react-BjVldSFi2.js +2 -0
  18. package/dist/widget-react-Bk8_ZpvK.js +2 -0
  19. package/dist/widget-react-BpSJW2vD2.js +201 -0
  20. package/dist/widget-react-BpfEg8PP.js +2 -0
  21. package/dist/widget-react-BtVbDkom.js +2 -0
  22. package/dist/widget-react-BxEMz2N0.js +2 -0
  23. package/dist/widget-react-BxYFNB-9.js +2 -0
  24. package/dist/widget-react-Bz5u8QHz.js +109 -0
  25. package/dist/widget-react-BzlFOEiU2.js +2 -0
  26. package/dist/widget-react-C-hnCqBf.js +2 -0
  27. package/dist/widget-react-C1rXlCoj.js +201 -0
  28. package/dist/widget-react-C1vTza-V2.js +201 -0
  29. package/dist/widget-react-C2_GJN-2.js +2 -0
  30. package/dist/widget-react-C40Ha_9C.js +2 -0
  31. package/dist/widget-react-C6OZyIh32.js +201 -0
  32. package/dist/widget-react-C78gQza62.js +201 -0
  33. package/dist/widget-react-C9D7iqrt.js +2 -0
  34. package/dist/widget-react-CJkUvFuJ2.js +2 -0
  35. package/dist/widget-react-CM6RqtRI2.js +2 -0
  36. package/dist/widget-react-COAvUm8D.js +140 -0
  37. package/dist/widget-react-COGNC9PO.js +2 -0
  38. package/dist/widget-react-CPEQKK8u.js +2 -0
  39. package/dist/widget-react-CZHkN2nG.js +2 -0
  40. package/dist/widget-react-CgvtA8Ek.js +201 -0
  41. package/dist/widget-react-Cil8Ajlh.js +201 -0
  42. package/dist/widget-react-CuJV_7PK.js +2 -0
  43. package/dist/widget-react-Cv42XaBB.js +2 -0
  44. package/dist/widget-react-Cw8StXTV2.js +201 -0
  45. package/dist/widget-react-CxTI2WNr.js +201 -0
  46. package/dist/widget-react-Cx_utOCH.js +2 -0
  47. package/dist/widget-react-D2sqPDts.js +2 -0
  48. package/dist/widget-react-D5s6TWhn.js +2 -0
  49. package/dist/widget-react-DBqY7BEB.js +163 -0
  50. package/dist/widget-react-DCnPzcmJ2.js +109 -0
  51. package/dist/widget-react-DFBIOPUo.js +2 -0
  52. package/dist/widget-react-DJTgpBXp.js +109 -0
  53. package/dist/widget-react-DJczk-Ax.js +2 -0
  54. package/dist/widget-react-DLK0giQJ2.js +201 -0
  55. package/dist/widget-react-DPf6mDAF2.js +201 -0
  56. package/dist/widget-react-DSyQ4JjS.js +2 -0
  57. package/dist/widget-react-DUnaBOfT.js +10 -0
  58. package/dist/widget-react-DW-XOzIR.js +2 -0
  59. package/dist/widget-react-DXnKk30y2.js +2 -0
  60. package/dist/widget-react-DfgfDdBf2.js +2 -0
  61. package/dist/widget-react-DhLRmjli.js +2 -0
  62. package/dist/widget-react-DjlwkwTM2.js +2 -0
  63. package/dist/widget-react-Dl2PevZk.js +2 -0
  64. package/dist/widget-react-DleQcmXy.js +2 -0
  65. package/dist/widget-react-DmRVdLdI.js +2 -0
  66. package/dist/widget-react-Ds-6CsP4.js +7 -0
  67. package/dist/widget-react-Dy2T3sIZ2.js +201 -0
  68. package/dist/widget-react-DzgDJMDl.js +2 -0
  69. package/dist/widget-react-FX5W7RyV.js +4 -0
  70. package/dist/widget-react-Fou9JP7u.js +201 -0
  71. package/dist/widget-react-GikUZ6_D.js +2 -0
  72. package/dist/widget-react-M6ZbU9Uk.js +2 -0
  73. package/dist/widget-react-RFGjueTQ.js +201 -0
  74. package/dist/widget-react-SG4_gli5.js +2 -0
  75. package/dist/widget-react-W_6RewLw2.js +2 -0
  76. package/dist/widget-react-YOrK-1WI2.js +201 -0
  77. package/dist/widget-react-YrYT-pD1.js +285 -0
  78. package/dist/widget-react-bEpDN5aA2.js +201 -0
  79. package/dist/widget-react-dWaXqKR32.js +2 -0
  80. package/dist/widget-react-iwANUtnB.js +201 -0
  81. package/dist/widget-react-llsiMoHr.js +2 -0
  82. package/dist/widget-react-tvX8XSZD.js +201 -0
  83. package/dist/widget-react-uWEOH9Lh.js +201 -0
  84. package/dist/widget-react-wMl4Kthk.js +2 -0
  85. package/dist/widget-react-yKWc1q98.js +2 -0
  86. package/dist/widget-react-zZslBPCS.js +2 -0
  87. package/dist/widget-react.js +50 -36283
  88. package/dist/widget-react.licenses.txt +3604 -0
  89. package/package.json +1 -1
  90. package/dist/widget-react--IUy5lNt.js +0 -510
  91. package/dist/widget-react-B7es3n1-.js +0 -32
  92. package/dist/widget-react-BAUpSGhZ.js +0 -1345
  93. package/dist/widget-react-BS9kUSRS.js +0 -255
  94. package/dist/widget-react-BT30ojz0.js +0 -371
  95. package/dist/widget-react-BXf2Ty8d.js +0 -364
  96. package/dist/widget-react-BgALABDe.js +0 -39
  97. package/dist/widget-react-BgunakAG.js +0 -566
  98. package/dist/widget-react-BkXA6ytR.js +0 -23856
  99. package/dist/widget-react-Bvtklo8g.js +0 -356
  100. package/dist/widget-react-BxEjM2it.js +0 -118
  101. package/dist/widget-react-CN_FIvMD.js +0 -834
  102. package/dist/widget-react-CTdz_dwX.js +0 -306
  103. package/dist/widget-react-Ck8JAYqT.js +0 -22122
  104. package/dist/widget-react-CyAVDflZ.js +0 -273
  105. package/dist/widget-react-DSAyUf2U.js +0 -229
  106. package/dist/widget-react-DbOJZl9F.js +0 -4932
  107. package/dist/widget-react-DgIxSjv7.js +0 -25
  108. package/dist/widget-react-Ds5J9FbQ.js +0 -27
  109. package/dist/widget-react-SI7deQTE.js +0 -35
  110. package/dist/widget-react-krPPnv02.js +0 -4438
  111. package/dist/widget-react-wSc9gIfG.js +0 -198
@@ -1,4932 +0,0 @@
1
- globalThis.process === void 0 && (globalThis.process = {
2
- env: {},
3
- nextTick: function(e) {
4
- setTimeout(e, 0);
5
- },
6
- emit: function() {
7
- return !1;
8
- }
9
- });
10
- import * as e from "react";
11
- import * as t from "react-dom";
12
- import * as n from "react/jsx-runtime";
13
- import * as r from "react-dom/client";
14
- function i(i) {
15
- switch (i) {
16
- case "react": return e;
17
- case "react-dom": return t;
18
- case "react/jsx-runtime": return n;
19
- case "react-dom/client": return r;
20
- }
21
- throw Error("[wexio-widget] unexpected require(" + JSON.stringify(i) + ")");
22
- }
23
- import { Component as a, Fragment as o, createContext as s, createElement as c, forwardRef as l, useCallback as u, useContext as d, useEffect as f, useId as p, useInsertionEffect as m, useLayoutEffect as h, useMemo as g, useRef as _ } from "react";
24
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
25
- //#region \0rolldown/runtime.js
26
- var b = Object.create, x = Object.defineProperty, S = Object.getOwnPropertyDescriptor, C = Object.getOwnPropertyNames, ee = Object.getPrototypeOf, te = Object.prototype.hasOwnProperty, ne = (e, t) => () => (e && (t = e(e = 0)), t), re = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), ie = (e, t) => {
27
- let n = {};
28
- for (var r in e) x(n, r, {
29
- get: e[r],
30
- enumerable: !0
31
- });
32
- return t || x(n, Symbol.toStringTag, { value: "Module" }), n;
33
- }, ae = (e, t, n, r) => {
34
- if (t && typeof t == "object" || typeof t == "function") for (var i = C(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !te.call(e, s) && s !== n && x(e, s, {
35
- get: ((e) => t[e]).bind(null, s),
36
- enumerable: !(r = S(t, s)) || r.enumerable
37
- });
38
- return e;
39
- }, oe = (e, t, n) => (n = e == null ? {} : b(ee(e)), ae(t || !e || !e.__esModule ? x(n, "default", {
40
- value: e,
41
- enumerable: !0
42
- }) : n, e)), se = (e) => te.call(e, "module.exports") ? e["module.exports"] : ae(x({}, "__esModule", { value: !0 }), e), ce = /* @__PURE__ */ ((e) => i === void 0 ? typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (i === void 0 ? e : i)[t] }) : e : i)(function(e) {
43
- if (i !== void 0) return i.apply(this, arguments);
44
- throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
45
- }), le = s({});
46
- //#endregion
47
- //#region node_modules/framer-motion/dist/es/utils/use-constant.mjs
48
- function ue(e) {
49
- let t = _(null);
50
- return t.current === null && (t.current = e()), t.current;
51
- }
52
- //#endregion
53
- //#region node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs
54
- var de = typeof window < "u" ? h : f, fe = /* @__PURE__ */ s(null);
55
- //#endregion
56
- //#region node_modules/motion-utils/dist/es/array.mjs
57
- function pe(e, t) {
58
- e.indexOf(t) === -1 && e.push(t);
59
- }
60
- function me(e, t) {
61
- let n = e.indexOf(t);
62
- n > -1 && e.splice(n, 1);
63
- }
64
- //#endregion
65
- //#region node_modules/motion-utils/dist/es/clamp.mjs
66
- var w = (e, t, n) => n > t ? t : n < e ? e : n, he = () => {}, T = {}, ge = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);
67
- //#endregion
68
- //#region node_modules/motion-utils/dist/es/is-object.mjs
69
- function _e(e) {
70
- return typeof e == "object" && !!e;
71
- }
72
- //#endregion
73
- //#region node_modules/motion-utils/dist/es/is-zero-value-string.mjs
74
- var ve = (e) => /^0[^.\s]+$/u.test(e);
75
- //#endregion
76
- //#region node_modules/motion-utils/dist/es/memo.mjs
77
- /* @__NO_SIDE_EFFECTS__ */
78
- function ye(e) {
79
- let t;
80
- return () => (t === void 0 && (t = e()), t);
81
- }
82
- //#endregion
83
- //#region node_modules/motion-utils/dist/es/noop.mjs
84
- var E = /* @__NO_SIDE_EFFECTS__ */ (e) => e, be = (e, t) => (n) => t(e(n)), xe = (...e) => e.reduce(be), Se = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
85
- let r = t - e;
86
- return r === 0 ? 1 : (n - e) / r;
87
- }, Ce = class {
88
- constructor() {
89
- this.subscriptions = [];
90
- }
91
- add(e) {
92
- return pe(this.subscriptions, e), () => me(this.subscriptions, e);
93
- }
94
- notify(e, t, n) {
95
- let r = this.subscriptions.length;
96
- if (r) if (r === 1) this.subscriptions[0](e, t, n);
97
- else for (let i = 0; i < r; i++) {
98
- let r = this.subscriptions[i];
99
- r && r(e, t, n);
100
- }
101
- }
102
- getSize() {
103
- return this.subscriptions.length;
104
- }
105
- clear() {
106
- this.subscriptions.length = 0;
107
- }
108
- }, D = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, O = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
109
- //#endregion
110
- //#region node_modules/motion-utils/dist/es/velocity-per-second.mjs
111
- function we(e, t) {
112
- return t ? 1e3 / t * e : 0;
113
- }
114
- //#endregion
115
- //#region node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs
116
- var Te = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, Ee = 1e-7, De = 12;
117
- function Oe(e, t, n, r, i) {
118
- let a, o, s = 0;
119
- do
120
- o = t + (n - t) / 2, a = Te(o, r, i) - e, a > 0 ? n = o : t = o;
121
- while (Math.abs(a) > Ee && ++s < De);
122
- return o;
123
- }
124
- function ke(e, t, n, r) {
125
- if (e === t && n === r) return E;
126
- let i = (t) => Oe(t, 0, 1, e, n);
127
- return (e) => e === 0 || e === 1 ? e : Te(i(e), t, r);
128
- }
129
- //#endregion
130
- //#region node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs
131
- var Ae = (e) => (t) => t <= .5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, je = (e) => (t) => 1 - e(1 - t), Me = /* @__PURE__ */ ke(.33, 1.53, .69, .99), Ne = /* @__PURE__ */ je(Me), Pe = /* @__PURE__ */ Ae(Ne), Fe = (e) => e >= 1 ? 1 : (e *= 2) < 1 ? .5 * Ne(e) : .5 * (2 - 2 ** (-10 * (e - 1))), Ie = (e) => 1 - Math.sin(Math.acos(e)), Le = je(Ie), Re = Ae(Ie), ze = /* @__PURE__ */ ke(.42, 0, 1, 1), Be = /* @__PURE__ */ ke(0, 0, .58, 1), Ve = /* @__PURE__ */ ke(.42, 0, .58, 1), He = (e) => Array.isArray(e) && typeof e[0] != "number", Ue = (e) => Array.isArray(e) && typeof e[0] == "number", We = {
132
- linear: E,
133
- easeIn: ze,
134
- easeInOut: Ve,
135
- easeOut: Be,
136
- circIn: Ie,
137
- circInOut: Re,
138
- circOut: Le,
139
- backIn: Ne,
140
- backInOut: Pe,
141
- backOut: Me,
142
- anticipate: Fe
143
- }, Ge = (e) => typeof e == "string", Ke = (e) => {
144
- if (Ue(e)) {
145
- e.length;
146
- let [t, n, r, i] = e;
147
- return ke(t, n, r, i);
148
- } else if (Ge(e)) return We[e], `${e}`, We[e];
149
- return e;
150
- }, qe = [
151
- "setup",
152
- "read",
153
- "resolveKeyframes",
154
- "preUpdate",
155
- "update",
156
- "preRender",
157
- "render",
158
- "postRender"
159
- ], k = {
160
- value: null,
161
- addProjectionMetrics: null
162
- };
163
- //#endregion
164
- //#region node_modules/motion-dom/dist/es/frameloop/render-step.mjs
165
- function Je(e, t) {
166
- let n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = !1, a = !1, o = /* @__PURE__ */ new WeakSet(), s = {
167
- delta: 0,
168
- timestamp: 0,
169
- isProcessing: !1
170
- }, c = 0;
171
- function l(t) {
172
- o.has(t) && (u.schedule(t), e()), c++, t(s);
173
- }
174
- let u = {
175
- schedule: (e, t = !1, a = !1) => {
176
- let s = a && i ? n : r;
177
- return t && o.add(e), s.add(e), e;
178
- },
179
- cancel: (e) => {
180
- r.delete(e), o.delete(e);
181
- },
182
- process: (e) => {
183
- if (s = e, i) {
184
- a = !0;
185
- return;
186
- }
187
- i = !0;
188
- let o = n;
189
- n = r, r = o, n.forEach(l), t && k.value && k.value.frameloop[t].push(c), c = 0, n.clear(), i = !1, a && (a = !1, u.process(e));
190
- }
191
- };
192
- return u;
193
- }
194
- //#endregion
195
- //#region node_modules/motion-dom/dist/es/frameloop/batcher.mjs
196
- var Ye = 40;
197
- function Xe(e, t) {
198
- let n = !1, r = !0, i = {
199
- delta: 0,
200
- timestamp: 0,
201
- isProcessing: !1
202
- }, a = () => n = !0, o = qe.reduce((e, n) => (e[n] = Je(a, t ? n : void 0), e), {}), { setup: s, read: c, resolveKeyframes: l, preUpdate: u, update: d, preRender: f, render: p, postRender: m } = o, h = () => {
203
- let a = T.useManualTiming, o = a ? i.timestamp : performance.now();
204
- n = !1, a || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(o - i.timestamp, Ye), 1)), i.timestamp = o, i.isProcessing = !0, s.process(i), c.process(i), l.process(i), u.process(i), d.process(i), f.process(i), p.process(i), m.process(i), i.isProcessing = !1, n && t && (r = !1, e(h));
205
- }, g = () => {
206
- n = !0, r = !0, i.isProcessing || e(h);
207
- };
208
- return {
209
- schedule: qe.reduce((e, t) => {
210
- let r = o[t];
211
- return e[t] = (e, t = !1, i = !1) => (n || g(), r.schedule(e, t, i)), e;
212
- }, {}),
213
- cancel: (e) => {
214
- for (let t = 0; t < qe.length; t++) o[qe[t]].cancel(e);
215
- },
216
- state: i,
217
- steps: o
218
- };
219
- }
220
- //#endregion
221
- //#region node_modules/motion-dom/dist/es/frameloop/frame.mjs
222
- var { schedule: A, cancel: j, state: M, steps: Ze } = /* @__PURE__ */ Xe(typeof requestAnimationFrame < "u" ? requestAnimationFrame : E, !0), Qe;
223
- function $e() {
224
- Qe = void 0;
225
- }
226
- var N = {
227
- now: () => (Qe === void 0 && N.set(M.isProcessing || T.useManualTiming ? M.timestamp : performance.now()), Qe),
228
- set: (e) => {
229
- Qe = e, queueMicrotask($e);
230
- }
231
- }, et = {
232
- layout: 0,
233
- mainThread: 0,
234
- waapi: 0
235
- }, tt = (e) => (t) => typeof t == "string" && t.startsWith(e), nt = /* @__PURE__ */ tt("--"), rt = /* @__PURE__ */ tt("var(--"), it = (e) => rt(e) ? at.test(e.split("/*")[0].trim()) : !1, at = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
236
- function ot(e) {
237
- return typeof e == "string" ? e.split("/*")[0].includes("var(--") : !1;
238
- }
239
- //#endregion
240
- //#region node_modules/motion-dom/dist/es/value/types/numbers/index.mjs
241
- var st = {
242
- test: (e) => typeof e == "number",
243
- parse: parseFloat,
244
- transform: (e) => e
245
- }, ct = {
246
- ...st,
247
- transform: (e) => w(0, 1, e)
248
- }, lt = {
249
- ...st,
250
- default: 1
251
- }, ut = (e) => Math.round(e * 1e5) / 1e5, dt = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
252
- //#endregion
253
- //#region node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs
254
- function ft(e) {
255
- return e == null;
256
- }
257
- //#endregion
258
- //#region node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs
259
- var pt = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, mt = (e, t) => (n) => !!(typeof n == "string" && pt.test(n) && n.startsWith(e) || t && !ft(n) && Object.prototype.hasOwnProperty.call(n, t)), ht = (e, t, n) => (r) => {
260
- if (typeof r != "string") return r;
261
- let [i, a, o, s] = r.match(dt);
262
- return {
263
- [e]: parseFloat(i),
264
- [t]: parseFloat(a),
265
- [n]: parseFloat(o),
266
- alpha: s === void 0 ? 1 : parseFloat(s)
267
- };
268
- }, gt = (e) => w(0, 255, e), _t = {
269
- ...st,
270
- transform: (e) => Math.round(gt(e))
271
- }, P = {
272
- test: /* @__PURE__ */ mt("rgb", "red"),
273
- parse: /* @__PURE__ */ ht("red", "green", "blue"),
274
- transform: ({ red: e, green: t, blue: n, alpha: r = 1 }) => "rgba(" + _t.transform(e) + ", " + _t.transform(t) + ", " + _t.transform(n) + ", " + ut(ct.transform(r)) + ")"
275
- };
276
- //#endregion
277
- //#region node_modules/motion-dom/dist/es/value/types/color/hex.mjs
278
- function vt(e) {
279
- let t = "", n = "", r = "", i = "";
280
- return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), r = e.substring(5, 7), i = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), r = e.substring(3, 4), i = e.substring(4, 5), t += t, n += n, r += r, i += i), {
281
- red: parseInt(t, 16),
282
- green: parseInt(n, 16),
283
- blue: parseInt(r, 16),
284
- alpha: i ? parseInt(i, 16) / 255 : 1
285
- };
286
- }
287
- var yt = {
288
- test: /* @__PURE__ */ mt("#"),
289
- parse: vt,
290
- transform: P.transform
291
- }, bt = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
292
- test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
293
- parse: parseFloat,
294
- transform: (t) => `${t}${e}`
295
- }), F = /* @__PURE__ */ bt("deg"), I = /* @__PURE__ */ bt("%"), L = /* @__PURE__ */ bt("px"), xt = /* @__PURE__ */ bt("vh"), St = /* @__PURE__ */ bt("vw"), Ct = {
296
- ...I,
297
- parse: (e) => I.parse(e) / 100,
298
- transform: (e) => I.transform(e * 100)
299
- }, wt = {
300
- test: /* @__PURE__ */ mt("hsl", "hue"),
301
- parse: /* @__PURE__ */ ht("hue", "saturation", "lightness"),
302
- transform: ({ hue: e, saturation: t, lightness: n, alpha: r = 1 }) => "hsla(" + Math.round(e) + ", " + I.transform(ut(t)) + ", " + I.transform(ut(n)) + ", " + ut(ct.transform(r)) + ")"
303
- }, R = {
304
- test: (e) => P.test(e) || yt.test(e) || wt.test(e),
305
- parse: (e) => P.test(e) ? P.parse(e) : wt.test(e) ? wt.parse(e) : yt.parse(e),
306
- transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? P.transform(e) : wt.transform(e),
307
- getAnimatableNone: (e) => {
308
- let t = R.parse(e);
309
- return t.alpha = 0, R.transform(t);
310
- }
311
- }, Tt = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
312
- //#endregion
313
- //#region node_modules/motion-dom/dist/es/value/types/complex/index.mjs
314
- function Et(e) {
315
- return isNaN(e) && typeof e == "string" && (e.match(dt)?.length || 0) + (e.match(Tt)?.length || 0) > 0;
316
- }
317
- var Dt = "number", Ot = "color", kt = "var", At = "var(", jt = "${}", Mt = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
318
- function Nt(e) {
319
- let t = e.toString(), n = [], r = {
320
- color: [],
321
- number: [],
322
- var: []
323
- }, i = [], a = 0;
324
- return {
325
- values: n,
326
- split: t.replace(Mt, (e) => (R.test(e) ? (r.color.push(a), i.push(Ot), n.push(R.parse(e))) : e.startsWith(At) ? (r.var.push(a), i.push(kt), n.push(e)) : (r.number.push(a), i.push(Dt), n.push(parseFloat(e))), ++a, jt)).split(jt),
327
- indexes: r,
328
- types: i
329
- };
330
- }
331
- function Pt(e) {
332
- return Nt(e).values;
333
- }
334
- function Ft({ split: e, types: t }) {
335
- let n = e.length;
336
- return (r) => {
337
- let i = "";
338
- for (let a = 0; a < n; a++) if (i += e[a], r[a] !== void 0) {
339
- let e = t[a];
340
- e === Dt ? i += ut(r[a]) : e === Ot ? i += R.transform(r[a]) : i += r[a];
341
- }
342
- return i;
343
- };
344
- }
345
- function It(e) {
346
- return Ft(Nt(e));
347
- }
348
- var Lt = (e) => typeof e == "number" ? 0 : R.test(e) ? R.getAnimatableNone(e) : e, Rt = (e, t) => typeof e == "number" ? t?.trim().endsWith("/") ? e : 0 : Lt(e);
349
- function zt(e) {
350
- let t = Nt(e);
351
- return Ft(t)(t.values.map((e, n) => Rt(e, t.split[n])));
352
- }
353
- var z = {
354
- test: Et,
355
- parse: Pt,
356
- createTransformer: It,
357
- getAnimatableNone: zt
358
- };
359
- //#endregion
360
- //#region node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs
361
- function Bt(e, t, n) {
362
- return n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
363
- }
364
- function Vt({ hue: e, saturation: t, lightness: n, alpha: r }) {
365
- e /= 360, t /= 100, n /= 100;
366
- let i = 0, a = 0, o = 0;
367
- if (!t) i = a = o = n;
368
- else {
369
- let r = n < .5 ? n * (1 + t) : n + t - n * t, s = 2 * n - r;
370
- i = Bt(s, r, e + 1 / 3), a = Bt(s, r, e), o = Bt(s, r, e - 1 / 3);
371
- }
372
- return {
373
- red: Math.round(i * 255),
374
- green: Math.round(a * 255),
375
- blue: Math.round(o * 255),
376
- alpha: r
377
- };
378
- }
379
- //#endregion
380
- //#region node_modules/motion-dom/dist/es/utils/mix/immediate.mjs
381
- function Ht(e, t) {
382
- return (n) => n > 0 ? t : e;
383
- }
384
- //#endregion
385
- //#region node_modules/motion-dom/dist/es/utils/mix/number.mjs
386
- var B = (e, t, n) => e + (t - e) * n, Ut = (e, t, n) => {
387
- let r = e * e, i = n * (t * t - r) + r;
388
- return i < 0 ? 0 : Math.sqrt(i);
389
- }, Wt = [
390
- yt,
391
- P,
392
- wt
393
- ], Gt = (e) => Wt.find((t) => t.test(e));
394
- function Kt(e) {
395
- let t = Gt(e);
396
- if (`${e}`, !t) return !1;
397
- let n = t.parse(e);
398
- return t === wt && (n = Vt(n)), n;
399
- }
400
- var qt = (e, t) => {
401
- let n = Kt(e), r = Kt(t);
402
- if (!n || !r) return Ht(e, t);
403
- let i = { ...n };
404
- return (e) => (i.red = Ut(n.red, r.red, e), i.green = Ut(n.green, r.green, e), i.blue = Ut(n.blue, r.blue, e), i.alpha = B(n.alpha, r.alpha, e), P.transform(i));
405
- }, Jt = new Set(["none", "hidden"]);
406
- function Yt(e, t) {
407
- return Jt.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
408
- }
409
- //#endregion
410
- //#region node_modules/motion-dom/dist/es/utils/mix/complex.mjs
411
- function Xt(e, t) {
412
- return (n) => B(e, t, n);
413
- }
414
- function Zt(e) {
415
- return typeof e == "number" ? Xt : typeof e == "string" ? it(e) ? Ht : R.test(e) ? qt : tn : Array.isArray(e) ? Qt : typeof e == "object" ? R.test(e) ? qt : $t : Ht;
416
- }
417
- function Qt(e, t) {
418
- let n = [...e], r = n.length, i = e.map((e, n) => Zt(e)(e, t[n]));
419
- return (e) => {
420
- for (let t = 0; t < r; t++) n[t] = i[t](e);
421
- return n;
422
- };
423
- }
424
- function $t(e, t) {
425
- let n = {
426
- ...e,
427
- ...t
428
- }, r = {};
429
- for (let i in n) e[i] !== void 0 && t[i] !== void 0 && (r[i] = Zt(e[i])(e[i], t[i]));
430
- return (e) => {
431
- for (let t in r) n[t] = r[t](e);
432
- return n;
433
- };
434
- }
435
- function en(e, t) {
436
- let n = [], r = {
437
- color: 0,
438
- var: 0,
439
- number: 0
440
- };
441
- for (let i = 0; i < t.values.length; i++) {
442
- let a = t.types[i], o = e.indexes[a][r[a]];
443
- n[i] = e.values[o] ?? 0, r[a]++;
444
- }
445
- return n;
446
- }
447
- var tn = (e, t) => {
448
- let n = z.createTransformer(t), r = Nt(e), i = Nt(t);
449
- return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? Jt.has(e) && !i.values.length || Jt.has(t) && !r.values.length ? Yt(e, t) : xe(Qt(en(r, i), i.values), n) : (`${e}${t}`, Ht(e, t));
450
- };
451
- //#endregion
452
- //#region node_modules/motion-dom/dist/es/utils/mix/index.mjs
453
- function nn(e, t, n) {
454
- return typeof e == "number" && typeof t == "number" && typeof n == "number" ? B(e, t, n) : Zt(e)(e, t);
455
- }
456
- //#endregion
457
- //#region node_modules/motion-dom/dist/es/animation/drivers/frame.mjs
458
- var rn = (e) => {
459
- let t = ({ timestamp: t }) => e(t);
460
- return {
461
- start: (e = !0) => A.update(t, e),
462
- stop: () => j(t),
463
- now: () => M.isProcessing ? M.timestamp : N.now()
464
- };
465
- }, an = (e, t, n = 10) => {
466
- let r = "", i = Math.max(Math.round(t / n), 2);
467
- for (let t = 0; t < i; t++) r += Math.round(e(t / (i - 1)) * 1e4) / 1e4 + ", ";
468
- return `linear(${r.substring(0, r.length - 2)})`;
469
- }, on = 2e4;
470
- function sn(e) {
471
- let t = 0, n = e.next(t);
472
- for (; !n.done && t < 2e4;) t += 50, n = e.next(t);
473
- return t >= 2e4 ? Infinity : t;
474
- }
475
- //#endregion
476
- //#region node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs
477
- function cn(e, t = 100, n) {
478
- let r = n({
479
- ...e,
480
- keyframes: [0, t]
481
- }), i = Math.min(sn(r), on);
482
- return {
483
- type: "keyframes",
484
- ease: (e) => r.next(i * e).value / t,
485
- duration: /* @__PURE__ */ O(i)
486
- };
487
- }
488
- //#endregion
489
- //#region node_modules/motion-dom/dist/es/animation/generators/spring.mjs
490
- var V = {
491
- stiffness: 100,
492
- damping: 10,
493
- mass: 1,
494
- velocity: 0,
495
- duration: 800,
496
- bounce: .3,
497
- visualDuration: .3,
498
- restSpeed: {
499
- granular: .01,
500
- default: 2
501
- },
502
- restDelta: {
503
- granular: .005,
504
- default: .5
505
- },
506
- minDuration: .01,
507
- maxDuration: 10,
508
- minDamping: .05,
509
- maxDamping: 1
510
- };
511
- function ln(e, t) {
512
- return e * Math.sqrt(1 - t * t);
513
- }
514
- var un = 12;
515
- function dn(e, t, n) {
516
- let r = n;
517
- for (let n = 1; n < un; n++) r -= e(r) / t(r);
518
- return r;
519
- }
520
- var fn = .001;
521
- function pn({ duration: e = V.duration, bounce: t = V.bounce, velocity: n = V.velocity, mass: r = V.mass }) {
522
- let i, a;
523
- V.maxDuration;
524
- let o = 1 - t;
525
- o = w(V.minDamping, V.maxDamping, o), e = w(V.minDuration, V.maxDuration, /* @__PURE__ */ O(e)), o < 1 ? (i = (t) => {
526
- let r = t * o, i = r * e, a = r - n, s = ln(t, o), c = Math.exp(-i);
527
- return fn - a / s * c;
528
- }, a = (t) => {
529
- let r = t * o * e, a = r * n + n, s = o ** 2 * t ** 2 * e, c = Math.exp(-r), l = ln(t ** 2, o);
530
- return (-i(t) + fn > 0 ? -1 : 1) * ((a - s) * c) / l;
531
- }) : (i = (t) => {
532
- let r = Math.exp(-t * e), i = (t - n) * e + 1;
533
- return -fn + r * i;
534
- }, a = (t) => Math.exp(-t * e) * ((n - t) * (e * e)));
535
- let s = 5 / e, c = dn(i, a, s);
536
- if (e = /* @__PURE__ */ D(e), isNaN(c)) return {
537
- stiffness: V.stiffness,
538
- damping: V.damping,
539
- duration: e
540
- };
541
- {
542
- let t = c ** 2 * r;
543
- return {
544
- stiffness: t,
545
- damping: o * 2 * Math.sqrt(r * t),
546
- duration: e
547
- };
548
- }
549
- }
550
- var mn = ["duration", "bounce"], hn = [
551
- "stiffness",
552
- "damping",
553
- "mass"
554
- ];
555
- function gn(e, t) {
556
- return t.some((t) => e[t] !== void 0);
557
- }
558
- function _n(e) {
559
- let t = {
560
- velocity: V.velocity,
561
- stiffness: V.stiffness,
562
- damping: V.damping,
563
- mass: V.mass,
564
- isResolvedFromDuration: !1,
565
- ...e
566
- };
567
- if (!gn(e, hn) && gn(e, mn)) if (t.velocity = 0, e.visualDuration) {
568
- let n = e.visualDuration, r = 2 * Math.PI / (n * 1.2), i = r * r, a = 2 * w(.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(i);
569
- t = {
570
- ...t,
571
- mass: V.mass,
572
- stiffness: i,
573
- damping: a
574
- };
575
- } else {
576
- let n = pn({
577
- ...e,
578
- velocity: 0
579
- });
580
- t = {
581
- ...t,
582
- ...n,
583
- mass: V.mass
584
- }, t.isResolvedFromDuration = !0;
585
- }
586
- return t;
587
- }
588
- function vn(e = V.visualDuration, t = V.bounce) {
589
- let n = typeof e == "object" ? e : {
590
- visualDuration: e,
591
- keyframes: [0, 1],
592
- bounce: t
593
- }, { restSpeed: r, restDelta: i } = n, a = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], s = {
594
- done: !1,
595
- value: a
596
- }, { stiffness: c, damping: l, mass: u, duration: d, velocity: f, isResolvedFromDuration: p } = _n({
597
- ...n,
598
- velocity: -/* @__PURE__ */ O(n.velocity || 0)
599
- }), m = f || 0, h = l / (2 * Math.sqrt(c * u)), g = o - a, _ = /* @__PURE__ */ O(Math.sqrt(c / u)), v = Math.abs(g) < 5;
600
- r || (r = v ? V.restSpeed.granular : V.restSpeed.default), i || (i = v ? V.restDelta.granular : V.restDelta.default);
601
- let y, b, x, S, C, ee;
602
- if (h < 1) x = ln(_, h), S = (m + h * _ * g) / x, y = (e) => o - Math.exp(-h * _ * e) * (S * Math.sin(x * e) + g * Math.cos(x * e)), C = h * _ * S + g * x, ee = h * _ * g - S * x, b = (e) => Math.exp(-h * _ * e) * (C * Math.sin(x * e) + ee * Math.cos(x * e));
603
- else if (h === 1) {
604
- y = (e) => o - Math.exp(-_ * e) * (g + (m + _ * g) * e);
605
- let e = m + _ * g;
606
- b = (t) => Math.exp(-_ * t) * (_ * e * t - m);
607
- } else {
608
- let e = _ * Math.sqrt(h * h - 1);
609
- y = (t) => {
610
- let n = Math.exp(-h * _ * t), r = Math.min(e * t, 300);
611
- return o - n * ((m + h * _ * g) * Math.sinh(r) + e * g * Math.cosh(r)) / e;
612
- };
613
- let t = (m + h * _ * g) / e, n = h * _ * t - g * e, r = h * _ * g - t * e;
614
- b = (t) => {
615
- let i = Math.exp(-h * _ * t), a = Math.min(e * t, 300);
616
- return i * (n * Math.sinh(a) + r * Math.cosh(a));
617
- };
618
- }
619
- let te = {
620
- calculatedDuration: p && d || null,
621
- velocity: (e) => /* @__PURE__ */ D(b(e)),
622
- next: (e) => {
623
- if (!p && h < 1) {
624
- let t = Math.exp(-h * _ * e), n = Math.sin(x * e), a = Math.cos(x * e), c = o - t * (S * n + g * a), l = /* @__PURE__ */ D(t * (C * n + ee * a));
625
- return s.done = Math.abs(l) <= r && Math.abs(o - c) <= i, s.value = s.done ? o : c, s;
626
- }
627
- let t = y(e);
628
- if (p) s.done = e >= d;
629
- else {
630
- let n = /* @__PURE__ */ D(b(e));
631
- s.done = Math.abs(n) <= r && Math.abs(o - t) <= i;
632
- }
633
- return s.value = s.done ? o : t, s;
634
- },
635
- toString: () => {
636
- let e = Math.min(sn(te), on), t = an((t) => te.next(e * t).value, e, 30);
637
- return e + "ms " + t;
638
- },
639
- toTransition: () => {}
640
- };
641
- return te;
642
- }
643
- vn.applyToOptions = (e) => {
644
- let t = cn(e, 100, vn);
645
- return e.ease = t.ease, e.duration = /* @__PURE__ */ D(t.duration), e.type = "keyframes", e;
646
- };
647
- //#endregion
648
- //#region node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs
649
- var yn = 5;
650
- function bn(e, t, n) {
651
- let r = Math.max(t - yn, 0);
652
- return we(n - e(r), t - r);
653
- }
654
- //#endregion
655
- //#region node_modules/motion-dom/dist/es/animation/generators/inertia.mjs
656
- function xn({ keyframes: e, velocity: t = 0, power: n = .8, timeConstant: r = 325, bounceDamping: i = 10, bounceStiffness: a = 500, modifyTarget: o, min: s, max: c, restDelta: l = .5, restSpeed: u }) {
657
- let d = e[0], f = {
658
- done: !1,
659
- value: d
660
- }, p = (e) => s !== void 0 && e < s || c !== void 0 && e > c, m = (e) => s === void 0 ? c : c === void 0 || Math.abs(s - e) < Math.abs(c - e) ? s : c, h = n * t, g = d + h, _ = o === void 0 ? g : o(g);
661
- _ !== g && (h = _ - d);
662
- let v = (e) => -h * Math.exp(-e / r), y = (e) => _ + v(e), b = (e) => {
663
- let t = v(e), n = y(e);
664
- f.done = Math.abs(t) <= l, f.value = f.done ? _ : n;
665
- }, x, S, C = (e) => {
666
- p(f.value) && (x = e, S = vn({
667
- keyframes: [f.value, m(f.value)],
668
- velocity: bn(y, e, f.value),
669
- damping: i,
670
- stiffness: a,
671
- restDelta: l,
672
- restSpeed: u
673
- }));
674
- };
675
- return C(0), {
676
- calculatedDuration: null,
677
- next: (e) => {
678
- let t = !1;
679
- return !S && x === void 0 && (t = !0, b(e), C(e)), x !== void 0 && e >= x ? S.next(e - x) : (!t && b(e), f);
680
- }
681
- };
682
- }
683
- //#endregion
684
- //#region node_modules/motion-dom/dist/es/utils/interpolate.mjs
685
- function Sn(e, t, n) {
686
- let r = [], i = n || T.mix || nn, a = e.length - 1;
687
- for (let n = 0; n < a; n++) {
688
- let a = i(e[n], e[n + 1]);
689
- t && (a = xe(Array.isArray(t) ? t[n] || E : t, a)), r.push(a);
690
- }
691
- return r;
692
- }
693
- function Cn(e, t, { clamp: n = !0, ease: r, mixer: i } = {}) {
694
- let a = e.length;
695
- if (t.length, a === 1) return () => t[0];
696
- if (a === 2 && t[0] === t[1]) return () => t[1];
697
- let o = e[0] === e[1];
698
- e[0] > e[a - 1] && (e = [...e].reverse(), t = [...t].reverse());
699
- let s = Sn(t, r, i), c = s.length, l = (n) => {
700
- if (o && n < e[0]) return t[0];
701
- let r = 0;
702
- if (c > 1) for (; r < e.length - 2 && !(n < e[r + 1]); r++);
703
- let i = /* @__PURE__ */ Se(e[r], e[r + 1], n);
704
- return s[r](i);
705
- };
706
- return n ? (t) => l(w(e[0], e[a - 1], t)) : l;
707
- }
708
- //#endregion
709
- //#region node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs
710
- function wn(e, t) {
711
- let n = e[e.length - 1];
712
- for (let r = 1; r <= t; r++) {
713
- let i = /* @__PURE__ */ Se(0, t, r);
714
- e.push(B(n, 1, i));
715
- }
716
- }
717
- //#endregion
718
- //#region node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs
719
- function Tn(e) {
720
- let t = [0];
721
- return wn(t, e.length - 1), t;
722
- }
723
- //#endregion
724
- //#region node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs
725
- function En(e, t) {
726
- return e.map((e) => e * t);
727
- }
728
- //#endregion
729
- //#region node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs
730
- function Dn(e, t) {
731
- return e.map(() => t || Ve).splice(0, e.length - 1);
732
- }
733
- function On({ duration: e = 300, keyframes: t, times: n, ease: r = "easeInOut" }) {
734
- let i = He(r) ? r.map(Ke) : Ke(r), a = {
735
- done: !1,
736
- value: t[0]
737
- }, o = Cn(En(n && n.length === t.length ? n : Tn(t), e), t, { ease: Array.isArray(i) ? i : Dn(t, i) });
738
- return {
739
- calculatedDuration: e,
740
- next: (t) => (a.value = o(t), a.done = t >= e, a)
741
- };
742
- }
743
- //#endregion
744
- //#region node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs
745
- var kn = (e) => e !== null;
746
- function An(e, { repeat: t, repeatType: n = "loop" }, r, i = 1) {
747
- let a = e.filter(kn), o = i < 0 || t && n !== "loop" && t % 2 == 1 ? 0 : a.length - 1;
748
- return !o || r === void 0 ? a[o] : r;
749
- }
750
- //#endregion
751
- //#region node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs
752
- var jn = {
753
- decay: xn,
754
- inertia: xn,
755
- tween: On,
756
- keyframes: On,
757
- spring: vn
758
- };
759
- function Mn(e) {
760
- typeof e.type == "string" && (e.type = jn[e.type]);
761
- }
762
- //#endregion
763
- //#region node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs
764
- var Nn = class {
765
- constructor() {
766
- this.updateFinished();
767
- }
768
- get finished() {
769
- return this._finished;
770
- }
771
- updateFinished() {
772
- this._finished = new Promise((e) => {
773
- this.resolve = e;
774
- });
775
- }
776
- notifyFinished() {
777
- this.resolve();
778
- }
779
- then(e, t) {
780
- return this.finished.then(e, t);
781
- }
782
- }, Pn = (e) => e / 100, Fn = class extends Nn {
783
- constructor(e) {
784
- super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.delayState = {
785
- done: !1,
786
- value: void 0
787
- }, this.stop = () => {
788
- let { motionValue: e } = this.options;
789
- e && e.updatedAt !== N.now() && this.tick(N.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
790
- }, et.mainThread++, this.options = e, this.initAnimation(), this.play(), e.autoplay === !1 && this.pause();
791
- }
792
- initAnimation() {
793
- let { options: e } = this;
794
- Mn(e);
795
- let { type: t = On, repeat: n = 0, repeatDelay: r = 0, repeatType: i, velocity: a = 0 } = e, { keyframes: o } = e, s = t || On;
796
- s !== On && typeof o[0] != "number" && (this.mixKeyframes = xe(Pn, nn(o[0], o[1])), o = [0, 100]);
797
- let c = s({
798
- ...e,
799
- keyframes: o
800
- });
801
- i === "mirror" && (this.mirroredGenerator = s({
802
- ...e,
803
- keyframes: [...o].reverse(),
804
- velocity: -a
805
- })), c.calculatedDuration === null && (c.calculatedDuration = sn(c));
806
- let { calculatedDuration: l } = c;
807
- this.calculatedDuration = l, this.resolvedDuration = l + r, this.totalDuration = this.resolvedDuration * (n + 1) - r, this.generator = c;
808
- }
809
- updateTime(e) {
810
- let t = Math.round(e - this.startTime) * this.playbackSpeed;
811
- this.holdTime === null ? this.currentTime = t : this.currentTime = this.holdTime;
812
- }
813
- tick(e, t = !1) {
814
- let { generator: n, totalDuration: r, mixKeyframes: i, mirroredGenerator: a, resolvedDuration: o, calculatedDuration: s } = this;
815
- if (this.startTime === null) return n.next(0);
816
- let { delay: c = 0, keyframes: l, repeat: u, repeatType: d, repeatDelay: f, type: p, onUpdate: m, finalKeyframe: h } = this.options;
817
- this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - r / this.speed, this.startTime)), t ? this.currentTime = e : this.updateTime(e);
818
- let g = this.currentTime - c * (this.playbackSpeed >= 0 ? 1 : -1), _ = this.playbackSpeed >= 0 ? g < 0 : g > r;
819
- this.currentTime = Math.max(g, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
820
- let v = this.currentTime, y = n;
821
- if (u) {
822
- let e = Math.min(this.currentTime, r) / o, t = Math.floor(e), n = e % 1;
823
- !n && e >= 1 && (n = 1), n === 1 && t--, t = Math.min(t, u + 1), t % 2 && (d === "reverse" ? (n = 1 - n, f && (n -= f / o)) : d === "mirror" && (y = a)), v = w(0, 1, n) * o;
824
- }
825
- let b;
826
- _ ? (this.delayState.value = l[0], b = this.delayState) : b = y.next(v), i && !_ && (b.value = i(b.value));
827
- let { done: x } = b;
828
- !_ && s !== null && (x = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
829
- let S = this.holdTime === null && (this.state === "finished" || this.state === "running" && x);
830
- return S && p !== xn && (b.value = An(l, this.options, h, this.speed)), m && m(b.value), S && this.finish(), b;
831
- }
832
- then(e, t) {
833
- return this.finished.then(e, t);
834
- }
835
- get duration() {
836
- return /* @__PURE__ */ O(this.calculatedDuration);
837
- }
838
- get iterationDuration() {
839
- let { delay: e = 0 } = this.options || {};
840
- return this.duration + /* @__PURE__ */ O(e);
841
- }
842
- get time() {
843
- return /* @__PURE__ */ O(this.currentTime);
844
- }
845
- set time(e) {
846
- e = /* @__PURE__ */ D(e), this.currentTime = e, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.playbackSpeed), this.driver ? this.driver.start(!1) : (this.startTime = 0, this.state = "paused", this.holdTime = e, this.tick(e));
847
- }
848
- getGeneratorVelocity() {
849
- let e = this.currentTime;
850
- if (e <= 0) return this.options.velocity || 0;
851
- if (this.generator.velocity) return this.generator.velocity(e);
852
- let t = this.generator.next(e).value;
853
- return bn((e) => this.generator.next(e).value, e, t);
854
- }
855
- get speed() {
856
- return this.playbackSpeed;
857
- }
858
- set speed(e) {
859
- let t = this.playbackSpeed !== e;
860
- t && this.driver && this.updateTime(N.now()), this.playbackSpeed = e, t && this.driver && (this.time = /* @__PURE__ */ O(this.currentTime));
861
- }
862
- play() {
863
- if (this.isStopped) return;
864
- let { driver: e = rn, startTime: t } = this.options;
865
- this.driver || (this.driver = e((e) => this.tick(e))), this.options.onPlay?.();
866
- let n = this.driver.now();
867
- this.state === "finished" ? (this.updateFinished(), this.startTime = n) : this.holdTime === null ? this.startTime || (this.startTime = t ?? n) : this.startTime = n - this.holdTime, this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
868
- }
869
- pause() {
870
- this.state = "paused", this.updateTime(N.now()), this.holdTime = this.currentTime;
871
- }
872
- complete() {
873
- this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
874
- }
875
- finish() {
876
- this.notifyFinished(), this.teardown(), this.state = "finished", this.options.onComplete?.();
877
- }
878
- cancel() {
879
- this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), this.options.onCancel?.();
880
- }
881
- teardown() {
882
- this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null, et.mainThread--;
883
- }
884
- stopDriver() {
885
- this.driver && (this.driver.stop(), this.driver = void 0);
886
- }
887
- sample(e) {
888
- return this.startTime = 0, this.tick(e, !0);
889
- }
890
- attachTimeline(e) {
891
- return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), e.observe(this);
892
- }
893
- };
894
- //#endregion
895
- //#region node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs
896
- function In(e) {
897
- for (let t = 1; t < e.length; t++) e[t] ?? (e[t] = e[t - 1]);
898
- }
899
- //#endregion
900
- //#region node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs
901
- var H = (e) => e * 180 / Math.PI, Ln = (e) => zn(H(Math.atan2(e[1], e[0]))), Rn = {
902
- x: 4,
903
- y: 5,
904
- translateX: 4,
905
- translateY: 5,
906
- scaleX: 0,
907
- scaleY: 3,
908
- scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
909
- rotate: Ln,
910
- rotateZ: Ln,
911
- skewX: (e) => H(Math.atan(e[1])),
912
- skewY: (e) => H(Math.atan(e[2])),
913
- skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
914
- }, zn = (e) => (e %= 360, e < 0 && (e += 360), e), Bn = Ln, Vn = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), Hn = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), Un = {
915
- x: 12,
916
- y: 13,
917
- z: 14,
918
- translateX: 12,
919
- translateY: 13,
920
- translateZ: 14,
921
- scaleX: Vn,
922
- scaleY: Hn,
923
- scale: (e) => (Vn(e) + Hn(e)) / 2,
924
- rotateX: (e) => zn(H(Math.atan2(e[6], e[5]))),
925
- rotateY: (e) => zn(H(Math.atan2(-e[2], e[0]))),
926
- rotateZ: Bn,
927
- rotate: Bn,
928
- skewX: (e) => H(Math.atan(e[4])),
929
- skewY: (e) => H(Math.atan(e[1])),
930
- skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
931
- };
932
- function Wn(e) {
933
- return +!!e.includes("scale");
934
- }
935
- function Gn(e, t) {
936
- if (!e || e === "none") return Wn(t);
937
- let n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u), r, i;
938
- if (n) r = Un, i = n;
939
- else {
940
- let t = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
941
- r = Rn, i = t;
942
- }
943
- if (!i) return Wn(t);
944
- let a = r[t], o = i[1].split(",").map(qn);
945
- return typeof a == "function" ? a(o) : o[a];
946
- }
947
- var Kn = (e, t) => {
948
- let { transform: n = "none" } = getComputedStyle(e);
949
- return Gn(n, t);
950
- };
951
- function qn(e) {
952
- return parseFloat(e.trim());
953
- }
954
- //#endregion
955
- //#region node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs
956
- var Jn = [
957
- "transformPerspective",
958
- "x",
959
- "y",
960
- "z",
961
- "translateX",
962
- "translateY",
963
- "translateZ",
964
- "scale",
965
- "scaleX",
966
- "scaleY",
967
- "rotate",
968
- "rotateX",
969
- "rotateY",
970
- "rotateZ",
971
- "skew",
972
- "skewX",
973
- "skewY"
974
- ], Yn = new Set(Jn), Xn = (e) => e === st || e === L, Zn = new Set([
975
- "x",
976
- "y",
977
- "z"
978
- ]), Qn = Jn.filter((e) => !Zn.has(e));
979
- function $n(e) {
980
- let t = [];
981
- return Qn.forEach((n) => {
982
- let r = e.getValue(n);
983
- r !== void 0 && (t.push([n, r.get()]), r.set(+!!n.startsWith("scale")));
984
- }), t;
985
- }
986
- var U = {
987
- width: ({ x: e }, { paddingLeft: t = "0", paddingRight: n = "0", boxSizing: r }) => {
988
- let i = e.max - e.min;
989
- return r === "border-box" ? i : i - parseFloat(t) - parseFloat(n);
990
- },
991
- height: ({ y: e }, { paddingTop: t = "0", paddingBottom: n = "0", boxSizing: r }) => {
992
- let i = e.max - e.min;
993
- return r === "border-box" ? i : i - parseFloat(t) - parseFloat(n);
994
- },
995
- top: (e, { top: t }) => parseFloat(t),
996
- left: (e, { left: t }) => parseFloat(t),
997
- bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
998
- right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
999
- x: (e, { transform: t }) => Gn(t, "x"),
1000
- y: (e, { transform: t }) => Gn(t, "y")
1001
- };
1002
- U.translateX = U.x, U.translateY = U.y;
1003
- //#endregion
1004
- //#region node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs
1005
- var W = /* @__PURE__ */ new Set(), er = !1, tr = !1, nr = !1;
1006
- function rr() {
1007
- if (tr) {
1008
- let e = Array.from(W).filter((e) => e.needsMeasurement), t = new Set(e.map((e) => e.element)), n = /* @__PURE__ */ new Map();
1009
- t.forEach((e) => {
1010
- let t = $n(e);
1011
- t.length && (n.set(e, t), e.render());
1012
- }), e.forEach((e) => e.measureInitialState()), t.forEach((e) => {
1013
- e.render();
1014
- let t = n.get(e);
1015
- t && t.forEach(([t, n]) => {
1016
- e.getValue(t)?.set(n);
1017
- });
1018
- }), e.forEach((e) => e.measureEndState()), e.forEach((e) => {
1019
- e.suspendedScrollY !== void 0 && window.scrollTo(0, e.suspendedScrollY);
1020
- });
1021
- }
1022
- tr = !1, er = !1, W.forEach((e) => e.complete(nr)), W.clear();
1023
- }
1024
- function ir() {
1025
- W.forEach((e) => {
1026
- e.readKeyframes(), e.needsMeasurement && (tr = !0);
1027
- });
1028
- }
1029
- function ar() {
1030
- nr = !0, ir(), rr(), nr = !1;
1031
- }
1032
- var or = class {
1033
- constructor(e, t, n, r, i, a = !1) {
1034
- this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = t, this.name = n, this.motionValue = r, this.element = i, this.isAsync = a;
1035
- }
1036
- scheduleResolve() {
1037
- this.state = "scheduled", this.isAsync ? (W.add(this), er || (er = !0, A.read(ir), A.resolveKeyframes(rr))) : (this.readKeyframes(), this.complete());
1038
- }
1039
- readKeyframes() {
1040
- let { unresolvedKeyframes: e, name: t, element: n, motionValue: r } = this;
1041
- if (e[0] === null) {
1042
- let i = r?.get(), a = e[e.length - 1];
1043
- if (i !== void 0) e[0] = i;
1044
- else if (n && t) {
1045
- let r = n.readValue(t, a);
1046
- r != null && (e[0] = r);
1047
- }
1048
- e[0] === void 0 && (e[0] = a), r && i === void 0 && r.set(e[0]);
1049
- }
1050
- In(e);
1051
- }
1052
- setFinalKeyframe() {}
1053
- measureInitialState() {}
1054
- renderEndStyles() {}
1055
- measureEndState() {}
1056
- complete(e = !1) {
1057
- this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e), W.delete(this);
1058
- }
1059
- cancel() {
1060
- this.state === "scheduled" && (W.delete(this), this.state = "pending");
1061
- }
1062
- resume() {
1063
- this.state === "pending" && this.scheduleResolve();
1064
- }
1065
- }, sr = (e) => e.startsWith("--");
1066
- //#endregion
1067
- //#region node_modules/motion-dom/dist/es/render/dom/style-set.mjs
1068
- function cr(e, t, n) {
1069
- sr(t) ? e.style.setProperty(t, n) : e.style[t] = n;
1070
- }
1071
- //#endregion
1072
- //#region node_modules/motion-dom/dist/es/utils/supports/flags.mjs
1073
- var lr = {};
1074
- //#endregion
1075
- //#region node_modules/motion-dom/dist/es/utils/supports/memo.mjs
1076
- function ur(e, t) {
1077
- let n = /* @__PURE__ */ ye(e);
1078
- return () => lr[t] ?? n();
1079
- }
1080
- //#endregion
1081
- //#region node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs
1082
- var dr = /* @__PURE__ */ ur(() => window.ScrollTimeline !== void 0, "scrollTimeline"), fr = /* @__PURE__ */ ur(() => {
1083
- try {
1084
- document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1085
- } catch {
1086
- return !1;
1087
- }
1088
- return !0;
1089
- }, "linearEasing"), pr = ([e, t, n, r]) => `cubic-bezier(${e}, ${t}, ${n}, ${r})`, mr = {
1090
- linear: "linear",
1091
- ease: "ease",
1092
- easeIn: "ease-in",
1093
- easeOut: "ease-out",
1094
- easeInOut: "ease-in-out",
1095
- circIn: /* @__PURE__ */ pr([
1096
- 0,
1097
- .65,
1098
- .55,
1099
- 1
1100
- ]),
1101
- circOut: /* @__PURE__ */ pr([
1102
- .55,
1103
- 0,
1104
- 1,
1105
- .45
1106
- ]),
1107
- backIn: /* @__PURE__ */ pr([
1108
- .31,
1109
- .01,
1110
- .66,
1111
- -.59
1112
- ]),
1113
- backOut: /* @__PURE__ */ pr([
1114
- .33,
1115
- 1.53,
1116
- .69,
1117
- .99
1118
- ])
1119
- };
1120
- //#endregion
1121
- //#region node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs
1122
- function hr(e, t) {
1123
- if (e) return typeof e == "function" ? fr() ? an(e, t) : "ease-out" : Ue(e) ? pr(e) : Array.isArray(e) ? e.map((e) => hr(e, t) || mr.easeOut) : mr[e];
1124
- }
1125
- //#endregion
1126
- //#region node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs
1127
- function gr(e, t, n, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatType: o = "loop", ease: s = "easeOut", times: c } = {}, l = void 0) {
1128
- let u = { [t]: n };
1129
- c && (u.offset = c);
1130
- let d = hr(s, i);
1131
- Array.isArray(d) && (u.easing = d), k.value && et.waapi++;
1132
- let f = {
1133
- delay: r,
1134
- duration: i,
1135
- easing: Array.isArray(d) ? "linear" : d,
1136
- fill: "both",
1137
- iterations: a + 1,
1138
- direction: o === "reverse" ? "alternate" : "normal"
1139
- };
1140
- l && (f.pseudoElement = l);
1141
- let p = e.animate(u, f);
1142
- return k.value && p.finished.finally(() => {
1143
- et.waapi--;
1144
- }), p;
1145
- }
1146
- //#endregion
1147
- //#region node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs
1148
- function _r(e) {
1149
- return typeof e == "function" && "applyToOptions" in e;
1150
- }
1151
- //#endregion
1152
- //#region node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs
1153
- function vr({ type: e, ...t }) {
1154
- return _r(e) && fr() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
1155
- }
1156
- //#endregion
1157
- //#region node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs
1158
- var yr = class extends Nn {
1159
- constructor(e) {
1160
- if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !e) return;
1161
- let { element: t, name: n, keyframes: r, pseudoElement: i, allowFlatten: a = !1, finalKeyframe: o, onComplete: s } = e;
1162
- this.isPseudoElement = !!i, this.allowFlatten = a, this.options = e, e.type;
1163
- let c = vr(e);
1164
- this.animation = gr(t, n, r, c, i), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1165
- if (this.finishedTime = this.time, !i) {
1166
- let e = An(r, this.options, o, this.speed);
1167
- this.updateMotionValue && this.updateMotionValue(e), cr(t, n, e), this.animation.cancel();
1168
- }
1169
- s?.(), this.notifyFinished();
1170
- };
1171
- }
1172
- play() {
1173
- this.isStopped || (this.manualStartTime = null, this.animation.play(), this.state === "finished" && this.updateFinished());
1174
- }
1175
- pause() {
1176
- this.animation.pause();
1177
- }
1178
- complete() {
1179
- this.animation.finish?.();
1180
- }
1181
- cancel() {
1182
- try {
1183
- this.animation.cancel();
1184
- } catch {}
1185
- }
1186
- stop() {
1187
- if (this.isStopped) return;
1188
- this.isStopped = !0;
1189
- let { state: e } = this;
1190
- e === "idle" || e === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
1191
- }
1192
- commitStyles() {
1193
- let e = this.options?.element;
1194
- !this.isPseudoElement && e?.isConnected && this.animation.commitStyles?.();
1195
- }
1196
- get duration() {
1197
- let e = this.animation.effect?.getComputedTiming?.().duration || 0;
1198
- return /* @__PURE__ */ O(Number(e));
1199
- }
1200
- get iterationDuration() {
1201
- let { delay: e = 0 } = this.options || {};
1202
- return this.duration + /* @__PURE__ */ O(e);
1203
- }
1204
- get time() {
1205
- return /* @__PURE__ */ O(Number(this.animation.currentTime) || 0);
1206
- }
1207
- set time(e) {
1208
- let t = this.finishedTime !== null;
1209
- this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ D(e), t && this.animation.pause();
1210
- }
1211
- get speed() {
1212
- return this.animation.playbackRate;
1213
- }
1214
- set speed(e) {
1215
- e < 0 && (this.finishedTime = null), this.animation.playbackRate = e;
1216
- }
1217
- get state() {
1218
- return this.finishedTime === null ? this.animation.playState : "finished";
1219
- }
1220
- get startTime() {
1221
- return this.manualStartTime ?? Number(this.animation.startTime);
1222
- }
1223
- set startTime(e) {
1224
- this.manualStartTime = this.animation.startTime = e;
1225
- }
1226
- attachTimeline({ timeline: e, rangeStart: t, rangeEnd: n, observe: r }) {
1227
- return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e && dr() ? (this.animation.timeline = e, t && (this.animation.rangeStart = t), n && (this.animation.rangeEnd = n), E) : r(this);
1228
- }
1229
- }, br = {
1230
- anticipate: Fe,
1231
- backInOut: Pe,
1232
- circInOut: Re
1233
- };
1234
- function xr(e) {
1235
- return e in br;
1236
- }
1237
- function Sr(e) {
1238
- typeof e.ease == "string" && xr(e.ease) && (e.ease = br[e.ease]);
1239
- }
1240
- //#endregion
1241
- //#region node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs
1242
- var Cr = 10, wr = class extends yr {
1243
- constructor(e) {
1244
- Sr(e), Mn(e), super(e), e.startTime !== void 0 && e.autoplay !== !1 && (this.startTime = e.startTime), this.options = e;
1245
- }
1246
- updateMotionValue(e) {
1247
- let { motionValue: t, onUpdate: n, onComplete: r, element: i, ...a } = this.options;
1248
- if (!t) return;
1249
- if (e !== void 0) {
1250
- t.set(e);
1251
- return;
1252
- }
1253
- let o = new Fn({
1254
- ...a,
1255
- autoplay: !1
1256
- }), s = Math.max(Cr, N.now() - this.startTime), c = w(0, Cr, s - Cr), l = o.sample(s).value, { name: u } = this.options;
1257
- i && u && cr(i, u, l), t.setWithVelocity(o.sample(Math.max(0, s - c)).value, l, c), o.stop();
1258
- }
1259
- }, Tr = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && (z.test(e) || e === "0") && !e.startsWith("url("));
1260
- //#endregion
1261
- //#region node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs
1262
- function Er(e) {
1263
- let t = e[0];
1264
- if (e.length === 1) return !0;
1265
- for (let n = 0; n < e.length; n++) if (e[n] !== t) return !0;
1266
- }
1267
- function Dr(e, t, n, r) {
1268
- let i = e[0];
1269
- if (i === null) return !1;
1270
- if (t === "display" || t === "visibility") return !0;
1271
- let a = e[e.length - 1], o = Tr(i, t), s = Tr(a, t);
1272
- return `${t}${i}${a}${o ? a : i}`, !o || !s ? !1 : Er(e) || (n === "spring" || _r(n)) && r;
1273
- }
1274
- //#endregion
1275
- //#region node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs
1276
- function Or(e) {
1277
- e.duration = 0, e.type = "keyframes";
1278
- }
1279
- //#endregion
1280
- //#region node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs
1281
- var kr = new Set([
1282
- "opacity",
1283
- "clipPath",
1284
- "filter",
1285
- "transform"
1286
- ]), Ar = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;
1287
- function jr(e) {
1288
- for (let t = 0; t < e.length; t++) if (typeof e[t] == "string" && Ar.test(e[t])) return !0;
1289
- return !1;
1290
- }
1291
- //#endregion
1292
- //#region node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs
1293
- var Mr = new Set([
1294
- "color",
1295
- "backgroundColor",
1296
- "outlineColor",
1297
- "fill",
1298
- "stroke",
1299
- "borderColor",
1300
- "borderTopColor",
1301
- "borderRightColor",
1302
- "borderBottomColor",
1303
- "borderLeftColor"
1304
- ]), Nr = /* @__PURE__ */ ye(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1305
- function Pr(e) {
1306
- let { motionValue: t, name: n, repeatDelay: r, repeatType: i, damping: a, type: o, keyframes: s } = e;
1307
- if (!(t?.owner?.current instanceof HTMLElement)) return !1;
1308
- let { onUpdate: c, transformTemplate: l } = t.owner.getProps();
1309
- return Nr() && n && (kr.has(n) || Mr.has(n) && jr(s)) && (n !== "transform" || !l) && !c && !r && i !== "mirror" && a !== 0 && o !== "inertia";
1310
- }
1311
- //#endregion
1312
- //#region node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs
1313
- var Fr = 40, Ir = class extends Nn {
1314
- constructor({ autoplay: e = !0, delay: t = 0, type: n = "keyframes", repeat: r = 0, repeatDelay: i = 0, repeatType: a = "loop", keyframes: o, name: s, motionValue: c, element: l, ...u }) {
1315
- super(), this.stop = () => {
1316
- this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
1317
- }, this.createdAt = N.now();
1318
- let d = {
1319
- autoplay: e,
1320
- delay: t,
1321
- type: n,
1322
- repeat: r,
1323
- repeatDelay: i,
1324
- repeatType: a,
1325
- name: s,
1326
- motionValue: c,
1327
- element: l,
1328
- ...u
1329
- }, f = l?.KeyframeResolver || or;
1330
- this.keyframeResolver = new f(o, (e, t, n) => this.onKeyframesResolved(e, t, d, !n), s, c, l), this.keyframeResolver?.scheduleResolve();
1331
- }
1332
- onKeyframesResolved(e, t, n, r) {
1333
- this.keyframeResolver = void 0;
1334
- let { name: i, type: a, velocity: o, delay: s, isHandoff: c, onUpdate: l } = n;
1335
- this.resolvedAt = N.now();
1336
- let u = !0;
1337
- Dr(e, i, a, o) || (u = !1, (T.instantAnimations || !s) && l?.(An(e, n, t)), e[0] = e[e.length - 1], Or(n), n.repeat = 0);
1338
- let d = {
1339
- startTime: r ? this.resolvedAt && this.resolvedAt - this.createdAt > Fr ? this.resolvedAt : this.createdAt : void 0,
1340
- finalKeyframe: t,
1341
- ...n,
1342
- keyframes: e
1343
- }, f = u && !c && Pr(d), p = d.motionValue?.owner?.current, m;
1344
- if (f) try {
1345
- m = new wr({
1346
- ...d,
1347
- element: p
1348
- });
1349
- } catch {
1350
- m = new Fn(d);
1351
- }
1352
- else m = new Fn(d);
1353
- m.finished.then(() => {
1354
- this.notifyFinished();
1355
- }).catch(E), this.pendingTimeline && (this.stopTimeline = m.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = m;
1356
- }
1357
- get finished() {
1358
- return this._animation ? this.animation.finished : this._finished;
1359
- }
1360
- then(e, t) {
1361
- return this.finished.finally(e).then(() => {});
1362
- }
1363
- get animation() {
1364
- return this._animation || (this.keyframeResolver?.resume(), ar()), this._animation;
1365
- }
1366
- get duration() {
1367
- return this.animation.duration;
1368
- }
1369
- get iterationDuration() {
1370
- return this.animation.iterationDuration;
1371
- }
1372
- get time() {
1373
- return this.animation.time;
1374
- }
1375
- set time(e) {
1376
- this.animation.time = e;
1377
- }
1378
- get speed() {
1379
- return this.animation.speed;
1380
- }
1381
- get state() {
1382
- return this.animation.state;
1383
- }
1384
- set speed(e) {
1385
- this.animation.speed = e;
1386
- }
1387
- get startTime() {
1388
- return this.animation.startTime;
1389
- }
1390
- attachTimeline(e) {
1391
- return this._animation ? this.stopTimeline = this.animation.attachTimeline(e) : this.pendingTimeline = e, () => this.stop();
1392
- }
1393
- play() {
1394
- this.animation.play();
1395
- }
1396
- pause() {
1397
- this.animation.pause();
1398
- }
1399
- complete() {
1400
- this.animation.complete();
1401
- }
1402
- cancel() {
1403
- this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
1404
- }
1405
- };
1406
- //#endregion
1407
- //#region node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs
1408
- function Lr(e, t, n, r = 0, i = 1) {
1409
- let a = Array.from(e).sort((e, t) => e.sortNodePosition(t)).indexOf(t), o = e.size, s = (o - 1) * r;
1410
- return typeof n == "function" ? n(a, o) : i === 1 ? a * r : s - a * r;
1411
- }
1412
- //#endregion
1413
- //#region node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs
1414
- var Rr = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
1415
- function zr(e) {
1416
- let t = Rr.exec(e);
1417
- if (!t) return [,];
1418
- let [, n, r, i] = t;
1419
- return [`--${n ?? r}`, i];
1420
- }
1421
- function Br(e, t, n = 1) {
1422
- `${e}`;
1423
- let [r, i] = zr(e);
1424
- if (!r) return;
1425
- let a = window.getComputedStyle(t).getPropertyValue(r);
1426
- if (a) {
1427
- let e = a.trim();
1428
- return ge(e) ? parseFloat(e) : e;
1429
- }
1430
- return it(i) ? Br(i, t, n + 1) : i;
1431
- }
1432
- //#endregion
1433
- //#region node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs
1434
- var Vr = {
1435
- type: "spring",
1436
- stiffness: 500,
1437
- damping: 25,
1438
- restSpeed: 10
1439
- }, Hr = (e) => ({
1440
- type: "spring",
1441
- stiffness: 550,
1442
- damping: e === 0 ? 2 * Math.sqrt(550) : 30,
1443
- restSpeed: 10
1444
- }), Ur = {
1445
- type: "keyframes",
1446
- duration: .8
1447
- }, Wr = {
1448
- type: "keyframes",
1449
- ease: [
1450
- .25,
1451
- .1,
1452
- .35,
1453
- 1
1454
- ],
1455
- duration: .3
1456
- }, Gr = (e, { keyframes: t }) => t.length > 2 ? Ur : Yn.has(e) ? e.startsWith("scale") ? Hr(t[1]) : Vr : Wr;
1457
- //#endregion
1458
- //#region node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs
1459
- function Kr(e, t) {
1460
- if (e?.inherit && t) {
1461
- let { inherit: n, ...r } = e;
1462
- return {
1463
- ...t,
1464
- ...r
1465
- };
1466
- }
1467
- return e;
1468
- }
1469
- //#endregion
1470
- //#region node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs
1471
- function qr(e, t) {
1472
- let n = e?.[t] ?? e?.default ?? e;
1473
- return n === e ? n : Kr(n, e);
1474
- }
1475
- //#endregion
1476
- //#region node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs
1477
- var Jr = new Set([
1478
- "when",
1479
- "delay",
1480
- "delayChildren",
1481
- "staggerChildren",
1482
- "staggerDirection",
1483
- "repeat",
1484
- "repeatType",
1485
- "repeatDelay",
1486
- "from",
1487
- "elapsed"
1488
- ]);
1489
- function Yr(e) {
1490
- for (let t in e) if (!Jr.has(t)) return !0;
1491
- return !1;
1492
- }
1493
- //#endregion
1494
- //#region node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs
1495
- var Xr = (e, t, n, r = {}, i, a) => (o) => {
1496
- let s = qr(r, e) || {}, c = s.delay || r.delay || 0, { elapsed: l = 0 } = r;
1497
- l -= /* @__PURE__ */ D(c);
1498
- let u = {
1499
- keyframes: Array.isArray(n) ? n : [null, n],
1500
- ease: "easeOut",
1501
- velocity: t.getVelocity(),
1502
- ...s,
1503
- delay: -l,
1504
- onUpdate: (e) => {
1505
- t.set(e), s.onUpdate && s.onUpdate(e);
1506
- },
1507
- onComplete: () => {
1508
- o(), s.onComplete && s.onComplete();
1509
- },
1510
- name: e,
1511
- motionValue: t,
1512
- element: a ? void 0 : i
1513
- };
1514
- Yr(s) || Object.assign(u, Gr(e, u)), u.duration && (u.duration = /* @__PURE__ */ D(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ D(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
1515
- let d = !1;
1516
- if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (Or(u), u.delay === 0 && (d = !0)), (T.instantAnimations || T.skipAnimations || i?.shouldSkipAnimations) && (d = !0, Or(u), u.delay = 0), u.allowFlatten = !s.type && !s.ease, d && !a && t.get() !== void 0) {
1517
- let e = An(u.keyframes, s);
1518
- if (e !== void 0) {
1519
- A.update(() => {
1520
- u.onUpdate(e), u.onComplete();
1521
- });
1522
- return;
1523
- }
1524
- }
1525
- return s.isSync ? new Fn(u) : new Ir(u);
1526
- };
1527
- //#endregion
1528
- //#region node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs
1529
- function Zr(e) {
1530
- let t = [{}, {}];
1531
- return e?.values.forEach((e, n) => {
1532
- t[0][n] = e.get(), t[1][n] = e.getVelocity();
1533
- }), t;
1534
- }
1535
- function Qr(e, t, n, r) {
1536
- if (typeof t == "function") {
1537
- let [i, a] = Zr(r);
1538
- t = t(n === void 0 ? e.custom : n, i, a);
1539
- }
1540
- if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
1541
- let [i, a] = Zr(r);
1542
- t = t(n === void 0 ? e.custom : n, i, a);
1543
- }
1544
- return t;
1545
- }
1546
- //#endregion
1547
- //#region node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs
1548
- function G(e, t, n) {
1549
- let r = e.getProps();
1550
- return Qr(r, t, n === void 0 ? r.custom : n, e);
1551
- }
1552
- //#endregion
1553
- //#region node_modules/motion-dom/dist/es/render/utils/keys-position.mjs
1554
- var $r = new Set([
1555
- "width",
1556
- "height",
1557
- "top",
1558
- "left",
1559
- "right",
1560
- "bottom",
1561
- ...Jn
1562
- ]), ei = 30, ti = (e) => !isNaN(parseFloat(e)), ni = { current: void 0 }, ri = class {
1563
- constructor(e, t = {}) {
1564
- this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (e) => {
1565
- let t = N.now();
1566
- if (this.updatedAt !== t && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(e), this.current !== this.prev && (this.events.change?.notify(this.current), this.dependents)) for (let e of this.dependents) e.dirty();
1567
- }, this.hasAnimated = !1, this.setCurrent(e), this.owner = t.owner;
1568
- }
1569
- setCurrent(e) {
1570
- this.current = e, this.updatedAt = N.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = ti(this.current));
1571
- }
1572
- setPrevFrameValue(e = this.current) {
1573
- this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
1574
- }
1575
- onChange(e) {
1576
- return this.on("change", e);
1577
- }
1578
- on(e, t) {
1579
- this.events[e] || (this.events[e] = new Ce());
1580
- let n = this.events[e].add(t);
1581
- return e === "change" ? () => {
1582
- n(), A.read(() => {
1583
- this.events.change.getSize() || this.stop();
1584
- });
1585
- } : n;
1586
- }
1587
- clearListeners() {
1588
- for (let e in this.events) this.events[e].clear();
1589
- }
1590
- attach(e, t) {
1591
- this.passiveEffect = e, this.stopPassiveEffect = t;
1592
- }
1593
- set(e) {
1594
- this.passiveEffect ? this.passiveEffect(e, this.updateAndNotify) : this.updateAndNotify(e);
1595
- }
1596
- setWithVelocity(e, t, n) {
1597
- this.set(t), this.prev = void 0, this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt - n;
1598
- }
1599
- jump(e, t = !0) {
1600
- this.updateAndNotify(e), this.prev = e, this.prevUpdatedAt = this.prevFrameValue = void 0, t && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1601
- }
1602
- dirty() {
1603
- this.events.change?.notify(this.current);
1604
- }
1605
- addDependent(e) {
1606
- this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(e);
1607
- }
1608
- removeDependent(e) {
1609
- this.dependents && this.dependents.delete(e);
1610
- }
1611
- get() {
1612
- return ni.current && ni.current.push(this), this.current;
1613
- }
1614
- getPrevious() {
1615
- return this.prev;
1616
- }
1617
- getVelocity() {
1618
- let e = N.now();
1619
- if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > ei) return 0;
1620
- let t = Math.min(this.updatedAt - this.prevUpdatedAt, ei);
1621
- return we(parseFloat(this.current) - parseFloat(this.prevFrameValue), t);
1622
- }
1623
- start(e) {
1624
- return this.stop(), new Promise((t) => {
1625
- this.hasAnimated = !0, this.animation = e(t), this.events.animationStart && this.events.animationStart.notify();
1626
- }).then(() => {
1627
- this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
1628
- });
1629
- }
1630
- stop() {
1631
- this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
1632
- }
1633
- isAnimating() {
1634
- return !!this.animation;
1635
- }
1636
- clearAnimation() {
1637
- delete this.animation;
1638
- }
1639
- destroy() {
1640
- this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1641
- }
1642
- };
1643
- function ii(e, t) {
1644
- return new ri(e, t);
1645
- }
1646
- //#endregion
1647
- //#region node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.mjs
1648
- var ai = (e) => Array.isArray(e);
1649
- //#endregion
1650
- //#region node_modules/motion-dom/dist/es/render/utils/setters.mjs
1651
- function oi(e, t, n) {
1652
- e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, ii(n));
1653
- }
1654
- function si(e) {
1655
- return ai(e) ? e[e.length - 1] || 0 : e;
1656
- }
1657
- function ci(e, t) {
1658
- let { transitionEnd: n = {}, transition: r = {}, ...i } = G(e, t) || {};
1659
- i = {
1660
- ...i,
1661
- ...n
1662
- };
1663
- for (let t in i) oi(e, t, si(i[t]));
1664
- }
1665
- //#endregion
1666
- //#region node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs
1667
- var K = (e) => !!(e && e.getVelocity);
1668
- //#endregion
1669
- //#region node_modules/motion-dom/dist/es/value/will-change/is.mjs
1670
- function li(e) {
1671
- return !!(K(e) && e.add);
1672
- }
1673
- //#endregion
1674
- //#region node_modules/motion-dom/dist/es/value/will-change/add-will-change.mjs
1675
- function ui(e, t) {
1676
- let n = e.getValue("willChange");
1677
- if (li(n)) return n.add(t);
1678
- if (!n && T.WillChange) {
1679
- let n = new T.WillChange("auto");
1680
- e.addValue("willChange", n), n.add(t);
1681
- }
1682
- }
1683
- //#endregion
1684
- //#region node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs
1685
- function di(e) {
1686
- return e.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`);
1687
- }
1688
- var fi = "data-" + di("framerAppearId");
1689
- //#endregion
1690
- //#region node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.mjs
1691
- function pi(e) {
1692
- return e.props[fi];
1693
- }
1694
- //#endregion
1695
- //#region node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs
1696
- function mi({ protectedKeys: e, needsAnimating: t }, n) {
1697
- let r = e.hasOwnProperty(n) && t[n] !== !0;
1698
- return t[n] = !1, r;
1699
- }
1700
- function hi(e, t, { delay: n = 0, transitionOverride: r, type: i } = {}) {
1701
- let { transition: a, transitionEnd: o, ...s } = t, c = e.getDefaultTransition();
1702
- a = a ? Kr(a, c) : c;
1703
- let l = a?.reduceMotion;
1704
- r && (a = r);
1705
- let u = [], d = i && e.animationState && e.animationState.getState()[i];
1706
- for (let t in s) {
1707
- let r = e.getValue(t, e.latestValues[t] ?? null), i = s[t];
1708
- if (i === void 0 || d && mi(d, t)) continue;
1709
- let o = {
1710
- delay: n,
1711
- ...qr(a || {}, t)
1712
- }, c = r.get();
1713
- if (c !== void 0 && !r.isAnimating() && !Array.isArray(i) && i === c && !o.velocity) {
1714
- A.update(() => r.set(i));
1715
- continue;
1716
- }
1717
- let f = !1;
1718
- if (window.MotionHandoffAnimation) {
1719
- let n = pi(e);
1720
- if (n) {
1721
- let e = window.MotionHandoffAnimation(n, t, A);
1722
- e !== null && (o.startTime = e, f = !0);
1723
- }
1724
- }
1725
- ui(e, t);
1726
- let p = l ?? e.shouldReduceMotion;
1727
- r.start(Xr(t, r, i, p && $r.has(t) ? { type: !1 } : o, e, f));
1728
- let m = r.animation;
1729
- m && u.push(m);
1730
- }
1731
- if (o) {
1732
- let t = () => A.update(() => {
1733
- o && ci(e, o);
1734
- });
1735
- u.length ? Promise.all(u).then(t) : t();
1736
- }
1737
- return u;
1738
- }
1739
- //#endregion
1740
- //#region node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs
1741
- function gi(e, t, n = {}) {
1742
- let r = G(e, t, n.type === "exit" ? e.presenceContext?.custom : void 0), { transition: i = e.getDefaultTransition() || {} } = r || {};
1743
- n.transitionOverride && (i = n.transitionOverride);
1744
- let a = r ? () => Promise.all(hi(e, r, n)) : () => Promise.resolve(), o = e.variantChildren && e.variantChildren.size ? (r = 0) => {
1745
- let { delayChildren: a = 0, staggerChildren: o, staggerDirection: s } = i;
1746
- return _i(e, t, r, a, o, s, n);
1747
- } : () => Promise.resolve(), { when: s } = i;
1748
- if (s) {
1749
- let [e, t] = s === "beforeChildren" ? [a, o] : [o, a];
1750
- return e().then(() => t());
1751
- } else return Promise.all([a(), o(n.delay)]);
1752
- }
1753
- function _i(e, t, n = 0, r = 0, i = 0, a = 1, o) {
1754
- let s = [];
1755
- for (let c of e.variantChildren) c.notify("AnimationStart", t), s.push(gi(c, t, {
1756
- ...o,
1757
- delay: n + (typeof r == "function" ? 0 : r) + Lr(e.variantChildren, c, r, i, a)
1758
- }).then(() => c.notify("AnimationComplete", t)));
1759
- return Promise.all(s);
1760
- }
1761
- //#endregion
1762
- //#region node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs
1763
- function vi(e, t, n = {}) {
1764
- e.notify("AnimationStart", t);
1765
- let r;
1766
- if (Array.isArray(t)) {
1767
- let i = t.map((t) => gi(e, t, n));
1768
- r = Promise.all(i);
1769
- } else if (typeof t == "string") r = gi(e, t, n);
1770
- else {
1771
- let i = typeof t == "function" ? G(e, t, n.custom) : t;
1772
- r = Promise.all(hi(e, i, n));
1773
- }
1774
- return r.then(() => {
1775
- e.notify("AnimationComplete", t);
1776
- });
1777
- }
1778
- //#endregion
1779
- //#region node_modules/motion-dom/dist/es/value/types/auto.mjs
1780
- var yi = {
1781
- test: (e) => e === "auto",
1782
- parse: (e) => e
1783
- }, bi = (e) => (t) => t.test(e), xi = [
1784
- st,
1785
- L,
1786
- I,
1787
- F,
1788
- St,
1789
- xt,
1790
- yi
1791
- ], Si = (e) => xi.find(bi(e));
1792
- //#endregion
1793
- //#region node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs
1794
- function Ci(e) {
1795
- return typeof e == "number" ? e === 0 : e === null ? !0 : e === "none" || e === "0" || ve(e);
1796
- }
1797
- //#endregion
1798
- //#region node_modules/motion-dom/dist/es/value/types/complex/filter.mjs
1799
- var wi = new Set([
1800
- "brightness",
1801
- "contrast",
1802
- "saturate",
1803
- "opacity"
1804
- ]);
1805
- function Ti(e) {
1806
- let [t, n] = e.slice(0, -1).split("(");
1807
- if (t === "drop-shadow") return e;
1808
- let [r] = n.match(dt) || [];
1809
- if (!r) return e;
1810
- let i = n.replace(r, ""), a = +!!wi.has(t);
1811
- return r !== n && (a *= 100), t + "(" + a + i + ")";
1812
- }
1813
- var Ei = /\b([a-z-]*)\(.*?\)/gu, Di = {
1814
- ...z,
1815
- getAnimatableNone: (e) => {
1816
- let t = e.match(Ei);
1817
- return t ? t.map(Ti).join(" ") : e;
1818
- }
1819
- }, Oi = {
1820
- ...z,
1821
- getAnimatableNone: (e) => {
1822
- let t = z.parse(e);
1823
- return z.createTransformer(e)(t.map((e) => typeof e == "number" ? 0 : typeof e == "object" ? {
1824
- ...e,
1825
- alpha: 1
1826
- } : e));
1827
- }
1828
- }, ki = {
1829
- ...st,
1830
- transform: Math.round
1831
- }, Ai = {
1832
- borderWidth: L,
1833
- borderTopWidth: L,
1834
- borderRightWidth: L,
1835
- borderBottomWidth: L,
1836
- borderLeftWidth: L,
1837
- borderRadius: L,
1838
- borderTopLeftRadius: L,
1839
- borderTopRightRadius: L,
1840
- borderBottomRightRadius: L,
1841
- borderBottomLeftRadius: L,
1842
- width: L,
1843
- maxWidth: L,
1844
- height: L,
1845
- maxHeight: L,
1846
- top: L,
1847
- right: L,
1848
- bottom: L,
1849
- left: L,
1850
- inset: L,
1851
- insetBlock: L,
1852
- insetBlockStart: L,
1853
- insetBlockEnd: L,
1854
- insetInline: L,
1855
- insetInlineStart: L,
1856
- insetInlineEnd: L,
1857
- padding: L,
1858
- paddingTop: L,
1859
- paddingRight: L,
1860
- paddingBottom: L,
1861
- paddingLeft: L,
1862
- paddingBlock: L,
1863
- paddingBlockStart: L,
1864
- paddingBlockEnd: L,
1865
- paddingInline: L,
1866
- paddingInlineStart: L,
1867
- paddingInlineEnd: L,
1868
- margin: L,
1869
- marginTop: L,
1870
- marginRight: L,
1871
- marginBottom: L,
1872
- marginLeft: L,
1873
- marginBlock: L,
1874
- marginBlockStart: L,
1875
- marginBlockEnd: L,
1876
- marginInline: L,
1877
- marginInlineStart: L,
1878
- marginInlineEnd: L,
1879
- fontSize: L,
1880
- backgroundPositionX: L,
1881
- backgroundPositionY: L,
1882
- rotate: F,
1883
- rotateX: F,
1884
- rotateY: F,
1885
- rotateZ: F,
1886
- scale: lt,
1887
- scaleX: lt,
1888
- scaleY: lt,
1889
- scaleZ: lt,
1890
- skew: F,
1891
- skewX: F,
1892
- skewY: F,
1893
- distance: L,
1894
- translateX: L,
1895
- translateY: L,
1896
- translateZ: L,
1897
- x: L,
1898
- y: L,
1899
- z: L,
1900
- perspective: L,
1901
- transformPerspective: L,
1902
- opacity: ct,
1903
- originX: Ct,
1904
- originY: Ct,
1905
- originZ: L,
1906
- zIndex: ki,
1907
- fillOpacity: ct,
1908
- strokeOpacity: ct,
1909
- numOctaves: ki
1910
- }, ji = {
1911
- ...Ai,
1912
- color: R,
1913
- backgroundColor: R,
1914
- outlineColor: R,
1915
- fill: R,
1916
- stroke: R,
1917
- borderColor: R,
1918
- borderTopColor: R,
1919
- borderRightColor: R,
1920
- borderBottomColor: R,
1921
- borderLeftColor: R,
1922
- filter: Di,
1923
- WebkitFilter: Di,
1924
- mask: Oi,
1925
- WebkitMask: Oi
1926
- }, Mi = (e) => ji[e], Ni = /* @__PURE__ */ new Set([Di, Oi]);
1927
- function Pi(e, t) {
1928
- let n = Mi(e);
1929
- return Ni.has(n) || (n = z), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
1930
- }
1931
- //#endregion
1932
- //#region node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs
1933
- var Fi = new Set([
1934
- "auto",
1935
- "none",
1936
- "0"
1937
- ]);
1938
- function Ii(e, t, n) {
1939
- let r = 0, i;
1940
- for (; r < e.length && !i;) {
1941
- let t = e[r];
1942
- typeof t == "string" && !Fi.has(t) && Nt(t).values.length && (i = e[r]), r++;
1943
- }
1944
- if (i && n) for (let r of t) e[r] = Pi(n, i);
1945
- }
1946
- //#endregion
1947
- //#region node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs
1948
- var Li = class extends or {
1949
- constructor(e, t, n, r, i) {
1950
- super(e, t, n, r, i, !0);
1951
- }
1952
- readKeyframes() {
1953
- let { unresolvedKeyframes: e, element: t, name: n } = this;
1954
- if (!t || !t.current) return;
1955
- super.readKeyframes();
1956
- for (let n = 0; n < e.length; n++) {
1957
- let r = e[n];
1958
- if (typeof r == "string" && (r = r.trim(), it(r))) {
1959
- let i = Br(r, t.current);
1960
- i !== void 0 && (e[n] = i), n === e.length - 1 && (this.finalKeyframe = r);
1961
- }
1962
- }
1963
- if (this.resolveNoneKeyframes(), !$r.has(n) || e.length !== 2) return;
1964
- let [r, i] = e, a = Si(r), o = Si(i);
1965
- if (ot(r) !== ot(i) && U[n]) {
1966
- this.needsMeasurement = !0;
1967
- return;
1968
- }
1969
- if (a !== o) if (Xn(a) && Xn(o)) for (let t = 0; t < e.length; t++) {
1970
- let n = e[t];
1971
- typeof n == "string" && (e[t] = parseFloat(n));
1972
- }
1973
- else U[n] && (this.needsMeasurement = !0);
1974
- }
1975
- resolveNoneKeyframes() {
1976
- let { unresolvedKeyframes: e, name: t } = this, n = [];
1977
- for (let t = 0; t < e.length; t++) (e[t] === null || Ci(e[t])) && n.push(t);
1978
- n.length && Ii(e, n, t);
1979
- }
1980
- measureInitialState() {
1981
- let { element: e, unresolvedKeyframes: t, name: n } = this;
1982
- if (!e || !e.current) return;
1983
- n === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = U[n](e.measureViewportBox(), window.getComputedStyle(e.current)), t[0] = this.measuredOrigin;
1984
- let r = t[t.length - 1];
1985
- r !== void 0 && e.getValue(n, r).jump(r, !1);
1986
- }
1987
- measureEndState() {
1988
- let { element: e, name: t, unresolvedKeyframes: n } = this;
1989
- if (!e || !e.current) return;
1990
- let r = e.getValue(t);
1991
- r && r.jump(this.measuredOrigin, !1);
1992
- let i = n.length - 1, a = n[i];
1993
- n[i] = U[t](e.measureViewportBox(), window.getComputedStyle(e.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), this.removedTransforms?.length && this.removedTransforms.forEach(([t, n]) => {
1994
- e.getValue(t).set(n);
1995
- }), this.resolveNoneKeyframes();
1996
- }
1997
- };
1998
- //#endregion
1999
- //#region node_modules/motion-dom/dist/es/utils/resolve-elements.mjs
2000
- function Ri(e, t, n) {
2001
- if (e == null) return [];
2002
- if (e instanceof EventTarget) return [e];
2003
- if (typeof e == "string") {
2004
- let r = document;
2005
- t && (r = t.current);
2006
- let i = n?.[e] ?? r.querySelectorAll(e);
2007
- return i ? Array.from(i) : [];
2008
- }
2009
- return Array.from(e).filter((e) => e != null);
2010
- }
2011
- //#endregion
2012
- //#region node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs
2013
- var zi = (e, t) => t && typeof e == "number" ? t.transform(e) : e;
2014
- //#endregion
2015
- //#region node_modules/motion-dom/dist/es/utils/is-html-element.mjs
2016
- function Bi(e) {
2017
- return _e(e) && "offsetHeight" in e && !("ownerSVGElement" in e);
2018
- }
2019
- //#endregion
2020
- //#region node_modules/motion-dom/dist/es/frameloop/microtask.mjs
2021
- var { schedule: Vi, cancel: Hi } = /* @__PURE__ */ Xe(queueMicrotask, !1), q = {
2022
- x: !1,
2023
- y: !1
2024
- };
2025
- function Ui() {
2026
- return q.x || q.y;
2027
- }
2028
- //#endregion
2029
- //#region node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs
2030
- function Wi(e) {
2031
- return e === "x" || e === "y" ? q[e] ? null : (q[e] = !0, () => {
2032
- q[e] = !1;
2033
- }) : q.x || q.y ? null : (q.x = q.y = !0, () => {
2034
- q.x = q.y = !1;
2035
- });
2036
- }
2037
- //#endregion
2038
- //#region node_modules/motion-dom/dist/es/gestures/utils/setup.mjs
2039
- function Gi(e, t) {
2040
- let n = Ri(e), r = new AbortController();
2041
- return [
2042
- n,
2043
- {
2044
- passive: !0,
2045
- ...t,
2046
- signal: r.signal
2047
- },
2048
- () => r.abort()
2049
- ];
2050
- }
2051
- //#endregion
2052
- //#region node_modules/motion-dom/dist/es/gestures/hover.mjs
2053
- function Ki(e) {
2054
- return !(e.pointerType === "touch" || Ui());
2055
- }
2056
- function qi(e, t, n = {}) {
2057
- let [r, i, a] = Gi(e, n);
2058
- return r.forEach((e) => {
2059
- let n = !1, r = !1, a, o = () => {
2060
- e.removeEventListener("pointerleave", u);
2061
- }, s = (e) => {
2062
- a && (a(e), a = void 0), o();
2063
- }, c = (e) => {
2064
- n = !1, window.removeEventListener("pointerup", c), window.removeEventListener("pointercancel", c), r && (r = !1, s(e));
2065
- }, l = () => {
2066
- n = !0, window.addEventListener("pointerup", c, i), window.addEventListener("pointercancel", c, i);
2067
- }, u = (e) => {
2068
- if (e.pointerType !== "touch") {
2069
- if (n) {
2070
- r = !0;
2071
- return;
2072
- }
2073
- s(e);
2074
- }
2075
- };
2076
- e.addEventListener("pointerenter", (n) => {
2077
- if (!Ki(n)) return;
2078
- r = !1;
2079
- let o = t(e, n);
2080
- typeof o == "function" && (a = o, e.addEventListener("pointerleave", u, i));
2081
- }, i), e.addEventListener("pointerdown", l, i);
2082
- }), a;
2083
- }
2084
- //#endregion
2085
- //#region node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs
2086
- var Ji = (e, t) => t ? e === t ? !0 : Ji(e, t.parentElement) : !1, Yi = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1, Xi = new Set([
2087
- "BUTTON",
2088
- "INPUT",
2089
- "SELECT",
2090
- "TEXTAREA",
2091
- "A"
2092
- ]);
2093
- function Zi(e) {
2094
- return Xi.has(e.tagName) || e.isContentEditable === !0;
2095
- }
2096
- var Qi = new Set([
2097
- "INPUT",
2098
- "SELECT",
2099
- "TEXTAREA"
2100
- ]);
2101
- function $i(e) {
2102
- return Qi.has(e.tagName) || e.isContentEditable === !0;
2103
- }
2104
- //#endregion
2105
- //#region node_modules/motion-dom/dist/es/gestures/press/utils/state.mjs
2106
- var ea = /* @__PURE__ */ new WeakSet();
2107
- //#endregion
2108
- //#region node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs
2109
- function ta(e) {
2110
- return (t) => {
2111
- t.key === "Enter" && e(t);
2112
- };
2113
- }
2114
- function na(e, t) {
2115
- e.dispatchEvent(new PointerEvent("pointer" + t, {
2116
- isPrimary: !0,
2117
- bubbles: !0
2118
- }));
2119
- }
2120
- var ra = (e, t) => {
2121
- let n = e.currentTarget;
2122
- if (!n) return;
2123
- let r = ta(() => {
2124
- if (ea.has(n)) return;
2125
- na(n, "down");
2126
- let e = ta(() => {
2127
- na(n, "up");
2128
- });
2129
- n.addEventListener("keyup", e, t), n.addEventListener("blur", () => na(n, "cancel"), t);
2130
- });
2131
- n.addEventListener("keydown", r, t), n.addEventListener("blur", () => n.removeEventListener("keydown", r), t);
2132
- };
2133
- //#endregion
2134
- //#region node_modules/motion-dom/dist/es/gestures/press/index.mjs
2135
- function ia(e) {
2136
- return Yi(e) && !Ui();
2137
- }
2138
- var aa = /* @__PURE__ */ new WeakSet();
2139
- function oa(e, t, n = {}) {
2140
- let [r, i, a] = Gi(e, n), o = (e) => {
2141
- let r = e.currentTarget;
2142
- if (!ia(e) || aa.has(e)) return;
2143
- ea.add(r), n.stopPropagation && aa.add(e);
2144
- let a = t(r, e), o = (e, t) => {
2145
- window.removeEventListener("pointerup", s), window.removeEventListener("pointercancel", c), ea.has(r) && ea.delete(r), ia(e) && typeof a == "function" && a(e, { success: t });
2146
- }, s = (e) => {
2147
- o(e, r === window || r === document || n.useGlobalTarget || Ji(r, e.target));
2148
- }, c = (e) => {
2149
- o(e, !1);
2150
- };
2151
- window.addEventListener("pointerup", s, i), window.addEventListener("pointercancel", c, i);
2152
- };
2153
- return r.forEach((e) => {
2154
- (n.useGlobalTarget ? window : e).addEventListener("pointerdown", o, i), Bi(e) && (e.addEventListener("focus", (e) => ra(e, i)), !Zi(e) && !e.hasAttribute("tabindex") && (e.tabIndex = 0));
2155
- }), a;
2156
- }
2157
- //#endregion
2158
- //#region node_modules/motion-dom/dist/es/utils/is-svg-element.mjs
2159
- function sa(e) {
2160
- return _e(e) && "ownerSVGElement" in e;
2161
- }
2162
- //#endregion
2163
- //#region node_modules/motion-dom/dist/es/resize/handle-element.mjs
2164
- var ca = /* @__PURE__ */ new WeakMap(), la, ua = (e, t, n) => (r, i) => i && i[0] ? i[0][e + "Size"] : sa(r) && "getBBox" in r ? r.getBBox()[t] : r[n], da = /* @__PURE__ */ ua("inline", "width", "offsetWidth"), fa = /* @__PURE__ */ ua("block", "height", "offsetHeight");
2165
- function pa({ target: e, borderBoxSize: t }) {
2166
- ca.get(e)?.forEach((n) => {
2167
- n(e, {
2168
- get width() {
2169
- return da(e, t);
2170
- },
2171
- get height() {
2172
- return fa(e, t);
2173
- }
2174
- });
2175
- });
2176
- }
2177
- function ma(e) {
2178
- e.forEach(pa);
2179
- }
2180
- function ha() {
2181
- typeof ResizeObserver > "u" || (la = new ResizeObserver(ma));
2182
- }
2183
- function ga(e, t) {
2184
- la || ha();
2185
- let n = Ri(e);
2186
- return n.forEach((e) => {
2187
- let n = ca.get(e);
2188
- n || (n = /* @__PURE__ */ new Set(), ca.set(e, n)), n.add(t), la?.observe(e);
2189
- }), () => {
2190
- n.forEach((e) => {
2191
- let n = ca.get(e);
2192
- n?.delete(t), n?.size || la?.unobserve(e);
2193
- });
2194
- };
2195
- }
2196
- //#endregion
2197
- //#region node_modules/motion-dom/dist/es/resize/handle-window.mjs
2198
- var _a = /* @__PURE__ */ new Set(), va;
2199
- function ya() {
2200
- va = () => {
2201
- let e = {
2202
- get width() {
2203
- return window.innerWidth;
2204
- },
2205
- get height() {
2206
- return window.innerHeight;
2207
- }
2208
- };
2209
- _a.forEach((t) => t(e));
2210
- }, window.addEventListener("resize", va);
2211
- }
2212
- function ba(e) {
2213
- return _a.add(e), va || ya(), () => {
2214
- _a.delete(e), !_a.size && typeof va == "function" && (window.removeEventListener("resize", va), va = void 0);
2215
- };
2216
- }
2217
- //#endregion
2218
- //#region node_modules/motion-dom/dist/es/resize/index.mjs
2219
- function xa(e, t) {
2220
- return typeof e == "function" ? ba(e) : ga(e, t);
2221
- }
2222
- //#endregion
2223
- //#region node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs
2224
- function Sa(e) {
2225
- return sa(e) && e.tagName === "svg";
2226
- }
2227
- //#endregion
2228
- //#region node_modules/motion-dom/dist/es/value/types/utils/find.mjs
2229
- var Ca = [
2230
- ...xi,
2231
- R,
2232
- z
2233
- ], wa = (e) => Ca.find(bi(e)), Ta = () => ({
2234
- translate: 0,
2235
- scale: 1,
2236
- origin: 0,
2237
- originPoint: 0
2238
- }), Ea = () => ({
2239
- x: Ta(),
2240
- y: Ta()
2241
- }), Da = () => ({
2242
- min: 0,
2243
- max: 0
2244
- }), J = () => ({
2245
- x: Da(),
2246
- y: Da()
2247
- }), Oa = /* @__PURE__ */ new WeakMap();
2248
- //#endregion
2249
- //#region node_modules/motion-dom/dist/es/render/utils/is-animation-controls.mjs
2250
- function ka(e) {
2251
- return typeof e == "object" && !!e && typeof e.start == "function";
2252
- }
2253
- //#endregion
2254
- //#region node_modules/motion-dom/dist/es/render/utils/is-variant-label.mjs
2255
- function Aa(e) {
2256
- return typeof e == "string" || Array.isArray(e);
2257
- }
2258
- //#endregion
2259
- //#region node_modules/motion-dom/dist/es/render/utils/variant-props.mjs
2260
- var ja = [
2261
- "animate",
2262
- "whileInView",
2263
- "whileFocus",
2264
- "whileHover",
2265
- "whileTap",
2266
- "whileDrag",
2267
- "exit"
2268
- ], Ma = ["initial", ...ja];
2269
- //#endregion
2270
- //#region node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs
2271
- function Na(e) {
2272
- return ka(e.animate) || Ma.some((t) => Aa(e[t]));
2273
- }
2274
- function Pa(e) {
2275
- return !!(Na(e) || e.variants);
2276
- }
2277
- //#endregion
2278
- //#region node_modules/motion-dom/dist/es/render/utils/motion-values.mjs
2279
- function Fa(e, t, n) {
2280
- for (let r in t) {
2281
- let i = t[r], a = n[r];
2282
- if (K(i)) e.addValue(r, i);
2283
- else if (K(a)) e.addValue(r, ii(i, { owner: e }));
2284
- else if (a !== i) if (e.hasValue(r)) {
2285
- let t = e.getValue(r);
2286
- t.liveStyle === !0 ? t.jump(i) : t.hasAnimated || t.set(i);
2287
- } else {
2288
- let t = e.getStaticValue(r);
2289
- e.addValue(r, ii(t === void 0 ? i : t, { owner: e }));
2290
- }
2291
- }
2292
- for (let r in n) t[r] === void 0 && e.removeValue(r);
2293
- return t;
2294
- }
2295
- //#endregion
2296
- //#region node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.mjs
2297
- var Ia = { current: null }, La = { current: !1 }, Ra = typeof window < "u";
2298
- function za() {
2299
- if (La.current = !0, Ra) if (window.matchMedia) {
2300
- let e = window.matchMedia("(prefers-reduced-motion)"), t = () => Ia.current = e.matches;
2301
- e.addEventListener("change", t), t();
2302
- } else Ia.current = !1;
2303
- }
2304
- //#endregion
2305
- //#region node_modules/motion-dom/dist/es/render/VisualElement.mjs
2306
- var Ba = [
2307
- "AnimationStart",
2308
- "AnimationComplete",
2309
- "Update",
2310
- "BeforeLayoutMeasure",
2311
- "LayoutMeasure",
2312
- "LayoutAnimationStart",
2313
- "LayoutAnimationComplete"
2314
- ], Va = {};
2315
- function Ha(e) {
2316
- Va = e;
2317
- }
2318
- function Ua() {
2319
- return Va;
2320
- }
2321
- var Wa = class {
2322
- scrapeMotionValuesFromProps(e, t, n) {
2323
- return {};
2324
- }
2325
- constructor({ parent: e, props: t, presenceContext: n, reducedMotionConfig: r, skipAnimations: i, blockInitialAnimation: a, visualState: o }, s = {}) {
2326
- this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = or, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.hasBeenMounted = !1, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2327
- this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2328
- }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2329
- let e = N.now();
2330
- this.renderScheduledAt < e && (this.renderScheduledAt = e, A.render(this.render, !1, !0));
2331
- };
2332
- let { latestValues: c, renderState: l } = o;
2333
- this.latestValues = c, this.baseTarget = { ...c }, this.initialValues = t.initial ? { ...c } : {}, this.renderState = l, this.parent = e, this.props = t, this.presenceContext = n, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = r, this.skipAnimationsConfig = i, this.options = s, this.blockInitialAnimation = !!a, this.isControllingVariants = Na(t), this.isVariantNode = Pa(t), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
2334
- let { willChange: u, ...d } = this.scrapeMotionValuesFromProps(t, {}, this);
2335
- for (let e in d) {
2336
- let t = d[e];
2337
- c[e] !== void 0 && K(t) && t.set(c[e]);
2338
- }
2339
- }
2340
- mount(e) {
2341
- if (this.hasBeenMounted) for (let e in this.initialValues) this.values.get(e)?.jump(this.initialValues[e]), this.latestValues[e] = this.initialValues[e];
2342
- this.current = e, Oa.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((e, t) => this.bindToMotionValue(t, e)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (La.current || za(), this.shouldReduceMotion = Ia.current), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, this.parent?.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
2343
- }
2344
- unmount() {
2345
- this.projection && this.projection.unmount(), j(this.notifyUpdate), j(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
2346
- for (let e in this.events) this.events[e].clear();
2347
- for (let e in this.features) {
2348
- let t = this.features[e];
2349
- t && (t.unmount(), t.isMounted = !1);
2350
- }
2351
- this.current = null;
2352
- }
2353
- addChild(e) {
2354
- this.children.add(e), this.enteringChildren ?? (this.enteringChildren = /* @__PURE__ */ new Set()), this.enteringChildren.add(e);
2355
- }
2356
- removeChild(e) {
2357
- this.children.delete(e), this.enteringChildren && this.enteringChildren.delete(e);
2358
- }
2359
- bindToMotionValue(e, t) {
2360
- if (this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)(), t.accelerate && kr.has(e) && this.current instanceof HTMLElement) {
2361
- let { factory: n, keyframes: r, times: i, ease: a, duration: o } = t.accelerate, s = new yr({
2362
- element: this.current,
2363
- name: e,
2364
- keyframes: r,
2365
- times: i,
2366
- ease: a,
2367
- duration: /* @__PURE__ */ D(o)
2368
- }), c = n(s);
2369
- this.valueSubscriptions.set(e, () => {
2370
- c(), s.cancel();
2371
- });
2372
- return;
2373
- }
2374
- let n = Yn.has(e);
2375
- n && this.onBindTransform && this.onBindTransform();
2376
- let r = t.on("change", (t) => {
2377
- this.latestValues[e] = t, this.props.onUpdate && A.preRender(this.notifyUpdate), n && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
2378
- }), i;
2379
- typeof window < "u" && window.MotionCheckAppearSync && (i = window.MotionCheckAppearSync(this, e, t)), this.valueSubscriptions.set(e, () => {
2380
- r(), i && i(), t.owner && t.stop();
2381
- });
2382
- }
2383
- sortNodePosition(e) {
2384
- return !this.current || !this.sortInstanceNodePosition || this.type !== e.type ? 0 : this.sortInstanceNodePosition(this.current, e.current);
2385
- }
2386
- updateFeatures() {
2387
- let e = "animation";
2388
- for (e in Va) {
2389
- let t = Va[e];
2390
- if (!t) continue;
2391
- let { isEnabled: n, Feature: r } = t;
2392
- if (!this.features[e] && r && n(this.props) && (this.features[e] = new r(this)), this.features[e]) {
2393
- let t = this.features[e];
2394
- t.isMounted ? t.update() : (t.mount(), t.isMounted = !0);
2395
- }
2396
- }
2397
- }
2398
- triggerBuild() {
2399
- this.build(this.renderState, this.latestValues, this.props);
2400
- }
2401
- measureViewportBox() {
2402
- return this.current ? this.measureInstanceViewportBox(this.current, this.props) : J();
2403
- }
2404
- getStaticValue(e) {
2405
- return this.latestValues[e];
2406
- }
2407
- setStaticValue(e, t) {
2408
- this.latestValues[e] = t;
2409
- }
2410
- update(e, t) {
2411
- (e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = t;
2412
- for (let t = 0; t < Ba.length; t++) {
2413
- let n = Ba[t];
2414
- this.propEventSubscriptions[n] && (this.propEventSubscriptions[n](), delete this.propEventSubscriptions[n]);
2415
- let r = e["on" + n];
2416
- r && (this.propEventSubscriptions[n] = this.on(n, r));
2417
- }
2418
- this.prevMotionValues = Fa(this, this.scrapeMotionValuesFromProps(e, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2419
- }
2420
- getProps() {
2421
- return this.props;
2422
- }
2423
- getVariant(e) {
2424
- return this.props.variants ? this.props.variants[e] : void 0;
2425
- }
2426
- getDefaultTransition() {
2427
- return this.props.transition;
2428
- }
2429
- getTransformPagePoint() {
2430
- return this.props.transformPagePoint;
2431
- }
2432
- getClosestVariantNode() {
2433
- return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
2434
- }
2435
- addVariantChild(e) {
2436
- let t = this.getClosestVariantNode();
2437
- if (t) return t.variantChildren && t.variantChildren.add(e), () => t.variantChildren.delete(e);
2438
- }
2439
- addValue(e, t) {
2440
- let n = this.values.get(e);
2441
- t !== n && (n && this.removeValue(e), this.bindToMotionValue(e, t), this.values.set(e, t), this.latestValues[e] = t.get());
2442
- }
2443
- removeValue(e) {
2444
- this.values.delete(e);
2445
- let t = this.valueSubscriptions.get(e);
2446
- t && (t(), this.valueSubscriptions.delete(e)), delete this.latestValues[e], this.removeValueFromRenderState(e, this.renderState);
2447
- }
2448
- hasValue(e) {
2449
- return this.values.has(e);
2450
- }
2451
- getValue(e, t) {
2452
- if (this.props.values && this.props.values[e]) return this.props.values[e];
2453
- let n = this.values.get(e);
2454
- return n === void 0 && t !== void 0 && (n = ii(t === null ? void 0 : t, { owner: this }), this.addValue(e, n)), n;
2455
- }
2456
- readValue(e, t) {
2457
- let n = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
2458
- return n != null && (typeof n == "string" && (ge(n) || ve(n)) ? n = parseFloat(n) : !wa(n) && z.test(t) && (n = Pi(e, t)), this.setBaseTarget(e, K(n) ? n.get() : n)), K(n) ? n.get() : n;
2459
- }
2460
- setBaseTarget(e, t) {
2461
- this.baseTarget[e] = t;
2462
- }
2463
- getBaseTarget(e) {
2464
- let { initial: t } = this.props, n;
2465
- if (typeof t == "string" || typeof t == "object") {
2466
- let r = Qr(this.props, t, this.presenceContext?.custom);
2467
- r && (n = r[e]);
2468
- }
2469
- if (t && n !== void 0) return n;
2470
- let r = this.getBaseTargetFromProps(this.props, e);
2471
- return r !== void 0 && !K(r) ? r : this.initialValues[e] !== void 0 && n === void 0 ? void 0 : this.baseTarget[e];
2472
- }
2473
- on(e, t) {
2474
- return this.events[e] || (this.events[e] = new Ce()), this.events[e].add(t);
2475
- }
2476
- notify(e, ...t) {
2477
- this.events[e] && this.events[e].notify(...t);
2478
- }
2479
- scheduleRenderMicrotask() {
2480
- Vi.render(this.render);
2481
- }
2482
- }, Ga = class extends Wa {
2483
- constructor() {
2484
- super(...arguments), this.KeyframeResolver = Li;
2485
- }
2486
- sortInstanceNodePosition(e, t) {
2487
- return e.compareDocumentPosition(t) & 2 ? 1 : -1;
2488
- }
2489
- getBaseTargetFromProps(e, t) {
2490
- let n = e.style;
2491
- return n ? n[t] : void 0;
2492
- }
2493
- removeValueFromRenderState(e, { vars: t, style: n }) {
2494
- delete t[e], delete n[e];
2495
- }
2496
- handleChildMotionValue() {
2497
- this.childSubscription && (this.childSubscription(), delete this.childSubscription);
2498
- let { children: e } = this.props;
2499
- K(e) && (this.childSubscription = e.on("change", (e) => {
2500
- this.current && (this.current.textContent = `${e}`);
2501
- }));
2502
- }
2503
- }, Y = class {
2504
- constructor(e) {
2505
- this.isMounted = !1, this.node = e;
2506
- }
2507
- update() {}
2508
- };
2509
- //#endregion
2510
- //#region node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs
2511
- function Ka({ top: e, left: t, right: n, bottom: r }) {
2512
- return {
2513
- x: {
2514
- min: t,
2515
- max: n
2516
- },
2517
- y: {
2518
- min: e,
2519
- max: r
2520
- }
2521
- };
2522
- }
2523
- function qa({ x: e, y: t }) {
2524
- return {
2525
- top: t.min,
2526
- right: e.max,
2527
- bottom: t.max,
2528
- left: e.min
2529
- };
2530
- }
2531
- function Ja(e, t) {
2532
- if (!t) return e;
2533
- let n = t({
2534
- x: e.left,
2535
- y: e.top
2536
- }), r = t({
2537
- x: e.right,
2538
- y: e.bottom
2539
- });
2540
- return {
2541
- top: n.y,
2542
- left: n.x,
2543
- bottom: r.y,
2544
- right: r.x
2545
- };
2546
- }
2547
- //#endregion
2548
- //#region node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs
2549
- function Ya(e) {
2550
- return e === void 0 || e === 1;
2551
- }
2552
- function Xa({ scale: e, scaleX: t, scaleY: n }) {
2553
- return !Ya(e) || !Ya(t) || !Ya(n);
2554
- }
2555
- function Za(e) {
2556
- return Xa(e) || Qa(e) || e.z || e.rotate || e.rotateX || e.rotateY || e.skewX || e.skewY;
2557
- }
2558
- function Qa(e) {
2559
- return $a(e.x) || $a(e.y);
2560
- }
2561
- function $a(e) {
2562
- return e && e !== "0%";
2563
- }
2564
- //#endregion
2565
- //#region node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs
2566
- function eo(e, t, n) {
2567
- return n + t * (e - n);
2568
- }
2569
- function to(e, t, n, r, i) {
2570
- return i !== void 0 && (e = eo(e, i, r)), eo(e, n, r) + t;
2571
- }
2572
- function no(e, t = 0, n = 1, r, i) {
2573
- e.min = to(e.min, t, n, r, i), e.max = to(e.max, t, n, r, i);
2574
- }
2575
- function ro(e, { x: t, y: n }) {
2576
- no(e.x, t.translate, t.scale, t.originPoint), no(e.y, n.translate, n.scale, n.originPoint);
2577
- }
2578
- var io = .999999999999, ao = 1.0000000000001;
2579
- function oo(e, t, n, r = !1) {
2580
- let i = n.length;
2581
- if (!i) return;
2582
- t.x = t.y = 1;
2583
- let a, o;
2584
- for (let s = 0; s < i; s++) {
2585
- a = n[s], o = a.projectionDelta;
2586
- let { visualElement: i } = a.options;
2587
- i && i.props.style && i.props.style.display === "contents" || (r && a.options.layoutScroll && a.scroll && a !== a.root && (X(e.x, -a.scroll.offset.x), X(e.y, -a.scroll.offset.y)), o && (t.x *= o.x.scale, t.y *= o.y.scale, ro(e, o)), r && Za(a.latestValues) && lo(e, a.latestValues, a.layout?.layoutBox));
2588
- }
2589
- t.x < ao && t.x > io && (t.x = 1), t.y < ao && t.y > io && (t.y = 1);
2590
- }
2591
- function X(e, t) {
2592
- e.min += t, e.max += t;
2593
- }
2594
- function so(e, t, n, r, i = .5) {
2595
- no(e, t, n, B(e.min, e.max, i), r);
2596
- }
2597
- function co(e, t) {
2598
- return typeof e == "string" ? parseFloat(e) / 100 * (t.max - t.min) : e;
2599
- }
2600
- function lo(e, t, n) {
2601
- let r = n ?? e;
2602
- so(e.x, co(t.x, r.x), t.scaleX, t.scale, t.originX), so(e.y, co(t.y, r.y), t.scaleY, t.scale, t.originY);
2603
- }
2604
- //#endregion
2605
- //#region node_modules/motion-dom/dist/es/projection/utils/measure.mjs
2606
- function uo(e, t) {
2607
- return Ka(Ja(e.getBoundingClientRect(), t));
2608
- }
2609
- function fo(e, t, n) {
2610
- let r = uo(e, n), { scroll: i } = t;
2611
- return i && (X(r.x, i.offset.x), X(r.y, i.offset.y)), r;
2612
- }
2613
- //#endregion
2614
- //#region node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs
2615
- var po = {
2616
- x: "translateX",
2617
- y: "translateY",
2618
- z: "translateZ",
2619
- transformPerspective: "perspective"
2620
- }, mo = Jn.length;
2621
- function ho(e, t, n) {
2622
- let r = "", i = !0;
2623
- for (let a = 0; a < mo; a++) {
2624
- let o = Jn[a], s = e[o];
2625
- if (s === void 0) continue;
2626
- let c = !0;
2627
- if (typeof s == "number") c = s === +!!o.startsWith("scale");
2628
- else {
2629
- let e = parseFloat(s);
2630
- c = o.startsWith("scale") ? e === 1 : e === 0;
2631
- }
2632
- if (!c || n) {
2633
- let e = zi(s, Ai[o]);
2634
- if (!c) {
2635
- i = !1;
2636
- let t = po[o] || o;
2637
- r += `${t}(${e}) `;
2638
- }
2639
- n && (t[o] = e);
2640
- }
2641
- }
2642
- return r = r.trim(), n ? r = n(t, i ? "" : r) : i && (r = "none"), r;
2643
- }
2644
- //#endregion
2645
- //#region node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs
2646
- function go(e, t, n) {
2647
- let { style: r, vars: i, transformOrigin: a } = e, o = !1, s = !1;
2648
- for (let e in t) {
2649
- let n = t[e];
2650
- if (Yn.has(e)) {
2651
- o = !0;
2652
- continue;
2653
- } else if (nt(e)) {
2654
- i[e] = n;
2655
- continue;
2656
- } else {
2657
- let t = zi(n, Ai[e]);
2658
- e.startsWith("origin") ? (s = !0, a[e] = t) : r[e] = t;
2659
- }
2660
- }
2661
- if (t.transform || (o || n ? r.transform = ho(t, e.transform, n) : r.transform && (r.transform = "none")), s) {
2662
- let { originX: e = "50%", originY: t = "50%", originZ: n = 0 } = a;
2663
- r.transformOrigin = `${e} ${t} ${n}`;
2664
- }
2665
- }
2666
- //#endregion
2667
- //#region node_modules/motion-dom/dist/es/render/html/utils/render.mjs
2668
- function _o(e, { style: t, vars: n }, r, i) {
2669
- let a = e.style, o;
2670
- for (o in t) a[o] = t[o];
2671
- for (o in i?.applyProjectionStyles(a, r), n) a.setProperty(o, n[o]);
2672
- }
2673
- //#endregion
2674
- //#region node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs
2675
- function vo(e, t) {
2676
- return t.max === t.min ? 0 : e / (t.max - t.min) * 100;
2677
- }
2678
- var yo = { correct: (e, t) => {
2679
- if (!t.target) return e;
2680
- if (typeof e == "string") if (L.test(e)) e = parseFloat(e);
2681
- else return e;
2682
- return `${vo(e, t.target.x)}% ${vo(e, t.target.y)}%`;
2683
- } }, bo = { correct: (e, { treeScale: t, projectionDelta: n }) => {
2684
- let r = e, i = z.parse(e);
2685
- if (i.length > 5) return r;
2686
- let a = z.createTransformer(e), o = typeof i[0] == "number" ? 0 : 1, s = n.x.scale * t.x, c = n.y.scale * t.y;
2687
- i[0 + o] /= s, i[1 + o] /= c;
2688
- let l = B(s, c, .5);
2689
- return typeof i[2 + o] == "number" && (i[2 + o] /= l), typeof i[3 + o] == "number" && (i[3 + o] /= l), a(i);
2690
- } }, xo = {
2691
- borderRadius: {
2692
- ...yo,
2693
- applyTo: [
2694
- "borderTopLeftRadius",
2695
- "borderTopRightRadius",
2696
- "borderBottomLeftRadius",
2697
- "borderBottomRightRadius"
2698
- ]
2699
- },
2700
- borderTopLeftRadius: yo,
2701
- borderTopRightRadius: yo,
2702
- borderBottomLeftRadius: yo,
2703
- borderBottomRightRadius: yo,
2704
- boxShadow: bo
2705
- };
2706
- //#endregion
2707
- //#region node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs
2708
- function So(e, { layout: t, layoutId: n }) {
2709
- return Yn.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!xo[e] || e === "opacity");
2710
- }
2711
- //#endregion
2712
- //#region node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs
2713
- function Co(e, t, n) {
2714
- let r = e.style, i = t?.style, a = {};
2715
- if (!r) return a;
2716
- for (let t in r) (K(r[t]) || i && K(i[t]) || So(t, e) || n?.getValue(t)?.liveStyle !== void 0) && (a[t] = r[t]);
2717
- return a;
2718
- }
2719
- //#endregion
2720
- //#region node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs
2721
- function wo(e) {
2722
- return window.getComputedStyle(e);
2723
- }
2724
- var To = class extends Ga {
2725
- constructor() {
2726
- super(...arguments), this.type = "html", this.renderInstance = _o;
2727
- }
2728
- readValueFromInstance(e, t) {
2729
- if (Yn.has(t)) return this.projection?.isProjecting ? Wn(t) : Kn(e, t);
2730
- {
2731
- let n = wo(e), r = (nt(t) ? n.getPropertyValue(t) : n[t]) || 0;
2732
- return typeof r == "string" ? r.trim() : r;
2733
- }
2734
- }
2735
- measureInstanceViewportBox(e, { transformPagePoint: t }) {
2736
- return uo(e, t);
2737
- }
2738
- build(e, t, n) {
2739
- go(e, t, n.transformTemplate);
2740
- }
2741
- scrapeMotionValuesFromProps(e, t, n) {
2742
- return Co(e, t, n);
2743
- }
2744
- }, Eo = {
2745
- offset: "stroke-dashoffset",
2746
- array: "stroke-dasharray"
2747
- }, Do = {
2748
- offset: "strokeDashoffset",
2749
- array: "strokeDasharray"
2750
- };
2751
- function Oo(e, t, n = 1, r = 0, i = !0) {
2752
- e.pathLength = 1;
2753
- let a = i ? Eo : Do;
2754
- e[a.offset] = `${-r}`, e[a.array] = `${t} ${n}`;
2755
- }
2756
- //#endregion
2757
- //#region node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs
2758
- var ko = [
2759
- "offsetDistance",
2760
- "offsetPath",
2761
- "offsetRotate",
2762
- "offsetAnchor"
2763
- ];
2764
- function Ao(e, { attrX: t, attrY: n, attrScale: r, pathLength: i, pathSpacing: a = 1, pathOffset: o = 0, ...s }, c, l, u) {
2765
- if (go(e, s, l), c) {
2766
- e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
2767
- return;
2768
- }
2769
- e.attrs = e.style, e.style = {};
2770
- let { attrs: d, style: f } = e;
2771
- d.transform && (f.transform = d.transform, delete d.transform), (f.transform || d.transformOrigin) && (f.transformOrigin = d.transformOrigin ?? "50% 50%", delete d.transformOrigin), f.transform && (f.transformBox = u?.transformBox ?? "fill-box", delete d.transformBox);
2772
- for (let e of ko) d[e] !== void 0 && (f[e] = d[e], delete d[e]);
2773
- t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), r !== void 0 && (d.scale = r), i !== void 0 && Oo(d, i, a, o, !1);
2774
- }
2775
- //#endregion
2776
- //#region node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.mjs
2777
- var jo = new Set([
2778
- "baseFrequency",
2779
- "diffuseConstant",
2780
- "kernelMatrix",
2781
- "kernelUnitLength",
2782
- "keySplines",
2783
- "keyTimes",
2784
- "limitingConeAngle",
2785
- "markerHeight",
2786
- "markerWidth",
2787
- "numOctaves",
2788
- "targetX",
2789
- "targetY",
2790
- "surfaceScale",
2791
- "specularConstant",
2792
- "specularExponent",
2793
- "stdDeviation",
2794
- "tableValues",
2795
- "viewBox",
2796
- "gradientTransform",
2797
- "pathLength",
2798
- "startOffset",
2799
- "textLength",
2800
- "lengthAdjust"
2801
- ]), Mo = (e) => typeof e == "string" && e.toLowerCase() === "svg";
2802
- //#endregion
2803
- //#region node_modules/motion-dom/dist/es/render/svg/utils/render.mjs
2804
- function No(e, t, n, r) {
2805
- _o(e, t, void 0, r);
2806
- for (let n in t.attrs) e.setAttribute(jo.has(n) ? n : di(n), t.attrs[n]);
2807
- }
2808
- //#endregion
2809
- //#region node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs
2810
- function Po(e, t, n) {
2811
- let r = Co(e, t, n);
2812
- for (let n in e) if (K(e[n]) || K(t[n])) {
2813
- let t = Jn.indexOf(n) === -1 ? n : "attr" + n.charAt(0).toUpperCase() + n.substring(1);
2814
- r[t] = e[n];
2815
- }
2816
- return r;
2817
- }
2818
- //#endregion
2819
- //#region node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs
2820
- var Fo = class extends Ga {
2821
- constructor() {
2822
- super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = J;
2823
- }
2824
- getBaseTargetFromProps(e, t) {
2825
- return e[t];
2826
- }
2827
- readValueFromInstance(e, t) {
2828
- if (Yn.has(t)) {
2829
- let e = Mi(t);
2830
- return e && e.default || 0;
2831
- }
2832
- return t = jo.has(t) ? t : di(t), e.getAttribute(t);
2833
- }
2834
- scrapeMotionValuesFromProps(e, t, n) {
2835
- return Po(e, t, n);
2836
- }
2837
- build(e, t, n) {
2838
- Ao(e, t, this.isSVGTag, n.transformTemplate, n.style);
2839
- }
2840
- renderInstance(e, t, n, r) {
2841
- No(e, t, n, r);
2842
- }
2843
- mount(e) {
2844
- this.isSVGTag = Mo(e.tagName), super.mount(e);
2845
- }
2846
- }, Io = Ma.length;
2847
- function Lo(e) {
2848
- if (!e) return;
2849
- if (!e.isControllingVariants) {
2850
- let t = e.parent && Lo(e.parent) || {};
2851
- return e.props.initial !== void 0 && (t.initial = e.props.initial), t;
2852
- }
2853
- let t = {};
2854
- for (let n = 0; n < Io; n++) {
2855
- let r = Ma[n], i = e.props[r];
2856
- (Aa(i) || i === !1) && (t[r] = i);
2857
- }
2858
- return t;
2859
- }
2860
- //#endregion
2861
- //#region node_modules/motion-dom/dist/es/render/utils/shallow-compare.mjs
2862
- function Ro(e, t) {
2863
- if (!Array.isArray(t)) return !1;
2864
- let n = t.length;
2865
- if (n !== e.length) return !1;
2866
- for (let r = 0; r < n; r++) if (t[r] !== e[r]) return !1;
2867
- return !0;
2868
- }
2869
- //#endregion
2870
- //#region node_modules/motion-dom/dist/es/render/utils/animation-state.mjs
2871
- var zo = [...ja].reverse(), Bo = ja.length;
2872
- function Vo(e) {
2873
- return (t) => Promise.all(t.map(({ animation: t, options: n }) => vi(e, t, n)));
2874
- }
2875
- function Ho(e) {
2876
- let t = Vo(e), n = Go(), r = !0, i = !1, a = (t) => (n, r) => {
2877
- let i = G(e, r, t === "exit" ? e.presenceContext?.custom : void 0);
2878
- if (i) {
2879
- let { transition: e, transitionEnd: t, ...r } = i;
2880
- n = {
2881
- ...n,
2882
- ...r,
2883
- ...t
2884
- };
2885
- }
2886
- return n;
2887
- };
2888
- function o(n) {
2889
- t = n(e);
2890
- }
2891
- function s(o) {
2892
- let { props: s } = e, c = Lo(e.parent) || {}, l = [], u = /* @__PURE__ */ new Set(), d = {}, f = Infinity;
2893
- for (let t = 0; t < Bo; t++) {
2894
- let p = zo[t], m = n[p], h = s[p] === void 0 ? c[p] : s[p], g = Aa(h), _ = p === o ? m.isActive : null;
2895
- _ === !1 && (f = t);
2896
- let v = h === c[p] && h !== s[p] && g;
2897
- if (v && (r || i) && e.manuallyAnimateOnMount && (v = !1), m.protectedKeys = { ...d }, !m.isActive && _ === null || !h && !m.prevProp || ka(h) || typeof h == "boolean") continue;
2898
- if (p === "exit" && m.isActive && _ !== !0) {
2899
- m.prevResolvedValues && (d = {
2900
- ...d,
2901
- ...m.prevResolvedValues
2902
- });
2903
- continue;
2904
- }
2905
- let y = Uo(m.prevProp, h), b = y || p === o && m.isActive && !v && g || t > f && g, x = !1, S = Array.isArray(h) ? h : [h], C = S.reduce(a(p), {});
2906
- _ === !1 && (C = {});
2907
- let { prevResolvedValues: ee = {} } = m, te = {
2908
- ...ee,
2909
- ...C
2910
- }, ne = (t) => {
2911
- b = !0, u.has(t) && (x = !0, u.delete(t)), m.needsAnimating[t] = !0;
2912
- let n = e.getValue(t);
2913
- n && (n.liveStyle = !1);
2914
- };
2915
- for (let e in te) {
2916
- let t = C[e], n = ee[e];
2917
- if (d.hasOwnProperty(e)) continue;
2918
- let r = !1;
2919
- r = ai(t) && ai(n) ? !Ro(t, n) : t !== n, r ? t == null ? u.add(e) : ne(e) : t !== void 0 && u.has(e) ? ne(e) : m.protectedKeys[e] = !0;
2920
- }
2921
- m.prevProp = h, m.prevResolvedValues = C, m.isActive && (d = {
2922
- ...d,
2923
- ...C
2924
- }), (r || i) && e.blockInitialAnimation && (b = !1);
2925
- let re = v && y;
2926
- b && (!re || x) && l.push(...S.map((t) => {
2927
- let n = { type: p };
2928
- if (typeof t == "string" && (r || i) && !re && e.manuallyAnimateOnMount && e.parent) {
2929
- let { parent: r } = e, i = G(r, t);
2930
- if (r.enteringChildren && i) {
2931
- let { delayChildren: t } = i.transition || {};
2932
- n.delay = Lr(r.enteringChildren, e, t);
2933
- }
2934
- }
2935
- return {
2936
- animation: t,
2937
- options: n
2938
- };
2939
- }));
2940
- }
2941
- if (u.size) {
2942
- let t = {};
2943
- if (typeof s.initial != "boolean") {
2944
- let n = G(e, Array.isArray(s.initial) ? s.initial[0] : s.initial);
2945
- n && n.transition && (t.transition = n.transition);
2946
- }
2947
- u.forEach((n) => {
2948
- let r = e.getBaseTarget(n), i = e.getValue(n);
2949
- i && (i.liveStyle = !0), t[n] = r ?? null;
2950
- }), l.push({ animation: t });
2951
- }
2952
- let p = !!l.length;
2953
- return r && (s.initial === !1 || s.initial === s.animate) && !e.manuallyAnimateOnMount && (p = !1), r = !1, i = !1, p ? t(l) : Promise.resolve();
2954
- }
2955
- function c(t, r) {
2956
- if (n[t].isActive === r) return Promise.resolve();
2957
- e.variantChildren?.forEach((e) => e.animationState?.setActive(t, r)), n[t].isActive = r;
2958
- let i = s(t);
2959
- for (let e in n) n[e].protectedKeys = {};
2960
- return i;
2961
- }
2962
- return {
2963
- animateChanges: s,
2964
- setActive: c,
2965
- setAnimateFunction: o,
2966
- getState: () => n,
2967
- reset: () => {
2968
- n = Go(), i = !0;
2969
- }
2970
- };
2971
- }
2972
- function Uo(e, t) {
2973
- return typeof t == "string" ? t !== e : Array.isArray(t) ? !Ro(t, e) : !1;
2974
- }
2975
- function Wo(e = !1) {
2976
- return {
2977
- isActive: e,
2978
- protectedKeys: {},
2979
- needsAnimating: {},
2980
- prevResolvedValues: {}
2981
- };
2982
- }
2983
- function Go() {
2984
- return {
2985
- animate: Wo(!0),
2986
- whileInView: Wo(),
2987
- whileHover: Wo(),
2988
- whileTap: Wo(),
2989
- whileDrag: Wo(),
2990
- whileFocus: Wo(),
2991
- exit: Wo()
2992
- };
2993
- }
2994
- //#endregion
2995
- //#region node_modules/motion-dom/dist/es/projection/geometry/copy.mjs
2996
- function Ko(e, t) {
2997
- e.min = t.min, e.max = t.max;
2998
- }
2999
- function Z(e, t) {
3000
- Ko(e.x, t.x), Ko(e.y, t.y);
3001
- }
3002
- function qo(e, t) {
3003
- e.translate = t.translate, e.scale = t.scale, e.originPoint = t.originPoint, e.origin = t.origin;
3004
- }
3005
- //#endregion
3006
- //#region node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs
3007
- var Jo = 1e-4, Yo = 1 - Jo, Xo = 1 + Jo, Zo = .01, Qo = 0 - Zo, $o = 0 + Zo;
3008
- function Q(e) {
3009
- return e.max - e.min;
3010
- }
3011
- function es(e, t, n) {
3012
- return Math.abs(e - t) <= n;
3013
- }
3014
- function ts(e, t, n, r = .5) {
3015
- e.origin = r, e.originPoint = B(t.min, t.max, e.origin), e.scale = Q(n) / Q(t), e.translate = B(n.min, n.max, e.origin) - e.originPoint, (e.scale >= Yo && e.scale <= Xo || isNaN(e.scale)) && (e.scale = 1), (e.translate >= Qo && e.translate <= $o || isNaN(e.translate)) && (e.translate = 0);
3016
- }
3017
- function ns(e, t, n, r) {
3018
- ts(e.x, t.x, n.x, r ? r.originX : void 0), ts(e.y, t.y, n.y, r ? r.originY : void 0);
3019
- }
3020
- function rs(e, t, n, r = 0) {
3021
- e.min = (r ? B(n.min, n.max, r) : n.min) + t.min, e.max = e.min + Q(t);
3022
- }
3023
- function is(e, t, n, r) {
3024
- rs(e.x, t.x, n.x, r?.x), rs(e.y, t.y, n.y, r?.y);
3025
- }
3026
- function as(e, t, n, r = 0) {
3027
- let i = r ? B(n.min, n.max, r) : n.min;
3028
- e.min = t.min - i, e.max = e.min + Q(t);
3029
- }
3030
- function os(e, t, n, r) {
3031
- as(e.x, t.x, n.x, r?.x), as(e.y, t.y, n.y, r?.y);
3032
- }
3033
- //#endregion
3034
- //#region node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs
3035
- function ss(e, t, n, r, i) {
3036
- return e -= t, e = eo(e, 1 / n, r), i !== void 0 && (e = eo(e, 1 / i, r)), e;
3037
- }
3038
- function cs(e, t = 0, n = 1, r = .5, i, a = e, o = e) {
3039
- if (I.test(t) && (t = parseFloat(t), t = B(o.min, o.max, t / 100) - o.min), typeof t != "number") return;
3040
- let s = B(a.min, a.max, r);
3041
- e === a && (s -= t), e.min = ss(e.min, t, n, s, i), e.max = ss(e.max, t, n, s, i);
3042
- }
3043
- function ls(e, t, [n, r, i], a, o) {
3044
- cs(e, t[n], t[r], t[i], t.scale, a, o);
3045
- }
3046
- var us = [
3047
- "x",
3048
- "scaleX",
3049
- "originX"
3050
- ], ds = [
3051
- "y",
3052
- "scaleY",
3053
- "originY"
3054
- ];
3055
- function fs(e, t, n, r) {
3056
- ls(e.x, t, us, n ? n.x : void 0, r ? r.x : void 0), ls(e.y, t, ds, n ? n.y : void 0, r ? r.y : void 0);
3057
- }
3058
- //#endregion
3059
- //#region node_modules/motion-dom/dist/es/projection/geometry/utils.mjs
3060
- function ps(e) {
3061
- return e.translate === 0 && e.scale === 1;
3062
- }
3063
- function ms(e) {
3064
- return ps(e.x) && ps(e.y);
3065
- }
3066
- function hs(e, t) {
3067
- return e.min === t.min && e.max === t.max;
3068
- }
3069
- function gs(e, t) {
3070
- return hs(e.x, t.x) && hs(e.y, t.y);
3071
- }
3072
- function _s(e, t) {
3073
- return Math.round(e.min) === Math.round(t.min) && Math.round(e.max) === Math.round(t.max);
3074
- }
3075
- function vs(e, t) {
3076
- return _s(e.x, t.x) && _s(e.y, t.y);
3077
- }
3078
- function ys(e) {
3079
- return Q(e.x) / Q(e.y);
3080
- }
3081
- function bs(e, t) {
3082
- return e.translate === t.translate && e.scale === t.scale && e.originPoint === t.originPoint;
3083
- }
3084
- //#endregion
3085
- //#region node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs
3086
- function $(e) {
3087
- return [e("x"), e("y")];
3088
- }
3089
- //#endregion
3090
- //#region node_modules/motion-dom/dist/es/projection/styles/transform.mjs
3091
- function xs(e, t, n) {
3092
- let r = "", i = e.x.translate / t.x, a = e.y.translate / t.y, o = n?.z || 0;
3093
- if ((i || a || o) && (r = `translate3d(${i}px, ${a}px, ${o}px) `), (t.x !== 1 || t.y !== 1) && (r += `scale(${1 / t.x}, ${1 / t.y}) `), n) {
3094
- let { transformPerspective: e, rotate: t, rotateX: i, rotateY: a, skewX: o, skewY: s } = n;
3095
- e && (r = `perspective(${e}px) ${r}`), t && (r += `rotate(${t}deg) `), i && (r += `rotateX(${i}deg) `), a && (r += `rotateY(${a}deg) `), o && (r += `skewX(${o}deg) `), s && (r += `skewY(${s}deg) `);
3096
- }
3097
- let s = e.x.scale * t.x, c = e.y.scale * t.y;
3098
- return (s !== 1 || c !== 1) && (r += `scale(${s}, ${c})`), r || "none";
3099
- }
3100
- //#endregion
3101
- //#region node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs
3102
- var Ss = [
3103
- "borderTopLeftRadius",
3104
- "borderTopRightRadius",
3105
- "borderBottomLeftRadius",
3106
- "borderBottomRightRadius"
3107
- ], Cs = Ss.length, ws = (e) => typeof e == "string" ? parseFloat(e) : e, Ts = (e) => typeof e == "number" || L.test(e);
3108
- function Es(e, t, n, r, i, a) {
3109
- i ? (e.opacity = B(0, n.opacity ?? 1, Os(r)), e.opacityExit = B(t.opacity ?? 1, 0, ks(r))) : a && (e.opacity = B(t.opacity ?? 1, n.opacity ?? 1, r));
3110
- for (let i = 0; i < Cs; i++) {
3111
- let a = Ss[i], o = Ds(t, a), s = Ds(n, a);
3112
- o === void 0 && s === void 0 || (o || (o = 0), s || (s = 0), o === 0 || s === 0 || Ts(o) === Ts(s) ? (e[a] = Math.max(B(ws(o), ws(s), r), 0), (I.test(s) || I.test(o)) && (e[a] += "%")) : e[a] = s);
3113
- }
3114
- (t.rotate || n.rotate) && (e.rotate = B(t.rotate || 0, n.rotate || 0, r));
3115
- }
3116
- function Ds(e, t) {
3117
- return e[t] === void 0 ? e.borderRadius : e[t];
3118
- }
3119
- var Os = /* @__PURE__ */ As(0, .5, Le), ks = /* @__PURE__ */ As(.5, .95, E);
3120
- function As(e, t, n) {
3121
- return (r) => r < e ? 0 : r > t ? 1 : n(/* @__PURE__ */ Se(e, t, r));
3122
- }
3123
- //#endregion
3124
- //#region node_modules/motion-dom/dist/es/animation/animate/single-value.mjs
3125
- function js(e, t, n) {
3126
- let r = K(e) ? e : ii(e);
3127
- return r.start(Xr("", r, t, n)), r.animation;
3128
- }
3129
- //#endregion
3130
- //#region node_modules/motion-dom/dist/es/events/add-dom-event.mjs
3131
- function Ms(e, t, n, r = { passive: !0 }) {
3132
- return e.addEventListener(t, n, r), () => e.removeEventListener(t, n);
3133
- }
3134
- //#endregion
3135
- //#region node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.mjs
3136
- var Ns = (e, t) => e.depth - t.depth, Ps = class {
3137
- constructor() {
3138
- this.children = [], this.isDirty = !1;
3139
- }
3140
- add(e) {
3141
- pe(this.children, e), this.isDirty = !0;
3142
- }
3143
- remove(e) {
3144
- me(this.children, e), this.isDirty = !0;
3145
- }
3146
- forEach(e) {
3147
- this.isDirty && this.children.sort(Ns), this.isDirty = !1, this.children.forEach(e);
3148
- }
3149
- };
3150
- //#endregion
3151
- //#region node_modules/motion-dom/dist/es/utils/delay.mjs
3152
- function Fs(e, t) {
3153
- let n = N.now(), r = ({ timestamp: i }) => {
3154
- let a = i - n;
3155
- a >= t && (j(r), e(a - t));
3156
- };
3157
- return A.setup(r, !0), () => j(r);
3158
- }
3159
- //#endregion
3160
- //#region node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.mjs
3161
- function Is(e) {
3162
- return K(e) ? e.get() : e;
3163
- }
3164
- //#endregion
3165
- //#region node_modules/motion-dom/dist/es/projection/shared/stack.mjs
3166
- var Ls = class {
3167
- constructor() {
3168
- this.members = [];
3169
- }
3170
- add(e) {
3171
- pe(this.members, e);
3172
- for (let t = this.members.length - 1; t >= 0; t--) {
3173
- let n = this.members[t];
3174
- if (n === e || n === this.lead || n === this.prevLead) continue;
3175
- let r = n.instance;
3176
- (!r || r.isConnected === !1) && !n.snapshot && (me(this.members, n), n.unmount());
3177
- }
3178
- e.scheduleRender();
3179
- }
3180
- remove(e) {
3181
- if (me(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
3182
- let e = this.members[this.members.length - 1];
3183
- e && this.promote(e);
3184
- }
3185
- }
3186
- relegate(e) {
3187
- for (let t = this.members.indexOf(e) - 1; t >= 0; t--) {
3188
- let e = this.members[t];
3189
- if (e.isPresent !== !1 && e.instance?.isConnected !== !1) return this.promote(e), !0;
3190
- }
3191
- return !1;
3192
- }
3193
- promote(e, t) {
3194
- let n = this.lead;
3195
- if (e !== n && (this.prevLead = n, this.lead = e, e.show(), n)) {
3196
- n.updateSnapshot(), e.scheduleRender();
3197
- let { layoutDependency: r } = n.options, { layoutDependency: i } = e.options;
3198
- (r === void 0 || r !== i) && (e.resumeFrom = n, t && (n.preserveOpacity = !0), n.snapshot && (e.snapshot = n.snapshot, e.snapshot.latestValues = n.animationValues || n.latestValues), e.root?.isUpdating && (e.isLayoutDirty = !0)), e.options.crossfade === !1 && n.hide();
3199
- }
3200
- }
3201
- exitAnimationComplete() {
3202
- this.members.forEach((e) => {
3203
- e.options.onExitComplete?.(), e.resumingFrom?.options.onExitComplete?.();
3204
- });
3205
- }
3206
- scheduleRender() {
3207
- this.members.forEach((e) => e.instance && e.scheduleRender(!1));
3208
- }
3209
- removeLeadSnapshot() {
3210
- this.lead?.snapshot && (this.lead.snapshot = void 0);
3211
- }
3212
- }, Rs = {
3213
- hasAnimatedSinceResize: !0,
3214
- hasEverUpdated: !1
3215
- }, zs = {
3216
- nodes: 0,
3217
- calculatedTargetDeltas: 0,
3218
- calculatedProjections: 0
3219
- }, Bs = [
3220
- "",
3221
- "X",
3222
- "Y",
3223
- "Z"
3224
- ], Vs = 1e3, Hs = 0;
3225
- function Us(e, t, n, r) {
3226
- let { latestValues: i } = t;
3227
- i[e] && (n[e] = i[e], t.setStaticValue(e, 0), r && (r[e] = 0));
3228
- }
3229
- function Ws(e) {
3230
- if (e.hasCheckedOptimisedAppear = !0, e.root === e) return;
3231
- let { visualElement: t } = e.options;
3232
- if (!t) return;
3233
- let n = pi(t);
3234
- if (window.MotionHasOptimisedAnimation(n, "transform")) {
3235
- let { layout: t, layoutId: r } = e.options;
3236
- window.MotionCancelOptimisedAnimation(n, "transform", A, !(t || r));
3237
- }
3238
- let { parent: r } = e;
3239
- r && !r.hasCheckedOptimisedAppear && Ws(r);
3240
- }
3241
- function Gs({ attachResizeListener: e, defaultParent: t, measureScroll: n, checkIsScrollRoot: r, resetTransform: i }) {
3242
- return class {
3243
- constructor(e = {}, n = t?.()) {
3244
- this.id = Hs++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = {
3245
- x: 1,
3246
- y: 1
3247
- }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.layoutVersion = 0, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
3248
- this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
3249
- }, this.updateProjection = () => {
3250
- this.projectionUpdateScheduled = !1, k.value && (zs.nodes = zs.calculatedTargetDeltas = zs.calculatedProjections = 0), this.nodes.forEach(Js), this.nodes.forEach(rc), this.nodes.forEach(ic), this.nodes.forEach(Ys), k.addProjectionMetrics && k.addProjectionMetrics(zs);
3251
- }, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = e, this.root = n ? n.root || n : this, this.path = n ? [...n.path, n] : [], this.parent = n, this.depth = n ? n.depth + 1 : 0;
3252
- for (let e = 0; e < this.path.length; e++) this.path[e].shouldResetTransform = !0;
3253
- this.root === this && (this.nodes = new Ps());
3254
- }
3255
- addEventListener(e, t) {
3256
- return this.eventHandlers.has(e) || this.eventHandlers.set(e, new Ce()), this.eventHandlers.get(e).add(t);
3257
- }
3258
- notifyListeners(e, ...t) {
3259
- let n = this.eventHandlers.get(e);
3260
- n && n.notify(...t);
3261
- }
3262
- hasListeners(e) {
3263
- return this.eventHandlers.has(e);
3264
- }
3265
- mount(t) {
3266
- if (this.instance) return;
3267
- this.isSVG = sa(t) && !Sa(t), this.instance = t;
3268
- let { layoutId: n, layout: r, visualElement: i } = this.options;
3269
- if (i && !i.current && i.mount(t), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (r || n) && (this.isLayoutDirty = !0), e) {
3270
- let n, r = 0, i = () => this.root.updateBlockedByResize = !1;
3271
- A.read(() => {
3272
- r = window.innerWidth;
3273
- }), e(t, () => {
3274
- let e = window.innerWidth;
3275
- e !== r && (r = e, this.root.updateBlockedByResize = !0, n && n(), n = Fs(i, 250), Rs.hasAnimatedSinceResize && (Rs.hasAnimatedSinceResize = !1, this.nodes.forEach(nc)));
3276
- });
3277
- }
3278
- n && this.root.registerSharedNode(n, this), this.options.animate !== !1 && i && (n || r) && this.addEventListener("didUpdate", ({ delta: e, hasLayoutChanged: t, hasRelativeLayoutChanged: n, layout: r }) => {
3279
- if (this.isTreeAnimationBlocked()) {
3280
- this.target = void 0, this.relativeTarget = void 0;
3281
- return;
3282
- }
3283
- let a = this.options.transition || i.getDefaultTransition() || dc, { onLayoutAnimationStart: o, onLayoutAnimationComplete: s } = i.getProps(), c = !this.targetLayout || !vs(this.targetLayout, r), l = !t && n;
3284
- if (this.options.layoutRoot || this.resumeFrom || l || t && (c || !this.currentAnimation)) {
3285
- this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
3286
- let t = {
3287
- ...qr(a, "layout"),
3288
- onPlay: o,
3289
- onComplete: s
3290
- };
3291
- (i.shouldReduceMotion || this.options.layoutRoot) && (t.delay = 0, t.type = !1), this.startAnimation(t), this.setAnimationOrigin(e, l);
3292
- } else t || nc(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
3293
- this.targetLayout = r;
3294
- });
3295
- }
3296
- unmount() {
3297
- this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
3298
- let e = this.getStack();
3299
- e && e.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), j(this.updateProjection);
3300
- }
3301
- blockUpdate() {
3302
- this.updateManuallyBlocked = !0;
3303
- }
3304
- unblockUpdate() {
3305
- this.updateManuallyBlocked = !1;
3306
- }
3307
- isUpdateBlocked() {
3308
- return this.updateManuallyBlocked || this.updateBlockedByResize;
3309
- }
3310
- isTreeAnimationBlocked() {
3311
- return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || !1;
3312
- }
3313
- startUpdate() {
3314
- this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(ac), this.animationId++);
3315
- }
3316
- getTransformTemplate() {
3317
- let { visualElement: e } = this.options;
3318
- return e && e.getProps().transformTemplate;
3319
- }
3320
- willUpdate(e = !0) {
3321
- if (this.root.hasTreeAnimated = !0, this.root.isUpdateBlocked()) {
3322
- this.options.onExitComplete && this.options.onExitComplete();
3323
- return;
3324
- }
3325
- if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && Ws(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty) return;
3326
- this.isLayoutDirty = !0;
3327
- for (let e = 0; e < this.path.length; e++) {
3328
- let t = this.path[e];
3329
- t.shouldResetTransform = !0, (typeof t.latestValues.x == "string" || typeof t.latestValues.y == "string") && (t.isLayoutDirty = !0), t.updateScroll("snapshot"), t.options.layoutRoot && t.willUpdate(!1);
3330
- }
3331
- let { layoutId: t, layout: n } = this.options;
3332
- if (t === void 0 && !n) return;
3333
- let r = this.getTransformTemplate();
3334
- this.prevTransformTemplateValue = r ? r(this.latestValues, "") : void 0, this.updateSnapshot(), e && this.notifyListeners("willUpdate");
3335
- }
3336
- update() {
3337
- if (this.updateScheduled = !1, this.isUpdateBlocked()) {
3338
- let e = this.updateBlockedByResize;
3339
- this.unblockUpdate(), this.updateBlockedByResize = !1, this.clearAllSnapshots(), e && this.nodes.forEach(Qs), this.nodes.forEach(Zs);
3340
- return;
3341
- }
3342
- if (this.animationId <= this.animationCommitId) {
3343
- this.nodes.forEach($s);
3344
- return;
3345
- }
3346
- this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(ec), this.nodes.forEach(tc), this.nodes.forEach(Ks), this.nodes.forEach(qs)) : this.nodes.forEach($s), this.clearAllSnapshots();
3347
- let e = N.now();
3348
- M.delta = w(0, 1e3 / 60, e - M.timestamp), M.timestamp = e, M.isProcessing = !0, Ze.update.process(M), Ze.preRender.process(M), Ze.render.process(M), M.isProcessing = !1;
3349
- }
3350
- didUpdate() {
3351
- this.updateScheduled || (this.updateScheduled = !0, Vi.read(this.scheduleUpdate));
3352
- }
3353
- clearAllSnapshots() {
3354
- this.nodes.forEach(Xs), this.sharedNodes.forEach(oc);
3355
- }
3356
- scheduleUpdateProjection() {
3357
- this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, A.preRender(this.updateProjection, !1, !0));
3358
- }
3359
- scheduleCheckAfterUnmount() {
3360
- A.postRender(() => {
3361
- this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
3362
- });
3363
- }
3364
- updateSnapshot() {
3365
- this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !Q(this.snapshot.measuredBox.x) && !Q(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
3366
- }
3367
- updateLayout() {
3368
- if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty)) return;
3369
- if (this.resumeFrom && !this.resumeFrom.instance) for (let e = 0; e < this.path.length; e++) this.path[e].updateScroll();
3370
- let e = this.layout;
3371
- this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected || (this.layoutCorrected = J()), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
3372
- let { visualElement: t } = this.options;
3373
- t && t.notify("LayoutMeasure", this.layout.layoutBox, e ? e.layoutBox : void 0);
3374
- }
3375
- updateScroll(e = "measure") {
3376
- let t = !!(this.options.layoutScroll && this.instance);
3377
- if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === e && (t = !1), t && this.instance) {
3378
- let t = r(this.instance);
3379
- this.scroll = {
3380
- animationId: this.root.animationId,
3381
- phase: e,
3382
- isRoot: t,
3383
- offset: n(this.instance),
3384
- wasRoot: this.scroll ? this.scroll.isRoot : t
3385
- };
3386
- }
3387
- }
3388
- resetTransform() {
3389
- if (!i) return;
3390
- let e = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, t = this.projectionDelta && !ms(this.projectionDelta), n = this.getTransformTemplate(), r = n ? n(this.latestValues, "") : void 0, a = r !== this.prevTransformTemplateValue;
3391
- e && this.instance && (t || Za(this.latestValues) || a) && (i(this.instance, r), this.shouldResetTransform = !1, this.scheduleRender());
3392
- }
3393
- measure(e = !0) {
3394
- let t = this.measurePageBox(), n = this.removeElementScroll(t);
3395
- return e && (n = this.removeTransform(n)), hc(n), {
3396
- animationId: this.root.animationId,
3397
- measuredBox: t,
3398
- layoutBox: n,
3399
- latestValues: {},
3400
- source: this.id
3401
- };
3402
- }
3403
- measurePageBox() {
3404
- let { visualElement: e } = this.options;
3405
- if (!e) return J();
3406
- let t = e.measureViewportBox();
3407
- if (!(this.scroll?.wasRoot || this.path.some(_c))) {
3408
- let { scroll: e } = this.root;
3409
- e && (X(t.x, e.offset.x), X(t.y, e.offset.y));
3410
- }
3411
- return t;
3412
- }
3413
- removeElementScroll(e) {
3414
- let t = J();
3415
- if (Z(t, e), this.scroll?.wasRoot) return t;
3416
- for (let n = 0; n < this.path.length; n++) {
3417
- let r = this.path[n], { scroll: i, options: a } = r;
3418
- r !== this.root && i && a.layoutScroll && (i.wasRoot && Z(t, e), X(t.x, i.offset.x), X(t.y, i.offset.y));
3419
- }
3420
- return t;
3421
- }
3422
- applyTransform(e, t = !1, n) {
3423
- let r = n || J();
3424
- Z(r, e);
3425
- for (let e = 0; e < this.path.length; e++) {
3426
- let n = this.path[e];
3427
- !t && n.options.layoutScroll && n.scroll && n !== n.root && (X(r.x, -n.scroll.offset.x), X(r.y, -n.scroll.offset.y)), Za(n.latestValues) && lo(r, n.latestValues, n.layout?.layoutBox);
3428
- }
3429
- return Za(this.latestValues) && lo(r, this.latestValues, this.layout?.layoutBox), r;
3430
- }
3431
- removeTransform(e) {
3432
- let t = J();
3433
- Z(t, e);
3434
- for (let e = 0; e < this.path.length; e++) {
3435
- let n = this.path[e];
3436
- if (!Za(n.latestValues)) continue;
3437
- let r;
3438
- n.instance && (Xa(n.latestValues) && n.updateSnapshot(), r = J(), Z(r, n.measurePageBox())), fs(t, n.latestValues, n.snapshot?.layoutBox, r);
3439
- }
3440
- return Za(this.latestValues) && fs(t, this.latestValues), t;
3441
- }
3442
- setTargetDelta(e) {
3443
- this.targetDelta = e, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
3444
- }
3445
- setOptions(e) {
3446
- this.options = {
3447
- ...this.options,
3448
- ...e,
3449
- crossfade: e.crossfade === void 0 ? !0 : e.crossfade
3450
- };
3451
- }
3452
- clearMeasurements() {
3453
- this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
3454
- }
3455
- forceRelativeParentToResolveTarget() {
3456
- this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== M.timestamp && this.relativeParent.resolveTargetDelta(!0);
3457
- }
3458
- resolveTargetDelta(e = !1) {
3459
- let t = this.getLead();
3460
- this.isProjectionDirty || (this.isProjectionDirty = t.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = t.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = t.isSharedProjectionDirty);
3461
- let n = !!this.resumingFrom || this !== t;
3462
- if (!(e || n && this.isSharedProjectionDirty || this.isProjectionDirty || this.parent?.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize)) return;
3463
- let { layout: r, layoutId: i } = this.options;
3464
- if (!this.layout || !(r || i)) return;
3465
- this.resolvedRelativeTargetAt = M.timestamp;
3466
- let a = this.getClosestProjectingParent();
3467
- a && this.linkedParentVersion !== a.layoutVersion && !a.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && a && a.layout ? this.createRelativeTarget(a, this.layout.layoutBox, a.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = J(), this.targetWithTransforms = J()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), is(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) : Z(this.target, this.layout.layoutBox), ro(this.target, this.targetDelta)) : Z(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, this.options.layoutAnchor !== !1 && a && !!a.resumingFrom == !!this.resumingFrom && !a.options.layoutScroll && a.target && this.animationProgress !== 1 ? this.createRelativeTarget(a, this.target, a.target) : this.relativeParent = this.relativeTarget = void 0), k.value && zs.calculatedTargetDeltas++);
3468
- }
3469
- getClosestProjectingParent() {
3470
- if (!(!this.parent || Xa(this.parent.latestValues) || Qa(this.parent.latestValues))) return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
3471
- }
3472
- isProjecting() {
3473
- return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
3474
- }
3475
- createRelativeTarget(e, t, n) {
3476
- this.relativeParent = e, this.linkedParentVersion = e.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = J(), this.relativeTargetOrigin = J(), os(this.relativeTargetOrigin, t, n, this.options.layoutAnchor || void 0), Z(this.relativeTarget, this.relativeTargetOrigin);
3477
- }
3478
- removeRelativeTarget() {
3479
- this.relativeParent = this.relativeTarget = void 0;
3480
- }
3481
- calcProjection() {
3482
- let e = this.getLead(), t = !!this.resumingFrom || this !== e, n = !0;
3483
- if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (n = !1), t && (this.isSharedProjectionDirty || this.isTransformDirty) && (n = !1), this.resolvedRelativeTargetAt === M.timestamp && (n = !1), n) return;
3484
- let { layout: r, layoutId: i } = this.options;
3485
- if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(r || i)) return;
3486
- Z(this.layoutCorrected, this.layout.layoutBox);
3487
- let a = this.treeScale.x, o = this.treeScale.y;
3488
- oo(this.layoutCorrected, this.treeScale, this.path, t), e.layout && !e.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (e.target = e.layout.layoutBox, e.targetWithTransforms = J());
3489
- let { target: s } = e;
3490
- if (!s) {
3491
- this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
3492
- return;
3493
- }
3494
- !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (qo(this.prevProjectionDelta.x, this.projectionDelta.x), qo(this.prevProjectionDelta.y, this.projectionDelta.y)), ns(this.projectionDelta, this.layoutCorrected, s, this.latestValues), (this.treeScale.x !== a || this.treeScale.y !== o || !bs(this.projectionDelta.x, this.prevProjectionDelta.x) || !bs(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", s)), k.value && zs.calculatedProjections++;
3495
- }
3496
- hide() {
3497
- this.isVisible = !1;
3498
- }
3499
- show() {
3500
- this.isVisible = !0;
3501
- }
3502
- scheduleRender(e = !0) {
3503
- if (this.options.visualElement?.scheduleRender(), e) {
3504
- let e = this.getStack();
3505
- e && e.scheduleRender();
3506
- }
3507
- this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
3508
- }
3509
- createProjectionDeltas() {
3510
- this.prevProjectionDelta = Ea(), this.projectionDelta = Ea(), this.projectionDeltaWithTransform = Ea();
3511
- }
3512
- setAnimationOrigin(e, t = !1) {
3513
- let n = this.snapshot, r = n ? n.latestValues : {}, i = { ...this.latestValues }, a = Ea();
3514
- (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !t;
3515
- let o = J(), s = (n ? n.source : void 0) !== (this.layout ? this.layout.source : void 0), c = this.getStack(), l = !c || c.members.length <= 1, u = !!(s && !l && this.options.crossfade === !0 && !this.path.some(uc));
3516
- this.animationProgress = 0;
3517
- let d;
3518
- this.mixTargetDelta = (t) => {
3519
- let n = t / 1e3;
3520
- sc(a.x, e.x, n), sc(a.y, e.y, n), this.setTargetDelta(a), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (os(o, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), lc(this.relativeTarget, this.relativeTargetOrigin, o, n), d && gs(this.relativeTarget, d) && (this.isProjectionDirty = !1), d || (d = J()), Z(d, this.relativeTarget)), s && (this.animationValues = i, Es(i, r, this.latestValues, n, u, l)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = n;
3521
- }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
3522
- }
3523
- startAnimation(e) {
3524
- this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation && (j(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = A.update(() => {
3525
- Rs.hasAnimatedSinceResize = !0, et.layout++, this.motionValue || (this.motionValue = ii(0)), this.motionValue.jump(0, !1), this.currentAnimation = js(this.motionValue, [0, 1e3], {
3526
- ...e,
3527
- velocity: 0,
3528
- isSync: !0,
3529
- onUpdate: (t) => {
3530
- this.mixTargetDelta(t), e.onUpdate && e.onUpdate(t);
3531
- },
3532
- onStop: () => {
3533
- et.layout--;
3534
- },
3535
- onComplete: () => {
3536
- et.layout--, e.onComplete && e.onComplete(), this.completeAnimation();
3537
- }
3538
- }), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), this.pendingAnimation = void 0;
3539
- });
3540
- }
3541
- completeAnimation() {
3542
- this.resumingFrom && (this.resumingFrom.currentAnimation = void 0, this.resumingFrom.preserveOpacity = void 0);
3543
- let e = this.getStack();
3544
- e && e.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
3545
- }
3546
- finishAnimation() {
3547
- this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(Vs), this.currentAnimation.stop()), this.completeAnimation();
3548
- }
3549
- applyTransformsToTarget() {
3550
- let e = this.getLead(), { targetWithTransforms: t, target: n, layout: r, latestValues: i } = e;
3551
- if (!(!t || !n || !r)) {
3552
- if (this !== e && this.layout && r && gc(this.options.animationType, this.layout.layoutBox, r.layoutBox)) {
3553
- n = this.target || J();
3554
- let t = Q(this.layout.layoutBox.x);
3555
- n.x.min = e.target.x.min, n.x.max = n.x.min + t;
3556
- let r = Q(this.layout.layoutBox.y);
3557
- n.y.min = e.target.y.min, n.y.max = n.y.min + r;
3558
- }
3559
- Z(t, n), lo(t, i), ns(this.projectionDeltaWithTransform, this.layoutCorrected, t, i);
3560
- }
3561
- }
3562
- registerSharedNode(e, t) {
3563
- this.sharedNodes.has(e) || this.sharedNodes.set(e, new Ls()), this.sharedNodes.get(e).add(t);
3564
- let n = t.options.initialPromotionConfig;
3565
- t.promote({
3566
- transition: n ? n.transition : void 0,
3567
- preserveFollowOpacity: n && n.shouldPreserveFollowOpacity ? n.shouldPreserveFollowOpacity(t) : void 0
3568
- });
3569
- }
3570
- isLead() {
3571
- let e = this.getStack();
3572
- return e ? e.lead === this : !0;
3573
- }
3574
- getLead() {
3575
- let { layoutId: e } = this.options;
3576
- return e && this.getStack()?.lead || this;
3577
- }
3578
- getPrevLead() {
3579
- let { layoutId: e } = this.options;
3580
- return e ? this.getStack()?.prevLead : void 0;
3581
- }
3582
- getStack() {
3583
- let { layoutId: e } = this.options;
3584
- if (e) return this.root.sharedNodes.get(e);
3585
- }
3586
- promote({ needsReset: e, transition: t, preserveFollowOpacity: n } = {}) {
3587
- let r = this.getStack();
3588
- r && r.promote(this, n), e && (this.projectionDelta = void 0, this.needsReset = !0), t && this.setOptions({ transition: t });
3589
- }
3590
- relegate() {
3591
- let e = this.getStack();
3592
- return e ? e.relegate(this) : !1;
3593
- }
3594
- resetSkewAndRotation() {
3595
- let { visualElement: e } = this.options;
3596
- if (!e) return;
3597
- let t = !1, { latestValues: n } = e;
3598
- if ((n.z || n.rotate || n.rotateX || n.rotateY || n.rotateZ || n.skewX || n.skewY) && (t = !0), !t) return;
3599
- let r = {};
3600
- n.z && Us("z", e, r, this.animationValues);
3601
- for (let t = 0; t < Bs.length; t++) Us(`rotate${Bs[t]}`, e, r, this.animationValues), Us(`skew${Bs[t]}`, e, r, this.animationValues);
3602
- e.render();
3603
- for (let t in r) e.setStaticValue(t, r[t]), this.animationValues && (this.animationValues[t] = r[t]);
3604
- e.scheduleRender();
3605
- }
3606
- applyProjectionStyles(e, t) {
3607
- if (!this.instance || this.isSVG) return;
3608
- if (!this.isVisible) {
3609
- e.visibility = "hidden";
3610
- return;
3611
- }
3612
- let n = this.getTransformTemplate();
3613
- if (this.needsReset) {
3614
- this.needsReset = !1, e.visibility = "", e.opacity = "", e.pointerEvents = Is(t?.pointerEvents) || "", e.transform = n ? n(this.latestValues, "") : "none";
3615
- return;
3616
- }
3617
- let r = this.getLead();
3618
- if (!this.projectionDelta || !this.layout || !r.target) {
3619
- this.options.layoutId && (e.opacity = this.latestValues.opacity === void 0 ? 1 : this.latestValues.opacity, e.pointerEvents = Is(t?.pointerEvents) || ""), this.hasProjected && !Za(this.latestValues) && (e.transform = n ? n({}, "") : "none", this.hasProjected = !1);
3620
- return;
3621
- }
3622
- e.visibility = "";
3623
- let i = r.animationValues || r.latestValues;
3624
- this.applyTransformsToTarget();
3625
- let a = xs(this.projectionDeltaWithTransform, this.treeScale, i);
3626
- n && (a = n(i, a)), e.transform = a;
3627
- let { x: o, y: s } = this.projectionDelta;
3628
- e.transformOrigin = `${o.origin * 100}% ${s.origin * 100}% 0`, r.animationValues ? e.opacity = r === this ? i.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : i.opacityExit : e.opacity = r === this ? i.opacity === void 0 ? "" : i.opacity : i.opacityExit === void 0 ? 0 : i.opacityExit;
3629
- for (let t in xo) {
3630
- if (i[t] === void 0) continue;
3631
- let { correct: n, applyTo: o, isCSSVariable: s } = xo[t], c = a === "none" ? i[t] : n(i[t], r);
3632
- if (o) {
3633
- let t = o.length;
3634
- for (let n = 0; n < t; n++) e[o[n]] = c;
3635
- } else s ? this.options.visualElement.renderState.vars[t] = c : e[t] = c;
3636
- }
3637
- this.options.layoutId && (e.pointerEvents = r === this ? Is(t?.pointerEvents) || "" : "none");
3638
- }
3639
- clearSnapshot() {
3640
- this.resumeFrom = this.snapshot = void 0;
3641
- }
3642
- resetTree() {
3643
- this.root.nodes.forEach((e) => e.currentAnimation?.stop()), this.root.nodes.forEach(Zs), this.root.sharedNodes.clear();
3644
- }
3645
- };
3646
- }
3647
- function Ks(e) {
3648
- e.updateLayout();
3649
- }
3650
- function qs(e) {
3651
- let t = e.resumeFrom?.snapshot || e.snapshot;
3652
- if (e.isLead() && e.layout && t && e.hasListeners("didUpdate")) {
3653
- let { layoutBox: n, measuredBox: r } = e.layout, { animationType: i } = e.options, a = t.source !== e.layout.source;
3654
- if (i === "size") $((e) => {
3655
- let r = a ? t.measuredBox[e] : t.layoutBox[e], i = Q(r);
3656
- r.min = n[e].min, r.max = r.min + i;
3657
- });
3658
- else if (i === "x" || i === "y") {
3659
- let e = i === "x" ? "y" : "x";
3660
- Ko(a ? t.measuredBox[e] : t.layoutBox[e], n[e]);
3661
- } else gc(i, t.layoutBox, n) && $((r) => {
3662
- let i = a ? t.measuredBox[r] : t.layoutBox[r], o = Q(n[r]);
3663
- i.max = i.min + o, e.relativeTarget && !e.currentAnimation && (e.isProjectionDirty = !0, e.relativeTarget[r].max = e.relativeTarget[r].min + o);
3664
- });
3665
- let o = Ea();
3666
- ns(o, n, t.layoutBox);
3667
- let s = Ea();
3668
- a ? ns(s, e.applyTransform(r, !0), t.measuredBox) : ns(s, n, t.layoutBox);
3669
- let c = !ms(o), l = !1;
3670
- if (!e.resumeFrom) {
3671
- let r = e.getClosestProjectingParent();
3672
- if (r && !r.resumeFrom) {
3673
- let { snapshot: i, layout: a } = r;
3674
- if (i && a) {
3675
- let o = e.options.layoutAnchor || void 0, s = J();
3676
- os(s, t.layoutBox, i.layoutBox, o);
3677
- let c = J();
3678
- os(c, n, a.layoutBox, o), vs(s, c) || (l = !0), r.options.layoutRoot && (e.relativeTarget = c, e.relativeTargetOrigin = s, e.relativeParent = r);
3679
- }
3680
- }
3681
- }
3682
- e.notifyListeners("didUpdate", {
3683
- layout: n,
3684
- snapshot: t,
3685
- delta: s,
3686
- layoutDelta: o,
3687
- hasLayoutChanged: c,
3688
- hasRelativeLayoutChanged: l
3689
- });
3690
- } else if (e.isLead()) {
3691
- let { onExitComplete: t } = e.options;
3692
- t && t();
3693
- }
3694
- e.options.transition = void 0;
3695
- }
3696
- function Js(e) {
3697
- k.value && zs.nodes++, e.parent && (e.isProjecting() || (e.isProjectionDirty = e.parent.isProjectionDirty), e.isSharedProjectionDirty || (e.isSharedProjectionDirty = !!(e.isProjectionDirty || e.parent.isProjectionDirty || e.parent.isSharedProjectionDirty)), e.isTransformDirty || (e.isTransformDirty = e.parent.isTransformDirty));
3698
- }
3699
- function Ys(e) {
3700
- e.isProjectionDirty = e.isSharedProjectionDirty = e.isTransformDirty = !1;
3701
- }
3702
- function Xs(e) {
3703
- e.clearSnapshot();
3704
- }
3705
- function Zs(e) {
3706
- e.clearMeasurements();
3707
- }
3708
- function Qs(e) {
3709
- e.isLayoutDirty = !0, e.updateLayout();
3710
- }
3711
- function $s(e) {
3712
- e.isLayoutDirty = !1;
3713
- }
3714
- function ec(e) {
3715
- e.isAnimationBlocked && e.layout && !e.isLayoutDirty && (e.snapshot = e.layout, e.isLayoutDirty = !0);
3716
- }
3717
- function tc(e) {
3718
- let { visualElement: t } = e.options;
3719
- t && t.getProps().onBeforeLayoutMeasure && t.notify("BeforeLayoutMeasure"), e.resetTransform();
3720
- }
3721
- function nc(e) {
3722
- e.finishAnimation(), e.targetDelta = e.relativeTarget = e.target = void 0, e.isProjectionDirty = !0;
3723
- }
3724
- function rc(e) {
3725
- e.resolveTargetDelta();
3726
- }
3727
- function ic(e) {
3728
- e.calcProjection();
3729
- }
3730
- function ac(e) {
3731
- e.resetSkewAndRotation();
3732
- }
3733
- function oc(e) {
3734
- e.removeLeadSnapshot();
3735
- }
3736
- function sc(e, t, n) {
3737
- e.translate = B(t.translate, 0, n), e.scale = B(t.scale, 1, n), e.origin = t.origin, e.originPoint = t.originPoint;
3738
- }
3739
- function cc(e, t, n, r) {
3740
- e.min = B(t.min, n.min, r), e.max = B(t.max, n.max, r);
3741
- }
3742
- function lc(e, t, n, r) {
3743
- cc(e.x, t.x, n.x, r), cc(e.y, t.y, n.y, r);
3744
- }
3745
- function uc(e) {
3746
- return e.animationValues && e.animationValues.opacityExit !== void 0;
3747
- }
3748
- var dc = {
3749
- duration: .45,
3750
- ease: [
3751
- .4,
3752
- 0,
3753
- .1,
3754
- 1
3755
- ]
3756
- }, fc = (e) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(e), pc = fc("applewebkit/") && !fc("chrome/") ? Math.round : E;
3757
- function mc(e) {
3758
- e.min = pc(e.min), e.max = pc(e.max);
3759
- }
3760
- function hc(e) {
3761
- mc(e.x), mc(e.y);
3762
- }
3763
- function gc(e, t, n) {
3764
- return e === "position" || e === "preserve-aspect" && !es(ys(t), ys(n), .2);
3765
- }
3766
- function _c(e) {
3767
- return e !== e.root && e.scroll?.wasRoot;
3768
- }
3769
- //#endregion
3770
- //#region node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs
3771
- var vc = Gs({
3772
- attachResizeListener: (e, t) => Ms(e, "resize", t),
3773
- measureScroll: () => ({
3774
- x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
3775
- y: document.documentElement.scrollTop || document.body?.scrollTop || 0
3776
- }),
3777
- checkIsScrollRoot: () => !0
3778
- }), yc = { current: void 0 }, bc = Gs({
3779
- measureScroll: (e) => ({
3780
- x: e.scrollLeft,
3781
- y: e.scrollTop
3782
- }),
3783
- defaultParent: () => {
3784
- if (!yc.current) {
3785
- let e = new vc({});
3786
- e.mount(window), e.setOptions({ layoutScroll: !0 }), yc.current = e;
3787
- }
3788
- return yc.current;
3789
- },
3790
- resetTransform: (e, t) => {
3791
- e.style.transform = t === void 0 ? "none" : t;
3792
- },
3793
- checkIsScrollRoot: (e) => window.getComputedStyle(e).position === "fixed"
3794
- }), xc = s({
3795
- transformPagePoint: (e) => e,
3796
- isStatic: !1,
3797
- reducedMotion: "never"
3798
- });
3799
- //#endregion
3800
- //#region node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs
3801
- function Sc(e = !0) {
3802
- let t = d(fe);
3803
- if (t === null) return [!0, null];
3804
- let { isPresent: n, onExitComplete: r, register: i } = t, a = p();
3805
- f(() => {
3806
- if (e) return i(a);
3807
- }, [e]);
3808
- let o = u(() => e && r && r(a), [
3809
- a,
3810
- r,
3811
- e
3812
- ]);
3813
- return !n && r ? [!1, o] : [!0];
3814
- }
3815
- //#endregion
3816
- //#region node_modules/framer-motion/dist/es/context/LazyContext.mjs
3817
- var Cc = s({ strict: !1 }), wc = {
3818
- animation: [
3819
- "animate",
3820
- "variants",
3821
- "whileHover",
3822
- "whileTap",
3823
- "exit",
3824
- "whileInView",
3825
- "whileFocus",
3826
- "whileDrag"
3827
- ],
3828
- exit: ["exit"],
3829
- drag: ["drag", "dragControls"],
3830
- focus: ["whileFocus"],
3831
- hover: [
3832
- "whileHover",
3833
- "onHoverStart",
3834
- "onHoverEnd"
3835
- ],
3836
- tap: [
3837
- "whileTap",
3838
- "onTap",
3839
- "onTapStart",
3840
- "onTapCancel"
3841
- ],
3842
- pan: [
3843
- "onPan",
3844
- "onPanStart",
3845
- "onPanSessionStart",
3846
- "onPanEnd"
3847
- ],
3848
- inView: [
3849
- "whileInView",
3850
- "onViewportEnter",
3851
- "onViewportLeave"
3852
- ],
3853
- layout: ["layout", "layoutId"]
3854
- }, Tc = !1;
3855
- function Ec() {
3856
- if (Tc) return;
3857
- let e = {};
3858
- for (let t in wc) e[t] = { isEnabled: (e) => wc[t].some((t) => !!e[t]) };
3859
- Ha(e), Tc = !0;
3860
- }
3861
- function Dc() {
3862
- return Ec(), Ua();
3863
- }
3864
- //#endregion
3865
- //#region node_modules/framer-motion/dist/es/motion/features/load-features.mjs
3866
- function Oc(e) {
3867
- let t = Dc();
3868
- for (let n in e) t[n] = {
3869
- ...t[n],
3870
- ...e[n]
3871
- };
3872
- Ha(t);
3873
- }
3874
- //#endregion
3875
- //#region node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs
3876
- var kc = new Set(/* @__PURE__ */ "animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport".split("."));
3877
- function Ac(e) {
3878
- return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || kc.has(e);
3879
- }
3880
- //#endregion
3881
- //#region __vite-optional-peer-dep:@emotion/is-prop-valid:framer-motion
3882
- var jc = /* @__PURE__ */ ie({ default: () => Mc }), Mc, Nc = ne((() => {
3883
- throw Mc = {}, Error("Could not resolve \"@emotion/is-prop-valid\" imported by \"framer-motion\". Is it installed?");
3884
- })), Pc = (e) => !Ac(e);
3885
- function Fc(e) {
3886
- typeof e == "function" && (Pc = (t) => t.startsWith("on") ? !Ac(t) : e(t));
3887
- }
3888
- try {
3889
- Fc((Nc(), se(jc)).default);
3890
- } catch {}
3891
- function Ic(e, t, n) {
3892
- let r = {};
3893
- for (let i in e) i === "values" && typeof e.values == "object" || K(e[i]) || (Pc(i) || n === !0 && Ac(i) || !t && !Ac(i) || e.draggable && i.startsWith("onDrag")) && (r[i] = e[i]);
3894
- return r;
3895
- }
3896
- //#endregion
3897
- //#region node_modules/framer-motion/dist/es/context/MotionContext/index.mjs
3898
- var Lc = /* @__PURE__ */ s({});
3899
- //#endregion
3900
- //#region node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs
3901
- function Rc(e, t) {
3902
- if (Na(e)) {
3903
- let { initial: t, animate: n } = e;
3904
- return {
3905
- initial: t === !1 || Aa(t) ? t : void 0,
3906
- animate: Aa(n) ? n : void 0
3907
- };
3908
- }
3909
- return e.inherit === !1 ? {} : t;
3910
- }
3911
- //#endregion
3912
- //#region node_modules/framer-motion/dist/es/context/MotionContext/create.mjs
3913
- function zc(e) {
3914
- let { initial: t, animate: n } = Rc(e, d(Lc));
3915
- return g(() => ({
3916
- initial: t,
3917
- animate: n
3918
- }), [Bc(t), Bc(n)]);
3919
- }
3920
- function Bc(e) {
3921
- return Array.isArray(e) ? e.join(" ") : e;
3922
- }
3923
- //#endregion
3924
- //#region node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs
3925
- var Vc = () => ({
3926
- style: {},
3927
- transform: {},
3928
- transformOrigin: {},
3929
- vars: {}
3930
- });
3931
- //#endregion
3932
- //#region node_modules/framer-motion/dist/es/render/html/use-props.mjs
3933
- function Hc(e, t, n) {
3934
- for (let r in t) !K(t[r]) && !So(r, n) && (e[r] = t[r]);
3935
- }
3936
- function Uc({ transformTemplate: e }, t) {
3937
- return g(() => {
3938
- let n = Vc();
3939
- return go(n, t, e), Object.assign({}, n.vars, n.style);
3940
- }, [t]);
3941
- }
3942
- function Wc(e, t) {
3943
- let n = e.style || {}, r = {};
3944
- return Hc(r, n, e), Object.assign(r, Uc(e, t)), r;
3945
- }
3946
- function Gc(e, t) {
3947
- let n = {}, r = Wc(e, t);
3948
- return e.drag && e.dragListener !== !1 && (n.draggable = !1, r.userSelect = r.WebkitUserSelect = r.WebkitTouchCallout = "none", r.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 = r, n;
3949
- }
3950
- //#endregion
3951
- //#region node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs
3952
- var Kc = () => ({
3953
- ...Vc(),
3954
- attrs: {}
3955
- });
3956
- //#endregion
3957
- //#region node_modules/framer-motion/dist/es/render/svg/use-props.mjs
3958
- function qc(e, t, n, r) {
3959
- let i = g(() => {
3960
- let n = Kc();
3961
- return Ao(n, t, Mo(r), e.transformTemplate, e.style), {
3962
- ...n.attrs,
3963
- style: { ...n.style }
3964
- };
3965
- }, [t]);
3966
- if (e.style) {
3967
- let t = {};
3968
- Hc(t, e.style, e), i.style = {
3969
- ...t,
3970
- ...i.style
3971
- };
3972
- }
3973
- return i;
3974
- }
3975
- //#endregion
3976
- //#region node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs
3977
- var Jc = [
3978
- "animate",
3979
- "circle",
3980
- "defs",
3981
- "desc",
3982
- "ellipse",
3983
- "g",
3984
- "image",
3985
- "line",
3986
- "filter",
3987
- "marker",
3988
- "mask",
3989
- "metadata",
3990
- "path",
3991
- "pattern",
3992
- "polygon",
3993
- "polyline",
3994
- "rect",
3995
- "stop",
3996
- "switch",
3997
- "symbol",
3998
- "svg",
3999
- "text",
4000
- "tspan",
4001
- "use",
4002
- "view"
4003
- ];
4004
- //#endregion
4005
- //#region node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs
4006
- function Yc(e) {
4007
- return typeof e != "string" || e.includes("-") ? !1 : !!(Jc.indexOf(e) > -1 || /[A-Z]/u.test(e));
4008
- }
4009
- //#endregion
4010
- //#region node_modules/framer-motion/dist/es/render/dom/use-render.mjs
4011
- function Xc(e, t, n, { latestValues: r }, i, a = !1, s) {
4012
- let l = (s ?? Yc(e) ? qc : Gc)(t, r, i, e), u = Ic(t, typeof e == "string", a), d = e === o ? {} : {
4013
- ...u,
4014
- ...l,
4015
- ref: n
4016
- }, { children: f } = t, p = g(() => K(f) ? f.get() : f, [f]);
4017
- return c(e, {
4018
- ...d,
4019
- children: p
4020
- });
4021
- }
4022
- //#endregion
4023
- //#region node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs
4024
- function Zc({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, r, i) {
4025
- return {
4026
- latestValues: Qc(n, r, i, e),
4027
- renderState: t()
4028
- };
4029
- }
4030
- function Qc(e, t, n, r) {
4031
- let i = {}, a = r(e, {});
4032
- for (let e in a) i[e] = Is(a[e]);
4033
- let { initial: o, animate: s } = e, c = Na(e), l = Pa(e);
4034
- t && l && !c && e.inherit !== !1 && (o === void 0 && (o = t.initial), s === void 0 && (s = t.animate));
4035
- let u = n ? n.initial === !1 : !1;
4036
- u = u || o === !1;
4037
- let d = u ? s : o;
4038
- if (d && typeof d != "boolean" && !ka(d)) {
4039
- let t = Array.isArray(d) ? d : [d];
4040
- for (let n = 0; n < t.length; n++) {
4041
- let r = Qr(e, t[n]);
4042
- if (r) {
4043
- let { transitionEnd: e, transition: t, ...n } = r;
4044
- for (let e in n) {
4045
- let t = n[e];
4046
- if (Array.isArray(t)) {
4047
- let e = u ? t.length - 1 : 0;
4048
- t = t[e];
4049
- }
4050
- t !== null && (i[e] = t);
4051
- }
4052
- for (let t in e) i[t] = e[t];
4053
- }
4054
- }
4055
- }
4056
- return i;
4057
- }
4058
- var $c = (e) => (t, n) => {
4059
- let r = d(Lc), i = d(fe), a = () => Zc(e, t, r, i);
4060
- return n ? a() : ue(a);
4061
- }, el = /* @__PURE__ */ $c({
4062
- scrapeMotionValuesFromProps: Co,
4063
- createRenderState: Vc
4064
- }), tl = /* @__PURE__ */ $c({
4065
- scrapeMotionValuesFromProps: Po,
4066
- createRenderState: Kc
4067
- }), nl = Symbol.for("motionComponentSymbol");
4068
- //#endregion
4069
- //#region node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs
4070
- function rl(e, t, n) {
4071
- let r = _(n);
4072
- m(() => {
4073
- r.current = n;
4074
- });
4075
- let i = _(null);
4076
- return u((n) => {
4077
- n && e.onMount?.(n);
4078
- let a = r.current;
4079
- if (typeof a == "function") if (n) {
4080
- let e = a(n);
4081
- typeof e == "function" && (i.current = e);
4082
- } else i.current ? (i.current(), i.current = null) : a(n);
4083
- else a && (a.current = n);
4084
- t && (n ? t.mount(n) : t.unmount());
4085
- }, [t]);
4086
- }
4087
- //#endregion
4088
- //#region node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs
4089
- var il = s({});
4090
- //#endregion
4091
- //#region node_modules/framer-motion/dist/es/utils/is-ref-object.mjs
4092
- function al(e) {
4093
- return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
4094
- }
4095
- //#endregion
4096
- //#region node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs
4097
- function ol(e, t, n, r, i, a) {
4098
- let { visualElement: o } = d(Lc), s = d(Cc), c = d(fe), l = d(xc), u = l.reducedMotion, p = l.skipAnimations, h = _(null), g = _(!1);
4099
- r = r || s.renderer, !h.current && r && (h.current = r(e, {
4100
- visualState: t,
4101
- parent: o,
4102
- props: n,
4103
- presenceContext: c,
4104
- blockInitialAnimation: c ? c.initial === !1 : !1,
4105
- reducedMotionConfig: u,
4106
- skipAnimations: p,
4107
- isSVG: a
4108
- }), g.current && h.current && (h.current.manuallyAnimateOnMount = !0));
4109
- let v = h.current, y = d(il);
4110
- v && !v.projection && i && (v.type === "html" || v.type === "svg") && sl(h.current, n, i, y);
4111
- let b = _(!1);
4112
- m(() => {
4113
- v && b.current && v.update(n, c);
4114
- });
4115
- let x = n[fi], S = _(!!x && typeof window < "u" && !window.MotionHandoffIsComplete?.(x) && window.MotionHasOptimisedAnimation?.(x));
4116
- return de(() => {
4117
- g.current = !0, v && (b.current = !0, window.MotionIsMounted = !0, v.updateFeatures(), v.scheduleRenderMicrotask(), S.current && v.animationState && v.animationState.animateChanges());
4118
- }), f(() => {
4119
- v && (!S.current && v.animationState && v.animationState.animateChanges(), S.current && (queueMicrotask(() => {
4120
- window.MotionHandoffMarkAsComplete?.(x);
4121
- }), S.current = !1), v.enteringChildren = void 0);
4122
- }), v;
4123
- }
4124
- function sl(e, t, n, r) {
4125
- let { layoutId: i, layout: a, drag: o, dragConstraints: s, layoutScroll: c, layoutRoot: l, layoutAnchor: u, layoutCrossfade: d } = t;
4126
- e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : cl(e.parent)), e.projection.setOptions({
4127
- layoutId: i,
4128
- layout: a,
4129
- alwaysMeasureLayout: !!o || s && al(s),
4130
- visualElement: e,
4131
- animationType: typeof a == "string" ? a : "both",
4132
- initialPromotionConfig: r,
4133
- crossfade: d,
4134
- layoutScroll: c,
4135
- layoutRoot: l,
4136
- layoutAnchor: u
4137
- });
4138
- }
4139
- function cl(e) {
4140
- if (e) return e.options.allowProjection === !1 ? cl(e.parent) : e.projection;
4141
- }
4142
- //#endregion
4143
- //#region node_modules/framer-motion/dist/es/motion/index.mjs
4144
- function ll(e, { forwardMotionProps: t = !1, type: n } = {}, r, i) {
4145
- r && Oc(r);
4146
- let a = n ? n === "svg" : Yc(e), o = a ? tl : el;
4147
- function s(n, s) {
4148
- let c, l = {
4149
- ...d(xc),
4150
- ...n,
4151
- layoutId: ul(n)
4152
- }, { isStatic: u } = l, f = zc(n), p = o(n, u);
4153
- if (!u && typeof window < "u") {
4154
- dl(l, r);
4155
- let t = fl(l);
4156
- c = t.MeasureLayout, f.visualElement = ol(e, p, l, i, t.ProjectionNode, a);
4157
- }
4158
- return y(Lc.Provider, {
4159
- value: f,
4160
- children: [c && f.visualElement ? v(c, {
4161
- visualElement: f.visualElement,
4162
- ...l
4163
- }) : null, Xc(e, n, rl(p, f.visualElement, s), p, u, t, a)]
4164
- });
4165
- }
4166
- s.displayName = `motion.${typeof e == "string" ? e : `create(${e.displayName ?? e.name ?? ""})`}`;
4167
- let c = l(s);
4168
- return c[nl] = e, c;
4169
- }
4170
- function ul({ layoutId: e }) {
4171
- let t = d(le).id;
4172
- return t && e !== void 0 ? t + "-" + e : e;
4173
- }
4174
- function dl(e, t) {
4175
- d(Cc).strict;
4176
- }
4177
- function fl(e) {
4178
- let { drag: t, layout: n } = Dc();
4179
- if (!t && !n) return {};
4180
- let r = {
4181
- ...t,
4182
- ...n
4183
- };
4184
- return {
4185
- MeasureLayout: t?.isEnabled(e) || n?.isEnabled(e) ? r.MeasureLayout : void 0,
4186
- ProjectionNode: r.ProjectionNode
4187
- };
4188
- }
4189
- //#endregion
4190
- //#region node_modules/framer-motion/dist/es/render/components/create-proxy.mjs
4191
- function pl(e, t) {
4192
- if (typeof Proxy > "u") return ll;
4193
- let n = /* @__PURE__ */ new Map(), r = (n, r) => ll(n, r, e, t);
4194
- return new Proxy((e, t) => r(e, t), { get: (i, a) => a === "create" ? r : (n.has(a) || n.set(a, ll(a, void 0, e, t)), n.get(a)) });
4195
- }
4196
- //#endregion
4197
- //#region node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs
4198
- var ml = (e, t) => t.isSVG ?? Yc(e) ? new Fo(t) : new To(t, { allowProjection: e !== o }), hl = class extends Y {
4199
- constructor(e) {
4200
- super(e), e.animationState || (e.animationState = Ho(e));
4201
- }
4202
- updateAnimationControlsSubscription() {
4203
- let { animate: e } = this.node.getProps();
4204
- ka(e) && (this.unmountControls = e.subscribe(this.node));
4205
- }
4206
- mount() {
4207
- this.updateAnimationControlsSubscription();
4208
- }
4209
- update() {
4210
- let { animate: e } = this.node.getProps(), { animate: t } = this.node.prevProps || {};
4211
- e !== t && this.updateAnimationControlsSubscription();
4212
- }
4213
- unmount() {
4214
- this.node.animationState.reset(), this.unmountControls?.();
4215
- }
4216
- }, gl = 0, _l = {
4217
- animation: { Feature: hl },
4218
- exit: { Feature: class extends Y {
4219
- constructor() {
4220
- super(...arguments), this.id = gl++, this.isExitComplete = !1;
4221
- }
4222
- update() {
4223
- if (!this.node.presenceContext) return;
4224
- let { isPresent: e, onExitComplete: t } = this.node.presenceContext, { isPresent: n } = this.node.prevPresenceContext || {};
4225
- if (!this.node.animationState || e === n) return;
4226
- if (e && n === !1) {
4227
- if (this.isExitComplete) {
4228
- let { initial: e, custom: t } = this.node.getProps();
4229
- if (typeof e == "string") {
4230
- let n = G(this.node, e, t);
4231
- if (n) {
4232
- let { transition: e, transitionEnd: t, ...r } = n;
4233
- for (let e in r) this.node.getValue(e)?.jump(r[e]);
4234
- }
4235
- }
4236
- this.node.animationState.reset(), this.node.animationState.animateChanges();
4237
- } else this.node.animationState.setActive("exit", !1);
4238
- this.isExitComplete = !1;
4239
- return;
4240
- }
4241
- let r = this.node.animationState.setActive("exit", !e);
4242
- t && !e && r.then(() => {
4243
- this.isExitComplete = !0, t(this.id);
4244
- });
4245
- }
4246
- mount() {
4247
- let { register: e, onExitComplete: t } = this.node.presenceContext || {};
4248
- t && t(this.id), e && (this.unmount = e(this.id));
4249
- }
4250
- unmount() {}
4251
- } }
4252
- };
4253
- //#endregion
4254
- //#region node_modules/framer-motion/dist/es/events/event-info.mjs
4255
- function vl(e) {
4256
- return { point: {
4257
- x: e.pageX,
4258
- y: e.pageY
4259
- } };
4260
- }
4261
- var yl = (e) => (t) => Yi(t) && e(t, vl(t));
4262
- //#endregion
4263
- //#region node_modules/framer-motion/dist/es/events/add-pointer-event.mjs
4264
- function bl(e, t, n, r) {
4265
- return Ms(e, t, yl(n), r);
4266
- }
4267
- //#endregion
4268
- //#region node_modules/framer-motion/dist/es/utils/get-context-window.mjs
4269
- var xl = ({ current: e }) => e ? e.ownerDocument.defaultView : null, Sl = (e, t) => Math.abs(e - t);
4270
- function Cl(e, t) {
4271
- let n = Sl(e.x, t.x), r = Sl(e.y, t.y);
4272
- return Math.sqrt(n ** 2 + r ** 2);
4273
- }
4274
- //#endregion
4275
- //#region node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs
4276
- var wl = /* @__PURE__ */ new Set(["auto", "scroll"]), Tl = class {
4277
- constructor(e, t, { transformPagePoint: n, contextWindow: r = window, dragSnapToOrigin: i = !1, distanceThreshold: a = 3, element: o } = {}) {
4278
- 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 = (e) => {
4279
- this.handleScroll(e.target);
4280
- }, this.onWindowScroll = () => {
4281
- this.handleScroll(window);
4282
- }, this.updatePoint = () => {
4283
- if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return;
4284
- this.lastRawMoveEventInfo && (this.lastMoveEventInfo = El(this.lastRawMoveEventInfo, this.transformPagePoint));
4285
- let e = Ol(this.lastMoveEventInfo, this.history), t = this.startEvent !== null, n = Cl(e.offset, {
4286
- x: 0,
4287
- y: 0
4288
- }) >= this.distanceThreshold;
4289
- if (!t && !n) return;
4290
- let { point: r } = e, { timestamp: i } = M;
4291
- this.history.push({
4292
- ...r,
4293
- timestamp: i
4294
- });
4295
- let { onStart: a, onMove: o } = this.handlers;
4296
- t || (a && a(this.lastMoveEvent, e), this.startEvent = this.lastMoveEvent), o && o(this.lastMoveEvent, e);
4297
- }, this.handlePointerMove = (e, t) => {
4298
- this.lastMoveEvent = e, this.lastRawMoveEventInfo = t, this.lastMoveEventInfo = El(t, this.transformPagePoint), A.update(this.updatePoint, !0);
4299
- }, this.handlePointerUp = (e, t) => {
4300
- this.end();
4301
- let { onEnd: n, onSessionEnd: r, resumeAnimation: i } = this.handlers;
4302
- if ((this.dragSnapToOrigin || !this.startEvent) && i && i(), !(this.lastMoveEvent && this.lastMoveEventInfo)) return;
4303
- let a = Ol(e.type === "pointercancel" ? this.lastMoveEventInfo : El(t, this.transformPagePoint), this.history);
4304
- this.startEvent && n && n(e, a), r && r(e, a);
4305
- }, !Yi(e)) return;
4306
- this.dragSnapToOrigin = i, this.handlers = t, this.transformPagePoint = n, this.distanceThreshold = a, this.contextWindow = r || window;
4307
- let s = El(vl(e), this.transformPagePoint), { point: c } = s, { timestamp: l } = M;
4308
- this.history = [{
4309
- ...c,
4310
- timestamp: l
4311
- }];
4312
- let { onSessionStart: u } = t;
4313
- u && u(e, Ol(s, this.history)), this.removeListeners = xe(bl(this.contextWindow, "pointermove", this.handlePointerMove), bl(this.contextWindow, "pointerup", this.handlePointerUp), bl(this.contextWindow, "pointercancel", this.handlePointerUp)), o && this.startScrollTracking(o);
4314
- }
4315
- startScrollTracking(e) {
4316
- let t = e.parentElement;
4317
- for (; t;) {
4318
- let e = getComputedStyle(t);
4319
- (wl.has(e.overflowX) || wl.has(e.overflowY)) && this.scrollPositions.set(t, {
4320
- x: t.scrollLeft,
4321
- y: t.scrollTop
4322
- }), t = t.parentElement;
4323
- }
4324
- this.scrollPositions.set(window, {
4325
- x: window.scrollX,
4326
- y: window.scrollY
4327
- }), window.addEventListener("scroll", this.onElementScroll, { capture: !0 }), window.addEventListener("scroll", this.onWindowScroll), this.removeScrollListeners = () => {
4328
- window.removeEventListener("scroll", this.onElementScroll, { capture: !0 }), window.removeEventListener("scroll", this.onWindowScroll);
4329
- };
4330
- }
4331
- handleScroll(e) {
4332
- let t = this.scrollPositions.get(e);
4333
- if (!t) return;
4334
- let n = e === window, r = n ? {
4335
- x: window.scrollX,
4336
- y: window.scrollY
4337
- } : {
4338
- x: e.scrollLeft,
4339
- y: e.scrollTop
4340
- }, i = {
4341
- x: r.x - t.x,
4342
- y: r.y - t.y
4343
- };
4344
- i.x === 0 && i.y === 0 || (n ? 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, r), A.update(this.updatePoint, !0));
4345
- }
4346
- updateHandlers(e) {
4347
- this.handlers = e;
4348
- }
4349
- end() {
4350
- this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(), j(this.updatePoint);
4351
- }
4352
- };
4353
- function El(e, t) {
4354
- return t ? { point: t(e.point) } : e;
4355
- }
4356
- function Dl(e, t) {
4357
- return {
4358
- x: e.x - t.x,
4359
- y: e.y - t.y
4360
- };
4361
- }
4362
- function Ol({ point: e }, t) {
4363
- return {
4364
- point: e,
4365
- delta: Dl(e, Al(t)),
4366
- offset: Dl(e, kl(t)),
4367
- velocity: jl(t, .1)
4368
- };
4369
- }
4370
- function kl(e) {
4371
- return e[0];
4372
- }
4373
- function Al(e) {
4374
- return e[e.length - 1];
4375
- }
4376
- function jl(e, t) {
4377
- if (e.length < 2) return {
4378
- x: 0,
4379
- y: 0
4380
- };
4381
- let n = e.length - 1, r = null, i = Al(e);
4382
- for (; n >= 0 && (r = e[n], !(i.timestamp - r.timestamp > /* @__PURE__ */ D(t)));) n--;
4383
- if (!r) return {
4384
- x: 0,
4385
- y: 0
4386
- };
4387
- r === e[0] && e.length > 2 && i.timestamp - r.timestamp > /* @__PURE__ */ D(t) * 2 && (r = e[1]);
4388
- let a = /* @__PURE__ */ O(i.timestamp - r.timestamp);
4389
- if (a === 0) return {
4390
- x: 0,
4391
- y: 0
4392
- };
4393
- let o = {
4394
- x: (i.x - r.x) / a,
4395
- y: (i.y - r.y) / a
4396
- };
4397
- return o.x === Infinity && (o.x = 0), o.y === Infinity && (o.y = 0), o;
4398
- }
4399
- //#endregion
4400
- //#region node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs
4401
- function Ml(e, { min: t, max: n }, r) {
4402
- return t !== void 0 && e < t ? e = r ? B(t, e, r.min) : Math.max(e, t) : n !== void 0 && e > n && (e = r ? B(n, e, r.max) : Math.min(e, n)), e;
4403
- }
4404
- function Nl(e, t, n) {
4405
- return {
4406
- min: t === void 0 ? void 0 : e.min + t,
4407
- max: n === void 0 ? void 0 : e.max + n - (e.max - e.min)
4408
- };
4409
- }
4410
- function Pl(e, { top: t, left: n, bottom: r, right: i }) {
4411
- return {
4412
- x: Nl(e.x, n, i),
4413
- y: Nl(e.y, t, r)
4414
- };
4415
- }
4416
- function Fl(e, t) {
4417
- let n = t.min - e.min, r = t.max - e.max;
4418
- return t.max - t.min < e.max - e.min && ([n, r] = [r, n]), {
4419
- min: n,
4420
- max: r
4421
- };
4422
- }
4423
- function Il(e, t) {
4424
- return {
4425
- x: Fl(e.x, t.x),
4426
- y: Fl(e.y, t.y)
4427
- };
4428
- }
4429
- function Ll(e, t) {
4430
- let n = .5, r = Q(e), i = Q(t);
4431
- return i > r ? n = /* @__PURE__ */ Se(t.min, t.max - r, e.min) : r > i && (n = /* @__PURE__ */ Se(e.min, e.max - i, t.min)), w(0, 1, n);
4432
- }
4433
- function Rl(e, t) {
4434
- let n = {};
4435
- return t.min !== void 0 && (n.min = t.min - e.min), t.max !== void 0 && (n.max = t.max - e.min), n;
4436
- }
4437
- var zl = .35;
4438
- function Bl(e = zl) {
4439
- return e === !1 ? e = 0 : e === !0 && (e = zl), {
4440
- x: Vl(e, "left", "right"),
4441
- y: Vl(e, "top", "bottom")
4442
- };
4443
- }
4444
- function Vl(e, t, n) {
4445
- return {
4446
- min: Hl(e, t),
4447
- max: Hl(e, n)
4448
- };
4449
- }
4450
- function Hl(e, t) {
4451
- return typeof e == "number" ? e : e[t] || 0;
4452
- }
4453
- //#endregion
4454
- //#region node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs
4455
- var Ul = /* @__PURE__ */ new WeakMap(), Wl = class {
4456
- constructor(e) {
4457
- this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = {
4458
- x: 0,
4459
- y: 0
4460
- }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = J(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e;
4461
- }
4462
- start(e, { snapToCursor: t = !1, distanceThreshold: n } = {}) {
4463
- let { presenceContext: r } = this.visualElement;
4464
- if (r && r.isPresent === !1) return;
4465
- let i = (e) => {
4466
- t && this.snapToCursor(vl(e).point), this.stopAnimation();
4467
- }, a = (e, t) => {
4468
- let { drag: n, dragPropagation: r, onDragStart: i } = this.getProps();
4469
- if (n && !r && (this.openDragLock && this.openDragLock(), this.openDragLock = Wi(n), !this.openDragLock)) return;
4470
- this.latestPointerEvent = e, this.latestPanInfo = t, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), $((e) => {
4471
- let t = this.getAxisMotionValue(e).get() || 0;
4472
- if (I.test(t)) {
4473
- let { projection: n } = this.visualElement;
4474
- if (n && n.layout) {
4475
- let r = n.layout.layoutBox[e];
4476
- r && (t = Q(r) * (parseFloat(t) / 100));
4477
- }
4478
- }
4479
- this.originPoint[e] = t;
4480
- }), i && A.update(() => i(e, t), !1, !0), ui(this.visualElement, "transform");
4481
- let { animationState: a } = this.visualElement;
4482
- a && a.setActive("whileDrag", !0);
4483
- }, o = (e, t) => {
4484
- this.latestPointerEvent = e, this.latestPanInfo = t;
4485
- let { dragPropagation: n, dragDirectionLock: r, onDirectionLock: i, onDrag: a } = this.getProps();
4486
- if (!n && !this.openDragLock) return;
4487
- let { offset: o } = t;
4488
- if (r && this.currentDirection === null) {
4489
- this.currentDirection = Jl(o), this.currentDirection !== null && i && i(this.currentDirection);
4490
- return;
4491
- }
4492
- this.updateAxis("x", t.point, o), this.updateAxis("y", t.point, o), this.visualElement.render(), a && A.update(() => a(e, t), !1, !0);
4493
- }, s = (e, t) => {
4494
- this.latestPointerEvent = e, this.latestPanInfo = t, this.stop(e, t), this.latestPointerEvent = null, this.latestPanInfo = null;
4495
- }, c = () => {
4496
- let { dragSnapToOrigin: e } = this.getProps();
4497
- (e || this.constraints) && this.startAnimation({
4498
- x: 0,
4499
- y: 0
4500
- });
4501
- }, { dragSnapToOrigin: l } = this.getProps();
4502
- this.panSession = new Tl(e, {
4503
- onSessionStart: i,
4504
- onStart: a,
4505
- onMove: o,
4506
- onSessionEnd: s,
4507
- resumeAnimation: c
4508
- }, {
4509
- transformPagePoint: this.visualElement.getTransformPagePoint(),
4510
- dragSnapToOrigin: l,
4511
- distanceThreshold: n,
4512
- contextWindow: xl(this.visualElement),
4513
- element: this.visualElement.current
4514
- });
4515
- }
4516
- stop(e, t) {
4517
- let n = e || this.latestPointerEvent, r = t || this.latestPanInfo, i = this.isDragging;
4518
- if (this.cancel(), !i || !r || !n) return;
4519
- let { velocity: a } = r;
4520
- this.startAnimation(a);
4521
- let { onDragEnd: o } = this.getProps();
4522
- o && A.postRender(() => o(n, r));
4523
- }
4524
- cancel() {
4525
- this.isDragging = !1;
4526
- let { projection: e, animationState: t } = this.visualElement;
4527
- e && (e.isAnimationBlocked = !1), this.endPanSession();
4528
- let { dragPropagation: n } = this.getProps();
4529
- !n && this.openDragLock && (this.openDragLock(), this.openDragLock = null), t && t.setActive("whileDrag", !1);
4530
- }
4531
- endPanSession() {
4532
- this.panSession && this.panSession.end(), this.panSession = void 0;
4533
- }
4534
- updateAxis(e, t, n) {
4535
- let { drag: r } = this.getProps();
4536
- if (!n || !ql(e, r, this.currentDirection)) return;
4537
- let i = this.getAxisMotionValue(e), a = this.originPoint[e] + n[e];
4538
- this.constraints && this.constraints[e] && (a = Ml(a, this.constraints[e], this.elastic[e])), i.set(a);
4539
- }
4540
- resolveConstraints() {
4541
- let { dragConstraints: e, dragElastic: t } = this.getProps(), n = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : this.visualElement.projection?.layout, r = this.constraints;
4542
- e && al(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && n ? this.constraints = Pl(n.layoutBox, e) : this.constraints = !1, this.elastic = Bl(t), r !== this.constraints && !al(e) && n && this.constraints && !this.hasMutatedConstraints && $((e) => {
4543
- this.constraints !== !1 && this.getAxisMotionValue(e) && (this.constraints[e] = Rl(n.layoutBox[e], this.constraints[e]));
4544
- });
4545
- }
4546
- resolveRefConstraints() {
4547
- let { dragConstraints: e, onMeasureDragConstraints: t } = this.getProps();
4548
- if (!e || !al(e)) return !1;
4549
- let n = e.current, { projection: r } = this.visualElement;
4550
- if (!r || !r.layout) return !1;
4551
- let i = fo(n, r.root, this.visualElement.getTransformPagePoint()), a = Il(r.layout.layoutBox, i);
4552
- if (t) {
4553
- let e = t(qa(a));
4554
- this.hasMutatedConstraints = !!e, e && (a = Ka(e));
4555
- }
4556
- return a;
4557
- }
4558
- startAnimation(e) {
4559
- let { drag: t, dragMomentum: n, dragElastic: r, dragTransition: i, dragSnapToOrigin: a, onDragTransitionEnd: o } = this.getProps(), s = this.constraints || {}, c = $((o) => {
4560
- if (!ql(o, t, this.currentDirection)) return;
4561
- let c = s && s[o] || {};
4562
- (a === !0 || a === o) && (c = {
4563
- min: 0,
4564
- max: 0
4565
- });
4566
- let l = r ? 200 : 1e6, u = r ? 40 : 1e7, d = {
4567
- type: "inertia",
4568
- velocity: n ? e[o] : 0,
4569
- bounceStiffness: l,
4570
- bounceDamping: u,
4571
- timeConstant: 750,
4572
- restDelta: 1,
4573
- restSpeed: 10,
4574
- ...i,
4575
- ...c
4576
- };
4577
- return this.startAxisValueAnimation(o, d);
4578
- });
4579
- return Promise.all(c).then(o);
4580
- }
4581
- startAxisValueAnimation(e, t) {
4582
- let n = this.getAxisMotionValue(e);
4583
- return ui(this.visualElement, e), n.start(Xr(e, n, 0, t, this.visualElement, !1));
4584
- }
4585
- stopAnimation() {
4586
- $((e) => this.getAxisMotionValue(e).stop());
4587
- }
4588
- getAxisMotionValue(e) {
4589
- let t = `_drag${e.toUpperCase()}`, n = this.visualElement.getProps();
4590
- return n[t] || this.visualElement.getValue(e, (n.initial ? n.initial[e] : void 0) || 0);
4591
- }
4592
- snapToCursor(e) {
4593
- $((t) => {
4594
- let { drag: n } = this.getProps();
4595
- if (!ql(t, n, this.currentDirection)) return;
4596
- let { projection: r } = this.visualElement, i = this.getAxisMotionValue(t);
4597
- if (r && r.layout) {
4598
- let { min: n, max: a } = r.layout.layoutBox[t], o = i.get() || 0;
4599
- i.set(e[t] - B(n, a, .5) + o);
4600
- }
4601
- });
4602
- }
4603
- scalePositionWithinConstraints() {
4604
- if (!this.visualElement.current) return;
4605
- let { drag: e, dragConstraints: t } = this.getProps(), { projection: n } = this.visualElement;
4606
- if (!al(t) || !n || !this.constraints) return;
4607
- this.stopAnimation();
4608
- let r = {
4609
- x: 0,
4610
- y: 0
4611
- };
4612
- $((e) => {
4613
- let t = this.getAxisMotionValue(e);
4614
- if (t && this.constraints !== !1) {
4615
- let n = t.get();
4616
- r[e] = Ll({
4617
- min: n,
4618
- max: n
4619
- }, this.constraints[e]);
4620
- }
4621
- });
4622
- let { transformTemplate: i } = this.visualElement.getProps();
4623
- this.visualElement.current.style.transform = i ? i({}, "") : "none", n.root && n.root.updateScroll(), n.updateLayout(), this.constraints = !1, this.resolveConstraints(), $((t) => {
4624
- if (!ql(t, e, null)) return;
4625
- let n = this.getAxisMotionValue(t), { min: i, max: a } = this.constraints[t];
4626
- n.set(B(i, a, r[t]));
4627
- }), this.visualElement.render();
4628
- }
4629
- addListeners() {
4630
- if (!this.visualElement.current) return;
4631
- Ul.set(this.visualElement, this);
4632
- let e = this.visualElement.current, t = bl(e, "pointerdown", (t) => {
4633
- let { drag: n, dragListener: r = !0 } = this.getProps(), i = t.target, a = i !== e && $i(i);
4634
- n && r && !a && this.start(t);
4635
- }), n, r = () => {
4636
- let { dragConstraints: t } = this.getProps();
4637
- al(t) && t.current && (this.constraints = this.resolveRefConstraints(), n || (n = Kl(e, t.current, () => this.scalePositionWithinConstraints())));
4638
- }, { projection: i } = this.visualElement, a = i.addEventListener("measure", r);
4639
- i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), A.read(r);
4640
- let o = Ms(window, "resize", () => this.scalePositionWithinConstraints()), s = i.addEventListener("didUpdate", (({ delta: e, hasLayoutChanged: t }) => {
4641
- this.isDragging && t && ($((t) => {
4642
- let n = this.getAxisMotionValue(t);
4643
- n && (this.originPoint[t] += e[t].translate, n.set(n.get() + e[t].translate));
4644
- }), this.visualElement.render());
4645
- }));
4646
- return () => {
4647
- o(), t(), a(), s && s(), n && n();
4648
- };
4649
- }
4650
- getProps() {
4651
- let e = this.visualElement.getProps(), { drag: t = !1, dragDirectionLock: n = !1, dragPropagation: r = !1, dragConstraints: i = !1, dragElastic: a = zl, dragMomentum: o = !0 } = e;
4652
- return {
4653
- ...e,
4654
- drag: t,
4655
- dragDirectionLock: n,
4656
- dragPropagation: r,
4657
- dragConstraints: i,
4658
- dragElastic: a,
4659
- dragMomentum: o
4660
- };
4661
- }
4662
- };
4663
- function Gl(e) {
4664
- let t = !0;
4665
- return () => {
4666
- if (t) {
4667
- t = !1;
4668
- return;
4669
- }
4670
- e();
4671
- };
4672
- }
4673
- function Kl(e, t, n) {
4674
- let r = xa(e, Gl(n)), i = xa(t, Gl(n));
4675
- return () => {
4676
- r(), i();
4677
- };
4678
- }
4679
- function ql(e, t, n) {
4680
- return (t === !0 || t === e) && (n === null || n === e);
4681
- }
4682
- function Jl(e, t = 10) {
4683
- let n = null;
4684
- return Math.abs(e.y) > t ? n = "y" : Math.abs(e.x) > t && (n = "x"), n;
4685
- }
4686
- //#endregion
4687
- //#region node_modules/framer-motion/dist/es/gestures/drag/index.mjs
4688
- var Yl = class extends Y {
4689
- constructor(e) {
4690
- super(e), this.removeGroupControls = E, this.removeListeners = E, this.controls = new Wl(e);
4691
- }
4692
- mount() {
4693
- let { dragControls: e } = this.node.getProps();
4694
- e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || E;
4695
- }
4696
- update() {
4697
- let { dragControls: e } = this.node.getProps(), { dragControls: t } = this.node.prevProps || {};
4698
- e !== t && (this.removeGroupControls(), e && (this.removeGroupControls = e.subscribe(this.controls)));
4699
- }
4700
- unmount() {
4701
- this.removeGroupControls(), this.removeListeners(), this.controls.isDragging || this.controls.endPanSession();
4702
- }
4703
- }, Xl = (e) => (t, n) => {
4704
- e && A.update(() => e(t, n), !1, !0);
4705
- }, Zl = class extends Y {
4706
- constructor() {
4707
- super(...arguments), this.removePointerDownListener = E;
4708
- }
4709
- onPointerDown(e) {
4710
- this.session = new Tl(e, this.createPanHandlers(), {
4711
- transformPagePoint: this.node.getTransformPagePoint(),
4712
- contextWindow: xl(this.node)
4713
- });
4714
- }
4715
- createPanHandlers() {
4716
- let { onPanSessionStart: e, onPanStart: t, onPan: n, onPanEnd: r } = this.node.getProps();
4717
- return {
4718
- onSessionStart: Xl(e),
4719
- onStart: Xl(t),
4720
- onMove: Xl(n),
4721
- onEnd: (e, t) => {
4722
- delete this.session, r && A.postRender(() => r(e, t));
4723
- }
4724
- };
4725
- }
4726
- mount() {
4727
- this.removePointerDownListener = bl(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
4728
- }
4729
- update() {
4730
- this.session && this.session.updateHandlers(this.createPanHandlers());
4731
- }
4732
- unmount() {
4733
- this.removePointerDownListener(), this.session && this.session.end();
4734
- }
4735
- }, Ql = !1, $l = class extends a {
4736
- componentDidMount() {
4737
- let { visualElement: e, layoutGroup: t, switchLayoutGroup: n, layoutId: r } = this.props, { projection: i } = e;
4738
- i && (t.group && t.group.add(i), n && n.register && r && n.register(i), Ql && i.root.didUpdate(), i.addEventListener("animationComplete", () => {
4739
- this.safeToRemove();
4740
- }), i.setOptions({
4741
- ...i.options,
4742
- layoutDependency: this.props.layoutDependency,
4743
- onExitComplete: () => this.safeToRemove()
4744
- })), Rs.hasEverUpdated = !0;
4745
- }
4746
- getSnapshotBeforeUpdate(e) {
4747
- let { layoutDependency: t, visualElement: n, drag: r, isPresent: i } = this.props, { projection: a } = n;
4748
- return a ? (a.isPresent = i, e.layoutDependency !== t && a.setOptions({
4749
- ...a.options,
4750
- layoutDependency: t
4751
- }), Ql = !0, r || e.layoutDependency !== t || t === void 0 || e.isPresent !== i ? a.willUpdate() : this.safeToRemove(), e.isPresent !== i && (i ? a.promote() : a.relegate() || A.postRender(() => {
4752
- let e = a.getStack();
4753
- (!e || !e.members.length) && this.safeToRemove();
4754
- })), null) : null;
4755
- }
4756
- componentDidUpdate() {
4757
- let { visualElement: e, layoutAnchor: t } = this.props, { projection: n } = e;
4758
- n && (n.options.layoutAnchor = t, n.root.didUpdate(), Vi.postRender(() => {
4759
- !n.currentAnimation && n.isLead() && this.safeToRemove();
4760
- }));
4761
- }
4762
- componentWillUnmount() {
4763
- let { visualElement: e, layoutGroup: t, switchLayoutGroup: n } = this.props, { projection: r } = e;
4764
- Ql = !0, r && (r.scheduleCheckAfterUnmount(), t && t.group && t.group.remove(r), n && n.deregister && n.deregister(r));
4765
- }
4766
- safeToRemove() {
4767
- let { safeToRemove: e } = this.props;
4768
- e && e();
4769
- }
4770
- render() {
4771
- return null;
4772
- }
4773
- };
4774
- function eu(e) {
4775
- let [t, n] = Sc(), r = d(le);
4776
- return v($l, {
4777
- ...e,
4778
- layoutGroup: r,
4779
- switchLayoutGroup: d(il),
4780
- isPresent: t,
4781
- safeToRemove: n
4782
- });
4783
- }
4784
- //#endregion
4785
- //#region node_modules/framer-motion/dist/es/motion/features/drag.mjs
4786
- var tu = {
4787
- pan: { Feature: Zl },
4788
- drag: {
4789
- Feature: Yl,
4790
- ProjectionNode: bc,
4791
- MeasureLayout: eu
4792
- }
4793
- };
4794
- //#endregion
4795
- //#region node_modules/framer-motion/dist/es/gestures/hover.mjs
4796
- function nu(e, t, n) {
4797
- let { props: r } = e;
4798
- e.animationState && r.whileHover && e.animationState.setActive("whileHover", n === "Start");
4799
- let i = r["onHover" + n];
4800
- i && A.postRender(() => i(t, vl(t)));
4801
- }
4802
- var ru = class extends Y {
4803
- mount() {
4804
- let { current: e } = this.node;
4805
- e && (this.unmount = qi(e, (e, t) => (nu(this.node, t, "Start"), (e) => nu(this.node, e, "End"))));
4806
- }
4807
- unmount() {}
4808
- }, iu = class extends Y {
4809
- constructor() {
4810
- super(...arguments), this.isActive = !1;
4811
- }
4812
- onFocus() {
4813
- let e = !1;
4814
- try {
4815
- e = this.node.current.matches(":focus-visible");
4816
- } catch {
4817
- e = !0;
4818
- }
4819
- !e || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
4820
- }
4821
- onBlur() {
4822
- !this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
4823
- }
4824
- mount() {
4825
- this.unmount = xe(Ms(this.node.current, "focus", () => this.onFocus()), Ms(this.node.current, "blur", () => this.onBlur()));
4826
- }
4827
- unmount() {}
4828
- };
4829
- //#endregion
4830
- //#region node_modules/framer-motion/dist/es/gestures/press.mjs
4831
- function au(e, t, n) {
4832
- let { props: r } = e;
4833
- if (e.current instanceof HTMLButtonElement && e.current.disabled) return;
4834
- e.animationState && r.whileTap && e.animationState.setActive("whileTap", n === "Start");
4835
- let i = r["onTap" + (n === "End" ? "" : n)];
4836
- i && A.postRender(() => i(t, vl(t)));
4837
- }
4838
- var ou = class extends Y {
4839
- mount() {
4840
- let { current: e } = this.node;
4841
- if (!e) return;
4842
- let { globalTapTarget: t, propagate: n } = this.node.props;
4843
- this.unmount = oa(e, (e, t) => (au(this.node, t, "Start"), (e, { success: t }) => au(this.node, e, t ? "End" : "Cancel")), {
4844
- useGlobalTarget: t,
4845
- stopPropagation: n?.tap === !1
4846
- });
4847
- }
4848
- unmount() {}
4849
- }, su = /* @__PURE__ */ new WeakMap(), cu = /* @__PURE__ */ new WeakMap(), lu = (e) => {
4850
- let t = su.get(e.target);
4851
- t && t(e);
4852
- }, uu = (e) => {
4853
- e.forEach(lu);
4854
- };
4855
- function du({ root: e, ...t }) {
4856
- let n = e || document;
4857
- cu.has(n) || cu.set(n, {});
4858
- let r = cu.get(n), i = JSON.stringify(t);
4859
- return r[i] || (r[i] = new IntersectionObserver(uu, {
4860
- root: e,
4861
- ...t
4862
- })), r[i];
4863
- }
4864
- function fu(e, t, n) {
4865
- let r = du(t);
4866
- return su.set(e, n), r.observe(e), () => {
4867
- su.delete(e), r.unobserve(e);
4868
- };
4869
- }
4870
- //#endregion
4871
- //#region node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs
4872
- var pu = {
4873
- some: 0,
4874
- all: 1
4875
- }, mu = class extends Y {
4876
- constructor() {
4877
- super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
4878
- }
4879
- startObserver() {
4880
- this.stopObserver?.();
4881
- let { viewport: e = {} } = this.node.getProps(), { root: t, margin: n, amount: r = "some", once: i } = e, a = {
4882
- root: t ? t.current : void 0,
4883
- rootMargin: n,
4884
- threshold: typeof r == "number" ? r : pu[r]
4885
- }, o = (e) => {
4886
- let { isIntersecting: t } = e;
4887
- if (this.isInView === t || (this.isInView = t, i && !t && this.hasEnteredView)) return;
4888
- t && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", t);
4889
- let { onViewportEnter: n, onViewportLeave: r } = this.node.getProps(), a = t ? n : r;
4890
- a && a(e);
4891
- };
4892
- this.stopObserver = fu(this.node.current, a, o);
4893
- }
4894
- mount() {
4895
- this.startObserver();
4896
- }
4897
- update() {
4898
- if (typeof IntersectionObserver > "u") return;
4899
- let { props: e, prevProps: t } = this.node;
4900
- [
4901
- "amount",
4902
- "margin",
4903
- "root"
4904
- ].some(hu(e, t)) && this.startObserver();
4905
- }
4906
- unmount() {
4907
- this.stopObserver?.(), this.hasEnteredView = !1, this.isInView = !1;
4908
- }
4909
- };
4910
- function hu({ viewport: e = {} }, { viewport: t = {} } = {}) {
4911
- return (n) => e[n] !== t[n];
4912
- }
4913
- //#endregion
4914
- //#region node_modules/framer-motion/dist/es/motion/features/gestures.mjs
4915
- var gu = {
4916
- inView: { Feature: mu },
4917
- tap: { Feature: ou },
4918
- focus: { Feature: iu },
4919
- hover: { Feature: ru }
4920
- }, _u = { layout: {
4921
- ProjectionNode: bc,
4922
- MeasureLayout: eu
4923
- } }, vu = /* @__PURE__ */ pl({
4924
- ..._l,
4925
- ...gu,
4926
- ...tu,
4927
- ..._u
4928
- }, ml);
4929
- //#endregion
4930
- export { oe as _, vi as a, fe as c, le as d, re as f, se as g, ce as h, Bi as i, de as l, ie as m, Sc as n, ci as o, ne as p, xc as r, he as s, vu as t, ue as u };
4931
-
4932
- //# sourceMappingURL=widget-react-DbOJZl9F.js.map