@algorisys/tinyfly 0.82.0 → 0.86.2
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 +11 -4
- package/lib/addons/adapters.js +363 -248
- package/lib/addons/characters.js +1652 -1470
- package/lib/addons/dom-adapter-Cphr2HZn.js +372 -0
- package/lib/addons/gsap-compat.js +197 -187
- package/lib/addons/load-scene-vp14_Jj-.js +324 -0
- package/lib/addons/scene-3d-webgl.js +237 -0
- package/lib/addons/scene-3d.js +306 -0
- package/lib/addons/shading-ByG9UXd0.js +85 -0
- package/lib/browser/tinyfly-scene-3d-webgl.iife.js +114 -0
- package/lib/browser/tinyfly-scene-3d.iife.js +3 -0
- package/lib/browser/tinyfly.iife.js +4 -4
- package/lib/browser/tinyfly.js +3028 -2480
- package/lib/browser/tinyfly.umd.js +4 -4
- package/lib/cli/tools.js +137 -22
- package/lib/embed/tinyfly-embed.iife.js +4 -4
- package/lib/embed/tinyfly-embed.js +921 -833
- package/lib/engine/tinyfly-engine.js +1022 -776
- package/lib/engine/tinyfly-engine.umd.cjs +2 -2
- package/lib/headless/headless.js +264 -7
- package/lib/player/tinyfly-player.es.js +459 -371
- package/lib/player/tinyfly-player.iife.js +2 -2
- package/lib/player/tinyfly-player.umd.js +2 -2
- package/lib/types/adapters/canvas/canvas-adapter.d.ts +36 -0
- package/lib/types/adapters/transform-3d.d.ts +99 -0
- package/lib/types/adapters/webgl/webgl-adapter.d.ts +17 -0
- package/lib/types/characters/character.d.ts +20 -1
- package/lib/types/characters/index.d.ts +2 -0
- package/lib/types/characters/rig/body-plan.d.ts +3 -1
- package/lib/types/characters/rig/skeleton.d.ts +57 -0
- package/lib/types/characters/scene-objects.d.ts +2 -0
- package/lib/types/compat/gsap/vars.d.ts +8 -0
- package/lib/types/engine/core/bake.d.ts +3 -1
- package/lib/types/engine/index.d.ts +1 -0
- package/lib/types/engine/interpolation/interpolators.d.ts +10 -3
- package/lib/types/engine/math/index.d.ts +11 -0
- package/lib/types/engine/math/mat4.d.ts +37 -0
- package/lib/types/engine/math/quat.d.ts +39 -0
- package/lib/types/engine/math/vec3.d.ts +16 -0
- package/lib/types/engine/types.d.ts +23 -2
- package/lib/types/scene-3d/camera.d.ts +27 -0
- package/lib/types/scene-3d/canvas-2d-renderer.d.ts +21 -0
- package/lib/types/scene-3d/geometry/extrude.d.ts +17 -0
- package/lib/types/scene-3d/geometry/mesh.d.ts +36 -0
- package/lib/types/scene-3d/geometry/primitives.d.ts +16 -0
- package/lib/types/scene-3d/geometry/triangulate.d.ts +24 -0
- package/lib/types/scene-3d/index.d.ts +20 -0
- package/lib/types/scene-3d/load-scene.d.ts +31 -0
- package/lib/types/scene-3d/object-kind.d.ts +54 -0
- package/lib/types/scene-3d/resolve-scene.d.ts +122 -0
- package/lib/types/scene-3d/scene-3d-adapter.d.ts +46 -0
- package/lib/types/scene-3d/scene-types.d.ts +191 -0
- package/lib/types/scene-3d/shading.d.ts +20 -0
- package/lib/types/scene-3d/validate-scene.d.ts +11 -0
- package/lib/types/scene-3d/webgl/gl-data.d.ts +28 -0
- package/lib/types/scene-3d/webgl/index.d.ts +16 -0
- package/lib/types/scene-3d/webgl/shaders.d.ts +29 -0
- package/lib/types/scene-3d/webgl/webgl2-renderer.d.ts +33 -0
- package/package.json +10 -2
- package/lib/addons/dom-adapter-CrNwoomd.js +0 -243
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
function
|
|
1
|
+
function ie(i) {
|
|
2
2
|
return typeof i == "object" && i !== null && i.type === "cubic-bezier";
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function se(i) {
|
|
5
5
|
return typeof i == "object" && i !== null && i.type !== "cubic-bezier";
|
|
6
6
|
}
|
|
7
|
-
const
|
|
8
|
-
function
|
|
7
|
+
const At = 2;
|
|
8
|
+
function ne(i) {
|
|
9
|
+
return i.some((t) => t.interpolation !== void 0) ? 2 : 1;
|
|
10
|
+
}
|
|
11
|
+
function Yt(i) {
|
|
9
12
|
return i.property === "text" && "textConfig" in i;
|
|
10
13
|
}
|
|
11
14
|
function ut(i) {
|
|
@@ -14,10 +17,10 @@ function ut(i) {
|
|
|
14
17
|
function dt(i) {
|
|
15
18
|
return i.kind === "spring" && "spring" in i;
|
|
16
19
|
}
|
|
17
|
-
function
|
|
20
|
+
function re(i) {
|
|
18
21
|
return i.property === "motionPath" && "motionPathConfig" in i;
|
|
19
22
|
}
|
|
20
|
-
function
|
|
23
|
+
function Nt(i, t, e = "start") {
|
|
21
24
|
if (t <= 1) return 0;
|
|
22
25
|
if (typeof e == "number") {
|
|
23
26
|
const s = Math.max(0, Math.min(t - 1, e));
|
|
@@ -34,29 +37,29 @@ function qt(i, t, e = "start") {
|
|
|
34
37
|
return i;
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
|
-
function
|
|
40
|
+
function ae(i, t = "start") {
|
|
38
41
|
if (i <= 1) return 0;
|
|
39
42
|
let e = 0;
|
|
40
43
|
for (let s = 0; s < i; s++)
|
|
41
|
-
e = Math.max(e,
|
|
44
|
+
e = Math.max(e, Nt(s, i, t));
|
|
42
45
|
return e;
|
|
43
46
|
}
|
|
44
|
-
function
|
|
47
|
+
function qt(i, t, e) {
|
|
45
48
|
if (e.offsets) return e.offsets[i] ?? 0;
|
|
46
|
-
const s = e.from ?? "start", n =
|
|
49
|
+
const s = e.from ?? "start", n = Nt(i, t, s);
|
|
47
50
|
if (e.amount !== void 0) {
|
|
48
|
-
const r =
|
|
51
|
+
const r = ae(t, s);
|
|
49
52
|
return r === 0 ? 0 : e.amount * n / r;
|
|
50
53
|
}
|
|
51
54
|
return e.each !== void 0 ? e.each * n : 0;
|
|
52
55
|
}
|
|
53
|
-
function
|
|
54
|
-
return Array.from({ length: i }, (e, s) =>
|
|
56
|
+
function oe(i, t) {
|
|
57
|
+
return Array.from({ length: i }, (e, s) => qt(s, i, t));
|
|
55
58
|
}
|
|
56
59
|
function mt(i, t) {
|
|
57
|
-
return i <= 1 ? 0 : Math.max(...
|
|
60
|
+
return i <= 1 ? 0 : Math.max(...oe(i, t));
|
|
58
61
|
}
|
|
59
|
-
const U = 1,
|
|
62
|
+
const U = 1, Vt = 6e4, Z = Vt / U, X = {
|
|
60
63
|
stiffness: 180,
|
|
61
64
|
damping: 12,
|
|
62
65
|
mass: 1,
|
|
@@ -64,7 +67,7 @@ const U = 1, Nt = 6e4, G = Nt / U, F = {
|
|
|
64
67
|
restDelta: 0.01,
|
|
65
68
|
restSpeed: 0.1
|
|
66
69
|
};
|
|
67
|
-
class
|
|
70
|
+
class ce {
|
|
68
71
|
from;
|
|
69
72
|
to;
|
|
70
73
|
stiffness;
|
|
@@ -89,7 +92,7 @@ class ae {
|
|
|
89
92
|
/** Once at rest we stop simulating; every later time returns `to`. */
|
|
90
93
|
settledStep = null;
|
|
91
94
|
constructor(t) {
|
|
92
|
-
this.from = t.from, this.to = t.to, this.stiffness = t.stiffness ??
|
|
95
|
+
this.from = t.from, this.to = t.to, this.stiffness = t.stiffness ?? X.stiffness, this.damping = t.damping ?? X.damping, this.mass = t.mass ?? X.mass, this.restDelta = t.restDelta ?? X.restDelta, this.restSpeed = t.restSpeed ?? X.restSpeed, this.distance = Math.abs(this.to - this.from) || 1, this.samples = [this.from], this.velocity = t.velocity ?? X.velocity, this.isAtRest(this.from) && (this.settledStep = 0);
|
|
93
96
|
}
|
|
94
97
|
/**
|
|
95
98
|
* Whether a position/velocity pair counts as settled.
|
|
@@ -118,12 +121,12 @@ class ae {
|
|
|
118
121
|
* of a spring track. Runs the simulation to completion once.
|
|
119
122
|
*/
|
|
120
123
|
settleTime() {
|
|
121
|
-
return this.simulateTo(
|
|
124
|
+
return this.simulateTo(Z + 1), this.settledStep !== null ? this.settledStep * U : Vt;
|
|
122
125
|
}
|
|
123
126
|
/** Advance the cached simulation until it holds at least `steps` samples. */
|
|
124
127
|
simulateTo(t) {
|
|
125
128
|
if (this.settledStep !== null) return;
|
|
126
|
-
const e = Math.min(t,
|
|
129
|
+
const e = Math.min(t, Z + 1), s = U / 1e3;
|
|
127
130
|
for (; this.samples.length < e; ) {
|
|
128
131
|
const n = this.samples[this.samples.length - 1], r = n - this.to, a = -this.stiffness * r, o = -this.damping * this.velocity, c = (a + o) / this.mass;
|
|
129
132
|
this.velocity += c * s;
|
|
@@ -133,18 +136,18 @@ class ae {
|
|
|
133
136
|
return;
|
|
134
137
|
}
|
|
135
138
|
}
|
|
136
|
-
this.samples.length >
|
|
139
|
+
this.samples.length > Z && (this.settledStep = Z);
|
|
137
140
|
}
|
|
138
141
|
}
|
|
139
|
-
const
|
|
142
|
+
const St = 4, he = 2e-3, le = 1e-4, ue = 6e4;
|
|
140
143
|
function gt(i) {
|
|
141
|
-
const t = i.friction ??
|
|
142
|
-
return t > 0 ? t :
|
|
144
|
+
const t = i.friction ?? St;
|
|
145
|
+
return t > 0 ? t : St;
|
|
143
146
|
}
|
|
144
|
-
function
|
|
147
|
+
function de(i) {
|
|
145
148
|
return i.from + i.velocity / gt(i);
|
|
146
149
|
}
|
|
147
|
-
function
|
|
150
|
+
function fe(i, t) {
|
|
148
151
|
if (t === void 0) return i;
|
|
149
152
|
if (typeof t == "number")
|
|
150
153
|
return t > 0 ? Math.round(i / t) * t : i;
|
|
@@ -154,75 +157,75 @@ function ue(i, t) {
|
|
|
154
157
|
Math.abs(s - i) < Math.abs(e - i) && (e = s);
|
|
155
158
|
return e;
|
|
156
159
|
}
|
|
157
|
-
function
|
|
158
|
-
let t =
|
|
160
|
+
function Wt(i) {
|
|
161
|
+
let t = fe(de(i), i.end);
|
|
159
162
|
return i.min !== void 0 && (t = Math.max(i.min, t)), i.max !== void 0 && (t = Math.min(i.max, t)), t;
|
|
160
163
|
}
|
|
161
|
-
function
|
|
162
|
-
const t = Math.abs(
|
|
164
|
+
function Ut(i) {
|
|
165
|
+
const t = Math.abs(Wt(i) - i.from);
|
|
163
166
|
if (t === 0) return 0;
|
|
164
|
-
const e = i.restDelta ?? Math.max(
|
|
167
|
+
const e = i.restDelta ?? Math.max(le, t * he);
|
|
165
168
|
if (e >= t) return 0;
|
|
166
169
|
const s = Math.log(t / e) / gt(i);
|
|
167
|
-
return Math.min(
|
|
170
|
+
return Math.min(ue, s * 1e3);
|
|
168
171
|
}
|
|
169
|
-
function
|
|
172
|
+
function Mt(i, t) {
|
|
170
173
|
if (t <= 0) return i.from;
|
|
171
|
-
const e =
|
|
172
|
-
if (t >=
|
|
174
|
+
const e = Wt(i);
|
|
175
|
+
if (t >= Ut(i)) return e;
|
|
173
176
|
const s = gt(i);
|
|
174
177
|
return i.from + (e - i.from) * (1 - Math.exp(-s * t / 1e3));
|
|
175
178
|
}
|
|
176
|
-
const ft = (i) => i,
|
|
179
|
+
const ft = (i) => i, pe = (i) => i * i, me = (i) => 1 - (1 - i) * (1 - i), ge = (i) => i < 0.5 ? 2 * i * i : 1 - Math.pow(-2 * i + 2, 2) / 2, Ht = (i) => i * i * i, Qt = (i) => 1 - Math.pow(1 - i, 3), zt = (i) => i < 0.5 ? 4 * i * i * i : 1 - Math.pow(-2 * i + 2, 3) / 2, ye = Ht, Te = Qt, be = zt, Ae = {
|
|
177
180
|
linear: ft,
|
|
178
|
-
"ease-in":
|
|
179
|
-
"ease-out":
|
|
180
|
-
"ease-in-out":
|
|
181
|
-
"ease-in-quad":
|
|
182
|
-
"ease-out-quad":
|
|
183
|
-
"ease-in-out-quad":
|
|
184
|
-
"ease-in-cubic":
|
|
185
|
-
"ease-out-cubic":
|
|
186
|
-
"ease-in-out-cubic":
|
|
181
|
+
"ease-in": ye,
|
|
182
|
+
"ease-out": Te,
|
|
183
|
+
"ease-in-out": be,
|
|
184
|
+
"ease-in-quad": pe,
|
|
185
|
+
"ease-out-quad": me,
|
|
186
|
+
"ease-in-out-quad": ge,
|
|
187
|
+
"ease-in-cubic": Ht,
|
|
188
|
+
"ease-out-cubic": Qt,
|
|
189
|
+
"ease-in-out-cubic": zt
|
|
187
190
|
};
|
|
188
|
-
function
|
|
189
|
-
const [t, e, s, n] = i, r = 3 * t, a = 3 * (s - t) - r, o = 1 - r - a, c = 3 * e, h = 3 * (n - e) - c, u = 1 - c - h, l = (
|
|
190
|
-
let
|
|
191
|
+
function Se(i) {
|
|
192
|
+
const [t, e, s, n] = i, r = 3 * t, a = 3 * (s - t) - r, o = 1 - r - a, c = 3 * e, h = 3 * (n - e) - c, u = 1 - c - h, l = (d) => ((o * d + a) * d + r) * d, g = (d) => ((u * d + h) * d + c) * d, p = (d) => (3 * o * d + 2 * a) * d + r, f = (d) => {
|
|
193
|
+
let m = d;
|
|
191
194
|
for (let A = 0; A < 8; A++) {
|
|
192
|
-
const
|
|
193
|
-
if (Math.abs(
|
|
194
|
-
return
|
|
195
|
-
const
|
|
196
|
-
if (Math.abs(
|
|
195
|
+
const M = l(m) - d;
|
|
196
|
+
if (Math.abs(M) < 1e-7)
|
|
197
|
+
return m;
|
|
198
|
+
const y = p(m);
|
|
199
|
+
if (Math.abs(y) < 1e-7)
|
|
197
200
|
break;
|
|
198
|
-
|
|
201
|
+
m -= M / y;
|
|
199
202
|
}
|
|
200
|
-
let
|
|
201
|
-
for (
|
|
202
|
-
const A = l(
|
|
203
|
-
if (Math.abs(A -
|
|
204
|
-
return
|
|
205
|
-
|
|
203
|
+
let T = 0, b = 1;
|
|
204
|
+
for (m = d; T < b; ) {
|
|
205
|
+
const A = l(m);
|
|
206
|
+
if (Math.abs(A - d) < 1e-7)
|
|
207
|
+
return m;
|
|
208
|
+
d > A ? T = m : b = m, m = (T + b) / 2;
|
|
206
209
|
}
|
|
207
|
-
return
|
|
210
|
+
return m;
|
|
208
211
|
};
|
|
209
|
-
return (
|
|
210
|
-
if (
|
|
211
|
-
if (
|
|
212
|
-
const
|
|
213
|
-
return
|
|
212
|
+
return (d) => {
|
|
213
|
+
if (d <= 0) return 0;
|
|
214
|
+
if (d >= 1) return 1;
|
|
215
|
+
const m = f(d);
|
|
216
|
+
return g(m);
|
|
214
217
|
};
|
|
215
218
|
}
|
|
216
|
-
function
|
|
219
|
+
function nt(i, t = "out") {
|
|
217
220
|
if (t === "out") return i;
|
|
218
221
|
const e = (s) => 1 - i(1 - s);
|
|
219
222
|
return t === "in" ? e : (s) => s < 0.5 ? e(s * 2) / 2 : i(s * 2 - 1) / 2 + 0.5;
|
|
220
223
|
}
|
|
221
|
-
function
|
|
224
|
+
function Me(i = 1, t = 0.3) {
|
|
222
225
|
const e = Math.max(1, i), s = t / (2 * Math.PI) * Math.asin(1 / e);
|
|
223
226
|
return (n) => n <= 0 ? 0 : n >= 1 ? 1 : e * Math.pow(2, -10 * n) * Math.sin((n - s) * (2 * Math.PI) / t) + 1;
|
|
224
227
|
}
|
|
225
|
-
const
|
|
228
|
+
const _e = (i) => {
|
|
226
229
|
if (i <= 0) return 0;
|
|
227
230
|
if (i >= 1) return 1;
|
|
228
231
|
if (i < 1 / 2.75) return 7.5625 * i * i;
|
|
@@ -237,7 +240,7 @@ const Se = (i) => {
|
|
|
237
240
|
const s = i - 2.625 / 2.75;
|
|
238
241
|
return 7.5625 * s * s + 0.984375;
|
|
239
242
|
};
|
|
240
|
-
function
|
|
243
|
+
function ke(i = 1.70158) {
|
|
241
244
|
return (t) => {
|
|
242
245
|
if (t <= 0) return 0;
|
|
243
246
|
if (t >= 1) return 1;
|
|
@@ -245,7 +248,7 @@ function _e(i = 1.70158) {
|
|
|
245
248
|
return e * e * ((i + 1) * e + i) + 1;
|
|
246
249
|
};
|
|
247
250
|
}
|
|
248
|
-
function
|
|
251
|
+
function we(i, t = "end") {
|
|
249
252
|
const e = Math.max(1, Math.floor(i));
|
|
250
253
|
return (s) => {
|
|
251
254
|
if (s >= 1) return 1;
|
|
@@ -263,22 +266,22 @@ function Me(i, t = "end") {
|
|
|
263
266
|
}
|
|
264
267
|
};
|
|
265
268
|
}
|
|
266
|
-
function
|
|
269
|
+
function Pe(i) {
|
|
267
270
|
switch (i.type) {
|
|
268
271
|
case "steps":
|
|
269
|
-
return
|
|
272
|
+
return we(i.count, i.position);
|
|
270
273
|
case "elastic":
|
|
271
|
-
return
|
|
274
|
+
return nt(Me(i.amplitude, i.period), i.mode);
|
|
272
275
|
case "bounce":
|
|
273
|
-
return
|
|
276
|
+
return nt(_e, i.mode);
|
|
274
277
|
case "back":
|
|
275
|
-
return
|
|
278
|
+
return nt(ke(i.overshoot), i.mode);
|
|
276
279
|
}
|
|
277
280
|
}
|
|
278
|
-
function
|
|
279
|
-
return i === void 0 ? ft :
|
|
281
|
+
function ve(i) {
|
|
282
|
+
return i === void 0 ? ft : ie(i) ? Se(i.points) : se(i) ? Pe(i) : Ae[i] ?? ft;
|
|
280
283
|
}
|
|
281
|
-
const _t = 32,
|
|
284
|
+
const _t = 32, xe = 256, N = /* @__PURE__ */ new Map(), Ce = /[MmLlHhVvCcSsQqTtAaZz]/, Ie = /^[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?/, Re = {
|
|
282
285
|
M: 2,
|
|
283
286
|
L: 2,
|
|
284
287
|
H: 1,
|
|
@@ -290,7 +293,7 @@ const _t = 32, Pe = 256, Y = /* @__PURE__ */ new Map(), xe = /[MmLlHhVvCcSsQqTtA
|
|
|
290
293
|
A: 7,
|
|
291
294
|
Z: 0
|
|
292
295
|
};
|
|
293
|
-
function
|
|
296
|
+
function De(i) {
|
|
294
297
|
const t = [];
|
|
295
298
|
let e = 0, s = null;
|
|
296
299
|
const n = () => {
|
|
@@ -298,7 +301,7 @@ function Ie(i) {
|
|
|
298
301
|
};
|
|
299
302
|
for (; e < i.length && (n(), !(e >= i.length)); ) {
|
|
300
303
|
const r = i[e];
|
|
301
|
-
if (
|
|
304
|
+
if (Ce.test(r)) {
|
|
302
305
|
s = { type: r, args: [] }, t.push(s), e++;
|
|
303
306
|
continue;
|
|
304
307
|
}
|
|
@@ -309,49 +312,49 @@ function Ie(i) {
|
|
|
309
312
|
s.args.push(r === "1" ? 1 : 0), e++;
|
|
310
313
|
continue;
|
|
311
314
|
}
|
|
312
|
-
const c =
|
|
315
|
+
const c = Ie.exec(i.slice(e));
|
|
313
316
|
if (!c) break;
|
|
314
317
|
s.args.push(parseFloat(c[0])), e += c[0].length;
|
|
315
318
|
}
|
|
316
319
|
return t;
|
|
317
320
|
}
|
|
318
|
-
function
|
|
321
|
+
function Ee(i, t, e, s, n, r, a, o, c) {
|
|
319
322
|
if (i === o && t === c) return [];
|
|
320
323
|
let h = Math.abs(e), u = Math.abs(s);
|
|
321
324
|
if (h === 0 || u === 0) return [[i, t, o, c, o, c]];
|
|
322
|
-
const l = n * Math.PI / 180,
|
|
323
|
-
if (
|
|
324
|
-
const w = Math.sqrt(
|
|
325
|
+
const l = n * Math.PI / 180, g = Math.cos(l), p = Math.sin(l), f = (i - o) / 2, d = (t - c) / 2, m = g * f + p * d, T = -p * f + g * d, b = m * m / (h * h) + T * T / (u * u);
|
|
326
|
+
if (b > 1) {
|
|
327
|
+
const w = Math.sqrt(b);
|
|
325
328
|
h *= w, u *= w;
|
|
326
329
|
}
|
|
327
|
-
const A = r === a ? -1 : 1,
|
|
328
|
-
const
|
|
329
|
-
return w * $ -
|
|
330
|
-
}, P = C(1, 0, (
|
|
331
|
-
let
|
|
332
|
-
!a &&
|
|
333
|
-
const
|
|
334
|
-
const
|
|
335
|
-
return [
|
|
330
|
+
const A = r === a ? -1 : 1, M = h * h * u * u - h * h * T * T - u * u * m * m, y = h * h * T * T + u * u * m * m, _ = A * Math.sqrt(Math.max(0, M / y)), S = _ * h * T / u, R = -_ * u * m / h, z = g * S - p * R + (i + o) / 2, k = p * S + g * R + (t + c) / 2, C = (w, x, I, $) => {
|
|
331
|
+
const st = w * I + x * $, G = Math.sqrt((w * w + x * x) * (I * I + $ * $)), Y = Math.acos(Math.max(-1, Math.min(1, st / G)));
|
|
332
|
+
return w * $ - x * I < 0 ? -Y : Y;
|
|
333
|
+
}, P = C(1, 0, (m - S) / h, (T - R) / u);
|
|
334
|
+
let v = C((m - S) / h, (T - R) / u, (-m - S) / h, (-T - R) / u);
|
|
335
|
+
!a && v > 0 && (v -= 2 * Math.PI), a && v < 0 && (v += 2 * Math.PI);
|
|
336
|
+
const B = Math.max(1, Math.ceil(Math.abs(v) / (Math.PI / 2))), it = v / B, j = 4 / 3 * Math.tan(it / 4), yt = (w) => {
|
|
337
|
+
const x = h * Math.cos(w), I = u * Math.sin(w);
|
|
338
|
+
return [g * x - p * I + z, p * x + g * I + k];
|
|
336
339
|
}, Tt = (w) => {
|
|
337
|
-
const
|
|
338
|
-
return [
|
|
340
|
+
const x = -h * Math.sin(w), I = u * Math.cos(w);
|
|
341
|
+
return [g * x - p * I, p * x + g * I];
|
|
339
342
|
}, bt = [];
|
|
340
|
-
for (let w = 0; w <
|
|
341
|
-
const
|
|
342
|
-
bt.push([$ + j *
|
|
343
|
+
for (let w = 0; w < B; w++) {
|
|
344
|
+
const x = P + w * it, I = x + it, [$, st] = yt(x), [G, Y] = w === B - 1 ? [o, c] : yt(I), [Kt, Jt] = Tt(x), [te, ee] = Tt(I);
|
|
345
|
+
bt.push([$ + j * Kt, st + j * Jt, G - j * te, Y - j * ee, G, Y]);
|
|
343
346
|
}
|
|
344
347
|
return bt;
|
|
345
348
|
}
|
|
346
|
-
function
|
|
349
|
+
function E(i, t, e, s, n) {
|
|
347
350
|
const r = 1 - n;
|
|
348
351
|
return r * r * r * i + 3 * r * r * n * t + 3 * r * n * n * e + n * n * n * s;
|
|
349
352
|
}
|
|
350
|
-
function
|
|
353
|
+
function kt(i, t, e, s, n) {
|
|
351
354
|
const r = 1 - n;
|
|
352
355
|
return 3 * r * r * (t - i) + 6 * r * n * (e - t) + 3 * n * n * (s - e);
|
|
353
356
|
}
|
|
354
|
-
function
|
|
357
|
+
function q(i, t, e, s) {
|
|
355
358
|
return {
|
|
356
359
|
subpath: 0,
|
|
357
360
|
type: "L",
|
|
@@ -363,12 +366,12 @@ function N(i, t, e, s) {
|
|
|
363
366
|
length: Math.hypot(e - i, s - t)
|
|
364
367
|
};
|
|
365
368
|
}
|
|
366
|
-
function
|
|
369
|
+
function K(i, t, e) {
|
|
367
370
|
const [s, n, r, a, o, c] = e, h = [0];
|
|
368
|
-
let u = i, l = t,
|
|
369
|
-
for (let
|
|
370
|
-
const
|
|
371
|
-
|
|
371
|
+
let u = i, l = t, g = 0;
|
|
372
|
+
for (let p = 1; p <= _t; p++) {
|
|
373
|
+
const f = p / _t, d = E(i, s, r, o, f), m = E(t, n, a, c, f);
|
|
374
|
+
g += Math.hypot(d - u, m - l), h.push(g), u = d, l = m;
|
|
372
375
|
}
|
|
373
376
|
return {
|
|
374
377
|
subpath: 0,
|
|
@@ -378,91 +381,91 @@ function Z(i, t, e) {
|
|
|
378
381
|
startY: t,
|
|
379
382
|
endX: o,
|
|
380
383
|
endY: c,
|
|
381
|
-
length:
|
|
384
|
+
length: g,
|
|
382
385
|
lengths: h
|
|
383
386
|
};
|
|
384
387
|
}
|
|
385
|
-
function
|
|
386
|
-
const t =
|
|
388
|
+
function tt(i) {
|
|
389
|
+
const t = N.get(i);
|
|
387
390
|
if (t) return t;
|
|
388
391
|
const e = [];
|
|
389
392
|
let s = 0, n = 0, r = 0, a = 0, o = null, c = null, h = -1;
|
|
390
|
-
const u = /* @__PURE__ */ new Set(), l = (
|
|
391
|
-
h < 0 && (h = 0),
|
|
393
|
+
const u = /* @__PURE__ */ new Set(), l = (d) => {
|
|
394
|
+
h < 0 && (h = 0), d.subpath = h, e.push(d);
|
|
392
395
|
};
|
|
393
|
-
for (const { type:
|
|
394
|
-
const
|
|
395
|
-
if (
|
|
396
|
-
(s !== r || n !== a) && l(
|
|
396
|
+
for (const { type: d, args: m } of De(i)) {
|
|
397
|
+
const T = d.toUpperCase(), b = d !== T, A = Re[T];
|
|
398
|
+
if (T === "Z") {
|
|
399
|
+
(s !== r || n !== a) && l(q(s, n, r, a)), h >= 0 && u.add(h), s = r, n = a, o = c = null;
|
|
397
400
|
continue;
|
|
398
401
|
}
|
|
399
|
-
for (let
|
|
400
|
-
const
|
|
401
|
-
let R = null,
|
|
402
|
-
switch (
|
|
402
|
+
for (let M = 0; M + A <= m.length; M += A) {
|
|
403
|
+
const y = m.slice(M, M + A), _ = b ? s : 0, S = b ? n : 0;
|
|
404
|
+
let R = null, z = null;
|
|
405
|
+
switch (T) {
|
|
403
406
|
case "M":
|
|
404
|
-
|
|
407
|
+
M === 0 ? (s = y[0] + _, n = y[1] + S, r = s, a = n, (h < 0 || e[e.length - 1]?.subpath === h) && h++) : (l(q(s, n, y[0] + _, y[1] + S)), s = y[0] + _, n = y[1] + S);
|
|
405
408
|
break;
|
|
406
409
|
case "L":
|
|
407
|
-
l(
|
|
410
|
+
l(q(s, n, y[0] + _, y[1] + S)), s = y[0] + _, n = y[1] + S;
|
|
408
411
|
break;
|
|
409
412
|
case "H":
|
|
410
|
-
l(
|
|
413
|
+
l(q(s, n, y[0] + _, n)), s = y[0] + _;
|
|
411
414
|
break;
|
|
412
415
|
case "V":
|
|
413
|
-
l(
|
|
416
|
+
l(q(s, n, s, y[0] + S)), n = y[0] + S;
|
|
414
417
|
break;
|
|
415
418
|
case "C": {
|
|
416
|
-
const k = [
|
|
417
|
-
l(
|
|
419
|
+
const k = [y[0] + _, y[1] + S, y[2] + _, y[3] + S, y[4] + _, y[5] + S];
|
|
420
|
+
l(K(s, n, k)), R = [k[2], k[3]], s = k[4], n = k[5];
|
|
418
421
|
break;
|
|
419
422
|
}
|
|
420
423
|
case "S": {
|
|
421
|
-
const [k, C] = o ? [2 * s - o[0], 2 * n - o[1]] : [s, n], P = [k, C,
|
|
422
|
-
l(
|
|
424
|
+
const [k, C] = o ? [2 * s - o[0], 2 * n - o[1]] : [s, n], P = [k, C, y[0] + _, y[1] + S, y[2] + _, y[3] + S];
|
|
425
|
+
l(K(s, n, P)), R = [P[2], P[3]], s = P[4], n = P[5];
|
|
423
426
|
break;
|
|
424
427
|
}
|
|
425
428
|
case "Q":
|
|
426
429
|
case "T": {
|
|
427
430
|
let k = s, C = n;
|
|
428
|
-
|
|
429
|
-
const P =
|
|
431
|
+
T === "Q" ? (k = y[0] + _, C = y[1] + S) : c && (k = 2 * s - c[0], C = 2 * n - c[1]);
|
|
432
|
+
const P = T === "Q" ? y[2] + _ : y[0] + _, v = T === "Q" ? y[3] + S : y[1] + S;
|
|
430
433
|
l(
|
|
431
|
-
|
|
434
|
+
K(s, n, [
|
|
432
435
|
s + 2 / 3 * (k - s),
|
|
433
436
|
n + 2 / 3 * (C - n),
|
|
434
437
|
P + 2 / 3 * (k - P),
|
|
435
|
-
|
|
438
|
+
v + 2 / 3 * (C - v),
|
|
436
439
|
P,
|
|
437
|
-
|
|
440
|
+
v
|
|
438
441
|
])
|
|
439
|
-
),
|
|
442
|
+
), z = [k, C], s = P, n = v;
|
|
440
443
|
break;
|
|
441
444
|
}
|
|
442
445
|
case "A": {
|
|
443
|
-
const k =
|
|
444
|
-
let P = s,
|
|
445
|
-
for (const
|
|
446
|
-
l(
|
|
446
|
+
const k = y[5] + _, C = y[6] + S;
|
|
447
|
+
let P = s, v = n;
|
|
448
|
+
for (const B of Ee(s, n, y[0], y[1], y[2], y[3], y[4], k, C))
|
|
449
|
+
l(K(P, v, B)), P = B[4], v = B[5];
|
|
447
450
|
s = k, n = C;
|
|
448
451
|
break;
|
|
449
452
|
}
|
|
450
453
|
}
|
|
451
|
-
o = R, c =
|
|
454
|
+
o = R, c = z;
|
|
452
455
|
}
|
|
453
456
|
}
|
|
454
|
-
const
|
|
455
|
-
for (let
|
|
456
|
-
const
|
|
457
|
-
let
|
|
458
|
-
for (;
|
|
459
|
-
const A = e[
|
|
460
|
-
|
|
457
|
+
const g = e.reduce((d, m) => d + m.length, 0), p = [];
|
|
458
|
+
for (let d = 0; d < e.length; ) {
|
|
459
|
+
const m = e[d].subpath;
|
|
460
|
+
let T = d, b = 0;
|
|
461
|
+
for (; T < e.length && e[T].subpath === m; ) b += e[T++].length;
|
|
462
|
+
const A = e[d], M = e[T - 1], y = u.has(m) || Math.abs(M.endX - A.startX) < 1e-9 && Math.abs(M.endY - A.startY) < 1e-9;
|
|
463
|
+
p.push({ start: d, end: T, length: b, closed: y }), d = T;
|
|
461
464
|
}
|
|
462
|
-
const
|
|
463
|
-
return
|
|
465
|
+
const f = { segments: e, totalLength: g, subpaths: p };
|
|
466
|
+
return N.size >= xe && N.delete(N.keys().next().value), N.set(i, f), f;
|
|
464
467
|
}
|
|
465
|
-
function
|
|
468
|
+
function Be(i, t) {
|
|
466
469
|
const e = i.lengths;
|
|
467
470
|
if (t <= 0) return 0;
|
|
468
471
|
if (t >= i.length) return 1;
|
|
@@ -474,7 +477,7 @@ function De(i, t) {
|
|
|
474
477
|
const r = e[n] - e[s], a = r > 0 ? (t - e[s]) / r : 0;
|
|
475
478
|
return (s + a) / (e.length - 1);
|
|
476
479
|
}
|
|
477
|
-
function
|
|
480
|
+
function Le(i, t) {
|
|
478
481
|
if (i.type === "L") {
|
|
479
482
|
const l = i.length > 0 ? Math.max(0, Math.min(1, t / i.length)) : 0;
|
|
480
483
|
return {
|
|
@@ -483,15 +486,15 @@ function Be(i, t) {
|
|
|
483
486
|
angle: Math.atan2(i.endY - i.startY, i.endX - i.startX) * 180 / Math.PI
|
|
484
487
|
};
|
|
485
488
|
}
|
|
486
|
-
const [e, s, n, r, a, o] = i.points, c =
|
|
487
|
-
let h =
|
|
489
|
+
const [e, s, n, r, a, o] = i.points, c = Be(i, t);
|
|
490
|
+
let h = kt(i.startX, e, n, a, c), u = kt(i.startY, s, r, o, c);
|
|
488
491
|
if (Math.hypot(h, u) < 1e-9) {
|
|
489
|
-
const l = c < 0.5 ? Math.min(1, c + 1e-3) : Math.max(0, c - 1e-3),
|
|
490
|
-
h = c < 0.5 ?
|
|
492
|
+
const l = c < 0.5 ? Math.min(1, c + 1e-3) : Math.max(0, c - 1e-3), g = E(i.startX, e, n, a, l), p = E(i.startY, s, r, o, l), f = E(i.startX, e, n, a, c), d = E(i.startY, s, r, o, c);
|
|
493
|
+
h = c < 0.5 ? g - f : f - g, u = c < 0.5 ? p - d : d - p;
|
|
491
494
|
}
|
|
492
495
|
return {
|
|
493
|
-
x:
|
|
494
|
-
y:
|
|
496
|
+
x: E(i.startX, e, n, a, c),
|
|
497
|
+
y: E(i.startY, s, r, o, c),
|
|
495
498
|
angle: Math.atan2(u, h) * 180 / Math.PI
|
|
496
499
|
};
|
|
497
500
|
}
|
|
@@ -501,20 +504,20 @@ function jt(i, t, e = 0, s = i.length) {
|
|
|
501
504
|
for (let r = e; r < s; r++) {
|
|
502
505
|
const a = i[r];
|
|
503
506
|
if (n + a.length >= t || r === s - 1)
|
|
504
|
-
return
|
|
507
|
+
return Le(a, t - n);
|
|
505
508
|
n += a.length;
|
|
506
509
|
}
|
|
507
510
|
return { x: 0, y: 0, angle: 0 };
|
|
508
511
|
}
|
|
509
|
-
function
|
|
510
|
-
const { segments: e, totalLength: s } =
|
|
512
|
+
function Oe(i, t) {
|
|
513
|
+
const { segments: e, totalLength: s } = tt(i);
|
|
511
514
|
return jt(e, Math.max(0, Math.min(1, t)) * s);
|
|
512
515
|
}
|
|
513
|
-
const
|
|
514
|
-
let
|
|
515
|
-
const
|
|
516
|
-
function
|
|
517
|
-
const { segments: e, subpaths: s, totalLength: n } =
|
|
516
|
+
const $e = 24, Xe = 320, Fe = 2.5, V = 72, Ye = 0.2, Ne = 128, J = /* @__PURE__ */ new Map();
|
|
517
|
+
let rt = 0, L;
|
|
518
|
+
const wt = (i) => Math.round(i * 100) / 100;
|
|
519
|
+
function Pt(i, t) {
|
|
520
|
+
const { segments: e, subpaths: s, totalLength: n } = tt(i);
|
|
518
521
|
if (e.length === 0) return [];
|
|
519
522
|
if (t) {
|
|
520
523
|
const r = s.every((a) => a.closed);
|
|
@@ -526,7 +529,7 @@ function pt(i, t) {
|
|
|
526
529
|
const e = i.closed ? (t % 1 + 1) % 1 : Math.max(0, Math.min(1, t)), s = jt(i.segments, e * i.length, i.start, i.end);
|
|
527
530
|
return [s.x, s.y];
|
|
528
531
|
}
|
|
529
|
-
function
|
|
532
|
+
function vt(i) {
|
|
530
533
|
const t = [];
|
|
531
534
|
let e = 0;
|
|
532
535
|
for (let s = i.start; s < i.end; s++)
|
|
@@ -539,7 +542,7 @@ function xt(i, t) {
|
|
|
539
542
|
e.push(pt(i, i.closed ? s / t : s / (t - 1)));
|
|
540
543
|
return e;
|
|
541
544
|
}
|
|
542
|
-
function
|
|
545
|
+
function Ct(i) {
|
|
543
546
|
let t = 0, e = 0;
|
|
544
547
|
for (const [s, n] of i)
|
|
545
548
|
t += s, e += n;
|
|
@@ -549,43 +552,43 @@ function qe(i, t, e) {
|
|
|
549
552
|
const s = i.closed && t.closed;
|
|
550
553
|
if (e !== void 0)
|
|
551
554
|
return { offset: s ? Math.abs(e) % V / V : 0, reversed: e < 0 };
|
|
552
|
-
const n =
|
|
555
|
+
const n = Ct(xt(i, V)), r = Ct(xt(t, V)), a = V;
|
|
553
556
|
let o = { offset: 0, reversed: !1 }, c = 1 / 0;
|
|
554
557
|
for (const h of [!1, !0]) {
|
|
555
558
|
const u = s ? a : 1;
|
|
556
559
|
for (let l = 0; l < u; l++) {
|
|
557
|
-
let
|
|
558
|
-
for (let
|
|
559
|
-
const
|
|
560
|
-
|
|
560
|
+
let g = 0;
|
|
561
|
+
for (let p = 0; p < a && g < c; p++) {
|
|
562
|
+
const f = s ? h ? (l - p + a) % a : (p + l) % a : h ? a - 1 - p : p, d = n[p][0] - r[f][0], m = n[p][1] - r[f][1];
|
|
563
|
+
g += d * d + m * m;
|
|
561
564
|
}
|
|
562
|
-
|
|
565
|
+
g < c && (c = g, o = { offset: s ? l / a : 0, reversed: h });
|
|
563
566
|
}
|
|
564
567
|
}
|
|
565
568
|
return o;
|
|
566
569
|
}
|
|
567
|
-
function
|
|
570
|
+
function Ve(i, t, e) {
|
|
568
571
|
return e ? ((t.reversed ? t.offset - i : i + t.offset) % 1 + 1) % 1 : t.reversed ? 1 - i : i;
|
|
569
572
|
}
|
|
570
|
-
function
|
|
573
|
+
function We(i, t, e) {
|
|
571
574
|
return e ? ((t.reversed ? t.offset - i : i - t.offset) % 1 + 1) % 1 : t.reversed ? 1 - i : i;
|
|
572
575
|
}
|
|
573
|
-
function
|
|
576
|
+
function Ue(i, t, e) {
|
|
574
577
|
const s = i.closed && t.closed, n = qe(i, t, e.shapeIndex), r = Math.max(
|
|
575
|
-
|
|
576
|
-
Math.min(
|
|
578
|
+
$e,
|
|
579
|
+
Math.min(Xe, Math.ceil(Math.max(i.length, t.length) / Fe))
|
|
577
580
|
), a = /* @__PURE__ */ new Set(), o = (l) => a.add(Math.round(l * 1e7) / 1e7);
|
|
578
581
|
for (let l = 0; l <= r; l++) o(l / r);
|
|
579
|
-
for (const l of
|
|
580
|
-
for (const l of
|
|
581
|
-
let c = [...a].sort((l,
|
|
582
|
+
for (const l of vt(i)) o(l);
|
|
583
|
+
for (const l of vt(t)) o(We(l, n, s));
|
|
584
|
+
let c = [...a].sort((l, g) => l - g);
|
|
582
585
|
s && (c = c.filter((l) => l < 1));
|
|
583
586
|
const h = [], u = [];
|
|
584
587
|
for (const l of c)
|
|
585
|
-
h.push(...pt(i, l)), u.push(...pt(t,
|
|
586
|
-
return
|
|
588
|
+
h.push(...pt(i, l)), u.push(...pt(t, Ve(l, n, s)));
|
|
589
|
+
return He({ from: h, to: u, closed: s });
|
|
587
590
|
}
|
|
588
|
-
function
|
|
591
|
+
function He(i) {
|
|
589
592
|
const t = i.from.length / 2;
|
|
590
593
|
if (t <= 3) return i;
|
|
591
594
|
const e = new Uint8Array(t);
|
|
@@ -593,9 +596,9 @@ function We(i) {
|
|
|
593
596
|
const s = [[0, t - 1]];
|
|
594
597
|
for (; s.length > 0; ) {
|
|
595
598
|
const [a, o] = s.pop();
|
|
596
|
-
let c = -1, h =
|
|
599
|
+
let c = -1, h = Ye;
|
|
597
600
|
for (let u = a + 1; u < o; u++) {
|
|
598
|
-
const l = Math.max(
|
|
601
|
+
const l = Math.max(It(i.from, a, o, u), It(i.to, a, o, u));
|
|
599
602
|
l > h && (h = l, c = u);
|
|
600
603
|
}
|
|
601
604
|
c !== -1 && (e[c] = 1, s.push([a, c], [c, o]));
|
|
@@ -605,77 +608,109 @@ function We(i) {
|
|
|
605
608
|
e[a] && (n.push(i.from[a * 2], i.from[a * 2 + 1]), r.push(i.to[a * 2], i.to[a * 2 + 1]));
|
|
606
609
|
return { from: n, to: r, closed: i.closed };
|
|
607
610
|
}
|
|
608
|
-
function
|
|
611
|
+
function It(i, t, e, s) {
|
|
609
612
|
const n = i[t * 2], r = i[t * 2 + 1], a = i[e * 2] - n, o = i[e * 2 + 1] - r, c = i[s * 2] - n, h = i[s * 2 + 1] - r, u = a * a + o * o, l = u === 0 ? 0 : Math.max(0, Math.min(1, (c * a + h * o) / u));
|
|
610
613
|
return Math.hypot(c - l * a, h - l * o);
|
|
611
614
|
}
|
|
612
|
-
function
|
|
615
|
+
function Qe(i, t, e) {
|
|
613
616
|
const s = e.shapeIndex;
|
|
614
617
|
if (L && L.from === i && L.to === t && L.shapeIndex === s) return L.plan;
|
|
615
|
-
const r =
|
|
618
|
+
const r = J.get(String(s ?? "auto"))?.get(i)?.get(t);
|
|
616
619
|
if (r)
|
|
617
620
|
return L = { from: i, to: t, shapeIndex: s, plan: r }, r;
|
|
618
|
-
const a =
|
|
619
|
-
pairs: o.map((
|
|
621
|
+
const a = tt(i).subpaths.filter((p) => p.length > 0).length === tt(t).subpaths.filter((p) => p.length > 0).length, o = Pt(i, !a), c = Pt(t, !a), h = {
|
|
622
|
+
pairs: o.map((p, f) => Ue(p, c[f], e))
|
|
620
623
|
};
|
|
621
|
-
|
|
622
|
-
const u = String(s ?? "auto"), l =
|
|
623
|
-
|
|
624
|
-
const
|
|
625
|
-
return l.set(i,
|
|
624
|
+
rt >= Ne && (J.clear(), rt = 0);
|
|
625
|
+
const u = String(s ?? "auto"), l = J.get(u) ?? /* @__PURE__ */ new Map();
|
|
626
|
+
J.set(u, l);
|
|
627
|
+
const g = l.get(i) ?? /* @__PURE__ */ new Map();
|
|
628
|
+
return l.set(i, g), g.set(t, h), rt++, L = { from: i, to: t, shapeIndex: s, plan: h }, h;
|
|
626
629
|
}
|
|
627
|
-
function
|
|
630
|
+
function ze(i, t, e, s = {}) {
|
|
628
631
|
if (!i) return t;
|
|
629
632
|
if (!t) return i;
|
|
630
633
|
const n = Math.max(0, Math.min(1, e));
|
|
631
634
|
if (n === 0) return i;
|
|
632
635
|
if (n === 1) return t;
|
|
633
|
-
const r =
|
|
636
|
+
const r = Qe(i, t, s);
|
|
634
637
|
if (r.pairs.length === 0) return n < 0.5 ? i : t;
|
|
635
638
|
let a = "";
|
|
636
639
|
for (const o of r.pairs) {
|
|
637
640
|
for (let c = 0; c < o.from.length; c += 2) {
|
|
638
|
-
const h =
|
|
641
|
+
const h = wt(o.from[c] + (o.to[c] - o.from[c]) * n), u = wt(o.from[c + 1] + (o.to[c + 1] - o.from[c + 1]) * n);
|
|
639
642
|
a += `${c === 0 ? a ? " M" : "M" : " L"}${h} ${u}`;
|
|
640
643
|
}
|
|
641
644
|
o.closed && (a += " Z");
|
|
642
645
|
}
|
|
643
646
|
return a;
|
|
644
647
|
}
|
|
645
|
-
function
|
|
648
|
+
function je(i) {
|
|
646
649
|
return /^\s*[Mm]\s*[-+]?(?:\d|\.\d)/.test(i);
|
|
647
650
|
}
|
|
648
|
-
const
|
|
649
|
-
function
|
|
650
|
-
|
|
651
|
+
const Ge = 0.9995;
|
|
652
|
+
function Ze() {
|
|
653
|
+
return [0, 0, 0, 1];
|
|
654
|
+
}
|
|
655
|
+
function Ke(i, t) {
|
|
656
|
+
return i[0] * t[0] + i[1] * t[1] + i[2] * t[2] + i[3] * t[3];
|
|
657
|
+
}
|
|
658
|
+
function Je(i) {
|
|
659
|
+
return Math.hypot(i[0], i[1], i[2], i[3]);
|
|
660
|
+
}
|
|
661
|
+
function H(i) {
|
|
662
|
+
const t = Je(i);
|
|
663
|
+
return t === 0 ? Ze() : [i[0] / t, i[1] / t, i[2] / t, i[3] / t];
|
|
664
|
+
}
|
|
665
|
+
function ti(i, t, e) {
|
|
666
|
+
const s = H(i);
|
|
667
|
+
let n = H(t), r = Ke(s, n);
|
|
668
|
+
if (r < 0 && (n = [-n[0], -n[1], -n[2], -n[3]], r = -r), r > Ge)
|
|
669
|
+
return H([
|
|
670
|
+
s[0] + (n[0] - s[0]) * e,
|
|
671
|
+
s[1] + (n[1] - s[1]) * e,
|
|
672
|
+
s[2] + (n[2] - s[2]) * e,
|
|
673
|
+
s[3] + (n[3] - s[3]) * e
|
|
674
|
+
]);
|
|
675
|
+
const a = Math.acos(r), o = Math.sin(a), c = Math.sin((1 - e) * a) / o, h = Math.sin(e * a) / o;
|
|
676
|
+
return H([
|
|
677
|
+
s[0] * c + n[0] * h,
|
|
678
|
+
s[1] * c + n[1] * h,
|
|
679
|
+
s[2] * c + n[2] * h,
|
|
680
|
+
s[3] * c + n[3] * h
|
|
681
|
+
]);
|
|
682
|
+
}
|
|
683
|
+
const D = (i, t, e) => i + (t - i) * e, Gt = 512, at = /* @__PURE__ */ new Map(), ot = /* @__PURE__ */ new Map();
|
|
684
|
+
function Rt(i) {
|
|
685
|
+
const t = at.get(i);
|
|
651
686
|
if (t) return t;
|
|
652
687
|
const e = i.replace("#", ""), s = [
|
|
653
688
|
parseInt(e.slice(0, 2), 16),
|
|
654
689
|
parseInt(e.slice(2, 4), 16),
|
|
655
690
|
parseInt(e.slice(4, 6), 16)
|
|
656
691
|
];
|
|
657
|
-
return
|
|
692
|
+
return at.size < Gt && at.set(i, s), s;
|
|
658
693
|
}
|
|
659
|
-
const
|
|
660
|
-
function
|
|
661
|
-
return `#${
|
|
694
|
+
const Dt = (i) => i.charCodeAt(0) === 35, Et = (i) => i.startsWith("rgb"), Bt = (i) => i.startsWith("rgba"), ei = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/, ct = (i) => Math.round(i).toString(16).padStart(2, "0");
|
|
695
|
+
function ii(i, t, e) {
|
|
696
|
+
return `#${ct(i)}${ct(t)}${ct(e)}`;
|
|
662
697
|
}
|
|
663
|
-
function
|
|
664
|
-
const t =
|
|
698
|
+
function Lt(i) {
|
|
699
|
+
const t = ot.get(i);
|
|
665
700
|
if (t) return t;
|
|
666
|
-
const e = i.match(
|
|
701
|
+
const e = i.match(ei);
|
|
667
702
|
if (!e)
|
|
668
703
|
throw new Error(`Invalid rgb color: ${i}`);
|
|
669
704
|
const s = parseInt(e[1], 10), n = parseInt(e[2], 10), r = parseInt(e[3], 10), a = e[4] !== void 0 ? [s, n, r, parseFloat(e[4])] : [s, n, r];
|
|
670
|
-
return
|
|
705
|
+
return ot.size < Gt && ot.set(i, a), a;
|
|
671
706
|
}
|
|
672
|
-
const
|
|
673
|
-
if (
|
|
674
|
-
const [s, n, r] =
|
|
675
|
-
return
|
|
707
|
+
const si = (i, t, e) => {
|
|
708
|
+
if (Dt(i) && Dt(t)) {
|
|
709
|
+
const [s, n, r] = Rt(i), [a, o, c] = Rt(t), h = D(s, a, e), u = D(n, o, e), l = D(r, c, e);
|
|
710
|
+
return ii(h, u, l);
|
|
676
711
|
}
|
|
677
|
-
if ((
|
|
678
|
-
const s =
|
|
712
|
+
if ((Et(i) || Bt(i)) && (Et(t) || Bt(t))) {
|
|
713
|
+
const s = Lt(i), n = Lt(t), r = Math.round(D(s[0], n[0], e)), a = Math.round(D(s[1], n[1], e)), o = Math.round(D(s[2], n[2], e));
|
|
679
714
|
if (s.length === 4 || n.length === 4) {
|
|
680
715
|
const c = s[3] ?? 1, h = n[3] ?? 1, u = D(c, h, e);
|
|
681
716
|
return `rgba(${r}, ${a}, ${o}, ${u})`;
|
|
@@ -683,16 +718,16 @@ const Ge = (i, t, e) => {
|
|
|
683
718
|
return `rgb(${r}, ${a}, ${o})`;
|
|
684
719
|
}
|
|
685
720
|
return e < 1 ? i : t;
|
|
686
|
-
},
|
|
721
|
+
}, ni = (i, t, e) => {
|
|
687
722
|
const s = Math.min(i.length, t.length), n = [];
|
|
688
723
|
for (let r = 0; r < s; r++)
|
|
689
724
|
n.push(D(i[r], t[r], e));
|
|
690
725
|
return n;
|
|
691
|
-
},
|
|
692
|
-
function
|
|
693
|
-
return typeof i == "number" ? D : Array.isArray(i) ?
|
|
726
|
+
}, ri = (i, t, e) => ti(i, t, e), Ot = (i, t, e) => e < 1 ? i : t, ai = (i, t, e) => ze(i, t, e);
|
|
727
|
+
function oi(i, t) {
|
|
728
|
+
return t === "slerp" ? ri : typeof i == "number" ? D : Array.isArray(i) ? ni : typeof i == "string" ? i.startsWith("#") || i.startsWith("rgb") ? si : je(i) ? ai : Ot : Ot;
|
|
694
729
|
}
|
|
695
|
-
function
|
|
730
|
+
function ci(i) {
|
|
696
731
|
const t = [...i.keyframes].sort((e, s) => e.time - s.time);
|
|
697
732
|
return {
|
|
698
733
|
...i,
|
|
@@ -702,11 +737,11 @@ function ti(i) {
|
|
|
702
737
|
function O(i) {
|
|
703
738
|
return i.targets && i.targets.length > 0 ? i.targets : [i.target];
|
|
704
739
|
}
|
|
705
|
-
function
|
|
740
|
+
function F(i, t, e, s) {
|
|
706
741
|
const n = e ?? 0;
|
|
707
|
-
return !s || t <= 1 ? n : n +
|
|
742
|
+
return !s || t <= 1 ? n : n + qt(i, t, s);
|
|
708
743
|
}
|
|
709
|
-
class
|
|
744
|
+
class ht {
|
|
710
745
|
track;
|
|
711
746
|
targets;
|
|
712
747
|
constructor(t) {
|
|
@@ -719,7 +754,7 @@ class ct {
|
|
|
719
754
|
* that need every target should use `getTargetValues`.
|
|
720
755
|
*/
|
|
721
756
|
getValueAtTime(t) {
|
|
722
|
-
return this.valueForOffset(t -
|
|
757
|
+
return this.valueForOffset(t - F(0, this.targets.length, this.track.delay, this.track.stagger));
|
|
723
758
|
}
|
|
724
759
|
/**
|
|
725
760
|
* Every target's value at a specific time, in target order.
|
|
@@ -730,7 +765,7 @@ class ct {
|
|
|
730
765
|
getTargetValues(t) {
|
|
731
766
|
const e = this.targets.length, s = [];
|
|
732
767
|
for (let n = 0; n < e; n++) {
|
|
733
|
-
const r =
|
|
768
|
+
const r = F(n, e, this.track.delay, this.track.stagger), a = this.valueForOffset(t - r);
|
|
734
769
|
a !== void 0 && s.push({ target: this.targets[n], value: a, start: r + this.track.keyframes[0].time });
|
|
735
770
|
}
|
|
736
771
|
return s;
|
|
@@ -766,8 +801,8 @@ class ct {
|
|
|
766
801
|
return;
|
|
767
802
|
if (s.time === t)
|
|
768
803
|
return s.value;
|
|
769
|
-
const r = n.time - s.time, a = (t - s.time) / r, c =
|
|
770
|
-
return
|
|
804
|
+
const r = n.time - s.time, a = (t - s.time) / r, c = ve(n.easing)(a);
|
|
805
|
+
return oi(s.value, this.track.interpolation)(s.value, n.value, c);
|
|
771
806
|
}
|
|
772
807
|
/**
|
|
773
808
|
* Find the keyframes surrounding a given time.
|
|
@@ -780,20 +815,20 @@ class ct {
|
|
|
780
815
|
return { from: null, to: null };
|
|
781
816
|
}
|
|
782
817
|
}
|
|
783
|
-
class
|
|
818
|
+
class hi {
|
|
784
819
|
track;
|
|
785
820
|
targets;
|
|
786
821
|
sampler;
|
|
787
822
|
constructor(t) {
|
|
788
|
-
this.track = t, this.targets = O(t), this.sampler = new
|
|
823
|
+
this.track = t, this.targets = O(t), this.sampler = new ce(t.spring);
|
|
789
824
|
}
|
|
790
825
|
getValueAtTime(t) {
|
|
791
|
-
return this.sampler.valueAt(t -
|
|
826
|
+
return this.sampler.valueAt(t - F(0, this.targets.length, this.track.delay, this.track.stagger));
|
|
792
827
|
}
|
|
793
828
|
getTargetValues(t) {
|
|
794
829
|
const e = this.targets.length, s = [];
|
|
795
830
|
for (let n = 0; n < e; n++) {
|
|
796
|
-
const r =
|
|
831
|
+
const r = F(n, e, this.track.delay, this.track.stagger);
|
|
797
832
|
s.push({ target: this.targets[n], value: this.sampler.valueAt(t - r), start: r });
|
|
798
833
|
}
|
|
799
834
|
return s;
|
|
@@ -807,21 +842,21 @@ class ei {
|
|
|
807
842
|
return this.track;
|
|
808
843
|
}
|
|
809
844
|
}
|
|
810
|
-
class
|
|
845
|
+
class li {
|
|
811
846
|
track;
|
|
812
847
|
targets;
|
|
813
848
|
duration;
|
|
814
849
|
constructor(t) {
|
|
815
|
-
this.track = t, this.targets = O(t), this.duration =
|
|
850
|
+
this.track = t, this.targets = O(t), this.duration = Ut(t.inertia);
|
|
816
851
|
}
|
|
817
852
|
getValueAtTime(t) {
|
|
818
|
-
return
|
|
853
|
+
return Mt(this.track.inertia, t - F(0, this.targets.length, this.track.delay, this.track.stagger));
|
|
819
854
|
}
|
|
820
855
|
getTargetValues(t) {
|
|
821
856
|
const e = this.targets.length, s = [];
|
|
822
857
|
for (let n = 0; n < e; n++) {
|
|
823
|
-
const r =
|
|
824
|
-
s.push({ target: this.targets[n], value:
|
|
858
|
+
const r = F(n, e, this.track.delay, this.track.stagger);
|
|
859
|
+
s.push({ target: this.targets[n], value: Mt(this.track.inertia, t - r), start: r });
|
|
825
860
|
}
|
|
826
861
|
return s;
|
|
827
862
|
}
|
|
@@ -834,49 +869,49 @@ class ii {
|
|
|
834
869
|
return this.track;
|
|
835
870
|
}
|
|
836
871
|
}
|
|
837
|
-
function
|
|
838
|
-
const e = { ...
|
|
872
|
+
function ui(i, t) {
|
|
873
|
+
const e = { ...Oe(i.pathData, t) };
|
|
839
874
|
if (i.matrix) {
|
|
840
875
|
const [s, n, r, a, o, c] = i.matrix, { x: h, y: u } = e;
|
|
841
876
|
e.x = s * h + r * u + o, e.y = n * h + a * u + c;
|
|
842
|
-
const l = e.angle * Math.PI / 180,
|
|
843
|
-
e.angle = Math.atan2(n *
|
|
877
|
+
const l = e.angle * Math.PI / 180, g = Math.cos(l), p = Math.sin(l);
|
|
878
|
+
e.angle = Math.atan2(n * g + a * p, s * g + r * p) * 180 / Math.PI;
|
|
844
879
|
}
|
|
845
880
|
return i.autoRotate && i.rotateOffset && (e.angle += i.rotateOffset), e;
|
|
846
881
|
}
|
|
847
|
-
const
|
|
882
|
+
const lt = {
|
|
848
883
|
upperCase: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
849
884
|
lowerCase: "abcdefghijklmnopqrstuvwxyz",
|
|
850
885
|
upperAndLowerCase: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
|
851
886
|
numbers: "0123456789"
|
|
852
|
-
},
|
|
853
|
-
function
|
|
854
|
-
const t =
|
|
855
|
-
return e.length > 0 ? e : Array.from(
|
|
887
|
+
}, di = 20;
|
|
888
|
+
function fi(i) {
|
|
889
|
+
const t = lt[i ?? "upperCase"] ?? i ?? lt.upperCase, e = Array.from(t);
|
|
890
|
+
return e.length > 0 ? e : Array.from(lt.upperCase);
|
|
856
891
|
}
|
|
857
|
-
function
|
|
892
|
+
function pi(i, t, e) {
|
|
858
893
|
let s = (i | 0) ^ Math.imul(t + 1, 2654435761) ^ Math.imul(e + 1, 2246822507);
|
|
859
894
|
return s = Math.imul(s ^ s >>> 16, 2146121005), s = Math.imul(s ^ s >>> 15, 2221713035), (s ^ s >>> 16) >>> 0;
|
|
860
895
|
}
|
|
861
|
-
function
|
|
896
|
+
function mi(i, t, e = 0) {
|
|
862
897
|
const s = i.from ?? "", n = i.to, r = Math.max(0, Math.min(1, t));
|
|
863
898
|
if (r <= 0) return s;
|
|
864
899
|
if (r >= 1) return n;
|
|
865
900
|
const a = Array.from(s), o = Array.from(n), c = i.rightToLeft ?? !1;
|
|
866
901
|
if (i.mode === "type") {
|
|
867
|
-
const
|
|
868
|
-
return c ? a.slice(0, Math.max(0, a.length -
|
|
902
|
+
const b = Math.round(r * Math.max(a.length, o.length));
|
|
903
|
+
return c ? a.slice(0, Math.max(0, a.length - b)).join("") + o.slice(Math.max(0, o.length - b)).join("") : o.slice(0, b).join("") + a.slice(b).join("");
|
|
869
904
|
}
|
|
870
|
-
const h = Math.max(0, Math.min(0.999, i.revealDelay ?? 0)), u = Math.max(0, (r - h) / (1 - h)), l = Math.floor(u * o.length),
|
|
871
|
-
let
|
|
872
|
-
for (let
|
|
873
|
-
const A = c ?
|
|
874
|
-
A &&
|
|
875
|
-
` ?
|
|
905
|
+
const h = Math.max(0, Math.min(0.999, i.revealDelay ?? 0)), u = Math.max(0, (r - h) / (1 - h)), l = Math.floor(u * o.length), g = i.tweenLength === !1 ? o.length : Math.round(a.length + (o.length - a.length) * r), p = fi(i.chars), f = i.refreshRate ?? di, d = f > 0 ? Math.floor(e * f / 1e3) : 0, m = i.seed ?? 1;
|
|
906
|
+
let T = "";
|
|
907
|
+
for (let b = 0; b < g; b++) {
|
|
908
|
+
const A = c ? b >= g - l : b < l, M = c ? o[o.length - (g - b)] : o[b];
|
|
909
|
+
A && M !== void 0 || M === " " || M === `
|
|
910
|
+
` ? T += M : T += p[pi(m, b, d) % p.length];
|
|
876
911
|
}
|
|
877
|
-
return
|
|
912
|
+
return T;
|
|
878
913
|
}
|
|
879
|
-
class
|
|
914
|
+
class gi {
|
|
880
915
|
id;
|
|
881
916
|
name;
|
|
882
917
|
_captions;
|
|
@@ -1057,8 +1092,8 @@ class ci {
|
|
|
1057
1092
|
for (const [n, r] of this._trackPlayers) {
|
|
1058
1093
|
const a = r.getTrack().property;
|
|
1059
1094
|
for (const { target: o, value: c, start: h } of r.getTargetValues(t)) {
|
|
1060
|
-
const u = `${o}\0${a}`, l = h <= t,
|
|
1061
|
-
(!
|
|
1095
|
+
const u = `${o}\0${a}`, l = h <= t, g = s.get(u);
|
|
1096
|
+
(!g || (l !== g.started ? l : l ? h >= g.start : h <= g.start)) && s.set(u, { trackId: n, target: o, property: a, value: c, start: h, started: l });
|
|
1062
1097
|
}
|
|
1063
1098
|
}
|
|
1064
1099
|
for (const { trackId: n, target: r, property: a, value: o, start: c } of s.values())
|
|
@@ -1075,12 +1110,12 @@ class ci {
|
|
|
1075
1110
|
o || (o = /* @__PURE__ */ new Map(), t.set(s, o));
|
|
1076
1111
|
const c = this._textTracks.get(e);
|
|
1077
1112
|
if (c && typeof r == "number") {
|
|
1078
|
-
o.set("text",
|
|
1113
|
+
o.set("text", mi(c.textConfig, r, Math.max(0, a)));
|
|
1079
1114
|
return;
|
|
1080
1115
|
}
|
|
1081
1116
|
const h = this._motionPathTracks.get(e);
|
|
1082
1117
|
if (h && typeof r == "number") {
|
|
1083
|
-
const u =
|
|
1118
|
+
const u = ui(h.motionPathConfig, r);
|
|
1084
1119
|
o.set("motionPathX", u.x), o.set("motionPathY", u.y), h.motionPathConfig.autoRotate && o.set("motionPathRotate", u.angle);
|
|
1085
1120
|
} else
|
|
1086
1121
|
o.set(n, r);
|
|
@@ -1108,16 +1143,16 @@ class ci {
|
|
|
1108
1143
|
*/
|
|
1109
1144
|
addTrack(t) {
|
|
1110
1145
|
if (this._tracks.push(t), this._sharedWrites = null, ut(t)) {
|
|
1111
|
-
this._trackPlayers.set(t.id, new
|
|
1146
|
+
this._trackPlayers.set(t.id, new li(t));
|
|
1112
1147
|
return;
|
|
1113
1148
|
}
|
|
1114
1149
|
if (dt(t)) {
|
|
1115
|
-
this._trackPlayers.set(t.id, new
|
|
1150
|
+
this._trackPlayers.set(t.id, new hi(t)), this._springTracks.set(t.id, t);
|
|
1116
1151
|
return;
|
|
1117
1152
|
}
|
|
1118
|
-
if (
|
|
1119
|
-
this._trackPlayers.set(t.id, new
|
|
1120
|
-
else if (
|
|
1153
|
+
if (Yt(t))
|
|
1154
|
+
this._trackPlayers.set(t.id, new ht(t)), this._textTracks.set(t.id, t);
|
|
1155
|
+
else if (re(t)) {
|
|
1121
1156
|
const e = {
|
|
1122
1157
|
id: t.id,
|
|
1123
1158
|
target: t.target,
|
|
@@ -1128,9 +1163,9 @@ class ci {
|
|
|
1128
1163
|
targets: t.targets,
|
|
1129
1164
|
stagger: t.stagger
|
|
1130
1165
|
};
|
|
1131
|
-
this._trackPlayers.set(t.id, new
|
|
1166
|
+
this._trackPlayers.set(t.id, new ht(e)), this._motionPathTracks.set(t.id, t);
|
|
1132
1167
|
} else
|
|
1133
|
-
this._trackPlayers.set(t.id, new
|
|
1168
|
+
this._trackPlayers.set(t.id, new ht(t));
|
|
1134
1169
|
}
|
|
1135
1170
|
/**
|
|
1136
1171
|
* Replace a track with a new version, keeping its place in the track order
|
|
@@ -1232,7 +1267,7 @@ class ci {
|
|
|
1232
1267
|
*/
|
|
1233
1268
|
toDefinition() {
|
|
1234
1269
|
return {
|
|
1235
|
-
formatVersion:
|
|
1270
|
+
formatVersion: ne(this._tracks),
|
|
1236
1271
|
id: this.id,
|
|
1237
1272
|
name: this.name,
|
|
1238
1273
|
config: { ...this._config },
|
|
@@ -1290,25 +1325,25 @@ class ci {
|
|
|
1290
1325
|
return this._config.alternate && (t === -1 || this._loopIteration < t) ? (this._loopIteration++, this._armRepeatDelay(), this._direction = "forward", this._repeatDelayRemaining === 0) : (this._playbackState = "idle", this.onComplete?.(), !1);
|
|
1291
1326
|
}
|
|
1292
1327
|
}
|
|
1293
|
-
const
|
|
1294
|
-
function
|
|
1295
|
-
const n = [], r = [], { duration: a, alternate: o } = s, c = (
|
|
1296
|
-
r.push([
|
|
1297
|
-
const
|
|
1298
|
-
i.forEach((
|
|
1299
|
-
(
|
|
1300
|
-
}),
|
|
1301
|
-
for (const
|
|
1328
|
+
const yi = 100;
|
|
1329
|
+
function Ti(i, t, e, s) {
|
|
1330
|
+
const n = [], r = [], { duration: a, alternate: o } = s, c = (p, f, d, m) => {
|
|
1331
|
+
r.push([p, f]);
|
|
1332
|
+
const T = [];
|
|
1333
|
+
i.forEach((b, A) => {
|
|
1334
|
+
(d === "forward" ? (m ? b >= p : b > p) && b <= f : (m ? b <= p : b < p) && b >= f) && T.push(A);
|
|
1335
|
+
}), T.sort((b, A) => (d === "forward" ? i[b] - i[A] : i[A] - i[b]) || b - A);
|
|
1336
|
+
for (const b of T) n.push({ kind: "event", index: b, direction: d });
|
|
1302
1337
|
};
|
|
1303
1338
|
let h = t.time, u = t.direction, l = t.fresh === !0;
|
|
1304
|
-
const
|
|
1305
|
-
for (let
|
|
1306
|
-
const
|
|
1307
|
-
c(h,
|
|
1339
|
+
const g = Math.min(yi, Math.max(0, e.iteration - t.iteration));
|
|
1340
|
+
for (let p = 0; p < g; p++) {
|
|
1341
|
+
const f = u === "forward" ? a : 0;
|
|
1342
|
+
c(h, f, u, l), n.push({ kind: "repeat" }), o ? (u = u === "forward" ? "reverse" : "forward", h = f, l = !1) : (h = u === "forward" ? 0 : a, l = !0);
|
|
1308
1343
|
}
|
|
1309
|
-
return
|
|
1344
|
+
return g > 0 && s.holding && !o ? { crossings: n, passes: r } : (c(h, e.time, u, l), { crossings: n, passes: r });
|
|
1310
1345
|
}
|
|
1311
|
-
function
|
|
1346
|
+
function bi(i) {
|
|
1312
1347
|
return { ...i, ...Array.isArray(i.end) && { end: [...i.end] } };
|
|
1313
1348
|
}
|
|
1314
1349
|
function W(i) {
|
|
@@ -1320,7 +1355,7 @@ function W(i) {
|
|
|
1320
1355
|
...i.stagger !== void 0 && { stagger: { ...i.stagger } }
|
|
1321
1356
|
};
|
|
1322
1357
|
}
|
|
1323
|
-
function
|
|
1358
|
+
function Ai(i) {
|
|
1324
1359
|
if (ut(i)) {
|
|
1325
1360
|
const t = i;
|
|
1326
1361
|
return {
|
|
@@ -1328,7 +1363,7 @@ function di(i) {
|
|
|
1328
1363
|
target: t.target,
|
|
1329
1364
|
property: t.property,
|
|
1330
1365
|
kind: "inertia",
|
|
1331
|
-
inertia:
|
|
1366
|
+
inertia: bi(t.inertia),
|
|
1332
1367
|
...W(t)
|
|
1333
1368
|
};
|
|
1334
1369
|
}
|
|
@@ -1343,7 +1378,7 @@ function di(i) {
|
|
|
1343
1378
|
...W(t)
|
|
1344
1379
|
};
|
|
1345
1380
|
}
|
|
1346
|
-
if (
|
|
1381
|
+
if (Yt(i)) {
|
|
1347
1382
|
const t = i;
|
|
1348
1383
|
return {
|
|
1349
1384
|
id: t.id,
|
|
@@ -1365,29 +1400,54 @@ function di(i) {
|
|
|
1365
1400
|
...W(t)
|
|
1366
1401
|
};
|
|
1367
1402
|
}
|
|
1368
|
-
return
|
|
1403
|
+
return ci({
|
|
1369
1404
|
id: i.id,
|
|
1370
1405
|
target: i.target,
|
|
1371
1406
|
property: i.property,
|
|
1372
1407
|
keyframes: i.keyframes,
|
|
1408
|
+
...i.interpolation !== void 0 && { interpolation: i.interpolation },
|
|
1373
1409
|
...W(i)
|
|
1374
1410
|
});
|
|
1375
1411
|
}
|
|
1376
|
-
function
|
|
1412
|
+
function et(i) {
|
|
1377
1413
|
const t = i.formatVersion ?? 1;
|
|
1378
|
-
if (t >
|
|
1414
|
+
if (t > At)
|
|
1379
1415
|
throw new Error(
|
|
1380
|
-
`tinyfly: this animation uses format version ${t}, but this tinyfly reads up to version ${
|
|
1416
|
+
`tinyfly: this animation uses format version ${t}, but this tinyfly reads up to version ${At}. Update tinyfly to play it.`
|
|
1381
1417
|
);
|
|
1382
|
-
return new
|
|
1418
|
+
return new gi({
|
|
1383
1419
|
id: i.id,
|
|
1384
1420
|
name: i.name,
|
|
1385
1421
|
config: i.config,
|
|
1386
|
-
tracks: i.tracks.map(
|
|
1422
|
+
tracks: i.tracks.map(Ai),
|
|
1387
1423
|
captions: i.captions
|
|
1388
1424
|
});
|
|
1389
1425
|
}
|
|
1390
|
-
|
|
1426
|
+
function Si(i) {
|
|
1427
|
+
const [t, e, s, n] = i;
|
|
1428
|
+
return [
|
|
1429
|
+
1 - 2 * (e * e + s * s),
|
|
1430
|
+
2 * (t * e + s * n),
|
|
1431
|
+
2 * (t * s - e * n),
|
|
1432
|
+
0,
|
|
1433
|
+
2 * (t * e - s * n),
|
|
1434
|
+
1 - 2 * (t * t + s * s),
|
|
1435
|
+
2 * (e * s + t * n),
|
|
1436
|
+
0,
|
|
1437
|
+
2 * (t * s + e * n),
|
|
1438
|
+
2 * (e * s - t * n),
|
|
1439
|
+
1 - 2 * (t * t + e * e),
|
|
1440
|
+
0,
|
|
1441
|
+
0,
|
|
1442
|
+
0,
|
|
1443
|
+
0,
|
|
1444
|
+
1
|
|
1445
|
+
];
|
|
1446
|
+
}
|
|
1447
|
+
function Mi(i) {
|
|
1448
|
+
return !Array.isArray(i) || i.length !== 4 ? null : `matrix3d(${Si(H(i)).map((e) => Math.round(e * 1e6) / 1e6 + 0).join(", ")})`;
|
|
1449
|
+
}
|
|
1450
|
+
const _i = /* @__PURE__ */ new Set([
|
|
1391
1451
|
"blur",
|
|
1392
1452
|
"brightness",
|
|
1393
1453
|
"glow",
|
|
@@ -1396,16 +1456,16 @@ const fi = /* @__PURE__ */ new Set([
|
|
|
1396
1456
|
"shadowY",
|
|
1397
1457
|
"shadowBlur",
|
|
1398
1458
|
"shadowColor"
|
|
1399
|
-
]),
|
|
1400
|
-
function
|
|
1459
|
+
]), ki = "#ffffff", wi = "rgba(0, 0, 0, 0.5)";
|
|
1460
|
+
function Pi(i) {
|
|
1401
1461
|
const t = [];
|
|
1402
|
-
if (i.blur !== void 0 && t.push(`blur(${Math.max(0, i.blur)}px)`), i.brightness !== void 0 && t.push(`brightness(${Math.max(0, i.brightness)})`), i.glow !== void 0 && t.push(`drop-shadow(0 0 ${Math.max(0, i.glow)}px ${i.glowColor ??
|
|
1462
|
+
if (i.blur !== void 0 && t.push(`blur(${Math.max(0, i.blur)}px)`), i.brightness !== void 0 && t.push(`brightness(${Math.max(0, i.brightness)})`), i.glow !== void 0 && t.push(`drop-shadow(0 0 ${Math.max(0, i.glow)}px ${i.glowColor ?? ki})`), i.shadowX !== void 0 || i.shadowY !== void 0 || i.shadowBlur !== void 0) {
|
|
1403
1463
|
const e = i.shadowX ?? 0, s = i.shadowY ?? 0, n = Math.max(0, i.shadowBlur ?? 0);
|
|
1404
|
-
t.push(`drop-shadow(${e}px ${s}px ${n}px ${i.shadowColor ??
|
|
1464
|
+
t.push(`drop-shadow(${e}px ${s}px ${n}px ${i.shadowColor ?? wi})`);
|
|
1405
1465
|
}
|
|
1406
1466
|
return t.length > 0 ? t.join(" ") : null;
|
|
1407
1467
|
}
|
|
1408
|
-
function
|
|
1468
|
+
function vi(i, t) {
|
|
1409
1469
|
const e = i.childNodes.length === 1 ? i.firstChild : null;
|
|
1410
1470
|
if (e && e.nodeType === 3) {
|
|
1411
1471
|
const s = e;
|
|
@@ -1414,12 +1474,12 @@ function yi(i, t) {
|
|
|
1414
1474
|
}
|
|
1415
1475
|
i.textContent !== t && (i.textContent = t);
|
|
1416
1476
|
}
|
|
1417
|
-
function
|
|
1477
|
+
function xi(i) {
|
|
1418
1478
|
if (!("ownerSVGElement" in i)) return;
|
|
1419
1479
|
const t = i.style;
|
|
1420
1480
|
!t || t.transformBox || (t.transformBox = "fill-box", t.transformOrigin || (t.transformOrigin = "50% 50%"));
|
|
1421
1481
|
}
|
|
1422
|
-
const
|
|
1482
|
+
const $t = /* @__PURE__ */ new Set([
|
|
1423
1483
|
"width",
|
|
1424
1484
|
"height",
|
|
1425
1485
|
"top",
|
|
@@ -1445,7 +1505,7 @@ const Ot = /* @__PURE__ */ new Set([
|
|
|
1445
1505
|
"gap",
|
|
1446
1506
|
"rowGap",
|
|
1447
1507
|
"columnGap"
|
|
1448
|
-
]),
|
|
1508
|
+
]), Ci = /* @__PURE__ */ new Set([
|
|
1449
1509
|
"x",
|
|
1450
1510
|
"y",
|
|
1451
1511
|
"z",
|
|
@@ -1459,18 +1519,38 @@ const Ot = /* @__PURE__ */ new Set([
|
|
|
1459
1519
|
"scaleZ",
|
|
1460
1520
|
"skewX",
|
|
1461
1521
|
"skewY",
|
|
1522
|
+
// A rotation as an [x, y, z, w] quaternion (a track with `interpolation: 'slerp'`)
|
|
1523
|
+
"quaternion",
|
|
1462
1524
|
// Motion path properties
|
|
1463
1525
|
"motionPathX",
|
|
1464
1526
|
"motionPathY",
|
|
1465
1527
|
"motionPathRotate"
|
|
1466
|
-
]),
|
|
1528
|
+
]), Ii = [
|
|
1529
|
+
"x",
|
|
1530
|
+
"motionPathX",
|
|
1531
|
+
"y",
|
|
1532
|
+
"motionPathY",
|
|
1533
|
+
"z",
|
|
1534
|
+
"rotate",
|
|
1535
|
+
"rotateZ",
|
|
1536
|
+
"motionPathRotate",
|
|
1537
|
+
"rotateX",
|
|
1538
|
+
"rotateY",
|
|
1539
|
+
"quaternion",
|
|
1540
|
+
"scale",
|
|
1541
|
+
"scaleX",
|
|
1542
|
+
"scaleY",
|
|
1543
|
+
"scaleZ",
|
|
1544
|
+
"skewX",
|
|
1545
|
+
"skewY"
|
|
1546
|
+
], Ri = /* @__PURE__ */ new Set(["childPerspective", "perspectiveOriginX", "perspectiveOriginY"]), Di = /* @__PURE__ */ new Set(["originX", "originY"]), Ei = /* @__PURE__ */ new Set(["clipTop", "clipRight", "clipBottom", "clipLeft"]), Bi = /* @__PURE__ */ new Set(["drawOn"]), Li = {
|
|
1467
1547
|
fill: "backgroundColor",
|
|
1468
1548
|
stroke: "borderColor",
|
|
1469
1549
|
strokeWidth: "borderWidth",
|
|
1470
1550
|
color: "color",
|
|
1471
1551
|
backgroundColor: "backgroundColor",
|
|
1472
1552
|
borderColor: "borderColor"
|
|
1473
|
-
},
|
|
1553
|
+
}, Xt = {
|
|
1474
1554
|
fill: "fill",
|
|
1475
1555
|
stroke: "stroke",
|
|
1476
1556
|
strokeWidth: "strokeWidth",
|
|
@@ -1478,8 +1558,8 @@ const Ot = /* @__PURE__ */ new Set([
|
|
|
1478
1558
|
strokeDashoffset: "strokeDashoffset",
|
|
1479
1559
|
fillOpacity: "fillOpacity",
|
|
1480
1560
|
strokeOpacity: "strokeOpacity"
|
|
1481
|
-
},
|
|
1482
|
-
class
|
|
1561
|
+
}, Oi = "http://www.w3.org/2000/svg";
|
|
1562
|
+
class Q {
|
|
1483
1563
|
targets = /* @__PURE__ */ new Map();
|
|
1484
1564
|
/**
|
|
1485
1565
|
* Register an HTML element as an animation target.
|
|
@@ -1518,50 +1598,58 @@ class H {
|
|
|
1518
1598
|
* Apply properties to a single element.
|
|
1519
1599
|
*/
|
|
1520
1600
|
applyProperties(t, e) {
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
typeof
|
|
1531
|
-
else if (
|
|
1532
|
-
typeof
|
|
1533
|
-
else if (
|
|
1534
|
-
(
|
|
1535
|
-
else if (
|
|
1536
|
-
if (
|
|
1537
|
-
|
|
1538
|
-
else if (
|
|
1539
|
-
const
|
|
1540
|
-
(
|
|
1601
|
+
let s = null, n = null, r = null, a = null, o = null;
|
|
1602
|
+
const c = e.has("motionPathX"), h = e.has("motionPathY"), u = e.has("motionPathRotate");
|
|
1603
|
+
for (const [f, d] of e)
|
|
1604
|
+
if (!(f === "x" && c) && !(f === "y" && h) && !((f === "rotate" || f === "rotateZ") && u) && !Bi.has(f)) {
|
|
1605
|
+
if (Ci.has(f))
|
|
1606
|
+
(s ??= {})[f] = d;
|
|
1607
|
+
else if (Ri.has(f))
|
|
1608
|
+
typeof d == "number" && ((n ??= {})[f] = d);
|
|
1609
|
+
else if (Di.has(f))
|
|
1610
|
+
typeof d == "number" && ((r ??= {})[f] = d);
|
|
1611
|
+
else if (Ei.has(f))
|
|
1612
|
+
typeof d == "number" && ((a ??= {})[f] = d);
|
|
1613
|
+
else if (_i.has(f))
|
|
1614
|
+
(o ??= {})[f] = d;
|
|
1615
|
+
else if (f !== "perspective") {
|
|
1616
|
+
if (f !== "shine") if (f === "text" && typeof d == "string")
|
|
1617
|
+
vi(t, d);
|
|
1618
|
+
else if (f === "d" && typeof d == "string") {
|
|
1619
|
+
const m = t;
|
|
1620
|
+
(m.tagName?.toLowerCase() === "path" ? m : m.querySelector?.("path"))?.setAttribute?.("d", d);
|
|
1541
1621
|
} else
|
|
1542
|
-
this.applyStyleProperty(t,
|
|
1622
|
+
this.applyStyleProperty(t, f, d);
|
|
1543
1623
|
}
|
|
1544
1624
|
}
|
|
1545
|
-
const
|
|
1546
|
-
typeof
|
|
1547
|
-
const
|
|
1548
|
-
if (typeof
|
|
1549
|
-
const
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1625
|
+
const l = e.get("shine");
|
|
1626
|
+
typeof l == "number" && this.applyShine(t, l);
|
|
1627
|
+
const g = [], p = e.get("perspective");
|
|
1628
|
+
if (typeof p == "number" && p > 0 && g.push(`perspective(${p}px)`), s)
|
|
1629
|
+
for (const f of Ii) {
|
|
1630
|
+
const d = s[f];
|
|
1631
|
+
if (d === void 0) continue;
|
|
1632
|
+
const m = this.buildTransformPart(f, d);
|
|
1633
|
+
m && g.push(m);
|
|
1634
|
+
}
|
|
1635
|
+
if (g.length > 0 && (t.style.transform = g.join(" "), xi(t)), n && (n.childPerspective !== void 0 && (t.style.perspective = `${n.childPerspective}px`), (n.perspectiveOriginX !== void 0 || n.perspectiveOriginY !== void 0) && (t.style.perspectiveOrigin = `${n.perspectiveOriginX ?? 50}% ${n.perspectiveOriginY ?? 50}%`)), r) {
|
|
1636
|
+
const f = r.originX ?? 50, d = r.originY ?? 50;
|
|
1637
|
+
t.style.transformOrigin = `${f}% ${d}%`;
|
|
1555
1638
|
}
|
|
1556
1639
|
if (a) {
|
|
1557
|
-
const d =
|
|
1558
|
-
|
|
1640
|
+
const f = a.clipTop ?? 0, d = a.clipRight ?? 0, m = a.clipBottom ?? 0, T = a.clipLeft ?? 0;
|
|
1641
|
+
t.style.clipPath = `inset(${f}% ${d}% ${m}% ${T}%)`;
|
|
1642
|
+
}
|
|
1643
|
+
if (o) {
|
|
1644
|
+
const f = Pi(o);
|
|
1645
|
+
f && (t.style.filter = f);
|
|
1559
1646
|
}
|
|
1560
1647
|
}
|
|
1561
1648
|
/**
|
|
1562
1649
|
* Build a transform function string for a property.
|
|
1563
1650
|
*/
|
|
1564
1651
|
buildTransformPart(t, e) {
|
|
1652
|
+
if (t === "quaternion") return Mi(e);
|
|
1565
1653
|
if (typeof e != "number") return null;
|
|
1566
1654
|
switch (t) {
|
|
1567
1655
|
case "x":
|
|
@@ -1614,13 +1702,13 @@ class H {
|
|
|
1614
1702
|
*/
|
|
1615
1703
|
applyStyleProperty(t, e, s) {
|
|
1616
1704
|
let n;
|
|
1617
|
-
if (t.namespaceURI ===
|
|
1705
|
+
if (t.namespaceURI === Oi && e in Xt) {
|
|
1618
1706
|
const o = Array.isArray(s) ? s.join(", ") : String(s);
|
|
1619
|
-
t.style[
|
|
1707
|
+
t.style[Xt[e]] = o;
|
|
1620
1708
|
return;
|
|
1621
|
-
} else e === "fill" && t.dataset?.elementType === "text" ? n = "color" : n =
|
|
1709
|
+
} else e === "fill" && t.dataset?.elementType === "text" ? n = "color" : n = Li[e] ?? e;
|
|
1622
1710
|
let a;
|
|
1623
|
-
typeof s == "number" ?
|
|
1711
|
+
typeof s == "number" ? $t.has(e) || $t.has(n) ? a = `${s}px` : a = String(s) : Array.isArray(s) ? a = s.join(", ") : a = s, t.style[n] = a;
|
|
1624
1712
|
}
|
|
1625
1713
|
}
|
|
1626
1714
|
class Ft {
|
|
@@ -1662,7 +1750,7 @@ class Ft {
|
|
|
1662
1750
|
});
|
|
1663
1751
|
}
|
|
1664
1752
|
}
|
|
1665
|
-
function
|
|
1753
|
+
function $i(i, t, e, s, n) {
|
|
1666
1754
|
const r = e - n;
|
|
1667
1755
|
if (r < 0) {
|
|
1668
1756
|
t.paused || t.pause(), t.currentTime = 0;
|
|
@@ -1670,7 +1758,7 @@ function wi(i, t, e, s, n) {
|
|
|
1670
1758
|
}
|
|
1671
1759
|
i.update(r, s);
|
|
1672
1760
|
}
|
|
1673
|
-
class
|
|
1761
|
+
class Zt {
|
|
1674
1762
|
container;
|
|
1675
1763
|
timeline = null;
|
|
1676
1764
|
adapter;
|
|
@@ -1709,7 +1797,7 @@ class Gt {
|
|
|
1709
1797
|
this.container = s;
|
|
1710
1798
|
} else
|
|
1711
1799
|
this.container = t;
|
|
1712
|
-
this.options = e, this.adapter = new
|
|
1800
|
+
this.options = e, this.adapter = new Q();
|
|
1713
1801
|
}
|
|
1714
1802
|
/**
|
|
1715
1803
|
* Load animation from a URL or JSON object.
|
|
@@ -1735,7 +1823,7 @@ class Gt {
|
|
|
1735
1823
|
*/
|
|
1736
1824
|
useDefinition(t) {
|
|
1737
1825
|
const e = { ...t.config };
|
|
1738
|
-
this.options.speed !== void 0 && (e.speed = this.options.speed), this.options.loop !== void 0 && (e.loop = this.options.loop), this.options.alternate !== void 0 && (e.alternate = this.options.alternate), this.timeline =
|
|
1826
|
+
this.options.speed !== void 0 && (e.speed = this.options.speed), this.options.loop !== void 0 && (e.loop = this.options.loop), this.options.alternate !== void 0 && (e.alternate = this.options.alternate), this.timeline = et({ ...t, config: e }), this.markerList = this.timeline.markers, this.lastMarkerId = null, this.options.onComplete && (this.timeline.onComplete = this.options.onComplete), this.options.onUpdate && (this.timeline.onUpdate = this.options.onUpdate), this.autoRegisterTargets(), this.setupSymbolInstances(), this.scanMedia();
|
|
1739
1827
|
}
|
|
1740
1828
|
// --- scenarios: the reader chooses which timeline plays --------------------
|
|
1741
1829
|
/**
|
|
@@ -1908,7 +1996,7 @@ class Gt {
|
|
|
1908
1996
|
/** Sync all discovered media targets to a timeline time. */
|
|
1909
1997
|
syncAllMedia(t, e) {
|
|
1910
1998
|
for (const s of this.mediaTargets)
|
|
1911
|
-
|
|
1999
|
+
$i(s.sync, s.el, t, e, s.startTime);
|
|
1912
2000
|
}
|
|
1913
2001
|
/**
|
|
1914
2002
|
* Load animation from inline JSON string.
|
|
@@ -1958,11 +2046,11 @@ class Gt {
|
|
|
1958
2046
|
if (!n) return;
|
|
1959
2047
|
const r = e.get(n);
|
|
1960
2048
|
if (!r || !r.timeline.tracks?.length) return;
|
|
1961
|
-
const a = new
|
|
2049
|
+
const a = new Q();
|
|
1962
2050
|
s.querySelectorAll("[data-tinyfly]").forEach((o) => {
|
|
1963
2051
|
const c = o.getAttribute("data-tinyfly");
|
|
1964
2052
|
c && a.registerTarget(c, o);
|
|
1965
|
-
}), this.symbolInstances.push({ adapter: a, timeline:
|
|
2053
|
+
}), this.symbolInstances.push({ adapter: a, timeline: et(r.timeline) });
|
|
1966
2054
|
});
|
|
1967
2055
|
}
|
|
1968
2056
|
/**
|
|
@@ -2071,7 +2159,7 @@ class Gt {
|
|
|
2071
2159
|
this.playhead = s;
|
|
2072
2160
|
const n = this.markers;
|
|
2073
2161
|
if (n.length === 0) return;
|
|
2074
|
-
const { crossings: r } =
|
|
2162
|
+
const { crossings: r } = Ti(
|
|
2075
2163
|
n.map((a) => a.time),
|
|
2076
2164
|
t,
|
|
2077
2165
|
s,
|
|
@@ -2099,14 +2187,14 @@ class Gt {
|
|
|
2099
2187
|
}
|
|
2100
2188
|
}
|
|
2101
2189
|
}
|
|
2102
|
-
async function
|
|
2103
|
-
const s = new
|
|
2190
|
+
async function Fi(i, t, e = {}) {
|
|
2191
|
+
const s = new Zt(i, { ...e, autoplay: !0 });
|
|
2104
2192
|
return await s.load(t), s;
|
|
2105
2193
|
}
|
|
2106
|
-
function
|
|
2107
|
-
return new
|
|
2194
|
+
function Yi(i, t = {}) {
|
|
2195
|
+
return new Zt(i, t);
|
|
2108
2196
|
}
|
|
2109
|
-
class
|
|
2197
|
+
class Xi {
|
|
2110
2198
|
container;
|
|
2111
2199
|
containerA;
|
|
2112
2200
|
containerB;
|
|
@@ -2136,7 +2224,7 @@ class Pi {
|
|
|
2136
2224
|
this.container = s;
|
|
2137
2225
|
} else
|
|
2138
2226
|
this.container = t;
|
|
2139
|
-
this.options = e, this.container.style.position = "relative", this.container.style.overflow = "hidden", this.containerA = this.createSceneContainer(), this.containerB = this.createSceneContainer(), this.container.appendChild(this.containerA), this.container.appendChild(this.containerB), this.containerB.style.visibility = "hidden", this.adapterA = new
|
|
2227
|
+
this.options = e, this.container.style.position = "relative", this.container.style.overflow = "hidden", this.containerA = this.createSceneContainer(), this.containerB = this.createSceneContainer(), this.container.appendChild(this.containerA), this.container.appendChild(this.containerB), this.containerB.style.visibility = "hidden", this.adapterA = new Q(), this.adapterB = new Q();
|
|
2140
2228
|
}
|
|
2141
2229
|
/**
|
|
2142
2230
|
* Load a sequence from a URL or inline definition.
|
|
@@ -2256,11 +2344,11 @@ class Pi {
|
|
|
2256
2344
|
if (!r) return;
|
|
2257
2345
|
const a = this.symbolDefs.get(r);
|
|
2258
2346
|
if (!a) return;
|
|
2259
|
-
const o = new
|
|
2347
|
+
const o = new Q();
|
|
2260
2348
|
n.querySelectorAll("[data-tinyfly]").forEach((c) => {
|
|
2261
2349
|
const h = c.getAttribute("data-tinyfly");
|
|
2262
2350
|
h && o.registerTarget(h, c);
|
|
2263
|
-
}), s.push({ adapter: o, timeline:
|
|
2351
|
+
}), s.push({ adapter: o, timeline: et(a) });
|
|
2264
2352
|
}), s.length ? this.nestedByAdapter.set(e, s) : this.nestedByAdapter.delete(e);
|
|
2265
2353
|
}
|
|
2266
2354
|
/** Apply the nested symbol states for a slot at a given scene time. */
|
|
@@ -2276,7 +2364,7 @@ class Pi {
|
|
|
2276
2364
|
t.innerHTML = "";
|
|
2277
2365
|
}
|
|
2278
2366
|
createTimeline(t) {
|
|
2279
|
-
return t.timeline ?
|
|
2367
|
+
return t.timeline ? et(t.timeline) : null;
|
|
2280
2368
|
}
|
|
2281
2369
|
onSceneComplete() {
|
|
2282
2370
|
if (this._isDestroyed || !this.sequence) return;
|
|
@@ -2375,18 +2463,18 @@ class Pi {
|
|
|
2375
2463
|
this.animationFrameId !== void 0 && (cancelAnimationFrame(this.animationFrameId), this.animationFrameId = void 0);
|
|
2376
2464
|
}
|
|
2377
2465
|
}
|
|
2378
|
-
async function
|
|
2379
|
-
const s = new
|
|
2466
|
+
async function Ni(i, t, e = {}) {
|
|
2467
|
+
const s = new Xi(i, { ...e, autoplay: !0 });
|
|
2380
2468
|
return await s.load(t), s;
|
|
2381
2469
|
}
|
|
2382
|
-
const
|
|
2470
|
+
const qi = { type: "none", duration: 0 };
|
|
2383
2471
|
export {
|
|
2384
|
-
|
|
2472
|
+
qi as DEFAULT_TRANSITION,
|
|
2385
2473
|
Ft as MediaSync,
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2474
|
+
Zt as TinyflyPlayer,
|
|
2475
|
+
Xi as TinyflySequencer,
|
|
2476
|
+
Yi as create,
|
|
2477
|
+
Fi as play,
|
|
2478
|
+
Ni as playSequence,
|
|
2479
|
+
$i as syncMediaElement
|
|
2392
2480
|
};
|