@plyaz/ui 0.8.5 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/reveal-text.cjs.js +1 -1
- package/dist/client/reveal-text.es.js +603 -609
- package/dist/client.cjs.js +1 -1
- package/dist/client.es.js +443 -444
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/styles/utilities.css +15 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createContext as St, useRef as lt, useLayoutEffect as Gr, useEffect as
|
|
1
|
+
import { jsxs as ii, jsx as tt } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as St, useRef as lt, useLayoutEffect as Gr, useEffect as Nt, useContext as B, useId as _r, useCallback as Je, useMemo as oe, Fragment as ri, createElement as Yr, useInsertionEffect as Xr, forwardRef as qr, Component as Zr, useState as Jr } from "react";
|
|
3
3
|
import { c as Qr } from "../utils-B6yFEsav.js";
|
|
4
|
-
const
|
|
5
|
-
function
|
|
4
|
+
const oi = St({});
|
|
5
|
+
function ae(t) {
|
|
6
6
|
const e = lt(null);
|
|
7
7
|
return e.current === null && (e.current = t()), e.current;
|
|
8
8
|
}
|
|
9
|
-
const Qe = typeof window < "u", tn = Qe ? Gr :
|
|
9
|
+
const Qe = typeof window < "u", tn = Qe ? Gr : Nt, en = /* @__PURE__ */ St(null);
|
|
10
10
|
function nn(t, e) {
|
|
11
11
|
t.indexOf(e) === -1 && t.push(e);
|
|
12
12
|
}
|
|
@@ -15,29 +15,29 @@ function sn(t, e) {
|
|
|
15
15
|
n > -1 && t.splice(n, 1);
|
|
16
16
|
}
|
|
17
17
|
const q = (t, e, n) => n > e ? e : n < t ? t : n;
|
|
18
|
-
function
|
|
18
|
+
function De(t, e) {
|
|
19
19
|
return e ? `${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}` : t;
|
|
20
20
|
}
|
|
21
21
|
let Pt = () => {
|
|
22
22
|
}, _ = () => {
|
|
23
23
|
};
|
|
24
24
|
process.env.NODE_ENV !== "production" && (Pt = (t, e, n) => {
|
|
25
|
-
!t && typeof console < "u" && console.warn(
|
|
25
|
+
!t && typeof console < "u" && console.warn(De(e, n));
|
|
26
26
|
}, _ = (t, e, n) => {
|
|
27
27
|
if (!t)
|
|
28
|
-
throw new Error(
|
|
28
|
+
throw new Error(De(e, n));
|
|
29
29
|
});
|
|
30
|
-
const Z = {},
|
|
31
|
-
function
|
|
30
|
+
const Z = {}, ai = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);
|
|
31
|
+
function li(t) {
|
|
32
32
|
return typeof t == "object" && t !== null;
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const ci = (t) => /^0[^.\s]+$/u.test(t);
|
|
35
35
|
// @__NO_SIDE_EFFECTS__
|
|
36
36
|
function rn(t) {
|
|
37
37
|
let e;
|
|
38
38
|
return () => (e === void 0 && (e = t()), e);
|
|
39
39
|
}
|
|
40
|
-
const j = /* @__NO_SIDE_EFFECTS__ */ (t) => t, to = (t, e) => (n) => e(t(n)),
|
|
40
|
+
const j = /* @__NO_SIDE_EFFECTS__ */ (t) => t, to = (t, e) => (n) => e(t(n)), Wt = (...t) => t.reduce(to), wt = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
|
|
41
41
|
const s = e - t;
|
|
42
42
|
return s === 0 ? 1 : (n - t) / s;
|
|
43
43
|
};
|
|
@@ -70,45 +70,45 @@ const G = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, K = /* @__NO_SIDE_EFFECTS__
|
|
|
70
70
|
function an(t, e) {
|
|
71
71
|
return e ? t * (1e3 / e) : 0;
|
|
72
72
|
}
|
|
73
|
-
const
|
|
74
|
-
function
|
|
75
|
-
t ||
|
|
73
|
+
const jn = /* @__PURE__ */ new Set();
|
|
74
|
+
function le(t, e, n) {
|
|
75
|
+
t || jn.has(e) || (console.warn(De(e, n)), jn.add(e));
|
|
76
76
|
}
|
|
77
|
-
const
|
|
77
|
+
const ui = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, eo = 1e-7, no = 12;
|
|
78
78
|
function so(t, e, n, s, i) {
|
|
79
79
|
let o, r, a = 0;
|
|
80
80
|
do
|
|
81
|
-
r = e + (n - e) / 2, o =
|
|
81
|
+
r = e + (n - e) / 2, o = ui(r, s, i) - t, o > 0 ? n = r : e = r;
|
|
82
82
|
while (Math.abs(o) > eo && ++a < no);
|
|
83
83
|
return r;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Ut(t, e, n, s) {
|
|
86
86
|
if (t === e && n === s)
|
|
87
87
|
return j;
|
|
88
88
|
const i = (o) => so(o, 0, 1, t, n);
|
|
89
|
-
return (o) => o === 0 || o === 1 ? o :
|
|
89
|
+
return (o) => o === 0 || o === 1 ? o : ui(i(o), e, s);
|
|
90
90
|
}
|
|
91
|
-
const
|
|
91
|
+
const hi = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, fi = (t) => (e) => 1 - t(1 - e), di = /* @__PURE__ */ Ut(0.33, 1.53, 0.69, 0.99), ln = /* @__PURE__ */ fi(di), mi = /* @__PURE__ */ hi(ln), pi = (t) => (t *= 2) < 1 ? 0.5 * ln(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), cn = (t) => 1 - Math.sin(Math.acos(t)), gi = fi(cn), yi = hi(cn), io = /* @__PURE__ */ Ut(0.42, 0, 1, 1), ro = /* @__PURE__ */ Ut(0, 0, 0.58, 1), vi = /* @__PURE__ */ Ut(0.42, 0, 0.58, 1), oo = (t) => Array.isArray(t) && typeof t[0] != "number", Ti = (t) => Array.isArray(t) && typeof t[0] == "number", Nn = {
|
|
92
92
|
linear: j,
|
|
93
93
|
easeIn: io,
|
|
94
|
-
easeInOut:
|
|
94
|
+
easeInOut: vi,
|
|
95
95
|
easeOut: ro,
|
|
96
96
|
circIn: cn,
|
|
97
|
-
circInOut:
|
|
98
|
-
circOut:
|
|
97
|
+
circInOut: yi,
|
|
98
|
+
circOut: gi,
|
|
99
99
|
backIn: ln,
|
|
100
|
-
backInOut:
|
|
101
|
-
backOut:
|
|
102
|
-
anticipate:
|
|
103
|
-
}, ao = (t) => typeof t == "string",
|
|
104
|
-
if (
|
|
100
|
+
backInOut: mi,
|
|
101
|
+
backOut: di,
|
|
102
|
+
anticipate: pi
|
|
103
|
+
}, ao = (t) => typeof t == "string", Wn = (t) => {
|
|
104
|
+
if (Ti(t)) {
|
|
105
105
|
_(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
|
|
106
106
|
const [e, n, s, i] = t;
|
|
107
|
-
return
|
|
107
|
+
return Ut(e, n, s, i);
|
|
108
108
|
} else if (ao(t))
|
|
109
|
-
return _(
|
|
109
|
+
return _(Nn[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), Nn[t];
|
|
110
110
|
return t;
|
|
111
|
-
},
|
|
111
|
+
}, zt = [
|
|
112
112
|
"setup",
|
|
113
113
|
// Compute
|
|
114
114
|
"read",
|
|
@@ -165,67 +165,67 @@ function lo(t, e) {
|
|
|
165
165
|
return u;
|
|
166
166
|
}
|
|
167
167
|
const co = 40;
|
|
168
|
-
function
|
|
168
|
+
function xi(t, e) {
|
|
169
169
|
let n = !1, s = !0;
|
|
170
170
|
const i = {
|
|
171
171
|
delta: 0,
|
|
172
172
|
timestamp: 0,
|
|
173
173
|
isProcessing: !1
|
|
174
|
-
}, o = () => n = !0, r =
|
|
174
|
+
}, o = () => n = !0, r = zt.reduce((y, S) => (y[S] = lo(o), y), {}), { setup: a, read: l, resolveKeyframes: u, preUpdate: c, update: h, preRender: f, render: d, postRender: m } = r, g = () => {
|
|
175
175
|
const y = Z.useManualTiming ? i.timestamp : performance.now();
|
|
176
176
|
n = !1, Z.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(y - i.timestamp, co), 1)), i.timestamp = y, i.isProcessing = !0, a.process(i), l.process(i), u.process(i), c.process(i), h.process(i), f.process(i), d.process(i), m.process(i), i.isProcessing = !1, n && e && (s = !1, t(g));
|
|
177
177
|
}, v = () => {
|
|
178
178
|
n = !0, s = !0, i.isProcessing || t(g);
|
|
179
179
|
};
|
|
180
|
-
return { schedule:
|
|
180
|
+
return { schedule: zt.reduce((y, S) => {
|
|
181
181
|
const w = r[S];
|
|
182
182
|
return y[S] = (A, C = !1, b = !1) => (n || v(), w.schedule(A, C, b)), y;
|
|
183
183
|
}, {}), cancel: (y) => {
|
|
184
|
-
for (let S = 0; S <
|
|
185
|
-
r[
|
|
184
|
+
for (let S = 0; S < zt.length; S++)
|
|
185
|
+
r[zt[S]].cancel(y);
|
|
186
186
|
}, state: i, steps: r };
|
|
187
187
|
}
|
|
188
|
-
const { schedule: P, cancel: Y, state: R, steps:
|
|
189
|
-
let
|
|
188
|
+
const { schedule: P, cancel: Y, state: R, steps: fe } = /* @__PURE__ */ xi(typeof requestAnimationFrame < "u" ? requestAnimationFrame : j, !0);
|
|
189
|
+
let Yt;
|
|
190
190
|
function uo() {
|
|
191
|
-
|
|
191
|
+
Yt = void 0;
|
|
192
192
|
}
|
|
193
193
|
const O = {
|
|
194
|
-
now: () => (
|
|
194
|
+
now: () => (Yt === void 0 && O.set(R.isProcessing || Z.useManualTiming ? R.timestamp : performance.now()), Yt),
|
|
195
195
|
set: (t) => {
|
|
196
|
-
|
|
196
|
+
Yt = t, queueMicrotask(uo);
|
|
197
197
|
}
|
|
198
|
-
},
|
|
198
|
+
}, wi = (t) => (e) => typeof e == "string" && e.startsWith(t), bi = /* @__PURE__ */ wi("--"), ho = /* @__PURE__ */ wi("var(--"), un = (t) => ho(t) ? fo.test(t.split("/*")[0].trim()) : !1, fo = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, At = {
|
|
199
199
|
test: (t) => typeof t == "number",
|
|
200
200
|
parse: parseFloat,
|
|
201
201
|
transform: (t) => t
|
|
202
202
|
}, Ft = {
|
|
203
203
|
...At,
|
|
204
204
|
transform: (t) => q(0, 1, t)
|
|
205
|
-
},
|
|
205
|
+
}, Ht = {
|
|
206
206
|
...At,
|
|
207
207
|
default: 1
|
|
208
|
-
}, Rt = (t) => Math.round(t * 1e5) / 1e5,
|
|
208
|
+
}, Rt = (t) => Math.round(t * 1e5) / 1e5, hn = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
209
209
|
function mo(t) {
|
|
210
210
|
return t == null;
|
|
211
211
|
}
|
|
212
|
-
const po = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,
|
|
212
|
+
const po = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, fn = (t, e) => (n) => !!(typeof n == "string" && po.test(n) && n.startsWith(t) || e && !mo(n) && Object.prototype.hasOwnProperty.call(n, e)), Si = (t, e, n) => (s) => {
|
|
213
213
|
if (typeof s != "string")
|
|
214
214
|
return s;
|
|
215
|
-
const [i, o, r, a] = s.match(
|
|
215
|
+
const [i, o, r, a] = s.match(hn);
|
|
216
216
|
return {
|
|
217
217
|
[t]: parseFloat(i),
|
|
218
218
|
[e]: parseFloat(o),
|
|
219
219
|
[n]: parseFloat(r),
|
|
220
220
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
221
221
|
};
|
|
222
|
-
}, go = (t) => q(0, 255, t),
|
|
222
|
+
}, go = (t) => q(0, 255, t), de = {
|
|
223
223
|
...At,
|
|
224
224
|
transform: (t) => Math.round(go(t))
|
|
225
225
|
}, ot = {
|
|
226
|
-
test: /* @__PURE__ */
|
|
226
|
+
test: /* @__PURE__ */ fn("rgb", "red"),
|
|
227
227
|
parse: /* @__PURE__ */ Si("red", "green", "blue"),
|
|
228
|
-
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" +
|
|
228
|
+
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + de.transform(t) + ", " + de.transform(e) + ", " + de.transform(n) + ", " + Rt(Ft.transform(s)) + ")"
|
|
229
229
|
};
|
|
230
230
|
function yo(t) {
|
|
231
231
|
let e = "", n = "", s = "", i = "";
|
|
@@ -236,25 +236,25 @@ function yo(t) {
|
|
|
236
236
|
alpha: i ? parseInt(i, 16) / 255 : 1
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
|
-
const
|
|
240
|
-
test: /* @__PURE__ */
|
|
239
|
+
const Ce = {
|
|
240
|
+
test: /* @__PURE__ */ fn("#"),
|
|
241
241
|
parse: yo,
|
|
242
242
|
transform: ot.transform
|
|
243
|
-
},
|
|
243
|
+
}, Kt = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
|
|
244
244
|
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
245
245
|
parse: parseFloat,
|
|
246
246
|
transform: (e) => `${e}${t}`
|
|
247
|
-
}), J = /* @__PURE__ */
|
|
247
|
+
}), J = /* @__PURE__ */ Kt("deg"), X = /* @__PURE__ */ Kt("%"), x = /* @__PURE__ */ Kt("px"), vo = /* @__PURE__ */ Kt("vh"), To = /* @__PURE__ */ Kt("vw"), Un = {
|
|
248
248
|
...X,
|
|
249
249
|
parse: (t) => X.parse(t) / 100,
|
|
250
250
|
transform: (t) => X.transform(t * 100)
|
|
251
251
|
}, dt = {
|
|
252
|
-
test: /* @__PURE__ */
|
|
252
|
+
test: /* @__PURE__ */ fn("hsl", "hue"),
|
|
253
253
|
parse: /* @__PURE__ */ Si("hue", "saturation", "lightness"),
|
|
254
254
|
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + X.transform(Rt(e)) + ", " + X.transform(Rt(n)) + ", " + Rt(Ft.transform(s)) + ")"
|
|
255
255
|
}, D = {
|
|
256
|
-
test: (t) => ot.test(t) ||
|
|
257
|
-
parse: (t) => ot.test(t) ? ot.parse(t) : dt.test(t) ? dt.parse(t) :
|
|
256
|
+
test: (t) => ot.test(t) || Ce.test(t) || dt.test(t),
|
|
257
|
+
parse: (t) => ot.test(t) ? ot.parse(t) : dt.test(t) ? dt.parse(t) : Ce.parse(t),
|
|
258
258
|
transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? ot.transform(t) : dt.transform(t),
|
|
259
259
|
getAnimatableNone: (t) => {
|
|
260
260
|
const e = D.parse(t);
|
|
@@ -263,9 +263,9 @@ const Ee = {
|
|
|
263
263
|
}, xo = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
264
264
|
function wo(t) {
|
|
265
265
|
var e, n;
|
|
266
|
-
return isNaN(t) && typeof t == "string" && (((e = t.match(
|
|
266
|
+
return isNaN(t) && typeof t == "string" && (((e = t.match(hn)) == null ? void 0 : e.length) || 0) + (((n = t.match(xo)) == null ? void 0 : n.length) || 0) > 0;
|
|
267
267
|
}
|
|
268
|
-
const Pi = "number", Ai = "color", bo = "var", So = "var(",
|
|
268
|
+
const Pi = "number", Ai = "color", bo = "var", So = "var(", Kn = "${}", Po = /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;
|
|
269
269
|
function It(t) {
|
|
270
270
|
const e = t.toString(), n = [], s = {
|
|
271
271
|
color: [],
|
|
@@ -273,7 +273,7 @@ function It(t) {
|
|
|
273
273
|
var: []
|
|
274
274
|
}, i = [];
|
|
275
275
|
let o = 0;
|
|
276
|
-
const a = e.replace(Po, (l) => (D.test(l) ? (s.color.push(o), i.push(Ai), n.push(D.parse(l))) : l.startsWith(So) ? (s.var.push(o), i.push(bo), n.push(l)) : (s.number.push(o), i.push(Pi), n.push(parseFloat(l))), ++o,
|
|
276
|
+
const a = e.replace(Po, (l) => (D.test(l) ? (s.color.push(o), i.push(Ai), n.push(D.parse(l))) : l.startsWith(So) ? (s.var.push(o), i.push(bo), n.push(l)) : (s.number.push(o), i.push(Pi), n.push(parseFloat(l))), ++o, Kn)).split(Kn);
|
|
277
277
|
return { values: n, split: a, indexes: s, types: i };
|
|
278
278
|
}
|
|
279
279
|
function Vi(t) {
|
|
@@ -302,7 +302,7 @@ const et = {
|
|
|
302
302
|
createTransformer: Mi,
|
|
303
303
|
getAnimatableNone: Vo
|
|
304
304
|
};
|
|
305
|
-
function
|
|
305
|
+
function me(t, e, n) {
|
|
306
306
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
|
|
307
307
|
}
|
|
308
308
|
function Mo({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
@@ -312,7 +312,7 @@ function Mo({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
|
312
312
|
i = o = r = n;
|
|
313
313
|
else {
|
|
314
314
|
const a = n < 0.5 ? n * (1 + e) : n + e - n * e, l = 2 * n - a;
|
|
315
|
-
i =
|
|
315
|
+
i = me(l, a, t + 1 / 3), o = me(l, a, t), r = me(l, a, t - 1 / 3);
|
|
316
316
|
}
|
|
317
317
|
return {
|
|
318
318
|
red: Math.round(i * 255),
|
|
@@ -321,38 +321,38 @@ function Mo({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
|
321
321
|
alpha: s
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function te(t, e) {
|
|
325
325
|
return (n) => n > 0 ? e : t;
|
|
326
326
|
}
|
|
327
|
-
const M = (t, e, n) => t + (e - t) * n,
|
|
327
|
+
const M = (t, e, n) => t + (e - t) * n, pe = (t, e, n) => {
|
|
328
328
|
const s = t * t, i = n * (e * e - s) + s;
|
|
329
329
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
330
|
-
}, Do = [
|
|
331
|
-
function
|
|
330
|
+
}, Do = [Ce, ot, dt], Co = (t) => Do.find((e) => e.test(t));
|
|
331
|
+
function $n(t) {
|
|
332
332
|
const e = Co(t);
|
|
333
333
|
if (Pt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e)
|
|
334
334
|
return !1;
|
|
335
335
|
let n = e.parse(t);
|
|
336
336
|
return e === dt && (n = Mo(n)), n;
|
|
337
337
|
}
|
|
338
|
-
const
|
|
339
|
-
const n =
|
|
338
|
+
const zn = (t, e) => {
|
|
339
|
+
const n = $n(t), s = $n(e);
|
|
340
340
|
if (!n || !s)
|
|
341
|
-
return
|
|
341
|
+
return te(t, e);
|
|
342
342
|
const i = { ...n };
|
|
343
|
-
return (o) => (i.red =
|
|
344
|
-
},
|
|
343
|
+
return (o) => (i.red = pe(n.red, s.red, o), i.green = pe(n.green, s.green, o), i.blue = pe(n.blue, s.blue, o), i.alpha = M(n.alpha, s.alpha, o), ot.transform(i));
|
|
344
|
+
}, Ee = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
345
345
|
function Eo(t, e) {
|
|
346
|
-
return
|
|
346
|
+
return Ee.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
347
347
|
}
|
|
348
348
|
function Ro(t, e) {
|
|
349
349
|
return (n) => M(t, e, n);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
352
|
-
return typeof t == "number" ? Ro : typeof t == "string" ?
|
|
351
|
+
function dn(t) {
|
|
352
|
+
return typeof t == "number" ? Ro : typeof t == "string" ? un(t) ? te : D.test(t) ? zn : Bo : Array.isArray(t) ? Di : typeof t == "object" ? D.test(t) ? zn : Lo : te;
|
|
353
353
|
}
|
|
354
354
|
function Di(t, e) {
|
|
355
|
-
const n = [...t], s = n.length, i = t.map((o, r) =>
|
|
355
|
+
const n = [...t], s = n.length, i = t.map((o, r) => dn(o)(o, e[r]));
|
|
356
356
|
return (o) => {
|
|
357
357
|
for (let r = 0; r < s; r++)
|
|
358
358
|
n[r] = i[r](o);
|
|
@@ -362,7 +362,7 @@ function Di(t, e) {
|
|
|
362
362
|
function Lo(t, e) {
|
|
363
363
|
const n = { ...t, ...e }, s = {};
|
|
364
364
|
for (const i in n)
|
|
365
|
-
t[i] !== void 0 && e[i] !== void 0 && (s[i] =
|
|
365
|
+
t[i] !== void 0 && e[i] !== void 0 && (s[i] = dn(t[i])(t[i], e[i]));
|
|
366
366
|
return (i) => {
|
|
367
367
|
for (const o in s)
|
|
368
368
|
n[o] = s[o](i);
|
|
@@ -379,10 +379,10 @@ function ko(t, e) {
|
|
|
379
379
|
}
|
|
380
380
|
const Bo = (t, e) => {
|
|
381
381
|
const n = et.createTransformer(e), s = It(t), i = It(e);
|
|
382
|
-
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 ?
|
|
382
|
+
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 ? Ee.has(t) && !i.values.length || Ee.has(e) && !s.values.length ? Eo(t, e) : Wt(Di(ko(s, i), i.values), n) : (Pt(!0, `Complex values '${t}' and '${e}' 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"), te(t, e));
|
|
383
383
|
};
|
|
384
384
|
function Ci(t, e, n) {
|
|
385
|
-
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? M(t, e, n) :
|
|
385
|
+
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? M(t, e, n) : dn(t)(t, e);
|
|
386
386
|
}
|
|
387
387
|
const Fo = (t) => {
|
|
388
388
|
const e = ({ timestamp: n }) => t(n);
|
|
@@ -401,17 +401,17 @@ const Fo = (t) => {
|
|
|
401
401
|
for (let o = 0; o < i; o++)
|
|
402
402
|
s += Math.round(t(o / (i - 1)) * 1e4) / 1e4 + ", ";
|
|
403
403
|
return `linear(${s.substring(0, s.length - 2)})`;
|
|
404
|
-
},
|
|
405
|
-
function
|
|
404
|
+
}, ee = 2e4;
|
|
405
|
+
function mn(t) {
|
|
406
406
|
let e = 0;
|
|
407
407
|
const n = 50;
|
|
408
408
|
let s = t.next(e);
|
|
409
|
-
for (; !s.done && e <
|
|
409
|
+
for (; !s.done && e < ee; )
|
|
410
410
|
e += n, s = t.next(e);
|
|
411
|
-
return e >=
|
|
411
|
+
return e >= ee ? 1 / 0 : e;
|
|
412
412
|
}
|
|
413
413
|
function Io(t, e = 100, n) {
|
|
414
|
-
const s = n({ ...t, keyframes: [0, e] }), i = Math.min(
|
|
414
|
+
const s = n({ ...t, keyframes: [0, e] }), i = Math.min(mn(s), ee);
|
|
415
415
|
return {
|
|
416
416
|
type: "keyframes",
|
|
417
417
|
ease: (o) => s.next(i * o).value / e,
|
|
@@ -451,20 +451,20 @@ const V = {
|
|
|
451
451
|
// in seconds
|
|
452
452
|
minDamping: 0.05,
|
|
453
453
|
maxDamping: 1
|
|
454
|
-
},
|
|
454
|
+
}, ge = 1e-3;
|
|
455
455
|
function jo({ duration: t = V.duration, bounce: e = V.bounce, velocity: n = V.velocity, mass: s = V.mass }) {
|
|
456
456
|
let i, o;
|
|
457
457
|
Pt(t <= /* @__PURE__ */ G(V.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
458
458
|
let r = 1 - e;
|
|
459
459
|
r = q(V.minDamping, V.maxDamping, r), t = q(V.minDuration, V.maxDuration, /* @__PURE__ */ K(t)), r < 1 ? (i = (u) => {
|
|
460
|
-
const c = u * r, h = c * t, f = c - n, d =
|
|
461
|
-
return
|
|
460
|
+
const c = u * r, h = c * t, f = c - n, d = Re(u, r), m = Math.exp(-h);
|
|
461
|
+
return ge - f / d * m;
|
|
462
462
|
}, o = (u) => {
|
|
463
|
-
const h = u * r * t, f = h * n + n, d = Math.pow(r, 2) * Math.pow(u, 2) * t, m = Math.exp(-h), g =
|
|
464
|
-
return (-i(u) +
|
|
463
|
+
const h = u * r * t, f = h * n + n, d = Math.pow(r, 2) * Math.pow(u, 2) * t, m = Math.exp(-h), g = Re(Math.pow(u, 2), r);
|
|
464
|
+
return (-i(u) + ge > 0 ? -1 : 1) * ((f - d) * m) / g;
|
|
465
465
|
}) : (i = (u) => {
|
|
466
466
|
const c = Math.exp(-u * t), h = (u - n) * t + 1;
|
|
467
|
-
return -
|
|
467
|
+
return -ge + c * h;
|
|
468
468
|
}, o = (u) => {
|
|
469
469
|
const c = Math.exp(-u * t), h = (n - u) * (t * t);
|
|
470
470
|
return c * h;
|
|
@@ -492,11 +492,11 @@ function Wo(t, e, n) {
|
|
|
492
492
|
s = s - t(s) / e(s);
|
|
493
493
|
return s;
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function Re(t, e) {
|
|
496
496
|
return t * Math.sqrt(1 - e * e);
|
|
497
497
|
}
|
|
498
498
|
const Uo = ["duration", "bounce"], Ko = ["stiffness", "damping", "mass"];
|
|
499
|
-
function
|
|
499
|
+
function Hn(t, e) {
|
|
500
500
|
return e.some((n) => t[n] !== void 0);
|
|
501
501
|
}
|
|
502
502
|
function $o(t) {
|
|
@@ -508,7 +508,7 @@ function $o(t) {
|
|
|
508
508
|
isResolvedFromDuration: !1,
|
|
509
509
|
...t
|
|
510
510
|
};
|
|
511
|
-
if (!
|
|
511
|
+
if (!Hn(t, Ko) && Hn(t, Uo))
|
|
512
512
|
if (t.visualDuration) {
|
|
513
513
|
const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, o = 2 * q(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
|
|
514
514
|
e = {
|
|
@@ -527,7 +527,7 @@ function $o(t) {
|
|
|
527
527
|
}
|
|
528
528
|
return e;
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function ne(t = V.visualDuration, e = V.bounce) {
|
|
531
531
|
const n = typeof t != "object" ? {
|
|
532
532
|
visualDuration: t,
|
|
533
533
|
keyframes: [0, 1],
|
|
@@ -541,7 +541,7 @@ function se(t = V.visualDuration, e = V.bounce) {
|
|
|
541
541
|
s || (s = T ? V.restSpeed.granular : V.restSpeed.default), i || (i = T ? V.restDelta.granular : V.restDelta.default);
|
|
542
542
|
let y;
|
|
543
543
|
if (g < 1) {
|
|
544
|
-
const w =
|
|
544
|
+
const w = Re(p, g);
|
|
545
545
|
y = (A) => {
|
|
546
546
|
const C = Math.exp(-g * p * A);
|
|
547
547
|
return r - C * ((m + g * p * v) / w * Math.sin(w * A) + v * Math.cos(w * A));
|
|
@@ -570,7 +570,7 @@ function se(t = V.visualDuration, e = V.bounce) {
|
|
|
570
570
|
return a.value = a.done ? r : A, a;
|
|
571
571
|
},
|
|
572
572
|
toString: () => {
|
|
573
|
-
const w = Math.min(
|
|
573
|
+
const w = Math.min(mn(S), ee), A = Ei((C) => S.next(w * C).value, w, 30);
|
|
574
574
|
return w + "ms " + A;
|
|
575
575
|
},
|
|
576
576
|
toTransition: () => {
|
|
@@ -578,11 +578,11 @@ function se(t = V.visualDuration, e = V.bounce) {
|
|
|
578
578
|
};
|
|
579
579
|
return S;
|
|
580
580
|
}
|
|
581
|
-
|
|
582
|
-
const e = Io(t, 100,
|
|
581
|
+
ne.applyToOptions = (t) => {
|
|
582
|
+
const e = Io(t, 100, ne);
|
|
583
583
|
return t.ease = e.ease, t.duration = /* @__PURE__ */ G(e.duration), t.type = "keyframes", t;
|
|
584
584
|
};
|
|
585
|
-
function
|
|
585
|
+
function Le({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
|
|
586
586
|
const h = t[0], f = {
|
|
587
587
|
done: !1,
|
|
588
588
|
value: h
|
|
@@ -596,7 +596,7 @@ function ke({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
596
596
|
};
|
|
597
597
|
let w, A;
|
|
598
598
|
const C = (b) => {
|
|
599
|
-
d(f.value) && (w = b, A =
|
|
599
|
+
d(f.value) && (w = b, A = ne({
|
|
600
600
|
keyframes: [f.value, m(f.value)],
|
|
601
601
|
velocity: Ri(y, b, f.value),
|
|
602
602
|
// TODO: This should be passing * 1000
|
|
@@ -620,13 +620,13 @@ function zo(t, e, n) {
|
|
|
620
620
|
let a = i(t[r], t[r + 1]);
|
|
621
621
|
if (e) {
|
|
622
622
|
const l = Array.isArray(e) ? e[r] || j : e;
|
|
623
|
-
a =
|
|
623
|
+
a = Wt(l, a);
|
|
624
624
|
}
|
|
625
625
|
s.push(a);
|
|
626
626
|
}
|
|
627
627
|
return s;
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function pn(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
630
630
|
const o = t.length;
|
|
631
631
|
if (_(o === e.length, "Both input and output ranges must be the same length", "range-length"), o === 1)
|
|
632
632
|
return () => e[0];
|
|
@@ -661,10 +661,10 @@ function Go(t, e) {
|
|
|
661
661
|
return t.map((n) => n * e);
|
|
662
662
|
}
|
|
663
663
|
function _o(t, e) {
|
|
664
|
-
return t.map(() => e ||
|
|
664
|
+
return t.map(() => e || vi).splice(0, t.length - 1);
|
|
665
665
|
}
|
|
666
666
|
function mt({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
|
|
667
|
-
const i = oo(s) ? s.map(
|
|
667
|
+
const i = oo(s) ? s.map(Wn) : Wn(s), o = {
|
|
668
668
|
done: !1,
|
|
669
669
|
value: e[0]
|
|
670
670
|
}, r = Go(
|
|
@@ -672,7 +672,7 @@ function mt({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }
|
|
|
672
672
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
673
673
|
n && n.length === e.length ? n : Li(e),
|
|
674
674
|
t
|
|
675
|
-
), a =
|
|
675
|
+
), a = pn(r, e, {
|
|
676
676
|
ease: Array.isArray(i) ? i : _o(e, i)
|
|
677
677
|
});
|
|
678
678
|
return {
|
|
@@ -681,21 +681,21 @@ function mt({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }
|
|
|
681
681
|
};
|
|
682
682
|
}
|
|
683
683
|
const Yo = (t) => t !== null;
|
|
684
|
-
function
|
|
684
|
+
function gn(t, { repeat: e, repeatType: n = "loop" }, s, i = 1) {
|
|
685
685
|
const o = t.filter(Yo), a = i < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : o.length - 1;
|
|
686
686
|
return !a || s === void 0 ? o[a] : s;
|
|
687
687
|
}
|
|
688
688
|
const Xo = {
|
|
689
|
-
decay:
|
|
690
|
-
inertia:
|
|
689
|
+
decay: Le,
|
|
690
|
+
inertia: Le,
|
|
691
691
|
tween: mt,
|
|
692
692
|
keyframes: mt,
|
|
693
|
-
spring:
|
|
693
|
+
spring: ne
|
|
694
694
|
};
|
|
695
695
|
function ki(t) {
|
|
696
696
|
typeof t.type == "string" && (t.type = Xo[t.type]);
|
|
697
697
|
}
|
|
698
|
-
class
|
|
698
|
+
class yn {
|
|
699
699
|
constructor() {
|
|
700
700
|
this.updateFinished();
|
|
701
701
|
}
|
|
@@ -720,7 +720,7 @@ class vn {
|
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
722
|
const qo = (t) => t / 100;
|
|
723
|
-
class
|
|
723
|
+
class vn extends yn {
|
|
724
724
|
constructor(e) {
|
|
725
725
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
726
726
|
var s, i;
|
|
@@ -734,13 +734,13 @@ class Tn extends vn {
|
|
|
734
734
|
const { type: n = mt, repeat: s = 0, repeatDelay: i = 0, repeatType: o, velocity: r = 0 } = e;
|
|
735
735
|
let { keyframes: a } = e;
|
|
736
736
|
const l = n || mt;
|
|
737
|
-
process.env.NODE_ENV !== "production" && l !== mt && _(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== mt && typeof a[0] != "number" && (this.mixKeyframes =
|
|
737
|
+
process.env.NODE_ENV !== "production" && l !== mt && _(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== mt && typeof a[0] != "number" && (this.mixKeyframes = Wt(qo, Ci(a[0], a[1])), a = [0, 100]);
|
|
738
738
|
const u = l({ ...e, keyframes: a });
|
|
739
739
|
o === "mirror" && (this.mirroredGenerator = l({
|
|
740
740
|
...e,
|
|
741
741
|
keyframes: [...a].reverse(),
|
|
742
742
|
velocity: -r
|
|
743
|
-
})), u.calculatedDuration === null && (u.calculatedDuration =
|
|
743
|
+
})), u.calculatedDuration === null && (u.calculatedDuration = mn(u));
|
|
744
744
|
const { calculatedDuration: c } = u;
|
|
745
745
|
this.calculatedDuration = c, this.resolvedDuration = c + i, this.totalDuration = this.resolvedDuration * (s + 1) - i, this.generator = u;
|
|
746
746
|
}
|
|
@@ -767,7 +767,7 @@ class Tn extends vn {
|
|
|
767
767
|
let { done: A } = w;
|
|
768
768
|
!T && l !== null && (A = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
|
|
769
769
|
const C = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
|
|
770
|
-
return C && m !==
|
|
770
|
+
return C && m !== Le && (w.value = gn(c, this.options, v, this.speed)), g && g(w.value), C && this.finish(), w;
|
|
771
771
|
}
|
|
772
772
|
/**
|
|
773
773
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -840,9 +840,9 @@ function Zo(t) {
|
|
|
840
840
|
for (let e = 1; e < t.length; e++)
|
|
841
841
|
t[e] ?? (t[e] = t[e - 1]);
|
|
842
842
|
}
|
|
843
|
-
const at = (t) => t * 180 / Math.PI,
|
|
843
|
+
const at = (t) => t * 180 / Math.PI, ke = (t) => {
|
|
844
844
|
const e = at(Math.atan2(t[1], t[0]));
|
|
845
|
-
return
|
|
845
|
+
return Be(e);
|
|
846
846
|
}, Jo = {
|
|
847
847
|
x: 4,
|
|
848
848
|
y: 5,
|
|
@@ -851,35 +851,35 @@ const at = (t) => t * 180 / Math.PI, Be = (t) => {
|
|
|
851
851
|
scaleX: 0,
|
|
852
852
|
scaleY: 3,
|
|
853
853
|
scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
|
|
854
|
-
rotate:
|
|
855
|
-
rotateZ:
|
|
854
|
+
rotate: ke,
|
|
855
|
+
rotateZ: ke,
|
|
856
856
|
skewX: (t) => at(Math.atan(t[1])),
|
|
857
857
|
skewY: (t) => at(Math.atan(t[2])),
|
|
858
858
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
|
|
859
|
-
},
|
|
859
|
+
}, Be = (t) => (t = t % 360, t < 0 && (t += 360), t), Gn = ke, _n = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), Yn = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), Qo = {
|
|
860
860
|
x: 12,
|
|
861
861
|
y: 13,
|
|
862
862
|
z: 14,
|
|
863
863
|
translateX: 12,
|
|
864
864
|
translateY: 13,
|
|
865
865
|
translateZ: 14,
|
|
866
|
-
scaleX:
|
|
867
|
-
scaleY:
|
|
868
|
-
scale: (t) => (
|
|
869
|
-
rotateX: (t) =>
|
|
870
|
-
rotateY: (t) =>
|
|
871
|
-
rotateZ:
|
|
872
|
-
rotate:
|
|
866
|
+
scaleX: _n,
|
|
867
|
+
scaleY: Yn,
|
|
868
|
+
scale: (t) => (_n(t) + Yn(t)) / 2,
|
|
869
|
+
rotateX: (t) => Be(at(Math.atan2(t[6], t[5]))),
|
|
870
|
+
rotateY: (t) => Be(at(Math.atan2(-t[2], t[0]))),
|
|
871
|
+
rotateZ: Gn,
|
|
872
|
+
rotate: Gn,
|
|
873
873
|
skewX: (t) => at(Math.atan(t[4])),
|
|
874
874
|
skewY: (t) => at(Math.atan(t[1])),
|
|
875
875
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
|
|
876
876
|
};
|
|
877
|
-
function
|
|
877
|
+
function Fe(t) {
|
|
878
878
|
return t.includes("scale") ? 1 : 0;
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function Ie(t, e) {
|
|
881
881
|
if (!t || t === "none")
|
|
882
|
-
return
|
|
882
|
+
return Fe(e);
|
|
883
883
|
const n = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
884
884
|
let s, i;
|
|
885
885
|
if (n)
|
|
@@ -889,13 +889,13 @@ function Oe(t, e) {
|
|
|
889
889
|
s = Jo, i = a;
|
|
890
890
|
}
|
|
891
891
|
if (!i)
|
|
892
|
-
return
|
|
892
|
+
return Fe(e);
|
|
893
893
|
const o = s[e], r = i[1].split(",").map(ea);
|
|
894
894
|
return typeof o == "function" ? o(r) : r[o];
|
|
895
895
|
}
|
|
896
896
|
const ta = (t, e) => {
|
|
897
897
|
const { transform: n = "none" } = getComputedStyle(t);
|
|
898
|
-
return
|
|
898
|
+
return Ie(n, e);
|
|
899
899
|
};
|
|
900
900
|
function ea(t) {
|
|
901
901
|
return parseFloat(t.trim());
|
|
@@ -918,7 +918,7 @@ const Vt = [
|
|
|
918
918
|
"skew",
|
|
919
919
|
"skewX",
|
|
920
920
|
"skewY"
|
|
921
|
-
], Mt = new Set(Vt),
|
|
921
|
+
], Mt = new Set(Vt), Xn = (t) => t === At || t === x, na = /* @__PURE__ */ new Set(["x", "y", "z"]), sa = Vt.filter((t) => !na.has(t));
|
|
922
922
|
function ia(t) {
|
|
923
923
|
const e = [];
|
|
924
924
|
return sa.forEach((n) => {
|
|
@@ -935,15 +935,15 @@ const ct = {
|
|
|
935
935
|
bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
|
|
936
936
|
right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
|
|
937
937
|
// Transform
|
|
938
|
-
x: (t, { transform: e }) =>
|
|
939
|
-
y: (t, { transform: e }) =>
|
|
938
|
+
x: (t, { transform: e }) => Ie(e, "x"),
|
|
939
|
+
y: (t, { transform: e }) => Ie(e, "y")
|
|
940
940
|
};
|
|
941
941
|
ct.translateX = ct.x;
|
|
942
942
|
ct.translateY = ct.y;
|
|
943
943
|
const ut = /* @__PURE__ */ new Set();
|
|
944
|
-
let
|
|
944
|
+
let Oe = !1, je = !1, Ne = !1;
|
|
945
945
|
function Bi() {
|
|
946
|
-
if (
|
|
946
|
+
if (je) {
|
|
947
947
|
const t = Array.from(ut).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
948
948
|
e.forEach((s) => {
|
|
949
949
|
const i = ia(s);
|
|
@@ -959,22 +959,22 @@ function Bi() {
|
|
|
959
959
|
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
960
960
|
});
|
|
961
961
|
}
|
|
962
|
-
|
|
962
|
+
je = !1, Oe = !1, ut.forEach((t) => t.complete(Ne)), ut.clear();
|
|
963
963
|
}
|
|
964
964
|
function Fi() {
|
|
965
965
|
ut.forEach((t) => {
|
|
966
|
-
t.readKeyframes(), t.needsMeasurement && (
|
|
966
|
+
t.readKeyframes(), t.needsMeasurement && (je = !0);
|
|
967
967
|
});
|
|
968
968
|
}
|
|
969
969
|
function ra() {
|
|
970
|
-
|
|
970
|
+
Ne = !0, Fi(), Bi(), Ne = !1;
|
|
971
971
|
}
|
|
972
|
-
class
|
|
972
|
+
class Tn {
|
|
973
973
|
constructor(e, n, s, i, o, r = !1) {
|
|
974
974
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = o, this.isAsync = r;
|
|
975
975
|
}
|
|
976
976
|
scheduleResolve() {
|
|
977
|
-
this.state = "scheduled", this.isAsync ? (ut.add(this),
|
|
977
|
+
this.state = "scheduled", this.isAsync ? (ut.add(this), Oe || (Oe = !0, P.read(Fi), P.resolveKeyframes(Bi))) : (this.readKeyframes(), this.complete());
|
|
978
978
|
}
|
|
979
979
|
readKeyframes() {
|
|
980
980
|
const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
|
|
@@ -1024,7 +1024,7 @@ const Oi = /* @__PURE__ */ ca(() => {
|
|
|
1024
1024
|
return !1;
|
|
1025
1025
|
}
|
|
1026
1026
|
return !0;
|
|
1027
|
-
}, "linearEasing"), Et = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`,
|
|
1027
|
+
}, "linearEasing"), Et = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, qn = {
|
|
1028
1028
|
linear: "linear",
|
|
1029
1029
|
ease: "ease",
|
|
1030
1030
|
easeIn: "ease-in",
|
|
@@ -1037,7 +1037,7 @@ const Oi = /* @__PURE__ */ ca(() => {
|
|
|
1037
1037
|
};
|
|
1038
1038
|
function ji(t, e) {
|
|
1039
1039
|
if (t)
|
|
1040
|
-
return typeof t == "function" ? Oi() ? Ei(t, e) : "ease-out" :
|
|
1040
|
+
return typeof t == "function" ? Oi() ? Ei(t, e) : "ease-out" : Ti(t) ? Et(t) : Array.isArray(t) ? t.map((n) => ji(n, e) || qn.easeOut) : qn[t];
|
|
1041
1041
|
}
|
|
1042
1042
|
function ua(t, e, n, { delay: s = 0, duration: i = 300, repeat: o = 0, repeatType: r = "loop", ease: a = "easeOut", times: l } = {}, u = void 0) {
|
|
1043
1043
|
const c = {
|
|
@@ -1062,7 +1062,7 @@ function Ni(t) {
|
|
|
1062
1062
|
function ha({ type: t, ...e }) {
|
|
1063
1063
|
return Ni(t) && Oi() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
|
|
1064
1064
|
}
|
|
1065
|
-
class fa extends
|
|
1065
|
+
class fa extends yn {
|
|
1066
1066
|
constructor(e) {
|
|
1067
1067
|
if (super(), this.finishedTime = null, this.isStopped = !1, !e)
|
|
1068
1068
|
return;
|
|
@@ -1071,7 +1071,7 @@ class fa extends vn {
|
|
|
1071
1071
|
const u = ha(e);
|
|
1072
1072
|
this.animation = ua(n, s, i, u, o), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1073
1073
|
if (this.finishedTime = this.time, !o) {
|
|
1074
|
-
const c =
|
|
1074
|
+
const c = gn(i, this.options, a, this.speed);
|
|
1075
1075
|
this.updateMotionValue ? this.updateMotionValue(c) : aa(n, s, c), this.animation.cancel();
|
|
1076
1076
|
}
|
|
1077
1077
|
l == null || l(), this.notifyFinished();
|
|
@@ -1159,9 +1159,9 @@ class fa extends vn {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
1161
|
const Wi = {
|
|
1162
|
-
anticipate:
|
|
1163
|
-
backInOut:
|
|
1164
|
-
circInOut:
|
|
1162
|
+
anticipate: pi,
|
|
1163
|
+
backInOut: mi,
|
|
1164
|
+
circInOut: yi
|
|
1165
1165
|
};
|
|
1166
1166
|
function da(t) {
|
|
1167
1167
|
return t in Wi;
|
|
@@ -1169,7 +1169,7 @@ function da(t) {
|
|
|
1169
1169
|
function ma(t) {
|
|
1170
1170
|
typeof t.ease == "string" && da(t.ease) && (t.ease = Wi[t.ease]);
|
|
1171
1171
|
}
|
|
1172
|
-
const
|
|
1172
|
+
const Zn = 10;
|
|
1173
1173
|
class pa extends fa {
|
|
1174
1174
|
constructor(e) {
|
|
1175
1175
|
ma(e), ki(e), super(e), e.startTime && (this.startTime = e.startTime), this.options = e;
|
|
@@ -1190,14 +1190,14 @@ class pa extends fa {
|
|
|
1190
1190
|
n.set(e);
|
|
1191
1191
|
return;
|
|
1192
1192
|
}
|
|
1193
|
-
const a = new
|
|
1193
|
+
const a = new vn({
|
|
1194
1194
|
...r,
|
|
1195
1195
|
autoplay: !1
|
|
1196
1196
|
}), l = /* @__PURE__ */ G(this.finishedTime ?? this.time);
|
|
1197
|
-
n.setWithVelocity(a.sample(l -
|
|
1197
|
+
n.setWithVelocity(a.sample(l - Zn).value, a.sample(l).value, Zn), a.stop();
|
|
1198
1198
|
}
|
|
1199
1199
|
}
|
|
1200
|
-
const
|
|
1200
|
+
const Jn = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
|
|
1201
1201
|
(et.test(t) || t === "0") && // And it contains numbers and/or colors
|
|
1202
1202
|
!t.startsWith("url("));
|
|
1203
1203
|
function ga(t) {
|
|
@@ -1214,10 +1214,10 @@ function ya(t, e, n, s) {
|
|
|
1214
1214
|
return !1;
|
|
1215
1215
|
if (e === "display" || e === "visibility")
|
|
1216
1216
|
return !0;
|
|
1217
|
-
const o = t[t.length - 1], r =
|
|
1217
|
+
const o = t[t.length - 1], r = Jn(i, e), a = Jn(o, e);
|
|
1218
1218
|
return Pt(r === a, `You are trying to animate ${e} from "${i}" to "${o}". "${r ? o : i}" is not an animatable value.`, "value-not-animatable"), !r || !a ? !1 : ga(t) || (n === "spring" || Ni(n)) && s;
|
|
1219
1219
|
}
|
|
1220
|
-
function
|
|
1220
|
+
function We(t) {
|
|
1221
1221
|
t.duration = 0, t.type = "keyframes";
|
|
1222
1222
|
}
|
|
1223
1223
|
const va = /* @__PURE__ */ new Set([
|
|
@@ -1241,7 +1241,7 @@ function xa(t) {
|
|
|
1241
1241
|
!l && !s && i !== "mirror" && o !== 0 && r !== "inertia";
|
|
1242
1242
|
}
|
|
1243
1243
|
const wa = 40;
|
|
1244
|
-
class ba extends
|
|
1244
|
+
class ba extends yn {
|
|
1245
1245
|
constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: o = 0, repeatType: r = "loop", keyframes: a, name: l, motionValue: u, element: c, ...h }) {
|
|
1246
1246
|
var m;
|
|
1247
1247
|
super(), this.stop = () => {
|
|
@@ -1259,13 +1259,13 @@ class ba extends vn {
|
|
|
1259
1259
|
motionValue: u,
|
|
1260
1260
|
element: c,
|
|
1261
1261
|
...h
|
|
1262
|
-
}, d = (c == null ? void 0 : c.KeyframeResolver) ||
|
|
1262
|
+
}, d = (c == null ? void 0 : c.KeyframeResolver) || Tn;
|
|
1263
1263
|
this.keyframeResolver = new d(a, (g, v, p) => this.onKeyframesResolved(g, v, f, !p), l, u, c), (m = this.keyframeResolver) == null || m.scheduleResolve();
|
|
1264
1264
|
}
|
|
1265
1265
|
onKeyframesResolved(e, n, s, i) {
|
|
1266
1266
|
this.keyframeResolver = void 0;
|
|
1267
1267
|
const { name: o, type: r, velocity: a, delay: l, isHandoff: u, onUpdate: c } = s;
|
|
1268
|
-
this.resolvedAt = O.now(), ya(e, o, r, a) || ((Z.instantAnimations || !l) && (c == null || c(
|
|
1268
|
+
this.resolvedAt = O.now(), ya(e, o, r, a) || ((Z.instantAnimations || !l) && (c == null || c(gn(e, s, n))), e[0] = e[e.length - 1], We(s), s.repeat = 0);
|
|
1269
1269
|
const f = {
|
|
1270
1270
|
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > wa ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1271
1271
|
finalKeyframe: n,
|
|
@@ -1274,7 +1274,7 @@ class ba extends vn {
|
|
|
1274
1274
|
}, d = !u && xa(f) ? new pa({
|
|
1275
1275
|
...f,
|
|
1276
1276
|
element: f.motionValue.owner.current
|
|
1277
|
-
}) : new
|
|
1277
|
+
}) : new vn(f);
|
|
1278
1278
|
d.finished.then(() => this.notifyFinished()).catch(j), this.pendingTimeline && (this.stopTimeline = d.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = d;
|
|
1279
1279
|
}
|
|
1280
1280
|
get finished() {
|
|
@@ -1349,11 +1349,11 @@ function Ui(t, e, n = 1) {
|
|
|
1349
1349
|
const o = window.getComputedStyle(e).getPropertyValue(s);
|
|
1350
1350
|
if (o) {
|
|
1351
1351
|
const r = o.trim();
|
|
1352
|
-
return
|
|
1352
|
+
return ai(r) ? parseFloat(r) : r;
|
|
1353
1353
|
}
|
|
1354
|
-
return
|
|
1354
|
+
return un(i) ? Ui(i, e, n + 1) : i;
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1356
|
+
function xn(t, e) {
|
|
1357
1357
|
return (t == null ? void 0 : t[e]) ?? (t == null ? void 0 : t.default) ?? t;
|
|
1358
1358
|
}
|
|
1359
1359
|
const Ki = /* @__PURE__ */ new Set([
|
|
@@ -1367,29 +1367,29 @@ const Ki = /* @__PURE__ */ new Set([
|
|
|
1367
1367
|
]), Va = {
|
|
1368
1368
|
test: (t) => t === "auto",
|
|
1369
1369
|
parse: (t) => t
|
|
1370
|
-
}, $i = (t) => (e) => e.test(t), zi = [At, x, X, J, To, vo, Va],
|
|
1370
|
+
}, $i = (t) => (e) => e.test(t), zi = [At, x, X, J, To, vo, Va], Qn = (t) => zi.find($i(t));
|
|
1371
1371
|
function Ma(t) {
|
|
1372
|
-
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" ||
|
|
1372
|
+
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || ci(t) : !0;
|
|
1373
1373
|
}
|
|
1374
1374
|
const Da = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
1375
1375
|
function Ca(t) {
|
|
1376
1376
|
const [e, n] = t.slice(0, -1).split("(");
|
|
1377
1377
|
if (e === "drop-shadow")
|
|
1378
1378
|
return t;
|
|
1379
|
-
const [s] = n.match(
|
|
1379
|
+
const [s] = n.match(hn) || [];
|
|
1380
1380
|
if (!s)
|
|
1381
1381
|
return t;
|
|
1382
1382
|
const i = n.replace(s, "");
|
|
1383
1383
|
let o = Da.has(e) ? 1 : 0;
|
|
1384
1384
|
return s !== n && (o *= 100), e + "(" + o + i + ")";
|
|
1385
1385
|
}
|
|
1386
|
-
const Ea = /\b([a-z-]*)\(.*?\)/gu,
|
|
1386
|
+
const Ea = /\b([a-z-]*)\(.*?\)/gu, Ue = {
|
|
1387
1387
|
...et,
|
|
1388
1388
|
getAnimatableNone: (t) => {
|
|
1389
1389
|
const e = t.match(Ea);
|
|
1390
1390
|
return e ? e.map(Ca).join(" ") : t;
|
|
1391
1391
|
}
|
|
1392
|
-
},
|
|
1392
|
+
}, ts = {
|
|
1393
1393
|
...At,
|
|
1394
1394
|
transform: Math.round
|
|
1395
1395
|
}, Ra = {
|
|
@@ -1397,10 +1397,10 @@ const Ea = /\b([a-z-]*)\(.*?\)/gu, Ke = {
|
|
|
1397
1397
|
rotateX: J,
|
|
1398
1398
|
rotateY: J,
|
|
1399
1399
|
rotateZ: J,
|
|
1400
|
-
scale:
|
|
1401
|
-
scaleX:
|
|
1402
|
-
scaleY:
|
|
1403
|
-
scaleZ:
|
|
1400
|
+
scale: Ht,
|
|
1401
|
+
scaleX: Ht,
|
|
1402
|
+
scaleY: Ht,
|
|
1403
|
+
scaleZ: Ht,
|
|
1404
1404
|
skew: J,
|
|
1405
1405
|
skewX: J,
|
|
1406
1406
|
skewY: J,
|
|
@@ -1414,10 +1414,10 @@ const Ea = /\b([a-z-]*)\(.*?\)/gu, Ke = {
|
|
|
1414
1414
|
perspective: x,
|
|
1415
1415
|
transformPerspective: x,
|
|
1416
1416
|
opacity: Ft,
|
|
1417
|
-
originX:
|
|
1418
|
-
originY:
|
|
1417
|
+
originX: Un,
|
|
1418
|
+
originY: Un,
|
|
1419
1419
|
originZ: x
|
|
1420
|
-
},
|
|
1420
|
+
}, wn = {
|
|
1421
1421
|
// Border props
|
|
1422
1422
|
borderWidth: x,
|
|
1423
1423
|
borderTopWidth: x,
|
|
@@ -1454,13 +1454,13 @@ const Ea = /\b([a-z-]*)\(.*?\)/gu, Ke = {
|
|
|
1454
1454
|
backgroundPositionX: x,
|
|
1455
1455
|
backgroundPositionY: x,
|
|
1456
1456
|
...Ra,
|
|
1457
|
-
zIndex:
|
|
1457
|
+
zIndex: ts,
|
|
1458
1458
|
// SVG
|
|
1459
1459
|
fillOpacity: Ft,
|
|
1460
1460
|
strokeOpacity: Ft,
|
|
1461
|
-
numOctaves:
|
|
1461
|
+
numOctaves: ts
|
|
1462
1462
|
}, La = {
|
|
1463
|
-
...
|
|
1463
|
+
...wn,
|
|
1464
1464
|
// Color props
|
|
1465
1465
|
color: D,
|
|
1466
1466
|
backgroundColor: D,
|
|
@@ -1473,12 +1473,12 @@ const Ea = /\b([a-z-]*)\(.*?\)/gu, Ke = {
|
|
|
1473
1473
|
borderRightColor: D,
|
|
1474
1474
|
borderBottomColor: D,
|
|
1475
1475
|
borderLeftColor: D,
|
|
1476
|
-
filter:
|
|
1477
|
-
WebkitFilter:
|
|
1476
|
+
filter: Ue,
|
|
1477
|
+
WebkitFilter: Ue
|
|
1478
1478
|
}, Hi = (t) => La[t];
|
|
1479
1479
|
function Gi(t, e) {
|
|
1480
1480
|
let n = Hi(t);
|
|
1481
|
-
return n !==
|
|
1481
|
+
return n !== Ue && (n = et), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
1482
1482
|
}
|
|
1483
1483
|
const ka = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
1484
1484
|
function Ba(t, e, n) {
|
|
@@ -1491,7 +1491,7 @@ function Ba(t, e, n) {
|
|
|
1491
1491
|
for (const o of e)
|
|
1492
1492
|
t[o] = Gi(n, i);
|
|
1493
1493
|
}
|
|
1494
|
-
class Fa extends
|
|
1494
|
+
class Fa extends Tn {
|
|
1495
1495
|
constructor(e, n, s, i, o) {
|
|
1496
1496
|
super(e, n, s, i, o, !0);
|
|
1497
1497
|
}
|
|
@@ -1502,16 +1502,16 @@ class Fa extends xn {
|
|
|
1502
1502
|
super.readKeyframes();
|
|
1503
1503
|
for (let l = 0; l < e.length; l++) {
|
|
1504
1504
|
let u = e[l];
|
|
1505
|
-
if (typeof u == "string" && (u = u.trim(),
|
|
1505
|
+
if (typeof u == "string" && (u = u.trim(), un(u))) {
|
|
1506
1506
|
const c = Ui(u, n.current);
|
|
1507
1507
|
c !== void 0 && (e[l] = c), l === e.length - 1 && (this.finalKeyframe = u);
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
1510
|
if (this.resolveNoneKeyframes(), !Ki.has(s) || e.length !== 2)
|
|
1511
1511
|
return;
|
|
1512
|
-
const [i, o] = e, r =
|
|
1512
|
+
const [i, o] = e, r = Qn(i), a = Qn(o);
|
|
1513
1513
|
if (r !== a)
|
|
1514
|
-
if (
|
|
1514
|
+
if (Xn(r) && Xn(a))
|
|
1515
1515
|
for (let l = 0; l < e.length; l++) {
|
|
1516
1516
|
const u = e[l];
|
|
1517
1517
|
typeof u == "string" && (e[l] = parseFloat(u));
|
|
@@ -1556,9 +1556,9 @@ function _i(t, e, n) {
|
|
|
1556
1556
|
}
|
|
1557
1557
|
const Yi = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
|
|
1558
1558
|
function Xi(t) {
|
|
1559
|
-
return
|
|
1559
|
+
return li(t) && "offsetHeight" in t;
|
|
1560
1560
|
}
|
|
1561
|
-
const
|
|
1561
|
+
const es = 30, Ia = (t) => !isNaN(parseFloat(t)), Lt = {
|
|
1562
1562
|
current: void 0
|
|
1563
1563
|
};
|
|
1564
1564
|
class Oa {
|
|
@@ -1624,7 +1624,7 @@ class Oa {
|
|
|
1624
1624
|
* @deprecated
|
|
1625
1625
|
*/
|
|
1626
1626
|
onChange(e) {
|
|
1627
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1627
|
+
return process.env.NODE_ENV !== "production" && le(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
1628
1628
|
}
|
|
1629
1629
|
on(e, n) {
|
|
1630
1630
|
this.events[e] || (this.events[e] = new on());
|
|
@@ -1708,9 +1708,9 @@ class Oa {
|
|
|
1708
1708
|
*/
|
|
1709
1709
|
getVelocity() {
|
|
1710
1710
|
const e = O.now();
|
|
1711
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt >
|
|
1711
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > es)
|
|
1712
1712
|
return 0;
|
|
1713
|
-
const n = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
1713
|
+
const n = Math.min(this.updatedAt - this.prevUpdatedAt, es);
|
|
1714
1714
|
return an(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
1715
1715
|
}
|
|
1716
1716
|
/**
|
|
@@ -1766,7 +1766,7 @@ class Oa {
|
|
|
1766
1766
|
function H(t, e) {
|
|
1767
1767
|
return new Oa(t, e);
|
|
1768
1768
|
}
|
|
1769
|
-
const { schedule:
|
|
1769
|
+
const { schedule: bn } = /* @__PURE__ */ xi(queueMicrotask, !1), z = {
|
|
1770
1770
|
x: !1,
|
|
1771
1771
|
y: !1
|
|
1772
1772
|
};
|
|
@@ -1788,18 +1788,18 @@ function Zi(t, e) {
|
|
|
1788
1788
|
};
|
|
1789
1789
|
return [n, i, () => s.abort()];
|
|
1790
1790
|
}
|
|
1791
|
-
function
|
|
1791
|
+
function ns(t) {
|
|
1792
1792
|
return !(t.pointerType === "touch" || qi());
|
|
1793
1793
|
}
|
|
1794
1794
|
function Na(t, e, n = {}) {
|
|
1795
1795
|
const [s, i, o] = Zi(t, n), r = (a) => {
|
|
1796
|
-
if (!
|
|
1796
|
+
if (!ns(a))
|
|
1797
1797
|
return;
|
|
1798
1798
|
const { target: l } = a, u = e(l, a);
|
|
1799
1799
|
if (typeof u != "function" || !l)
|
|
1800
1800
|
return;
|
|
1801
1801
|
const c = (h) => {
|
|
1802
|
-
|
|
1802
|
+
ns(h) && (u(h), l.removeEventListener("pointerleave", c));
|
|
1803
1803
|
};
|
|
1804
1804
|
l.addEventListener("pointerleave", c, i);
|
|
1805
1805
|
};
|
|
@@ -1807,7 +1807,7 @@ function Na(t, e, n = {}) {
|
|
|
1807
1807
|
a.addEventListener("pointerenter", r, i);
|
|
1808
1808
|
}), o;
|
|
1809
1809
|
}
|
|
1810
|
-
const Ji = (t, e) => e ? t === e ? !0 : Ji(t, e.parentElement) : !1,
|
|
1810
|
+
const Ji = (t, e) => e ? t === e ? !0 : Ji(t, e.parentElement) : !1, Sn = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, Wa = /* @__PURE__ */ new Set([
|
|
1811
1811
|
"BUTTON",
|
|
1812
1812
|
"INPUT",
|
|
1813
1813
|
"SELECT",
|
|
@@ -1817,41 +1817,41 @@ const Ji = (t, e) => e ? t === e ? !0 : Ji(t, e.parentElement) : !1, Pn = (t) =>
|
|
|
1817
1817
|
function Ua(t) {
|
|
1818
1818
|
return Wa.has(t.tagName) || t.tabIndex !== -1;
|
|
1819
1819
|
}
|
|
1820
|
-
const
|
|
1821
|
-
function
|
|
1820
|
+
const Xt = /* @__PURE__ */ new WeakSet();
|
|
1821
|
+
function ss(t) {
|
|
1822
1822
|
return (e) => {
|
|
1823
1823
|
e.key === "Enter" && t(e);
|
|
1824
1824
|
};
|
|
1825
1825
|
}
|
|
1826
|
-
function
|
|
1826
|
+
function ye(t, e) {
|
|
1827
1827
|
t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
|
|
1828
1828
|
}
|
|
1829
1829
|
const Ka = (t, e) => {
|
|
1830
1830
|
const n = t.currentTarget;
|
|
1831
1831
|
if (!n)
|
|
1832
1832
|
return;
|
|
1833
|
-
const s =
|
|
1834
|
-
if (
|
|
1833
|
+
const s = ss(() => {
|
|
1834
|
+
if (Xt.has(n))
|
|
1835
1835
|
return;
|
|
1836
|
-
|
|
1837
|
-
const i =
|
|
1838
|
-
|
|
1839
|
-
}), o = () =>
|
|
1836
|
+
ye(n, "down");
|
|
1837
|
+
const i = ss(() => {
|
|
1838
|
+
ye(n, "up");
|
|
1839
|
+
}), o = () => ye(n, "cancel");
|
|
1840
1840
|
n.addEventListener("keyup", i, e), n.addEventListener("blur", o, e);
|
|
1841
1841
|
});
|
|
1842
1842
|
n.addEventListener("keydown", s, e), n.addEventListener("blur", () => n.removeEventListener("keydown", s), e);
|
|
1843
1843
|
};
|
|
1844
|
-
function
|
|
1845
|
-
return
|
|
1844
|
+
function is(t) {
|
|
1845
|
+
return Sn(t) && !qi();
|
|
1846
1846
|
}
|
|
1847
1847
|
function $a(t, e, n = {}) {
|
|
1848
1848
|
const [s, i, o] = Zi(t, n), r = (a) => {
|
|
1849
1849
|
const l = a.currentTarget;
|
|
1850
|
-
if (!
|
|
1850
|
+
if (!is(a))
|
|
1851
1851
|
return;
|
|
1852
|
-
|
|
1852
|
+
Xt.add(l);
|
|
1853
1853
|
const u = e(l, a), c = (d, m) => {
|
|
1854
|
-
window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", f),
|
|
1854
|
+
window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", f), Xt.has(l) && Xt.delete(l), is(d) && typeof u == "function" && u(d, { success: m });
|
|
1855
1855
|
}, h = (d) => {
|
|
1856
1856
|
c(d, l === window || l === document || n.useGlobalTarget || Ji(l, d.target));
|
|
1857
1857
|
}, f = (d) => {
|
|
@@ -1863,15 +1863,15 @@ function $a(t, e, n = {}) {
|
|
|
1863
1863
|
(n.useGlobalTarget ? window : a).addEventListener("pointerdown", r, i), Xi(a) && (a.addEventListener("focus", (u) => Ka(u, i)), !Ua(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
|
|
1864
1864
|
}), o;
|
|
1865
1865
|
}
|
|
1866
|
-
function
|
|
1867
|
-
return
|
|
1866
|
+
function Pn(t) {
|
|
1867
|
+
return li(t) && "ownerSVGElement" in t;
|
|
1868
1868
|
}
|
|
1869
|
-
const
|
|
1869
|
+
const qt = /* @__PURE__ */ new WeakMap();
|
|
1870
1870
|
let Q;
|
|
1871
|
-
const Qi = (t, e, n) => (s, i) => i && i[0] ? i[0][t + "Size"] :
|
|
1871
|
+
const Qi = (t, e, n) => (s, i) => i && i[0] ? i[0][t + "Size"] : Pn(s) && "getBBox" in s ? s.getBBox()[e] : s[n], za = /* @__PURE__ */ Qi("inline", "width", "offsetWidth"), Ha = /* @__PURE__ */ Qi("block", "height", "offsetHeight");
|
|
1872
1872
|
function Ga({ target: t, borderBoxSize: e }) {
|
|
1873
1873
|
var n;
|
|
1874
|
-
(n =
|
|
1874
|
+
(n = qt.get(t)) == null || n.forEach((s) => {
|
|
1875
1875
|
s(t, {
|
|
1876
1876
|
get width() {
|
|
1877
1877
|
return za(t, e);
|
|
@@ -1892,16 +1892,16 @@ function Xa(t, e) {
|
|
|
1892
1892
|
Q || Ya();
|
|
1893
1893
|
const n = _i(t);
|
|
1894
1894
|
return n.forEach((s) => {
|
|
1895
|
-
let i =
|
|
1896
|
-
i || (i = /* @__PURE__ */ new Set(),
|
|
1895
|
+
let i = qt.get(s);
|
|
1896
|
+
i || (i = /* @__PURE__ */ new Set(), qt.set(s, i)), i.add(e), Q == null || Q.observe(s);
|
|
1897
1897
|
}), () => {
|
|
1898
1898
|
n.forEach((s) => {
|
|
1899
|
-
const i =
|
|
1899
|
+
const i = qt.get(s);
|
|
1900
1900
|
i == null || i.delete(e), i != null && i.size || Q == null || Q.unobserve(s);
|
|
1901
1901
|
});
|
|
1902
1902
|
};
|
|
1903
1903
|
}
|
|
1904
|
-
const
|
|
1904
|
+
const Zt = /* @__PURE__ */ new Set();
|
|
1905
1905
|
let pt;
|
|
1906
1906
|
function qa() {
|
|
1907
1907
|
pt = () => {
|
|
@@ -1913,12 +1913,12 @@ function qa() {
|
|
|
1913
1913
|
return window.innerHeight;
|
|
1914
1914
|
}
|
|
1915
1915
|
};
|
|
1916
|
-
|
|
1916
|
+
Zt.forEach((e) => e(t));
|
|
1917
1917
|
}, window.addEventListener("resize", pt);
|
|
1918
1918
|
}
|
|
1919
1919
|
function Za(t) {
|
|
1920
|
-
return
|
|
1921
|
-
|
|
1920
|
+
return Zt.add(t), pt || qa(), () => {
|
|
1921
|
+
Zt.delete(t), !Zt.size && typeof pt == "function" && (window.removeEventListener("resize", pt), pt = void 0);
|
|
1922
1922
|
};
|
|
1923
1923
|
}
|
|
1924
1924
|
function Ja(t, e) {
|
|
@@ -1933,13 +1933,13 @@ function tr(t, e) {
|
|
|
1933
1933
|
return P.preUpdate(s, !0), () => Y(s);
|
|
1934
1934
|
}
|
|
1935
1935
|
function Qa(t) {
|
|
1936
|
-
return
|
|
1936
|
+
return Pn(t) && t.tagName === "svg";
|
|
1937
1937
|
}
|
|
1938
1938
|
function tl(...t) {
|
|
1939
|
-
const e = !Array.isArray(t[0]), n = e ? 0 : -1, s = t[0 + n], i = t[1 + n], o = t[2 + n], r = t[3 + n], a =
|
|
1939
|
+
const e = !Array.isArray(t[0]), n = e ? 0 : -1, s = t[0 + n], i = t[1 + n], o = t[2 + n], r = t[3 + n], a = pn(i, o, r);
|
|
1940
1940
|
return e ? a(s) : a;
|
|
1941
1941
|
}
|
|
1942
|
-
const k = (t) => !!(t && t.getVelocity), el = [...zi, D, et], nl = (t) => el.find($i(t)),
|
|
1942
|
+
const k = (t) => !!(t && t.getVelocity), el = [...zi, D, et], nl = (t) => el.find($i(t)), An = St({
|
|
1943
1943
|
transformPagePoint: (t) => t,
|
|
1944
1944
|
isStatic: !1,
|
|
1945
1945
|
reducedMotion: "never"
|
|
@@ -1949,14 +1949,14 @@ function sl(t = !0) {
|
|
|
1949
1949
|
if (e === null)
|
|
1950
1950
|
return [!0, null];
|
|
1951
1951
|
const { isPresent: n, onExitComplete: s, register: i } = e, o = _r();
|
|
1952
|
-
|
|
1952
|
+
Nt(() => {
|
|
1953
1953
|
if (t)
|
|
1954
1954
|
return i(o);
|
|
1955
1955
|
}, [t]);
|
|
1956
1956
|
const r = Je(() => t && s && s(o), [o, s, t]);
|
|
1957
1957
|
return !n && s ? [!1, r] : [!0];
|
|
1958
1958
|
}
|
|
1959
|
-
const er = St({ strict: !1 }),
|
|
1959
|
+
const er = St({ strict: !1 }), rs = {
|
|
1960
1960
|
animation: [
|
|
1961
1961
|
"animate",
|
|
1962
1962
|
"variants",
|
|
@@ -1976,9 +1976,9 @@ const er = St({ strict: !1 }), os = {
|
|
|
1976
1976
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
1977
1977
|
layout: ["layout", "layoutId"]
|
|
1978
1978
|
}, bt = {};
|
|
1979
|
-
for (const t in
|
|
1979
|
+
for (const t in rs)
|
|
1980
1980
|
bt[t] = {
|
|
1981
|
-
isEnabled: (e) =>
|
|
1981
|
+
isEnabled: (e) => rs[t].some((n) => !!e[n])
|
|
1982
1982
|
};
|
|
1983
1983
|
function il(t) {
|
|
1984
1984
|
for (const e in t)
|
|
@@ -2019,12 +2019,12 @@ const rl = /* @__PURE__ */ new Set([
|
|
|
2019
2019
|
"ignoreStrict",
|
|
2020
2020
|
"viewport"
|
|
2021
2021
|
]);
|
|
2022
|
-
function
|
|
2022
|
+
function se(t) {
|
|
2023
2023
|
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || rl.has(t);
|
|
2024
2024
|
}
|
|
2025
|
-
let nr = (t) => !
|
|
2025
|
+
let nr = (t) => !se(t);
|
|
2026
2026
|
function ol(t) {
|
|
2027
|
-
typeof t == "function" && (nr = (e) => e.startsWith("on") ? !
|
|
2027
|
+
typeof t == "function" && (nr = (e) => e.startsWith("on") ? !se(e) : t(e));
|
|
2028
2028
|
}
|
|
2029
2029
|
try {
|
|
2030
2030
|
ol(require("@emotion/is-prop-valid").default);
|
|
@@ -2033,18 +2033,18 @@ try {
|
|
|
2033
2033
|
function al(t, e, n) {
|
|
2034
2034
|
const s = {};
|
|
2035
2035
|
for (const i in t)
|
|
2036
|
-
i === "values" && typeof t.values == "object" || (nr(i) || n === !0 &&
|
|
2036
|
+
i === "values" && typeof t.values == "object" || (nr(i) || n === !0 && se(i) || !e && !se(i) || // If trying to use native HTML drag events, forward drag listeners
|
|
2037
2037
|
t.draggable && i.startsWith("onDrag")) && (s[i] = t[i]);
|
|
2038
2038
|
return s;
|
|
2039
2039
|
}
|
|
2040
|
-
const
|
|
2041
|
-
function
|
|
2040
|
+
const ce = /* @__PURE__ */ St({});
|
|
2041
|
+
function ue(t) {
|
|
2042
2042
|
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
2043
2043
|
}
|
|
2044
2044
|
function Ot(t) {
|
|
2045
2045
|
return typeof t == "string" || Array.isArray(t);
|
|
2046
2046
|
}
|
|
2047
|
-
const
|
|
2047
|
+
const Vn = [
|
|
2048
2048
|
"animate",
|
|
2049
2049
|
"whileInView",
|
|
2050
2050
|
"whileFocus",
|
|
@@ -2052,15 +2052,15 @@ const Mn = [
|
|
|
2052
2052
|
"whileTap",
|
|
2053
2053
|
"whileDrag",
|
|
2054
2054
|
"exit"
|
|
2055
|
-
],
|
|
2056
|
-
function
|
|
2057
|
-
return
|
|
2055
|
+
], Mn = ["initial", ...Vn];
|
|
2056
|
+
function he(t) {
|
|
2057
|
+
return ue(t.animate) || Mn.some((e) => Ot(t[e]));
|
|
2058
2058
|
}
|
|
2059
2059
|
function sr(t) {
|
|
2060
|
-
return !!(
|
|
2060
|
+
return !!(he(t) || t.variants);
|
|
2061
2061
|
}
|
|
2062
2062
|
function ll(t, e) {
|
|
2063
|
-
if (
|
|
2063
|
+
if (he(t)) {
|
|
2064
2064
|
const { initial: n, animate: s } = t;
|
|
2065
2065
|
return {
|
|
2066
2066
|
initial: n === !1 || Ot(n) ? n : void 0,
|
|
@@ -2070,19 +2070,55 @@ function ll(t, e) {
|
|
|
2070
2070
|
return t.inherit !== !1 ? e : {};
|
|
2071
2071
|
}
|
|
2072
2072
|
function cl(t) {
|
|
2073
|
-
const { initial: e, animate: n } = ll(t, B(
|
|
2074
|
-
return
|
|
2073
|
+
const { initial: e, animate: n } = ll(t, B(ce));
|
|
2074
|
+
return oe(() => ({ initial: e, animate: n }), [os(e), os(n)]);
|
|
2075
2075
|
}
|
|
2076
|
-
function
|
|
2076
|
+
function os(t) {
|
|
2077
2077
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
2078
2078
|
}
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
for (const e in t)
|
|
2082
|
-
jt[e] = t[e], un(e) && (jt[e].isCSSVariable = !0);
|
|
2079
|
+
function as(t, e) {
|
|
2080
|
+
return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
|
|
2083
2081
|
}
|
|
2082
|
+
const Dt = {
|
|
2083
|
+
correct: (t, e) => {
|
|
2084
|
+
if (!e.target)
|
|
2085
|
+
return t;
|
|
2086
|
+
if (typeof t == "string")
|
|
2087
|
+
if (x.test(t))
|
|
2088
|
+
t = parseFloat(t);
|
|
2089
|
+
else
|
|
2090
|
+
return t;
|
|
2091
|
+
const n = as(t, e.target.x), s = as(t, e.target.y);
|
|
2092
|
+
return `${n}% ${s}%`;
|
|
2093
|
+
}
|
|
2094
|
+
}, ul = {
|
|
2095
|
+
correct: (t, { treeScale: e, projectionDelta: n }) => {
|
|
2096
|
+
const s = t, i = et.parse(t);
|
|
2097
|
+
if (i.length > 5)
|
|
2098
|
+
return s;
|
|
2099
|
+
const o = et.createTransformer(t), r = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
|
|
2100
|
+
i[0 + r] /= a, i[1 + r] /= l;
|
|
2101
|
+
const u = M(a, l, 0.5);
|
|
2102
|
+
return typeof i[2 + r] == "number" && (i[2 + r] /= u), typeof i[3 + r] == "number" && (i[3 + r] /= u), o(i);
|
|
2103
|
+
}
|
|
2104
|
+
}, Ke = {
|
|
2105
|
+
borderRadius: {
|
|
2106
|
+
...Dt,
|
|
2107
|
+
applyTo: [
|
|
2108
|
+
"borderTopLeftRadius",
|
|
2109
|
+
"borderTopRightRadius",
|
|
2110
|
+
"borderBottomLeftRadius",
|
|
2111
|
+
"borderBottomRightRadius"
|
|
2112
|
+
]
|
|
2113
|
+
},
|
|
2114
|
+
borderTopLeftRadius: Dt,
|
|
2115
|
+
borderTopRightRadius: Dt,
|
|
2116
|
+
borderBottomLeftRadius: Dt,
|
|
2117
|
+
borderBottomRightRadius: Dt,
|
|
2118
|
+
boxShadow: ul
|
|
2119
|
+
};
|
|
2084
2120
|
function ir(t, { layout: e, layoutId: n }) {
|
|
2085
|
-
return Mt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!
|
|
2121
|
+
return Mt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!Ke[t] || t === "opacity");
|
|
2086
2122
|
}
|
|
2087
2123
|
const hl = {
|
|
2088
2124
|
x: "translateX",
|
|
@@ -2098,7 +2134,7 @@ function dl(t, e, n) {
|
|
|
2098
2134
|
continue;
|
|
2099
2135
|
let l = !0;
|
|
2100
2136
|
if (typeof a == "number" ? l = a === (r.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
|
|
2101
|
-
const u = Yi(a,
|
|
2137
|
+
const u = Yi(a, wn[r]);
|
|
2102
2138
|
if (!l) {
|
|
2103
2139
|
i = !1;
|
|
2104
2140
|
const c = hl[r] || r;
|
|
@@ -2109,7 +2145,7 @@ function dl(t, e, n) {
|
|
|
2109
2145
|
}
|
|
2110
2146
|
return s = s.trim(), n ? s = n(e, i ? "" : s) : i && (s = "none"), s;
|
|
2111
2147
|
}
|
|
2112
|
-
function
|
|
2148
|
+
function Dn(t, e, n) {
|
|
2113
2149
|
const { style: s, vars: i, transformOrigin: o } = t;
|
|
2114
2150
|
let r = !1, a = !1;
|
|
2115
2151
|
for (const l in e) {
|
|
@@ -2117,11 +2153,11 @@ function Cn(t, e, n) {
|
|
|
2117
2153
|
if (Mt.has(l)) {
|
|
2118
2154
|
r = !0;
|
|
2119
2155
|
continue;
|
|
2120
|
-
} else if (
|
|
2156
|
+
} else if (bi(l)) {
|
|
2121
2157
|
i[l] = u;
|
|
2122
2158
|
continue;
|
|
2123
2159
|
} else {
|
|
2124
|
-
const c = Yi(u,
|
|
2160
|
+
const c = Yi(u, wn[l]);
|
|
2125
2161
|
l.startsWith("origin") ? (a = !0, o[l] = c) : s[l] = c;
|
|
2126
2162
|
}
|
|
2127
2163
|
}
|
|
@@ -2130,7 +2166,7 @@ function Cn(t, e, n) {
|
|
|
2130
2166
|
s.transformOrigin = `${l} ${u} ${c}`;
|
|
2131
2167
|
}
|
|
2132
2168
|
}
|
|
2133
|
-
const
|
|
2169
|
+
const Cn = () => ({
|
|
2134
2170
|
style: {},
|
|
2135
2171
|
transform: {},
|
|
2136
2172
|
transformOrigin: {},
|
|
@@ -2141,9 +2177,9 @@ function rr(t, e, n) {
|
|
|
2141
2177
|
!k(e[s]) && !ir(s, n) && (t[s] = e[s]);
|
|
2142
2178
|
}
|
|
2143
2179
|
function ml({ transformTemplate: t }, e) {
|
|
2144
|
-
return
|
|
2145
|
-
const n =
|
|
2146
|
-
return
|
|
2180
|
+
return oe(() => {
|
|
2181
|
+
const n = Cn();
|
|
2182
|
+
return Dn(n, e, t), Object.assign({}, n.vars, n.style);
|
|
2147
2183
|
}, [e]);
|
|
2148
2184
|
}
|
|
2149
2185
|
function pl(t, e) {
|
|
@@ -2178,7 +2214,7 @@ function or(t, {
|
|
|
2178
2214
|
// This is object creation, which we try to avoid per-frame.
|
|
2179
2215
|
...a
|
|
2180
2216
|
}, l, u, c) {
|
|
2181
|
-
if (
|
|
2217
|
+
if (Dn(t, a, u), l) {
|
|
2182
2218
|
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
2183
2219
|
return;
|
|
2184
2220
|
}
|
|
@@ -2187,11 +2223,11 @@ function or(t, {
|
|
|
2187
2223
|
h.transform && (f.transform = h.transform, delete h.transform), (f.transform || h.transformOrigin) && (f.transformOrigin = h.transformOrigin ?? "50% 50%", delete h.transformOrigin), f.transform && (f.transformBox = (c == null ? void 0 : c.transformBox) ?? "fill-box", delete h.transformBox), e !== void 0 && (h.x = e), n !== void 0 && (h.y = n), s !== void 0 && (h.scale = s), i !== void 0 && Tl(h, i, o, r, !1);
|
|
2188
2224
|
}
|
|
2189
2225
|
const ar = () => ({
|
|
2190
|
-
...
|
|
2226
|
+
...Cn(),
|
|
2191
2227
|
attrs: {}
|
|
2192
2228
|
}), lr = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
2193
2229
|
function xl(t, e, n, s) {
|
|
2194
|
-
const i =
|
|
2230
|
+
const i = oe(() => {
|
|
2195
2231
|
const o = ar();
|
|
2196
2232
|
return or(o, e, lr(s), t.transformTemplate, t.style), {
|
|
2197
2233
|
...o.attrs,
|
|
@@ -2231,7 +2267,7 @@ const wl = [
|
|
|
2231
2267
|
"use",
|
|
2232
2268
|
"view"
|
|
2233
2269
|
];
|
|
2234
|
-
function
|
|
2270
|
+
function En(t) {
|
|
2235
2271
|
return (
|
|
2236
2272
|
/**
|
|
2237
2273
|
* If it's not a string, it's a custom React component. Currently we only support
|
|
@@ -2252,7 +2288,7 @@ function Rn(t) {
|
|
|
2252
2288
|
);
|
|
2253
2289
|
}
|
|
2254
2290
|
function bl(t, e, n, { latestValues: s }, i, o = !1) {
|
|
2255
|
-
const a = (
|
|
2291
|
+
const a = (En(t) ? xl : gl)(e, s, i, t), l = al(e, typeof t == "string", o), u = t !== ri ? { ...l, ...a, ref: n } : {}, { children: c } = e, h = oe(() => k(c) ? c.get() : c, [c]);
|
|
2256
2292
|
return Yr(t, {
|
|
2257
2293
|
...u,
|
|
2258
2294
|
children: h
|
|
@@ -2264,7 +2300,7 @@ function ls(t) {
|
|
|
2264
2300
|
e[0][s] = n.get(), e[1][s] = n.getVelocity();
|
|
2265
2301
|
}), e;
|
|
2266
2302
|
}
|
|
2267
|
-
function
|
|
2303
|
+
function Rn(t, e, n, s) {
|
|
2268
2304
|
if (typeof e == "function") {
|
|
2269
2305
|
const [i, o] = ls(s);
|
|
2270
2306
|
e = e(n !== void 0 ? n : t.custom, i, o);
|
|
@@ -2275,7 +2311,7 @@ function Ln(t, e, n, s) {
|
|
|
2275
2311
|
}
|
|
2276
2312
|
return e;
|
|
2277
2313
|
}
|
|
2278
|
-
function
|
|
2314
|
+
function Jt(t) {
|
|
2279
2315
|
return k(t) ? t.get() : t;
|
|
2280
2316
|
}
|
|
2281
2317
|
function Sl({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, s, i) {
|
|
@@ -2287,17 +2323,17 @@ function Sl({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, s, i) {
|
|
|
2287
2323
|
function Pl(t, e, n, s) {
|
|
2288
2324
|
const i = {}, o = s(t, {});
|
|
2289
2325
|
for (const f in o)
|
|
2290
|
-
i[f] =
|
|
2326
|
+
i[f] = Jt(o[f]);
|
|
2291
2327
|
let { initial: r, animate: a } = t;
|
|
2292
|
-
const l =
|
|
2328
|
+
const l = he(t), u = sr(t);
|
|
2293
2329
|
e && u && !l && t.inherit !== !1 && (r === void 0 && (r = e.initial), a === void 0 && (a = e.animate));
|
|
2294
2330
|
let c = n ? n.initial === !1 : !1;
|
|
2295
2331
|
c = c || r === !1;
|
|
2296
2332
|
const h = c ? a : r;
|
|
2297
|
-
if (h && typeof h != "boolean" && !
|
|
2333
|
+
if (h && typeof h != "boolean" && !ue(h)) {
|
|
2298
2334
|
const f = Array.isArray(h) ? h : [h];
|
|
2299
2335
|
for (let d = 0; d < f.length; d++) {
|
|
2300
|
-
const m =
|
|
2336
|
+
const m = Rn(t, f[d]);
|
|
2301
2337
|
if (m) {
|
|
2302
2338
|
const { transitionEnd: g, transition: v, ...p } = m;
|
|
2303
2339
|
for (const T in p) {
|
|
@@ -2316,10 +2352,10 @@ function Pl(t, e, n, s) {
|
|
|
2316
2352
|
return i;
|
|
2317
2353
|
}
|
|
2318
2354
|
const cr = (t) => (e, n) => {
|
|
2319
|
-
const s = B(
|
|
2320
|
-
return n ? o() :
|
|
2355
|
+
const s = B(ce), i = B(en), o = () => Sl(t, e, s, i);
|
|
2356
|
+
return n ? o() : ae(o);
|
|
2321
2357
|
};
|
|
2322
|
-
function
|
|
2358
|
+
function Ln(t, e, n) {
|
|
2323
2359
|
var o;
|
|
2324
2360
|
const { style: s } = t, i = {};
|
|
2325
2361
|
for (const r in s)
|
|
@@ -2327,11 +2363,11 @@ function kn(t, e, n) {
|
|
|
2327
2363
|
return i;
|
|
2328
2364
|
}
|
|
2329
2365
|
const Al = /* @__PURE__ */ cr({
|
|
2330
|
-
scrapeMotionValuesFromProps:
|
|
2331
|
-
createRenderState:
|
|
2366
|
+
scrapeMotionValuesFromProps: Ln,
|
|
2367
|
+
createRenderState: Cn
|
|
2332
2368
|
});
|
|
2333
2369
|
function ur(t, e, n) {
|
|
2334
|
-
const s =
|
|
2370
|
+
const s = Ln(t, e, n);
|
|
2335
2371
|
for (const i in t)
|
|
2336
2372
|
if (k(t[i]) || k(e[i])) {
|
|
2337
2373
|
const o = Vt.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
@@ -2358,10 +2394,10 @@ function Dl(t, e, n) {
|
|
|
2358
2394
|
[e]
|
|
2359
2395
|
);
|
|
2360
2396
|
}
|
|
2361
|
-
const
|
|
2397
|
+
const kn = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Cl = "framerAppearId", hr = "data-" + kn(Cl), fr = St({});
|
|
2362
2398
|
function El(t, e, n, s, i) {
|
|
2363
2399
|
var g, v;
|
|
2364
|
-
const { visualElement: o } = B(
|
|
2400
|
+
const { visualElement: o } = B(ce), r = B(er), a = B(en), l = B(An).reducedMotion, u = lt(null);
|
|
2365
2401
|
s = s || r.renderer, !u.current && s && (u.current = s(t, {
|
|
2366
2402
|
visualState: e,
|
|
2367
2403
|
parent: o,
|
|
@@ -2379,7 +2415,7 @@ function El(t, e, n, s, i) {
|
|
|
2379
2415
|
const d = n[hr], m = lt(!!d && !((g = window.MotionHandoffIsComplete) != null && g.call(window, d)) && ((v = window.MotionHasOptimisedAnimation) == null ? void 0 : v.call(window, d)));
|
|
2380
2416
|
return tn(() => {
|
|
2381
2417
|
c && (f.current = !0, window.MotionIsMounted = !0, c.updateFeatures(), c.scheduleRenderMicrotask(), m.current && c.animationState && c.animationState.animateChanges());
|
|
2382
|
-
}),
|
|
2418
|
+
}), Nt(() => {
|
|
2383
2419
|
c && (!m.current && c.animationState && c.animationState.animateChanges(), m.current && (queueMicrotask(() => {
|
|
2384
2420
|
var p;
|
|
2385
2421
|
(p = window.MotionHandoffMarkAsComplete) == null || p.call(window, d);
|
|
@@ -2411,13 +2447,13 @@ function dr(t) {
|
|
|
2411
2447
|
if (t)
|
|
2412
2448
|
return t.options.allowProjection !== !1 ? t.projection : dr(t.parent);
|
|
2413
2449
|
}
|
|
2414
|
-
function
|
|
2450
|
+
function ve(t, { forwardMotionProps: e = !1 } = {}, n, s) {
|
|
2415
2451
|
n && il(n);
|
|
2416
|
-
const i =
|
|
2452
|
+
const i = En(t) ? Vl : Al;
|
|
2417
2453
|
function o(a, l) {
|
|
2418
2454
|
let u;
|
|
2419
2455
|
const c = {
|
|
2420
|
-
...B(
|
|
2456
|
+
...B(An),
|
|
2421
2457
|
...a,
|
|
2422
2458
|
layoutId: Ll(a)
|
|
2423
2459
|
}, { isStatic: h } = c, f = cl(a), d = i(a, h);
|
|
@@ -2426,14 +2462,14 @@ function Te(t, { forwardMotionProps: e = !1 } = {}, n, s) {
|
|
|
2426
2462
|
const m = Bl(c);
|
|
2427
2463
|
u = m.MeasureLayout, f.visualElement = El(t, d, c, s, m.ProjectionNode);
|
|
2428
2464
|
}
|
|
2429
|
-
return
|
|
2465
|
+
return ii(ce.Provider, { value: f, children: [u && f.visualElement ? tt(u, { visualElement: f.visualElement, ...c }) : null, bl(t, a, Dl(d, f.visualElement, l), d, h, e)] });
|
|
2430
2466
|
}
|
|
2431
2467
|
o.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
|
|
2432
2468
|
const r = qr(o);
|
|
2433
2469
|
return r[Ml] = t, r;
|
|
2434
2470
|
}
|
|
2435
2471
|
function Ll({ layoutId: t }) {
|
|
2436
|
-
const e = B(
|
|
2472
|
+
const e = B(oi).id;
|
|
2437
2473
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
2438
2474
|
}
|
|
2439
2475
|
function kl(t, e) {
|
|
@@ -2455,15 +2491,15 @@ function Bl(t) {
|
|
|
2455
2491
|
}
|
|
2456
2492
|
function Fl(t, e) {
|
|
2457
2493
|
if (typeof Proxy > "u")
|
|
2458
|
-
return
|
|
2459
|
-
const n = /* @__PURE__ */ new Map(), s = (o, r) =>
|
|
2494
|
+
return ve;
|
|
2495
|
+
const n = /* @__PURE__ */ new Map(), s = (o, r) => ve(o, r, t, e), i = (o, r) => (process.env.NODE_ENV !== "production" && le(!1, "motion() is deprecated. Use motion.create() instead."), s(o, r));
|
|
2460
2496
|
return new Proxy(i, {
|
|
2461
2497
|
/**
|
|
2462
2498
|
* Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
|
|
2463
2499
|
* The prop name is passed through as `key` and we can use that to generate a `motion`
|
|
2464
2500
|
* DOM component with that name.
|
|
2465
2501
|
*/
|
|
2466
|
-
get: (o, r) => r === "create" ? s : (n.has(r) || n.set(r,
|
|
2502
|
+
get: (o, r) => r === "create" ? s : (n.has(r) || n.set(r, ve(r, void 0, t, e)), n.get(r))
|
|
2467
2503
|
});
|
|
2468
2504
|
}
|
|
2469
2505
|
function mr({ top: t, left: e, right: n, bottom: s }) {
|
|
@@ -2486,11 +2522,11 @@ function Ol(t, e) {
|
|
|
2486
2522
|
right: s.x
|
|
2487
2523
|
};
|
|
2488
2524
|
}
|
|
2489
|
-
function
|
|
2525
|
+
function Te(t) {
|
|
2490
2526
|
return t === void 0 || t === 1;
|
|
2491
2527
|
}
|
|
2492
2528
|
function $e({ scale: t, scaleX: e, scaleY: n }) {
|
|
2493
|
-
return !
|
|
2529
|
+
return !Te(t) || !Te(e) || !Te(n);
|
|
2494
2530
|
}
|
|
2495
2531
|
function rt(t) {
|
|
2496
2532
|
return $e(t) || pr(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
@@ -2501,12 +2537,12 @@ function pr(t) {
|
|
|
2501
2537
|
function cs(t) {
|
|
2502
2538
|
return t && t !== "0%";
|
|
2503
2539
|
}
|
|
2504
|
-
function
|
|
2540
|
+
function ie(t, e, n) {
|
|
2505
2541
|
const s = t - n, i = e * s;
|
|
2506
2542
|
return n + i;
|
|
2507
2543
|
}
|
|
2508
2544
|
function us(t, e, n, s, i) {
|
|
2509
|
-
return i !== void 0 && (t =
|
|
2545
|
+
return i !== void 0 && (t = ie(t, i, s)), ie(t, n, s) + e;
|
|
2510
2546
|
}
|
|
2511
2547
|
function ze(t, e = 0, n = 1, s, i) {
|
|
2512
2548
|
t.min = us(t.min, e, n, s, i), t.max = us(t.max, e, n, s, i);
|
|
@@ -2610,14 +2646,14 @@ class $l {
|
|
|
2610
2646
|
return {};
|
|
2611
2647
|
}
|
|
2612
2648
|
constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: o, visualState: r }, a = {}) {
|
|
2613
|
-
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver =
|
|
2649
|
+
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Tn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
2614
2650
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
2615
2651
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
2616
2652
|
const f = O.now();
|
|
2617
2653
|
this.renderScheduledAt < f && (this.renderScheduledAt = f, P.render(this.render, !1, !0));
|
|
2618
2654
|
};
|
|
2619
2655
|
const { latestValues: l, renderState: u } = r;
|
|
2620
|
-
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants =
|
|
2656
|
+
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = he(n), this.isVariantNode = sr(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
2621
2657
|
const { willChange: c, ...h } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
2622
2658
|
for (const f in h) {
|
|
2623
2659
|
const d = h[f];
|
|
@@ -2626,7 +2662,7 @@ class $l {
|
|
|
2626
2662
|
}
|
|
2627
2663
|
mount(e) {
|
|
2628
2664
|
var n;
|
|
2629
|
-
this.current = e, Ul.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((s, i) => this.bindToMotionValue(i, s)), vr.current || Wl(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : He.current, process.env.NODE_ENV !== "production" &&
|
|
2665
|
+
this.current = e, Ul.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((s, i) => this.bindToMotionValue(i, s)), vr.current || Wl(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : He.current, process.env.NODE_ENV !== "production" && le(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), (n = this.parent) == null || n.addChild(this), this.update(this.props, this.presenceContext);
|
|
2630
2666
|
}
|
|
2631
2667
|
unmount() {
|
|
2632
2668
|
var e;
|
|
@@ -2767,7 +2803,7 @@ class $l {
|
|
|
2767
2803
|
*/
|
|
2768
2804
|
readValue(e, n) {
|
|
2769
2805
|
let s = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
|
|
2770
|
-
return s != null && (typeof s == "string" && (
|
|
2806
|
+
return s != null && (typeof s == "string" && (ai(s) || ci(s)) ? s = parseFloat(s) : !nl(s) && et.test(n) && (s = Gi(e, n)), this.setBaseTarget(e, k(s) ? s.get() : s)), k(s) ? s.get() : s;
|
|
2771
2807
|
}
|
|
2772
2808
|
/**
|
|
2773
2809
|
* Set the base target to later animate back to. This is currently
|
|
@@ -2785,7 +2821,7 @@ class $l {
|
|
|
2785
2821
|
const { initial: n } = this.props;
|
|
2786
2822
|
let s;
|
|
2787
2823
|
if (typeof n == "string" || typeof n == "object") {
|
|
2788
|
-
const r =
|
|
2824
|
+
const r = Rn(this.props, n, (o = this.presenceContext) == null ? void 0 : o.custom);
|
|
2789
2825
|
r && (s = r[e]);
|
|
2790
2826
|
}
|
|
2791
2827
|
if (n && s !== void 0)
|
|
@@ -2800,7 +2836,7 @@ class $l {
|
|
|
2800
2836
|
this.events[e] && this.events[e].notify(...n);
|
|
2801
2837
|
}
|
|
2802
2838
|
scheduleRenderMicrotask() {
|
|
2803
|
-
|
|
2839
|
+
bn.render(this.render);
|
|
2804
2840
|
}
|
|
2805
2841
|
}
|
|
2806
2842
|
class Tr extends $l {
|
|
@@ -2843,9 +2879,9 @@ class Hl extends Tr {
|
|
|
2843
2879
|
readValueFromInstance(e, n) {
|
|
2844
2880
|
var s;
|
|
2845
2881
|
if (Mt.has(n))
|
|
2846
|
-
return (s = this.projection) != null && s.isProjecting ?
|
|
2882
|
+
return (s = this.projection) != null && s.isProjecting ? Fe(n) : ta(e, n);
|
|
2847
2883
|
{
|
|
2848
|
-
const i = zl(e), o = (
|
|
2884
|
+
const i = zl(e), o = (bi(n) ? i.getPropertyValue(n) : i[n]) || 0;
|
|
2849
2885
|
return typeof o == "string" ? o.trim() : o;
|
|
2850
2886
|
}
|
|
2851
2887
|
}
|
|
@@ -2853,10 +2889,10 @@ class Hl extends Tr {
|
|
|
2853
2889
|
return yr(e, n);
|
|
2854
2890
|
}
|
|
2855
2891
|
build(e, n, s) {
|
|
2856
|
-
|
|
2892
|
+
Dn(e, n, s.transformTemplate);
|
|
2857
2893
|
}
|
|
2858
2894
|
scrapeMotionValuesFromProps(e, n, s) {
|
|
2859
|
-
return
|
|
2895
|
+
return Ln(e, n, s);
|
|
2860
2896
|
}
|
|
2861
2897
|
}
|
|
2862
2898
|
const wr = /* @__PURE__ */ new Set([
|
|
@@ -2887,7 +2923,7 @@ const wr = /* @__PURE__ */ new Set([
|
|
|
2887
2923
|
function Gl(t, e, n, s) {
|
|
2888
2924
|
xr(t, e, void 0, s);
|
|
2889
2925
|
for (const i in e.attrs)
|
|
2890
|
-
t.setAttribute(wr.has(i) ? i :
|
|
2926
|
+
t.setAttribute(wr.has(i) ? i : kn(i), e.attrs[i]);
|
|
2891
2927
|
}
|
|
2892
2928
|
class _l extends Tr {
|
|
2893
2929
|
constructor() {
|
|
@@ -2901,7 +2937,7 @@ class _l extends Tr {
|
|
|
2901
2937
|
const s = Hi(n);
|
|
2902
2938
|
return s && s.default || 0;
|
|
2903
2939
|
}
|
|
2904
|
-
return n = wr.has(n) ? n :
|
|
2940
|
+
return n = wr.has(n) ? n : kn(n), e.getAttribute(n);
|
|
2905
2941
|
}
|
|
2906
2942
|
scrapeMotionValuesFromProps(e, n, s) {
|
|
2907
2943
|
return ur(e, n, s);
|
|
@@ -2916,12 +2952,12 @@ class _l extends Tr {
|
|
|
2916
2952
|
this.isSVGTag = lr(e.tagName), super.mount(e);
|
|
2917
2953
|
}
|
|
2918
2954
|
}
|
|
2919
|
-
const Yl = (t, e) =>
|
|
2920
|
-
allowProjection: t !==
|
|
2955
|
+
const Yl = (t, e) => En(t) ? new _l(e) : new Hl(e, {
|
|
2956
|
+
allowProjection: t !== ri
|
|
2921
2957
|
});
|
|
2922
2958
|
function xt(t, e, n) {
|
|
2923
2959
|
const s = t.getProps();
|
|
2924
|
-
return
|
|
2960
|
+
return Rn(s, e, n !== void 0 ? n : s.custom, t);
|
|
2925
2961
|
}
|
|
2926
2962
|
const Ge = (t) => Array.isArray(t);
|
|
2927
2963
|
function Xl(t, e, n) {
|
|
@@ -2980,8 +3016,8 @@ const ec = {
|
|
|
2980
3016
|
function oc({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: u, ...c }) {
|
|
2981
3017
|
return !!Object.keys(c).length;
|
|
2982
3018
|
}
|
|
2983
|
-
const
|
|
2984
|
-
const a =
|
|
3019
|
+
const Bn = (t, e, n, s = {}, i, o) => (r) => {
|
|
3020
|
+
const a = xn(s, t) || {}, l = a.delay || s.delay || 0;
|
|
2985
3021
|
let { elapsed: u = 0 } = s;
|
|
2986
3022
|
u = u - /* @__PURE__ */ G(l);
|
|
2987
3023
|
const c = {
|
|
@@ -3002,7 +3038,7 @@ const Fn = (t, e, n, s = {}, i, o) => (r) => {
|
|
|
3002
3038
|
};
|
|
3003
3039
|
oc(a) || Object.assign(c, rc(t, c)), c.duration && (c.duration = /* @__PURE__ */ G(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ G(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
|
|
3004
3040
|
let h = !1;
|
|
3005
|
-
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (
|
|
3041
|
+
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (We(c), c.delay === 0 && (h = !0)), (Z.instantAnimations || Z.skipAnimations) && (h = !0, We(c), c.delay = 0), c.allowFlatten = !a.type && !a.ease, h && !o && e.get() !== void 0) {
|
|
3006
3042
|
const f = tc(c.keyframes, a);
|
|
3007
3043
|
if (f !== void 0) {
|
|
3008
3044
|
P.update(() => {
|
|
@@ -3011,7 +3047,7 @@ const Fn = (t, e, n, s = {}, i, o) => (r) => {
|
|
|
3011
3047
|
return;
|
|
3012
3048
|
}
|
|
3013
3049
|
}
|
|
3014
|
-
return a.isSync ? new
|
|
3050
|
+
return a.isSync ? new vn(c) : new ba(c);
|
|
3015
3051
|
};
|
|
3016
3052
|
function ac({ protectedKeys: t, needsAnimating: e }, n) {
|
|
3017
3053
|
const s = t.hasOwnProperty(n) && e[n] !== !0;
|
|
@@ -3027,7 +3063,7 @@ function Sr(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
3027
3063
|
continue;
|
|
3028
3064
|
const d = {
|
|
3029
3065
|
delay: n,
|
|
3030
|
-
...
|
|
3066
|
+
...xn(o || {}, c)
|
|
3031
3067
|
}, m = h.get();
|
|
3032
3068
|
if (m !== void 0 && !h.isAnimating && !Array.isArray(f) && f === m && !d.velocity)
|
|
3033
3069
|
continue;
|
|
@@ -3039,7 +3075,7 @@ function Sr(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
3039
3075
|
T !== null && (d.startTime = T, g = !0);
|
|
3040
3076
|
}
|
|
3041
3077
|
}
|
|
3042
|
-
_e(t, c), h.start(
|
|
3078
|
+
_e(t, c), h.start(Bn(c, h, f, t.shouldReduceMotion && Ki.has(c) ? { type: !1 } : d, t, g));
|
|
3043
3079
|
const v = h.animation;
|
|
3044
3080
|
v && l.push(v);
|
|
3045
3081
|
}
|
|
@@ -3104,7 +3140,7 @@ function Ar(t, e) {
|
|
|
3104
3140
|
return !1;
|
|
3105
3141
|
return !0;
|
|
3106
3142
|
}
|
|
3107
|
-
const uc =
|
|
3143
|
+
const uc = Mn.length;
|
|
3108
3144
|
function Vr(t) {
|
|
3109
3145
|
if (!t)
|
|
3110
3146
|
return;
|
|
@@ -3114,12 +3150,12 @@ function Vr(t) {
|
|
|
3114
3150
|
}
|
|
3115
3151
|
const e = {};
|
|
3116
3152
|
for (let n = 0; n < uc; n++) {
|
|
3117
|
-
const s =
|
|
3153
|
+
const s = Mn[n], i = t.props[s];
|
|
3118
3154
|
(Ot(i) || i === !1) && (e[s] = i);
|
|
3119
3155
|
}
|
|
3120
3156
|
return e;
|
|
3121
3157
|
}
|
|
3122
|
-
const hc = [...
|
|
3158
|
+
const hc = [...Vn].reverse(), fc = Vn.length;
|
|
3123
3159
|
function dc(t) {
|
|
3124
3160
|
return (e) => Promise.all(e.map(({ animation: n, options: s }) => cc(t, n, s)));
|
|
3125
3161
|
}
|
|
@@ -3147,7 +3183,7 @@ function mc(t) {
|
|
|
3147
3183
|
if (A && s && t.manuallyAnimateOnMount && (A = !1), T.protectedKeys = { ...d }, // If it isn't active and hasn't *just* been set as inactive
|
|
3148
3184
|
!T.isActive && w === null || // If we didn't and don't have any defined prop for this animation type
|
|
3149
3185
|
!y && !T.prevProp || // Or if the prop doesn't define an animation
|
|
3150
|
-
|
|
3186
|
+
ue(y) || typeof y == "boolean")
|
|
3151
3187
|
continue;
|
|
3152
3188
|
const C = pc(T.prevProp, y);
|
|
3153
3189
|
let b = C || // If we're making this variant active, we want to always make it active
|
|
@@ -3156,26 +3192,26 @@ function mc(t) {
|
|
|
3156
3192
|
const N = Array.isArray(y) ? y : [y];
|
|
3157
3193
|
let ht = N.reduce(i(p), {});
|
|
3158
3194
|
w === !1 && (ht = {});
|
|
3159
|
-
const { prevResolvedValues:
|
|
3160
|
-
...
|
|
3195
|
+
const { prevResolvedValues: Fn = {} } = T, zr = {
|
|
3196
|
+
...Fn,
|
|
3161
3197
|
...ht
|
|
3162
|
-
},
|
|
3198
|
+
}, In = (L) => {
|
|
3163
3199
|
b = !0, f.has(L) && (I = !0, f.delete(L)), T.needsAnimating[L] = !0;
|
|
3164
3200
|
const W = t.getValue(L);
|
|
3165
3201
|
W && (W.liveStyle = !1);
|
|
3166
3202
|
};
|
|
3167
3203
|
for (const L in zr) {
|
|
3168
|
-
const W = ht[L], st =
|
|
3204
|
+
const W = ht[L], st = Fn[L];
|
|
3169
3205
|
if (d.hasOwnProperty(L))
|
|
3170
3206
|
continue;
|
|
3171
3207
|
let ft = !1;
|
|
3172
|
-
Ge(W) && Ge(st) ? ft = !Ar(W, st) : ft = W !== st, ft ? W != null ?
|
|
3208
|
+
Ge(W) && Ge(st) ? ft = !Ar(W, st) : ft = W !== st, ft ? W != null ? In(L) : f.add(L) : W !== void 0 && f.has(L) ? In(L) : T.protectedKeys[L] = !0;
|
|
3173
3209
|
}
|
|
3174
3210
|
T.prevProp = y, T.prevResolvedValues = ht, T.isActive && (d = { ...d, ...ht }), s && t.blockInitialAnimation && (b = !1);
|
|
3175
|
-
const
|
|
3176
|
-
b && (!
|
|
3211
|
+
const On = A && C;
|
|
3212
|
+
b && (!On || I) && h.push(...N.map((L) => {
|
|
3177
3213
|
const W = { type: p };
|
|
3178
|
-
if (typeof L == "string" && s && !
|
|
3214
|
+
if (typeof L == "string" && s && !On && t.manuallyAnimateOnMount && t.parent) {
|
|
3179
3215
|
const { parent: st } = t, ft = xt(st, L);
|
|
3180
3216
|
if (st.enteringChildren && ft) {
|
|
3181
3217
|
const { delayChildren: Hr } = ft.transition || {};
|
|
@@ -3265,7 +3301,7 @@ class gc extends nt {
|
|
|
3265
3301
|
}
|
|
3266
3302
|
updateAnimationControlsSubscription() {
|
|
3267
3303
|
const { animate: e } = this.node.getProps();
|
|
3268
|
-
|
|
3304
|
+
ue(e) && (this.unmountControls = e.subscribe(this.node));
|
|
3269
3305
|
}
|
|
3270
3306
|
/**
|
|
3271
3307
|
* Subscribe any provided AnimationControls to the component's VisualElement
|
|
@@ -3313,10 +3349,10 @@ const Tc = {
|
|
|
3313
3349
|
Feature: vc
|
|
3314
3350
|
}
|
|
3315
3351
|
};
|
|
3316
|
-
function
|
|
3352
|
+
function jt(t, e, n, s = { passive: !0 }) {
|
|
3317
3353
|
return t.addEventListener(e, n, s), () => t.removeEventListener(e, n);
|
|
3318
3354
|
}
|
|
3319
|
-
function
|
|
3355
|
+
function $t(t) {
|
|
3320
3356
|
return {
|
|
3321
3357
|
point: {
|
|
3322
3358
|
x: t.pageX,
|
|
@@ -3324,9 +3360,9 @@ function zt(t) {
|
|
|
3324
3360
|
}
|
|
3325
3361
|
};
|
|
3326
3362
|
}
|
|
3327
|
-
const xc = (t) => (e) =>
|
|
3363
|
+
const xc = (t) => (e) => Sn(e) && t(e, $t(e));
|
|
3328
3364
|
function kt(t, e, n, s) {
|
|
3329
|
-
return
|
|
3365
|
+
return jt(t, e, xc(n), s);
|
|
3330
3366
|
}
|
|
3331
3367
|
const Mr = 1e-4, wc = 1 - Mr, bc = 1 + Mr, Dr = 0.01, Sc = 0 - Dr, Pc = 0 + Dr;
|
|
3332
3368
|
function F(t) {
|
|
@@ -3350,7 +3386,7 @@ function Vc(t, e, n) {
|
|
|
3350
3386
|
function xs(t, e, n) {
|
|
3351
3387
|
t.min = e.min - n.min, t.max = t.min + F(e);
|
|
3352
3388
|
}
|
|
3353
|
-
function
|
|
3389
|
+
function re(t, e, n) {
|
|
3354
3390
|
xs(t.x, e.x, n.x), xs(t.y, e.y, n.y);
|
|
3355
3391
|
}
|
|
3356
3392
|
function U(t) {
|
|
@@ -3366,7 +3402,7 @@ class Er {
|
|
|
3366
3402
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
|
|
3367
3403
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3368
3404
|
return;
|
|
3369
|
-
const f =
|
|
3405
|
+
const f = we(this.lastMoveEventInfo, this.history), d = this.startEvent !== null, m = Mc(f.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
|
|
3370
3406
|
if (!d && !m)
|
|
3371
3407
|
return;
|
|
3372
3408
|
const { point: g } = f, { timestamp: v } = R;
|
|
@@ -3374,21 +3410,21 @@ class Er {
|
|
|
3374
3410
|
const { onStart: p, onMove: T } = this.handlers;
|
|
3375
3411
|
d || (p && p(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent), T && T(this.lastMoveEvent, f);
|
|
3376
3412
|
}, this.handlePointerMove = (f, d) => {
|
|
3377
|
-
this.lastMoveEvent = f, this.lastMoveEventInfo =
|
|
3413
|
+
this.lastMoveEvent = f, this.lastMoveEventInfo = xe(d, this.transformPagePoint), P.update(this.updatePoint, !0);
|
|
3378
3414
|
}, this.handlePointerUp = (f, d) => {
|
|
3379
3415
|
this.end();
|
|
3380
3416
|
const { onEnd: m, onSessionEnd: g, resumeAnimation: v } = this.handlers;
|
|
3381
3417
|
if (this.dragSnapToOrigin && v && v(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3382
3418
|
return;
|
|
3383
|
-
const p =
|
|
3419
|
+
const p = we(f.type === "pointercancel" ? this.lastMoveEventInfo : xe(d, this.transformPagePoint), this.history);
|
|
3384
3420
|
this.startEvent && m && m(f, p), g && g(f, p);
|
|
3385
|
-
}, !
|
|
3421
|
+
}, !Sn(e))
|
|
3386
3422
|
return;
|
|
3387
3423
|
this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = s, this.distanceThreshold = r, this.contextWindow = i || window;
|
|
3388
|
-
const a =
|
|
3424
|
+
const a = $t(e), l = xe(a, this.transformPagePoint), { point: u } = l, { timestamp: c } = R;
|
|
3389
3425
|
this.history = [{ ...u, timestamp: c }];
|
|
3390
3426
|
const { onSessionStart: h } = n;
|
|
3391
|
-
h && h(e,
|
|
3427
|
+
h && h(e, we(l, this.history)), this.removeListeners = Wt(kt(this.contextWindow, "pointermove", this.handlePointerMove), kt(this.contextWindow, "pointerup", this.handlePointerUp), kt(this.contextWindow, "pointercancel", this.handlePointerUp));
|
|
3392
3428
|
}
|
|
3393
3429
|
updateHandlers(e) {
|
|
3394
3430
|
this.handlers = e;
|
|
@@ -3397,13 +3433,13 @@ class Er {
|
|
|
3397
3433
|
this.removeListeners && this.removeListeners(), Y(this.updatePoint);
|
|
3398
3434
|
}
|
|
3399
3435
|
}
|
|
3400
|
-
function
|
|
3436
|
+
function xe(t, e) {
|
|
3401
3437
|
return e ? { point: e(t.point) } : t;
|
|
3402
3438
|
}
|
|
3403
3439
|
function bs(t, e) {
|
|
3404
3440
|
return { x: t.x - e.x, y: t.y - e.y };
|
|
3405
3441
|
}
|
|
3406
|
-
function
|
|
3442
|
+
function we({ point: t }, e) {
|
|
3407
3443
|
return {
|
|
3408
3444
|
point: t,
|
|
3409
3445
|
delta: bs(t, Rr(e)),
|
|
@@ -3496,7 +3532,7 @@ class Oc {
|
|
|
3496
3532
|
return;
|
|
3497
3533
|
const o = (h) => {
|
|
3498
3534
|
const { dragSnapToOrigin: f } = this.getProps();
|
|
3499
|
-
f ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(
|
|
3535
|
+
f ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor($t(h).point);
|
|
3500
3536
|
}, r = (h, f) => {
|
|
3501
3537
|
const { drag: d, dragPropagation: m, onDragStart: g } = this.getProps();
|
|
3502
3538
|
if (d && !m && (this.openDragLock && this.openDragLock(), this.openDragLock = ja(d), !this.openDragLock))
|
|
@@ -3568,7 +3604,7 @@ class Oc {
|
|
|
3568
3604
|
}
|
|
3569
3605
|
updateAxis(e, n, s) {
|
|
3570
3606
|
const { drag: i } = this.getProps();
|
|
3571
|
-
if (!s || !
|
|
3607
|
+
if (!s || !Gt(e, i, this.currentDirection))
|
|
3572
3608
|
return;
|
|
3573
3609
|
const o = this.getAxisMotionValue(e);
|
|
3574
3610
|
let r = this.originPoint[e] + s[e];
|
|
@@ -3600,7 +3636,7 @@ class Oc {
|
|
|
3600
3636
|
}
|
|
3601
3637
|
startAnimation(e) {
|
|
3602
3638
|
const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, u = U((c) => {
|
|
3603
|
-
if (!
|
|
3639
|
+
if (!Gt(c, n, this.currentDirection))
|
|
3604
3640
|
return;
|
|
3605
3641
|
let h = l && l[c] || {};
|
|
3606
3642
|
r && (h = { min: 0, max: 0 });
|
|
@@ -3621,7 +3657,7 @@ class Oc {
|
|
|
3621
3657
|
}
|
|
3622
3658
|
startAxisValueAnimation(e, n) {
|
|
3623
3659
|
const s = this.getAxisMotionValue(e);
|
|
3624
|
-
return _e(this.visualElement, e), s.start(
|
|
3660
|
+
return _e(this.visualElement, e), s.start(Bn(e, s, 0, n, this.visualElement, !1));
|
|
3625
3661
|
}
|
|
3626
3662
|
stopAnimation() {
|
|
3627
3663
|
U((e) => this.getAxisMotionValue(e).stop());
|
|
@@ -3649,7 +3685,7 @@ class Oc {
|
|
|
3649
3685
|
snapToCursor(e) {
|
|
3650
3686
|
U((n) => {
|
|
3651
3687
|
const { drag: s } = this.getProps();
|
|
3652
|
-
if (!
|
|
3688
|
+
if (!Gt(n, s, this.currentDirection))
|
|
3653
3689
|
return;
|
|
3654
3690
|
const { projection: i } = this.visualElement, o = this.getAxisMotionValue(n);
|
|
3655
3691
|
if (i && i.layout) {
|
|
@@ -3680,7 +3716,7 @@ class Oc {
|
|
|
3680
3716
|
});
|
|
3681
3717
|
const { transformTemplate: o } = this.visualElement.getProps();
|
|
3682
3718
|
this.visualElement.current.style.transform = o ? o({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(), U((r) => {
|
|
3683
|
-
if (!
|
|
3719
|
+
if (!Gt(r, e, null))
|
|
3684
3720
|
return;
|
|
3685
3721
|
const a = this.getAxisMotionValue(r), { min: l, max: u } = this.constraints[r];
|
|
3686
3722
|
a.set(M(l, u, i[r]));
|
|
@@ -3698,7 +3734,7 @@ class Oc {
|
|
|
3698
3734
|
gt(l) && l.current && (this.constraints = this.resolveRefConstraints());
|
|
3699
3735
|
}, { projection: i } = this.visualElement, o = i.addEventListener("measure", s);
|
|
3700
3736
|
i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), P.read(s);
|
|
3701
|
-
const r =
|
|
3737
|
+
const r = jt(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", (({ delta: l, hasLayoutChanged: u }) => {
|
|
3702
3738
|
this.isDragging && u && (U((c) => {
|
|
3703
3739
|
const h = this.getAxisMotionValue(c);
|
|
3704
3740
|
h && (this.originPoint[c] += l[c].translate, h.set(h.get() + l[c].translate));
|
|
@@ -3721,7 +3757,7 @@ class Oc {
|
|
|
3721
3757
|
};
|
|
3722
3758
|
}
|
|
3723
3759
|
}
|
|
3724
|
-
function
|
|
3760
|
+
function Gt(t, e, n) {
|
|
3725
3761
|
return (e === !0 || e === t) && (n === null || n === t);
|
|
3726
3762
|
}
|
|
3727
3763
|
function jc(t, e = 10) {
|
|
@@ -3774,7 +3810,7 @@ class Wc extends nt {
|
|
|
3774
3810
|
this.removePointerDownListener(), this.session && this.session.end();
|
|
3775
3811
|
}
|
|
3776
3812
|
}
|
|
3777
|
-
const
|
|
3813
|
+
const Qt = {
|
|
3778
3814
|
/**
|
|
3779
3815
|
* Global flag as to whether the tree has animated since the last time
|
|
3780
3816
|
* we resized the window
|
|
@@ -3786,34 +3822,8 @@ const te = {
|
|
|
3786
3822
|
*/
|
|
3787
3823
|
hasEverUpdated: !1
|
|
3788
3824
|
};
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
}
|
|
3792
|
-
const Dt = {
|
|
3793
|
-
correct: (t, e) => {
|
|
3794
|
-
if (!e.target)
|
|
3795
|
-
return t;
|
|
3796
|
-
if (typeof t == "string")
|
|
3797
|
-
if (x.test(t))
|
|
3798
|
-
t = parseFloat(t);
|
|
3799
|
-
else
|
|
3800
|
-
return t;
|
|
3801
|
-
const n = Ds(t, e.target.x), s = Ds(t, e.target.y);
|
|
3802
|
-
return `${n}% ${s}%`;
|
|
3803
|
-
}
|
|
3804
|
-
}, Uc = {
|
|
3805
|
-
correct: (t, { treeScale: e, projectionDelta: n }) => {
|
|
3806
|
-
const s = t, i = et.parse(t);
|
|
3807
|
-
if (i.length > 5)
|
|
3808
|
-
return s;
|
|
3809
|
-
const o = et.createTransformer(t), r = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
|
|
3810
|
-
i[0 + r] /= a, i[1 + r] /= l;
|
|
3811
|
-
const u = M(a, l, 0.5);
|
|
3812
|
-
return typeof i[2 + r] == "number" && (i[2 + r] /= u), typeof i[3 + r] == "number" && (i[3 + r] /= u), o(i);
|
|
3813
|
-
}
|
|
3814
|
-
};
|
|
3815
|
-
let Se = !1;
|
|
3816
|
-
class Kc extends Zr {
|
|
3825
|
+
let be = !1;
|
|
3826
|
+
class Uc extends Zr {
|
|
3817
3827
|
/**
|
|
3818
3828
|
* This only mounts projection nodes for components that
|
|
3819
3829
|
* need measuring, we might want to do it for all components
|
|
@@ -3821,29 +3831,29 @@ class Kc extends Zr {
|
|
|
3821
3831
|
*/
|
|
3822
3832
|
componentDidMount() {
|
|
3823
3833
|
const { visualElement: e, layoutGroup: n, switchLayoutGroup: s, layoutId: i } = this.props, { projection: o } = e;
|
|
3824
|
-
|
|
3834
|
+
o && (n.group && n.group.add(o), s && s.register && i && s.register(o), be && o.root.didUpdate(), o.addEventListener("animationComplete", () => {
|
|
3825
3835
|
this.safeToRemove();
|
|
3826
3836
|
}), o.setOptions({
|
|
3827
3837
|
...o.options,
|
|
3828
3838
|
onExitComplete: () => this.safeToRemove()
|
|
3829
|
-
})),
|
|
3839
|
+
})), Qt.hasEverUpdated = !0;
|
|
3830
3840
|
}
|
|
3831
3841
|
getSnapshotBeforeUpdate(e) {
|
|
3832
3842
|
const { layoutDependency: n, visualElement: s, drag: i, isPresent: o } = this.props, { projection: r } = s;
|
|
3833
|
-
return r && (r.isPresent = o,
|
|
3843
|
+
return r && (r.isPresent = o, be = !0, i || e.layoutDependency !== n || n === void 0 || e.isPresent !== o ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || P.postRender(() => {
|
|
3834
3844
|
const a = r.getStack();
|
|
3835
3845
|
(!a || !a.members.length) && this.safeToRemove();
|
|
3836
3846
|
}))), null;
|
|
3837
3847
|
}
|
|
3838
3848
|
componentDidUpdate() {
|
|
3839
3849
|
const { projection: e } = this.props.visualElement;
|
|
3840
|
-
e && (e.root.didUpdate(),
|
|
3850
|
+
e && (e.root.didUpdate(), bn.postRender(() => {
|
|
3841
3851
|
!e.currentAnimation && e.isLead() && this.safeToRemove();
|
|
3842
3852
|
}));
|
|
3843
3853
|
}
|
|
3844
3854
|
componentWillUnmount() {
|
|
3845
3855
|
const { visualElement: e, layoutGroup: n, switchLayoutGroup: s } = this.props, { projection: i } = e;
|
|
3846
|
-
|
|
3856
|
+
be = !0, i && (i.scheduleCheckAfterUnmount(), n && n.group && n.group.remove(i), s && s.deregister && s.deregister(i));
|
|
3847
3857
|
}
|
|
3848
3858
|
safeToRemove() {
|
|
3849
3859
|
const { safeToRemove: e } = this.props;
|
|
@@ -3854,31 +3864,15 @@ class Kc extends Zr {
|
|
|
3854
3864
|
}
|
|
3855
3865
|
}
|
|
3856
3866
|
function Lr(t) {
|
|
3857
|
-
const [e, n] = sl(), s = B(
|
|
3858
|
-
return tt(
|
|
3867
|
+
const [e, n] = sl(), s = B(oi);
|
|
3868
|
+
return tt(Uc, { ...t, layoutGroup: s, switchLayoutGroup: B(fr), isPresent: e, safeToRemove: n });
|
|
3859
3869
|
}
|
|
3860
|
-
|
|
3861
|
-
borderRadius: {
|
|
3862
|
-
...Dt,
|
|
3863
|
-
applyTo: [
|
|
3864
|
-
"borderTopLeftRadius",
|
|
3865
|
-
"borderTopRightRadius",
|
|
3866
|
-
"borderBottomLeftRadius",
|
|
3867
|
-
"borderBottomRightRadius"
|
|
3868
|
-
]
|
|
3869
|
-
},
|
|
3870
|
-
borderTopLeftRadius: Dt,
|
|
3871
|
-
borderTopRightRadius: Dt,
|
|
3872
|
-
borderBottomLeftRadius: Dt,
|
|
3873
|
-
borderBottomRightRadius: Dt,
|
|
3874
|
-
boxShadow: Uc
|
|
3875
|
-
};
|
|
3876
|
-
function zc(t, e, n) {
|
|
3870
|
+
function Kc(t, e, n) {
|
|
3877
3871
|
const s = k(t) ? t : H(t);
|
|
3878
|
-
return s.start(
|
|
3872
|
+
return s.start(Bn("", s, e, n)), s.animation;
|
|
3879
3873
|
}
|
|
3880
|
-
const
|
|
3881
|
-
class
|
|
3874
|
+
const $c = (t, e) => t.depth - e.depth;
|
|
3875
|
+
class zc {
|
|
3882
3876
|
constructor() {
|
|
3883
3877
|
this.children = [], this.isDirty = !1;
|
|
3884
3878
|
}
|
|
@@ -3889,85 +3883,85 @@ class Gc {
|
|
|
3889
3883
|
sn(this.children, e), this.isDirty = !0;
|
|
3890
3884
|
}
|
|
3891
3885
|
forEach(e) {
|
|
3892
|
-
this.isDirty && this.children.sort(
|
|
3886
|
+
this.isDirty && this.children.sort($c), this.isDirty = !1, this.children.forEach(e);
|
|
3893
3887
|
}
|
|
3894
3888
|
}
|
|
3895
|
-
function
|
|
3889
|
+
function Hc(t, e) {
|
|
3896
3890
|
const n = O.now(), s = ({ timestamp: i }) => {
|
|
3897
3891
|
const o = i - n;
|
|
3898
3892
|
o >= e && (Y(s), t(o - e));
|
|
3899
3893
|
};
|
|
3900
3894
|
return P.setup(s, !0), () => Y(s);
|
|
3901
3895
|
}
|
|
3902
|
-
const kr = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"],
|
|
3903
|
-
function
|
|
3904
|
-
i ? (t.opacity = M(0, n.opacity ?? 1,
|
|
3905
|
-
for (let r = 0; r <
|
|
3896
|
+
const kr = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Gc = kr.length, Ds = (t) => typeof t == "string" ? parseFloat(t) : t, Cs = (t) => typeof t == "number" || x.test(t);
|
|
3897
|
+
function _c(t, e, n, s, i, o) {
|
|
3898
|
+
i ? (t.opacity = M(0, n.opacity ?? 1, Yc(s)), t.opacityExit = M(e.opacity ?? 1, 0, Xc(s))) : o && (t.opacity = M(e.opacity ?? 1, n.opacity ?? 1, s));
|
|
3899
|
+
for (let r = 0; r < Gc; r++) {
|
|
3906
3900
|
const a = `border${kr[r]}Radius`;
|
|
3907
|
-
let l =
|
|
3901
|
+
let l = Es(e, a), u = Es(n, a);
|
|
3908
3902
|
if (l === void 0 && u === void 0)
|
|
3909
3903
|
continue;
|
|
3910
|
-
l || (l = 0), u || (u = 0), l === 0 || u === 0 ||
|
|
3904
|
+
l || (l = 0), u || (u = 0), l === 0 || u === 0 || Cs(l) === Cs(u) ? (t[a] = Math.max(M(Ds(l), Ds(u), s), 0), (X.test(u) || X.test(l)) && (t[a] += "%")) : t[a] = u;
|
|
3911
3905
|
}
|
|
3912
3906
|
(e.rotate || n.rotate) && (t.rotate = M(e.rotate || 0, n.rotate || 0, s));
|
|
3913
3907
|
}
|
|
3914
|
-
function
|
|
3908
|
+
function Es(t, e) {
|
|
3915
3909
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
3916
3910
|
}
|
|
3917
|
-
const
|
|
3911
|
+
const Yc = /* @__PURE__ */ Br(0, 0.5, gi), Xc = /* @__PURE__ */ Br(0.5, 0.95, j);
|
|
3918
3912
|
function Br(t, e, n) {
|
|
3919
3913
|
return (s) => s < t ? 0 : s > e ? 1 : n(/* @__PURE__ */ wt(t, e, s));
|
|
3920
3914
|
}
|
|
3921
|
-
function
|
|
3915
|
+
function Rs(t, e) {
|
|
3922
3916
|
t.min = e.min, t.max = e.max;
|
|
3923
3917
|
}
|
|
3924
3918
|
function $(t, e) {
|
|
3925
|
-
|
|
3919
|
+
Rs(t.x, e.x), Rs(t.y, e.y);
|
|
3926
3920
|
}
|
|
3927
|
-
function
|
|
3921
|
+
function Ls(t, e) {
|
|
3928
3922
|
t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
|
|
3929
3923
|
}
|
|
3930
|
-
function
|
|
3931
|
-
return t -= e, t =
|
|
3924
|
+
function ks(t, e, n, s, i) {
|
|
3925
|
+
return t -= e, t = ie(t, 1 / n, s), i !== void 0 && (t = ie(t, 1 / i, s)), t;
|
|
3932
3926
|
}
|
|
3933
|
-
function
|
|
3927
|
+
function qc(t, e = 0, n = 1, s = 0.5, i, o = t, r = t) {
|
|
3934
3928
|
if (X.test(e) && (e = parseFloat(e), e = M(r.min, r.max, e / 100) - r.min), typeof e != "number")
|
|
3935
3929
|
return;
|
|
3936
3930
|
let a = M(o.min, o.max, s);
|
|
3937
|
-
t === o && (a -= e), t.min =
|
|
3931
|
+
t === o && (a -= e), t.min = ks(t.min, e, n, a, i), t.max = ks(t.max, e, n, a, i);
|
|
3938
3932
|
}
|
|
3939
|
-
function
|
|
3940
|
-
|
|
3933
|
+
function Bs(t, e, [n, s, i], o, r) {
|
|
3934
|
+
qc(t, e[n], e[s], e[i], e.scale, o, r);
|
|
3941
3935
|
}
|
|
3942
|
-
const
|
|
3943
|
-
function
|
|
3944
|
-
|
|
3936
|
+
const Zc = ["x", "scaleX", "originX"], Jc = ["y", "scaleY", "originY"];
|
|
3937
|
+
function Fs(t, e, n, s) {
|
|
3938
|
+
Bs(t.x, e, Zc, n ? n.x : void 0, s ? s.x : void 0), Bs(t.y, e, Jc, n ? n.y : void 0, s ? s.y : void 0);
|
|
3945
3939
|
}
|
|
3946
|
-
function
|
|
3940
|
+
function Is(t) {
|
|
3947
3941
|
return t.translate === 0 && t.scale === 1;
|
|
3948
3942
|
}
|
|
3949
3943
|
function Fr(t) {
|
|
3950
|
-
return
|
|
3944
|
+
return Is(t.x) && Is(t.y);
|
|
3951
3945
|
}
|
|
3952
|
-
function
|
|
3946
|
+
function Os(t, e) {
|
|
3953
3947
|
return t.min === e.min && t.max === e.max;
|
|
3954
3948
|
}
|
|
3955
|
-
function
|
|
3956
|
-
return
|
|
3949
|
+
function Qc(t, e) {
|
|
3950
|
+
return Os(t.x, e.x) && Os(t.y, e.y);
|
|
3957
3951
|
}
|
|
3958
|
-
function
|
|
3952
|
+
function js(t, e) {
|
|
3959
3953
|
return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
|
|
3960
3954
|
}
|
|
3961
3955
|
function Ir(t, e) {
|
|
3962
|
-
return
|
|
3956
|
+
return js(t.x, e.x) && js(t.y, e.y);
|
|
3963
3957
|
}
|
|
3964
|
-
function
|
|
3958
|
+
function Ns(t) {
|
|
3965
3959
|
return F(t.x) / F(t.y);
|
|
3966
3960
|
}
|
|
3967
|
-
function
|
|
3961
|
+
function Ws(t, e) {
|
|
3968
3962
|
return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
|
|
3969
3963
|
}
|
|
3970
|
-
class
|
|
3964
|
+
class tu {
|
|
3971
3965
|
constructor() {
|
|
3972
3966
|
this.members = [];
|
|
3973
3967
|
}
|
|
@@ -4021,7 +4015,7 @@ class nu {
|
|
|
4021
4015
|
this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
|
|
4022
4016
|
}
|
|
4023
4017
|
}
|
|
4024
|
-
function
|
|
4018
|
+
function eu(t, e, n) {
|
|
4025
4019
|
let s = "";
|
|
4026
4020
|
const i = t.x.translate / e.x, o = t.y.translate / e.y, r = (n == null ? void 0 : n.z) || 0;
|
|
4027
4021
|
if ((i || o || r) && (s = `translate3d(${i}px, ${o}px, ${r}px) `), (e.x !== 1 || e.y !== 1) && (s += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
|
|
@@ -4031,9 +4025,9 @@ function su(t, e, n) {
|
|
|
4031
4025
|
const a = t.x.scale * e.x, l = t.y.scale * e.y;
|
|
4032
4026
|
return (a !== 1 || l !== 1) && (s += `scale(${a}, ${l})`), s || "none";
|
|
4033
4027
|
}
|
|
4034
|
-
const
|
|
4035
|
-
let
|
|
4036
|
-
function
|
|
4028
|
+
const Se = ["", "X", "Y", "Z"], nu = 1e3;
|
|
4029
|
+
let su = 0;
|
|
4030
|
+
function Pe(t, e, n, s) {
|
|
4037
4031
|
const { latestValues: i } = e;
|
|
4038
4032
|
i[t] && (n[t] = i[t], e.setStaticValue(t, 0), s && (s[t] = 0));
|
|
4039
4033
|
}
|
|
@@ -4054,14 +4048,14 @@ function Or(t) {
|
|
|
4054
4048
|
function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: s, resetTransform: i }) {
|
|
4055
4049
|
return class {
|
|
4056
4050
|
constructor(r = {}, a = e == null ? void 0 : e()) {
|
|
4057
|
-
this.id =
|
|
4051
|
+
this.id = su++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.layoutVersion = 0, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
4058
4052
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
4059
4053
|
}, this.updateProjection = () => {
|
|
4060
|
-
this.projectionUpdateScheduled = !1, this.nodes.forEach(
|
|
4054
|
+
this.projectionUpdateScheduled = !1, this.nodes.forEach(ou), this.nodes.forEach(uu), this.nodes.forEach(hu), this.nodes.forEach(au);
|
|
4061
4055
|
}, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
4062
4056
|
for (let l = 0; l < this.path.length; l++)
|
|
4063
4057
|
this.path[l].shouldResetTransform = !0;
|
|
4064
|
-
this.root === this && (this.nodes = new
|
|
4058
|
+
this.root === this && (this.nodes = new zc());
|
|
4065
4059
|
}
|
|
4066
4060
|
addEventListener(r, a) {
|
|
4067
4061
|
return this.eventHandlers.has(r) || this.eventHandlers.set(r, new on()), this.eventHandlers.get(r).add(a);
|
|
@@ -4079,7 +4073,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4079
4073
|
mount(r) {
|
|
4080
4074
|
if (this.instance)
|
|
4081
4075
|
return;
|
|
4082
|
-
this.isSVG =
|
|
4076
|
+
this.isSVG = Pn(r) && !Qa(r), this.instance = r;
|
|
4083
4077
|
const { layoutId: a, layout: l, visualElement: u } = this.options;
|
|
4084
4078
|
if (u && !u.current && u.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || a) && (this.isLayoutDirty = !0), t) {
|
|
4085
4079
|
let c, h = 0;
|
|
@@ -4088,7 +4082,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4088
4082
|
h = window.innerWidth;
|
|
4089
4083
|
}), t(r, () => {
|
|
4090
4084
|
const d = window.innerWidth;
|
|
4091
|
-
d !== h && (h = d, this.root.updateBlockedByResize = !0, c && c(), c =
|
|
4085
|
+
d !== h && (h = d, this.root.updateBlockedByResize = !0, c && c(), c = Hc(f, 250), Qt.hasAnimatedSinceResize && (Qt.hasAnimatedSinceResize = !1, this.nodes.forEach($s)));
|
|
4092
4086
|
});
|
|
4093
4087
|
}
|
|
4094
4088
|
a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && u && (a || l) && this.addEventListener("didUpdate", ({ delta: c, hasLayoutChanged: h, hasRelativeLayoutChanged: f, layout: d }) => {
|
|
@@ -4096,17 +4090,17 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4096
4090
|
this.target = void 0, this.relativeTarget = void 0;
|
|
4097
4091
|
return;
|
|
4098
4092
|
}
|
|
4099
|
-
const m = this.options.transition || u.getDefaultTransition() ||
|
|
4093
|
+
const m = this.options.transition || u.getDefaultTransition() || gu, { onLayoutAnimationStart: g, onLayoutAnimationComplete: v } = u.getProps(), p = !this.targetLayout || !Ir(this.targetLayout, d), T = !h && f;
|
|
4100
4094
|
if (this.options.layoutRoot || this.resumeFrom || T || h && (p || !this.currentAnimation)) {
|
|
4101
4095
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
4102
4096
|
const y = {
|
|
4103
|
-
...
|
|
4097
|
+
...xn(m, "layout"),
|
|
4104
4098
|
onPlay: g,
|
|
4105
4099
|
onComplete: v
|
|
4106
4100
|
};
|
|
4107
4101
|
(u.shouldReduceMotion || this.options.layoutRoot) && (y.delay = 0, y.type = !1), this.startAnimation(y), this.setAnimationOrigin(c, T);
|
|
4108
4102
|
} else
|
|
4109
|
-
h ||
|
|
4103
|
+
h || $s(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
4110
4104
|
this.targetLayout = d;
|
|
4111
4105
|
});
|
|
4112
4106
|
}
|
|
@@ -4130,7 +4124,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4130
4124
|
}
|
|
4131
4125
|
// Note: currently only running on root node
|
|
4132
4126
|
startUpdate() {
|
|
4133
|
-
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(
|
|
4127
|
+
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(fu), this.animationId++);
|
|
4134
4128
|
}
|
|
4135
4129
|
getTransformTemplate() {
|
|
4136
4130
|
const { visualElement: r } = this.options;
|
|
@@ -4156,22 +4150,22 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4156
4150
|
}
|
|
4157
4151
|
update() {
|
|
4158
4152
|
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
4159
|
-
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(
|
|
4153
|
+
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(Us);
|
|
4160
4154
|
return;
|
|
4161
4155
|
}
|
|
4162
4156
|
if (this.animationId <= this.animationCommitId) {
|
|
4163
|
-
this.nodes.forEach(
|
|
4157
|
+
this.nodes.forEach(Ks);
|
|
4164
4158
|
return;
|
|
4165
4159
|
}
|
|
4166
|
-
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(
|
|
4160
|
+
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(cu), this.nodes.forEach(iu), this.nodes.forEach(ru)) : this.nodes.forEach(Ks), this.clearAllSnapshots();
|
|
4167
4161
|
const a = O.now();
|
|
4168
|
-
R.delta = q(0, 1e3 / 60, a - R.timestamp), R.timestamp = a, R.isProcessing = !0,
|
|
4162
|
+
R.delta = q(0, 1e3 / 60, a - R.timestamp), R.timestamp = a, R.isProcessing = !0, fe.update.process(R), fe.preRender.process(R), fe.render.process(R), R.isProcessing = !1;
|
|
4169
4163
|
}
|
|
4170
4164
|
didUpdate() {
|
|
4171
|
-
this.updateScheduled || (this.updateScheduled = !0,
|
|
4165
|
+
this.updateScheduled || (this.updateScheduled = !0, bn.read(this.scheduleUpdate));
|
|
4172
4166
|
}
|
|
4173
4167
|
clearAllSnapshots() {
|
|
4174
|
-
this.nodes.forEach(
|
|
4168
|
+
this.nodes.forEach(lu), this.sharedNodes.forEach(du);
|
|
4175
4169
|
}
|
|
4176
4170
|
scheduleUpdateProjection() {
|
|
4177
4171
|
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, P.preRender(this.updateProjection, !1, !0));
|
|
@@ -4220,7 +4214,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4220
4214
|
measure(r = !0) {
|
|
4221
4215
|
const a = this.measurePageBox();
|
|
4222
4216
|
let l = this.removeElementScroll(a);
|
|
4223
|
-
return r && (l = this.removeTransform(l)),
|
|
4217
|
+
return r && (l = this.removeTransform(l)), yu(l), {
|
|
4224
4218
|
animationId: this.root.animationId,
|
|
4225
4219
|
measuredBox: a,
|
|
4226
4220
|
layoutBox: l,
|
|
@@ -4234,7 +4228,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4234
4228
|
if (!r)
|
|
4235
4229
|
return E();
|
|
4236
4230
|
const a = r.measureViewportBox();
|
|
4237
|
-
if (!(((u = this.scroll) == null ? void 0 : u.wasRoot) || this.path.some(
|
|
4231
|
+
if (!(((u = this.scroll) == null ? void 0 : u.wasRoot) || this.path.some(vu))) {
|
|
4238
4232
|
const { scroll: c } = this.root;
|
|
4239
4233
|
c && (yt(a.x, c.offset.x), yt(a.y, c.offset.y));
|
|
4240
4234
|
}
|
|
@@ -4272,9 +4266,9 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4272
4266
|
continue;
|
|
4273
4267
|
$e(u.latestValues) && u.updateSnapshot();
|
|
4274
4268
|
const c = E(), h = u.measurePageBox();
|
|
4275
|
-
$(c, h),
|
|
4269
|
+
$(c, h), Fs(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c);
|
|
4276
4270
|
}
|
|
4277
|
-
return rt(this.latestValues) &&
|
|
4271
|
+
return rt(this.latestValues) && Fs(a, this.latestValues), a;
|
|
4278
4272
|
}
|
|
4279
4273
|
setTargetDelta(r) {
|
|
4280
4274
|
this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
@@ -4314,7 +4308,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4314
4308
|
return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
|
|
4315
4309
|
}
|
|
4316
4310
|
createRelativeTarget(r, a, l) {
|
|
4317
|
-
this.relativeParent = r, this.linkedParentVersion = r.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = E(), this.relativeTargetOrigin = E(),
|
|
4311
|
+
this.relativeParent = r, this.linkedParentVersion = r.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = E(), this.relativeTargetOrigin = E(), re(this.relativeTargetOrigin, a, l), $(this.relativeTarget, this.relativeTargetOrigin);
|
|
4318
4312
|
}
|
|
4319
4313
|
removeRelativeTarget() {
|
|
4320
4314
|
this.relativeParent = this.relativeTarget = void 0;
|
|
@@ -4336,7 +4330,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4336
4330
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
4337
4331
|
return;
|
|
4338
4332
|
}
|
|
4339
|
-
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (
|
|
4333
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Ls(this.prevProjectionDelta.x, this.projectionDelta.x), Ls(this.prevProjectionDelta.y, this.projectionDelta.y)), Bt(this.projectionDelta, this.layoutCorrected, d, this.latestValues), (this.treeScale.x !== h || this.treeScale.y !== f || !Ws(this.projectionDelta.x, this.prevProjectionDelta.x) || !Ws(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", d));
|
|
4340
4334
|
}
|
|
4341
4335
|
hide() {
|
|
4342
4336
|
this.isVisible = !1;
|
|
@@ -4358,18 +4352,18 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4358
4352
|
setAnimationOrigin(r, a = !1) {
|
|
4359
4353
|
const l = this.snapshot, u = l ? l.latestValues : {}, c = { ...this.latestValues }, h = Tt();
|
|
4360
4354
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
4361
|
-
const f = E(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, g = d !== m, v = this.getStack(), p = !v || v.members.length <= 1, T = !!(g && !p && this.options.crossfade === !0 && !this.path.some(
|
|
4355
|
+
const f = E(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, g = d !== m, v = this.getStack(), p = !v || v.members.length <= 1, T = !!(g && !p && this.options.crossfade === !0 && !this.path.some(pu));
|
|
4362
4356
|
this.animationProgress = 0;
|
|
4363
4357
|
let y;
|
|
4364
4358
|
this.mixTargetDelta = (S) => {
|
|
4365
4359
|
const w = S / 1e3;
|
|
4366
|
-
|
|
4360
|
+
zs(h.x, r.x, w), zs(h.y, r.y, w), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (re(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), mu(this.relativeTarget, this.relativeTargetOrigin, f, w), y && Qc(this.relativeTarget, y) && (this.isProjectionDirty = !1), y || (y = E()), $(y, this.relativeTarget)), g && (this.animationValues = c, _c(c, u, this.latestValues, w, T, p)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = w;
|
|
4367
4361
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4368
4362
|
}
|
|
4369
4363
|
startAnimation(r) {
|
|
4370
4364
|
var a, l, u;
|
|
4371
4365
|
this.notifyListeners("animationStart"), (a = this.currentAnimation) == null || a.stop(), (u = (l = this.resumingFrom) == null ? void 0 : l.currentAnimation) == null || u.stop(), this.pendingAnimation && (Y(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = P.update(() => {
|
|
4372
|
-
|
|
4366
|
+
Qt.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = H(0)), this.currentAnimation = Kc(this.motionValue, [0, 1e3], {
|
|
4373
4367
|
...r,
|
|
4374
4368
|
velocity: 0,
|
|
4375
4369
|
isSync: !0,
|
|
@@ -4390,7 +4384,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4390
4384
|
r && r.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
|
|
4391
4385
|
}
|
|
4392
4386
|
finishAnimation() {
|
|
4393
|
-
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(
|
|
4387
|
+
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(nu), this.currentAnimation.stop()), this.completeAnimation();
|
|
4394
4388
|
}
|
|
4395
4389
|
applyTransformsToTarget() {
|
|
4396
4390
|
const r = this.getLead();
|
|
@@ -4407,7 +4401,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4407
4401
|
}
|
|
4408
4402
|
}
|
|
4409
4403
|
registerSharedNode(r, a) {
|
|
4410
|
-
this.sharedNodes.has(r) || this.sharedNodes.set(r, new
|
|
4404
|
+
this.sharedNodes.has(r) || this.sharedNodes.set(r, new tu()), this.sharedNodes.get(r).add(a);
|
|
4411
4405
|
const u = a.options.initialPromotionConfig;
|
|
4412
4406
|
a.promote({
|
|
4413
4407
|
transition: u ? u.transition : void 0,
|
|
@@ -4450,9 +4444,9 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4450
4444
|
if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a)
|
|
4451
4445
|
return;
|
|
4452
4446
|
const u = {};
|
|
4453
|
-
l.z &&
|
|
4454
|
-
for (let c = 0; c <
|
|
4455
|
-
|
|
4447
|
+
l.z && Pe("z", r, u, this.animationValues);
|
|
4448
|
+
for (let c = 0; c < Se.length; c++)
|
|
4449
|
+
Pe(`rotate${Se[c]}`, r, u, this.animationValues), Pe(`skew${Se[c]}`, r, u, this.animationValues);
|
|
4456
4450
|
r.render();
|
|
4457
4451
|
for (const c in u)
|
|
4458
4452
|
r.setStaticValue(c, u[c]), this.animationValues && (this.animationValues[c] = u[c]);
|
|
@@ -4467,25 +4461,25 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4467
4461
|
}
|
|
4468
4462
|
const l = this.getTransformTemplate();
|
|
4469
4463
|
if (this.needsReset) {
|
|
4470
|
-
this.needsReset = !1, r.visibility = "", r.opacity = "", r.pointerEvents =
|
|
4464
|
+
this.needsReset = !1, r.visibility = "", r.opacity = "", r.pointerEvents = Jt(a == null ? void 0 : a.pointerEvents) || "", r.transform = l ? l(this.latestValues, "") : "none";
|
|
4471
4465
|
return;
|
|
4472
4466
|
}
|
|
4473
4467
|
const u = this.getLead();
|
|
4474
4468
|
if (!this.projectionDelta || !this.layout || !u.target) {
|
|
4475
|
-
this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents =
|
|
4469
|
+
this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents = Jt(a == null ? void 0 : a.pointerEvents) || ""), this.hasProjected && !rt(this.latestValues) && (r.transform = l ? l({}, "") : "none", this.hasProjected = !1);
|
|
4476
4470
|
return;
|
|
4477
4471
|
}
|
|
4478
4472
|
r.visibility = "";
|
|
4479
4473
|
const c = u.animationValues || u.latestValues;
|
|
4480
4474
|
this.applyTransformsToTarget();
|
|
4481
|
-
let h =
|
|
4475
|
+
let h = eu(this.projectionDeltaWithTransform, this.treeScale, c);
|
|
4482
4476
|
l && (h = l(c, h)), r.transform = h;
|
|
4483
4477
|
const { x: f, y: d } = this.projectionDelta;
|
|
4484
4478
|
r.transformOrigin = `${f.origin * 100}% ${d.origin * 100}% 0`, u.animationValues ? r.opacity = u === this ? c.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : c.opacityExit : r.opacity = u === this ? c.opacity !== void 0 ? c.opacity : "" : c.opacityExit !== void 0 ? c.opacityExit : 0;
|
|
4485
|
-
for (const m in
|
|
4479
|
+
for (const m in Ke) {
|
|
4486
4480
|
if (c[m] === void 0)
|
|
4487
4481
|
continue;
|
|
4488
|
-
const { correct: g, applyTo: v, isCSSVariable: p } =
|
|
4482
|
+
const { correct: g, applyTo: v, isCSSVariable: p } = Ke[m], T = h === "none" ? c[m] : g(c[m], u);
|
|
4489
4483
|
if (v) {
|
|
4490
4484
|
const y = v.length;
|
|
4491
4485
|
for (let S = 0; S < y; S++)
|
|
@@ -4493,7 +4487,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4493
4487
|
} else
|
|
4494
4488
|
p ? this.options.visualElement.renderState.vars[m] = T : r[m] = T;
|
|
4495
4489
|
}
|
|
4496
|
-
this.options.layoutId && (r.pointerEvents = u === this ?
|
|
4490
|
+
this.options.layoutId && (r.pointerEvents = u === this ? Jt(a == null ? void 0 : a.pointerEvents) || "" : "none");
|
|
4497
4491
|
}
|
|
4498
4492
|
clearSnapshot() {
|
|
4499
4493
|
this.resumeFrom = this.snapshot = void 0;
|
|
@@ -4503,14 +4497,14 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4503
4497
|
this.root.nodes.forEach((r) => {
|
|
4504
4498
|
var a;
|
|
4505
4499
|
return (a = r.currentAnimation) == null ? void 0 : a.stop();
|
|
4506
|
-
}), this.root.nodes.forEach(
|
|
4500
|
+
}), this.root.nodes.forEach(Us), this.root.sharedNodes.clear();
|
|
4507
4501
|
}
|
|
4508
4502
|
};
|
|
4509
4503
|
}
|
|
4510
|
-
function
|
|
4504
|
+
function iu(t) {
|
|
4511
4505
|
t.updateLayout();
|
|
4512
4506
|
}
|
|
4513
|
-
function
|
|
4507
|
+
function ru(t) {
|
|
4514
4508
|
var n;
|
|
4515
4509
|
const e = ((n = t.resumeFrom) == null ? void 0 : n.snapshot) || t.snapshot;
|
|
4516
4510
|
if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
|
|
@@ -4534,9 +4528,9 @@ function au(t) {
|
|
|
4534
4528
|
const { snapshot: f, layout: d } = h;
|
|
4535
4529
|
if (f && d) {
|
|
4536
4530
|
const m = E();
|
|
4537
|
-
|
|
4531
|
+
re(m, e.layoutBox, f.layoutBox);
|
|
4538
4532
|
const g = E();
|
|
4539
|
-
|
|
4533
|
+
re(g, s, d.layoutBox), Ir(m, g) || (c = !0), h.options.layoutRoot && (t.relativeTarget = g, t.relativeTargetOrigin = m, t.relativeParent = h);
|
|
4540
4534
|
}
|
|
4541
4535
|
}
|
|
4542
4536
|
}
|
|
@@ -4554,77 +4548,77 @@ function au(t) {
|
|
|
4554
4548
|
}
|
|
4555
4549
|
t.options.transition = void 0;
|
|
4556
4550
|
}
|
|
4557
|
-
function
|
|
4551
|
+
function ou(t) {
|
|
4558
4552
|
t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
|
|
4559
4553
|
}
|
|
4560
|
-
function
|
|
4554
|
+
function au(t) {
|
|
4561
4555
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
4562
4556
|
}
|
|
4563
|
-
function
|
|
4557
|
+
function lu(t) {
|
|
4564
4558
|
t.clearSnapshot();
|
|
4565
4559
|
}
|
|
4566
|
-
function
|
|
4560
|
+
function Us(t) {
|
|
4567
4561
|
t.clearMeasurements();
|
|
4568
4562
|
}
|
|
4569
|
-
function
|
|
4563
|
+
function Ks(t) {
|
|
4570
4564
|
t.isLayoutDirty = !1;
|
|
4571
4565
|
}
|
|
4572
|
-
function
|
|
4566
|
+
function cu(t) {
|
|
4573
4567
|
const { visualElement: e } = t.options;
|
|
4574
4568
|
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
4575
4569
|
}
|
|
4576
|
-
function
|
|
4570
|
+
function $s(t) {
|
|
4577
4571
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
4578
4572
|
}
|
|
4579
|
-
function
|
|
4573
|
+
function uu(t) {
|
|
4580
4574
|
t.resolveTargetDelta();
|
|
4581
4575
|
}
|
|
4582
|
-
function
|
|
4576
|
+
function hu(t) {
|
|
4583
4577
|
t.calcProjection();
|
|
4584
4578
|
}
|
|
4585
|
-
function
|
|
4579
|
+
function fu(t) {
|
|
4586
4580
|
t.resetSkewAndRotation();
|
|
4587
4581
|
}
|
|
4588
|
-
function
|
|
4582
|
+
function du(t) {
|
|
4589
4583
|
t.removeLeadSnapshot();
|
|
4590
4584
|
}
|
|
4591
|
-
function
|
|
4585
|
+
function zs(t, e, n) {
|
|
4592
4586
|
t.translate = M(e.translate, 0, n), t.scale = M(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
|
|
4593
4587
|
}
|
|
4594
|
-
function
|
|
4588
|
+
function Hs(t, e, n, s) {
|
|
4595
4589
|
t.min = M(e.min, n.min, s), t.max = M(e.max, n.max, s);
|
|
4596
4590
|
}
|
|
4597
|
-
function
|
|
4598
|
-
|
|
4591
|
+
function mu(t, e, n, s) {
|
|
4592
|
+
Hs(t.x, e.x, n.x, s), Hs(t.y, e.y, n.y, s);
|
|
4599
4593
|
}
|
|
4600
|
-
function
|
|
4594
|
+
function pu(t) {
|
|
4601
4595
|
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
4602
4596
|
}
|
|
4603
|
-
const
|
|
4597
|
+
const gu = {
|
|
4604
4598
|
duration: 0.45,
|
|
4605
4599
|
ease: [0.4, 0, 0.1, 1]
|
|
4606
|
-
},
|
|
4607
|
-
function
|
|
4608
|
-
t.min =
|
|
4600
|
+
}, Gs = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), _s = Gs("applewebkit/") && !Gs("chrome/") ? Math.round : j;
|
|
4601
|
+
function Ys(t) {
|
|
4602
|
+
t.min = _s(t.min), t.max = _s(t.max);
|
|
4609
4603
|
}
|
|
4610
|
-
function
|
|
4611
|
-
|
|
4604
|
+
function yu(t) {
|
|
4605
|
+
Ys(t.x), Ys(t.y);
|
|
4612
4606
|
}
|
|
4613
4607
|
function Nr(t, e, n) {
|
|
4614
|
-
return t === "position" || t === "preserve-aspect" && !Ac(
|
|
4608
|
+
return t === "position" || t === "preserve-aspect" && !Ac(Ns(e), Ns(n), 0.2);
|
|
4615
4609
|
}
|
|
4616
|
-
function
|
|
4610
|
+
function vu(t) {
|
|
4617
4611
|
var e;
|
|
4618
4612
|
return t !== t.root && ((e = t.scroll) == null ? void 0 : e.wasRoot);
|
|
4619
4613
|
}
|
|
4620
|
-
const
|
|
4621
|
-
attachResizeListener: (t, e) =>
|
|
4614
|
+
const Tu = jr({
|
|
4615
|
+
attachResizeListener: (t, e) => jt(t, "resize", e),
|
|
4622
4616
|
measureScroll: () => ({
|
|
4623
4617
|
x: document.documentElement.scrollLeft || document.body.scrollLeft,
|
|
4624
4618
|
y: document.documentElement.scrollTop || document.body.scrollTop
|
|
4625
4619
|
}),
|
|
4626
4620
|
checkIsScrollRoot: () => !0
|
|
4627
|
-
}),
|
|
4621
|
+
}), Ae = {
|
|
4628
4622
|
current: void 0
|
|
4629
4623
|
}, Wr = jr({
|
|
4630
4624
|
measureScroll: (t) => ({
|
|
@@ -4632,17 +4626,17 @@ const wu = jr({
|
|
|
4632
4626
|
y: t.scrollTop
|
|
4633
4627
|
}),
|
|
4634
4628
|
defaultParent: () => {
|
|
4635
|
-
if (!
|
|
4636
|
-
const t = new
|
|
4637
|
-
t.mount(window), t.setOptions({ layoutScroll: !0 }),
|
|
4629
|
+
if (!Ae.current) {
|
|
4630
|
+
const t = new Tu({});
|
|
4631
|
+
t.mount(window), t.setOptions({ layoutScroll: !0 }), Ae.current = t;
|
|
4638
4632
|
}
|
|
4639
|
-
return
|
|
4633
|
+
return Ae.current;
|
|
4640
4634
|
},
|
|
4641
4635
|
resetTransform: (t, e) => {
|
|
4642
4636
|
t.style.transform = e !== void 0 ? e : "none";
|
|
4643
4637
|
},
|
|
4644
4638
|
checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
|
|
4645
|
-
}),
|
|
4639
|
+
}), xu = {
|
|
4646
4640
|
pan: {
|
|
4647
4641
|
Feature: Wc
|
|
4648
4642
|
},
|
|
@@ -4652,21 +4646,21 @@ const wu = jr({
|
|
|
4652
4646
|
MeasureLayout: Lr
|
|
4653
4647
|
}
|
|
4654
4648
|
};
|
|
4655
|
-
function
|
|
4649
|
+
function Xs(t, e, n) {
|
|
4656
4650
|
const { props: s } = t;
|
|
4657
4651
|
t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
|
|
4658
4652
|
const i = "onHover" + n, o = s[i];
|
|
4659
|
-
o && P.postRender(() => o(e,
|
|
4653
|
+
o && P.postRender(() => o(e, $t(e)));
|
|
4660
4654
|
}
|
|
4661
|
-
class
|
|
4655
|
+
class wu extends nt {
|
|
4662
4656
|
mount() {
|
|
4663
4657
|
const { current: e } = this.node;
|
|
4664
|
-
e && (this.unmount = Na(e, (n, s) => (
|
|
4658
|
+
e && (this.unmount = Na(e, (n, s) => (Xs(this.node, s, "Start"), (i) => Xs(this.node, i, "End"))));
|
|
4665
4659
|
}
|
|
4666
4660
|
unmount() {
|
|
4667
4661
|
}
|
|
4668
4662
|
}
|
|
4669
|
-
class
|
|
4663
|
+
class bu extends nt {
|
|
4670
4664
|
constructor() {
|
|
4671
4665
|
super(...arguments), this.isActive = !1;
|
|
4672
4666
|
}
|
|
@@ -4683,50 +4677,50 @@ class Pu extends nt {
|
|
|
4683
4677
|
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
4684
4678
|
}
|
|
4685
4679
|
mount() {
|
|
4686
|
-
this.unmount =
|
|
4680
|
+
this.unmount = Wt(jt(this.node.current, "focus", () => this.onFocus()), jt(this.node.current, "blur", () => this.onBlur()));
|
|
4687
4681
|
}
|
|
4688
4682
|
unmount() {
|
|
4689
4683
|
}
|
|
4690
4684
|
}
|
|
4691
|
-
function
|
|
4685
|
+
function qs(t, e, n) {
|
|
4692
4686
|
const { props: s } = t;
|
|
4693
4687
|
if (t.current instanceof HTMLButtonElement && t.current.disabled)
|
|
4694
4688
|
return;
|
|
4695
4689
|
t.animationState && s.whileTap && t.animationState.setActive("whileTap", n === "Start");
|
|
4696
4690
|
const i = "onTap" + (n === "End" ? "" : n), o = s[i];
|
|
4697
|
-
o && P.postRender(() => o(e,
|
|
4691
|
+
o && P.postRender(() => o(e, $t(e)));
|
|
4698
4692
|
}
|
|
4699
|
-
class
|
|
4693
|
+
class Su extends nt {
|
|
4700
4694
|
mount() {
|
|
4701
4695
|
const { current: e } = this.node;
|
|
4702
|
-
e && (this.unmount = $a(e, (n, s) => (
|
|
4696
|
+
e && (this.unmount = $a(e, (n, s) => (qs(this.node, s, "Start"), (i, { success: o }) => qs(this.node, i, o ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
|
|
4703
4697
|
}
|
|
4704
4698
|
unmount() {
|
|
4705
4699
|
}
|
|
4706
4700
|
}
|
|
4707
|
-
const qe = /* @__PURE__ */ new WeakMap(),
|
|
4701
|
+
const qe = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), Pu = (t) => {
|
|
4708
4702
|
const e = qe.get(t.target);
|
|
4709
4703
|
e && e(t);
|
|
4710
|
-
},
|
|
4711
|
-
t.forEach(
|
|
4704
|
+
}, Au = (t) => {
|
|
4705
|
+
t.forEach(Pu);
|
|
4712
4706
|
};
|
|
4713
|
-
function
|
|
4707
|
+
function Vu({ root: t, ...e }) {
|
|
4714
4708
|
const n = t || document;
|
|
4715
|
-
|
|
4716
|
-
const s =
|
|
4717
|
-
return s[i] || (s[i] = new IntersectionObserver(
|
|
4709
|
+
Ve.has(n) || Ve.set(n, {});
|
|
4710
|
+
const s = Ve.get(n), i = JSON.stringify(e);
|
|
4711
|
+
return s[i] || (s[i] = new IntersectionObserver(Au, { root: t, ...e })), s[i];
|
|
4718
4712
|
}
|
|
4719
|
-
function
|
|
4720
|
-
const s =
|
|
4713
|
+
function Mu(t, e, n) {
|
|
4714
|
+
const s = Vu(e);
|
|
4721
4715
|
return qe.set(t, n), s.observe(t), () => {
|
|
4722
4716
|
qe.delete(t), s.unobserve(t);
|
|
4723
4717
|
};
|
|
4724
4718
|
}
|
|
4725
|
-
const
|
|
4719
|
+
const Du = {
|
|
4726
4720
|
some: 0,
|
|
4727
4721
|
all: 1
|
|
4728
4722
|
};
|
|
4729
|
-
class
|
|
4723
|
+
class Cu extends nt {
|
|
4730
4724
|
constructor() {
|
|
4731
4725
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
4732
4726
|
}
|
|
@@ -4735,7 +4729,7 @@ class Ru extends nt {
|
|
|
4735
4729
|
const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: o } = e, r = {
|
|
4736
4730
|
root: n ? n.current : void 0,
|
|
4737
4731
|
rootMargin: s,
|
|
4738
|
-
threshold: typeof i == "number" ? i :
|
|
4732
|
+
threshold: typeof i == "number" ? i : Du[i]
|
|
4739
4733
|
}, a = (l) => {
|
|
4740
4734
|
const { isIntersecting: u } = l;
|
|
4741
4735
|
if (this.isInView === u || (this.isInView = u, o && !u && this.hasEnteredView))
|
|
@@ -4744,7 +4738,7 @@ class Ru extends nt {
|
|
|
4744
4738
|
const { onViewportEnter: c, onViewportLeave: h } = this.node.getProps(), f = u ? c : h;
|
|
4745
4739
|
f && f(l);
|
|
4746
4740
|
};
|
|
4747
|
-
return
|
|
4741
|
+
return Mu(this.node.current, r, a);
|
|
4748
4742
|
}
|
|
4749
4743
|
mount() {
|
|
4750
4744
|
this.startObserver();
|
|
@@ -4753,38 +4747,38 @@ class Ru extends nt {
|
|
|
4753
4747
|
if (typeof IntersectionObserver > "u")
|
|
4754
4748
|
return;
|
|
4755
4749
|
const { props: e, prevProps: n } = this.node;
|
|
4756
|
-
["amount", "margin", "root"].some(
|
|
4750
|
+
["amount", "margin", "root"].some(Eu(e, n)) && this.startObserver();
|
|
4757
4751
|
}
|
|
4758
4752
|
unmount() {
|
|
4759
4753
|
}
|
|
4760
4754
|
}
|
|
4761
|
-
function
|
|
4755
|
+
function Eu({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
4762
4756
|
return (n) => t[n] !== e[n];
|
|
4763
4757
|
}
|
|
4764
|
-
const
|
|
4758
|
+
const Ru = {
|
|
4765
4759
|
inView: {
|
|
4766
|
-
Feature:
|
|
4760
|
+
Feature: Cu
|
|
4767
4761
|
},
|
|
4768
4762
|
tap: {
|
|
4769
|
-
Feature:
|
|
4763
|
+
Feature: Su
|
|
4770
4764
|
},
|
|
4771
4765
|
focus: {
|
|
4772
|
-
Feature:
|
|
4766
|
+
Feature: bu
|
|
4773
4767
|
},
|
|
4774
4768
|
hover: {
|
|
4775
|
-
Feature:
|
|
4769
|
+
Feature: wu
|
|
4776
4770
|
}
|
|
4777
|
-
},
|
|
4771
|
+
}, Lu = {
|
|
4778
4772
|
layout: {
|
|
4779
4773
|
ProjectionNode: Wr,
|
|
4780
4774
|
MeasureLayout: Lr
|
|
4781
4775
|
}
|
|
4782
|
-
},
|
|
4776
|
+
}, ku = {
|
|
4783
4777
|
...Tc,
|
|
4784
|
-
...
|
|
4785
|
-
...
|
|
4786
|
-
...
|
|
4787
|
-
},
|
|
4778
|
+
...Ru,
|
|
4779
|
+
...xu,
|
|
4780
|
+
...Lu
|
|
4781
|
+
}, Bu = /* @__PURE__ */ Fl(ku, Yl), Fu = 50, Zs = () => ({
|
|
4788
4782
|
current: 0,
|
|
4789
4783
|
offset: [],
|
|
4790
4784
|
progress: 0,
|
|
@@ -4793,11 +4787,11 @@ const ku = {
|
|
|
4793
4787
|
targetLength: 0,
|
|
4794
4788
|
containerLength: 0,
|
|
4795
4789
|
velocity: 0
|
|
4796
|
-
}),
|
|
4790
|
+
}), Iu = () => ({
|
|
4797
4791
|
time: 0,
|
|
4798
|
-
x:
|
|
4799
|
-
y:
|
|
4800
|
-
}),
|
|
4792
|
+
x: Zs(),
|
|
4793
|
+
y: Zs()
|
|
4794
|
+
}), Ou = {
|
|
4801
4795
|
x: {
|
|
4802
4796
|
length: "Width",
|
|
4803
4797
|
position: "Left"
|
|
@@ -4807,16 +4801,16 @@ const ku = {
|
|
|
4807
4801
|
position: "Top"
|
|
4808
4802
|
}
|
|
4809
4803
|
};
|
|
4810
|
-
function
|
|
4811
|
-
const i = n[e], { length: o, position: r } =
|
|
4804
|
+
function Js(t, e, n, s) {
|
|
4805
|
+
const i = n[e], { length: o, position: r } = Ou[e], a = i.current, l = n.time;
|
|
4812
4806
|
i.current = t[`scroll${r}`], i.scrollLength = t[`scroll${o}`] - t[`client${o}`], i.offset.length = 0, i.offset[0] = 0, i.offset[1] = i.scrollLength, i.progress = /* @__PURE__ */ wt(0, i.scrollLength, i.current);
|
|
4813
4807
|
const u = s - l;
|
|
4814
|
-
i.velocity = u >
|
|
4808
|
+
i.velocity = u > Fu ? 0 : an(i.current - a, u);
|
|
4815
4809
|
}
|
|
4816
|
-
function
|
|
4817
|
-
|
|
4810
|
+
function ju(t, e, n) {
|
|
4811
|
+
Js(t, "x", e, n), Js(t, "y", e, n), e.time = n;
|
|
4818
4812
|
}
|
|
4819
|
-
function
|
|
4813
|
+
function Nu(t, e) {
|
|
4820
4814
|
const n = { x: 0, y: 0 };
|
|
4821
4815
|
let s = t;
|
|
4822
4816
|
for (; s && s !== e; )
|
|
@@ -4843,7 +4837,7 @@ const Ze = {
|
|
|
4843
4837
|
center: 0.5,
|
|
4844
4838
|
end: 1
|
|
4845
4839
|
};
|
|
4846
|
-
function
|
|
4840
|
+
function Qs(t, e, n = 0) {
|
|
4847
4841
|
let s = 0;
|
|
4848
4842
|
if (t in Ze && (t = Ze[t]), typeof t == "string") {
|
|
4849
4843
|
const i = parseFloat(t);
|
|
@@ -4851,22 +4845,22 @@ function ti(t, e, n = 0) {
|
|
|
4851
4845
|
}
|
|
4852
4846
|
return typeof t == "number" && (s = e * t), n + s;
|
|
4853
4847
|
}
|
|
4854
|
-
const
|
|
4855
|
-
function
|
|
4856
|
-
let i = Array.isArray(t) ? t :
|
|
4857
|
-
return typeof t == "number" ? i = [t, t] : typeof t == "string" && (t = t.trim(), t.includes(" ") ? i = t.split(" ") : i = [t, Ze[t] ? t : "0"]), o =
|
|
4848
|
+
const Wu = [0, 0];
|
|
4849
|
+
function Uu(t, e, n, s) {
|
|
4850
|
+
let i = Array.isArray(t) ? t : Wu, o = 0, r = 0;
|
|
4851
|
+
return typeof t == "number" ? i = [t, t] : typeof t == "string" && (t = t.trim(), t.includes(" ") ? i = t.split(" ") : i = [t, Ze[t] ? t : "0"]), o = Qs(i[0], n, s), r = Qs(i[1], e), o - r;
|
|
4858
4852
|
}
|
|
4859
|
-
const
|
|
4853
|
+
const Ku = {
|
|
4860
4854
|
All: [
|
|
4861
4855
|
[0, 0],
|
|
4862
4856
|
[1, 1]
|
|
4863
4857
|
]
|
|
4864
|
-
},
|
|
4865
|
-
function
|
|
4858
|
+
}, $u = { x: 0, y: 0 };
|
|
4859
|
+
function zu(t) {
|
|
4866
4860
|
return "getBBox" in t && t.tagName !== "svg" ? t.getBBox() : { width: t.clientWidth, height: t.clientHeight };
|
|
4867
4861
|
}
|
|
4868
|
-
function
|
|
4869
|
-
const { offset: s =
|
|
4862
|
+
function Hu(t, e, n) {
|
|
4863
|
+
const { offset: s = Ku.All } = n, { target: i = t, axis: o = "y" } = n, r = o === "y" ? "height" : "width", a = i !== t ? Nu(i, t) : $u, l = i === t ? { width: t.scrollWidth, height: t.scrollHeight } : zu(i), u = {
|
|
4870
4864
|
width: t.clientWidth,
|
|
4871
4865
|
height: t.clientHeight
|
|
4872
4866
|
};
|
|
@@ -4874,34 +4868,34 @@ function _u(t, e, n) {
|
|
|
4874
4868
|
let c = !e[o].interpolate;
|
|
4875
4869
|
const h = s.length;
|
|
4876
4870
|
for (let f = 0; f < h; f++) {
|
|
4877
|
-
const d =
|
|
4871
|
+
const d = Uu(s[f], u[r], l[r], a[o]);
|
|
4878
4872
|
!c && d !== e[o].interpolatorOffsets[f] && (c = !0), e[o].offset[f] = d;
|
|
4879
4873
|
}
|
|
4880
|
-
c && (e[o].interpolate =
|
|
4874
|
+
c && (e[o].interpolate = pn(e[o].offset, Li(s), { clamp: !1 }), e[o].interpolatorOffsets = [...e[o].offset]), e[o].progress = q(0, 1, e[o].interpolate(e[o].current));
|
|
4881
4875
|
}
|
|
4882
|
-
function
|
|
4876
|
+
function Gu(t, e = t, n) {
|
|
4883
4877
|
if (n.x.targetOffset = 0, n.y.targetOffset = 0, e !== t) {
|
|
4884
4878
|
let s = e;
|
|
4885
4879
|
for (; s && s !== t; )
|
|
4886
4880
|
n.x.targetOffset += s.offsetLeft, n.y.targetOffset += s.offsetTop, s = s.offsetParent;
|
|
4887
4881
|
}
|
|
4888
|
-
n.x.targetLength = e === t ? e.scrollWidth : e.clientWidth, n.y.targetLength = e === t ? e.scrollHeight : e.clientHeight, n.x.containerLength = t.clientWidth, n.y.containerLength = t.clientHeight, process.env.NODE_ENV !== "production" && t && e && e !== t &&
|
|
4882
|
+
n.x.targetLength = e === t ? e.scrollWidth : e.clientWidth, n.y.targetLength = e === t ? e.scrollHeight : e.clientHeight, n.x.containerLength = t.clientWidth, n.y.containerLength = t.clientHeight, process.env.NODE_ENV !== "production" && t && e && e !== t && le(getComputedStyle(t).position !== "static", "Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.");
|
|
4889
4883
|
}
|
|
4890
|
-
function
|
|
4884
|
+
function _u(t, e, n, s = {}) {
|
|
4891
4885
|
return {
|
|
4892
4886
|
measure: (i) => {
|
|
4893
|
-
|
|
4887
|
+
Gu(t, s.target, n), ju(t, n, i), (s.offset || s.target) && Hu(t, n, s);
|
|
4894
4888
|
},
|
|
4895
4889
|
notify: () => e(n)
|
|
4896
4890
|
};
|
|
4897
4891
|
}
|
|
4898
|
-
const Ct = /* @__PURE__ */ new WeakMap(),
|
|
4892
|
+
const Ct = /* @__PURE__ */ new WeakMap(), ti = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), ei = (t) => t === document.scrollingElement ? window : t;
|
|
4899
4893
|
function Ur(t, { container: e = document.scrollingElement, ...n } = {}) {
|
|
4900
4894
|
if (!e)
|
|
4901
4895
|
return j;
|
|
4902
|
-
let s =
|
|
4903
|
-
s || (s = /* @__PURE__ */ new Set(),
|
|
4904
|
-
const i =
|
|
4896
|
+
let s = Me.get(e);
|
|
4897
|
+
s || (s = /* @__PURE__ */ new Set(), Me.set(e, s));
|
|
4898
|
+
const i = Iu(), o = _u(e, t, i, n);
|
|
4905
4899
|
if (s.add(o), !Ct.has(e)) {
|
|
4906
4900
|
const a = () => {
|
|
4907
4901
|
for (const h of s)
|
|
@@ -4912,22 +4906,22 @@ function Ur(t, { container: e = document.scrollingElement, ...n } = {}) {
|
|
|
4912
4906
|
h.notify();
|
|
4913
4907
|
}, u = () => P.read(a);
|
|
4914
4908
|
Ct.set(e, u);
|
|
4915
|
-
const c =
|
|
4916
|
-
window.addEventListener("resize", u, { passive: !0 }), e !== document.documentElement &&
|
|
4909
|
+
const c = ei(e);
|
|
4910
|
+
window.addEventListener("resize", u, { passive: !0 }), e !== document.documentElement && ti.set(e, Ja(e, u)), c.addEventListener("scroll", u, { passive: !0 }), u();
|
|
4917
4911
|
}
|
|
4918
4912
|
const r = Ct.get(e);
|
|
4919
4913
|
return P.read(r, !1, !0), () => {
|
|
4920
4914
|
var u;
|
|
4921
4915
|
Y(r);
|
|
4922
|
-
const a =
|
|
4916
|
+
const a = Me.get(e);
|
|
4923
4917
|
if (!a || (a.delete(o), a.size))
|
|
4924
4918
|
return;
|
|
4925
4919
|
const l = Ct.get(e);
|
|
4926
|
-
Ct.delete(e), l && (
|
|
4920
|
+
Ct.delete(e), l && (ei(e).removeEventListener("scroll", l), (u = ti.get(e)) == null || u(), window.removeEventListener("resize", l));
|
|
4927
4921
|
};
|
|
4928
4922
|
}
|
|
4929
|
-
const
|
|
4930
|
-
function
|
|
4923
|
+
const ni = /* @__PURE__ */ new Map();
|
|
4924
|
+
function Yu(t) {
|
|
4931
4925
|
const e = { value: 0 }, n = Ur((s) => {
|
|
4932
4926
|
e.value = s[t.axis].progress * 100;
|
|
4933
4927
|
}, t);
|
|
@@ -4936,12 +4930,12 @@ function qu(t) {
|
|
|
4936
4930
|
function Kr({ source: t, container: e, ...n }) {
|
|
4937
4931
|
const { axis: s } = n;
|
|
4938
4932
|
t && (e = t);
|
|
4939
|
-
const i =
|
|
4940
|
-
|
|
4933
|
+
const i = ni.get(e) ?? /* @__PURE__ */ new Map();
|
|
4934
|
+
ni.set(e, i);
|
|
4941
4935
|
const o = n.target ?? "self", r = i.get(o) ?? {}, a = s + (n.offset ?? []).join(",");
|
|
4942
|
-
return r[a] || (r[a] = !n.target && Ii() ? new ScrollTimeline({ source: e, axis: s }) :
|
|
4936
|
+
return r[a] || (r[a] = !n.target && Ii() ? new ScrollTimeline({ source: e, axis: s }) : Yu({ container: e, ...n })), r[a];
|
|
4943
4937
|
}
|
|
4944
|
-
function
|
|
4938
|
+
function Xu(t, e) {
|
|
4945
4939
|
const n = Kr(e);
|
|
4946
4940
|
return t.attachTimeline({
|
|
4947
4941
|
timeline: e.target ? void 0 : n,
|
|
@@ -4950,28 +4944,28 @@ function Zu(t, e) {
|
|
|
4950
4944
|
}, n))
|
|
4951
4945
|
});
|
|
4952
4946
|
}
|
|
4953
|
-
function
|
|
4947
|
+
function qu(t) {
|
|
4954
4948
|
return t.length === 2;
|
|
4955
4949
|
}
|
|
4956
|
-
function
|
|
4957
|
-
return
|
|
4950
|
+
function Zu(t, e) {
|
|
4951
|
+
return qu(t) ? Ur((n) => {
|
|
4958
4952
|
t(n[e.axis].progress, n);
|
|
4959
4953
|
}, e) : tr(t, Kr(e));
|
|
4960
4954
|
}
|
|
4961
|
-
function
|
|
4955
|
+
function Ju(t, { axis: e = "y", container: n = document.scrollingElement, ...s } = {}) {
|
|
4962
4956
|
if (!n)
|
|
4963
4957
|
return j;
|
|
4964
4958
|
const i = { axis: e, container: n, ...s };
|
|
4965
|
-
return typeof t == "function" ?
|
|
4959
|
+
return typeof t == "function" ? Zu(t, i) : Xu(t, i);
|
|
4966
4960
|
}
|
|
4967
|
-
const
|
|
4961
|
+
const Qu = () => ({
|
|
4968
4962
|
scrollX: H(0),
|
|
4969
4963
|
scrollY: H(0),
|
|
4970
4964
|
scrollXProgress: H(0),
|
|
4971
4965
|
scrollYProgress: H(0)
|
|
4972
|
-
}),
|
|
4973
|
-
function
|
|
4974
|
-
const s =
|
|
4966
|
+
}), _t = (t) => t ? !t.current : !1;
|
|
4967
|
+
function th({ container: t, target: e, ...n } = {}) {
|
|
4968
|
+
const s = ae(Qu), i = lt(null), o = lt(!1), r = Je(() => (i.current = Ju((a, { x: l, y: u }) => {
|
|
4975
4969
|
s.scrollX.set(l.current), s.scrollXProgress.set(l.progress), s.scrollY.set(u.current), s.scrollYProgress.set(u.progress);
|
|
4976
4970
|
}, {
|
|
4977
4971
|
...n,
|
|
@@ -4982,26 +4976,26 @@ function nh({ container: t, target: e, ...n } = {}) {
|
|
|
4982
4976
|
(a = i.current) == null || a.call(i);
|
|
4983
4977
|
}), [t, e, JSON.stringify(n.offset)]);
|
|
4984
4978
|
return tn(() => {
|
|
4985
|
-
if (o.current = !1,
|
|
4979
|
+
if (o.current = !1, _t(t) || _t(e)) {
|
|
4986
4980
|
o.current = !0;
|
|
4987
4981
|
return;
|
|
4988
4982
|
} else
|
|
4989
4983
|
return r();
|
|
4990
|
-
}, [r]),
|
|
4984
|
+
}, [r]), Nt(() => {
|
|
4991
4985
|
if (o.current)
|
|
4992
|
-
return _(!
|
|
4986
|
+
return _(!_t(t), "Container ref is defined but not hydrated", "use-scroll-ref"), _(!_t(e), "Target ref is defined but not hydrated", "use-scroll-ref"), r();
|
|
4993
4987
|
}, [r]), s;
|
|
4994
4988
|
}
|
|
4995
|
-
function
|
|
4996
|
-
const e =
|
|
4989
|
+
function eh(t) {
|
|
4990
|
+
const e = ae(() => H(t)), { isStatic: n } = B(An);
|
|
4997
4991
|
if (n) {
|
|
4998
4992
|
const [, s] = Jr(t);
|
|
4999
|
-
|
|
4993
|
+
Nt(() => e.on("change", s), []);
|
|
5000
4994
|
}
|
|
5001
4995
|
return e;
|
|
5002
4996
|
}
|
|
5003
4997
|
function $r(t, e) {
|
|
5004
|
-
const n =
|
|
4998
|
+
const n = eh(e()), s = () => n.set(e());
|
|
5005
4999
|
return s(), tn(() => {
|
|
5006
5000
|
const i = () => P.preRender(s, !1, !0), o = t.map((r) => r.on("change", i));
|
|
5007
5001
|
return () => {
|
|
@@ -5009,19 +5003,19 @@ function $r(t, e) {
|
|
|
5009
5003
|
};
|
|
5010
5004
|
}), n;
|
|
5011
5005
|
}
|
|
5012
|
-
function
|
|
5006
|
+
function nh(t) {
|
|
5013
5007
|
Lt.current = [], t();
|
|
5014
5008
|
const e = $r(Lt.current, t);
|
|
5015
5009
|
return Lt.current = void 0, e;
|
|
5016
5010
|
}
|
|
5017
|
-
function
|
|
5011
|
+
function sh(t, e, n, s) {
|
|
5018
5012
|
if (typeof t == "function")
|
|
5019
|
-
return
|
|
5013
|
+
return nh(t);
|
|
5020
5014
|
const i = typeof e == "function" ? e : tl(e, n, s);
|
|
5021
|
-
return Array.isArray(t) ?
|
|
5015
|
+
return Array.isArray(t) ? si(t, i) : si([t], ([o]) => i(o));
|
|
5022
5016
|
}
|
|
5023
|
-
function
|
|
5024
|
-
const n =
|
|
5017
|
+
function si(t, e) {
|
|
5018
|
+
const n = ae(() => []);
|
|
5025
5019
|
return $r(t, () => {
|
|
5026
5020
|
n.length = 0;
|
|
5027
5021
|
const s = t.length;
|
|
@@ -5030,8 +5024,8 @@ function ii(t, e) {
|
|
|
5030
5024
|
return e(n);
|
|
5031
5025
|
});
|
|
5032
5026
|
}
|
|
5033
|
-
const
|
|
5034
|
-
const n = lt(null), { scrollYProgress: s } =
|
|
5027
|
+
const uh = ({ children: t, className: e }) => {
|
|
5028
|
+
const n = lt(null), { scrollYProgress: s } = th({
|
|
5035
5029
|
target: n
|
|
5036
5030
|
});
|
|
5037
5031
|
if (typeof t != "string")
|
|
@@ -5048,19 +5042,19 @@ const fh = ({ children: t, className: e }) => {
|
|
|
5048
5042
|
className: "flex flex-wrap p-5 text-2xl font-bold text-black/20 dark:text-white/20 md:p-8 md:text-3xl lg:p-10 lg:text-4xl xl:text-5xl",
|
|
5049
5043
|
children: i.map((o, r) => {
|
|
5050
5044
|
const a = r / i.length, l = a + 1 / i.length;
|
|
5051
|
-
return /* @__PURE__ */ tt(
|
|
5045
|
+
return /* @__PURE__ */ tt(ih, { progress: s, range: [a, l], children: o }, r);
|
|
5052
5046
|
})
|
|
5053
5047
|
}
|
|
5054
5048
|
)
|
|
5055
5049
|
}
|
|
5056
5050
|
) });
|
|
5057
|
-
},
|
|
5058
|
-
const s =
|
|
5059
|
-
return /* @__PURE__ */
|
|
5051
|
+
}, ih = ({ children: t, progress: e, range: n }) => {
|
|
5052
|
+
const s = sh(e, n, [0, 1]);
|
|
5053
|
+
return /* @__PURE__ */ ii("span", { className: "relative mx-1 lg:mx-1.5", children: [
|
|
5060
5054
|
/* @__PURE__ */ tt("span", { className: "absolute opacity-30", children: t }),
|
|
5061
|
-
/* @__PURE__ */ tt(
|
|
5055
|
+
/* @__PURE__ */ tt(Bu.span, { style: { opacity: s }, className: "text-black dark:text-white", children: t })
|
|
5062
5056
|
] });
|
|
5063
5057
|
};
|
|
5064
5058
|
export {
|
|
5065
|
-
|
|
5059
|
+
uh as TextReveal
|
|
5066
5060
|
};
|