@mkbabb/keyframes.js 6.2.1 → 6.3.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/README.md +2 -0
- package/dist/engine/index.d.ts +11 -2
- package/dist/engine/index.js +1004 -1004
- package/dist/keyframes.d.ts +15 -2
- package/dist/keyframes.js +114 -114
- package/dist/registry-8bG0FhGi.js +163 -0
- package/dist/{registry-Dd7GzvJm.js → registry-Bs7A0T_s.js} +1 -1
- package/dist/{sequence-BUgKKePR.js → sequence-CPGHHEVM.js} +72 -69
- package/package.json +1 -1
- package/dist/registry-CPtiwlwX.js +0 -162
package/dist/engine/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as v,
|
|
3
|
-
import { clamp as
|
|
4
|
-
import { easeInOutCubic as
|
|
5
|
-
import { convertColor as
|
|
6
|
-
import { coerceToSyntax as
|
|
7
|
-
import { isLayoutTrackingUnit as
|
|
8
|
-
import { PathGeometry as
|
|
1
|
+
import { C as e, E as t, O as n, S as r, _ as i, c as a, d as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as ee, v as g, y as _ } from "../sequence-CPGHHEVM.js";
|
|
2
|
+
import { C as v, E as y, S as b, T as x, _ as te, a as ne, b as re, c as ie, d as ae, f as oe, g as se, h as ce, i as le, l as ue, m as de, n as fe, o as pe, p as me, r as he, s as ge, t as _e, u as ve, v as ye, w as be, x as xe, y as S } from "../registry-8bG0FhGi.js";
|
|
3
|
+
import { clamp as Se, lerp as C, lerpArray as Ce, scale as we } from "@mkbabb/value.js/math";
|
|
4
|
+
import { easeInOutCubic as Te } from "@mkbabb/value.js/easing";
|
|
5
|
+
import { convertColor as Ee, mixColors as De, oklab as Oe } from "@mkbabb/value.js/color";
|
|
6
|
+
import { coerceToSyntax as ke, serializeCssColor as Ae } from "@mkbabb/value.js/css";
|
|
7
|
+
import { isLayoutTrackingUnit as w } from "@mkbabb/value.js/value";
|
|
8
|
+
import { PathGeometry as je } from "@mkbabb/value.js/transform";
|
|
9
9
|
//#region \0rolldown/runtime.js
|
|
10
|
-
var
|
|
10
|
+
var Me = Object.defineProperty, Ne = (e, t) => {
|
|
11
11
|
let n = {};
|
|
12
|
-
for (var r in e)
|
|
12
|
+
for (var r in e) Me(n, r, {
|
|
13
13
|
get: e[r],
|
|
14
14
|
enumerable: !0
|
|
15
15
|
});
|
|
16
|
-
return t ||
|
|
17
|
-
},
|
|
16
|
+
return t || Me(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
17
|
+
}, Pe = [
|
|
18
18
|
"normal",
|
|
19
19
|
"reverse",
|
|
20
20
|
"alternate",
|
|
21
21
|
"alternate-reverse"
|
|
22
|
-
],
|
|
22
|
+
], Fe = [
|
|
23
23
|
"none",
|
|
24
24
|
"forwards",
|
|
25
25
|
"backwards",
|
|
26
26
|
"both"
|
|
27
|
-
],
|
|
27
|
+
], Ie = [
|
|
28
28
|
"rgb",
|
|
29
29
|
"hsl",
|
|
30
30
|
"hsv",
|
|
@@ -42,29 +42,29 @@ var je = Object.defineProperty, Me = (e, t) => {
|
|
|
42
42
|
"rec2020",
|
|
43
43
|
"ictcp",
|
|
44
44
|
"jzazbz"
|
|
45
|
-
],
|
|
45
|
+
], Le = [
|
|
46
46
|
"shorter",
|
|
47
47
|
"longer",
|
|
48
48
|
"increasing",
|
|
49
49
|
"decreasing"
|
|
50
|
-
],
|
|
50
|
+
], T = () => {}, E = {
|
|
51
51
|
duration: 1e3,
|
|
52
52
|
delay: 0,
|
|
53
53
|
iterationCount: 1,
|
|
54
54
|
direction: "normal",
|
|
55
55
|
fillMode: "forwards",
|
|
56
|
-
timingFunction: { fn:
|
|
56
|
+
timingFunction: { fn: Te },
|
|
57
57
|
useWAAPI: !0,
|
|
58
58
|
respectReducedMotion: !1,
|
|
59
59
|
colorSpace: "oklab"
|
|
60
|
-
},
|
|
60
|
+
}, Re = {
|
|
61
61
|
zIndex: 0,
|
|
62
62
|
weight: 1,
|
|
63
63
|
op: "replace",
|
|
64
64
|
enabled: !0
|
|
65
|
-
},
|
|
66
|
-
typeof window < "u" && window.addEventListener("resize",
|
|
67
|
-
var
|
|
65
|
+
}, D = 0, ze = /* @__PURE__ */ new WeakMap(), Be = () => D, Ve = () => (ze = /* @__PURE__ */ new WeakMap(), ++D);
|
|
66
|
+
typeof window < "u" && window.addEventListener("resize", Ve, { passive: !0 });
|
|
67
|
+
var He = (e, t) => {
|
|
68
68
|
switch (t) {
|
|
69
69
|
case "cm": return 96 / 2.54 * e;
|
|
70
70
|
case "mm": return 96 / 25.4 * e;
|
|
@@ -74,7 +74,7 @@ var Ve = (e, t) => {
|
|
|
74
74
|
case "pc": return e * 16;
|
|
75
75
|
default: return e;
|
|
76
76
|
}
|
|
77
|
-
},
|
|
77
|
+
}, Ue = (e, t) => {
|
|
78
78
|
if (typeof window > "u") return;
|
|
79
79
|
let n = /^(sv|lv|dv|v)?(w|h|i|b|min|max)$/.exec(e);
|
|
80
80
|
if (!n) return;
|
|
@@ -87,7 +87,7 @@ var Ve = (e, t) => {
|
|
|
87
87
|
case "min": return Math.min(o, s);
|
|
88
88
|
case "max": return Math.max(o, s);
|
|
89
89
|
}
|
|
90
|
-
},
|
|
90
|
+
}, We = (e) => {
|
|
91
91
|
let t = e.parentElement;
|
|
92
92
|
for (; t;) {
|
|
93
93
|
let e = getComputedStyle(t).containerType;
|
|
@@ -95,17 +95,17 @@ var Ve = (e, t) => {
|
|
|
95
95
|
t = t.parentElement;
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
|
-
function
|
|
98
|
+
function Ge(e, t, n, r) {
|
|
99
99
|
let i = t === "em" || t === "rem" || t === "ex" || t === "ch" || t === "cap" || t === "ic" || t === "lh" || t === "rlh";
|
|
100
|
-
if (!
|
|
100
|
+
if (!w(t) && !i) return He(e, t);
|
|
101
101
|
if (t === "%" && n?.parentElement && r) {
|
|
102
102
|
let t = Number.parseFloat(getComputedStyle(n.parentElement).getPropertyValue(r));
|
|
103
103
|
return e / 100 * t;
|
|
104
104
|
}
|
|
105
|
-
let a =
|
|
105
|
+
let a = Ue(t, n);
|
|
106
106
|
if (a !== void 0) return e * a / 100;
|
|
107
107
|
if (t.startsWith("cq") && n) {
|
|
108
|
-
let r =
|
|
108
|
+
let r = We(n);
|
|
109
109
|
if (!r) return e;
|
|
110
110
|
let i = r.clientWidth, a = r.clientHeight, o = getComputedStyle(r).writingMode, s = o.startsWith("vertical") || o.startsWith("sideways");
|
|
111
111
|
return e * (t === "cqw" ? i : t === "cqh" ? a : t === "cqi" ? s ? a : i : t === "cqb" ? s ? i : a : t === "cqmin" ? Math.min(i, a) : Math.max(i, a)) / 100;
|
|
@@ -125,10 +125,10 @@ function We(e, t, n, r) {
|
|
|
125
125
|
let t = Number.parseFloat(s.lineHeight);
|
|
126
126
|
return e * (Number.isFinite(t) ? t : c * 1.2);
|
|
127
127
|
}
|
|
128
|
-
default: return
|
|
128
|
+
default: return He(e, t);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
var
|
|
131
|
+
var Ke = class extends TypeError {
|
|
132
132
|
property;
|
|
133
133
|
authoredValue;
|
|
134
134
|
actual;
|
|
@@ -136,14 +136,14 @@ var Ge = class extends TypeError {
|
|
|
136
136
|
constructor(e, t, n) {
|
|
137
137
|
super(`Could not resolve "${y(t)}" for "${e}" to a numeric CSS scalar${n === "" ? "" : ` (computed: "${n}")`}.`), this.property = e, this.authoredValue = t, this.actual = n, this.name = "BrowserScalarResolutionError";
|
|
138
138
|
}
|
|
139
|
-
},
|
|
140
|
-
let r = () => new
|
|
139
|
+
}, qe = (e, t, n) => {
|
|
140
|
+
let r = () => new Ke(n, t, e), i = S(de(e), r);
|
|
141
141
|
if (i.payload.type !== "number") throw r();
|
|
142
142
|
return Object.freeze({
|
|
143
143
|
value: i.payload.value,
|
|
144
144
|
unit: i.payload.unit
|
|
145
145
|
});
|
|
146
|
-
},
|
|
146
|
+
}, Je = (e) => {
|
|
147
147
|
if (e.kind !== "call" || e.name !== "var") return;
|
|
148
148
|
let t = e.args[0];
|
|
149
149
|
if (t?.kind === "scalar" && t.payload.type === "keyword") return t.payload.value;
|
|
@@ -151,10 +151,10 @@ var Ge = class extends TypeError {
|
|
|
151
151
|
let e = t.items[0];
|
|
152
152
|
if (e?.kind === "scalar" && e.payload.type === "keyword") return e.payload.value;
|
|
153
153
|
}
|
|
154
|
-
},
|
|
154
|
+
}, Ye = (e, t, n) => {
|
|
155
155
|
if (e.kind === "scalar" && e.payload.type === "number") {
|
|
156
156
|
let { value: r, unit: i } = e.payload;
|
|
157
|
-
return
|
|
157
|
+
return w(i) || [
|
|
158
158
|
"em",
|
|
159
159
|
"rem",
|
|
160
160
|
"ex",
|
|
@@ -164,17 +164,17 @@ var Ge = class extends TypeError {
|
|
|
164
164
|
"lh",
|
|
165
165
|
"rlh"
|
|
166
166
|
].includes(i) ? Object.freeze({
|
|
167
|
-
value:
|
|
167
|
+
value: Ge(r, i, t, n),
|
|
168
168
|
unit: "px"
|
|
169
169
|
}) : Object.freeze({
|
|
170
170
|
value: r,
|
|
171
171
|
unit: i
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
|
-
let r =
|
|
174
|
+
let r = Je(e);
|
|
175
175
|
if (r !== void 0) {
|
|
176
176
|
let i = getComputedStyle(t).getPropertyValue(r).trim(), a = t.style.getPropertyValue(r).trim();
|
|
177
|
-
return
|
|
177
|
+
return qe(i || a, e, n);
|
|
178
178
|
}
|
|
179
179
|
let i = n.split(".", 1)[0] ?? n, a = t.style.getPropertyValue(i), o = t.style.getPropertyPriority(i), s = y(e), c = "";
|
|
180
180
|
try {
|
|
@@ -182,37 +182,37 @@ var Ge = class extends TypeError {
|
|
|
182
182
|
} finally {
|
|
183
183
|
a === "" ? t.style.removeProperty(i) : t.style.setProperty(i, a, o);
|
|
184
184
|
}
|
|
185
|
-
return
|
|
185
|
+
return qe(c, e, n);
|
|
186
186
|
};
|
|
187
|
-
function
|
|
188
|
-
if (!t.isConnected) return
|
|
187
|
+
function Xe(e, t, n) {
|
|
188
|
+
if (!t.isConnected) return Ye(e, t, n);
|
|
189
189
|
let r = ze.get(e);
|
|
190
190
|
r === void 0 && (r = /* @__PURE__ */ new WeakMap(), ze.set(e, r));
|
|
191
191
|
let i = r.get(t);
|
|
192
192
|
i === void 0 && (i = /* @__PURE__ */ new Map(), r.set(t, i));
|
|
193
193
|
let a = i.get(n);
|
|
194
|
-
if (a?.epoch ===
|
|
195
|
-
let o =
|
|
194
|
+
if (a?.epoch === D) return a.result;
|
|
195
|
+
let o = Ye(e, t, n), s = Object.freeze({
|
|
196
196
|
result: o,
|
|
197
|
-
epoch:
|
|
197
|
+
epoch: D
|
|
198
198
|
});
|
|
199
199
|
return i.set(n, s), o;
|
|
200
200
|
}
|
|
201
201
|
//#endregion
|
|
202
202
|
//#region src/animation/compile/frame/interp-slot.ts
|
|
203
|
-
var
|
|
203
|
+
var Ze = {
|
|
204
204
|
deg: 1,
|
|
205
205
|
grad: .9,
|
|
206
206
|
rad: 180 / Math.PI,
|
|
207
207
|
turn: 360
|
|
208
|
-
},
|
|
208
|
+
}, Qe = {
|
|
209
209
|
ms: 1,
|
|
210
210
|
s: 1e3
|
|
211
|
-
},
|
|
211
|
+
}, $e = {
|
|
212
212
|
dpi: 1,
|
|
213
213
|
dpcm: 2.54,
|
|
214
214
|
dppx: 96
|
|
215
|
-
},
|
|
215
|
+
}, et = new Set(/* @__PURE__ */ "px.cm.mm.Q.in.pc.pt.em.ex.ch.cap.ic.rem.lh.rlh.vw.vh.vmin.vmax.vb.vi.svw.svh.svi.svb.svmin.svmax.lvw.lvh.lvi.lvb.lvmin.lvmax.dvw.dvh.dvi.dvb.dvmin.dvmax.cqw.cqh.cqi.cqb.cqmin.cqmax.%".split(".")), tt = new Set([
|
|
216
216
|
"em",
|
|
217
217
|
"rem",
|
|
218
218
|
"ex",
|
|
@@ -221,16 +221,16 @@ var Xe = {
|
|
|
221
221
|
"ic",
|
|
222
222
|
"lh",
|
|
223
223
|
"rlh"
|
|
224
|
-
]),
|
|
225
|
-
let t =
|
|
224
|
+
]), nt = (e) => e.kind === "scalar" ? e.payload : void 0, rt = (e) => {
|
|
225
|
+
let t = nt(e);
|
|
226
226
|
return t?.type === "number" ? t : void 0;
|
|
227
|
-
},
|
|
228
|
-
let t =
|
|
227
|
+
}, it = (e) => {
|
|
228
|
+
let t = nt(e);
|
|
229
229
|
return t?.type === "color" ? t.value : void 0;
|
|
230
|
-
},
|
|
230
|
+
}, at = (e) => e.kind === "call" && (e.name === "var" || e.name === "calc"), ot = (e, t) => at(e) || at(t) || e.kind === "call" && t.kind === "call" && e.name !== t.name || e.kind !== t.kind && (e.kind === "call" || t.kind === "call"), st = (e, t) => {
|
|
231
231
|
let n = e.unit, r = t.unit;
|
|
232
|
-
return e.value === 0 && n === "" && r !== "" && (n = r), t.value === 0 && r === "" && n !== "" && (r = n), n === r ||
|
|
233
|
-
},
|
|
232
|
+
return e.value === 0 && n === "" && r !== "" && (n = r), t.value === 0 && r === "" && n !== "" && (r = n), n === r || !et.has(n) || !et.has(r) ? !1 : w(n) || w(r) || tt.has(n) || tt.has(r);
|
|
233
|
+
}, ct = (e, t, n) => ({
|
|
234
234
|
kind: "computed",
|
|
235
235
|
from: e,
|
|
236
236
|
to: t,
|
|
@@ -239,38 +239,38 @@ var Xe = {
|
|
|
239
239
|
property: n.property,
|
|
240
240
|
cache: void 0,
|
|
241
241
|
...n.target === void 0 ? {} : { target: n.target }
|
|
242
|
-
}),
|
|
242
|
+
}), lt = (e, t, n) => {
|
|
243
243
|
let r = e.unit, i = t.unit;
|
|
244
244
|
if (e.value === 0 && r === "" && i !== "" && (r = i), t.value === 0 && i === "" && r !== "" && (i = r), r === i) return [
|
|
245
245
|
e.value,
|
|
246
246
|
t.value,
|
|
247
247
|
r
|
|
248
248
|
];
|
|
249
|
-
let a =
|
|
249
|
+
let a = Ze[r], o = Ze[i];
|
|
250
250
|
if (a !== void 0 && o !== void 0) return [
|
|
251
251
|
e.value * a,
|
|
252
252
|
t.value * o,
|
|
253
253
|
"deg"
|
|
254
254
|
];
|
|
255
|
-
let s =
|
|
255
|
+
let s = Qe[r], c = Qe[i];
|
|
256
256
|
if (s !== void 0 && c !== void 0) return [
|
|
257
257
|
e.value * s,
|
|
258
258
|
t.value * c,
|
|
259
259
|
"ms"
|
|
260
260
|
];
|
|
261
|
-
let l =
|
|
261
|
+
let l = $e[r], u = $e[i];
|
|
262
262
|
if (l !== void 0 && u !== void 0) return [
|
|
263
263
|
e.value * l,
|
|
264
264
|
t.value * u,
|
|
265
265
|
"dpi"
|
|
266
266
|
];
|
|
267
|
-
if (
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
if (et.has(r) && et.has(i)) return [
|
|
268
|
+
Ge(e.value, r, n.target, n.property),
|
|
269
|
+
Ge(t.value, i, n.target, n.property),
|
|
270
270
|
"px"
|
|
271
271
|
];
|
|
272
272
|
throw TypeError(`Cannot interpolate incompatible CSS units "${r}" and "${i}" for "${n.property}".`);
|
|
273
|
-
},
|
|
273
|
+
}, ut = (e, t, n, r) => lt({
|
|
274
274
|
type: "number",
|
|
275
275
|
value: e.value,
|
|
276
276
|
unit: e.unit
|
|
@@ -283,14 +283,14 @@ var Xe = {
|
|
|
283
283
|
target: n,
|
|
284
284
|
property: r
|
|
285
285
|
});
|
|
286
|
-
function
|
|
287
|
-
let r =
|
|
286
|
+
function dt(e, t, n) {
|
|
287
|
+
let r = rt(e), i = rt(t);
|
|
288
288
|
if (r !== void 0 && i !== void 0) {
|
|
289
|
-
if (
|
|
289
|
+
if (st(r, i)) {
|
|
290
290
|
if (r.unit === "%" || i.unit === "%") throw TypeError(`Cannot interpolate mixed percentage lengths for "${n.property}" without a property-specific percentage basis.`);
|
|
291
|
-
return
|
|
291
|
+
return ct(e, t, n);
|
|
292
292
|
}
|
|
293
|
-
let [a, o, s] =
|
|
293
|
+
let [a, o, s] = lt(r, i, n);
|
|
294
294
|
return {
|
|
295
295
|
kind: "number",
|
|
296
296
|
from: a,
|
|
@@ -299,7 +299,7 @@ function ut(e, t, n) {
|
|
|
299
299
|
unit: s
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
|
-
let a =
|
|
302
|
+
let a = it(e), o = it(t);
|
|
303
303
|
if (a !== void 0 && o !== void 0) {
|
|
304
304
|
let e = {
|
|
305
305
|
kind: "color",
|
|
@@ -310,7 +310,7 @@ function ut(e, t, n) {
|
|
|
310
310
|
};
|
|
311
311
|
return n.hueMethod !== void 0 && (e.hue = n.hueMethod), e;
|
|
312
312
|
}
|
|
313
|
-
if (
|
|
313
|
+
if (ot(e, t)) return ct(e, t, n);
|
|
314
314
|
if (e.kind !== t.kind) throw TypeError(`Cannot interpolate unlike CSS value kinds "${e.kind}" and "${t.kind}" for "${n.property}".`);
|
|
315
315
|
return {
|
|
316
316
|
kind: "discrete",
|
|
@@ -319,13 +319,13 @@ function ut(e, t, n) {
|
|
|
319
319
|
current: e
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function ft(e, t, n) {
|
|
323
323
|
switch (e.kind) {
|
|
324
324
|
case "number":
|
|
325
|
-
e.current =
|
|
325
|
+
e.current = C(e.from, e.to, t);
|
|
326
326
|
return;
|
|
327
327
|
case "color": {
|
|
328
|
-
let n =
|
|
328
|
+
let n = De(e.from, e.to, t, {
|
|
329
329
|
space: e.space,
|
|
330
330
|
...e.hue === void 0 ? {} : { hue: e.hue }
|
|
331
331
|
});
|
|
@@ -339,7 +339,7 @@ function dt(e, t, n) {
|
|
|
339
339
|
if (r === void 0) throw TypeError(`Computed CSS interpolation for "${e.property}" requires a browser target at sample time.`);
|
|
340
340
|
let i = Be(), a = e.cache;
|
|
341
341
|
if (a === void 0 || a.epoch !== i || a.target !== r) {
|
|
342
|
-
let [t, n, o] =
|
|
342
|
+
let [t, n, o] = ut(Xe(e.from, r, e.property), Xe(e.to, r, e.property), r, e.property);
|
|
343
343
|
a = Object.freeze({
|
|
344
344
|
epoch: i,
|
|
345
345
|
target: r,
|
|
@@ -348,7 +348,7 @@ function dt(e, t, n) {
|
|
|
348
348
|
unit: o
|
|
349
349
|
}), e.cache = a;
|
|
350
350
|
}
|
|
351
|
-
e.current =
|
|
351
|
+
e.current = C(a.from, a.to, t), e.unit = a.unit;
|
|
352
352
|
return;
|
|
353
353
|
}
|
|
354
354
|
case "discrete": e.current = t < .5 ? e.from : e.to;
|
|
@@ -357,11 +357,11 @@ function dt(e, t, n) {
|
|
|
357
357
|
function O(e, t) {
|
|
358
358
|
e.kind !== "computed" || e.target === t || (t === void 0 ? delete e.target : e.target = t, e.cache = void 0);
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function pt(e) {
|
|
361
361
|
switch (e.kind) {
|
|
362
362
|
case "number": return `${e.current}${e.unit}`;
|
|
363
363
|
case "color": {
|
|
364
|
-
let t =
|
|
364
|
+
let t = Ae(e.current);
|
|
365
365
|
if (!t.ok) throw TypeError(`Color serialization failed: ${t.error.code}.`);
|
|
366
366
|
return t.value;
|
|
367
367
|
}
|
|
@@ -372,45 +372,45 @@ function ft(e) {
|
|
|
372
372
|
//#endregion
|
|
373
373
|
//#region src/animation/internal/helpers.ts
|
|
374
374
|
var k = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
375
|
-
function
|
|
375
|
+
function mt(e, t, n) {
|
|
376
376
|
for (let r = e - 1; r >= 0; r--) if (n(t[r])) return r;
|
|
377
377
|
}
|
|
378
378
|
//#endregion
|
|
379
379
|
//#region src/animation/compile/value/compile.ts
|
|
380
|
-
var
|
|
380
|
+
var ht = (e) => {
|
|
381
381
|
if (typeof e != "object" || !e) return !1;
|
|
382
382
|
let t = e.kind;
|
|
383
383
|
return t === "scalar" || t === "call" || t === "list";
|
|
384
|
-
},
|
|
384
|
+
}, gt = (e) => ({
|
|
385
385
|
kind: "scalar",
|
|
386
386
|
payload: {
|
|
387
387
|
type: "number",
|
|
388
388
|
value: e,
|
|
389
389
|
unit: ""
|
|
390
390
|
}
|
|
391
|
-
}),
|
|
392
|
-
if (
|
|
393
|
-
if (typeof e == "number") return
|
|
394
|
-
if (typeof e == "string") return
|
|
391
|
+
}), _t = (e, t) => {
|
|
392
|
+
if (ht(e)) return e;
|
|
393
|
+
if (typeof e == "number") return gt(e);
|
|
394
|
+
if (typeof e == "string") return S(ce(e), ([e]) => /* @__PURE__ */ TypeError(`Invalid CSS value for "${t}" at ${e.start}-${e.end}: expected ${e.expected.join(" or ")}.`));
|
|
395
395
|
if (Array.isArray(e)) return {
|
|
396
396
|
kind: "list",
|
|
397
397
|
separator: "space",
|
|
398
|
-
items: e.map((e) =>
|
|
398
|
+
items: e.map((e) => _t(e, t))
|
|
399
399
|
};
|
|
400
400
|
throw TypeError(`Unsupported authored value for "${t}".`);
|
|
401
401
|
};
|
|
402
|
-
function
|
|
402
|
+
function vt(e) {
|
|
403
403
|
let t = {}, n = (e, r) => {
|
|
404
|
-
if (typeof e == "object" && e && !Array.isArray(e) && !
|
|
404
|
+
if (typeof e == "object" && e && !Array.isArray(e) && !ht(e)) {
|
|
405
405
|
for (let [t, i] of Object.entries(e)) n(i, r === "" ? t : `${r}.${t}`);
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
408
|
if (r === "") throw TypeError("An animation value requires a property name.");
|
|
409
|
-
t[r] =
|
|
409
|
+
t[r] = _t(e, r);
|
|
410
410
|
};
|
|
411
411
|
return n(e, ""), t;
|
|
412
412
|
}
|
|
413
|
-
var
|
|
413
|
+
var yt = {
|
|
414
414
|
brightness: {
|
|
415
415
|
value: 1,
|
|
416
416
|
unit: ""
|
|
@@ -515,8 +515,8 @@ var vt = {
|
|
|
515
515
|
value: 0,
|
|
516
516
|
unit: "deg"
|
|
517
517
|
}
|
|
518
|
-
},
|
|
519
|
-
let t =
|
|
518
|
+
}, bt = (e) => {
|
|
519
|
+
let t = yt[e.name];
|
|
520
520
|
if (t === void 0) throw TypeError(`No interpolation identity is defined for CSS function "${e.name}".`);
|
|
521
521
|
return {
|
|
522
522
|
kind: "call",
|
|
@@ -530,29 +530,29 @@ var vt = {
|
|
|
530
530
|
}
|
|
531
531
|
}))
|
|
532
532
|
};
|
|
533
|
-
},
|
|
533
|
+
}, xt = (e) => e.every((e) => e.kind === "call") ? new Set(e.map((e) => e.name)).size === e.length : !1, St = (e, t) => {
|
|
534
534
|
let n = [...e.map((e) => e.name)];
|
|
535
535
|
for (let e of t) n.includes(e.name) || n.push(e.name);
|
|
536
536
|
let r = new Map(e.map((e) => [e.name, e])), i = new Map(t.map((e) => [e.name, e]));
|
|
537
|
-
return [n.map((e) => r.get(e) ??
|
|
538
|
-
},
|
|
537
|
+
return [n.map((e) => r.get(e) ?? bt(i.get(e))), n.map((e) => i.get(e) ?? bt(r.get(e)))];
|
|
538
|
+
}, Ct = (e) => e.kind === "call" && (e.name === "var" || e.name === "calc"), wt = (e) => e.kind === "list" && e.items.length === 1 ? e.items[0] : void 0, A = (e, t) => t.kind === "list" ? {
|
|
539
539
|
kind: "list",
|
|
540
540
|
separator: t.separator,
|
|
541
541
|
items: t.items.map((t) => A(e, t))
|
|
542
542
|
} : e;
|
|
543
|
-
function
|
|
543
|
+
function Tt(e, t, n) {
|
|
544
544
|
let r = [], i = (e, t) => {
|
|
545
|
-
let a = e, o = t, s =
|
|
546
|
-
if (s !== void 0 && o.kind !== "list" ? a = s : c !== void 0 && a.kind !== "list" ? o = c : a.kind === "scalar" && o.kind === "list" ? a = A(a, o) : o.kind === "scalar" && a.kind === "list" ? o = A(o, a) : !l && a.kind === "list" && s !== void 0 && o.kind === "list" && (a.separator !== o.separator || a.items.length !== o.items.length) ? a = A(s, o) : !l && o.kind === "list" && c !== void 0 && a.kind === "list" && (o.separator !== a.separator || o.items.length !== a.items.length) && (o = A(c, a)),
|
|
545
|
+
let a = e, o = t, s = wt(a), c = wt(o), l = a.kind === "list" && o.kind === "list" && xt(a.items) && xt(o.items);
|
|
546
|
+
if (s !== void 0 && o.kind !== "list" ? a = s : c !== void 0 && a.kind !== "list" ? o = c : a.kind === "scalar" && o.kind === "list" ? a = A(a, o) : o.kind === "scalar" && a.kind === "list" ? o = A(o, a) : !l && a.kind === "list" && s !== void 0 && o.kind === "list" && (a.separator !== o.separator || a.items.length !== o.items.length) ? a = A(s, o) : !l && o.kind === "list" && c !== void 0 && a.kind === "list" && (o.separator !== a.separator || o.items.length !== a.items.length) && (o = A(c, a)), Ct(a) || Ct(o) || a.kind === "call" && o.kind === "call" && a.name !== o.name || a.kind !== o.kind && (a.kind === "call" || o.kind === "call")) {
|
|
547
547
|
let e = r.length;
|
|
548
|
-
return r.push(
|
|
548
|
+
return r.push(dt(a, o, n)), {
|
|
549
549
|
kind: "slot",
|
|
550
550
|
index: e
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
553
|
if (a.kind === "scalar" && o.kind === "scalar") {
|
|
554
554
|
let e = r.length;
|
|
555
|
-
return r.push(
|
|
555
|
+
return r.push(dt(a, o, n)), {
|
|
556
556
|
kind: "slot",
|
|
557
557
|
index: e
|
|
558
558
|
};
|
|
@@ -569,7 +569,7 @@ function wt(e, t, n) {
|
|
|
569
569
|
if (a.kind === "list" && o.kind === "list") {
|
|
570
570
|
if (a.separator !== o.separator) throw TypeError(`Cannot interpolate CSS lists with different separators for "${n.property}".`);
|
|
571
571
|
let e = a.items, t = o.items;
|
|
572
|
-
if (
|
|
572
|
+
if (xt(e) && xt(t)) [e, t] = St(e, t);
|
|
573
573
|
else if (e.length !== t.length) throw TypeError(`Cannot interpolate CSS lists with different lengths for "${n.property}".`);
|
|
574
574
|
return {
|
|
575
575
|
kind: "list",
|
|
@@ -584,17 +584,17 @@ function wt(e, t, n) {
|
|
|
584
584
|
slots: r
|
|
585
585
|
};
|
|
586
586
|
}
|
|
587
|
-
var
|
|
588
|
-
function
|
|
587
|
+
var Et = (e) => e === "comma" ? ", " : e === "slash" ? " / " : " ";
|
|
588
|
+
function Dt(e) {
|
|
589
589
|
let t = (n) => {
|
|
590
|
-
if (n.kind === "slot") return
|
|
591
|
-
if (n.kind === "list") return n.items.map(t).join(
|
|
590
|
+
if (n.kind === "slot") return pt(e.slots[n.index]);
|
|
591
|
+
if (n.kind === "list") return n.items.map(t).join(Et(n.separator));
|
|
592
592
|
let r = n.name === "calc" ? " " : ", ";
|
|
593
593
|
return `${n.name}(${n.args.map(t).join(r)})`;
|
|
594
594
|
};
|
|
595
595
|
return t(e.template);
|
|
596
596
|
}
|
|
597
|
-
function
|
|
597
|
+
function Ot(e, t) {
|
|
598
598
|
for (let n of t) for (let [t, r] of Object.entries(e)) {
|
|
599
599
|
if (r === void 0) {
|
|
600
600
|
n.style.removeProperty(t);
|
|
@@ -605,7 +605,7 @@ function Dt(e, t) {
|
|
|
605
605
|
}
|
|
606
606
|
//#endregion
|
|
607
607
|
//#region src/animation/compile/value/sink.ts
|
|
608
|
-
var
|
|
608
|
+
var kt = (e) => e.template.kind === "slot" && e.slots.length === 1 && e.slots[0]?.kind === "number" && e.slots[0].unit === "", At = (e, t) => {
|
|
609
609
|
let n = t.split("."), r = e;
|
|
610
610
|
for (let e = 0; e < n.length - 1; e++) {
|
|
611
611
|
let t = n[e], i = r[t];
|
|
@@ -616,10 +616,10 @@ var Ot = (e) => e.template.kind === "slot" && e.slots.length === 1 && e.slots[0]
|
|
|
616
616
|
leaf: n.at(-1)
|
|
617
617
|
};
|
|
618
618
|
};
|
|
619
|
-
function
|
|
619
|
+
function jt(e) {
|
|
620
620
|
let t = {}, n = {}, r = [];
|
|
621
621
|
for (let [i, a] of Object.entries(e)) {
|
|
622
|
-
let { parent: e, leaf: o } =
|
|
622
|
+
let { parent: e, leaf: o } = At(t, i), s = kt(a), c = s ? a.slots[0].current : Dt(a);
|
|
623
623
|
e[o] = c, n[i] = c, r.push({
|
|
624
624
|
key: i,
|
|
625
625
|
parent: e,
|
|
@@ -634,13 +634,13 @@ function At(e) {
|
|
|
634
634
|
writers: r
|
|
635
635
|
};
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function Mt(e) {
|
|
638
638
|
let t = {};
|
|
639
639
|
return {
|
|
640
640
|
root: t,
|
|
641
641
|
flat: e,
|
|
642
642
|
writers: Object.keys(e).map((n) => {
|
|
643
|
-
let { parent: r, leaf: i } =
|
|
643
|
+
let { parent: r, leaf: i } = At(t, n);
|
|
644
644
|
return r[i] = e[n], {
|
|
645
645
|
key: n,
|
|
646
646
|
parent: r,
|
|
@@ -649,12 +649,12 @@ function jt(e) {
|
|
|
649
649
|
})
|
|
650
650
|
};
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function Nt(e) {
|
|
653
653
|
for (let t of e.writers) t.parent[t.leaf] = e.flat[t.key];
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function Pt(e) {
|
|
656
656
|
for (let t of e.writers) {
|
|
657
|
-
let n = t.numeric ? t.value.slots[0].current :
|
|
657
|
+
let n = t.numeric ? t.value.slots[0].current : Dt(t.value);
|
|
658
658
|
t.parent[t.leaf] = n, e.flat[t.key] = n;
|
|
659
659
|
}
|
|
660
660
|
}
|
|
@@ -677,17 +677,17 @@ var j = {
|
|
|
677
677
|
start: .75,
|
|
678
678
|
end: 1
|
|
679
679
|
}
|
|
680
|
-
},
|
|
681
|
-
function
|
|
682
|
-
return
|
|
680
|
+
}, Ft = 1e6;
|
|
681
|
+
function It(e) {
|
|
682
|
+
return S(se(e), (n) => new t("start", e, `invalid keyframe selector — ${n.map(ve).join("; ")}`, e.trim() === "" ? "EMPTY_PARSE" : void 0));
|
|
683
683
|
}
|
|
684
|
-
var
|
|
685
|
-
if (e.kind !== "named") throw new
|
|
686
|
-
let
|
|
687
|
-
if (
|
|
684
|
+
var Lt = (e) => {
|
|
685
|
+
if (e.kind !== "named") throw new t("start", e, "named phase resolution requires a parsed named keyframe selector", "NAMED_SELECTOR_NO_TIMELINE");
|
|
686
|
+
let n = j[e.name];
|
|
687
|
+
if (n === void 0) throw new t("start", e, `no timeline phase is defined for ${JSON.stringify(e.name)}`, "NAMED_SELECTOR_NO_TIMELINE");
|
|
688
688
|
let r = e.offset ?? 0;
|
|
689
|
-
return
|
|
690
|
-
},
|
|
689
|
+
return n.start + r * (n.end - n.start);
|
|
690
|
+
}, Rt = (e) => {
|
|
691
691
|
let t = [], n = [];
|
|
692
692
|
for (let r of e) r.kind === "number" ? t.push(r) : n.push(r);
|
|
693
693
|
let r = new Float64Array(t.length), i = new Float64Array(t.length);
|
|
@@ -699,20 +699,20 @@ var It = (e) => {
|
|
|
699
699
|
to: i,
|
|
700
700
|
out: new Float64Array(t.length)
|
|
701
701
|
};
|
|
702
|
-
},
|
|
702
|
+
}, zt = (n, r) => {
|
|
703
703
|
if (typeof r == "function") return { fn: r };
|
|
704
704
|
if (typeof r == "object") {
|
|
705
705
|
if (typeof r.fn == "function") return r;
|
|
706
|
-
throw new n
|
|
706
|
+
throw new t(n, r, "an Easing must carry a callable `fn`");
|
|
707
707
|
}
|
|
708
|
-
if (typeof r != "string") throw new n
|
|
708
|
+
if (typeof r != "string") throw new t(n, r, "a timing-function name or CSS timing-function literal must be a string");
|
|
709
709
|
let i;
|
|
710
710
|
try {
|
|
711
|
-
i =
|
|
711
|
+
i = _e(r);
|
|
712
712
|
} catch {
|
|
713
|
-
throw new n
|
|
713
|
+
throw new t(n, r, "unknown timing function — pass a callable TimingFunction, a typed Easing, a registry name, or a cubic-bezier() literal", "UNKNOWN_TIMING_FN");
|
|
714
714
|
}
|
|
715
|
-
let a =
|
|
715
|
+
let a = e(r);
|
|
716
716
|
return a ? {
|
|
717
717
|
fn: i,
|
|
718
718
|
css: a
|
|
@@ -720,14 +720,14 @@ var It = (e) => {
|
|
|
720
720
|
};
|
|
721
721
|
//#endregion
|
|
722
722
|
//#region src/animation/compile/frame/compiler.ts
|
|
723
|
-
function
|
|
723
|
+
function Bt(e, t, n) {
|
|
724
724
|
let [r, i] = [e.start, t.start];
|
|
725
725
|
return {
|
|
726
726
|
start: r.kind === "percent" ? r.value * n : NaN,
|
|
727
727
|
stop: i.kind === "percent" ? i.value * n : NaN
|
|
728
728
|
};
|
|
729
729
|
}
|
|
730
|
-
var
|
|
730
|
+
var Vt = class {
|
|
731
731
|
_options;
|
|
732
732
|
templateFrames = [];
|
|
733
733
|
parsedVars = [];
|
|
@@ -745,12 +745,12 @@ var Bt = class {
|
|
|
745
745
|
}
|
|
746
746
|
addFrame(e, t, n, r, i) {
|
|
747
747
|
typeof e == "number" && (e = `${e}%`);
|
|
748
|
-
let a = typeof e == "string" ?
|
|
748
|
+
let a = typeof e == "string" ? It(e) : e, o = {
|
|
749
749
|
id: this.frameId,
|
|
750
750
|
start: a,
|
|
751
751
|
vars: t,
|
|
752
752
|
transform: n,
|
|
753
|
-
timingFunction: r == null ? this.options.timingFunction :
|
|
753
|
+
timingFunction: r == null ? this.options.timingFunction : zt("timingFunction", r),
|
|
754
754
|
composition: i
|
|
755
755
|
};
|
|
756
756
|
this.templateFrames.push(o), this.frameId += 1;
|
|
@@ -759,17 +759,17 @@ var Bt = class {
|
|
|
759
759
|
let n = this.templateFrames[e], r = this.templateFrames[t], i = {
|
|
760
760
|
start: e,
|
|
761
761
|
stop: t
|
|
762
|
-
}, a =
|
|
762
|
+
}, a = Bt(n, r, this.options.duration), o = n.transform;
|
|
763
763
|
if (o == null) {
|
|
764
|
-
let t =
|
|
765
|
-
o = (t === void 0 ? void 0 : this.templateFrames[t].transform) ??
|
|
764
|
+
let t = mt(e, this.templateFrames, (e) => e.transform != null);
|
|
765
|
+
o = (t === void 0 ? void 0 : this.templateFrames[t].transform) ?? T;
|
|
766
766
|
}
|
|
767
767
|
let s = n.timingFunction;
|
|
768
768
|
if (s == null) {
|
|
769
|
-
let t =
|
|
769
|
+
let t = mt(e, this.templateFrames, (e) => e.timingFunction != null);
|
|
770
770
|
s = (t === void 0 ? void 0 : this.templateFrames[t].timingFunction) ?? this.options.timingFunction;
|
|
771
771
|
}
|
|
772
|
-
let c = e *
|
|
772
|
+
let c = e * Ft + t, l = r.composition;
|
|
773
773
|
return {
|
|
774
774
|
id: c,
|
|
775
775
|
ixs: i,
|
|
@@ -806,14 +806,14 @@ var Bt = class {
|
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
808
|
parse(e) {
|
|
809
|
-
this._frames = [], this._targets = e, this.templateFrames.sort((e, t) => e.start.kind === "percent" && t.start.kind === "percent" ? e.start.value - t.start.value : 0), this.parsedVars = this.templateFrames.map((e) =>
|
|
809
|
+
this._frames = [], this._targets = e, this.templateFrames.sort((e, t) => e.start.kind === "percent" && t.start.kind === "percent" ? e.start.value - t.start.value : 0), this.parsedVars = this.templateFrames.map((e) => vt(e.vars));
|
|
810
810
|
for (let e = 0; e < this.templateFrames.length - 1; e++) this._frames.push(this.createFrame(e, e + 1));
|
|
811
811
|
let t = this.buildVarIndex();
|
|
812
812
|
this._frames.forEach((e, n) => this.reconcileVars(n, t)), this._frames.sort((e, t) => e.time.start === t.time.start ? e.time.stop - t.time.stop : e.time.start - t.time.start), this._frames = this._frames.filter((e) => e.interpVars != null && Object.keys(e.interpVars).length > 0), this._frames.forEach((e) => this.finalizeFrameVars(e));
|
|
813
813
|
}
|
|
814
814
|
finalizeFrameVars(e) {
|
|
815
|
-
let t =
|
|
816
|
-
e._sink = t, e.flatVars = t.flat, e.vars = t.root, e.allInterpVars = Object.values(e.interpVars).flatMap((e) => e.slots), e._numericPlan =
|
|
815
|
+
let t = jt(e.interpVars);
|
|
816
|
+
e._sink = t, e.flatVars = t.flat, e.vars = t.root, e.allInterpVars = Object.values(e.interpVars).flatMap((e) => e.slots), e._numericPlan = Rt(e.allInterpVars);
|
|
817
817
|
}
|
|
818
818
|
renormalizeColors() {
|
|
819
819
|
for (let e of this._frames) {
|
|
@@ -822,32 +822,32 @@ var Bt = class {
|
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
824
|
compileValue(e, t, n) {
|
|
825
|
-
return
|
|
825
|
+
return Tt(t, n, {
|
|
826
826
|
colorSpace: this.options.colorSpace,
|
|
827
827
|
property: e,
|
|
828
828
|
...this.options.hueMethod === void 0 ? {} : { hueMethod: this.options.hueMethod },
|
|
829
829
|
...this._targets[0] === void 0 ? {} : { target: this._targets[0] }
|
|
830
830
|
});
|
|
831
831
|
}
|
|
832
|
-
},
|
|
833
|
-
let t =
|
|
832
|
+
}, Ht = /* @__PURE__ */ new WeakMap(), M = (e) => {
|
|
833
|
+
let t = Ht.get(e);
|
|
834
834
|
if (t === void 0) throw TypeError("Animation compiler state is not initialized.");
|
|
835
835
|
return t;
|
|
836
|
-
},
|
|
837
|
-
|
|
836
|
+
}, Ut = (e, t) => {
|
|
837
|
+
Ht.set(e, t);
|
|
838
838
|
};
|
|
839
839
|
//#endregion
|
|
840
840
|
//#region src/animation/engine/play-lifecycle/events.ts
|
|
841
|
-
function
|
|
841
|
+
function Wt(e, t) {
|
|
842
842
|
if (!(typeof AnimationEvent > "u")) for (let n of e.targets) typeof n?.dispatchEvent == "function" && n.dispatchEvent(new AnimationEvent(t, {
|
|
843
843
|
animationName: e.name ?? "",
|
|
844
844
|
elapsedTime: e._playback.t / 1e3
|
|
845
845
|
}));
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function Gt(e, t) {
|
|
848
848
|
return e === "reverse" || e === "alternate-reverse" && t % 2 == 0 || e === "alternate" && t % 2 == 1;
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function Kt(e) {
|
|
851
851
|
if (e._playback.startTime !== void 0) {
|
|
852
852
|
let t = e._playback.t, n = e.options.duration - 2 * t;
|
|
853
853
|
e._playback.startTime -= n;
|
|
@@ -856,36 +856,36 @@ function Gt(e) {
|
|
|
856
856
|
}
|
|
857
857
|
//#endregion
|
|
858
858
|
//#region src/animation/engine/play-lifecycle/transport.ts
|
|
859
|
-
function
|
|
859
|
+
function qt(e) {
|
|
860
860
|
e._playback.started && (e._playback.paused = !0);
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function Jt(e) {
|
|
863
863
|
if (e._playback.started && e._playback.paused) if (e._playback.paused = !1, e._playback._waAnimations.length > 0) for (let t of e._playback._waAnimations) t.play();
|
|
864
864
|
else e.playback.running || e.playback.loop(e._playback._boundFrame);
|
|
865
865
|
}
|
|
866
|
-
function Jt(e) {
|
|
867
|
-
s(e._playback, () => Kt(e), () => qt(e));
|
|
868
|
-
}
|
|
869
866
|
function Yt(e) {
|
|
870
|
-
|
|
867
|
+
c(e._playback, () => qt(e), () => Jt(e));
|
|
871
868
|
}
|
|
872
869
|
function Xt(e) {
|
|
873
|
-
|
|
870
|
+
tn(e), e.playback.stop(), N(e), en(e);
|
|
874
871
|
}
|
|
875
872
|
function Zt(e) {
|
|
873
|
+
return m(e._playback);
|
|
874
|
+
}
|
|
875
|
+
function Qt(e) {
|
|
876
876
|
return e._playback.reversed ? e.options.duration - e._playback.t : e._playback.t;
|
|
877
877
|
}
|
|
878
878
|
function N(e) {
|
|
879
879
|
e._playback.done = !1, e._playback.started = !1, e._playback.paused = !1, e._playback.reversed = !1, e._playback.iteration = 0, e._playback.startTime = void 0, e._playback.carriedStartTime = void 0, e._playback.anchorTick = void 0, e._playback.startOwed = !1, e._playback.pausedTime = 0, e._playback.t = 0;
|
|
880
880
|
}
|
|
881
|
-
function Qt(e) {
|
|
882
|
-
en(e), e._playback.started && e.frames.length > 0 && e.fillBackwards(), N(e);
|
|
883
|
-
}
|
|
884
881
|
function $t(e) {
|
|
882
|
+
tn(e), e._playback.started && e.frames.length > 0 && e.fillBackwards(), N(e);
|
|
883
|
+
}
|
|
884
|
+
function en(e) {
|
|
885
885
|
let t = e._playback.resolvePromise;
|
|
886
886
|
e._playback.resolvePromise = null, t?.();
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function tn(e) {
|
|
889
889
|
let t = e._playback._waAnimations;
|
|
890
890
|
if (t.length !== 0) {
|
|
891
891
|
for (let e of t) try {
|
|
@@ -896,7 +896,7 @@ function en(e) {
|
|
|
896
896
|
}
|
|
897
897
|
//#endregion
|
|
898
898
|
//#region src/animation/waapi/eligibility.ts
|
|
899
|
-
var
|
|
899
|
+
var nn = new Set([
|
|
900
900
|
"em",
|
|
901
901
|
"rem",
|
|
902
902
|
"ex",
|
|
@@ -905,10 +905,10 @@ var tn = new Set([
|
|
|
905
905
|
"ic",
|
|
906
906
|
"lh",
|
|
907
907
|
"rlh"
|
|
908
|
-
]),
|
|
908
|
+
]), rn = (e) => typeof e == "string" && (w(e) || nn.has(e)), an = (e) => {
|
|
909
909
|
if (e.kind === "call") return e.name;
|
|
910
910
|
if (!(e.kind !== "scalar" || e.payload.type !== "number")) return e.payload.unit;
|
|
911
|
-
},
|
|
911
|
+
}, on = new Set(["offset-distance"]), sn = (e) => on.has(e) || on.has(e.split(".").pop() ?? e), cn = () => typeof globalThis.webkitConvertPointFromNodeToPage == "function";
|
|
912
912
|
function P(e) {
|
|
913
913
|
if (!e.targets || e.targets.length === 0) return {
|
|
914
914
|
eligible: !1,
|
|
@@ -934,14 +934,14 @@ function P(e) {
|
|
|
934
934
|
eligible: !1,
|
|
935
935
|
reason: "easing has no faithful CSS twin (would run bare linear on the compositor)"
|
|
936
936
|
};
|
|
937
|
-
if (n?.css?.startsWith("linear(") &&
|
|
937
|
+
if (n?.css?.startsWith("linear(") && cn()) return {
|
|
938
938
|
eligible: !1,
|
|
939
939
|
reason: "WebKit refuses HW-accel for linear() easing — the spring twin stays on the rAF path (CE-1.0)"
|
|
940
940
|
};
|
|
941
941
|
for (let e of t) for (let [t, n] of Object.entries(e.interpVars)) {
|
|
942
|
-
let e =
|
|
942
|
+
let e = sn(t);
|
|
943
943
|
for (let t of n.slots) {
|
|
944
|
-
let n = t.kind === "number" ? t.unit : t.kind === "computed" ?
|
|
944
|
+
let n = t.kind === "number" ? t.unit : t.kind === "computed" ? an(t.from) : void 0, r = t.kind === "number" ? t.unit : t.kind === "computed" ? an(t.to) : void 0, i = e && t.kind === "number" && n === "%", a = e && t.kind === "number" && r === "%", o = rn(n) && !i, s = rn(r) && !a;
|
|
945
945
|
if (o || s) return {
|
|
946
946
|
eligible: !1,
|
|
947
947
|
reason: `layout-dependent unit (${String(n ?? r)}) would freeze to px under WAAPI`
|
|
@@ -954,11 +954,11 @@ function P(e) {
|
|
|
954
954
|
}
|
|
955
955
|
return { eligible: !0 };
|
|
956
956
|
}
|
|
957
|
-
var
|
|
957
|
+
var ln = .005, un = /^(steps\(|step-start$|step-end$)/, dn = (e) => {
|
|
958
958
|
let t = /* @__PURE__ */ new Map(), n = e.frames;
|
|
959
959
|
for (let e of n) {
|
|
960
960
|
let n = e.timingFunction.css;
|
|
961
|
-
if (n !== void 0 &&
|
|
961
|
+
if (n !== void 0 && un.test(n.trim())) return !1;
|
|
962
962
|
for (let [n, r] of Object.entries(e.interpVars)) {
|
|
963
963
|
if (r.slots.length === 0 || r.slots.some((e) => e.kind !== "number")) return !1;
|
|
964
964
|
let e = JSON.stringify(r.template), i = t.get(n);
|
|
@@ -977,10 +977,10 @@ var cn = .005, ln = /^(steps\(|step-start$|step-end$)/, un = (e) => {
|
|
|
977
977
|
i.kind === "number" && Number.isFinite(i.current) && n.set(`${e}\u0000${r}`, i.current);
|
|
978
978
|
}
|
|
979
979
|
return n;
|
|
980
|
-
},
|
|
980
|
+
}, fn = 64, pn = (e, t, n) => {
|
|
981
981
|
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = n - t;
|
|
982
|
-
for (let n = 0; n <=
|
|
983
|
-
let o = F(e, t + a * n /
|
|
982
|
+
for (let n = 0; n <= fn; n++) {
|
|
983
|
+
let o = F(e, t + a * n / fn);
|
|
984
984
|
for (let [e, t] of o) {
|
|
985
985
|
let n = r.get(e), a = i.get(e);
|
|
986
986
|
(n === void 0 || t < n) && r.set(e, t), (a === void 0 || t > a) && i.set(e, t);
|
|
@@ -989,7 +989,7 @@ var cn = .005, ln = /^(steps\(|step-start$|step-end$)/, un = (e) => {
|
|
|
989
989
|
let o = /* @__PURE__ */ new Map();
|
|
990
990
|
for (let [e, t] of r) o.set(e, (i.get(e) ?? t) - t);
|
|
991
991
|
return o;
|
|
992
|
-
},
|
|
992
|
+
}, mn = (e, t, n, r, i, a) => {
|
|
993
993
|
let o = r - t, s = 0;
|
|
994
994
|
for (let r of [.25, .75]) {
|
|
995
995
|
let c = F(e, t + o * r);
|
|
@@ -1004,21 +1004,21 @@ var cn = .005, ln = /^(steps\(|step-start$|step-end$)/, un = (e) => {
|
|
|
1004
1004
|
}
|
|
1005
1005
|
return s;
|
|
1006
1006
|
};
|
|
1007
|
-
function
|
|
1007
|
+
function hn(e, t, n) {
|
|
1008
1008
|
let r = /* @__PURE__ */ new Set();
|
|
1009
1009
|
if (n <= 0) return r;
|
|
1010
1010
|
for (let n = 1; n < t.length; n++) {
|
|
1011
1011
|
let i = t[n - 1], a = t[n];
|
|
1012
1012
|
if (a - i <= 0) continue;
|
|
1013
|
-
let o =
|
|
1013
|
+
let o = pn(e, i, a), s = F(e, i), c = F(e, a), l = (t, n, r, i) => ({
|
|
1014
1014
|
a: t,
|
|
1015
1015
|
sampleA: n,
|
|
1016
1016
|
b: r,
|
|
1017
1017
|
sampleB: i,
|
|
1018
|
-
error:
|
|
1018
|
+
error: mn(e, t, n, r, i, o)
|
|
1019
1019
|
}), u = [l(i, s, a, c)], d = 16;
|
|
1020
1020
|
for (; d > 0;) {
|
|
1021
|
-
let t = -1, n =
|
|
1021
|
+
let t = -1, n = ln;
|
|
1022
1022
|
for (let e = 0; e < u.length; e++) u[e].error > n && (n = u[e].error, t = e);
|
|
1023
1023
|
if (t === -1) break;
|
|
1024
1024
|
let i = u[t], a = (i.a + i.b) / 2;
|
|
@@ -1034,19 +1034,19 @@ function mn(e, t, n) {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
//#endregion
|
|
1036
1036
|
//#region src/animation/waapi/emission.ts
|
|
1037
|
-
function
|
|
1038
|
-
let t = e.options.duration, n = [], r = e.frames.length > 1, i = r &&
|
|
1037
|
+
function gn(e) {
|
|
1038
|
+
let t = e.options.duration, n = [], r = e.frames.length > 1, i = r && dn(e), a = r && !i ? e.frames[0]?.timingFunction.css : void 0;
|
|
1039
1039
|
if (r && !i && a === void 0) throw TypeError("A multi-segment structural WAAPI animation requires a faithful CSS easing.");
|
|
1040
1040
|
let o = /* @__PURE__ */ new Set();
|
|
1041
1041
|
for (let t of e.frames) o.add(t.time.start), o.add(t.time.stop);
|
|
1042
1042
|
let s = [...o].sort((e, t) => e - t), c = new Set(s);
|
|
1043
|
-
if (i) for (let n of
|
|
1043
|
+
if (i) for (let n of hn(e, s, t)) c.add(n);
|
|
1044
1044
|
let l = s.at(-1);
|
|
1045
1045
|
for (let r of [...c].sort((e, t) => e - t)) {
|
|
1046
1046
|
let i = e.interpFrames(r, !1);
|
|
1047
1047
|
if (Object.keys(i).length === 0) continue;
|
|
1048
1048
|
let o = {
|
|
1049
|
-
offset:
|
|
1049
|
+
offset: _(r / t, 0, 1),
|
|
1050
1050
|
...i
|
|
1051
1051
|
};
|
|
1052
1052
|
a !== void 0 && r !== l && (o.easing = a), n.push(o);
|
|
@@ -1055,32 +1055,32 @@ function hn(e) {
|
|
|
1055
1055
|
}
|
|
1056
1056
|
//#endregion
|
|
1057
1057
|
//#region src/animation/waapi/options.ts
|
|
1058
|
-
var
|
|
1058
|
+
var _n = {
|
|
1059
1059
|
normal: "normal",
|
|
1060
1060
|
reverse: "reverse",
|
|
1061
1061
|
alternate: "alternate",
|
|
1062
1062
|
"alternate-reverse": "alternate-reverse"
|
|
1063
|
-
},
|
|
1063
|
+
}, vn = {
|
|
1064
1064
|
none: "none",
|
|
1065
1065
|
forwards: "forwards",
|
|
1066
1066
|
backwards: "backwards",
|
|
1067
1067
|
both: "both"
|
|
1068
|
-
},
|
|
1068
|
+
}, yn = {
|
|
1069
1069
|
replace: "replace",
|
|
1070
1070
|
add: "add",
|
|
1071
1071
|
accumulate: "accumulate"
|
|
1072
|
-
},
|
|
1072
|
+
}, bn = (e) => {
|
|
1073
1073
|
for (let t of e.frames) {
|
|
1074
1074
|
let e = t.composition;
|
|
1075
|
-
if (e != null && e !== "replace") return
|
|
1075
|
+
if (e != null && e !== "replace") return yn[e] ?? "replace";
|
|
1076
1076
|
}
|
|
1077
1077
|
return "replace";
|
|
1078
1078
|
};
|
|
1079
|
-
function
|
|
1080
|
-
let t = e.options, n =
|
|
1079
|
+
function xn(e) {
|
|
1080
|
+
let t = e.options, n = _n[t.direction], r = vn[t.fillMode];
|
|
1081
1081
|
if (n == null) throw TypeError(`Unrecognised animation direction "${t.direction}".`);
|
|
1082
1082
|
if (r == null) throw TypeError(`Unrecognised animation fill mode "${t.fillMode}".`);
|
|
1083
|
-
let i = e.frames[0]?.timingFunction ?? e.options.timingFunction, a = e.frames.length > 1 ? "linear" : i.css ?? "linear", o =
|
|
1083
|
+
let i = e.frames[0]?.timingFunction ?? e.options.timingFunction, a = e.frames.length > 1 ? "linear" : i.css ?? "linear", o = bn(e), s = {
|
|
1084
1084
|
duration: t.duration,
|
|
1085
1085
|
delay: t.delay,
|
|
1086
1086
|
iterations: t.iterationCount === Infinity ? Infinity : t.iterationCount,
|
|
@@ -1092,42 +1092,42 @@ function bn(e) {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
//#endregion
|
|
1094
1094
|
//#region src/animation/waapi/delegation.ts
|
|
1095
|
-
async function
|
|
1096
|
-
let n =
|
|
1097
|
-
e._playback._waAnimations =
|
|
1098
|
-
let
|
|
1095
|
+
async function Sn(e, t) {
|
|
1096
|
+
let n = gn(e), r = xn(e), a = e.targets.map((e) => e.animate(n, r));
|
|
1097
|
+
e._playback._waAnimations = a;
|
|
1098
|
+
let o = () => {
|
|
1099
1099
|
if (!e.paused) {
|
|
1100
|
-
for (let t of
|
|
1100
|
+
for (let t of a) if (t.playState === "paused") {
|
|
1101
1101
|
e.pause();
|
|
1102
1102
|
break;
|
|
1103
1103
|
}
|
|
1104
1104
|
}
|
|
1105
|
-
if (e.paused) for (let e of
|
|
1105
|
+
if (e.paused) for (let e of a) e.pause();
|
|
1106
1106
|
return !e.done;
|
|
1107
1107
|
};
|
|
1108
|
-
e.playback.loop((n) => e.done ? !1 :
|
|
1108
|
+
e.playback.loop((n) => e.done ? !1 : i(e.options.respectReducedMotion, () => !0, () => !1) ? (t.snapToReducedMotion(), !1) : (e.advanceTo(n), o()));
|
|
1109
1109
|
try {
|
|
1110
|
-
await Promise.all(
|
|
1111
|
-
for (let t of
|
|
1110
|
+
await Promise.all(a.map((e) => e.finished));
|
|
1111
|
+
for (let t of a) try {
|
|
1112
1112
|
e.restPosition === "final" && typeof t.commitStyles == "function" && t.commitStyles(), t.cancel();
|
|
1113
1113
|
} catch {}
|
|
1114
1114
|
} catch {} finally {
|
|
1115
1115
|
e.playback.stop(), e._playback._waAnimations = [];
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1118
|
+
function Cn(e, t, n) {
|
|
1119
1119
|
let r = n?.eligibility ?? P(e);
|
|
1120
1120
|
if (!r.eligible) return {
|
|
1121
1121
|
attached: !1,
|
|
1122
1122
|
reason: r.reason
|
|
1123
1123
|
};
|
|
1124
|
-
let i = n?.timeline ??
|
|
1124
|
+
let i = n?.timeline ?? h(t);
|
|
1125
1125
|
if (i == null) return {
|
|
1126
1126
|
attached: !1,
|
|
1127
1127
|
reason: "native scroll/view timeline unavailable (feature absent)"
|
|
1128
1128
|
};
|
|
1129
|
-
let a =
|
|
1130
|
-
...
|
|
1129
|
+
let a = gn(e), o = {
|
|
1130
|
+
...xn(e),
|
|
1131
1131
|
timeline: i
|
|
1132
1132
|
}, s = e.targets.map((e) => e.animate(a, o));
|
|
1133
1133
|
return e._playback._waAnimations = s, {
|
|
@@ -1137,58 +1137,58 @@ function Sn(e, t, n) {
|
|
|
1137
1137
|
}
|
|
1138
1138
|
//#endregion
|
|
1139
1139
|
//#region src/animation/engine/play-lifecycle/strategies.ts
|
|
1140
|
-
function
|
|
1140
|
+
function wn(e) {
|
|
1141
1141
|
return new Promise((t) => {
|
|
1142
1142
|
e._playback.resolvePromise = t, e.playback.loop(e._playback._boundFrame);
|
|
1143
1143
|
});
|
|
1144
1144
|
}
|
|
1145
|
-
async function wn(e) {
|
|
1146
|
-
await xn(e, { snapToReducedMotion: () => En(e) }), N(e);
|
|
1147
|
-
}
|
|
1148
1145
|
async function Tn(e) {
|
|
1146
|
+
await Sn(e, { snapToReducedMotion: () => Dn(e) }), N(e);
|
|
1147
|
+
}
|
|
1148
|
+
async function En(e) {
|
|
1149
1149
|
e._playback.started = !0, e.dispatchAnimationEvent("animationstart"), e.fillForwards(), e._playback.iteration = 0, e._playback.done = !0, e.dispatchAnimationEvent("animationend"), N(e);
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1152
|
-
|
|
1151
|
+
function Dn(e) {
|
|
1152
|
+
tn(e), e.fillForwards(), e._playback.iteration = 0, e._playback.done = !0, e.dispatchAnimationEvent("animationend"), N(e), en(e);
|
|
1153
1153
|
}
|
|
1154
|
-
async function
|
|
1154
|
+
async function On(e) {
|
|
1155
1155
|
if (e.managed) throw Error("Animation.play() called on a managed animation — the AnimationGroup owns the rAF loop. Call group.play() instead.");
|
|
1156
|
-
return e.assertNoUnresolvedNamedSelector(),
|
|
1156
|
+
return e.assertNoUnresolvedNamedSelector(), d(e._playback, () => i(e.options.respectReducedMotion, () => (e.waapiIneligibleReason = void 0, En(e)), () => {
|
|
1157
1157
|
if (e.options.useWAAPI) {
|
|
1158
1158
|
let t = P(e);
|
|
1159
|
-
return t.eligible ? (e.waapiIneligibleReason = void 0,
|
|
1159
|
+
return t.eligible ? (e.waapiIneligibleReason = void 0, Tn(e)) : (e.waapiIneligibleReason = t.reason, wn(e));
|
|
1160
1160
|
}
|
|
1161
|
-
return e.waapiIneligibleReason = void 0,
|
|
1161
|
+
return e.waapiIneligibleReason = void 0, wn(e);
|
|
1162
1162
|
}));
|
|
1163
1163
|
}
|
|
1164
1164
|
//#endregion
|
|
1165
1165
|
//#region src/animation/engine/play-lifecycle/frame.ts
|
|
1166
|
-
var
|
|
1167
|
-
function kn(e) {
|
|
1168
|
-
e._playback.reversed = !1, Wt(e.options.direction, e._playback.iteration) && Gt(e), (e.options.fillMode === "backwards" || e.options.fillMode === "both") && e.fillBackwards(), e._playback.started = !0;
|
|
1169
|
-
}
|
|
1166
|
+
var kn = (e) => e.options.delay > 0 && e._playback.iteration === 0;
|
|
1170
1167
|
function An(e) {
|
|
1168
|
+
e._playback.reversed = !1, Gt(e.options.direction, e._playback.iteration) && Kt(e), (e.options.fillMode === "backwards" || e.options.fillMode === "both") && e.fillBackwards(), e._playback.started = !0;
|
|
1169
|
+
}
|
|
1170
|
+
function jn(e) {
|
|
1171
1171
|
e.paintRest(), e._playback.startTime = void 0, e._playback.iteration >= e.options.iterationCount - 1 ? (e._playback.done = !0, e._playback.iteration = 0, e.dispatchAnimationEvent("animationend")) : (e._playback.iteration += 1, e.dispatchAnimationEvent("animationiteration"));
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1173
|
+
function Mn(e, t) {
|
|
1174
1174
|
if (e._playback.startTime === void 0) {
|
|
1175
|
-
let n =
|
|
1176
|
-
return
|
|
1175
|
+
let n = kn(e) ? e.options.delay : 0;
|
|
1176
|
+
return An(e), Nn(e, t, n, !1);
|
|
1177
1177
|
}
|
|
1178
|
-
return
|
|
1178
|
+
return Fn(e, t, !1);
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1180
|
+
function Nn(e, t, n, r) {
|
|
1181
1181
|
let i = e._playback.carriedStartTime;
|
|
1182
|
-
return e._playback.carriedStartTime = void 0, e._playback.startTime = i ?? t + n, i === void 0 && (e._playback.pausedTime = 0), e._playback.anchorTick = i === void 0 ? t : void 0, e._playback.startOwed = n > 0, e._playback.startOwed || e.dispatchAnimationEvent("animationstart"),
|
|
1182
|
+
return e._playback.carriedStartTime = void 0, e._playback.startTime = i ?? t + n, i === void 0 && (e._playback.pausedTime = 0), e._playback.anchorTick = i === void 0 ? t : void 0, e._playback.startOwed = n > 0, e._playback.startOwed || e.dispatchAnimationEvent("animationstart"), Fn(e, t, r);
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1184
|
+
function Pn(e, t) {
|
|
1185
1185
|
let n = e._playback.anchorTick;
|
|
1186
1186
|
if (n === void 0 || t <= n) return;
|
|
1187
1187
|
e._playback.anchorTick = void 0;
|
|
1188
|
-
let
|
|
1189
|
-
|
|
1188
|
+
let r = t - n - g;
|
|
1189
|
+
r > 0 && !e._playback.paused && (e._playback.startTime += r);
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1191
|
+
function Fn(e, t, n) {
|
|
1192
1192
|
if (e._playback.paused && e._playback.pausedTime === 0) return e._playback.pausedTime = t, e._playback.t;
|
|
1193
1193
|
if (e._playback.pausedTime > 0 && !e._playback.paused) {
|
|
1194
1194
|
let n = t - e._playback.pausedTime;
|
|
@@ -1201,19 +1201,19 @@ function Pn(e, t, n) {
|
|
|
1201
1201
|
if (e._playback.t >= e.options.duration && n) e._playback.t = e.options.duration;
|
|
1202
1202
|
else if (e._playback.t >= e.options.duration) {
|
|
1203
1203
|
let n = e._playback.startTime + e.options.duration;
|
|
1204
|
-
if (
|
|
1204
|
+
if (jn(e), e._playback.t = e.options.duration, !e._playback.done) return e._playback.carriedStartTime = n, An(e), Nn(e, t, 0, !0);
|
|
1205
1205
|
}
|
|
1206
1206
|
return e._playback.t;
|
|
1207
1207
|
}
|
|
1208
|
-
function Fn(e, t) {
|
|
1209
|
-
return o(e.options.respectReducedMotion, () => !0, () => !1) ? (En(e), !1) : (Nn(e, t), In(e, e.advanceTo(t)));
|
|
1210
|
-
}
|
|
1211
1208
|
function In(e, t) {
|
|
1212
|
-
return e.
|
|
1209
|
+
return i(e.options.respectReducedMotion, () => !0, () => !1) ? (Dn(e), !1) : (Pn(e, t), Ln(e, e.advanceTo(t)));
|
|
1210
|
+
}
|
|
1211
|
+
function Ln(e, t) {
|
|
1212
|
+
return e._playback.paused ? !1 : e._playback.done ? (N(e), en(e), !1) : (e.interpFrames(t, !0, e._playback._interpOut), !0);
|
|
1213
1213
|
}
|
|
1214
1214
|
//#endregion
|
|
1215
1215
|
//#region src/animation/engine/playback-state.ts
|
|
1216
|
-
var
|
|
1216
|
+
var Rn = class {
|
|
1217
1217
|
resolvePromise = null;
|
|
1218
1218
|
_playingPromise = null;
|
|
1219
1219
|
_waAnimations = [];
|
|
@@ -1236,50 +1236,50 @@ var Ln = class {
|
|
|
1236
1236
|
};
|
|
1237
1237
|
//#endregion
|
|
1238
1238
|
//#region src/animation/engine/composition.ts
|
|
1239
|
-
function
|
|
1239
|
+
function zn(e) {
|
|
1240
1240
|
for (let t of e) if (t.composition != null && t.composition !== "replace") return !0;
|
|
1241
1241
|
return !1;
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function Bn(e, t, n) {
|
|
1244
1244
|
e.clear(), t.clear(), n?.clear();
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1246
|
+
function Vn(e, t) {
|
|
1247
1247
|
let n = e.composition;
|
|
1248
1248
|
if (!(n == null || n === "replace")) for (let [r, i] of Object.entries(e.interpVars)) {
|
|
1249
1249
|
if (i.slots.length === 0) continue;
|
|
1250
1250
|
if (!i.slots.every((e) => e.kind === "number")) {
|
|
1251
|
-
|
|
1251
|
+
Gn(r, n, t);
|
|
1252
1252
|
continue;
|
|
1253
1253
|
}
|
|
1254
1254
|
let a = i.slots, o = t.compositionBase.get(r);
|
|
1255
|
-
o === void 0 && (o =
|
|
1255
|
+
o === void 0 && (o = Un(t.target, r, a.length, t.compositionPose), t.compositionBase.set(r, o));
|
|
1256
1256
|
let s = n === "accumulate" ? t.iteration : 0;
|
|
1257
1257
|
for (let n = 0; n < a.length; n++) {
|
|
1258
1258
|
let i = a[n], c = o[n] ?? 0;
|
|
1259
|
-
s > 0 ? i.current = c + s * (
|
|
1259
|
+
s > 0 ? i.current = c + s * (Wn(e, r, n, t.compositionBase) - c) + i.current : i.current = c + i.current;
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
1262
1262
|
}
|
|
1263
|
-
var
|
|
1264
|
-
function
|
|
1263
|
+
var Hn = (e) => e.kind === "call" ? e.args.flatMap(Hn) : e.kind === "list" ? e.items.flatMap(Hn) : e.payload.type === "number" ? [e.payload.value] : [];
|
|
1264
|
+
function Un(e, t, n, r) {
|
|
1265
1265
|
let i = Array(n).fill(0);
|
|
1266
1266
|
if (e == null || e.style == null) return i;
|
|
1267
1267
|
let a = t.split(".").pop() ?? t, o = r?.get(a);
|
|
1268
1268
|
if (o !== void 0) return o.slice(0, n);
|
|
1269
1269
|
let s = e.style.getPropertyValue(a) || e.style[a] || "";
|
|
1270
1270
|
if (!s) return i;
|
|
1271
|
-
let c =
|
|
1271
|
+
let c = xe(() => ce(s), (e) => Hn(e), []);
|
|
1272
1272
|
for (let e = 0; e < n && e < c.length; e++) {
|
|
1273
1273
|
let t = c[e];
|
|
1274
1274
|
Number.isFinite(t) && (i[e] = t);
|
|
1275
1275
|
}
|
|
1276
1276
|
return r?.set(a, i.slice()), i;
|
|
1277
1277
|
}
|
|
1278
|
-
function
|
|
1278
|
+
function Wn(e, t, n, r) {
|
|
1279
1279
|
let i = e.interpVars[t]?.slots[n];
|
|
1280
1280
|
return i?.kind === "number" ? i.to : r.get(t)?.[n] ?? 0;
|
|
1281
1281
|
}
|
|
1282
|
-
function
|
|
1282
|
+
function Gn(e, t, n) {
|
|
1283
1283
|
n.compositionFallbackSeen.has(e) || (n.compositionFallbackSeen.add(e), n.diagnostics.push({
|
|
1284
1284
|
code: "COMPOSITION_FALLBACK",
|
|
1285
1285
|
message: `animation-composition: ${t} on a non-numeric leaf "${e}" has no faithful numeric add — composited as \`replace\` (the lerped value), never a wrong sum`,
|
|
@@ -1288,70 +1288,70 @@ function Wn(e, t, n) {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
//#endregion
|
|
1290
1290
|
//#region src/animation/engine/interpolate.ts
|
|
1291
|
-
function Gn(e) {
|
|
1292
|
-
return e.options.fillMode === "forwards" || e.options.fillMode === "both" ? "final" : "initial";
|
|
1293
|
-
}
|
|
1294
1291
|
function Kn(e) {
|
|
1295
|
-
|
|
1292
|
+
return e.options.fillMode === "forwards" || e.options.fillMode === "both" ? "final" : "initial";
|
|
1296
1293
|
}
|
|
1297
1294
|
function qn(e) {
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1295
|
+
Kn(e) === "final" ? I(e, e.options.duration, !0) : I(e, 0, !0);
|
|
1296
|
+
}
|
|
1297
|
+
function Jn(e) {
|
|
1298
|
+
let n = e.templateFrames.find((e) => e.start.kind === "named");
|
|
1299
|
+
if (n != null) {
|
|
1300
|
+
let e = n.start.kind === "named" ? `${n.start.name}${n.start.offset === void 0 ? "" : ` ${n.start.offset * 100}%`}` : "";
|
|
1301
|
+
throw new t("start", e, `named scroll-range selector ("${e}") requires a ScrollTimeline or ManualTimeline — call bindTimeline(timeline) before play() to resolve the named phase to a numeric position`, "NAMED_SELECTOR_NO_TIMELINE");
|
|
1302
1302
|
}
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1305
|
-
|
|
1304
|
+
function Yn(e, t, n = !1) {
|
|
1305
|
+
Jn(e);
|
|
1306
1306
|
let r = e._playback.reversed;
|
|
1307
1307
|
e._playback.reversed = !1;
|
|
1308
|
-
let i = I(e,
|
|
1308
|
+
let i = I(e, Se(t, 0, 1) * e.options.duration, n);
|
|
1309
1309
|
return e._playback.reversed = r, i;
|
|
1310
1310
|
}
|
|
1311
|
-
function I(e, t, n = !1,
|
|
1312
|
-
let
|
|
1313
|
-
|
|
1314
|
-
let
|
|
1311
|
+
function I(e, t, n = !1, i) {
|
|
1312
|
+
let a = t < 0;
|
|
1313
|
+
a && (t = 0);
|
|
1314
|
+
let o = e.options.fillMode === "backwards" || e.options.fillMode === "both";
|
|
1315
1315
|
t = e._playback.reversed ? e.options.duration - t : t;
|
|
1316
|
-
let
|
|
1317
|
-
if (
|
|
1318
|
-
let
|
|
1319
|
-
for (let e =
|
|
1320
|
-
let n =
|
|
1316
|
+
let s = e.frames, c = s.length, l = a && !o ? -1 : r(s, t, (e) => e.time.start, (e) => e.time.stop);
|
|
1317
|
+
if (l === -1) return i === void 0 ? {} : (Xn(e, i), i);
|
|
1318
|
+
let u = l, d = l;
|
|
1319
|
+
for (let e = l - 1; e >= 0; e--) {
|
|
1320
|
+
let n = s[e];
|
|
1321
1321
|
if (t < n.time.start || t > n.time.stop) break;
|
|
1322
|
-
|
|
1322
|
+
u = e;
|
|
1323
1323
|
}
|
|
1324
|
-
for (let e =
|
|
1325
|
-
let n =
|
|
1324
|
+
for (let e = l + 1; e < c; e++) {
|
|
1325
|
+
let n = s[e];
|
|
1326
1326
|
if (t < n.time.start || t > n.time.stop) break;
|
|
1327
|
-
|
|
1327
|
+
d = e;
|
|
1328
1328
|
}
|
|
1329
|
-
for (let r =
|
|
1330
|
-
if (
|
|
1331
|
-
let t =
|
|
1332
|
-
return
|
|
1329
|
+
for (let r = u; r <= d; r++) Zn(e, s[r], t, n);
|
|
1330
|
+
if (u === d) {
|
|
1331
|
+
let t = s[l].flatVars;
|
|
1332
|
+
return i === void 0 ? t : (Xn(e, i), Object.assign(i, t), i);
|
|
1333
1333
|
}
|
|
1334
|
-
let
|
|
1335
|
-
|
|
1336
|
-
for (let e =
|
|
1337
|
-
return
|
|
1334
|
+
let f = i ?? {};
|
|
1335
|
+
i !== void 0 && Xn(e, i);
|
|
1336
|
+
for (let e = u; e <= d; e++) Object.assign(f, s[e].flatVars);
|
|
1337
|
+
return f;
|
|
1338
1338
|
}
|
|
1339
|
-
function
|
|
1339
|
+
function Xn(e, t) {
|
|
1340
1340
|
let n = e._stableKeys;
|
|
1341
1341
|
for (let e = 0; e < n.length; e++) t[n[e]] = void 0;
|
|
1342
1342
|
}
|
|
1343
|
-
function
|
|
1344
|
-
let { start: i, stop: a } = t.time, o = i === a ? 1 :
|
|
1343
|
+
function Zn(e, t, n, r) {
|
|
1344
|
+
let { start: i, stop: a } = t.time, o = i === a ? 1 : we(n, i, a, 0, 1), s = t.timingFunction.fn(o), c = e.targets[0], l = t._numericPlan;
|
|
1345
1345
|
if (l !== void 0 && l.numeric.length > 0) {
|
|
1346
1346
|
let { numeric: e, from: t, to: n, out: r } = l;
|
|
1347
|
-
|
|
1347
|
+
Ce(t, n, s, r);
|
|
1348
1348
|
for (let t = 0; t < e.length; t++) e[t].current = r[t];
|
|
1349
|
-
for (let e of l.residual) O(e, c),
|
|
1350
|
-
} else for (let e of t.allInterpVars) O(e, c),
|
|
1351
|
-
r && e._hasComposition && t.composition != null &&
|
|
1349
|
+
for (let e of l.residual) O(e, c), ft(e, s);
|
|
1350
|
+
} else for (let e of t.allInterpVars) O(e, c), ft(e, s);
|
|
1351
|
+
r && e._hasComposition && t.composition != null && Qn(e, t), Pt(t._sink), r && (e.unflatten ? t.transform(t.vars, n) : t.transform(t.flatVars, n));
|
|
1352
1352
|
}
|
|
1353
|
-
function
|
|
1354
|
-
|
|
1353
|
+
function Qn(e, t) {
|
|
1354
|
+
Vn(t, {
|
|
1355
1355
|
iteration: e._playback.iteration,
|
|
1356
1356
|
target: e.targets[0],
|
|
1357
1357
|
compositionBase: e._compositionBase,
|
|
@@ -1362,8 +1362,8 @@ function Zn(e, t) {
|
|
|
1362
1362
|
}
|
|
1363
1363
|
//#endregion
|
|
1364
1364
|
//#region src/animation/engine/options.ts
|
|
1365
|
-
var
|
|
1366
|
-
let t =
|
|
1365
|
+
var $n = (e) => {
|
|
1366
|
+
let t = ae(de(e), void 0);
|
|
1367
1367
|
if (t?.payload.type !== "number") return;
|
|
1368
1368
|
let { value: n, unit: r } = t.payload;
|
|
1369
1369
|
if (Number.isFinite(n)) {
|
|
@@ -1371,125 +1371,125 @@ var Qn = (e) => {
|
|
|
1371
1371
|
if (r === "s") return n * 1e3;
|
|
1372
1372
|
}
|
|
1373
1373
|
};
|
|
1374
|
-
function
|
|
1375
|
-
return e == null ?
|
|
1374
|
+
function er(e) {
|
|
1375
|
+
return e == null ? E.timingFunction : zt("timingFunction", e);
|
|
1376
1376
|
}
|
|
1377
|
-
function
|
|
1378
|
-
return
|
|
1377
|
+
function tr(e) {
|
|
1378
|
+
return e == null ? E.iterationCount : e === "infinite" || e === "∞" || e === "Infinity" || e === Infinity ? Infinity : n("iterationCount", e, (e) => {
|
|
1379
1379
|
let t = typeof e == "string" ? Number.parseFloat(e.trim()) : e;
|
|
1380
1380
|
return typeof t == "number" && !Number.isNaN(t) && t >= 0 ? t : void 0;
|
|
1381
1381
|
}, "expected a non-negative count, \"infinite\", or Infinity");
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1384
|
-
if (
|
|
1385
|
-
let t = typeof e == "string" ?
|
|
1383
|
+
function nr(e) {
|
|
1384
|
+
if (e != null) return n("duration", e, (e) => {
|
|
1385
|
+
let t = typeof e == "string" ? $n(e) : e;
|
|
1386
1386
|
return typeof t == "number" && isFinite(t) && t > 0 ? t : void 0;
|
|
1387
1387
|
}, "expected a positive duration in milliseconds or a CSS time string");
|
|
1388
1388
|
}
|
|
1389
|
-
function
|
|
1390
|
-
return
|
|
1391
|
-
let t = typeof e == "string" ?
|
|
1389
|
+
function rr(e) {
|
|
1390
|
+
return e == null ? E.delay : n("delay", e, (e) => {
|
|
1391
|
+
let t = typeof e == "string" ? $n(e) : e;
|
|
1392
1392
|
return typeof t == "number" && isFinite(t) ? t : void 0;
|
|
1393
1393
|
}, "expected a delay in milliseconds or a CSS time string");
|
|
1394
1394
|
}
|
|
1395
|
-
function
|
|
1396
|
-
if (e == null) return
|
|
1397
|
-
if (!
|
|
1395
|
+
function ir(e) {
|
|
1396
|
+
if (e == null) return E.direction;
|
|
1397
|
+
if (!Pe.includes(e)) throw new t("direction", e, `expected one of: ${Pe.join(", ")}`);
|
|
1398
1398
|
return e;
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1401
|
-
if (e == null) return
|
|
1402
|
-
if (!
|
|
1400
|
+
function ar(e) {
|
|
1401
|
+
if (e == null) return E.fillMode;
|
|
1402
|
+
if (!Fe.includes(e)) throw new t("fillMode", e, `expected one of: ${Fe.join(", ")}`);
|
|
1403
1403
|
return e;
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1406
|
-
if (
|
|
1407
|
-
if (typeof
|
|
1408
|
-
return
|
|
1405
|
+
function or(e, n) {
|
|
1406
|
+
if (n == null) return E[e];
|
|
1407
|
+
if (typeof n != "boolean") throw new t(e, n, "expected a boolean");
|
|
1408
|
+
return n;
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1411
|
-
if (e == null) return
|
|
1412
|
-
if (!
|
|
1410
|
+
function sr(e) {
|
|
1411
|
+
if (e == null) return E.colorSpace;
|
|
1412
|
+
if (!Ie.includes(e)) throw new t("colorSpace", e, `expected one of: ${Ie.join(", ")}`);
|
|
1413
1413
|
return e;
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1415
|
+
function cr(e) {
|
|
1416
1416
|
if (e != null) {
|
|
1417
|
-
if (!
|
|
1417
|
+
if (!Le.includes(e)) throw new t("hueMethod", e, `expected one of: ${Le.join(", ")}`);
|
|
1418
1418
|
return e;
|
|
1419
1419
|
}
|
|
1420
1420
|
}
|
|
1421
1421
|
//#endregion
|
|
1422
1422
|
//#region src/animation/engine/option-setters.ts
|
|
1423
|
-
function
|
|
1424
|
-
let n = e.options.timingFunction, r =
|
|
1423
|
+
function lr(e, t) {
|
|
1424
|
+
let n = e.options.timingFunction, r = er(t);
|
|
1425
1425
|
if (e.options.timingFunction = r, r !== n) {
|
|
1426
1426
|
for (let t of e.templateFrames) t.timingFunction === n && (t.timingFunction = r);
|
|
1427
1427
|
for (let t of e.frames) t.timingFunction === n && (t.timingFunction = r);
|
|
1428
1428
|
}
|
|
1429
1429
|
}
|
|
1430
|
-
function
|
|
1431
|
-
e.options.iterationCount =
|
|
1430
|
+
function ur(e, t) {
|
|
1431
|
+
e.options.iterationCount = tr(t);
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1433
|
+
function dr(e, t, n) {
|
|
1434
1434
|
n === void 0 ? delete e[t] : e[t] = n;
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1437
|
-
let r =
|
|
1436
|
+
function fr(e, t, n) {
|
|
1437
|
+
let r = nr(t);
|
|
1438
1438
|
if (r === void 0) return;
|
|
1439
1439
|
let i = r / e.options.duration;
|
|
1440
1440
|
for (let t = 0; t < e.frames.length; t++) {
|
|
1441
1441
|
let n = e.frames[t];
|
|
1442
1442
|
n.time.start *= i, n.time.stop *= i;
|
|
1443
1443
|
}
|
|
1444
|
-
e.options.duration = r,
|
|
1445
|
-
}
|
|
1446
|
-
function fr(e, t, n) {
|
|
1447
|
-
e.options.delay = nr(t), ur(e.options, "delayUnit", t == null ? void 0 : n);
|
|
1444
|
+
e.options.duration = r, dr(e.options, "durationUnit", n);
|
|
1448
1445
|
}
|
|
1449
|
-
function pr(e, t) {
|
|
1450
|
-
e.options.
|
|
1446
|
+
function pr(e, t, n) {
|
|
1447
|
+
e.options.delay = rr(t), dr(e.options, "delayUnit", t == null ? void 0 : n);
|
|
1451
1448
|
}
|
|
1452
1449
|
function mr(e, t) {
|
|
1453
|
-
e.options.
|
|
1450
|
+
e.options.direction = ir(t), e._playback.reversed = Gt(e.options.direction, e._playback.iteration);
|
|
1454
1451
|
}
|
|
1455
1452
|
function hr(e, t) {
|
|
1456
|
-
e.options.
|
|
1453
|
+
e.options.fillMode = ar(t);
|
|
1457
1454
|
}
|
|
1458
1455
|
function gr(e, t) {
|
|
1459
|
-
e.options.
|
|
1456
|
+
e.options.useWAAPI = or("useWAAPI", t);
|
|
1460
1457
|
}
|
|
1461
1458
|
function _r(e, t) {
|
|
1462
|
-
e.options.
|
|
1459
|
+
e.options.respectReducedMotion = or("respectReducedMotion", t);
|
|
1463
1460
|
}
|
|
1464
1461
|
function vr(e, t) {
|
|
1465
|
-
|
|
1466
|
-
n !== void 0 && (e.options.hueMethod = n, e.frames.length > 0 && M(e).renormalizeColors());
|
|
1462
|
+
e.options.colorSpace = sr(t), e.frames.length > 0 && M(e).renormalizeColors();
|
|
1467
1463
|
}
|
|
1468
1464
|
function yr(e, t) {
|
|
1469
|
-
|
|
1465
|
+
let n = cr(t);
|
|
1466
|
+
n !== void 0 && (e.options.hueMethod = n, e.frames.length > 0 && M(e).renormalizeColors());
|
|
1470
1467
|
}
|
|
1471
1468
|
function br(e, t) {
|
|
1472
|
-
|
|
1469
|
+
t !== void 0 && (e.options.composite = t);
|
|
1470
|
+
}
|
|
1471
|
+
function xr(e, t) {
|
|
1472
|
+
lr(e, t.timingFunction), fr(e, t.duration, t.durationUnit), ur(e, t.iterationCount), pr(e, t.delay, t.delayUnit), mr(e, t.direction), hr(e, t.fillMode), gr(e, t.useWAAPI), _r(e, t.respectReducedMotion), vr(e, t.colorSpace), yr(e, t.hueMethod), br(e, t.composite);
|
|
1473
1473
|
}
|
|
1474
1474
|
//#endregion
|
|
1475
1475
|
//#region src/animation/engine/compile-bridge.ts
|
|
1476
|
-
function xr(e) {
|
|
1477
|
-
M(e).parse(e.targets), Cr(e), Sr(e);
|
|
1478
|
-
}
|
|
1479
1476
|
function Sr(e) {
|
|
1480
|
-
e.
|
|
1477
|
+
M(e).parse(e.targets), wr(e), Cr(e);
|
|
1481
1478
|
}
|
|
1482
1479
|
function Cr(e) {
|
|
1480
|
+
e._hasComposition = zn(e.frames), Bn(e._compositionBase, e._compositionFallbackSeen, e._compositionPose);
|
|
1481
|
+
}
|
|
1482
|
+
function wr(e) {
|
|
1483
1483
|
let t = /* @__PURE__ */ new Set();
|
|
1484
1484
|
for (let n of e.frames) for (let e in n.flatVars) t.add(e);
|
|
1485
1485
|
e._stableKeys = [...t];
|
|
1486
1486
|
}
|
|
1487
|
-
function
|
|
1487
|
+
function Tr(e) {
|
|
1488
1488
|
let t;
|
|
1489
1489
|
for (let n of e.frames) {
|
|
1490
1490
|
let r = n.transform;
|
|
1491
1491
|
if (e.usesDefaultRenderer(r)) t ??= r;
|
|
1492
|
-
else if (r !==
|
|
1492
|
+
else if (r !== T) return {
|
|
1493
1493
|
declared: r,
|
|
1494
1494
|
own: r
|
|
1495
1495
|
};
|
|
@@ -1499,9 +1499,9 @@ function wr(e) {
|
|
|
1499
1499
|
own: t
|
|
1500
1500
|
};
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1503
|
-
let n =
|
|
1504
|
-
|
|
1502
|
+
function Er(e, t) {
|
|
1503
|
+
let n = Tr(e), r = Tr(t).declared, i = M(t);
|
|
1504
|
+
Ut(e, i), e.options = i.options;
|
|
1505
1505
|
let a = r === void 0 ? n.own : void 0;
|
|
1506
1506
|
if (a !== void 0) {
|
|
1507
1507
|
for (let t of e.templateFrames) t.transform = a;
|
|
@@ -1510,32 +1510,32 @@ function Tr(e, t) {
|
|
|
1510
1510
|
(a === void 0 || n.declared === void 0) && (e.unflatten = t.unflatten);
|
|
1511
1511
|
let o = e.targets[0], s = e.frames;
|
|
1512
1512
|
for (let e of s) for (let t of Object.values(e.interpVars)) for (let e of t.slots) O(e, o);
|
|
1513
|
-
|
|
1513
|
+
wr(e), Cr(e);
|
|
1514
1514
|
}
|
|
1515
1515
|
//#endregion
|
|
1516
1516
|
//#region src/animation/resolve/env.ts
|
|
1517
|
-
var
|
|
1517
|
+
var Dr = () => {
|
|
1518
1518
|
let e = typeof globalThis < "u" && typeof globalThis.CSS?.supports == "function", t = typeof globalThis < "u" && typeof globalThis.matchMedia == "function";
|
|
1519
1519
|
return {
|
|
1520
1520
|
supports: e ? (e) => globalThis.CSS.supports(e) : () => !1,
|
|
1521
1521
|
matchMedia: t ? (e) => globalThis.matchMedia(e) : () => ({ matches: !1 })
|
|
1522
1522
|
};
|
|
1523
|
-
},
|
|
1523
|
+
}, Or = (e, t, n) => {
|
|
1524
1524
|
let r = {
|
|
1525
1525
|
functions: e,
|
|
1526
1526
|
env: {
|
|
1527
|
-
...
|
|
1527
|
+
...Dr(),
|
|
1528
1528
|
...t
|
|
1529
1529
|
},
|
|
1530
1530
|
seen: /* @__PURE__ */ new Set(),
|
|
1531
1531
|
depth: 0
|
|
1532
1532
|
};
|
|
1533
1533
|
return n !== void 0 && (r.diagnostics = n), r;
|
|
1534
|
-
}, L = Symbol("kf.resolve.drop"),
|
|
1534
|
+
}, L = Symbol("kf.resolve.drop"), kr = (e, t) => {
|
|
1535
1535
|
if (t.syntax === void 0) return e;
|
|
1536
|
-
let n =
|
|
1536
|
+
let n = ke(y(e), t.syntax);
|
|
1537
1537
|
return n.ok ? n.value : t.default ?? L;
|
|
1538
|
-
},
|
|
1538
|
+
}, Ar = (e) => {
|
|
1539
1539
|
if (e.kind !== "call" || e.name !== "var") return;
|
|
1540
1540
|
let t = e.args[0];
|
|
1541
1541
|
if (t?.kind === "scalar" && t.payload.type === "keyword") return t.payload.value;
|
|
@@ -1543,21 +1543,21 @@ var Er = () => {
|
|
|
1543
1543
|
let e = t.items[0];
|
|
1544
1544
|
if (e?.kind === "scalar" && e.payload.type === "keyword") return e.payload.value;
|
|
1545
1545
|
}
|
|
1546
|
-
},
|
|
1546
|
+
}, jr = (e, t) => Object.freeze({
|
|
1547
1547
|
kind: "call",
|
|
1548
1548
|
name: e.name,
|
|
1549
1549
|
args: Object.freeze(t)
|
|
1550
|
-
}),
|
|
1550
|
+
}), Mr = (e, t) => Object.freeze({
|
|
1551
1551
|
kind: "list",
|
|
1552
1552
|
separator: e.separator,
|
|
1553
1553
|
items: Object.freeze(t)
|
|
1554
|
-
}),
|
|
1555
|
-
let n =
|
|
1554
|
+
}), Nr = (e, t) => {
|
|
1555
|
+
let n = Ar(e);
|
|
1556
1556
|
if (n !== void 0) return t.get(n) ?? e;
|
|
1557
1557
|
if (e.kind === "scalar") return e;
|
|
1558
|
-
let r = e.kind === "call" ? e.args : e.items, i = r.map((e) =>
|
|
1559
|
-
return i.every((e, t) => e === r[t]) ? e : e.kind === "call" ?
|
|
1560
|
-
},
|
|
1558
|
+
let r = e.kind === "call" ? e.args : e.items, i = r.map((e) => Nr(e, t));
|
|
1559
|
+
return i.every((e, t) => e === r[t]) ? e : e.kind === "call" ? jr(e, i) : Mr(e, i);
|
|
1560
|
+
}, Pr = (e, t, n) => {
|
|
1561
1561
|
if (t.seen.has(e.name)) return L;
|
|
1562
1562
|
let r = t.functions.get(e.name);
|
|
1563
1563
|
if (r?.result === void 0) return L;
|
|
@@ -1565,7 +1565,7 @@ var Er = () => {
|
|
|
1565
1565
|
if (e.args.length > i.length) return L;
|
|
1566
1566
|
let a = /* @__PURE__ */ new Map();
|
|
1567
1567
|
for (let n = 0; n < i.length; n++) {
|
|
1568
|
-
let r = i[n], o = e.args[n], s = o === void 0 ? r.default ?? L :
|
|
1568
|
+
let r = i[n], o = e.args[n], s = o === void 0 ? r.default ?? L : kr(o, r);
|
|
1569
1569
|
if (s === L) return t.diagnostics?.push({
|
|
1570
1570
|
code: "CUSTOM_FN_ARG_DROP",
|
|
1571
1571
|
property: r.name,
|
|
@@ -1573,7 +1573,7 @@ var Er = () => {
|
|
|
1573
1573
|
}), L;
|
|
1574
1574
|
a.set(r.name, s);
|
|
1575
1575
|
}
|
|
1576
|
-
let o =
|
|
1576
|
+
let o = Nr(r.result, a);
|
|
1577
1577
|
t.seen.add(e.name);
|
|
1578
1578
|
try {
|
|
1579
1579
|
return n(o, {
|
|
@@ -1583,20 +1583,20 @@ var Er = () => {
|
|
|
1583
1583
|
} finally {
|
|
1584
1584
|
t.seen.delete(e.name);
|
|
1585
1585
|
}
|
|
1586
|
-
}, R = (e, t) => e.kind === "scalar" && e.payload.type === "keyword" && e.payload.value.toLowerCase() === t,
|
|
1586
|
+
}, R = (e, t) => e.kind === "scalar" && e.payload.type === "keyword" && e.payload.value.toLowerCase() === t, Fr = (e) => {
|
|
1587
1587
|
if (e.length !== 0) return e.length === 1 ? e[0] : Object.freeze({
|
|
1588
1588
|
kind: "list",
|
|
1589
1589
|
separator: "space",
|
|
1590
1590
|
items: Object.freeze([...e])
|
|
1591
1591
|
});
|
|
1592
|
-
},
|
|
1592
|
+
}, Ir = (e) => {
|
|
1593
1593
|
let t = [[]];
|
|
1594
1594
|
for (let n of e.items) R(n, ";") ? t.push([]) : t.at(-1).push(n);
|
|
1595
1595
|
let n = [];
|
|
1596
1596
|
for (let e of t) {
|
|
1597
1597
|
let t = e.findIndex((e) => R(e, ":"));
|
|
1598
1598
|
if (t < 0) continue;
|
|
1599
|
-
let r =
|
|
1599
|
+
let r = Fr(e.slice(0, t)), i = Fr(e.slice(t + 1));
|
|
1600
1600
|
r === void 0 || i === void 0 || n.push(Object.freeze({
|
|
1601
1601
|
condition: r,
|
|
1602
1602
|
consequent: i,
|
|
@@ -1604,8 +1604,8 @@ var Er = () => {
|
|
|
1604
1604
|
}));
|
|
1605
1605
|
}
|
|
1606
1606
|
return Object.freeze(n);
|
|
1607
|
-
},
|
|
1608
|
-
if (e.args.length === 1 && e.args[0]?.kind === "list") return
|
|
1607
|
+
}, Lr = (e) => {
|
|
1608
|
+
if (e.args.length === 1 && e.args[0]?.kind === "list") return Ir(e.args[0]);
|
|
1609
1609
|
let t = e.args[0], n = e.args[1];
|
|
1610
1610
|
if (t === void 0 || n === void 0) return [];
|
|
1611
1611
|
let r = [Object.freeze({
|
|
@@ -1624,7 +1624,7 @@ var Er = () => {
|
|
|
1624
1624
|
consequent: i,
|
|
1625
1625
|
fallback: !0
|
|
1626
1626
|
})), Object.freeze(r);
|
|
1627
|
-
},
|
|
1627
|
+
}, Rr = (e) => e.args.map(y).join(", "), zr = (e, t) => {
|
|
1628
1628
|
let n = e.args[0];
|
|
1629
1629
|
if (n === void 0) return !1;
|
|
1630
1630
|
if (n.kind === "scalar" && n.payload.type === "keyword") return t(n.payload.value) !== void 0;
|
|
@@ -1634,45 +1634,45 @@ var Er = () => {
|
|
|
1634
1634
|
let a = t(i.payload.value);
|
|
1635
1635
|
if (a === void 0) return !1;
|
|
1636
1636
|
if (r < 0) return !0;
|
|
1637
|
-
let o =
|
|
1637
|
+
let o = Fr(n.items.slice(r + 1));
|
|
1638
1638
|
if (o === void 0) return !1;
|
|
1639
1639
|
let s = (e) => e.trim().replace(/\s+/g, " ");
|
|
1640
1640
|
return s(a) === s(y(o));
|
|
1641
|
-
},
|
|
1641
|
+
}, Br = (e, t) => {
|
|
1642
1642
|
if (R(e, "else")) return !0;
|
|
1643
1643
|
if (e.kind !== "call") return !1;
|
|
1644
|
-
if (e.name === "supports") return t.env.supports?.(
|
|
1645
|
-
if (e.name === "media") return t.env.matchMedia?.(
|
|
1644
|
+
if (e.name === "supports") return t.env.supports?.(Rr(e)) ?? !1;
|
|
1645
|
+
if (e.name === "media") return t.env.matchMedia?.(Rr(e))?.matches ?? !1;
|
|
1646
1646
|
if (e.name === "style") {
|
|
1647
1647
|
let n = t.env.customProps;
|
|
1648
|
-
return n === void 0 ? void 0 :
|
|
1648
|
+
return n === void 0 ? void 0 : zr(e, n);
|
|
1649
1649
|
}
|
|
1650
1650
|
return !1;
|
|
1651
|
-
},
|
|
1652
|
-
let r =
|
|
1651
|
+
}, Vr = (e, t, n) => {
|
|
1652
|
+
let r = Lr(e);
|
|
1653
1653
|
if (r.length === 0) return L;
|
|
1654
1654
|
for (let i of r) {
|
|
1655
|
-
let r = i.fallback ? !0 :
|
|
1655
|
+
let r = i.fallback ? !0 : Br(i.condition, t);
|
|
1656
1656
|
if (r === void 0) return e;
|
|
1657
1657
|
if (r) return n(i.consequent, t);
|
|
1658
1658
|
}
|
|
1659
1659
|
return L;
|
|
1660
|
-
},
|
|
1660
|
+
}, Hr = (e) => e.name === "if" && Lr(e).some((e) => e.condition.kind === "call" && e.condition.name === "style"), Ur = 32, Wr = (e) => Object.freeze({
|
|
1661
1661
|
kind: "scalar",
|
|
1662
1662
|
payload: Object.freeze({
|
|
1663
1663
|
type: "number",
|
|
1664
1664
|
value: e,
|
|
1665
1665
|
unit: ""
|
|
1666
1666
|
})
|
|
1667
|
-
}),
|
|
1667
|
+
}), Gr = (e, t) => Object.freeze({
|
|
1668
1668
|
kind: "call",
|
|
1669
1669
|
name: e.name,
|
|
1670
1670
|
args: Object.freeze(t)
|
|
1671
|
-
}),
|
|
1671
|
+
}), Kr = (e, t) => Object.freeze({
|
|
1672
1672
|
kind: "list",
|
|
1673
1673
|
separator: e.separator,
|
|
1674
1674
|
items: Object.freeze(t)
|
|
1675
|
-
}),
|
|
1675
|
+
}), qr = (e, t) => {
|
|
1676
1676
|
let n = [], r = !1;
|
|
1677
1677
|
for (let i of e) {
|
|
1678
1678
|
let e = z(i, {
|
|
@@ -1687,41 +1687,41 @@ var Er = () => {
|
|
|
1687
1687
|
}
|
|
1688
1688
|
return r ? Object.freeze(n) : e;
|
|
1689
1689
|
}, z = (e, t) => {
|
|
1690
|
-
if (t.depth >
|
|
1690
|
+
if (t.depth > Ur) return L;
|
|
1691
1691
|
if (e.kind === "scalar") return e;
|
|
1692
1692
|
if (e.kind === "list") {
|
|
1693
|
-
let n =
|
|
1694
|
-
return n === L ? L : n === e.items ? e :
|
|
1693
|
+
let n = qr(e.items, t);
|
|
1694
|
+
return n === L ? L : n === e.items ? e : Kr(e, n);
|
|
1695
1695
|
}
|
|
1696
|
-
if (e.name === "if") return
|
|
1696
|
+
if (e.name === "if") return Vr(e, {
|
|
1697
1697
|
...t,
|
|
1698
1698
|
depth: t.depth + 1
|
|
1699
1699
|
}, z);
|
|
1700
1700
|
if (e.name === "sibling-index") {
|
|
1701
1701
|
let n = t.env.siblingIndex;
|
|
1702
|
-
return n === void 0 ? e :
|
|
1702
|
+
return n === void 0 ? e : Wr(n());
|
|
1703
1703
|
}
|
|
1704
1704
|
if (e.name === "sibling-count") {
|
|
1705
1705
|
let n = t.env.siblingCount;
|
|
1706
|
-
return n === void 0 ? e :
|
|
1706
|
+
return n === void 0 ? e : Wr(n());
|
|
1707
1707
|
}
|
|
1708
|
-
if (e.name.startsWith("--") && t.functions.has(e.name)) return
|
|
1709
|
-
let n =
|
|
1710
|
-
return n === L ? L : n === e.args ? e :
|
|
1711
|
-
},
|
|
1708
|
+
if (e.name.startsWith("--") && t.functions.has(e.name)) return Pr(e, t, z);
|
|
1709
|
+
let n = qr(e.args, t);
|
|
1710
|
+
return n === L ? L : n === e.args ? e : Gr(e, n);
|
|
1711
|
+
}, Jr = (e, t) => z(e, t), Yr = (e) => {
|
|
1712
1712
|
if (typeof e != "object" || !e || !("kind" in e)) return !1;
|
|
1713
1713
|
let t = e;
|
|
1714
|
-
return t.kind === "scalar" ? !1 : t.kind === "list" ? t.items.some(
|
|
1714
|
+
return t.kind === "scalar" ? !1 : t.kind === "list" ? t.items.some(Yr) : t.name === "if" || t.name === "spring" || t.name === "sibling-index" || t.name === "sibling-count" || t.name.startsWith("--") ? !0 : t.args.some(Yr);
|
|
1715
1715
|
}, B = (e) => {
|
|
1716
1716
|
if (typeof e != "object" || !e || !("kind" in e)) return !1;
|
|
1717
1717
|
let t = e;
|
|
1718
|
-
return t.kind === "scalar" ? !1 : t.kind === "list" ? t.items.some(B) : t.name === "sibling-index" || t.name === "sibling-count" ||
|
|
1718
|
+
return t.kind === "scalar" ? !1 : t.kind === "list" ? t.items.some(B) : t.name === "sibling-index" || t.name === "sibling-count" || Hr(t) ? !0 : t.args.some(B);
|
|
1719
1719
|
}, V = {
|
|
1720
1720
|
mass: 1,
|
|
1721
1721
|
stiffness: 100,
|
|
1722
1722
|
damping: 10,
|
|
1723
1723
|
velocity: 0
|
|
1724
|
-
},
|
|
1724
|
+
}, Xr = (e) => {
|
|
1725
1725
|
let t = (t, n) => {
|
|
1726
1726
|
let r = e[t];
|
|
1727
1727
|
return typeof r == "number" && Number.isFinite(r) ? r : n;
|
|
@@ -1734,7 +1734,7 @@ var Er = () => {
|
|
|
1734
1734
|
};
|
|
1735
1735
|
//#endregion
|
|
1736
1736
|
//#region src/animation/resolve/element-resolve.ts
|
|
1737
|
-
function
|
|
1737
|
+
function Zr(e) {
|
|
1738
1738
|
let t = e.templateFrames, n = !1;
|
|
1739
1739
|
for (let e of t) {
|
|
1740
1740
|
let t = e.vars;
|
|
@@ -1745,15 +1745,15 @@ function Xr(e) {
|
|
|
1745
1745
|
if (n) break;
|
|
1746
1746
|
}
|
|
1747
1747
|
if (!n) return !1;
|
|
1748
|
-
let r =
|
|
1748
|
+
let r = ei(e);
|
|
1749
1749
|
if (r === void 0) return !1;
|
|
1750
|
-
let i =
|
|
1750
|
+
let i = Or(/* @__PURE__ */ new Map(), r), a = !1;
|
|
1751
1751
|
for (let e of t) {
|
|
1752
1752
|
let t = e.vars;
|
|
1753
1753
|
for (let e in t) {
|
|
1754
1754
|
let n = t[e];
|
|
1755
|
-
if (
|
|
1756
|
-
let r =
|
|
1755
|
+
if (!$r(n) || !B(n)) continue;
|
|
1756
|
+
let r = Jr(n, i);
|
|
1757
1757
|
if (r === L) {
|
|
1758
1758
|
delete t[e], a = !0;
|
|
1759
1759
|
continue;
|
|
@@ -1763,13 +1763,13 @@ function Xr(e) {
|
|
|
1763
1763
|
}
|
|
1764
1764
|
return a ? (e.parse(), !0) : !1;
|
|
1765
1765
|
}
|
|
1766
|
-
function
|
|
1767
|
-
if (
|
|
1766
|
+
function Qr(e) {
|
|
1767
|
+
if (Zr(e)) return;
|
|
1768
1768
|
let t = e.targets[0], n = e.frames;
|
|
1769
1769
|
for (let e of n) for (let n of Object.values(e.interpVars)) for (let e of n.slots) O(e, t);
|
|
1770
1770
|
}
|
|
1771
|
-
var
|
|
1772
|
-
function
|
|
1771
|
+
var $r = (e) => typeof e == "object" && !!e && "kind" in e && (e.kind === "scalar" || e.kind === "call" || e.kind === "list");
|
|
1772
|
+
function ei(e) {
|
|
1773
1773
|
let t = e.targets[0];
|
|
1774
1774
|
if (t == null) return;
|
|
1775
1775
|
let n = { customProps: (e) => {
|
|
@@ -1780,13 +1780,13 @@ function $r(e) {
|
|
|
1780
1780
|
}
|
|
1781
1781
|
//#endregion
|
|
1782
1782
|
//#region src/animation/internal/animation-id.ts
|
|
1783
|
-
var H = (e) => typeof e == "string" ? e : e.name ?? String(e.id),
|
|
1784
|
-
id =
|
|
1783
|
+
var H = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ti = 0, ni = class {
|
|
1784
|
+
id = ti++;
|
|
1785
1785
|
name;
|
|
1786
1786
|
superKey;
|
|
1787
1787
|
targets;
|
|
1788
1788
|
options;
|
|
1789
|
-
playback = new
|
|
1789
|
+
playback = new s();
|
|
1790
1790
|
_playback;
|
|
1791
1791
|
get startTime() {
|
|
1792
1792
|
return this._playback.startTime;
|
|
@@ -1849,16 +1849,16 @@ var H = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = c
|
|
|
1849
1849
|
get flatKeys() {
|
|
1850
1850
|
return this._stableKeys;
|
|
1851
1851
|
}
|
|
1852
|
-
_defaultTransform = (e) =>
|
|
1852
|
+
_defaultTransform = (e) => Ot(e, this.targets);
|
|
1853
1853
|
usesDefaultRenderer(e) {
|
|
1854
1854
|
return e === this._defaultTransform;
|
|
1855
1855
|
}
|
|
1856
1856
|
dispatchAnimationEvent(e) {
|
|
1857
|
-
|
|
1857
|
+
Wt(this, e);
|
|
1858
1858
|
}
|
|
1859
1859
|
constructor(e, t, n, r) {
|
|
1860
|
-
this.options = {},
|
|
1861
|
-
...
|
|
1860
|
+
this.options = {}, Ut(this, new Vt(this.options)), this._playback = new Rn(this._frame.bind(this)), this._ctorOptions = e ?? {}, this.setOptions({
|
|
1861
|
+
...E,
|
|
1862
1862
|
...this._ctorOptions
|
|
1863
1863
|
}), this.targets = t == null ? [] : Array.isArray(t) ? t : [t], this.name = n, this.superKey = r;
|
|
1864
1864
|
}
|
|
@@ -1885,49 +1885,49 @@ var H = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = c
|
|
|
1885
1885
|
return M(this).addFrame(e, t, n, r, i), this._compiled = !1, this;
|
|
1886
1886
|
}
|
|
1887
1887
|
parse() {
|
|
1888
|
-
return
|
|
1888
|
+
return Sr(this), this._compiled = !0, this;
|
|
1889
1889
|
}
|
|
1890
1890
|
adoptCompiled(e) {
|
|
1891
|
-
return
|
|
1891
|
+
return Er(this, e), this._compiled = e.compiled, this;
|
|
1892
1892
|
}
|
|
1893
1893
|
setTimingFunction(e) {
|
|
1894
|
-
return
|
|
1894
|
+
return lr(this, e), this;
|
|
1895
1895
|
}
|
|
1896
1896
|
setIterationCount(e) {
|
|
1897
|
-
return
|
|
1897
|
+
return ur(this, e), this;
|
|
1898
1898
|
}
|
|
1899
1899
|
setDuration(e) {
|
|
1900
|
-
return
|
|
1900
|
+
return fr(this, e), this;
|
|
1901
1901
|
}
|
|
1902
1902
|
setDelay(e) {
|
|
1903
|
-
return
|
|
1903
|
+
return pr(this, e), this;
|
|
1904
1904
|
}
|
|
1905
1905
|
setDirection(e) {
|
|
1906
|
-
return
|
|
1906
|
+
return mr(this, e), this;
|
|
1907
1907
|
}
|
|
1908
1908
|
setFillMode(e) {
|
|
1909
|
-
return
|
|
1909
|
+
return hr(this, e), this;
|
|
1910
1910
|
}
|
|
1911
1911
|
setUseWAAPI(e) {
|
|
1912
|
-
return
|
|
1912
|
+
return gr(this, e), this;
|
|
1913
1913
|
}
|
|
1914
1914
|
setRespectReducedMotion(e) {
|
|
1915
|
-
return
|
|
1915
|
+
return _r(this, e), this;
|
|
1916
1916
|
}
|
|
1917
1917
|
setColorSpace(e) {
|
|
1918
|
-
return
|
|
1918
|
+
return vr(this, e), this;
|
|
1919
1919
|
}
|
|
1920
1920
|
setHueMethod(e) {
|
|
1921
|
-
return
|
|
1921
|
+
return yr(this, e), this;
|
|
1922
1922
|
}
|
|
1923
1923
|
setComposite(e) {
|
|
1924
|
-
return
|
|
1924
|
+
return br(this, e), this;
|
|
1925
1925
|
}
|
|
1926
1926
|
setOptions(e) {
|
|
1927
|
-
return
|
|
1927
|
+
return xr(this, e), this;
|
|
1928
1928
|
}
|
|
1929
1929
|
reverse() {
|
|
1930
|
-
return
|
|
1930
|
+
return Kt(this), this;
|
|
1931
1931
|
}
|
|
1932
1932
|
fillForwards() {
|
|
1933
1933
|
this.interpFrames(this.options.duration, !0);
|
|
@@ -1936,95 +1936,95 @@ var H = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = c
|
|
|
1936
1936
|
this.interpFrames(0, !0);
|
|
1937
1937
|
}
|
|
1938
1938
|
get restPosition() {
|
|
1939
|
-
return
|
|
1939
|
+
return Kn(this);
|
|
1940
1940
|
}
|
|
1941
1941
|
paintRest() {
|
|
1942
|
-
|
|
1942
|
+
qn(this);
|
|
1943
1943
|
}
|
|
1944
1944
|
assertNoUnresolvedNamedSelector() {
|
|
1945
|
-
|
|
1945
|
+
Jn(this);
|
|
1946
1946
|
}
|
|
1947
1947
|
at(e, t = !1) {
|
|
1948
|
-
return
|
|
1948
|
+
return Yn(this, e, t);
|
|
1949
1949
|
}
|
|
1950
1950
|
interpFrames(e, t = !1, n) {
|
|
1951
1951
|
return I(this, e, t, n);
|
|
1952
1952
|
}
|
|
1953
1953
|
onStart() {
|
|
1954
|
-
|
|
1954
|
+
An(this);
|
|
1955
1955
|
}
|
|
1956
1956
|
onEnd() {
|
|
1957
|
-
|
|
1957
|
+
jn(this);
|
|
1958
1958
|
}
|
|
1959
1959
|
advanceTo(e) {
|
|
1960
|
-
return
|
|
1960
|
+
return Mn(this, e);
|
|
1961
1961
|
}
|
|
1962
1962
|
_frame(e) {
|
|
1963
|
-
return
|
|
1963
|
+
return In(this, e);
|
|
1964
1964
|
}
|
|
1965
1965
|
get finished() {
|
|
1966
1966
|
return this._playback._playingPromise ?? Promise.resolve();
|
|
1967
1967
|
}
|
|
1968
1968
|
async play() {
|
|
1969
|
-
return
|
|
1969
|
+
return On(this);
|
|
1970
1970
|
}
|
|
1971
1971
|
pause() {
|
|
1972
|
-
return
|
|
1972
|
+
return qt(this), this;
|
|
1973
1973
|
}
|
|
1974
1974
|
resume() {
|
|
1975
|
-
return
|
|
1975
|
+
return Jt(this), this;
|
|
1976
1976
|
}
|
|
1977
1977
|
toggle() {
|
|
1978
|
-
return
|
|
1978
|
+
return Yt(this);
|
|
1979
1979
|
}
|
|
1980
1980
|
stop() {
|
|
1981
|
-
|
|
1981
|
+
Xt(this);
|
|
1982
1982
|
}
|
|
1983
1983
|
playing() {
|
|
1984
|
-
return
|
|
1984
|
+
return Zt(this);
|
|
1985
1985
|
}
|
|
1986
1986
|
get effectiveT() {
|
|
1987
|
-
return
|
|
1987
|
+
return Qt(this);
|
|
1988
1988
|
}
|
|
1989
1989
|
settle() {
|
|
1990
1990
|
return N(this), this;
|
|
1991
1991
|
}
|
|
1992
1992
|
reset() {
|
|
1993
|
-
return
|
|
1993
|
+
return $t(this), this;
|
|
1994
1994
|
}
|
|
1995
1995
|
setTargets(...e) {
|
|
1996
|
-
return this.targets = e,
|
|
1996
|
+
return this.targets = e, Qr(this), this;
|
|
1997
1997
|
}
|
|
1998
|
-
},
|
|
1998
|
+
}, ri = (e, t) => {
|
|
1999
1999
|
let n = {};
|
|
2000
2000
|
for (let r of e.declarations) {
|
|
2001
2001
|
let e = r.value;
|
|
2002
|
-
if (
|
|
2003
|
-
let n =
|
|
2002
|
+
if (Yr(e)) {
|
|
2003
|
+
let n = Jr(e, t);
|
|
2004
2004
|
if (n === L) continue;
|
|
2005
2005
|
e = n;
|
|
2006
2006
|
}
|
|
2007
2007
|
n[r.name] = e;
|
|
2008
2008
|
}
|
|
2009
2009
|
return n;
|
|
2010
|
-
},
|
|
2010
|
+
}, ii = (e) => {
|
|
2011
2011
|
let t = [];
|
|
2012
2012
|
for (let n of e.selectors) n.kind === "percent" ? t.push(`${n.value * 100}%`) : t.push(n.offset === void 0 ? n.name : `${n.name} ${n.offset * 100}%`);
|
|
2013
2013
|
return t;
|
|
2014
|
-
}, ii = (e) => {
|
|
2015
|
-
let t = fe(e).filter((e) => e.path.length === 1), n = t[0]?.rule.name;
|
|
2016
|
-
return n === void 0 ? [] : t.filter((e) => e.rule.name === n).at(-1)?.rule.rules ?? [];
|
|
2017
2014
|
}, ai = (e) => {
|
|
2018
|
-
let t =
|
|
2015
|
+
let t = pe(e).filter((e) => e.path.length === 1), n = t[0]?.rule.name;
|
|
2016
|
+
return n === void 0 ? [] : t.filter((e) => e.rule.name === n).at(-1)?.rule.rules ?? [];
|
|
2017
|
+
}, oi = (e) => {
|
|
2018
|
+
let t = he(te(e), []);
|
|
2019
2019
|
return {
|
|
2020
2020
|
ast: t.value,
|
|
2021
2021
|
issues: t.issues
|
|
2022
2022
|
};
|
|
2023
|
-
},
|
|
2023
|
+
}, si = (e) => {
|
|
2024
2024
|
let t = /* @__PURE__ */ new Map();
|
|
2025
2025
|
for (let n of e) n.path.length === 1 && t.set(n.rule.name, n.rule.descriptor);
|
|
2026
2026
|
return t;
|
|
2027
|
-
},
|
|
2027
|
+
}, ci = (e) => ie(e).filter((e) => e.path.length === 1).at(-1)?.rule.declarations ?? [], li = (e, t) => {
|
|
2028
2028
|
let n = [], r = (e, t) => {
|
|
2029
2029
|
n.push({
|
|
2030
2030
|
code: e,
|
|
@@ -2033,16 +2033,16 @@ var H = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = c
|
|
|
2033
2033
|
});
|
|
2034
2034
|
}, i = [], a;
|
|
2035
2035
|
if (typeof e == "string") {
|
|
2036
|
-
let t =
|
|
2036
|
+
let t = oi(e);
|
|
2037
2037
|
a = t.ast, i = t.issues;
|
|
2038
2038
|
} else a = e;
|
|
2039
|
-
let o =
|
|
2039
|
+
let o = ai(a);
|
|
2040
2040
|
if (typeof e == "string" && o.length === 0 && e.trim()) {
|
|
2041
|
-
let t =
|
|
2042
|
-
|
|
2041
|
+
let t = oi(`@keyframes anonymous {\n${e.trim()}\n}`);
|
|
2042
|
+
ai(t.ast).length > 0 && (a = t.ast, i = t.issues, o = ai(a));
|
|
2043
2043
|
}
|
|
2044
2044
|
if (typeof e == "string") for (let t of i) r("PARSE_ERROR", {
|
|
2045
|
-
message:
|
|
2045
|
+
message: ve(t),
|
|
2046
2046
|
input: e,
|
|
2047
2047
|
start: t.start,
|
|
2048
2048
|
end: t.end,
|
|
@@ -2053,15 +2053,15 @@ var H = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = c
|
|
|
2053
2053
|
message: "the input is non-empty but parsed to zero @keyframes rules (no animatable stops) — the resulting animation has no frames",
|
|
2054
2054
|
input: e
|
|
2055
2055
|
});
|
|
2056
|
-
let s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u =
|
|
2056
|
+
let s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = si(ne(a)), d = Or(u, t, n);
|
|
2057
2057
|
for (let e of o) {
|
|
2058
|
-
let t =
|
|
2059
|
-
for (let n of
|
|
2058
|
+
let t = ri(e, d);
|
|
2059
|
+
for (let n of ii(e)) {
|
|
2060
2060
|
let r = s.get(n);
|
|
2061
2061
|
s.set(n, {
|
|
2062
2062
|
...r ?? {},
|
|
2063
2063
|
...t
|
|
2064
|
-
}), e.timingFunction != null && c.set(n,
|
|
2064
|
+
}), e.timingFunction != null && c.set(n, x(e.timingFunction));
|
|
2065
2065
|
let i = e.composition;
|
|
2066
2066
|
i != null && l.set(n, i);
|
|
2067
2067
|
}
|
|
@@ -2070,22 +2070,22 @@ var H = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = c
|
|
|
2070
2070
|
keyframes: s,
|
|
2071
2071
|
timingFunctions: c,
|
|
2072
2072
|
composition: l,
|
|
2073
|
-
properties:
|
|
2073
|
+
properties: si(ge(a)),
|
|
2074
2074
|
functions: u,
|
|
2075
|
-
options:
|
|
2075
|
+
options: le(ci(a)).at(0) ?? {},
|
|
2076
2076
|
diagnostics: n,
|
|
2077
2077
|
stylesheet: a
|
|
2078
2078
|
};
|
|
2079
|
-
},
|
|
2080
|
-
function
|
|
2079
|
+
}, ui = (e) => ie(e).at(-1)?.rule.declarations ?? [];
|
|
2080
|
+
function di(e) {
|
|
2081
2081
|
let t = {};
|
|
2082
|
-
return e.duration != null && (t.duration = e.duration * 1e3, e.durationUnit != null && (t.durationUnit = e.durationUnit)), e.timingFunction != null && (t.timingFunction =
|
|
2082
|
+
return e.duration != null && (t.duration = e.duration * 1e3, e.durationUnit != null && (t.durationUnit = e.durationUnit)), e.timingFunction != null && (t.timingFunction = x(e.timingFunction)), e.iterationCount !== void 0 && (t.iterationCount = e.iterationCount === null ? Infinity : e.iterationCount), e.direction != null && (t.direction = e.direction), e.delay != null && (t.delay = e.delay * 1e3, e.delayUnit != null && (t.delayUnit = e.delayUnit)), e.fillMode != null && (t.fillMode = e.fillMode), e.composition != null && (t.composite = e.composition), t;
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2085
|
-
let t =
|
|
2084
|
+
function fi(e) {
|
|
2085
|
+
let t = ue(ui(e));
|
|
2086
2086
|
return Object.keys(t).length > 0 ? t : void 0;
|
|
2087
2087
|
}
|
|
2088
|
-
function
|
|
2088
|
+
function pi(e, t) {
|
|
2089
2089
|
if (!(typeof CSS > "u" || typeof CSS.registerProperty != "function")) for (let [n, r] of e) {
|
|
2090
2090
|
if (r.syntax == null) continue;
|
|
2091
2091
|
let e = {
|
|
@@ -2108,7 +2108,7 @@ function fi(e, t) {
|
|
|
2108
2108
|
}
|
|
2109
2109
|
//#endregion
|
|
2110
2110
|
//#region src/animation/engine/css/animation.ts
|
|
2111
|
-
var
|
|
2111
|
+
var mi = (e) => typeof e != "object" || !e ? !1 : typeof e.clone == "function", U = class extends ni {
|
|
2112
2112
|
constructor(e, ...t) {
|
|
2113
2113
|
super(e, t), this.unflatten = !1;
|
|
2114
2114
|
}
|
|
@@ -2116,15 +2116,15 @@ var pi = (e) => typeof e != "object" || !e ? !1 : typeof e.clone == "function",
|
|
|
2116
2116
|
let t = !1;
|
|
2117
2117
|
for (let e of this.templateFrames) e.start.kind === "named" && (e.start = {
|
|
2118
2118
|
kind: "percent",
|
|
2119
|
-
value:
|
|
2119
|
+
value: Lt(e.start)
|
|
2120
2120
|
}, t = !0);
|
|
2121
2121
|
return t && this.frames.length > 0 && this.parse(), this;
|
|
2122
2122
|
}
|
|
2123
|
-
|
|
2124
|
-
return this.unflatten = e != null, e ?? this._defaultTransform;
|
|
2123
|
+
beginIngest(e) {
|
|
2124
|
+
return this.templateFrames = [], this.unflatten = e != null, e ?? this._defaultTransform;
|
|
2125
2125
|
}
|
|
2126
2126
|
fromVars(e, t) {
|
|
2127
|
-
t = this.
|
|
2127
|
+
t = this.beginIngest(t);
|
|
2128
2128
|
for (let n = 0; n < e.length; n++) {
|
|
2129
2129
|
let r = e[n], i = Math.round(n / (e.length - 1) * 100);
|
|
2130
2130
|
this.addFrame(i, r, t);
|
|
@@ -2132,43 +2132,43 @@ var pi = (e) => typeof e != "object" || !e ? !1 : typeof e.clone == "function",
|
|
|
2132
2132
|
return this.parse(), this;
|
|
2133
2133
|
}
|
|
2134
2134
|
fromKeyframes(e, t) {
|
|
2135
|
-
t = this.
|
|
2135
|
+
t = this.beginIngest(t);
|
|
2136
2136
|
let n = e instanceof Map ? e : Object.entries(e);
|
|
2137
2137
|
for (let [e, r] of n) this.addFrame(e, r, t);
|
|
2138
2138
|
return this.parse(), this;
|
|
2139
2139
|
}
|
|
2140
2140
|
propertyRegistry = /* @__PURE__ */ new Map();
|
|
2141
2141
|
scrollOptions;
|
|
2142
|
-
fromString(
|
|
2143
|
-
n = this.
|
|
2144
|
-
let r =
|
|
2142
|
+
fromString(t, n) {
|
|
2143
|
+
n = this.beginIngest(n);
|
|
2144
|
+
let r = li(t);
|
|
2145
2145
|
this.propertyRegistry = r.properties;
|
|
2146
|
-
let i =
|
|
2146
|
+
let i = fi(r.stylesheet);
|
|
2147
2147
|
i === void 0 ? delete this.scrollOptions : this.scrollOptions = i, this.diagnostics = [...r.diagnostics];
|
|
2148
|
-
let a =
|
|
2148
|
+
let a = di(r.options);
|
|
2149
2149
|
Object.keys(a).length > 0 && this.setOptions({
|
|
2150
2150
|
...a,
|
|
2151
2151
|
...this._ctorOptions
|
|
2152
2152
|
});
|
|
2153
|
-
for (let [
|
|
2154
|
-
let a = Object.fromEntries(Object.entries(i).map(([e, t]) => [e,
|
|
2153
|
+
for (let [t, i] of r.keyframes.entries()) {
|
|
2154
|
+
let a = Object.fromEntries(Object.entries(i).map(([e, t]) => [e, mi(t) ? t.clone() : t])), o = r.timingFunctions.get(t), s = o ? _e(o) : void 0, c;
|
|
2155
2155
|
if (s) {
|
|
2156
|
-
let
|
|
2157
|
-
c =
|
|
2156
|
+
let t = o ? e(o) : void 0;
|
|
2157
|
+
c = t ? {
|
|
2158
2158
|
fn: s,
|
|
2159
|
-
css:
|
|
2159
|
+
css: t
|
|
2160
2160
|
} : { fn: s };
|
|
2161
2161
|
}
|
|
2162
|
-
let l = r.composition.get(
|
|
2163
|
-
this.addFrame(
|
|
2162
|
+
let l = r.composition.get(t);
|
|
2163
|
+
this.addFrame(t, a, n, c, l);
|
|
2164
2164
|
}
|
|
2165
|
-
return this.parse(),
|
|
2165
|
+
return this.parse(), pi(this.propertyRegistry, this.diagnostics), this;
|
|
2166
2166
|
}
|
|
2167
|
-
},
|
|
2168
|
-
let r =
|
|
2167
|
+
}, hi = (e) => typeof e == "string" ? e : H(e), gi = (e, t, n) => {
|
|
2168
|
+
let r = hi(t), i = e[r];
|
|
2169
2169
|
if (!i) throw Error(`AnimationGroup.${n}: no animation registered for key "${r}". Known keys: ${Object.keys(e).join(", ") || "(none)"}.`);
|
|
2170
2170
|
return i;
|
|
2171
|
-
},
|
|
2171
|
+
}, _i = (e) => {
|
|
2172
2172
|
let t = /* @__PURE__ */ new Set();
|
|
2173
2173
|
for (let n of e) {
|
|
2174
2174
|
if (!n.layer.enabled) continue;
|
|
@@ -2176,24 +2176,24 @@ var pi = (e) => typeof e != "object" || !e ? !1 : typeof e.clone == "function",
|
|
|
2176
2176
|
for (let r of n.animation.flatKeys) e && !e.has(r) || t.add(r);
|
|
2177
2177
|
}
|
|
2178
2178
|
return [...t];
|
|
2179
|
-
},
|
|
2179
|
+
}, vi = (e) => {
|
|
2180
2180
|
let t = !0;
|
|
2181
2181
|
for (let n of e) n.animation.interpFrames(n.animation.t, !0), t &&= n.animation.done;
|
|
2182
2182
|
return t;
|
|
2183
|
-
},
|
|
2183
|
+
}, yi = (e) => {
|
|
2184
2184
|
for (let t of e) {
|
|
2185
2185
|
let e = t.animation;
|
|
2186
2186
|
e.started = !0, e.t = e.options.duration, e.interpFrames(e.t, !0);
|
|
2187
2187
|
}
|
|
2188
|
-
},
|
|
2188
|
+
}, bi = (e, t) => {
|
|
2189
2189
|
for (let n of e) n.animation.paused = t;
|
|
2190
|
-
},
|
|
2190
|
+
}, W = (e) => e.op === "replace" && (e.weightSpring !== void 0 || e.weight !== 1), xi = (e) => {
|
|
2191
2191
|
let t = e.weightSpring?.value ?? e.weight;
|
|
2192
2192
|
return e.weightSpring ? t : Number.isFinite(t) ? Math.min(1, Math.max(0, t)) : 0;
|
|
2193
|
-
},
|
|
2193
|
+
}, Si = (e) => Number.isFinite(e) ? Math.min(1, Math.max(0, e)) : 0;
|
|
2194
2194
|
//#endregion
|
|
2195
2195
|
//#region src/animation/group/waapi.ts
|
|
2196
|
-
function
|
|
2196
|
+
function Ci(e) {
|
|
2197
2197
|
let t = e.getEntries();
|
|
2198
2198
|
if (!e.singleTarget || t.length === 0) return {
|
|
2199
2199
|
eligible: !1,
|
|
@@ -2213,7 +2213,7 @@ function xi(e) {
|
|
|
2213
2213
|
eligible: !1,
|
|
2214
2214
|
reason: "property-masked layer stays on rAF"
|
|
2215
2215
|
};
|
|
2216
|
-
if (
|
|
2216
|
+
if (W(e.layer) || e.layer.weightSpring) return {
|
|
2217
2217
|
eligible: !1,
|
|
2218
2218
|
reason: "weight-driven layer has no native composite equivalent"
|
|
2219
2219
|
};
|
|
@@ -2237,15 +2237,15 @@ function xi(e) {
|
|
|
2237
2237
|
entries: t
|
|
2238
2238
|
};
|
|
2239
2239
|
}
|
|
2240
|
-
function
|
|
2241
|
-
let t =
|
|
2240
|
+
function wi(e) {
|
|
2241
|
+
let t = Ci(e);
|
|
2242
2242
|
if (!t.eligible) return null;
|
|
2243
2243
|
let n = [];
|
|
2244
2244
|
try {
|
|
2245
2245
|
for (let e of t.entries) {
|
|
2246
2246
|
let r = e.layer.op;
|
|
2247
|
-
n.push(t.target.animate(
|
|
2248
|
-
...
|
|
2247
|
+
n.push(t.target.animate(gn(e.animation), {
|
|
2248
|
+
...xn(e.animation),
|
|
2249
2249
|
composite: r
|
|
2250
2250
|
}));
|
|
2251
2251
|
}
|
|
@@ -2259,40 +2259,40 @@ function Si(e) {
|
|
|
2259
2259
|
}
|
|
2260
2260
|
//#endregion
|
|
2261
2261
|
//#region src/animation/group/lifecycle.ts
|
|
2262
|
-
function
|
|
2262
|
+
function Ti(e) {
|
|
2263
2263
|
for (let t of e._waAnimations) try {
|
|
2264
2264
|
t.cancel?.();
|
|
2265
2265
|
} catch {}
|
|
2266
2266
|
e._waAnimations.length = 0, e._waapiDelegated = !1;
|
|
2267
2267
|
}
|
|
2268
|
-
function
|
|
2268
|
+
function Ei(e) {
|
|
2269
2269
|
for (let t of e._waAnimations) try {
|
|
2270
2270
|
t.pause?.();
|
|
2271
2271
|
} catch {}
|
|
2272
2272
|
}
|
|
2273
|
-
function
|
|
2273
|
+
function Di(e) {
|
|
2274
2274
|
for (let t of e._waAnimations) try {
|
|
2275
2275
|
t.play?.();
|
|
2276
2276
|
} catch {}
|
|
2277
2277
|
}
|
|
2278
|
-
function
|
|
2278
|
+
function Oi(e) {
|
|
2279
2279
|
let t = e.resolvePromise;
|
|
2280
2280
|
e.resolvePromise = null, t?.();
|
|
2281
2281
|
}
|
|
2282
|
-
async function
|
|
2283
|
-
return e._playingPromise && e.resolvePromise && !e.started && !e.paused && !e.playback.running && e.playback.loop(e._boundFrame),
|
|
2284
|
-
let t =
|
|
2282
|
+
async function ki(e) {
|
|
2283
|
+
return e._playingPromise && e.resolvePromise && !e.started && !e.paused && !e.playback.running && e.playback.loop(e._boundFrame), d(e, () => i(e.respectReducedMotion, () => Ai(e), () => {
|
|
2284
|
+
let t = wi(e);
|
|
2285
2285
|
return t && (e._waAnimations.push(...t), e._waapiDelegated = !0), new Promise((t) => {
|
|
2286
2286
|
e.resolvePromise = t, e.playback.loop(e._boundFrame);
|
|
2287
2287
|
});
|
|
2288
2288
|
}));
|
|
2289
2289
|
}
|
|
2290
|
-
function
|
|
2290
|
+
function Ai(e) {
|
|
2291
2291
|
e.started = !0;
|
|
2292
2292
|
let t = e.lastTickTime;
|
|
2293
|
-
return
|
|
2293
|
+
return yi(e.getEntries()), e.singleTarget && e.render(t), e.settle(), Promise.resolve();
|
|
2294
2294
|
}
|
|
2295
|
-
function
|
|
2295
|
+
function ji(e) {
|
|
2296
2296
|
if (!e.started || e.paused) return;
|
|
2297
2297
|
e.paused = !0;
|
|
2298
2298
|
let t = e.lastTickTime;
|
|
@@ -2300,64 +2300,64 @@ function ki(e) {
|
|
|
2300
2300
|
let e = n.animation;
|
|
2301
2301
|
e.pause(), e.pausedTime === 0 && (e.pausedTime = t);
|
|
2302
2302
|
}
|
|
2303
|
-
e.playback.stop(), e._waapiDelegated &&
|
|
2303
|
+
e.playback.stop(), e._waapiDelegated && Ei(e), e.render();
|
|
2304
2304
|
}
|
|
2305
|
-
function
|
|
2306
|
-
!e.started || !e.paused || (e.paused = !1,
|
|
2305
|
+
function Mi(e) {
|
|
2306
|
+
!e.started || !e.paused || (e.paused = !1, bi(e.getEntries(), !1), e._waapiDelegated && Di(e), e.playback.loop(e._boundFrame));
|
|
2307
2307
|
}
|
|
2308
|
-
function
|
|
2309
|
-
|
|
2308
|
+
function Ni(e) {
|
|
2309
|
+
c(e, () => ji(e), () => Mi(e));
|
|
2310
2310
|
}
|
|
2311
|
-
function
|
|
2312
|
-
e._waapiDelegated &&
|
|
2311
|
+
function Pi(e) {
|
|
2312
|
+
e._waapiDelegated && Ti(e);
|
|
2313
2313
|
for (let t of e.getEntries()) t.animation.managed = !1, t.animation.settle();
|
|
2314
2314
|
e.started = !1, e.done = !1, e.paused = !1, e.lastTickTime = 0;
|
|
2315
2315
|
}
|
|
2316
|
-
function
|
|
2316
|
+
function Fi(e) {
|
|
2317
2317
|
for (let t of e.getEntries()) {
|
|
2318
2318
|
let e = t.animation;
|
|
2319
2319
|
(e.started || e.t !== 0) && e.frames.length > 0 && e.interpFrames(0, !0);
|
|
2320
2320
|
}
|
|
2321
2321
|
e.settle();
|
|
2322
2322
|
}
|
|
2323
|
-
function
|
|
2324
|
-
e.playback.stop(), e.reset(),
|
|
2323
|
+
function Ii(e) {
|
|
2324
|
+
e.playback.stop(), e.reset(), Oi(e);
|
|
2325
2325
|
}
|
|
2326
|
-
function
|
|
2327
|
-
return
|
|
2326
|
+
function Li(e) {
|
|
2327
|
+
return m(e);
|
|
2328
2328
|
}
|
|
2329
2329
|
//#endregion
|
|
2330
2330
|
//#region src/animation/group/frame.ts
|
|
2331
|
-
function
|
|
2332
|
-
|
|
2331
|
+
function Ri(e, t) {
|
|
2332
|
+
Bi(e.getEntries(), t);
|
|
2333
2333
|
let n = e.advanceTo(t);
|
|
2334
|
-
return typeof n.then == "function" ? n.then(() =>
|
|
2334
|
+
return typeof n.then == "function" ? n.then(() => zi(e, t)) : zi(e, t);
|
|
2335
2335
|
}
|
|
2336
|
-
function
|
|
2337
|
-
return e.paused ? !1 : (e.done =
|
|
2336
|
+
function zi(e, t) {
|
|
2337
|
+
return e.paused ? !1 : (e.done = Vi(e.getEntries()), e.render(t), e.done ? (e.settle(), Oi(e), !1) : !0);
|
|
2338
2338
|
}
|
|
2339
|
-
function
|
|
2340
|
-
for (let n = 0; n < e.length; n++)
|
|
2339
|
+
function Bi(e, t) {
|
|
2340
|
+
for (let n = 0; n < e.length; n++) Pn(e[n].animation, t);
|
|
2341
2341
|
}
|
|
2342
|
-
function
|
|
2342
|
+
function Vi(e) {
|
|
2343
2343
|
for (let t = 0; t < e.length; t++) if (!e[t].animation.done) return !1;
|
|
2344
2344
|
return !0;
|
|
2345
2345
|
}
|
|
2346
2346
|
//#endregion
|
|
2347
2347
|
//#region src/animation/group/seek.ts
|
|
2348
|
-
function
|
|
2349
|
-
let n =
|
|
2348
|
+
function Hi(e, t) {
|
|
2349
|
+
let n = gi(e.animations, t, "elapsedOf").animation, { delay: r, duration: i } = n.options;
|
|
2350
2350
|
return Math.max(0, r) + n.iteration * Math.max(0, i) + n.t;
|
|
2351
2351
|
}
|
|
2352
|
-
function
|
|
2352
|
+
function Ui(e, t) {
|
|
2353
2353
|
for (let { animation: n } of Object.values(e.animations)) {
|
|
2354
2354
|
let { delay: r, duration: i, iterationCount: a, direction: o } = n.options, s = t - Math.max(0, r), c = 0, l = Math.min(0, s);
|
|
2355
|
-
i > 0 && s >= 0 && (c = Math.floor(s / i), l = s - c * i, c >= a && (c = Math.max(0, Math.ceil(a) - 1), l = i)), c !== n.iteration && (n.iteration = c, n.reversed =
|
|
2355
|
+
i > 0 && s >= 0 && (c = Math.floor(s / i), l = s - c * i, c >= a && (c = Math.max(0, Math.ceil(a) - 1), l = i)), c !== n.iteration && (n.iteration = c, n.reversed = Gt(o, c)), e.setChildTime(n, l);
|
|
2356
2356
|
}
|
|
2357
2357
|
}
|
|
2358
2358
|
//#endregion
|
|
2359
2359
|
//#region src/animation/group/render-observers.ts
|
|
2360
|
-
var
|
|
2360
|
+
var Wi = class {
|
|
2361
2361
|
listeners = [];
|
|
2362
2362
|
subscribe(e) {
|
|
2363
2363
|
return this.listeners.push(e), () => {
|
|
@@ -2369,39 +2369,39 @@ var Hi = class {
|
|
|
2369
2369
|
let t = this.listeners;
|
|
2370
2370
|
for (let n = 0; n < t.length; n++) t[n](e);
|
|
2371
2371
|
}
|
|
2372
|
-
},
|
|
2372
|
+
}, Gi = null, Ki = () => typeof MessageChannel == "function" ? () => new Promise((e) => {
|
|
2373
2373
|
let t = new MessageChannel();
|
|
2374
2374
|
t.port1.onmessage = () => {
|
|
2375
2375
|
t.port1.close(), e();
|
|
2376
2376
|
}, t.port2.postMessage(void 0);
|
|
2377
2377
|
}) : () => new Promise((e) => setTimeout(e, 0));
|
|
2378
|
-
function
|
|
2378
|
+
function qi() {
|
|
2379
2379
|
let e = globalThis.scheduler;
|
|
2380
|
-
return e && typeof e.yield == "function" ? e.yield() : (
|
|
2380
|
+
return e && typeof e.yield == "function" ? e.yield() : (Gi ??= Ki(), Gi());
|
|
2381
2381
|
}
|
|
2382
2382
|
//#endregion
|
|
2383
2383
|
//#region src/animation/group/yield-batch.ts
|
|
2384
|
-
var
|
|
2384
|
+
var Ji = (e, t) => {
|
|
2385
2385
|
for (let n = 0; n < e.length; n++) {
|
|
2386
2386
|
let r = e[n].animation;
|
|
2387
2387
|
r.done || r.paused && r.pausedTime !== 0 || r.advanceTo(t);
|
|
2388
2388
|
}
|
|
2389
|
-
},
|
|
2390
|
-
for (let r = 0; r < e.length; r += n)
|
|
2391
|
-
},
|
|
2392
|
-
let r = new
|
|
2389
|
+
}, Yi = async (e, t, n) => {
|
|
2390
|
+
for (let r = 0; r < e.length; r += n) Ji(e.slice(r, r + n), t), r + n < e.length && await qi();
|
|
2391
|
+
}, Xi = (e, t, n) => {
|
|
2392
|
+
let r = new p({
|
|
2393
2393
|
...n,
|
|
2394
2394
|
initial: e
|
|
2395
2395
|
});
|
|
2396
2396
|
return r.target = t, r;
|
|
2397
|
-
},
|
|
2397
|
+
}, Zi = (e, t) => {
|
|
2398
2398
|
let n = !1;
|
|
2399
2399
|
for (let r of e) {
|
|
2400
2400
|
let e = r.layer.weightSpring;
|
|
2401
2401
|
e !== void 0 && (t > 0 && e.tickDt(t), e.settled ? (r.layer.weight = e.value, delete r.layer.weightSpring) : n = !0);
|
|
2402
2402
|
}
|
|
2403
2403
|
return n;
|
|
2404
|
-
},
|
|
2404
|
+
}, Qi = class {
|
|
2405
2405
|
values = {};
|
|
2406
2406
|
keys = [];
|
|
2407
2407
|
epochs = Object.create(null);
|
|
@@ -2423,8 +2423,8 @@ var Ki = (e, t) => {
|
|
|
2423
2423
|
pruneInactive() {
|
|
2424
2424
|
for (let e of this.keys) this.epochs[e] !== this.epoch && (this.values[e] = void 0);
|
|
2425
2425
|
}
|
|
2426
|
-
},
|
|
2427
|
-
let e = new
|
|
2426
|
+
}, $i = () => {
|
|
2427
|
+
let e = new Qi();
|
|
2428
2428
|
return {
|
|
2429
2429
|
compositeState: e,
|
|
2430
2430
|
grouped: e.values,
|
|
@@ -2433,15 +2433,15 @@ var Ki = (e, t) => {
|
|
|
2433
2433
|
soaPlans: null,
|
|
2434
2434
|
compositeBuf: null
|
|
2435
2435
|
};
|
|
2436
|
-
},
|
|
2436
|
+
}, G = (e) => typeof e == "number", ea = (e, t) => {
|
|
2437
2437
|
let { carriers: n, incomingSlots: r } = t, i = n.length;
|
|
2438
2438
|
if (i !== 0) {
|
|
2439
2439
|
for (let t = 0; t < i; t++) e[t] = n[t].values[n[t].key];
|
|
2440
2440
|
if (t.weightBlend) {
|
|
2441
|
-
let n =
|
|
2441
|
+
let n = xi(t.layer);
|
|
2442
2442
|
for (let t = 0; t < i; t++) {
|
|
2443
2443
|
let i = r[t];
|
|
2444
|
-
e[t] =
|
|
2444
|
+
e[t] = C(e[t], i.values[i.key], n);
|
|
2445
2445
|
}
|
|
2446
2446
|
} else for (let t = 0; t < i; t++) {
|
|
2447
2447
|
let n = r[t];
|
|
@@ -2452,12 +2452,12 @@ var Ki = (e, t) => {
|
|
|
2452
2452
|
r.values[r.key] = e[t];
|
|
2453
2453
|
}
|
|
2454
2454
|
}
|
|
2455
|
-
},
|
|
2455
|
+
}, ta = (e, t, n) => {
|
|
2456
2456
|
let r = [], i = {}, a = 0;
|
|
2457
2457
|
for (let t of e) {
|
|
2458
2458
|
let { layer: e, values: o } = t;
|
|
2459
2459
|
if (!e.enabled) continue;
|
|
2460
|
-
let s = e.properties, c = e.op, l =
|
|
2460
|
+
let s = e.properties, c = e.op, l = W(e);
|
|
2461
2461
|
if (c === "replace" && !l) {
|
|
2462
2462
|
for (let e in o) s && !s.has(e) || o[e] !== void 0 && (i[e] = {
|
|
2463
2463
|
values: n,
|
|
@@ -2471,7 +2471,7 @@ var Ki = (e, t) => {
|
|
|
2471
2471
|
let t = o[e];
|
|
2472
2472
|
if (t === void 0) continue;
|
|
2473
2473
|
let r = i[e], a = r?.values[e];
|
|
2474
|
-
r !== void 0 &&
|
|
2474
|
+
r !== void 0 && G(a) && G(t) ? (u.push(r), d.push({
|
|
2475
2475
|
values: o,
|
|
2476
2476
|
key: e
|
|
2477
2477
|
})) : (f.add(e), i[e] = {
|
|
@@ -2492,10 +2492,10 @@ var Ki = (e, t) => {
|
|
|
2492
2492
|
plans: r,
|
|
2493
2493
|
compositeBuf: o
|
|
2494
2494
|
};
|
|
2495
|
-
},
|
|
2496
|
-
function
|
|
2495
|
+
}, na = /* @__PURE__ */ new WeakMap();
|
|
2496
|
+
function ra(e, t, n) {
|
|
2497
2497
|
let r = t.grouped;
|
|
2498
|
-
t.groupedKeysDirty && (t.groupedKeys =
|
|
2498
|
+
t.groupedKeysDirty && (t.groupedKeys = _i(e.getEntries()), t.compositeState.configure(t.groupedKeys), t.groupedKeysDirty = !1, t.soaPlans = null, na.delete(e)), t.compositeState.clear();
|
|
2499
2499
|
let i = e.getEntries(), a = t.soaPlans !== null, o = 0, s = !0;
|
|
2500
2500
|
for (let e of i) {
|
|
2501
2501
|
let { animation: n, layer: i, values: c } = e;
|
|
@@ -2503,7 +2503,7 @@ function ta(e, t, n) {
|
|
|
2503
2503
|
n.interpFrames(n.t, !1, c);
|
|
2504
2504
|
let l = i.properties;
|
|
2505
2505
|
for (let e in c) l && !l.has(e) || c[e] !== void 0 && t.compositeState.mark(e);
|
|
2506
|
-
let u = i.op, d =
|
|
2506
|
+
let u = i.op, d = W(i);
|
|
2507
2507
|
if (u === "replace" && !d) {
|
|
2508
2508
|
for (let e in c) {
|
|
2509
2509
|
if (l && !l.has(e)) continue;
|
|
@@ -2514,14 +2514,14 @@ function ta(e, t, n) {
|
|
|
2514
2514
|
}
|
|
2515
2515
|
if (a) {
|
|
2516
2516
|
let e = t.soaPlans[o++];
|
|
2517
|
-
|
|
2518
|
-
} else
|
|
2517
|
+
ea(t.compositeBuf, e), e.residualKeys.size > 0 && ia(i, c, r, l, e.residualKeys, t.compositeState);
|
|
2518
|
+
} else ia(i, c, r, l, void 0, t.compositeState);
|
|
2519
2519
|
}
|
|
2520
2520
|
if (!a) {
|
|
2521
|
-
let { plans: e, compositeBuf: n } =
|
|
2521
|
+
let { plans: e, compositeBuf: n } = ta(i, t.compositeBuf, r);
|
|
2522
2522
|
t.soaPlans = e, t.compositeBuf = n;
|
|
2523
2523
|
}
|
|
2524
|
-
if (e.done = s, t.compositeState.pruneInactive(), e.transform ===
|
|
2524
|
+
if (e.done = s, t.compositeState.pruneInactive(), e.transform === T) for (let t of e.getEntries()) {
|
|
2525
2525
|
let n = t.animation.frames[0];
|
|
2526
2526
|
if (n != null && n.transform != null) {
|
|
2527
2527
|
e.transform = n.transform, e.unflatten = t.animation.unflatten;
|
|
@@ -2529,12 +2529,12 @@ function ta(e, t, n) {
|
|
|
2529
2529
|
}
|
|
2530
2530
|
}
|
|
2531
2531
|
if (e.unflatten) {
|
|
2532
|
-
let t =
|
|
2533
|
-
t === void 0 ? (t =
|
|
2532
|
+
let t = na.get(e);
|
|
2533
|
+
t === void 0 ? (t = Mt(r), na.set(e, t)) : Nt(t), e.transform(t.root, n);
|
|
2534
2534
|
} else e.transform(r, n);
|
|
2535
2535
|
return r;
|
|
2536
2536
|
}
|
|
2537
|
-
function
|
|
2537
|
+
function ia(e, t, n, r, i, a) {
|
|
2538
2538
|
let o = e.op;
|
|
2539
2539
|
if (o === "add" || o === "accumulate") {
|
|
2540
2540
|
for (let e in t) {
|
|
@@ -2542,53 +2542,53 @@ function na(e, t, n, r, i, a) {
|
|
|
2542
2542
|
let o = t[e];
|
|
2543
2543
|
if (o === void 0) continue;
|
|
2544
2544
|
let s = n[e];
|
|
2545
|
-
|
|
2545
|
+
G(s) && G(o) ? n[e] = s + o : a ? a.copy(e, o) : n[e] = o;
|
|
2546
2546
|
}
|
|
2547
2547
|
return;
|
|
2548
2548
|
}
|
|
2549
|
-
let s =
|
|
2549
|
+
let s = xi(e);
|
|
2550
2550
|
for (let e in t) {
|
|
2551
2551
|
if (i && !i.has(e) || r && !r.has(e)) continue;
|
|
2552
2552
|
let o = t[e];
|
|
2553
2553
|
if (o === void 0) continue;
|
|
2554
2554
|
let c = n[e];
|
|
2555
|
-
if (
|
|
2555
|
+
if (G(c) && G(o)) n[e] = C(c, o, s);
|
|
2556
2556
|
else if (a) {
|
|
2557
2557
|
let t = a.copy(e, o);
|
|
2558
|
-
|
|
2558
|
+
G(t) && (n[e] = C(0, t, s));
|
|
2559
2559
|
} else n[e] = o;
|
|
2560
2560
|
}
|
|
2561
2561
|
}
|
|
2562
2562
|
//#endregion
|
|
2563
2563
|
//#region src/animation/group/layer-api.ts
|
|
2564
|
-
function
|
|
2565
|
-
let r =
|
|
2564
|
+
function aa(e, t, n) {
|
|
2565
|
+
let r = gi(e.animations, t, "setLayerConfig");
|
|
2566
2566
|
Object.assign(r.layer, n), e.invalidateEntries();
|
|
2567
2567
|
}
|
|
2568
|
-
function
|
|
2569
|
-
return e.animations[
|
|
2568
|
+
function oa(e, t) {
|
|
2569
|
+
return e.animations[hi(t)]?.layer;
|
|
2570
2570
|
}
|
|
2571
|
-
function
|
|
2572
|
-
let r =
|
|
2571
|
+
function sa(e, t, n) {
|
|
2572
|
+
let r = gi(e.animations, t, "transitionLayer").layer, i = Si(n.weight);
|
|
2573
2573
|
r.op = "replace";
|
|
2574
|
-
let
|
|
2575
|
-
|
|
2574
|
+
let a = r.weightSpring;
|
|
2575
|
+
a instanceof p ? a.target = i : r.weightSpring = Xi(Si(r.weight), i, n.spring), e._hasLayerSprings = !0, e.invalidateEntries();
|
|
2576
2576
|
}
|
|
2577
|
-
function
|
|
2577
|
+
function ca(e, t, n, r) {
|
|
2578
2578
|
let i = r?.spring;
|
|
2579
|
-
|
|
2579
|
+
sa(e, t, {
|
|
2580
2580
|
weight: 0,
|
|
2581
2581
|
...i ? { spring: i } : {}
|
|
2582
|
-
}),
|
|
2582
|
+
}), sa(e, n, {
|
|
2583
2583
|
weight: 1,
|
|
2584
2584
|
...i ? { spring: i } : {}
|
|
2585
2585
|
});
|
|
2586
2586
|
}
|
|
2587
2587
|
//#endregion
|
|
2588
2588
|
//#region src/animation/group/group.ts
|
|
2589
|
-
var
|
|
2589
|
+
var la = class e {
|
|
2590
2590
|
animations = {};
|
|
2591
|
-
transform =
|
|
2591
|
+
transform = T;
|
|
2592
2592
|
superKey;
|
|
2593
2593
|
paused = !1;
|
|
2594
2594
|
started = !1;
|
|
@@ -2616,29 +2616,29 @@ var sa = class e {
|
|
|
2616
2616
|
}
|
|
2617
2617
|
unflatten = !1;
|
|
2618
2618
|
lastTickTime = 0;
|
|
2619
|
-
playback = new
|
|
2619
|
+
playback = new s();
|
|
2620
2620
|
_waAnimations = [];
|
|
2621
2621
|
_waapiDelegated = !1;
|
|
2622
2622
|
resolvePromise = null;
|
|
2623
2623
|
_playingPromise = null;
|
|
2624
2624
|
_boundFrame;
|
|
2625
|
-
_renders = new
|
|
2625
|
+
_renders = new Wi();
|
|
2626
2626
|
_entries = [];
|
|
2627
2627
|
_entriesDirty = !0;
|
|
2628
|
-
_composite =
|
|
2628
|
+
_composite = $i();
|
|
2629
2629
|
_hasLayerSprings = !1;
|
|
2630
2630
|
constructor(...e) {
|
|
2631
|
-
this._boundFrame = (e) =>
|
|
2631
|
+
this._boundFrame = (e) => Ri(this, e);
|
|
2632
2632
|
let t = [];
|
|
2633
2633
|
for (let n of e) {
|
|
2634
2634
|
let e, r;
|
|
2635
|
-
n instanceof
|
|
2635
|
+
n instanceof ni ? e = n : (e = n.animation, r = n.layer), this.transform === T && e.frames[0] != null && (this.transform = e.frames[0].transform, this.unflatten = e.unflatten);
|
|
2636
2636
|
let i = H(e);
|
|
2637
2637
|
this.animations[i] = {
|
|
2638
2638
|
values: {},
|
|
2639
2639
|
animation: e,
|
|
2640
2640
|
layer: {
|
|
2641
|
-
...
|
|
2641
|
+
...Re,
|
|
2642
2642
|
...r
|
|
2643
2643
|
}
|
|
2644
2644
|
}, e.managed = !0, t.push(e);
|
|
@@ -2662,76 +2662,76 @@ var sa = class e {
|
|
|
2662
2662
|
return this._deriveSingleTarget(t.map((e) => e.animation.targets[0])), this;
|
|
2663
2663
|
}
|
|
2664
2664
|
transformFramesGrouped(e) {
|
|
2665
|
-
return
|
|
2665
|
+
return ra(this, this._composite, e);
|
|
2666
2666
|
}
|
|
2667
2667
|
render(e = this.lastTickTime) {
|
|
2668
|
-
this.singleTarget ? (!this._waapiDelegated || this.done) && this.transformFramesGrouped(e) :
|
|
2668
|
+
this.singleTarget ? (!this._waapiDelegated || this.done) && this.transformFramesGrouped(e) : vi(this.getEntries()), this._renders.notify(e);
|
|
2669
2669
|
}
|
|
2670
2670
|
onRender(e) {
|
|
2671
2671
|
return this._renders.subscribe(e);
|
|
2672
2672
|
}
|
|
2673
2673
|
setChildTime(e, t) {
|
|
2674
|
-
let n =
|
|
2674
|
+
let n = gi(this.animations, e, "setChildTime").animation;
|
|
2675
2675
|
return n.t = t, n.startTime !== void 0 && (n.pausedTime = n.startTime + t), this;
|
|
2676
2676
|
}
|
|
2677
2677
|
seek(e) {
|
|
2678
|
-
return
|
|
2678
|
+
return Ui(this, e), this;
|
|
2679
2679
|
}
|
|
2680
2680
|
elapsedOf(e) {
|
|
2681
|
-
return
|
|
2681
|
+
return Hi(this, e);
|
|
2682
2682
|
}
|
|
2683
2683
|
advanceTo(t) {
|
|
2684
2684
|
let n = this.lastTickTime === 0 ? 0 : t - this.lastTickTime;
|
|
2685
2685
|
this._hasLayerSprings && this.advanceLayerSprings(n), this.lastTickTime = t, this.started = !0;
|
|
2686
2686
|
let r = this.getEntries(), i = e.YIELD_BATCH;
|
|
2687
|
-
return r.length <= i ? (
|
|
2687
|
+
return r.length <= i ? (Ji(r, t), this) : Yi(r, t, i).then(() => this);
|
|
2688
2688
|
}
|
|
2689
2689
|
get finished() {
|
|
2690
2690
|
return this._playingPromise ?? Promise.resolve();
|
|
2691
2691
|
}
|
|
2692
2692
|
async play() {
|
|
2693
|
-
return
|
|
2693
|
+
return ki(this);
|
|
2694
2694
|
}
|
|
2695
2695
|
pause() {
|
|
2696
|
-
return
|
|
2696
|
+
return ji(this), this;
|
|
2697
2697
|
}
|
|
2698
2698
|
resume() {
|
|
2699
|
-
return
|
|
2699
|
+
return Mi(this), this;
|
|
2700
2700
|
}
|
|
2701
2701
|
toggle() {
|
|
2702
|
-
return
|
|
2702
|
+
return Ni(this);
|
|
2703
2703
|
}
|
|
2704
2704
|
settle() {
|
|
2705
|
-
return
|
|
2705
|
+
return Pi(this), this;
|
|
2706
2706
|
}
|
|
2707
2707
|
reset() {
|
|
2708
|
-
return
|
|
2708
|
+
return Fi(this), this._renders.notify(this.lastTickTime), this;
|
|
2709
2709
|
}
|
|
2710
2710
|
stop() {
|
|
2711
|
-
return
|
|
2711
|
+
return Ii(this), this;
|
|
2712
2712
|
}
|
|
2713
2713
|
playing() {
|
|
2714
|
-
return
|
|
2714
|
+
return Li(this);
|
|
2715
2715
|
}
|
|
2716
2716
|
setLayerConfig(e, t) {
|
|
2717
|
-
return
|
|
2717
|
+
return aa(this, e, t), this;
|
|
2718
2718
|
}
|
|
2719
2719
|
setLayerEnabled(e, t) {
|
|
2720
2720
|
return this.setLayerConfig(e, { enabled: t });
|
|
2721
2721
|
}
|
|
2722
2722
|
getLayerConfig(e) {
|
|
2723
|
-
return
|
|
2723
|
+
return oa(this, e);
|
|
2724
2724
|
}
|
|
2725
2725
|
transitionLayer(e, t) {
|
|
2726
|
-
return
|
|
2726
|
+
return sa(this, e, t), this;
|
|
2727
2727
|
}
|
|
2728
2728
|
crossfade(e, t, n) {
|
|
2729
|
-
return
|
|
2729
|
+
return ca(this, e, t, n), this;
|
|
2730
2730
|
}
|
|
2731
2731
|
advanceLayerSprings(e) {
|
|
2732
|
-
this._hasLayerSprings =
|
|
2732
|
+
this._hasLayerSprings = Zi(this.getEntries(), e);
|
|
2733
2733
|
}
|
|
2734
|
-
},
|
|
2734
|
+
}, ua = class {
|
|
2735
2735
|
animation;
|
|
2736
2736
|
constructor(e) {
|
|
2737
2737
|
this.animation = e;
|
|
@@ -2748,35 +2748,35 @@ var sa = class e {
|
|
|
2748
2748
|
get finished() {
|
|
2749
2749
|
return this.animation.finished;
|
|
2750
2750
|
}
|
|
2751
|
-
},
|
|
2752
|
-
function
|
|
2751
|
+
}, da = (e) => typeof e == "number" ? `${e}%` : e;
|
|
2752
|
+
function fa(e, t) {
|
|
2753
2753
|
let { path: n, from: r = "0%", to: i = "100%", rotate: a, autoPlay: o = !0, ...s } = t;
|
|
2754
2754
|
if (typeof n != "string" || n.length === 0) throw Error("fromMotionPath(): `path` is required — pass an offset-path value (a path()/ray()/url(#id) string).");
|
|
2755
2755
|
let c = Array.isArray(e) ? e : [e];
|
|
2756
2756
|
for (let e of c) e.style.offsetPath = n, a !== void 0 && (e.style.offsetRotate = a);
|
|
2757
2757
|
let l = {
|
|
2758
|
-
"0%": { "offset-distance":
|
|
2759
|
-
"100%": { "offset-distance":
|
|
2758
|
+
"0%": { "offset-distance": da(r) },
|
|
2759
|
+
"100%": { "offset-distance": da(i) }
|
|
2760
2760
|
}, u = new U(s).fromKeyframes(l);
|
|
2761
2761
|
return u.setTargets(...c), o && u.play(), u;
|
|
2762
2762
|
}
|
|
2763
|
-
var
|
|
2763
|
+
var pa = class extends ua {
|
|
2764
2764
|
constructor(e, t) {
|
|
2765
|
-
super(
|
|
2765
|
+
super(fa(e, t));
|
|
2766
2766
|
}
|
|
2767
|
-
},
|
|
2767
|
+
}, ma = (e) => {
|
|
2768
2768
|
if (typeof e == "number") {
|
|
2769
2769
|
if (!Number.isFinite(e) || e < 0 || e > 1) throw Error(`fromDrawSVG(): a numeric draw position is a 0..1 fraction, got ${JSON.stringify(e)} — pass a fraction in [0, 1] or a percent string ("0%".."100%").`);
|
|
2770
2770
|
return e;
|
|
2771
2771
|
}
|
|
2772
|
-
let t =
|
|
2772
|
+
let t = xe(() => de(e.trim()), ({ payload: e }) => e.type === "number" && e.unit === "%" && e.value >= 0 ? e.value / 100 : void 0, void 0);
|
|
2773
2773
|
if (t === void 0) throw Error(`fromDrawSVG(): invalid draw position ${JSON.stringify(e)} — pass a percent string ("0%".."100%") or a 0..1 number.`);
|
|
2774
2774
|
return t;
|
|
2775
2775
|
};
|
|
2776
|
-
function
|
|
2776
|
+
function ha(e, t = {}) {
|
|
2777
2777
|
let { from: n = "0%", to: r = "100%", autoPlay: i = !0, ...a } = t;
|
|
2778
2778
|
if (e == null || typeof e.getTotalLength != "function") throw Error("fromDrawSVG(): `target` must be an SVG geometry element exposing getTotalLength() (a <path>/<line>/<circle>/<rect>/<polygon>/…).");
|
|
2779
|
-
let o =
|
|
2779
|
+
let o = ma(n), s = ma(r), c = e.getTotalLength();
|
|
2780
2780
|
e.style.strokeDasharray = `${c}`;
|
|
2781
2781
|
let l = {
|
|
2782
2782
|
"0%": { "stroke-dashoffset": c * (1 - o) },
|
|
@@ -2784,11 +2784,11 @@ function pa(e, t = {}) {
|
|
|
2784
2784
|
}, u = new U(a).fromKeyframes(l);
|
|
2785
2785
|
return u.setTargets(e), i && u.play(), u;
|
|
2786
2786
|
}
|
|
2787
|
-
var
|
|
2787
|
+
var ga = class extends ua {
|
|
2788
2788
|
constructor(e, t = {}) {
|
|
2789
|
-
super(
|
|
2789
|
+
super(ha(e, t));
|
|
2790
2790
|
}
|
|
2791
|
-
},
|
|
2791
|
+
}, _a = (e) => `--morph-${e}-x`, va = (e) => `--morph-${e}-y`, ya = (e) => `--morph-${e}-angle`, ba = (e, t, n) => {
|
|
2792
2792
|
let r = Array(t + 1);
|
|
2793
2793
|
for (let i = 0; i <= t; i++) if (n) {
|
|
2794
2794
|
let n = e.sampleAtLength(e.totalLength * (i / t));
|
|
@@ -2799,12 +2799,12 @@ var ma = class extends ca {
|
|
|
2799
2799
|
};
|
|
2800
2800
|
} else r[i] = e.getPointAtT(i / t);
|
|
2801
2801
|
return r;
|
|
2802
|
-
},
|
|
2802
|
+
}, xa = (e) => Number.isInteger(e) ? `${e}` : e.toFixed(3), Sa = (e) => {
|
|
2803
2803
|
if (e.length === 0) return "";
|
|
2804
|
-
let t = `M ${
|
|
2805
|
-
for (let n = 1; n < e.length; n++) t += ` L ${
|
|
2804
|
+
let t = `M ${xa(e[0].x)} ${xa(e[0].y)}`;
|
|
2805
|
+
for (let n = 1; n < e.length; n++) t += ` L ${xa(e[n].x)} ${xa(e[n].y)}`;
|
|
2806
2806
|
return t;
|
|
2807
|
-
},
|
|
2807
|
+
}, Ca = (e, t) => {
|
|
2808
2808
|
let n = Array(t + 1);
|
|
2809
2809
|
for (let e = 0; e <= t; e++) n[e] = {
|
|
2810
2810
|
x: 0,
|
|
@@ -2813,82 +2813,82 @@ var ma = class extends ca {
|
|
|
2813
2813
|
return (r) => {
|
|
2814
2814
|
let i = r;
|
|
2815
2815
|
for (let e = 0; e <= t; e++) {
|
|
2816
|
-
let t = n[e], r = i[
|
|
2816
|
+
let t = n[e], r = i[_a(e)], a = i[va(e)];
|
|
2817
2817
|
if (typeof r != "number" || typeof a != "number") throw Error(`morph render: point ${e} lost its coordinate leaf (engine invariant violated — xKey/yKey seeded at construction)`);
|
|
2818
2818
|
t.x = r, t.y = a;
|
|
2819
2819
|
}
|
|
2820
|
-
let a =
|
|
2820
|
+
let a = Sa(n);
|
|
2821
2821
|
e.style.setProperty("--morph-d", a), e.style.setProperty("d", `path("${a}")`);
|
|
2822
2822
|
};
|
|
2823
2823
|
};
|
|
2824
2824
|
//#endregion
|
|
2825
2825
|
//#region src/animation/svg/morph-svg.ts
|
|
2826
|
-
function
|
|
2826
|
+
function wa(e, n, r = {}) {
|
|
2827
2827
|
let { samples: i = 64, target: a, orient: o = !1, autoPlay: s = !0, ...c } = r;
|
|
2828
|
-
if (typeof e != "string" || e.length === 0) throw new
|
|
2829
|
-
if (typeof
|
|
2830
|
-
if (!Number.isInteger(i) || i < 2) throw new
|
|
2831
|
-
let l = new
|
|
2832
|
-
if (l.totalLength === 0) throw new
|
|
2833
|
-
if (u.totalLength === 0) throw new
|
|
2834
|
-
let d =
|
|
2835
|
-
for (let e = 0; e <= i; e++) p[
|
|
2828
|
+
if (typeof e != "string" || e.length === 0) throw new t("from", e, "fromMorphSVG(): `from` must be a non-empty SVG path `d` string.");
|
|
2829
|
+
if (typeof n != "string" || n.length === 0) throw new t("to", n, "fromMorphSVG(): `to` must be a non-empty SVG path `d` string.");
|
|
2830
|
+
if (!Number.isInteger(i) || i < 2) throw new t("samples", i, "fromMorphSVG(): `samples` must be an integer >= 2 (a 1-sample morph is just the two endpoints, with no body to interpolate).");
|
|
2831
|
+
let l = new je(e), u = new je(n);
|
|
2832
|
+
if (l.totalLength === 0) throw new t("from", e, "fromMorphSVG(): the `from` path has zero arc-length — a morph between a zero-length path and anything is malformed input, not an identity animation.");
|
|
2833
|
+
if (u.totalLength === 0) throw new t("to", n, "fromMorphSVG(): the `to` path has zero arc-length — a morph between a zero-length path and anything is malformed input, not an identity animation.");
|
|
2834
|
+
let d = ba(l, i, o), f = ba(u, i, o), p = {}, m = {};
|
|
2835
|
+
for (let e = 0; e <= i; e++) p[_a(e)] = d[e].x, p[va(e)] = d[e].y, m[_a(e)] = f[e].x, m[va(e)] = f[e].y, o && (p[ya(e)] = d[e].angle ?? 0, m[ya(e)] = f[e].angle ?? 0);
|
|
2836
2836
|
let h = {
|
|
2837
2837
|
"0%": p,
|
|
2838
2838
|
"100%": m
|
|
2839
|
-
},
|
|
2840
|
-
a != null && typeof
|
|
2841
|
-
let
|
|
2842
|
-
return s &&
|
|
2839
|
+
}, ee = a == null ? void 0 : Ca(a, i), g = a;
|
|
2840
|
+
a != null && typeof g.setAttribute == "function" && g.setAttribute("d", e);
|
|
2841
|
+
let _ = new U(c).fromKeyframes(h, ee);
|
|
2842
|
+
return s && _.play(), _;
|
|
2843
2843
|
}
|
|
2844
|
-
var
|
|
2844
|
+
var Ta = class extends ua {
|
|
2845
2845
|
samples;
|
|
2846
2846
|
constructor(e, t, n = {}) {
|
|
2847
|
-
super(
|
|
2847
|
+
super(wa(e, t, n)), this.samples = n.samples ?? 64;
|
|
2848
2848
|
}
|
|
2849
2849
|
sampleD(e) {
|
|
2850
2850
|
let t = (e < 0 ? 0 : e > 1 ? 1 : e) * this.animation.options.duration, n = this.animation.interpFrames(t, !1), r = Array(this.samples + 1);
|
|
2851
2851
|
for (let e = 0; e <= this.samples; e++) {
|
|
2852
|
-
let t = n[
|
|
2852
|
+
let t = n[_a(e)], i = n[va(e)];
|
|
2853
2853
|
r[e] = {
|
|
2854
2854
|
x: (typeof t == "number" ? t : void 0) ?? 0,
|
|
2855
2855
|
y: (typeof i == "number" ? i : void 0) ?? 0
|
|
2856
2856
|
};
|
|
2857
2857
|
}
|
|
2858
|
-
return
|
|
2858
|
+
return Sa(r);
|
|
2859
2859
|
}
|
|
2860
|
-
},
|
|
2860
|
+
}, Ea = "\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n", Da = "\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n", Oa = "\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.05);\n }\n", ka = "\n8%,\n41% {\n transform: translateX(-10px);\n}\n25%,\n58% {\n transform: translateX(10px);\n}\n75% {\n transform: translateX(-5px);\n}\n92% {\n transform: translateX(5px);\n}\n0%,\n100% {\n transform: translateX(0);\n}\n", Aa = "\n 0%, 20%, 50%, 80%, 100% {\n transform: translateY(0);\n }\n 40% {\n transform: translateY(-30px);\n }\n 60% {\n transform: translateY(-15px);\n }\n", ja = "\n 0% {\n transform: perspective(400px) rotateY(0);\n animation-timing-function: ease-out;\n }\n 40% {\n transform: perspective(400px) translateZ(150px) rotateY(170deg);\n animation-timing-function: ease-out;\n }\n 50% {\n transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);\n animation-timing-function: ease-in;\n }\n 80% {\n transform: perspective(400px) rotateY(360deg) scale(.95);\n animation-timing-function: ease-in;\n }\n 100% {\n transform: perspective(400px) scale(1);\n animation-timing-function: ease-in;\n }\n", Ma = "\n 0% {\n transform-origin: center;\n transform: rotate3d(0, 0, 1, -200deg);\n opacity: 0;\n }\n 100% {\n transform-origin: center;\n transform: none;\n opacity: 1;\n }\n", Na = "\n 0% {\n transform: translateY(1000px);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n", Pa = "\n 0% {\n transform: scale(1);\n }\n 14% {\n transform: scale(1.3);\n }\n 28% {\n transform: scale(1);\n }\n 42% {\n transform: scale(1.3);\n }\n 70% {\n transform: scale(1);\n }\n", Fa = "\n 0%, 100% {\n box-shadow: 0 0 5px rgb(0 0 0 / 20%);\n }\n 50% {\n box-shadow: 0 0 20px rgb(0 0 0 / 80%);\n }\n", Ia = "\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n", La = "\n 0% {\n color: red;\n }\n 15% {\n color: orange;\n }\n 30% {\n color: yellow;\n }\n 45% {\n color: green;\n }\n 60% {\n color: blue;\n }\n 75% {\n color: indigo;\n }\n 90% {\n color: violet;\n }\n 100% {\n color: red;\n }\n", Ra = "@keyframes keyframeDelete {\n 0% {\n transform: translateX(0%) rotate(0deg);\n opacity: 1;\n }\n 25% {\n transform: translateX(0%) rotate(5deg);\n opacity: 1;\n }\n 50% {\n transform: translateX(25%) rotate(10deg);\n opacity: 0.5;\n }\n 75% {\n transform: translateX(0%) rotate(0deg);\n opacity: 0.25;\n }\n 100% {\n transform: translateX(-100%);\n opacity: 0;\n }\n}", za = "@keyframes keyframeDelete {\n 0% {\n transform: translateX(0%) rotate(0deg);\n opacity: 1;\n }\n 25% {\n transform: translateX(0%) rotate(-5deg);\n opacity: 1;\n }\n 50% {\n transform: translateX(-25%) rotate(-10deg);\n opacity: 0.5;\n }\n 100% {\n transform: translateX(100%);\n opacity: 0;\n }\n}", Ba = "\n0% {\n filter: blur(10px);\n opacity: 0;\n}\n100% {\n filter: blur(0px);\n opacity: 1;\n}\n", Va = "\n0% {\n filter: blur(0px);\n opacity: 1;\n}\n100% {\n filter: blur(10px);\n opacity: 0;\n}\n", Ha = "\n0% {\n filter: blur(0px);\n}\n50% {\n filter: blur(10px);\n}\n100% {\n filter: blur(0px);\n}\n", Ua = "\n0% {\n width: 0%;\n background-color: #ff9999;\n}\n25% {\n width: 25%;\n background-color: #ffcc99;\n}\n50% {\n width: 50%;\n background-color: #ffff99;\n}\n75% {\n width: 75%;\n background-color: #99ff99;\n}\n100% {\n width: 100%;\n background-color: #99ccff;\n}\n", Wa = "\n0% {\n background-position: -200% 0;\n}\n100% {\n background-position: 200% 0;\n}\n", Ga = "\n0%, 100% {\n filter: blur(0px);\n opacity: 1;\n}\n50% {\n filter: blur(4px);\n opacity: 0.5;\n}\n", Ka = "\n0% {\n background-position: 0% 50%;\n}\n50% {\n background-position: 100% 50%;\n}\n100% {\n background-position: 0% 50%;\n}\n", qa = "\n0% {\n transform: rotate(0deg) scale(1);\n}\n25% {\n transform: rotate(90deg) scale(1.1);\n}\n50% {\n transform: rotate(180deg) scale(1);\n}\n75% {\n transform: rotate(270deg) scale(0.9);\n}\n100% {\n transform: rotate(360deg) scale(1);\n}\n", Ja = "\n0%, 100% {\n border-right-color: transparent;\n}\n50% {\n border-right-color: black;\n}\n", Ya = "\n0% {\n max-height: 0;\n opacity: 0;\n}\n100% {\n max-height: 1000px;\n opacity: 1;\n}\n", Xa = "\n0%, 100% {\n transform: translateY(0);\n}\n25% {\n transform: translateY(-10px);\n}\n50% {\n transform: translateY(0);\n}\n75% {\n transform: translateY(-5px);\n}\n", Za = "\n0% {\n transform: rotate(0deg);\n border-radius: 50%;\n}\n25% {\n transform: rotate(90deg);\n border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;\n}\n50% {\n transform: rotate(180deg);\n border-radius: 50%;\n}\n75% {\n transform: rotate(270deg);\n border-radius: 60% 40% 40% 60% / 60% 60% 40% 40%;\n}\n100% {\n transform: rotate(360deg);\n border-radius: 50%;\n}\n", Qa = "\n0% {\n background-position: 50% 0%;\n}\n100% {\n background-position: 50% 100%;\n}\n", $a = "\n0% {\n transform: translateX(-100%);\n opacity: 0;\n}\n100% {\n transform: translateX(0);\n opacity: 1;\n}\n", eo = "\n0% {\n transform: translateX(0);\n opacity: 1;\n}\n100% {\n transform: translateX(-100%);\n opacity: 0;\n}\n", to = "\n0% {\n transform: translateX(100%);\n opacity: 0;\n}\n100% {\n transform: translateX(0);\n opacity: 1;\n}\n", no = "\n0% {\n transform: translateX(0%);\n opacity: 1;\n\n}\n100% {\n transform: translateX(100%);\n opacity: 0;\n}\n", ro = "\n0% {\n transform: translateY(0px);\n}\n50% {\n transform: translateY(5px);\n}\n100% {\n transform: translateY(0px);\n}\n", io = "\n0% {\n transform: rotateZ(0deg) translateY(0px);\n}\n25% {\n transform: rotateZ(2.5deg) translateY(-3px);\n}\n50% {\n transform: rotateZ(0deg) translateY(0px);\n}\n75% {\n transform: rotateZ(-2.5deg) translateY(-3px);\n}\n100% {\n transform: rotateZ(0deg) translateY(0px);\n}\n", ao = "\n0% {\n transform: scale(0.2) rotate(-24deg);\n opacity: 0;\n}\n100% {\n transform: scale(1) rotate(0deg);\n opacity: 1;\n}\n", oo = "@keyframes keyframeShift {\n0% {\n transform: translateY(0%);\n opacity: 1;\n}\n\n50% {\n transform: translateY(-50%);\n opacity: 0.75;\n}\n\n100% {\n transform: translateY(-100%);\n opacity: 1;\n}\n}", so = "@keyframes keyframeShift {\n0% {\n transform: translateY(0%);\n opacity: 1;\n}\n\n50% {\n transform: translateY(50%);\n opacity: 0.75;\n}\n\n100% {\n transform: translateY(100%);\n opacity: 1;\n}\n}", K = (e) => {
|
|
2861
2861
|
let t = e.trim();
|
|
2862
2862
|
if (!t.startsWith("@keyframes")) return e;
|
|
2863
2863
|
let n = t.indexOf("{"), r = t.lastIndexOf("}");
|
|
2864
2864
|
if (n === -1 || r <= n) return e;
|
|
2865
2865
|
let i = t.slice(10, n).trim();
|
|
2866
2866
|
return i === "" || i.includes("{") ? e : t.slice(n + 1, r);
|
|
2867
|
-
},
|
|
2867
|
+
}, co = {
|
|
2868
2868
|
response: .35,
|
|
2869
2869
|
dampingFraction: .78
|
|
2870
|
-
},
|
|
2870
|
+
}, lo = {
|
|
2871
2871
|
response: .5,
|
|
2872
2872
|
dampingFraction: .5
|
|
2873
|
-
},
|
|
2873
|
+
}, uo = {
|
|
2874
2874
|
response: .7,
|
|
2875
2875
|
dampingFraction: .95
|
|
2876
|
-
}, { response:
|
|
2876
|
+
}, { response: fo, dampingFraction: po } = Xr([
|
|
2877
2877
|
1,
|
|
2878
2878
|
120,
|
|
2879
2879
|
12,
|
|
2880
2880
|
0
|
|
2881
|
-
]),
|
|
2882
|
-
response:
|
|
2883
|
-
dampingFraction:
|
|
2884
|
-
},
|
|
2881
|
+
]), mo = {
|
|
2882
|
+
response: fo,
|
|
2883
|
+
dampingFraction: po
|
|
2884
|
+
}, ho = {
|
|
2885
2885
|
springScaleInKeyframes: "\n 0% {\n transform: scale(0.6);\n opacity: 0;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n",
|
|
2886
2886
|
springSlideInKeyframes: "\n 0% {\n transform: translateY(40px);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n",
|
|
2887
2887
|
springPopKeyframes: "\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.15);\n }\n",
|
|
2888
2888
|
springWobbleKeyframes: "\n 0%, 100% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(8deg);\n }\n"
|
|
2889
|
-
},
|
|
2889
|
+
}, go = {
|
|
2890
2890
|
fadeIn: {
|
|
2891
|
-
css:
|
|
2891
|
+
css: K(Ea),
|
|
2892
2892
|
options: {
|
|
2893
2893
|
duration: 700,
|
|
2894
2894
|
timingFunction: "ease-in-out"
|
|
@@ -2896,7 +2896,7 @@ var Ca = class extends ca {
|
|
|
2896
2896
|
group: "enter"
|
|
2897
2897
|
},
|
|
2898
2898
|
fadeOut: {
|
|
2899
|
-
css:
|
|
2899
|
+
css: K(Da),
|
|
2900
2900
|
options: {
|
|
2901
2901
|
duration: 700,
|
|
2902
2902
|
timingFunction: "ease-in-out"
|
|
@@ -2904,7 +2904,7 @@ var Ca = class extends ca {
|
|
|
2904
2904
|
group: "exit"
|
|
2905
2905
|
},
|
|
2906
2906
|
pulse: {
|
|
2907
|
-
css:
|
|
2907
|
+
css: K(Oa),
|
|
2908
2908
|
options: {
|
|
2909
2909
|
duration: 1e3,
|
|
2910
2910
|
timingFunction: "ease-in-out",
|
|
@@ -2913,7 +2913,7 @@ var Ca = class extends ca {
|
|
|
2913
2913
|
group: "attention"
|
|
2914
2914
|
},
|
|
2915
2915
|
shake: {
|
|
2916
|
-
css:
|
|
2916
|
+
css: K(ka),
|
|
2917
2917
|
options: {
|
|
2918
2918
|
duration: 820,
|
|
2919
2919
|
timingFunction: "ease-in-out"
|
|
@@ -2921,7 +2921,7 @@ var Ca = class extends ca {
|
|
|
2921
2921
|
group: "attention"
|
|
2922
2922
|
},
|
|
2923
2923
|
bounce: {
|
|
2924
|
-
css:
|
|
2924
|
+
css: K(Aa),
|
|
2925
2925
|
options: {
|
|
2926
2926
|
duration: 1e3,
|
|
2927
2927
|
timingFunction: "cubic-bezier(0.28, 0.84, 0.42, 1)"
|
|
@@ -2929,7 +2929,7 @@ var Ca = class extends ca {
|
|
|
2929
2929
|
group: "attention"
|
|
2930
2930
|
},
|
|
2931
2931
|
flipPreset: {
|
|
2932
|
-
css:
|
|
2932
|
+
css: K(ja),
|
|
2933
2933
|
options: {
|
|
2934
2934
|
duration: 1e3,
|
|
2935
2935
|
timingFunction: "ease-in-out"
|
|
@@ -2938,7 +2938,7 @@ var Ca = class extends ca {
|
|
|
2938
2938
|
taxonomyName: "flip"
|
|
2939
2939
|
},
|
|
2940
2940
|
rotateIn: {
|
|
2941
|
-
css:
|
|
2941
|
+
css: K(Ma),
|
|
2942
2942
|
options: {
|
|
2943
2943
|
duration: 1e3,
|
|
2944
2944
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -2946,7 +2946,7 @@ var Ca = class extends ca {
|
|
|
2946
2946
|
group: "enter"
|
|
2947
2947
|
},
|
|
2948
2948
|
slideIn: {
|
|
2949
|
-
css:
|
|
2949
|
+
css: K(Na),
|
|
2950
2950
|
options: {
|
|
2951
2951
|
duration: 1e3,
|
|
2952
2952
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -2954,7 +2954,7 @@ var Ca = class extends ca {
|
|
|
2954
2954
|
group: "enter"
|
|
2955
2955
|
},
|
|
2956
2956
|
heartbeat: {
|
|
2957
|
-
css:
|
|
2957
|
+
css: K(Pa),
|
|
2958
2958
|
options: {
|
|
2959
2959
|
duration: 1500,
|
|
2960
2960
|
timingFunction: "ease-in-out",
|
|
@@ -2963,7 +2963,7 @@ var Ca = class extends ca {
|
|
|
2963
2963
|
group: "loop"
|
|
2964
2964
|
},
|
|
2965
2965
|
glow: {
|
|
2966
|
-
css:
|
|
2966
|
+
css: K(Fa),
|
|
2967
2967
|
options: {
|
|
2968
2968
|
duration: 2e3,
|
|
2969
2969
|
timingFunction: "ease-in-out",
|
|
@@ -2972,7 +2972,7 @@ var Ca = class extends ca {
|
|
|
2972
2972
|
group: "loop"
|
|
2973
2973
|
},
|
|
2974
2974
|
typewriter: {
|
|
2975
|
-
css:
|
|
2975
|
+
css: K(Ia),
|
|
2976
2976
|
options: {
|
|
2977
2977
|
duration: 3e3,
|
|
2978
2978
|
timingFunction: "steps(40, jump-end)",
|
|
@@ -2980,7 +2980,7 @@ var Ca = class extends ca {
|
|
|
2980
2980
|
}
|
|
2981
2981
|
},
|
|
2982
2982
|
rainbowText: {
|
|
2983
|
-
css:
|
|
2983
|
+
css: K(La),
|
|
2984
2984
|
options: {
|
|
2985
2985
|
duration: 5e3,
|
|
2986
2986
|
timingFunction: "linear",
|
|
@@ -2989,7 +2989,7 @@ var Ca = class extends ca {
|
|
|
2989
2989
|
group: "loop"
|
|
2990
2990
|
},
|
|
2991
2991
|
warpLeft: {
|
|
2992
|
-
css:
|
|
2992
|
+
css: K(Ra),
|
|
2993
2993
|
options: {
|
|
2994
2994
|
duration: 700,
|
|
2995
2995
|
timingFunction: "ease-in-bounce"
|
|
@@ -2997,7 +2997,7 @@ var Ca = class extends ca {
|
|
|
2997
2997
|
group: "exit"
|
|
2998
2998
|
},
|
|
2999
2999
|
warpRight: {
|
|
3000
|
-
css:
|
|
3000
|
+
css: K(za),
|
|
3001
3001
|
options: {
|
|
3002
3002
|
duration: 700,
|
|
3003
3003
|
timingFunction: "ease-in-bounce"
|
|
@@ -3005,7 +3005,7 @@ var Ca = class extends ca {
|
|
|
3005
3005
|
group: "exit"
|
|
3006
3006
|
},
|
|
3007
3007
|
blurIn: {
|
|
3008
|
-
css:
|
|
3008
|
+
css: K(Ba),
|
|
3009
3009
|
options: {
|
|
3010
3010
|
duration: 2e3,
|
|
3011
3011
|
timingFunction: "ease-in-out"
|
|
@@ -3013,7 +3013,7 @@ var Ca = class extends ca {
|
|
|
3013
3013
|
group: "enter"
|
|
3014
3014
|
},
|
|
3015
3015
|
blurOut: {
|
|
3016
|
-
css:
|
|
3016
|
+
css: K(Va),
|
|
3017
3017
|
options: {
|
|
3018
3018
|
duration: 2e3,
|
|
3019
3019
|
timingFunction: "ease-in-out"
|
|
@@ -3021,14 +3021,14 @@ var Ca = class extends ca {
|
|
|
3021
3021
|
group: "exit"
|
|
3022
3022
|
},
|
|
3023
3023
|
blurInOut: {
|
|
3024
|
-
css:
|
|
3024
|
+
css: K(Ha),
|
|
3025
3025
|
options: {
|
|
3026
3026
|
duration: 2e3,
|
|
3027
3027
|
timingFunction: "ease-in-out"
|
|
3028
3028
|
}
|
|
3029
3029
|
},
|
|
3030
3030
|
progressBar: {
|
|
3031
|
-
css:
|
|
3031
|
+
css: K(Ua),
|
|
3032
3032
|
options: {
|
|
3033
3033
|
duration: 3e3,
|
|
3034
3034
|
timingFunction: "linear",
|
|
@@ -3036,7 +3036,7 @@ var Ca = class extends ca {
|
|
|
3036
3036
|
}
|
|
3037
3037
|
},
|
|
3038
3038
|
skeletonLoading: {
|
|
3039
|
-
css:
|
|
3039
|
+
css: K(Wa),
|
|
3040
3040
|
options: {
|
|
3041
3041
|
duration: 1500,
|
|
3042
3042
|
timingFunction: "linear",
|
|
@@ -3045,14 +3045,14 @@ var Ca = class extends ca {
|
|
|
3045
3045
|
group: "loop"
|
|
3046
3046
|
},
|
|
3047
3047
|
textFocusBlur: {
|
|
3048
|
-
css:
|
|
3048
|
+
css: K(Ga),
|
|
3049
3049
|
options: {
|
|
3050
3050
|
duration: 2e3,
|
|
3051
3051
|
timingFunction: "ease-in-out"
|
|
3052
3052
|
}
|
|
3053
3053
|
},
|
|
3054
3054
|
gradientBackground: {
|
|
3055
|
-
css:
|
|
3055
|
+
css: K(Ka),
|
|
3056
3056
|
options: {
|
|
3057
3057
|
duration: 5e3,
|
|
3058
3058
|
timingFunction: "ease-in-out",
|
|
@@ -3061,14 +3061,14 @@ var Ca = class extends ca {
|
|
|
3061
3061
|
group: "loop"
|
|
3062
3062
|
},
|
|
3063
3063
|
rotateScale: {
|
|
3064
|
-
css:
|
|
3064
|
+
css: K(qa),
|
|
3065
3065
|
options: {
|
|
3066
3066
|
duration: 2500,
|
|
3067
3067
|
timingFunction: "cubic-bezier(0.68, -0.55, 0.265, 1.55)"
|
|
3068
3068
|
}
|
|
3069
3069
|
},
|
|
3070
3070
|
typingCursor: {
|
|
3071
|
-
css:
|
|
3071
|
+
css: K(Ja),
|
|
3072
3072
|
options: {
|
|
3073
3073
|
duration: 800,
|
|
3074
3074
|
timingFunction: "steps(2, jump-start)",
|
|
@@ -3077,7 +3077,7 @@ var Ca = class extends ca {
|
|
|
3077
3077
|
group: "loop"
|
|
3078
3078
|
},
|
|
3079
3079
|
accordionExpand: {
|
|
3080
|
-
css:
|
|
3080
|
+
css: K(Ya),
|
|
3081
3081
|
options: {
|
|
3082
3082
|
duration: 500,
|
|
3083
3083
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
|
|
@@ -3085,7 +3085,7 @@ var Ca = class extends ca {
|
|
|
3085
3085
|
}
|
|
3086
3086
|
},
|
|
3087
3087
|
notificationBounce: {
|
|
3088
|
-
css:
|
|
3088
|
+
css: K(Xa),
|
|
3089
3089
|
options: {
|
|
3090
3090
|
duration: 1e3,
|
|
3091
3091
|
timingFunction: "cubic-bezier(0.28, 0.84, 0.42, 1)"
|
|
@@ -3093,7 +3093,7 @@ var Ca = class extends ca {
|
|
|
3093
3093
|
group: "attention"
|
|
3094
3094
|
},
|
|
3095
3095
|
spinner: {
|
|
3096
|
-
css:
|
|
3096
|
+
css: K(Za),
|
|
3097
3097
|
options: {
|
|
3098
3098
|
duration: 2e3,
|
|
3099
3099
|
timingFunction: "linear",
|
|
@@ -3102,7 +3102,7 @@ var Ca = class extends ca {
|
|
|
3102
3102
|
group: "loop"
|
|
3103
3103
|
},
|
|
3104
3104
|
parallaxScroll: {
|
|
3105
|
-
css:
|
|
3105
|
+
css: K(Qa),
|
|
3106
3106
|
options: {
|
|
3107
3107
|
duration: 1e4,
|
|
3108
3108
|
timingFunction: "linear",
|
|
@@ -3111,7 +3111,7 @@ var Ca = class extends ca {
|
|
|
3111
3111
|
group: "loop"
|
|
3112
3112
|
},
|
|
3113
3113
|
slideInLeft: {
|
|
3114
|
-
css:
|
|
3114
|
+
css: K($a),
|
|
3115
3115
|
options: {
|
|
3116
3116
|
duration: 1e3,
|
|
3117
3117
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -3119,7 +3119,7 @@ var Ca = class extends ca {
|
|
|
3119
3119
|
group: "enter"
|
|
3120
3120
|
},
|
|
3121
3121
|
slideOutLeft: {
|
|
3122
|
-
css:
|
|
3122
|
+
css: K(eo),
|
|
3123
3123
|
options: {
|
|
3124
3124
|
duration: 1e3,
|
|
3125
3125
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -3127,7 +3127,7 @@ var Ca = class extends ca {
|
|
|
3127
3127
|
group: "exit"
|
|
3128
3128
|
},
|
|
3129
3129
|
slideInRight: {
|
|
3130
|
-
css:
|
|
3130
|
+
css: K(to),
|
|
3131
3131
|
options: {
|
|
3132
3132
|
duration: 1e3,
|
|
3133
3133
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -3135,7 +3135,7 @@ var Ca = class extends ca {
|
|
|
3135
3135
|
group: "enter"
|
|
3136
3136
|
},
|
|
3137
3137
|
slideOutRight: {
|
|
3138
|
-
css:
|
|
3138
|
+
css: K(no),
|
|
3139
3139
|
options: {
|
|
3140
3140
|
duration: 1e3,
|
|
3141
3141
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -3143,7 +3143,7 @@ var Ca = class extends ca {
|
|
|
3143
3143
|
group: "exit"
|
|
3144
3144
|
},
|
|
3145
3145
|
hover: {
|
|
3146
|
-
css:
|
|
3146
|
+
css: K(ro),
|
|
3147
3147
|
options: {
|
|
3148
3148
|
duration: 3e3,
|
|
3149
3149
|
timingFunction: "ease-in-out",
|
|
@@ -3154,7 +3154,7 @@ var Ca = class extends ca {
|
|
|
3154
3154
|
group: "loop"
|
|
3155
3155
|
},
|
|
3156
3156
|
garlandSway: {
|
|
3157
|
-
css:
|
|
3157
|
+
css: io,
|
|
3158
3158
|
options: {
|
|
3159
3159
|
duration: 4200,
|
|
3160
3160
|
timingFunction: "ease-in-out",
|
|
@@ -3165,16 +3165,16 @@ var Ca = class extends ca {
|
|
|
3165
3165
|
group: "loop"
|
|
3166
3166
|
},
|
|
3167
3167
|
unfurl: {
|
|
3168
|
-
css:
|
|
3168
|
+
css: ao,
|
|
3169
3169
|
options: {
|
|
3170
3170
|
duration: 900,
|
|
3171
|
-
timingFunction:
|
|
3171
|
+
timingFunction: l(mo),
|
|
3172
3172
|
fillMode: "none"
|
|
3173
3173
|
},
|
|
3174
3174
|
group: "enter"
|
|
3175
3175
|
},
|
|
3176
3176
|
jumpUp: {
|
|
3177
|
-
css:
|
|
3177
|
+
css: K(oo),
|
|
3178
3178
|
options: {
|
|
3179
3179
|
duration: 700,
|
|
3180
3180
|
timingFunction: "ease-in-bounce"
|
|
@@ -3182,7 +3182,7 @@ var Ca = class extends ca {
|
|
|
3182
3182
|
group: "enter"
|
|
3183
3183
|
},
|
|
3184
3184
|
jumpDown: {
|
|
3185
|
-
css:
|
|
3185
|
+
css: K(so),
|
|
3186
3186
|
options: {
|
|
3187
3187
|
duration: 700,
|
|
3188
3188
|
timingFunction: "ease-in-bounce"
|
|
@@ -3190,143 +3190,143 @@ var Ca = class extends ca {
|
|
|
3190
3190
|
group: "exit"
|
|
3191
3191
|
},
|
|
3192
3192
|
springScaleIn: {
|
|
3193
|
-
css:
|
|
3193
|
+
css: ho.springScaleInKeyframes,
|
|
3194
3194
|
options: {
|
|
3195
3195
|
duration: 600,
|
|
3196
|
-
timingFunction:
|
|
3196
|
+
timingFunction: l(lo)
|
|
3197
3197
|
},
|
|
3198
3198
|
group: "enter"
|
|
3199
3199
|
},
|
|
3200
3200
|
springSlideIn: {
|
|
3201
|
-
css:
|
|
3201
|
+
css: ho.springSlideInKeyframes,
|
|
3202
3202
|
options: {
|
|
3203
3203
|
duration: 600,
|
|
3204
|
-
timingFunction:
|
|
3204
|
+
timingFunction: l(co)
|
|
3205
3205
|
},
|
|
3206
3206
|
group: "enter"
|
|
3207
3207
|
},
|
|
3208
3208
|
springPop: {
|
|
3209
|
-
css:
|
|
3209
|
+
css: ho.springPopKeyframes,
|
|
3210
3210
|
options: {
|
|
3211
3211
|
duration: 700,
|
|
3212
|
-
timingFunction:
|
|
3212
|
+
timingFunction: l(lo)
|
|
3213
3213
|
},
|
|
3214
3214
|
group: "attention"
|
|
3215
3215
|
},
|
|
3216
3216
|
springWobble: {
|
|
3217
|
-
css:
|
|
3217
|
+
css: ho.springWobbleKeyframes,
|
|
3218
3218
|
options: {
|
|
3219
3219
|
duration: 800,
|
|
3220
|
-
timingFunction:
|
|
3220
|
+
timingFunction: l(uo)
|
|
3221
3221
|
},
|
|
3222
3222
|
group: "attention"
|
|
3223
3223
|
}
|
|
3224
|
-
},
|
|
3224
|
+
}, _o = (e) => (t) => new U({
|
|
3225
3225
|
...e.options,
|
|
3226
3226
|
...t ?? {}
|
|
3227
|
-
}).fromString(e.css),
|
|
3228
|
-
enter:
|
|
3229
|
-
exit:
|
|
3230
|
-
attention:
|
|
3231
|
-
loop:
|
|
3232
|
-
},
|
|
3233
|
-
accordionExpand: () =>
|
|
3234
|
-
attentionPresets: () =>
|
|
3235
|
-
blurIn: () =>
|
|
3236
|
-
blurInOut: () =>
|
|
3237
|
-
blurOut: () =>
|
|
3238
|
-
bounce: () =>
|
|
3239
|
-
enterPresets: () =>
|
|
3240
|
-
exitPresets: () =>
|
|
3241
|
-
fadeIn: () =>
|
|
3242
|
-
fadeOut: () =>
|
|
3243
|
-
flipPreset: () =>
|
|
3244
|
-
garlandSway: () =>
|
|
3245
|
-
glow: () =>
|
|
3246
|
-
gradientBackground: () =>
|
|
3247
|
-
heartbeat: () =>
|
|
3248
|
-
hover: () =>
|
|
3249
|
-
jumpDown: () =>
|
|
3250
|
-
jumpUp: () =>
|
|
3251
|
-
loopPresets: () =>
|
|
3252
|
-
notificationBounce: () =>
|
|
3253
|
-
parallaxScroll: () =>
|
|
3254
|
-
presetTaxonomy: () =>
|
|
3255
|
-
progressBar: () =>
|
|
3256
|
-
pulse: () =>
|
|
3257
|
-
rainbowText: () =>
|
|
3258
|
-
rotateIn: () =>
|
|
3259
|
-
rotateScale: () =>
|
|
3260
|
-
shake: () =>
|
|
3261
|
-
skeletonLoading: () =>
|
|
3262
|
-
slideIn: () =>
|
|
3263
|
-
slideInLeft: () =>
|
|
3264
|
-
slideInRight: () =>
|
|
3265
|
-
slideOutLeft: () =>
|
|
3266
|
-
slideOutRight: () =>
|
|
3267
|
-
spinner: () =>
|
|
3268
|
-
springPop: () =>
|
|
3269
|
-
springScaleIn: () =>
|
|
3270
|
-
springSlideIn: () =>
|
|
3271
|
-
springWobble: () =>
|
|
3272
|
-
textFocusBlur: () =>
|
|
3273
|
-
typewriter: () =>
|
|
3274
|
-
typingCursor: () =>
|
|
3275
|
-
unfurl: () =>
|
|
3276
|
-
warpLeft: () =>
|
|
3277
|
-
warpRight: () =>
|
|
3278
|
-
}),
|
|
3227
|
+
}).fromString(e.css), vo = Object.fromEntries(Object.entries(go).map(([e, t]) => [e, _o(t)])), { fadeIn: yo, fadeOut: bo, pulse: xo, shake: So, bounce: Co, flipPreset: wo, rotateIn: To, slideIn: Eo, heartbeat: Do, glow: Oo, typewriter: ko, rainbowText: Ao, warpLeft: jo, warpRight: Mo, blurIn: No, blurOut: Po, blurInOut: Fo, progressBar: Io, skeletonLoading: Lo, textFocusBlur: Ro, gradientBackground: zo, rotateScale: Bo, typingCursor: Vo, accordionExpand: Ho, notificationBounce: Uo, spinner: Wo, parallaxScroll: Go, slideInLeft: Ko, slideOutLeft: qo, slideInRight: Jo, slideOutRight: Yo, hover: Xo, garlandSway: Zo, unfurl: Qo, jumpUp: $o, jumpDown: es, springScaleIn: ts, springSlideIn: ns, springPop: rs, springWobble: is } = vo, as = (e) => Object.fromEntries(Object.entries(go).filter(([, t]) => t.group === e).map(([e, t]) => [t.taxonomyName ?? e, vo[e]])), os = as("enter"), ss = as("exit"), cs = as("attention"), ls = as("loop"), us = {
|
|
3228
|
+
enter: os,
|
|
3229
|
+
exit: ss,
|
|
3230
|
+
attention: cs,
|
|
3231
|
+
loop: ls
|
|
3232
|
+
}, ds = /* @__PURE__ */ Ne({
|
|
3233
|
+
accordionExpand: () => Ho,
|
|
3234
|
+
attentionPresets: () => cs,
|
|
3235
|
+
blurIn: () => No,
|
|
3236
|
+
blurInOut: () => Fo,
|
|
3237
|
+
blurOut: () => Po,
|
|
3238
|
+
bounce: () => Co,
|
|
3239
|
+
enterPresets: () => os,
|
|
3240
|
+
exitPresets: () => ss,
|
|
3241
|
+
fadeIn: () => yo,
|
|
3242
|
+
fadeOut: () => bo,
|
|
3243
|
+
flipPreset: () => wo,
|
|
3244
|
+
garlandSway: () => Zo,
|
|
3245
|
+
glow: () => Oo,
|
|
3246
|
+
gradientBackground: () => zo,
|
|
3247
|
+
heartbeat: () => Do,
|
|
3248
|
+
hover: () => Xo,
|
|
3249
|
+
jumpDown: () => es,
|
|
3250
|
+
jumpUp: () => $o,
|
|
3251
|
+
loopPresets: () => ls,
|
|
3252
|
+
notificationBounce: () => Uo,
|
|
3253
|
+
parallaxScroll: () => Go,
|
|
3254
|
+
presetTaxonomy: () => us,
|
|
3255
|
+
progressBar: () => Io,
|
|
3256
|
+
pulse: () => xo,
|
|
3257
|
+
rainbowText: () => Ao,
|
|
3258
|
+
rotateIn: () => To,
|
|
3259
|
+
rotateScale: () => Bo,
|
|
3260
|
+
shake: () => So,
|
|
3261
|
+
skeletonLoading: () => Lo,
|
|
3262
|
+
slideIn: () => Eo,
|
|
3263
|
+
slideInLeft: () => Ko,
|
|
3264
|
+
slideInRight: () => Jo,
|
|
3265
|
+
slideOutLeft: () => qo,
|
|
3266
|
+
slideOutRight: () => Yo,
|
|
3267
|
+
spinner: () => Wo,
|
|
3268
|
+
springPop: () => rs,
|
|
3269
|
+
springScaleIn: () => ts,
|
|
3270
|
+
springSlideIn: () => ns,
|
|
3271
|
+
springWobble: () => is,
|
|
3272
|
+
textFocusBlur: () => Ro,
|
|
3273
|
+
typewriter: () => ko,
|
|
3274
|
+
typingCursor: () => Vo,
|
|
3275
|
+
unfurl: () => Qo,
|
|
3276
|
+
warpLeft: () => jo,
|
|
3277
|
+
warpRight: () => Mo
|
|
3278
|
+
}), fs = (e, t, n, r = {}) => {
|
|
3279
3279
|
e.push({
|
|
3280
3280
|
code: t,
|
|
3281
3281
|
message: n,
|
|
3282
3282
|
...r
|
|
3283
3283
|
});
|
|
3284
|
-
},
|
|
3284
|
+
}, ps = (e) => {
|
|
3285
3285
|
if (typeof CSSKeyframesRule < "u" && e instanceof CSSKeyframesRule) return !0;
|
|
3286
3286
|
let t = e;
|
|
3287
3287
|
return t.type === 7 && typeof t.name == "string" && typeof t.cssText == "string";
|
|
3288
|
-
},
|
|
3288
|
+
}, ms = 32, hs = (e) => {
|
|
3289
3289
|
let t = (t) => typeof e?.getPropertyValue == "function" ? String(e.getPropertyValue(t) ?? "") : "", n = `${t("animation-name")} ${t("animation")}`;
|
|
3290
3290
|
return new Set(n.split(/[\s,]+/).filter((e) => e !== ""));
|
|
3291
|
-
},
|
|
3291
|
+
}, gs = (e) => e.cssRules !== void 0 && !ps(e), _s = (e, t, n, r = 0) => {
|
|
3292
3292
|
let i = [];
|
|
3293
3293
|
for (let t = 0; t < e.length; t++) {
|
|
3294
3294
|
let n = e[t];
|
|
3295
3295
|
n?.type === 1 && typeof n.cssText == "string" && i.push({
|
|
3296
3296
|
cssText: n.cssText,
|
|
3297
|
-
names:
|
|
3297
|
+
names: hs(n.style)
|
|
3298
3298
|
});
|
|
3299
3299
|
}
|
|
3300
3300
|
for (let r = 0; r < e.length; r++) {
|
|
3301
3301
|
let a = e[r];
|
|
3302
|
-
if (a == null || !
|
|
3302
|
+
if (a == null || !ps(a)) continue;
|
|
3303
3303
|
let o = a.name;
|
|
3304
3304
|
if (n.animationName != null && o !== n.animationName) continue;
|
|
3305
|
-
let s = i.find((e) => e.names.has(o))?.cssText, c = [], l =
|
|
3305
|
+
let s = i.find((e) => e.names.has(o))?.cssText, c = [], l = vs(a.cssText, s, n.options, c);
|
|
3306
3306
|
l != null && t.set(o, {
|
|
3307
3307
|
name: o,
|
|
3308
3308
|
animation: l,
|
|
3309
3309
|
diagnostics: c
|
|
3310
3310
|
});
|
|
3311
3311
|
}
|
|
3312
|
-
if (r <
|
|
3312
|
+
if (r < ms) for (let i = 0; i < e.length; i++) {
|
|
3313
3313
|
let a = e[i];
|
|
3314
|
-
a == null || !
|
|
3314
|
+
a == null || !gs(a) || _s(a.cssRules, t, n, r + 1);
|
|
3315
3315
|
}
|
|
3316
|
-
},
|
|
3316
|
+
}, vs = (e, t, n, r) => {
|
|
3317
3317
|
try {
|
|
3318
3318
|
let i = new U(n ?? {}), a = t ? `${t}\n${e}` : e;
|
|
3319
3319
|
i.fromString(a);
|
|
3320
3320
|
for (let e of i.diagnostics) r.push(e);
|
|
3321
3321
|
return i;
|
|
3322
3322
|
} catch (t) {
|
|
3323
|
-
|
|
3323
|
+
fs(r, "PARSE_ERROR", `@keyframes rule could not be reconstructed: ${t instanceof Error ? t.message : String(t)} — the source CSS could not be parsed faithfully (refused, not approximated)`, { input: e });
|
|
3324
3324
|
return;
|
|
3325
3325
|
}
|
|
3326
|
-
},
|
|
3326
|
+
}, ys = (e, t = {}) => {
|
|
3327
3327
|
let n = /* @__PURE__ */ new Map(), r = [], i;
|
|
3328
3328
|
if (e == null) {
|
|
3329
|
-
if (typeof document > "u") return
|
|
3329
|
+
if (typeof document > "u") return fs(r, "CORS_SKIP", "no document in scope — resolveLiveKeyframes() needs a Document, a ShadowRoot, a CSSStyleSheet[], or a CSSStyleSheet (SSR has no live CSSOM)"), {
|
|
3330
3330
|
animations: n,
|
|
3331
3331
|
diagnostics: r
|
|
3332
3332
|
};
|
|
@@ -3338,18 +3338,18 @@ var Ca = class extends ca {
|
|
|
3338
3338
|
i = e.cssRules;
|
|
3339
3339
|
} catch (t) {
|
|
3340
3340
|
let n = e.href ?? "(inline)";
|
|
3341
|
-
|
|
3341
|
+
fs(r, "CORS_SKIP", `cross-origin stylesheet skipped: ${n} — its cssRules threw ${t instanceof Error ? t.name : "an error"} (no Access-Control-Allow-Origin + crossorigin). The sheet is REPORTED, not silently dropped.`, { input: n });
|
|
3342
3342
|
continue;
|
|
3343
3343
|
}
|
|
3344
|
-
i != null &&
|
|
3344
|
+
i != null && _s(i, n, t);
|
|
3345
3345
|
}
|
|
3346
3346
|
return {
|
|
3347
3347
|
animations: n,
|
|
3348
3348
|
diagnostics: r
|
|
3349
3349
|
};
|
|
3350
|
-
},
|
|
3350
|
+
}, bs = (e, t = {}) => ys(e, t), xs = (e, t = {}) => {
|
|
3351
3351
|
let n = /* @__PURE__ */ new Map(), r = [], i = e ?? (typeof document < "u" ? document : void 0);
|
|
3352
|
-
if (i == null || typeof i.getAnimations != "function") return
|
|
3352
|
+
if (i == null || typeof i.getAnimations != "function") return fs(r, "CORS_SKIP", "no getAnimations() in scope — fromLiveAnimations() needs a Document or Element with the Web Animations API (SSR has none)"), {
|
|
3353
3353
|
animations: n,
|
|
3354
3354
|
diagnostics: r
|
|
3355
3355
|
};
|
|
@@ -3360,7 +3360,7 @@ var Ca = class extends ca {
|
|
|
3360
3360
|
}
|
|
3361
3361
|
let o = (i instanceof Document ? i : i.ownerDocument ?? (typeof document < "u" ? document : void 0)) ?? void 0;
|
|
3362
3362
|
for (let e of a) {
|
|
3363
|
-
let i =
|
|
3363
|
+
let i = ys(o, {
|
|
3364
3364
|
...t,
|
|
3365
3365
|
animationName: e
|
|
3366
3366
|
});
|
|
@@ -3371,11 +3371,11 @@ var Ca = class extends ca {
|
|
|
3371
3371
|
animations: n,
|
|
3372
3372
|
diagnostics: r
|
|
3373
3373
|
};
|
|
3374
|
-
},
|
|
3374
|
+
}, Ss = (e) => {
|
|
3375
3375
|
if (typeof e != "object" || !e) return !1;
|
|
3376
3376
|
let t = e;
|
|
3377
3377
|
return typeof t.value == "number" && typeof t.unit == "string";
|
|
3378
|
-
},
|
|
3378
|
+
}, Cs = async (e, t) => {
|
|
3379
3379
|
let n = [], { animationName: r, commit: i = !0 } = t;
|
|
3380
3380
|
if (typeof e.getAnimations != "function") return n.push({
|
|
3381
3381
|
code: "WAAPI_INELIGIBLE",
|
|
@@ -3396,7 +3396,7 @@ var Ca = class extends ca {
|
|
|
3396
3396
|
};
|
|
3397
3397
|
let o = a.currentTime, s = null, c = 0;
|
|
3398
3398
|
if (typeof o == "number" && Number.isFinite(o)) c = o;
|
|
3399
|
-
else if (
|
|
3399
|
+
else if (Ss(o)) if (o.unit === "percent" && Number.isFinite(o.value)) s = o.value / 100;
|
|
3400
3400
|
else return n.push({
|
|
3401
3401
|
code: "ADOPT_REFUSE",
|
|
3402
3402
|
message: `the running animation "${r}" reports a currentTime in an unsupported unit "${String(o.unit)}" — adoptRunning() refuses (only a numeric ms playhead or a scroll-driven "percent" CSSUnitValue can seed the takeover faithfully)`
|
|
@@ -3405,7 +3405,7 @@ var Ca = class extends ca {
|
|
|
3405
3405
|
currentTime: 0,
|
|
3406
3406
|
diagnostics: n
|
|
3407
3407
|
};
|
|
3408
|
-
let l =
|
|
3408
|
+
let l = ys(e.ownerDocument ?? (typeof document < "u" ? document : void 0) ?? void 0, {
|
|
3409
3409
|
...t,
|
|
3410
3410
|
animationName: r
|
|
3411
3411
|
});
|
|
@@ -3427,14 +3427,14 @@ var Ca = class extends ca {
|
|
|
3427
3427
|
try {
|
|
3428
3428
|
a.cancel();
|
|
3429
3429
|
} catch {}
|
|
3430
|
-
return
|
|
3430
|
+
return ws(d, f), {
|
|
3431
3431
|
animation: d,
|
|
3432
3432
|
currentTime: f,
|
|
3433
3433
|
diagnostics: n
|
|
3434
3434
|
};
|
|
3435
|
-
},
|
|
3435
|
+
}, ws = (e, t) => {
|
|
3436
3436
|
e.setUseWAAPI(!1), e.setDelay(0), e.onStart(), e.started = !0, e.startTime = (typeof performance < "u" && performance.now ? performance.now() : Date.now()) - t, e.t = t, e.play();
|
|
3437
|
-
},
|
|
3437
|
+
}, Ts = {
|
|
3438
3438
|
entry: j.entry,
|
|
3439
3439
|
cover: j.cover,
|
|
3440
3440
|
contain: j.contain,
|
|
@@ -3452,7 +3452,7 @@ var Ca = class extends ca {
|
|
|
3452
3452
|
end: 1
|
|
3453
3453
|
}
|
|
3454
3454
|
};
|
|
3455
|
-
function
|
|
3455
|
+
function Es(e) {
|
|
3456
3456
|
if (e == null) return null;
|
|
3457
3457
|
let t = e.trim();
|
|
3458
3458
|
if (t.endsWith("%")) {
|
|
@@ -3461,24 +3461,24 @@ function ws(e) {
|
|
|
3461
3461
|
}
|
|
3462
3462
|
return null;
|
|
3463
3463
|
}
|
|
3464
|
-
function
|
|
3464
|
+
function Ds(e, t) {
|
|
3465
3465
|
if (e == null) return t;
|
|
3466
|
-
let n =
|
|
3466
|
+
let n = Es(e.offset);
|
|
3467
3467
|
if (n != null) {
|
|
3468
3468
|
if (e.phase != null && e.phase !== "normal") {
|
|
3469
|
-
let t =
|
|
3469
|
+
let t = Ts[e.phase];
|
|
3470
3470
|
return t.start + n * (t.end - t.start);
|
|
3471
3471
|
}
|
|
3472
3472
|
return n;
|
|
3473
3473
|
}
|
|
3474
|
-
return e.phase == null ? t :
|
|
3474
|
+
return e.phase == null ? t : Ts[e.phase].start;
|
|
3475
3475
|
}
|
|
3476
|
-
function
|
|
3476
|
+
function Os(e) {
|
|
3477
3477
|
if (e == null) return {
|
|
3478
3478
|
start: 0,
|
|
3479
3479
|
end: 1
|
|
3480
3480
|
};
|
|
3481
|
-
let t =
|
|
3481
|
+
let t = Ds(e.start, 0), n = Ds(e.end, 1);
|
|
3482
3482
|
return n > t ? {
|
|
3483
3483
|
start: t,
|
|
3484
3484
|
end: n
|
|
@@ -3489,7 +3489,7 @@ function Es(e) {
|
|
|
3489
3489
|
}
|
|
3490
3490
|
//#endregion
|
|
3491
3491
|
//#region src/animation/scroll/scene.ts
|
|
3492
|
-
var
|
|
3492
|
+
var ks = class {
|
|
3493
3493
|
resolvedRange;
|
|
3494
3494
|
snapPoints;
|
|
3495
3495
|
snapSpring;
|
|
@@ -3500,22 +3500,22 @@ var Ds = class {
|
|
|
3500
3500
|
wasInside = !1;
|
|
3501
3501
|
subscribers = new Map([["enter", /* @__PURE__ */ new Set()], ["leave", /* @__PURE__ */ new Set()]]);
|
|
3502
3502
|
constructor(e = {}) {
|
|
3503
|
-
if (this.resolvedRange =
|
|
3504
|
-
let t =
|
|
3505
|
-
this.smoother = new
|
|
3503
|
+
if (this.resolvedRange = Os(e.range), this.scrubSeconds = e.scrub ?? 0, this.snapPoints = e.snap != null && e.snap.length > 0 ? e.snap : void 0, this.scrubSeconds > 0) {
|
|
3504
|
+
let t = _(1 / (this.scrubSeconds * 60 + 1), .01, 1);
|
|
3505
|
+
this.smoother = new u({
|
|
3506
3506
|
damping: t,
|
|
3507
3507
|
clamp: !0,
|
|
3508
3508
|
...e.smoothing
|
|
3509
3509
|
});
|
|
3510
3510
|
}
|
|
3511
|
-
this.snapPoints != null && (this.snapSpring = new
|
|
3511
|
+
this.snapPoints != null && (this.snapSpring = new p({ ...e.snapSpring }));
|
|
3512
3512
|
}
|
|
3513
3513
|
get range() {
|
|
3514
3514
|
return this.resolvedRange;
|
|
3515
3515
|
}
|
|
3516
3516
|
scrollProgress(e) {
|
|
3517
|
-
this.rawScroll =
|
|
3518
|
-
let { start: t, end: n } = this.resolvedRange, r = n - t, i = r > 0 ?
|
|
3517
|
+
this.rawScroll = _(e, 0, 1);
|
|
3518
|
+
let { start: t, end: n } = this.resolvedRange, r = n - t, i = r > 0 ? _((this.rawScroll - t) / r, 0, 1) : 0, a = this.rawScroll >= t && this.rawScroll <= n;
|
|
3519
3519
|
return a && !this.wasInside && this.fire("enter", i), !a && this.wasInside && this.fire("leave", i), this.wasInside = a, this.smoother ? (this.smoother.setTarget(i), this.localProgress = this.smoother.current) : this.localProgress = i, this.localProgress;
|
|
3520
3520
|
}
|
|
3521
3521
|
tick(e) {
|
|
@@ -3529,7 +3529,7 @@ var Ds = class {
|
|
|
3529
3529
|
}
|
|
3530
3530
|
snapTo(e = 0) {
|
|
3531
3531
|
if (this.snapPoints == null || this.snapSpring == null) return null;
|
|
3532
|
-
let t =
|
|
3532
|
+
let t = _(f({
|
|
3533
3533
|
initial: this.localProgress,
|
|
3534
3534
|
velocity: e
|
|
3535
3535
|
}), 0, 1), n = this.snapPoints[0], r = Math.abs(t - n);
|
|
@@ -3550,12 +3550,12 @@ var Ds = class {
|
|
|
3550
3550
|
for (let n of this.subscribers.get(e)) n(t);
|
|
3551
3551
|
}
|
|
3552
3552
|
};
|
|
3553
|
-
function
|
|
3554
|
-
return new
|
|
3553
|
+
function As(e = {}) {
|
|
3554
|
+
return new ks(e);
|
|
3555
3555
|
}
|
|
3556
3556
|
//#endregion
|
|
3557
3557
|
//#region src/animation/scroll/dispatch.ts
|
|
3558
|
-
function
|
|
3558
|
+
function js(e) {
|
|
3559
3559
|
let { animation: t, nativeSpec: n, scrub: r, snap: i, velocity: a } = e;
|
|
3560
3560
|
if (r) return {
|
|
3561
3561
|
backend: "js",
|
|
@@ -3578,12 +3578,12 @@ function ks(e) {
|
|
|
3578
3578
|
backend: "js",
|
|
3579
3579
|
reason: o.reason
|
|
3580
3580
|
};
|
|
3581
|
-
let s =
|
|
3581
|
+
let s = h(n);
|
|
3582
3582
|
if (s == null) return {
|
|
3583
3583
|
backend: "js",
|
|
3584
3584
|
reason: "native scroll/view timeline unavailable (feature absent)"
|
|
3585
3585
|
};
|
|
3586
|
-
let c =
|
|
3586
|
+
let c = Cn(t, n, {
|
|
3587
3587
|
eligibility: o,
|
|
3588
3588
|
timeline: s
|
|
3589
3589
|
});
|
|
@@ -3595,13 +3595,13 @@ function ks(e) {
|
|
|
3595
3595
|
reason: c.reason
|
|
3596
3596
|
};
|
|
3597
3597
|
}
|
|
3598
|
-
function
|
|
3598
|
+
function Ms(e) {
|
|
3599
3599
|
let t = ["position: sticky;"];
|
|
3600
3600
|
return e?.bottom == null ? t.push(`top: ${e?.top ?? 0}px;`) : t.push(`bottom: ${e.bottom}px;`), t.join(" ");
|
|
3601
3601
|
}
|
|
3602
3602
|
//#endregion
|
|
3603
3603
|
//#region src/animation/scroll/trigger.ts
|
|
3604
|
-
function
|
|
3604
|
+
function Ns() {
|
|
3605
3605
|
let e = globalThis.CSS;
|
|
3606
3606
|
if (e == null || typeof e.supports != "function") return !1;
|
|
3607
3607
|
try {
|
|
@@ -3610,7 +3610,7 @@ function js() {
|
|
|
3610
3610
|
return !1;
|
|
3611
3611
|
}
|
|
3612
3612
|
}
|
|
3613
|
-
var
|
|
3613
|
+
var Ps = class {
|
|
3614
3614
|
type;
|
|
3615
3615
|
triggerRange;
|
|
3616
3616
|
_state = "idle";
|
|
@@ -3620,7 +3620,7 @@ var Ms = class {
|
|
|
3620
3620
|
wasInside = !1;
|
|
3621
3621
|
everEntered = !1;
|
|
3622
3622
|
constructor(e = {}) {
|
|
3623
|
-
this.type = e.type ?? "once", this.triggerRange =
|
|
3623
|
+
this.type = e.type ?? "once", this.triggerRange = Os(e.range);
|
|
3624
3624
|
}
|
|
3625
3625
|
get state() {
|
|
3626
3626
|
return this._state;
|
|
@@ -3638,10 +3638,10 @@ var Ms = class {
|
|
|
3638
3638
|
return this.triggerRange;
|
|
3639
3639
|
}
|
|
3640
3640
|
get usesNative() {
|
|
3641
|
-
return
|
|
3641
|
+
return Ns();
|
|
3642
3642
|
}
|
|
3643
3643
|
triggerProgress(e) {
|
|
3644
|
-
let t =
|
|
3644
|
+
let t = _(e, 0, 1), { start: n, end: r } = this.triggerRange, i = r - n, a = i > 0 ? _((t - n) / i, 0, 1) : 0, o = t >= n && t <= r, s = o && !this.wasInside, c = !o && this.wasInside, l = c && t > r;
|
|
3645
3645
|
switch (this.type) {
|
|
3646
3646
|
case "repeat":
|
|
3647
3647
|
this.stepRepeat(o, s, c, a);
|
|
@@ -3677,18 +3677,18 @@ var Ms = class {
|
|
|
3677
3677
|
return this._direction === "forward" ? e : 1 - e;
|
|
3678
3678
|
}
|
|
3679
3679
|
};
|
|
3680
|
-
function
|
|
3681
|
-
return new
|
|
3680
|
+
function Fs(e = {}) {
|
|
3681
|
+
return new Ps("trigger" in e && e.trigger != null ? e.trigger : e);
|
|
3682
3682
|
}
|
|
3683
3683
|
//#endregion
|
|
3684
3684
|
//#region src/animation/scroll/drive.ts
|
|
3685
|
-
function
|
|
3685
|
+
function Is(e) {
|
|
3686
3686
|
return typeof e == "object" && !!e && "targets" in e && "play" in e;
|
|
3687
3687
|
}
|
|
3688
|
-
function
|
|
3688
|
+
function Ls(e) {
|
|
3689
3689
|
return typeof Element < "u" && e instanceof Element;
|
|
3690
3690
|
}
|
|
3691
|
-
function
|
|
3691
|
+
function Rs(e, t, n) {
|
|
3692
3692
|
if (n.nativeSpec != null) return n.nativeSpec;
|
|
3693
3693
|
let r = e.timeline;
|
|
3694
3694
|
if (r?.kind === "scroll") return {
|
|
@@ -3697,7 +3697,7 @@ function Is(e, t, n) {
|
|
|
3697
3697
|
...n.axis ?? r.axis ? { axis: n.axis ?? r.axis } : {}
|
|
3698
3698
|
};
|
|
3699
3699
|
if (r?.kind === "view") {
|
|
3700
|
-
let e = n.subject ?? (
|
|
3700
|
+
let e = n.subject ?? (Ls(t) ? t : Is(t) && Ls(t.targets[0]) ? t.targets[0] : void 0);
|
|
3701
3701
|
return e == null ? void 0 : {
|
|
3702
3702
|
kind: "view",
|
|
3703
3703
|
subject: e,
|
|
@@ -3706,13 +3706,13 @@ function Is(e, t, n) {
|
|
|
3706
3706
|
};
|
|
3707
3707
|
}
|
|
3708
3708
|
}
|
|
3709
|
-
function
|
|
3710
|
-
let r =
|
|
3709
|
+
function zs(e, t, n = {}) {
|
|
3710
|
+
let r = Is(t) ? t : n.animation, { nativeSpec: i, animation: a, velocity: o, source: s, subject: c, axis: l, inset: u, ...d } = n, f = As({
|
|
3711
3711
|
...d,
|
|
3712
3712
|
range: e.range
|
|
3713
|
-
}), p = e.trigger == null ? void 0 :
|
|
3713
|
+
}), p = e.trigger == null ? void 0 : Fs(e), m = js({
|
|
3714
3714
|
animation: r,
|
|
3715
|
-
nativeSpec:
|
|
3715
|
+
nativeSpec: Rs(e, t, n),
|
|
3716
3716
|
scrub: n.scrub != null && n.scrub > 0,
|
|
3717
3717
|
snap: n.snap != null && n.snap.length > 0,
|
|
3718
3718
|
velocity: n.velocity
|
|
@@ -3726,35 +3726,35 @@ function Ls(e, t, n = {}) {
|
|
|
3726
3726
|
}
|
|
3727
3727
|
//#endregion
|
|
3728
3728
|
//#region src/animation/scroll/grammar.ts
|
|
3729
|
-
var
|
|
3730
|
-
function zs(e) {
|
|
3731
|
-
return C(pe(e), Rs(e));
|
|
3732
|
-
}
|
|
3733
|
-
function Bs(e) {
|
|
3734
|
-
return C(ae(e), Rs(e));
|
|
3735
|
-
}
|
|
3729
|
+
var Bs = (e) => ([t]) => /* @__PURE__ */ TypeError(`Invalid CSS value ${JSON.stringify(e)}: ${t.code} at ${t.start}-${t.end}.`);
|
|
3736
3730
|
function Vs(e) {
|
|
3737
|
-
return
|
|
3731
|
+
return S(me(e), Bs(e));
|
|
3738
3732
|
}
|
|
3739
3733
|
function Hs(e) {
|
|
3740
|
-
return
|
|
3734
|
+
return S(oe(e), Bs(e));
|
|
3741
3735
|
}
|
|
3742
3736
|
function Us(e) {
|
|
3743
|
-
|
|
3737
|
+
return ue(ie(typeof e == "string" ? S(te(e), Bs(e)) : e).at(-1)?.rule.declarations ?? []);
|
|
3738
|
+
}
|
|
3739
|
+
function Ws(e) {
|
|
3740
|
+
return re(e);
|
|
3741
|
+
}
|
|
3742
|
+
function Gs(e) {
|
|
3743
|
+
let t = Us(e);
|
|
3744
3744
|
return {
|
|
3745
3745
|
options: t,
|
|
3746
|
-
declarations:
|
|
3746
|
+
declarations: Ws(t)
|
|
3747
3747
|
};
|
|
3748
3748
|
}
|
|
3749
3749
|
//#endregion
|
|
3750
3750
|
//#region src/animation/compile/emit/backward/walk.ts
|
|
3751
|
-
function
|
|
3751
|
+
function Ks(e) {
|
|
3752
3752
|
let t = [];
|
|
3753
3753
|
for (let n of Object.keys(e.animations)) {
|
|
3754
|
-
let r = e.animations[n], i = r.layer.op, a =
|
|
3754
|
+
let r = e.animations[n], i = r.layer.op, a = W(r.layer) && r.layer.weightSpring != null, o = W(r.layer) && r.layer.weightSpring == null, s = i === "add" || i === "accumulate" ? i : o ? "accumulate" : "replace";
|
|
3755
3755
|
t.push({
|
|
3756
3756
|
animation: r.animation,
|
|
3757
|
-
name:
|
|
3757
|
+
name: q(H(r.animation)),
|
|
3758
3758
|
composition: s,
|
|
3759
3759
|
weightBlend: a,
|
|
3760
3760
|
...o ? { staticWeight: r.layer.weight } : {},
|
|
@@ -3763,57 +3763,57 @@ function Ws(e) {
|
|
|
3763
3763
|
}
|
|
3764
3764
|
return t;
|
|
3765
3765
|
}
|
|
3766
|
-
function
|
|
3766
|
+
function qs(e) {
|
|
3767
3767
|
return e.entries.map((e) => ({
|
|
3768
3768
|
animation: e.animation,
|
|
3769
|
-
name:
|
|
3769
|
+
name: q(H(e.animation)),
|
|
3770
3770
|
composition: "replace",
|
|
3771
3771
|
weightBlend: !1,
|
|
3772
3772
|
delay: e.at
|
|
3773
3773
|
}));
|
|
3774
3774
|
}
|
|
3775
|
-
function
|
|
3775
|
+
function Js(e) {
|
|
3776
3776
|
return e.map((e, t) => {
|
|
3777
3777
|
let n = "animation" in e ? e.animation : e;
|
|
3778
3778
|
return {
|
|
3779
3779
|
animation: n,
|
|
3780
|
-
name:
|
|
3780
|
+
name: q(H(n) || `anim-${t}`),
|
|
3781
3781
|
composition: "replace",
|
|
3782
3782
|
weightBlend: !1,
|
|
3783
3783
|
delay: 0
|
|
3784
3784
|
};
|
|
3785
3785
|
});
|
|
3786
3786
|
}
|
|
3787
|
-
function
|
|
3787
|
+
function q(e) {
|
|
3788
3788
|
let t = e.replace(/[^a-zA-Z0-9_-]/g, "-");
|
|
3789
3789
|
return /^[a-zA-Z_]/.test(t) ? t : `a${t}`;
|
|
3790
3790
|
}
|
|
3791
3791
|
//#endregion
|
|
3792
3792
|
//#region src/animation/compile/emit/easing-serialize.ts
|
|
3793
|
-
var
|
|
3794
|
-
function
|
|
3795
|
-
return
|
|
3793
|
+
var Ys = /^(linear|ease|ease-in|ease-out|ease-in-out|step-start|step-end)$/;
|
|
3794
|
+
function Xs(e, t = 32) {
|
|
3795
|
+
return o(Array.from({ length: t + 1 }, (n, r) => e(r / t)));
|
|
3796
3796
|
}
|
|
3797
|
-
function
|
|
3797
|
+
function J(e) {
|
|
3798
3798
|
if (e.css !== void 0) return e.css;
|
|
3799
|
-
let
|
|
3800
|
-
if (
|
|
3801
|
-
let r = k(
|
|
3802
|
-
return
|
|
3799
|
+
let n = fe.find(([t, n]) => n === e.fn)?.[0];
|
|
3800
|
+
if (n === void 0) throw new t("timingFunction", e.fn, "a custom TimingFunction has no CSS animation-timing-function representation — attach a faithful Easing.css twin, or use a registry name / cubic-bezier() / linear() literal");
|
|
3801
|
+
let r = k(n);
|
|
3802
|
+
return Ys.test(r) ? r : Xs(e.fn);
|
|
3803
3803
|
}
|
|
3804
3804
|
//#endregion
|
|
3805
3805
|
//#region src/animation/compile/emit/format/options.ts
|
|
3806
|
-
function
|
|
3806
|
+
function Zs(e, t = "animation") {
|
|
3807
3807
|
let n = "";
|
|
3808
3808
|
n += ` animation-name: ${t};\n`;
|
|
3809
3809
|
let r = v(e.duration, e.durationUnit);
|
|
3810
|
-
n += ` animation-duration: ${r};\n`, n += ` animation-timing-function: ${
|
|
3811
|
-
let i = e.composite == null ? void 0 :
|
|
3810
|
+
n += ` animation-duration: ${r};\n`, n += ` animation-timing-function: ${J(e.timingFunction)};\n`, n += ` animation-iteration-count: ${isFinite(e.iterationCount) ? e.iterationCount : "infinite"};\n`, n += ` animation-direction: ${e.direction};\n`, n += ` animation-fill-mode: ${e.fillMode};\n`, e.delay > 0 && (n += ` animation-delay: ${v(e.delay, e.delayUnit)};\n`);
|
|
3811
|
+
let i = e.composite == null ? void 0 : $s(e.composite);
|
|
3812
3812
|
return i != null && (n += ` ${i}\n`), n = `.${t} {\n${n}}\n`, n;
|
|
3813
3813
|
}
|
|
3814
|
-
function
|
|
3815
|
-
let n =
|
|
3816
|
-
return
|
|
3814
|
+
function Qs(e, t) {
|
|
3815
|
+
let n = J(e.timingFunction), r = S(ye(n), () => /* @__PURE__ */ TypeError(`Cannot serialize timing function ${JSON.stringify(n)}.`));
|
|
3816
|
+
return b({
|
|
3817
3817
|
name: t,
|
|
3818
3818
|
duration: e.duration,
|
|
3819
3819
|
...e.durationUnit == null ? {} : { durationUnit: e.durationUnit },
|
|
@@ -3827,14 +3827,14 @@ function Xs(e, t) {
|
|
|
3827
3827
|
} : {}
|
|
3828
3828
|
});
|
|
3829
3829
|
}
|
|
3830
|
-
function
|
|
3830
|
+
function $s(e) {
|
|
3831
3831
|
return e === "replace" ? void 0 : `animation-composition: ${e};`;
|
|
3832
3832
|
}
|
|
3833
|
-
function
|
|
3833
|
+
function ec(e) {
|
|
3834
3834
|
let t = e.propertyRegistry;
|
|
3835
3835
|
if (t == null || t.size === 0) return "";
|
|
3836
3836
|
let n = [];
|
|
3837
|
-
for (let [e, r] of t) n.push(
|
|
3837
|
+
for (let [e, r] of t) n.push(be({
|
|
3838
3838
|
kind: "property",
|
|
3839
3839
|
name: e,
|
|
3840
3840
|
descriptor: r
|
|
@@ -3843,12 +3843,12 @@ function Qs(e) {
|
|
|
3843
3843
|
}
|
|
3844
3844
|
//#endregion
|
|
3845
3845
|
//#region src/animation/compile/emit/format/format.ts
|
|
3846
|
-
function
|
|
3846
|
+
function tc(e, t, n) {
|
|
3847
3847
|
let r = e.parsedVars[t] ?? {}, i = e.templateFrames[t], a = Object.entries(r).map(([e, t]) => ({
|
|
3848
3848
|
prop: k(e),
|
|
3849
3849
|
value: y(t),
|
|
3850
3850
|
declared: t
|
|
3851
|
-
})), o = i.timingFunction ?
|
|
3851
|
+
})), o = i.timingFunction ? J(i.timingFunction) : n;
|
|
3852
3852
|
o !== n && a.push({
|
|
3853
3853
|
prop: "animation-timing-function",
|
|
3854
3854
|
value: o
|
|
@@ -3859,7 +3859,7 @@ function $s(e, t, n) {
|
|
|
3859
3859
|
value: s
|
|
3860
3860
|
}), a;
|
|
3861
3861
|
}
|
|
3862
|
-
var
|
|
3862
|
+
var nc = (e, t) => {
|
|
3863
3863
|
if (e.kind === "scalar") return e.payload.type === "number" ? {
|
|
3864
3864
|
kind: "scalar",
|
|
3865
3865
|
payload: {
|
|
@@ -3868,96 +3868,96 @@ var ec = (e, t) => {
|
|
|
3868
3868
|
}
|
|
3869
3869
|
} : void 0;
|
|
3870
3870
|
if (e.kind === "call") {
|
|
3871
|
-
let n = e.args.map((e) =>
|
|
3871
|
+
let n = e.args.map((e) => nc(e, t));
|
|
3872
3872
|
return n.some((e) => e === void 0) ? void 0 : {
|
|
3873
3873
|
kind: "call",
|
|
3874
3874
|
name: e.name,
|
|
3875
3875
|
args: n
|
|
3876
3876
|
};
|
|
3877
3877
|
}
|
|
3878
|
-
let n = e.items.map((e) =>
|
|
3878
|
+
let n = e.items.map((e) => nc(e, t));
|
|
3879
3879
|
if (!n.some((e) => e === void 0)) return {
|
|
3880
3880
|
kind: "list",
|
|
3881
3881
|
separator: e.separator,
|
|
3882
3882
|
items: n
|
|
3883
3883
|
};
|
|
3884
3884
|
};
|
|
3885
|
-
function
|
|
3886
|
-
return `{\n${
|
|
3885
|
+
function rc(e, t, n) {
|
|
3886
|
+
return `{\n${tc(e, t, n).map(({ prop: e, value: t }) => ` ${e}: ${t};`).join("\n")}\n}`;
|
|
3887
3887
|
}
|
|
3888
|
-
var
|
|
3889
|
-
let t =
|
|
3890
|
-
return e.templateFrames.map((n, r) => `${
|
|
3888
|
+
var ic = async (e) => {
|
|
3889
|
+
let t = J(e.options.timingFunction);
|
|
3890
|
+
return e.templateFrames.map((n, r) => `${a(n.start)}\n${rc(e, r, t)}\n`);
|
|
3891
3891
|
};
|
|
3892
|
-
function
|
|
3892
|
+
function ac(e) {
|
|
3893
3893
|
let t = e.indexOf("{"), n = t === -1 ? e : e.slice(t + 1), r = n.lastIndexOf("}");
|
|
3894
3894
|
return (r !== -1 && n.slice(r + 1).trim() === "" ? n.slice(0, r) : n).split("\n").map((e) => e.startsWith(" ") ? e.slice(2) : e).join("\n").trim();
|
|
3895
3895
|
}
|
|
3896
|
-
function
|
|
3897
|
-
let r =
|
|
3898
|
-
e.templateFrames.forEach((t,
|
|
3899
|
-
let
|
|
3900
|
-
|
|
3896
|
+
function oc(e, t, n) {
|
|
3897
|
+
let r = J(e.options.timingFunction), i = /* @__PURE__ */ new Map();
|
|
3898
|
+
e.templateFrames.forEach((t, o) => {
|
|
3899
|
+
let s = n?.get(o) ?? rc(e, o, r), c = i.get(s), l = a(t.start);
|
|
3900
|
+
c ? c.push(l) : i.set(s, [l]);
|
|
3901
3901
|
});
|
|
3902
|
-
let
|
|
3903
|
-
for (let [e, t] of i)
|
|
3904
|
-
return `@keyframes ${t} {\n${
|
|
3902
|
+
let o = "";
|
|
3903
|
+
for (let [e, t] of i) o += ` ${t.join(", ")} ${e.replace(/\n/g, "\n ")}\n`;
|
|
3904
|
+
return `@keyframes ${t} {\n${o}}`;
|
|
3905
3905
|
}
|
|
3906
|
-
function
|
|
3907
|
-
let r =
|
|
3906
|
+
function sc(e, t, n) {
|
|
3907
|
+
let r = J(e.options.timingFunction), i = /* @__PURE__ */ new Map();
|
|
3908
3908
|
for (let t = 0; t < e.templateFrames.length; t++) {
|
|
3909
|
-
let
|
|
3910
|
-
for (let [e, t] of Object.entries(
|
|
3911
|
-
let r =
|
|
3909
|
+
let o = e.templateFrames[t], s = e.parsedVars[t] ?? {}, c = {};
|
|
3910
|
+
for (let [e, t] of Object.entries(s)) {
|
|
3911
|
+
let r = nc(t, n);
|
|
3912
3912
|
if (r === void 0) return {
|
|
3913
3913
|
refused: !0,
|
|
3914
3914
|
key: e
|
|
3915
3915
|
};
|
|
3916
|
-
|
|
3916
|
+
c[e] = r;
|
|
3917
3917
|
}
|
|
3918
|
-
let
|
|
3919
|
-
|
|
3920
|
-
let
|
|
3921
|
-
|
|
3922
|
-
let
|
|
3923
|
-
|
|
3924
|
-
}
|
|
3925
|
-
let
|
|
3926
|
-
for (let [e, t] of i)
|
|
3927
|
-
return { block: `@keyframes ${t} {\n${
|
|
3928
|
-
}
|
|
3929
|
-
async function
|
|
3930
|
-
let n = e.options, r = /* @__PURE__ */ new Map(), i =
|
|
3918
|
+
let l = Object.entries(c).map(([e, t]) => ` ${k(e)}: ${y(t)};`), u = o.timingFunction ? J(o.timingFunction) : r;
|
|
3919
|
+
u !== r && l.push(` animation-timing-function: ${u};`);
|
|
3920
|
+
let d = o.composition;
|
|
3921
|
+
d != null && d !== "replace" && l.push(` animation-composition: ${d};`);
|
|
3922
|
+
let f = `{\n${l.join("\n")}\n}`, p = i.get(f), m = a(o.start);
|
|
3923
|
+
p ? p.push(m) : i.set(f, [m]);
|
|
3924
|
+
}
|
|
3925
|
+
let o = "";
|
|
3926
|
+
for (let [e, t] of i) o += ` ${t.join(", ")} ${e.replace(/\n/g, "\n ")}\n`;
|
|
3927
|
+
return { block: `@keyframes ${t} {\n${o}}` };
|
|
3928
|
+
}
|
|
3929
|
+
async function cc(e, t = "animation") {
|
|
3930
|
+
let n = e.options, r = /* @__PURE__ */ new Map(), i = J(n.timingFunction);
|
|
3931
3931
|
e.templateFrames.forEach((t, n) => {
|
|
3932
|
-
let
|
|
3933
|
-
r.has(
|
|
3932
|
+
let o = a(t.start), s = rc(e, n, i);
|
|
3933
|
+
r.has(s) ? r.get(s).push(o) : r.set(s, [o]);
|
|
3934
3934
|
});
|
|
3935
|
-
let
|
|
3936
|
-
for (let [e, t] of r)
|
|
3937
|
-
let
|
|
3938
|
-
return `${`${
|
|
3935
|
+
let o = "";
|
|
3936
|
+
for (let [e, t] of r) o += ` ${t.join(", ")} ${e.replace(/\n/g, "\n ")}\n`;
|
|
3937
|
+
let s = Zs(n, t), c = ec(e);
|
|
3938
|
+
return `${`${c ? `${c}\n\n` : ""}${s}\n@keyframes ${t} {\n${o}}`.replace(/\(\s*\{/g, "{").replace(/\}\s*\)/g, "}")}\n`;
|
|
3939
3939
|
}
|
|
3940
3940
|
//#endregion
|
|
3941
3941
|
//#region src/animation/compile/emit/densify.ts
|
|
3942
|
-
var
|
|
3942
|
+
var lc = (e) => {
|
|
3943
3943
|
if (e.kind === "percent") return e.value * 100;
|
|
3944
3944
|
throw TypeError(`Cannot densify named keyframe selector "${e.name}" without a bound timeline.`);
|
|
3945
3945
|
};
|
|
3946
|
-
function
|
|
3947
|
-
let i = e.parsedVars[t] ?? {}, a = Object.fromEntries(Object.entries(i).filter(([e]) => !r.has(e))), o = Object.entries(a).map(([e, t]) => `${k(e)}: ${y(t)};`), s = e.templateFrames[t], c = s.timingFunction ?
|
|
3946
|
+
function uc(e, t, n, r) {
|
|
3947
|
+
let i = e.parsedVars[t] ?? {}, a = Object.fromEntries(Object.entries(i).filter(([e]) => !r.has(e))), o = Object.entries(a).map(([e, t]) => `${k(e)}: ${y(t)};`), s = e.templateFrames[t], c = s.timingFunction ? J(s.timingFunction) : n;
|
|
3948
3948
|
c !== n && o.push(`animation-timing-function: ${c};`);
|
|
3949
3949
|
let l = s.composition;
|
|
3950
3950
|
return l != null && l !== "replace" && o.push(`animation-composition: ${l};`), o;
|
|
3951
3951
|
}
|
|
3952
|
-
function
|
|
3953
|
-
let r =
|
|
3952
|
+
function dc(e, t, n) {
|
|
3953
|
+
let r = J(e.options.timingFunction), i = new Set(n.keys), a = /* @__PURE__ */ new Map(), o = [], s = (e) => {
|
|
3954
3954
|
let t = a.get(e);
|
|
3955
3955
|
return t || (t = [], a.set(e, t), o.push(e)), t;
|
|
3956
3956
|
};
|
|
3957
3957
|
for (let [e, t] of n.byPct) s(e).push(...t);
|
|
3958
3958
|
e.templateFrames.forEach((t, n) => {
|
|
3959
|
-
let a =
|
|
3960
|
-
a.length > 0 && s(
|
|
3959
|
+
let a = uc(e, n, r, i);
|
|
3960
|
+
a.length > 0 && s(lc(t.start)).push(...a);
|
|
3961
3961
|
}), o.sort((e, t) => e - t);
|
|
3962
3962
|
let c = "";
|
|
3963
3963
|
for (let e of o) c += ` ${e}% {\n ${a.get(e).join("\n ")}\n }\n`;
|
|
@@ -3965,52 +3965,52 @@ function lc(e, t, n) {
|
|
|
3965
3965
|
}
|
|
3966
3966
|
//#endregion
|
|
3967
3967
|
//#region src/animation/compile/emit/backward/color.ts
|
|
3968
|
-
var
|
|
3968
|
+
var Y = (e) => Math.round(e * 1e4) / 1e4, fc = (e) => {
|
|
3969
3969
|
if (typeof e != "object" || !e) return !1;
|
|
3970
3970
|
let t = e.kind;
|
|
3971
3971
|
return t === "scalar" || t === "call" || t === "list";
|
|
3972
|
-
},
|
|
3972
|
+
}, pc = (e) => {
|
|
3973
3973
|
if (e.kind === "scalar") return e.payload.type === "color" ? e.payload.value : void 0;
|
|
3974
3974
|
let t = e.kind === "call" ? e.args : e.items;
|
|
3975
3975
|
for (let e of t) {
|
|
3976
|
-
let t =
|
|
3976
|
+
let t = pc(e);
|
|
3977
3977
|
if (t !== void 0) return t;
|
|
3978
3978
|
}
|
|
3979
|
-
},
|
|
3980
|
-
let t =
|
|
3979
|
+
}, mc = (e) => fc(e) && pc(e) !== void 0, hc = (e) => {
|
|
3980
|
+
let t = Ee(e, "oklab");
|
|
3981
3981
|
if (!t.ok) throw TypeError(`Value 4 color conversion failed: ${t.error.code}.`);
|
|
3982
3982
|
return t.value;
|
|
3983
|
-
},
|
|
3984
|
-
let [t, n, r] =
|
|
3983
|
+
}, X = (e) => {
|
|
3984
|
+
let [t, n, r] = hc(e).channels;
|
|
3985
3985
|
if (typeof t != "number" || typeof n != "number" || typeof r != "number") throw TypeError("OKLab densification requires numeric channels.");
|
|
3986
3986
|
return [
|
|
3987
3987
|
t,
|
|
3988
3988
|
n,
|
|
3989
3989
|
r
|
|
3990
3990
|
];
|
|
3991
|
-
},
|
|
3992
|
-
let t =
|
|
3993
|
-
return `oklab(${
|
|
3994
|
-
},
|
|
3995
|
-
let [n, r, i] =
|
|
3991
|
+
}, Z = (e) => {
|
|
3992
|
+
let t = hc(e), [n, r, i] = X(t), a = t.alpha === 1 ? "" : ` / ${t.alpha}`;
|
|
3993
|
+
return `oklab(${Y(n)} ${Y(r)} ${Y(i)}${a})`;
|
|
3994
|
+
}, gc = (e, t) => {
|
|
3995
|
+
let [n, r, i] = X(e), [a, o, s] = X(t);
|
|
3996
3996
|
return Math.hypot(a - n, o - r, s - i);
|
|
3997
|
-
},
|
|
3998
|
-
let r =
|
|
3997
|
+
}, _c = (e, t, n) => {
|
|
3998
|
+
let r = Oe(e, t, n);
|
|
3999
3999
|
if (!r.ok) throw TypeError(`Value 4 OKLab construction failed: ${r.error.code}.`);
|
|
4000
4000
|
return r.value;
|
|
4001
|
-
},
|
|
4002
|
-
let [n, r, i] =
|
|
4003
|
-
return
|
|
4004
|
-
},
|
|
4001
|
+
}, vc = (e, t) => {
|
|
4002
|
+
let [n, r, i] = X(e), [a, o, s] = X(t);
|
|
4003
|
+
return _c((n + a) / 2, (r + o) / 2, (i + s) / 2);
|
|
4004
|
+
}, yc = (e) => {
|
|
4005
4005
|
if (e.kind === "percent") return e.value * 100;
|
|
4006
4006
|
throw TypeError(`Cannot densify named keyframe selector "${e.name}" without a bound timeline.`);
|
|
4007
|
-
},
|
|
4007
|
+
}, Q = (e, t, n) => {
|
|
4008
4008
|
let r = (e.parsedVars[t] ?? {})[n];
|
|
4009
|
-
return r === void 0 ? void 0 :
|
|
4010
|
-
},
|
|
4009
|
+
return r === void 0 ? void 0 : pc(r);
|
|
4010
|
+
}, bc = (e, t, n, r, i) => {
|
|
4011
4011
|
let a = [];
|
|
4012
4012
|
for (let o = 0; o < n; o++) {
|
|
4013
|
-
let s =
|
|
4013
|
+
let s = De(e, t, n === 1 ? 0 : o / (n - 1), {
|
|
4014
4014
|
space: r,
|
|
4015
4015
|
...i === void 0 ? {} : { hue: i }
|
|
4016
4016
|
});
|
|
@@ -4019,39 +4019,39 @@ var X = (e) => Math.round(e * 1e4) / 1e4, uc = (e) => {
|
|
|
4019
4019
|
}
|
|
4020
4020
|
return a;
|
|
4021
4021
|
};
|
|
4022
|
-
function
|
|
4022
|
+
function xc(e, t, n, r, i) {
|
|
4023
4023
|
let a = t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), o = [], s = 0;
|
|
4024
4024
|
for (let a = 0; a + 1 < e.templateFrames.length; a++) {
|
|
4025
|
-
let c =
|
|
4025
|
+
let c = Q(e, a, t), l = Q(e, a + 1, t);
|
|
4026
4026
|
if (!c || !l) continue;
|
|
4027
|
-
let u =
|
|
4028
|
-
if (
|
|
4027
|
+
let u = yc(e.templateFrames[a].start), d = yc(e.templateFrames[a + 1].start);
|
|
4028
|
+
if (Z(c) === Z(l)) {
|
|
4029
4029
|
o.push({
|
|
4030
4030
|
pct: u,
|
|
4031
|
-
css:
|
|
4031
|
+
css: Z(c)
|
|
4032
4032
|
});
|
|
4033
4033
|
continue;
|
|
4034
4034
|
}
|
|
4035
|
-
let f = c, p = l, m =
|
|
4035
|
+
let f = c, p = l, m = bc(f, p, n, r, i.hueMethod);
|
|
4036
4036
|
for (let e = 0; e < m.length; e++) {
|
|
4037
4037
|
let t = e / (m.length - 1), n = u + (d - u) * t;
|
|
4038
4038
|
o.push({
|
|
4039
|
-
pct:
|
|
4040
|
-
css:
|
|
4039
|
+
pct: Y(n),
|
|
4040
|
+
css: Z(m[e])
|
|
4041
4041
|
});
|
|
4042
4042
|
}
|
|
4043
|
-
let h =
|
|
4043
|
+
let h = bc(f, p, 1024, r, i.hueMethod);
|
|
4044
4044
|
for (let e = 0; e + 1 < m.length; e++) {
|
|
4045
|
-
let t = (e + .5) / (m.length - 1), n = h[Math.round(t * 1023)], r =
|
|
4046
|
-
s = Math.max(s,
|
|
4045
|
+
let t = (e + .5) / (m.length - 1), n = h[Math.round(t * 1023)], r = vc(m[e], m[e + 1]);
|
|
4046
|
+
s = Math.max(s, gc(r, n));
|
|
4047
4047
|
}
|
|
4048
4048
|
}
|
|
4049
|
-
let c = e.templateFrames.length - 1, l =
|
|
4049
|
+
let c = e.templateFrames.length - 1, l = Q(e, c, t);
|
|
4050
4050
|
if (l) {
|
|
4051
|
-
let t =
|
|
4051
|
+
let t = yc(e.templateFrames[c].start);
|
|
4052
4052
|
o[o.length - 1]?.pct !== t && o.push({
|
|
4053
4053
|
pct: t,
|
|
4054
|
-
css:
|
|
4054
|
+
css: Z(l)
|
|
4055
4055
|
});
|
|
4056
4056
|
}
|
|
4057
4057
|
return {
|
|
@@ -4060,20 +4060,20 @@ function yc(e, t, n, r, i) {
|
|
|
4060
4060
|
worstDelta: s
|
|
4061
4061
|
};
|
|
4062
4062
|
}
|
|
4063
|
-
function
|
|
4063
|
+
function Sc(e, t, n) {
|
|
4064
4064
|
let r = [], i = /* @__PURE__ */ new Set();
|
|
4065
4065
|
for (let t = 0; t + 1 < e.templateFrames.length; t++) {
|
|
4066
4066
|
let n = e.parsedVars[t] ?? {};
|
|
4067
4067
|
for (let [a, o] of Object.entries(n)) {
|
|
4068
|
-
if (i.has(a) || !
|
|
4069
|
-
let n =
|
|
4070
|
-
n && s &&
|
|
4068
|
+
if (i.has(a) || !mc(o)) continue;
|
|
4069
|
+
let n = Q(e, t, a), s = Q(e, t + 1, a);
|
|
4070
|
+
n && s && Z(n) !== Z(s) && (r.push(a), i.add(a));
|
|
4071
4071
|
}
|
|
4072
4072
|
}
|
|
4073
4073
|
if (r.length === 0) return null;
|
|
4074
4074
|
let a = Math.max(3, t), o = e.options.colorSpace === "oklch" ? "oklch" : "oklab", s = e.options.hueMethod ? { hueMethod: e.options.hueMethod } : {}, c = 0, l = /* @__PURE__ */ new Map();
|
|
4075
4075
|
for (let t of r) {
|
|
4076
|
-
let n =
|
|
4076
|
+
let n = xc(e, t, a, o, s);
|
|
4077
4077
|
c = Math.max(c, n.worstDelta);
|
|
4078
4078
|
for (let { pct: e, css: t } of n.stops) {
|
|
4079
4079
|
let r = l.get(e);
|
|
@@ -4090,7 +4090,7 @@ function bc(e, t, n) {
|
|
|
4090
4090
|
}
|
|
4091
4091
|
//#endregion
|
|
4092
4092
|
//#region src/animation/compile/emit/refusal-probes.ts
|
|
4093
|
-
function
|
|
4093
|
+
function Cc(e) {
|
|
4094
4094
|
let { animation: t, name: n } = e;
|
|
4095
4095
|
if (e.weightBlend) return {
|
|
4096
4096
|
name: n,
|
|
@@ -4111,18 +4111,18 @@ function xc(e) {
|
|
|
4111
4111
|
};
|
|
4112
4112
|
}
|
|
4113
4113
|
}
|
|
4114
|
-
function
|
|
4115
|
-
let { animation: i, name: a } = e, o =
|
|
4114
|
+
function wc(e, n, r) {
|
|
4115
|
+
let { animation: i, name: a } = e, o = Cc(e);
|
|
4116
4116
|
if (o) return r.push(o), null;
|
|
4117
|
-
let s =
|
|
4117
|
+
let s = Sc(i, n.densifyStops ?? 16, n.deltaEEpsilon ?? .04);
|
|
4118
4118
|
if (s && "refused" in s) return r.push({
|
|
4119
4119
|
name: a,
|
|
4120
4120
|
reason: "perceptual-oklab",
|
|
4121
|
-
message: `perceptual oklab color track exceeds the densify ΔE-ε threshold (ΔE ${
|
|
4121
|
+
message: `perceptual oklab color track exceeds the densify ΔE-ε threshold (ΔE ${Y(s.delta)} > ${n.deltaEEpsilon ?? .04}) — a faithful pure-CSS twin is not available; the JS playback is the only faithful path`
|
|
4122
4122
|
}), null;
|
|
4123
4123
|
let c;
|
|
4124
4124
|
if (e.staticWeight != null) {
|
|
4125
|
-
let t =
|
|
4125
|
+
let t = sc(i, a, e.staticWeight);
|
|
4126
4126
|
if ("refused" in t) return r.push({
|
|
4127
4127
|
name: a,
|
|
4128
4128
|
reason: "weight-blend",
|
|
@@ -4132,27 +4132,27 @@ function Sc(e, t, r) {
|
|
|
4132
4132
|
}
|
|
4133
4133
|
let l, u;
|
|
4134
4134
|
try {
|
|
4135
|
-
l = c ?? (s && "byPct" in s ?
|
|
4135
|
+
l = c ?? (s && "byPct" in s ? dc(i, a, s) : oc(i, a)), u = Qs(i.options, a);
|
|
4136
4136
|
} catch (e) {
|
|
4137
|
-
if (!(e instanceof
|
|
4137
|
+
if (!(e instanceof t) || e.option !== "timingFunction") throw e;
|
|
4138
4138
|
return r.push({
|
|
4139
4139
|
name: a,
|
|
4140
4140
|
reason: "custom-renderer",
|
|
4141
4141
|
message: "easing has no faithful CSS timing-function twin (a custom closure cannot be CSS) — attach an Easing.css twin or use a registry name / cubic-bezier() / linear(); the JS playback is the only faithful path"
|
|
4142
4142
|
}), null;
|
|
4143
4143
|
}
|
|
4144
|
-
let d =
|
|
4144
|
+
let d = $s(e.composition), f = d ? `\n ${d}` : "", p = e.delay > 0 ? `\n animation-delay: ${v(e.delay)};` : "", m = Tc(i), h = `${n.selectorFor ? n.selectorFor(a) : `.${a}`} {\n animation: ${u};${f}${p}${m}\n}`;
|
|
4145
4145
|
return `${l}\n\n${h}`;
|
|
4146
4146
|
}
|
|
4147
|
-
function
|
|
4147
|
+
function Tc(e) {
|
|
4148
4148
|
let t = e.scrollOptions;
|
|
4149
4149
|
if (t == null) return "";
|
|
4150
|
-
let n =
|
|
4150
|
+
let n = Ws(t), r = "";
|
|
4151
4151
|
for (let [e, t] of Object.entries(n)) t != null && (r += `\n ${e}: ${t};`);
|
|
4152
4152
|
return r;
|
|
4153
4153
|
}
|
|
4154
|
-
async function
|
|
4155
|
-
let n = e instanceof
|
|
4154
|
+
async function Ec(e, t = {}) {
|
|
4155
|
+
let n = e instanceof la ? Ks(e) : e instanceof ee ? qs(e) : Js(e), r = /* @__PURE__ */ new Map();
|
|
4156
4156
|
for (let e of n) {
|
|
4157
4157
|
let t = r.get(e.name) ?? 0;
|
|
4158
4158
|
r.set(e.name, t + 1), t > 0 && (e.name = `${e.name}-${t + 1}`);
|
|
@@ -4163,7 +4163,7 @@ async function wc(e, t = {}) {
|
|
|
4163
4163
|
});
|
|
4164
4164
|
let i = [], a = [];
|
|
4165
4165
|
for (let e of n) {
|
|
4166
|
-
let n =
|
|
4166
|
+
let n = wc(e, t, i);
|
|
4167
4167
|
n && a.push(n);
|
|
4168
4168
|
}
|
|
4169
4169
|
let o = i.length === 0;
|
|
@@ -4179,14 +4179,14 @@ async function wc(e, t = {}) {
|
|
|
4179
4179
|
}
|
|
4180
4180
|
//#endregion
|
|
4181
4181
|
//#region src/animation/compile/emit/view-transition.ts
|
|
4182
|
-
var
|
|
4182
|
+
var Dc = new Set([
|
|
4183
4183
|
"transform",
|
|
4184
4184
|
"opacity",
|
|
4185
4185
|
"filter",
|
|
4186
4186
|
"backdrop-filter",
|
|
4187
4187
|
"mix-blend-mode",
|
|
4188
4188
|
"clip-path"
|
|
4189
|
-
]),
|
|
4189
|
+
]), Oc = new Set([
|
|
4190
4190
|
"cqw",
|
|
4191
4191
|
"cqh",
|
|
4192
4192
|
"cqi",
|
|
@@ -4194,31 +4194,31 @@ var Tc = new Set([
|
|
|
4194
4194
|
"cqmin",
|
|
4195
4195
|
"cqmax"
|
|
4196
4196
|
]);
|
|
4197
|
-
function
|
|
4198
|
-
let t =
|
|
4199
|
-
for (let r = 0; r < e.templateFrames.length; r++) n.push(
|
|
4197
|
+
function kc(e) {
|
|
4198
|
+
let t = J(e.options.timingFunction), n = [];
|
|
4199
|
+
for (let r = 0; r < e.templateFrames.length; r++) n.push(...tc(e, r, t));
|
|
4200
4200
|
return n;
|
|
4201
4201
|
}
|
|
4202
|
-
var
|
|
4202
|
+
var Ac = (e) => {
|
|
4203
4203
|
if (e == null) return null;
|
|
4204
4204
|
if (e.kind === "call") {
|
|
4205
4205
|
if (e.name.toLowerCase() === "var") return "var";
|
|
4206
4206
|
for (let t of e.args) {
|
|
4207
|
-
let e =
|
|
4207
|
+
let e = Ac(t);
|
|
4208
4208
|
if (e != null) return e;
|
|
4209
4209
|
}
|
|
4210
4210
|
return null;
|
|
4211
4211
|
}
|
|
4212
4212
|
if (e.kind === "list") {
|
|
4213
4213
|
for (let t of e.items) {
|
|
4214
|
-
let e =
|
|
4214
|
+
let e = Ac(t);
|
|
4215
4215
|
if (e != null) return e;
|
|
4216
4216
|
}
|
|
4217
4217
|
return null;
|
|
4218
4218
|
}
|
|
4219
|
-
return e.payload.type === "number" &&
|
|
4220
|
-
},
|
|
4221
|
-
function
|
|
4219
|
+
return e.payload.type === "number" && Oc.has(e.payload.unit.toLowerCase()) ? "cq" : null;
|
|
4220
|
+
}, jc = (e) => e.split(".")[0].replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
4221
|
+
function Mc(e, t, n, r, i, a) {
|
|
4222
4222
|
let o = [], s = `${t}-${e}`;
|
|
4223
4223
|
if (r.scrollOptions != null) return o.push({
|
|
4224
4224
|
name: s,
|
|
@@ -4228,8 +4228,8 @@ function Ac(e, t, n, r, i, a) {
|
|
|
4228
4228
|
chunk: null,
|
|
4229
4229
|
refusals: o
|
|
4230
4230
|
};
|
|
4231
|
-
for (let { prop: t, declared: n } of
|
|
4232
|
-
let r =
|
|
4231
|
+
for (let { prop: t, declared: n } of kc(r)) {
|
|
4232
|
+
let r = Ac(n);
|
|
4233
4233
|
if (r != null) return o.push({
|
|
4234
4234
|
name: s,
|
|
4235
4235
|
reason: "vt-element-scoped-computed",
|
|
@@ -4238,7 +4238,7 @@ function Ac(e, t, n, r, i, a) {
|
|
|
4238
4238
|
chunk: null,
|
|
4239
4239
|
refusals: o
|
|
4240
4240
|
};
|
|
4241
|
-
if (!
|
|
4241
|
+
if (!Dc.has(jc(t))) return o.push({
|
|
4242
4242
|
name: s,
|
|
4243
4243
|
reason: "vt-snapshot-inapplicable",
|
|
4244
4244
|
message: `"${t}" does not apply to a replaced-content ::view-transition-${e} snapshot (only transform/opacity/filter/mix-blend-mode animate there) — refused per property, never silently dropped`
|
|
@@ -4253,7 +4253,7 @@ function Ac(e, t, n, r, i, a) {
|
|
|
4253
4253
|
composition: "replace",
|
|
4254
4254
|
weightBlend: !1,
|
|
4255
4255
|
delay: 0
|
|
4256
|
-
}, u = [], d =
|
|
4256
|
+
}, u = [], d = wc(l, {
|
|
4257
4257
|
...a.densifyStops == null ? {} : { densifyStops: a.densifyStops },
|
|
4258
4258
|
...a.deltaEEpsilon == null ? {} : { deltaEEpsilon: a.deltaEEpsilon },
|
|
4259
4259
|
selectorFor: () => c
|
|
@@ -4264,27 +4264,27 @@ function Ac(e, t, n, r, i, a) {
|
|
|
4264
4264
|
refusals: o
|
|
4265
4265
|
};
|
|
4266
4266
|
}
|
|
4267
|
-
function
|
|
4267
|
+
function Nc(e) {
|
|
4268
4268
|
let t = e.group;
|
|
4269
4269
|
if (t != null) return "options" in t && "templateFrames" in t ? {
|
|
4270
4270
|
duration: t.options.duration,
|
|
4271
4271
|
durationUnit: t.options.durationUnit,
|
|
4272
|
-
easing:
|
|
4272
|
+
easing: J(t.options.timingFunction)
|
|
4273
4273
|
} : {
|
|
4274
4274
|
duration: t.duration,
|
|
4275
|
-
easing:
|
|
4275
|
+
easing: J(t.timingFunction)
|
|
4276
4276
|
};
|
|
4277
4277
|
let n = e.new ?? e.old;
|
|
4278
4278
|
return n == null ? null : {
|
|
4279
4279
|
duration: n.options.duration,
|
|
4280
4280
|
durationUnit: n.options.durationUnit,
|
|
4281
|
-
easing:
|
|
4281
|
+
easing: J(n.options.timingFunction)
|
|
4282
4282
|
};
|
|
4283
4283
|
}
|
|
4284
|
-
async function
|
|
4284
|
+
async function Pc(e, t = {}) {
|
|
4285
4285
|
let n = [], r = [], i = [], a = t.types, o = a && a.length > 0 ? `:root:active-view-transition-type(${a.join(", ")})` : "", s = t.emitGroup ?? !0, c = /* @__PURE__ */ new Map();
|
|
4286
4286
|
for (let t of Object.keys(e)) {
|
|
4287
|
-
let e =
|
|
4287
|
+
let e = q(t), n = c.get(e);
|
|
4288
4288
|
n ? n.push(t) : c.set(e, [t]);
|
|
4289
4289
|
}
|
|
4290
4290
|
let l = /* @__PURE__ */ new Set();
|
|
@@ -4295,17 +4295,17 @@ async function Mc(e, t = {}) {
|
|
|
4295
4295
|
});
|
|
4296
4296
|
for (let [a, c] of Object.entries(e)) {
|
|
4297
4297
|
if (l.has(a)) continue;
|
|
4298
|
-
let e =
|
|
4298
|
+
let e = q(a), u = c.class ? `.${q(c.class)}` : e;
|
|
4299
4299
|
i.push(e);
|
|
4300
4300
|
for (let i of ["old", "new"]) {
|
|
4301
4301
|
let a = c[i];
|
|
4302
4302
|
if (a == null) continue;
|
|
4303
|
-
let { chunk: s, refusals: l } =
|
|
4303
|
+
let { chunk: s, refusals: l } = Mc(i, e, u, a, o, t);
|
|
4304
4304
|
for (let e of l) n.push(e);
|
|
4305
4305
|
s && r.push(s);
|
|
4306
4306
|
}
|
|
4307
4307
|
if (s && (c.old != null || c.new != null || c.group != null)) {
|
|
4308
|
-
let e =
|
|
4308
|
+
let e = Nc(c);
|
|
4309
4309
|
e != null && r.push(`${o}::view-transition-group(${u}) {\n animation-duration: ${v(e.duration, e.durationUnit)};\n animation-timing-function: ${e.easing};\n}`);
|
|
4310
4310
|
}
|
|
4311
4311
|
}
|
|
@@ -4325,10 +4325,10 @@ async function Mc(e, t = {}) {
|
|
|
4325
4325
|
}
|
|
4326
4326
|
//#endregion
|
|
4327
4327
|
//#region src/animation/compile/emit/entry.ts
|
|
4328
|
-
var
|
|
4328
|
+
var Fc = (e) => e.kind === "scalar" ? e.payload.type === "color" : (e.kind === "call" ? e.args : e.items).some(Fc), Ic = (e) => {
|
|
4329
4329
|
if (e.kind === "scalar") {
|
|
4330
4330
|
if (e.payload.type !== "color") return e;
|
|
4331
|
-
let t =
|
|
4331
|
+
let t = Ee(e.payload.value, "oklab");
|
|
4332
4332
|
if (!t.ok) throw TypeError(`Value 4 color conversion failed: ${t.error.code}.`);
|
|
4333
4333
|
return {
|
|
4334
4334
|
kind: "scalar",
|
|
@@ -4341,42 +4341,42 @@ var Nc = (e) => e.kind === "scalar" ? e.payload.type === "color" : (e.kind === "
|
|
|
4341
4341
|
return e.kind === "call" ? {
|
|
4342
4342
|
kind: "call",
|
|
4343
4343
|
name: e.name,
|
|
4344
|
-
args: e.args.map(
|
|
4344
|
+
args: e.args.map(Ic)
|
|
4345
4345
|
} : {
|
|
4346
4346
|
kind: "list",
|
|
4347
4347
|
separator: e.separator,
|
|
4348
|
-
items: e.items.map(
|
|
4348
|
+
items: e.items.map(Ic)
|
|
4349
4349
|
};
|
|
4350
4350
|
};
|
|
4351
|
-
function
|
|
4351
|
+
function $(e, t) {
|
|
4352
4352
|
let n = e.parsedVars[t] ?? {}, r = [];
|
|
4353
4353
|
for (let [e, t] of Object.entries(n)) {
|
|
4354
4354
|
let n = k(e);
|
|
4355
4355
|
r.push({
|
|
4356
4356
|
prop: n,
|
|
4357
|
-
value: y(
|
|
4357
|
+
value: y(Ic(t))
|
|
4358
4358
|
});
|
|
4359
4359
|
}
|
|
4360
4360
|
return r;
|
|
4361
4361
|
}
|
|
4362
|
-
function
|
|
4362
|
+
function Lc(e) {
|
|
4363
4363
|
let t = e.templateFrames.length;
|
|
4364
4364
|
return e.options.direction === "reverse" ? [t - 1, 0] : [0, t - 1];
|
|
4365
4365
|
}
|
|
4366
|
-
function
|
|
4366
|
+
function Rc(e) {
|
|
4367
4367
|
for (let t = 0; t < e.templateFrames.length; t++) {
|
|
4368
4368
|
let n = e.parsedVars[t] ?? {};
|
|
4369
|
-
for (let e of Object.values(n)) if (
|
|
4369
|
+
for (let e of Object.values(n)) if (Fc(e)) return !0;
|
|
4370
4370
|
}
|
|
4371
4371
|
return !1;
|
|
4372
4372
|
}
|
|
4373
|
-
function
|
|
4373
|
+
function zc(e) {
|
|
4374
4374
|
for (let t = 0; t < e.templateFrames.length; t++) {
|
|
4375
4375
|
let n = e.parsedVars[t] ?? {};
|
|
4376
4376
|
for (let [e, t] of Object.entries(n)) if (t.kind === "list" && t.items.length === 0) return e;
|
|
4377
4377
|
}
|
|
4378
4378
|
}
|
|
4379
|
-
function
|
|
4379
|
+
function Bc(e) {
|
|
4380
4380
|
let t = e.options;
|
|
4381
4381
|
if (e.templateFrames.length > 2) return {
|
|
4382
4382
|
reason: "entry-multi-keyframe",
|
|
@@ -4395,11 +4395,11 @@ function zc(e) {
|
|
|
4395
4395
|
reason: "entry-scroll-grammar",
|
|
4396
4396
|
detail: "scroll grammar has no transition twin — the JS ScrollScene driver is the only faithful path"
|
|
4397
4397
|
};
|
|
4398
|
-
if ((t.colorSpace === "oklch" || t.hueMethod != null) &&
|
|
4398
|
+
if ((t.colorSpace === "oklch" || t.hueMethod != null) && Rc(e)) return {
|
|
4399
4399
|
reason: "entry-color-space",
|
|
4400
4400
|
detail: `colorSpace=${t.colorSpace}${t.hueMethod ? `, hueMethod=${t.hueMethod}` : ""} — transitions expose no interpolation-space control; native Oklab is the default feature (only non-default spaces refuse)`
|
|
4401
4401
|
};
|
|
4402
|
-
let i =
|
|
4402
|
+
let i = zc(e);
|
|
4403
4403
|
if (i != null) return {
|
|
4404
4404
|
reason: "computed-unit-drift",
|
|
4405
4405
|
detail: `"${i}" has an empty declared value — it cannot be re-emitted as a faithful transition endpoint`
|
|
@@ -4409,7 +4409,7 @@ function zc(e) {
|
|
|
4409
4409
|
detail: "a custom transform closure cannot be a CSS transition endpoint"
|
|
4410
4410
|
};
|
|
4411
4411
|
try {
|
|
4412
|
-
|
|
4412
|
+
J(t.timingFunction);
|
|
4413
4413
|
} catch {
|
|
4414
4414
|
return {
|
|
4415
4415
|
reason: "entry-easing-twin",
|
|
@@ -4417,7 +4417,7 @@ function zc(e) {
|
|
|
4417
4417
|
};
|
|
4418
4418
|
}
|
|
4419
4419
|
}
|
|
4420
|
-
var
|
|
4420
|
+
var Vc = {
|
|
4421
4421
|
"custom-renderer": "custom renderer — the JS playback is the only faithful path",
|
|
4422
4422
|
"weight-blend": "layer weight has no transition twin",
|
|
4423
4423
|
"computed-unit-drift": "computed-unit drift — the endpoint cannot be re-emitted faithfully",
|
|
@@ -4428,42 +4428,42 @@ var Bc = {
|
|
|
4428
4428
|
"entry-color-space": "a non-default color space (oklch/hueMethod) — transitions expose no space control",
|
|
4429
4429
|
"entry-easing-twin": "the easing has no faithful CSS timing-function twin"
|
|
4430
4430
|
};
|
|
4431
|
-
function
|
|
4431
|
+
function Hc(e, t) {
|
|
4432
4432
|
let n = /* @__PURE__ */ new Set();
|
|
4433
4433
|
for (let t of e) n.add(t.prop);
|
|
4434
4434
|
for (let e of t) n.add(e.prop);
|
|
4435
4435
|
return [...n];
|
|
4436
4436
|
}
|
|
4437
|
-
function
|
|
4437
|
+
function Uc(e, t, n, r) {
|
|
4438
4438
|
let i = e.filter((e) => e !== "display" && e !== "overlay").map((e) => `${e} ${t} ${n}`);
|
|
4439
4439
|
return i.push(`display ${t} allow-discrete`), r && i.push(`overlay ${t} allow-discrete`), i.join(", ");
|
|
4440
4440
|
}
|
|
4441
|
-
var
|
|
4442
|
-
async function
|
|
4441
|
+
var Wc = (e, t) => [...e.map((e) => ` ${e.prop}: ${e.value};`), ...t].join("\n");
|
|
4442
|
+
async function Gc(e, t = {}) {
|
|
4443
4443
|
let n = t.openSelector ?? ".open", r = t.display ?? "block", i = t.overlay ?? !0, a = [], o = [];
|
|
4444
4444
|
for (let [t, s] of Object.entries(e)) {
|
|
4445
4445
|
let e = s.enter;
|
|
4446
4446
|
if (e == null) continue;
|
|
4447
4447
|
let c = s.exit ? [e, s.exit] : [e], l = !1;
|
|
4448
4448
|
for (let e of c) {
|
|
4449
|
-
let n =
|
|
4449
|
+
let n = Bc(e);
|
|
4450
4450
|
if (n) {
|
|
4451
4451
|
a.push({
|
|
4452
4452
|
name: t,
|
|
4453
4453
|
reason: n.reason,
|
|
4454
|
-
message: `${
|
|
4454
|
+
message: `${Vc[n.reason]} — ${n.detail}`
|
|
4455
4455
|
}), l = !0;
|
|
4456
4456
|
break;
|
|
4457
4457
|
}
|
|
4458
4458
|
}
|
|
4459
4459
|
if (l) continue;
|
|
4460
|
-
let [u, d] =
|
|
4460
|
+
let [u, d] = Lc(e), f = $(e, u), p = $(e, d), m = Hc(f, p), h = v(e.options.duration, e.options.durationUnit), ee = J(e.options.timingFunction), g, _, y, b;
|
|
4461
4461
|
if (s.exit) {
|
|
4462
|
-
let [, e] =
|
|
4463
|
-
|
|
4464
|
-
} else
|
|
4465
|
-
let
|
|
4466
|
-
o.push(`${
|
|
4462
|
+
let [, e] = Lc(s.exit), t = Lc(s.exit)[0];
|
|
4463
|
+
g = $(s.exit, e), _ = Hc($(s.exit, t), g), y = v(s.exit.options.duration, s.exit.options.durationUnit), b = J(s.exit.options.timingFunction);
|
|
4464
|
+
} else g = f, _ = m, y = h, b = ee;
|
|
4465
|
+
let x = `${t}${n}`, te = `${t} {\n${Wc(g, [" display: none;", ` transition: ${Uc(_, y, b, i)};`])}\n}`, ne = `${x} {\n${Wc(p, [` display: ${r};`, ` transition: ${Uc(m, h, ee, i)};`])}\n}`, re = `@starting-style {\n ${x} {\n${Wc(f, []).split("\n").map((e) => ` ${e}`).join("\n")}\n }\n}`;
|
|
4466
|
+
o.push(`${te}\n\n${ne}\n\n${re}`);
|
|
4467
4467
|
}
|
|
4468
4468
|
let s = a.length === 0;
|
|
4469
4469
|
return o.length === 0 ? {
|
|
@@ -4478,9 +4478,9 @@ async function Wc(e, t = {}) {
|
|
|
4478
4478
|
}
|
|
4479
4479
|
//#endregion
|
|
4480
4480
|
//#region src/animation/validate.ts
|
|
4481
|
-
var
|
|
4482
|
-
async function
|
|
4483
|
-
let n =
|
|
4481
|
+
var Kc = (e) => new U().fromString(e);
|
|
4482
|
+
async function qc(e, t = {}) {
|
|
4483
|
+
let n = Kc(e), r = [...n.diagnostics], i = r.some((e) => e.code === "EMPTY_PARSE"), a = e.trim().length > 0 && !i, o = await Ec([n], t.compile ?? {}), s = P(n);
|
|
4484
4484
|
return {
|
|
4485
4485
|
parseable: a,
|
|
4486
4486
|
eligible: o.eligible,
|
|
@@ -4489,9 +4489,9 @@ async function Kc(e, t = {}) {
|
|
|
4489
4489
|
waapi: s
|
|
4490
4490
|
};
|
|
4491
4491
|
}
|
|
4492
|
-
var
|
|
4493
|
-
async function
|
|
4494
|
-
let n = await
|
|
4492
|
+
var Jc = (e) => xe(() => te(e), (e) => [...new Set(pe(e).map(({ rule: e }) => e.name))], []);
|
|
4493
|
+
async function Yc(e, t = {}) {
|
|
4494
|
+
let n = await qc(e, t), r = Jc(e), i = r.length > 0 ? r.join(", ") : "(no @keyframes block)", a = [];
|
|
4495
4495
|
a.push(`@keyframes ${i}:`), a.push(` parseable: ${n.parseable ? "yes" : "no"}`), a.push(` compile-eligible: ${n.eligible ? "yes" : "no"}`);
|
|
4496
4496
|
for (let e of n.refusals) a.push(` – ${e.reason}: ${e.message}`);
|
|
4497
4497
|
if (a.push(` waapi-eligible: ${n.waapi.eligible ? "yes" : "no"}`), n.waapi.eligible || a.push(` – ${n.waapi.reason}`), n.diagnostics.length > 0) {
|
|
@@ -4501,4 +4501,4 @@ async function Jc(e, t = {}) {
|
|
|
4501
4501
|
return a.join("\n");
|
|
4502
4502
|
}
|
|
4503
4503
|
//#endregion
|
|
4504
|
-
export {
|
|
4504
|
+
export { la as AnimationGroup, U as CSSKeyframesAnimation, cc as CSSKeyframesToString, ic as CSSKeyframesToStrings, Pe as DIRECTIONS, ga as DrawSVG, Fe as FILL_MODES, ni as KeyframesAnimation, Ta as MorphSVG, pa as MotionPath, ks as ScrollScene, Ps as TriggerScene, Cs as adoptRunning, Ve as bumpLayoutEpoch, Ec as compileToCSS, Gc as compileToEntry, Pc as compileToViewTransition, As as createScrollScene, Fs as createTriggerScene, q as cssIdent, Re as defaultLayerConfig, E as defaultOptions, js as dispatchScrollBackend, zs as driveScrollCSS, Yc as explain, ac as formatCSSKeyframeString, ha as fromDrawSVG, xs as fromLiveAnimations, wa as fromMorphSVG, fa as fromMotionPath, bs as fromStyleSheets, H as getAnimationId, Us as parseScrollCSS, Hs as parseScrollRange, Vs as parseScrollTimeline, Ms as pinCSS, ds as presets, li as resolveKeyframes, ys as resolveLiveKeyframes, Os as resolveRange, _e as resolveTimingFunction, v as reverseCSSTime, Gs as roundTripScrollCSS, Ws as serializeScrollOptions, x as serializeTimingFunction, Ns as supportsNativeTrigger, fe as timingFunctionEntries, Ot as transformTargetsStyle, qc as validate, qi as yieldToMain };
|