@mkbabb/keyframes.js 6.4.0 → 6.5.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 +32 -1
- package/dist/engine/index.d.ts +7 -5
- package/dist/engine/index.js +948 -948
- package/dist/keyframes.d.ts +60 -11
- package/dist/keyframes.js +74 -74
- package/dist/{registry-Bs7A0T_s.js → registry-BgJd9srG.js} +1 -1
- package/dist/{registry-8bG0FhGi.js → registry-DIMQ5-f9.js} +1 -1
- package/dist/{sequence-CPGHHEVM.js → sequence-BRhiigt1.js} +280 -150
- package/package.json +3 -3
package/dist/engine/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as e,
|
|
2
|
-
import { C as
|
|
1
|
+
import { C as e, D as t, b as n, c as r, d as i, g as a, h as o, i as s, k as c, l, m as u, n as d, o as f, r as p, s as m, t as h, v as g, w as _, y as v } from "../sequence-BRhiigt1.js";
|
|
2
|
+
import { C as y, E as b, S as ee, 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-DIMQ5-f9.js";
|
|
3
3
|
import { clamp as Se, lerp as C, lerpArray as Ce, scale as we } from "@mkbabb/value.js/math";
|
|
4
4
|
import { easeInOutCubic as Te } from "@mkbabb/value.js/easing";
|
|
5
5
|
import { convertColor as Ee, mixColors as De, oklab as Oe } from "@mkbabb/value.js/color";
|
|
@@ -64,9 +64,9 @@ var Me = Object.defineProperty, Ne = (e, t) => {
|
|
|
64
64
|
weight: 1,
|
|
65
65
|
op: "replace",
|
|
66
66
|
enabled: !0
|
|
67
|
-
},
|
|
68
|
-
typeof window < "u" && window.addEventListener("resize",
|
|
69
|
-
var
|
|
67
|
+
}, ze = 0, Be = /* @__PURE__ */ new WeakMap(), Ve = () => ze, He = () => (Be = /* @__PURE__ */ new WeakMap(), ++ze);
|
|
68
|
+
typeof window < "u" && window.addEventListener("resize", He, { passive: !0 });
|
|
69
|
+
var Ue = (e, t) => {
|
|
70
70
|
switch (t) {
|
|
71
71
|
case "cm": return 96 / 2.54 * e;
|
|
72
72
|
case "mm": return 96 / 25.4 * e;
|
|
@@ -76,7 +76,7 @@ var He = (e, t) => {
|
|
|
76
76
|
case "pc": return e * 16;
|
|
77
77
|
default: return e;
|
|
78
78
|
}
|
|
79
|
-
},
|
|
79
|
+
}, We = (e, t) => {
|
|
80
80
|
if (typeof window > "u") return;
|
|
81
81
|
let n = /^(sv|lv|dv|v)?(w|h|i|b|min|max)$/.exec(e);
|
|
82
82
|
if (!n) return;
|
|
@@ -89,7 +89,7 @@ var He = (e, t) => {
|
|
|
89
89
|
case "min": return Math.min(o, s);
|
|
90
90
|
case "max": return Math.max(o, s);
|
|
91
91
|
}
|
|
92
|
-
},
|
|
92
|
+
}, Ge = (e) => {
|
|
93
93
|
let t = e.parentElement;
|
|
94
94
|
for (; t;) {
|
|
95
95
|
let e = getComputedStyle(t).containerType;
|
|
@@ -97,17 +97,17 @@ var He = (e, t) => {
|
|
|
97
97
|
t = t.parentElement;
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
|
-
function
|
|
100
|
+
function Ke(e, t, n, r) {
|
|
101
101
|
let i = t === "em" || t === "rem" || t === "ex" || t === "ch" || t === "cap" || t === "ic" || t === "lh" || t === "rlh";
|
|
102
|
-
if (!w(t) && !i) return
|
|
102
|
+
if (!w(t) && !i) return Ue(e, t);
|
|
103
103
|
if (t === "%" && n?.parentElement && r) {
|
|
104
104
|
let t = Number.parseFloat(getComputedStyle(n.parentElement).getPropertyValue(r));
|
|
105
105
|
return e / 100 * t;
|
|
106
106
|
}
|
|
107
|
-
let a =
|
|
107
|
+
let a = We(t, n);
|
|
108
108
|
if (a !== void 0) return e * a / 100;
|
|
109
109
|
if (t.startsWith("cq") && n) {
|
|
110
|
-
let r =
|
|
110
|
+
let r = Ge(n);
|
|
111
111
|
if (!r) return e;
|
|
112
112
|
let i = r.clientWidth, a = r.clientHeight, o = getComputedStyle(r).writingMode, s = o.startsWith("vertical") || o.startsWith("sideways");
|
|
113
113
|
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;
|
|
@@ -127,25 +127,25 @@ function Ge(e, t, n, r) {
|
|
|
127
127
|
let t = Number.parseFloat(s.lineHeight);
|
|
128
128
|
return e * (Number.isFinite(t) ? t : c * 1.2);
|
|
129
129
|
}
|
|
130
|
-
default: return
|
|
130
|
+
default: return Ue(e, t);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
var
|
|
133
|
+
var qe = class extends TypeError {
|
|
134
134
|
property;
|
|
135
135
|
authoredValue;
|
|
136
136
|
actual;
|
|
137
137
|
code = "BROWSER_SCALAR_RESOLUTION";
|
|
138
138
|
constructor(e, t, n) {
|
|
139
|
-
super(`Could not resolve "${
|
|
139
|
+
super(`Could not resolve "${b(t)}" for "${e}" to a numeric CSS scalar${n === "" ? "" : ` (computed: "${n}")`}.`), this.property = e, this.authoredValue = t, this.actual = n, this.name = "BrowserScalarResolutionError";
|
|
140
140
|
}
|
|
141
|
-
},
|
|
142
|
-
let r = () => new
|
|
141
|
+
}, Je = (e, t, n) => {
|
|
142
|
+
let r = () => new qe(n, t, e), i = S(de(e), r);
|
|
143
143
|
if (i.payload.type !== "number") throw r();
|
|
144
144
|
return Object.freeze({
|
|
145
145
|
value: i.payload.value,
|
|
146
146
|
unit: i.payload.unit
|
|
147
147
|
});
|
|
148
|
-
},
|
|
148
|
+
}, Ye = (e) => {
|
|
149
149
|
if (e.kind !== "call" || e.name !== "var") return;
|
|
150
150
|
let t = e.args[0];
|
|
151
151
|
if (t?.kind === "scalar" && t.payload.type === "keyword") return t.payload.value;
|
|
@@ -153,7 +153,7 @@ var Ke = class extends TypeError {
|
|
|
153
153
|
let e = t.items[0];
|
|
154
154
|
if (e?.kind === "scalar" && e.payload.type === "keyword") return e.payload.value;
|
|
155
155
|
}
|
|
156
|
-
},
|
|
156
|
+
}, Xe = (e, t, n) => {
|
|
157
157
|
if (e.kind === "scalar" && e.payload.type === "number") {
|
|
158
158
|
let { value: r, unit: i } = e.payload;
|
|
159
159
|
return w(i) || [
|
|
@@ -166,55 +166,55 @@ var Ke = class extends TypeError {
|
|
|
166
166
|
"lh",
|
|
167
167
|
"rlh"
|
|
168
168
|
].includes(i) ? Object.freeze({
|
|
169
|
-
value:
|
|
169
|
+
value: Ke(r, i, t, n),
|
|
170
170
|
unit: "px"
|
|
171
171
|
}) : Object.freeze({
|
|
172
172
|
value: r,
|
|
173
173
|
unit: i
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
let r =
|
|
176
|
+
let r = Ye(e);
|
|
177
177
|
if (r !== void 0) {
|
|
178
178
|
let i = getComputedStyle(t).getPropertyValue(r).trim(), a = t.style.getPropertyValue(r).trim();
|
|
179
|
-
return
|
|
179
|
+
return Je(i || a, e, n);
|
|
180
180
|
}
|
|
181
|
-
let i = n.split(".", 1)[0] ?? n, a = t.style.getPropertyValue(i), o = t.style.getPropertyPriority(i), s =
|
|
181
|
+
let i = n.split(".", 1)[0] ?? n, a = t.style.getPropertyValue(i), o = t.style.getPropertyPriority(i), s = b(e), c = "";
|
|
182
182
|
try {
|
|
183
183
|
t.style.setProperty(i, s), c = getComputedStyle(t).getPropertyValue(i).trim();
|
|
184
184
|
} finally {
|
|
185
185
|
a === "" ? t.style.removeProperty(i) : t.style.setProperty(i, a, o);
|
|
186
186
|
}
|
|
187
|
-
return
|
|
187
|
+
return Je(c, e, n);
|
|
188
188
|
};
|
|
189
|
-
function
|
|
190
|
-
if (!t.isConnected) return
|
|
191
|
-
let r =
|
|
192
|
-
r === void 0 && (r = /* @__PURE__ */ new WeakMap(),
|
|
189
|
+
function Ze(e, t, n) {
|
|
190
|
+
if (!t.isConnected) return Xe(e, t, n);
|
|
191
|
+
let r = Be.get(e);
|
|
192
|
+
r === void 0 && (r = /* @__PURE__ */ new WeakMap(), Be.set(e, r));
|
|
193
193
|
let i = r.get(t);
|
|
194
194
|
i === void 0 && (i = /* @__PURE__ */ new Map(), r.set(t, i));
|
|
195
195
|
let a = i.get(n);
|
|
196
|
-
if (a?.epoch ===
|
|
197
|
-
let o =
|
|
196
|
+
if (a?.epoch === ze) return a.result;
|
|
197
|
+
let o = Xe(e, t, n), s = Object.freeze({
|
|
198
198
|
result: o,
|
|
199
|
-
epoch:
|
|
199
|
+
epoch: ze
|
|
200
200
|
});
|
|
201
201
|
return i.set(n, s), o;
|
|
202
202
|
}
|
|
203
203
|
//#endregion
|
|
204
204
|
//#region src/animation/compile/frame/interp-slot.ts
|
|
205
|
-
var
|
|
205
|
+
var Qe = {
|
|
206
206
|
deg: 1,
|
|
207
207
|
grad: .9,
|
|
208
208
|
rad: 180 / Math.PI,
|
|
209
209
|
turn: 360
|
|
210
|
-
},
|
|
210
|
+
}, $e = {
|
|
211
211
|
ms: 1,
|
|
212
212
|
s: 1e3
|
|
213
|
-
},
|
|
213
|
+
}, et = {
|
|
214
214
|
dpi: 1,
|
|
215
215
|
dpcm: 2.54,
|
|
216
216
|
dppx: 96
|
|
217
|
-
},
|
|
217
|
+
}, D = 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([
|
|
218
218
|
"em",
|
|
219
219
|
"rem",
|
|
220
220
|
"ex",
|
|
@@ -231,7 +231,7 @@ var Ze = {
|
|
|
231
231
|
return t?.type === "color" ? t.value : void 0;
|
|
232
232
|
}, 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) => {
|
|
233
233
|
let n = e.unit, r = t.unit;
|
|
234
|
-
return e.value === 0 && n === "" && r !== "" && (n = r), t.value === 0 && r === "" && n !== "" && (r = n), n === r || !
|
|
234
|
+
return e.value === 0 && n === "" && r !== "" && (n = r), t.value === 0 && r === "" && n !== "" && (r = n), n === r || !D.has(n) || !D.has(r) ? !1 : w(n) || w(r) || tt.has(n) || tt.has(r);
|
|
235
235
|
}, ct = (e, t, n) => ({
|
|
236
236
|
kind: "computed",
|
|
237
237
|
from: e,
|
|
@@ -248,27 +248,27 @@ var Ze = {
|
|
|
248
248
|
t.value,
|
|
249
249
|
r
|
|
250
250
|
];
|
|
251
|
-
let a =
|
|
251
|
+
let a = Qe[r], o = Qe[i];
|
|
252
252
|
if (a !== void 0 && o !== void 0) return [
|
|
253
253
|
e.value * a,
|
|
254
254
|
t.value * o,
|
|
255
255
|
"deg"
|
|
256
256
|
];
|
|
257
|
-
let s =
|
|
257
|
+
let s = $e[r], c = $e[i];
|
|
258
258
|
if (s !== void 0 && c !== void 0) return [
|
|
259
259
|
e.value * s,
|
|
260
260
|
t.value * c,
|
|
261
261
|
"ms"
|
|
262
262
|
];
|
|
263
|
-
let l =
|
|
263
|
+
let l = et[r], u = et[i];
|
|
264
264
|
if (l !== void 0 && u !== void 0) return [
|
|
265
265
|
e.value * l,
|
|
266
266
|
t.value * u,
|
|
267
267
|
"dpi"
|
|
268
268
|
];
|
|
269
|
-
if (
|
|
270
|
-
|
|
271
|
-
|
|
269
|
+
if (D.has(r) && D.has(i)) return [
|
|
270
|
+
Ke(e.value, r, n.target, n.property),
|
|
271
|
+
Ke(t.value, i, n.target, n.property),
|
|
272
272
|
"px"
|
|
273
273
|
];
|
|
274
274
|
throw TypeError(`Cannot interpolate incompatible CSS units "${r}" and "${i}" for "${n.property}".`);
|
|
@@ -339,9 +339,9 @@ function ft(e, t, n) {
|
|
|
339
339
|
n !== void 0 && O(e, n);
|
|
340
340
|
let r = e.target;
|
|
341
341
|
if (r === void 0) throw TypeError(`Computed CSS interpolation for "${e.property}" requires a browser target at sample time.`);
|
|
342
|
-
let i =
|
|
342
|
+
let i = Ve(), a = e.cache;
|
|
343
343
|
if (a === void 0 || a.epoch !== i || a.target !== r) {
|
|
344
|
-
let [t, n, o] = ut(
|
|
344
|
+
let [t, n, o] = ut(Ze(e.from, r, e.property), Ze(e.to, r, e.property), r, e.property);
|
|
345
345
|
a = Object.freeze({
|
|
346
346
|
epoch: i,
|
|
347
347
|
target: r,
|
|
@@ -367,8 +367,8 @@ function pt(e) {
|
|
|
367
367
|
if (!t.ok) throw TypeError(`Color serialization failed: ${t.error.code}.`);
|
|
368
368
|
return t.value;
|
|
369
369
|
}
|
|
370
|
-
case "computed": return e.cache === void 0 ?
|
|
371
|
-
case "discrete": return
|
|
370
|
+
case "computed": return e.cache === void 0 ? b(e.from) : `${e.current}${e.unit}`;
|
|
371
|
+
case "discrete": return b(e.current);
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
//#endregion
|
|
@@ -532,20 +532,20 @@ var yt = {
|
|
|
532
532
|
}
|
|
533
533
|
}))
|
|
534
534
|
};
|
|
535
|
-
},
|
|
535
|
+
}, A = (e) => e.every((e) => e.kind === "call") ? new Set(e.map((e) => e.name)).size === e.length : !1, xt = (e, t) => {
|
|
536
536
|
let n = [...e.map((e) => e.name)];
|
|
537
537
|
for (let e of t) n.includes(e.name) || n.push(e.name);
|
|
538
538
|
let r = new Map(e.map((e) => [e.name, e])), i = new Map(t.map((e) => [e.name, e]));
|
|
539
539
|
return [n.map((e) => r.get(e) ?? bt(i.get(e))), n.map((e) => i.get(e) ?? bt(r.get(e)))];
|
|
540
|
-
},
|
|
540
|
+
}, St = (e) => e.kind === "call" && (e.name === "var" || e.name === "calc"), Ct = (e) => e.kind === "list" && e.items.length === 1 ? e.items[0] : void 0, j = (e, t) => t.kind === "list" ? {
|
|
541
541
|
kind: "list",
|
|
542
542
|
separator: t.separator,
|
|
543
|
-
items: t.items.map((t) =>
|
|
543
|
+
items: t.items.map((t) => j(e, t))
|
|
544
544
|
} : e;
|
|
545
|
-
function
|
|
545
|
+
function wt(e, t, n) {
|
|
546
546
|
let r = [], i = (e, t) => {
|
|
547
|
-
let a = e, o = t, s =
|
|
548
|
-
if (s !== void 0 && o.kind !== "list" ? a = s : c !== void 0 && a.kind !== "list" ? o = c : a.kind === "scalar" && o.kind === "list" ? a =
|
|
547
|
+
let a = e, o = t, s = Ct(a), c = Ct(o), l = a.kind === "list" && o.kind === "list" && A(a.items) && A(o.items);
|
|
548
|
+
if (s !== void 0 && o.kind !== "list" ? a = s : c !== void 0 && a.kind !== "list" ? o = c : a.kind === "scalar" && o.kind === "list" ? a = j(a, o) : o.kind === "scalar" && a.kind === "list" ? o = j(o, a) : !l && a.kind === "list" && s !== void 0 && o.kind === "list" && (a.separator !== o.separator || a.items.length !== o.items.length) ? a = j(s, o) : !l && o.kind === "list" && c !== void 0 && a.kind === "list" && (o.separator !== a.separator || o.items.length !== a.items.length) && (o = j(c, a)), St(a) || St(o) || a.kind === "call" && o.kind === "call" && a.name !== o.name || a.kind !== o.kind && (a.kind === "call" || o.kind === "call")) {
|
|
549
549
|
let e = r.length;
|
|
550
550
|
return r.push(dt(a, o, n)), {
|
|
551
551
|
kind: "slot",
|
|
@@ -571,7 +571,7 @@ function Tt(e, t, n) {
|
|
|
571
571
|
if (a.kind === "list" && o.kind === "list") {
|
|
572
572
|
if (a.separator !== o.separator) throw TypeError(`Cannot interpolate CSS lists with different separators for "${n.property}".`);
|
|
573
573
|
let e = a.items, t = o.items;
|
|
574
|
-
if (
|
|
574
|
+
if (A(e) && A(t)) [e, t] = xt(e, t);
|
|
575
575
|
else if (e.length !== t.length) throw TypeError(`Cannot interpolate CSS lists with different lengths for "${n.property}".`);
|
|
576
576
|
return {
|
|
577
577
|
kind: "list",
|
|
@@ -586,17 +586,17 @@ function Tt(e, t, n) {
|
|
|
586
586
|
slots: r
|
|
587
587
|
};
|
|
588
588
|
}
|
|
589
|
-
var
|
|
590
|
-
function
|
|
589
|
+
var Tt = (e) => e === "comma" ? ", " : e === "slash" ? " / " : " ";
|
|
590
|
+
function Et(e) {
|
|
591
591
|
let t = (n) => {
|
|
592
592
|
if (n.kind === "slot") return pt(e.slots[n.index]);
|
|
593
|
-
if (n.kind === "list") return n.items.map(t).join(
|
|
593
|
+
if (n.kind === "list") return n.items.map(t).join(Tt(n.separator));
|
|
594
594
|
let r = n.name === "calc" ? " " : ", ";
|
|
595
595
|
return `${n.name}(${n.args.map(t).join(r)})`;
|
|
596
596
|
};
|
|
597
597
|
return t(e.template);
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function Dt(e, t) {
|
|
600
600
|
for (let n of t) for (let [t, r] of Object.entries(e)) {
|
|
601
601
|
if (r === void 0) {
|
|
602
602
|
n.style.removeProperty(t);
|
|
@@ -607,7 +607,7 @@ function Ot(e, t) {
|
|
|
607
607
|
}
|
|
608
608
|
//#endregion
|
|
609
609
|
//#region src/animation/compile/value/sink.ts
|
|
610
|
-
var
|
|
610
|
+
var Ot = (e) => e.template.kind === "slot" && e.slots.length === 1 && e.slots[0]?.kind === "number" && e.slots[0].unit === "", kt = (e, t) => {
|
|
611
611
|
let n = t.split("."), r = e;
|
|
612
612
|
for (let e = 0; e < n.length - 1; e++) {
|
|
613
613
|
let t = n[e], i = r[t];
|
|
@@ -618,10 +618,10 @@ var kt = (e) => e.template.kind === "slot" && e.slots.length === 1 && e.slots[0]
|
|
|
618
618
|
leaf: n.at(-1)
|
|
619
619
|
};
|
|
620
620
|
};
|
|
621
|
-
function
|
|
621
|
+
function At(e) {
|
|
622
622
|
let t = {}, n = {}, r = [];
|
|
623
623
|
for (let [i, a] of Object.entries(e)) {
|
|
624
|
-
let { parent: e, leaf: o } =
|
|
624
|
+
let { parent: e, leaf: o } = kt(t, i), s = Ot(a), c = s ? a.slots[0].current : Et(a);
|
|
625
625
|
e[o] = c, n[i] = c, r.push({
|
|
626
626
|
key: i,
|
|
627
627
|
parent: e,
|
|
@@ -636,13 +636,13 @@ function jt(e) {
|
|
|
636
636
|
writers: r
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function jt(e) {
|
|
640
640
|
let t = {};
|
|
641
641
|
return {
|
|
642
642
|
root: t,
|
|
643
643
|
flat: e,
|
|
644
644
|
writers: Object.keys(e).map((n) => {
|
|
645
|
-
let { parent: r, leaf: i } =
|
|
645
|
+
let { parent: r, leaf: i } = kt(t, n);
|
|
646
646
|
return r[i] = e[n], {
|
|
647
647
|
key: n,
|
|
648
648
|
parent: r,
|
|
@@ -651,18 +651,18 @@ function Mt(e) {
|
|
|
651
651
|
})
|
|
652
652
|
};
|
|
653
653
|
}
|
|
654
|
-
function
|
|
654
|
+
function Mt(e) {
|
|
655
655
|
for (let t of e.writers) t.parent[t.leaf] = e.flat[t.key];
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function Nt(e) {
|
|
658
658
|
for (let t of e.writers) {
|
|
659
|
-
let n = t.numeric ? t.value.slots[0].current :
|
|
659
|
+
let n = t.numeric ? t.value.slots[0].current : Et(t.value);
|
|
660
660
|
t.parent[t.leaf] = n, e.flat[t.key] = n;
|
|
661
661
|
}
|
|
662
662
|
}
|
|
663
663
|
//#endregion
|
|
664
664
|
//#region src/animation/internal/scroll-phases.ts
|
|
665
|
-
var
|
|
665
|
+
var M = {
|
|
666
666
|
entry: {
|
|
667
667
|
start: 0,
|
|
668
668
|
end: .25
|
|
@@ -679,17 +679,17 @@ var j = {
|
|
|
679
679
|
start: .75,
|
|
680
680
|
end: 1
|
|
681
681
|
}
|
|
682
|
-
},
|
|
683
|
-
function
|
|
682
|
+
}, Pt = 1e6;
|
|
683
|
+
function Ft(e) {
|
|
684
684
|
return S(se(e), (n) => new t("start", e, `invalid keyframe selector — ${n.map(ve).join("; ")}`, e.trim() === "" ? "EMPTY_PARSE" : void 0));
|
|
685
685
|
}
|
|
686
|
-
var
|
|
686
|
+
var It = (e) => {
|
|
687
687
|
if (e.kind !== "named") throw new t("start", e, "named phase resolution requires a parsed named keyframe selector", "NAMED_SELECTOR_NO_TIMELINE");
|
|
688
|
-
let n =
|
|
688
|
+
let n = M[e.name];
|
|
689
689
|
if (n === void 0) throw new t("start", e, `no timeline phase is defined for ${JSON.stringify(e.name)}`, "NAMED_SELECTOR_NO_TIMELINE");
|
|
690
690
|
let r = e.offset ?? 0;
|
|
691
691
|
return n.start + r * (n.end - n.start);
|
|
692
|
-
},
|
|
692
|
+
}, Lt = (e) => {
|
|
693
693
|
let t = [], n = [];
|
|
694
694
|
for (let r of e) r.kind === "number" ? t.push(r) : n.push(r);
|
|
695
695
|
let r = new Float64Array(t.length), i = new Float64Array(t.length);
|
|
@@ -701,35 +701,35 @@ var Lt = (e) => {
|
|
|
701
701
|
to: i,
|
|
702
702
|
out: new Float64Array(t.length)
|
|
703
703
|
};
|
|
704
|
-
},
|
|
705
|
-
if (typeof
|
|
706
|
-
if (typeof
|
|
707
|
-
if (typeof
|
|
708
|
-
throw new t(
|
|
709
|
-
}
|
|
710
|
-
if (typeof
|
|
711
|
-
let
|
|
704
|
+
}, Rt = (e, n) => {
|
|
705
|
+
if (typeof n == "function") return { fn: n };
|
|
706
|
+
if (typeof n == "object") {
|
|
707
|
+
if (typeof n.fn == "function") return n;
|
|
708
|
+
throw new t(e, n, "an Easing must carry a callable `fn`");
|
|
709
|
+
}
|
|
710
|
+
if (typeof n != "string") throw new t(e, n, "a timing-function name or CSS timing-function literal must be a string");
|
|
711
|
+
let r;
|
|
712
712
|
try {
|
|
713
|
-
|
|
713
|
+
r = _e(n);
|
|
714
714
|
} catch {
|
|
715
|
-
throw new t(
|
|
715
|
+
throw new t(e, n, "unknown timing function — pass a callable TimingFunction, a typed Easing, a registry name, or a cubic-bezier() literal", "UNKNOWN_TIMING_FN");
|
|
716
716
|
}
|
|
717
|
-
let
|
|
718
|
-
return
|
|
719
|
-
fn:
|
|
720
|
-
css:
|
|
721
|
-
} : { fn:
|
|
717
|
+
let i = _(n);
|
|
718
|
+
return i ? {
|
|
719
|
+
fn: r,
|
|
720
|
+
css: i
|
|
721
|
+
} : { fn: r };
|
|
722
722
|
};
|
|
723
723
|
//#endregion
|
|
724
724
|
//#region src/animation/compile/frame/compiler.ts
|
|
725
|
-
function
|
|
725
|
+
function zt(e, t, n) {
|
|
726
726
|
let [r, i] = [e.start, t.start];
|
|
727
727
|
return {
|
|
728
728
|
start: r.kind === "percent" ? r.value * n : NaN,
|
|
729
729
|
stop: i.kind === "percent" ? i.value * n : NaN
|
|
730
730
|
};
|
|
731
731
|
}
|
|
732
|
-
var
|
|
732
|
+
var Bt = class {
|
|
733
733
|
_options;
|
|
734
734
|
templateFrames = [];
|
|
735
735
|
parsedVars = [];
|
|
@@ -747,12 +747,12 @@ var Vt = class {
|
|
|
747
747
|
}
|
|
748
748
|
addFrame(e, t, n, r, i) {
|
|
749
749
|
typeof e == "number" && (e = `${e}%`);
|
|
750
|
-
let a = typeof e == "string" ?
|
|
750
|
+
let a = typeof e == "string" ? Ft(e) : e, o = {
|
|
751
751
|
id: this.frameId,
|
|
752
752
|
start: a,
|
|
753
753
|
vars: t,
|
|
754
754
|
transform: n,
|
|
755
|
-
timingFunction: r == null ? this.options.timingFunction :
|
|
755
|
+
timingFunction: r == null ? this.options.timingFunction : Rt("timingFunction", r),
|
|
756
756
|
composition: i
|
|
757
757
|
};
|
|
758
758
|
this.templateFrames.push(o), this.frameId += 1;
|
|
@@ -761,7 +761,7 @@ var Vt = class {
|
|
|
761
761
|
let n = this.templateFrames[e], r = this.templateFrames[t], i = {
|
|
762
762
|
start: e,
|
|
763
763
|
stop: t
|
|
764
|
-
}, a =
|
|
764
|
+
}, a = zt(n, r, this.options.duration), o = n.transform;
|
|
765
765
|
if (o == null) {
|
|
766
766
|
let t = mt(e, this.templateFrames, (e) => e.transform != null);
|
|
767
767
|
o = (t === void 0 ? void 0 : this.templateFrames[t].transform) ?? T;
|
|
@@ -771,7 +771,7 @@ var Vt = class {
|
|
|
771
771
|
let t = mt(e, this.templateFrames, (e) => e.timingFunction != null);
|
|
772
772
|
s = (t === void 0 ? void 0 : this.templateFrames[t].timingFunction) ?? this.options.timingFunction;
|
|
773
773
|
}
|
|
774
|
-
let c = e *
|
|
774
|
+
let c = e * Pt + t, l = r.composition;
|
|
775
775
|
return {
|
|
776
776
|
id: c,
|
|
777
777
|
ixs: i,
|
|
@@ -814,8 +814,8 @@ var Vt = class {
|
|
|
814
814
|
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));
|
|
815
815
|
}
|
|
816
816
|
finalizeFrameVars(e) {
|
|
817
|
-
let t =
|
|
818
|
-
e._sink = t, e.flatVars = t.flat, e.vars = t.root, e.allInterpVars = Object.values(e.interpVars).flatMap((e) => e.slots), e._numericPlan =
|
|
817
|
+
let t = At(e.interpVars);
|
|
818
|
+
e._sink = t, e.flatVars = t.flat, e.vars = t.root, e.allInterpVars = Object.values(e.interpVars).flatMap((e) => e.slots), e._numericPlan = Lt(e.allInterpVars);
|
|
819
819
|
}
|
|
820
820
|
renormalizeColors() {
|
|
821
821
|
for (let e of this._frames) {
|
|
@@ -824,32 +824,32 @@ var Vt = class {
|
|
|
824
824
|
}
|
|
825
825
|
}
|
|
826
826
|
compileValue(e, t, n) {
|
|
827
|
-
return
|
|
827
|
+
return wt(t, n, {
|
|
828
828
|
colorSpace: this.options.colorSpace,
|
|
829
829
|
property: e,
|
|
830
830
|
...this.options.hueMethod === void 0 ? {} : { hueMethod: this.options.hueMethod },
|
|
831
831
|
...this._targets[0] === void 0 ? {} : { target: this._targets[0] }
|
|
832
832
|
});
|
|
833
833
|
}
|
|
834
|
-
},
|
|
835
|
-
let t =
|
|
834
|
+
}, Vt = /* @__PURE__ */ new WeakMap(), N = (e) => {
|
|
835
|
+
let t = Vt.get(e);
|
|
836
836
|
if (t === void 0) throw TypeError("Animation compiler state is not initialized.");
|
|
837
837
|
return t;
|
|
838
|
-
},
|
|
839
|
-
|
|
838
|
+
}, Ht = (e, t) => {
|
|
839
|
+
Vt.set(e, t);
|
|
840
840
|
};
|
|
841
841
|
//#endregion
|
|
842
842
|
//#region src/animation/engine/play-lifecycle/events.ts
|
|
843
|
-
function
|
|
843
|
+
function Ut(e, t) {
|
|
844
844
|
if (!(typeof AnimationEvent > "u")) for (let n of e.targets) typeof n?.dispatchEvent == "function" && n.dispatchEvent(new AnimationEvent(t, {
|
|
845
845
|
animationName: e.name ?? "",
|
|
846
846
|
elapsedTime: e._playback.t / 1e3
|
|
847
847
|
}));
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function Wt(e, t) {
|
|
850
850
|
return e === "reverse" || e === "alternate-reverse" && t % 2 == 0 || e === "alternate" && t % 2 == 1;
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function Gt(e) {
|
|
853
853
|
if (e._playback.startTime !== void 0) {
|
|
854
854
|
let t = e._playback.t, n = e.options.duration - 2 * t;
|
|
855
855
|
e._playback.startTime -= n;
|
|
@@ -858,36 +858,36 @@ function Kt(e) {
|
|
|
858
858
|
}
|
|
859
859
|
//#endregion
|
|
860
860
|
//#region src/animation/engine/play-lifecycle/transport.ts
|
|
861
|
-
function
|
|
861
|
+
function Kt(e) {
|
|
862
862
|
e._playback.started && (e._playback.paused = !0);
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function qt(e) {
|
|
865
865
|
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();
|
|
866
866
|
else e.playback.running || e.playback.loop(e._playback._boundFrame);
|
|
867
867
|
}
|
|
868
|
+
function Jt(e) {
|
|
869
|
+
s(e._playback, () => Kt(e), () => qt(e));
|
|
870
|
+
}
|
|
868
871
|
function Yt(e) {
|
|
869
|
-
|
|
872
|
+
en(e), e.playback.stop(), P(e), $t(e);
|
|
870
873
|
}
|
|
871
874
|
function Xt(e) {
|
|
872
|
-
|
|
875
|
+
return p(e._playback);
|
|
873
876
|
}
|
|
874
877
|
function Zt(e) {
|
|
875
|
-
return m(e._playback);
|
|
876
|
-
}
|
|
877
|
-
function Qt(e) {
|
|
878
878
|
return e._playback.reversed ? e.options.duration - e._playback.t : e._playback.t;
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function P(e) {
|
|
881
881
|
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;
|
|
882
882
|
}
|
|
883
|
-
function
|
|
884
|
-
|
|
883
|
+
function Qt(e) {
|
|
884
|
+
en(e), e._playback.started && e.frames.length > 0 && e.fillBackwards(), P(e);
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function $t(e) {
|
|
887
887
|
let t = e._playback.resolvePromise;
|
|
888
888
|
e._playback.resolvePromise = null, t?.();
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function en(e) {
|
|
891
891
|
let t = e._playback._waAnimations;
|
|
892
892
|
if (t.length !== 0) {
|
|
893
893
|
for (let e of t) try {
|
|
@@ -898,7 +898,7 @@ function tn(e) {
|
|
|
898
898
|
}
|
|
899
899
|
//#endregion
|
|
900
900
|
//#region src/animation/waapi/eligibility.ts
|
|
901
|
-
var
|
|
901
|
+
var tn = new Set([
|
|
902
902
|
"em",
|
|
903
903
|
"rem",
|
|
904
904
|
"ex",
|
|
@@ -907,11 +907,11 @@ var nn = new Set([
|
|
|
907
907
|
"ic",
|
|
908
908
|
"lh",
|
|
909
909
|
"rlh"
|
|
910
|
-
]),
|
|
910
|
+
]), nn = (e) => typeof e == "string" && (w(e) || tn.has(e)), rn = (e) => {
|
|
911
911
|
if (e.kind === "call") return e.name;
|
|
912
912
|
if (!(e.kind !== "scalar" || e.payload.type !== "number")) return e.payload.unit;
|
|
913
|
-
},
|
|
914
|
-
function
|
|
913
|
+
}, an = new Set(["offset-distance"]), on = (e) => an.has(e) || an.has(e.split(".").pop() ?? e), sn = () => typeof globalThis.webkitConvertPointFromNodeToPage == "function";
|
|
914
|
+
function F(e) {
|
|
915
915
|
if (!e.targets || e.targets.length === 0) return {
|
|
916
916
|
eligible: !1,
|
|
917
917
|
reason: "no DOM targets"
|
|
@@ -936,14 +936,14 @@ function P(e) {
|
|
|
936
936
|
eligible: !1,
|
|
937
937
|
reason: "easing has no faithful CSS twin (would run bare linear on the compositor)"
|
|
938
938
|
};
|
|
939
|
-
if (n?.css?.startsWith("linear(") &&
|
|
939
|
+
if (n?.css?.startsWith("linear(") && sn()) return {
|
|
940
940
|
eligible: !1,
|
|
941
941
|
reason: "WebKit refuses HW-accel for linear() easing — the spring twin stays on the rAF path (CE-1.0)"
|
|
942
942
|
};
|
|
943
943
|
for (let e of t) for (let [t, n] of Object.entries(e.interpVars)) {
|
|
944
|
-
let e =
|
|
944
|
+
let e = on(t);
|
|
945
945
|
for (let t of n.slots) {
|
|
946
|
-
let n = t.kind === "number" ? t.unit : t.kind === "computed" ?
|
|
946
|
+
let n = t.kind === "number" ? t.unit : t.kind === "computed" ? rn(t.from) : void 0, r = t.kind === "number" ? t.unit : t.kind === "computed" ? rn(t.to) : void 0, i = e && t.kind === "number" && n === "%", a = e && t.kind === "number" && r === "%", o = nn(n) && !i, s = nn(r) && !a;
|
|
947
947
|
if (o || s) return {
|
|
948
948
|
eligible: !1,
|
|
949
949
|
reason: `layout-dependent unit (${String(n ?? r)}) would freeze to px under WAAPI`
|
|
@@ -956,11 +956,11 @@ function P(e) {
|
|
|
956
956
|
}
|
|
957
957
|
return { eligible: !0 };
|
|
958
958
|
}
|
|
959
|
-
var
|
|
959
|
+
var cn = .005, ln = /^(steps\(|step-start$|step-end$)/, un = (e) => {
|
|
960
960
|
let t = /* @__PURE__ */ new Map(), n = e.frames;
|
|
961
961
|
for (let e of n) {
|
|
962
962
|
let n = e.timingFunction.css;
|
|
963
|
-
if (n !== void 0 &&
|
|
963
|
+
if (n !== void 0 && ln.test(n.trim())) return !1;
|
|
964
964
|
for (let [n, r] of Object.entries(e.interpVars)) {
|
|
965
965
|
if (r.slots.length === 0 || r.slots.some((e) => e.kind !== "number")) return !1;
|
|
966
966
|
let e = JSON.stringify(r.template), i = t.get(n);
|
|
@@ -969,7 +969,7 @@ var ln = .005, un = /^(steps\(|step-start$|step-end$)/, dn = (e) => {
|
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
971
|
return !0;
|
|
972
|
-
},
|
|
972
|
+
}, I = (e, t) => {
|
|
973
973
|
let n = /* @__PURE__ */ new Map();
|
|
974
974
|
e.interpFrames(t, !1);
|
|
975
975
|
let r = e.frames, i = /* @__PURE__ */ new Map();
|
|
@@ -979,10 +979,10 @@ var ln = .005, un = /^(steps\(|step-start$|step-end$)/, dn = (e) => {
|
|
|
979
979
|
i.kind === "number" && Number.isFinite(i.current) && n.set(`${e}\u0000${r}`, i.current);
|
|
980
980
|
}
|
|
981
981
|
return n;
|
|
982
|
-
},
|
|
982
|
+
}, dn = 64, fn = (e, t, n) => {
|
|
983
983
|
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = n - t;
|
|
984
|
-
for (let n = 0; n <=
|
|
985
|
-
let o =
|
|
984
|
+
for (let n = 0; n <= dn; n++) {
|
|
985
|
+
let o = I(e, t + a * n / dn);
|
|
986
986
|
for (let [e, t] of o) {
|
|
987
987
|
let n = r.get(e), a = i.get(e);
|
|
988
988
|
(n === void 0 || t < n) && r.set(e, t), (a === void 0 || t > a) && i.set(e, t);
|
|
@@ -991,10 +991,10 @@ var ln = .005, un = /^(steps\(|step-start$|step-end$)/, dn = (e) => {
|
|
|
991
991
|
let o = /* @__PURE__ */ new Map();
|
|
992
992
|
for (let [e, t] of r) o.set(e, (i.get(e) ?? t) - t);
|
|
993
993
|
return o;
|
|
994
|
-
},
|
|
994
|
+
}, pn = (e, t, n, r, i, a) => {
|
|
995
995
|
let o = r - t, s = 0;
|
|
996
996
|
for (let r of [.25, .75]) {
|
|
997
|
-
let c =
|
|
997
|
+
let c = I(e, t + o * r);
|
|
998
998
|
for (let [e, t] of c) {
|
|
999
999
|
let o = n.get(e), c = i.get(e);
|
|
1000
1000
|
if (o === void 0 || c === void 0) continue;
|
|
@@ -1006,21 +1006,21 @@ var ln = .005, un = /^(steps\(|step-start$|step-end$)/, dn = (e) => {
|
|
|
1006
1006
|
}
|
|
1007
1007
|
return s;
|
|
1008
1008
|
};
|
|
1009
|
-
function
|
|
1009
|
+
function mn(e, t, n) {
|
|
1010
1010
|
let r = /* @__PURE__ */ new Set();
|
|
1011
1011
|
if (n <= 0) return r;
|
|
1012
1012
|
for (let n = 1; n < t.length; n++) {
|
|
1013
1013
|
let i = t[n - 1], a = t[n];
|
|
1014
1014
|
if (a - i <= 0) continue;
|
|
1015
|
-
let o =
|
|
1015
|
+
let o = fn(e, i, a), s = I(e, i), c = I(e, a), l = (t, n, r, i) => ({
|
|
1016
1016
|
a: t,
|
|
1017
1017
|
sampleA: n,
|
|
1018
1018
|
b: r,
|
|
1019
1019
|
sampleB: i,
|
|
1020
|
-
error:
|
|
1020
|
+
error: pn(e, t, n, r, i, o)
|
|
1021
1021
|
}), u = [l(i, s, a, c)], d = 16;
|
|
1022
1022
|
for (; d > 0;) {
|
|
1023
|
-
let t = -1, n =
|
|
1023
|
+
let t = -1, n = cn;
|
|
1024
1024
|
for (let e = 0; e < u.length; e++) u[e].error > n && (n = u[e].error, t = e);
|
|
1025
1025
|
if (t === -1) break;
|
|
1026
1026
|
let i = u[t], a = (i.a + i.b) / 2;
|
|
@@ -1028,7 +1028,7 @@ function hn(e, t, n) {
|
|
|
1028
1028
|
u.splice(t, 1);
|
|
1029
1029
|
continue;
|
|
1030
1030
|
}
|
|
1031
|
-
let o =
|
|
1031
|
+
let o = I(e, a);
|
|
1032
1032
|
r.add(a), d--, u.splice(t, 1, l(i.a, i.sampleA, a, o), l(a, o, i.b, i.sampleB));
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
@@ -1036,53 +1036,53 @@ function hn(e, t, n) {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
//#endregion
|
|
1038
1038
|
//#region src/animation/waapi/emission.ts
|
|
1039
|
-
function
|
|
1040
|
-
let t = e.options.duration,
|
|
1041
|
-
if (
|
|
1042
|
-
let
|
|
1043
|
-
for (let t of e.frames)
|
|
1044
|
-
let
|
|
1045
|
-
if (
|
|
1046
|
-
let
|
|
1047
|
-
for (let
|
|
1048
|
-
let
|
|
1049
|
-
if (Object.keys(
|
|
1050
|
-
let
|
|
1051
|
-
offset:
|
|
1052
|
-
...
|
|
1039
|
+
function hn(e) {
|
|
1040
|
+
let t = e.options.duration, r = [], i = e.frames.length > 1, a = i && un(e), o = i && !a ? e.frames[0]?.timingFunction.css : void 0;
|
|
1041
|
+
if (i && !a && o === void 0) throw TypeError("A multi-segment structural WAAPI animation requires a faithful CSS easing.");
|
|
1042
|
+
let s = /* @__PURE__ */ new Set();
|
|
1043
|
+
for (let t of e.frames) s.add(t.time.start), s.add(t.time.stop);
|
|
1044
|
+
let c = [...s].sort((e, t) => e - t), l = new Set(c);
|
|
1045
|
+
if (a) for (let n of mn(e, c, t)) l.add(n);
|
|
1046
|
+
let u = c.at(-1);
|
|
1047
|
+
for (let i of [...l].sort((e, t) => e - t)) {
|
|
1048
|
+
let a = e.interpFrames(i, !1);
|
|
1049
|
+
if (Object.keys(a).length === 0) continue;
|
|
1050
|
+
let s = {
|
|
1051
|
+
offset: n(i / t, 0, 1),
|
|
1052
|
+
...a
|
|
1053
1053
|
};
|
|
1054
|
-
|
|
1054
|
+
o !== void 0 && i !== u && (s.easing = o), r.push(s);
|
|
1055
1055
|
}
|
|
1056
|
-
return
|
|
1056
|
+
return r;
|
|
1057
1057
|
}
|
|
1058
1058
|
//#endregion
|
|
1059
1059
|
//#region src/animation/waapi/options.ts
|
|
1060
|
-
var
|
|
1060
|
+
var gn = {
|
|
1061
1061
|
normal: "normal",
|
|
1062
1062
|
reverse: "reverse",
|
|
1063
1063
|
alternate: "alternate",
|
|
1064
1064
|
"alternate-reverse": "alternate-reverse"
|
|
1065
|
-
},
|
|
1065
|
+
}, _n = {
|
|
1066
1066
|
none: "none",
|
|
1067
1067
|
forwards: "forwards",
|
|
1068
1068
|
backwards: "backwards",
|
|
1069
1069
|
both: "both"
|
|
1070
|
-
},
|
|
1070
|
+
}, vn = {
|
|
1071
1071
|
replace: "replace",
|
|
1072
1072
|
add: "add",
|
|
1073
1073
|
accumulate: "accumulate"
|
|
1074
|
-
},
|
|
1074
|
+
}, yn = (e) => {
|
|
1075
1075
|
for (let t of e.frames) {
|
|
1076
1076
|
let e = t.composition;
|
|
1077
|
-
if (e != null && e !== "replace") return
|
|
1077
|
+
if (e != null && e !== "replace") return vn[e] ?? "replace";
|
|
1078
1078
|
}
|
|
1079
1079
|
return "replace";
|
|
1080
1080
|
};
|
|
1081
|
-
function
|
|
1082
|
-
let t = e.options, n =
|
|
1081
|
+
function bn(e) {
|
|
1082
|
+
let t = e.options, n = gn[t.direction], r = _n[t.fillMode];
|
|
1083
1083
|
if (n == null) throw TypeError(`Unrecognised animation direction "${t.direction}".`);
|
|
1084
1084
|
if (r == null) throw TypeError(`Unrecognised animation fill mode "${t.fillMode}".`);
|
|
1085
|
-
let i = e.frames[0]?.timingFunction ?? e.options.timingFunction, a = e.frames.length > 1 ? "linear" : i.css ?? "linear", o =
|
|
1085
|
+
let i = e.frames[0]?.timingFunction ?? e.options.timingFunction, a = e.frames.length > 1 ? "linear" : i.css ?? "linear", o = yn(e), s = {
|
|
1086
1086
|
duration: t.duration,
|
|
1087
1087
|
delay: t.delay,
|
|
1088
1088
|
iterations: t.iterationCount === Infinity ? Infinity : t.iterationCount,
|
|
@@ -1094,42 +1094,42 @@ function xn(e) {
|
|
|
1094
1094
|
}
|
|
1095
1095
|
//#endregion
|
|
1096
1096
|
//#region src/animation/waapi/delegation.ts
|
|
1097
|
-
async function
|
|
1098
|
-
let n =
|
|
1099
|
-
e._playback._waAnimations =
|
|
1100
|
-
let
|
|
1097
|
+
async function xn(e, t) {
|
|
1098
|
+
let n = hn(e), r = bn(e), i = e.targets.map((e) => e.animate(n, r));
|
|
1099
|
+
e._playback._waAnimations = i;
|
|
1100
|
+
let a = () => {
|
|
1101
1101
|
if (!e.paused) {
|
|
1102
|
-
for (let t of
|
|
1102
|
+
for (let t of i) if (t.playState === "paused") {
|
|
1103
1103
|
e.pause();
|
|
1104
1104
|
break;
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
|
-
if (e.paused) for (let e of
|
|
1107
|
+
if (e.paused) for (let e of i) e.pause();
|
|
1108
1108
|
return !e.done;
|
|
1109
1109
|
};
|
|
1110
|
-
e.playback.loop((n) => e.done ? !1 :
|
|
1110
|
+
e.playback.loop((n) => e.done ? !1 : g(e.options.respectReducedMotion, () => !0, () => !1) ? (t.snapToReducedMotion(), !1) : (e.advanceTo(n), a()));
|
|
1111
1111
|
try {
|
|
1112
|
-
await Promise.all(
|
|
1113
|
-
for (let t of
|
|
1112
|
+
await Promise.all(i.map((e) => e.finished));
|
|
1113
|
+
for (let t of i) try {
|
|
1114
1114
|
e.restPosition === "final" && typeof t.commitStyles == "function" && t.commitStyles(), t.cancel();
|
|
1115
1115
|
} catch {}
|
|
1116
1116
|
} catch {} finally {
|
|
1117
1117
|
e.playback.stop(), e._playback._waAnimations = [];
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1121
|
-
let r = n?.eligibility ??
|
|
1120
|
+
function Sn(e, t, n) {
|
|
1121
|
+
let r = n?.eligibility ?? F(e);
|
|
1122
1122
|
if (!r.eligible) return {
|
|
1123
1123
|
attached: !1,
|
|
1124
1124
|
reason: r.reason
|
|
1125
1125
|
};
|
|
1126
|
-
let i = n?.timeline ??
|
|
1126
|
+
let i = n?.timeline ?? m(t);
|
|
1127
1127
|
if (i == null) return {
|
|
1128
1128
|
attached: !1,
|
|
1129
1129
|
reason: "native scroll/view timeline unavailable (feature absent)"
|
|
1130
1130
|
};
|
|
1131
|
-
let a =
|
|
1132
|
-
...
|
|
1131
|
+
let a = hn(e), o = {
|
|
1132
|
+
...bn(e),
|
|
1133
1133
|
timeline: i
|
|
1134
1134
|
}, s = e.targets.map((e) => e.animate(a, o));
|
|
1135
1135
|
return e._playback._waAnimations = s, {
|
|
@@ -1139,58 +1139,58 @@ function Cn(e, t, n) {
|
|
|
1139
1139
|
}
|
|
1140
1140
|
//#endregion
|
|
1141
1141
|
//#region src/animation/engine/play-lifecycle/strategies.ts
|
|
1142
|
-
function
|
|
1142
|
+
function Cn(e) {
|
|
1143
1143
|
return new Promise((t) => {
|
|
1144
1144
|
e._playback.resolvePromise = t, e.playback.loop(e._playback._boundFrame);
|
|
1145
1145
|
});
|
|
1146
1146
|
}
|
|
1147
|
-
async function
|
|
1148
|
-
await
|
|
1147
|
+
async function wn(e) {
|
|
1148
|
+
await xn(e, { snapToReducedMotion: () => En(e) }), P(e);
|
|
1149
1149
|
}
|
|
1150
|
-
async function
|
|
1151
|
-
e._playback.started = !0, e.dispatchAnimationEvent("animationstart"), e.fillForwards(), e._playback.iteration = 0, e._playback.done = !0, e.dispatchAnimationEvent("animationend"),
|
|
1150
|
+
async function Tn(e) {
|
|
1151
|
+
e._playback.started = !0, e.dispatchAnimationEvent("animationstart"), e.fillForwards(), e._playback.iteration = 0, e._playback.done = !0, e.dispatchAnimationEvent("animationend"), P(e);
|
|
1152
1152
|
}
|
|
1153
|
-
function
|
|
1154
|
-
|
|
1153
|
+
function En(e) {
|
|
1154
|
+
en(e), e.fillForwards(), e._playback.iteration = 0, e._playback.done = !0, e.dispatchAnimationEvent("animationend"), P(e), $t(e);
|
|
1155
1155
|
}
|
|
1156
|
-
async function
|
|
1156
|
+
async function Dn(e) {
|
|
1157
1157
|
if (e.managed) throw Error("Animation.play() called on a managed animation — the AnimationGroup owns the rAF loop. Call group.play() instead.");
|
|
1158
|
-
return e.assertNoUnresolvedNamedSelector(), d(e._playback, () =>
|
|
1158
|
+
return e.assertNoUnresolvedNamedSelector(), d(e._playback, () => g(e.options.respectReducedMotion, () => (e.waapiIneligibleReason = void 0, Tn(e)), () => {
|
|
1159
1159
|
if (e.options.useWAAPI) {
|
|
1160
|
-
let t =
|
|
1161
|
-
return t.eligible ? (e.waapiIneligibleReason = void 0,
|
|
1160
|
+
let t = F(e);
|
|
1161
|
+
return t.eligible ? (e.waapiIneligibleReason = void 0, wn(e)) : (e.waapiIneligibleReason = t.reason, Cn(e));
|
|
1162
1162
|
}
|
|
1163
|
-
return e.waapiIneligibleReason = void 0,
|
|
1163
|
+
return e.waapiIneligibleReason = void 0, Cn(e);
|
|
1164
1164
|
}));
|
|
1165
1165
|
}
|
|
1166
1166
|
//#endregion
|
|
1167
1167
|
//#region src/animation/engine/play-lifecycle/frame.ts
|
|
1168
|
-
var
|
|
1169
|
-
function
|
|
1170
|
-
e._playback.reversed = !1,
|
|
1168
|
+
var On = (e) => e.options.delay > 0 && e._playback.iteration === 0;
|
|
1169
|
+
function kn(e) {
|
|
1170
|
+
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;
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function An(e) {
|
|
1173
1173
|
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"));
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1175
|
+
function jn(e, t) {
|
|
1176
1176
|
if (e._playback.startTime === void 0) {
|
|
1177
|
-
let n =
|
|
1178
|
-
return
|
|
1177
|
+
let n = On(e) ? e.options.delay : 0;
|
|
1178
|
+
return kn(e), Mn(e, t, n, !1);
|
|
1179
1179
|
}
|
|
1180
|
-
return
|
|
1180
|
+
return Pn(e, t, !1);
|
|
1181
1181
|
}
|
|
1182
|
-
function
|
|
1182
|
+
function Mn(e, t, n, r) {
|
|
1183
1183
|
let i = e._playback.carriedStartTime;
|
|
1184
|
-
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"),
|
|
1184
|
+
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"), Pn(e, t, r);
|
|
1185
1185
|
}
|
|
1186
|
-
function
|
|
1186
|
+
function Nn(e, t) {
|
|
1187
1187
|
let n = e._playback.anchorTick;
|
|
1188
1188
|
if (n === void 0 || t <= n) return;
|
|
1189
1189
|
e._playback.anchorTick = void 0;
|
|
1190
|
-
let r = t - n -
|
|
1190
|
+
let r = t - n - v;
|
|
1191
1191
|
r > 0 && !e._playback.paused && (e._playback.startTime += r);
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1193
|
+
function Pn(e, t, n) {
|
|
1194
1194
|
if (e._playback.paused && e._playback.pausedTime === 0) return e._playback.pausedTime = t, e._playback.t;
|
|
1195
1195
|
if (e._playback.pausedTime > 0 && !e._playback.paused) {
|
|
1196
1196
|
let n = t - e._playback.pausedTime;
|
|
@@ -1203,19 +1203,19 @@ function Fn(e, t, n) {
|
|
|
1203
1203
|
if (e._playback.t >= e.options.duration && n) e._playback.t = e.options.duration;
|
|
1204
1204
|
else if (e._playback.t >= e.options.duration) {
|
|
1205
1205
|
let n = e._playback.startTime + e.options.duration;
|
|
1206
|
-
if (
|
|
1206
|
+
if (An(e), e._playback.t = e.options.duration, !e._playback.done) return e._playback.carriedStartTime = n, kn(e), Mn(e, t, 0, !0);
|
|
1207
1207
|
}
|
|
1208
1208
|
return e._playback.t;
|
|
1209
1209
|
}
|
|
1210
|
-
function
|
|
1211
|
-
return
|
|
1210
|
+
function Fn(e, t) {
|
|
1211
|
+
return g(e.options.respectReducedMotion, () => !0, () => !1) ? (En(e), !1) : (Nn(e, t), In(e, e.advanceTo(t)));
|
|
1212
1212
|
}
|
|
1213
|
-
function
|
|
1214
|
-
return e._playback.paused ? !1 : e._playback.done ? (
|
|
1213
|
+
function In(e, t) {
|
|
1214
|
+
return e._playback.paused ? !1 : e._playback.done ? (P(e), $t(e), !1) : (e.interpFrames(t, !0, e._playback._interpOut), !0);
|
|
1215
1215
|
}
|
|
1216
1216
|
//#endregion
|
|
1217
1217
|
//#region src/animation/engine/playback-state.ts
|
|
1218
|
-
var
|
|
1218
|
+
var Ln = class {
|
|
1219
1219
|
resolvePromise = null;
|
|
1220
1220
|
_playingPromise = null;
|
|
1221
1221
|
_waAnimations = [];
|
|
@@ -1238,50 +1238,50 @@ var Rn = class {
|
|
|
1238
1238
|
};
|
|
1239
1239
|
//#endregion
|
|
1240
1240
|
//#region src/animation/engine/composition.ts
|
|
1241
|
-
function
|
|
1241
|
+
function Rn(e) {
|
|
1242
1242
|
for (let t of e) if (t.composition != null && t.composition !== "replace") return !0;
|
|
1243
1243
|
return !1;
|
|
1244
1244
|
}
|
|
1245
|
-
function
|
|
1245
|
+
function zn(e, t, n) {
|
|
1246
1246
|
e.clear(), t.clear(), n?.clear();
|
|
1247
1247
|
}
|
|
1248
|
-
function
|
|
1248
|
+
function Bn(e, t) {
|
|
1249
1249
|
let n = e.composition;
|
|
1250
1250
|
if (!(n == null || n === "replace")) for (let [r, i] of Object.entries(e.interpVars)) {
|
|
1251
1251
|
if (i.slots.length === 0) continue;
|
|
1252
1252
|
if (!i.slots.every((e) => e.kind === "number")) {
|
|
1253
|
-
|
|
1253
|
+
Wn(r, n, t);
|
|
1254
1254
|
continue;
|
|
1255
1255
|
}
|
|
1256
1256
|
let a = i.slots, o = t.compositionBase.get(r);
|
|
1257
|
-
o === void 0 && (o =
|
|
1257
|
+
o === void 0 && (o = Hn(t.target, r, a.length, t.compositionPose), t.compositionBase.set(r, o));
|
|
1258
1258
|
let s = n === "accumulate" ? t.iteration : 0;
|
|
1259
1259
|
for (let n = 0; n < a.length; n++) {
|
|
1260
1260
|
let i = a[n], c = o[n] ?? 0;
|
|
1261
|
-
s > 0 ? i.current = c + s * (
|
|
1261
|
+
s > 0 ? i.current = c + s * (Un(e, r, n, t.compositionBase) - c) + i.current : i.current = c + i.current;
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
1264
|
}
|
|
1265
|
-
var
|
|
1266
|
-
function
|
|
1265
|
+
var Vn = (e) => e.kind === "call" ? e.args.flatMap(Vn) : e.kind === "list" ? e.items.flatMap(Vn) : e.payload.type === "number" ? [e.payload.value] : [];
|
|
1266
|
+
function Hn(e, t, n, r) {
|
|
1267
1267
|
let i = Array(n).fill(0);
|
|
1268
1268
|
if (e == null || e.style == null) return i;
|
|
1269
1269
|
let a = t.split(".").pop() ?? t, o = r?.get(a);
|
|
1270
1270
|
if (o !== void 0) return o.slice(0, n);
|
|
1271
1271
|
let s = e.style.getPropertyValue(a) || e.style[a] || "";
|
|
1272
1272
|
if (!s) return i;
|
|
1273
|
-
let c = xe(() => ce(s), (e) =>
|
|
1273
|
+
let c = xe(() => ce(s), (e) => Vn(e), []);
|
|
1274
1274
|
for (let e = 0; e < n && e < c.length; e++) {
|
|
1275
1275
|
let t = c[e];
|
|
1276
1276
|
Number.isFinite(t) && (i[e] = t);
|
|
1277
1277
|
}
|
|
1278
1278
|
return r?.set(a, i.slice()), i;
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1280
|
+
function Un(e, t, n, r) {
|
|
1281
1281
|
let i = e.interpVars[t]?.slots[n];
|
|
1282
1282
|
return i?.kind === "number" ? i.to : r.get(t)?.[n] ?? 0;
|
|
1283
1283
|
}
|
|
1284
|
-
function
|
|
1284
|
+
function Wn(e, t, n) {
|
|
1285
1285
|
n.compositionFallbackSeen.has(e) || (n.compositionFallbackSeen.add(e), n.diagnostics.push({
|
|
1286
1286
|
code: "COMPOSITION_FALLBACK",
|
|
1287
1287
|
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`,
|
|
@@ -1290,59 +1290,59 @@ function Gn(e, t, n) {
|
|
|
1290
1290
|
}
|
|
1291
1291
|
//#endregion
|
|
1292
1292
|
//#region src/animation/engine/interpolate.ts
|
|
1293
|
-
function
|
|
1293
|
+
function Gn(e) {
|
|
1294
1294
|
return e.options.fillMode === "forwards" || e.options.fillMode === "both" ? "final" : "initial";
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1297
|
-
|
|
1296
|
+
function Kn(e) {
|
|
1297
|
+
Gn(e) === "final" ? L(e, e.options.duration, !0) : L(e, 0, !0);
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1299
|
+
function qn(e) {
|
|
1300
1300
|
let n = e.templateFrames.find((e) => e.start.kind === "named");
|
|
1301
1301
|
if (n != null) {
|
|
1302
1302
|
let e = n.start.kind === "named" ? `${n.start.name}${n.start.offset === void 0 ? "" : ` ${n.start.offset * 100}%`}` : "";
|
|
1303
1303
|
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");
|
|
1304
1304
|
}
|
|
1305
1305
|
}
|
|
1306
|
-
function
|
|
1307
|
-
|
|
1306
|
+
function Jn(e, t, n = !1) {
|
|
1307
|
+
qn(e);
|
|
1308
1308
|
let r = e._playback.reversed;
|
|
1309
1309
|
e._playback.reversed = !1;
|
|
1310
|
-
let i =
|
|
1310
|
+
let i = L(e, Se(t, 0, 1) * e.options.duration, n);
|
|
1311
1311
|
return e._playback.reversed = r, i;
|
|
1312
1312
|
}
|
|
1313
|
-
function
|
|
1314
|
-
let a =
|
|
1315
|
-
a && (
|
|
1316
|
-
let o =
|
|
1317
|
-
|
|
1318
|
-
let s =
|
|
1319
|
-
if (l === -1) return i === void 0 ? {} : (
|
|
1313
|
+
function L(t, n, r = !1, i) {
|
|
1314
|
+
let a = n < 0;
|
|
1315
|
+
a && (n = 0);
|
|
1316
|
+
let o = t.options.fillMode === "backwards" || t.options.fillMode === "both";
|
|
1317
|
+
n = t._playback.reversed ? t.options.duration - n : n;
|
|
1318
|
+
let s = t.frames, c = s.length, l = a && !o ? -1 : e(s, n, (e) => e.time.start, (e) => e.time.stop);
|
|
1319
|
+
if (l === -1) return i === void 0 ? {} : (Yn(t, i), i);
|
|
1320
1320
|
let u = l, d = l;
|
|
1321
1321
|
for (let e = l - 1; e >= 0; e--) {
|
|
1322
|
-
let
|
|
1323
|
-
if (
|
|
1322
|
+
let t = s[e];
|
|
1323
|
+
if (n < t.time.start || n > t.time.stop) break;
|
|
1324
1324
|
u = e;
|
|
1325
1325
|
}
|
|
1326
1326
|
for (let e = l + 1; e < c; e++) {
|
|
1327
|
-
let
|
|
1328
|
-
if (
|
|
1327
|
+
let t = s[e];
|
|
1328
|
+
if (n < t.time.start || n > t.time.stop) break;
|
|
1329
1329
|
d = e;
|
|
1330
1330
|
}
|
|
1331
|
-
for (let
|
|
1331
|
+
for (let e = u; e <= d; e++) Xn(t, s[e], n, r);
|
|
1332
1332
|
if (u === d) {
|
|
1333
|
-
let
|
|
1334
|
-
return i === void 0 ?
|
|
1333
|
+
let e = s[l].flatVars;
|
|
1334
|
+
return i === void 0 ? e : (Yn(t, i), Object.assign(i, e), i);
|
|
1335
1335
|
}
|
|
1336
1336
|
let f = i ?? {};
|
|
1337
|
-
i !== void 0 &&
|
|
1337
|
+
i !== void 0 && Yn(t, i);
|
|
1338
1338
|
for (let e = u; e <= d; e++) Object.assign(f, s[e].flatVars);
|
|
1339
1339
|
return f;
|
|
1340
1340
|
}
|
|
1341
|
-
function
|
|
1341
|
+
function Yn(e, t) {
|
|
1342
1342
|
let n = e._stableKeys;
|
|
1343
1343
|
for (let e = 0; e < n.length; e++) t[n[e]] = void 0;
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1345
|
+
function Xn(e, t, n, r) {
|
|
1346
1346
|
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;
|
|
1347
1347
|
if (l !== void 0 && l.numeric.length > 0) {
|
|
1348
1348
|
let { numeric: e, from: t, to: n, out: r } = l;
|
|
@@ -1350,10 +1350,10 @@ function Zn(e, t, n, r) {
|
|
|
1350
1350
|
for (let t = 0; t < e.length; t++) e[t].current = r[t];
|
|
1351
1351
|
for (let e of l.residual) O(e, c), ft(e, s);
|
|
1352
1352
|
} else for (let e of t.allInterpVars) O(e, c), ft(e, s);
|
|
1353
|
-
r && e._hasComposition && t.composition != null &&
|
|
1353
|
+
r && e._hasComposition && t.composition != null && Zn(e, t), Nt(t._sink), r && (e.unflatten ? t.transform(t.vars, n) : t.transform(t.flatVars, n));
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1356
|
-
|
|
1355
|
+
function Zn(e, t) {
|
|
1356
|
+
Bn(t, {
|
|
1357
1357
|
iteration: e._playback.iteration,
|
|
1358
1358
|
target: e.targets[0],
|
|
1359
1359
|
compositionBase: e._compositionBase,
|
|
@@ -1364,7 +1364,7 @@ function Qn(e, t) {
|
|
|
1364
1364
|
}
|
|
1365
1365
|
//#endregion
|
|
1366
1366
|
//#region src/animation/engine/options.ts
|
|
1367
|
-
var
|
|
1367
|
+
var Qn = (e) => {
|
|
1368
1368
|
let t = ae(de(e), void 0);
|
|
1369
1369
|
if (t?.payload.type !== "number") return;
|
|
1370
1370
|
let { value: n, unit: r } = t.payload;
|
|
@@ -1373,48 +1373,48 @@ var $n = (e) => {
|
|
|
1373
1373
|
if (r === "s") return n * 1e3;
|
|
1374
1374
|
}
|
|
1375
1375
|
};
|
|
1376
|
-
function
|
|
1377
|
-
return e == null ? E.timingFunction :
|
|
1376
|
+
function $n(e) {
|
|
1377
|
+
return e == null ? E.timingFunction : Rt("timingFunction", e);
|
|
1378
1378
|
}
|
|
1379
|
-
function
|
|
1380
|
-
return e == null ? E.iterationCount : e === "infinite" || e === "∞" || e === "Infinity" || e === Infinity ? Infinity :
|
|
1379
|
+
function er(e) {
|
|
1380
|
+
return e == null ? E.iterationCount : e === "infinite" || e === "∞" || e === "Infinity" || e === Infinity ? Infinity : c("iterationCount", e, (e) => {
|
|
1381
1381
|
let t = typeof e == "string" ? Number.parseFloat(e.trim()) : e;
|
|
1382
1382
|
return typeof t == "number" && !Number.isNaN(t) && t >= 0 ? t : void 0;
|
|
1383
1383
|
}, "expected a non-negative count, \"infinite\", or Infinity");
|
|
1384
1384
|
}
|
|
1385
|
-
function
|
|
1386
|
-
if (e != null) return
|
|
1387
|
-
let t = typeof e == "string" ?
|
|
1385
|
+
function tr(e) {
|
|
1386
|
+
if (e != null) return c("duration", e, (e) => {
|
|
1387
|
+
let t = typeof e == "string" ? Qn(e) : e;
|
|
1388
1388
|
return typeof t == "number" && isFinite(t) && t > 0 ? t : void 0;
|
|
1389
1389
|
}, "expected a positive duration in milliseconds or a CSS time string");
|
|
1390
1390
|
}
|
|
1391
|
-
function
|
|
1392
|
-
return e == null ? E.delay :
|
|
1393
|
-
let t = typeof e == "string" ?
|
|
1391
|
+
function nr(e) {
|
|
1392
|
+
return e == null ? E.delay : c("delay", e, (e) => {
|
|
1393
|
+
let t = typeof e == "string" ? Qn(e) : e;
|
|
1394
1394
|
return typeof t == "number" && isFinite(t) ? t : void 0;
|
|
1395
1395
|
}, "expected a delay in milliseconds or a CSS time string");
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1397
|
+
function rr(e) {
|
|
1398
1398
|
if (e == null) return E.direction;
|
|
1399
1399
|
if (!Pe.includes(e)) throw new t("direction", e, `expected one of: ${Pe.join(", ")}`);
|
|
1400
1400
|
return e;
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1402
|
+
function ir(e) {
|
|
1403
1403
|
if (e == null) return E.fillMode;
|
|
1404
1404
|
if (!Fe.includes(e)) throw new t("fillMode", e, `expected one of: ${Fe.join(", ")}`);
|
|
1405
1405
|
return e;
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function ar(e, n) {
|
|
1408
1408
|
if (n == null) return E[e];
|
|
1409
1409
|
if (typeof n != "boolean") throw new t(e, n, "expected a boolean");
|
|
1410
1410
|
return n;
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1412
|
+
function or(e) {
|
|
1413
1413
|
if (e == null) return E.colorSpace;
|
|
1414
1414
|
if (!Ie.includes(e)) throw new t("colorSpace", e, `expected one of: ${Ie.join(", ")}`);
|
|
1415
1415
|
return e;
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1417
|
+
function sr(e) {
|
|
1418
1418
|
if (e != null) {
|
|
1419
1419
|
if (!Le.includes(e)) throw new t("hueMethod", e, `expected one of: ${Le.join(", ")}`);
|
|
1420
1420
|
return e;
|
|
@@ -1422,71 +1422,71 @@ function cr(e) {
|
|
|
1422
1422
|
}
|
|
1423
1423
|
//#endregion
|
|
1424
1424
|
//#region src/animation/engine/option-setters.ts
|
|
1425
|
-
function
|
|
1426
|
-
let n = e.options.timingFunction, r =
|
|
1425
|
+
function cr(e, t) {
|
|
1426
|
+
let n = e.options.timingFunction, r = $n(t);
|
|
1427
1427
|
if (e.options.timingFunction = r, r !== n) {
|
|
1428
1428
|
for (let t of e.templateFrames) t.timingFunction === n && (t.timingFunction = r);
|
|
1429
1429
|
for (let t of e.frames) t.timingFunction === n && (t.timingFunction = r);
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1433
|
-
e.options.iterationCount =
|
|
1432
|
+
function lr(e, t) {
|
|
1433
|
+
e.options.iterationCount = er(t);
|
|
1434
1434
|
}
|
|
1435
|
-
function
|
|
1435
|
+
function ur(e, t, n) {
|
|
1436
1436
|
n === void 0 ? delete e[t] : e[t] = n;
|
|
1437
1437
|
}
|
|
1438
|
-
function
|
|
1439
|
-
let r =
|
|
1438
|
+
function dr(e, t, n) {
|
|
1439
|
+
let r = tr(t);
|
|
1440
1440
|
if (r === void 0) return;
|
|
1441
1441
|
let i = r / e.options.duration;
|
|
1442
1442
|
for (let t = 0; t < e.frames.length; t++) {
|
|
1443
1443
|
let n = e.frames[t];
|
|
1444
1444
|
n.time.start *= i, n.time.stop *= i;
|
|
1445
1445
|
}
|
|
1446
|
-
e.options.duration = r,
|
|
1446
|
+
e.options.duration = r, ur(e.options, "durationUnit", n);
|
|
1447
1447
|
}
|
|
1448
|
-
function
|
|
1449
|
-
e.options.delay =
|
|
1448
|
+
function fr(e, t, n) {
|
|
1449
|
+
e.options.delay = nr(t), ur(e.options, "delayUnit", t == null ? void 0 : n);
|
|
1450
|
+
}
|
|
1451
|
+
function pr(e, t) {
|
|
1452
|
+
e.options.direction = rr(t), e._playback.reversed = Wt(e.options.direction, e._playback.iteration);
|
|
1450
1453
|
}
|
|
1451
1454
|
function mr(e, t) {
|
|
1452
|
-
e.options.
|
|
1455
|
+
e.options.fillMode = ir(t);
|
|
1453
1456
|
}
|
|
1454
1457
|
function hr(e, t) {
|
|
1455
|
-
e.options.
|
|
1458
|
+
e.options.useWAAPI = ar("useWAAPI", t);
|
|
1456
1459
|
}
|
|
1457
1460
|
function gr(e, t) {
|
|
1458
|
-
e.options.
|
|
1461
|
+
e.options.respectReducedMotion = ar("respectReducedMotion", t);
|
|
1459
1462
|
}
|
|
1460
1463
|
function _r(e, t) {
|
|
1461
|
-
e.options.
|
|
1464
|
+
e.options.colorSpace = or(t), e.frames.length > 0 && N(e).renormalizeColors();
|
|
1462
1465
|
}
|
|
1463
1466
|
function vr(e, t) {
|
|
1464
|
-
|
|
1467
|
+
let n = sr(t);
|
|
1468
|
+
n !== void 0 && (e.options.hueMethod = n, e.frames.length > 0 && N(e).renormalizeColors());
|
|
1465
1469
|
}
|
|
1466
1470
|
function yr(e, t) {
|
|
1467
|
-
let n = cr(t);
|
|
1468
|
-
n !== void 0 && (e.options.hueMethod = n, e.frames.length > 0 && M(e).renormalizeColors());
|
|
1469
|
-
}
|
|
1470
|
-
function br(e, t) {
|
|
1471
1471
|
t !== void 0 && (e.options.composite = t);
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1474
|
-
|
|
1473
|
+
function br(e, t) {
|
|
1474
|
+
cr(e, t.timingFunction), dr(e, t.duration, t.durationUnit), lr(e, t.iterationCount), fr(e, t.delay, t.delayUnit), pr(e, t.direction), mr(e, t.fillMode), hr(e, t.useWAAPI), gr(e, t.respectReducedMotion), _r(e, t.colorSpace), vr(e, t.hueMethod), yr(e, t.composite);
|
|
1475
1475
|
}
|
|
1476
1476
|
//#endregion
|
|
1477
1477
|
//#region src/animation/engine/compile-bridge.ts
|
|
1478
|
+
function xr(e) {
|
|
1479
|
+
N(e).parse(e.targets), Cr(e), Sr(e);
|
|
1480
|
+
}
|
|
1478
1481
|
function Sr(e) {
|
|
1479
|
-
|
|
1482
|
+
e._hasComposition = Rn(e.frames), zn(e._compositionBase, e._compositionFallbackSeen, e._compositionPose);
|
|
1480
1483
|
}
|
|
1481
1484
|
function Cr(e) {
|
|
1482
|
-
e._hasComposition = zn(e.frames), Bn(e._compositionBase, e._compositionFallbackSeen, e._compositionPose);
|
|
1483
|
-
}
|
|
1484
|
-
function wr(e) {
|
|
1485
1485
|
let t = /* @__PURE__ */ new Set();
|
|
1486
1486
|
for (let n of e.frames) for (let e in n.flatVars) t.add(e);
|
|
1487
1487
|
e._stableKeys = [...t];
|
|
1488
1488
|
}
|
|
1489
|
-
function
|
|
1489
|
+
function wr(e) {
|
|
1490
1490
|
let t;
|
|
1491
1491
|
for (let n of e.frames) {
|
|
1492
1492
|
let r = n.transform;
|
|
@@ -1501,9 +1501,9 @@ function Tr(e) {
|
|
|
1501
1501
|
own: t
|
|
1502
1502
|
};
|
|
1503
1503
|
}
|
|
1504
|
-
function
|
|
1505
|
-
let n =
|
|
1506
|
-
|
|
1504
|
+
function Tr(e, t) {
|
|
1505
|
+
let n = wr(e), r = wr(t).declared, i = N(t);
|
|
1506
|
+
Ht(e, i), e.options = i.options;
|
|
1507
1507
|
let a = r === void 0 ? n.own : void 0;
|
|
1508
1508
|
if (a !== void 0) {
|
|
1509
1509
|
for (let t of e.templateFrames) t.transform = a;
|
|
@@ -1512,32 +1512,32 @@ function Er(e, t) {
|
|
|
1512
1512
|
(a === void 0 || n.declared === void 0) && (e.unflatten = t.unflatten);
|
|
1513
1513
|
let o = e.targets[0], s = e.frames;
|
|
1514
1514
|
for (let e of s) for (let t of Object.values(e.interpVars)) for (let e of t.slots) O(e, o);
|
|
1515
|
-
|
|
1515
|
+
Cr(e), Sr(e);
|
|
1516
1516
|
}
|
|
1517
1517
|
//#endregion
|
|
1518
1518
|
//#region src/animation/resolve/env.ts
|
|
1519
|
-
var
|
|
1519
|
+
var Er = () => {
|
|
1520
1520
|
let e = typeof globalThis < "u" && typeof globalThis.CSS?.supports == "function", t = typeof globalThis < "u" && typeof globalThis.matchMedia == "function";
|
|
1521
1521
|
return {
|
|
1522
1522
|
supports: e ? (e) => globalThis.CSS.supports(e) : () => !1,
|
|
1523
1523
|
matchMedia: t ? (e) => globalThis.matchMedia(e) : () => ({ matches: !1 })
|
|
1524
1524
|
};
|
|
1525
|
-
},
|
|
1525
|
+
}, Dr = (e, t, n) => {
|
|
1526
1526
|
let r = {
|
|
1527
1527
|
functions: e,
|
|
1528
1528
|
env: {
|
|
1529
|
-
...
|
|
1529
|
+
...Er(),
|
|
1530
1530
|
...t
|
|
1531
1531
|
},
|
|
1532
1532
|
seen: /* @__PURE__ */ new Set(),
|
|
1533
1533
|
depth: 0
|
|
1534
1534
|
};
|
|
1535
1535
|
return n !== void 0 && (r.diagnostics = n), r;
|
|
1536
|
-
},
|
|
1536
|
+
}, R = Symbol("kf.resolve.drop"), Or = (e, t) => {
|
|
1537
1537
|
if (t.syntax === void 0) return e;
|
|
1538
|
-
let n = ke(
|
|
1539
|
-
return n.ok ? n.value : t.default ??
|
|
1540
|
-
},
|
|
1538
|
+
let n = ke(b(e), t.syntax);
|
|
1539
|
+
return n.ok ? n.value : t.default ?? R;
|
|
1540
|
+
}, kr = (e) => {
|
|
1541
1541
|
if (e.kind !== "call" || e.name !== "var") return;
|
|
1542
1542
|
let t = e.args[0];
|
|
1543
1543
|
if (t?.kind === "scalar" && t.payload.type === "keyword") return t.payload.value;
|
|
@@ -1545,37 +1545,37 @@ var Dr = () => {
|
|
|
1545
1545
|
let e = t.items[0];
|
|
1546
1546
|
if (e?.kind === "scalar" && e.payload.type === "keyword") return e.payload.value;
|
|
1547
1547
|
}
|
|
1548
|
-
},
|
|
1548
|
+
}, Ar = (e, t) => Object.freeze({
|
|
1549
1549
|
kind: "call",
|
|
1550
1550
|
name: e.name,
|
|
1551
1551
|
args: Object.freeze(t)
|
|
1552
|
-
}),
|
|
1552
|
+
}), jr = (e, t) => Object.freeze({
|
|
1553
1553
|
kind: "list",
|
|
1554
1554
|
separator: e.separator,
|
|
1555
1555
|
items: Object.freeze(t)
|
|
1556
|
-
}),
|
|
1557
|
-
let n =
|
|
1556
|
+
}), Mr = (e, t) => {
|
|
1557
|
+
let n = kr(e);
|
|
1558
1558
|
if (n !== void 0) return t.get(n) ?? e;
|
|
1559
1559
|
if (e.kind === "scalar") return e;
|
|
1560
|
-
let r = e.kind === "call" ? e.args : e.items, i = r.map((e) =>
|
|
1561
|
-
return i.every((e, t) => e === r[t]) ? e : e.kind === "call" ?
|
|
1562
|
-
},
|
|
1563
|
-
if (t.seen.has(e.name)) return
|
|
1560
|
+
let r = e.kind === "call" ? e.args : e.items, i = r.map((e) => Mr(e, t));
|
|
1561
|
+
return i.every((e, t) => e === r[t]) ? e : e.kind === "call" ? Ar(e, i) : jr(e, i);
|
|
1562
|
+
}, Nr = (e, t, n) => {
|
|
1563
|
+
if (t.seen.has(e.name)) return R;
|
|
1564
1564
|
let r = t.functions.get(e.name);
|
|
1565
|
-
if (r?.result === void 0) return
|
|
1565
|
+
if (r?.result === void 0) return R;
|
|
1566
1566
|
let i = r.parameters ?? [];
|
|
1567
|
-
if (e.args.length > i.length) return
|
|
1567
|
+
if (e.args.length > i.length) return R;
|
|
1568
1568
|
let a = /* @__PURE__ */ new Map();
|
|
1569
1569
|
for (let n = 0; n < i.length; n++) {
|
|
1570
|
-
let r = i[n], o = e.args[n], s = o === void 0 ? r.default ??
|
|
1571
|
-
if (s ===
|
|
1570
|
+
let r = i[n], o = e.args[n], s = o === void 0 ? r.default ?? R : Or(o, r);
|
|
1571
|
+
if (s === R) return t.diagnostics?.push({
|
|
1572
1572
|
code: "CUSTOM_FN_ARG_DROP",
|
|
1573
1573
|
property: r.name,
|
|
1574
1574
|
message: `--fn() argument for ${r.name} did not satisfy ${r.syntax ?? "its required value"} and has no default.`
|
|
1575
|
-
}),
|
|
1575
|
+
}), R;
|
|
1576
1576
|
a.set(r.name, s);
|
|
1577
1577
|
}
|
|
1578
|
-
let o =
|
|
1578
|
+
let o = Mr(r.result, a);
|
|
1579
1579
|
t.seen.add(e.name);
|
|
1580
1580
|
try {
|
|
1581
1581
|
return n(o, {
|
|
@@ -1585,29 +1585,29 @@ var Dr = () => {
|
|
|
1585
1585
|
} finally {
|
|
1586
1586
|
t.seen.delete(e.name);
|
|
1587
1587
|
}
|
|
1588
|
-
},
|
|
1588
|
+
}, z = (e, t) => e.kind === "scalar" && e.payload.type === "keyword" && e.payload.value.toLowerCase() === t, Pr = (e) => {
|
|
1589
1589
|
if (e.length !== 0) return e.length === 1 ? e[0] : Object.freeze({
|
|
1590
1590
|
kind: "list",
|
|
1591
1591
|
separator: "space",
|
|
1592
1592
|
items: Object.freeze([...e])
|
|
1593
1593
|
});
|
|
1594
|
-
},
|
|
1594
|
+
}, Fr = (e) => {
|
|
1595
1595
|
let t = [[]];
|
|
1596
|
-
for (let n of e.items)
|
|
1596
|
+
for (let n of e.items) z(n, ";") ? t.push([]) : t.at(-1).push(n);
|
|
1597
1597
|
let n = [];
|
|
1598
1598
|
for (let e of t) {
|
|
1599
|
-
let t = e.findIndex((e) =>
|
|
1599
|
+
let t = e.findIndex((e) => z(e, ":"));
|
|
1600
1600
|
if (t < 0) continue;
|
|
1601
|
-
let r =
|
|
1601
|
+
let r = Pr(e.slice(0, t)), i = Pr(e.slice(t + 1));
|
|
1602
1602
|
r === void 0 || i === void 0 || n.push(Object.freeze({
|
|
1603
1603
|
condition: r,
|
|
1604
1604
|
consequent: i,
|
|
1605
|
-
fallback:
|
|
1605
|
+
fallback: z(r, "else")
|
|
1606
1606
|
}));
|
|
1607
1607
|
}
|
|
1608
1608
|
return Object.freeze(n);
|
|
1609
|
-
},
|
|
1610
|
-
if (e.args.length === 1 && e.args[0]?.kind === "list") return
|
|
1609
|
+
}, Ir = (e) => {
|
|
1610
|
+
if (e.args.length === 1 && e.args[0]?.kind === "list") return Fr(e.args[0]);
|
|
1611
1611
|
let t = e.args[0], n = e.args[1];
|
|
1612
1612
|
if (t === void 0 || n === void 0) return [];
|
|
1613
1613
|
let r = [Object.freeze({
|
|
@@ -1626,109 +1626,109 @@ var Dr = () => {
|
|
|
1626
1626
|
consequent: i,
|
|
1627
1627
|
fallback: !0
|
|
1628
1628
|
})), Object.freeze(r);
|
|
1629
|
-
},
|
|
1629
|
+
}, Lr = (e) => e.args.map(b).join(", "), Rr = (e, t) => {
|
|
1630
1630
|
let n = e.args[0];
|
|
1631
1631
|
if (n === void 0) return !1;
|
|
1632
1632
|
if (n.kind === "scalar" && n.payload.type === "keyword") return t(n.payload.value) !== void 0;
|
|
1633
1633
|
if (n.kind !== "list") return !1;
|
|
1634
|
-
let r = n.items.findIndex((e) =>
|
|
1634
|
+
let r = n.items.findIndex((e) => z(e, ":")), i = n.items[0];
|
|
1635
1635
|
if (i?.kind !== "scalar" || i.payload.type !== "keyword") return !1;
|
|
1636
1636
|
let a = t(i.payload.value);
|
|
1637
1637
|
if (a === void 0) return !1;
|
|
1638
1638
|
if (r < 0) return !0;
|
|
1639
|
-
let o =
|
|
1639
|
+
let o = Pr(n.items.slice(r + 1));
|
|
1640
1640
|
if (o === void 0) return !1;
|
|
1641
1641
|
let s = (e) => e.trim().replace(/\s+/g, " ");
|
|
1642
|
-
return s(a) === s(
|
|
1643
|
-
},
|
|
1644
|
-
if (
|
|
1642
|
+
return s(a) === s(b(o));
|
|
1643
|
+
}, zr = (e, t) => {
|
|
1644
|
+
if (z(e, "else")) return !0;
|
|
1645
1645
|
if (e.kind !== "call") return !1;
|
|
1646
|
-
if (e.name === "supports") return t.env.supports?.(
|
|
1647
|
-
if (e.name === "media") return t.env.matchMedia?.(
|
|
1646
|
+
if (e.name === "supports") return t.env.supports?.(Lr(e)) ?? !1;
|
|
1647
|
+
if (e.name === "media") return t.env.matchMedia?.(Lr(e))?.matches ?? !1;
|
|
1648
1648
|
if (e.name === "style") {
|
|
1649
1649
|
let n = t.env.customProps;
|
|
1650
|
-
return n === void 0 ? void 0 :
|
|
1650
|
+
return n === void 0 ? void 0 : Rr(e, n);
|
|
1651
1651
|
}
|
|
1652
1652
|
return !1;
|
|
1653
|
-
},
|
|
1654
|
-
let r =
|
|
1655
|
-
if (r.length === 0) return
|
|
1653
|
+
}, Br = (e, t, n) => {
|
|
1654
|
+
let r = Ir(e);
|
|
1655
|
+
if (r.length === 0) return R;
|
|
1656
1656
|
for (let i of r) {
|
|
1657
|
-
let r = i.fallback ? !0 :
|
|
1657
|
+
let r = i.fallback ? !0 : zr(i.condition, t);
|
|
1658
1658
|
if (r === void 0) return e;
|
|
1659
1659
|
if (r) return n(i.consequent, t);
|
|
1660
1660
|
}
|
|
1661
|
-
return
|
|
1662
|
-
},
|
|
1661
|
+
return R;
|
|
1662
|
+
}, Vr = (e) => e.name === "if" && Ir(e).some((e) => e.condition.kind === "call" && e.condition.name === "style"), Hr = 32, Ur = (e) => Object.freeze({
|
|
1663
1663
|
kind: "scalar",
|
|
1664
1664
|
payload: Object.freeze({
|
|
1665
1665
|
type: "number",
|
|
1666
1666
|
value: e,
|
|
1667
1667
|
unit: ""
|
|
1668
1668
|
})
|
|
1669
|
-
}),
|
|
1669
|
+
}), Wr = (e, t) => Object.freeze({
|
|
1670
1670
|
kind: "call",
|
|
1671
1671
|
name: e.name,
|
|
1672
1672
|
args: Object.freeze(t)
|
|
1673
|
-
}),
|
|
1673
|
+
}), Gr = (e, t) => Object.freeze({
|
|
1674
1674
|
kind: "list",
|
|
1675
1675
|
separator: e.separator,
|
|
1676
1676
|
items: Object.freeze(t)
|
|
1677
|
-
}),
|
|
1677
|
+
}), Kr = (e, t) => {
|
|
1678
1678
|
let n = [], r = !1;
|
|
1679
1679
|
for (let i of e) {
|
|
1680
|
-
let e =
|
|
1680
|
+
let e = B(i, {
|
|
1681
1681
|
...t,
|
|
1682
1682
|
depth: t.depth + 1
|
|
1683
1683
|
});
|
|
1684
|
-
if (e ===
|
|
1684
|
+
if (e === R) {
|
|
1685
1685
|
r = !0;
|
|
1686
1686
|
continue;
|
|
1687
1687
|
}
|
|
1688
1688
|
e !== i && (r = !0), n.push(e);
|
|
1689
1689
|
}
|
|
1690
1690
|
return r ? Object.freeze(n) : e;
|
|
1691
|
-
},
|
|
1692
|
-
if (t.depth >
|
|
1691
|
+
}, B = (e, t) => {
|
|
1692
|
+
if (t.depth > Hr) return R;
|
|
1693
1693
|
if (e.kind === "scalar") return e;
|
|
1694
1694
|
if (e.kind === "list") {
|
|
1695
|
-
let n =
|
|
1696
|
-
return n ===
|
|
1695
|
+
let n = Kr(e.items, t);
|
|
1696
|
+
return n === R ? R : n === e.items ? e : Gr(e, n);
|
|
1697
1697
|
}
|
|
1698
|
-
if (e.name === "if") return
|
|
1698
|
+
if (e.name === "if") return Br(e, {
|
|
1699
1699
|
...t,
|
|
1700
1700
|
depth: t.depth + 1
|
|
1701
|
-
},
|
|
1701
|
+
}, B);
|
|
1702
1702
|
if (e.name === "sibling-index") {
|
|
1703
1703
|
let n = t.env.siblingIndex;
|
|
1704
|
-
return n === void 0 ? e :
|
|
1704
|
+
return n === void 0 ? e : Ur(n());
|
|
1705
1705
|
}
|
|
1706
1706
|
if (e.name === "sibling-count") {
|
|
1707
1707
|
let n = t.env.siblingCount;
|
|
1708
|
-
return n === void 0 ? e :
|
|
1708
|
+
return n === void 0 ? e : Ur(n());
|
|
1709
1709
|
}
|
|
1710
|
-
if (e.name.startsWith("--") && t.functions.has(e.name)) return
|
|
1711
|
-
let n =
|
|
1712
|
-
return n ===
|
|
1713
|
-
},
|
|
1710
|
+
if (e.name.startsWith("--") && t.functions.has(e.name)) return Nr(e, t, B);
|
|
1711
|
+
let n = Kr(e.args, t);
|
|
1712
|
+
return n === R ? R : n === e.args ? e : Wr(e, n);
|
|
1713
|
+
}, qr = (e, t) => B(e, t), Jr = (e) => {
|
|
1714
1714
|
if (typeof e != "object" || !e || !("kind" in e)) return !1;
|
|
1715
1715
|
let t = e;
|
|
1716
|
-
return t.kind === "scalar" ? !1 : t.kind === "list" ? t.items.some(
|
|
1717
|
-
},
|
|
1716
|
+
return t.kind === "scalar" ? !1 : t.kind === "list" ? t.items.some(Jr) : t.name === "if" || t.name === "spring" || t.name === "sibling-index" || t.name === "sibling-count" || t.name.startsWith("--") ? !0 : t.args.some(Jr);
|
|
1717
|
+
}, V = (e) => {
|
|
1718
1718
|
if (typeof e != "object" || !e || !("kind" in e)) return !1;
|
|
1719
1719
|
let t = e;
|
|
1720
|
-
return t.kind === "scalar" ? !1 : t.kind === "list" ? t.items.some(
|
|
1721
|
-
},
|
|
1720
|
+
return t.kind === "scalar" ? !1 : t.kind === "list" ? t.items.some(V) : t.name === "sibling-index" || t.name === "sibling-count" || Vr(t) ? !0 : t.args.some(V);
|
|
1721
|
+
}, H = {
|
|
1722
1722
|
mass: 1,
|
|
1723
1723
|
stiffness: 100,
|
|
1724
1724
|
damping: 10,
|
|
1725
1725
|
velocity: 0
|
|
1726
|
-
},
|
|
1726
|
+
}, Yr = (e) => {
|
|
1727
1727
|
let t = (t, n) => {
|
|
1728
1728
|
let r = e[t];
|
|
1729
1729
|
return typeof r == "number" && Number.isFinite(r) ? r : n;
|
|
1730
|
-
}, n = t(0,
|
|
1731
|
-
return n > 0 || (n =
|
|
1730
|
+
}, n = t(0, H.mass), r = t(1, H.stiffness), i = t(2, H.damping), a = t(3, H.velocity);
|
|
1731
|
+
return n > 0 || (n = H.mass), r > 0 || (r = H.stiffness), i >= 0 || (i = H.damping), {
|
|
1732
1732
|
response: 2 * Math.PI * Math.sqrt(n / r),
|
|
1733
1733
|
dampingFraction: i / (2 * Math.sqrt(r * n)),
|
|
1734
1734
|
initialVelocity: a
|
|
@@ -1736,27 +1736,27 @@ var Dr = () => {
|
|
|
1736
1736
|
};
|
|
1737
1737
|
//#endregion
|
|
1738
1738
|
//#region src/animation/resolve/element-resolve.ts
|
|
1739
|
-
function
|
|
1739
|
+
function Xr(e) {
|
|
1740
1740
|
let t = e.templateFrames, n = !1;
|
|
1741
1741
|
for (let e of t) {
|
|
1742
1742
|
let t = e.vars;
|
|
1743
|
-
for (let e in t) if (
|
|
1743
|
+
for (let e in t) if (V(t[e])) {
|
|
1744
1744
|
n = !0;
|
|
1745
1745
|
break;
|
|
1746
1746
|
}
|
|
1747
1747
|
if (n) break;
|
|
1748
1748
|
}
|
|
1749
1749
|
if (!n) return !1;
|
|
1750
|
-
let r =
|
|
1750
|
+
let r = $r(e);
|
|
1751
1751
|
if (r === void 0) return !1;
|
|
1752
|
-
let i =
|
|
1752
|
+
let i = Dr(/* @__PURE__ */ new Map(), r), a = !1;
|
|
1753
1753
|
for (let e of t) {
|
|
1754
1754
|
let t = e.vars;
|
|
1755
1755
|
for (let e in t) {
|
|
1756
1756
|
let n = t[e];
|
|
1757
|
-
if (
|
|
1758
|
-
let r =
|
|
1759
|
-
if (r ===
|
|
1757
|
+
if (!Qr(n) || !V(n)) continue;
|
|
1758
|
+
let r = qr(n, i);
|
|
1759
|
+
if (r === R) {
|
|
1760
1760
|
delete t[e], a = !0;
|
|
1761
1761
|
continue;
|
|
1762
1762
|
}
|
|
@@ -1765,13 +1765,13 @@ function Zr(e) {
|
|
|
1765
1765
|
}
|
|
1766
1766
|
return a ? (e.parse(), !0) : !1;
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1769
|
-
if (
|
|
1768
|
+
function Zr(e) {
|
|
1769
|
+
if (Xr(e)) return;
|
|
1770
1770
|
let t = e.targets[0], n = e.frames;
|
|
1771
1771
|
for (let e of n) for (let n of Object.values(e.interpVars)) for (let e of n.slots) O(e, t);
|
|
1772
1772
|
}
|
|
1773
|
-
var
|
|
1774
|
-
function
|
|
1773
|
+
var Qr = (e) => typeof e == "object" && !!e && "kind" in e && (e.kind === "scalar" || e.kind === "call" || e.kind === "list");
|
|
1774
|
+
function $r(e) {
|
|
1775
1775
|
let t = e.targets[0];
|
|
1776
1776
|
if (t == null) return;
|
|
1777
1777
|
let n = { customProps: (e) => {
|
|
@@ -1782,13 +1782,13 @@ function ei(e) {
|
|
|
1782
1782
|
}
|
|
1783
1783
|
//#endregion
|
|
1784
1784
|
//#region src/animation/internal/animation-id.ts
|
|
1785
|
-
var
|
|
1786
|
-
id =
|
|
1785
|
+
var U = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = class {
|
|
1786
|
+
id = ei++;
|
|
1787
1787
|
name;
|
|
1788
1788
|
superKey;
|
|
1789
1789
|
targets;
|
|
1790
1790
|
options;
|
|
1791
|
-
playback = new
|
|
1791
|
+
playback = new a();
|
|
1792
1792
|
_playback;
|
|
1793
1793
|
get startTime() {
|
|
1794
1794
|
return this._playback.startTime;
|
|
@@ -1851,85 +1851,85 @@ var H = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ti = 0, ni = c
|
|
|
1851
1851
|
get flatKeys() {
|
|
1852
1852
|
return this._stableKeys;
|
|
1853
1853
|
}
|
|
1854
|
-
_defaultTransform = (e) =>
|
|
1854
|
+
_defaultTransform = (e) => Dt(e, this.targets);
|
|
1855
1855
|
usesDefaultRenderer(e) {
|
|
1856
1856
|
return e === this._defaultTransform;
|
|
1857
1857
|
}
|
|
1858
1858
|
dispatchAnimationEvent(e) {
|
|
1859
|
-
|
|
1859
|
+
Ut(this, e);
|
|
1860
1860
|
}
|
|
1861
1861
|
constructor(e, t, n, r) {
|
|
1862
|
-
this.options = {},
|
|
1862
|
+
this.options = {}, Ht(this, new Bt(this.options)), this._playback = new Ln(this._frame.bind(this)), this._ctorOptions = e ?? {}, this.setOptions({
|
|
1863
1863
|
...E,
|
|
1864
1864
|
...this._ctorOptions
|
|
1865
1865
|
}), this.targets = t == null ? [] : Array.isArray(t) ? t : [t], this.name = n, this.superKey = r;
|
|
1866
1866
|
}
|
|
1867
1867
|
get templateFrames() {
|
|
1868
|
-
return
|
|
1868
|
+
return N(this).templateFrames;
|
|
1869
1869
|
}
|
|
1870
1870
|
set templateFrames(e) {
|
|
1871
|
-
|
|
1871
|
+
N(this).templateFrames = e, this._compiled = !1;
|
|
1872
1872
|
}
|
|
1873
1873
|
get parsedVars() {
|
|
1874
|
-
return
|
|
1874
|
+
return N(this).parsedVars;
|
|
1875
1875
|
}
|
|
1876
1876
|
get frames() {
|
|
1877
|
-
return
|
|
1877
|
+
return N(this).frames;
|
|
1878
1878
|
}
|
|
1879
1879
|
_compiled = !1;
|
|
1880
1880
|
get compiled() {
|
|
1881
1881
|
return this._compiled;
|
|
1882
1882
|
}
|
|
1883
1883
|
get frameId() {
|
|
1884
|
-
return
|
|
1884
|
+
return N(this).frameId;
|
|
1885
1885
|
}
|
|
1886
1886
|
addFrame(e, t, n, r, i) {
|
|
1887
|
-
return
|
|
1887
|
+
return N(this).addFrame(e, t, n, r, i), this._compiled = !1, this;
|
|
1888
1888
|
}
|
|
1889
1889
|
parse() {
|
|
1890
|
-
return
|
|
1890
|
+
return xr(this), this._compiled = !0, this;
|
|
1891
1891
|
}
|
|
1892
1892
|
adoptCompiled(e) {
|
|
1893
|
-
return
|
|
1893
|
+
return Tr(this, e), this._compiled = e.compiled, this;
|
|
1894
1894
|
}
|
|
1895
1895
|
setTimingFunction(e) {
|
|
1896
|
-
return
|
|
1896
|
+
return cr(this, e), this;
|
|
1897
1897
|
}
|
|
1898
1898
|
setIterationCount(e) {
|
|
1899
|
-
return
|
|
1899
|
+
return lr(this, e), this;
|
|
1900
1900
|
}
|
|
1901
1901
|
setDuration(e) {
|
|
1902
|
-
return
|
|
1902
|
+
return dr(this, e), this;
|
|
1903
1903
|
}
|
|
1904
1904
|
setDelay(e) {
|
|
1905
|
-
return
|
|
1905
|
+
return fr(this, e), this;
|
|
1906
1906
|
}
|
|
1907
1907
|
setDirection(e) {
|
|
1908
|
-
return
|
|
1908
|
+
return pr(this, e), this;
|
|
1909
1909
|
}
|
|
1910
1910
|
setFillMode(e) {
|
|
1911
|
-
return
|
|
1911
|
+
return mr(this, e), this;
|
|
1912
1912
|
}
|
|
1913
1913
|
setUseWAAPI(e) {
|
|
1914
|
-
return
|
|
1914
|
+
return hr(this, e), this;
|
|
1915
1915
|
}
|
|
1916
1916
|
setRespectReducedMotion(e) {
|
|
1917
|
-
return
|
|
1917
|
+
return gr(this, e), this;
|
|
1918
1918
|
}
|
|
1919
1919
|
setColorSpace(e) {
|
|
1920
|
-
return
|
|
1920
|
+
return _r(this, e), this;
|
|
1921
1921
|
}
|
|
1922
1922
|
setHueMethod(e) {
|
|
1923
|
-
return
|
|
1923
|
+
return vr(this, e), this;
|
|
1924
1924
|
}
|
|
1925
1925
|
setComposite(e) {
|
|
1926
|
-
return
|
|
1926
|
+
return yr(this, e), this;
|
|
1927
1927
|
}
|
|
1928
1928
|
setOptions(e) {
|
|
1929
|
-
return
|
|
1929
|
+
return br(this, e), this;
|
|
1930
1930
|
}
|
|
1931
1931
|
reverse() {
|
|
1932
|
-
return
|
|
1932
|
+
return Gt(this), this;
|
|
1933
1933
|
}
|
|
1934
1934
|
fillForwards() {
|
|
1935
1935
|
this.interpFrames(this.options.duration, !0);
|
|
@@ -1938,95 +1938,95 @@ var H = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ti = 0, ni = c
|
|
|
1938
1938
|
this.interpFrames(0, !0);
|
|
1939
1939
|
}
|
|
1940
1940
|
get restPosition() {
|
|
1941
|
-
return
|
|
1941
|
+
return Gn(this);
|
|
1942
1942
|
}
|
|
1943
1943
|
paintRest() {
|
|
1944
|
-
|
|
1944
|
+
Kn(this);
|
|
1945
1945
|
}
|
|
1946
1946
|
assertNoUnresolvedNamedSelector() {
|
|
1947
|
-
|
|
1947
|
+
qn(this);
|
|
1948
1948
|
}
|
|
1949
1949
|
at(e, t = !1) {
|
|
1950
|
-
return
|
|
1950
|
+
return Jn(this, e, t);
|
|
1951
1951
|
}
|
|
1952
1952
|
interpFrames(e, t = !1, n) {
|
|
1953
|
-
return
|
|
1953
|
+
return L(this, e, t, n);
|
|
1954
1954
|
}
|
|
1955
1955
|
onStart() {
|
|
1956
|
-
|
|
1956
|
+
kn(this);
|
|
1957
1957
|
}
|
|
1958
1958
|
onEnd() {
|
|
1959
|
-
|
|
1959
|
+
An(this);
|
|
1960
1960
|
}
|
|
1961
1961
|
advanceTo(e) {
|
|
1962
|
-
return
|
|
1962
|
+
return jn(this, e);
|
|
1963
1963
|
}
|
|
1964
1964
|
_frame(e) {
|
|
1965
|
-
return
|
|
1965
|
+
return Fn(this, e);
|
|
1966
1966
|
}
|
|
1967
1967
|
get finished() {
|
|
1968
1968
|
return this._playback._playingPromise ?? Promise.resolve();
|
|
1969
1969
|
}
|
|
1970
1970
|
async play() {
|
|
1971
|
-
return
|
|
1971
|
+
return Dn(this);
|
|
1972
1972
|
}
|
|
1973
1973
|
pause() {
|
|
1974
|
-
return
|
|
1974
|
+
return Kt(this), this;
|
|
1975
1975
|
}
|
|
1976
1976
|
resume() {
|
|
1977
|
-
return
|
|
1977
|
+
return qt(this), this;
|
|
1978
1978
|
}
|
|
1979
1979
|
toggle() {
|
|
1980
|
-
return
|
|
1980
|
+
return Jt(this);
|
|
1981
1981
|
}
|
|
1982
1982
|
stop() {
|
|
1983
|
-
|
|
1983
|
+
Yt(this);
|
|
1984
1984
|
}
|
|
1985
1985
|
playing() {
|
|
1986
|
-
return
|
|
1986
|
+
return Xt(this);
|
|
1987
1987
|
}
|
|
1988
1988
|
get effectiveT() {
|
|
1989
|
-
return
|
|
1989
|
+
return Zt(this);
|
|
1990
1990
|
}
|
|
1991
1991
|
settle() {
|
|
1992
|
-
return
|
|
1992
|
+
return P(this), this;
|
|
1993
1993
|
}
|
|
1994
1994
|
reset() {
|
|
1995
|
-
return
|
|
1995
|
+
return Qt(this), this;
|
|
1996
1996
|
}
|
|
1997
1997
|
setTargets(...e) {
|
|
1998
|
-
return this.targets = e,
|
|
1998
|
+
return this.targets = e, Zr(this), this;
|
|
1999
1999
|
}
|
|
2000
|
-
},
|
|
2000
|
+
}, ni = (e, t) => {
|
|
2001
2001
|
let n = {};
|
|
2002
2002
|
for (let r of e.declarations) {
|
|
2003
2003
|
let e = r.value;
|
|
2004
|
-
if (
|
|
2005
|
-
let n =
|
|
2006
|
-
if (n ===
|
|
2004
|
+
if (Jr(e)) {
|
|
2005
|
+
let n = qr(e, t);
|
|
2006
|
+
if (n === R) continue;
|
|
2007
2007
|
e = n;
|
|
2008
2008
|
}
|
|
2009
2009
|
n[r.name] = e;
|
|
2010
2010
|
}
|
|
2011
2011
|
return n;
|
|
2012
|
-
},
|
|
2012
|
+
}, ri = (e) => {
|
|
2013
2013
|
let t = [];
|
|
2014
2014
|
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}%`);
|
|
2015
2015
|
return t;
|
|
2016
|
-
},
|
|
2016
|
+
}, ii = (e) => {
|
|
2017
2017
|
let t = pe(e).filter((e) => e.path.length === 1), n = t[0]?.rule.name;
|
|
2018
2018
|
return n === void 0 ? [] : t.filter((e) => e.rule.name === n).at(-1)?.rule.rules ?? [];
|
|
2019
|
-
},
|
|
2019
|
+
}, ai = (e) => {
|
|
2020
2020
|
let t = he(te(e), []);
|
|
2021
2021
|
return {
|
|
2022
2022
|
ast: t.value,
|
|
2023
2023
|
issues: t.issues
|
|
2024
2024
|
};
|
|
2025
|
-
},
|
|
2025
|
+
}, oi = (e) => {
|
|
2026
2026
|
let t = /* @__PURE__ */ new Map();
|
|
2027
2027
|
for (let n of e) n.path.length === 1 && t.set(n.rule.name, n.rule.descriptor);
|
|
2028
2028
|
return t;
|
|
2029
|
-
},
|
|
2029
|
+
}, si = (e) => ie(e).filter((e) => e.path.length === 1).at(-1)?.rule.declarations ?? [], ci = (e, t) => {
|
|
2030
2030
|
let n = [], r = (e, t) => {
|
|
2031
2031
|
n.push({
|
|
2032
2032
|
code: e,
|
|
@@ -2035,13 +2035,13 @@ var H = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ti = 0, ni = c
|
|
|
2035
2035
|
});
|
|
2036
2036
|
}, i = [], a;
|
|
2037
2037
|
if (typeof e == "string") {
|
|
2038
|
-
let t =
|
|
2038
|
+
let t = ai(e);
|
|
2039
2039
|
a = t.ast, i = t.issues;
|
|
2040
2040
|
} else a = e;
|
|
2041
|
-
let o =
|
|
2041
|
+
let o = ii(a);
|
|
2042
2042
|
if (typeof e == "string" && o.length === 0 && e.trim()) {
|
|
2043
|
-
let t =
|
|
2044
|
-
|
|
2043
|
+
let t = ai(`@keyframes anonymous {\n${e.trim()}\n}`);
|
|
2044
|
+
ii(t.ast).length > 0 && (a = t.ast, i = t.issues, o = ii(a));
|
|
2045
2045
|
}
|
|
2046
2046
|
if (typeof e == "string") for (let t of i) r("PARSE_ERROR", {
|
|
2047
2047
|
message: ve(t),
|
|
@@ -2055,10 +2055,10 @@ var H = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ti = 0, ni = c
|
|
|
2055
2055
|
message: "the input is non-empty but parsed to zero @keyframes rules (no animatable stops) — the resulting animation has no frames",
|
|
2056
2056
|
input: e
|
|
2057
2057
|
});
|
|
2058
|
-
let s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u =
|
|
2058
|
+
let s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = oi(ne(a)), d = Dr(u, t, n);
|
|
2059
2059
|
for (let e of o) {
|
|
2060
|
-
let t =
|
|
2061
|
-
for (let n of
|
|
2060
|
+
let t = ni(e, d);
|
|
2061
|
+
for (let n of ri(e)) {
|
|
2062
2062
|
let r = s.get(n);
|
|
2063
2063
|
s.set(n, {
|
|
2064
2064
|
...r ?? {},
|
|
@@ -2072,22 +2072,22 @@ var H = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ti = 0, ni = c
|
|
|
2072
2072
|
keyframes: s,
|
|
2073
2073
|
timingFunctions: c,
|
|
2074
2074
|
composition: l,
|
|
2075
|
-
properties:
|
|
2075
|
+
properties: oi(ge(a)),
|
|
2076
2076
|
functions: u,
|
|
2077
|
-
options: le(
|
|
2077
|
+
options: le(si(a)).at(0) ?? {},
|
|
2078
2078
|
diagnostics: n,
|
|
2079
2079
|
stylesheet: a
|
|
2080
2080
|
};
|
|
2081
|
-
},
|
|
2082
|
-
function
|
|
2081
|
+
}, li = (e) => ie(e).at(-1)?.rule.declarations ?? [];
|
|
2082
|
+
function ui(e) {
|
|
2083
2083
|
let t = {};
|
|
2084
2084
|
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;
|
|
2085
2085
|
}
|
|
2086
|
-
function
|
|
2087
|
-
let t = ue(
|
|
2086
|
+
function di(e) {
|
|
2087
|
+
let t = ue(li(e));
|
|
2088
2088
|
return Object.keys(t).length > 0 ? t : void 0;
|
|
2089
2089
|
}
|
|
2090
|
-
function
|
|
2090
|
+
function fi(e, t) {
|
|
2091
2091
|
if (!(typeof CSS > "u" || typeof CSS.registerProperty != "function")) for (let [n, r] of e) {
|
|
2092
2092
|
if (r.syntax == null) continue;
|
|
2093
2093
|
let e = {
|
|
@@ -2095,7 +2095,7 @@ function pi(e, t) {
|
|
|
2095
2095
|
syntax: r.syntax,
|
|
2096
2096
|
inherits: r.inherits ?? !1
|
|
2097
2097
|
};
|
|
2098
|
-
r.initialValue != null && (e.initialValue =
|
|
2098
|
+
r.initialValue != null && (e.initialValue = b(r.initialValue));
|
|
2099
2099
|
try {
|
|
2100
2100
|
CSS.registerProperty(e);
|
|
2101
2101
|
} catch (e) {
|
|
@@ -2110,7 +2110,7 @@ function pi(e, t) {
|
|
|
2110
2110
|
}
|
|
2111
2111
|
//#endregion
|
|
2112
2112
|
//#region src/animation/engine/css/animation.ts
|
|
2113
|
-
var
|
|
2113
|
+
var pi = (e) => typeof e != "object" || !e ? !1 : typeof e.clone == "function", W = class extends ti {
|
|
2114
2114
|
constructor(e, ...t) {
|
|
2115
2115
|
super(e, t), this.unflatten = !1;
|
|
2116
2116
|
}
|
|
@@ -2118,7 +2118,7 @@ var mi = (e) => typeof e != "object" || !e ? !1 : typeof e.clone == "function",
|
|
|
2118
2118
|
let t = !1;
|
|
2119
2119
|
for (let e of this.templateFrames) e.start.kind === "named" && (e.start = {
|
|
2120
2120
|
kind: "percent",
|
|
2121
|
-
value:
|
|
2121
|
+
value: It(e.start)
|
|
2122
2122
|
}, t = !0);
|
|
2123
2123
|
return t && this.frames.length > 0 && this.parse(), this;
|
|
2124
2124
|
}
|
|
@@ -2141,36 +2141,36 @@ var mi = (e) => typeof e != "object" || !e ? !1 : typeof e.clone == "function",
|
|
|
2141
2141
|
}
|
|
2142
2142
|
propertyRegistry = /* @__PURE__ */ new Map();
|
|
2143
2143
|
scrollOptions;
|
|
2144
|
-
fromString(
|
|
2145
|
-
|
|
2146
|
-
let
|
|
2147
|
-
this.propertyRegistry =
|
|
2148
|
-
let
|
|
2149
|
-
|
|
2150
|
-
let
|
|
2151
|
-
Object.keys(
|
|
2152
|
-
...
|
|
2144
|
+
fromString(e, t) {
|
|
2145
|
+
t = this.beginIngest(t);
|
|
2146
|
+
let n = ci(e);
|
|
2147
|
+
this.propertyRegistry = n.properties;
|
|
2148
|
+
let r = di(n.stylesheet);
|
|
2149
|
+
r === void 0 ? delete this.scrollOptions : this.scrollOptions = r, this.diagnostics = [...n.diagnostics];
|
|
2150
|
+
let i = ui(n.options);
|
|
2151
|
+
Object.keys(i).length > 0 && this.setOptions({
|
|
2152
|
+
...i,
|
|
2153
2153
|
...this._ctorOptions
|
|
2154
2154
|
});
|
|
2155
|
-
for (let [
|
|
2156
|
-
let
|
|
2157
|
-
if (
|
|
2158
|
-
let
|
|
2159
|
-
|
|
2160
|
-
fn:
|
|
2161
|
-
css:
|
|
2162
|
-
} : { fn:
|
|
2155
|
+
for (let [e, r] of n.keyframes.entries()) {
|
|
2156
|
+
let i = Object.fromEntries(Object.entries(r).map(([e, t]) => [e, pi(t) ? t.clone() : t])), a = n.timingFunctions.get(e), o = a ? _e(a) : void 0, s;
|
|
2157
|
+
if (o) {
|
|
2158
|
+
let e = a ? _(a) : void 0;
|
|
2159
|
+
s = e ? {
|
|
2160
|
+
fn: o,
|
|
2161
|
+
css: e
|
|
2162
|
+
} : { fn: o };
|
|
2163
2163
|
}
|
|
2164
|
-
let
|
|
2165
|
-
this.addFrame(
|
|
2164
|
+
let c = n.composition.get(e);
|
|
2165
|
+
this.addFrame(e, i, t, s, c);
|
|
2166
2166
|
}
|
|
2167
|
-
return this.parse(),
|
|
2167
|
+
return this.parse(), fi(this.propertyRegistry, this.diagnostics), this;
|
|
2168
2168
|
}
|
|
2169
|
-
},
|
|
2170
|
-
let r =
|
|
2169
|
+
}, mi = (e) => typeof e == "string" ? e : U(e), hi = (e, t, n) => {
|
|
2170
|
+
let r = mi(t), i = e[r];
|
|
2171
2171
|
if (!i) throw Error(`AnimationGroup.${n}: no animation registered for key "${r}". Known keys: ${Object.keys(e).join(", ") || "(none)"}.`);
|
|
2172
2172
|
return i;
|
|
2173
|
-
},
|
|
2173
|
+
}, gi = (e) => {
|
|
2174
2174
|
let t = /* @__PURE__ */ new Set();
|
|
2175
2175
|
for (let n of e) {
|
|
2176
2176
|
if (!n.layer.enabled) continue;
|
|
@@ -2178,24 +2178,24 @@ var mi = (e) => typeof e != "object" || !e ? !1 : typeof e.clone == "function",
|
|
|
2178
2178
|
for (let r of n.animation.flatKeys) e && !e.has(r) || t.add(r);
|
|
2179
2179
|
}
|
|
2180
2180
|
return [...t];
|
|
2181
|
-
},
|
|
2181
|
+
}, _i = (e) => {
|
|
2182
2182
|
let t = !0;
|
|
2183
2183
|
for (let n of e) n.animation.interpFrames(n.animation.t, !0), t &&= n.animation.done;
|
|
2184
2184
|
return t;
|
|
2185
|
-
},
|
|
2185
|
+
}, vi = (e) => {
|
|
2186
2186
|
for (let t of e) {
|
|
2187
2187
|
let e = t.animation;
|
|
2188
2188
|
e.started = !0, e.t = e.options.duration, e.interpFrames(e.t, !0);
|
|
2189
2189
|
}
|
|
2190
|
-
},
|
|
2190
|
+
}, yi = (e, t) => {
|
|
2191
2191
|
for (let n of e) n.animation.paused = t;
|
|
2192
|
-
},
|
|
2192
|
+
}, G = (e) => e.op === "replace" && (e.weightSpring !== void 0 || e.weight !== 1), bi = (e) => {
|
|
2193
2193
|
let t = e.weightSpring?.value ?? e.weight;
|
|
2194
2194
|
return e.weightSpring ? t : Number.isFinite(t) ? Math.min(1, Math.max(0, t)) : 0;
|
|
2195
|
-
},
|
|
2195
|
+
}, xi = (e) => Number.isFinite(e) ? Math.min(1, Math.max(0, e)) : 0;
|
|
2196
2196
|
//#endregion
|
|
2197
2197
|
//#region src/animation/group/waapi.ts
|
|
2198
|
-
function
|
|
2198
|
+
function Si(e) {
|
|
2199
2199
|
let t = e.getEntries();
|
|
2200
2200
|
if (!e.singleTarget || t.length === 0) return {
|
|
2201
2201
|
eligible: !1,
|
|
@@ -2215,7 +2215,7 @@ function Ci(e) {
|
|
|
2215
2215
|
eligible: !1,
|
|
2216
2216
|
reason: "property-masked layer stays on rAF"
|
|
2217
2217
|
};
|
|
2218
|
-
if (
|
|
2218
|
+
if (G(e.layer) || e.layer.weightSpring) return {
|
|
2219
2219
|
eligible: !1,
|
|
2220
2220
|
reason: "weight-driven layer has no native composite equivalent"
|
|
2221
2221
|
};
|
|
@@ -2227,7 +2227,7 @@ function Ci(e) {
|
|
|
2227
2227
|
eligible: !1,
|
|
2228
2228
|
reason: "child useWAAPI is disabled"
|
|
2229
2229
|
};
|
|
2230
|
-
let t =
|
|
2230
|
+
let t = F(e.animation);
|
|
2231
2231
|
if (!t.eligible) return {
|
|
2232
2232
|
eligible: !1,
|
|
2233
2233
|
reason: t.reason
|
|
@@ -2239,15 +2239,15 @@ function Ci(e) {
|
|
|
2239
2239
|
entries: t
|
|
2240
2240
|
};
|
|
2241
2241
|
}
|
|
2242
|
-
function
|
|
2243
|
-
let t =
|
|
2242
|
+
function Ci(e) {
|
|
2243
|
+
let t = Si(e);
|
|
2244
2244
|
if (!t.eligible) return null;
|
|
2245
2245
|
let n = [];
|
|
2246
2246
|
try {
|
|
2247
2247
|
for (let e of t.entries) {
|
|
2248
2248
|
let r = e.layer.op;
|
|
2249
|
-
n.push(t.target.animate(
|
|
2250
|
-
...
|
|
2249
|
+
n.push(t.target.animate(hn(e.animation), {
|
|
2250
|
+
...bn(e.animation),
|
|
2251
2251
|
composite: r
|
|
2252
2252
|
}));
|
|
2253
2253
|
}
|
|
@@ -2261,40 +2261,40 @@ function wi(e) {
|
|
|
2261
2261
|
}
|
|
2262
2262
|
//#endregion
|
|
2263
2263
|
//#region src/animation/group/lifecycle.ts
|
|
2264
|
-
function
|
|
2264
|
+
function wi(e) {
|
|
2265
2265
|
for (let t of e._waAnimations) try {
|
|
2266
2266
|
t.cancel?.();
|
|
2267
2267
|
} catch {}
|
|
2268
2268
|
e._waAnimations.length = 0, e._waapiDelegated = !1;
|
|
2269
2269
|
}
|
|
2270
|
-
function
|
|
2270
|
+
function Ti(e) {
|
|
2271
2271
|
for (let t of e._waAnimations) try {
|
|
2272
2272
|
t.pause?.();
|
|
2273
2273
|
} catch {}
|
|
2274
2274
|
}
|
|
2275
|
-
function
|
|
2275
|
+
function Ei(e) {
|
|
2276
2276
|
for (let t of e._waAnimations) try {
|
|
2277
2277
|
t.play?.();
|
|
2278
2278
|
} catch {}
|
|
2279
2279
|
}
|
|
2280
|
-
function
|
|
2280
|
+
function Di(e) {
|
|
2281
2281
|
let t = e.resolvePromise;
|
|
2282
2282
|
e.resolvePromise = null, t?.();
|
|
2283
2283
|
}
|
|
2284
|
-
async function
|
|
2285
|
-
return e._playingPromise && e.resolvePromise && !e.started && !e.paused && !e.playback.running && e.playback.loop(e._boundFrame), d(e, () =>
|
|
2286
|
-
let t =
|
|
2284
|
+
async function Oi(e) {
|
|
2285
|
+
return e._playingPromise && e.resolvePromise && !e.started && !e.paused && !e.playback.running && e.playback.loop(e._boundFrame), d(e, () => g(e.respectReducedMotion, () => ki(e), () => {
|
|
2286
|
+
let t = Ci(e);
|
|
2287
2287
|
return t && (e._waAnimations.push(...t), e._waapiDelegated = !0), new Promise((t) => {
|
|
2288
2288
|
e.resolvePromise = t, e.playback.loop(e._boundFrame);
|
|
2289
2289
|
});
|
|
2290
2290
|
}));
|
|
2291
2291
|
}
|
|
2292
|
-
function
|
|
2292
|
+
function ki(e) {
|
|
2293
2293
|
e.started = !0;
|
|
2294
2294
|
let t = e.lastTickTime;
|
|
2295
|
-
return
|
|
2295
|
+
return vi(e.getEntries()), e.singleTarget && e.render(t), e.settle(), Promise.resolve();
|
|
2296
2296
|
}
|
|
2297
|
-
function
|
|
2297
|
+
function Ai(e) {
|
|
2298
2298
|
if (!e.started || e.paused) return;
|
|
2299
2299
|
e.paused = !0;
|
|
2300
2300
|
let t = e.lastTickTime;
|
|
@@ -2302,64 +2302,64 @@ function ji(e) {
|
|
|
2302
2302
|
let e = n.animation;
|
|
2303
2303
|
e.pause(), e.pausedTime === 0 && (e.pausedTime = t);
|
|
2304
2304
|
}
|
|
2305
|
-
e.playback.stop(), e._waapiDelegated &&
|
|
2305
|
+
e.playback.stop(), e._waapiDelegated && Ti(e), e.render();
|
|
2306
|
+
}
|
|
2307
|
+
function ji(e) {
|
|
2308
|
+
!e.started || !e.paused || (e.paused = !1, yi(e.getEntries(), !1), e._waapiDelegated && Ei(e), e.playback.loop(e._boundFrame));
|
|
2306
2309
|
}
|
|
2307
2310
|
function Mi(e) {
|
|
2308
|
-
|
|
2311
|
+
s(e, () => Ai(e), () => ji(e));
|
|
2309
2312
|
}
|
|
2310
2313
|
function Ni(e) {
|
|
2311
|
-
|
|
2312
|
-
}
|
|
2313
|
-
function Pi(e) {
|
|
2314
|
-
e._waapiDelegated && Ti(e);
|
|
2314
|
+
e._waapiDelegated && wi(e);
|
|
2315
2315
|
for (let t of e.getEntries()) t.animation.managed = !1, t.animation.settle();
|
|
2316
2316
|
e.started = !1, e.done = !1, e.paused = !1, e.lastTickTime = 0;
|
|
2317
2317
|
}
|
|
2318
|
-
function
|
|
2318
|
+
function Pi(e) {
|
|
2319
2319
|
for (let t of e.getEntries()) {
|
|
2320
2320
|
let e = t.animation;
|
|
2321
2321
|
(e.started || e.t !== 0) && e.frames.length > 0 && e.interpFrames(0, !0);
|
|
2322
2322
|
}
|
|
2323
2323
|
e.settle();
|
|
2324
2324
|
}
|
|
2325
|
-
function
|
|
2326
|
-
e.playback.stop(), e.reset(),
|
|
2325
|
+
function Fi(e) {
|
|
2326
|
+
e.playback.stop(), e.reset(), Di(e);
|
|
2327
2327
|
}
|
|
2328
|
-
function
|
|
2329
|
-
return
|
|
2328
|
+
function Ii(e) {
|
|
2329
|
+
return p(e);
|
|
2330
2330
|
}
|
|
2331
2331
|
//#endregion
|
|
2332
2332
|
//#region src/animation/group/frame.ts
|
|
2333
|
-
function
|
|
2334
|
-
|
|
2333
|
+
function Li(e, t) {
|
|
2334
|
+
zi(e.getEntries(), t);
|
|
2335
2335
|
let n = e.advanceTo(t);
|
|
2336
|
-
return typeof n.then == "function" ? n.then(() =>
|
|
2336
|
+
return typeof n.then == "function" ? n.then(() => Ri(e, t)) : Ri(e, t);
|
|
2337
2337
|
}
|
|
2338
|
-
function
|
|
2339
|
-
return e.paused ? !1 : (e.done =
|
|
2338
|
+
function Ri(e, t) {
|
|
2339
|
+
return e.paused ? !1 : (e.done = Bi(e.getEntries()), e.render(t), e.done ? (e.settle(), Di(e), !1) : !0);
|
|
2340
2340
|
}
|
|
2341
|
-
function
|
|
2342
|
-
for (let n = 0; n < e.length; n++)
|
|
2341
|
+
function zi(e, t) {
|
|
2342
|
+
for (let n = 0; n < e.length; n++) Nn(e[n].animation, t);
|
|
2343
2343
|
}
|
|
2344
|
-
function
|
|
2344
|
+
function Bi(e) {
|
|
2345
2345
|
for (let t = 0; t < e.length; t++) if (!e[t].animation.done) return !1;
|
|
2346
2346
|
return !0;
|
|
2347
2347
|
}
|
|
2348
2348
|
//#endregion
|
|
2349
2349
|
//#region src/animation/group/seek.ts
|
|
2350
|
-
function
|
|
2351
|
-
let n =
|
|
2350
|
+
function Vi(e, t) {
|
|
2351
|
+
let n = hi(e.animations, t, "elapsedOf").animation, { delay: r, duration: i } = n.options;
|
|
2352
2352
|
return Math.max(0, r) + n.iteration * Math.max(0, i) + n.t;
|
|
2353
2353
|
}
|
|
2354
|
-
function
|
|
2354
|
+
function Hi(e, t) {
|
|
2355
2355
|
for (let { animation: n } of Object.values(e.animations)) {
|
|
2356
2356
|
let { delay: r, duration: i, iterationCount: a, direction: o } = n.options, s = t - Math.max(0, r), c = 0, l = Math.min(0, s);
|
|
2357
|
-
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 =
|
|
2357
|
+
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 = Wt(o, c)), e.setChildTime(n, l);
|
|
2358
2358
|
}
|
|
2359
2359
|
}
|
|
2360
2360
|
//#endregion
|
|
2361
2361
|
//#region src/animation/group/render-observers.ts
|
|
2362
|
-
var
|
|
2362
|
+
var Ui = class {
|
|
2363
2363
|
listeners = [];
|
|
2364
2364
|
subscribe(e) {
|
|
2365
2365
|
return this.listeners.push(e), () => {
|
|
@@ -2371,39 +2371,39 @@ var Wi = class {
|
|
|
2371
2371
|
let t = this.listeners;
|
|
2372
2372
|
for (let n = 0; n < t.length; n++) t[n](e);
|
|
2373
2373
|
}
|
|
2374
|
-
},
|
|
2374
|
+
}, Wi = null, Gi = () => typeof MessageChannel == "function" ? () => new Promise((e) => {
|
|
2375
2375
|
let t = new MessageChannel();
|
|
2376
2376
|
t.port1.onmessage = () => {
|
|
2377
2377
|
t.port1.close(), e();
|
|
2378
2378
|
}, t.port2.postMessage(void 0);
|
|
2379
2379
|
}) : () => new Promise((e) => setTimeout(e, 0));
|
|
2380
|
-
function
|
|
2380
|
+
function Ki() {
|
|
2381
2381
|
let e = globalThis.scheduler;
|
|
2382
|
-
return e && typeof e.yield == "function" ? e.yield() : (
|
|
2382
|
+
return e && typeof e.yield == "function" ? e.yield() : (Wi ??= Gi(), Wi());
|
|
2383
2383
|
}
|
|
2384
2384
|
//#endregion
|
|
2385
2385
|
//#region src/animation/group/yield-batch.ts
|
|
2386
|
-
var
|
|
2386
|
+
var qi = (e, t) => {
|
|
2387
2387
|
for (let n = 0; n < e.length; n++) {
|
|
2388
2388
|
let r = e[n].animation;
|
|
2389
2389
|
r.done || r.paused && r.pausedTime !== 0 || r.advanceTo(t);
|
|
2390
2390
|
}
|
|
2391
|
-
},
|
|
2392
|
-
for (let r = 0; r < e.length; r += n)
|
|
2393
|
-
},
|
|
2394
|
-
let r = new
|
|
2391
|
+
}, Ji = async (e, t, n) => {
|
|
2392
|
+
for (let r = 0; r < e.length; r += n) qi(e.slice(r, r + n), t), r + n < e.length && await Ki();
|
|
2393
|
+
}, Yi = (e, t, n) => {
|
|
2394
|
+
let r = new u({
|
|
2395
2395
|
...n,
|
|
2396
2396
|
initial: e
|
|
2397
2397
|
});
|
|
2398
2398
|
return r.target = t, r;
|
|
2399
|
-
},
|
|
2399
|
+
}, Xi = (e, t) => {
|
|
2400
2400
|
let n = !1;
|
|
2401
2401
|
for (let r of e) {
|
|
2402
2402
|
let e = r.layer.weightSpring;
|
|
2403
2403
|
e !== void 0 && (t > 0 && e.tickDt(t), e.settled ? (r.layer.weight = e.value, delete r.layer.weightSpring) : n = !0);
|
|
2404
2404
|
}
|
|
2405
2405
|
return n;
|
|
2406
|
-
},
|
|
2406
|
+
}, Zi = class {
|
|
2407
2407
|
values = {};
|
|
2408
2408
|
keys = [];
|
|
2409
2409
|
epochs = Object.create(null);
|
|
@@ -2425,8 +2425,8 @@ var Ji = (e, t) => {
|
|
|
2425
2425
|
pruneInactive() {
|
|
2426
2426
|
for (let e of this.keys) this.epochs[e] !== this.epoch && (this.values[e] = void 0);
|
|
2427
2427
|
}
|
|
2428
|
-
},
|
|
2429
|
-
let e = new
|
|
2428
|
+
}, Qi = () => {
|
|
2429
|
+
let e = new Zi();
|
|
2430
2430
|
return {
|
|
2431
2431
|
compositeState: e,
|
|
2432
2432
|
grouped: e.values,
|
|
@@ -2435,12 +2435,12 @@ var Ji = (e, t) => {
|
|
|
2435
2435
|
soaPlans: null,
|
|
2436
2436
|
compositeBuf: null
|
|
2437
2437
|
};
|
|
2438
|
-
},
|
|
2438
|
+
}, K = (e) => typeof e == "number", $i = (e, t) => {
|
|
2439
2439
|
let { carriers: n, incomingSlots: r } = t, i = n.length;
|
|
2440
2440
|
if (i !== 0) {
|
|
2441
2441
|
for (let t = 0; t < i; t++) e[t] = n[t].values[n[t].key];
|
|
2442
2442
|
if (t.weightBlend) {
|
|
2443
|
-
let n =
|
|
2443
|
+
let n = bi(t.layer);
|
|
2444
2444
|
for (let t = 0; t < i; t++) {
|
|
2445
2445
|
let i = r[t];
|
|
2446
2446
|
e[t] = C(e[t], i.values[i.key], n);
|
|
@@ -2454,12 +2454,12 @@ var Ji = (e, t) => {
|
|
|
2454
2454
|
r.values[r.key] = e[t];
|
|
2455
2455
|
}
|
|
2456
2456
|
}
|
|
2457
|
-
},
|
|
2457
|
+
}, ea = (e, t, n) => {
|
|
2458
2458
|
let r = [], i = {}, a = 0;
|
|
2459
2459
|
for (let t of e) {
|
|
2460
2460
|
let { layer: e, values: o } = t;
|
|
2461
2461
|
if (!e.enabled) continue;
|
|
2462
|
-
let s = e.properties, c = e.op, l =
|
|
2462
|
+
let s = e.properties, c = e.op, l = G(e);
|
|
2463
2463
|
if (c === "replace" && !l) {
|
|
2464
2464
|
for (let e in o) s && !s.has(e) || o[e] !== void 0 && (i[e] = {
|
|
2465
2465
|
values: n,
|
|
@@ -2473,7 +2473,7 @@ var Ji = (e, t) => {
|
|
|
2473
2473
|
let t = o[e];
|
|
2474
2474
|
if (t === void 0) continue;
|
|
2475
2475
|
let r = i[e], a = r?.values[e];
|
|
2476
|
-
r !== void 0 &&
|
|
2476
|
+
r !== void 0 && K(a) && K(t) ? (u.push(r), d.push({
|
|
2477
2477
|
values: o,
|
|
2478
2478
|
key: e
|
|
2479
2479
|
})) : (f.add(e), i[e] = {
|
|
@@ -2494,10 +2494,10 @@ var Ji = (e, t) => {
|
|
|
2494
2494
|
plans: r,
|
|
2495
2495
|
compositeBuf: o
|
|
2496
2496
|
};
|
|
2497
|
-
},
|
|
2498
|
-
function
|
|
2497
|
+
}, ta = /* @__PURE__ */ new WeakMap();
|
|
2498
|
+
function na(e, t, n) {
|
|
2499
2499
|
let r = t.grouped;
|
|
2500
|
-
t.groupedKeysDirty && (t.groupedKeys =
|
|
2500
|
+
t.groupedKeysDirty && (t.groupedKeys = gi(e.getEntries()), t.compositeState.configure(t.groupedKeys), t.groupedKeysDirty = !1, t.soaPlans = null, ta.delete(e)), t.compositeState.clear();
|
|
2501
2501
|
let i = e.getEntries(), a = t.soaPlans !== null, o = 0, s = !0;
|
|
2502
2502
|
for (let e of i) {
|
|
2503
2503
|
let { animation: n, layer: i, values: c } = e;
|
|
@@ -2505,7 +2505,7 @@ function ra(e, t, n) {
|
|
|
2505
2505
|
n.interpFrames(n.t, !1, c);
|
|
2506
2506
|
let l = i.properties;
|
|
2507
2507
|
for (let e in c) l && !l.has(e) || c[e] !== void 0 && t.compositeState.mark(e);
|
|
2508
|
-
let u = i.op, d =
|
|
2508
|
+
let u = i.op, d = G(i);
|
|
2509
2509
|
if (u === "replace" && !d) {
|
|
2510
2510
|
for (let e in c) {
|
|
2511
2511
|
if (l && !l.has(e)) continue;
|
|
@@ -2516,11 +2516,11 @@ function ra(e, t, n) {
|
|
|
2516
2516
|
}
|
|
2517
2517
|
if (a) {
|
|
2518
2518
|
let e = t.soaPlans[o++];
|
|
2519
|
-
|
|
2520
|
-
} else
|
|
2519
|
+
$i(t.compositeBuf, e), e.residualKeys.size > 0 && ra(i, c, r, l, e.residualKeys, t.compositeState);
|
|
2520
|
+
} else ra(i, c, r, l, void 0, t.compositeState);
|
|
2521
2521
|
}
|
|
2522
2522
|
if (!a) {
|
|
2523
|
-
let { plans: e, compositeBuf: n } =
|
|
2523
|
+
let { plans: e, compositeBuf: n } = ea(i, t.compositeBuf, r);
|
|
2524
2524
|
t.soaPlans = e, t.compositeBuf = n;
|
|
2525
2525
|
}
|
|
2526
2526
|
if (e.done = s, t.compositeState.pruneInactive(), e.transform === T) for (let t of e.getEntries()) {
|
|
@@ -2531,12 +2531,12 @@ function ra(e, t, n) {
|
|
|
2531
2531
|
}
|
|
2532
2532
|
}
|
|
2533
2533
|
if (e.unflatten) {
|
|
2534
|
-
let t =
|
|
2535
|
-
t === void 0 ? (t =
|
|
2534
|
+
let t = ta.get(e);
|
|
2535
|
+
t === void 0 ? (t = jt(r), ta.set(e, t)) : Mt(t), e.transform(t.root, n);
|
|
2536
2536
|
} else e.transform(r, n);
|
|
2537
2537
|
return r;
|
|
2538
2538
|
}
|
|
2539
|
-
function
|
|
2539
|
+
function ra(e, t, n, r, i, a) {
|
|
2540
2540
|
let o = e.op;
|
|
2541
2541
|
if (o === "add" || o === "accumulate") {
|
|
2542
2542
|
for (let e in t) {
|
|
@@ -2544,51 +2544,51 @@ function ia(e, t, n, r, i, a) {
|
|
|
2544
2544
|
let o = t[e];
|
|
2545
2545
|
if (o === void 0) continue;
|
|
2546
2546
|
let s = n[e];
|
|
2547
|
-
|
|
2547
|
+
K(s) && K(o) ? n[e] = s + o : a ? a.copy(e, o) : n[e] = o;
|
|
2548
2548
|
}
|
|
2549
2549
|
return;
|
|
2550
2550
|
}
|
|
2551
|
-
let s =
|
|
2551
|
+
let s = bi(e);
|
|
2552
2552
|
for (let e in t) {
|
|
2553
2553
|
if (i && !i.has(e) || r && !r.has(e)) continue;
|
|
2554
2554
|
let o = t[e];
|
|
2555
2555
|
if (o === void 0) continue;
|
|
2556
2556
|
let c = n[e];
|
|
2557
|
-
if (
|
|
2557
|
+
if (K(c) && K(o)) n[e] = C(c, o, s);
|
|
2558
2558
|
else if (a) {
|
|
2559
2559
|
let t = a.copy(e, o);
|
|
2560
|
-
|
|
2560
|
+
K(t) && (n[e] = C(0, t, s));
|
|
2561
2561
|
} else n[e] = o;
|
|
2562
2562
|
}
|
|
2563
2563
|
}
|
|
2564
2564
|
//#endregion
|
|
2565
2565
|
//#region src/animation/group/layer-api.ts
|
|
2566
|
-
function
|
|
2567
|
-
let r =
|
|
2566
|
+
function ia(e, t, n) {
|
|
2567
|
+
let r = hi(e.animations, t, "setLayerConfig");
|
|
2568
2568
|
Object.assign(r.layer, n), e.invalidateEntries();
|
|
2569
2569
|
}
|
|
2570
|
-
function
|
|
2571
|
-
return e.animations[
|
|
2570
|
+
function aa(e, t) {
|
|
2571
|
+
return e.animations[mi(t)]?.layer;
|
|
2572
2572
|
}
|
|
2573
|
-
function
|
|
2574
|
-
let r =
|
|
2573
|
+
function oa(e, t, n) {
|
|
2574
|
+
let r = hi(e.animations, t, "transitionLayer").layer, i = xi(n.weight);
|
|
2575
2575
|
r.op = "replace";
|
|
2576
2576
|
let a = r.weightSpring;
|
|
2577
|
-
a instanceof
|
|
2577
|
+
a instanceof u ? a.target = i : r.weightSpring = Yi(xi(r.weight), i, n.spring), e._hasLayerSprings = !0, e.invalidateEntries();
|
|
2578
2578
|
}
|
|
2579
|
-
function
|
|
2579
|
+
function sa(e, t, n, r) {
|
|
2580
2580
|
let i = r?.spring;
|
|
2581
|
-
|
|
2581
|
+
oa(e, t, {
|
|
2582
2582
|
weight: 0,
|
|
2583
2583
|
...i ? { spring: i } : {}
|
|
2584
|
-
}),
|
|
2584
|
+
}), oa(e, n, {
|
|
2585
2585
|
weight: 1,
|
|
2586
2586
|
...i ? { spring: i } : {}
|
|
2587
2587
|
});
|
|
2588
2588
|
}
|
|
2589
2589
|
//#endregion
|
|
2590
2590
|
//#region src/animation/group/group.ts
|
|
2591
|
-
var
|
|
2591
|
+
var ca = class e {
|
|
2592
2592
|
animations = {};
|
|
2593
2593
|
transform = T;
|
|
2594
2594
|
superKey;
|
|
@@ -2618,24 +2618,24 @@ var la = class e {
|
|
|
2618
2618
|
}
|
|
2619
2619
|
unflatten = !1;
|
|
2620
2620
|
lastTickTime = 0;
|
|
2621
|
-
playback = new
|
|
2621
|
+
playback = new a();
|
|
2622
2622
|
_waAnimations = [];
|
|
2623
2623
|
_waapiDelegated = !1;
|
|
2624
2624
|
resolvePromise = null;
|
|
2625
2625
|
_playingPromise = null;
|
|
2626
2626
|
_boundFrame;
|
|
2627
|
-
_renders = new
|
|
2627
|
+
_renders = new Ui();
|
|
2628
2628
|
_entries = [];
|
|
2629
2629
|
_entriesDirty = !0;
|
|
2630
|
-
_composite =
|
|
2630
|
+
_composite = Qi();
|
|
2631
2631
|
_hasLayerSprings = !1;
|
|
2632
2632
|
constructor(...e) {
|
|
2633
|
-
this._boundFrame = (e) =>
|
|
2633
|
+
this._boundFrame = (e) => Li(this, e);
|
|
2634
2634
|
let t = [];
|
|
2635
2635
|
for (let n of e) {
|
|
2636
2636
|
let e, r;
|
|
2637
|
-
n instanceof
|
|
2638
|
-
let i =
|
|
2637
|
+
n instanceof ti ? 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);
|
|
2638
|
+
let i = U(e);
|
|
2639
2639
|
this.animations[i] = {
|
|
2640
2640
|
values: {},
|
|
2641
2641
|
animation: e,
|
|
@@ -2664,76 +2664,76 @@ var la = class e {
|
|
|
2664
2664
|
return this._deriveSingleTarget(t.map((e) => e.animation.targets[0])), this;
|
|
2665
2665
|
}
|
|
2666
2666
|
transformFramesGrouped(e) {
|
|
2667
|
-
return
|
|
2667
|
+
return na(this, this._composite, e);
|
|
2668
2668
|
}
|
|
2669
2669
|
render(e = this.lastTickTime) {
|
|
2670
|
-
this.singleTarget ? (!this._waapiDelegated || this.done) && this.transformFramesGrouped(e) :
|
|
2670
|
+
this.singleTarget ? (!this._waapiDelegated || this.done) && this.transformFramesGrouped(e) : _i(this.getEntries()), this._renders.notify(e);
|
|
2671
2671
|
}
|
|
2672
2672
|
onRender(e) {
|
|
2673
2673
|
return this._renders.subscribe(e);
|
|
2674
2674
|
}
|
|
2675
2675
|
setChildTime(e, t) {
|
|
2676
|
-
let n =
|
|
2676
|
+
let n = hi(this.animations, e, "setChildTime").animation;
|
|
2677
2677
|
return n.t = t, n.startTime !== void 0 && (n.pausedTime = n.startTime + t), this;
|
|
2678
2678
|
}
|
|
2679
2679
|
seek(e) {
|
|
2680
|
-
return
|
|
2680
|
+
return Hi(this, e), this;
|
|
2681
2681
|
}
|
|
2682
2682
|
elapsedOf(e) {
|
|
2683
|
-
return
|
|
2683
|
+
return Vi(this, e);
|
|
2684
2684
|
}
|
|
2685
2685
|
advanceTo(t) {
|
|
2686
2686
|
let n = this.lastTickTime === 0 ? 0 : t - this.lastTickTime;
|
|
2687
2687
|
this._hasLayerSprings && this.advanceLayerSprings(n), this.lastTickTime = t, this.started = !0;
|
|
2688
2688
|
let r = this.getEntries(), i = e.YIELD_BATCH;
|
|
2689
|
-
return r.length <= i ? (
|
|
2689
|
+
return r.length <= i ? (qi(r, t), this) : Ji(r, t, i).then(() => this);
|
|
2690
2690
|
}
|
|
2691
2691
|
get finished() {
|
|
2692
2692
|
return this._playingPromise ?? Promise.resolve();
|
|
2693
2693
|
}
|
|
2694
2694
|
async play() {
|
|
2695
|
-
return
|
|
2695
|
+
return Oi(this);
|
|
2696
2696
|
}
|
|
2697
2697
|
pause() {
|
|
2698
|
-
return
|
|
2698
|
+
return Ai(this), this;
|
|
2699
2699
|
}
|
|
2700
2700
|
resume() {
|
|
2701
|
-
return
|
|
2701
|
+
return ji(this), this;
|
|
2702
2702
|
}
|
|
2703
2703
|
toggle() {
|
|
2704
|
-
return
|
|
2704
|
+
return Mi(this);
|
|
2705
2705
|
}
|
|
2706
2706
|
settle() {
|
|
2707
|
-
return
|
|
2707
|
+
return Ni(this), this;
|
|
2708
2708
|
}
|
|
2709
2709
|
reset() {
|
|
2710
|
-
return
|
|
2710
|
+
return Pi(this), this._renders.notify(this.lastTickTime), this;
|
|
2711
2711
|
}
|
|
2712
2712
|
stop() {
|
|
2713
|
-
return
|
|
2713
|
+
return Fi(this), this;
|
|
2714
2714
|
}
|
|
2715
2715
|
playing() {
|
|
2716
|
-
return
|
|
2716
|
+
return Ii(this);
|
|
2717
2717
|
}
|
|
2718
2718
|
setLayerConfig(e, t) {
|
|
2719
|
-
return
|
|
2719
|
+
return ia(this, e, t), this;
|
|
2720
2720
|
}
|
|
2721
2721
|
setLayerEnabled(e, t) {
|
|
2722
2722
|
return this.setLayerConfig(e, { enabled: t });
|
|
2723
2723
|
}
|
|
2724
2724
|
getLayerConfig(e) {
|
|
2725
|
-
return
|
|
2725
|
+
return aa(this, e);
|
|
2726
2726
|
}
|
|
2727
2727
|
transitionLayer(e, t) {
|
|
2728
|
-
return
|
|
2728
|
+
return oa(this, e, t), this;
|
|
2729
2729
|
}
|
|
2730
2730
|
crossfade(e, t, n) {
|
|
2731
|
-
return
|
|
2731
|
+
return sa(this, e, t, n), this;
|
|
2732
2732
|
}
|
|
2733
2733
|
advanceLayerSprings(e) {
|
|
2734
|
-
this._hasLayerSprings =
|
|
2734
|
+
this._hasLayerSprings = Xi(this.getEntries(), e);
|
|
2735
2735
|
}
|
|
2736
|
-
},
|
|
2736
|
+
}, la = class {
|
|
2737
2737
|
animation;
|
|
2738
2738
|
constructor(e) {
|
|
2739
2739
|
this.animation = e;
|
|
@@ -2750,23 +2750,23 @@ var la = class e {
|
|
|
2750
2750
|
get finished() {
|
|
2751
2751
|
return this.animation.finished;
|
|
2752
2752
|
}
|
|
2753
|
-
},
|
|
2754
|
-
function
|
|
2753
|
+
}, ua = (e) => typeof e == "number" ? `${e}%` : e;
|
|
2754
|
+
function da(e, t) {
|
|
2755
2755
|
let { path: n, from: r = "0%", to: i = "100%", rotate: a, autoPlay: o = !0, ...s } = t;
|
|
2756
2756
|
if (typeof n != "string" || n.length === 0) throw Error("fromMotionPath(): `path` is required — pass an offset-path value (a path()/ray()/url(#id) string).");
|
|
2757
2757
|
let c = Array.isArray(e) ? e : [e];
|
|
2758
2758
|
for (let e of c) e.style.offsetPath = n, a !== void 0 && (e.style.offsetRotate = a);
|
|
2759
2759
|
let l = {
|
|
2760
|
-
"0%": { "offset-distance":
|
|
2761
|
-
"100%": { "offset-distance":
|
|
2762
|
-
}, u = new
|
|
2760
|
+
"0%": { "offset-distance": ua(r) },
|
|
2761
|
+
"100%": { "offset-distance": ua(i) }
|
|
2762
|
+
}, u = new W(s).fromKeyframes(l);
|
|
2763
2763
|
return u.setTargets(...c), o && u.play(), u;
|
|
2764
2764
|
}
|
|
2765
|
-
var
|
|
2765
|
+
var fa = class extends la {
|
|
2766
2766
|
constructor(e, t) {
|
|
2767
|
-
super(
|
|
2767
|
+
super(da(e, t));
|
|
2768
2768
|
}
|
|
2769
|
-
},
|
|
2769
|
+
}, pa = (e) => {
|
|
2770
2770
|
if (typeof e == "number") {
|
|
2771
2771
|
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%").`);
|
|
2772
2772
|
return e;
|
|
@@ -2775,22 +2775,22 @@ var pa = class extends ua {
|
|
|
2775
2775
|
if (t === void 0) throw Error(`fromDrawSVG(): invalid draw position ${JSON.stringify(e)} — pass a percent string ("0%".."100%") or a 0..1 number.`);
|
|
2776
2776
|
return t;
|
|
2777
2777
|
};
|
|
2778
|
-
function
|
|
2778
|
+
function ma(e, t = {}) {
|
|
2779
2779
|
let { from: n = "0%", to: r = "100%", autoPlay: i = !0, ...a } = t;
|
|
2780
2780
|
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>/…).");
|
|
2781
|
-
let o =
|
|
2781
|
+
let o = pa(n), s = pa(r), c = e.getTotalLength();
|
|
2782
2782
|
e.style.strokeDasharray = `${c}`;
|
|
2783
2783
|
let l = {
|
|
2784
2784
|
"0%": { "stroke-dashoffset": c * (1 - o) },
|
|
2785
2785
|
"100%": { "stroke-dashoffset": c * (1 - s) }
|
|
2786
|
-
}, u = new
|
|
2786
|
+
}, u = new W(a).fromKeyframes(l);
|
|
2787
2787
|
return u.setTargets(e), i && u.play(), u;
|
|
2788
2788
|
}
|
|
2789
|
-
var
|
|
2789
|
+
var ha = class extends la {
|
|
2790
2790
|
constructor(e, t = {}) {
|
|
2791
|
-
super(
|
|
2791
|
+
super(ma(e, t));
|
|
2792
2792
|
}
|
|
2793
|
-
},
|
|
2793
|
+
}, ga = (e) => `--morph-${e}-x`, _a = (e) => `--morph-${e}-y`, va = (e) => `--morph-${e}-angle`, ya = (e, t, n) => {
|
|
2794
2794
|
let r = Array(t + 1);
|
|
2795
2795
|
for (let i = 0; i <= t; i++) if (n) {
|
|
2796
2796
|
let n = e.sampleAtLength(e.totalLength * (i / t));
|
|
@@ -2801,12 +2801,12 @@ var ga = class extends ua {
|
|
|
2801
2801
|
};
|
|
2802
2802
|
} else r[i] = e.getPointAtT(i / t);
|
|
2803
2803
|
return r;
|
|
2804
|
-
},
|
|
2804
|
+
}, ba = (e) => Number.isInteger(e) ? `${e}` : e.toFixed(3), xa = (e) => {
|
|
2805
2805
|
if (e.length === 0) return "";
|
|
2806
|
-
let t = `M ${
|
|
2807
|
-
for (let n = 1; n < e.length; n++) t += ` L ${
|
|
2806
|
+
let t = `M ${ba(e[0].x)} ${ba(e[0].y)}`;
|
|
2807
|
+
for (let n = 1; n < e.length; n++) t += ` L ${ba(e[n].x)} ${ba(e[n].y)}`;
|
|
2808
2808
|
return t;
|
|
2809
|
-
},
|
|
2809
|
+
}, Sa = (e, t) => {
|
|
2810
2810
|
let n = Array(t + 1);
|
|
2811
2811
|
for (let e = 0; e <= t; e++) n[e] = {
|
|
2812
2812
|
x: 0,
|
|
@@ -2815,17 +2815,17 @@ var ga = class extends ua {
|
|
|
2815
2815
|
return (r) => {
|
|
2816
2816
|
let i = r;
|
|
2817
2817
|
for (let e = 0; e <= t; e++) {
|
|
2818
|
-
let t = n[e], r = i[
|
|
2818
|
+
let t = n[e], r = i[ga(e)], a = i[_a(e)];
|
|
2819
2819
|
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)`);
|
|
2820
2820
|
t.x = r, t.y = a;
|
|
2821
2821
|
}
|
|
2822
|
-
let a =
|
|
2822
|
+
let a = xa(n);
|
|
2823
2823
|
e.style.setProperty("--morph-d", a), e.style.setProperty("d", `path("${a}")`);
|
|
2824
2824
|
};
|
|
2825
2825
|
};
|
|
2826
2826
|
//#endregion
|
|
2827
2827
|
//#region src/animation/svg/morph-svg.ts
|
|
2828
|
-
function
|
|
2828
|
+
function Ca(e, n, r = {}) {
|
|
2829
2829
|
let { samples: i = 64, target: a, orient: o = !1, autoPlay: s = !0, ...c } = r;
|
|
2830
2830
|
if (typeof e != "string" || e.length === 0) throw new t("from", e, "fromMorphSVG(): `from` must be a non-empty SVG path `d` string.");
|
|
2831
2831
|
if (typeof n != "string" || n.length === 0) throw new t("to", n, "fromMorphSVG(): `to` must be a non-empty SVG path `d` string.");
|
|
@@ -2833,64 +2833,64 @@ function wa(e, n, r = {}) {
|
|
|
2833
2833
|
let l = new je(e), u = new je(n);
|
|
2834
2834
|
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.");
|
|
2835
2835
|
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.");
|
|
2836
|
-
let d =
|
|
2837
|
-
for (let e = 0; e <= i; e++) p[
|
|
2836
|
+
let d = ya(l, i, o), f = ya(u, i, o), p = {}, m = {};
|
|
2837
|
+
for (let e = 0; e <= i; e++) p[ga(e)] = d[e].x, p[_a(e)] = d[e].y, m[ga(e)] = f[e].x, m[_a(e)] = f[e].y, o && (p[va(e)] = d[e].angle ?? 0, m[va(e)] = f[e].angle ?? 0);
|
|
2838
2838
|
let h = {
|
|
2839
2839
|
"0%": p,
|
|
2840
2840
|
"100%": m
|
|
2841
|
-
},
|
|
2842
|
-
a != null && typeof
|
|
2843
|
-
let
|
|
2844
|
-
return s &&
|
|
2841
|
+
}, g = a == null ? void 0 : Sa(a, i), _ = a;
|
|
2842
|
+
a != null && typeof _.setAttribute == "function" && _.setAttribute("d", e);
|
|
2843
|
+
let v = new W(c).fromKeyframes(h, g);
|
|
2844
|
+
return s && v.play(), v;
|
|
2845
2845
|
}
|
|
2846
|
-
var
|
|
2846
|
+
var wa = class extends la {
|
|
2847
2847
|
samples;
|
|
2848
2848
|
constructor(e, t, n = {}) {
|
|
2849
|
-
super(
|
|
2849
|
+
super(Ca(e, t, n)), this.samples = n.samples ?? 64;
|
|
2850
2850
|
}
|
|
2851
2851
|
sampleD(e) {
|
|
2852
2852
|
let t = (e < 0 ? 0 : e > 1 ? 1 : e) * this.animation.options.duration, n = this.animation.interpFrames(t, !1), r = Array(this.samples + 1);
|
|
2853
2853
|
for (let e = 0; e <= this.samples; e++) {
|
|
2854
|
-
let t = n[
|
|
2854
|
+
let t = n[ga(e)], i = n[_a(e)];
|
|
2855
2855
|
r[e] = {
|
|
2856
2856
|
x: (typeof t == "number" ? t : void 0) ?? 0,
|
|
2857
2857
|
y: (typeof i == "number" ? i : void 0) ?? 0
|
|
2858
2858
|
};
|
|
2859
2859
|
}
|
|
2860
|
-
return
|
|
2860
|
+
return xa(r);
|
|
2861
2861
|
}
|
|
2862
|
-
},
|
|
2862
|
+
}, Ta = "\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n", Ea = "\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n", Da = "\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.05);\n }\n", Oa = "\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", ka = "\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", Aa = "\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", ja = "\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", Ma = "\n 0% {\n transform: translateY(1000px);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n", Na = "\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", Pa = "\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", Fa = "\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n", Ia = "\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", La = "@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}", 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 100% {\n transform: translateX(100%);\n opacity: 0;\n }\n}", za = "\n0% {\n filter: blur(10px);\n opacity: 0;\n}\n100% {\n filter: blur(0px);\n opacity: 1;\n}\n", Ba = "\n0% {\n filter: blur(0px);\n opacity: 1;\n}\n100% {\n filter: blur(10px);\n opacity: 0;\n}\n", Va = "\n0% {\n filter: blur(0px);\n}\n50% {\n filter: blur(10px);\n}\n100% {\n filter: blur(0px);\n}\n", Ha = "\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", Ua = "\n0% {\n background-position: -200% 0;\n}\n100% {\n background-position: 200% 0;\n}\n", Wa = "\n0%, 100% {\n filter: blur(0px);\n opacity: 1;\n}\n50% {\n filter: blur(4px);\n opacity: 0.5;\n}\n", Ga = "\n0% {\n background-position: 0% 50%;\n}\n50% {\n background-position: 100% 50%;\n}\n100% {\n background-position: 0% 50%;\n}\n", Ka = "\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", qa = "\n0%, 100% {\n border-right-color: transparent;\n}\n50% {\n border-right-color: black;\n}\n", Ja = "\n0% {\n max-height: 0;\n opacity: 0;\n}\n100% {\n max-height: 1000px;\n opacity: 1;\n}\n", Ya = "\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", Xa = "\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", Za = "\n0% {\n background-position: 50% 0%;\n}\n100% {\n background-position: 50% 100%;\n}\n", Qa = "\n0% {\n transform: translateX(-100%);\n opacity: 0;\n}\n100% {\n transform: translateX(0);\n opacity: 1;\n}\n", $a = "\n0% {\n transform: translateX(0);\n opacity: 1;\n}\n100% {\n transform: translateX(-100%);\n opacity: 0;\n}\n", eo = "\n0% {\n transform: translateX(100%);\n opacity: 0;\n}\n100% {\n transform: translateX(0);\n opacity: 1;\n}\n", to = "\n0% {\n transform: translateX(0%);\n opacity: 1;\n\n}\n100% {\n transform: translateX(100%);\n opacity: 0;\n}\n", no = "\n0% {\n transform: translateY(0px);\n}\n50% {\n transform: translateY(5px);\n}\n100% {\n transform: translateY(0px);\n}\n", ro = "\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", io = "\n0% {\n transform: scale(0.2) rotate(-24deg);\n opacity: 0;\n}\n100% {\n transform: scale(1) rotate(0deg);\n opacity: 1;\n}\n", ao = "@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}", 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}", q = (e) => {
|
|
2863
2863
|
let t = e.trim();
|
|
2864
2864
|
if (!t.startsWith("@keyframes")) return e;
|
|
2865
2865
|
let n = t.indexOf("{"), r = t.lastIndexOf("}");
|
|
2866
2866
|
if (n === -1 || r <= n) return e;
|
|
2867
2867
|
let i = t.slice(10, n).trim();
|
|
2868
2868
|
return i === "" || i.includes("{") ? e : t.slice(n + 1, r);
|
|
2869
|
-
},
|
|
2869
|
+
}, so = {
|
|
2870
2870
|
response: .35,
|
|
2871
2871
|
dampingFraction: .78
|
|
2872
|
-
},
|
|
2872
|
+
}, co = {
|
|
2873
2873
|
response: .5,
|
|
2874
2874
|
dampingFraction: .5
|
|
2875
|
-
},
|
|
2875
|
+
}, lo = {
|
|
2876
2876
|
response: .7,
|
|
2877
2877
|
dampingFraction: .95
|
|
2878
|
-
}, { response:
|
|
2878
|
+
}, { response: uo, dampingFraction: fo } = Yr([
|
|
2879
2879
|
1,
|
|
2880
2880
|
120,
|
|
2881
2881
|
12,
|
|
2882
2882
|
0
|
|
2883
|
-
]),
|
|
2884
|
-
response:
|
|
2885
|
-
dampingFraction:
|
|
2886
|
-
},
|
|
2883
|
+
]), po = {
|
|
2884
|
+
response: uo,
|
|
2885
|
+
dampingFraction: fo
|
|
2886
|
+
}, mo = {
|
|
2887
2887
|
springScaleInKeyframes: "\n 0% {\n transform: scale(0.6);\n opacity: 0;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n",
|
|
2888
2888
|
springSlideInKeyframes: "\n 0% {\n transform: translateY(40px);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n",
|
|
2889
2889
|
springPopKeyframes: "\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.15);\n }\n",
|
|
2890
2890
|
springWobbleKeyframes: "\n 0%, 100% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(8deg);\n }\n"
|
|
2891
|
-
},
|
|
2891
|
+
}, ho = {
|
|
2892
2892
|
fadeIn: {
|
|
2893
|
-
css:
|
|
2893
|
+
css: q(Ta),
|
|
2894
2894
|
options: {
|
|
2895
2895
|
duration: 700,
|
|
2896
2896
|
timingFunction: "ease-in-out"
|
|
@@ -2898,7 +2898,7 @@ var Ta = class extends ua {
|
|
|
2898
2898
|
group: "enter"
|
|
2899
2899
|
},
|
|
2900
2900
|
fadeOut: {
|
|
2901
|
-
css:
|
|
2901
|
+
css: q(Ea),
|
|
2902
2902
|
options: {
|
|
2903
2903
|
duration: 700,
|
|
2904
2904
|
timingFunction: "ease-in-out"
|
|
@@ -2906,7 +2906,7 @@ var Ta = class extends ua {
|
|
|
2906
2906
|
group: "exit"
|
|
2907
2907
|
},
|
|
2908
2908
|
pulse: {
|
|
2909
|
-
css:
|
|
2909
|
+
css: q(Da),
|
|
2910
2910
|
options: {
|
|
2911
2911
|
duration: 1e3,
|
|
2912
2912
|
timingFunction: "ease-in-out",
|
|
@@ -2915,7 +2915,7 @@ var Ta = class extends ua {
|
|
|
2915
2915
|
group: "attention"
|
|
2916
2916
|
},
|
|
2917
2917
|
shake: {
|
|
2918
|
-
css:
|
|
2918
|
+
css: q(Oa),
|
|
2919
2919
|
options: {
|
|
2920
2920
|
duration: 820,
|
|
2921
2921
|
timingFunction: "ease-in-out"
|
|
@@ -2923,7 +2923,7 @@ var Ta = class extends ua {
|
|
|
2923
2923
|
group: "attention"
|
|
2924
2924
|
},
|
|
2925
2925
|
bounce: {
|
|
2926
|
-
css:
|
|
2926
|
+
css: q(ka),
|
|
2927
2927
|
options: {
|
|
2928
2928
|
duration: 1e3,
|
|
2929
2929
|
timingFunction: "cubic-bezier(0.28, 0.84, 0.42, 1)"
|
|
@@ -2931,7 +2931,7 @@ var Ta = class extends ua {
|
|
|
2931
2931
|
group: "attention"
|
|
2932
2932
|
},
|
|
2933
2933
|
flipPreset: {
|
|
2934
|
-
css:
|
|
2934
|
+
css: q(Aa),
|
|
2935
2935
|
options: {
|
|
2936
2936
|
duration: 1e3,
|
|
2937
2937
|
timingFunction: "ease-in-out"
|
|
@@ -2940,7 +2940,7 @@ var Ta = class extends ua {
|
|
|
2940
2940
|
taxonomyName: "flip"
|
|
2941
2941
|
},
|
|
2942
2942
|
rotateIn: {
|
|
2943
|
-
css:
|
|
2943
|
+
css: q(ja),
|
|
2944
2944
|
options: {
|
|
2945
2945
|
duration: 1e3,
|
|
2946
2946
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -2948,7 +2948,7 @@ var Ta = class extends ua {
|
|
|
2948
2948
|
group: "enter"
|
|
2949
2949
|
},
|
|
2950
2950
|
slideIn: {
|
|
2951
|
-
css:
|
|
2951
|
+
css: q(Ma),
|
|
2952
2952
|
options: {
|
|
2953
2953
|
duration: 1e3,
|
|
2954
2954
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -2956,7 +2956,7 @@ var Ta = class extends ua {
|
|
|
2956
2956
|
group: "enter"
|
|
2957
2957
|
},
|
|
2958
2958
|
heartbeat: {
|
|
2959
|
-
css:
|
|
2959
|
+
css: q(Na),
|
|
2960
2960
|
options: {
|
|
2961
2961
|
duration: 1500,
|
|
2962
2962
|
timingFunction: "ease-in-out",
|
|
@@ -2965,7 +2965,7 @@ var Ta = class extends ua {
|
|
|
2965
2965
|
group: "loop"
|
|
2966
2966
|
},
|
|
2967
2967
|
glow: {
|
|
2968
|
-
css:
|
|
2968
|
+
css: q(Pa),
|
|
2969
2969
|
options: {
|
|
2970
2970
|
duration: 2e3,
|
|
2971
2971
|
timingFunction: "ease-in-out",
|
|
@@ -2974,7 +2974,7 @@ var Ta = class extends ua {
|
|
|
2974
2974
|
group: "loop"
|
|
2975
2975
|
},
|
|
2976
2976
|
typewriter: {
|
|
2977
|
-
css:
|
|
2977
|
+
css: q(Fa),
|
|
2978
2978
|
options: {
|
|
2979
2979
|
duration: 3e3,
|
|
2980
2980
|
timingFunction: "steps(40, jump-end)",
|
|
@@ -2982,7 +2982,7 @@ var Ta = class extends ua {
|
|
|
2982
2982
|
}
|
|
2983
2983
|
},
|
|
2984
2984
|
rainbowText: {
|
|
2985
|
-
css:
|
|
2985
|
+
css: q(Ia),
|
|
2986
2986
|
options: {
|
|
2987
2987
|
duration: 5e3,
|
|
2988
2988
|
timingFunction: "linear",
|
|
@@ -2991,7 +2991,7 @@ var Ta = class extends ua {
|
|
|
2991
2991
|
group: "loop"
|
|
2992
2992
|
},
|
|
2993
2993
|
warpLeft: {
|
|
2994
|
-
css:
|
|
2994
|
+
css: q(La),
|
|
2995
2995
|
options: {
|
|
2996
2996
|
duration: 700,
|
|
2997
2997
|
timingFunction: "ease-in-bounce"
|
|
@@ -2999,7 +2999,7 @@ var Ta = class extends ua {
|
|
|
2999
2999
|
group: "exit"
|
|
3000
3000
|
},
|
|
3001
3001
|
warpRight: {
|
|
3002
|
-
css:
|
|
3002
|
+
css: q(Ra),
|
|
3003
3003
|
options: {
|
|
3004
3004
|
duration: 700,
|
|
3005
3005
|
timingFunction: "ease-in-bounce"
|
|
@@ -3007,7 +3007,7 @@ var Ta = class extends ua {
|
|
|
3007
3007
|
group: "exit"
|
|
3008
3008
|
},
|
|
3009
3009
|
blurIn: {
|
|
3010
|
-
css:
|
|
3010
|
+
css: q(za),
|
|
3011
3011
|
options: {
|
|
3012
3012
|
duration: 2e3,
|
|
3013
3013
|
timingFunction: "ease-in-out"
|
|
@@ -3015,7 +3015,7 @@ var Ta = class extends ua {
|
|
|
3015
3015
|
group: "enter"
|
|
3016
3016
|
},
|
|
3017
3017
|
blurOut: {
|
|
3018
|
-
css:
|
|
3018
|
+
css: q(Ba),
|
|
3019
3019
|
options: {
|
|
3020
3020
|
duration: 2e3,
|
|
3021
3021
|
timingFunction: "ease-in-out"
|
|
@@ -3023,14 +3023,14 @@ var Ta = class extends ua {
|
|
|
3023
3023
|
group: "exit"
|
|
3024
3024
|
},
|
|
3025
3025
|
blurInOut: {
|
|
3026
|
-
css:
|
|
3026
|
+
css: q(Va),
|
|
3027
3027
|
options: {
|
|
3028
3028
|
duration: 2e3,
|
|
3029
3029
|
timingFunction: "ease-in-out"
|
|
3030
3030
|
}
|
|
3031
3031
|
},
|
|
3032
3032
|
progressBar: {
|
|
3033
|
-
css:
|
|
3033
|
+
css: q(Ha),
|
|
3034
3034
|
options: {
|
|
3035
3035
|
duration: 3e3,
|
|
3036
3036
|
timingFunction: "linear",
|
|
@@ -3038,7 +3038,7 @@ var Ta = class extends ua {
|
|
|
3038
3038
|
}
|
|
3039
3039
|
},
|
|
3040
3040
|
skeletonLoading: {
|
|
3041
|
-
css:
|
|
3041
|
+
css: q(Ua),
|
|
3042
3042
|
options: {
|
|
3043
3043
|
duration: 1500,
|
|
3044
3044
|
timingFunction: "linear",
|
|
@@ -3047,14 +3047,14 @@ var Ta = class extends ua {
|
|
|
3047
3047
|
group: "loop"
|
|
3048
3048
|
},
|
|
3049
3049
|
textFocusBlur: {
|
|
3050
|
-
css:
|
|
3050
|
+
css: q(Wa),
|
|
3051
3051
|
options: {
|
|
3052
3052
|
duration: 2e3,
|
|
3053
3053
|
timingFunction: "ease-in-out"
|
|
3054
3054
|
}
|
|
3055
3055
|
},
|
|
3056
3056
|
gradientBackground: {
|
|
3057
|
-
css:
|
|
3057
|
+
css: q(Ga),
|
|
3058
3058
|
options: {
|
|
3059
3059
|
duration: 5e3,
|
|
3060
3060
|
timingFunction: "ease-in-out",
|
|
@@ -3063,14 +3063,14 @@ var Ta = class extends ua {
|
|
|
3063
3063
|
group: "loop"
|
|
3064
3064
|
},
|
|
3065
3065
|
rotateScale: {
|
|
3066
|
-
css:
|
|
3066
|
+
css: q(Ka),
|
|
3067
3067
|
options: {
|
|
3068
3068
|
duration: 2500,
|
|
3069
3069
|
timingFunction: "cubic-bezier(0.68, -0.55, 0.265, 1.55)"
|
|
3070
3070
|
}
|
|
3071
3071
|
},
|
|
3072
3072
|
typingCursor: {
|
|
3073
|
-
css:
|
|
3073
|
+
css: q(qa),
|
|
3074
3074
|
options: {
|
|
3075
3075
|
duration: 800,
|
|
3076
3076
|
timingFunction: "steps(2, jump-start)",
|
|
@@ -3079,7 +3079,7 @@ var Ta = class extends ua {
|
|
|
3079
3079
|
group: "loop"
|
|
3080
3080
|
},
|
|
3081
3081
|
accordionExpand: {
|
|
3082
|
-
css:
|
|
3082
|
+
css: q(Ja),
|
|
3083
3083
|
options: {
|
|
3084
3084
|
duration: 500,
|
|
3085
3085
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
|
|
@@ -3087,7 +3087,7 @@ var Ta = class extends ua {
|
|
|
3087
3087
|
}
|
|
3088
3088
|
},
|
|
3089
3089
|
notificationBounce: {
|
|
3090
|
-
css:
|
|
3090
|
+
css: q(Ya),
|
|
3091
3091
|
options: {
|
|
3092
3092
|
duration: 1e3,
|
|
3093
3093
|
timingFunction: "cubic-bezier(0.28, 0.84, 0.42, 1)"
|
|
@@ -3095,7 +3095,7 @@ var Ta = class extends ua {
|
|
|
3095
3095
|
group: "attention"
|
|
3096
3096
|
},
|
|
3097
3097
|
spinner: {
|
|
3098
|
-
css:
|
|
3098
|
+
css: q(Xa),
|
|
3099
3099
|
options: {
|
|
3100
3100
|
duration: 2e3,
|
|
3101
3101
|
timingFunction: "linear",
|
|
@@ -3104,7 +3104,7 @@ var Ta = class extends ua {
|
|
|
3104
3104
|
group: "loop"
|
|
3105
3105
|
},
|
|
3106
3106
|
parallaxScroll: {
|
|
3107
|
-
css:
|
|
3107
|
+
css: q(Za),
|
|
3108
3108
|
options: {
|
|
3109
3109
|
duration: 1e4,
|
|
3110
3110
|
timingFunction: "linear",
|
|
@@ -3113,7 +3113,7 @@ var Ta = class extends ua {
|
|
|
3113
3113
|
group: "loop"
|
|
3114
3114
|
},
|
|
3115
3115
|
slideInLeft: {
|
|
3116
|
-
css:
|
|
3116
|
+
css: q(Qa),
|
|
3117
3117
|
options: {
|
|
3118
3118
|
duration: 1e3,
|
|
3119
3119
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -3121,7 +3121,7 @@ var Ta = class extends ua {
|
|
|
3121
3121
|
group: "enter"
|
|
3122
3122
|
},
|
|
3123
3123
|
slideOutLeft: {
|
|
3124
|
-
css:
|
|
3124
|
+
css: q($a),
|
|
3125
3125
|
options: {
|
|
3126
3126
|
duration: 1e3,
|
|
3127
3127
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -3129,7 +3129,7 @@ var Ta = class extends ua {
|
|
|
3129
3129
|
group: "exit"
|
|
3130
3130
|
},
|
|
3131
3131
|
slideInRight: {
|
|
3132
|
-
css:
|
|
3132
|
+
css: q(eo),
|
|
3133
3133
|
options: {
|
|
3134
3134
|
duration: 1e3,
|
|
3135
3135
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -3137,7 +3137,7 @@ var Ta = class extends ua {
|
|
|
3137
3137
|
group: "enter"
|
|
3138
3138
|
},
|
|
3139
3139
|
slideOutRight: {
|
|
3140
|
-
css:
|
|
3140
|
+
css: q(to),
|
|
3141
3141
|
options: {
|
|
3142
3142
|
duration: 1e3,
|
|
3143
3143
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -3145,7 +3145,7 @@ var Ta = class extends ua {
|
|
|
3145
3145
|
group: "exit"
|
|
3146
3146
|
},
|
|
3147
3147
|
hover: {
|
|
3148
|
-
css:
|
|
3148
|
+
css: q(no),
|
|
3149
3149
|
options: {
|
|
3150
3150
|
duration: 3e3,
|
|
3151
3151
|
timingFunction: "ease-in-out",
|
|
@@ -3156,7 +3156,7 @@ var Ta = class extends ua {
|
|
|
3156
3156
|
group: "loop"
|
|
3157
3157
|
},
|
|
3158
3158
|
garlandSway: {
|
|
3159
|
-
css:
|
|
3159
|
+
css: ro,
|
|
3160
3160
|
options: {
|
|
3161
3161
|
duration: 4200,
|
|
3162
3162
|
timingFunction: "ease-in-out",
|
|
@@ -3167,16 +3167,16 @@ var Ta = class extends ua {
|
|
|
3167
3167
|
group: "loop"
|
|
3168
3168
|
},
|
|
3169
3169
|
unfurl: {
|
|
3170
|
-
css:
|
|
3170
|
+
css: io,
|
|
3171
3171
|
options: {
|
|
3172
3172
|
duration: 900,
|
|
3173
|
-
timingFunction: l(
|
|
3173
|
+
timingFunction: l(po),
|
|
3174
3174
|
fillMode: "none"
|
|
3175
3175
|
},
|
|
3176
3176
|
group: "enter"
|
|
3177
3177
|
},
|
|
3178
3178
|
jumpUp: {
|
|
3179
|
-
css:
|
|
3179
|
+
css: q(ao),
|
|
3180
3180
|
options: {
|
|
3181
3181
|
duration: 700,
|
|
3182
3182
|
timingFunction: "ease-in-bounce"
|
|
@@ -3184,7 +3184,7 @@ var Ta = class extends ua {
|
|
|
3184
3184
|
group: "enter"
|
|
3185
3185
|
},
|
|
3186
3186
|
jumpDown: {
|
|
3187
|
-
css:
|
|
3187
|
+
css: q(oo),
|
|
3188
3188
|
options: {
|
|
3189
3189
|
duration: 700,
|
|
3190
3190
|
timingFunction: "ease-in-bounce"
|
|
@@ -3192,143 +3192,143 @@ var Ta = class extends ua {
|
|
|
3192
3192
|
group: "exit"
|
|
3193
3193
|
},
|
|
3194
3194
|
springScaleIn: {
|
|
3195
|
-
css:
|
|
3195
|
+
css: mo.springScaleInKeyframes,
|
|
3196
3196
|
options: {
|
|
3197
3197
|
duration: 600,
|
|
3198
|
-
timingFunction: l(
|
|
3198
|
+
timingFunction: l(co)
|
|
3199
3199
|
},
|
|
3200
3200
|
group: "enter"
|
|
3201
3201
|
},
|
|
3202
3202
|
springSlideIn: {
|
|
3203
|
-
css:
|
|
3203
|
+
css: mo.springSlideInKeyframes,
|
|
3204
3204
|
options: {
|
|
3205
3205
|
duration: 600,
|
|
3206
|
-
timingFunction: l(
|
|
3206
|
+
timingFunction: l(so)
|
|
3207
3207
|
},
|
|
3208
3208
|
group: "enter"
|
|
3209
3209
|
},
|
|
3210
3210
|
springPop: {
|
|
3211
|
-
css:
|
|
3211
|
+
css: mo.springPopKeyframes,
|
|
3212
3212
|
options: {
|
|
3213
3213
|
duration: 700,
|
|
3214
|
-
timingFunction: l(
|
|
3214
|
+
timingFunction: l(co)
|
|
3215
3215
|
},
|
|
3216
3216
|
group: "attention"
|
|
3217
3217
|
},
|
|
3218
3218
|
springWobble: {
|
|
3219
|
-
css:
|
|
3219
|
+
css: mo.springWobbleKeyframes,
|
|
3220
3220
|
options: {
|
|
3221
3221
|
duration: 800,
|
|
3222
|
-
timingFunction: l(
|
|
3222
|
+
timingFunction: l(lo)
|
|
3223
3223
|
},
|
|
3224
3224
|
group: "attention"
|
|
3225
3225
|
}
|
|
3226
|
-
},
|
|
3226
|
+
}, go = (e) => (t) => new W({
|
|
3227
3227
|
...e.options,
|
|
3228
3228
|
...t ?? {}
|
|
3229
|
-
}).fromString(e.css),
|
|
3230
|
-
enter:
|
|
3231
|
-
exit:
|
|
3232
|
-
attention:
|
|
3233
|
-
loop:
|
|
3234
|
-
},
|
|
3235
|
-
accordionExpand: () =>
|
|
3236
|
-
attentionPresets: () =>
|
|
3237
|
-
blurIn: () =>
|
|
3238
|
-
blurInOut: () =>
|
|
3239
|
-
blurOut: () =>
|
|
3240
|
-
bounce: () =>
|
|
3241
|
-
enterPresets: () =>
|
|
3242
|
-
exitPresets: () =>
|
|
3243
|
-
fadeIn: () =>
|
|
3244
|
-
fadeOut: () =>
|
|
3245
|
-
flipPreset: () =>
|
|
3246
|
-
garlandSway: () =>
|
|
3247
|
-
glow: () =>
|
|
3248
|
-
gradientBackground: () =>
|
|
3249
|
-
heartbeat: () =>
|
|
3250
|
-
hover: () =>
|
|
3251
|
-
jumpDown: () =>
|
|
3252
|
-
jumpUp: () =>
|
|
3253
|
-
loopPresets: () =>
|
|
3254
|
-
notificationBounce: () =>
|
|
3255
|
-
parallaxScroll: () =>
|
|
3256
|
-
presetTaxonomy: () =>
|
|
3257
|
-
progressBar: () =>
|
|
3258
|
-
pulse: () =>
|
|
3259
|
-
rainbowText: () =>
|
|
3260
|
-
rotateIn: () =>
|
|
3261
|
-
rotateScale: () =>
|
|
3262
|
-
shake: () =>
|
|
3263
|
-
skeletonLoading: () =>
|
|
3264
|
-
slideIn: () =>
|
|
3265
|
-
slideInLeft: () =>
|
|
3266
|
-
slideInRight: () =>
|
|
3267
|
-
slideOutLeft: () =>
|
|
3268
|
-
slideOutRight: () =>
|
|
3269
|
-
spinner: () =>
|
|
3270
|
-
springPop: () =>
|
|
3271
|
-
springScaleIn: () =>
|
|
3272
|
-
springSlideIn: () =>
|
|
3273
|
-
springWobble: () =>
|
|
3274
|
-
textFocusBlur: () =>
|
|
3275
|
-
typewriter: () =>
|
|
3276
|
-
typingCursor: () =>
|
|
3277
|
-
unfurl: () =>
|
|
3278
|
-
warpLeft: () =>
|
|
3279
|
-
warpRight: () =>
|
|
3280
|
-
}),
|
|
3229
|
+
}).fromString(e.css), _o = Object.fromEntries(Object.entries(ho).map(([e, t]) => [e, go(t)])), { fadeIn: vo, fadeOut: yo, pulse: bo, shake: xo, bounce: So, flipPreset: Co, rotateIn: wo, slideIn: To, heartbeat: Eo, glow: Do, typewriter: Oo, rainbowText: ko, warpLeft: Ao, warpRight: jo, blurIn: Mo, blurOut: No, blurInOut: Po, progressBar: Fo, skeletonLoading: Io, textFocusBlur: Lo, gradientBackground: Ro, rotateScale: zo, typingCursor: Bo, accordionExpand: Vo, notificationBounce: Ho, spinner: Uo, parallaxScroll: Wo, slideInLeft: Go, slideOutLeft: Ko, slideInRight: qo, slideOutRight: Jo, hover: Yo, garlandSway: Xo, unfurl: Zo, jumpUp: Qo, jumpDown: $o, springScaleIn: es, springSlideIn: ts, springPop: ns, springWobble: rs } = _o, is = (e) => Object.fromEntries(Object.entries(ho).filter(([, t]) => t.group === e).map(([e, t]) => [t.taxonomyName ?? e, _o[e]])), as = is("enter"), os = is("exit"), ss = is("attention"), cs = is("loop"), ls = {
|
|
3230
|
+
enter: as,
|
|
3231
|
+
exit: os,
|
|
3232
|
+
attention: ss,
|
|
3233
|
+
loop: cs
|
|
3234
|
+
}, us = /* @__PURE__ */ Ne({
|
|
3235
|
+
accordionExpand: () => Vo,
|
|
3236
|
+
attentionPresets: () => ss,
|
|
3237
|
+
blurIn: () => Mo,
|
|
3238
|
+
blurInOut: () => Po,
|
|
3239
|
+
blurOut: () => No,
|
|
3240
|
+
bounce: () => So,
|
|
3241
|
+
enterPresets: () => as,
|
|
3242
|
+
exitPresets: () => os,
|
|
3243
|
+
fadeIn: () => vo,
|
|
3244
|
+
fadeOut: () => yo,
|
|
3245
|
+
flipPreset: () => Co,
|
|
3246
|
+
garlandSway: () => Xo,
|
|
3247
|
+
glow: () => Do,
|
|
3248
|
+
gradientBackground: () => Ro,
|
|
3249
|
+
heartbeat: () => Eo,
|
|
3250
|
+
hover: () => Yo,
|
|
3251
|
+
jumpDown: () => $o,
|
|
3252
|
+
jumpUp: () => Qo,
|
|
3253
|
+
loopPresets: () => cs,
|
|
3254
|
+
notificationBounce: () => Ho,
|
|
3255
|
+
parallaxScroll: () => Wo,
|
|
3256
|
+
presetTaxonomy: () => ls,
|
|
3257
|
+
progressBar: () => Fo,
|
|
3258
|
+
pulse: () => bo,
|
|
3259
|
+
rainbowText: () => ko,
|
|
3260
|
+
rotateIn: () => wo,
|
|
3261
|
+
rotateScale: () => zo,
|
|
3262
|
+
shake: () => xo,
|
|
3263
|
+
skeletonLoading: () => Io,
|
|
3264
|
+
slideIn: () => To,
|
|
3265
|
+
slideInLeft: () => Go,
|
|
3266
|
+
slideInRight: () => qo,
|
|
3267
|
+
slideOutLeft: () => Ko,
|
|
3268
|
+
slideOutRight: () => Jo,
|
|
3269
|
+
spinner: () => Uo,
|
|
3270
|
+
springPop: () => ns,
|
|
3271
|
+
springScaleIn: () => es,
|
|
3272
|
+
springSlideIn: () => ts,
|
|
3273
|
+
springWobble: () => rs,
|
|
3274
|
+
textFocusBlur: () => Lo,
|
|
3275
|
+
typewriter: () => Oo,
|
|
3276
|
+
typingCursor: () => Bo,
|
|
3277
|
+
unfurl: () => Zo,
|
|
3278
|
+
warpLeft: () => Ao,
|
|
3279
|
+
warpRight: () => jo
|
|
3280
|
+
}), ds = (e, t, n, r = {}) => {
|
|
3281
3281
|
e.push({
|
|
3282
3282
|
code: t,
|
|
3283
3283
|
message: n,
|
|
3284
3284
|
...r
|
|
3285
3285
|
});
|
|
3286
|
-
},
|
|
3286
|
+
}, fs = (e) => {
|
|
3287
3287
|
if (typeof CSSKeyframesRule < "u" && e instanceof CSSKeyframesRule) return !0;
|
|
3288
3288
|
let t = e;
|
|
3289
3289
|
return t.type === 7 && typeof t.name == "string" && typeof t.cssText == "string";
|
|
3290
|
-
},
|
|
3290
|
+
}, ps = 32, ms = (e) => {
|
|
3291
3291
|
let t = (t) => typeof e?.getPropertyValue == "function" ? String(e.getPropertyValue(t) ?? "") : "", n = `${t("animation-name")} ${t("animation")}`;
|
|
3292
3292
|
return new Set(n.split(/[\s,]+/).filter((e) => e !== ""));
|
|
3293
|
-
},
|
|
3293
|
+
}, hs = (e) => e.cssRules !== void 0 && !fs(e), gs = (e, t, n, r = 0) => {
|
|
3294
3294
|
let i = [];
|
|
3295
3295
|
for (let t = 0; t < e.length; t++) {
|
|
3296
3296
|
let n = e[t];
|
|
3297
3297
|
n?.type === 1 && typeof n.cssText == "string" && i.push({
|
|
3298
3298
|
cssText: n.cssText,
|
|
3299
|
-
names:
|
|
3299
|
+
names: ms(n.style)
|
|
3300
3300
|
});
|
|
3301
3301
|
}
|
|
3302
3302
|
for (let r = 0; r < e.length; r++) {
|
|
3303
3303
|
let a = e[r];
|
|
3304
|
-
if (a == null || !
|
|
3304
|
+
if (a == null || !fs(a)) continue;
|
|
3305
3305
|
let o = a.name;
|
|
3306
3306
|
if (n.animationName != null && o !== n.animationName) continue;
|
|
3307
|
-
let s = i.find((e) => e.names.has(o))?.cssText, c = [], l =
|
|
3307
|
+
let s = i.find((e) => e.names.has(o))?.cssText, c = [], l = _s(a.cssText, s, n.options, c);
|
|
3308
3308
|
l != null && t.set(o, {
|
|
3309
3309
|
name: o,
|
|
3310
3310
|
animation: l,
|
|
3311
3311
|
diagnostics: c
|
|
3312
3312
|
});
|
|
3313
3313
|
}
|
|
3314
|
-
if (r <
|
|
3314
|
+
if (r < ps) for (let i = 0; i < e.length; i++) {
|
|
3315
3315
|
let a = e[i];
|
|
3316
|
-
a == null || !
|
|
3316
|
+
a == null || !hs(a) || gs(a.cssRules, t, n, r + 1);
|
|
3317
3317
|
}
|
|
3318
|
-
},
|
|
3318
|
+
}, _s = (e, t, n, r) => {
|
|
3319
3319
|
try {
|
|
3320
|
-
let i = new
|
|
3320
|
+
let i = new W(n ?? {}), a = t ? `${t}\n${e}` : e;
|
|
3321
3321
|
i.fromString(a);
|
|
3322
3322
|
for (let e of i.diagnostics) r.push(e);
|
|
3323
3323
|
return i;
|
|
3324
3324
|
} catch (t) {
|
|
3325
|
-
|
|
3325
|
+
ds(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 });
|
|
3326
3326
|
return;
|
|
3327
3327
|
}
|
|
3328
|
-
},
|
|
3328
|
+
}, vs = (e, t = {}) => {
|
|
3329
3329
|
let n = /* @__PURE__ */ new Map(), r = [], i;
|
|
3330
3330
|
if (e == null) {
|
|
3331
|
-
if (typeof document > "u") return
|
|
3331
|
+
if (typeof document > "u") return ds(r, "CORS_SKIP", "no document in scope — resolveLiveKeyframes() needs a Document, a ShadowRoot, a CSSStyleSheet[], or a CSSStyleSheet (SSR has no live CSSOM)"), {
|
|
3332
3332
|
animations: n,
|
|
3333
3333
|
diagnostics: r
|
|
3334
3334
|
};
|
|
@@ -3340,18 +3340,18 @@ var Ta = class extends ua {
|
|
|
3340
3340
|
i = e.cssRules;
|
|
3341
3341
|
} catch (t) {
|
|
3342
3342
|
let n = e.href ?? "(inline)";
|
|
3343
|
-
|
|
3343
|
+
ds(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 });
|
|
3344
3344
|
continue;
|
|
3345
3345
|
}
|
|
3346
|
-
i != null &&
|
|
3346
|
+
i != null && gs(i, n, t);
|
|
3347
3347
|
}
|
|
3348
3348
|
return {
|
|
3349
3349
|
animations: n,
|
|
3350
3350
|
diagnostics: r
|
|
3351
3351
|
};
|
|
3352
|
-
},
|
|
3352
|
+
}, ys = (e, t = {}) => vs(e, t), bs = (e, t = {}) => {
|
|
3353
3353
|
let n = /* @__PURE__ */ new Map(), r = [], i = e ?? (typeof document < "u" ? document : void 0);
|
|
3354
|
-
if (i == null || typeof i.getAnimations != "function") return
|
|
3354
|
+
if (i == null || typeof i.getAnimations != "function") return ds(r, "CORS_SKIP", "no getAnimations() in scope — fromLiveAnimations() needs a Document or Element with the Web Animations API (SSR has none)"), {
|
|
3355
3355
|
animations: n,
|
|
3356
3356
|
diagnostics: r
|
|
3357
3357
|
};
|
|
@@ -3362,7 +3362,7 @@ var Ta = class extends ua {
|
|
|
3362
3362
|
}
|
|
3363
3363
|
let o = (i instanceof Document ? i : i.ownerDocument ?? (typeof document < "u" ? document : void 0)) ?? void 0;
|
|
3364
3364
|
for (let e of a) {
|
|
3365
|
-
let i =
|
|
3365
|
+
let i = vs(o, {
|
|
3366
3366
|
...t,
|
|
3367
3367
|
animationName: e
|
|
3368
3368
|
});
|
|
@@ -3373,11 +3373,11 @@ var Ta = class extends ua {
|
|
|
3373
3373
|
animations: n,
|
|
3374
3374
|
diagnostics: r
|
|
3375
3375
|
};
|
|
3376
|
-
},
|
|
3376
|
+
}, xs = (e) => {
|
|
3377
3377
|
if (typeof e != "object" || !e) return !1;
|
|
3378
3378
|
let t = e;
|
|
3379
3379
|
return typeof t.value == "number" && typeof t.unit == "string";
|
|
3380
|
-
},
|
|
3380
|
+
}, Ss = async (e, t) => {
|
|
3381
3381
|
let n = [], { animationName: r, commit: i = !0 } = t;
|
|
3382
3382
|
if (typeof e.getAnimations != "function") return n.push({
|
|
3383
3383
|
code: "WAAPI_INELIGIBLE",
|
|
@@ -3398,7 +3398,7 @@ var Ta = class extends ua {
|
|
|
3398
3398
|
};
|
|
3399
3399
|
let o = a.currentTime, s = null, c = 0;
|
|
3400
3400
|
if (typeof o == "number" && Number.isFinite(o)) c = o;
|
|
3401
|
-
else if (
|
|
3401
|
+
else if (xs(o)) if (o.unit === "percent" && Number.isFinite(o.value)) s = o.value / 100;
|
|
3402
3402
|
else return n.push({
|
|
3403
3403
|
code: "ADOPT_REFUSE",
|
|
3404
3404
|
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)`
|
|
@@ -3407,7 +3407,7 @@ var Ta = class extends ua {
|
|
|
3407
3407
|
currentTime: 0,
|
|
3408
3408
|
diagnostics: n
|
|
3409
3409
|
};
|
|
3410
|
-
let l =
|
|
3410
|
+
let l = vs(e.ownerDocument ?? (typeof document < "u" ? document : void 0) ?? void 0, {
|
|
3411
3411
|
...t,
|
|
3412
3412
|
animationName: r
|
|
3413
3413
|
});
|
|
@@ -3429,18 +3429,18 @@ var Ta = class extends ua {
|
|
|
3429
3429
|
try {
|
|
3430
3430
|
a.cancel();
|
|
3431
3431
|
} catch {}
|
|
3432
|
-
return
|
|
3432
|
+
return Cs(d, f), {
|
|
3433
3433
|
animation: d,
|
|
3434
3434
|
currentTime: f,
|
|
3435
3435
|
diagnostics: n
|
|
3436
3436
|
};
|
|
3437
|
-
},
|
|
3437
|
+
}, Cs = (e, t) => {
|
|
3438
3438
|
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();
|
|
3439
|
-
},
|
|
3440
|
-
entry:
|
|
3441
|
-
cover:
|
|
3442
|
-
contain:
|
|
3443
|
-
exit:
|
|
3439
|
+
}, ws = {
|
|
3440
|
+
entry: M.entry,
|
|
3441
|
+
cover: M.cover,
|
|
3442
|
+
contain: M.contain,
|
|
3443
|
+
exit: M.exit,
|
|
3444
3444
|
normal: {
|
|
3445
3445
|
start: 0,
|
|
3446
3446
|
end: 1
|
|
@@ -3454,7 +3454,7 @@ var Ta = class extends ua {
|
|
|
3454
3454
|
end: 1
|
|
3455
3455
|
}
|
|
3456
3456
|
};
|
|
3457
|
-
function
|
|
3457
|
+
function Ts(e) {
|
|
3458
3458
|
if (e == null) return null;
|
|
3459
3459
|
let t = e.trim();
|
|
3460
3460
|
if (t.endsWith("%")) {
|
|
@@ -3463,24 +3463,24 @@ function Es(e) {
|
|
|
3463
3463
|
}
|
|
3464
3464
|
return null;
|
|
3465
3465
|
}
|
|
3466
|
-
function
|
|
3466
|
+
function Es(e, t) {
|
|
3467
3467
|
if (e == null) return t;
|
|
3468
|
-
let n =
|
|
3468
|
+
let n = Ts(e.offset);
|
|
3469
3469
|
if (n != null) {
|
|
3470
3470
|
if (e.phase != null && e.phase !== "normal") {
|
|
3471
|
-
let t =
|
|
3471
|
+
let t = ws[e.phase];
|
|
3472
3472
|
return t.start + n * (t.end - t.start);
|
|
3473
3473
|
}
|
|
3474
3474
|
return n;
|
|
3475
3475
|
}
|
|
3476
|
-
return e.phase == null ? t :
|
|
3476
|
+
return e.phase == null ? t : ws[e.phase].start;
|
|
3477
3477
|
}
|
|
3478
|
-
function
|
|
3478
|
+
function Ds(e) {
|
|
3479
3479
|
if (e == null) return {
|
|
3480
3480
|
start: 0,
|
|
3481
3481
|
end: 1
|
|
3482
3482
|
};
|
|
3483
|
-
let t =
|
|
3483
|
+
let t = Es(e.start, 0), n = Es(e.end, 1);
|
|
3484
3484
|
return n > t ? {
|
|
3485
3485
|
start: t,
|
|
3486
3486
|
end: n
|
|
@@ -3491,7 +3491,7 @@ function Os(e) {
|
|
|
3491
3491
|
}
|
|
3492
3492
|
//#endregion
|
|
3493
3493
|
//#region src/animation/scroll/scene.ts
|
|
3494
|
-
var
|
|
3494
|
+
var Os = class {
|
|
3495
3495
|
resolvedRange;
|
|
3496
3496
|
snapPoints;
|
|
3497
3497
|
snapSpring;
|
|
@@ -3502,23 +3502,23 @@ var ks = class {
|
|
|
3502
3502
|
wasInside = !1;
|
|
3503
3503
|
subscribers = new Map([["enter", /* @__PURE__ */ new Set()], ["leave", /* @__PURE__ */ new Set()]]);
|
|
3504
3504
|
constructor(e = {}) {
|
|
3505
|
-
if (this.resolvedRange =
|
|
3506
|
-
let t =
|
|
3507
|
-
this.smoother = new
|
|
3505
|
+
if (this.resolvedRange = Ds(e.range), this.scrubSeconds = e.scrub ?? 0, this.snapPoints = e.snap != null && e.snap.length > 0 ? e.snap : void 0, this.scrubSeconds > 0) {
|
|
3506
|
+
let t = n(1 / (this.scrubSeconds * 60 + 1), .01, 1);
|
|
3507
|
+
this.smoother = new o({
|
|
3508
3508
|
damping: t,
|
|
3509
3509
|
clamp: !0,
|
|
3510
3510
|
...e.smoothing
|
|
3511
3511
|
});
|
|
3512
3512
|
}
|
|
3513
|
-
this.snapPoints != null && (this.snapSpring = new
|
|
3513
|
+
this.snapPoints != null && (this.snapSpring = new u({ ...e.snapSpring }));
|
|
3514
3514
|
}
|
|
3515
3515
|
get range() {
|
|
3516
3516
|
return this.resolvedRange;
|
|
3517
3517
|
}
|
|
3518
3518
|
scrollProgress(e) {
|
|
3519
|
-
this.rawScroll =
|
|
3520
|
-
let { start: t, end:
|
|
3521
|
-
return
|
|
3519
|
+
this.rawScroll = n(e, 0, 1);
|
|
3520
|
+
let { start: t, end: r } = this.resolvedRange, i = r - t, a = i > 0 ? n((this.rawScroll - t) / i, 0, 1) : 0, o = this.rawScroll >= t && this.rawScroll <= r;
|
|
3521
|
+
return o && !this.wasInside && this.fire("enter", a), !o && this.wasInside && this.fire("leave", a), this.wasInside = o, this.smoother ? (this.smoother.setTarget(a), this.localProgress = this.smoother.current) : this.localProgress = a, this.localProgress;
|
|
3522
3522
|
}
|
|
3523
3523
|
tick(e) {
|
|
3524
3524
|
return this.smoother && (this.smoother.tickDt(e), this.localProgress = this.smoother.current), this.localProgress;
|
|
@@ -3531,15 +3531,15 @@ var ks = class {
|
|
|
3531
3531
|
}
|
|
3532
3532
|
snapTo(e = 0) {
|
|
3533
3533
|
if (this.snapPoints == null || this.snapSpring == null) return null;
|
|
3534
|
-
let t =
|
|
3534
|
+
let t = n(f({
|
|
3535
3535
|
initial: this.localProgress,
|
|
3536
3536
|
velocity: e
|
|
3537
|
-
}), 0, 1),
|
|
3537
|
+
}), 0, 1), r = this.snapPoints[0], i = Math.abs(t - r);
|
|
3538
3538
|
for (let e of this.snapPoints) {
|
|
3539
|
-
let
|
|
3540
|
-
|
|
3539
|
+
let n = Math.abs(t - e);
|
|
3540
|
+
n < i && (i = n, r = e);
|
|
3541
3541
|
}
|
|
3542
|
-
return this.snapSpring.reset(this.localProgress, e), this.snapSpring.target =
|
|
3542
|
+
return this.snapSpring.reset(this.localProgress, e), this.snapSpring.target = r, r;
|
|
3543
3543
|
}
|
|
3544
3544
|
tickSnap(e) {
|
|
3545
3545
|
return this.snapSpring && !this.snapSpring.settled && (this.snapSpring.tickDt(e), this.localProgress = this.snapSpring.value), this.localProgress;
|
|
@@ -3552,12 +3552,12 @@ var ks = class {
|
|
|
3552
3552
|
for (let n of this.subscribers.get(e)) n(t);
|
|
3553
3553
|
}
|
|
3554
3554
|
};
|
|
3555
|
-
function
|
|
3556
|
-
return new
|
|
3555
|
+
function ks(e = {}) {
|
|
3556
|
+
return new Os(e);
|
|
3557
3557
|
}
|
|
3558
3558
|
//#endregion
|
|
3559
3559
|
//#region src/animation/scroll/dispatch.ts
|
|
3560
|
-
function
|
|
3560
|
+
function As(e) {
|
|
3561
3561
|
let { animation: t, nativeSpec: n, scrub: r, snap: i, velocity: a } = e;
|
|
3562
3562
|
if (r) return {
|
|
3563
3563
|
backend: "js",
|
|
@@ -3575,17 +3575,17 @@ function js(e) {
|
|
|
3575
3575
|
backend: "js",
|
|
3576
3576
|
reason: "non-DOM target or no native timeline spec (the universal JS driver)"
|
|
3577
3577
|
};
|
|
3578
|
-
let o =
|
|
3578
|
+
let o = F(t);
|
|
3579
3579
|
if (!o.eligible) return {
|
|
3580
3580
|
backend: "js",
|
|
3581
3581
|
reason: o.reason
|
|
3582
3582
|
};
|
|
3583
|
-
let s =
|
|
3583
|
+
let s = m(n);
|
|
3584
3584
|
if (s == null) return {
|
|
3585
3585
|
backend: "js",
|
|
3586
3586
|
reason: "native scroll/view timeline unavailable (feature absent)"
|
|
3587
3587
|
};
|
|
3588
|
-
let c =
|
|
3588
|
+
let c = Sn(t, n, {
|
|
3589
3589
|
eligibility: o,
|
|
3590
3590
|
timeline: s
|
|
3591
3591
|
});
|
|
@@ -3597,13 +3597,13 @@ function js(e) {
|
|
|
3597
3597
|
reason: c.reason
|
|
3598
3598
|
};
|
|
3599
3599
|
}
|
|
3600
|
-
function
|
|
3600
|
+
function js(e) {
|
|
3601
3601
|
let t = ["position: sticky;"];
|
|
3602
3602
|
return e?.bottom == null ? t.push(`top: ${e?.top ?? 0}px;`) : t.push(`bottom: ${e.bottom}px;`), t.join(" ");
|
|
3603
3603
|
}
|
|
3604
3604
|
//#endregion
|
|
3605
3605
|
//#region src/animation/scroll/trigger.ts
|
|
3606
|
-
function
|
|
3606
|
+
function Ms() {
|
|
3607
3607
|
let e = globalThis.CSS;
|
|
3608
3608
|
if (e == null || typeof e.supports != "function") return !1;
|
|
3609
3609
|
try {
|
|
@@ -3612,7 +3612,7 @@ function Ns() {
|
|
|
3612
3612
|
return !1;
|
|
3613
3613
|
}
|
|
3614
3614
|
}
|
|
3615
|
-
var
|
|
3615
|
+
var Ns = class {
|
|
3616
3616
|
type;
|
|
3617
3617
|
triggerRange;
|
|
3618
3618
|
_state = "idle";
|
|
@@ -3622,7 +3622,7 @@ var Ps = class {
|
|
|
3622
3622
|
wasInside = !1;
|
|
3623
3623
|
everEntered = !1;
|
|
3624
3624
|
constructor(e = {}) {
|
|
3625
|
-
this.type = e.type ?? "once", this.triggerRange =
|
|
3625
|
+
this.type = e.type ?? "once", this.triggerRange = Ds(e.range);
|
|
3626
3626
|
}
|
|
3627
3627
|
get state() {
|
|
3628
3628
|
return this._state;
|
|
@@ -3640,25 +3640,25 @@ var Ps = class {
|
|
|
3640
3640
|
return this.triggerRange;
|
|
3641
3641
|
}
|
|
3642
3642
|
get usesNative() {
|
|
3643
|
-
return
|
|
3643
|
+
return Ms();
|
|
3644
3644
|
}
|
|
3645
3645
|
triggerProgress(e) {
|
|
3646
|
-
let t =
|
|
3646
|
+
let t = n(e, 0, 1), { start: r, end: i } = this.triggerRange, a = i - r, o = a > 0 ? n((t - r) / a, 0, 1) : 0, s = t >= r && t <= i, c = s && !this.wasInside, l = !s && this.wasInside, u = l && t > i;
|
|
3647
3647
|
switch (this.type) {
|
|
3648
3648
|
case "repeat":
|
|
3649
|
-
this.stepRepeat(
|
|
3649
|
+
this.stepRepeat(s, c, l, o);
|
|
3650
3650
|
break;
|
|
3651
3651
|
case "alternate":
|
|
3652
|
-
this.stepAlternate(
|
|
3652
|
+
this.stepAlternate(s, c, l, o);
|
|
3653
3653
|
break;
|
|
3654
3654
|
case "state":
|
|
3655
|
-
this.stepState(
|
|
3655
|
+
this.stepState(s, o);
|
|
3656
3656
|
break;
|
|
3657
3657
|
default:
|
|
3658
|
-
this.stepOnce(
|
|
3658
|
+
this.stepOnce(c, u, o);
|
|
3659
3659
|
break;
|
|
3660
3660
|
}
|
|
3661
|
-
return this.wasInside =
|
|
3661
|
+
return this.wasInside = s, this._state;
|
|
3662
3662
|
}
|
|
3663
3663
|
reset() {
|
|
3664
3664
|
this._state = "idle", this._direction = "forward", this._playhead = 0, this._cycles = 0, this.wasInside = !1, this.everEntered = !1;
|
|
@@ -3679,18 +3679,18 @@ var Ps = class {
|
|
|
3679
3679
|
return this._direction === "forward" ? e : 1 - e;
|
|
3680
3680
|
}
|
|
3681
3681
|
};
|
|
3682
|
-
function
|
|
3683
|
-
return new
|
|
3682
|
+
function Ps(e = {}) {
|
|
3683
|
+
return new Ns("trigger" in e && e.trigger != null ? e.trigger : e);
|
|
3684
3684
|
}
|
|
3685
3685
|
//#endregion
|
|
3686
3686
|
//#region src/animation/scroll/drive.ts
|
|
3687
|
-
function
|
|
3687
|
+
function Fs(e) {
|
|
3688
3688
|
return typeof e == "object" && !!e && "targets" in e && "play" in e;
|
|
3689
3689
|
}
|
|
3690
|
-
function
|
|
3690
|
+
function Is(e) {
|
|
3691
3691
|
return typeof Element < "u" && e instanceof Element;
|
|
3692
3692
|
}
|
|
3693
|
-
function
|
|
3693
|
+
function Ls(e, t, n) {
|
|
3694
3694
|
if (n.nativeSpec != null) return n.nativeSpec;
|
|
3695
3695
|
let r = e.timeline;
|
|
3696
3696
|
if (r?.kind === "scroll") return {
|
|
@@ -3699,7 +3699,7 @@ function Rs(e, t, n) {
|
|
|
3699
3699
|
...n.axis ?? r.axis ? { axis: n.axis ?? r.axis } : {}
|
|
3700
3700
|
};
|
|
3701
3701
|
if (r?.kind === "view") {
|
|
3702
|
-
let e = n.subject ?? (
|
|
3702
|
+
let e = n.subject ?? (Is(t) ? t : Fs(t) && Is(t.targets[0]) ? t.targets[0] : void 0);
|
|
3703
3703
|
return e == null ? void 0 : {
|
|
3704
3704
|
kind: "view",
|
|
3705
3705
|
subject: e,
|
|
@@ -3708,13 +3708,13 @@ function Rs(e, t, n) {
|
|
|
3708
3708
|
};
|
|
3709
3709
|
}
|
|
3710
3710
|
}
|
|
3711
|
-
function
|
|
3712
|
-
let r =
|
|
3711
|
+
function Rs(e, t, n = {}) {
|
|
3712
|
+
let r = Fs(t) ? t : n.animation, { nativeSpec: i, animation: a, velocity: o, source: s, subject: c, axis: l, inset: u, ...d } = n, f = ks({
|
|
3713
3713
|
...d,
|
|
3714
3714
|
range: e.range
|
|
3715
|
-
}), p = e.trigger == null ? void 0 :
|
|
3715
|
+
}), p = e.trigger == null ? void 0 : Ps(e), m = As({
|
|
3716
3716
|
animation: r,
|
|
3717
|
-
nativeSpec:
|
|
3717
|
+
nativeSpec: Ls(e, t, n),
|
|
3718
3718
|
scrub: n.scrub != null && n.scrub > 0,
|
|
3719
3719
|
snap: n.snap != null && n.snap.length > 0,
|
|
3720
3720
|
velocity: n.velocity
|
|
@@ -3728,35 +3728,35 @@ function zs(e, t, n = {}) {
|
|
|
3728
3728
|
}
|
|
3729
3729
|
//#endregion
|
|
3730
3730
|
//#region src/animation/scroll/grammar.ts
|
|
3731
|
-
var
|
|
3731
|
+
var zs = (e) => ([t]) => /* @__PURE__ */ TypeError(`Invalid CSS value ${JSON.stringify(e)}: ${t.code} at ${t.start}-${t.end}.`);
|
|
3732
|
+
function Bs(e) {
|
|
3733
|
+
return S(me(e), zs(e));
|
|
3734
|
+
}
|
|
3732
3735
|
function Vs(e) {
|
|
3733
|
-
return S(
|
|
3736
|
+
return S(oe(e), zs(e));
|
|
3734
3737
|
}
|
|
3735
3738
|
function Hs(e) {
|
|
3736
|
-
return S(
|
|
3739
|
+
return ue(ie(typeof e == "string" ? S(te(e), zs(e)) : e).at(-1)?.rule.declarations ?? []);
|
|
3737
3740
|
}
|
|
3738
3741
|
function Us(e) {
|
|
3739
|
-
return ue(ie(typeof e == "string" ? S(te(e), Bs(e)) : e).at(-1)?.rule.declarations ?? []);
|
|
3740
|
-
}
|
|
3741
|
-
function Ws(e) {
|
|
3742
3742
|
return re(e);
|
|
3743
3743
|
}
|
|
3744
|
-
function
|
|
3745
|
-
let t =
|
|
3744
|
+
function Ws(e) {
|
|
3745
|
+
let t = Hs(e);
|
|
3746
3746
|
return {
|
|
3747
3747
|
options: t,
|
|
3748
|
-
declarations:
|
|
3748
|
+
declarations: Us(t)
|
|
3749
3749
|
};
|
|
3750
3750
|
}
|
|
3751
3751
|
//#endregion
|
|
3752
3752
|
//#region src/animation/compile/emit/backward/walk.ts
|
|
3753
|
-
function
|
|
3753
|
+
function Gs(e) {
|
|
3754
3754
|
let t = [];
|
|
3755
3755
|
for (let n of Object.keys(e.animations)) {
|
|
3756
|
-
let r = e.animations[n], i = r.layer.op, a =
|
|
3756
|
+
let r = e.animations[n], i = r.layer.op, a = G(r.layer) && r.layer.weightSpring != null, o = G(r.layer) && r.layer.weightSpring == null, s = i === "add" || i === "accumulate" ? i : o ? "accumulate" : "replace";
|
|
3757
3757
|
t.push({
|
|
3758
3758
|
animation: r.animation,
|
|
3759
|
-
name:
|
|
3759
|
+
name: J(U(r.animation)),
|
|
3760
3760
|
composition: s,
|
|
3761
3761
|
weightBlend: a,
|
|
3762
3762
|
...o ? { staticWeight: r.layer.weight } : {},
|
|
@@ -3765,57 +3765,57 @@ function Ks(e) {
|
|
|
3765
3765
|
}
|
|
3766
3766
|
return t;
|
|
3767
3767
|
}
|
|
3768
|
-
function
|
|
3768
|
+
function Ks(e) {
|
|
3769
3769
|
return e.entries.map((e) => ({
|
|
3770
3770
|
animation: e.animation,
|
|
3771
|
-
name:
|
|
3771
|
+
name: J(U(e.animation)),
|
|
3772
3772
|
composition: "replace",
|
|
3773
3773
|
weightBlend: !1,
|
|
3774
3774
|
delay: e.at
|
|
3775
3775
|
}));
|
|
3776
3776
|
}
|
|
3777
|
-
function
|
|
3777
|
+
function qs(e) {
|
|
3778
3778
|
return e.map((e, t) => {
|
|
3779
3779
|
let n = "animation" in e ? e.animation : e;
|
|
3780
3780
|
return {
|
|
3781
3781
|
animation: n,
|
|
3782
|
-
name:
|
|
3782
|
+
name: J(U(n) || `anim-${t}`),
|
|
3783
3783
|
composition: "replace",
|
|
3784
3784
|
weightBlend: !1,
|
|
3785
3785
|
delay: 0
|
|
3786
3786
|
};
|
|
3787
3787
|
});
|
|
3788
3788
|
}
|
|
3789
|
-
function
|
|
3789
|
+
function J(e) {
|
|
3790
3790
|
let t = e.replace(/[^a-zA-Z0-9_-]/g, "-");
|
|
3791
3791
|
return /^[a-zA-Z_]/.test(t) ? t : `a${t}`;
|
|
3792
3792
|
}
|
|
3793
3793
|
//#endregion
|
|
3794
3794
|
//#region src/animation/compile/emit/easing-serialize.ts
|
|
3795
|
-
var
|
|
3796
|
-
function
|
|
3797
|
-
return
|
|
3795
|
+
var Js = /^(linear|ease|ease-in|ease-out|ease-in-out|step-start|step-end)$/;
|
|
3796
|
+
function Ys(e, t = 32) {
|
|
3797
|
+
return i(Array.from({ length: t + 1 }, (n, r) => e(r / t)));
|
|
3798
3798
|
}
|
|
3799
|
-
function
|
|
3799
|
+
function Y(e) {
|
|
3800
3800
|
if (e.css !== void 0) return e.css;
|
|
3801
3801
|
let n = fe.find(([t, n]) => n === e.fn)?.[0];
|
|
3802
3802
|
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");
|
|
3803
3803
|
let r = k(n);
|
|
3804
|
-
return
|
|
3804
|
+
return Js.test(r) ? r : Ys(e.fn);
|
|
3805
3805
|
}
|
|
3806
3806
|
//#endregion
|
|
3807
3807
|
//#region src/animation/compile/emit/format/options.ts
|
|
3808
|
-
function
|
|
3808
|
+
function Xs(e, t = "animation") {
|
|
3809
3809
|
let n = "";
|
|
3810
3810
|
n += ` animation-name: ${t};\n`;
|
|
3811
|
-
let r =
|
|
3812
|
-
n += ` animation-duration: ${r};\n`, n += ` animation-timing-function: ${
|
|
3813
|
-
let i = e.composite == null ? void 0 :
|
|
3811
|
+
let r = y(e.duration, e.durationUnit);
|
|
3812
|
+
n += ` animation-duration: ${r};\n`, n += ` animation-timing-function: ${Y(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: ${y(e.delay, e.delayUnit)};\n`);
|
|
3813
|
+
let i = e.composite == null ? void 0 : Qs(e.composite);
|
|
3814
3814
|
return i != null && (n += ` ${i}\n`), n = `.${t} {\n${n}}\n`, n;
|
|
3815
3815
|
}
|
|
3816
|
-
function
|
|
3817
|
-
let n =
|
|
3818
|
-
return
|
|
3816
|
+
function Zs(e, t) {
|
|
3817
|
+
let n = Y(e.timingFunction), r = S(ye(n), () => /* @__PURE__ */ TypeError(`Cannot serialize timing function ${JSON.stringify(n)}.`));
|
|
3818
|
+
return ee({
|
|
3819
3819
|
name: t,
|
|
3820
3820
|
duration: e.duration,
|
|
3821
3821
|
...e.durationUnit == null ? {} : { durationUnit: e.durationUnit },
|
|
@@ -3829,10 +3829,10 @@ function Qs(e, t) {
|
|
|
3829
3829
|
} : {}
|
|
3830
3830
|
});
|
|
3831
3831
|
}
|
|
3832
|
-
function
|
|
3832
|
+
function Qs(e) {
|
|
3833
3833
|
return e === "replace" ? void 0 : `animation-composition: ${e};`;
|
|
3834
3834
|
}
|
|
3835
|
-
function
|
|
3835
|
+
function $s(e) {
|
|
3836
3836
|
let t = e.propertyRegistry;
|
|
3837
3837
|
if (t == null || t.size === 0) return "";
|
|
3838
3838
|
let n = [];
|
|
@@ -3845,12 +3845,12 @@ function ec(e) {
|
|
|
3845
3845
|
}
|
|
3846
3846
|
//#endregion
|
|
3847
3847
|
//#region src/animation/compile/emit/format/format.ts
|
|
3848
|
-
function
|
|
3848
|
+
function ec(e, t, n) {
|
|
3849
3849
|
let r = e.parsedVars[t] ?? {}, i = e.templateFrames[t], a = Object.entries(r).map(([e, t]) => ({
|
|
3850
3850
|
prop: k(e),
|
|
3851
|
-
value:
|
|
3851
|
+
value: b(t),
|
|
3852
3852
|
declared: t
|
|
3853
|
-
})), o = i.timingFunction ?
|
|
3853
|
+
})), o = i.timingFunction ? Y(i.timingFunction) : n;
|
|
3854
3854
|
o !== n && a.push({
|
|
3855
3855
|
prop: "animation-timing-function",
|
|
3856
3856
|
value: o
|
|
@@ -3861,7 +3861,7 @@ function tc(e, t, n) {
|
|
|
3861
3861
|
value: s
|
|
3862
3862
|
}), a;
|
|
3863
3863
|
}
|
|
3864
|
-
var
|
|
3864
|
+
var tc = (e, t) => {
|
|
3865
3865
|
if (e.kind === "scalar") return e.payload.type === "number" ? {
|
|
3866
3866
|
kind: "scalar",
|
|
3867
3867
|
payload: {
|
|
@@ -3870,96 +3870,96 @@ var nc = (e, t) => {
|
|
|
3870
3870
|
}
|
|
3871
3871
|
} : void 0;
|
|
3872
3872
|
if (e.kind === "call") {
|
|
3873
|
-
let n = e.args.map((e) =>
|
|
3873
|
+
let n = e.args.map((e) => tc(e, t));
|
|
3874
3874
|
return n.some((e) => e === void 0) ? void 0 : {
|
|
3875
3875
|
kind: "call",
|
|
3876
3876
|
name: e.name,
|
|
3877
3877
|
args: n
|
|
3878
3878
|
};
|
|
3879
3879
|
}
|
|
3880
|
-
let n = e.items.map((e) =>
|
|
3880
|
+
let n = e.items.map((e) => tc(e, t));
|
|
3881
3881
|
if (!n.some((e) => e === void 0)) return {
|
|
3882
3882
|
kind: "list",
|
|
3883
3883
|
separator: e.separator,
|
|
3884
3884
|
items: n
|
|
3885
3885
|
};
|
|
3886
3886
|
};
|
|
3887
|
-
function
|
|
3888
|
-
return `{\n${
|
|
3887
|
+
function nc(e, t, n) {
|
|
3888
|
+
return `{\n${ec(e, t, n).map(({ prop: e, value: t }) => ` ${e}: ${t};`).join("\n")}\n}`;
|
|
3889
3889
|
}
|
|
3890
|
-
var
|
|
3891
|
-
let t =
|
|
3892
|
-
return e.templateFrames.map((n,
|
|
3890
|
+
var rc = async (e) => {
|
|
3891
|
+
let t = Y(e.options.timingFunction);
|
|
3892
|
+
return e.templateFrames.map((n, i) => `${r(n.start)}\n${nc(e, i, t)}\n`);
|
|
3893
3893
|
};
|
|
3894
|
-
function
|
|
3894
|
+
function ic(e) {
|
|
3895
3895
|
let t = e.indexOf("{"), n = t === -1 ? e : e.slice(t + 1), r = n.lastIndexOf("}");
|
|
3896
3896
|
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();
|
|
3897
3897
|
}
|
|
3898
|
-
function
|
|
3899
|
-
let
|
|
3898
|
+
function ac(e, t, n) {
|
|
3899
|
+
let i = Y(e.options.timingFunction), a = /* @__PURE__ */ new Map();
|
|
3900
3900
|
e.templateFrames.forEach((t, o) => {
|
|
3901
|
-
let s = n?.get(o) ??
|
|
3902
|
-
c ? c.push(l) :
|
|
3901
|
+
let s = n?.get(o) ?? nc(e, o, i), c = a.get(s), l = r(t.start);
|
|
3902
|
+
c ? c.push(l) : a.set(s, [l]);
|
|
3903
3903
|
});
|
|
3904
3904
|
let o = "";
|
|
3905
|
-
for (let [e, t] of
|
|
3905
|
+
for (let [e, t] of a) o += ` ${t.join(", ")} ${e.replace(/\n/g, "\n ")}\n`;
|
|
3906
3906
|
return `@keyframes ${t} {\n${o}}`;
|
|
3907
3907
|
}
|
|
3908
|
-
function
|
|
3909
|
-
let
|
|
3908
|
+
function oc(e, t, n) {
|
|
3909
|
+
let i = Y(e.options.timingFunction), a = /* @__PURE__ */ new Map();
|
|
3910
3910
|
for (let t = 0; t < e.templateFrames.length; t++) {
|
|
3911
3911
|
let o = e.templateFrames[t], s = e.parsedVars[t] ?? {}, c = {};
|
|
3912
3912
|
for (let [e, t] of Object.entries(s)) {
|
|
3913
|
-
let r =
|
|
3913
|
+
let r = tc(t, n);
|
|
3914
3914
|
if (r === void 0) return {
|
|
3915
3915
|
refused: !0,
|
|
3916
3916
|
key: e
|
|
3917
3917
|
};
|
|
3918
3918
|
c[e] = r;
|
|
3919
3919
|
}
|
|
3920
|
-
let l = Object.entries(c).map(([e, t]) => ` ${k(e)}: ${
|
|
3921
|
-
u !==
|
|
3920
|
+
let l = Object.entries(c).map(([e, t]) => ` ${k(e)}: ${b(t)};`), u = o.timingFunction ? Y(o.timingFunction) : i;
|
|
3921
|
+
u !== i && l.push(` animation-timing-function: ${u};`);
|
|
3922
3922
|
let d = o.composition;
|
|
3923
3923
|
d != null && d !== "replace" && l.push(` animation-composition: ${d};`);
|
|
3924
|
-
let f = `{\n${l.join("\n")}\n}`, p =
|
|
3925
|
-
p ? p.push(m) :
|
|
3924
|
+
let f = `{\n${l.join("\n")}\n}`, p = a.get(f), m = r(o.start);
|
|
3925
|
+
p ? p.push(m) : a.set(f, [m]);
|
|
3926
3926
|
}
|
|
3927
3927
|
let o = "";
|
|
3928
|
-
for (let [e, t] of
|
|
3928
|
+
for (let [e, t] of a) o += ` ${t.join(", ")} ${e.replace(/\n/g, "\n ")}\n`;
|
|
3929
3929
|
return { block: `@keyframes ${t} {\n${o}}` };
|
|
3930
3930
|
}
|
|
3931
|
-
async function
|
|
3932
|
-
let n = e.options,
|
|
3931
|
+
async function sc(e, t = "animation") {
|
|
3932
|
+
let n = e.options, i = /* @__PURE__ */ new Map(), a = Y(n.timingFunction);
|
|
3933
3933
|
e.templateFrames.forEach((t, n) => {
|
|
3934
|
-
let o =
|
|
3935
|
-
|
|
3934
|
+
let o = r(t.start), s = nc(e, n, a);
|
|
3935
|
+
i.has(s) ? i.get(s).push(o) : i.set(s, [o]);
|
|
3936
3936
|
});
|
|
3937
3937
|
let o = "";
|
|
3938
|
-
for (let [e, t] of
|
|
3939
|
-
let s =
|
|
3938
|
+
for (let [e, t] of i) o += ` ${t.join(", ")} ${e.replace(/\n/g, "\n ")}\n`;
|
|
3939
|
+
let s = Xs(n, t), c = $s(e);
|
|
3940
3940
|
return `${`${c ? `${c}\n\n` : ""}${s}\n@keyframes ${t} {\n${o}}`.replace(/\(\s*\{/g, "{").replace(/\}\s*\)/g, "}")}\n`;
|
|
3941
3941
|
}
|
|
3942
3942
|
//#endregion
|
|
3943
3943
|
//#region src/animation/compile/emit/densify.ts
|
|
3944
|
-
var
|
|
3944
|
+
var cc = (e) => {
|
|
3945
3945
|
if (e.kind === "percent") return e.value * 100;
|
|
3946
3946
|
throw TypeError(`Cannot densify named keyframe selector "${e.name}" without a bound timeline.`);
|
|
3947
3947
|
};
|
|
3948
|
-
function
|
|
3949
|
-
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)}: ${
|
|
3948
|
+
function lc(e, t, n, r) {
|
|
3949
|
+
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)}: ${b(t)};`), s = e.templateFrames[t], c = s.timingFunction ? Y(s.timingFunction) : n;
|
|
3950
3950
|
c !== n && o.push(`animation-timing-function: ${c};`);
|
|
3951
3951
|
let l = s.composition;
|
|
3952
3952
|
return l != null && l !== "replace" && o.push(`animation-composition: ${l};`), o;
|
|
3953
3953
|
}
|
|
3954
|
-
function
|
|
3955
|
-
let r =
|
|
3954
|
+
function uc(e, t, n) {
|
|
3955
|
+
let r = Y(e.options.timingFunction), i = new Set(n.keys), a = /* @__PURE__ */ new Map(), o = [], s = (e) => {
|
|
3956
3956
|
let t = a.get(e);
|
|
3957
3957
|
return t || (t = [], a.set(e, t), o.push(e)), t;
|
|
3958
3958
|
};
|
|
3959
3959
|
for (let [e, t] of n.byPct) s(e).push(...t);
|
|
3960
3960
|
e.templateFrames.forEach((t, n) => {
|
|
3961
|
-
let a =
|
|
3962
|
-
a.length > 0 && s(
|
|
3961
|
+
let a = lc(e, n, r, i);
|
|
3962
|
+
a.length > 0 && s(cc(t.start)).push(...a);
|
|
3963
3963
|
}), o.sort((e, t) => e - t);
|
|
3964
3964
|
let c = "";
|
|
3965
3965
|
for (let e of o) c += ` ${e}% {\n ${a.get(e).join("\n ")}\n }\n`;
|
|
@@ -3967,49 +3967,49 @@ function dc(e, t, n) {
|
|
|
3967
3967
|
}
|
|
3968
3968
|
//#endregion
|
|
3969
3969
|
//#region src/animation/compile/emit/backward/color.ts
|
|
3970
|
-
var
|
|
3970
|
+
var X = (e) => Math.round(e * 1e4) / 1e4, dc = (e) => {
|
|
3971
3971
|
if (typeof e != "object" || !e) return !1;
|
|
3972
3972
|
let t = e.kind;
|
|
3973
3973
|
return t === "scalar" || t === "call" || t === "list";
|
|
3974
|
-
},
|
|
3974
|
+
}, fc = (e) => {
|
|
3975
3975
|
if (e.kind === "scalar") return e.payload.type === "color" ? e.payload.value : void 0;
|
|
3976
3976
|
let t = e.kind === "call" ? e.args : e.items;
|
|
3977
3977
|
for (let e of t) {
|
|
3978
|
-
let t =
|
|
3978
|
+
let t = fc(e);
|
|
3979
3979
|
if (t !== void 0) return t;
|
|
3980
3980
|
}
|
|
3981
|
-
},
|
|
3981
|
+
}, pc = (e) => dc(e) && fc(e) !== void 0, mc = (e) => {
|
|
3982
3982
|
let t = Ee(e, "oklab");
|
|
3983
3983
|
if (!t.ok) throw TypeError(`Value 4 color conversion failed: ${t.error.code}.`);
|
|
3984
3984
|
return t.value;
|
|
3985
|
-
},
|
|
3986
|
-
let [t, n, r] =
|
|
3985
|
+
}, Z = (e) => {
|
|
3986
|
+
let [t, n, r] = mc(e).channels;
|
|
3987
3987
|
if (typeof t != "number" || typeof n != "number" || typeof r != "number") throw TypeError("OKLab densification requires numeric channels.");
|
|
3988
3988
|
return [
|
|
3989
3989
|
t,
|
|
3990
3990
|
n,
|
|
3991
3991
|
r
|
|
3992
3992
|
];
|
|
3993
|
-
},
|
|
3994
|
-
let t =
|
|
3995
|
-
return `oklab(${
|
|
3996
|
-
},
|
|
3997
|
-
let [n, r, i] =
|
|
3993
|
+
}, Q = (e) => {
|
|
3994
|
+
let t = mc(e), [n, r, i] = Z(t), a = t.alpha === 1 ? "" : ` / ${t.alpha}`;
|
|
3995
|
+
return `oklab(${X(n)} ${X(r)} ${X(i)}${a})`;
|
|
3996
|
+
}, hc = (e, t) => {
|
|
3997
|
+
let [n, r, i] = Z(e), [a, o, s] = Z(t);
|
|
3998
3998
|
return Math.hypot(a - n, o - r, s - i);
|
|
3999
|
-
},
|
|
3999
|
+
}, gc = (e, t, n) => {
|
|
4000
4000
|
let r = Oe(e, t, n);
|
|
4001
4001
|
if (!r.ok) throw TypeError(`Value 4 OKLab construction failed: ${r.error.code}.`);
|
|
4002
4002
|
return r.value;
|
|
4003
|
-
},
|
|
4004
|
-
let [n, r, i] =
|
|
4005
|
-
return
|
|
4006
|
-
},
|
|
4003
|
+
}, _c = (e, t) => {
|
|
4004
|
+
let [n, r, i] = Z(e), [a, o, s] = Z(t);
|
|
4005
|
+
return gc((n + a) / 2, (r + o) / 2, (i + s) / 2);
|
|
4006
|
+
}, vc = (e) => {
|
|
4007
4007
|
if (e.kind === "percent") return e.value * 100;
|
|
4008
4008
|
throw TypeError(`Cannot densify named keyframe selector "${e.name}" without a bound timeline.`);
|
|
4009
|
-
},
|
|
4009
|
+
}, $ = (e, t, n) => {
|
|
4010
4010
|
let r = (e.parsedVars[t] ?? {})[n];
|
|
4011
|
-
return r === void 0 ? void 0 :
|
|
4012
|
-
},
|
|
4011
|
+
return r === void 0 ? void 0 : fc(r);
|
|
4012
|
+
}, yc = (e, t, n, r, i) => {
|
|
4013
4013
|
let a = [];
|
|
4014
4014
|
for (let o = 0; o < n; o++) {
|
|
4015
4015
|
let s = De(e, t, n === 1 ? 0 : o / (n - 1), {
|
|
@@ -4021,39 +4021,39 @@ var Y = (e) => Math.round(e * 1e4) / 1e4, fc = (e) => {
|
|
|
4021
4021
|
}
|
|
4022
4022
|
return a;
|
|
4023
4023
|
};
|
|
4024
|
-
function
|
|
4024
|
+
function bc(e, t, n, r, i) {
|
|
4025
4025
|
let a = t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), o = [], s = 0;
|
|
4026
4026
|
for (let a = 0; a + 1 < e.templateFrames.length; a++) {
|
|
4027
|
-
let c =
|
|
4027
|
+
let c = $(e, a, t), l = $(e, a + 1, t);
|
|
4028
4028
|
if (!c || !l) continue;
|
|
4029
|
-
let u =
|
|
4030
|
-
if (
|
|
4029
|
+
let u = vc(e.templateFrames[a].start), d = vc(e.templateFrames[a + 1].start);
|
|
4030
|
+
if (Q(c) === Q(l)) {
|
|
4031
4031
|
o.push({
|
|
4032
4032
|
pct: u,
|
|
4033
|
-
css:
|
|
4033
|
+
css: Q(c)
|
|
4034
4034
|
});
|
|
4035
4035
|
continue;
|
|
4036
4036
|
}
|
|
4037
|
-
let f = c, p = l, m =
|
|
4037
|
+
let f = c, p = l, m = yc(f, p, n, r, i.hueMethod);
|
|
4038
4038
|
for (let e = 0; e < m.length; e++) {
|
|
4039
4039
|
let t = e / (m.length - 1), n = u + (d - u) * t;
|
|
4040
4040
|
o.push({
|
|
4041
|
-
pct:
|
|
4042
|
-
css:
|
|
4041
|
+
pct: X(n),
|
|
4042
|
+
css: Q(m[e])
|
|
4043
4043
|
});
|
|
4044
4044
|
}
|
|
4045
|
-
let h =
|
|
4045
|
+
let h = yc(f, p, 1024, r, i.hueMethod);
|
|
4046
4046
|
for (let e = 0; e + 1 < m.length; e++) {
|
|
4047
|
-
let t = (e + .5) / (m.length - 1), n = h[Math.round(t * 1023)], r =
|
|
4048
|
-
s = Math.max(s,
|
|
4047
|
+
let t = (e + .5) / (m.length - 1), n = h[Math.round(t * 1023)], r = _c(m[e], m[e + 1]);
|
|
4048
|
+
s = Math.max(s, hc(r, n));
|
|
4049
4049
|
}
|
|
4050
4050
|
}
|
|
4051
|
-
let c = e.templateFrames.length - 1, l =
|
|
4051
|
+
let c = e.templateFrames.length - 1, l = $(e, c, t);
|
|
4052
4052
|
if (l) {
|
|
4053
|
-
let t =
|
|
4053
|
+
let t = vc(e.templateFrames[c].start);
|
|
4054
4054
|
o[o.length - 1]?.pct !== t && o.push({
|
|
4055
4055
|
pct: t,
|
|
4056
|
-
css:
|
|
4056
|
+
css: Q(l)
|
|
4057
4057
|
});
|
|
4058
4058
|
}
|
|
4059
4059
|
return {
|
|
@@ -4062,20 +4062,20 @@ function xc(e, t, n, r, i) {
|
|
|
4062
4062
|
worstDelta: s
|
|
4063
4063
|
};
|
|
4064
4064
|
}
|
|
4065
|
-
function
|
|
4065
|
+
function xc(e, t, n) {
|
|
4066
4066
|
let r = [], i = /* @__PURE__ */ new Set();
|
|
4067
4067
|
for (let t = 0; t + 1 < e.templateFrames.length; t++) {
|
|
4068
4068
|
let n = e.parsedVars[t] ?? {};
|
|
4069
4069
|
for (let [a, o] of Object.entries(n)) {
|
|
4070
|
-
if (i.has(a) || !
|
|
4071
|
-
let n =
|
|
4072
|
-
n && s &&
|
|
4070
|
+
if (i.has(a) || !pc(o)) continue;
|
|
4071
|
+
let n = $(e, t, a), s = $(e, t + 1, a);
|
|
4072
|
+
n && s && Q(n) !== Q(s) && (r.push(a), i.add(a));
|
|
4073
4073
|
}
|
|
4074
4074
|
}
|
|
4075
4075
|
if (r.length === 0) return null;
|
|
4076
4076
|
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();
|
|
4077
4077
|
for (let t of r) {
|
|
4078
|
-
let n =
|
|
4078
|
+
let n = bc(e, t, a, o, s);
|
|
4079
4079
|
c = Math.max(c, n.worstDelta);
|
|
4080
4080
|
for (let { pct: e, css: t } of n.stops) {
|
|
4081
4081
|
let r = l.get(e);
|
|
@@ -4092,7 +4092,7 @@ function Sc(e, t, n) {
|
|
|
4092
4092
|
}
|
|
4093
4093
|
//#endregion
|
|
4094
4094
|
//#region src/animation/compile/emit/refusal-probes.ts
|
|
4095
|
-
function
|
|
4095
|
+
function Sc(e) {
|
|
4096
4096
|
let { animation: t, name: n } = e;
|
|
4097
4097
|
if (e.weightBlend) return {
|
|
4098
4098
|
name: n,
|
|
@@ -4113,18 +4113,18 @@ function Cc(e) {
|
|
|
4113
4113
|
};
|
|
4114
4114
|
}
|
|
4115
4115
|
}
|
|
4116
|
-
function
|
|
4117
|
-
let { animation: i, name: a } = e, o =
|
|
4116
|
+
function Cc(e, n, r) {
|
|
4117
|
+
let { animation: i, name: a } = e, o = Sc(e);
|
|
4118
4118
|
if (o) return r.push(o), null;
|
|
4119
|
-
let s =
|
|
4119
|
+
let s = xc(i, n.densifyStops ?? 16, n.deltaEEpsilon ?? .04);
|
|
4120
4120
|
if (s && "refused" in s) return r.push({
|
|
4121
4121
|
name: a,
|
|
4122
4122
|
reason: "perceptual-oklab",
|
|
4123
|
-
message: `perceptual oklab color track exceeds the densify ΔE-ε threshold (ΔE ${
|
|
4123
|
+
message: `perceptual oklab color track exceeds the densify ΔE-ε threshold (ΔE ${X(s.delta)} > ${n.deltaEEpsilon ?? .04}) — a faithful pure-CSS twin is not available; the JS playback is the only faithful path`
|
|
4124
4124
|
}), null;
|
|
4125
4125
|
let c;
|
|
4126
4126
|
if (e.staticWeight != null) {
|
|
4127
|
-
let t =
|
|
4127
|
+
let t = oc(i, a, e.staticWeight);
|
|
4128
4128
|
if ("refused" in t) return r.push({
|
|
4129
4129
|
name: a,
|
|
4130
4130
|
reason: "weight-blend",
|
|
@@ -4134,7 +4134,7 @@ function wc(e, n, r) {
|
|
|
4134
4134
|
}
|
|
4135
4135
|
let l, u;
|
|
4136
4136
|
try {
|
|
4137
|
-
l = c ?? (s && "byPct" in s ?
|
|
4137
|
+
l = c ?? (s && "byPct" in s ? uc(i, a, s) : ac(i, a)), u = Zs(i.options, a);
|
|
4138
4138
|
} catch (e) {
|
|
4139
4139
|
if (!(e instanceof t) || e.option !== "timingFunction") throw e;
|
|
4140
4140
|
return r.push({
|
|
@@ -4143,18 +4143,18 @@ function wc(e, n, r) {
|
|
|
4143
4143
|
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"
|
|
4144
4144
|
}), null;
|
|
4145
4145
|
}
|
|
4146
|
-
let d =
|
|
4146
|
+
let d = Qs(e.composition), f = d ? `\n ${d}` : "", p = e.delay > 0 ? `\n animation-delay: ${y(e.delay)};` : "", m = wc(i), h = `${n.selectorFor ? n.selectorFor(a) : `.${a}`} {\n animation: ${u};${f}${p}${m}\n}`;
|
|
4147
4147
|
return `${l}\n\n${h}`;
|
|
4148
4148
|
}
|
|
4149
|
-
function
|
|
4149
|
+
function wc(e) {
|
|
4150
4150
|
let t = e.scrollOptions;
|
|
4151
4151
|
if (t == null) return "";
|
|
4152
|
-
let n =
|
|
4152
|
+
let n = Us(t), r = "";
|
|
4153
4153
|
for (let [e, t] of Object.entries(n)) t != null && (r += `\n ${e}: ${t};`);
|
|
4154
4154
|
return r;
|
|
4155
4155
|
}
|
|
4156
|
-
async function
|
|
4157
|
-
let n = e instanceof
|
|
4156
|
+
async function Tc(e, t = {}) {
|
|
4157
|
+
let n = e instanceof ca ? Gs(e) : e instanceof h ? Ks(e) : qs(e), r = /* @__PURE__ */ new Map();
|
|
4158
4158
|
for (let e of n) {
|
|
4159
4159
|
let t = r.get(e.name) ?? 0;
|
|
4160
4160
|
r.set(e.name, t + 1), t > 0 && (e.name = `${e.name}-${t + 1}`);
|
|
@@ -4165,7 +4165,7 @@ async function Ec(e, t = {}) {
|
|
|
4165
4165
|
});
|
|
4166
4166
|
let i = [], a = [];
|
|
4167
4167
|
for (let e of n) {
|
|
4168
|
-
let n =
|
|
4168
|
+
let n = Cc(e, t, i);
|
|
4169
4169
|
n && a.push(n);
|
|
4170
4170
|
}
|
|
4171
4171
|
let o = i.length === 0;
|
|
@@ -4181,14 +4181,14 @@ async function Ec(e, t = {}) {
|
|
|
4181
4181
|
}
|
|
4182
4182
|
//#endregion
|
|
4183
4183
|
//#region src/animation/compile/emit/view-transition.ts
|
|
4184
|
-
var
|
|
4184
|
+
var Ec = new Set([
|
|
4185
4185
|
"transform",
|
|
4186
4186
|
"opacity",
|
|
4187
4187
|
"filter",
|
|
4188
4188
|
"backdrop-filter",
|
|
4189
4189
|
"mix-blend-mode",
|
|
4190
4190
|
"clip-path"
|
|
4191
|
-
]),
|
|
4191
|
+
]), Dc = new Set([
|
|
4192
4192
|
"cqw",
|
|
4193
4193
|
"cqh",
|
|
4194
4194
|
"cqi",
|
|
@@ -4196,31 +4196,31 @@ var Dc = new Set([
|
|
|
4196
4196
|
"cqmin",
|
|
4197
4197
|
"cqmax"
|
|
4198
4198
|
]);
|
|
4199
|
-
function
|
|
4200
|
-
let t =
|
|
4201
|
-
for (let r = 0; r < e.templateFrames.length; r++) n.push(...
|
|
4199
|
+
function Oc(e) {
|
|
4200
|
+
let t = Y(e.options.timingFunction), n = [];
|
|
4201
|
+
for (let r = 0; r < e.templateFrames.length; r++) n.push(...ec(e, r, t));
|
|
4202
4202
|
return n;
|
|
4203
4203
|
}
|
|
4204
|
-
var
|
|
4204
|
+
var kc = (e) => {
|
|
4205
4205
|
if (e == null) return null;
|
|
4206
4206
|
if (e.kind === "call") {
|
|
4207
4207
|
if (e.name.toLowerCase() === "var") return "var";
|
|
4208
4208
|
for (let t of e.args) {
|
|
4209
|
-
let e =
|
|
4209
|
+
let e = kc(t);
|
|
4210
4210
|
if (e != null) return e;
|
|
4211
4211
|
}
|
|
4212
4212
|
return null;
|
|
4213
4213
|
}
|
|
4214
4214
|
if (e.kind === "list") {
|
|
4215
4215
|
for (let t of e.items) {
|
|
4216
|
-
let e =
|
|
4216
|
+
let e = kc(t);
|
|
4217
4217
|
if (e != null) return e;
|
|
4218
4218
|
}
|
|
4219
4219
|
return null;
|
|
4220
4220
|
}
|
|
4221
|
-
return e.payload.type === "number" &&
|
|
4222
|
-
},
|
|
4223
|
-
function
|
|
4221
|
+
return e.payload.type === "number" && Dc.has(e.payload.unit.toLowerCase()) ? "cq" : null;
|
|
4222
|
+
}, Ac = (e) => e.split(".")[0].replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
4223
|
+
function jc(e, t, n, r, i, a) {
|
|
4224
4224
|
let o = [], s = `${t}-${e}`;
|
|
4225
4225
|
if (r.scrollOptions != null) return o.push({
|
|
4226
4226
|
name: s,
|
|
@@ -4230,8 +4230,8 @@ function Mc(e, t, n, r, i, a) {
|
|
|
4230
4230
|
chunk: null,
|
|
4231
4231
|
refusals: o
|
|
4232
4232
|
};
|
|
4233
|
-
for (let { prop: t, declared: n } of
|
|
4234
|
-
let r =
|
|
4233
|
+
for (let { prop: t, declared: n } of Oc(r)) {
|
|
4234
|
+
let r = kc(n);
|
|
4235
4235
|
if (r != null) return o.push({
|
|
4236
4236
|
name: s,
|
|
4237
4237
|
reason: "vt-element-scoped-computed",
|
|
@@ -4240,7 +4240,7 @@ function Mc(e, t, n, r, i, a) {
|
|
|
4240
4240
|
chunk: null,
|
|
4241
4241
|
refusals: o
|
|
4242
4242
|
};
|
|
4243
|
-
if (!
|
|
4243
|
+
if (!Ec.has(Ac(t))) return o.push({
|
|
4244
4244
|
name: s,
|
|
4245
4245
|
reason: "vt-snapshot-inapplicable",
|
|
4246
4246
|
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`
|
|
@@ -4255,7 +4255,7 @@ function Mc(e, t, n, r, i, a) {
|
|
|
4255
4255
|
composition: "replace",
|
|
4256
4256
|
weightBlend: !1,
|
|
4257
4257
|
delay: 0
|
|
4258
|
-
}, u = [], d =
|
|
4258
|
+
}, u = [], d = Cc(l, {
|
|
4259
4259
|
...a.densifyStops == null ? {} : { densifyStops: a.densifyStops },
|
|
4260
4260
|
...a.deltaEEpsilon == null ? {} : { deltaEEpsilon: a.deltaEEpsilon },
|
|
4261
4261
|
selectorFor: () => c
|
|
@@ -4266,27 +4266,27 @@ function Mc(e, t, n, r, i, a) {
|
|
|
4266
4266
|
refusals: o
|
|
4267
4267
|
};
|
|
4268
4268
|
}
|
|
4269
|
-
function
|
|
4269
|
+
function Mc(e) {
|
|
4270
4270
|
let t = e.group;
|
|
4271
4271
|
if (t != null) return "options" in t && "templateFrames" in t ? {
|
|
4272
4272
|
duration: t.options.duration,
|
|
4273
4273
|
durationUnit: t.options.durationUnit,
|
|
4274
|
-
easing:
|
|
4274
|
+
easing: Y(t.options.timingFunction)
|
|
4275
4275
|
} : {
|
|
4276
4276
|
duration: t.duration,
|
|
4277
|
-
easing:
|
|
4277
|
+
easing: Y(t.timingFunction)
|
|
4278
4278
|
};
|
|
4279
4279
|
let n = e.new ?? e.old;
|
|
4280
4280
|
return n == null ? null : {
|
|
4281
4281
|
duration: n.options.duration,
|
|
4282
4282
|
durationUnit: n.options.durationUnit,
|
|
4283
|
-
easing:
|
|
4283
|
+
easing: Y(n.options.timingFunction)
|
|
4284
4284
|
};
|
|
4285
4285
|
}
|
|
4286
|
-
async function
|
|
4286
|
+
async function Nc(e, t = {}) {
|
|
4287
4287
|
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();
|
|
4288
4288
|
for (let t of Object.keys(e)) {
|
|
4289
|
-
let e =
|
|
4289
|
+
let e = J(t), n = c.get(e);
|
|
4290
4290
|
n ? n.push(t) : c.set(e, [t]);
|
|
4291
4291
|
}
|
|
4292
4292
|
let l = /* @__PURE__ */ new Set();
|
|
@@ -4297,18 +4297,18 @@ async function Pc(e, t = {}) {
|
|
|
4297
4297
|
});
|
|
4298
4298
|
for (let [a, c] of Object.entries(e)) {
|
|
4299
4299
|
if (l.has(a)) continue;
|
|
4300
|
-
let e =
|
|
4300
|
+
let e = J(a), u = c.class ? `.${J(c.class)}` : e;
|
|
4301
4301
|
i.push(e);
|
|
4302
4302
|
for (let i of ["old", "new"]) {
|
|
4303
4303
|
let a = c[i];
|
|
4304
4304
|
if (a == null) continue;
|
|
4305
|
-
let { chunk: s, refusals: l } =
|
|
4305
|
+
let { chunk: s, refusals: l } = jc(i, e, u, a, o, t);
|
|
4306
4306
|
for (let e of l) n.push(e);
|
|
4307
4307
|
s && r.push(s);
|
|
4308
4308
|
}
|
|
4309
4309
|
if (s && (c.old != null || c.new != null || c.group != null)) {
|
|
4310
|
-
let e =
|
|
4311
|
-
e != null && r.push(`${o}::view-transition-group(${u}) {\n animation-duration: ${
|
|
4310
|
+
let e = Mc(c);
|
|
4311
|
+
e != null && r.push(`${o}::view-transition-group(${u}) {\n animation-duration: ${y(e.duration, e.durationUnit)};\n animation-timing-function: ${e.easing};\n}`);
|
|
4312
4312
|
}
|
|
4313
4313
|
}
|
|
4314
4314
|
t.crossDocument && r.unshift("@view-transition {\n navigation: auto;\n}"), (t.reducedMotion ?? !0) && r.push("@media (prefers-reduced-motion: reduce) {\n ::view-transition-group(*),\n ::view-transition-old(*),\n ::view-transition-new(*) {\n animation: none !important;\n }\n}");
|
|
@@ -4327,7 +4327,7 @@ async function Pc(e, t = {}) {
|
|
|
4327
4327
|
}
|
|
4328
4328
|
//#endregion
|
|
4329
4329
|
//#region src/animation/compile/emit/entry.ts
|
|
4330
|
-
var
|
|
4330
|
+
var Pc = (e) => e.kind === "scalar" ? e.payload.type === "color" : (e.kind === "call" ? e.args : e.items).some(Pc), Fc = (e) => {
|
|
4331
4331
|
if (e.kind === "scalar") {
|
|
4332
4332
|
if (e.payload.type !== "color") return e;
|
|
4333
4333
|
let t = Ee(e.payload.value, "oklab");
|
|
@@ -4343,20 +4343,20 @@ var Fc = (e) => e.kind === "scalar" ? e.payload.type === "color" : (e.kind === "
|
|
|
4343
4343
|
return e.kind === "call" ? {
|
|
4344
4344
|
kind: "call",
|
|
4345
4345
|
name: e.name,
|
|
4346
|
-
args: e.args.map(
|
|
4346
|
+
args: e.args.map(Fc)
|
|
4347
4347
|
} : {
|
|
4348
4348
|
kind: "list",
|
|
4349
4349
|
separator: e.separator,
|
|
4350
|
-
items: e.items.map(
|
|
4350
|
+
items: e.items.map(Fc)
|
|
4351
4351
|
};
|
|
4352
4352
|
};
|
|
4353
|
-
function
|
|
4353
|
+
function Ic(e, t) {
|
|
4354
4354
|
let n = e.parsedVars[t] ?? {}, r = [];
|
|
4355
4355
|
for (let [e, t] of Object.entries(n)) {
|
|
4356
4356
|
let n = k(e);
|
|
4357
4357
|
r.push({
|
|
4358
4358
|
prop: n,
|
|
4359
|
-
value:
|
|
4359
|
+
value: b(Fc(t))
|
|
4360
4360
|
});
|
|
4361
4361
|
}
|
|
4362
4362
|
return r;
|
|
@@ -4368,7 +4368,7 @@ function Lc(e) {
|
|
|
4368
4368
|
function Rc(e) {
|
|
4369
4369
|
for (let t = 0; t < e.templateFrames.length; t++) {
|
|
4370
4370
|
let n = e.parsedVars[t] ?? {};
|
|
4371
|
-
for (let e of Object.values(n)) if (
|
|
4371
|
+
for (let e of Object.values(n)) if (Pc(e)) return !0;
|
|
4372
4372
|
}
|
|
4373
4373
|
return !1;
|
|
4374
4374
|
}
|
|
@@ -4411,7 +4411,7 @@ function Bc(e) {
|
|
|
4411
4411
|
detail: "a custom transform closure cannot be a CSS transition endpoint"
|
|
4412
4412
|
};
|
|
4413
4413
|
try {
|
|
4414
|
-
|
|
4414
|
+
Y(t.timingFunction);
|
|
4415
4415
|
} catch {
|
|
4416
4416
|
return {
|
|
4417
4417
|
reason: "entry-easing-twin",
|
|
@@ -4459,12 +4459,12 @@ async function Gc(e, t = {}) {
|
|
|
4459
4459
|
}
|
|
4460
4460
|
}
|
|
4461
4461
|
if (l) continue;
|
|
4462
|
-
let [u, d] = Lc(e), f =
|
|
4462
|
+
let [u, d] = Lc(e), f = Ic(e, u), p = Ic(e, d), m = Hc(f, p), h = y(e.options.duration, e.options.durationUnit), g = Y(e.options.timingFunction), _, v, b, ee;
|
|
4463
4463
|
if (s.exit) {
|
|
4464
4464
|
let [, e] = Lc(s.exit), t = Lc(s.exit)[0];
|
|
4465
|
-
|
|
4466
|
-
} else
|
|
4467
|
-
let x = `${t}${n}`, te = `${t} {\n${Wc(
|
|
4465
|
+
_ = Ic(s.exit, e), v = Hc(Ic(s.exit, t), _), b = y(s.exit.options.duration, s.exit.options.durationUnit), ee = Y(s.exit.options.timingFunction);
|
|
4466
|
+
} else _ = f, v = m, b = h, ee = g;
|
|
4467
|
+
let x = `${t}${n}`, te = `${t} {\n${Wc(_, [" display: none;", ` transition: ${Uc(v, b, ee, i)};`])}\n}`, ne = `${x} {\n${Wc(p, [` display: ${r};`, ` transition: ${Uc(m, h, g, i)};`])}\n}`, re = `@starting-style {\n ${x} {\n${Wc(f, []).split("\n").map((e) => ` ${e}`).join("\n")}\n }\n}`;
|
|
4468
4468
|
o.push(`${te}\n\n${ne}\n\n${re}`);
|
|
4469
4469
|
}
|
|
4470
4470
|
let s = a.length === 0;
|
|
@@ -4480,9 +4480,9 @@ async function Gc(e, t = {}) {
|
|
|
4480
4480
|
}
|
|
4481
4481
|
//#endregion
|
|
4482
4482
|
//#region src/animation/validate.ts
|
|
4483
|
-
var Kc = (e) => new
|
|
4483
|
+
var Kc = (e) => new W().fromString(e);
|
|
4484
4484
|
async function qc(e, t = {}) {
|
|
4485
|
-
let n = Kc(e), r = [...n.diagnostics], i = r.some((e) => e.code === "EMPTY_PARSE"), a = e.trim().length > 0 && !i, o = await
|
|
4485
|
+
let n = Kc(e), r = [...n.diagnostics], i = r.some((e) => e.code === "EMPTY_PARSE"), a = e.trim().length > 0 && !i, o = await Tc([n], t.compile ?? {}), s = F(n);
|
|
4486
4486
|
return {
|
|
4487
4487
|
parseable: a,
|
|
4488
4488
|
eligible: o.eligible,
|
|
@@ -4503,4 +4503,4 @@ async function Yc(e, t = {}) {
|
|
|
4503
4503
|
return a.join("\n");
|
|
4504
4504
|
}
|
|
4505
4505
|
//#endregion
|
|
4506
|
-
export {
|
|
4506
|
+
export { ca as AnimationGroup, W as CSSKeyframesAnimation, sc as CSSKeyframesToString, rc as CSSKeyframesToStrings, Pe as DIRECTIONS, ha as DrawSVG, Fe as FILL_MODES, ti as KeyframesAnimation, wa as MorphSVG, fa as MotionPath, Os as ScrollScene, Ns as TriggerScene, Ss as adoptRunning, He as bumpLayoutEpoch, Tc as compileToCSS, Gc as compileToEntry, Nc as compileToViewTransition, ks as createScrollScene, Ps as createTriggerScene, J as cssIdent, Re as defaultLayerConfig, E as defaultOptions, As as dispatchScrollBackend, Rs as driveScrollCSS, Yc as explain, ic as formatCSSKeyframeString, ma as fromDrawSVG, bs as fromLiveAnimations, Ca as fromMorphSVG, da as fromMotionPath, ys as fromStyleSheets, U as getAnimationId, Hs as parseScrollCSS, Vs as parseScrollRange, Bs as parseScrollTimeline, js as pinCSS, us as presets, ci as resolveKeyframes, vs as resolveLiveKeyframes, Ds as resolveRange, _e as resolveTimingFunction, y as reverseCSSTime, Ws as roundTripScrollCSS, Us as serializeScrollOptions, x as serializeTimingFunction, Ms as supportsNativeTrigger, fe as timingFunctionEntries, Dt as transformTargetsStyle, qc as validate, Ki as yieldToMain };
|