@telegraph/tag 0.0.115 → 0.1.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.
- package/CHANGELOG.md +24 -0
- package/README.md +5 -5
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +1867 -1660
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/Tag/Tag.d.ts +10 -10
- package/dist/types/Tag/Tag.d.ts.map +1 -1
- package/dist/types/Tag/index.d.ts +1 -0
- package/dist/types/Tag/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +9 -9
package/dist/esm/index.mjs
CHANGED
|
@@ -1,58 +1,59 @@
|
|
|
1
|
-
import { jsx as F, jsxs as
|
|
2
|
-
import { Button as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { Stack as
|
|
5
|
-
import { Tooltip as
|
|
6
|
-
import { Text as
|
|
7
|
-
import { clsx as
|
|
8
|
-
import { X as
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
-
const t =
|
|
1
|
+
import { jsx as F, jsxs as ht } from "react/jsx-runtime";
|
|
2
|
+
import { Button as xe } from "@telegraph/button";
|
|
3
|
+
import { Icon as Qs } from "@telegraph/icon";
|
|
4
|
+
import { Stack as ei } from "@telegraph/layout";
|
|
5
|
+
import { Tooltip as ti } from "@telegraph/tooltip";
|
|
6
|
+
import { Text as ni } from "@telegraph/typography";
|
|
7
|
+
import { clsx as si } from "clsx";
|
|
8
|
+
import { X as vn, Check as ii, Copy as ri } from "lucide-react";
|
|
9
|
+
import X, { createContext as ie, useRef as j, useLayoutEffect as oi, useEffect as pt, useState as ai, useContext as E, useMemo as Oe, Fragment as Sn, createElement as ui, useInsertionEffect as Vn, useCallback as ci, forwardRef as li } from "react";
|
|
10
|
+
const fi = ie({});
|
|
11
|
+
function di(e) {
|
|
12
|
+
const t = j(null);
|
|
13
13
|
return t.current === null && (t.current = e()), t.current;
|
|
14
14
|
}
|
|
15
|
-
const
|
|
16
|
-
function
|
|
15
|
+
const xn = typeof window < "u", hi = xn ? oi : pt, An = /* @__PURE__ */ ie(null);
|
|
16
|
+
function pi(e, t) {
|
|
17
17
|
e.indexOf(t) === -1 && e.push(t);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function mi(e, t) {
|
|
20
20
|
const n = e.indexOf(t);
|
|
21
21
|
n > -1 && e.splice(n, 1);
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
function
|
|
23
|
+
const G = (e, t, n) => n > t ? t : n < e ? e : n;
|
|
24
|
+
function Ue(e, t) {
|
|
25
25
|
return t ? `${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}` : e;
|
|
26
26
|
}
|
|
27
27
|
let ge = () => {
|
|
28
|
-
},
|
|
28
|
+
}, Z = () => {
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
var Tn;
|
|
31
|
+
typeof process < "u" && ((Tn = process.env) == null ? void 0 : Tn.NODE_ENV) !== "production" && (ge = (e, t, n) => {
|
|
32
|
+
!e && typeof console < "u" && console.warn(Ue(t, n));
|
|
33
|
+
}, Z = (e, t, n) => {
|
|
33
34
|
if (!e)
|
|
34
|
-
throw new Error(
|
|
35
|
+
throw new Error(Ue(t, n));
|
|
35
36
|
});
|
|
36
|
-
const
|
|
37
|
-
function
|
|
37
|
+
const $ = {}, Mn = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);
|
|
38
|
+
function gi(e) {
|
|
38
39
|
return typeof e == "object" && e !== null;
|
|
39
40
|
}
|
|
40
|
-
const
|
|
41
|
+
const Cn = (e) => /^0[^.\s]+$/u.test(e);
|
|
41
42
|
// @__NO_SIDE_EFFECTS__
|
|
42
|
-
function
|
|
43
|
+
function Pn(e) {
|
|
43
44
|
let t;
|
|
44
45
|
return () => (t === void 0 && (t = e()), t);
|
|
45
46
|
}
|
|
46
|
-
const
|
|
47
|
+
const re = /* @__NO_SIDE_EFFECTS__ */ (e) => e, yi = (e, t) => (n) => t(e(n)), Ee = (...e) => e.reduce(yi), Fn = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
|
|
47
48
|
const s = t - e;
|
|
48
49
|
return s === 0 ? 1 : (n - e) / s;
|
|
49
50
|
};
|
|
50
|
-
class
|
|
51
|
+
class Rn {
|
|
51
52
|
constructor() {
|
|
52
53
|
this.subscriptions = [];
|
|
53
54
|
}
|
|
54
55
|
add(t) {
|
|
55
|
-
return
|
|
56
|
+
return pi(this.subscriptions, t), () => mi(this.subscriptions, t);
|
|
56
57
|
}
|
|
57
58
|
notify(t, n, s) {
|
|
58
59
|
const i = this.subscriptions.length;
|
|
@@ -72,49 +73,49 @@ class Sn {
|
|
|
72
73
|
this.subscriptions.length = 0;
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
|
-
const
|
|
76
|
-
function
|
|
76
|
+
const K = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, B = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
|
|
77
|
+
function Dn(e, t) {
|
|
77
78
|
return t ? e * (1e3 / t) : 0;
|
|
78
79
|
}
|
|
79
|
-
const
|
|
80
|
-
function
|
|
81
|
-
e ||
|
|
80
|
+
const Kt = /* @__PURE__ */ new Set();
|
|
81
|
+
function kn(e, t, n) {
|
|
82
|
+
e || Kt.has(t) || (console.warn(Ue(t, n)), Kt.add(t));
|
|
82
83
|
}
|
|
83
|
-
const
|
|
84
|
-
function
|
|
84
|
+
const In = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, bi = 1e-7, wi = 12;
|
|
85
|
+
function Ti(e, t, n, s, i) {
|
|
85
86
|
let r, o, a = 0;
|
|
86
87
|
do
|
|
87
|
-
o = t + (n - t) / 2, r =
|
|
88
|
-
while (Math.abs(r) >
|
|
88
|
+
o = t + (n - t) / 2, r = In(o, s, i) - e, r > 0 ? n = o : t = o;
|
|
89
|
+
while (Math.abs(r) > bi && ++a < wi);
|
|
89
90
|
return o;
|
|
90
91
|
}
|
|
91
92
|
function ye(e, t, n, s) {
|
|
92
93
|
if (e === t && n === s)
|
|
93
|
-
return
|
|
94
|
-
const i = (r) =>
|
|
95
|
-
return (r) => r === 0 || r === 1 ? r :
|
|
96
|
-
}
|
|
97
|
-
const
|
|
98
|
-
linear:
|
|
99
|
-
easeIn:
|
|
100
|
-
easeInOut:
|
|
101
|
-
easeOut:
|
|
102
|
-
circIn:
|
|
103
|
-
circInOut:
|
|
104
|
-
circOut:
|
|
105
|
-
backIn:
|
|
106
|
-
backInOut:
|
|
107
|
-
backOut:
|
|
108
|
-
anticipate:
|
|
109
|
-
},
|
|
110
|
-
if (
|
|
111
|
-
|
|
94
|
+
return re;
|
|
95
|
+
const i = (r) => Ti(r, 0, 1, e, n);
|
|
96
|
+
return (r) => r === 0 || r === 1 ? r : In(i(r), t, s);
|
|
97
|
+
}
|
|
98
|
+
const On = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, En = (e) => (t) => 1 - e(1 - t), Bn = /* @__PURE__ */ ye(0.33, 1.53, 0.69, 0.99), mt = /* @__PURE__ */ En(Bn), Ln = /* @__PURE__ */ On(mt), Nn = (e) => (e *= 2) < 1 ? 0.5 * mt(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), gt = (e) => 1 - Math.sin(Math.acos(e)), vi = En(gt), Kn = On(gt), Si = /* @__PURE__ */ ye(0.42, 0, 1, 1), Vi = /* @__PURE__ */ ye(0, 0, 0.58, 1), $n = /* @__PURE__ */ ye(0.42, 0, 0.58, 1), xi = (e) => Array.isArray(e) && typeof e[0] != "number", Wn = (e) => Array.isArray(e) && typeof e[0] == "number", $t = {
|
|
99
|
+
linear: re,
|
|
100
|
+
easeIn: Si,
|
|
101
|
+
easeInOut: $n,
|
|
102
|
+
easeOut: Vi,
|
|
103
|
+
circIn: gt,
|
|
104
|
+
circInOut: Kn,
|
|
105
|
+
circOut: vi,
|
|
106
|
+
backIn: mt,
|
|
107
|
+
backInOut: Ln,
|
|
108
|
+
backOut: Bn,
|
|
109
|
+
anticipate: Nn
|
|
110
|
+
}, Ai = (e) => typeof e == "string", Wt = (e) => {
|
|
111
|
+
if (Wn(e)) {
|
|
112
|
+
Z(e.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
|
|
112
113
|
const [t, n, s, i] = e;
|
|
113
114
|
return ye(t, n, s, i);
|
|
114
|
-
} else if (
|
|
115
|
-
return
|
|
115
|
+
} else if (Ai(e))
|
|
116
|
+
return Z($t[e] !== void 0, `Invalid easing type '${e}'`, "invalid-easing-type"), $t[e];
|
|
116
117
|
return e;
|
|
117
|
-
},
|
|
118
|
+
}, Se = [
|
|
118
119
|
"setup",
|
|
119
120
|
// Compute
|
|
120
121
|
"read",
|
|
@@ -132,7 +133,7 @@ const Cn = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Pn
|
|
|
132
133
|
"postRender"
|
|
133
134
|
// Compute
|
|
134
135
|
];
|
|
135
|
-
function
|
|
136
|
+
function Mi(e, t) {
|
|
136
137
|
let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), i = !1, r = !1;
|
|
137
138
|
const o = /* @__PURE__ */ new WeakSet();
|
|
138
139
|
let a = {
|
|
@@ -147,9 +148,9 @@ function gi(e, t) {
|
|
|
147
148
|
/**
|
|
148
149
|
* Schedule a process to run on the next frame.
|
|
149
150
|
*/
|
|
150
|
-
schedule: (u,
|
|
151
|
-
const
|
|
152
|
-
return
|
|
151
|
+
schedule: (u, d = !1, f = !1) => {
|
|
152
|
+
const p = f && i ? n : s;
|
|
153
|
+
return d && o.add(u), p.has(u) || p.add(u), u;
|
|
153
154
|
},
|
|
154
155
|
/**
|
|
155
156
|
* Cancel the provided callback from running on the next frame.
|
|
@@ -170,70 +171,74 @@ function gi(e, t) {
|
|
|
170
171
|
};
|
|
171
172
|
return l;
|
|
172
173
|
}
|
|
173
|
-
const
|
|
174
|
-
function
|
|
174
|
+
const Ci = 40;
|
|
175
|
+
function jn(e, t) {
|
|
175
176
|
let n = !1, s = !0;
|
|
176
177
|
const i = {
|
|
177
178
|
delta: 0,
|
|
178
179
|
timestamp: 0,
|
|
179
180
|
isProcessing: !1
|
|
180
|
-
}, r = () => n = !0, o =
|
|
181
|
-
const
|
|
182
|
-
n = !1,
|
|
183
|
-
},
|
|
181
|
+
}, r = () => n = !0, o = Se.reduce((w, V) => (w[V] = Mi(r), w), {}), { setup: a, read: c, resolveKeyframes: l, preUpdate: u, update: d, preRender: f, render: h, postRender: p } = o, b = () => {
|
|
182
|
+
const w = $.useManualTiming ? i.timestamp : performance.now();
|
|
183
|
+
n = !1, $.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(w - i.timestamp, Ci), 1)), i.timestamp = w, i.isProcessing = !0, a.process(i), c.process(i), l.process(i), u.process(i), d.process(i), f.process(i), h.process(i), p.process(i), i.isProcessing = !1, n && t && (s = !1, e(b));
|
|
184
|
+
}, y = () => {
|
|
184
185
|
n = !0, s = !0, i.isProcessing || e(b);
|
|
185
186
|
};
|
|
186
|
-
return { schedule:
|
|
187
|
-
const T = o[
|
|
188
|
-
return
|
|
189
|
-
}, {}), cancel: (
|
|
190
|
-
for (let
|
|
191
|
-
o[
|
|
187
|
+
return { schedule: Se.reduce((w, V) => {
|
|
188
|
+
const T = o[V];
|
|
189
|
+
return w[V] = (x, C = !1, S = !1) => (n || y(), T.schedule(x, C, S)), w;
|
|
190
|
+
}, {}), cancel: (w) => {
|
|
191
|
+
for (let V = 0; V < Se.length; V++)
|
|
192
|
+
o[Se[V]].cancel(w);
|
|
192
193
|
}, state: i, steps: o };
|
|
193
194
|
}
|
|
194
|
-
const { schedule:
|
|
195
|
-
let
|
|
196
|
-
function
|
|
197
|
-
|
|
195
|
+
const { schedule: N, cancel: Ye, state: Ce } = /* @__PURE__ */ jn(typeof requestAnimationFrame < "u" ? requestAnimationFrame : re, !0);
|
|
196
|
+
let Ae;
|
|
197
|
+
function Pi() {
|
|
198
|
+
Ae = void 0;
|
|
198
199
|
}
|
|
199
200
|
const k = {
|
|
200
|
-
now: () => (
|
|
201
|
+
now: () => (Ae === void 0 && k.set(Ce.isProcessing || $.useManualTiming ? Ce.timestamp : performance.now()), Ae),
|
|
201
202
|
set: (e) => {
|
|
202
|
-
|
|
203
|
+
Ae = e, queueMicrotask(Pi);
|
|
203
204
|
}
|
|
204
|
-
},
|
|
205
|
+
}, _n = (e) => (t) => typeof t == "string" && t.startsWith(e), Gn = /* @__PURE__ */ _n("--"), Fi = /* @__PURE__ */ _n("var(--"), yt = (e) => Fi(e) ? Ri.test(e.split("/*")[0].trim()) : !1, Ri = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
206
|
+
function jt(e) {
|
|
207
|
+
return typeof e != "string" ? !1 : e.split("/*")[0].includes("var(--");
|
|
208
|
+
}
|
|
209
|
+
const oe = {
|
|
205
210
|
test: (e) => typeof e == "number",
|
|
206
211
|
parse: parseFloat,
|
|
207
212
|
transform: (e) => e
|
|
208
213
|
}, he = {
|
|
209
|
-
...
|
|
210
|
-
transform: (e) =>
|
|
214
|
+
...oe,
|
|
215
|
+
transform: (e) => G(0, 1, e)
|
|
211
216
|
}, Ve = {
|
|
212
|
-
...
|
|
217
|
+
...oe,
|
|
213
218
|
default: 1
|
|
214
|
-
}, de = (e) => Math.round(e * 1e5) / 1e5,
|
|
215
|
-
function
|
|
219
|
+
}, de = (e) => Math.round(e * 1e5) / 1e5, bt = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
220
|
+
function Di(e) {
|
|
216
221
|
return e == null;
|
|
217
222
|
}
|
|
218
|
-
const
|
|
223
|
+
const ki = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, wt = (e, t) => (n) => !!(typeof n == "string" && ki.test(n) && n.startsWith(e) || t && !Di(n) && Object.prototype.hasOwnProperty.call(n, t)), Hn = (e, t, n) => (s) => {
|
|
219
224
|
if (typeof s != "string")
|
|
220
225
|
return s;
|
|
221
|
-
const [i, r, o, a] = s.match(
|
|
226
|
+
const [i, r, o, a] = s.match(bt);
|
|
222
227
|
return {
|
|
223
228
|
[e]: parseFloat(i),
|
|
224
229
|
[t]: parseFloat(r),
|
|
225
230
|
[n]: parseFloat(o),
|
|
226
231
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
227
232
|
};
|
|
228
|
-
},
|
|
229
|
-
...
|
|
230
|
-
transform: (e) => Math.round(
|
|
231
|
-
},
|
|
232
|
-
test: /* @__PURE__ */
|
|
233
|
-
parse: /* @__PURE__ */
|
|
234
|
-
transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" +
|
|
233
|
+
}, Ii = (e) => G(0, 255, e), Ke = {
|
|
234
|
+
...oe,
|
|
235
|
+
transform: (e) => Math.round(Ii(e))
|
|
236
|
+
}, U = {
|
|
237
|
+
test: /* @__PURE__ */ wt("rgb", "red"),
|
|
238
|
+
parse: /* @__PURE__ */ Hn("red", "green", "blue"),
|
|
239
|
+
transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Ke.transform(e) + ", " + Ke.transform(t) + ", " + Ke.transform(n) + ", " + de(he.transform(s)) + ")"
|
|
235
240
|
};
|
|
236
|
-
function
|
|
241
|
+
function Oi(e) {
|
|
237
242
|
let t = "", n = "", s = "", i = "";
|
|
238
243
|
return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), s = e.substring(5, 7), i = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), s = e.substring(3, 4), i = e.substring(4, 5), t += t, n += n, s += s, i += i), {
|
|
239
244
|
red: parseInt(t, 16),
|
|
@@ -242,36 +247,36 @@ function xi(e) {
|
|
|
242
247
|
alpha: i ? parseInt(i, 16) / 255 : 1
|
|
243
248
|
};
|
|
244
249
|
}
|
|
245
|
-
const
|
|
246
|
-
test: /* @__PURE__ */
|
|
247
|
-
parse:
|
|
248
|
-
transform:
|
|
250
|
+
const Xe = {
|
|
251
|
+
test: /* @__PURE__ */ wt("#"),
|
|
252
|
+
parse: Oi,
|
|
253
|
+
transform: U.transform
|
|
249
254
|
}, be = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
|
|
250
255
|
test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
|
|
251
256
|
parse: parseFloat,
|
|
252
257
|
transform: (t) => `${t}${e}`
|
|
253
|
-
}),
|
|
254
|
-
...
|
|
255
|
-
parse: (e) =>
|
|
256
|
-
transform: (e) =>
|
|
257
|
-
},
|
|
258
|
-
test: /* @__PURE__ */
|
|
259
|
-
parse: /* @__PURE__ */
|
|
260
|
-
transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " +
|
|
258
|
+
}), W = /* @__PURE__ */ be("deg"), ne = /* @__PURE__ */ be("%"), m = /* @__PURE__ */ be("px"), Ei = /* @__PURE__ */ be("vh"), Bi = /* @__PURE__ */ be("vw"), _t = {
|
|
259
|
+
...ne,
|
|
260
|
+
parse: (e) => ne.parse(e) / 100,
|
|
261
|
+
transform: (e) => ne.transform(e * 100)
|
|
262
|
+
}, ee = {
|
|
263
|
+
test: /* @__PURE__ */ wt("hsl", "hue"),
|
|
264
|
+
parse: /* @__PURE__ */ Hn("hue", "saturation", "lightness"),
|
|
265
|
+
transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + ne.transform(de(t)) + ", " + ne.transform(de(n)) + ", " + de(he.transform(s)) + ")"
|
|
261
266
|
}, M = {
|
|
262
|
-
test: (e) =>
|
|
263
|
-
parse: (e) =>
|
|
264
|
-
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ?
|
|
267
|
+
test: (e) => U.test(e) || Xe.test(e) || ee.test(e),
|
|
268
|
+
parse: (e) => U.test(e) ? U.parse(e) : ee.test(e) ? ee.parse(e) : Xe.parse(e),
|
|
269
|
+
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? U.transform(e) : ee.transform(e),
|
|
265
270
|
getAnimatableNone: (e) => {
|
|
266
271
|
const t = M.parse(e);
|
|
267
272
|
return t.alpha = 0, M.transform(t);
|
|
268
273
|
}
|
|
269
|
-
},
|
|
270
|
-
function
|
|
274
|
+
}, Li = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
275
|
+
function Ni(e) {
|
|
271
276
|
var t, n;
|
|
272
|
-
return isNaN(e) && typeof e == "string" && (((t = e.match(
|
|
277
|
+
return isNaN(e) && typeof e == "string" && (((t = e.match(bt)) == null ? void 0 : t.length) || 0) + (((n = e.match(Li)) == null ? void 0 : n.length) || 0) > 0;
|
|
273
278
|
}
|
|
274
|
-
const
|
|
279
|
+
const zn = "number", Un = "color", Ki = "var", $i = "var(", Gt = "${}", Wi = /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;
|
|
275
280
|
function pe(e) {
|
|
276
281
|
const t = e.toString(), n = [], s = {
|
|
277
282
|
color: [],
|
|
@@ -279,46 +284,46 @@ function pe(e) {
|
|
|
279
284
|
var: []
|
|
280
285
|
}, i = [];
|
|
281
286
|
let r = 0;
|
|
282
|
-
const a = t.replace(
|
|
287
|
+
const a = t.replace(Wi, (c) => (M.test(c) ? (s.color.push(r), i.push(Un), n.push(M.parse(c))) : c.startsWith($i) ? (s.var.push(r), i.push(Ki), n.push(c)) : (s.number.push(r), i.push(zn), n.push(parseFloat(c))), ++r, Gt)).split(Gt);
|
|
283
288
|
return { values: n, split: a, indexes: s, types: i };
|
|
284
289
|
}
|
|
285
|
-
function
|
|
290
|
+
function Yn(e) {
|
|
286
291
|
return pe(e).values;
|
|
287
292
|
}
|
|
288
|
-
function
|
|
293
|
+
function Xn(e) {
|
|
289
294
|
const { split: t, types: n } = pe(e), s = t.length;
|
|
290
295
|
return (i) => {
|
|
291
296
|
let r = "";
|
|
292
297
|
for (let o = 0; o < s; o++)
|
|
293
298
|
if (r += t[o], i[o] !== void 0) {
|
|
294
299
|
const a = n[o];
|
|
295
|
-
a ===
|
|
300
|
+
a === zn ? r += de(i[o]) : a === Un ? r += M.transform(i[o]) : r += i[o];
|
|
296
301
|
}
|
|
297
302
|
return r;
|
|
298
303
|
};
|
|
299
304
|
}
|
|
300
|
-
const
|
|
301
|
-
function
|
|
302
|
-
const t =
|
|
303
|
-
return
|
|
305
|
+
const ji = (e) => typeof e == "number" ? 0 : M.test(e) ? M.getAnimatableNone(e) : e;
|
|
306
|
+
function _i(e) {
|
|
307
|
+
const t = Yn(e);
|
|
308
|
+
return Xn(e)(t.map(ji));
|
|
304
309
|
}
|
|
305
|
-
const
|
|
306
|
-
test:
|
|
307
|
-
parse:
|
|
308
|
-
createTransformer:
|
|
309
|
-
getAnimatableNone:
|
|
310
|
+
const L = {
|
|
311
|
+
test: Ni,
|
|
312
|
+
parse: Yn,
|
|
313
|
+
createTransformer: Xn,
|
|
314
|
+
getAnimatableNone: _i
|
|
310
315
|
};
|
|
311
|
-
function
|
|
316
|
+
function $e(e, t, n) {
|
|
312
317
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
|
|
313
318
|
}
|
|
314
|
-
function
|
|
319
|
+
function Gi({ hue: e, saturation: t, lightness: n, alpha: s }) {
|
|
315
320
|
e /= 360, t /= 100, n /= 100;
|
|
316
321
|
let i = 0, r = 0, o = 0;
|
|
317
322
|
if (!t)
|
|
318
323
|
i = r = o = n;
|
|
319
324
|
else {
|
|
320
325
|
const a = n < 0.5 ? n * (1 + t) : n + t - n * t, c = 2 * n - a;
|
|
321
|
-
i =
|
|
326
|
+
i = $e(c, a, e + 1 / 3), r = $e(c, a, e), o = $e(c, a, e - 1 / 3);
|
|
322
327
|
}
|
|
323
328
|
return {
|
|
324
329
|
red: Math.round(i * 255),
|
|
@@ -327,37 +332,37 @@ function ki({ hue: e, saturation: t, lightness: n, alpha: s }) {
|
|
|
327
332
|
alpha: s
|
|
328
333
|
};
|
|
329
334
|
}
|
|
330
|
-
function
|
|
335
|
+
function Pe(e, t) {
|
|
331
336
|
return (n) => n > 0 ? t : e;
|
|
332
337
|
}
|
|
333
|
-
const
|
|
338
|
+
const we = (e, t, n) => e + (t - e) * n, We = (e, t, n) => {
|
|
334
339
|
const s = e * e, i = n * (t * t - s) + s;
|
|
335
340
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
336
|
-
},
|
|
337
|
-
function
|
|
338
|
-
const t =
|
|
341
|
+
}, Hi = [Xe, U, ee], zi = (e) => Hi.find((t) => t.test(e));
|
|
342
|
+
function Ht(e) {
|
|
343
|
+
const t = zi(e);
|
|
339
344
|
if (ge(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !t)
|
|
340
345
|
return !1;
|
|
341
346
|
let n = t.parse(e);
|
|
342
|
-
return t ===
|
|
347
|
+
return t === ee && (n = Gi(n)), n;
|
|
343
348
|
}
|
|
344
|
-
const
|
|
345
|
-
const n =
|
|
349
|
+
const zt = (e, t) => {
|
|
350
|
+
const n = Ht(e), s = Ht(t);
|
|
346
351
|
if (!n || !s)
|
|
347
|
-
return
|
|
352
|
+
return Pe(e, t);
|
|
348
353
|
const i = { ...n };
|
|
349
|
-
return (r) => (i.red =
|
|
350
|
-
},
|
|
351
|
-
function
|
|
352
|
-
return
|
|
354
|
+
return (r) => (i.red = We(n.red, s.red, r), i.green = We(n.green, s.green, r), i.blue = We(n.blue, s.blue, r), i.alpha = we(n.alpha, s.alpha, r), U.transform(i));
|
|
355
|
+
}, qe = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
356
|
+
function Ui(e, t) {
|
|
357
|
+
return qe.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
|
|
353
358
|
}
|
|
354
|
-
function
|
|
355
|
-
return (n) =>
|
|
359
|
+
function Yi(e, t) {
|
|
360
|
+
return (n) => we(e, t, n);
|
|
356
361
|
}
|
|
357
362
|
function Tt(e) {
|
|
358
|
-
return typeof e == "number" ?
|
|
363
|
+
return typeof e == "number" ? Yi : typeof e == "string" ? yt(e) ? Pe : M.test(e) ? zt : Zi : Array.isArray(e) ? qn : typeof e == "object" ? M.test(e) ? zt : Xi : Pe;
|
|
359
364
|
}
|
|
360
|
-
function
|
|
365
|
+
function qn(e, t) {
|
|
361
366
|
const n = [...e], s = n.length, i = e.map((r, o) => Tt(r)(r, t[o]));
|
|
362
367
|
return (r) => {
|
|
363
368
|
for (let o = 0; o < s; o++)
|
|
@@ -365,7 +370,7 @@ function _n(e, t) {
|
|
|
365
370
|
return n;
|
|
366
371
|
};
|
|
367
372
|
}
|
|
368
|
-
function
|
|
373
|
+
function Xi(e, t) {
|
|
369
374
|
const n = { ...e, ...t }, s = {};
|
|
370
375
|
for (const i in n)
|
|
371
376
|
e[i] !== void 0 && t[i] !== void 0 && (s[i] = Tt(e[i])(e[i], t[i]));
|
|
@@ -375,7 +380,7 @@ function Ki(e, t) {
|
|
|
375
380
|
return n;
|
|
376
381
|
};
|
|
377
382
|
}
|
|
378
|
-
function
|
|
383
|
+
function qi(e, t) {
|
|
379
384
|
const n = [], s = { color: 0, var: 0, number: 0 };
|
|
380
385
|
for (let i = 0; i < t.values.length; i++) {
|
|
381
386
|
const r = t.types[i], o = e.indexes[r][s[r]], a = e.values[o] ?? 0;
|
|
@@ -383,51 +388,51 @@ function $i(e, t) {
|
|
|
383
388
|
}
|
|
384
389
|
return n;
|
|
385
390
|
}
|
|
386
|
-
const
|
|
387
|
-
const n =
|
|
388
|
-
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ?
|
|
391
|
+
const Zi = (e, t) => {
|
|
392
|
+
const n = L.createTransformer(t), s = pe(e), i = pe(t);
|
|
393
|
+
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? qe.has(e) && !i.values.length || qe.has(t) && !s.values.length ? Ui(e, t) : Ee(qn(qi(s, i), i.values), n) : (ge(!0, `Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), Pe(e, t));
|
|
389
394
|
};
|
|
390
|
-
function
|
|
391
|
-
return typeof e == "number" && typeof t == "number" && typeof n == "number" ?
|
|
395
|
+
function Zn(e, t, n) {
|
|
396
|
+
return typeof e == "number" && typeof t == "number" && typeof n == "number" ? we(e, t, n) : Tt(e)(e, t);
|
|
392
397
|
}
|
|
393
|
-
const
|
|
398
|
+
const Ji = (e) => {
|
|
394
399
|
const t = ({ timestamp: n }) => e(n);
|
|
395
400
|
return {
|
|
396
|
-
start: (n = !0) =>
|
|
397
|
-
stop: () =>
|
|
401
|
+
start: (n = !0) => N.update(t, n),
|
|
402
|
+
stop: () => Ye(t),
|
|
398
403
|
/**
|
|
399
404
|
* If we're processing this frame we can use the
|
|
400
405
|
* framelocked timestamp to keep things in sync.
|
|
401
406
|
*/
|
|
402
|
-
now: () =>
|
|
407
|
+
now: () => Ce.isProcessing ? Ce.timestamp : k.now()
|
|
403
408
|
};
|
|
404
|
-
},
|
|
409
|
+
}, Jn = (e, t, n = 10) => {
|
|
405
410
|
let s = "";
|
|
406
411
|
const i = Math.max(Math.round(t / n), 2);
|
|
407
412
|
for (let r = 0; r < i; r++)
|
|
408
413
|
s += Math.round(e(r / (i - 1)) * 1e4) / 1e4 + ", ";
|
|
409
414
|
return `linear(${s.substring(0, s.length - 2)})`;
|
|
410
|
-
},
|
|
415
|
+
}, Fe = 2e4;
|
|
411
416
|
function vt(e) {
|
|
412
417
|
let t = 0;
|
|
413
418
|
const n = 50;
|
|
414
419
|
let s = e.next(t);
|
|
415
|
-
for (; !s.done && t <
|
|
420
|
+
for (; !s.done && t < Fe; )
|
|
416
421
|
t += n, s = e.next(t);
|
|
417
|
-
return t >=
|
|
422
|
+
return t >= Fe ? 1 / 0 : t;
|
|
418
423
|
}
|
|
419
|
-
function
|
|
420
|
-
const s = n({ ...e, keyframes: [0, t] }), i = Math.min(vt(s),
|
|
424
|
+
function Qi(e, t = 100, n) {
|
|
425
|
+
const s = n({ ...e, keyframes: [0, t] }), i = Math.min(vt(s), Fe);
|
|
421
426
|
return {
|
|
422
427
|
type: "keyframes",
|
|
423
428
|
ease: (r) => s.next(i * r).value / t,
|
|
424
429
|
duration: /* @__PURE__ */ B(i)
|
|
425
430
|
};
|
|
426
431
|
}
|
|
427
|
-
const
|
|
428
|
-
function
|
|
429
|
-
const s = Math.max(t -
|
|
430
|
-
return
|
|
432
|
+
const er = 5;
|
|
433
|
+
function Qn(e, t, n) {
|
|
434
|
+
const s = Math.max(t - er, 0);
|
|
435
|
+
return Dn(n - e(s), t - s);
|
|
431
436
|
}
|
|
432
437
|
const A = {
|
|
433
438
|
// Default spring physics
|
|
@@ -457,26 +462,26 @@ const A = {
|
|
|
457
462
|
// in seconds
|
|
458
463
|
minDamping: 0.05,
|
|
459
464
|
maxDamping: 1
|
|
460
|
-
},
|
|
461
|
-
function
|
|
465
|
+
}, je = 1e-3;
|
|
466
|
+
function tr({ duration: e = A.duration, bounce: t = A.bounce, velocity: n = A.velocity, mass: s = A.mass }) {
|
|
462
467
|
let i, r;
|
|
463
|
-
ge(e <= /* @__PURE__ */
|
|
468
|
+
ge(e <= /* @__PURE__ */ K(A.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
464
469
|
let o = 1 - t;
|
|
465
|
-
o =
|
|
466
|
-
const u = l * o,
|
|
467
|
-
return
|
|
470
|
+
o = G(A.minDamping, A.maxDamping, o), e = G(A.minDuration, A.maxDuration, /* @__PURE__ */ B(e)), o < 1 ? (i = (l) => {
|
|
471
|
+
const u = l * o, d = u * e, f = u - n, h = Ze(l, o), p = Math.exp(-d);
|
|
472
|
+
return je - f / h * p;
|
|
468
473
|
}, r = (l) => {
|
|
469
|
-
const
|
|
470
|
-
return (-i(l) +
|
|
474
|
+
const d = l * o * e, f = d * n + n, h = Math.pow(o, 2) * Math.pow(l, 2) * e, p = Math.exp(-d), b = Ze(Math.pow(l, 2), o);
|
|
475
|
+
return (-i(l) + je > 0 ? -1 : 1) * ((f - h) * p) / b;
|
|
471
476
|
}) : (i = (l) => {
|
|
472
|
-
const u = Math.exp(-l * e),
|
|
473
|
-
return -
|
|
477
|
+
const u = Math.exp(-l * e), d = (l - n) * e + 1;
|
|
478
|
+
return -je + u * d;
|
|
474
479
|
}, r = (l) => {
|
|
475
|
-
const u = Math.exp(-l * e),
|
|
476
|
-
return u *
|
|
480
|
+
const u = Math.exp(-l * e), d = (n - l) * (e * e);
|
|
481
|
+
return u * d;
|
|
477
482
|
});
|
|
478
|
-
const a = 5 / e, c =
|
|
479
|
-
if (e = /* @__PURE__ */
|
|
483
|
+
const a = 5 / e, c = sr(i, r, a);
|
|
484
|
+
if (e = /* @__PURE__ */ K(e), isNaN(c))
|
|
480
485
|
return {
|
|
481
486
|
stiffness: A.stiffness,
|
|
482
487
|
damping: A.damping,
|
|
@@ -491,21 +496,21 @@ function zi({ duration: e = A.duration, bounce: t = A.bounce, velocity: n = A.ve
|
|
|
491
496
|
};
|
|
492
497
|
}
|
|
493
498
|
}
|
|
494
|
-
const
|
|
495
|
-
function
|
|
499
|
+
const nr = 12;
|
|
500
|
+
function sr(e, t, n) {
|
|
496
501
|
let s = n;
|
|
497
|
-
for (let i = 1; i <
|
|
502
|
+
for (let i = 1; i < nr; i++)
|
|
498
503
|
s = s - e(s) / t(s);
|
|
499
504
|
return s;
|
|
500
505
|
}
|
|
501
|
-
function
|
|
506
|
+
function Ze(e, t) {
|
|
502
507
|
return e * Math.sqrt(1 - t * t);
|
|
503
508
|
}
|
|
504
|
-
const
|
|
505
|
-
function
|
|
509
|
+
const ir = ["duration", "bounce"], rr = ["stiffness", "damping", "mass"];
|
|
510
|
+
function Ut(e, t) {
|
|
506
511
|
return t.some((n) => e[n] !== void 0);
|
|
507
512
|
}
|
|
508
|
-
function
|
|
513
|
+
function or(e) {
|
|
509
514
|
let t = {
|
|
510
515
|
velocity: A.velocity,
|
|
511
516
|
stiffness: A.stiffness,
|
|
@@ -514,9 +519,9 @@ function qi(e) {
|
|
|
514
519
|
isResolvedFromDuration: !1,
|
|
515
520
|
...e
|
|
516
521
|
};
|
|
517
|
-
if (!
|
|
518
|
-
if (e.visualDuration) {
|
|
519
|
-
const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 *
|
|
522
|
+
if (!Ut(e, rr) && Ut(e, ir))
|
|
523
|
+
if (t.velocity = 0, e.visualDuration) {
|
|
524
|
+
const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * G(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(i);
|
|
520
525
|
t = {
|
|
521
526
|
...t,
|
|
522
527
|
mass: A.mass,
|
|
@@ -524,7 +529,7 @@ function qi(e) {
|
|
|
524
529
|
damping: r
|
|
525
530
|
};
|
|
526
531
|
} else {
|
|
527
|
-
const n =
|
|
532
|
+
const n = tr({ ...e, velocity: 0 });
|
|
528
533
|
t = {
|
|
529
534
|
...t,
|
|
530
535
|
...n,
|
|
@@ -533,78 +538,78 @@ function qi(e) {
|
|
|
533
538
|
}
|
|
534
539
|
return t;
|
|
535
540
|
}
|
|
536
|
-
function
|
|
541
|
+
function Re(e = A.visualDuration, t = A.bounce) {
|
|
537
542
|
const n = typeof e != "object" ? {
|
|
538
543
|
visualDuration: e,
|
|
539
544
|
keyframes: [0, 1],
|
|
540
545
|
bounce: t
|
|
541
546
|
} : e;
|
|
542
547
|
let { restSpeed: s, restDelta: i } = n;
|
|
543
|
-
const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: c, damping: l, mass: u, duration:
|
|
548
|
+
const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: c, damping: l, mass: u, duration: d, velocity: f, isResolvedFromDuration: h } = or({
|
|
544
549
|
...n,
|
|
545
550
|
velocity: -/* @__PURE__ */ B(n.velocity || 0)
|
|
546
|
-
}),
|
|
547
|
-
s || (s =
|
|
548
|
-
let
|
|
551
|
+
}), p = f || 0, b = l / (2 * Math.sqrt(c * u)), y = o - r, g = /* @__PURE__ */ B(Math.sqrt(c / u)), v = Math.abs(y) < 5;
|
|
552
|
+
s || (s = v ? A.restSpeed.granular : A.restSpeed.default), i || (i = v ? A.restDelta.granular : A.restDelta.default);
|
|
553
|
+
let w;
|
|
549
554
|
if (b < 1) {
|
|
550
|
-
const T =
|
|
551
|
-
|
|
552
|
-
const C = Math.exp(-b *
|
|
553
|
-
return o - C * ((
|
|
555
|
+
const T = Ze(g, b);
|
|
556
|
+
w = (x) => {
|
|
557
|
+
const C = Math.exp(-b * g * x);
|
|
558
|
+
return o - C * ((p + b * g * y) / T * Math.sin(T * x) + y * Math.cos(T * x));
|
|
554
559
|
};
|
|
555
560
|
} else if (b === 1)
|
|
556
|
-
|
|
561
|
+
w = (T) => o - Math.exp(-g * T) * (y + (p + g * y) * T);
|
|
557
562
|
else {
|
|
558
|
-
const T =
|
|
559
|
-
|
|
560
|
-
const C = Math.exp(-b *
|
|
561
|
-
return o - C * ((
|
|
563
|
+
const T = g * Math.sqrt(b * b - 1);
|
|
564
|
+
w = (x) => {
|
|
565
|
+
const C = Math.exp(-b * g * x), S = Math.min(T * x, 300);
|
|
566
|
+
return o - C * ((p + b * g * y) * Math.sinh(S) + T * y * Math.cosh(S)) / T;
|
|
562
567
|
};
|
|
563
568
|
}
|
|
564
|
-
const
|
|
565
|
-
calculatedDuration: h &&
|
|
569
|
+
const V = {
|
|
570
|
+
calculatedDuration: h && d || null,
|
|
566
571
|
next: (T) => {
|
|
567
|
-
const
|
|
572
|
+
const x = w(T);
|
|
568
573
|
if (h)
|
|
569
|
-
a.done = T >=
|
|
574
|
+
a.done = T >= d;
|
|
570
575
|
else {
|
|
571
|
-
let C = T === 0 ?
|
|
572
|
-
b < 1 && (C = T === 0 ? /* @__PURE__ */
|
|
573
|
-
const
|
|
574
|
-
a.done =
|
|
576
|
+
let C = T === 0 ? p : 0;
|
|
577
|
+
b < 1 && (C = T === 0 ? /* @__PURE__ */ K(p) : Qn(w, T, x));
|
|
578
|
+
const S = Math.abs(C) <= s, D = Math.abs(o - x) <= i;
|
|
579
|
+
a.done = S && D;
|
|
575
580
|
}
|
|
576
|
-
return a.value = a.done ? o :
|
|
581
|
+
return a.value = a.done ? o : x, a;
|
|
577
582
|
},
|
|
578
583
|
toString: () => {
|
|
579
|
-
const T = Math.min(vt(
|
|
580
|
-
return T + "ms " +
|
|
584
|
+
const T = Math.min(vt(V), Fe), x = Jn((C) => V.next(T * C).value, T, 30);
|
|
585
|
+
return T + "ms " + x;
|
|
581
586
|
},
|
|
582
587
|
toTransition: () => {
|
|
583
588
|
}
|
|
584
589
|
};
|
|
585
|
-
return
|
|
590
|
+
return V;
|
|
586
591
|
}
|
|
587
|
-
|
|
588
|
-
const t =
|
|
589
|
-
return e.ease = t.ease, e.duration = /* @__PURE__ */
|
|
592
|
+
Re.applyToOptions = (e) => {
|
|
593
|
+
const t = Qi(e, 100, Re);
|
|
594
|
+
return e.ease = t.ease, e.duration = /* @__PURE__ */ K(t.duration), e.type = "keyframes", e;
|
|
590
595
|
};
|
|
591
|
-
function
|
|
592
|
-
const
|
|
596
|
+
function Je({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: c, restDelta: l = 0.5, restSpeed: u }) {
|
|
597
|
+
const d = e[0], f = {
|
|
593
598
|
done: !1,
|
|
594
|
-
value:
|
|
595
|
-
}, h = (
|
|
599
|
+
value: d
|
|
600
|
+
}, h = (S) => a !== void 0 && S < a || c !== void 0 && S > c, p = (S) => a === void 0 ? c : c === void 0 || Math.abs(a - S) < Math.abs(c - S) ? a : c;
|
|
596
601
|
let b = n * t;
|
|
597
|
-
const
|
|
598
|
-
|
|
599
|
-
const
|
|
600
|
-
const
|
|
601
|
-
|
|
602
|
+
const y = d + b, g = o === void 0 ? y : o(y);
|
|
603
|
+
g !== y && (b = g - d);
|
|
604
|
+
const v = (S) => -b * Math.exp(-S / s), w = (S) => g + v(S), V = (S) => {
|
|
605
|
+
const D = v(S), I = w(S);
|
|
606
|
+
f.done = Math.abs(D) <= l, f.value = f.done ? g : I;
|
|
602
607
|
};
|
|
603
|
-
let T,
|
|
604
|
-
const C = (
|
|
605
|
-
h(
|
|
606
|
-
keyframes: [
|
|
607
|
-
velocity:
|
|
608
|
+
let T, x;
|
|
609
|
+
const C = (S) => {
|
|
610
|
+
h(f.value) && (T = S, x = Re({
|
|
611
|
+
keyframes: [f.value, p(f.value)],
|
|
612
|
+
velocity: Qn(w, S, f.value),
|
|
608
613
|
// TODO: This should be passing * 1000
|
|
609
614
|
damping: i,
|
|
610
615
|
stiffness: r,
|
|
@@ -614,92 +619,92 @@ function qe({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
614
619
|
};
|
|
615
620
|
return C(0), {
|
|
616
621
|
calculatedDuration: null,
|
|
617
|
-
next: (
|
|
618
|
-
let
|
|
619
|
-
return !
|
|
622
|
+
next: (S) => {
|
|
623
|
+
let D = !1;
|
|
624
|
+
return !x && T === void 0 && (D = !0, V(S), C(S)), T !== void 0 && S >= T ? x.next(S - T) : (!D && V(S), f);
|
|
620
625
|
}
|
|
621
626
|
};
|
|
622
627
|
}
|
|
623
|
-
function
|
|
624
|
-
const s = [], i = n ||
|
|
628
|
+
function ar(e, t, n) {
|
|
629
|
+
const s = [], i = n || $.mix || Zn, r = e.length - 1;
|
|
625
630
|
for (let o = 0; o < r; o++) {
|
|
626
631
|
let a = i(e[o], e[o + 1]);
|
|
627
632
|
if (t) {
|
|
628
|
-
const c = Array.isArray(t) ? t[o] ||
|
|
629
|
-
a =
|
|
633
|
+
const c = Array.isArray(t) ? t[o] || re : t;
|
|
634
|
+
a = Ee(c, a);
|
|
630
635
|
}
|
|
631
636
|
s.push(a);
|
|
632
637
|
}
|
|
633
638
|
return s;
|
|
634
639
|
}
|
|
635
|
-
function
|
|
640
|
+
function ur(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
636
641
|
const r = e.length;
|
|
637
|
-
if (
|
|
642
|
+
if (Z(r === t.length, "Both input and output ranges must be the same length", "range-length"), r === 1)
|
|
638
643
|
return () => t[0];
|
|
639
644
|
if (r === 2 && t[0] === t[1])
|
|
640
645
|
return () => t[1];
|
|
641
646
|
const o = e[0] === e[1];
|
|
642
647
|
e[0] > e[r - 1] && (e = [...e].reverse(), t = [...t].reverse());
|
|
643
|
-
const a =
|
|
648
|
+
const a = ar(t, s, i), c = a.length, l = (u) => {
|
|
644
649
|
if (o && u < e[0])
|
|
645
650
|
return t[0];
|
|
646
|
-
let
|
|
651
|
+
let d = 0;
|
|
647
652
|
if (c > 1)
|
|
648
|
-
for (;
|
|
653
|
+
for (; d < e.length - 2 && !(u < e[d + 1]); d++)
|
|
649
654
|
;
|
|
650
|
-
const
|
|
651
|
-
return a[
|
|
655
|
+
const f = /* @__PURE__ */ Fn(e[d], e[d + 1], u);
|
|
656
|
+
return a[d](f);
|
|
652
657
|
};
|
|
653
|
-
return n ? (u) => l(
|
|
658
|
+
return n ? (u) => l(G(e[0], e[r - 1], u)) : l;
|
|
654
659
|
}
|
|
655
|
-
function
|
|
660
|
+
function cr(e, t) {
|
|
656
661
|
const n = e[e.length - 1];
|
|
657
662
|
for (let s = 1; s <= t; s++) {
|
|
658
|
-
const i = /* @__PURE__ */
|
|
659
|
-
e.push(
|
|
663
|
+
const i = /* @__PURE__ */ Fn(0, t, s);
|
|
664
|
+
e.push(we(n, 1, i));
|
|
660
665
|
}
|
|
661
666
|
}
|
|
662
|
-
function
|
|
667
|
+
function lr(e) {
|
|
663
668
|
const t = [0];
|
|
664
|
-
return
|
|
669
|
+
return cr(t, e.length - 1), t;
|
|
665
670
|
}
|
|
666
|
-
function
|
|
671
|
+
function fr(e, t) {
|
|
667
672
|
return e.map((n) => n * t);
|
|
668
673
|
}
|
|
669
|
-
function
|
|
670
|
-
return e.map(() => t ||
|
|
674
|
+
function dr(e, t) {
|
|
675
|
+
return e.map(() => t || $n).splice(0, e.length - 1);
|
|
671
676
|
}
|
|
672
|
-
function
|
|
673
|
-
const i =
|
|
677
|
+
function te({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }) {
|
|
678
|
+
const i = xi(s) ? s.map(Wt) : Wt(s), r = {
|
|
674
679
|
done: !1,
|
|
675
680
|
value: t[0]
|
|
676
|
-
}, o =
|
|
681
|
+
}, o = fr(
|
|
677
682
|
// Only use the provided offsets if they're the correct length
|
|
678
683
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
679
|
-
n && n.length === t.length ? n :
|
|
684
|
+
n && n.length === t.length ? n : lr(t),
|
|
680
685
|
e
|
|
681
|
-
), a =
|
|
682
|
-
ease: Array.isArray(i) ? i :
|
|
686
|
+
), a = ur(o, t, {
|
|
687
|
+
ease: Array.isArray(i) ? i : dr(t, i)
|
|
683
688
|
});
|
|
684
689
|
return {
|
|
685
690
|
calculatedDuration: e,
|
|
686
691
|
next: (c) => (r.value = a(c), r.done = c >= e, r)
|
|
687
692
|
};
|
|
688
693
|
}
|
|
689
|
-
const
|
|
690
|
-
function
|
|
691
|
-
const r = e.filter(
|
|
694
|
+
const hr = (e) => e !== null;
|
|
695
|
+
function St(e, { repeat: t, repeatType: n = "loop" }, s, i = 1) {
|
|
696
|
+
const r = e.filter(hr), a = i < 0 || t && n !== "loop" && t % 2 === 1 ? 0 : r.length - 1;
|
|
692
697
|
return !a || s === void 0 ? r[a] : s;
|
|
693
698
|
}
|
|
694
|
-
const
|
|
695
|
-
decay:
|
|
696
|
-
inertia:
|
|
697
|
-
tween:
|
|
698
|
-
keyframes:
|
|
699
|
-
spring:
|
|
699
|
+
const pr = {
|
|
700
|
+
decay: Je,
|
|
701
|
+
inertia: Je,
|
|
702
|
+
tween: te,
|
|
703
|
+
keyframes: te,
|
|
704
|
+
spring: Re
|
|
700
705
|
};
|
|
701
|
-
function
|
|
702
|
-
typeof e.type == "string" && (e.type =
|
|
706
|
+
function es(e) {
|
|
707
|
+
typeof e.type == "string" && (e.type = pr[e.type]);
|
|
703
708
|
}
|
|
704
709
|
class Vt {
|
|
705
710
|
constructor() {
|
|
@@ -725,8 +730,8 @@ class Vt {
|
|
|
725
730
|
return this.finished.then(t, n);
|
|
726
731
|
}
|
|
727
732
|
}
|
|
728
|
-
const
|
|
729
|
-
class
|
|
733
|
+
const mr = (e) => e / 100;
|
|
734
|
+
class xt extends Vt {
|
|
730
735
|
constructor(t) {
|
|
731
736
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
732
737
|
var s, i;
|
|
@@ -736,11 +741,11 @@ class St extends Vt {
|
|
|
736
741
|
}
|
|
737
742
|
initAnimation() {
|
|
738
743
|
const { options: t } = this;
|
|
739
|
-
|
|
740
|
-
const { type: n =
|
|
744
|
+
es(t);
|
|
745
|
+
const { type: n = te, repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = t;
|
|
741
746
|
let { keyframes: a } = t;
|
|
742
|
-
const c = n ||
|
|
743
|
-
process.env.NODE_ENV !== "production" && c !==
|
|
747
|
+
const c = n || te;
|
|
748
|
+
process.env.NODE_ENV !== "production" && c !== te && Z(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), c !== te && typeof a[0] != "number" && (this.mixKeyframes = Ee(mr, Zn(a[0], a[1])), a = [0, 100]);
|
|
744
749
|
const l = c({ ...t, keyframes: a });
|
|
745
750
|
r === "mirror" && (this.mirroredGenerator = c({
|
|
746
751
|
...t,
|
|
@@ -758,22 +763,22 @@ class St extends Vt {
|
|
|
758
763
|
const { generator: s, totalDuration: i, mixKeyframes: r, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: c } = this;
|
|
759
764
|
if (this.startTime === null)
|
|
760
765
|
return s.next(0);
|
|
761
|
-
const { delay: l = 0, keyframes: u, repeat:
|
|
766
|
+
const { delay: l = 0, keyframes: u, repeat: d, repeatType: f, repeatDelay: h, type: p, onUpdate: b, finalKeyframe: y } = this.options;
|
|
762
767
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - i / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
|
|
763
|
-
const
|
|
764
|
-
this.currentTime = Math.max(
|
|
765
|
-
let
|
|
766
|
-
if (
|
|
767
|
-
const
|
|
768
|
-
let
|
|
769
|
-
!
|
|
768
|
+
const g = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1), v = this.playbackSpeed >= 0 ? g < 0 : g > i;
|
|
769
|
+
this.currentTime = Math.max(g, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
|
|
770
|
+
let w = this.currentTime, V = s;
|
|
771
|
+
if (d) {
|
|
772
|
+
const S = Math.min(this.currentTime, i) / a;
|
|
773
|
+
let D = Math.floor(S), I = S % 1;
|
|
774
|
+
!I && S >= 1 && (I = 1), I === 1 && D--, D = Math.min(D, d + 1), !!(D % 2) && (f === "reverse" ? (I = 1 - I, h && (I -= h / a)) : f === "mirror" && (V = o)), w = G(0, 1, I) * a;
|
|
770
775
|
}
|
|
771
|
-
const T =
|
|
776
|
+
const T = v ? { done: !1, value: u[0] } : V.next(w);
|
|
772
777
|
r && (T.value = r(T.value));
|
|
773
|
-
let { done:
|
|
774
|
-
!
|
|
775
|
-
const C = this.holdTime === null && (this.state === "finished" || this.state === "running" &&
|
|
776
|
-
return C &&
|
|
778
|
+
let { done: x } = T;
|
|
779
|
+
!v && c !== null && (x = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
|
|
780
|
+
const C = this.holdTime === null && (this.state === "finished" || this.state === "running" && x);
|
|
781
|
+
return C && p !== Je && (T.value = St(u, this.options, y, this.speed)), b && b(T.value), C && this.finish(), T;
|
|
777
782
|
}
|
|
778
783
|
/**
|
|
779
784
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -786,12 +791,16 @@ class St extends Vt {
|
|
|
786
791
|
get duration() {
|
|
787
792
|
return /* @__PURE__ */ B(this.calculatedDuration);
|
|
788
793
|
}
|
|
794
|
+
get iterationDuration() {
|
|
795
|
+
const { delay: t = 0 } = this.options || {};
|
|
796
|
+
return this.duration + /* @__PURE__ */ B(t);
|
|
797
|
+
}
|
|
789
798
|
get time() {
|
|
790
799
|
return /* @__PURE__ */ B(this.currentTime);
|
|
791
800
|
}
|
|
792
801
|
set time(t) {
|
|
793
802
|
var n;
|
|
794
|
-
t = /* @__PURE__ */
|
|
803
|
+
t = /* @__PURE__ */ K(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), (n = this.driver) == null || n.start(!1);
|
|
795
804
|
}
|
|
796
805
|
get speed() {
|
|
797
806
|
return this.playbackSpeed;
|
|
@@ -805,7 +814,7 @@ class St extends Vt {
|
|
|
805
814
|
var i, r;
|
|
806
815
|
if (this.isStopped)
|
|
807
816
|
return;
|
|
808
|
-
const { driver: t =
|
|
817
|
+
const { driver: t = Ji, startTime: n } = this.options;
|
|
809
818
|
this.driver || (this.driver = t((o) => this.tick(o))), (r = (i = this.options).onPlay) == null || r.call(i);
|
|
810
819
|
const s = this.driver.now();
|
|
811
820
|
this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = n ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
@@ -838,14 +847,14 @@ class St extends Vt {
|
|
|
838
847
|
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (n = this.driver) == null || n.stop(), t.observe(this);
|
|
839
848
|
}
|
|
840
849
|
}
|
|
841
|
-
function
|
|
850
|
+
function gr(e) {
|
|
842
851
|
for (let t = 1; t < e.length; t++)
|
|
843
852
|
e[t] ?? (e[t] = e[t - 1]);
|
|
844
853
|
}
|
|
845
|
-
const
|
|
846
|
-
const t =
|
|
847
|
-
return
|
|
848
|
-
},
|
|
854
|
+
const Y = (e) => e * 180 / Math.PI, Qe = (e) => {
|
|
855
|
+
const t = Y(Math.atan2(e[1], e[0]));
|
|
856
|
+
return et(t);
|
|
857
|
+
}, yr = {
|
|
849
858
|
x: 4,
|
|
850
859
|
y: 5,
|
|
851
860
|
translateX: 4,
|
|
@@ -853,53 +862,53 @@ const G = (e) => e * 180 / Math.PI, Ze = (e) => {
|
|
|
853
862
|
scaleX: 0,
|
|
854
863
|
scaleY: 3,
|
|
855
864
|
scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
|
|
856
|
-
rotate:
|
|
857
|
-
rotateZ:
|
|
858
|
-
skewX: (e) =>
|
|
859
|
-
skewY: (e) =>
|
|
865
|
+
rotate: Qe,
|
|
866
|
+
rotateZ: Qe,
|
|
867
|
+
skewX: (e) => Y(Math.atan(e[1])),
|
|
868
|
+
skewY: (e) => Y(Math.atan(e[2])),
|
|
860
869
|
skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
|
|
861
|
-
},
|
|
870
|
+
}, et = (e) => (e = e % 360, e < 0 && (e += 360), e), Yt = Qe, Xt = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), qt = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), br = {
|
|
862
871
|
x: 12,
|
|
863
872
|
y: 13,
|
|
864
873
|
z: 14,
|
|
865
874
|
translateX: 12,
|
|
866
875
|
translateY: 13,
|
|
867
876
|
translateZ: 14,
|
|
868
|
-
scaleX:
|
|
869
|
-
scaleY:
|
|
870
|
-
scale: (e) => (
|
|
871
|
-
rotateX: (e) =>
|
|
872
|
-
rotateY: (e) =>
|
|
873
|
-
rotateZ:
|
|
874
|
-
rotate:
|
|
875
|
-
skewX: (e) =>
|
|
876
|
-
skewY: (e) =>
|
|
877
|
+
scaleX: Xt,
|
|
878
|
+
scaleY: qt,
|
|
879
|
+
scale: (e) => (Xt(e) + qt(e)) / 2,
|
|
880
|
+
rotateX: (e) => et(Y(Math.atan2(e[6], e[5]))),
|
|
881
|
+
rotateY: (e) => et(Y(Math.atan2(-e[2], e[0]))),
|
|
882
|
+
rotateZ: Yt,
|
|
883
|
+
rotate: Yt,
|
|
884
|
+
skewX: (e) => Y(Math.atan(e[4])),
|
|
885
|
+
skewY: (e) => Y(Math.atan(e[1])),
|
|
877
886
|
skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
|
|
878
887
|
};
|
|
879
|
-
function
|
|
888
|
+
function tt(e) {
|
|
880
889
|
return e.includes("scale") ? 1 : 0;
|
|
881
890
|
}
|
|
882
|
-
function
|
|
891
|
+
function nt(e, t) {
|
|
883
892
|
if (!e || e === "none")
|
|
884
|
-
return
|
|
893
|
+
return tt(t);
|
|
885
894
|
const n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
886
895
|
let s, i;
|
|
887
896
|
if (n)
|
|
888
|
-
s =
|
|
897
|
+
s = br, i = n;
|
|
889
898
|
else {
|
|
890
899
|
const a = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
891
|
-
s =
|
|
900
|
+
s = yr, i = a;
|
|
892
901
|
}
|
|
893
902
|
if (!i)
|
|
894
|
-
return
|
|
895
|
-
const r = s[t], o = i[1].split(",").map(
|
|
903
|
+
return tt(t);
|
|
904
|
+
const r = s[t], o = i[1].split(",").map(Tr);
|
|
896
905
|
return typeof r == "function" ? r(o) : o[r];
|
|
897
906
|
}
|
|
898
|
-
const
|
|
907
|
+
const wr = (e, t) => {
|
|
899
908
|
const { transform: n = "none" } = getComputedStyle(e);
|
|
900
|
-
return
|
|
909
|
+
return nt(n, t);
|
|
901
910
|
};
|
|
902
|
-
function
|
|
911
|
+
function Tr(e) {
|
|
903
912
|
return parseFloat(e.trim());
|
|
904
913
|
}
|
|
905
914
|
const ae = [
|
|
@@ -920,15 +929,15 @@ const ae = [
|
|
|
920
929
|
"skew",
|
|
921
930
|
"skewX",
|
|
922
931
|
"skewY"
|
|
923
|
-
], ue = new Set(ae),
|
|
924
|
-
function
|
|
932
|
+
], ue = new Set(ae), Zt = (e) => e === oe || e === m, vr = /* @__PURE__ */ new Set(["x", "y", "z"]), Sr = ae.filter((e) => !vr.has(e));
|
|
933
|
+
function Vr(e) {
|
|
925
934
|
const t = [];
|
|
926
|
-
return
|
|
935
|
+
return Sr.forEach((n) => {
|
|
927
936
|
const s = e.getValue(n);
|
|
928
937
|
s !== void 0 && (t.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
929
938
|
}), t;
|
|
930
939
|
}
|
|
931
|
-
const
|
|
940
|
+
const _ = {
|
|
932
941
|
// Dimensions
|
|
933
942
|
width: ({ x: e }, { paddingLeft: t = "0", paddingRight: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
|
|
934
943
|
height: ({ y: e }, { paddingTop: t = "0", paddingBottom: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
|
|
@@ -937,18 +946,18 @@ const H = {
|
|
|
937
946
|
bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
|
|
938
947
|
right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
|
|
939
948
|
// Transform
|
|
940
|
-
x: (e, { transform: t }) =>
|
|
941
|
-
y: (e, { transform: t }) =>
|
|
949
|
+
x: (e, { transform: t }) => nt(t, "x"),
|
|
950
|
+
y: (e, { transform: t }) => nt(t, "y")
|
|
942
951
|
};
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
const
|
|
946
|
-
let
|
|
947
|
-
function
|
|
948
|
-
if (
|
|
949
|
-
const e = Array.from(
|
|
952
|
+
_.translateX = _.x;
|
|
953
|
+
_.translateY = _.y;
|
|
954
|
+
const q = /* @__PURE__ */ new Set();
|
|
955
|
+
let st = !1, it = !1, rt = !1;
|
|
956
|
+
function ts() {
|
|
957
|
+
if (it) {
|
|
958
|
+
const e = Array.from(q).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
950
959
|
t.forEach((s) => {
|
|
951
|
-
const i =
|
|
960
|
+
const i = Vr(s);
|
|
952
961
|
i.length && (n.set(s, i), s.render());
|
|
953
962
|
}), e.forEach((s) => s.measureInitialState()), t.forEach((s) => {
|
|
954
963
|
s.render();
|
|
@@ -961,22 +970,22 @@ function Yn() {
|
|
|
961
970
|
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
962
971
|
});
|
|
963
972
|
}
|
|
964
|
-
|
|
973
|
+
it = !1, st = !1, q.forEach((e) => e.complete(rt)), q.clear();
|
|
965
974
|
}
|
|
966
|
-
function
|
|
967
|
-
|
|
968
|
-
e.readKeyframes(), e.needsMeasurement && (
|
|
975
|
+
function ns() {
|
|
976
|
+
q.forEach((e) => {
|
|
977
|
+
e.readKeyframes(), e.needsMeasurement && (it = !0);
|
|
969
978
|
});
|
|
970
979
|
}
|
|
971
|
-
function
|
|
972
|
-
|
|
980
|
+
function xr() {
|
|
981
|
+
rt = !0, ns(), ts(), rt = !1;
|
|
973
982
|
}
|
|
974
|
-
class
|
|
983
|
+
class At {
|
|
975
984
|
constructor(t, n, s, i, r, o = !1) {
|
|
976
985
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = o;
|
|
977
986
|
}
|
|
978
987
|
scheduleResolve() {
|
|
979
|
-
this.state = "scheduled", this.isAsync ? (
|
|
988
|
+
this.state = "scheduled", this.isAsync ? (q.add(this), st || (st = !0, N.read(ns), N.resolveKeyframes(ts))) : (this.readKeyframes(), this.complete());
|
|
980
989
|
}
|
|
981
990
|
readKeyframes() {
|
|
982
991
|
const { unresolvedKeyframes: t, name: n, element: s, motionValue: i } = this;
|
|
@@ -990,7 +999,7 @@ class xt {
|
|
|
990
999
|
}
|
|
991
1000
|
t[0] === void 0 && (t[0] = o), i && r === void 0 && i.set(t[0]);
|
|
992
1001
|
}
|
|
993
|
-
|
|
1002
|
+
gr(t);
|
|
994
1003
|
}
|
|
995
1004
|
setFinalKeyframe() {
|
|
996
1005
|
}
|
|
@@ -1001,86 +1010,86 @@ class xt {
|
|
|
1001
1010
|
measureEndState() {
|
|
1002
1011
|
}
|
|
1003
1012
|
complete(t = !1) {
|
|
1004
|
-
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t),
|
|
1013
|
+
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), q.delete(this);
|
|
1005
1014
|
}
|
|
1006
1015
|
cancel() {
|
|
1007
|
-
this.state === "scheduled" && (
|
|
1016
|
+
this.state === "scheduled" && (q.delete(this), this.state = "pending");
|
|
1008
1017
|
}
|
|
1009
1018
|
resume() {
|
|
1010
1019
|
this.state === "pending" && this.scheduleResolve();
|
|
1011
1020
|
}
|
|
1012
1021
|
}
|
|
1013
|
-
const
|
|
1014
|
-
function
|
|
1015
|
-
|
|
1022
|
+
const Ar = (e) => e.startsWith("--");
|
|
1023
|
+
function Mr(e, t, n) {
|
|
1024
|
+
Ar(t) ? e.style.setProperty(t, n) : e.style[t] = n;
|
|
1016
1025
|
}
|
|
1017
|
-
const
|
|
1018
|
-
function
|
|
1019
|
-
const n = /* @__PURE__ */
|
|
1020
|
-
return () =>
|
|
1026
|
+
const Cr = {};
|
|
1027
|
+
function ss(e, t) {
|
|
1028
|
+
const n = /* @__PURE__ */ Pn(e);
|
|
1029
|
+
return () => Cr[t] ?? n();
|
|
1021
1030
|
}
|
|
1022
|
-
const
|
|
1031
|
+
const Pr = /* @__PURE__ */ ss(() => window.ScrollTimeline !== void 0, "scrollTimeline"), is = /* @__PURE__ */ ss(() => {
|
|
1023
1032
|
try {
|
|
1024
1033
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
1025
1034
|
} catch {
|
|
1026
1035
|
return !1;
|
|
1027
1036
|
}
|
|
1028
1037
|
return !0;
|
|
1029
|
-
}, "linearEasing"),
|
|
1038
|
+
}, "linearEasing"), fe = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, Jt = {
|
|
1030
1039
|
linear: "linear",
|
|
1031
1040
|
ease: "ease",
|
|
1032
1041
|
easeIn: "ease-in",
|
|
1033
1042
|
easeOut: "ease-out",
|
|
1034
1043
|
easeInOut: "ease-in-out",
|
|
1035
|
-
circIn: /* @__PURE__ */
|
|
1036
|
-
circOut: /* @__PURE__ */
|
|
1037
|
-
backIn: /* @__PURE__ */
|
|
1038
|
-
backOut: /* @__PURE__ */
|
|
1044
|
+
circIn: /* @__PURE__ */ fe([0, 0.65, 0.55, 1]),
|
|
1045
|
+
circOut: /* @__PURE__ */ fe([0.55, 0, 1, 0.45]),
|
|
1046
|
+
backIn: /* @__PURE__ */ fe([0.31, 0.01, 0.66, -0.59]),
|
|
1047
|
+
backOut: /* @__PURE__ */ fe([0.33, 1.53, 0.69, 0.99])
|
|
1039
1048
|
};
|
|
1040
|
-
function
|
|
1049
|
+
function rs(e, t) {
|
|
1041
1050
|
if (e)
|
|
1042
|
-
return typeof e == "function" ?
|
|
1051
|
+
return typeof e == "function" ? is() ? Jn(e, t) : "ease-out" : Wn(e) ? fe(e) : Array.isArray(e) ? e.map((n) => rs(n, t) || Jt.easeOut) : Jt[e];
|
|
1043
1052
|
}
|
|
1044
|
-
function
|
|
1053
|
+
function Fr(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeOut", times: c } = {}, l = void 0) {
|
|
1045
1054
|
const u = {
|
|
1046
1055
|
[t]: n
|
|
1047
1056
|
};
|
|
1048
1057
|
c && (u.offset = c);
|
|
1049
|
-
const
|
|
1050
|
-
Array.isArray(
|
|
1051
|
-
const
|
|
1058
|
+
const d = rs(a, i);
|
|
1059
|
+
Array.isArray(d) && (u.easing = d);
|
|
1060
|
+
const f = {
|
|
1052
1061
|
delay: s,
|
|
1053
1062
|
duration: i,
|
|
1054
|
-
easing: Array.isArray(
|
|
1063
|
+
easing: Array.isArray(d) ? "linear" : d,
|
|
1055
1064
|
fill: "both",
|
|
1056
1065
|
iterations: r + 1,
|
|
1057
1066
|
direction: o === "reverse" ? "alternate" : "normal"
|
|
1058
1067
|
};
|
|
1059
|
-
return l && (
|
|
1068
|
+
return l && (f.pseudoElement = l), e.animate(u, f);
|
|
1060
1069
|
}
|
|
1061
|
-
function
|
|
1070
|
+
function os(e) {
|
|
1062
1071
|
return typeof e == "function" && "applyToOptions" in e;
|
|
1063
1072
|
}
|
|
1064
|
-
function
|
|
1065
|
-
return
|
|
1073
|
+
function Rr({ type: e, ...t }) {
|
|
1074
|
+
return os(e) && is() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
|
|
1066
1075
|
}
|
|
1067
|
-
class
|
|
1076
|
+
class as extends Vt {
|
|
1068
1077
|
constructor(t) {
|
|
1069
|
-
if (super(), this.finishedTime = null, this.isStopped = !1, !t)
|
|
1078
|
+
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !t)
|
|
1070
1079
|
return;
|
|
1071
1080
|
const { element: n, name: s, keyframes: i, pseudoElement: r, allowFlatten: o = !1, finalKeyframe: a, onComplete: c } = t;
|
|
1072
|
-
this.isPseudoElement = !!r, this.allowFlatten = o, this.options = t,
|
|
1073
|
-
const l =
|
|
1074
|
-
this.animation =
|
|
1081
|
+
this.isPseudoElement = !!r, this.allowFlatten = o, this.options = t, Z(typeof t.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
1082
|
+
const l = Rr(t);
|
|
1083
|
+
this.animation = Fr(n, s, i, l, r), l.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1075
1084
|
if (this.finishedTime = this.time, !r) {
|
|
1076
|
-
const u =
|
|
1077
|
-
this.updateMotionValue ? this.updateMotionValue(u) :
|
|
1085
|
+
const u = St(i, this.options, a, this.speed);
|
|
1086
|
+
this.updateMotionValue ? this.updateMotionValue(u) : Mr(n, s, u), this.animation.cancel();
|
|
1078
1087
|
}
|
|
1079
1088
|
c == null || c(), this.notifyFinished();
|
|
1080
1089
|
};
|
|
1081
1090
|
}
|
|
1082
1091
|
play() {
|
|
1083
|
-
this.isStopped || (this.animation.play(), this.state === "finished" && this.updateFinished());
|
|
1092
|
+
this.isStopped || (this.manualStartTime = null, this.animation.play(), this.state === "finished" && this.updateFinished());
|
|
1084
1093
|
}
|
|
1085
1094
|
pause() {
|
|
1086
1095
|
this.animation.pause();
|
|
@@ -1115,19 +1124,24 @@ class Vr extends Vt {
|
|
|
1115
1124
|
* while deferring the commit until the next animation frame.
|
|
1116
1125
|
*/
|
|
1117
1126
|
commitStyles() {
|
|
1118
|
-
var
|
|
1119
|
-
|
|
1127
|
+
var n, s, i;
|
|
1128
|
+
const t = (n = this.options) == null ? void 0 : n.element;
|
|
1129
|
+
!this.isPseudoElement && (t != null && t.isConnected) && ((i = (s = this.animation).commitStyles) == null || i.call(s));
|
|
1120
1130
|
}
|
|
1121
1131
|
get duration() {
|
|
1122
1132
|
var n, s;
|
|
1123
1133
|
const t = ((s = (n = this.animation.effect) == null ? void 0 : n.getComputedTiming) == null ? void 0 : s.call(n).duration) || 0;
|
|
1124
1134
|
return /* @__PURE__ */ B(Number(t));
|
|
1125
1135
|
}
|
|
1136
|
+
get iterationDuration() {
|
|
1137
|
+
const { delay: t = 0 } = this.options || {};
|
|
1138
|
+
return this.duration + /* @__PURE__ */ B(t);
|
|
1139
|
+
}
|
|
1126
1140
|
get time() {
|
|
1127
1141
|
return /* @__PURE__ */ B(Number(this.animation.currentTime) || 0);
|
|
1128
1142
|
}
|
|
1129
1143
|
set time(t) {
|
|
1130
|
-
this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */
|
|
1144
|
+
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ K(t);
|
|
1131
1145
|
}
|
|
1132
1146
|
/**
|
|
1133
1147
|
* The playback speed of the animation.
|
|
@@ -1143,39 +1157,39 @@ class Vr extends Vt {
|
|
|
1143
1157
|
return this.finishedTime !== null ? "finished" : this.animation.playState;
|
|
1144
1158
|
}
|
|
1145
1159
|
get startTime() {
|
|
1146
|
-
return Number(this.animation.startTime);
|
|
1160
|
+
return this.manualStartTime ?? Number(this.animation.startTime);
|
|
1147
1161
|
}
|
|
1148
1162
|
set startTime(t) {
|
|
1149
|
-
this.animation.startTime = t;
|
|
1163
|
+
this.manualStartTime = this.animation.startTime = t;
|
|
1150
1164
|
}
|
|
1151
1165
|
/**
|
|
1152
1166
|
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
1153
1167
|
*/
|
|
1154
1168
|
attachTimeline({ timeline: t, observe: n }) {
|
|
1155
1169
|
var s;
|
|
1156
|
-
return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t &&
|
|
1170
|
+
return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && Pr() ? (this.animation.timeline = t, re) : n(this);
|
|
1157
1171
|
}
|
|
1158
1172
|
}
|
|
1159
|
-
const
|
|
1160
|
-
anticipate:
|
|
1161
|
-
backInOut:
|
|
1162
|
-
circInOut:
|
|
1173
|
+
const us = {
|
|
1174
|
+
anticipate: Nn,
|
|
1175
|
+
backInOut: Ln,
|
|
1176
|
+
circInOut: Kn
|
|
1163
1177
|
};
|
|
1164
|
-
function
|
|
1165
|
-
return e in
|
|
1178
|
+
function Dr(e) {
|
|
1179
|
+
return e in us;
|
|
1166
1180
|
}
|
|
1167
|
-
function
|
|
1168
|
-
typeof e.ease == "string" &&
|
|
1181
|
+
function kr(e) {
|
|
1182
|
+
typeof e.ease == "string" && Dr(e.ease) && (e.ease = us[e.ease]);
|
|
1169
1183
|
}
|
|
1170
|
-
const
|
|
1171
|
-
class
|
|
1184
|
+
const _e = 10;
|
|
1185
|
+
class Ir extends as {
|
|
1172
1186
|
constructor(t) {
|
|
1173
|
-
|
|
1187
|
+
kr(t), es(t), super(t), t.startTime !== void 0 && (this.startTime = t.startTime), this.options = t;
|
|
1174
1188
|
}
|
|
1175
1189
|
/**
|
|
1176
1190
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
1177
1191
|
*
|
|
1178
|
-
* Rather than read
|
|
1192
|
+
* Rather than read committed styles back out of the DOM, we can
|
|
1179
1193
|
* create a renderless JS animation and sample it twice to calculate
|
|
1180
1194
|
* its current value, "previous" value, and therefore allow
|
|
1181
1195
|
* Motion to calculate velocity for any subsequent animation.
|
|
@@ -1188,17 +1202,17 @@ class Ar extends Vr {
|
|
|
1188
1202
|
n.set(t);
|
|
1189
1203
|
return;
|
|
1190
1204
|
}
|
|
1191
|
-
const a = new
|
|
1205
|
+
const a = new xt({
|
|
1192
1206
|
...o,
|
|
1193
1207
|
autoplay: !1
|
|
1194
|
-
}), c =
|
|
1195
|
-
n.setWithVelocity(a.sample(c -
|
|
1208
|
+
}), c = Math.max(_e, k.now() - this.startTime), l = G(0, _e, c - _e);
|
|
1209
|
+
n.setWithVelocity(a.sample(Math.max(0, c - l)).value, a.sample(c).value, l), a.stop();
|
|
1196
1210
|
}
|
|
1197
1211
|
}
|
|
1198
|
-
const
|
|
1199
|
-
(
|
|
1212
|
+
const Qt = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
1213
|
+
(L.test(e) || e === "0") && // And it contains numbers and/or colors
|
|
1200
1214
|
!e.startsWith("url("));
|
|
1201
|
-
function
|
|
1215
|
+
function Or(e) {
|
|
1202
1216
|
const t = e[0];
|
|
1203
1217
|
if (e.length === 1)
|
|
1204
1218
|
return !0;
|
|
@@ -1206,47 +1220,47 @@ function Mr(e) {
|
|
|
1206
1220
|
if (e[n] !== t)
|
|
1207
1221
|
return !0;
|
|
1208
1222
|
}
|
|
1209
|
-
function
|
|
1223
|
+
function Er(e, t, n, s) {
|
|
1210
1224
|
const i = e[0];
|
|
1211
1225
|
if (i === null)
|
|
1212
1226
|
return !1;
|
|
1213
1227
|
if (t === "display" || t === "visibility")
|
|
1214
1228
|
return !0;
|
|
1215
|
-
const r = e[e.length - 1], o =
|
|
1216
|
-
return ge(o === a, `You are trying to animate ${t} from "${i}" to "${r}". "${o ? r : i}" is not an animatable value.`, "value-not-animatable"), !o || !a ? !1 :
|
|
1229
|
+
const r = e[e.length - 1], o = Qt(i, t), a = Qt(r, t);
|
|
1230
|
+
return ge(o === a, `You are trying to animate ${t} from "${i}" to "${r}". "${o ? r : i}" is not an animatable value.`, "value-not-animatable"), !o || !a ? !1 : Or(e) || (n === "spring" || os(n)) && s;
|
|
1217
1231
|
}
|
|
1218
|
-
function
|
|
1219
|
-
e.duration = 0, e.type;
|
|
1232
|
+
function ot(e) {
|
|
1233
|
+
e.duration = 0, e.type = "keyframes";
|
|
1220
1234
|
}
|
|
1221
|
-
const
|
|
1235
|
+
const Br = /* @__PURE__ */ new Set([
|
|
1222
1236
|
"opacity",
|
|
1223
1237
|
"clipPath",
|
|
1224
1238
|
"filter",
|
|
1225
1239
|
"transform"
|
|
1226
1240
|
// TODO: Could be re-enabled now we have support for linear() easing
|
|
1227
1241
|
// "background-color"
|
|
1228
|
-
]),
|
|
1229
|
-
function
|
|
1242
|
+
]), Lr = /* @__PURE__ */ Pn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
1243
|
+
function Nr(e) {
|
|
1230
1244
|
var u;
|
|
1231
1245
|
const { motionValue: t, name: n, repeatDelay: s, repeatType: i, damping: r, type: o } = e;
|
|
1232
1246
|
if (!(((u = t == null ? void 0 : t.owner) == null ? void 0 : u.current) instanceof HTMLElement))
|
|
1233
1247
|
return !1;
|
|
1234
1248
|
const { onUpdate: c, transformTemplate: l } = t.owner.getProps();
|
|
1235
|
-
return
|
|
1249
|
+
return Lr() && n && Br.has(n) && (n !== "transform" || !l) && /**
|
|
1236
1250
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
1237
1251
|
* no way to read the value from WAAPI every frame.
|
|
1238
1252
|
*/
|
|
1239
1253
|
!c && !s && i !== "mirror" && r !== 0 && o !== "inertia";
|
|
1240
1254
|
}
|
|
1241
|
-
const
|
|
1242
|
-
class
|
|
1243
|
-
constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", keyframes: a, name: c, motionValue: l, element: u, ...
|
|
1244
|
-
var
|
|
1255
|
+
const Kr = 40;
|
|
1256
|
+
class $r extends Vt {
|
|
1257
|
+
constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", keyframes: a, name: c, motionValue: l, element: u, ...d }) {
|
|
1258
|
+
var p;
|
|
1245
1259
|
super(), this.stop = () => {
|
|
1246
|
-
var b,
|
|
1247
|
-
this._animation && (this._animation.stop(), (b = this.stopTimeline) == null || b.call(this)), (
|
|
1260
|
+
var b, y;
|
|
1261
|
+
this._animation && (this._animation.stop(), (b = this.stopTimeline) == null || b.call(this)), (y = this.keyframeResolver) == null || y.cancel();
|
|
1248
1262
|
}, this.createdAt = k.now();
|
|
1249
|
-
const
|
|
1263
|
+
const f = {
|
|
1250
1264
|
autoplay: t,
|
|
1251
1265
|
delay: n,
|
|
1252
1266
|
type: s,
|
|
@@ -1256,24 +1270,27 @@ class Or extends Vt {
|
|
|
1256
1270
|
name: c,
|
|
1257
1271
|
motionValue: l,
|
|
1258
1272
|
element: u,
|
|
1259
|
-
...
|
|
1260
|
-
}, h = (u == null ? void 0 : u.KeyframeResolver) ||
|
|
1261
|
-
this.keyframeResolver = new h(a, (b,
|
|
1273
|
+
...d
|
|
1274
|
+
}, h = (u == null ? void 0 : u.KeyframeResolver) || At;
|
|
1275
|
+
this.keyframeResolver = new h(a, (b, y, g) => this.onKeyframesResolved(b, y, f, !g), c, l, u), (p = this.keyframeResolver) == null || p.scheduleResolve();
|
|
1262
1276
|
}
|
|
1263
1277
|
onKeyframesResolved(t, n, s, i) {
|
|
1278
|
+
var y, g;
|
|
1264
1279
|
this.keyframeResolver = void 0;
|
|
1265
1280
|
const { name: r, type: o, velocity: a, delay: c, isHandoff: l, onUpdate: u } = s;
|
|
1266
|
-
this.resolvedAt = k.now(),
|
|
1267
|
-
const
|
|
1268
|
-
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt >
|
|
1281
|
+
this.resolvedAt = k.now(), Er(t, r, o, a) || (($.instantAnimations || !c) && (u == null || u(St(t, s, n))), t[0] = t[t.length - 1], ot(s), s.repeat = 0);
|
|
1282
|
+
const f = {
|
|
1283
|
+
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Kr ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1269
1284
|
finalKeyframe: n,
|
|
1270
1285
|
...s,
|
|
1271
1286
|
keyframes: t
|
|
1272
|
-
}, h = !l &&
|
|
1273
|
-
...
|
|
1274
|
-
element:
|
|
1275
|
-
}) : new
|
|
1276
|
-
|
|
1287
|
+
}, h = !l && Nr(f), p = (g = (y = f.motionValue) == null ? void 0 : y.owner) == null ? void 0 : g.current, b = h ? new Ir({
|
|
1288
|
+
...f,
|
|
1289
|
+
element: p
|
|
1290
|
+
}) : new xt(f);
|
|
1291
|
+
b.finished.then(() => {
|
|
1292
|
+
this.notifyFinished();
|
|
1293
|
+
}).catch(re), this.pendingTimeline && (this.stopTimeline = b.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = b;
|
|
1277
1294
|
}
|
|
1278
1295
|
get finished() {
|
|
1279
1296
|
return this._animation ? this.animation.finished : this._finished;
|
|
@@ -1284,11 +1301,14 @@ class Or extends Vt {
|
|
|
1284
1301
|
}
|
|
1285
1302
|
get animation() {
|
|
1286
1303
|
var t;
|
|
1287
|
-
return this._animation || ((t = this.keyframeResolver) == null || t.resume(),
|
|
1304
|
+
return this._animation || ((t = this.keyframeResolver) == null || t.resume(), xr()), this._animation;
|
|
1288
1305
|
}
|
|
1289
1306
|
get duration() {
|
|
1290
1307
|
return this.animation.duration;
|
|
1291
1308
|
}
|
|
1309
|
+
get iterationDuration() {
|
|
1310
|
+
return this.animation.iterationDuration;
|
|
1311
|
+
}
|
|
1292
1312
|
get time() {
|
|
1293
1313
|
return this.animation.time;
|
|
1294
1314
|
}
|
|
@@ -1324,238 +1344,134 @@ class Or extends Vt {
|
|
|
1324
1344
|
this._animation && this.animation.cancel(), (t = this.keyframeResolver) == null || t.cancel();
|
|
1325
1345
|
}
|
|
1326
1346
|
}
|
|
1327
|
-
|
|
1347
|
+
function cs(e, t, n, s = 0, i = 1) {
|
|
1348
|
+
const r = Array.from(e).sort((l, u) => l.sortNodePosition(u)).indexOf(t), o = e.size, a = (o - 1) * s;
|
|
1349
|
+
return typeof n == "function" ? n(r, o) : i === 1 ? r * s : a - r * s;
|
|
1350
|
+
}
|
|
1351
|
+
const Wr = (
|
|
1328
1352
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
1329
1353
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
1330
1354
|
);
|
|
1331
|
-
function
|
|
1332
|
-
const t =
|
|
1355
|
+
function jr(e) {
|
|
1356
|
+
const t = Wr.exec(e);
|
|
1333
1357
|
if (!t)
|
|
1334
1358
|
return [,];
|
|
1335
1359
|
const [, n, s, i] = t;
|
|
1336
1360
|
return [`--${n ?? s}`, i];
|
|
1337
1361
|
}
|
|
1338
|
-
const
|
|
1339
|
-
function
|
|
1340
|
-
|
|
1341
|
-
const [s, i] =
|
|
1362
|
+
const _r = 4;
|
|
1363
|
+
function ls(e, t, n = 1) {
|
|
1364
|
+
Z(n <= _r, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
1365
|
+
const [s, i] = jr(e);
|
|
1342
1366
|
if (!s)
|
|
1343
1367
|
return;
|
|
1344
1368
|
const r = window.getComputedStyle(t).getPropertyValue(s);
|
|
1345
1369
|
if (r) {
|
|
1346
1370
|
const o = r.trim();
|
|
1347
|
-
return
|
|
1371
|
+
return Mn(o) ? parseFloat(o) : o;
|
|
1348
1372
|
}
|
|
1349
|
-
return
|
|
1373
|
+
return yt(i) ? ls(i, t, n + 1) : i;
|
|
1350
1374
|
}
|
|
1351
|
-
|
|
1352
|
-
|
|
1375
|
+
const Gr = {
|
|
1376
|
+
type: "spring",
|
|
1377
|
+
stiffness: 500,
|
|
1378
|
+
damping: 25,
|
|
1379
|
+
restSpeed: 10
|
|
1380
|
+
}, Hr = (e) => ({
|
|
1381
|
+
type: "spring",
|
|
1382
|
+
stiffness: 550,
|
|
1383
|
+
damping: e === 0 ? 2 * Math.sqrt(550) : 30,
|
|
1384
|
+
restSpeed: 10
|
|
1385
|
+
}), zr = {
|
|
1386
|
+
type: "keyframes",
|
|
1387
|
+
duration: 0.8
|
|
1388
|
+
}, Ur = {
|
|
1389
|
+
type: "keyframes",
|
|
1390
|
+
ease: [0.25, 0.1, 0.35, 1],
|
|
1391
|
+
duration: 0.3
|
|
1392
|
+
}, Yr = (e, { keyframes: t }) => t.length > 2 ? zr : ue.has(e) ? e.startsWith("scale") ? Hr(t[1]) : Gr : Ur, Xr = (e) => e !== null;
|
|
1393
|
+
function qr(e, { repeat: t, repeatType: n = "loop" }, s) {
|
|
1394
|
+
const i = e.filter(Xr), r = t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
|
|
1395
|
+
return i[r];
|
|
1353
1396
|
}
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
"bottom",
|
|
1361
|
-
...ae
|
|
1362
|
-
]), Lr = {
|
|
1363
|
-
test: (e) => e === "auto",
|
|
1364
|
-
parse: (e) => e
|
|
1365
|
-
}, ss = (e) => (t) => t.test(e), is = [re, m, ee, $, Mi, Ai, Lr], Qt = (e) => is.find(ss(e));
|
|
1366
|
-
function Nr(e) {
|
|
1367
|
-
return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || wn(e) : !0;
|
|
1397
|
+
function fs(e, t) {
|
|
1398
|
+
if (e != null && e.inherit && t) {
|
|
1399
|
+
const { inherit: n, ...s } = e;
|
|
1400
|
+
return { ...t, ...s };
|
|
1401
|
+
}
|
|
1402
|
+
return e;
|
|
1368
1403
|
}
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
if (t === "drop-shadow")
|
|
1373
|
-
return e;
|
|
1374
|
-
const [s] = n.match(yt) || [];
|
|
1375
|
-
if (!s)
|
|
1376
|
-
return e;
|
|
1377
|
-
const i = n.replace(s, "");
|
|
1378
|
-
let r = Br.has(t) ? 1 : 0;
|
|
1379
|
-
return s !== n && (r *= 100), t + "(" + r + i + ")";
|
|
1404
|
+
function ds(e, t) {
|
|
1405
|
+
const n = (e == null ? void 0 : e[t]) ?? (e == null ? void 0 : e.default) ?? e;
|
|
1406
|
+
return n !== e ? fs(n, e) : n;
|
|
1380
1407
|
}
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
getAnimatableNone: (e) => {
|
|
1384
|
-
const t = e.match($r);
|
|
1385
|
-
return t ? t.map(Kr).join(" ") : e;
|
|
1386
|
-
}
|
|
1387
|
-
}, en = {
|
|
1388
|
-
...re,
|
|
1389
|
-
transform: Math.round
|
|
1390
|
-
}, Wr = {
|
|
1391
|
-
rotate: $,
|
|
1392
|
-
rotateX: $,
|
|
1393
|
-
rotateY: $,
|
|
1394
|
-
rotateZ: $,
|
|
1395
|
-
scale: Ve,
|
|
1396
|
-
scaleX: Ve,
|
|
1397
|
-
scaleY: Ve,
|
|
1398
|
-
scaleZ: Ve,
|
|
1399
|
-
skew: $,
|
|
1400
|
-
skewX: $,
|
|
1401
|
-
skewY: $,
|
|
1402
|
-
distance: m,
|
|
1403
|
-
translateX: m,
|
|
1404
|
-
translateY: m,
|
|
1405
|
-
translateZ: m,
|
|
1406
|
-
x: m,
|
|
1407
|
-
y: m,
|
|
1408
|
-
z: m,
|
|
1409
|
-
perspective: m,
|
|
1410
|
-
transformPerspective: m,
|
|
1411
|
-
opacity: he,
|
|
1412
|
-
originX: Wt,
|
|
1413
|
-
originY: Wt,
|
|
1414
|
-
originZ: m
|
|
1415
|
-
}, At = {
|
|
1416
|
-
// Border props
|
|
1417
|
-
borderWidth: m,
|
|
1418
|
-
borderTopWidth: m,
|
|
1419
|
-
borderRightWidth: m,
|
|
1420
|
-
borderBottomWidth: m,
|
|
1421
|
-
borderLeftWidth: m,
|
|
1422
|
-
borderRadius: m,
|
|
1423
|
-
radius: m,
|
|
1424
|
-
borderTopLeftRadius: m,
|
|
1425
|
-
borderTopRightRadius: m,
|
|
1426
|
-
borderBottomRightRadius: m,
|
|
1427
|
-
borderBottomLeftRadius: m,
|
|
1428
|
-
// Positioning props
|
|
1429
|
-
width: m,
|
|
1430
|
-
maxWidth: m,
|
|
1431
|
-
height: m,
|
|
1432
|
-
maxHeight: m,
|
|
1433
|
-
top: m,
|
|
1434
|
-
right: m,
|
|
1435
|
-
bottom: m,
|
|
1436
|
-
left: m,
|
|
1437
|
-
// Spacing props
|
|
1438
|
-
padding: m,
|
|
1439
|
-
paddingTop: m,
|
|
1440
|
-
paddingRight: m,
|
|
1441
|
-
paddingBottom: m,
|
|
1442
|
-
paddingLeft: m,
|
|
1443
|
-
margin: m,
|
|
1444
|
-
marginTop: m,
|
|
1445
|
-
marginRight: m,
|
|
1446
|
-
marginBottom: m,
|
|
1447
|
-
marginLeft: m,
|
|
1448
|
-
// Misc
|
|
1449
|
-
backgroundPositionX: m,
|
|
1450
|
-
backgroundPositionY: m,
|
|
1451
|
-
...Wr,
|
|
1452
|
-
zIndex: en,
|
|
1453
|
-
// SVG
|
|
1454
|
-
fillOpacity: he,
|
|
1455
|
-
strokeOpacity: he,
|
|
1456
|
-
numOctaves: en
|
|
1457
|
-
}, jr = {
|
|
1458
|
-
...At,
|
|
1459
|
-
// Color props
|
|
1460
|
-
color: M,
|
|
1461
|
-
backgroundColor: M,
|
|
1462
|
-
outlineColor: M,
|
|
1463
|
-
fill: M,
|
|
1464
|
-
stroke: M,
|
|
1465
|
-
// Border props
|
|
1466
|
-
borderColor: M,
|
|
1467
|
-
borderTopColor: M,
|
|
1468
|
-
borderRightColor: M,
|
|
1469
|
-
borderBottomColor: M,
|
|
1470
|
-
borderLeftColor: M,
|
|
1471
|
-
filter: rt,
|
|
1472
|
-
WebkitFilter: rt
|
|
1473
|
-
}, rs = (e) => jr[e];
|
|
1474
|
-
function os(e, t) {
|
|
1475
|
-
let n = rs(e);
|
|
1476
|
-
return n !== rt && (n = oe), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
|
|
1477
|
-
}
|
|
1478
|
-
const _r = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
1479
|
-
function Gr(e, t, n) {
|
|
1480
|
-
let s = 0, i;
|
|
1481
|
-
for (; s < e.length && !i; ) {
|
|
1482
|
-
const r = e[s];
|
|
1483
|
-
typeof r == "string" && !_r.has(r) && pe(r).values.length && (i = e[s]), s++;
|
|
1484
|
-
}
|
|
1485
|
-
if (i && n)
|
|
1486
|
-
for (const r of t)
|
|
1487
|
-
e[r] = os(n, i);
|
|
1408
|
+
function Zr({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: c, elapsed: l, ...u }) {
|
|
1409
|
+
return !!Object.keys(u).length;
|
|
1488
1410
|
}
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1411
|
+
const Jr = (e, t, n, s = {}, i, r) => (o) => {
|
|
1412
|
+
const a = ds(s, e) || {}, c = a.delay || s.delay || 0;
|
|
1413
|
+
let { elapsed: l = 0 } = s;
|
|
1414
|
+
l = l - /* @__PURE__ */ K(c);
|
|
1415
|
+
const u = {
|
|
1416
|
+
keyframes: Array.isArray(n) ? n : [null, n],
|
|
1417
|
+
ease: "easeOut",
|
|
1418
|
+
velocity: t.getVelocity(),
|
|
1419
|
+
...a,
|
|
1420
|
+
delay: -l,
|
|
1421
|
+
onUpdate: (f) => {
|
|
1422
|
+
t.set(f), a.onUpdate && a.onUpdate(f);
|
|
1423
|
+
},
|
|
1424
|
+
onComplete: () => {
|
|
1425
|
+
o(), a.onComplete && a.onComplete();
|
|
1426
|
+
},
|
|
1427
|
+
name: e,
|
|
1428
|
+
motionValue: t,
|
|
1429
|
+
element: r ? void 0 : i
|
|
1430
|
+
};
|
|
1431
|
+
Zr(a) || Object.assign(u, Yr(e, u)), u.duration && (u.duration = /* @__PURE__ */ K(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ K(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
1432
|
+
let d = !1;
|
|
1433
|
+
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (ot(u), u.delay === 0 && (d = !0)), ($.instantAnimations || $.skipAnimations || i != null && i.shouldSkipAnimations) && (d = !0, ot(u), u.delay = 0), u.allowFlatten = !a.type && !a.ease, d && !r && t.get() !== void 0) {
|
|
1434
|
+
const f = qr(u.keyframes, a);
|
|
1435
|
+
if (f !== void 0) {
|
|
1436
|
+
N.update(() => {
|
|
1437
|
+
u.onUpdate(f), u.onComplete();
|
|
1438
|
+
});
|
|
1496
1439
|
return;
|
|
1497
|
-
super.readKeyframes();
|
|
1498
|
-
for (let c = 0; c < t.length; c++) {
|
|
1499
|
-
let l = t[c];
|
|
1500
|
-
if (typeof l == "string" && (l = l.trim(), gt(l))) {
|
|
1501
|
-
const u = es(l, n.current);
|
|
1502
|
-
u !== void 0 && (t[c] = u), c === t.length - 1 && (this.finalKeyframe = l);
|
|
1503
|
-
}
|
|
1504
1440
|
}
|
|
1505
|
-
if (this.resolveNoneKeyframes(), !ns.has(s) || t.length !== 2)
|
|
1506
|
-
return;
|
|
1507
|
-
const [i, r] = t, o = Qt(i), a = Qt(r);
|
|
1508
|
-
if (o !== a)
|
|
1509
|
-
if (Xt(o) && Xt(a))
|
|
1510
|
-
for (let c = 0; c < t.length; c++) {
|
|
1511
|
-
const l = t[c];
|
|
1512
|
-
typeof l == "string" && (t[c] = parseFloat(l));
|
|
1513
|
-
}
|
|
1514
|
-
else H[s] && (this.needsMeasurement = !0);
|
|
1515
|
-
}
|
|
1516
|
-
resolveNoneKeyframes() {
|
|
1517
|
-
const { unresolvedKeyframes: t, name: n } = this, s = [];
|
|
1518
|
-
for (let i = 0; i < t.length; i++)
|
|
1519
|
-
(t[i] === null || Nr(t[i])) && s.push(i);
|
|
1520
|
-
s.length && Gr(t, s, n);
|
|
1521
|
-
}
|
|
1522
|
-
measureInitialState() {
|
|
1523
|
-
const { element: t, unresolvedKeyframes: n, name: s } = this;
|
|
1524
|
-
if (!t || !t.current)
|
|
1525
|
-
return;
|
|
1526
|
-
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = H[s](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
|
|
1527
|
-
const i = n[n.length - 1];
|
|
1528
|
-
i !== void 0 && t.getValue(s, i).jump(i, !1);
|
|
1529
|
-
}
|
|
1530
|
-
measureEndState() {
|
|
1531
|
-
var a;
|
|
1532
|
-
const { element: t, name: n, unresolvedKeyframes: s } = this;
|
|
1533
|
-
if (!t || !t.current)
|
|
1534
|
-
return;
|
|
1535
|
-
const i = t.getValue(n);
|
|
1536
|
-
i && i.jump(this.measuredOrigin, !1);
|
|
1537
|
-
const r = s.length - 1, o = s[r];
|
|
1538
|
-
s[r] = H[n](t.measureViewportBox(), window.getComputedStyle(t.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), (a = this.removedTransforms) != null && a.length && this.removedTransforms.forEach(([c, l]) => {
|
|
1539
|
-
t.getValue(c).set(l);
|
|
1540
|
-
}), this.resolveNoneKeyframes();
|
|
1541
1441
|
}
|
|
1442
|
+
return a.isSync ? new xt(u) : new $r(u);
|
|
1443
|
+
};
|
|
1444
|
+
function en(e) {
|
|
1445
|
+
const t = [{}, {}];
|
|
1446
|
+
return e == null || e.values.forEach((n, s) => {
|
|
1447
|
+
t[0][s] = n.get(), t[1][s] = n.getVelocity();
|
|
1448
|
+
}), t;
|
|
1542
1449
|
}
|
|
1543
|
-
function
|
|
1544
|
-
if (
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
let s = document;
|
|
1548
|
-
const i = (n == null ? void 0 : n[e]) ?? s.querySelectorAll(e);
|
|
1549
|
-
return i ? Array.from(i) : [];
|
|
1450
|
+
function Mt(e, t, n, s) {
|
|
1451
|
+
if (typeof t == "function") {
|
|
1452
|
+
const [i, r] = en(s);
|
|
1453
|
+
t = t(n !== void 0 ? n : e.custom, i, r);
|
|
1550
1454
|
}
|
|
1551
|
-
|
|
1455
|
+
if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
|
|
1456
|
+
const [i, r] = en(s);
|
|
1457
|
+
t = t(n !== void 0 ? n : e.custom, i, r);
|
|
1458
|
+
}
|
|
1459
|
+
return t;
|
|
1552
1460
|
}
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
return
|
|
1461
|
+
function se(e, t, n) {
|
|
1462
|
+
const s = e.getProps();
|
|
1463
|
+
return Mt(s, t, n !== void 0 ? n : s.custom, e);
|
|
1556
1464
|
}
|
|
1557
|
-
const
|
|
1558
|
-
|
|
1465
|
+
const hs = /* @__PURE__ */ new Set([
|
|
1466
|
+
"width",
|
|
1467
|
+
"height",
|
|
1468
|
+
"top",
|
|
1469
|
+
"left",
|
|
1470
|
+
"right",
|
|
1471
|
+
"bottom",
|
|
1472
|
+
...ae
|
|
1473
|
+
]), tn = 30, Qr = (e) => !isNaN(parseFloat(e));
|
|
1474
|
+
class eo {
|
|
1559
1475
|
/**
|
|
1560
1476
|
* @param init - The initiating value
|
|
1561
1477
|
* @param config - Optional configuration options
|
|
@@ -1572,7 +1488,7 @@ class Xr {
|
|
|
1572
1488
|
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
|
|
1573
1489
|
}
|
|
1574
1490
|
setCurrent(t) {
|
|
1575
|
-
this.current = t, this.updatedAt = k.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity =
|
|
1491
|
+
this.current = t, this.updatedAt = k.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = Qr(this.current));
|
|
1576
1492
|
}
|
|
1577
1493
|
setPrevFrameValue(t = this.current) {
|
|
1578
1494
|
this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -1618,13 +1534,13 @@ class Xr {
|
|
|
1618
1534
|
* @deprecated
|
|
1619
1535
|
*/
|
|
1620
1536
|
onChange(t) {
|
|
1621
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1537
|
+
return process.env.NODE_ENV !== "production" && kn(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
|
|
1622
1538
|
}
|
|
1623
1539
|
on(t, n) {
|
|
1624
|
-
this.events[t] || (this.events[t] = new
|
|
1540
|
+
this.events[t] || (this.events[t] = new Rn());
|
|
1625
1541
|
const s = this.events[t].add(n);
|
|
1626
1542
|
return t === "change" ? () => {
|
|
1627
|
-
s(),
|
|
1543
|
+
s(), N.read(() => {
|
|
1628
1544
|
this.events.change.getSize() || this.stop();
|
|
1629
1545
|
});
|
|
1630
1546
|
} : s;
|
|
@@ -1705,7 +1621,7 @@ class Xr {
|
|
|
1705
1621
|
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > tn)
|
|
1706
1622
|
return 0;
|
|
1707
1623
|
const n = Math.min(this.updatedAt - this.prevUpdatedAt, tn);
|
|
1708
|
-
return
|
|
1624
|
+
return Dn(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
1709
1625
|
}
|
|
1710
1626
|
/**
|
|
1711
1627
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
@@ -1758,644 +1674,500 @@ class Xr {
|
|
|
1758
1674
|
}
|
|
1759
1675
|
}
|
|
1760
1676
|
function De(e, t) {
|
|
1761
|
-
return new
|
|
1677
|
+
return new eo(e, t);
|
|
1762
1678
|
}
|
|
1763
|
-
const
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
function Jr() {
|
|
1767
|
-
return Zr.y;
|
|
1679
|
+
const at = (e) => Array.isArray(e);
|
|
1680
|
+
function to(e, t, n) {
|
|
1681
|
+
e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, De(n));
|
|
1768
1682
|
}
|
|
1769
|
-
function
|
|
1770
|
-
|
|
1771
|
-
passive: !0,
|
|
1772
|
-
...t,
|
|
1773
|
-
signal: s.signal
|
|
1774
|
-
};
|
|
1775
|
-
return [n, i, () => s.abort()];
|
|
1683
|
+
function no(e) {
|
|
1684
|
+
return at(e) ? e[e.length - 1] || 0 : e;
|
|
1776
1685
|
}
|
|
1777
|
-
function
|
|
1778
|
-
|
|
1686
|
+
function so(e, t) {
|
|
1687
|
+
const n = se(e, t);
|
|
1688
|
+
let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
|
|
1689
|
+
r = { ...r, ...s };
|
|
1690
|
+
for (const o in r) {
|
|
1691
|
+
const a = no(r[o]);
|
|
1692
|
+
to(e, o, a);
|
|
1693
|
+
}
|
|
1779
1694
|
}
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
return;
|
|
1784
|
-
const { target: c } = a, l = t(c, a);
|
|
1785
|
-
if (typeof l != "function" || !c)
|
|
1786
|
-
return;
|
|
1787
|
-
const u = (f) => {
|
|
1788
|
-
nn(f) && (l(f), c.removeEventListener("pointerleave", u));
|
|
1789
|
-
};
|
|
1790
|
-
c.addEventListener("pointerleave", u, i);
|
|
1791
|
-
};
|
|
1792
|
-
return s.forEach((a) => {
|
|
1793
|
-
a.addEventListener("pointerenter", o, i);
|
|
1794
|
-
}), r;
|
|
1695
|
+
const R = (e) => !!(e && e.getVelocity);
|
|
1696
|
+
function io(e) {
|
|
1697
|
+
return !!(R(e) && e.add);
|
|
1795
1698
|
}
|
|
1796
|
-
|
|
1797
|
-
"
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
return to.has(e.tagName) || e.tabIndex !== -1;
|
|
1699
|
+
function ro(e, t) {
|
|
1700
|
+
const n = e.getValue("willChange");
|
|
1701
|
+
if (io(n))
|
|
1702
|
+
return n.add(t);
|
|
1703
|
+
if (!n && $.WillChange) {
|
|
1704
|
+
const s = new $.WillChange("auto");
|
|
1705
|
+
e.addValue("willChange", s), s.add(t);
|
|
1706
|
+
}
|
|
1805
1707
|
}
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
return (t) => {
|
|
1809
|
-
t.key === "Enter" && e(t);
|
|
1810
|
-
};
|
|
1708
|
+
function Ct(e) {
|
|
1709
|
+
return e.replace(/([A-Z])/g, (t) => `-${t.toLowerCase()}`);
|
|
1811
1710
|
}
|
|
1812
|
-
|
|
1813
|
-
|
|
1711
|
+
const oo = "framerAppearId", ps = "data-" + Ct(oo);
|
|
1712
|
+
function ao(e) {
|
|
1713
|
+
return e.props[ps];
|
|
1814
1714
|
}
|
|
1815
|
-
|
|
1816
|
-
const
|
|
1817
|
-
|
|
1818
|
-
return;
|
|
1819
|
-
const s = sn(() => {
|
|
1820
|
-
if (Ae.has(n))
|
|
1821
|
-
return;
|
|
1822
|
-
je(n, "down");
|
|
1823
|
-
const i = sn(() => {
|
|
1824
|
-
je(n, "up");
|
|
1825
|
-
}), r = () => je(n, "cancel");
|
|
1826
|
-
n.addEventListener("keyup", i, t), n.addEventListener("blur", r, t);
|
|
1827
|
-
});
|
|
1828
|
-
n.addEventListener("keydown", s, t), n.addEventListener("blur", () => n.removeEventListener("keydown", s), t);
|
|
1829
|
-
};
|
|
1830
|
-
function rn(e) {
|
|
1831
|
-
return eo(e) && !0;
|
|
1715
|
+
function uo({ protectedKeys: e, needsAnimating: t }, n) {
|
|
1716
|
+
const s = e.hasOwnProperty(n) && t[n] !== !0;
|
|
1717
|
+
return t[n] = !1, s;
|
|
1832
1718
|
}
|
|
1833
|
-
function
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
const
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
exit: ["exit"],
|
|
1868
|
-
drag: ["drag", "dragControls"],
|
|
1869
|
-
focus: ["whileFocus"],
|
|
1870
|
-
hover: ["whileHover", "onHoverStart", "onHoverEnd"],
|
|
1871
|
-
tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
|
|
1872
|
-
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
1873
|
-
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
1874
|
-
layout: ["layout", "layoutId"]
|
|
1875
|
-
}, ne = {};
|
|
1876
|
-
for (const e in on)
|
|
1877
|
-
ne[e] = {
|
|
1878
|
-
isEnabled: (t) => on[e].some((n) => !!t[n])
|
|
1879
|
-
};
|
|
1880
|
-
function an(e) {
|
|
1881
|
-
for (const t in e)
|
|
1882
|
-
ne[t] = {
|
|
1883
|
-
...ne[t],
|
|
1884
|
-
...e[t]
|
|
1885
|
-
};
|
|
1886
|
-
}
|
|
1887
|
-
function ao({ children: e, features: t, strict: n = !1 }) {
|
|
1888
|
-
const [, s] = qs(!_e(t)), i = fe(void 0);
|
|
1889
|
-
if (!_e(t)) {
|
|
1890
|
-
const { renderer: r, ...o } = t;
|
|
1891
|
-
i.current = r, an(o);
|
|
1892
|
-
}
|
|
1893
|
-
return ft(() => {
|
|
1894
|
-
_e(t) && t().then(({ renderer: r, ...o }) => {
|
|
1895
|
-
an(o), i.current = r, s(!0);
|
|
1719
|
+
function ms(e, t, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
1720
|
+
let { transition: r, transitionEnd: o, ...a } = t;
|
|
1721
|
+
const c = e.getDefaultTransition();
|
|
1722
|
+
r = r ? fs(r, c) : c;
|
|
1723
|
+
const l = r == null ? void 0 : r.reduceMotion;
|
|
1724
|
+
s && (r = s);
|
|
1725
|
+
const u = [], d = i && e.animationState && e.animationState.getState()[i];
|
|
1726
|
+
for (const f in a) {
|
|
1727
|
+
const h = e.getValue(f, e.latestValues[f] ?? null), p = a[f];
|
|
1728
|
+
if (p === void 0 || d && uo(d, f))
|
|
1729
|
+
continue;
|
|
1730
|
+
const b = {
|
|
1731
|
+
delay: n,
|
|
1732
|
+
...ds(r || {}, f)
|
|
1733
|
+
}, y = h.get();
|
|
1734
|
+
if (y !== void 0 && !h.isAnimating && !Array.isArray(p) && p === y && !b.velocity)
|
|
1735
|
+
continue;
|
|
1736
|
+
let g = !1;
|
|
1737
|
+
if (window.MotionHandoffAnimation) {
|
|
1738
|
+
const V = ao(e);
|
|
1739
|
+
if (V) {
|
|
1740
|
+
const T = window.MotionHandoffAnimation(V, f, N);
|
|
1741
|
+
T !== null && (b.startTime = T, g = !0);
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
ro(e, f);
|
|
1745
|
+
const v = l ?? e.shouldReduceMotion;
|
|
1746
|
+
h.start(Jr(f, h, p, v && hs.has(f) ? { type: !1 } : b, e, g));
|
|
1747
|
+
const w = h.animation;
|
|
1748
|
+
w && u.push(w);
|
|
1749
|
+
}
|
|
1750
|
+
if (o) {
|
|
1751
|
+
const f = () => N.update(() => {
|
|
1752
|
+
o && so(e, o);
|
|
1896
1753
|
});
|
|
1897
|
-
|
|
1898
|
-
}
|
|
1899
|
-
|
|
1900
|
-
return typeof e == "function";
|
|
1901
|
-
}
|
|
1902
|
-
const uo = /* @__PURE__ */ new Set([
|
|
1903
|
-
"animate",
|
|
1904
|
-
"exit",
|
|
1905
|
-
"variants",
|
|
1906
|
-
"initial",
|
|
1907
|
-
"style",
|
|
1908
|
-
"values",
|
|
1909
|
-
"variants",
|
|
1910
|
-
"transition",
|
|
1911
|
-
"transformTemplate",
|
|
1912
|
-
"custom",
|
|
1913
|
-
"inherit",
|
|
1914
|
-
"onBeforeLayoutMeasure",
|
|
1915
|
-
"onAnimationStart",
|
|
1916
|
-
"onAnimationComplete",
|
|
1917
|
-
"onUpdate",
|
|
1918
|
-
"onDragStart",
|
|
1919
|
-
"onDrag",
|
|
1920
|
-
"onDragEnd",
|
|
1921
|
-
"onMeasureDragConstraints",
|
|
1922
|
-
"onDirectionLock",
|
|
1923
|
-
"onDragTransitionEnd",
|
|
1924
|
-
"_dragX",
|
|
1925
|
-
"_dragY",
|
|
1926
|
-
"onHoverStart",
|
|
1927
|
-
"onHoverEnd",
|
|
1928
|
-
"onViewportEnter",
|
|
1929
|
-
"onViewportLeave",
|
|
1930
|
-
"globalTapTarget",
|
|
1931
|
-
"ignoreStrict",
|
|
1932
|
-
"viewport"
|
|
1933
|
-
]);
|
|
1934
|
-
function Re(e) {
|
|
1935
|
-
return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || uo.has(e);
|
|
1936
|
-
}
|
|
1937
|
-
let fs = (e) => !Re(e);
|
|
1938
|
-
function co(e) {
|
|
1939
|
-
typeof e == "function" && (fs = (t) => t.startsWith("on") ? !Re(t) : e(t));
|
|
1940
|
-
}
|
|
1941
|
-
try {
|
|
1942
|
-
co(require("@emotion/is-prop-valid").default);
|
|
1943
|
-
} catch {
|
|
1944
|
-
}
|
|
1945
|
-
function lo(e, t, n) {
|
|
1946
|
-
const s = {};
|
|
1947
|
-
for (const i in e)
|
|
1948
|
-
i === "values" && typeof e.values == "object" || (fs(i) || n === !0 && Re(i) || !t && !Re(i) || // If trying to use native HTML drag events, forward drag listeners
|
|
1949
|
-
e.draggable && i.startsWith("onDrag")) && (s[i] = e[i]);
|
|
1950
|
-
return s;
|
|
1951
|
-
}
|
|
1952
|
-
const Ee = /* @__PURE__ */ se({});
|
|
1953
|
-
function Le(e) {
|
|
1954
|
-
return e !== null && typeof e == "object" && typeof e.start == "function";
|
|
1955
|
-
}
|
|
1956
|
-
function me(e) {
|
|
1957
|
-
return typeof e == "string" || Array.isArray(e);
|
|
1754
|
+
u.length ? Promise.all(u).then(f) : f();
|
|
1755
|
+
}
|
|
1756
|
+
return u;
|
|
1958
1757
|
}
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
"
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1758
|
+
function ut(e, t, n = {}) {
|
|
1759
|
+
var c;
|
|
1760
|
+
const s = se(e, t, n.type === "exit" ? (c = e.presenceContext) == null ? void 0 : c.custom : void 0);
|
|
1761
|
+
let { transition: i = e.getDefaultTransition() || {} } = s || {};
|
|
1762
|
+
n.transitionOverride && (i = n.transitionOverride);
|
|
1763
|
+
const r = s ? () => Promise.all(ms(e, s, n)) : () => Promise.resolve(), o = e.variantChildren && e.variantChildren.size ? (l = 0) => {
|
|
1764
|
+
const { delayChildren: u = 0, staggerChildren: d, staggerDirection: f } = i;
|
|
1765
|
+
return co(e, t, l, u, d, f, n);
|
|
1766
|
+
} : () => Promise.resolve(), { when: a } = i;
|
|
1767
|
+
if (a) {
|
|
1768
|
+
const [l, u] = a === "beforeChildren" ? [r, o] : [o, r];
|
|
1769
|
+
return l().then(() => u());
|
|
1770
|
+
} else
|
|
1771
|
+
return Promise.all([r(), o(n.delay)]);
|
|
1970
1772
|
}
|
|
1971
|
-
function
|
|
1972
|
-
|
|
1773
|
+
function co(e, t, n = 0, s = 0, i = 0, r = 1, o) {
|
|
1774
|
+
const a = [];
|
|
1775
|
+
for (const c of e.variantChildren)
|
|
1776
|
+
c.notify("AnimationStart", t), a.push(ut(c, t, {
|
|
1777
|
+
...o,
|
|
1778
|
+
delay: n + (typeof s == "function" ? 0 : s) + cs(e.variantChildren, c, s, i, r)
|
|
1779
|
+
}).then(() => c.notify("AnimationComplete", t)));
|
|
1780
|
+
return Promise.all(a);
|
|
1973
1781
|
}
|
|
1974
|
-
function
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1782
|
+
function lo(e, t, n = {}) {
|
|
1783
|
+
e.notify("AnimationStart", t);
|
|
1784
|
+
let s;
|
|
1785
|
+
if (Array.isArray(t)) {
|
|
1786
|
+
const i = t.map((r) => ut(e, r, n));
|
|
1787
|
+
s = Promise.all(i);
|
|
1788
|
+
} else if (typeof t == "string")
|
|
1789
|
+
s = ut(e, t, n);
|
|
1790
|
+
else {
|
|
1791
|
+
const i = typeof t == "function" ? se(e, t, n.custom) : t;
|
|
1792
|
+
s = Promise.all(ms(e, i, n));
|
|
1981
1793
|
}
|
|
1982
|
-
return
|
|
1794
|
+
return s.then(() => {
|
|
1795
|
+
e.notify("AnimationComplete", t);
|
|
1796
|
+
});
|
|
1983
1797
|
}
|
|
1798
|
+
const fo = {
|
|
1799
|
+
test: (e) => e === "auto",
|
|
1800
|
+
parse: (e) => e
|
|
1801
|
+
}, gs = (e) => (t) => t.test(e), ys = [oe, m, ne, W, Bi, Ei, fo], nn = (e) => ys.find(gs(e));
|
|
1984
1802
|
function ho(e) {
|
|
1985
|
-
|
|
1986
|
-
return Oe(() => ({ initial: t, animate: n }), [un(t), un(n)]);
|
|
1803
|
+
return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || Cn(e) : !0;
|
|
1987
1804
|
}
|
|
1988
|
-
|
|
1989
|
-
|
|
1805
|
+
const po = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
1806
|
+
function mo(e) {
|
|
1807
|
+
const [t, n] = e.slice(0, -1).split("(");
|
|
1808
|
+
if (t === "drop-shadow")
|
|
1809
|
+
return e;
|
|
1810
|
+
const [s] = n.match(bt) || [];
|
|
1811
|
+
if (!s)
|
|
1812
|
+
return e;
|
|
1813
|
+
const i = n.replace(s, "");
|
|
1814
|
+
let r = po.has(t) ? 1 : 0;
|
|
1815
|
+
return s !== n && (r *= 100), t + "(" + r + i + ")";
|
|
1990
1816
|
}
|
|
1991
|
-
const
|
|
1992
|
-
|
|
1993
|
-
|
|
1817
|
+
const go = /\b([a-z-]*)\(.*?\)/gu, ct = {
|
|
1818
|
+
...L,
|
|
1819
|
+
getAnimatableNone: (e) => {
|
|
1820
|
+
const t = e.match(go);
|
|
1821
|
+
return t ? t.map(mo).join(" ") : e;
|
|
1822
|
+
}
|
|
1823
|
+
}, lt = {
|
|
1824
|
+
...L,
|
|
1825
|
+
getAnimatableNone: (e) => {
|
|
1826
|
+
const t = L.parse(e);
|
|
1827
|
+
return L.createTransformer(e)(t.map((s) => typeof s == "number" ? 0 : typeof s == "object" ? { ...s, alpha: 1 } : s));
|
|
1828
|
+
}
|
|
1829
|
+
}, sn = {
|
|
1830
|
+
...oe,
|
|
1831
|
+
transform: Math.round
|
|
1832
|
+
}, yo = {
|
|
1833
|
+
rotate: W,
|
|
1834
|
+
rotateX: W,
|
|
1835
|
+
rotateY: W,
|
|
1836
|
+
rotateZ: W,
|
|
1837
|
+
scale: Ve,
|
|
1838
|
+
scaleX: Ve,
|
|
1839
|
+
scaleY: Ve,
|
|
1840
|
+
scaleZ: Ve,
|
|
1841
|
+
skew: W,
|
|
1842
|
+
skewX: W,
|
|
1843
|
+
skewY: W,
|
|
1844
|
+
distance: m,
|
|
1845
|
+
translateX: m,
|
|
1846
|
+
translateY: m,
|
|
1847
|
+
translateZ: m,
|
|
1848
|
+
x: m,
|
|
1849
|
+
y: m,
|
|
1850
|
+
z: m,
|
|
1851
|
+
perspective: m,
|
|
1852
|
+
transformPerspective: m,
|
|
1853
|
+
opacity: he,
|
|
1854
|
+
originX: _t,
|
|
1855
|
+
originY: _t,
|
|
1856
|
+
originZ: m
|
|
1857
|
+
}, Pt = {
|
|
1858
|
+
// Border props
|
|
1859
|
+
borderWidth: m,
|
|
1860
|
+
borderTopWidth: m,
|
|
1861
|
+
borderRightWidth: m,
|
|
1862
|
+
borderBottomWidth: m,
|
|
1863
|
+
borderLeftWidth: m,
|
|
1864
|
+
borderRadius: m,
|
|
1865
|
+
borderTopLeftRadius: m,
|
|
1866
|
+
borderTopRightRadius: m,
|
|
1867
|
+
borderBottomRightRadius: m,
|
|
1868
|
+
borderBottomLeftRadius: m,
|
|
1869
|
+
// Positioning props
|
|
1870
|
+
width: m,
|
|
1871
|
+
maxWidth: m,
|
|
1872
|
+
height: m,
|
|
1873
|
+
maxHeight: m,
|
|
1874
|
+
top: m,
|
|
1875
|
+
right: m,
|
|
1876
|
+
bottom: m,
|
|
1877
|
+
left: m,
|
|
1878
|
+
inset: m,
|
|
1879
|
+
insetBlock: m,
|
|
1880
|
+
insetBlockStart: m,
|
|
1881
|
+
insetBlockEnd: m,
|
|
1882
|
+
insetInline: m,
|
|
1883
|
+
insetInlineStart: m,
|
|
1884
|
+
insetInlineEnd: m,
|
|
1885
|
+
// Spacing props
|
|
1886
|
+
padding: m,
|
|
1887
|
+
paddingTop: m,
|
|
1888
|
+
paddingRight: m,
|
|
1889
|
+
paddingBottom: m,
|
|
1890
|
+
paddingLeft: m,
|
|
1891
|
+
paddingBlock: m,
|
|
1892
|
+
paddingBlockStart: m,
|
|
1893
|
+
paddingBlockEnd: m,
|
|
1894
|
+
paddingInline: m,
|
|
1895
|
+
paddingInlineStart: m,
|
|
1896
|
+
paddingInlineEnd: m,
|
|
1897
|
+
margin: m,
|
|
1898
|
+
marginTop: m,
|
|
1899
|
+
marginRight: m,
|
|
1900
|
+
marginBottom: m,
|
|
1901
|
+
marginLeft: m,
|
|
1902
|
+
marginBlock: m,
|
|
1903
|
+
marginBlockStart: m,
|
|
1904
|
+
marginBlockEnd: m,
|
|
1905
|
+
marginInline: m,
|
|
1906
|
+
marginInlineStart: m,
|
|
1907
|
+
marginInlineEnd: m,
|
|
1908
|
+
// Typography
|
|
1909
|
+
fontSize: m,
|
|
1910
|
+
// Misc
|
|
1911
|
+
backgroundPositionX: m,
|
|
1912
|
+
backgroundPositionY: m,
|
|
1913
|
+
...yo,
|
|
1914
|
+
zIndex: sn,
|
|
1915
|
+
// SVG
|
|
1916
|
+
fillOpacity: he,
|
|
1917
|
+
strokeOpacity: he,
|
|
1918
|
+
numOctaves: sn
|
|
1919
|
+
}, bo = {
|
|
1920
|
+
...Pt,
|
|
1921
|
+
// Color props
|
|
1922
|
+
color: M,
|
|
1923
|
+
backgroundColor: M,
|
|
1924
|
+
outlineColor: M,
|
|
1925
|
+
fill: M,
|
|
1926
|
+
stroke: M,
|
|
1927
|
+
// Border props
|
|
1928
|
+
borderColor: M,
|
|
1929
|
+
borderTopColor: M,
|
|
1930
|
+
borderRightColor: M,
|
|
1931
|
+
borderBottomColor: M,
|
|
1932
|
+
borderLeftColor: M,
|
|
1933
|
+
filter: ct,
|
|
1934
|
+
WebkitFilter: ct,
|
|
1935
|
+
mask: lt,
|
|
1936
|
+
WebkitMask: lt
|
|
1937
|
+
}, bs = (e) => bo[e], wo = /* @__PURE__ */ new Set([ct, lt]);
|
|
1938
|
+
function ws(e, t) {
|
|
1939
|
+
let n = bs(e);
|
|
1940
|
+
return wo.has(n) || (n = L), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
|
|
1941
|
+
}
|
|
1942
|
+
const To = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
1943
|
+
function vo(e, t, n) {
|
|
1944
|
+
let s = 0, i;
|
|
1945
|
+
for (; s < e.length && !i; ) {
|
|
1946
|
+
const r = e[s];
|
|
1947
|
+
typeof r == "string" && !To.has(r) && pe(r).values.length && (i = e[s]), s++;
|
|
1948
|
+
}
|
|
1949
|
+
if (i && n)
|
|
1950
|
+
for (const r of t)
|
|
1951
|
+
e[r] = ws(n, i);
|
|
1994
1952
|
}
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
const l = as(a, At[o]);
|
|
2010
|
-
if (!c) {
|
|
2011
|
-
i = !1;
|
|
2012
|
-
const u = mo[o] || o;
|
|
2013
|
-
s += `${u}(${l}) `;
|
|
1953
|
+
class So extends At {
|
|
1954
|
+
constructor(t, n, s, i, r) {
|
|
1955
|
+
super(t, n, s, i, r, !0);
|
|
1956
|
+
}
|
|
1957
|
+
readKeyframes() {
|
|
1958
|
+
const { unresolvedKeyframes: t, element: n, name: s } = this;
|
|
1959
|
+
if (!n || !n.current)
|
|
1960
|
+
return;
|
|
1961
|
+
super.readKeyframes();
|
|
1962
|
+
for (let u = 0; u < t.length; u++) {
|
|
1963
|
+
let d = t[u];
|
|
1964
|
+
if (typeof d == "string" && (d = d.trim(), yt(d))) {
|
|
1965
|
+
const f = ls(d, n.current);
|
|
1966
|
+
f !== void 0 && (t[u] = f), u === t.length - 1 && (this.finalKeyframe = d);
|
|
2014
1967
|
}
|
|
2015
|
-
n && (t[o] = l);
|
|
2016
1968
|
}
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
for (const c in t) {
|
|
2024
|
-
const l = t[c];
|
|
2025
|
-
if (ue.has(c)) {
|
|
2026
|
-
o = !0;
|
|
2027
|
-
continue;
|
|
2028
|
-
} else if (Nn(c)) {
|
|
2029
|
-
i[c] = l;
|
|
2030
|
-
continue;
|
|
2031
|
-
} else {
|
|
2032
|
-
const u = as(l, At[c]);
|
|
2033
|
-
c.startsWith("origin") ? (a = !0, r[c] = u) : s[c] = u;
|
|
1969
|
+
if (this.resolveNoneKeyframes(), !hs.has(s) || t.length !== 2)
|
|
1970
|
+
return;
|
|
1971
|
+
const [i, r] = t, o = nn(i), a = nn(r), c = jt(i), l = jt(r);
|
|
1972
|
+
if (c !== l && _[s]) {
|
|
1973
|
+
this.needsMeasurement = !0;
|
|
1974
|
+
return;
|
|
2034
1975
|
}
|
|
1976
|
+
if (o !== a)
|
|
1977
|
+
if (Zt(o) && Zt(a))
|
|
1978
|
+
for (let u = 0; u < t.length; u++) {
|
|
1979
|
+
const d = t[u];
|
|
1980
|
+
typeof d == "string" && (t[u] = parseFloat(d));
|
|
1981
|
+
}
|
|
1982
|
+
else _[s] && (this.needsMeasurement = !0);
|
|
2035
1983
|
}
|
|
2036
|
-
|
|
2037
|
-
const {
|
|
2038
|
-
|
|
1984
|
+
resolveNoneKeyframes() {
|
|
1985
|
+
const { unresolvedKeyframes: t, name: n } = this, s = [];
|
|
1986
|
+
for (let i = 0; i < t.length; i++)
|
|
1987
|
+
(t[i] === null || ho(t[i])) && s.push(i);
|
|
1988
|
+
s.length && vo(t, s, n);
|
|
2039
1989
|
}
|
|
2040
|
-
|
|
2041
|
-
const
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
function ps(e, t, n) {
|
|
2048
|
-
for (const s in t)
|
|
2049
|
-
!D(t[s]) && !hs(s, n) && (e[s] = t[s]);
|
|
2050
|
-
}
|
|
2051
|
-
function bo({ transformTemplate: e }, t) {
|
|
2052
|
-
return Oe(() => {
|
|
2053
|
-
const n = Dt();
|
|
2054
|
-
return Ft(n, t, e), Object.assign({}, n.vars, n.style);
|
|
2055
|
-
}, [t]);
|
|
2056
|
-
}
|
|
2057
|
-
function To(e, t) {
|
|
2058
|
-
const n = e.style || {}, s = {};
|
|
2059
|
-
return ps(s, n, e), Object.assign(s, bo(e, t)), s;
|
|
2060
|
-
}
|
|
2061
|
-
function vo(e, t) {
|
|
2062
|
-
const n = {}, s = To(e, t);
|
|
2063
|
-
return e.drag && e.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.touchAction = e.drag === !0 ? "none" : `pan-${e.drag === "x" ? "y" : "x"}`), e.tabIndex === void 0 && (e.onTap || e.onTapStart || e.whileTap) && (n.tabIndex = 0), n.style = s, n;
|
|
2064
|
-
}
|
|
2065
|
-
const wo = {
|
|
2066
|
-
offset: "stroke-dashoffset",
|
|
2067
|
-
array: "stroke-dasharray"
|
|
2068
|
-
}, Vo = {
|
|
2069
|
-
offset: "strokeDashoffset",
|
|
2070
|
-
array: "strokeDasharray"
|
|
2071
|
-
};
|
|
2072
|
-
function So(e, t, n = 1, s = 0, i = !0) {
|
|
2073
|
-
e.pathLength = 1;
|
|
2074
|
-
const r = i ? wo : Vo;
|
|
2075
|
-
e[r.offset] = m.transform(-s);
|
|
2076
|
-
const o = m.transform(t), a = m.transform(n);
|
|
2077
|
-
e[r.array] = `${o} ${a}`;
|
|
2078
|
-
}
|
|
2079
|
-
function ms(e, {
|
|
2080
|
-
attrX: t,
|
|
2081
|
-
attrY: n,
|
|
2082
|
-
attrScale: s,
|
|
2083
|
-
pathLength: i,
|
|
2084
|
-
pathSpacing: r = 1,
|
|
2085
|
-
pathOffset: o = 0,
|
|
2086
|
-
// This is object creation, which we try to avoid per-frame.
|
|
2087
|
-
...a
|
|
2088
|
-
}, c, l, u) {
|
|
2089
|
-
if (Ft(e, a, l), c) {
|
|
2090
|
-
e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
|
|
2091
|
-
return;
|
|
1990
|
+
measureInitialState() {
|
|
1991
|
+
const { element: t, unresolvedKeyframes: n, name: s } = this;
|
|
1992
|
+
if (!t || !t.current)
|
|
1993
|
+
return;
|
|
1994
|
+
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = _[s](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
|
|
1995
|
+
const i = n[n.length - 1];
|
|
1996
|
+
i !== void 0 && t.getValue(s, i).jump(i, !1);
|
|
2092
1997
|
}
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
return ms(r, t, ys(s), e.transformTemplate, e.style), {
|
|
2105
|
-
...r.attrs,
|
|
2106
|
-
style: { ...r.style }
|
|
2107
|
-
};
|
|
2108
|
-
}, [t]);
|
|
2109
|
-
if (e.style) {
|
|
2110
|
-
const r = {};
|
|
2111
|
-
ps(r, e.style, e), i.style = { ...r, ...i.style };
|
|
1998
|
+
measureEndState() {
|
|
1999
|
+
var a;
|
|
2000
|
+
const { element: t, name: n, unresolvedKeyframes: s } = this;
|
|
2001
|
+
if (!t || !t.current)
|
|
2002
|
+
return;
|
|
2003
|
+
const i = t.getValue(n);
|
|
2004
|
+
i && i.jump(this.measuredOrigin, !1);
|
|
2005
|
+
const r = s.length - 1, o = s[r];
|
|
2006
|
+
s[r] = _[n](t.measureViewportBox(), window.getComputedStyle(t.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), (a = this.removedTransforms) != null && a.length && this.removedTransforms.forEach(([c, l]) => {
|
|
2007
|
+
t.getValue(c).set(l);
|
|
2008
|
+
}), this.resolveNoneKeyframes();
|
|
2112
2009
|
}
|
|
2113
|
-
return i;
|
|
2114
2010
|
}
|
|
2115
|
-
const
|
|
2116
|
-
"
|
|
2117
|
-
"
|
|
2118
|
-
"defs",
|
|
2119
|
-
"desc",
|
|
2120
|
-
"ellipse",
|
|
2121
|
-
"g",
|
|
2122
|
-
"image",
|
|
2123
|
-
"line",
|
|
2011
|
+
const Vo = /* @__PURE__ */ new Set([
|
|
2012
|
+
"opacity",
|
|
2013
|
+
"clipPath",
|
|
2124
2014
|
"filter",
|
|
2125
|
-
"
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
"
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
"
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
"use",
|
|
2140
|
-
"view"
|
|
2141
|
-
];
|
|
2142
|
-
function Rt(e) {
|
|
2143
|
-
return (
|
|
2144
|
-
/**
|
|
2145
|
-
* If it's not a string, it's a custom React component. Currently we only support
|
|
2146
|
-
* HTML custom React components.
|
|
2147
|
-
*/
|
|
2148
|
-
typeof e != "string" || /**
|
|
2149
|
-
* If it contains a dash, the element is a custom HTML webcomponent.
|
|
2150
|
-
*/
|
|
2151
|
-
e.includes("-") ? !1 : (
|
|
2152
|
-
/**
|
|
2153
|
-
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
2154
|
-
*/
|
|
2155
|
-
!!(Ao.indexOf(e) > -1 || /**
|
|
2156
|
-
* If it contains a capital letter, it's an SVG component
|
|
2157
|
-
*/
|
|
2158
|
-
/[A-Z]/u.test(e))
|
|
2159
|
-
)
|
|
2160
|
-
);
|
|
2161
|
-
}
|
|
2162
|
-
function Mo(e, t, n, { latestValues: s }, i, r = !1) {
|
|
2163
|
-
const a = (Rt(e) ? xo : vo)(t, s, i, e), c = lo(t, typeof e == "string", r), l = e !== bn ? { ...c, ...a, ref: n } : {}, { children: u } = t, f = Oe(() => D(u) ? u.get() : u, [u]);
|
|
2164
|
-
return Zs(e, {
|
|
2165
|
-
...l,
|
|
2166
|
-
children: f
|
|
2167
|
-
});
|
|
2168
|
-
}
|
|
2169
|
-
function cn(e) {
|
|
2170
|
-
const t = [{}, {}];
|
|
2171
|
-
return e == null || e.values.forEach((n, s) => {
|
|
2172
|
-
t[0][s] = n.get(), t[1][s] = n.getVelocity();
|
|
2173
|
-
}), t;
|
|
2174
|
-
}
|
|
2175
|
-
function Ot(e, t, n, s) {
|
|
2176
|
-
if (typeof t == "function") {
|
|
2177
|
-
const [i, r] = cn(s);
|
|
2178
|
-
t = t(n !== void 0 ? n : e.custom, i, r);
|
|
2179
|
-
}
|
|
2180
|
-
if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
|
|
2181
|
-
const [i, r] = cn(s);
|
|
2182
|
-
t = t(n !== void 0 ? n : e.custom, i, r);
|
|
2015
|
+
"transform"
|
|
2016
|
+
// TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved
|
|
2017
|
+
// or until we implement support for linear() easing.
|
|
2018
|
+
// "background-color"
|
|
2019
|
+
]);
|
|
2020
|
+
function xo(e, t, n) {
|
|
2021
|
+
if (e == null)
|
|
2022
|
+
return [];
|
|
2023
|
+
if (e instanceof EventTarget)
|
|
2024
|
+
return [e];
|
|
2025
|
+
if (typeof e == "string") {
|
|
2026
|
+
let s = document;
|
|
2027
|
+
const i = (n == null ? void 0 : n[e]) ?? s.querySelectorAll(e);
|
|
2028
|
+
return i ? Array.from(i) : [];
|
|
2183
2029
|
}
|
|
2184
|
-
return
|
|
2030
|
+
return Array.from(e).filter((s) => s != null);
|
|
2185
2031
|
}
|
|
2186
|
-
|
|
2187
|
-
|
|
2032
|
+
const Ts = (e, t) => t && typeof e == "number" ? t.transform(e) : e;
|
|
2033
|
+
function Ao(e) {
|
|
2034
|
+
return gi(e) && "offsetHeight" in e;
|
|
2188
2035
|
}
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2036
|
+
const { schedule: Mo } = /* @__PURE__ */ jn(queueMicrotask, !1), Co = {
|
|
2037
|
+
y: !1
|
|
2038
|
+
};
|
|
2039
|
+
function Po() {
|
|
2040
|
+
return Co.y;
|
|
2041
|
+
}
|
|
2042
|
+
function vs(e, t) {
|
|
2043
|
+
const n = xo(e), s = new AbortController(), i = {
|
|
2044
|
+
passive: !0,
|
|
2045
|
+
...t,
|
|
2046
|
+
signal: s.signal
|
|
2193
2047
|
};
|
|
2048
|
+
return [n, i, () => s.abort()];
|
|
2194
2049
|
}
|
|
2195
|
-
function Fo(e
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
g = g[x];
|
|
2216
|
-
}
|
|
2217
|
-
g !== null && (i[V] = g);
|
|
2050
|
+
function Fo(e) {
|
|
2051
|
+
return !(e.pointerType === "touch" || Po());
|
|
2052
|
+
}
|
|
2053
|
+
function Ro(e, t, n = {}) {
|
|
2054
|
+
const [s, i, r] = vs(e, n);
|
|
2055
|
+
return s.forEach((o) => {
|
|
2056
|
+
let a = !1, c = !1, l;
|
|
2057
|
+
const u = () => {
|
|
2058
|
+
o.removeEventListener("pointerleave", p);
|
|
2059
|
+
}, d = (y) => {
|
|
2060
|
+
l && (l(y), l = void 0), u();
|
|
2061
|
+
}, f = (y) => {
|
|
2062
|
+
a = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), c && (c = !1, d(y));
|
|
2063
|
+
}, h = () => {
|
|
2064
|
+
a = !0, window.addEventListener("pointerup", f, i), window.addEventListener("pointercancel", f, i);
|
|
2065
|
+
}, p = (y) => {
|
|
2066
|
+
if (y.pointerType !== "touch") {
|
|
2067
|
+
if (a) {
|
|
2068
|
+
c = !0;
|
|
2069
|
+
return;
|
|
2218
2070
|
}
|
|
2219
|
-
|
|
2220
|
-
i[V] = b[V];
|
|
2071
|
+
d(y);
|
|
2221
2072
|
}
|
|
2222
|
-
}
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
const
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
var r;
|
|
2232
|
-
const { style: s } = e, i = {};
|
|
2233
|
-
for (const o in s)
|
|
2234
|
-
(D(s[o]) || t.style && D(t.style[o]) || hs(o, e) || ((r = n == null ? void 0 : n.getValue(o)) == null ? void 0 : r.liveStyle) !== void 0) && (i[o] = s[o]);
|
|
2235
|
-
return i;
|
|
2236
|
-
}
|
|
2237
|
-
const Do = /* @__PURE__ */ bs({
|
|
2238
|
-
scrapeMotionValuesFromProps: It,
|
|
2239
|
-
createRenderState: Dt
|
|
2240
|
-
});
|
|
2241
|
-
function Ts(e, t, n) {
|
|
2242
|
-
const s = It(e, t, n);
|
|
2243
|
-
for (const i in e)
|
|
2244
|
-
if (D(e[i]) || D(t[i])) {
|
|
2245
|
-
const r = ae.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
2246
|
-
s[r] = e[i];
|
|
2247
|
-
}
|
|
2248
|
-
return s;
|
|
2249
|
-
}
|
|
2250
|
-
const Ro = /* @__PURE__ */ bs({
|
|
2251
|
-
scrapeMotionValuesFromProps: Ts,
|
|
2252
|
-
createRenderState: gs
|
|
2253
|
-
}), Oo = Symbol.for("motionComponentSymbol");
|
|
2254
|
-
function vs(e) {
|
|
2255
|
-
return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
|
|
2256
|
-
}
|
|
2257
|
-
function Io(e, t, n) {
|
|
2258
|
-
return Js(
|
|
2259
|
-
(s) => {
|
|
2260
|
-
s && e.onMount && e.onMount(s), t && (s ? t.mount(s) : t.unmount()), n && (typeof n == "function" ? n(s) : vs(n) && (n.current = s));
|
|
2261
|
-
},
|
|
2262
|
-
/**
|
|
2263
|
-
* Only pass a new ref callback to React if we've received a visual element
|
|
2264
|
-
* factory. Otherwise we'll be mounting/remounting every time externalRef
|
|
2265
|
-
* or other dependencies change.
|
|
2266
|
-
*/
|
|
2267
|
-
[t]
|
|
2268
|
-
);
|
|
2073
|
+
}, b = (y) => {
|
|
2074
|
+
if (!Fo(y))
|
|
2075
|
+
return;
|
|
2076
|
+
c = !1;
|
|
2077
|
+
const g = t(o, y);
|
|
2078
|
+
typeof g == "function" && (l = g, o.addEventListener("pointerleave", p, i));
|
|
2079
|
+
};
|
|
2080
|
+
o.addEventListener("pointerenter", b, i), o.addEventListener("pointerdown", h, i);
|
|
2081
|
+
}), r;
|
|
2269
2082
|
}
|
|
2270
|
-
const
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
blockInitialAnimation: a ? a.initial === !1 : !1,
|
|
2280
|
-
reducedMotionConfig: c
|
|
2281
|
-
}));
|
|
2282
|
-
const u = l.current, f = E(Eo);
|
|
2283
|
-
u && !u.projection && i && (u.type === "html" || u.type === "svg") && No(l.current, n, i, f);
|
|
2284
|
-
const d = fe(!1);
|
|
2285
|
-
Qs(() => {
|
|
2286
|
-
u && d.current && u.update(n, a);
|
|
2287
|
-
});
|
|
2288
|
-
const h = n[ws], y = fe(!!h && !((b = window.MotionHandoffIsComplete) != null && b.call(window, h)) && ((v = window.MotionHasOptimisedAnimation) == null ? void 0 : v.call(window, h)));
|
|
2289
|
-
return si(() => {
|
|
2290
|
-
u && (d.current = !0, window.MotionIsMounted = !0, u.updateFeatures(), u.scheduleRenderMicrotask(), y.current && u.animationState && u.animationState.animateChanges());
|
|
2291
|
-
}), ft(() => {
|
|
2292
|
-
u && (!y.current && u.animationState && u.animationState.animateChanges(), y.current && (queueMicrotask(() => {
|
|
2293
|
-
var p;
|
|
2294
|
-
(p = window.MotionHandoffMarkAsComplete) == null || p.call(window, h);
|
|
2295
|
-
}), y.current = !1), u.enteringChildren = void 0);
|
|
2296
|
-
}), u;
|
|
2297
|
-
}
|
|
2298
|
-
function No(e, t, n, s) {
|
|
2299
|
-
const { layoutId: i, layout: r, drag: o, dragConstraints: a, layoutScroll: c, layoutRoot: l, layoutCrossfade: u } = t;
|
|
2300
|
-
e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : Vs(e.parent)), e.projection.setOptions({
|
|
2301
|
-
layoutId: i,
|
|
2302
|
-
layout: r,
|
|
2303
|
-
alwaysMeasureLayout: !!o || a && vs(a),
|
|
2304
|
-
visualElement: e,
|
|
2305
|
-
/**
|
|
2306
|
-
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
2307
|
-
* to update by the time layout animations run.
|
|
2308
|
-
* We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
|
|
2309
|
-
* ensuring it gets called if there's no potential layout animations.
|
|
2310
|
-
*
|
|
2311
|
-
*/
|
|
2312
|
-
animationType: typeof r == "string" ? r : "both",
|
|
2313
|
-
initialPromotionConfig: s,
|
|
2314
|
-
crossfade: u,
|
|
2315
|
-
layoutScroll: c,
|
|
2316
|
-
layoutRoot: l
|
|
2317
|
-
});
|
|
2083
|
+
const Ss = (e, t) => t ? e === t ? !0 : Ss(e, t.parentElement) : !1, Do = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1, ko = /* @__PURE__ */ new Set([
|
|
2084
|
+
"BUTTON",
|
|
2085
|
+
"INPUT",
|
|
2086
|
+
"SELECT",
|
|
2087
|
+
"TEXTAREA",
|
|
2088
|
+
"A"
|
|
2089
|
+
]);
|
|
2090
|
+
function Io(e) {
|
|
2091
|
+
return ko.has(e.tagName) || e.isContentEditable === !0;
|
|
2318
2092
|
}
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
const i = Rt(e) ? Ro : Do;
|
|
2325
|
-
function r(a, c) {
|
|
2326
|
-
let l;
|
|
2327
|
-
const u = {
|
|
2328
|
-
...E(ls),
|
|
2329
|
-
...a,
|
|
2330
|
-
layoutId: Ko(a)
|
|
2331
|
-
}, { isStatic: f } = u, d = ho(a), h = i(a, f);
|
|
2332
|
-
if (!f && dt) {
|
|
2333
|
-
$o(u, n);
|
|
2334
|
-
const y = Wo(u);
|
|
2335
|
-
l = y.MeasureLayout, d.visualElement = Lo(e, h, u, s, y.ProjectionNode);
|
|
2336
|
-
}
|
|
2337
|
-
return lt(Ee.Provider, { value: d, children: [l && d.visualElement ? F(l, { visualElement: d.visualElement, ...u }) : null, Mo(e, a, Io(h, d.visualElement, c), h, f, t)] });
|
|
2338
|
-
}
|
|
2339
|
-
r.displayName = `motion.${typeof e == "string" ? e : `create(${e.displayName ?? e.name ?? ""})`}`;
|
|
2340
|
-
const o = ei(r);
|
|
2341
|
-
return o[Oo] = e, o;
|
|
2093
|
+
const Me = /* @__PURE__ */ new WeakSet();
|
|
2094
|
+
function rn(e) {
|
|
2095
|
+
return (t) => {
|
|
2096
|
+
t.key === "Enter" && e(t);
|
|
2097
|
+
};
|
|
2342
2098
|
}
|
|
2343
|
-
function
|
|
2344
|
-
|
|
2345
|
-
return t && e !== void 0 ? t + "-" + e : e;
|
|
2099
|
+
function Ge(e, t) {
|
|
2100
|
+
e.dispatchEvent(new PointerEvent("pointer" + t, { isPrimary: !0, bubbles: !0 }));
|
|
2346
2101
|
}
|
|
2347
|
-
|
|
2348
|
-
|
|
2102
|
+
const Oo = (e, t) => {
|
|
2103
|
+
const n = e.currentTarget;
|
|
2104
|
+
if (!n)
|
|
2105
|
+
return;
|
|
2106
|
+
const s = rn(() => {
|
|
2107
|
+
if (Me.has(n))
|
|
2108
|
+
return;
|
|
2109
|
+
Ge(n, "down");
|
|
2110
|
+
const i = rn(() => {
|
|
2111
|
+
Ge(n, "up");
|
|
2112
|
+
}), r = () => Ge(n, "cancel");
|
|
2113
|
+
n.addEventListener("keyup", i, t), n.addEventListener("blur", r, t);
|
|
2114
|
+
});
|
|
2115
|
+
n.addEventListener("keydown", s, t), n.addEventListener("blur", () => n.removeEventListener("keydown", s), t);
|
|
2116
|
+
};
|
|
2117
|
+
function on(e) {
|
|
2118
|
+
return Do(e) && !0;
|
|
2349
2119
|
}
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2120
|
+
const an = /* @__PURE__ */ new WeakSet();
|
|
2121
|
+
function Eo(e, t, n = {}) {
|
|
2122
|
+
const [s, i, r] = vs(e, n), o = (a) => {
|
|
2123
|
+
const c = a.currentTarget;
|
|
2124
|
+
if (!on(a) || an.has(a))
|
|
2125
|
+
return;
|
|
2126
|
+
Me.add(c), n.stopPropagation && an.add(a);
|
|
2127
|
+
const l = t(c, a), u = (h, p) => {
|
|
2128
|
+
window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f), Me.has(c) && Me.delete(c), on(h) && typeof l == "function" && l(h, { success: p });
|
|
2129
|
+
}, d = (h) => {
|
|
2130
|
+
u(h, c === window || c === document || n.useGlobalTarget || Ss(c, h.target));
|
|
2131
|
+
}, f = (h) => {
|
|
2132
|
+
u(h, !1);
|
|
2133
|
+
};
|
|
2134
|
+
window.addEventListener("pointerup", d, i), window.addEventListener("pointercancel", f, i);
|
|
2358
2135
|
};
|
|
2136
|
+
return s.forEach((a) => {
|
|
2137
|
+
(n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, i), Ao(a) && (a.addEventListener("focus", (l) => Oo(l, i)), !Io(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
|
|
2138
|
+
}), r;
|
|
2359
2139
|
}
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2140
|
+
const Bo = [...ys, M, L], Lo = (e) => Bo.find(gs(e)), un = () => ({ min: 0, max: 0 }), Vs = () => ({
|
|
2141
|
+
x: un(),
|
|
2142
|
+
y: un()
|
|
2143
|
+
}), No = /* @__PURE__ */ new WeakMap();
|
|
2144
|
+
function Be(e) {
|
|
2145
|
+
return e !== null && typeof e == "object" && typeof e.start == "function";
|
|
2365
2146
|
}
|
|
2366
|
-
function
|
|
2367
|
-
|
|
2368
|
-
return e;
|
|
2369
|
-
const n = t({ x: e.left, y: e.top }), s = t({ x: e.right, y: e.bottom });
|
|
2370
|
-
return {
|
|
2371
|
-
top: n.y,
|
|
2372
|
-
left: n.x,
|
|
2373
|
-
bottom: s.y,
|
|
2374
|
-
right: s.x
|
|
2375
|
-
};
|
|
2147
|
+
function me(e) {
|
|
2148
|
+
return typeof e == "string" || Array.isArray(e);
|
|
2376
2149
|
}
|
|
2377
|
-
|
|
2378
|
-
|
|
2150
|
+
const Ft = [
|
|
2151
|
+
"animate",
|
|
2152
|
+
"whileInView",
|
|
2153
|
+
"whileFocus",
|
|
2154
|
+
"whileHover",
|
|
2155
|
+
"whileTap",
|
|
2156
|
+
"whileDrag",
|
|
2157
|
+
"exit"
|
|
2158
|
+
], Rt = ["initial", ...Ft];
|
|
2159
|
+
function Le(e) {
|
|
2160
|
+
return Be(e.animate) || Rt.some((t) => me(e[t]));
|
|
2379
2161
|
}
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
y: ln()
|
|
2383
|
-
}), ot = { current: null }, xs = { current: !1 };
|
|
2384
|
-
function zo() {
|
|
2385
|
-
if (xs.current = !0, !!dt)
|
|
2386
|
-
if (window.matchMedia) {
|
|
2387
|
-
const e = window.matchMedia("(prefers-reduced-motion)"), t = () => ot.current = e.matches;
|
|
2388
|
-
e.addEventListener("change", t), t();
|
|
2389
|
-
} else
|
|
2390
|
-
ot.current = !1;
|
|
2162
|
+
function xs(e) {
|
|
2163
|
+
return !!(Le(e) || e.variants);
|
|
2391
2164
|
}
|
|
2392
|
-
|
|
2393
|
-
function Uo(e, t, n) {
|
|
2165
|
+
function Ko(e, t, n) {
|
|
2394
2166
|
for (const s in t) {
|
|
2395
2167
|
const i = t[s], r = n[s];
|
|
2396
|
-
if (
|
|
2168
|
+
if (R(i))
|
|
2397
2169
|
e.addValue(s, i);
|
|
2398
|
-
else if (
|
|
2170
|
+
else if (R(r))
|
|
2399
2171
|
e.addValue(s, De(i, { owner: e }));
|
|
2400
2172
|
else if (r !== i)
|
|
2401
2173
|
if (e.hasValue(s)) {
|
|
@@ -2410,7 +2182,16 @@ function Uo(e, t, n) {
|
|
|
2410
2182
|
t[s] === void 0 && e.removeValue(s);
|
|
2411
2183
|
return t;
|
|
2412
2184
|
}
|
|
2413
|
-
const
|
|
2185
|
+
const ft = { current: null }, As = { current: !1 }, $o = typeof window < "u";
|
|
2186
|
+
function Wo() {
|
|
2187
|
+
if (As.current = !0, !!$o)
|
|
2188
|
+
if (window.matchMedia) {
|
|
2189
|
+
const e = window.matchMedia("(prefers-reduced-motion)"), t = () => ft.current = e.matches;
|
|
2190
|
+
e.addEventListener("change", t), t();
|
|
2191
|
+
} else
|
|
2192
|
+
ft.current = !1;
|
|
2193
|
+
}
|
|
2194
|
+
const cn = [
|
|
2414
2195
|
"AnimationStart",
|
|
2415
2196
|
"AnimationComplete",
|
|
2416
2197
|
"Update",
|
|
@@ -2419,7 +2200,14 @@ const fn = [
|
|
|
2419
2200
|
"LayoutAnimationStart",
|
|
2420
2201
|
"LayoutAnimationComplete"
|
|
2421
2202
|
];
|
|
2422
|
-
|
|
2203
|
+
let ke = {};
|
|
2204
|
+
function Ms(e) {
|
|
2205
|
+
ke = e;
|
|
2206
|
+
}
|
|
2207
|
+
function jo() {
|
|
2208
|
+
return ke;
|
|
2209
|
+
}
|
|
2210
|
+
class _o {
|
|
2423
2211
|
/**
|
|
2424
2212
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
2425
2213
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -2430,28 +2218,31 @@ class Yo {
|
|
|
2430
2218
|
scrapeMotionValuesFromProps(t, n, s) {
|
|
2431
2219
|
return {};
|
|
2432
2220
|
}
|
|
2433
|
-
constructor({ parent: t, props: n, presenceContext: s, reducedMotionConfig: i,
|
|
2434
|
-
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver =
|
|
2221
|
+
constructor({ parent: t, props: n, presenceContext: s, reducedMotionConfig: i, skipAnimations: r, blockInitialAnimation: o, visualState: a }, c = {}) {
|
|
2222
|
+
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 = At, 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 = () => {
|
|
2435
2223
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
2436
2224
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
2437
|
-
const
|
|
2438
|
-
this.renderScheduledAt <
|
|
2225
|
+
const h = k.now();
|
|
2226
|
+
this.renderScheduledAt < h && (this.renderScheduledAt = h, N.render(this.render, !1, !0));
|
|
2439
2227
|
};
|
|
2440
|
-
const { latestValues:
|
|
2441
|
-
this.latestValues =
|
|
2442
|
-
const { willChange:
|
|
2443
|
-
for (const
|
|
2444
|
-
const
|
|
2445
|
-
|
|
2228
|
+
const { latestValues: l, renderState: u } = a;
|
|
2229
|
+
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = t, this.props = n, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = i, this.skipAnimationsConfig = r, this.options = c, this.blockInitialAnimation = !!o, this.isControllingVariants = Le(n), this.isVariantNode = xs(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
|
|
2230
|
+
const { willChange: d, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
2231
|
+
for (const h in f) {
|
|
2232
|
+
const p = f[h];
|
|
2233
|
+
l[h] !== void 0 && R(p) && p.set(l[h]);
|
|
2446
2234
|
}
|
|
2447
2235
|
}
|
|
2448
2236
|
mount(t) {
|
|
2449
|
-
var n;
|
|
2450
|
-
|
|
2237
|
+
var n, s;
|
|
2238
|
+
if (this.hasBeenMounted)
|
|
2239
|
+
for (const i in this.initialValues)
|
|
2240
|
+
(n = this.values.get(i)) == null || n.jump(this.initialValues[i]), this.latestValues[i] = this.initialValues[i];
|
|
2241
|
+
this.current = t, No.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((i, r) => this.bindToMotionValue(r, i)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (As.current || Wo(), this.shouldReduceMotion = ft.current), process.env.NODE_ENV !== "production" && kn(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, (s = this.parent) == null || s.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
|
|
2451
2242
|
}
|
|
2452
2243
|
unmount() {
|
|
2453
2244
|
var t;
|
|
2454
|
-
this.projection && this.projection.unmount(),
|
|
2245
|
+
this.projection && this.projection.unmount(), Ye(this.notifyUpdate), Ye(this.render), this.valueSubscriptions.forEach((n) => n()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), (t = this.parent) == null || t.removeChild(this);
|
|
2455
2246
|
for (const n in this.events)
|
|
2456
2247
|
this.events[n].clear();
|
|
2457
2248
|
for (const n in this.features) {
|
|
@@ -2467,14 +2258,27 @@ class Yo {
|
|
|
2467
2258
|
this.children.delete(t), this.enteringChildren && this.enteringChildren.delete(t);
|
|
2468
2259
|
}
|
|
2469
2260
|
bindToMotionValue(t, n) {
|
|
2470
|
-
this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)()
|
|
2261
|
+
if (this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)(), n.accelerate && Vo.has(t) && this.current instanceof HTMLElement) {
|
|
2262
|
+
const { factory: o, keyframes: a, times: c, ease: l, duration: u } = n.accelerate, d = new as({
|
|
2263
|
+
element: this.current,
|
|
2264
|
+
name: t,
|
|
2265
|
+
keyframes: a,
|
|
2266
|
+
times: c,
|
|
2267
|
+
ease: l,
|
|
2268
|
+
duration: /* @__PURE__ */ K(u)
|
|
2269
|
+
}), f = o(d);
|
|
2270
|
+
this.valueSubscriptions.set(t, () => {
|
|
2271
|
+
f(), d.cancel();
|
|
2272
|
+
});
|
|
2273
|
+
return;
|
|
2274
|
+
}
|
|
2471
2275
|
const s = ue.has(t);
|
|
2472
2276
|
s && this.onBindTransform && this.onBindTransform();
|
|
2473
2277
|
const i = n.on("change", (o) => {
|
|
2474
|
-
this.latestValues[t] = o, this.props.onUpdate &&
|
|
2278
|
+
this.latestValues[t] = o, this.props.onUpdate && N.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
|
|
2475
2279
|
});
|
|
2476
2280
|
let r;
|
|
2477
|
-
window.MotionCheckAppearSync && (r = window.MotionCheckAppearSync(this, t, n)), this.valueSubscriptions.set(t, () => {
|
|
2281
|
+
typeof window < "u" && window.MotionCheckAppearSync && (r = window.MotionCheckAppearSync(this, t, n)), this.valueSubscriptions.set(t, () => {
|
|
2478
2282
|
i(), r && r(), n.owner && n.stop();
|
|
2479
2283
|
});
|
|
2480
2284
|
}
|
|
@@ -2483,8 +2287,8 @@ class Yo {
|
|
|
2483
2287
|
}
|
|
2484
2288
|
updateFeatures() {
|
|
2485
2289
|
let t = "animation";
|
|
2486
|
-
for (t in
|
|
2487
|
-
const n =
|
|
2290
|
+
for (t in ke) {
|
|
2291
|
+
const n = ke[t];
|
|
2488
2292
|
if (!n)
|
|
2489
2293
|
continue;
|
|
2490
2294
|
const { isEnabled: s, Feature: i } = n;
|
|
@@ -2503,7 +2307,7 @@ class Yo {
|
|
|
2503
2307
|
* removed with a re-render to work.
|
|
2504
2308
|
*/
|
|
2505
2309
|
measureViewportBox() {
|
|
2506
|
-
return this.current ? this.measureInstanceViewportBox(this.current, this.props) :
|
|
2310
|
+
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Vs();
|
|
2507
2311
|
}
|
|
2508
2312
|
getStaticValue(t) {
|
|
2509
2313
|
return this.latestValues[t];
|
|
@@ -2517,13 +2321,13 @@ class Yo {
|
|
|
2517
2321
|
*/
|
|
2518
2322
|
update(t, n) {
|
|
2519
2323
|
(t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
2520
|
-
for (let s = 0; s <
|
|
2521
|
-
const i =
|
|
2324
|
+
for (let s = 0; s < cn.length; s++) {
|
|
2325
|
+
const i = cn[s];
|
|
2522
2326
|
this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
|
|
2523
2327
|
const r = "on" + i, o = t[r];
|
|
2524
2328
|
o && (this.propEventSubscriptions[i] = this.on(i, o));
|
|
2525
2329
|
}
|
|
2526
|
-
this.prevMotionValues =
|
|
2330
|
+
this.prevMotionValues = Ko(this, this.scrapeMotionValuesFromProps(t, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
2527
2331
|
}
|
|
2528
2332
|
getProps() {
|
|
2529
2333
|
return this.props;
|
|
@@ -2588,7 +2392,7 @@ class Yo {
|
|
|
2588
2392
|
*/
|
|
2589
2393
|
readValue(t, n) {
|
|
2590
2394
|
let s = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
|
|
2591
|
-
return s != null && (typeof s == "string" && (
|
|
2395
|
+
return s != null && (typeof s == "string" && (Mn(s) || Cn(s)) ? s = parseFloat(s) : !Lo(s) && L.test(n) && (s = ws(t, n)), this.setBaseTarget(t, R(s) ? s.get() : s)), R(s) ? s.get() : s;
|
|
2592
2396
|
}
|
|
2593
2397
|
/**
|
|
2594
2398
|
* Set the base target to later animate back to. This is currently
|
|
@@ -2606,33 +2410,34 @@ class Yo {
|
|
|
2606
2410
|
const { initial: n } = this.props;
|
|
2607
2411
|
let s;
|
|
2608
2412
|
if (typeof n == "string" || typeof n == "object") {
|
|
2609
|
-
const o =
|
|
2413
|
+
const o = Mt(this.props, n, (r = this.presenceContext) == null ? void 0 : r.custom);
|
|
2610
2414
|
o && (s = o[t]);
|
|
2611
2415
|
}
|
|
2612
2416
|
if (n && s !== void 0)
|
|
2613
2417
|
return s;
|
|
2614
2418
|
const i = this.getBaseTargetFromProps(this.props, t);
|
|
2615
|
-
return i !== void 0 && !
|
|
2419
|
+
return i !== void 0 && !R(i) ? i : this.initialValues[t] !== void 0 && s === void 0 ? void 0 : this.baseTarget[t];
|
|
2616
2420
|
}
|
|
2617
2421
|
on(t, n) {
|
|
2618
|
-
return this.events[t] || (this.events[t] = new
|
|
2422
|
+
return this.events[t] || (this.events[t] = new Rn()), this.events[t].add(n);
|
|
2619
2423
|
}
|
|
2620
2424
|
notify(t, ...n) {
|
|
2621
2425
|
this.events[t] && this.events[t].notify(...n);
|
|
2622
2426
|
}
|
|
2623
2427
|
scheduleRenderMicrotask() {
|
|
2624
|
-
|
|
2428
|
+
Mo.render(this.render);
|
|
2625
2429
|
}
|
|
2626
2430
|
}
|
|
2627
|
-
class
|
|
2431
|
+
class Cs extends _o {
|
|
2628
2432
|
constructor() {
|
|
2629
|
-
super(...arguments), this.KeyframeResolver =
|
|
2433
|
+
super(...arguments), this.KeyframeResolver = So;
|
|
2630
2434
|
}
|
|
2631
2435
|
sortInstanceNodePosition(t, n) {
|
|
2632
2436
|
return t.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
2633
2437
|
}
|
|
2634
2438
|
getBaseTargetFromProps(t, n) {
|
|
2635
|
-
|
|
2439
|
+
const s = t.style;
|
|
2440
|
+
return s ? s[n] : void 0;
|
|
2636
2441
|
}
|
|
2637
2442
|
removeValueFromRenderState(t, { vars: n, style: s }) {
|
|
2638
2443
|
delete n[t], delete s[t];
|
|
@@ -2640,12 +2445,91 @@ class As extends Yo {
|
|
|
2640
2445
|
handleChildMotionValue() {
|
|
2641
2446
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
2642
2447
|
const { children: t } = this.props;
|
|
2643
|
-
|
|
2448
|
+
R(t) && (this.childSubscription = t.on("change", (n) => {
|
|
2644
2449
|
this.current && (this.current.textContent = `${n}`);
|
|
2645
2450
|
}));
|
|
2646
2451
|
}
|
|
2647
2452
|
}
|
|
2648
|
-
|
|
2453
|
+
class ce {
|
|
2454
|
+
constructor(t) {
|
|
2455
|
+
this.isMounted = !1, this.node = t;
|
|
2456
|
+
}
|
|
2457
|
+
update() {
|
|
2458
|
+
}
|
|
2459
|
+
}
|
|
2460
|
+
function Go({ top: e, left: t, right: n, bottom: s }) {
|
|
2461
|
+
return {
|
|
2462
|
+
x: { min: t, max: n },
|
|
2463
|
+
y: { min: e, max: s }
|
|
2464
|
+
};
|
|
2465
|
+
}
|
|
2466
|
+
function Ho(e, t) {
|
|
2467
|
+
if (!t)
|
|
2468
|
+
return e;
|
|
2469
|
+
const n = t({ x: e.left, y: e.top }), s = t({ x: e.right, y: e.bottom });
|
|
2470
|
+
return {
|
|
2471
|
+
top: n.y,
|
|
2472
|
+
left: n.x,
|
|
2473
|
+
bottom: s.y,
|
|
2474
|
+
right: s.x
|
|
2475
|
+
};
|
|
2476
|
+
}
|
|
2477
|
+
function zo(e, t) {
|
|
2478
|
+
return Go(Ho(e.getBoundingClientRect(), t));
|
|
2479
|
+
}
|
|
2480
|
+
const Uo = {
|
|
2481
|
+
x: "translateX",
|
|
2482
|
+
y: "translateY",
|
|
2483
|
+
z: "translateZ",
|
|
2484
|
+
transformPerspective: "perspective"
|
|
2485
|
+
}, Yo = ae.length;
|
|
2486
|
+
function Xo(e, t, n) {
|
|
2487
|
+
let s = "", i = !0;
|
|
2488
|
+
for (let r = 0; r < Yo; r++) {
|
|
2489
|
+
const o = ae[r], a = e[o];
|
|
2490
|
+
if (a === void 0)
|
|
2491
|
+
continue;
|
|
2492
|
+
let c = !0;
|
|
2493
|
+
if (typeof a == "number")
|
|
2494
|
+
c = a === (o.startsWith("scale") ? 1 : 0);
|
|
2495
|
+
else {
|
|
2496
|
+
const l = parseFloat(a);
|
|
2497
|
+
c = o.startsWith("scale") ? l === 1 : l === 0;
|
|
2498
|
+
}
|
|
2499
|
+
if (!c || n) {
|
|
2500
|
+
const l = Ts(a, Pt[o]);
|
|
2501
|
+
if (!c) {
|
|
2502
|
+
i = !1;
|
|
2503
|
+
const u = Uo[o] || o;
|
|
2504
|
+
s += `${u}(${l}) `;
|
|
2505
|
+
}
|
|
2506
|
+
n && (t[o] = l);
|
|
2507
|
+
}
|
|
2508
|
+
}
|
|
2509
|
+
return s = s.trim(), n ? s = n(t, i ? "" : s) : i && (s = "none"), s;
|
|
2510
|
+
}
|
|
2511
|
+
function Dt(e, t, n) {
|
|
2512
|
+
const { style: s, vars: i, transformOrigin: r } = e;
|
|
2513
|
+
let o = !1, a = !1;
|
|
2514
|
+
for (const c in t) {
|
|
2515
|
+
const l = t[c];
|
|
2516
|
+
if (ue.has(c)) {
|
|
2517
|
+
o = !0;
|
|
2518
|
+
continue;
|
|
2519
|
+
} else if (Gn(c)) {
|
|
2520
|
+
i[c] = l;
|
|
2521
|
+
continue;
|
|
2522
|
+
} else {
|
|
2523
|
+
const u = Ts(l, Pt[c]);
|
|
2524
|
+
c.startsWith("origin") ? (a = !0, r[c] = u) : s[c] = u;
|
|
2525
|
+
}
|
|
2526
|
+
}
|
|
2527
|
+
if (t.transform || (o || n ? s.transform = Xo(t, e.transform, n) : s.transform && (s.transform = "none")), a) {
|
|
2528
|
+
const { originX: c = "50%", originY: l = "50%", originZ: u = 0 } = r;
|
|
2529
|
+
s.transformOrigin = `${c} ${l} ${u}`;
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
function Ps(e, { style: t, vars: n }, s, i) {
|
|
2649
2533
|
const r = e.style;
|
|
2650
2534
|
let o;
|
|
2651
2535
|
for (o in t)
|
|
@@ -2654,33 +2538,125 @@ function Ms(e, { style: t, vars: n }, s, i) {
|
|
|
2654
2538
|
for (o in n)
|
|
2655
2539
|
r.setProperty(o, n[o]);
|
|
2656
2540
|
}
|
|
2657
|
-
function
|
|
2541
|
+
function ln(e, t) {
|
|
2542
|
+
return t.max === t.min ? 0 : e / (t.max - t.min) * 100;
|
|
2543
|
+
}
|
|
2544
|
+
const le = {
|
|
2545
|
+
correct: (e, t) => {
|
|
2546
|
+
if (!t.target)
|
|
2547
|
+
return e;
|
|
2548
|
+
if (typeof e == "string")
|
|
2549
|
+
if (m.test(e))
|
|
2550
|
+
e = parseFloat(e);
|
|
2551
|
+
else
|
|
2552
|
+
return e;
|
|
2553
|
+
const n = ln(e, t.target.x), s = ln(e, t.target.y);
|
|
2554
|
+
return `${n}% ${s}%`;
|
|
2555
|
+
}
|
|
2556
|
+
}, qo = {
|
|
2557
|
+
correct: (e, { treeScale: t, projectionDelta: n }) => {
|
|
2558
|
+
const s = e, i = L.parse(e);
|
|
2559
|
+
if (i.length > 5)
|
|
2560
|
+
return s;
|
|
2561
|
+
const r = L.createTransformer(e), o = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * t.x, c = n.y.scale * t.y;
|
|
2562
|
+
i[0 + o] /= a, i[1 + o] /= c;
|
|
2563
|
+
const l = we(a, c, 0.5);
|
|
2564
|
+
return typeof i[2 + o] == "number" && (i[2 + o] /= l), typeof i[3 + o] == "number" && (i[3 + o] /= l), r(i);
|
|
2565
|
+
}
|
|
2566
|
+
}, Zo = {
|
|
2567
|
+
borderRadius: {
|
|
2568
|
+
...le,
|
|
2569
|
+
applyTo: [
|
|
2570
|
+
"borderTopLeftRadius",
|
|
2571
|
+
"borderTopRightRadius",
|
|
2572
|
+
"borderBottomLeftRadius",
|
|
2573
|
+
"borderBottomRightRadius"
|
|
2574
|
+
]
|
|
2575
|
+
},
|
|
2576
|
+
borderTopLeftRadius: le,
|
|
2577
|
+
borderTopRightRadius: le,
|
|
2578
|
+
borderBottomLeftRadius: le,
|
|
2579
|
+
borderBottomRightRadius: le,
|
|
2580
|
+
boxShadow: qo
|
|
2581
|
+
};
|
|
2582
|
+
function Fs(e, { layout: t, layoutId: n }) {
|
|
2583
|
+
return ue.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!Zo[e] || e === "opacity");
|
|
2584
|
+
}
|
|
2585
|
+
function kt(e, t, n) {
|
|
2586
|
+
var o;
|
|
2587
|
+
const s = e.style, i = t == null ? void 0 : t.style, r = {};
|
|
2588
|
+
if (!s)
|
|
2589
|
+
return r;
|
|
2590
|
+
for (const a in s)
|
|
2591
|
+
(R(s[a]) || i && R(i[a]) || Fs(a, e) || ((o = n == null ? void 0 : n.getValue(a)) == null ? void 0 : o.liveStyle) !== void 0) && (r[a] = s[a]);
|
|
2592
|
+
return r;
|
|
2593
|
+
}
|
|
2594
|
+
function Jo(e) {
|
|
2658
2595
|
return window.getComputedStyle(e);
|
|
2659
2596
|
}
|
|
2660
|
-
class
|
|
2597
|
+
class Qo extends Cs {
|
|
2661
2598
|
constructor() {
|
|
2662
|
-
super(...arguments), this.type = "html", this.renderInstance =
|
|
2599
|
+
super(...arguments), this.type = "html", this.renderInstance = Ps;
|
|
2663
2600
|
}
|
|
2664
2601
|
readValueFromInstance(t, n) {
|
|
2665
2602
|
var s;
|
|
2666
2603
|
if (ue.has(n))
|
|
2667
|
-
return (s = this.projection) != null && s.isProjecting ?
|
|
2604
|
+
return (s = this.projection) != null && s.isProjecting ? tt(n) : wr(t, n);
|
|
2668
2605
|
{
|
|
2669
|
-
const i =
|
|
2606
|
+
const i = Jo(t), r = (Gn(n) ? i.getPropertyValue(n) : i[n]) || 0;
|
|
2670
2607
|
return typeof r == "string" ? r.trim() : r;
|
|
2671
2608
|
}
|
|
2672
2609
|
}
|
|
2673
2610
|
measureInstanceViewportBox(t, { transformPagePoint: n }) {
|
|
2674
|
-
return
|
|
2611
|
+
return zo(t, n);
|
|
2675
2612
|
}
|
|
2676
2613
|
build(t, n, s) {
|
|
2677
|
-
|
|
2614
|
+
Dt(t, n, s.transformTemplate);
|
|
2678
2615
|
}
|
|
2679
2616
|
scrapeMotionValuesFromProps(t, n, s) {
|
|
2680
|
-
return
|
|
2617
|
+
return kt(t, n, s);
|
|
2681
2618
|
}
|
|
2682
2619
|
}
|
|
2683
|
-
const
|
|
2620
|
+
const ea = {
|
|
2621
|
+
offset: "stroke-dashoffset",
|
|
2622
|
+
array: "stroke-dasharray"
|
|
2623
|
+
}, ta = {
|
|
2624
|
+
offset: "strokeDashoffset",
|
|
2625
|
+
array: "strokeDasharray"
|
|
2626
|
+
};
|
|
2627
|
+
function na(e, t, n = 1, s = 0, i = !0) {
|
|
2628
|
+
e.pathLength = 1;
|
|
2629
|
+
const r = i ? ea : ta;
|
|
2630
|
+
e[r.offset] = `${-s}`, e[r.array] = `${t} ${n}`;
|
|
2631
|
+
}
|
|
2632
|
+
const sa = [
|
|
2633
|
+
"offsetDistance",
|
|
2634
|
+
"offsetPath",
|
|
2635
|
+
"offsetRotate",
|
|
2636
|
+
"offsetAnchor"
|
|
2637
|
+
];
|
|
2638
|
+
function Rs(e, {
|
|
2639
|
+
attrX: t,
|
|
2640
|
+
attrY: n,
|
|
2641
|
+
attrScale: s,
|
|
2642
|
+
pathLength: i,
|
|
2643
|
+
pathSpacing: r = 1,
|
|
2644
|
+
pathOffset: o = 0,
|
|
2645
|
+
// This is object creation, which we try to avoid per-frame.
|
|
2646
|
+
...a
|
|
2647
|
+
}, c, l, u) {
|
|
2648
|
+
if (Dt(e, a, l), c) {
|
|
2649
|
+
e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
|
|
2650
|
+
return;
|
|
2651
|
+
}
|
|
2652
|
+
e.attrs = e.style, e.style = {};
|
|
2653
|
+
const { attrs: d, style: f } = e;
|
|
2654
|
+
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 == null ? void 0 : u.transformBox) ?? "fill-box", delete d.transformBox);
|
|
2655
|
+
for (const h of sa)
|
|
2656
|
+
d[h] !== void 0 && (f[h] = d[h], delete d[h]);
|
|
2657
|
+
t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), s !== void 0 && (d.scale = s), i !== void 0 && na(d, i, r, o, !1);
|
|
2658
|
+
}
|
|
2659
|
+
const Ds = /* @__PURE__ */ new Set([
|
|
2684
2660
|
"baseFrequency",
|
|
2685
2661
|
"diffuseConstant",
|
|
2686
2662
|
"kernelMatrix",
|
|
@@ -2704,217 +2680,64 @@ const Cs = /* @__PURE__ */ new Set([
|
|
|
2704
2680
|
"startOffset",
|
|
2705
2681
|
"textLength",
|
|
2706
2682
|
"lengthAdjust"
|
|
2707
|
-
]);
|
|
2708
|
-
function
|
|
2709
|
-
|
|
2683
|
+
]), ks = (e) => typeof e == "string" && e.toLowerCase() === "svg";
|
|
2684
|
+
function ia(e, t, n, s) {
|
|
2685
|
+
Ps(e, t, void 0, s);
|
|
2710
2686
|
for (const i in t.attrs)
|
|
2711
|
-
e.setAttribute(
|
|
2687
|
+
e.setAttribute(Ds.has(i) ? i : Ct(i), t.attrs[i]);
|
|
2688
|
+
}
|
|
2689
|
+
function Is(e, t, n) {
|
|
2690
|
+
const s = kt(e, t, n);
|
|
2691
|
+
for (const i in e)
|
|
2692
|
+
if (R(e[i]) || R(t[i])) {
|
|
2693
|
+
const r = ae.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
2694
|
+
s[r] = e[i];
|
|
2695
|
+
}
|
|
2696
|
+
return s;
|
|
2712
2697
|
}
|
|
2713
|
-
class
|
|
2698
|
+
class ra extends Cs {
|
|
2714
2699
|
constructor() {
|
|
2715
|
-
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox =
|
|
2700
|
+
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Vs;
|
|
2716
2701
|
}
|
|
2717
2702
|
getBaseTargetFromProps(t, n) {
|
|
2718
2703
|
return t[n];
|
|
2719
2704
|
}
|
|
2720
2705
|
readValueFromInstance(t, n) {
|
|
2721
2706
|
if (ue.has(n)) {
|
|
2722
|
-
const s =
|
|
2707
|
+
const s = bs(n);
|
|
2723
2708
|
return s && s.default || 0;
|
|
2724
2709
|
}
|
|
2725
|
-
return n =
|
|
2710
|
+
return n = Ds.has(n) ? n : Ct(n), t.getAttribute(n);
|
|
2726
2711
|
}
|
|
2727
2712
|
scrapeMotionValuesFromProps(t, n, s) {
|
|
2728
|
-
return
|
|
2713
|
+
return Is(t, n, s);
|
|
2729
2714
|
}
|
|
2730
2715
|
build(t, n, s) {
|
|
2731
|
-
|
|
2716
|
+
Rs(t, n, this.isSVGTag, s.transformTemplate, s.style);
|
|
2732
2717
|
}
|
|
2733
2718
|
renderInstance(t, n, s, i) {
|
|
2734
|
-
|
|
2719
|
+
ia(t, n, s, i);
|
|
2735
2720
|
}
|
|
2736
2721
|
mount(t) {
|
|
2737
|
-
this.isSVGTag =
|
|
2738
|
-
}
|
|
2739
|
-
}
|
|
2740
|
-
const Qo = (e, t) => Rt(e) ? new Jo(t) : new qo(t, {
|
|
2741
|
-
allowProjection: e !== bn
|
|
2742
|
-
});
|
|
2743
|
-
function te(e, t, n) {
|
|
2744
|
-
const s = e.getProps();
|
|
2745
|
-
return Ot(s, t, n !== void 0 ? n : s.custom, e);
|
|
2746
|
-
}
|
|
2747
|
-
const at = (e) => Array.isArray(e);
|
|
2748
|
-
function ea(e, t, n) {
|
|
2749
|
-
e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, De(n));
|
|
2750
|
-
}
|
|
2751
|
-
function ta(e) {
|
|
2752
|
-
return at(e) ? e[e.length - 1] || 0 : e;
|
|
2753
|
-
}
|
|
2754
|
-
function na(e, t) {
|
|
2755
|
-
const n = te(e, t);
|
|
2756
|
-
let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
|
|
2757
|
-
r = { ...r, ...s };
|
|
2758
|
-
for (const o in r) {
|
|
2759
|
-
const a = ta(r[o]);
|
|
2760
|
-
ea(e, o, a);
|
|
2761
|
-
}
|
|
2762
|
-
}
|
|
2763
|
-
function sa(e) {
|
|
2764
|
-
return !!(D(e) && e.add);
|
|
2765
|
-
}
|
|
2766
|
-
function ia(e, t) {
|
|
2767
|
-
const n = e.getValue("willChange");
|
|
2768
|
-
if (sa(n))
|
|
2769
|
-
return n.add(t);
|
|
2770
|
-
if (!n && K.WillChange) {
|
|
2771
|
-
const s = new K.WillChange("auto");
|
|
2772
|
-
e.addValue("willChange", s), s.add(t);
|
|
2773
|
-
}
|
|
2774
|
-
}
|
|
2775
|
-
function ra(e) {
|
|
2776
|
-
return e.props[ws];
|
|
2777
|
-
}
|
|
2778
|
-
const oa = (e) => e !== null;
|
|
2779
|
-
function aa(e, { repeat: t, repeatType: n = "loop" }, s) {
|
|
2780
|
-
const i = e.filter(oa), r = t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
|
|
2781
|
-
return i[r];
|
|
2782
|
-
}
|
|
2783
|
-
const ua = {
|
|
2784
|
-
type: "spring",
|
|
2785
|
-
stiffness: 500,
|
|
2786
|
-
damping: 25,
|
|
2787
|
-
restSpeed: 10
|
|
2788
|
-
}, ca = (e) => ({
|
|
2789
|
-
type: "spring",
|
|
2790
|
-
stiffness: 550,
|
|
2791
|
-
damping: e === 0 ? 2 * Math.sqrt(550) : 30,
|
|
2792
|
-
restSpeed: 10
|
|
2793
|
-
}), la = {
|
|
2794
|
-
type: "keyframes",
|
|
2795
|
-
duration: 0.8
|
|
2796
|
-
}, fa = {
|
|
2797
|
-
type: "keyframes",
|
|
2798
|
-
ease: [0.25, 0.1, 0.35, 1],
|
|
2799
|
-
duration: 0.3
|
|
2800
|
-
}, da = (e, { keyframes: t }) => t.length > 2 ? la : ue.has(e) ? e.startsWith("scale") ? ca(t[1]) : ua : fa;
|
|
2801
|
-
function ha({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: c, elapsed: l, ...u }) {
|
|
2802
|
-
return !!Object.keys(u).length;
|
|
2803
|
-
}
|
|
2804
|
-
const pa = (e, t, n, s = {}, i, r) => (o) => {
|
|
2805
|
-
const a = ts(s, e) || {}, c = a.delay || s.delay || 0;
|
|
2806
|
-
let { elapsed: l = 0 } = s;
|
|
2807
|
-
l = l - /* @__PURE__ */ N(c);
|
|
2808
|
-
const u = {
|
|
2809
|
-
keyframes: Array.isArray(n) ? n : [null, n],
|
|
2810
|
-
ease: "easeOut",
|
|
2811
|
-
velocity: t.getVelocity(),
|
|
2812
|
-
...a,
|
|
2813
|
-
delay: -l,
|
|
2814
|
-
onUpdate: (d) => {
|
|
2815
|
-
t.set(d), a.onUpdate && a.onUpdate(d);
|
|
2816
|
-
},
|
|
2817
|
-
onComplete: () => {
|
|
2818
|
-
o(), a.onComplete && a.onComplete();
|
|
2819
|
-
},
|
|
2820
|
-
name: e,
|
|
2821
|
-
motionValue: t,
|
|
2822
|
-
element: r ? void 0 : i
|
|
2823
|
-
};
|
|
2824
|
-
ha(a) || Object.assign(u, da(e, u)), u.duration && (u.duration = /* @__PURE__ */ N(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ N(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
2825
|
-
let f = !1;
|
|
2826
|
-
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (it(u), u.delay === 0 && (f = !0)), (K.instantAnimations || K.skipAnimations) && (f = !0, it(u), u.delay = 0), u.allowFlatten = !a.type && !a.ease, f && !r && t.get() !== void 0) {
|
|
2827
|
-
const d = aa(u.keyframes, a);
|
|
2828
|
-
if (d !== void 0) {
|
|
2829
|
-
L.update(() => {
|
|
2830
|
-
u.onUpdate(d), u.onComplete();
|
|
2831
|
-
});
|
|
2832
|
-
return;
|
|
2833
|
-
}
|
|
2834
|
-
}
|
|
2835
|
-
return a.isSync ? new St(u) : new Or(u);
|
|
2836
|
-
};
|
|
2837
|
-
function ma({ protectedKeys: e, needsAnimating: t }, n) {
|
|
2838
|
-
const s = e.hasOwnProperty(n) && t[n] !== !0;
|
|
2839
|
-
return t[n] = !1, s;
|
|
2840
|
-
}
|
|
2841
|
-
function Ps(e, t, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
2842
|
-
let { transition: r = e.getDefaultTransition(), transitionEnd: o, ...a } = t;
|
|
2843
|
-
s && (r = s);
|
|
2844
|
-
const c = [], l = i && e.animationState && e.animationState.getState()[i];
|
|
2845
|
-
for (const u in a) {
|
|
2846
|
-
const f = e.getValue(u, e.latestValues[u] ?? null), d = a[u];
|
|
2847
|
-
if (d === void 0 || l && ma(l, u))
|
|
2848
|
-
continue;
|
|
2849
|
-
const h = {
|
|
2850
|
-
delay: n,
|
|
2851
|
-
...ts(r || {}, u)
|
|
2852
|
-
}, y = f.get();
|
|
2853
|
-
if (y !== void 0 && !f.isAnimating && !Array.isArray(d) && d === y && !h.velocity)
|
|
2854
|
-
continue;
|
|
2855
|
-
let b = !1;
|
|
2856
|
-
if (window.MotionHandoffAnimation) {
|
|
2857
|
-
const p = ra(e);
|
|
2858
|
-
if (p) {
|
|
2859
|
-
const V = window.MotionHandoffAnimation(p, u, L);
|
|
2860
|
-
V !== null && (h.startTime = V, b = !0);
|
|
2861
|
-
}
|
|
2862
|
-
}
|
|
2863
|
-
ia(e, u), f.start(pa(u, f, d, e.shouldReduceMotion && ns.has(u) ? { type: !1 } : h, e, b));
|
|
2864
|
-
const v = f.animation;
|
|
2865
|
-
v && c.push(v);
|
|
2722
|
+
this.isSVGTag = ks(t.tagName), super.mount(t);
|
|
2866
2723
|
}
|
|
2867
|
-
return o && Promise.all(c).then(() => {
|
|
2868
|
-
L.update(() => {
|
|
2869
|
-
o && na(e, o);
|
|
2870
|
-
});
|
|
2871
|
-
}), c;
|
|
2872
|
-
}
|
|
2873
|
-
function Fs(e, t, n, s = 0, i = 1) {
|
|
2874
|
-
const r = Array.from(e).sort((l, u) => l.sortNodePosition(u)).indexOf(t), o = e.size, a = (o - 1) * s;
|
|
2875
|
-
return typeof n == "function" ? n(r, o) : i === 1 ? r * s : a - r * s;
|
|
2876
|
-
}
|
|
2877
|
-
function ut(e, t, n = {}) {
|
|
2878
|
-
var c;
|
|
2879
|
-
const s = te(e, t, n.type === "exit" ? (c = e.presenceContext) == null ? void 0 : c.custom : void 0);
|
|
2880
|
-
let { transition: i = e.getDefaultTransition() || {} } = s || {};
|
|
2881
|
-
n.transitionOverride && (i = n.transitionOverride);
|
|
2882
|
-
const r = s ? () => Promise.all(Ps(e, s, n)) : () => Promise.resolve(), o = e.variantChildren && e.variantChildren.size ? (l = 0) => {
|
|
2883
|
-
const { delayChildren: u = 0, staggerChildren: f, staggerDirection: d } = i;
|
|
2884
|
-
return ga(e, t, l, u, f, d, n);
|
|
2885
|
-
} : () => Promise.resolve(), { when: a } = i;
|
|
2886
|
-
if (a) {
|
|
2887
|
-
const [l, u] = a === "beforeChildren" ? [r, o] : [o, r];
|
|
2888
|
-
return l().then(() => u());
|
|
2889
|
-
} else
|
|
2890
|
-
return Promise.all([r(), o(n.delay)]);
|
|
2891
|
-
}
|
|
2892
|
-
function ga(e, t, n = 0, s = 0, i = 0, r = 1, o) {
|
|
2893
|
-
const a = [];
|
|
2894
|
-
for (const c of e.variantChildren)
|
|
2895
|
-
c.notify("AnimationStart", t), a.push(ut(c, t, {
|
|
2896
|
-
...o,
|
|
2897
|
-
delay: n + (typeof s == "function" ? 0 : s) + Fs(e.variantChildren, c, s, i, r)
|
|
2898
|
-
}).then(() => c.notify("AnimationComplete", t)));
|
|
2899
|
-
return Promise.all(a);
|
|
2900
2724
|
}
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
s = ut(e, t, n);
|
|
2909
|
-
else {
|
|
2910
|
-
const i = typeof t == "function" ? te(e, t, n.custom) : t;
|
|
2911
|
-
s = Promise.all(Ps(e, i, n));
|
|
2725
|
+
const oa = Rt.length;
|
|
2726
|
+
function Os(e) {
|
|
2727
|
+
if (!e)
|
|
2728
|
+
return;
|
|
2729
|
+
if (!e.isControllingVariants) {
|
|
2730
|
+
const n = e.parent ? Os(e.parent) || {} : {};
|
|
2731
|
+
return e.props.initial !== void 0 && (n.initial = e.props.initial), n;
|
|
2912
2732
|
}
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2733
|
+
const t = {};
|
|
2734
|
+
for (let n = 0; n < oa; n++) {
|
|
2735
|
+
const s = Rt[n], i = e.props[s];
|
|
2736
|
+
(me(i) || i === !1) && (t[s] = i);
|
|
2737
|
+
}
|
|
2738
|
+
return t;
|
|
2916
2739
|
}
|
|
2917
|
-
function
|
|
2740
|
+
function Es(e, t) {
|
|
2918
2741
|
if (!Array.isArray(t))
|
|
2919
2742
|
return !1;
|
|
2920
2743
|
const n = t.length;
|
|
@@ -2925,33 +2748,18 @@ function Ds(e, t) {
|
|
|
2925
2748
|
return !1;
|
|
2926
2749
|
return !0;
|
|
2927
2750
|
}
|
|
2928
|
-
const
|
|
2929
|
-
function
|
|
2930
|
-
|
|
2931
|
-
return;
|
|
2932
|
-
if (!e.isControllingVariants) {
|
|
2933
|
-
const n = e.parent ? Rs(e.parent) || {} : {};
|
|
2934
|
-
return e.props.initial !== void 0 && (n.initial = e.props.initial), n;
|
|
2935
|
-
}
|
|
2936
|
-
const t = {};
|
|
2937
|
-
for (let n = 0; n < ba; n++) {
|
|
2938
|
-
const s = Pt[n], i = e.props[s];
|
|
2939
|
-
(me(i) || i === !1) && (t[s] = i);
|
|
2940
|
-
}
|
|
2941
|
-
return t;
|
|
2942
|
-
}
|
|
2943
|
-
const Ta = [...Ct].reverse(), va = Ct.length;
|
|
2944
|
-
function wa(e) {
|
|
2945
|
-
return (t) => Promise.all(t.map(({ animation: n, options: s }) => ya(e, n, s)));
|
|
2751
|
+
const aa = [...Ft].reverse(), ua = Ft.length;
|
|
2752
|
+
function ca(e) {
|
|
2753
|
+
return (t) => Promise.all(t.map(({ animation: n, options: s }) => lo(e, n, s)));
|
|
2946
2754
|
}
|
|
2947
|
-
function
|
|
2948
|
-
let t =
|
|
2755
|
+
function la(e) {
|
|
2756
|
+
let t = ca(e), n = fn(), s = !0;
|
|
2949
2757
|
const i = (c) => (l, u) => {
|
|
2950
|
-
var
|
|
2951
|
-
const
|
|
2952
|
-
if (
|
|
2953
|
-
const { transition: h, transitionEnd:
|
|
2954
|
-
l = { ...l, ...b, ...
|
|
2758
|
+
var f;
|
|
2759
|
+
const d = se(e, u, c === "exit" ? (f = e.presenceContext) == null ? void 0 : f.custom : void 0);
|
|
2760
|
+
if (d) {
|
|
2761
|
+
const { transition: h, transitionEnd: p, ...b } = d;
|
|
2762
|
+
l = { ...l, ...b, ...p };
|
|
2955
2763
|
}
|
|
2956
2764
|
return l;
|
|
2957
2765
|
};
|
|
@@ -2959,81 +2767,88 @@ function Va(e) {
|
|
|
2959
2767
|
t = c(e);
|
|
2960
2768
|
}
|
|
2961
2769
|
function o(c) {
|
|
2962
|
-
const { props: l } = e, u =
|
|
2963
|
-
let h = {},
|
|
2964
|
-
for (let
|
|
2965
|
-
const
|
|
2966
|
-
T === !1 && (
|
|
2967
|
-
let
|
|
2968
|
-
if (
|
|
2969
|
-
!
|
|
2970
|
-
!
|
|
2971
|
-
|
|
2770
|
+
const { props: l } = e, u = Os(e.parent) || {}, d = [], f = /* @__PURE__ */ new Set();
|
|
2771
|
+
let h = {}, p = 1 / 0;
|
|
2772
|
+
for (let y = 0; y < ua; y++) {
|
|
2773
|
+
const g = aa[y], v = n[g], w = l[g] !== void 0 ? l[g] : u[g], V = me(w), T = g === c ? v.isActive : null;
|
|
2774
|
+
T === !1 && (p = y);
|
|
2775
|
+
let x = w === u[g] && w !== l[g] && V;
|
|
2776
|
+
if (x && s && e.manuallyAnimateOnMount && (x = !1), v.protectedKeys = { ...h }, // If it isn't active and hasn't *just* been set as inactive
|
|
2777
|
+
!v.isActive && T === null || // If we didn't and don't have any defined prop for this animation type
|
|
2778
|
+
!w && !v.prevProp || // Or if the prop doesn't define an animation
|
|
2779
|
+
Be(w) || typeof w == "boolean")
|
|
2780
|
+
continue;
|
|
2781
|
+
if (g === "exit" && v.isActive && T !== !0) {
|
|
2782
|
+
v.prevResolvedValues && (h = {
|
|
2783
|
+
...h,
|
|
2784
|
+
...v.prevResolvedValues
|
|
2785
|
+
});
|
|
2972
2786
|
continue;
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
...
|
|
2787
|
+
}
|
|
2788
|
+
const C = fa(v.prevProp, w);
|
|
2789
|
+
let S = C || // If we're making this variant active, we want to always make it active
|
|
2790
|
+
g === c && v.isActive && !x && V || // If we removed a higher-priority variant (i is in reverse order)
|
|
2791
|
+
y > p && V, D = !1;
|
|
2792
|
+
const I = Array.isArray(w) ? w : [w];
|
|
2793
|
+
let J = I.reduce(i(g), {});
|
|
2794
|
+
T === !1 && (J = {});
|
|
2795
|
+
const { prevResolvedValues: Bt = {} } = v, Zs = {
|
|
2796
|
+
...Bt,
|
|
2797
|
+
...J
|
|
2983
2798
|
}, Lt = (P) => {
|
|
2984
|
-
|
|
2985
|
-
const
|
|
2986
|
-
|
|
2799
|
+
S = !0, f.has(P) && (D = !0, f.delete(P)), v.needsAnimating[P] = !0;
|
|
2800
|
+
const O = e.getValue(P);
|
|
2801
|
+
O && (O.liveStyle = !1);
|
|
2987
2802
|
};
|
|
2988
|
-
for (const P in
|
|
2989
|
-
const
|
|
2803
|
+
for (const P in Zs) {
|
|
2804
|
+
const O = J[P], H = Bt[P];
|
|
2990
2805
|
if (h.hasOwnProperty(P))
|
|
2991
2806
|
continue;
|
|
2992
|
-
let
|
|
2993
|
-
at(
|
|
2807
|
+
let Q = !1;
|
|
2808
|
+
at(O) && at(H) ? Q = !Es(O, H) : Q = O !== H, Q ? O != null ? Lt(P) : f.add(P) : O !== void 0 && f.has(P) ? Lt(P) : v.protectedKeys[P] = !0;
|
|
2994
2809
|
}
|
|
2995
|
-
|
|
2996
|
-
const Nt =
|
|
2997
|
-
|
|
2998
|
-
const
|
|
2810
|
+
v.prevProp = w, v.prevResolvedValues = J, v.isActive && (h = { ...h, ...J }), s && e.blockInitialAnimation && (S = !1);
|
|
2811
|
+
const Nt = x && C;
|
|
2812
|
+
S && (!Nt || D) && d.push(...I.map((P) => {
|
|
2813
|
+
const O = { type: g };
|
|
2999
2814
|
if (typeof P == "string" && s && !Nt && e.manuallyAnimateOnMount && e.parent) {
|
|
3000
|
-
const { parent:
|
|
3001
|
-
if (
|
|
3002
|
-
const { delayChildren:
|
|
3003
|
-
|
|
2815
|
+
const { parent: H } = e, Q = se(H, P);
|
|
2816
|
+
if (H.enteringChildren && Q) {
|
|
2817
|
+
const { delayChildren: Js } = Q.transition || {};
|
|
2818
|
+
O.delay = cs(H.enteringChildren, e, Js);
|
|
3004
2819
|
}
|
|
3005
2820
|
}
|
|
3006
2821
|
return {
|
|
3007
2822
|
animation: P,
|
|
3008
|
-
options:
|
|
2823
|
+
options: O
|
|
3009
2824
|
};
|
|
3010
2825
|
}));
|
|
3011
2826
|
}
|
|
3012
|
-
if (
|
|
3013
|
-
const
|
|
2827
|
+
if (f.size) {
|
|
2828
|
+
const y = {};
|
|
3014
2829
|
if (typeof l.initial != "boolean") {
|
|
3015
|
-
const
|
|
3016
|
-
|
|
2830
|
+
const g = se(e, Array.isArray(l.initial) ? l.initial[0] : l.initial);
|
|
2831
|
+
g && g.transition && (y.transition = g.transition);
|
|
3017
2832
|
}
|
|
3018
|
-
|
|
3019
|
-
const
|
|
3020
|
-
|
|
3021
|
-
}),
|
|
2833
|
+
f.forEach((g) => {
|
|
2834
|
+
const v = e.getBaseTarget(g), w = e.getValue(g);
|
|
2835
|
+
w && (w.liveStyle = !0), y[g] = v ?? null;
|
|
2836
|
+
}), d.push({ animation: y });
|
|
3022
2837
|
}
|
|
3023
|
-
let b = !!
|
|
3024
|
-
return s && (l.initial === !1 || l.initial === l.animate) && !e.manuallyAnimateOnMount && (b = !1), s = !1, b ? t(
|
|
2838
|
+
let b = !!d.length;
|
|
2839
|
+
return s && (l.initial === !1 || l.initial === l.animate) && !e.manuallyAnimateOnMount && (b = !1), s = !1, b ? t(d) : Promise.resolve();
|
|
3025
2840
|
}
|
|
3026
2841
|
function a(c, l) {
|
|
3027
|
-
var
|
|
2842
|
+
var d;
|
|
3028
2843
|
if (n[c].isActive === l)
|
|
3029
2844
|
return Promise.resolve();
|
|
3030
|
-
(
|
|
2845
|
+
(d = e.variantChildren) == null || d.forEach((f) => {
|
|
3031
2846
|
var h;
|
|
3032
|
-
return (h =
|
|
2847
|
+
return (h = f.animationState) == null ? void 0 : h.setActive(c, l);
|
|
3033
2848
|
}), n[c].isActive = l;
|
|
3034
2849
|
const u = o(c);
|
|
3035
|
-
for (const
|
|
3036
|
-
n[
|
|
2850
|
+
for (const f in n)
|
|
2851
|
+
n[f].protectedKeys = {};
|
|
3037
2852
|
return u;
|
|
3038
2853
|
}
|
|
3039
2854
|
return {
|
|
@@ -3042,14 +2857,14 @@ function Va(e) {
|
|
|
3042
2857
|
setAnimateFunction: r,
|
|
3043
2858
|
getState: () => n,
|
|
3044
2859
|
reset: () => {
|
|
3045
|
-
n =
|
|
2860
|
+
n = fn();
|
|
3046
2861
|
}
|
|
3047
2862
|
};
|
|
3048
2863
|
}
|
|
3049
|
-
function
|
|
3050
|
-
return typeof t == "string" ? t !== e : Array.isArray(t) ? !
|
|
2864
|
+
function fa(e, t) {
|
|
2865
|
+
return typeof t == "string" ? t !== e : Array.isArray(t) ? !Es(t, e) : !1;
|
|
3051
2866
|
}
|
|
3052
|
-
function
|
|
2867
|
+
function z(e = !1) {
|
|
3053
2868
|
return {
|
|
3054
2869
|
isActive: e,
|
|
3055
2870
|
protectedKeys: {},
|
|
@@ -3057,36 +2872,425 @@ function j(e = !1) {
|
|
|
3057
2872
|
prevResolvedValues: {}
|
|
3058
2873
|
};
|
|
3059
2874
|
}
|
|
3060
|
-
function
|
|
2875
|
+
function fn() {
|
|
3061
2876
|
return {
|
|
3062
|
-
animate:
|
|
3063
|
-
whileInView:
|
|
3064
|
-
whileHover:
|
|
3065
|
-
whileTap:
|
|
3066
|
-
whileDrag:
|
|
3067
|
-
whileFocus:
|
|
3068
|
-
exit:
|
|
2877
|
+
animate: z(!0),
|
|
2878
|
+
whileInView: z(),
|
|
2879
|
+
whileHover: z(),
|
|
2880
|
+
whileTap: z(),
|
|
2881
|
+
whileDrag: z(),
|
|
2882
|
+
whileFocus: z(),
|
|
2883
|
+
exit: z()
|
|
3069
2884
|
};
|
|
3070
2885
|
}
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
2886
|
+
function dn(e, t, n, s = { passive: !0 }) {
|
|
2887
|
+
return e.addEventListener(t, n, s), () => e.removeEventListener(t, n);
|
|
2888
|
+
}
|
|
2889
|
+
function da(e) {
|
|
2890
|
+
return R(e) ? e.get() : e;
|
|
2891
|
+
}
|
|
2892
|
+
const Bs = ie({
|
|
2893
|
+
transformPagePoint: (e) => e,
|
|
2894
|
+
isStatic: !1,
|
|
2895
|
+
reducedMotion: "never"
|
|
2896
|
+
}), It = ie({ strict: !1 }), hn = {
|
|
2897
|
+
animation: [
|
|
2898
|
+
"animate",
|
|
2899
|
+
"variants",
|
|
2900
|
+
"whileHover",
|
|
2901
|
+
"whileTap",
|
|
2902
|
+
"exit",
|
|
2903
|
+
"whileInView",
|
|
2904
|
+
"whileFocus",
|
|
2905
|
+
"whileDrag"
|
|
2906
|
+
],
|
|
2907
|
+
exit: ["exit"],
|
|
2908
|
+
drag: ["drag", "dragControls"],
|
|
2909
|
+
focus: ["whileFocus"],
|
|
2910
|
+
hover: ["whileHover", "onHoverStart", "onHoverEnd"],
|
|
2911
|
+
tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
|
|
2912
|
+
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
2913
|
+
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
2914
|
+
layout: ["layout", "layoutId"]
|
|
2915
|
+
};
|
|
2916
|
+
let pn = !1;
|
|
2917
|
+
function ha() {
|
|
2918
|
+
if (pn)
|
|
2919
|
+
return;
|
|
2920
|
+
const e = {};
|
|
2921
|
+
for (const t in hn)
|
|
2922
|
+
e[t] = {
|
|
2923
|
+
isEnabled: (n) => hn[t].some((s) => !!n[s])
|
|
2924
|
+
};
|
|
2925
|
+
Ms(e), pn = !0;
|
|
2926
|
+
}
|
|
2927
|
+
function Ls() {
|
|
2928
|
+
return ha(), jo();
|
|
2929
|
+
}
|
|
2930
|
+
function mn(e) {
|
|
2931
|
+
const t = Ls();
|
|
2932
|
+
for (const n in e)
|
|
2933
|
+
t[n] = {
|
|
2934
|
+
...t[n],
|
|
2935
|
+
...e[n]
|
|
2936
|
+
};
|
|
2937
|
+
Ms(t);
|
|
2938
|
+
}
|
|
2939
|
+
function pa({ children: e, features: t, strict: n = !1 }) {
|
|
2940
|
+
const [, s] = ai(!He(t)), i = j(void 0);
|
|
2941
|
+
if (!He(t)) {
|
|
2942
|
+
const { renderer: r, ...o } = t;
|
|
2943
|
+
i.current = r, mn(o);
|
|
3074
2944
|
}
|
|
3075
|
-
|
|
2945
|
+
return pt(() => {
|
|
2946
|
+
He(t) && t().then(({ renderer: r, ...o }) => {
|
|
2947
|
+
mn(o), i.current = r, s(!0);
|
|
2948
|
+
});
|
|
2949
|
+
}, []), F(It.Provider, { value: { renderer: i.current, strict: n }, children: e });
|
|
2950
|
+
}
|
|
2951
|
+
function He(e) {
|
|
2952
|
+
return typeof e == "function";
|
|
2953
|
+
}
|
|
2954
|
+
const ma = /* @__PURE__ */ new Set([
|
|
2955
|
+
"animate",
|
|
2956
|
+
"exit",
|
|
2957
|
+
"variants",
|
|
2958
|
+
"initial",
|
|
2959
|
+
"style",
|
|
2960
|
+
"values",
|
|
2961
|
+
"variants",
|
|
2962
|
+
"transition",
|
|
2963
|
+
"transformTemplate",
|
|
2964
|
+
"custom",
|
|
2965
|
+
"inherit",
|
|
2966
|
+
"onBeforeLayoutMeasure",
|
|
2967
|
+
"onAnimationStart",
|
|
2968
|
+
"onAnimationComplete",
|
|
2969
|
+
"onUpdate",
|
|
2970
|
+
"onDragStart",
|
|
2971
|
+
"onDrag",
|
|
2972
|
+
"onDragEnd",
|
|
2973
|
+
"onMeasureDragConstraints",
|
|
2974
|
+
"onDirectionLock",
|
|
2975
|
+
"onDragTransitionEnd",
|
|
2976
|
+
"_dragX",
|
|
2977
|
+
"_dragY",
|
|
2978
|
+
"onHoverStart",
|
|
2979
|
+
"onHoverEnd",
|
|
2980
|
+
"onViewportEnter",
|
|
2981
|
+
"onViewportLeave",
|
|
2982
|
+
"globalTapTarget",
|
|
2983
|
+
"propagate",
|
|
2984
|
+
"ignoreStrict",
|
|
2985
|
+
"viewport"
|
|
2986
|
+
]);
|
|
2987
|
+
function Ie(e) {
|
|
2988
|
+
return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || ma.has(e);
|
|
2989
|
+
}
|
|
2990
|
+
let Ns = (e) => !Ie(e);
|
|
2991
|
+
function ga(e) {
|
|
2992
|
+
typeof e == "function" && (Ns = (t) => t.startsWith("on") ? !Ie(t) : e(t));
|
|
2993
|
+
}
|
|
2994
|
+
try {
|
|
2995
|
+
ga(require("@emotion/is-prop-valid").default);
|
|
2996
|
+
} catch {
|
|
2997
|
+
}
|
|
2998
|
+
function ya(e, t, n) {
|
|
2999
|
+
const s = {};
|
|
3000
|
+
for (const i in e)
|
|
3001
|
+
i === "values" && typeof e.values == "object" || (Ns(i) || n === !0 && Ie(i) || !t && !Ie(i) || // If trying to use native HTML drag events, forward drag listeners
|
|
3002
|
+
e.draggable && i.startsWith("onDrag")) && (s[i] = e[i]);
|
|
3003
|
+
return s;
|
|
3004
|
+
}
|
|
3005
|
+
const Ne = /* @__PURE__ */ ie({});
|
|
3006
|
+
function ba(e, t) {
|
|
3007
|
+
if (Le(e)) {
|
|
3008
|
+
const { initial: n, animate: s } = e;
|
|
3009
|
+
return {
|
|
3010
|
+
initial: n === !1 || me(n) ? n : void 0,
|
|
3011
|
+
animate: me(s) ? s : void 0
|
|
3012
|
+
};
|
|
3013
|
+
}
|
|
3014
|
+
return e.inherit !== !1 ? t : {};
|
|
3015
|
+
}
|
|
3016
|
+
function wa(e) {
|
|
3017
|
+
const { initial: t, animate: n } = ba(e, E(Ne));
|
|
3018
|
+
return Oe(() => ({ initial: t, animate: n }), [gn(t), gn(n)]);
|
|
3019
|
+
}
|
|
3020
|
+
function gn(e) {
|
|
3021
|
+
return Array.isArray(e) ? e.join(" ") : e;
|
|
3022
|
+
}
|
|
3023
|
+
const Ot = () => ({
|
|
3024
|
+
style: {},
|
|
3025
|
+
transform: {},
|
|
3026
|
+
transformOrigin: {},
|
|
3027
|
+
vars: {}
|
|
3028
|
+
});
|
|
3029
|
+
function Ks(e, t, n) {
|
|
3030
|
+
for (const s in t)
|
|
3031
|
+
!R(t[s]) && !Fs(s, n) && (e[s] = t[s]);
|
|
3032
|
+
}
|
|
3033
|
+
function Ta({ transformTemplate: e }, t) {
|
|
3034
|
+
return Oe(() => {
|
|
3035
|
+
const n = Ot();
|
|
3036
|
+
return Dt(n, t, e), Object.assign({}, n.vars, n.style);
|
|
3037
|
+
}, [t]);
|
|
3038
|
+
}
|
|
3039
|
+
function va(e, t) {
|
|
3040
|
+
const n = e.style || {}, s = {};
|
|
3041
|
+
return Ks(s, n, e), Object.assign(s, Ta(e, t)), s;
|
|
3042
|
+
}
|
|
3043
|
+
function Sa(e, t) {
|
|
3044
|
+
const n = {}, s = va(e, t);
|
|
3045
|
+
return e.drag && e.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.touchAction = e.drag === !0 ? "none" : `pan-${e.drag === "x" ? "y" : "x"}`), e.tabIndex === void 0 && (e.onTap || e.onTapStart || e.whileTap) && (n.tabIndex = 0), n.style = s, n;
|
|
3046
|
+
}
|
|
3047
|
+
const $s = () => ({
|
|
3048
|
+
...Ot(),
|
|
3049
|
+
attrs: {}
|
|
3050
|
+
});
|
|
3051
|
+
function Va(e, t, n, s) {
|
|
3052
|
+
const i = Oe(() => {
|
|
3053
|
+
const r = $s();
|
|
3054
|
+
return Rs(r, t, ks(s), e.transformTemplate, e.style), {
|
|
3055
|
+
...r.attrs,
|
|
3056
|
+
style: { ...r.style }
|
|
3057
|
+
};
|
|
3058
|
+
}, [t]);
|
|
3059
|
+
if (e.style) {
|
|
3060
|
+
const r = {};
|
|
3061
|
+
Ks(r, e.style, e), i.style = { ...r, ...i.style };
|
|
3062
|
+
}
|
|
3063
|
+
return i;
|
|
3064
|
+
}
|
|
3065
|
+
const xa = [
|
|
3066
|
+
"animate",
|
|
3067
|
+
"circle",
|
|
3068
|
+
"defs",
|
|
3069
|
+
"desc",
|
|
3070
|
+
"ellipse",
|
|
3071
|
+
"g",
|
|
3072
|
+
"image",
|
|
3073
|
+
"line",
|
|
3074
|
+
"filter",
|
|
3075
|
+
"marker",
|
|
3076
|
+
"mask",
|
|
3077
|
+
"metadata",
|
|
3078
|
+
"path",
|
|
3079
|
+
"pattern",
|
|
3080
|
+
"polygon",
|
|
3081
|
+
"polyline",
|
|
3082
|
+
"rect",
|
|
3083
|
+
"stop",
|
|
3084
|
+
"switch",
|
|
3085
|
+
"symbol",
|
|
3086
|
+
"svg",
|
|
3087
|
+
"text",
|
|
3088
|
+
"tspan",
|
|
3089
|
+
"use",
|
|
3090
|
+
"view"
|
|
3091
|
+
];
|
|
3092
|
+
function Et(e) {
|
|
3093
|
+
return (
|
|
3094
|
+
/**
|
|
3095
|
+
* If it's not a string, it's a custom React component. Currently we only support
|
|
3096
|
+
* HTML custom React components.
|
|
3097
|
+
*/
|
|
3098
|
+
typeof e != "string" || /**
|
|
3099
|
+
* If it contains a dash, the element is a custom HTML webcomponent.
|
|
3100
|
+
*/
|
|
3101
|
+
e.includes("-") ? !1 : (
|
|
3102
|
+
/**
|
|
3103
|
+
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
3104
|
+
*/
|
|
3105
|
+
!!(xa.indexOf(e) > -1 || /**
|
|
3106
|
+
* If it contains a capital letter, it's an SVG component
|
|
3107
|
+
*/
|
|
3108
|
+
/[A-Z]/u.test(e))
|
|
3109
|
+
)
|
|
3110
|
+
);
|
|
3111
|
+
}
|
|
3112
|
+
function Aa(e, t, n, { latestValues: s }, i, r = !1, o) {
|
|
3113
|
+
const c = (o ?? Et(e) ? Va : Sa)(t, s, i, e), l = ya(t, typeof e == "string", r), u = e !== Sn ? { ...l, ...c, ref: n } : {}, { children: d } = t, f = Oe(() => R(d) ? d.get() : d, [d]);
|
|
3114
|
+
return ui(e, {
|
|
3115
|
+
...u,
|
|
3116
|
+
children: f
|
|
3117
|
+
});
|
|
3118
|
+
}
|
|
3119
|
+
function Ma({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, s, i) {
|
|
3120
|
+
return {
|
|
3121
|
+
latestValues: Ca(n, s, i, e),
|
|
3122
|
+
renderState: t()
|
|
3123
|
+
};
|
|
3124
|
+
}
|
|
3125
|
+
function Ca(e, t, n, s) {
|
|
3126
|
+
const i = {}, r = s(e, {});
|
|
3127
|
+
for (const f in r)
|
|
3128
|
+
i[f] = da(r[f]);
|
|
3129
|
+
let { initial: o, animate: a } = e;
|
|
3130
|
+
const c = Le(e), l = xs(e);
|
|
3131
|
+
t && l && !c && e.inherit !== !1 && (o === void 0 && (o = t.initial), a === void 0 && (a = t.animate));
|
|
3132
|
+
let u = n ? n.initial === !1 : !1;
|
|
3133
|
+
u = u || o === !1;
|
|
3134
|
+
const d = u ? a : o;
|
|
3135
|
+
if (d && typeof d != "boolean" && !Be(d)) {
|
|
3136
|
+
const f = Array.isArray(d) ? d : [d];
|
|
3137
|
+
for (let h = 0; h < f.length; h++) {
|
|
3138
|
+
const p = Mt(e, f[h]);
|
|
3139
|
+
if (p) {
|
|
3140
|
+
const { transitionEnd: b, transition: y, ...g } = p;
|
|
3141
|
+
for (const v in g) {
|
|
3142
|
+
let w = g[v];
|
|
3143
|
+
if (Array.isArray(w)) {
|
|
3144
|
+
const V = u ? w.length - 1 : 0;
|
|
3145
|
+
w = w[V];
|
|
3146
|
+
}
|
|
3147
|
+
w !== null && (i[v] = w);
|
|
3148
|
+
}
|
|
3149
|
+
for (const v in b)
|
|
3150
|
+
i[v] = b[v];
|
|
3151
|
+
}
|
|
3152
|
+
}
|
|
3153
|
+
}
|
|
3154
|
+
return i;
|
|
3155
|
+
}
|
|
3156
|
+
const Ws = (e) => (t, n) => {
|
|
3157
|
+
const s = E(Ne), i = E(An), r = () => Ma(e, t, s, i);
|
|
3158
|
+
return n ? r() : di(r);
|
|
3159
|
+
}, Pa = /* @__PURE__ */ Ws({
|
|
3160
|
+
scrapeMotionValuesFromProps: kt,
|
|
3161
|
+
createRenderState: Ot
|
|
3162
|
+
}), Fa = /* @__PURE__ */ Ws({
|
|
3163
|
+
scrapeMotionValuesFromProps: Is,
|
|
3164
|
+
createRenderState: $s
|
|
3165
|
+
}), Ra = Symbol.for("motionComponentSymbol");
|
|
3166
|
+
function Da(e, t, n) {
|
|
3167
|
+
const s = j(n);
|
|
3168
|
+
Vn(() => {
|
|
3169
|
+
s.current = n;
|
|
3170
|
+
});
|
|
3171
|
+
const i = j(null);
|
|
3172
|
+
return ci((r) => {
|
|
3173
|
+
var a;
|
|
3174
|
+
r && ((a = e.onMount) == null || a.call(e, r)), t && (r ? t.mount(r) : t.unmount());
|
|
3175
|
+
const o = s.current;
|
|
3176
|
+
if (typeof o == "function")
|
|
3177
|
+
if (r) {
|
|
3178
|
+
const c = o(r);
|
|
3179
|
+
typeof c == "function" && (i.current = c);
|
|
3180
|
+
} else i.current ? (i.current(), i.current = null) : o(r);
|
|
3181
|
+
else o && (o.current = r);
|
|
3182
|
+
}, [t]);
|
|
3183
|
+
}
|
|
3184
|
+
const ka = ie({});
|
|
3185
|
+
function Ia(e) {
|
|
3186
|
+
return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
|
|
3187
|
+
}
|
|
3188
|
+
function Oa(e, t, n, s, i, r) {
|
|
3189
|
+
var w, V;
|
|
3190
|
+
const { visualElement: o } = E(Ne), a = E(It), c = E(An), l = E(Bs), u = l.reducedMotion, d = l.skipAnimations, f = j(null), h = j(!1);
|
|
3191
|
+
s = s || a.renderer, !f.current && s && (f.current = s(e, {
|
|
3192
|
+
visualState: t,
|
|
3193
|
+
parent: o,
|
|
3194
|
+
props: n,
|
|
3195
|
+
presenceContext: c,
|
|
3196
|
+
blockInitialAnimation: c ? c.initial === !1 : !1,
|
|
3197
|
+
reducedMotionConfig: u,
|
|
3198
|
+
skipAnimations: d,
|
|
3199
|
+
isSVG: r
|
|
3200
|
+
}), h.current && f.current && (f.current.manuallyAnimateOnMount = !0));
|
|
3201
|
+
const p = f.current, b = E(ka);
|
|
3202
|
+
p && !p.projection && i && (p.type === "html" || p.type === "svg") && Ea(f.current, n, i, b);
|
|
3203
|
+
const y = j(!1);
|
|
3204
|
+
Vn(() => {
|
|
3205
|
+
p && y.current && p.update(n, c);
|
|
3206
|
+
});
|
|
3207
|
+
const g = n[ps], v = j(!!g && !((w = window.MotionHandoffIsComplete) != null && w.call(window, g)) && ((V = window.MotionHasOptimisedAnimation) == null ? void 0 : V.call(window, g)));
|
|
3208
|
+
return hi(() => {
|
|
3209
|
+
h.current = !0, p && (y.current = !0, window.MotionIsMounted = !0, p.updateFeatures(), p.scheduleRenderMicrotask(), v.current && p.animationState && p.animationState.animateChanges());
|
|
3210
|
+
}), pt(() => {
|
|
3211
|
+
p && (!v.current && p.animationState && p.animationState.animateChanges(), v.current && (queueMicrotask(() => {
|
|
3212
|
+
var T;
|
|
3213
|
+
(T = window.MotionHandoffMarkAsComplete) == null || T.call(window, g);
|
|
3214
|
+
}), v.current = !1), p.enteringChildren = void 0);
|
|
3215
|
+
}), p;
|
|
3216
|
+
}
|
|
3217
|
+
function Ea(e, t, n, s) {
|
|
3218
|
+
const { layoutId: i, layout: r, drag: o, dragConstraints: a, layoutScroll: c, layoutRoot: l, layoutCrossfade: u } = t;
|
|
3219
|
+
e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : js(e.parent)), e.projection.setOptions({
|
|
3220
|
+
layoutId: i,
|
|
3221
|
+
layout: r,
|
|
3222
|
+
alwaysMeasureLayout: !!o || a && Ia(a),
|
|
3223
|
+
visualElement: e,
|
|
3224
|
+
/**
|
|
3225
|
+
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
3226
|
+
* to update by the time layout animations run.
|
|
3227
|
+
* We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
|
|
3228
|
+
* ensuring it gets called if there's no potential layout animations.
|
|
3229
|
+
*
|
|
3230
|
+
*/
|
|
3231
|
+
animationType: typeof r == "string" ? r : "both",
|
|
3232
|
+
initialPromotionConfig: s,
|
|
3233
|
+
crossfade: u,
|
|
3234
|
+
layoutScroll: c,
|
|
3235
|
+
layoutRoot: l
|
|
3236
|
+
});
|
|
3237
|
+
}
|
|
3238
|
+
function js(e) {
|
|
3239
|
+
if (e)
|
|
3240
|
+
return e.options.allowProjection !== !1 ? e.projection : js(e.parent);
|
|
3241
|
+
}
|
|
3242
|
+
function Ba(e, { forwardMotionProps: t = !1, type: n } = {}, s, i) {
|
|
3243
|
+
const r = n ? n === "svg" : Et(e), o = r ? Fa : Pa;
|
|
3244
|
+
function a(l, u) {
|
|
3245
|
+
let d;
|
|
3246
|
+
const f = {
|
|
3247
|
+
...E(Bs),
|
|
3248
|
+
...l,
|
|
3249
|
+
layoutId: La(l)
|
|
3250
|
+
}, { isStatic: h } = f, p = wa(l), b = o(l, h);
|
|
3251
|
+
if (!h && xn) {
|
|
3252
|
+
Na(f, s);
|
|
3253
|
+
const y = Ka(f);
|
|
3254
|
+
d = y.MeasureLayout, p.visualElement = Oa(e, b, f, i, y.ProjectionNode, r);
|
|
3255
|
+
}
|
|
3256
|
+
return ht(Ne.Provider, { value: p, children: [d && p.visualElement ? F(d, { visualElement: p.visualElement, ...f }) : null, Aa(e, l, Da(b, p.visualElement, u), b, h, t, r)] });
|
|
3076
3257
|
}
|
|
3258
|
+
a.displayName = `motion.${typeof e == "string" ? e : `create(${e.displayName ?? e.name ?? ""})`}`;
|
|
3259
|
+
const c = li(a);
|
|
3260
|
+
return c[Ra] = e, c;
|
|
3261
|
+
}
|
|
3262
|
+
function La({ layoutId: e }) {
|
|
3263
|
+
const t = E(fi).id;
|
|
3264
|
+
return t && e !== void 0 ? t + "-" + e : e;
|
|
3265
|
+
}
|
|
3266
|
+
function Na(e, t) {
|
|
3267
|
+
E(It).strict, process.env.NODE_ENV;
|
|
3268
|
+
}
|
|
3269
|
+
function Ka(e) {
|
|
3270
|
+
const t = Ls(), { drag: n, layout: s } = t;
|
|
3271
|
+
if (!n && !s)
|
|
3272
|
+
return {};
|
|
3273
|
+
const i = { ...n, ...s };
|
|
3274
|
+
return {
|
|
3275
|
+
MeasureLayout: n != null && n.isEnabled(e) || s != null && s.isEnabled(e) ? i.MeasureLayout : void 0,
|
|
3276
|
+
ProjectionNode: i.ProjectionNode
|
|
3277
|
+
};
|
|
3077
3278
|
}
|
|
3078
|
-
|
|
3279
|
+
const $a = (e, t) => t.isSVG ?? Et(e) ? new ra(t) : new Qo(t, {
|
|
3280
|
+
allowProjection: e !== Sn
|
|
3281
|
+
});
|
|
3282
|
+
class Wa extends ce {
|
|
3079
3283
|
/**
|
|
3080
3284
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
3081
3285
|
* to the underlying animation library. We only want to load that if we load this,
|
|
3082
3286
|
* so people can optionally code split it out using the `m` component.
|
|
3083
3287
|
*/
|
|
3084
3288
|
constructor(t) {
|
|
3085
|
-
super(t), t.animationState || (t.animationState =
|
|
3289
|
+
super(t), t.animationState || (t.animationState = la(t));
|
|
3086
3290
|
}
|
|
3087
3291
|
updateAnimationControlsSubscription() {
|
|
3088
3292
|
const { animate: t } = this.node.getProps();
|
|
3089
|
-
|
|
3293
|
+
Be(t) && (this.unmountControls = t.subscribe(this.node));
|
|
3090
3294
|
}
|
|
3091
3295
|
/**
|
|
3092
3296
|
* Subscribe any provided AnimationControls to the component's VisualElement
|
|
@@ -3103,10 +3307,10 @@ class xa extends ce {
|
|
|
3103
3307
|
this.node.animationState.reset(), (t = this.unmountControls) == null || t.call(this);
|
|
3104
3308
|
}
|
|
3105
3309
|
}
|
|
3106
|
-
let
|
|
3107
|
-
class
|
|
3310
|
+
let ja = 0;
|
|
3311
|
+
class _a extends ce {
|
|
3108
3312
|
constructor() {
|
|
3109
|
-
super(...arguments), this.id =
|
|
3313
|
+
super(...arguments), this.id = ja++;
|
|
3110
3314
|
}
|
|
3111
3315
|
update() {
|
|
3112
3316
|
if (!this.node.presenceContext)
|
|
@@ -3126,18 +3330,15 @@ class Ma extends ce {
|
|
|
3126
3330
|
unmount() {
|
|
3127
3331
|
}
|
|
3128
3332
|
}
|
|
3129
|
-
const
|
|
3333
|
+
const Ga = {
|
|
3130
3334
|
animation: {
|
|
3131
|
-
Feature:
|
|
3335
|
+
Feature: Wa
|
|
3132
3336
|
},
|
|
3133
3337
|
exit: {
|
|
3134
|
-
Feature:
|
|
3338
|
+
Feature: _a
|
|
3135
3339
|
}
|
|
3136
3340
|
};
|
|
3137
|
-
function
|
|
3138
|
-
return e.addEventListener(t, n, s), () => e.removeEventListener(t, n);
|
|
3139
|
-
}
|
|
3140
|
-
function Os(e) {
|
|
3341
|
+
function _s(e) {
|
|
3141
3342
|
return {
|
|
3142
3343
|
point: {
|
|
3143
3344
|
x: e.pageX,
|
|
@@ -3145,21 +3346,21 @@ function Os(e) {
|
|
|
3145
3346
|
}
|
|
3146
3347
|
};
|
|
3147
3348
|
}
|
|
3148
|
-
function
|
|
3349
|
+
function yn(e, t, n) {
|
|
3149
3350
|
const { props: s } = e;
|
|
3150
3351
|
e.animationState && s.whileHover && e.animationState.setActive("whileHover", n === "Start");
|
|
3151
3352
|
const i = "onHover" + n, r = s[i];
|
|
3152
|
-
r &&
|
|
3353
|
+
r && N.postRender(() => r(t, _s(t)));
|
|
3153
3354
|
}
|
|
3154
|
-
class
|
|
3355
|
+
class Ha extends ce {
|
|
3155
3356
|
mount() {
|
|
3156
3357
|
const { current: t } = this.node;
|
|
3157
|
-
t && (this.unmount =
|
|
3358
|
+
t && (this.unmount = Ro(t, (n, s) => (yn(this.node, s, "Start"), (i) => yn(this.node, i, "End"))));
|
|
3158
3359
|
}
|
|
3159
3360
|
unmount() {
|
|
3160
3361
|
}
|
|
3161
3362
|
}
|
|
3162
|
-
class
|
|
3363
|
+
class za extends ce {
|
|
3163
3364
|
constructor() {
|
|
3164
3365
|
super(...arguments), this.isActive = !1;
|
|
3165
3366
|
}
|
|
@@ -3176,50 +3377,56 @@ class Fa extends ce {
|
|
|
3176
3377
|
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
3177
3378
|
}
|
|
3178
3379
|
mount() {
|
|
3179
|
-
this.unmount =
|
|
3380
|
+
this.unmount = Ee(dn(this.node.current, "focus", () => this.onFocus()), dn(this.node.current, "blur", () => this.onBlur()));
|
|
3180
3381
|
}
|
|
3181
3382
|
unmount() {
|
|
3182
3383
|
}
|
|
3183
3384
|
}
|
|
3184
|
-
function
|
|
3385
|
+
function bn(e, t, n) {
|
|
3185
3386
|
const { props: s } = e;
|
|
3186
3387
|
if (e.current instanceof HTMLButtonElement && e.current.disabled)
|
|
3187
3388
|
return;
|
|
3188
3389
|
e.animationState && s.whileTap && e.animationState.setActive("whileTap", n === "Start");
|
|
3189
3390
|
const i = "onTap" + (n === "End" ? "" : n), r = s[i];
|
|
3190
|
-
r &&
|
|
3391
|
+
r && N.postRender(() => r(t, _s(t)));
|
|
3191
3392
|
}
|
|
3192
|
-
class
|
|
3393
|
+
class Ua extends ce {
|
|
3193
3394
|
mount() {
|
|
3194
3395
|
const { current: t } = this.node;
|
|
3195
|
-
|
|
3396
|
+
if (!t)
|
|
3397
|
+
return;
|
|
3398
|
+
const { globalTapTarget: n, propagate: s } = this.node.props;
|
|
3399
|
+
this.unmount = Eo(t, (i, r) => (bn(this.node, r, "Start"), (o, { success: a }) => bn(this.node, o, a ? "End" : "Cancel")), {
|
|
3400
|
+
useGlobalTarget: n,
|
|
3401
|
+
stopPropagation: (s == null ? void 0 : s.tap) === !1
|
|
3402
|
+
});
|
|
3196
3403
|
}
|
|
3197
3404
|
unmount() {
|
|
3198
3405
|
}
|
|
3199
3406
|
}
|
|
3200
|
-
const
|
|
3201
|
-
const t =
|
|
3407
|
+
const dt = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), Ya = (e) => {
|
|
3408
|
+
const t = dt.get(e.target);
|
|
3202
3409
|
t && t(e);
|
|
3203
|
-
},
|
|
3204
|
-
e.forEach(
|
|
3410
|
+
}, Xa = (e) => {
|
|
3411
|
+
e.forEach(Ya);
|
|
3205
3412
|
};
|
|
3206
|
-
function
|
|
3413
|
+
function qa({ root: e, ...t }) {
|
|
3207
3414
|
const n = e || document;
|
|
3208
|
-
|
|
3209
|
-
const s =
|
|
3210
|
-
return s[i] || (s[i] = new IntersectionObserver(
|
|
3211
|
-
}
|
|
3212
|
-
function
|
|
3213
|
-
const s =
|
|
3214
|
-
return
|
|
3215
|
-
|
|
3415
|
+
ze.has(n) || ze.set(n, {});
|
|
3416
|
+
const s = ze.get(n), i = JSON.stringify(t);
|
|
3417
|
+
return s[i] || (s[i] = new IntersectionObserver(Xa, { root: e, ...t })), s[i];
|
|
3418
|
+
}
|
|
3419
|
+
function Za(e, t, n) {
|
|
3420
|
+
const s = qa(t);
|
|
3421
|
+
return dt.set(e, n), s.observe(e), () => {
|
|
3422
|
+
dt.delete(e), s.unobserve(e);
|
|
3216
3423
|
};
|
|
3217
3424
|
}
|
|
3218
|
-
const
|
|
3425
|
+
const Ja = {
|
|
3219
3426
|
some: 0,
|
|
3220
3427
|
all: 1
|
|
3221
3428
|
};
|
|
3222
|
-
class
|
|
3429
|
+
class Qa extends ce {
|
|
3223
3430
|
constructor() {
|
|
3224
3431
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
3225
3432
|
}
|
|
@@ -3228,16 +3435,16 @@ class La extends ce {
|
|
|
3228
3435
|
const { viewport: t = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: r } = t, o = {
|
|
3229
3436
|
root: n ? n.current : void 0,
|
|
3230
3437
|
rootMargin: s,
|
|
3231
|
-
threshold: typeof i == "number" ? i :
|
|
3438
|
+
threshold: typeof i == "number" ? i : Ja[i]
|
|
3232
3439
|
}, a = (c) => {
|
|
3233
3440
|
const { isIntersecting: l } = c;
|
|
3234
3441
|
if (this.isInView === l || (this.isInView = l, r && !l && this.hasEnteredView))
|
|
3235
3442
|
return;
|
|
3236
3443
|
l && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", l);
|
|
3237
|
-
const { onViewportEnter: u, onViewportLeave:
|
|
3238
|
-
|
|
3444
|
+
const { onViewportEnter: u, onViewportLeave: d } = this.node.getProps(), f = l ? u : d;
|
|
3445
|
+
f && f(c);
|
|
3239
3446
|
};
|
|
3240
|
-
return
|
|
3447
|
+
return Za(this.node.current, o, a);
|
|
3241
3448
|
}
|
|
3242
3449
|
mount() {
|
|
3243
3450
|
this.startObserver();
|
|
@@ -3246,36 +3453,36 @@ class La extends ce {
|
|
|
3246
3453
|
if (typeof IntersectionObserver > "u")
|
|
3247
3454
|
return;
|
|
3248
3455
|
const { props: t, prevProps: n } = this.node;
|
|
3249
|
-
["amount", "margin", "root"].some(
|
|
3456
|
+
["amount", "margin", "root"].some(eu(t, n)) && this.startObserver();
|
|
3250
3457
|
}
|
|
3251
3458
|
unmount() {
|
|
3252
3459
|
}
|
|
3253
3460
|
}
|
|
3254
|
-
function
|
|
3461
|
+
function eu({ viewport: e = {} }, { viewport: t = {} } = {}) {
|
|
3255
3462
|
return (n) => e[n] !== t[n];
|
|
3256
3463
|
}
|
|
3257
|
-
const
|
|
3464
|
+
const tu = {
|
|
3258
3465
|
inView: {
|
|
3259
|
-
Feature:
|
|
3466
|
+
Feature: Qa
|
|
3260
3467
|
},
|
|
3261
3468
|
tap: {
|
|
3262
|
-
Feature:
|
|
3469
|
+
Feature: Ua
|
|
3263
3470
|
},
|
|
3264
3471
|
focus: {
|
|
3265
|
-
Feature:
|
|
3472
|
+
Feature: za
|
|
3266
3473
|
},
|
|
3267
3474
|
hover: {
|
|
3268
|
-
Feature:
|
|
3475
|
+
Feature: Ha
|
|
3269
3476
|
}
|
|
3270
|
-
},
|
|
3271
|
-
renderer:
|
|
3272
|
-
...
|
|
3273
|
-
...
|
|
3477
|
+
}, nu = {
|
|
3478
|
+
renderer: $a,
|
|
3479
|
+
...Ga,
|
|
3480
|
+
...tu
|
|
3274
3481
|
};
|
|
3275
|
-
function
|
|
3276
|
-
return
|
|
3482
|
+
function su(e, t) {
|
|
3483
|
+
return Ba(e, t);
|
|
3277
3484
|
}
|
|
3278
|
-
const
|
|
3485
|
+
const wn = /* @__PURE__ */ su("span"), iu = {
|
|
3279
3486
|
Root: {
|
|
3280
3487
|
0: {
|
|
3281
3488
|
h: "5"
|
|
@@ -3287,7 +3494,7 @@ const gn = /* @__PURE__ */ $a("span"), Wa = {
|
|
|
3287
3494
|
h: "8"
|
|
3288
3495
|
}
|
|
3289
3496
|
}
|
|
3290
|
-
},
|
|
3497
|
+
}, Gs = {
|
|
3291
3498
|
Root: {
|
|
3292
3499
|
0: "1",
|
|
3293
3500
|
1: "1_5",
|
|
@@ -3387,11 +3594,11 @@ const gn = /* @__PURE__ */ $a("span"), Wa = {
|
|
|
3387
3594
|
purple: "purple"
|
|
3388
3595
|
}
|
|
3389
3596
|
}
|
|
3390
|
-
}, ve =
|
|
3597
|
+
}, ve = X.createContext({
|
|
3391
3598
|
size: "1",
|
|
3392
3599
|
color: "default",
|
|
3393
3600
|
variant: "soft"
|
|
3394
|
-
}),
|
|
3601
|
+
}), Hs = ({
|
|
3395
3602
|
as: e = "span",
|
|
3396
3603
|
size: t = "1",
|
|
3397
3604
|
color: n = "default",
|
|
@@ -3399,35 +3606,35 @@ const gn = /* @__PURE__ */ $a("span"), Wa = {
|
|
|
3399
3606
|
className: i,
|
|
3400
3607
|
...r
|
|
3401
3608
|
}) => /* @__PURE__ */ F(ve.Provider, { value: { size: t, color: n, variant: s }, children: /* @__PURE__ */ F(
|
|
3402
|
-
|
|
3609
|
+
ei,
|
|
3403
3610
|
{
|
|
3404
3611
|
as: e,
|
|
3405
3612
|
align: "center",
|
|
3406
3613
|
rounded: "1",
|
|
3407
3614
|
display: "inline-flex",
|
|
3408
|
-
pl:
|
|
3615
|
+
pl: Gs.Root[t],
|
|
3409
3616
|
backgroundColor: Te.Root[s][n],
|
|
3410
|
-
h:
|
|
3411
|
-
className:
|
|
3617
|
+
h: iu.Root[t].h,
|
|
3618
|
+
className: si("tgph-tag", i),
|
|
3412
3619
|
...r,
|
|
3413
3620
|
"data-tag": !0
|
|
3414
3621
|
}
|
|
3415
|
-
) }),
|
|
3622
|
+
) }), zs = ({
|
|
3416
3623
|
as: e = "span",
|
|
3417
3624
|
maxW: t = "40",
|
|
3418
3625
|
overflow: n = "hidden",
|
|
3419
3626
|
style: s,
|
|
3420
3627
|
...i
|
|
3421
3628
|
}) => {
|
|
3422
|
-
const r =
|
|
3629
|
+
const r = X.useContext(ve);
|
|
3423
3630
|
return /* @__PURE__ */ F(
|
|
3424
|
-
|
|
3631
|
+
ni,
|
|
3425
3632
|
{
|
|
3426
3633
|
as: e,
|
|
3427
3634
|
size: r.size,
|
|
3428
3635
|
color: Te.Text[r.variant][r.color],
|
|
3429
3636
|
weight: "medium",
|
|
3430
|
-
mr:
|
|
3637
|
+
mr: Gs.Text[r.size],
|
|
3431
3638
|
maxW: t,
|
|
3432
3639
|
overflow: n,
|
|
3433
3640
|
internal_optionalAs: !0,
|
|
@@ -3439,15 +3646,15 @@ const gn = /* @__PURE__ */ $a("span"), Wa = {
|
|
|
3439
3646
|
...i
|
|
3440
3647
|
}
|
|
3441
3648
|
);
|
|
3442
|
-
},
|
|
3443
|
-
const s =
|
|
3444
|
-
return
|
|
3649
|
+
}, Us = ({ onClick: e, textToCopy: t, ...n }) => {
|
|
3650
|
+
const s = X.useContext(ve), [i, r] = X.useState(!1);
|
|
3651
|
+
return X.useEffect(() => {
|
|
3445
3652
|
if (i) {
|
|
3446
3653
|
const o = setTimeout(() => r(!1), 2e3);
|
|
3447
3654
|
return () => clearTimeout(o);
|
|
3448
3655
|
}
|
|
3449
|
-
}, [i]), /* @__PURE__ */ F(
|
|
3450
|
-
|
|
3656
|
+
}, [i]), /* @__PURE__ */ F(pa, { features: nu, children: /* @__PURE__ */ F(ti, { label: "Copy text", children: /* @__PURE__ */ ht(
|
|
3657
|
+
xe.Root,
|
|
3451
3658
|
{
|
|
3452
3659
|
onClick: (o) => {
|
|
3453
3660
|
var a;
|
|
@@ -3466,25 +3673,25 @@ const gn = /* @__PURE__ */ $a("span"), Wa = {
|
|
|
3466
3673
|
...n,
|
|
3467
3674
|
children: [
|
|
3468
3675
|
/* @__PURE__ */ F(
|
|
3469
|
-
|
|
3676
|
+
xe.Icon,
|
|
3470
3677
|
{
|
|
3471
|
-
as:
|
|
3678
|
+
as: wn,
|
|
3472
3679
|
initial: !1,
|
|
3473
3680
|
animate: { y: i ? 0 : "150%", opacity: 1 },
|
|
3474
3681
|
transition: { duration: 0.15, type: "spring", bounce: 0 },
|
|
3475
|
-
icon:
|
|
3682
|
+
icon: ii,
|
|
3476
3683
|
alt: "Copied text",
|
|
3477
3684
|
"aria-hidden": !i
|
|
3478
3685
|
}
|
|
3479
3686
|
),
|
|
3480
3687
|
/* @__PURE__ */ F(
|
|
3481
|
-
|
|
3688
|
+
xe.Icon,
|
|
3482
3689
|
{
|
|
3483
|
-
as:
|
|
3690
|
+
as: wn,
|
|
3484
3691
|
initial: !1,
|
|
3485
3692
|
animate: { y: i ? "-150%" : 0, opacity: 1 },
|
|
3486
3693
|
transition: { duration: 0.15, type: "spring", bounce: 0 },
|
|
3487
|
-
icon:
|
|
3694
|
+
icon: ri,
|
|
3488
3695
|
position: "absolute",
|
|
3489
3696
|
alt: "Copy text",
|
|
3490
3697
|
"aria-hidden": i
|
|
@@ -3493,15 +3700,15 @@ const gn = /* @__PURE__ */ $a("span"), Wa = {
|
|
|
3493
3700
|
]
|
|
3494
3701
|
}
|
|
3495
3702
|
) }) });
|
|
3496
|
-
},
|
|
3497
|
-
const t =
|
|
3703
|
+
}, Ys = ({ ...e }) => {
|
|
3704
|
+
const t = X.useContext(ve);
|
|
3498
3705
|
return /* @__PURE__ */ F(
|
|
3499
|
-
|
|
3706
|
+
xe,
|
|
3500
3707
|
{
|
|
3501
3708
|
size: t.size,
|
|
3502
3709
|
color: Te.Button[t.variant][t.color],
|
|
3503
3710
|
variant: t.variant,
|
|
3504
|
-
icon: { icon:
|
|
3711
|
+
icon: { icon: vn, alt: "close" },
|
|
3505
3712
|
roundedTopRight: "1",
|
|
3506
3713
|
roundedBottomRight: "1",
|
|
3507
3714
|
roundedTopLeft: "0",
|
|
@@ -3509,15 +3716,15 @@ const gn = /* @__PURE__ */ $a("span"), Wa = {
|
|
|
3509
3716
|
...e
|
|
3510
3717
|
}
|
|
3511
3718
|
);
|
|
3512
|
-
},
|
|
3719
|
+
}, Xs = ({
|
|
3513
3720
|
icon: e,
|
|
3514
3721
|
alt: t,
|
|
3515
3722
|
"aria-hidden": n,
|
|
3516
3723
|
...s
|
|
3517
3724
|
}) => {
|
|
3518
|
-
const i =
|
|
3725
|
+
const i = X.useContext(ve), r = t ? { alt: t } : { "aria-hidden": n };
|
|
3519
3726
|
return /* @__PURE__ */ F(
|
|
3520
|
-
|
|
3727
|
+
Qs,
|
|
3521
3728
|
{
|
|
3522
3729
|
icon: e,
|
|
3523
3730
|
size: i.size,
|
|
@@ -3527,7 +3734,7 @@ const gn = /* @__PURE__ */ $a("span"), Wa = {
|
|
|
3527
3734
|
...s
|
|
3528
3735
|
}
|
|
3529
3736
|
);
|
|
3530
|
-
},
|
|
3737
|
+
}, qs = ({
|
|
3531
3738
|
color: e = "default",
|
|
3532
3739
|
size: t = "1",
|
|
3533
3740
|
variant: n = "soft",
|
|
@@ -3538,21 +3745,21 @@ const gn = /* @__PURE__ */ $a("span"), Wa = {
|
|
|
3538
3745
|
textProps: a = { maxW: "40" },
|
|
3539
3746
|
children: c,
|
|
3540
3747
|
...l
|
|
3541
|
-
}) => /* @__PURE__ */
|
|
3542
|
-
s && /* @__PURE__ */ F(
|
|
3543
|
-
/* @__PURE__ */ F(
|
|
3544
|
-
i && /* @__PURE__ */ F(
|
|
3545
|
-
r && /* @__PURE__ */ F(
|
|
3748
|
+
}) => /* @__PURE__ */ ht(Hs, { color: e, size: t, variant: n, ...l, children: [
|
|
3749
|
+
s && /* @__PURE__ */ F(Xs, { ...s }),
|
|
3750
|
+
/* @__PURE__ */ F(zs, { as: "span", ...a, children: c }),
|
|
3751
|
+
i && /* @__PURE__ */ F(Ys, { onClick: i, icon: { icon: vn, alt: "Remove" } }),
|
|
3752
|
+
r && /* @__PURE__ */ F(Us, { onClick: r, textToCopy: o })
|
|
3546
3753
|
] });
|
|
3547
|
-
Object.assign(
|
|
3548
|
-
Root:
|
|
3549
|
-
Button:
|
|
3550
|
-
Text:
|
|
3551
|
-
Icon:
|
|
3552
|
-
CopyButton:
|
|
3754
|
+
Object.assign(qs, {
|
|
3755
|
+
Root: Hs,
|
|
3756
|
+
Button: Ys,
|
|
3757
|
+
Text: zs,
|
|
3758
|
+
Icon: Xs,
|
|
3759
|
+
CopyButton: Us
|
|
3553
3760
|
});
|
|
3554
|
-
const
|
|
3761
|
+
const mu = qs;
|
|
3555
3762
|
export {
|
|
3556
|
-
|
|
3763
|
+
mu as Tag
|
|
3557
3764
|
};
|
|
3558
3765
|
//# sourceMappingURL=index.mjs.map
|