@algorisys/tinyfly 0.70.2 → 0.74.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -8
- package/bin/tinyfly.mjs +95 -2
- package/lib/addons/adapters.js +31 -12
- package/lib/addons/characters.js +211 -0
- package/lib/addons/export.js +476 -440
- package/lib/browser/tinyfly.iife.js +4 -4
- package/lib/browser/tinyfly.js +1339 -1095
- package/lib/browser/tinyfly.umd.js +4 -4
- package/lib/engine/tinyfly-engine.js +313 -277
- package/lib/engine/tinyfly-engine.umd.cjs +2 -2
- package/lib/headless/headless.js +947 -0
- package/lib/types/adapters/canvas/canvas-adapter.d.ts +32 -2
- package/lib/types/browser/index.d.ts +3 -1
- package/lib/types/characters/index.d.ts +5 -0
- package/lib/types/characters/stick-figure.d.ts +174 -0
- package/lib/types/engine/authoring/index.d.ts +1 -0
- package/lib/types/engine/authoring/narration.d.ts +80 -0
- package/lib/types/engine/export/captions.d.ts +31 -0
- package/lib/types/engine/export/index.d.ts +1 -0
- package/lib/types/headless/ffmpeg-args.d.ts +28 -0
- package/lib/types/headless/frame-renderer.d.ts +45 -0
- package/lib/types/headless/index.d.ts +12 -0
- package/lib/types/headless/narration-audio.d.ts +13 -0
- package/lib/types/headless/node-audio.d.ts +46 -0
- package/lib/types/headless/node-video.d.ts +48 -0
- package/lib/types/headless/scene-captions.d.ts +4 -0
- package/lib/types/headless/video-scene.d.ts +57 -0
- package/package.json +19 -4
package/lib/browser/tinyfly.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
function
|
|
1
|
+
function cn(i) {
|
|
2
2
|
return typeof i == "object" && i !== null && i.type === "cubic-bezier";
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function Rt(i) {
|
|
5
5
|
return typeof i == "object" && i !== null && i.type !== "cubic-bezier";
|
|
6
6
|
}
|
|
7
|
-
const
|
|
8
|
-
function
|
|
7
|
+
const Lt = 1;
|
|
8
|
+
function ve(i) {
|
|
9
9
|
return i.property === "text" && "textConfig" in i;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function tt(i) {
|
|
12
12
|
return i.kind === "inertia" && "inertia" in i;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function et(i) {
|
|
15
15
|
return i.kind === "spring" && "spring" in i;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function mi(i) {
|
|
18
18
|
return i.property === "motionPath" && "motionPathConfig" in i;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function Uo(i) {
|
|
21
21
|
return typeof i == "object" && i !== null && "x" in i && "y" in i && "angle" in i;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function ln(i) {
|
|
24
24
|
return "keyframes" in i;
|
|
25
25
|
}
|
|
26
|
-
class
|
|
26
|
+
class Ho {
|
|
27
27
|
_currentTime = 0;
|
|
28
28
|
_isRunning = !1;
|
|
29
29
|
onTick = null;
|
|
@@ -49,7 +49,7 @@ class To {
|
|
|
49
49
|
this._currentTime = t;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
class
|
|
52
|
+
class zo {
|
|
53
53
|
_currentTime = 0;
|
|
54
54
|
_isRunning = !1;
|
|
55
55
|
_lastFrameTime = null;
|
|
@@ -96,7 +96,7 @@ class xo {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function gi(i, t, e = "start") {
|
|
100
100
|
if (t <= 1) return 0;
|
|
101
101
|
if (typeof e == "number") {
|
|
102
102
|
const n = Math.max(0, Math.min(t - 1, e));
|
|
@@ -113,36 +113,36 @@ function hi(i, t, e = "start") {
|
|
|
113
113
|
return i;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function yi(i, t = "start") {
|
|
117
117
|
if (i <= 1) return 0;
|
|
118
118
|
let e = 0;
|
|
119
119
|
for (let n = 0; n < i; n++)
|
|
120
|
-
e = Math.max(e,
|
|
120
|
+
e = Math.max(e, gi(n, i, t));
|
|
121
121
|
return e;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function we(i, t, e) {
|
|
124
124
|
if (e.offsets) return e.offsets[i] ?? 0;
|
|
125
|
-
const n = e.from ?? "start", s =
|
|
125
|
+
const n = e.from ?? "start", s = gi(i, t, n);
|
|
126
126
|
if (e.amount !== void 0) {
|
|
127
|
-
const r =
|
|
127
|
+
const r = yi(t, n);
|
|
128
128
|
return r === 0 ? 0 : e.amount * s / r;
|
|
129
129
|
}
|
|
130
130
|
return e.each !== void 0 ? e.each * s : 0;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
return Array.from({ length: i }, (e, n) =>
|
|
132
|
+
function ae(i, t) {
|
|
133
|
+
return Array.from({ length: i }, (e, n) => we(n, i, t));
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
return i <= 1 ? 0 : Math.max(...
|
|
135
|
+
function Yt(i, t) {
|
|
136
|
+
return i <= 1 ? 0 : Math.max(...ae(i, t));
|
|
137
137
|
}
|
|
138
|
-
const
|
|
138
|
+
const yt = 1, bi = 6e4, At = bi / yt, X = {
|
|
139
139
|
stiffness: 180,
|
|
140
140
|
damping: 12,
|
|
141
141
|
mass: 1,
|
|
142
142
|
velocity: 0,
|
|
143
143
|
restDelta: 0.01,
|
|
144
144
|
restSpeed: 0.1
|
|
145
|
-
},
|
|
145
|
+
}, Ht = {
|
|
146
146
|
gentle: { stiffness: 120, damping: 18, mass: 1 },
|
|
147
147
|
default: { stiffness: 180, damping: 12, mass: 1 },
|
|
148
148
|
snappy: { stiffness: 280, damping: 20, mass: 1 },
|
|
@@ -150,7 +150,7 @@ const dt = 1, fi = 6e4, xt = fi / dt, X = {
|
|
|
150
150
|
wobbly: { stiffness: 180, damping: 5, mass: 1 },
|
|
151
151
|
stiff: { stiffness: 400, damping: 30, mass: 1 }
|
|
152
152
|
};
|
|
153
|
-
class
|
|
153
|
+
class Xt {
|
|
154
154
|
from;
|
|
155
155
|
to;
|
|
156
156
|
stiffness;
|
|
@@ -193,10 +193,10 @@ class Ot {
|
|
|
193
193
|
*/
|
|
194
194
|
valueAt(t) {
|
|
195
195
|
if (t <= 0) return this.from;
|
|
196
|
-
const e = Math.floor(t /
|
|
196
|
+
const e = Math.floor(t / yt);
|
|
197
197
|
if (this.simulateTo(e + 1), this.settledStep !== null && e >= this.settledStep)
|
|
198
198
|
return this.to;
|
|
199
|
-
const n = this.samples[Math.min(e, this.samples.length - 1)], s = this.samples[Math.min(e + 1, this.samples.length - 1)], r = t /
|
|
199
|
+
const n = this.samples[Math.min(e, this.samples.length - 1)], s = this.samples[Math.min(e + 1, this.samples.length - 1)], r = t / yt - e;
|
|
200
200
|
return n + (s - n) * r;
|
|
201
201
|
}
|
|
202
202
|
/**
|
|
@@ -204,12 +204,12 @@ class Ot {
|
|
|
204
204
|
* of a spring track. Runs the simulation to completion once.
|
|
205
205
|
*/
|
|
206
206
|
settleTime() {
|
|
207
|
-
return this.simulateTo(
|
|
207
|
+
return this.simulateTo(At + 1), this.settledStep !== null ? this.settledStep * yt : bi;
|
|
208
208
|
}
|
|
209
209
|
/** Advance the cached simulation until it holds at least `steps` samples. */
|
|
210
210
|
simulateTo(t) {
|
|
211
211
|
if (this.settledStep !== null) return;
|
|
212
|
-
const e = Math.min(t,
|
|
212
|
+
const e = Math.min(t, At + 1), n = yt / 1e3;
|
|
213
213
|
for (; this.samples.length < e; ) {
|
|
214
214
|
const s = this.samples[this.samples.length - 1], r = s - this.to, o = -this.stiffness * r, a = -this.damping * this.velocity, c = (o + a) / this.mass;
|
|
215
215
|
this.velocity += c * n;
|
|
@@ -219,32 +219,32 @@ class Ot {
|
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
-
this.samples.length >
|
|
222
|
+
this.samples.length > At && (this.settledStep = At);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
return new
|
|
225
|
+
function Go(i, t) {
|
|
226
|
+
return new Xt(i).valueAt(t);
|
|
227
227
|
}
|
|
228
|
-
function
|
|
229
|
-
return new
|
|
228
|
+
function hn(i) {
|
|
229
|
+
return new Xt(i).settleTime();
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function Ko(i) {
|
|
232
232
|
const t = i.stiffness ?? X.stiffness, e = i.damping ?? X.damping, n = i.mass ?? X.mass;
|
|
233
233
|
return e < 2 * Math.sqrt(t * n);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function Zo(i) {
|
|
236
236
|
const t = i.stiffness ?? X.stiffness, e = i.mass ?? X.mass;
|
|
237
237
|
return 2 * Math.sqrt(t * e);
|
|
238
238
|
}
|
|
239
|
-
const
|
|
240
|
-
function
|
|
241
|
-
const t = i.friction ??
|
|
242
|
-
return t > 0 ? t :
|
|
239
|
+
const Ee = 4, un = 2e-3, fn = 1e-4, dn = 6e4;
|
|
240
|
+
function Vt(i) {
|
|
241
|
+
const t = i.friction ?? Ee;
|
|
242
|
+
return t > 0 ? t : Ee;
|
|
243
243
|
}
|
|
244
|
-
function
|
|
245
|
-
return i.from + i.velocity /
|
|
244
|
+
function $t(i) {
|
|
245
|
+
return i.from + i.velocity / Vt(i);
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function pn(i, t) {
|
|
248
248
|
if (t === void 0) return i;
|
|
249
249
|
if (typeof t == "number")
|
|
250
250
|
return t > 0 ? Math.round(i / t) * t : i;
|
|
@@ -254,42 +254,42 @@ function sn(i, t) {
|
|
|
254
254
|
Math.abs(n - i) < Math.abs(e - i) && (e = n);
|
|
255
255
|
return e;
|
|
256
256
|
}
|
|
257
|
-
function
|
|
258
|
-
let t =
|
|
257
|
+
function kt(i) {
|
|
258
|
+
let t = pn($t(i), i.end);
|
|
259
259
|
return i.min !== void 0 && (t = Math.max(i.min, t)), i.max !== void 0 && (t = Math.min(i.max, t)), t;
|
|
260
260
|
}
|
|
261
|
-
function
|
|
262
|
-
const t = Math.abs(
|
|
261
|
+
function xt(i) {
|
|
262
|
+
const t = Math.abs(kt(i) - i.from);
|
|
263
263
|
if (t === 0) return 0;
|
|
264
|
-
const e = i.restDelta ?? Math.max(
|
|
264
|
+
const e = i.restDelta ?? Math.max(fn, t * un);
|
|
265
265
|
if (e >= t) return 0;
|
|
266
|
-
const n = Math.log(t / e) /
|
|
267
|
-
return Math.min(
|
|
266
|
+
const n = Math.log(t / e) / Vt(i);
|
|
267
|
+
return Math.min(dn, n * 1e3);
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function ce(i, t) {
|
|
270
270
|
if (t <= 0) return i.from;
|
|
271
|
-
const e =
|
|
272
|
-
if (t >=
|
|
273
|
-
const n =
|
|
271
|
+
const e = kt(i);
|
|
272
|
+
if (t >= xt(i)) return e;
|
|
273
|
+
const n = Vt(i);
|
|
274
274
|
return i.from + (e - i.from) * (1 - Math.exp(-n * t / 1e3));
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
const e =
|
|
278
|
-
return t >=
|
|
279
|
-
}
|
|
280
|
-
const
|
|
281
|
-
linear:
|
|
282
|
-
"ease-in":
|
|
283
|
-
"ease-out":
|
|
284
|
-
"ease-in-out":
|
|
285
|
-
"ease-in-quad":
|
|
286
|
-
"ease-out-quad":
|
|
287
|
-
"ease-in-out-quad":
|
|
288
|
-
"ease-in-cubic":
|
|
289
|
-
"ease-out-cubic":
|
|
290
|
-
"ease-in-out-cubic":
|
|
276
|
+
function Qo(i, t) {
|
|
277
|
+
const e = Vt(i), n = kt(i);
|
|
278
|
+
return t >= xt(i) ? 0 : (n - i.from) * e * Math.exp(-e * Math.max(0, t) / 1e3);
|
|
279
|
+
}
|
|
280
|
+
const le = (i) => i, mn = (i) => i * i, gn = (i) => 1 - (1 - i) * (1 - i), yn = (i) => i < 0.5 ? 2 * i * i : 1 - Math.pow(-2 * i + 2, 2) / 2, vi = (i) => i * i * i, wi = (i) => 1 - Math.pow(1 - i, 3), Wt = (i) => i < 0.5 ? 4 * i * i * i : 1 - Math.pow(-2 * i + 2, 3) / 2, bn = vi, vn = wi, wn = Wt, Tn = {
|
|
281
|
+
linear: le,
|
|
282
|
+
"ease-in": bn,
|
|
283
|
+
"ease-out": vn,
|
|
284
|
+
"ease-in-out": wn,
|
|
285
|
+
"ease-in-quad": mn,
|
|
286
|
+
"ease-out-quad": gn,
|
|
287
|
+
"ease-in-out-quad": yn,
|
|
288
|
+
"ease-in-cubic": vi,
|
|
289
|
+
"ease-out-cubic": wi,
|
|
290
|
+
"ease-in-out-cubic": Wt
|
|
291
291
|
};
|
|
292
|
-
function
|
|
292
|
+
function kn(i) {
|
|
293
293
|
const [t, e, n, s] = i, r = 3 * t, o = 3 * (n - t) - r, a = 1 - r - o, c = 3 * e, l = 3 * (s - e) - c, h = 1 - c - l, f = (p) => ((a * p + o) * p + r) * p, u = (p) => ((h * p + l) * p + c) * p, d = (p) => (3 * a * p + 2 * o) * p + r, m = (p) => {
|
|
294
294
|
let g = p;
|
|
295
295
|
for (let b = 0; b < 8; b++) {
|
|
@@ -317,16 +317,16 @@ function fn(i) {
|
|
|
317
317
|
return u(g);
|
|
318
318
|
};
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function zt(i, t = "out") {
|
|
321
321
|
if (t === "out") return i;
|
|
322
322
|
const e = (n) => 1 - i(1 - n);
|
|
323
323
|
return t === "in" ? e : (n) => n < 0.5 ? e(n * 2) / 2 : i(n * 2 - 1) / 2 + 0.5;
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function xn(i = 1, t = 0.3) {
|
|
326
326
|
const e = Math.max(1, i), n = t / (2 * Math.PI) * Math.asin(1 / e);
|
|
327
327
|
return (s) => s <= 0 ? 0 : s >= 1 ? 1 : e * Math.pow(2, -10 * s) * Math.sin((s - n) * (2 * Math.PI) / t) + 1;
|
|
328
328
|
}
|
|
329
|
-
const
|
|
329
|
+
const Sn = (i) => {
|
|
330
330
|
if (i <= 0) return 0;
|
|
331
331
|
if (i >= 1) return 1;
|
|
332
332
|
if (i < 1 / 2.75) return 7.5625 * i * i;
|
|
@@ -341,7 +341,7 @@ const pn = (i) => {
|
|
|
341
341
|
const n = i - 2.625 / 2.75;
|
|
342
342
|
return 7.5625 * n * n + 0.984375;
|
|
343
343
|
};
|
|
344
|
-
function
|
|
344
|
+
function Mn(i = 1.70158) {
|
|
345
345
|
return (t) => {
|
|
346
346
|
if (t <= 0) return 0;
|
|
347
347
|
if (t >= 1) return 1;
|
|
@@ -349,7 +349,7 @@ function mn(i = 1.70158) {
|
|
|
349
349
|
return e * e * ((i + 1) * e + i) + 1;
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function An(i, t = "end") {
|
|
353
353
|
const e = Math.max(1, Math.floor(i));
|
|
354
354
|
return (n) => {
|
|
355
355
|
if (n >= 1) return 1;
|
|
@@ -367,22 +367,22 @@ function gn(i, t = "end") {
|
|
|
367
367
|
}
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function En(i) {
|
|
371
371
|
switch (i.type) {
|
|
372
372
|
case "steps":
|
|
373
|
-
return
|
|
373
|
+
return An(i.count, i.position);
|
|
374
374
|
case "elastic":
|
|
375
|
-
return
|
|
375
|
+
return zt(xn(i.amplitude, i.period), i.mode);
|
|
376
376
|
case "bounce":
|
|
377
|
-
return
|
|
377
|
+
return zt(Sn, i.mode);
|
|
378
378
|
case "back":
|
|
379
|
-
return
|
|
379
|
+
return zt(Mn(i.overshoot), i.mode);
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
return i === void 0 ?
|
|
382
|
+
function z(i) {
|
|
383
|
+
return i === void 0 ? le : cn(i) ? kn(i.points) : Rt(i) ? En(i) : Tn[i] ?? le;
|
|
384
384
|
}
|
|
385
|
-
const
|
|
385
|
+
const Pe = 32, Pn = 256, nt = /* @__PURE__ */ new Map(), Cn = /[MmLlHhVvCcSsQqTtAaZz]/, _n = /^[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?/, In = {
|
|
386
386
|
M: 2,
|
|
387
387
|
L: 2,
|
|
388
388
|
H: 1,
|
|
@@ -394,7 +394,7 @@ const xe = 32, bn = 256, tt = /* @__PURE__ */ new Map(), vn = /[MmLlHhVvCcSsQqTt
|
|
|
394
394
|
A: 7,
|
|
395
395
|
Z: 0
|
|
396
396
|
};
|
|
397
|
-
function
|
|
397
|
+
function Rn(i) {
|
|
398
398
|
const t = [];
|
|
399
399
|
let e = 0, n = null;
|
|
400
400
|
const s = () => {
|
|
@@ -402,7 +402,7 @@ function xn(i) {
|
|
|
402
402
|
};
|
|
403
403
|
for (; e < i.length && (s(), !(e >= i.length)); ) {
|
|
404
404
|
const r = i[e];
|
|
405
|
-
if (
|
|
405
|
+
if (Cn.test(r)) {
|
|
406
406
|
n = { type: r, args: [] }, t.push(n), e++;
|
|
407
407
|
continue;
|
|
408
408
|
}
|
|
@@ -413,13 +413,13 @@ function xn(i) {
|
|
|
413
413
|
n.args.push(r === "1" ? 1 : 0), e++;
|
|
414
414
|
continue;
|
|
415
415
|
}
|
|
416
|
-
const c =
|
|
416
|
+
const c = _n.exec(i.slice(e));
|
|
417
417
|
if (!c) break;
|
|
418
418
|
n.args.push(parseFloat(c[0])), e += c[0].length;
|
|
419
419
|
}
|
|
420
420
|
return t;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function Ln(i, t, e, n, s, r, o, a, c) {
|
|
423
423
|
if (i === a && t === c) return [];
|
|
424
424
|
let l = Math.abs(e), h = Math.abs(n);
|
|
425
425
|
if (l === 0 || h === 0) return [[i, t, a, c, a, c]];
|
|
@@ -428,34 +428,34 @@ function kn(i, t, e, n, s, r, o, a, c) {
|
|
|
428
428
|
const R = Math.sqrt(v);
|
|
429
429
|
l *= R, h *= R;
|
|
430
430
|
}
|
|
431
|
-
const b = r === o ? -1 : 1, T = l * l * h * h - l * l * y * y - h * h * g * g, w = l * l * y * y + h * h * g * g,
|
|
432
|
-
const
|
|
433
|
-
return R *
|
|
434
|
-
}, P =
|
|
435
|
-
let E =
|
|
431
|
+
const b = r === o ? -1 : 1, T = l * l * h * h - l * l * y * y - h * h * g * g, w = l * l * y * y + h * h * g * g, k = b * Math.sqrt(Math.max(0, T / w)), S = k * l * y / h, _ = -k * h * g / l, B = u * S - d * _ + (i + a) / 2, A = d * S + u * _ + (t + c) / 2, x = (R, $, q, it) => {
|
|
432
|
+
const Ut = R * q + $ * it, Mt = Math.sqrt((R * R + $ * $) * (q * q + it * it)), ut = Math.acos(Math.max(-1, Math.min(1, Ut / Mt)));
|
|
433
|
+
return R * it - $ * q < 0 ? -ut : ut;
|
|
434
|
+
}, P = x(1, 0, (g - S) / l, (y - _) / h);
|
|
435
|
+
let E = x((g - S) / l, (y - _) / h, (-g - S) / l, (-y - _) / h);
|
|
436
436
|
!o && E > 0 && (E -= 2 * Math.PI), o && E < 0 && (E += 2 * Math.PI);
|
|
437
437
|
const C = Math.max(1, Math.ceil(Math.abs(E) / (Math.PI / 2))), M = E / C, I = 4 / 3 * Math.tan(M / 4), L = (R) => {
|
|
438
|
-
const $ = l * Math.cos(R),
|
|
439
|
-
return [u * $ - d *
|
|
438
|
+
const $ = l * Math.cos(R), q = h * Math.sin(R);
|
|
439
|
+
return [u * $ - d * q + B, d * $ + u * q + A];
|
|
440
440
|
}, N = (R) => {
|
|
441
|
-
const $ = -l * Math.sin(R),
|
|
442
|
-
return [u * $ - d *
|
|
441
|
+
const $ = -l * Math.sin(R), q = h * Math.cos(R);
|
|
442
|
+
return [u * $ - d * q, d * $ + u * q];
|
|
443
443
|
}, O = [];
|
|
444
444
|
for (let R = 0; R < C; R++) {
|
|
445
|
-
const $ = P + R * M,
|
|
446
|
-
O.push([
|
|
445
|
+
const $ = P + R * M, q = $ + M, [it, Ut] = L($), [Mt, ut] = R === C - 1 ? [a, c] : L(q), [sn, rn] = N($), [on, an] = N(q);
|
|
446
|
+
O.push([it + I * sn, Ut + I * rn, Mt - I * on, ut - I * an, Mt, ut]);
|
|
447
447
|
}
|
|
448
448
|
return O;
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function K(i, t, e, n, s) {
|
|
451
451
|
const r = 1 - s;
|
|
452
452
|
return r * r * r * i + 3 * r * r * s * t + 3 * r * s * s * e + s * s * s * n;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function Ce(i, t, e, n, s) {
|
|
455
455
|
const r = 1 - s;
|
|
456
456
|
return 3 * r * r * (t - i) + 6 * r * s * (e - t) + 3 * s * s * (n - e);
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function ft(i, t, e, n) {
|
|
459
459
|
return {
|
|
460
460
|
subpath: 0,
|
|
461
461
|
type: "L",
|
|
@@ -467,11 +467,11 @@ function ct(i, t, e, n) {
|
|
|
467
467
|
length: Math.hypot(e - i, n - t)
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Et(i, t, e) {
|
|
471
471
|
const [n, s, r, o, a, c] = e, l = [0];
|
|
472
472
|
let h = i, f = t, u = 0;
|
|
473
|
-
for (let d = 1; d <=
|
|
474
|
-
const m = d /
|
|
473
|
+
for (let d = 1; d <= Pe; d++) {
|
|
474
|
+
const m = d / Pe, p = K(i, n, r, a, m), g = K(t, s, o, c, m);
|
|
475
475
|
u += Math.hypot(p - h, g - f), l.push(u), h = p, f = g;
|
|
476
476
|
}
|
|
477
477
|
return {
|
|
@@ -486,73 +486,73 @@ function kt(i, t, e) {
|
|
|
486
486
|
lengths: l
|
|
487
487
|
};
|
|
488
488
|
}
|
|
489
|
-
function
|
|
490
|
-
const t =
|
|
489
|
+
function at(i) {
|
|
490
|
+
const t = nt.get(i);
|
|
491
491
|
if (t) return t;
|
|
492
492
|
const e = [];
|
|
493
493
|
let n = 0, s = 0, r = 0, o = 0, a = null, c = null, l = -1;
|
|
494
494
|
const h = /* @__PURE__ */ new Set(), f = (p) => {
|
|
495
495
|
l < 0 && (l = 0), p.subpath = l, e.push(p);
|
|
496
496
|
};
|
|
497
|
-
for (const { type: p, args: g } of
|
|
498
|
-
const y = p.toUpperCase(), v = p !== y, b =
|
|
497
|
+
for (const { type: p, args: g } of Rn(i)) {
|
|
498
|
+
const y = p.toUpperCase(), v = p !== y, b = In[y];
|
|
499
499
|
if (y === "Z") {
|
|
500
|
-
(n !== r || s !== o) && f(
|
|
500
|
+
(n !== r || s !== o) && f(ft(n, s, r, o)), l >= 0 && h.add(l), n = r, s = o, a = c = null;
|
|
501
501
|
continue;
|
|
502
502
|
}
|
|
503
503
|
for (let T = 0; T + b <= g.length; T += b) {
|
|
504
|
-
const w = g.slice(T, T + b),
|
|
505
|
-
let _ = null,
|
|
504
|
+
const w = g.slice(T, T + b), k = v ? n : 0, S = v ? s : 0;
|
|
505
|
+
let _ = null, B = null;
|
|
506
506
|
switch (y) {
|
|
507
507
|
case "M":
|
|
508
|
-
T === 0 ? (n = w[0] +
|
|
508
|
+
T === 0 ? (n = w[0] + k, s = w[1] + S, r = n, o = s, (l < 0 || e[e.length - 1]?.subpath === l) && l++) : (f(ft(n, s, w[0] + k, w[1] + S)), n = w[0] + k, s = w[1] + S);
|
|
509
509
|
break;
|
|
510
510
|
case "L":
|
|
511
|
-
f(
|
|
511
|
+
f(ft(n, s, w[0] + k, w[1] + S)), n = w[0] + k, s = w[1] + S;
|
|
512
512
|
break;
|
|
513
513
|
case "H":
|
|
514
|
-
f(
|
|
514
|
+
f(ft(n, s, w[0] + k, s)), n = w[0] + k;
|
|
515
515
|
break;
|
|
516
516
|
case "V":
|
|
517
|
-
f(
|
|
517
|
+
f(ft(n, s, n, w[0] + S)), s = w[0] + S;
|
|
518
518
|
break;
|
|
519
519
|
case "C": {
|
|
520
|
-
const A = [w[0] +
|
|
521
|
-
f(
|
|
520
|
+
const A = [w[0] + k, w[1] + S, w[2] + k, w[3] + S, w[4] + k, w[5] + S];
|
|
521
|
+
f(Et(n, s, A)), _ = [A[2], A[3]], n = A[4], s = A[5];
|
|
522
522
|
break;
|
|
523
523
|
}
|
|
524
524
|
case "S": {
|
|
525
|
-
const [A,
|
|
526
|
-
f(
|
|
525
|
+
const [A, x] = a ? [2 * n - a[0], 2 * s - a[1]] : [n, s], P = [A, x, w[0] + k, w[1] + S, w[2] + k, w[3] + S];
|
|
526
|
+
f(Et(n, s, P)), _ = [P[2], P[3]], n = P[4], s = P[5];
|
|
527
527
|
break;
|
|
528
528
|
}
|
|
529
529
|
case "Q":
|
|
530
530
|
case "T": {
|
|
531
|
-
let A = n,
|
|
532
|
-
y === "Q" ? (A = w[0] +
|
|
533
|
-
const P = y === "Q" ? w[2] +
|
|
531
|
+
let A = n, x = s;
|
|
532
|
+
y === "Q" ? (A = w[0] + k, x = w[1] + S) : c && (A = 2 * n - c[0], x = 2 * s - c[1]);
|
|
533
|
+
const P = y === "Q" ? w[2] + k : w[0] + k, E = y === "Q" ? w[3] + S : w[1] + S;
|
|
534
534
|
f(
|
|
535
|
-
|
|
535
|
+
Et(n, s, [
|
|
536
536
|
n + 2 / 3 * (A - n),
|
|
537
|
-
s + 2 / 3 * (
|
|
537
|
+
s + 2 / 3 * (x - s),
|
|
538
538
|
P + 2 / 3 * (A - P),
|
|
539
|
-
E + 2 / 3 * (
|
|
539
|
+
E + 2 / 3 * (x - E),
|
|
540
540
|
P,
|
|
541
541
|
E
|
|
542
542
|
])
|
|
543
|
-
),
|
|
543
|
+
), B = [A, x], n = P, s = E;
|
|
544
544
|
break;
|
|
545
545
|
}
|
|
546
546
|
case "A": {
|
|
547
|
-
const A = w[5] +
|
|
547
|
+
const A = w[5] + k, x = w[6] + S;
|
|
548
548
|
let P = n, E = s;
|
|
549
|
-
for (const C of
|
|
550
|
-
f(
|
|
551
|
-
n = A, s =
|
|
549
|
+
for (const C of Ln(n, s, w[0], w[1], w[2], w[3], w[4], A, x))
|
|
550
|
+
f(Et(P, E, C)), P = C[4], E = C[5];
|
|
551
|
+
n = A, s = x;
|
|
552
552
|
break;
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
a = _, c =
|
|
555
|
+
a = _, c = B;
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
558
|
const u = e.reduce((p, g) => p + g.length, 0), d = [];
|
|
@@ -564,9 +564,9 @@ function st(i) {
|
|
|
564
564
|
d.push({ start: p, end: y, length: v, closed: w }), p = y;
|
|
565
565
|
}
|
|
566
566
|
const m = { segments: e, totalLength: u, subpaths: d };
|
|
567
|
-
return
|
|
567
|
+
return nt.size >= Pn && nt.delete(nt.keys().next().value), nt.set(i, m), m;
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function $n(i, t) {
|
|
570
570
|
const e = i.lengths;
|
|
571
571
|
if (t <= 0) return 0;
|
|
572
572
|
if (t >= i.length) return 1;
|
|
@@ -578,7 +578,7 @@ function Sn(i, t) {
|
|
|
578
578
|
const r = e[s] - e[n], o = r > 0 ? (t - e[n]) / r : 0;
|
|
579
579
|
return (n + o) / (e.length - 1);
|
|
580
580
|
}
|
|
581
|
-
function
|
|
581
|
+
function Fn(i, t) {
|
|
582
582
|
if (i.type === "L") {
|
|
583
583
|
const f = i.length > 0 ? Math.max(0, Math.min(1, t / i.length)) : 0;
|
|
584
584
|
return {
|
|
@@ -587,44 +587,44 @@ function Mn(i, t) {
|
|
|
587
587
|
angle: Math.atan2(i.endY - i.startY, i.endX - i.startX) * 180 / Math.PI
|
|
588
588
|
};
|
|
589
589
|
}
|
|
590
|
-
const [e, n, s, r, o, a] = i.points, c =
|
|
591
|
-
let l =
|
|
590
|
+
const [e, n, s, r, o, a] = i.points, c = $n(i, t);
|
|
591
|
+
let l = Ce(i.startX, e, s, o, c), h = Ce(i.startY, n, r, a, c);
|
|
592
592
|
if (Math.hypot(l, h) < 1e-9) {
|
|
593
|
-
const f = c < 0.5 ? Math.min(1, c + 1e-3) : Math.max(0, c - 1e-3), u =
|
|
593
|
+
const f = c < 0.5 ? Math.min(1, c + 1e-3) : Math.max(0, c - 1e-3), u = K(i.startX, e, s, o, f), d = K(i.startY, n, r, a, f), m = K(i.startX, e, s, o, c), p = K(i.startY, n, r, a, c);
|
|
594
594
|
l = c < 0.5 ? u - m : m - u, h = c < 0.5 ? d - p : p - d;
|
|
595
595
|
}
|
|
596
596
|
return {
|
|
597
|
-
x:
|
|
598
|
-
y:
|
|
597
|
+
x: K(i.startX, e, s, o, c),
|
|
598
|
+
y: K(i.startY, n, r, a, c),
|
|
599
599
|
angle: Math.atan2(h, l) * 180 / Math.PI
|
|
600
600
|
};
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function Ti(i, t, e = 0, n = i.length) {
|
|
603
603
|
if (n <= e) return { x: 0, y: 0, angle: 0 };
|
|
604
604
|
let s = 0;
|
|
605
605
|
for (let r = e; r < n; r++) {
|
|
606
606
|
const o = i[r];
|
|
607
607
|
if (s + o.length >= t || r === n - 1)
|
|
608
|
-
return
|
|
608
|
+
return Fn(o, t - s);
|
|
609
609
|
s += o.length;
|
|
610
610
|
}
|
|
611
611
|
return { x: 0, y: 0, angle: 0 };
|
|
612
612
|
}
|
|
613
|
-
function
|
|
614
|
-
const { segments: e, totalLength: n } =
|
|
615
|
-
return
|
|
613
|
+
function Dn(i, t) {
|
|
614
|
+
const { segments: e, totalLength: n } = at(i);
|
|
615
|
+
return Ti(e, Math.max(0, Math.min(1, t)) * n);
|
|
616
616
|
}
|
|
617
|
-
function
|
|
618
|
-
|
|
617
|
+
function Jo() {
|
|
618
|
+
nt.clear();
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
return
|
|
620
|
+
function ta(i) {
|
|
621
|
+
return at(i).totalLength;
|
|
622
622
|
}
|
|
623
|
-
const
|
|
624
|
-
let
|
|
625
|
-
const
|
|
626
|
-
function
|
|
627
|
-
const { segments: e, subpaths: n, totalLength: s } =
|
|
623
|
+
const Bn = 24, On = 320, Nn = 2.5, dt = 72, ea = 64, qn = 0.2, Yn = 128, bt = /* @__PURE__ */ new Map();
|
|
624
|
+
let _t = 0, G;
|
|
625
|
+
const _e = (i) => Math.round(i * 100) / 100;
|
|
626
|
+
function Ie(i, t) {
|
|
627
|
+
const { segments: e, subpaths: n, totalLength: s } = at(i);
|
|
628
628
|
if (e.length === 0) return [];
|
|
629
629
|
if (t) {
|
|
630
630
|
const r = n.every((o) => o.closed);
|
|
@@ -632,34 +632,34 @@ function Me(i, t) {
|
|
|
632
632
|
}
|
|
633
633
|
return n.filter((r) => r.length > 0).map((r) => ({ segments: e, start: r.start, end: r.end, length: r.length, closed: r.closed }));
|
|
634
634
|
}
|
|
635
|
-
function
|
|
636
|
-
const e = i.closed ? (t % 1 + 1) % 1 : Math.max(0, Math.min(1, t)), n =
|
|
635
|
+
function he(i, t) {
|
|
636
|
+
const e = i.closed ? (t % 1 + 1) % 1 : Math.max(0, Math.min(1, t)), n = Ti(i.segments, e * i.length, i.start, i.end);
|
|
637
637
|
return [n.x, n.y];
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function Re(i) {
|
|
640
640
|
const t = [];
|
|
641
641
|
let e = 0;
|
|
642
642
|
for (let n = i.start; n < i.end; n++)
|
|
643
643
|
e += i.segments[n].length, i.length > 0 && t.push(e / i.length);
|
|
644
644
|
return t;
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function Le(i, t) {
|
|
647
647
|
const e = [];
|
|
648
648
|
for (let n = 0; n < t; n++)
|
|
649
|
-
e.push(
|
|
649
|
+
e.push(he(i, i.closed ? n / t : n / (t - 1)));
|
|
650
650
|
return e;
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function $e(i) {
|
|
653
653
|
let t = 0, e = 0;
|
|
654
654
|
for (const [n, s] of i)
|
|
655
655
|
t += n, e += s;
|
|
656
656
|
return t /= i.length, e /= i.length, i.map(([n, s]) => [n - t, s - e]);
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function Xn(i, t, e) {
|
|
659
659
|
const n = i.closed && t.closed;
|
|
660
660
|
if (e !== void 0)
|
|
661
|
-
return { offset: n ? Math.abs(e) %
|
|
662
|
-
const s =
|
|
661
|
+
return { offset: n ? Math.abs(e) % dt / dt : 0, reversed: e < 0 };
|
|
662
|
+
const s = $e(Le(i, dt)), r = $e(Le(t, dt)), o = dt;
|
|
663
663
|
let a = { offset: 0, reversed: !1 }, c = 1 / 0;
|
|
664
664
|
for (const l of [!1, !0]) {
|
|
665
665
|
const h = n ? o : 1;
|
|
@@ -674,28 +674,28 @@ function Rn(i, t, e) {
|
|
|
674
674
|
}
|
|
675
675
|
return a;
|
|
676
676
|
}
|
|
677
|
-
function
|
|
677
|
+
function Vn(i, t, e) {
|
|
678
678
|
return e ? ((t.reversed ? t.offset - i : i + t.offset) % 1 + 1) % 1 : t.reversed ? 1 - i : i;
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function Wn(i, t, e) {
|
|
681
681
|
return e ? ((t.reversed ? t.offset - i : i - t.offset) % 1 + 1) % 1 : t.reversed ? 1 - i : i;
|
|
682
682
|
}
|
|
683
|
-
function
|
|
684
|
-
const n = i.closed && t.closed, s =
|
|
685
|
-
|
|
686
|
-
Math.min(
|
|
683
|
+
function jn(i, t, e) {
|
|
684
|
+
const n = i.closed && t.closed, s = Xn(i, t, e.shapeIndex), r = Math.max(
|
|
685
|
+
Bn,
|
|
686
|
+
Math.min(On, Math.ceil(Math.max(i.length, t.length) / Nn))
|
|
687
687
|
), o = /* @__PURE__ */ new Set(), a = (f) => o.add(Math.round(f * 1e7) / 1e7);
|
|
688
688
|
for (let f = 0; f <= r; f++) a(f / r);
|
|
689
|
-
for (const f of
|
|
690
|
-
for (const f of
|
|
689
|
+
for (const f of Re(i)) a(f);
|
|
690
|
+
for (const f of Re(t)) a(Wn(f, s, n));
|
|
691
691
|
let c = [...o].sort((f, u) => f - u);
|
|
692
692
|
n && (c = c.filter((f) => f < 1));
|
|
693
693
|
const l = [], h = [];
|
|
694
694
|
for (const f of c)
|
|
695
|
-
l.push(...
|
|
696
|
-
return
|
|
695
|
+
l.push(...he(i, f)), h.push(...he(t, Vn(f, s, n)));
|
|
696
|
+
return Un({ from: l, to: h, closed: n });
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function Un(i) {
|
|
699
699
|
const t = i.from.length / 2;
|
|
700
700
|
if (t <= 3) return i;
|
|
701
701
|
const e = new Uint8Array(t);
|
|
@@ -703,9 +703,9 @@ function Dn(i) {
|
|
|
703
703
|
const n = [[0, t - 1]];
|
|
704
704
|
for (; n.length > 0; ) {
|
|
705
705
|
const [o, a] = n.pop();
|
|
706
|
-
let c = -1, l =
|
|
706
|
+
let c = -1, l = qn;
|
|
707
707
|
for (let h = o + 1; h < a; h++) {
|
|
708
|
-
const f = Math.max(
|
|
708
|
+
const f = Math.max(Fe(i.from, o, a, h), Fe(i.to, o, a, h));
|
|
709
709
|
f > l && (l = f, c = h);
|
|
710
710
|
}
|
|
711
711
|
c !== -1 && (e[c] = 1, n.push([o, c], [c, a]));
|
|
@@ -715,118 +715,118 @@ function Dn(i) {
|
|
|
715
715
|
e[o] && (s.push(i.from[o * 2], i.from[o * 2 + 1]), r.push(i.to[o * 2], i.to[o * 2 + 1]));
|
|
716
716
|
return { from: s, to: r, closed: i.closed };
|
|
717
717
|
}
|
|
718
|
-
function
|
|
718
|
+
function Fe(i, t, e, n) {
|
|
719
719
|
const s = i[t * 2], r = i[t * 2 + 1], o = i[e * 2] - s, a = i[e * 2 + 1] - r, c = i[n * 2] - s, l = i[n * 2 + 1] - r, h = o * o + a * a, f = h === 0 ? 0 : Math.max(0, Math.min(1, (c * o + l * a) / h));
|
|
720
720
|
return Math.hypot(c - f * o, l - f * a);
|
|
721
721
|
}
|
|
722
|
-
function
|
|
722
|
+
function Hn(i, t, e) {
|
|
723
723
|
const n = e.shapeIndex;
|
|
724
|
-
if (
|
|
725
|
-
const r =
|
|
724
|
+
if (G && G.from === i && G.to === t && G.shapeIndex === n) return G.plan;
|
|
725
|
+
const r = bt.get(String(n ?? "auto"))?.get(i)?.get(t);
|
|
726
726
|
if (r)
|
|
727
|
-
return
|
|
728
|
-
const o =
|
|
729
|
-
pairs: a.map((d, m) =>
|
|
727
|
+
return G = { from: i, to: t, shapeIndex: n, plan: r }, r;
|
|
728
|
+
const o = at(i).subpaths.filter((d) => d.length > 0).length === at(t).subpaths.filter((d) => d.length > 0).length, a = Ie(i, !o), c = Ie(t, !o), l = {
|
|
729
|
+
pairs: a.map((d, m) => jn(d, c[m], e))
|
|
730
730
|
};
|
|
731
|
-
|
|
732
|
-
const h = String(n ?? "auto"), f =
|
|
733
|
-
|
|
731
|
+
_t >= Yn && (bt.clear(), _t = 0);
|
|
732
|
+
const h = String(n ?? "auto"), f = bt.get(h) ?? /* @__PURE__ */ new Map();
|
|
733
|
+
bt.set(h, f);
|
|
734
734
|
const u = f.get(i) ?? /* @__PURE__ */ new Map();
|
|
735
|
-
return f.set(i, u), u.set(t, l),
|
|
735
|
+
return f.set(i, u), u.set(t, l), _t++, G = { from: i, to: t, shapeIndex: n, plan: l }, l;
|
|
736
736
|
}
|
|
737
|
-
function
|
|
737
|
+
function zn(i, t, e, n = {}) {
|
|
738
738
|
if (!i) return t;
|
|
739
739
|
if (!t) return i;
|
|
740
740
|
const s = Math.max(0, Math.min(1, e));
|
|
741
741
|
if (s === 0) return i;
|
|
742
742
|
if (s === 1) return t;
|
|
743
|
-
const r =
|
|
743
|
+
const r = Hn(i, t, n);
|
|
744
744
|
if (r.pairs.length === 0) return s < 0.5 ? i : t;
|
|
745
745
|
let o = "";
|
|
746
746
|
for (const a of r.pairs) {
|
|
747
747
|
for (let c = 0; c < a.from.length; c += 2) {
|
|
748
|
-
const l =
|
|
748
|
+
const l = _e(a.from[c] + (a.to[c] - a.from[c]) * s), h = _e(a.from[c + 1] + (a.to[c + 1] - a.from[c + 1]) * s);
|
|
749
749
|
o += `${c === 0 ? o ? " M" : "M" : " L"}${l} ${h}`;
|
|
750
750
|
}
|
|
751
751
|
a.closed && (o += " Z");
|
|
752
752
|
}
|
|
753
753
|
return o;
|
|
754
754
|
}
|
|
755
|
-
function
|
|
756
|
-
|
|
755
|
+
function ia() {
|
|
756
|
+
bt.clear(), _t = 0, G = void 0;
|
|
757
757
|
}
|
|
758
|
-
function
|
|
758
|
+
function St(i) {
|
|
759
759
|
return /^\s*[Mm]\s*[-+]?(?:\d|\.\d)/.test(i);
|
|
760
760
|
}
|
|
761
|
-
const
|
|
762
|
-
function
|
|
763
|
-
const t =
|
|
761
|
+
const U = (i, t, e) => i + (t - i) * e, ki = 512, Gt = /* @__PURE__ */ new Map(), Kt = /* @__PURE__ */ new Map();
|
|
762
|
+
function De(i) {
|
|
763
|
+
const t = Gt.get(i);
|
|
764
764
|
if (t) return t;
|
|
765
765
|
const e = i.replace("#", ""), n = [
|
|
766
766
|
parseInt(e.slice(0, 2), 16),
|
|
767
767
|
parseInt(e.slice(2, 4), 16),
|
|
768
768
|
parseInt(e.slice(4, 6), 16)
|
|
769
769
|
];
|
|
770
|
-
return
|
|
770
|
+
return Gt.size < ki && Gt.set(i, n), n;
|
|
771
771
|
}
|
|
772
|
-
const
|
|
773
|
-
function
|
|
774
|
-
return `#${
|
|
772
|
+
const Be = (i) => i.charCodeAt(0) === 35, Oe = (i) => i.startsWith("rgb"), Ne = (i) => i.startsWith("rgba"), Gn = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/, Zt = (i) => Math.round(i).toString(16).padStart(2, "0");
|
|
773
|
+
function Kn(i, t, e) {
|
|
774
|
+
return `#${Zt(i)}${Zt(t)}${Zt(e)}`;
|
|
775
775
|
}
|
|
776
|
-
function
|
|
777
|
-
const t =
|
|
776
|
+
function qe(i) {
|
|
777
|
+
const t = Kt.get(i);
|
|
778
778
|
if (t) return t;
|
|
779
|
-
const e = i.match(
|
|
779
|
+
const e = i.match(Gn);
|
|
780
780
|
if (!e)
|
|
781
781
|
throw new Error(`Invalid rgb color: ${i}`);
|
|
782
782
|
const n = parseInt(e[1], 10), s = parseInt(e[2], 10), r = parseInt(e[3], 10), o = e[4] !== void 0 ? [n, s, r, parseFloat(e[4])] : [n, s, r];
|
|
783
|
-
return
|
|
783
|
+
return Kt.size < ki && Kt.set(i, o), o;
|
|
784
784
|
}
|
|
785
|
-
const
|
|
786
|
-
if (
|
|
787
|
-
const [n, s, r] =
|
|
788
|
-
return
|
|
785
|
+
const Zn = (i, t, e) => {
|
|
786
|
+
if (Be(i) && Be(t)) {
|
|
787
|
+
const [n, s, r] = De(i), [o, a, c] = De(t), l = U(n, o, e), h = U(s, a, e), f = U(r, c, e);
|
|
788
|
+
return Kn(l, h, f);
|
|
789
789
|
}
|
|
790
|
-
if ((
|
|
791
|
-
const n =
|
|
790
|
+
if ((Oe(i) || Ne(i)) && (Oe(t) || Ne(t))) {
|
|
791
|
+
const n = qe(i), s = qe(t), r = Math.round(U(n[0], s[0], e)), o = Math.round(U(n[1], s[1], e)), a = Math.round(U(n[2], s[2], e));
|
|
792
792
|
if (n.length === 4 || s.length === 4) {
|
|
793
|
-
const c = n[3] ?? 1, l = s[3] ?? 1, h =
|
|
793
|
+
const c = n[3] ?? 1, l = s[3] ?? 1, h = U(c, l, e);
|
|
794
794
|
return `rgba(${r}, ${o}, ${a}, ${h})`;
|
|
795
795
|
}
|
|
796
796
|
return `rgb(${r}, ${o}, ${a})`;
|
|
797
797
|
}
|
|
798
798
|
return e < 1 ? i : t;
|
|
799
|
-
},
|
|
799
|
+
}, Qn = (i, t, e) => {
|
|
800
800
|
const n = Math.min(i.length, t.length), s = [];
|
|
801
801
|
for (let r = 0; r < n; r++)
|
|
802
|
-
s.push(
|
|
802
|
+
s.push(U(i[r], t[r], e));
|
|
803
803
|
return s;
|
|
804
|
-
},
|
|
805
|
-
function
|
|
806
|
-
return typeof i == "number" ?
|
|
804
|
+
}, Ye = (i, t, e) => e < 1 ? i : t, Jn = (i, t, e) => zn(i, t, e);
|
|
805
|
+
function Ft(i) {
|
|
806
|
+
return typeof i == "number" ? U : Array.isArray(i) ? Qn : typeof i == "string" ? i.startsWith("#") || i.startsWith("rgb") ? Zn : St(i) ? Jn : Ye : Ye;
|
|
807
807
|
}
|
|
808
|
-
const
|
|
809
|
-
function
|
|
810
|
-
if (!
|
|
808
|
+
const xi = 1e3 / 60;
|
|
809
|
+
function Si(i, t = {}) {
|
|
810
|
+
if (!et(i))
|
|
811
811
|
throw new Error(`bakeSpringTrack: track "${i.id}" is not a spring track`);
|
|
812
|
-
const e = new
|
|
813
|
-
return
|
|
812
|
+
const e = new Xt(i.spring);
|
|
813
|
+
return Ai(i, (n) => e.valueAt(n), e.settleTime(), i.spring.from, i.spring.to, t);
|
|
814
814
|
}
|
|
815
|
-
function
|
|
816
|
-
if (!
|
|
815
|
+
function Mi(i, t = {}) {
|
|
816
|
+
if (!tt(i))
|
|
817
817
|
throw new Error(`bakeInertiaTrack: track "${i.id}" is not an inertia track`);
|
|
818
818
|
const e = i.inertia;
|
|
819
|
-
return
|
|
819
|
+
return Ai(
|
|
820
820
|
i,
|
|
821
|
-
(n) =>
|
|
822
|
-
|
|
821
|
+
(n) => ce(e, n),
|
|
822
|
+
xt(e),
|
|
823
823
|
e.from,
|
|
824
|
-
|
|
824
|
+
kt(e),
|
|
825
825
|
t
|
|
826
826
|
);
|
|
827
827
|
}
|
|
828
|
-
function
|
|
829
|
-
const o = r.intervalMs ??
|
|
828
|
+
function Ai(i, t, e, n, s, r) {
|
|
829
|
+
const o = r.intervalMs ?? xi, a = r.tolerance ?? 0.01, c = i.delay ?? 0, l = [];
|
|
830
830
|
for (let f = 0; f <= e; f += o)
|
|
831
831
|
l.push({ time: f + c, value: t(f), easing: "linear" });
|
|
832
832
|
const h = l[l.length - 1];
|
|
@@ -834,13 +834,13 @@ function wi(i, t, e, n, s, r) {
|
|
|
834
834
|
id: i.id,
|
|
835
835
|
target: i.target,
|
|
836
836
|
property: i.property,
|
|
837
|
-
keyframes: a > 0 ?
|
|
837
|
+
keyframes: a > 0 ? es(l, a) : l,
|
|
838
838
|
...i.targets && { targets: [...i.targets] },
|
|
839
839
|
...i.stagger && { stagger: { ...i.stagger } }
|
|
840
840
|
};
|
|
841
841
|
}
|
|
842
|
-
function
|
|
843
|
-
const s = n.intervalMs ??
|
|
842
|
+
function Ei(i, t, e, n = {}) {
|
|
843
|
+
const s = n.intervalMs ?? xi, r = typeof e == "function" ? e : z(e), o = Ft(i.value), a = t.time - i.time;
|
|
844
844
|
if (a <= 0) return [t];
|
|
845
845
|
const c = [];
|
|
846
846
|
for (let h = s; h < a; h += s) {
|
|
@@ -854,26 +854,26 @@ function Ti(i, t, e, n = {}) {
|
|
|
854
854
|
const l = r(1);
|
|
855
855
|
return c.push({ ...t, ...l !== 1 && { value: o(i.value, t.value, l) }, easing: "linear" }), c;
|
|
856
856
|
}
|
|
857
|
-
function
|
|
858
|
-
return
|
|
857
|
+
function na(i, t) {
|
|
858
|
+
return et(i) ? Si(i, t) : tt(i) ? Mi(i, t) : i;
|
|
859
859
|
}
|
|
860
|
-
function
|
|
860
|
+
function ts(i, t = {}) {
|
|
861
861
|
const e = i.keyframes;
|
|
862
|
-
if (!e.some((s) =>
|
|
862
|
+
if (!e.some((s) => Rt(s.easing))) return i;
|
|
863
863
|
const n = e.length > 0 ? [e[0]] : [];
|
|
864
864
|
for (let s = 1; s < e.length; s++) {
|
|
865
865
|
const r = e[s];
|
|
866
|
-
|
|
866
|
+
Rt(r.easing) ? n.push(...Ei(e[s - 1], r, r.easing, t)) : n.push(r);
|
|
867
867
|
}
|
|
868
868
|
return { ...i, keyframes: n };
|
|
869
869
|
}
|
|
870
|
-
function
|
|
871
|
-
return i.filter(
|
|
872
|
-
i.filter(
|
|
873
|
-
i.filter(
|
|
870
|
+
function sa(i, t) {
|
|
871
|
+
return i.filter(ln).map((e) => ts(e, t)).concat(
|
|
872
|
+
i.filter(et).map((e) => Si(e, t)),
|
|
873
|
+
i.filter(tt).map((e) => Mi(e, t))
|
|
874
874
|
);
|
|
875
875
|
}
|
|
876
|
-
function
|
|
876
|
+
function es(i, t) {
|
|
877
877
|
if (i.length <= 2) return i;
|
|
878
878
|
const e = [i[0]];
|
|
879
879
|
for (let n = 1; n < i.length - 1; n++) {
|
|
@@ -884,25 +884,25 @@ function jn(i, t) {
|
|
|
884
884
|
}
|
|
885
885
|
return e.push(i[i.length - 1]), e;
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function ue(i) {
|
|
888
888
|
const t = [...i.keyframes].sort((e, n) => e.time - n.time);
|
|
889
889
|
return {
|
|
890
890
|
...i,
|
|
891
891
|
keyframes: t
|
|
892
892
|
};
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function Q(i) {
|
|
895
895
|
return i.targets && i.targets.length > 0 ? i.targets : [i.target];
|
|
896
896
|
}
|
|
897
|
-
function
|
|
897
|
+
function ct(i, t, e, n) {
|
|
898
898
|
const s = e ?? 0;
|
|
899
|
-
return !n || t <= 1 ? s : s +
|
|
899
|
+
return !n || t <= 1 ? s : s + we(i, t, n);
|
|
900
900
|
}
|
|
901
|
-
class
|
|
901
|
+
class Qt {
|
|
902
902
|
track;
|
|
903
903
|
targets;
|
|
904
904
|
constructor(t) {
|
|
905
|
-
this.track = t, this.targets =
|
|
905
|
+
this.track = t, this.targets = Q(t);
|
|
906
906
|
}
|
|
907
907
|
/**
|
|
908
908
|
* Get the interpolated value at a specific time.
|
|
@@ -911,7 +911,7 @@ class zt {
|
|
|
911
911
|
* that need every target should use `getTargetValues`.
|
|
912
912
|
*/
|
|
913
913
|
getValueAtTime(t) {
|
|
914
|
-
return this.valueForOffset(t -
|
|
914
|
+
return this.valueForOffset(t - ct(0, this.targets.length, this.track.delay, this.track.stagger));
|
|
915
915
|
}
|
|
916
916
|
/**
|
|
917
917
|
* Every target's value at a specific time, in target order.
|
|
@@ -922,7 +922,7 @@ class zt {
|
|
|
922
922
|
getTargetValues(t) {
|
|
923
923
|
const e = this.targets.length, n = [];
|
|
924
924
|
for (let s = 0; s < e; s++) {
|
|
925
|
-
const r =
|
|
925
|
+
const r = ct(s, e, this.track.delay, this.track.stagger), o = this.valueForOffset(t - r);
|
|
926
926
|
o !== void 0 && n.push({ target: this.targets[s], value: o, start: r + this.track.keyframes[0].time });
|
|
927
927
|
}
|
|
928
928
|
return n;
|
|
@@ -935,7 +935,7 @@ class zt {
|
|
|
935
935
|
const { keyframes: t } = this.track;
|
|
936
936
|
if (t.length === 0)
|
|
937
937
|
return 0;
|
|
938
|
-
const e = t[t.length - 1].time, n = this.track.stagger ?
|
|
938
|
+
const e = t[t.length - 1].time, n = this.track.stagger ? Yt(this.targets.length, this.track.stagger) : 0;
|
|
939
939
|
return e + (this.track.delay ?? 0) + n + (this.track.endDelay ?? 0);
|
|
940
940
|
}
|
|
941
941
|
/**
|
|
@@ -958,8 +958,8 @@ class zt {
|
|
|
958
958
|
return;
|
|
959
959
|
if (n.time === t)
|
|
960
960
|
return n.value;
|
|
961
|
-
const r = s.time - n.time, o = (t - n.time) / r, c =
|
|
962
|
-
return
|
|
961
|
+
const r = s.time - n.time, o = (t - n.time) / r, c = z(s.easing)(o);
|
|
962
|
+
return Ft(n.value)(n.value, s.value, c);
|
|
963
963
|
}
|
|
964
964
|
/**
|
|
965
965
|
* Find the keyframes surrounding a given time.
|
|
@@ -972,62 +972,62 @@ class zt {
|
|
|
972
972
|
return { from: null, to: null };
|
|
973
973
|
}
|
|
974
974
|
}
|
|
975
|
-
class
|
|
975
|
+
class is {
|
|
976
976
|
track;
|
|
977
977
|
targets;
|
|
978
978
|
sampler;
|
|
979
979
|
constructor(t) {
|
|
980
|
-
this.track = t, this.targets =
|
|
980
|
+
this.track = t, this.targets = Q(t), this.sampler = new Xt(t.spring);
|
|
981
981
|
}
|
|
982
982
|
getValueAtTime(t) {
|
|
983
|
-
return this.sampler.valueAt(t -
|
|
983
|
+
return this.sampler.valueAt(t - ct(0, this.targets.length, this.track.delay, this.track.stagger));
|
|
984
984
|
}
|
|
985
985
|
getTargetValues(t) {
|
|
986
986
|
const e = this.targets.length, n = [];
|
|
987
987
|
for (let s = 0; s < e; s++) {
|
|
988
|
-
const r =
|
|
988
|
+
const r = ct(s, e, this.track.delay, this.track.stagger);
|
|
989
989
|
n.push({ target: this.targets[s], value: this.sampler.valueAt(t - r), start: r });
|
|
990
990
|
}
|
|
991
991
|
return n;
|
|
992
992
|
}
|
|
993
993
|
/** Settle time plus delay and the widest stagger offset. */
|
|
994
994
|
getDuration() {
|
|
995
|
-
const t = this.track.stagger ?
|
|
995
|
+
const t = this.track.stagger ? Yt(this.targets.length, this.track.stagger) : 0;
|
|
996
996
|
return this.sampler.settleTime() + (this.track.delay ?? 0) + t;
|
|
997
997
|
}
|
|
998
998
|
getTrack() {
|
|
999
999
|
return this.track;
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
|
-
class
|
|
1002
|
+
class ns {
|
|
1003
1003
|
track;
|
|
1004
1004
|
targets;
|
|
1005
1005
|
duration;
|
|
1006
1006
|
constructor(t) {
|
|
1007
|
-
this.track = t, this.targets =
|
|
1007
|
+
this.track = t, this.targets = Q(t), this.duration = xt(t.inertia);
|
|
1008
1008
|
}
|
|
1009
1009
|
getValueAtTime(t) {
|
|
1010
|
-
return
|
|
1010
|
+
return ce(this.track.inertia, t - ct(0, this.targets.length, this.track.delay, this.track.stagger));
|
|
1011
1011
|
}
|
|
1012
1012
|
getTargetValues(t) {
|
|
1013
1013
|
const e = this.targets.length, n = [];
|
|
1014
1014
|
for (let s = 0; s < e; s++) {
|
|
1015
|
-
const r =
|
|
1016
|
-
n.push({ target: this.targets[s], value:
|
|
1015
|
+
const r = ct(s, e, this.track.delay, this.track.stagger);
|
|
1016
|
+
n.push({ target: this.targets[s], value: ce(this.track.inertia, t - r), start: r });
|
|
1017
1017
|
}
|
|
1018
1018
|
return n;
|
|
1019
1019
|
}
|
|
1020
1020
|
/** Settle time plus delay and the widest stagger offset. */
|
|
1021
1021
|
getDuration() {
|
|
1022
|
-
const t = this.track.stagger ?
|
|
1022
|
+
const t = this.track.stagger ? Yt(this.targets.length, this.track.stagger) : 0;
|
|
1023
1023
|
return this.duration + (this.track.delay ?? 0) + t;
|
|
1024
1024
|
}
|
|
1025
1025
|
getTrack() {
|
|
1026
1026
|
return this.track;
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
1029
|
-
function
|
|
1030
|
-
const e = { ...
|
|
1029
|
+
function Pi(i, t) {
|
|
1030
|
+
const e = { ...Dn(i.pathData, t) };
|
|
1031
1031
|
if (i.matrix) {
|
|
1032
1032
|
const [n, s, r, o, a, c] = i.matrix, { x: l, y: h } = e;
|
|
1033
1033
|
e.x = n * l + r * h + a, e.y = s * l + o * h + c;
|
|
@@ -1036,25 +1036,25 @@ function xi(i, t) {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
return i.autoRotate && i.rotateOffset && (e.angle += i.rotateOffset), e;
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1039
|
+
function ra(i, t, e, n) {
|
|
1040
1040
|
const s = t + (e - t) * n;
|
|
1041
|
-
return
|
|
1041
|
+
return Pi(i, s);
|
|
1042
1042
|
}
|
|
1043
|
-
const
|
|
1043
|
+
const Jt = {
|
|
1044
1044
|
upperCase: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
1045
1045
|
lowerCase: "abcdefghijklmnopqrstuvwxyz",
|
|
1046
1046
|
upperAndLowerCase: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
|
1047
1047
|
numbers: "0123456789"
|
|
1048
|
-
},
|
|
1049
|
-
function
|
|
1050
|
-
const t =
|
|
1051
|
-
return e.length > 0 ? e : Array.from(
|
|
1048
|
+
}, ss = 20;
|
|
1049
|
+
function rs(i) {
|
|
1050
|
+
const t = Jt[i ?? "upperCase"] ?? i ?? Jt.upperCase, e = Array.from(t);
|
|
1051
|
+
return e.length > 0 ? e : Array.from(Jt.upperCase);
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function os(i, t, e) {
|
|
1054
1054
|
let n = (i | 0) ^ Math.imul(t + 1, 2654435761) ^ Math.imul(e + 1, 2246822507);
|
|
1055
1055
|
return n = Math.imul(n ^ n >>> 16, 2146121005), n = Math.imul(n ^ n >>> 15, 2221713035), (n ^ n >>> 16) >>> 0;
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1057
|
+
function as(i, t, e = 0) {
|
|
1058
1058
|
const n = i.from ?? "", s = i.to, r = Math.max(0, Math.min(1, t));
|
|
1059
1059
|
if (r <= 0) return n;
|
|
1060
1060
|
if (r >= 1) return s;
|
|
@@ -1063,16 +1063,16 @@ function Zn(i, t, e = 0) {
|
|
|
1063
1063
|
const v = Math.round(r * Math.max(o.length, a.length));
|
|
1064
1064
|
return c ? o.slice(0, Math.max(0, o.length - v)).join("") + a.slice(Math.max(0, a.length - v)).join("") : a.slice(0, v).join("") + o.slice(v).join("");
|
|
1065
1065
|
}
|
|
1066
|
-
const l = Math.max(0, Math.min(0.999, i.revealDelay ?? 0)), h = Math.max(0, (r - l) / (1 - l)), f = Math.floor(h * a.length), u = i.tweenLength === !1 ? a.length : Math.round(o.length + (a.length - o.length) * r), d =
|
|
1066
|
+
const l = Math.max(0, Math.min(0.999, i.revealDelay ?? 0)), h = Math.max(0, (r - l) / (1 - l)), f = Math.floor(h * a.length), u = i.tweenLength === !1 ? a.length : Math.round(o.length + (a.length - o.length) * r), d = rs(i.chars), m = i.refreshRate ?? ss, p = m > 0 ? Math.floor(e * m / 1e3) : 0, g = i.seed ?? 1;
|
|
1067
1067
|
let y = "";
|
|
1068
1068
|
for (let v = 0; v < u; v++) {
|
|
1069
1069
|
const b = c ? v >= u - f : v < f, T = c ? a[a.length - (u - v)] : a[v];
|
|
1070
1070
|
b && T !== void 0 || T === " " || T === `
|
|
1071
|
-
` ? y += T : y += d[
|
|
1071
|
+
` ? y += T : y += d[os(g, v, p) % d.length];
|
|
1072
1072
|
}
|
|
1073
1073
|
return y;
|
|
1074
1074
|
}
|
|
1075
|
-
class
|
|
1075
|
+
class Ci {
|
|
1076
1076
|
id;
|
|
1077
1077
|
name;
|
|
1078
1078
|
_captions;
|
|
@@ -1271,12 +1271,12 @@ class ki {
|
|
|
1271
1271
|
a || (a = /* @__PURE__ */ new Map(), t.set(n, a));
|
|
1272
1272
|
const c = this._textTracks.get(e);
|
|
1273
1273
|
if (c && typeof r == "number") {
|
|
1274
|
-
a.set("text",
|
|
1274
|
+
a.set("text", as(c.textConfig, r, Math.max(0, o)));
|
|
1275
1275
|
return;
|
|
1276
1276
|
}
|
|
1277
1277
|
const l = this._motionPathTracks.get(e);
|
|
1278
1278
|
if (l && typeof r == "number") {
|
|
1279
|
-
const h =
|
|
1279
|
+
const h = Pi(l.motionPathConfig, r);
|
|
1280
1280
|
a.set("motionPathX", h.x), a.set("motionPathY", h.y), l.motionPathConfig.autoRotate && a.set("motionPathRotate", h.angle);
|
|
1281
1281
|
} else
|
|
1282
1282
|
a.set(s, r);
|
|
@@ -1288,7 +1288,7 @@ class ki {
|
|
|
1288
1288
|
const t = /* @__PURE__ */ new Set();
|
|
1289
1289
|
this._sharedWrites = !1;
|
|
1290
1290
|
t: for (const e of this._tracks)
|
|
1291
|
-
for (const n of
|
|
1291
|
+
for (const n of Q(e)) {
|
|
1292
1292
|
const s = `${n}\0${e.property}`;
|
|
1293
1293
|
if (t.has(s)) {
|
|
1294
1294
|
this._sharedWrites = !0;
|
|
@@ -1303,17 +1303,17 @@ class ki {
|
|
|
1303
1303
|
* Add a track to the timeline.
|
|
1304
1304
|
*/
|
|
1305
1305
|
addTrack(t) {
|
|
1306
|
-
if (this._tracks.push(t), this._sharedWrites = null,
|
|
1307
|
-
this._trackPlayers.set(t.id, new
|
|
1306
|
+
if (this._tracks.push(t), this._sharedWrites = null, tt(t)) {
|
|
1307
|
+
this._trackPlayers.set(t.id, new ns(t));
|
|
1308
1308
|
return;
|
|
1309
1309
|
}
|
|
1310
|
-
if (
|
|
1311
|
-
this._trackPlayers.set(t.id, new
|
|
1310
|
+
if (et(t)) {
|
|
1311
|
+
this._trackPlayers.set(t.id, new is(t)), this._springTracks.set(t.id, t);
|
|
1312
1312
|
return;
|
|
1313
1313
|
}
|
|
1314
|
-
if (
|
|
1315
|
-
this._trackPlayers.set(t.id, new
|
|
1316
|
-
else if (
|
|
1314
|
+
if (ve(t))
|
|
1315
|
+
this._trackPlayers.set(t.id, new Qt(t)), this._textTracks.set(t.id, t);
|
|
1316
|
+
else if (mi(t)) {
|
|
1317
1317
|
const e = {
|
|
1318
1318
|
id: t.id,
|
|
1319
1319
|
target: t.target,
|
|
@@ -1324,9 +1324,9 @@ class ki {
|
|
|
1324
1324
|
targets: t.targets,
|
|
1325
1325
|
stagger: t.stagger
|
|
1326
1326
|
};
|
|
1327
|
-
this._trackPlayers.set(t.id, new
|
|
1327
|
+
this._trackPlayers.set(t.id, new Qt(e)), this._motionPathTracks.set(t.id, t);
|
|
1328
1328
|
} else
|
|
1329
|
-
this._trackPlayers.set(t.id, new
|
|
1329
|
+
this._trackPlayers.set(t.id, new Qt(t));
|
|
1330
1330
|
}
|
|
1331
1331
|
/**
|
|
1332
1332
|
* Replace a track with a new version, keeping its place in the track order
|
|
@@ -1377,7 +1377,7 @@ class ki {
|
|
|
1377
1377
|
const e = this._trackPlayers.get(t);
|
|
1378
1378
|
if (!e) return;
|
|
1379
1379
|
const n = e.getTrack(), s = n.delay ?? 0;
|
|
1380
|
-
if (
|
|
1380
|
+
if (et(n) || tt(n))
|
|
1381
1381
|
return { from: s, to: e.getDuration() };
|
|
1382
1382
|
const r = n.keyframes;
|
|
1383
1383
|
if (!(!r || r.length === 0))
|
|
@@ -1399,7 +1399,7 @@ class ki {
|
|
|
1399
1399
|
for (let r = 0; r < e; r++) {
|
|
1400
1400
|
const o = this._tracks[r];
|
|
1401
1401
|
if (o.property !== n.property) continue;
|
|
1402
|
-
const a =
|
|
1402
|
+
const a = Q(o).filter((f) => Q(n).includes(f));
|
|
1403
1403
|
if (a.length === 0) continue;
|
|
1404
1404
|
const c = this.getTrackSpan(o.id);
|
|
1405
1405
|
if (!c || !(c.from <= s.to && s.from <= c.to)) continue;
|
|
@@ -1416,7 +1416,7 @@ class ki {
|
|
|
1416
1416
|
return t;
|
|
1417
1417
|
}
|
|
1418
1418
|
_matches(t, e) {
|
|
1419
|
-
if (e.id !== void 0 && t.id !== e.id || e.property !== void 0 && t.property !== e.property || e.target !== void 0 && !
|
|
1419
|
+
if (e.id !== void 0 && t.id !== e.id || e.property !== void 0 && t.property !== e.property || e.target !== void 0 && !Q(t).includes(e.target)) return !1;
|
|
1420
1420
|
if (e.timeRange) {
|
|
1421
1421
|
const n = this.getTrackSpan(t.id);
|
|
1422
1422
|
if (!n || n.to < e.timeRange.from || n.from > e.timeRange.to) return !1;
|
|
@@ -1428,7 +1428,7 @@ class ki {
|
|
|
1428
1428
|
*/
|
|
1429
1429
|
toDefinition() {
|
|
1430
1430
|
return {
|
|
1431
|
-
formatVersion:
|
|
1431
|
+
formatVersion: Lt,
|
|
1432
1432
|
id: this.id,
|
|
1433
1433
|
name: this.name,
|
|
1434
1434
|
config: { ...this._config },
|
|
@@ -1486,8 +1486,8 @@ class ki {
|
|
|
1486
1486
|
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);
|
|
1487
1487
|
}
|
|
1488
1488
|
}
|
|
1489
|
-
const
|
|
1490
|
-
function
|
|
1489
|
+
const cs = 100;
|
|
1490
|
+
function _i(i, t, e, n) {
|
|
1491
1491
|
const s = [], r = [], { duration: o, alternate: a } = n, c = (d, m, p, g) => {
|
|
1492
1492
|
r.push([d, m]);
|
|
1493
1493
|
const y = [];
|
|
@@ -1497,61 +1497,61 @@ function Si(i, t, e, n) {
|
|
|
1497
1497
|
for (const v of y) s.push({ kind: "event", index: v, direction: p });
|
|
1498
1498
|
};
|
|
1499
1499
|
let l = t.time, h = t.direction, f = t.fresh === !0;
|
|
1500
|
-
const u = Math.min(
|
|
1500
|
+
const u = Math.min(cs, Math.max(0, e.iteration - t.iteration));
|
|
1501
1501
|
for (let d = 0; d < u; d++) {
|
|
1502
1502
|
const m = h === "forward" ? o : 0;
|
|
1503
1503
|
c(l, m, h, f), s.push({ kind: "repeat" }), a ? (h = h === "forward" ? "reverse" : "forward", l = m, f = !1) : (l = h === "forward" ? 0 : o, f = !0);
|
|
1504
1504
|
}
|
|
1505
1505
|
return u > 0 && n.holding && !a ? { crossings: s, passes: r } : (c(l, e.time, h, f), { crossings: s, passes: r });
|
|
1506
1506
|
}
|
|
1507
|
-
function
|
|
1508
|
-
return
|
|
1507
|
+
function ls(i) {
|
|
1508
|
+
return tt(i) ? {
|
|
1509
1509
|
id: i.id,
|
|
1510
1510
|
target: i.target,
|
|
1511
1511
|
property: i.property,
|
|
1512
1512
|
kind: "inertia",
|
|
1513
|
-
inertia:
|
|
1514
|
-
...
|
|
1515
|
-
} :
|
|
1513
|
+
inertia: Ii(i.inertia),
|
|
1514
|
+
...W(i)
|
|
1515
|
+
} : et(i) ? {
|
|
1516
1516
|
id: i.id,
|
|
1517
1517
|
target: i.target,
|
|
1518
1518
|
property: i.property,
|
|
1519
1519
|
kind: "spring",
|
|
1520
1520
|
spring: { ...i.spring },
|
|
1521
|
-
...
|
|
1522
|
-
} :
|
|
1521
|
+
...W(i)
|
|
1522
|
+
} : ve(i) ? {
|
|
1523
1523
|
id: i.id,
|
|
1524
1524
|
target: i.target,
|
|
1525
1525
|
property: "text",
|
|
1526
1526
|
textConfig: { ...i.textConfig },
|
|
1527
|
-
keyframes: i.keyframes.map(
|
|
1528
|
-
...
|
|
1529
|
-
} :
|
|
1527
|
+
keyframes: i.keyframes.map(te),
|
|
1528
|
+
...W(i)
|
|
1529
|
+
} : mi(i) ? {
|
|
1530
1530
|
id: i.id,
|
|
1531
1531
|
target: i.target,
|
|
1532
1532
|
property: "motionPath",
|
|
1533
1533
|
motionPathConfig: { ...i.motionPathConfig },
|
|
1534
|
-
keyframes: i.keyframes.map(
|
|
1535
|
-
...
|
|
1534
|
+
keyframes: i.keyframes.map(te),
|
|
1535
|
+
...W(i)
|
|
1536
1536
|
} : {
|
|
1537
1537
|
id: i.id,
|
|
1538
1538
|
target: i.target,
|
|
1539
1539
|
property: i.property,
|
|
1540
|
-
keyframes: i.keyframes.map(
|
|
1541
|
-
...
|
|
1540
|
+
keyframes: i.keyframes.map(te),
|
|
1541
|
+
...W(i)
|
|
1542
1542
|
};
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1544
|
+
function Ii(i) {
|
|
1545
1545
|
return { ...i, ...Array.isArray(i.end) && { end: [...i.end] } };
|
|
1546
1546
|
}
|
|
1547
|
-
function
|
|
1547
|
+
function te(i) {
|
|
1548
1548
|
return {
|
|
1549
1549
|
time: i.time,
|
|
1550
1550
|
value: i.value,
|
|
1551
1551
|
...i.easing && { easing: i.easing }
|
|
1552
1552
|
};
|
|
1553
1553
|
}
|
|
1554
|
-
function
|
|
1554
|
+
function W(i) {
|
|
1555
1555
|
const t = i.endDelay;
|
|
1556
1556
|
return {
|
|
1557
1557
|
...i.delay !== void 0 && { delay: i.delay },
|
|
@@ -1560,19 +1560,19 @@ function V(i) {
|
|
|
1560
1560
|
...i.stagger !== void 0 && { stagger: { ...i.stagger } }
|
|
1561
1561
|
};
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1564
|
-
if (
|
|
1563
|
+
function hs(i) {
|
|
1564
|
+
if (tt(i)) {
|
|
1565
1565
|
const t = i;
|
|
1566
1566
|
return {
|
|
1567
1567
|
id: t.id,
|
|
1568
1568
|
target: t.target,
|
|
1569
1569
|
property: t.property,
|
|
1570
1570
|
kind: "inertia",
|
|
1571
|
-
inertia:
|
|
1572
|
-
...
|
|
1571
|
+
inertia: Ii(t.inertia),
|
|
1572
|
+
...W(t)
|
|
1573
1573
|
};
|
|
1574
1574
|
}
|
|
1575
|
-
if (
|
|
1575
|
+
if (et(i)) {
|
|
1576
1576
|
const t = i;
|
|
1577
1577
|
return {
|
|
1578
1578
|
id: t.id,
|
|
@@ -1580,10 +1580,10 @@ function ts(i) {
|
|
|
1580
1580
|
property: t.property,
|
|
1581
1581
|
kind: "spring",
|
|
1582
1582
|
spring: { ...t.spring },
|
|
1583
|
-
...
|
|
1583
|
+
...W(t)
|
|
1584
1584
|
};
|
|
1585
1585
|
}
|
|
1586
|
-
if (
|
|
1586
|
+
if (ve(i)) {
|
|
1587
1587
|
const t = i;
|
|
1588
1588
|
return {
|
|
1589
1589
|
id: t.id,
|
|
@@ -1591,7 +1591,7 @@ function ts(i) {
|
|
|
1591
1591
|
property: "text",
|
|
1592
1592
|
textConfig: { ...t.textConfig },
|
|
1593
1593
|
keyframes: [...t.keyframes].sort((e, n) => e.time - n.time),
|
|
1594
|
-
...
|
|
1594
|
+
...W(t)
|
|
1595
1595
|
};
|
|
1596
1596
|
}
|
|
1597
1597
|
if (i.property === "motionPath" && "motionPathConfig" in i) {
|
|
@@ -1602,21 +1602,21 @@ function ts(i) {
|
|
|
1602
1602
|
property: "motionPath",
|
|
1603
1603
|
motionPathConfig: { ...t.motionPathConfig },
|
|
1604
1604
|
keyframes: e,
|
|
1605
|
-
...
|
|
1605
|
+
...W(t)
|
|
1606
1606
|
};
|
|
1607
1607
|
}
|
|
1608
|
-
return
|
|
1608
|
+
return ue({
|
|
1609
1609
|
id: i.id,
|
|
1610
1610
|
target: i.target,
|
|
1611
1611
|
property: i.property,
|
|
1612
1612
|
keyframes: i.keyframes,
|
|
1613
|
-
...
|
|
1613
|
+
...W(i)
|
|
1614
1614
|
});
|
|
1615
1615
|
}
|
|
1616
|
-
function
|
|
1616
|
+
function us(i) {
|
|
1617
1617
|
const t = i._config.markers;
|
|
1618
1618
|
return {
|
|
1619
|
-
formatVersion:
|
|
1619
|
+
formatVersion: Lt,
|
|
1620
1620
|
id: i.id,
|
|
1621
1621
|
name: i.name,
|
|
1622
1622
|
config: {
|
|
@@ -1627,38 +1627,38 @@ function es(i) {
|
|
|
1627
1627
|
repeatDelay: i._config.repeatDelay,
|
|
1628
1628
|
...t && { markers: t.map((e) => ({ ...e })) }
|
|
1629
1629
|
},
|
|
1630
|
-
tracks: i.tracks.map(
|
|
1630
|
+
tracks: i.tracks.map(ls),
|
|
1631
1631
|
...i.captions && { captions: JSON.parse(JSON.stringify(i.captions)) }
|
|
1632
1632
|
};
|
|
1633
1633
|
}
|
|
1634
|
-
function
|
|
1634
|
+
function wt(i) {
|
|
1635
1635
|
const t = i.formatVersion ?? 1;
|
|
1636
|
-
if (t >
|
|
1636
|
+
if (t > Lt)
|
|
1637
1637
|
throw new Error(
|
|
1638
|
-
`tinyfly: this animation uses format version ${t}, but this tinyfly reads up to version ${
|
|
1638
|
+
`tinyfly: this animation uses format version ${t}, but this tinyfly reads up to version ${Lt}. Update tinyfly to play it.`
|
|
1639
1639
|
);
|
|
1640
|
-
return new
|
|
1640
|
+
return new Ci({
|
|
1641
1641
|
id: i.id,
|
|
1642
1642
|
name: i.name,
|
|
1643
1643
|
config: i.config,
|
|
1644
|
-
tracks: i.tracks.map(
|
|
1644
|
+
tracks: i.tracks.map(hs),
|
|
1645
1645
|
captions: i.captions
|
|
1646
1646
|
});
|
|
1647
1647
|
}
|
|
1648
|
-
function
|
|
1649
|
-
return JSON.stringify(
|
|
1648
|
+
function oa(i) {
|
|
1649
|
+
return JSON.stringify(us(i));
|
|
1650
1650
|
}
|
|
1651
|
-
function
|
|
1651
|
+
function aa(i) {
|
|
1652
1652
|
const t = JSON.parse(i);
|
|
1653
|
-
return
|
|
1653
|
+
return wt(t);
|
|
1654
1654
|
}
|
|
1655
|
-
function
|
|
1655
|
+
function ca(i) {
|
|
1656
1656
|
let t = 2166136261;
|
|
1657
1657
|
for (let e = 0; e < i.length; e++)
|
|
1658
1658
|
t ^= i.charCodeAt(e), t = Math.imul(t, 16777619);
|
|
1659
1659
|
return t >>> 0;
|
|
1660
1660
|
}
|
|
1661
|
-
function
|
|
1661
|
+
function fs(i) {
|
|
1662
1662
|
let t = i >>> 0 || 2654435769;
|
|
1663
1663
|
return {
|
|
1664
1664
|
seed: i >>> 0,
|
|
@@ -1667,25 +1667,25 @@ function is(i) {
|
|
|
1667
1667
|
}
|
|
1668
1668
|
};
|
|
1669
1669
|
}
|
|
1670
|
-
function
|
|
1670
|
+
function Ri(i, t, e) {
|
|
1671
1671
|
return t + i.next() * (e - t);
|
|
1672
1672
|
}
|
|
1673
|
-
function
|
|
1674
|
-
if (n <= 0) return
|
|
1673
|
+
function ds(i, t, e, n) {
|
|
1674
|
+
if (n <= 0) return Ri(i, t, e);
|
|
1675
1675
|
const s = Math.floor((e - t) / n), r = Math.round(i.next() * s);
|
|
1676
1676
|
return t + r * n;
|
|
1677
1677
|
}
|
|
1678
|
-
function
|
|
1678
|
+
function la(i, t) {
|
|
1679
1679
|
if (t.length !== 0)
|
|
1680
1680
|
return t[Math.floor(i.next() * t.length)];
|
|
1681
1681
|
}
|
|
1682
|
-
const
|
|
1683
|
-
function
|
|
1684
|
-
return typeof i != "string" ? !1 :
|
|
1682
|
+
const Li = /^([+\-*/])=\s*(-?[\d.]+)$/, $i = /^random\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*(?:,\s*(-?[\d.]+)\s*)?\)$/i;
|
|
1683
|
+
function ha(i) {
|
|
1684
|
+
return typeof i != "string" ? !1 : Li.test(i.trim()) || $i.test(i.trim());
|
|
1685
1685
|
}
|
|
1686
|
-
function
|
|
1686
|
+
function Fi(i, t = {}) {
|
|
1687
1687
|
if (typeof i != "string") return i;
|
|
1688
|
-
const e = i.trim(), n =
|
|
1688
|
+
const e = i.trim(), n = Li.exec(e);
|
|
1689
1689
|
if (n) {
|
|
1690
1690
|
const [, r, o] = n, a = t.base ?? 0, c = Number.parseFloat(o);
|
|
1691
1691
|
switch (r) {
|
|
@@ -1699,66 +1699,66 @@ function Ci(i, t = {}) {
|
|
|
1699
1699
|
return c === 0 ? a : a / c;
|
|
1700
1700
|
}
|
|
1701
1701
|
}
|
|
1702
|
-
const s =
|
|
1702
|
+
const s = $i.exec(e);
|
|
1703
1703
|
if (s) {
|
|
1704
1704
|
if (!t.random)
|
|
1705
1705
|
throw new Error(
|
|
1706
1706
|
`resolveValue: "${e}" needs a random source — pass one via context.random`
|
|
1707
1707
|
);
|
|
1708
1708
|
const r = Number.parseFloat(s[1]), o = Number.parseFloat(s[2]), a = s[3] !== void 0 ? Number.parseFloat(s[3]) : void 0;
|
|
1709
|
-
return a !== void 0 ?
|
|
1709
|
+
return a !== void 0 ? ds(t.random, r, o, a) : Ri(t.random, r, o);
|
|
1710
1710
|
}
|
|
1711
1711
|
return i;
|
|
1712
1712
|
}
|
|
1713
|
-
function
|
|
1713
|
+
function ps(i, t = 0, e) {
|
|
1714
1714
|
const n = [];
|
|
1715
1715
|
let s = t;
|
|
1716
1716
|
for (const r of i) {
|
|
1717
|
-
const o =
|
|
1717
|
+
const o = Fi(r, { base: s, random: e });
|
|
1718
1718
|
n.push(o), typeof o == "number" && (s = o);
|
|
1719
1719
|
}
|
|
1720
1720
|
return n;
|
|
1721
1721
|
}
|
|
1722
|
-
class
|
|
1722
|
+
class ua {
|
|
1723
1723
|
random;
|
|
1724
1724
|
constructor(t) {
|
|
1725
|
-
this.random =
|
|
1725
|
+
this.random = fs(t);
|
|
1726
1726
|
}
|
|
1727
1727
|
/** The seed, to be stored alongside the timeline so this can be reproduced. */
|
|
1728
1728
|
get seed() {
|
|
1729
1729
|
return this.random.seed;
|
|
1730
1730
|
}
|
|
1731
1731
|
resolve(t, e = 0) {
|
|
1732
|
-
return
|
|
1732
|
+
return Fi(t, { base: e, random: this.random });
|
|
1733
1733
|
}
|
|
1734
1734
|
resolveSequence(t, e = 0) {
|
|
1735
|
-
return
|
|
1735
|
+
return ps(t, e, this.random);
|
|
1736
1736
|
}
|
|
1737
1737
|
}
|
|
1738
|
-
const
|
|
1739
|
-
function
|
|
1738
|
+
const ms = 600;
|
|
1739
|
+
function gs(i) {
|
|
1740
1740
|
if (Array.isArray(i)) {
|
|
1741
1741
|
const [u, d, m, p] = i;
|
|
1742
|
-
return { fn:
|
|
1742
|
+
return { fn: Xe(u, d, m, p), bezier: [u, d, m, p] };
|
|
1743
1743
|
}
|
|
1744
|
-
const { segments: t } =
|
|
1744
|
+
const { segments: t } = at(i);
|
|
1745
1745
|
if (t.length === 0) throw new Error(`customEase: no curve in "${i}"`);
|
|
1746
1746
|
const e = t[0].startX, n = t[0].startY, s = t[t.length - 1], r = s.endX - e, o = s.endY - n;
|
|
1747
1747
|
if (r === 0 || o === 0) throw new Error(`customEase: "${i}" must move along both axes`);
|
|
1748
1748
|
const a = (u) => (u - e) / r, c = (u) => (u - n) / o;
|
|
1749
1749
|
if (t.length === 1 && s.type === "C") {
|
|
1750
1750
|
const [u, d, m, p] = s.points, g = [a(u), c(d), a(m), c(p)];
|
|
1751
|
-
return { fn:
|
|
1751
|
+
return { fn: Xe(...g), bezier: g };
|
|
1752
1752
|
}
|
|
1753
|
-
const l = [], h = [], f = Math.max(8, Math.ceil(
|
|
1753
|
+
const l = [], h = [], f = Math.max(8, Math.ceil(ms / t.length));
|
|
1754
1754
|
for (const u of t)
|
|
1755
1755
|
for (let d = l.length === 0 ? 0 : 1; d <= f; d++) {
|
|
1756
|
-
const [m, p] =
|
|
1756
|
+
const [m, p] = vs(u, d / f);
|
|
1757
1757
|
l.push(a(m)), h.push(c(p));
|
|
1758
1758
|
}
|
|
1759
|
-
return { fn:
|
|
1759
|
+
return { fn: ws(l, h) };
|
|
1760
1760
|
}
|
|
1761
|
-
function
|
|
1761
|
+
function ys(i = {}) {
|
|
1762
1762
|
const e = 0.1 + Math.max(0, Math.min(1, i.strength ?? 0.7)) * 0.7, n = [1];
|
|
1763
1763
|
for (let r = e; r > 2e-3; r *= e) n.push(2 * Math.sqrt(r));
|
|
1764
1764
|
const s = n.reduce((r, o) => r + o, 0);
|
|
@@ -1777,11 +1777,11 @@ function as(i = {}) {
|
|
|
1777
1777
|
return 1;
|
|
1778
1778
|
};
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1780
|
+
function bs(i = {}) {
|
|
1781
1781
|
const t = Math.max(1, i.wiggles ?? 10), e = i.type ?? "easeOut", n = (s) => e === "uniform" ? 1 : e === "easeInOut" ? Math.sin(Math.PI * s) : (1 - s) ** 2;
|
|
1782
1782
|
return (s) => s <= 0 || s >= 1 ? 0 : Math.sin(s * t * Math.PI * 2) * n(s);
|
|
1783
1783
|
}
|
|
1784
|
-
function
|
|
1784
|
+
function vs(i, t) {
|
|
1785
1785
|
if (i.type === "L") {
|
|
1786
1786
|
const [l, h] = i.points;
|
|
1787
1787
|
return [i.startX + (l - i.startX) * t, i.startY + (h - i.startY) * t];
|
|
@@ -1792,7 +1792,7 @@ function ls(i, t) {
|
|
|
1792
1792
|
c * c * c * i.startY + 3 * c * c * t * n + 3 * c * t * t * r + t * t * t * a
|
|
1793
1793
|
];
|
|
1794
1794
|
}
|
|
1795
|
-
function
|
|
1795
|
+
function ws(i, t) {
|
|
1796
1796
|
return (e) => {
|
|
1797
1797
|
if (e <= i[0]) return t[0];
|
|
1798
1798
|
if (e >= i[i.length - 1]) return t[t.length - 1];
|
|
@@ -1805,7 +1805,7 @@ function hs(i, t) {
|
|
|
1805
1805
|
return r === 0 ? t[s] : t[n] + (e - i[n]) / r * (t[s] - t[n]);
|
|
1806
1806
|
};
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1808
|
+
function Xe(i, t, e, n) {
|
|
1809
1809
|
const s = (o, a, c) => 3 * (1 - o) * (1 - o) * o * a + 3 * (1 - o) * o * o * c + o * o * o, r = (o, a, c) => 3 * (1 - o) * (1 - o) * a + 6 * (1 - o) * o * (c - a) + 3 * o * o * (1 - c);
|
|
1810
1810
|
return (o) => {
|
|
1811
1811
|
if (o <= 0) return 0;
|
|
@@ -1824,21 +1824,54 @@ function De(i, t, e, n) {
|
|
|
1824
1824
|
return s(a, t, n);
|
|
1825
1825
|
};
|
|
1826
1826
|
}
|
|
1827
|
-
const
|
|
1828
|
-
function
|
|
1827
|
+
const Ts = 350, ks = 300, xs = 550;
|
|
1828
|
+
function fa(i, t = {}) {
|
|
1829
|
+
const e = t.lead ?? Ts, n = t.gap ?? ks, s = t.tail ?? xs, r = [];
|
|
1830
|
+
let o = 0;
|
|
1831
|
+
return i.forEach((a, c) => {
|
|
1832
|
+
const l = [];
|
|
1833
|
+
let h = o + e;
|
|
1834
|
+
a.lines.forEach((u, d) => {
|
|
1835
|
+
if (!(u.duration >= 0))
|
|
1836
|
+
throw new Error(`narration: scene ${c} line ${d} has an invalid duration (${u.duration})`);
|
|
1837
|
+
d > 0 && (h += n), l.push({
|
|
1838
|
+
id: u.id ?? `s${c}-l${d}`,
|
|
1839
|
+
scene: c,
|
|
1840
|
+
line: d,
|
|
1841
|
+
start: h,
|
|
1842
|
+
end: h + u.duration,
|
|
1843
|
+
text: u.text
|
|
1844
|
+
}), h += u.duration;
|
|
1845
|
+
});
|
|
1846
|
+
const f = h + s + (a.tail ?? 0);
|
|
1847
|
+
r.push({ id: a.id ?? `s${c}`, start: o, duration: f - o, cues: l }), o = f;
|
|
1848
|
+
}), { duration: o, scenes: r, cues: r.flatMap((a) => a.cues) };
|
|
1849
|
+
}
|
|
1850
|
+
function da(i) {
|
|
1851
|
+
return i.cues.map((t) => ({ id: t.id, time: t.start, label: t.text }));
|
|
1852
|
+
}
|
|
1853
|
+
function pa(i, t) {
|
|
1854
|
+
let e = i.scenes[0];
|
|
1855
|
+
for (const n of i.scenes)
|
|
1856
|
+
if (t >= n.start) e = n;
|
|
1857
|
+
else break;
|
|
1858
|
+
return e;
|
|
1859
|
+
}
|
|
1860
|
+
const V = (i) => Math.round(i * 1e3) / 1e3;
|
|
1861
|
+
function Ss(i, t = {}) {
|
|
1829
1862
|
if (i.length === 0) return "";
|
|
1830
1863
|
const e = t.curviness ?? 1, n = t.closed ?? !1, s = i.length;
|
|
1831
|
-
let r = `M${
|
|
1864
|
+
let r = `M${V(i[0].x)} ${V(i[0].y)}`;
|
|
1832
1865
|
if (s === 1) return r;
|
|
1833
1866
|
const o = (c) => n ? i[(c % s + s) % s] : i[Math.max(0, Math.min(s - 1, c))], a = n ? s : s - 1;
|
|
1834
1867
|
for (let c = 0; c < a; c++) {
|
|
1835
1868
|
const l = o(c - 1), h = o(c), f = o(c + 1), u = o(c + 2);
|
|
1836
1869
|
if (e === 0) {
|
|
1837
|
-
r += ` L${
|
|
1870
|
+
r += ` L${V(f.x)} ${V(f.y)}`;
|
|
1838
1871
|
continue;
|
|
1839
1872
|
}
|
|
1840
1873
|
const d = e / 6, m = h.x + (f.x - l.x) * d, p = h.y + (f.y - l.y) * d, g = f.x - (u.x - h.x) * d, y = f.y - (u.y - h.y) * d;
|
|
1841
|
-
r += ` C${
|
|
1874
|
+
r += ` C${V(m)} ${V(p)} ${V(g)} ${V(y)} ${V(f.x)} ${V(f.y)}`;
|
|
1842
1875
|
}
|
|
1843
1876
|
return n ? `${r} Z` : r;
|
|
1844
1877
|
}
|
|
@@ -1846,12 +1879,12 @@ const F = (i, t = 0) => {
|
|
|
1846
1879
|
const e = parseFloat(i ?? "");
|
|
1847
1880
|
return Number.isFinite(e) ? e : t;
|
|
1848
1881
|
};
|
|
1849
|
-
function
|
|
1882
|
+
function Ms(i) {
|
|
1850
1883
|
const t = (i ?? "").trim().split(/[\s,]+/).filter(Boolean).map(Number), e = [];
|
|
1851
1884
|
for (let n = 0; n + 1 < t.length; n += 2) e.push({ x: t[n], y: t[n + 1] });
|
|
1852
1885
|
return e;
|
|
1853
1886
|
}
|
|
1854
|
-
function
|
|
1887
|
+
function Te(i) {
|
|
1855
1888
|
const t = i.attributes;
|
|
1856
1889
|
switch (i.tag.toLowerCase()) {
|
|
1857
1890
|
case "path":
|
|
@@ -1870,7 +1903,7 @@ function me(i) {
|
|
|
1870
1903
|
return `M${F(t.x1)} ${F(t.y1)} L${F(t.x2)} ${F(t.y2)}`;
|
|
1871
1904
|
case "polyline":
|
|
1872
1905
|
case "polygon": {
|
|
1873
|
-
const e =
|
|
1906
|
+
const e = Ms(t.points);
|
|
1874
1907
|
if (e.length === 0) return null;
|
|
1875
1908
|
const n = e.map((s, r) => `${r === 0 ? "M" : "L"}${s.x} ${s.y}`).join(" ");
|
|
1876
1909
|
return i.tag.toLowerCase() === "polygon" ? `${n} Z` : n;
|
|
@@ -1879,7 +1912,7 @@ function me(i) {
|
|
|
1879
1912
|
return null;
|
|
1880
1913
|
}
|
|
1881
1914
|
}
|
|
1882
|
-
const
|
|
1915
|
+
const Pt = {
|
|
1883
1916
|
"power1.in": [0.55, 0.085, 0.68, 0.53],
|
|
1884
1917
|
"power1.out": [0.25, 0.46, 0.45, 0.94],
|
|
1885
1918
|
"power1.inout": [0.455, 0.03, 0.515, 0.955],
|
|
@@ -1904,7 +1937,7 @@ const St = {
|
|
|
1904
1937
|
"back.in": [0.6, -0.28, 0.735, 0.045],
|
|
1905
1938
|
"back.out": [0.175, 0.885, 0.32, 1.275],
|
|
1906
1939
|
"back.inout": [0.68, -0.55, 0.265, 1.55]
|
|
1907
|
-
},
|
|
1940
|
+
}, Ve = {
|
|
1908
1941
|
none: "linear",
|
|
1909
1942
|
linear: "linear",
|
|
1910
1943
|
"linear.none": "linear",
|
|
@@ -1916,40 +1949,40 @@ const St = {
|
|
|
1916
1949
|
"power2.out": "ease-out-cubic",
|
|
1917
1950
|
"power2.inout": "ease-in-out-cubic"
|
|
1918
1951
|
};
|
|
1919
|
-
function
|
|
1952
|
+
function As(i) {
|
|
1920
1953
|
let t = i.trim().toLowerCase();
|
|
1921
1954
|
t = t.replace(/\.ease(in|out|inout)$/, ".$1");
|
|
1922
1955
|
const e = /^([a-z]+\d?)(\(.*\))?$/.exec(t);
|
|
1923
1956
|
return e && e[1] !== "steps" && t !== "none" && t !== "linear" && (t = `${e[1]}.out${e[2] ?? ""}`), t;
|
|
1924
1957
|
}
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
function
|
|
1928
|
-
const t =
|
|
1958
|
+
z({ type: "bounce", mode: "in" });
|
|
1959
|
+
z({ type: "bounce", mode: "in-out" });
|
|
1960
|
+
function Dt(i) {
|
|
1961
|
+
const t = Di.get(i.trim().toLowerCase());
|
|
1929
1962
|
if (t) return t;
|
|
1930
|
-
const e =
|
|
1963
|
+
const e = As(i), n = /^steps\(\s*(\d+)\s*\)$/.exec(e);
|
|
1931
1964
|
if (n) {
|
|
1932
1965
|
const o = { type: "steps", count: Math.max(1, Number.parseInt(n[1], 10)) + 1, position: "none" };
|
|
1933
|
-
return { easing: o, fn:
|
|
1966
|
+
return { easing: o, fn: z(o) };
|
|
1934
1967
|
}
|
|
1935
1968
|
const s = /^(elastic|bounce|back)\.(in|out|inout)(?:\(([^)]*)\))?$/.exec(e);
|
|
1936
1969
|
if (s) {
|
|
1937
1970
|
const [, r, o, a] = s, c = (a ?? "").split(",").map((f) => Number.parseFloat(f)).filter((f) => Number.isFinite(f)), l = o === "inout" ? "in-out" : o;
|
|
1938
|
-
if (r === "back" && c.length === 0 && e in
|
|
1939
|
-
return { easing: { type: "cubic-bezier", points:
|
|
1971
|
+
if (r === "back" && c.length === 0 && e in Pt)
|
|
1972
|
+
return { easing: { type: "cubic-bezier", points: Pt[e] } };
|
|
1940
1973
|
const h = r === "elastic" ? { type: "elastic", mode: l, ...c[0] !== void 0 && { amplitude: c[0] }, ...c[1] !== void 0 && { period: c[1] } } : r === "bounce" ? { type: "bounce", mode: l } : { type: "back", mode: l, ...c[0] !== void 0 && { overshoot: c[0] } };
|
|
1941
|
-
return { easing: h, fn:
|
|
1974
|
+
return { easing: h, fn: z(h) };
|
|
1942
1975
|
}
|
|
1943
|
-
return e in
|
|
1976
|
+
return e in Ve ? { easing: Ve[e] } : e in Pt ? { easing: { type: "cubic-bezier", points: Pt[e] } } : { easing: "ease-out" };
|
|
1944
1977
|
}
|
|
1945
|
-
const
|
|
1946
|
-
function
|
|
1947
|
-
return
|
|
1978
|
+
const Di = /* @__PURE__ */ new Map();
|
|
1979
|
+
function ke(i, t) {
|
|
1980
|
+
return Di.set(
|
|
1948
1981
|
i.trim().toLowerCase(),
|
|
1949
1982
|
t.bezier ? { easing: { type: "cubic-bezier", points: t.bezier }, fn: t.fn } : { fn: t.fn, requiresBaking: "custom" }
|
|
1950
1983
|
), i;
|
|
1951
1984
|
}
|
|
1952
|
-
function
|
|
1985
|
+
function fe(i) {
|
|
1953
1986
|
let t = i >>> 0;
|
|
1954
1987
|
return () => {
|
|
1955
1988
|
t = t + 1831565813 >>> 0;
|
|
@@ -1957,16 +1990,16 @@ function ae(i) {
|
|
|
1957
1990
|
return e = Math.imul(e ^ e >>> 15, e | 1), e ^= e + Math.imul(e ^ e >>> 7, e | 61), ((e ^ e >>> 14) >>> 0) / 4294967296;
|
|
1958
1991
|
};
|
|
1959
1992
|
}
|
|
1960
|
-
const
|
|
1961
|
-
function
|
|
1962
|
-
return typeof i == "string" &&
|
|
1993
|
+
const Bi = /^\s*random\(\s*(\[.*\]|[^)]*)\s*\)\s*$/;
|
|
1994
|
+
function Oi(i) {
|
|
1995
|
+
return typeof i == "string" && Bi.test(i);
|
|
1963
1996
|
}
|
|
1964
|
-
function
|
|
1965
|
-
let t =
|
|
1997
|
+
function Es(i = 1) {
|
|
1998
|
+
let t = fe(i);
|
|
1966
1999
|
const e = (c, l) => ((...h) => h.length >= c ? l(...h) : (f) => l(...h, f)), n = (c, l, h) => Math.min(Math.max(h, Math.min(c, l)), Math.max(c, l)), s = (c, l, h, f, u) => l === c ? h : h + (u - c) / (l - c) * (f - h), r = (c, l) => {
|
|
1967
2000
|
if (typeof c == "number") return c === 0 ? l : Math.round(l / c) * c;
|
|
1968
|
-
if (Array.isArray(c)) return
|
|
1969
|
-
if ("values" in c) return
|
|
2001
|
+
if (Array.isArray(c)) return We(c, l, 1 / 0);
|
|
2002
|
+
if ("values" in c) return We(c.values, l, c.radius ?? 1 / 0);
|
|
1970
2003
|
const h = Math.round(l / c.increment) * c.increment;
|
|
1971
2004
|
return Math.abs(h - l) <= (c.radius ?? 1 / 0) ? h : l;
|
|
1972
2005
|
}, o = (c, l, h) => {
|
|
@@ -1981,10 +2014,10 @@ function ps(i = 1) {
|
|
|
1981
2014
|
if (typeof c == "object" && !Array.isArray(c)) {
|
|
1982
2015
|
const f = {};
|
|
1983
2016
|
for (const u of Object.keys(c))
|
|
1984
|
-
f[u] =
|
|
2017
|
+
f[u] = Ft(c[u])(c[u], l[u], h);
|
|
1985
2018
|
return f;
|
|
1986
2019
|
}
|
|
1987
|
-
return
|
|
2020
|
+
return Ft(c)(c, l, h);
|
|
1988
2021
|
}),
|
|
1989
2022
|
wrap: ((c, l, h) => {
|
|
1990
2023
|
if (Array.isArray(c)) {
|
|
@@ -2017,17 +2050,17 @@ function ps(i = 1) {
|
|
|
2017
2050
|
return c;
|
|
2018
2051
|
},
|
|
2019
2052
|
distribute: ({ base: c = 0, amount: l, each: h, from: f = "start", ease: u }) => (d, m, p) => {
|
|
2020
|
-
const g = p.length, v =
|
|
2053
|
+
const g = p.length, v = we(d, g, { ...l !== void 0 ? { amount: l } : { each: h ?? 1 }, from: f }), b = l !== void 0 ? l : (h ?? 1) * yi(g, f), T = u && b > 0 ? u(v / b) * b : v;
|
|
2021
2054
|
return c + T;
|
|
2022
2055
|
},
|
|
2023
2056
|
pipe: (...c) => (l) => c.reduce((h, f) => f(h), l),
|
|
2024
|
-
splitColor: (c) =>
|
|
2057
|
+
splitColor: (c) => Ps(c),
|
|
2025
2058
|
getUnit: (c) => typeof c == "number" ? "" : /^-?[\d.]+(?:e[-+]?\d+)?([a-z%]*)$/i.exec(c.trim())?.[1] ?? "",
|
|
2026
2059
|
seed: (c) => {
|
|
2027
|
-
t =
|
|
2060
|
+
t = fe(c);
|
|
2028
2061
|
},
|
|
2029
2062
|
resolveRandomString: (c) => {
|
|
2030
|
-
const l =
|
|
2063
|
+
const l = Bi.exec(c)?.[1] ?? "";
|
|
2031
2064
|
if (l.startsWith("[")) {
|
|
2032
2065
|
const m = l.slice(1, -1).split(",").map((p) => p.trim()).filter(Boolean).map((p) => Number.isFinite(Number(p)) ? Number(p) : p.replace(/^['"]|['"]$/g, ""));
|
|
2033
2066
|
return m[Math.floor(t() * m.length)];
|
|
@@ -2037,7 +2070,7 @@ function ps(i = 1) {
|
|
|
2037
2070
|
}
|
|
2038
2071
|
};
|
|
2039
2072
|
}
|
|
2040
|
-
function
|
|
2073
|
+
function We(i, t, e) {
|
|
2041
2074
|
let n = t, s = 1 / 0;
|
|
2042
2075
|
for (const r of i) {
|
|
2043
2076
|
const o = Math.abs(r - t);
|
|
@@ -2045,7 +2078,7 @@ function Ne(i, t, e) {
|
|
|
2045
2078
|
}
|
|
2046
2079
|
return s <= e ? n : t;
|
|
2047
2080
|
}
|
|
2048
|
-
function
|
|
2081
|
+
function Ps(i) {
|
|
2049
2082
|
const t = i.trim(), e = /^#([0-9a-f]{3,8})$/i.exec(t)?.[1];
|
|
2050
2083
|
if (e) {
|
|
2051
2084
|
const r = (e.length <= 4 ? [...e].map((o) => o + o).join("") : e).match(/../g).map((o) => Number.parseInt(o, 16));
|
|
@@ -2054,19 +2087,19 @@ function ms(i) {
|
|
|
2054
2087
|
const n = (/rgba?\(([^)]+)\)/i.exec(t)?.[1] ?? "0,0,0").split(/[\s,/]+/).filter(Boolean).map((s) => Number.parseFloat(s));
|
|
2055
2088
|
return n.length >= 4 ? [n[0], n[1], n[2], n[3]] : [n[0] ?? 0, n[1] ?? 0, n[2] ?? 0];
|
|
2056
2089
|
}
|
|
2057
|
-
const
|
|
2058
|
-
function
|
|
2090
|
+
const Cs = /^([+-])=\s*(-?[\d.]+)$/, _s = /^([<>])\s*(?:([+-])?=?\s*(-?[\d.]+))?$/;
|
|
2091
|
+
function pt(i, t) {
|
|
2059
2092
|
const e = t.scale ?? 1, n = (l) => Number.parseFloat(l) * e;
|
|
2060
2093
|
if (i === void 0) return t.cursor;
|
|
2061
2094
|
if (typeof i == "number") return i * e;
|
|
2062
2095
|
const s = i.trim();
|
|
2063
2096
|
if (s === "") return t.cursor;
|
|
2064
|
-
const r =
|
|
2097
|
+
const r = Cs.exec(s);
|
|
2065
2098
|
if (r) {
|
|
2066
2099
|
const l = n(r[2]);
|
|
2067
2100
|
return t.cursor + (r[1] === "-" ? -l : l);
|
|
2068
2101
|
}
|
|
2069
|
-
const o =
|
|
2102
|
+
const o = _s.exec(s);
|
|
2070
2103
|
if (o) {
|
|
2071
2104
|
const l = o[1] === "<" ? t.previousStart : t.previousEnd;
|
|
2072
2105
|
if (o[3] === void 0) return l;
|
|
@@ -2084,12 +2117,12 @@ function ht(i, t) {
|
|
|
2084
2117
|
const c = t.labels.get(s);
|
|
2085
2118
|
return c !== void 0 ? c : /^-?[\d.]+$/.test(s) ? n(s) : t.cursor;
|
|
2086
2119
|
}
|
|
2087
|
-
function
|
|
2120
|
+
function Is(i) {
|
|
2088
2121
|
if (typeof i != "object" || i === null) return !1;
|
|
2089
2122
|
const t = i;
|
|
2090
2123
|
return t.grid !== void 0 || t.from === "random" || Array.isArray(t.from) || t.ease !== void 0 || t.axis !== void 0;
|
|
2091
2124
|
}
|
|
2092
|
-
function
|
|
2125
|
+
function Rs(i, t, e = {}) {
|
|
2093
2126
|
if (i === 0) return [];
|
|
2094
2127
|
const n = t.grid === "auto" ? Math.max(1, Math.min(i, e.columnsFromLayout?.() ?? i)) : Array.isArray(t.grid) ? Math.max(1, t.grid[1]) : i, s = Array.isArray(t.grid) ? Math.max(1, t.grid[0]) : Math.ceil(i / n), r = (m) => ({ x: m % n, y: Math.floor(m / n) }), o = t.from ?? "start", a = Array.isArray(o) ? { x: o[0] * (n - 1), y: o[1] * (s - 1) } : typeof o == "number" ? r(Math.max(0, Math.min(i - 1, o))) : o === "end" ? r(i - 1) : o === "center" || o === "edges" ? { x: (n - 1) / 2, y: (s - 1) / 2 } : { x: 0, y: 0 }, c = (m) => {
|
|
2095
2128
|
const { x: p, y: g } = r(m), y = Math.abs(p - a.x), v = Math.abs(g - a.y);
|
|
@@ -2101,13 +2134,13 @@ function vs(i, t, e = {}) {
|
|
|
2101
2134
|
const m = e.random ?? Math.random;
|
|
2102
2135
|
l = l.map(() => m() * h);
|
|
2103
2136
|
}
|
|
2104
|
-
const f = t.amount !== void 0 ? t.amount : (t.each ?? 0) * h, u = t.ease ?
|
|
2137
|
+
const f = t.amount !== void 0 ? t.amount : (t.each ?? 0) * h, u = t.ease ? Dt(t.ease) : void 0, d = u ? u.fn ?? z(u.easing) : void 0;
|
|
2105
2138
|
return l.map((m) => {
|
|
2106
2139
|
const p = h === 0 ? 0 : m / h;
|
|
2107
2140
|
return (d ? d(p) : p) * f;
|
|
2108
2141
|
});
|
|
2109
2142
|
}
|
|
2110
|
-
const
|
|
2143
|
+
const xe = /* @__PURE__ */ new Set([
|
|
2111
2144
|
"duration",
|
|
2112
2145
|
"delay",
|
|
2113
2146
|
"ease",
|
|
@@ -2131,24 +2164,24 @@ const ye = /* @__PURE__ */ new Set([
|
|
|
2131
2164
|
"scrollTrigger",
|
|
2132
2165
|
"spring"
|
|
2133
2166
|
]);
|
|
2134
|
-
function
|
|
2167
|
+
function It(i) {
|
|
2135
2168
|
const t = {}, e = {};
|
|
2136
2169
|
for (const [n, s] of Object.entries(i))
|
|
2137
|
-
|
|
2170
|
+
xe.has(n) ? t[n] = s : e[n] = s;
|
|
2138
2171
|
return { config: t, properties: e };
|
|
2139
2172
|
}
|
|
2140
|
-
function
|
|
2173
|
+
function Bt(i, t) {
|
|
2141
2174
|
return i === void 0 ? t : i * 1e3;
|
|
2142
2175
|
}
|
|
2143
|
-
function
|
|
2176
|
+
function de(i, t) {
|
|
2144
2177
|
if (i !== void 0)
|
|
2145
|
-
return typeof i == "number" ? { each: i * 1e3 } :
|
|
2178
|
+
return typeof i == "number" ? { each: i * 1e3 } : Is(i) ? { offsets: Rs(t?.count ?? 0, i, t ?? {}).map((n) => n * 1e3) } : {
|
|
2146
2179
|
...i.each !== void 0 && { each: i.each * 1e3 },
|
|
2147
2180
|
...i.amount !== void 0 && { amount: i.amount * 1e3 },
|
|
2148
2181
|
...i.from !== void 0 && { from: i.from }
|
|
2149
2182
|
};
|
|
2150
2183
|
}
|
|
2151
|
-
const
|
|
2184
|
+
const Ls = {
|
|
2152
2185
|
opacity: 1,
|
|
2153
2186
|
x: 0,
|
|
2154
2187
|
y: 0,
|
|
@@ -2174,17 +2207,17 @@ const ws = {
|
|
|
2174
2207
|
clipBottom: 0,
|
|
2175
2208
|
clipLeft: 0
|
|
2176
2209
|
};
|
|
2177
|
-
function
|
|
2178
|
-
return
|
|
2210
|
+
function Ni(i) {
|
|
2211
|
+
return Ls[i];
|
|
2179
2212
|
}
|
|
2180
|
-
function
|
|
2213
|
+
function $s(i) {
|
|
2181
2214
|
const t = typeof i == "string" || Array.isArray(i) ? { path: i } : i;
|
|
2182
2215
|
if (!t || typeof t.path != "string" && !Array.isArray(t.path))
|
|
2183
2216
|
throw new Error("gsap-compat: motionPath needs a path — SVG path data or an array of { x, y } points.");
|
|
2184
2217
|
let e;
|
|
2185
2218
|
if (Array.isArray(t.path))
|
|
2186
|
-
e =
|
|
2187
|
-
else if (
|
|
2219
|
+
e = Ss(t.path, { curviness: t.curviness });
|
|
2220
|
+
else if (St(t.path))
|
|
2188
2221
|
e = t.path;
|
|
2189
2222
|
else
|
|
2190
2223
|
throw new Error(
|
|
@@ -2193,61 +2226,61 @@ function Ts(i) {
|
|
|
2193
2226
|
const n = { pathData: e };
|
|
2194
2227
|
return t.autoRotate !== void 0 && t.autoRotate !== !1 && (n.autoRotate = !0, typeof t.autoRotate == "number" && (n.rotateOffset = t.autoRotate)), t.matrix && (n.matrix = t.matrix), { config: n, start: t.start ?? 0, end: t.end ?? 1 };
|
|
2195
2228
|
}
|
|
2196
|
-
function
|
|
2229
|
+
function Fs(i) {
|
|
2197
2230
|
const t = typeof i == "string" || Array.isArray(i) ? { path: i } : { ...i };
|
|
2198
2231
|
return { ...t, start: t.end ?? 1, end: t.start ?? 0 };
|
|
2199
2232
|
}
|
|
2200
|
-
function
|
|
2233
|
+
function qi(i) {
|
|
2201
2234
|
return typeof i == "object" && i !== null && "shape" in i ? i.shape : i;
|
|
2202
2235
|
}
|
|
2203
|
-
function
|
|
2236
|
+
function Ds(i) {
|
|
2204
2237
|
if (i.morphSVG === void 0) return i;
|
|
2205
|
-
const { morphSVG: t, ...e } = i, n =
|
|
2206
|
-
if (typeof n != "string" || !
|
|
2238
|
+
const { morphSVG: t, ...e } = i, n = qi(t);
|
|
2239
|
+
if (typeof n != "string" || !St(n))
|
|
2207
2240
|
throw new Error(
|
|
2208
2241
|
`gsap-compat: morphSVG "${String(n)}" is not path data. Selectors and elements are resolved by live.to(); timeline() and tf need the path data itself.`
|
|
2209
2242
|
);
|
|
2210
2243
|
return { ...e, d: n };
|
|
2211
2244
|
}
|
|
2212
|
-
function
|
|
2245
|
+
function Bs(i, t) {
|
|
2213
2246
|
if (i === !0) return [0, t];
|
|
2214
2247
|
if (i === !1) return [0, 0];
|
|
2215
|
-
if (typeof i == "number") return [0,
|
|
2248
|
+
if (typeof i == "number") return [0, je(i, t)];
|
|
2216
2249
|
const e = i.trim().split(/[\s,]+/).filter(Boolean), n = (o) => {
|
|
2217
2250
|
const a = Number.parseFloat(o);
|
|
2218
2251
|
if (Number.isNaN(a)) throw new Error(`gsap-compat: drawSVG "${i}" is not a length or percentage`);
|
|
2219
|
-
return
|
|
2252
|
+
return je(o.endsWith("%") ? t * a / 100 : a, t);
|
|
2220
2253
|
};
|
|
2221
2254
|
if (e.length === 0) return [0, t];
|
|
2222
2255
|
if (e.length === 1) return [0, n(e[0])];
|
|
2223
2256
|
const s = n(e[0]), r = n(e[1]);
|
|
2224
2257
|
return s <= r ? [s, r] : [r, s];
|
|
2225
2258
|
}
|
|
2226
|
-
function
|
|
2227
|
-
const [e, n] =
|
|
2259
|
+
function Os(i, t) {
|
|
2260
|
+
const [e, n] = Bs(i, t);
|
|
2228
2261
|
return { strokeDasharray: [n - e, t], strokeDashoffset: -e };
|
|
2229
2262
|
}
|
|
2230
|
-
function
|
|
2263
|
+
function Ns(i, t) {
|
|
2231
2264
|
if (i.drawSVG === void 0) return i;
|
|
2232
2265
|
const { drawSVG: e, ...n } = i;
|
|
2233
|
-
return { ...n, ...
|
|
2266
|
+
return { ...n, ...Os(e, t) };
|
|
2234
2267
|
}
|
|
2235
|
-
function
|
|
2268
|
+
function qs(i) {
|
|
2236
2269
|
if (i.drawSVG !== void 0)
|
|
2237
2270
|
throw new Error(
|
|
2238
2271
|
"gsap-compat: drawSVG needs the stroke length from the page. Use live.to(), or animate strokeDasharray / strokeDashoffset directly (see drawSvgProperties)."
|
|
2239
2272
|
);
|
|
2240
2273
|
return i;
|
|
2241
2274
|
}
|
|
2242
|
-
function
|
|
2275
|
+
function je(i, t) {
|
|
2243
2276
|
return Math.max(0, Math.min(t, i));
|
|
2244
2277
|
}
|
|
2245
|
-
function
|
|
2278
|
+
function Ys(i) {
|
|
2246
2279
|
let t = 2166136261;
|
|
2247
2280
|
for (let e = 0; e < i.length; e++) t = Math.imul(t ^ i.charCodeAt(e), 16777619);
|
|
2248
2281
|
return t >>> 0;
|
|
2249
2282
|
}
|
|
2250
|
-
function
|
|
2283
|
+
function Xs(i, t, e) {
|
|
2251
2284
|
if (i.scrambleText !== void 0) {
|
|
2252
2285
|
const n = i.scrambleText, s = typeof n == "string" ? { text: n } : n;
|
|
2253
2286
|
if (typeof s?.text != "string")
|
|
@@ -2261,7 +2294,7 @@ function Cs(i, t, e) {
|
|
|
2261
2294
|
...r !== void 0 && { revealDelay: Math.min(r, 0.999) },
|
|
2262
2295
|
...s.tweenLength !== void 0 && { tweenLength: s.tweenLength },
|
|
2263
2296
|
...s.rightToLeft !== void 0 && { rightToLeft: s.rightToLeft },
|
|
2264
|
-
seed: s.seed ??
|
|
2297
|
+
seed: s.seed ?? Ys(`${t}|${s.text}`)
|
|
2265
2298
|
};
|
|
2266
2299
|
}
|
|
2267
2300
|
if (i.text !== void 0) {
|
|
@@ -2275,47 +2308,47 @@ function Cs(i, t, e) {
|
|
|
2275
2308
|
};
|
|
2276
2309
|
}
|
|
2277
2310
|
}
|
|
2278
|
-
function
|
|
2311
|
+
function Se(i) {
|
|
2279
2312
|
return Math.max(0.1, i / 25);
|
|
2280
2313
|
}
|
|
2281
|
-
function
|
|
2314
|
+
function Vs(i, t) {
|
|
2282
2315
|
const e = typeof t == "number" ? { velocity: t } : t;
|
|
2283
2316
|
if (typeof e?.velocity != "number" || !Number.isFinite(e.velocity))
|
|
2284
2317
|
throw new Error("gsap-compat: inertia needs a velocity for each property — a number, or { velocity }.");
|
|
2285
|
-
const n = e.friction ?? (e.resistance !== void 0 ?
|
|
2318
|
+
const n = e.friction ?? (e.resistance !== void 0 ? Se(e.resistance) : void 0), s = {
|
|
2286
2319
|
from: i,
|
|
2287
2320
|
velocity: e.velocity,
|
|
2288
2321
|
...n !== void 0 && { friction: n },
|
|
2289
2322
|
...e.min !== void 0 && { min: e.min },
|
|
2290
2323
|
...e.max !== void 0 && { max: e.max }
|
|
2291
2324
|
};
|
|
2292
|
-
return typeof e.end == "function" ? s.end = [e.end(
|
|
2325
|
+
return typeof e.end == "function" ? s.end = [e.end($t(s))] : e.end !== void 0 && (s.end = Array.isArray(e.end) ? [...e.end] : e.end), s;
|
|
2293
2326
|
}
|
|
2294
|
-
function
|
|
2327
|
+
function Ws(i) {
|
|
2295
2328
|
const t = i === !0 ? {} : typeof i == "string" ? { preset: i } : i;
|
|
2296
|
-
if (t.preset !== void 0 && !(t.preset in
|
|
2329
|
+
if (t.preset !== void 0 && !(t.preset in Ht))
|
|
2297
2330
|
throw new Error(
|
|
2298
|
-
`gsap-compat: unknown spring preset "${t.preset}" — use one of ${Object.keys(
|
|
2331
|
+
`gsap-compat: unknown spring preset "${t.preset}" — use one of ${Object.keys(Ht).join(", ")}`
|
|
2299
2332
|
);
|
|
2300
2333
|
return {
|
|
2301
|
-
...t.preset ?
|
|
2334
|
+
...t.preset ? Ht[t.preset] : {},
|
|
2302
2335
|
...t.stiffness !== void 0 && { stiffness: t.stiffness },
|
|
2303
2336
|
...t.damping !== void 0 && { damping: t.damping },
|
|
2304
2337
|
...t.mass !== void 0 && { mass: t.mass },
|
|
2305
2338
|
...t.restDelta !== void 0 && { restDelta: t.restDelta }
|
|
2306
2339
|
};
|
|
2307
2340
|
}
|
|
2308
|
-
function
|
|
2341
|
+
function js(i, t) {
|
|
2309
2342
|
if (i === !0 || typeof i == "string") return;
|
|
2310
2343
|
const e = i.velocity;
|
|
2311
2344
|
return typeof e == "number" ? e : e?.[t];
|
|
2312
2345
|
}
|
|
2313
|
-
class
|
|
2346
|
+
class ot {
|
|
2314
2347
|
/** The engine timeline. Use it for anything the facade does not cover. */
|
|
2315
2348
|
timeline;
|
|
2316
2349
|
options;
|
|
2317
2350
|
cursor = 0;
|
|
2318
|
-
fallbackRandom =
|
|
2351
|
+
fallbackRandom = fe(1);
|
|
2319
2352
|
previousStart = 0;
|
|
2320
2353
|
previousEnd = 0;
|
|
2321
2354
|
labels = /* @__PURE__ */ new Map();
|
|
@@ -2323,7 +2356,7 @@ class nt {
|
|
|
2323
2356
|
/** Last authored value per "target|property", for the resolution chain. */
|
|
2324
2357
|
lastValues = /* @__PURE__ */ new Map();
|
|
2325
2358
|
constructor(t = {}) {
|
|
2326
|
-
this.options = t, this.timeline = new
|
|
2359
|
+
this.options = t, this.timeline = new Ci({
|
|
2327
2360
|
// A timestamped default would make the same script compile to different
|
|
2328
2361
|
// JSON on every run, which breaks the determinism contract. Callers that
|
|
2329
2362
|
// need distinct ids pass one.
|
|
@@ -2340,25 +2373,25 @@ class nt {
|
|
|
2340
2373
|
// --- tween creation -----------------------------------------------------
|
|
2341
2374
|
/** Animate to the given values. */
|
|
2342
2375
|
to(t, e, n) {
|
|
2343
|
-
return this.build(t, void 0,
|
|
2376
|
+
return this.build(t, void 0, mt(e), n);
|
|
2344
2377
|
}
|
|
2345
2378
|
/** Animate from the given values to where the property already is. */
|
|
2346
2379
|
from(t, e, n) {
|
|
2347
|
-
const { config: s, properties: r } =
|
|
2380
|
+
const { config: s, properties: r } = It(mt(e)), { motionPath: o, text: a, scrambleText: c, ...l } = r, h = this.targetsOf(t)[0], f = { ...s };
|
|
2348
2381
|
for (const m of Object.keys(l))
|
|
2349
2382
|
f[m] = this.resolveStart(h, m);
|
|
2350
|
-
o !== void 0 && (f.motionPath =
|
|
2383
|
+
o !== void 0 && (f.motionPath = Fs(o));
|
|
2351
2384
|
const u = {}, d = String(this.resolveStart(h, "text"));
|
|
2352
|
-
return a !== void 0 && (u.text =
|
|
2385
|
+
return a !== void 0 && (u.text = ee(a), f.text = typeof a == "object" ? { ...a, value: d } : d), c !== void 0 && (u.text = ee(c), f.scrambleText = typeof c == "object" ? { ...c, text: d } : d), this.build(t, { ...l, ...u }, f, n);
|
|
2353
2386
|
}
|
|
2354
2387
|
/** Animate between two explicit sets of values. */
|
|
2355
2388
|
fromTo(t, e, n, s) {
|
|
2356
|
-
const { properties: r } =
|
|
2357
|
-
return this.build(t, r,
|
|
2389
|
+
const { properties: r } = It(mt(e));
|
|
2390
|
+
return this.build(t, r, mt(n), s);
|
|
2358
2391
|
}
|
|
2359
2392
|
/** Set values instantly — a single held keyframe. */
|
|
2360
2393
|
set(t, e, n) {
|
|
2361
|
-
return this.build(t, void 0, { ...
|
|
2394
|
+
return this.build(t, void 0, { ...mt(e), duration: 0 }, n);
|
|
2362
2395
|
}
|
|
2363
2396
|
// --- sequencing ---------------------------------------------------------
|
|
2364
2397
|
/** Start of the tween (after its delay) or call added last, in milliseconds. */
|
|
@@ -2374,16 +2407,16 @@ class nt {
|
|
|
2374
2407
|
* no duration would be: `'<'` and `'>'` after it refer to it. Returns its time in ms.
|
|
2375
2408
|
*/
|
|
2376
2409
|
addEvent(t) {
|
|
2377
|
-
const e = Math.max(0,
|
|
2410
|
+
const e = Math.max(0, pt(t, this.context()));
|
|
2378
2411
|
return this.previousStart = e, this.previousEnd = e, this.cursor = Math.max(this.cursor, e), e;
|
|
2379
2412
|
}
|
|
2380
2413
|
/** Resolve a position (seconds, label, relative) to milliseconds without adding anything. */
|
|
2381
2414
|
timeOf(t) {
|
|
2382
|
-
return
|
|
2415
|
+
return pt(t, this.context());
|
|
2383
2416
|
}
|
|
2384
2417
|
/** Name a point in time, for use as a position parameter. */
|
|
2385
2418
|
addLabel(t, e) {
|
|
2386
|
-
return this.labels.set(t,
|
|
2419
|
+
return this.labels.set(t, pt(e, this.context())), this;
|
|
2387
2420
|
}
|
|
2388
2421
|
/** Time of a label, in milliseconds. */
|
|
2389
2422
|
/** Every label's time in milliseconds, in time order. */
|
|
@@ -2401,10 +2434,10 @@ class nt {
|
|
|
2401
2434
|
* one flat, serializable track list.
|
|
2402
2435
|
*/
|
|
2403
2436
|
add(t, e) {
|
|
2404
|
-
const n =
|
|
2437
|
+
const n = pt(e, this.context());
|
|
2405
2438
|
for (const r of t.timeline.tracks) {
|
|
2406
2439
|
if (!("keyframes" in r)) continue;
|
|
2407
|
-
const o =
|
|
2440
|
+
const o = ue({
|
|
2408
2441
|
...r,
|
|
2409
2442
|
id: this.nextTrackId(`nested-${r.id}`),
|
|
2410
2443
|
keyframes: r.keyframes.map((a) => ({ ...a, time: a.time + n }))
|
|
@@ -2474,107 +2507,107 @@ class nt {
|
|
|
2474
2507
|
* each property's start comes from the resolution chain.
|
|
2475
2508
|
*/
|
|
2476
2509
|
build(t, e, n, s) {
|
|
2477
|
-
const { config: r, properties: o } =
|
|
2510
|
+
const { config: r, properties: o } = It(n), { motionPath: a, text: c, scrambleText: l, inertia: h, ...f } = o, u = this.targetsOf(t), d = pt(s, this.context()), m = Bt(r.delay, 0), p = Bt(r.duration, 500), g = de(r.stagger, {
|
|
2478
2511
|
count: u.length,
|
|
2479
2512
|
columnsFromLayout: this.options.layoutColumns ? () => this.options.layoutColumns(u) : void 0,
|
|
2480
2513
|
random: this.options.random ?? this.fallbackRandom
|
|
2481
2514
|
}), y = this.easingFor(r.ease), v = [], b = r.spring;
|
|
2482
2515
|
let T = 0, w = !1;
|
|
2483
|
-
for (const [
|
|
2516
|
+
for (const [x, P] of Object.entries(f)) {
|
|
2484
2517
|
const E = P;
|
|
2485
|
-
let C = e?.[
|
|
2518
|
+
let C = e?.[x] !== void 0 ? e[x] : this.resolveStart(u[0], x);
|
|
2486
2519
|
if (typeof C != typeof E && (this.warn(
|
|
2487
|
-
`no usable start value for "${
|
|
2488
|
-
), C = E), b !== void 0 && (typeof C != "number" || typeof E != "number") && this.warn(`spring works on numbers, so "${
|
|
2520
|
+
`no usable start value for "${x}" on "${u[0]}" — it will snap to ${String(E)}. Use fromTo() to animate it.`
|
|
2521
|
+
), C = E), b !== void 0 && (typeof C != "number" || typeof E != "number") && this.warn(`spring works on numbers, so "${x}" on "${u[0]}" eases instead`), b !== void 0 && typeof C == "number" && typeof E == "number") {
|
|
2489
2522
|
const L = {
|
|
2490
|
-
...
|
|
2523
|
+
...Ws(b),
|
|
2491
2524
|
from: C,
|
|
2492
2525
|
to: E,
|
|
2493
|
-
velocity:
|
|
2494
|
-
}, N = this.nextTrackId(`${u[0]}-${
|
|
2526
|
+
velocity: js(b, x) ?? this.options.startVelocity?.(u[0], x) ?? 0
|
|
2527
|
+
}, N = this.nextTrackId(`${u[0]}-${x}-spring`), O = {
|
|
2495
2528
|
id: N,
|
|
2496
2529
|
target: u[0],
|
|
2497
2530
|
...u.length > 1 && { targets: u },
|
|
2498
2531
|
...g && u.length > 1 && { stagger: g },
|
|
2499
|
-
property:
|
|
2532
|
+
property: x,
|
|
2500
2533
|
kind: "spring",
|
|
2501
2534
|
spring: L,
|
|
2502
2535
|
delay: d + m
|
|
2503
2536
|
};
|
|
2504
|
-
this.timeline.addTrack(O), v.push(N), T = Math.max(T,
|
|
2505
|
-
for (const R of u) this.lastValues.set(`${R}|${
|
|
2537
|
+
this.timeline.addTrack(O), v.push(N), T = Math.max(T, hn(L));
|
|
2538
|
+
for (const R of u) this.lastValues.set(`${R}|${x}`, E);
|
|
2506
2539
|
continue;
|
|
2507
2540
|
}
|
|
2508
2541
|
w = !0;
|
|
2509
|
-
const M = this.keyframesFor(C, E, p, y, r.ease), I = this.nextTrackId(`${u[0]}-${
|
|
2542
|
+
const M = this.keyframesFor(C, E, p, y, r.ease), I = this.nextTrackId(`${u[0]}-${x}`);
|
|
2510
2543
|
this.timeline.addTrack(
|
|
2511
|
-
|
|
2544
|
+
ue({
|
|
2512
2545
|
id: I,
|
|
2513
2546
|
target: u[0],
|
|
2514
2547
|
...u.length > 1 && { targets: u },
|
|
2515
2548
|
...g && u.length > 1 && { stagger: g },
|
|
2516
|
-
property:
|
|
2549
|
+
property: x,
|
|
2517
2550
|
delay: d + m,
|
|
2518
2551
|
keyframes: M
|
|
2519
2552
|
})
|
|
2520
2553
|
), v.push(I);
|
|
2521
|
-
for (const L of u) this.lastValues.set(`${L}|${
|
|
2554
|
+
for (const L of u) this.lastValues.set(`${L}|${x}`, E);
|
|
2522
2555
|
}
|
|
2523
|
-
const
|
|
2524
|
-
if (
|
|
2525
|
-
const
|
|
2556
|
+
const k = Xs({ text: c, scrambleText: l }, u[0], p);
|
|
2557
|
+
if (k) {
|
|
2558
|
+
const x = e?.text ?? e?.scrambleText, P = x !== void 0 ? ee(x) : this.resolveStart(u[0], "text"), E = this.nextTrackId(`${u[0]}-text`), C = {
|
|
2526
2559
|
id: E,
|
|
2527
2560
|
target: u[0],
|
|
2528
2561
|
...u.length > 1 && { targets: u },
|
|
2529
2562
|
...g && u.length > 1 && { stagger: g },
|
|
2530
2563
|
property: "text",
|
|
2531
|
-
textConfig: { from: typeof P == "string" ? P : String(P ?? ""), ...
|
|
2564
|
+
textConfig: { from: typeof P == "string" ? P : String(P ?? ""), ...k },
|
|
2532
2565
|
delay: d + m,
|
|
2533
2566
|
keyframes: this.keyframesFor(0, 1, p, y, r.ease)
|
|
2534
2567
|
};
|
|
2535
2568
|
this.timeline.addTrack(C), v.push(E);
|
|
2536
|
-
for (const M of u) this.lastValues.set(`${M}|text`,
|
|
2569
|
+
for (const M of u) this.lastValues.set(`${M}|text`, k.to);
|
|
2537
2570
|
}
|
|
2538
2571
|
if (a !== void 0) {
|
|
2539
|
-
const { config:
|
|
2572
|
+
const { config: x, start: P, end: E } = $s(a), C = this.nextTrackId(`${u[0]}-motionPath`), M = {
|
|
2540
2573
|
id: C,
|
|
2541
2574
|
target: u[0],
|
|
2542
2575
|
...u.length > 1 && { targets: u },
|
|
2543
2576
|
...g && u.length > 1 && { stagger: g },
|
|
2544
2577
|
property: "motionPath",
|
|
2545
|
-
motionPathConfig:
|
|
2578
|
+
motionPathConfig: x,
|
|
2546
2579
|
delay: d + m,
|
|
2547
2580
|
keyframes: this.keyframesFor(P, E, p, y, r.ease)
|
|
2548
2581
|
};
|
|
2549
2582
|
this.timeline.addTrack(M), v.push(C);
|
|
2550
2583
|
}
|
|
2551
2584
|
if (h !== void 0)
|
|
2552
|
-
for (const [
|
|
2553
|
-
const E = this.resolveStart(u[0],
|
|
2585
|
+
for (const [x, P] of Object.entries(h)) {
|
|
2586
|
+
const E = this.resolveStart(u[0], x);
|
|
2554
2587
|
if (typeof E != "number") {
|
|
2555
|
-
this.warn(`inertia on "${
|
|
2588
|
+
this.warn(`inertia on "${x}" needs a numeric start value; skipped`);
|
|
2556
2589
|
continue;
|
|
2557
2590
|
}
|
|
2558
|
-
const C =
|
|
2591
|
+
const C = Vs(E, P), M = this.nextTrackId(`${u[0]}-${x}-inertia`), I = {
|
|
2559
2592
|
id: M,
|
|
2560
2593
|
target: u[0],
|
|
2561
2594
|
...u.length > 1 && { targets: u },
|
|
2562
2595
|
...g && u.length > 1 && { stagger: g },
|
|
2563
|
-
property:
|
|
2596
|
+
property: x,
|
|
2564
2597
|
kind: "inertia",
|
|
2565
2598
|
inertia: C,
|
|
2566
2599
|
delay: d + m
|
|
2567
2600
|
};
|
|
2568
|
-
this.timeline.addTrack(I), v.push(M), T = Math.max(T,
|
|
2569
|
-
for (const L of u) this.lastValues.set(`${L}|${
|
|
2601
|
+
this.timeline.addTrack(I), v.push(M), T = Math.max(T, xt(C));
|
|
2602
|
+
for (const L of u) this.lastValues.set(`${L}|${x}`, kt(C));
|
|
2570
2603
|
}
|
|
2571
|
-
const
|
|
2604
|
+
const B = ((h !== void 0 || b !== void 0) && !w && !k && a === void 0 ? T : Math.max(p, T)) + (g && u.length > 1 ? Yt(u.length, g) : 0), A = d + m + B;
|
|
2572
2605
|
return this.previousStart = d + m, this.previousEnd = A, this.cursor = Math.max(this.cursor, A), {
|
|
2573
2606
|
trackIds: v,
|
|
2574
2607
|
start: d + m,
|
|
2575
2608
|
end: A,
|
|
2576
2609
|
kill: () => {
|
|
2577
|
-
for (const
|
|
2610
|
+
for (const x of v) this.timeline.removeTrack(x);
|
|
2578
2611
|
}
|
|
2579
2612
|
};
|
|
2580
2613
|
}
|
|
@@ -2585,10 +2618,10 @@ class nt {
|
|
|
2585
2618
|
const o = { time: 0, value: t };
|
|
2586
2619
|
if (n <= 0)
|
|
2587
2620
|
return [{ time: 0, value: e }];
|
|
2588
|
-
const a = typeof r == "string" ?
|
|
2589
|
-
if (a?.requiresBaking === "custom" || this.options.bakeEases &&
|
|
2590
|
-
const l = a?.fn ??
|
|
2591
|
-
return [o, ...
|
|
2621
|
+
const a = typeof r == "string" ? Dt(r) : void 0;
|
|
2622
|
+
if (a?.requiresBaking === "custom" || this.options.bakeEases && Rt(s)) {
|
|
2623
|
+
const l = a?.fn ?? z(s);
|
|
2624
|
+
return [o, ...Ei(o, { time: n, value: e }, l, { intervalMs: this.options.bakeIntervalMs })];
|
|
2592
2625
|
}
|
|
2593
2626
|
return [o, { time: n, value: e, ...s && { easing: s } }];
|
|
2594
2627
|
}
|
|
@@ -2605,14 +2638,14 @@ class nt {
|
|
|
2605
2638
|
throw new Error(
|
|
2606
2639
|
`gsap-compat: no starting shape for "${t}". Use fromTo({ d: … }, { morphSVG: … }), or live.to(), which reads the element's current shape.`
|
|
2607
2640
|
);
|
|
2608
|
-
const o =
|
|
2641
|
+
const o = Ni(e);
|
|
2609
2642
|
return o !== void 0 ? (this.warn(
|
|
2610
2643
|
`no start value for "${e}" on "${t}" — using the static default ${o}. GSAP would read the live DOM here; tinyfly cannot, so pass an explicit fromTo() or a defaults map.`
|
|
2611
2644
|
), o) : (this.warn(`no start value or default for "${e}" on "${t}" — using 0`), 0);
|
|
2612
2645
|
}
|
|
2613
2646
|
easingFor(t) {
|
|
2614
2647
|
if (t !== void 0) {
|
|
2615
|
-
if (typeof t == "string") return
|
|
2648
|
+
if (typeof t == "string") return Dt(t).easing;
|
|
2616
2649
|
if (typeof t == "function")
|
|
2617
2650
|
throw new Error(
|
|
2618
2651
|
'gsap-compat: function eases cannot be serialized. Use a named ease, or a cubic-bezier via { type: "cubic-bezier", points: [...] }.'
|
|
@@ -2640,7 +2673,7 @@ class nt {
|
|
|
2640
2673
|
this.options.onWarning?.(`gsap-compat: ${t}`);
|
|
2641
2674
|
}
|
|
2642
2675
|
}
|
|
2643
|
-
function
|
|
2676
|
+
function ee(i) {
|
|
2644
2677
|
if (typeof i == "string") return i;
|
|
2645
2678
|
if (i && typeof i == "object") {
|
|
2646
2679
|
const t = i;
|
|
@@ -2648,13 +2681,13 @@ function Kt(i) {
|
|
|
2648
2681
|
}
|
|
2649
2682
|
return String(i ?? "");
|
|
2650
2683
|
}
|
|
2651
|
-
function
|
|
2652
|
-
return new
|
|
2684
|
+
function Us(i) {
|
|
2685
|
+
return new ot(i);
|
|
2653
2686
|
}
|
|
2654
|
-
function
|
|
2655
|
-
return
|
|
2687
|
+
function mt(i) {
|
|
2688
|
+
return qs(Ds(i));
|
|
2656
2689
|
}
|
|
2657
|
-
const
|
|
2690
|
+
const Hs = /* @__PURE__ */ new Set([
|
|
2658
2691
|
"blur",
|
|
2659
2692
|
"brightness",
|
|
2660
2693
|
"glow",
|
|
@@ -2663,16 +2696,16 @@ const $s = /* @__PURE__ */ new Set([
|
|
|
2663
2696
|
"shadowY",
|
|
2664
2697
|
"shadowBlur",
|
|
2665
2698
|
"shadowColor"
|
|
2666
|
-
]),
|
|
2667
|
-
function
|
|
2699
|
+
]), zs = "#ffffff", Gs = "rgba(0, 0, 0, 0.5)";
|
|
2700
|
+
function Ks(i) {
|
|
2668
2701
|
const t = [];
|
|
2669
|
-
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 ??
|
|
2702
|
+
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 ?? zs})`), i.shadowX !== void 0 || i.shadowY !== void 0 || i.shadowBlur !== void 0) {
|
|
2670
2703
|
const e = i.shadowX ?? 0, n = i.shadowY ?? 0, s = Math.max(0, i.shadowBlur ?? 0);
|
|
2671
|
-
t.push(`drop-shadow(${e}px ${n}px ${s}px ${i.shadowColor ??
|
|
2704
|
+
t.push(`drop-shadow(${e}px ${n}px ${s}px ${i.shadowColor ?? Gs})`);
|
|
2672
2705
|
}
|
|
2673
2706
|
return t.length > 0 ? t.join(" ") : null;
|
|
2674
2707
|
}
|
|
2675
|
-
function
|
|
2708
|
+
function Zs(i, t) {
|
|
2676
2709
|
const e = i.childNodes.length === 1 ? i.firstChild : null;
|
|
2677
2710
|
if (e && e.nodeType === 3) {
|
|
2678
2711
|
const n = e;
|
|
@@ -2681,12 +2714,12 @@ function Ns(i, t) {
|
|
|
2681
2714
|
}
|
|
2682
2715
|
i.textContent !== t && (i.textContent = t);
|
|
2683
2716
|
}
|
|
2684
|
-
function
|
|
2717
|
+
function Qs(i) {
|
|
2685
2718
|
if (!("ownerSVGElement" in i)) return;
|
|
2686
2719
|
const t = i.style;
|
|
2687
2720
|
!t || t.transformBox || (t.transformBox = "fill-box", t.transformOrigin || (t.transformOrigin = "50% 50%"));
|
|
2688
2721
|
}
|
|
2689
|
-
const
|
|
2722
|
+
const Ue = /* @__PURE__ */ new Set([
|
|
2690
2723
|
"width",
|
|
2691
2724
|
"height",
|
|
2692
2725
|
"top",
|
|
@@ -2712,7 +2745,7 @@ const qe = /* @__PURE__ */ new Set([
|
|
|
2712
2745
|
"gap",
|
|
2713
2746
|
"rowGap",
|
|
2714
2747
|
"columnGap"
|
|
2715
|
-
]),
|
|
2748
|
+
]), Js = /* @__PURE__ */ new Set([
|
|
2716
2749
|
"x",
|
|
2717
2750
|
"y",
|
|
2718
2751
|
"z",
|
|
@@ -2730,14 +2763,14 @@ const qe = /* @__PURE__ */ new Set([
|
|
|
2730
2763
|
"motionPathX",
|
|
2731
2764
|
"motionPathY",
|
|
2732
2765
|
"motionPathRotate"
|
|
2733
|
-
]),
|
|
2766
|
+
]), tr = /* @__PURE__ */ new Set(["originX", "originY"]), er = /* @__PURE__ */ new Set(["clipTop", "clipRight", "clipBottom", "clipLeft"]), ir = {
|
|
2734
2767
|
fill: "backgroundColor",
|
|
2735
2768
|
stroke: "borderColor",
|
|
2736
2769
|
strokeWidth: "borderWidth",
|
|
2737
2770
|
color: "color",
|
|
2738
2771
|
backgroundColor: "backgroundColor",
|
|
2739
2772
|
borderColor: "borderColor"
|
|
2740
|
-
},
|
|
2773
|
+
}, He = {
|
|
2741
2774
|
fill: "fill",
|
|
2742
2775
|
stroke: "stroke",
|
|
2743
2776
|
strokeWidth: "strokeWidth",
|
|
@@ -2745,8 +2778,8 @@ const qe = /* @__PURE__ */ new Set([
|
|
|
2745
2778
|
strokeDashoffset: "strokeDashoffset",
|
|
2746
2779
|
fillOpacity: "fillOpacity",
|
|
2747
2780
|
strokeOpacity: "strokeOpacity"
|
|
2748
|
-
},
|
|
2749
|
-
class
|
|
2781
|
+
}, nr = "http://www.w3.org/2000/svg";
|
|
2782
|
+
class J {
|
|
2750
2783
|
targets = /* @__PURE__ */ new Map();
|
|
2751
2784
|
/**
|
|
2752
2785
|
* Register an HTML element as an animation target.
|
|
@@ -2790,18 +2823,18 @@ class K {
|
|
|
2790
2823
|
const a = e.has("motionPathX"), c = e.has("motionPathY"), l = e.has("motionPathRotate");
|
|
2791
2824
|
for (const [u, d] of e)
|
|
2792
2825
|
if (!(u === "x" && a) && !(u === "y" && c) && !((u === "rotate" || u === "rotateZ") && l)) {
|
|
2793
|
-
if (
|
|
2826
|
+
if (Js.has(u)) {
|
|
2794
2827
|
const m = this.buildTransformPart(u, d);
|
|
2795
2828
|
m && n.push(m);
|
|
2796
|
-
} else if (
|
|
2829
|
+
} else if (tr.has(u))
|
|
2797
2830
|
typeof d == "number" && ((s ??= {})[u] = d);
|
|
2798
|
-
else if (
|
|
2831
|
+
else if (er.has(u))
|
|
2799
2832
|
typeof d == "number" && ((r ??= {})[u] = d);
|
|
2800
|
-
else if (
|
|
2833
|
+
else if (Hs.has(u))
|
|
2801
2834
|
(o ??= {})[u] = d;
|
|
2802
2835
|
else if (u !== "perspective") {
|
|
2803
2836
|
if (u !== "shine") if (u === "text" && typeof d == "string")
|
|
2804
|
-
|
|
2837
|
+
Zs(t, d);
|
|
2805
2838
|
else if (u === "d" && typeof d == "string") {
|
|
2806
2839
|
const m = t;
|
|
2807
2840
|
(m.tagName?.toLowerCase() === "path" ? m : m.querySelector?.("path"))?.setAttribute?.("d", d);
|
|
@@ -2812,7 +2845,7 @@ class K {
|
|
|
2812
2845
|
const h = e.get("shine");
|
|
2813
2846
|
typeof h == "number" && this.applyShine(t, h);
|
|
2814
2847
|
const f = e.get("perspective");
|
|
2815
|
-
if (typeof f == "number" && n.unshift(`perspective(${f}px)`), n.length > 0 && (t.style.transform = n.join(" "),
|
|
2848
|
+
if (typeof f == "number" && n.unshift(`perspective(${f}px)`), n.length > 0 && (t.style.transform = n.join(" "), Qs(t)), s) {
|
|
2816
2849
|
const u = s.originX ?? 50, d = s.originY ?? 50;
|
|
2817
2850
|
t.style.transformOrigin = `${u}% ${d}%`;
|
|
2818
2851
|
}
|
|
@@ -2821,7 +2854,7 @@ class K {
|
|
|
2821
2854
|
t.style.clipPath = `inset(${u}% ${d}% ${m}% ${p}%)`;
|
|
2822
2855
|
}
|
|
2823
2856
|
if (o) {
|
|
2824
|
-
const u =
|
|
2857
|
+
const u = Ks(o);
|
|
2825
2858
|
u && (t.style.filter = u);
|
|
2826
2859
|
}
|
|
2827
2860
|
}
|
|
@@ -2881,21 +2914,21 @@ class K {
|
|
|
2881
2914
|
*/
|
|
2882
2915
|
applyStyleProperty(t, e, n) {
|
|
2883
2916
|
let s;
|
|
2884
|
-
if (t.namespaceURI ===
|
|
2917
|
+
if (t.namespaceURI === nr && e in He) {
|
|
2885
2918
|
const a = Array.isArray(n) ? n.join(", ") : String(n);
|
|
2886
|
-
t.style[
|
|
2919
|
+
t.style[He[e]] = a;
|
|
2887
2920
|
return;
|
|
2888
|
-
} else e === "fill" && t.dataset?.elementType === "text" ? s = "color" : s =
|
|
2921
|
+
} else e === "fill" && t.dataset?.elementType === "text" ? s = "color" : s = ir[e] ?? e;
|
|
2889
2922
|
let o;
|
|
2890
|
-
typeof n == "number" ?
|
|
2923
|
+
typeof n == "number" ? Ue.has(e) || Ue.has(s) ? o = `${n}px` : o = String(n) : Array.isArray(n) ? o = n.join(", ") : o = n, t.style[s] = o;
|
|
2891
2924
|
}
|
|
2892
2925
|
}
|
|
2893
|
-
const
|
|
2926
|
+
const sr = {
|
|
2894
2927
|
request: (i) => requestAnimationFrame(i),
|
|
2895
2928
|
cancel: (i) => cancelAnimationFrame(i)
|
|
2896
2929
|
};
|
|
2897
|
-
class
|
|
2898
|
-
adapter = new
|
|
2930
|
+
class rr {
|
|
2931
|
+
adapter = new J();
|
|
2899
2932
|
scheduler;
|
|
2900
2933
|
rootOption;
|
|
2901
2934
|
/** Where live timelines on this stage report warnings, unless they have their own `onWarning` */
|
|
@@ -2919,7 +2952,7 @@ class Us {
|
|
|
2919
2952
|
*/
|
|
2920
2953
|
liveTimelines = /* @__PURE__ */ new Set();
|
|
2921
2954
|
/** GSAP-style utilities, with this stage's seeded random sequence (`live.utils`). */
|
|
2922
|
-
utils =
|
|
2955
|
+
utils = Es();
|
|
2923
2956
|
/** Playing timelines, in activation order. */
|
|
2924
2957
|
active = /* @__PURE__ */ new Map();
|
|
2925
2958
|
/** Last applied value per target name and property. */
|
|
@@ -2930,7 +2963,7 @@ class Us {
|
|
|
2930
2963
|
lastTimestamp = null;
|
|
2931
2964
|
destroyed = !1;
|
|
2932
2965
|
constructor(t = {}) {
|
|
2933
|
-
this.scheduler = t.scheduler ??
|
|
2966
|
+
this.scheduler = t.scheduler ?? sr, this.rootOption = t.root, this.onWarning = t.onWarning;
|
|
2934
2967
|
}
|
|
2935
2968
|
// --- targets ------------------------------------------------------------
|
|
2936
2969
|
/**
|
|
@@ -2951,7 +2984,7 @@ class Us {
|
|
|
2951
2984
|
const e = [];
|
|
2952
2985
|
for (const n of this.targetsOf(t)) {
|
|
2953
2986
|
const s = this.nameFor(n);
|
|
2954
|
-
|
|
2987
|
+
ie(n) && this.currentCollector?.touch(n, s), e.push(s);
|
|
2955
2988
|
}
|
|
2956
2989
|
return e;
|
|
2957
2990
|
}
|
|
@@ -3126,15 +3159,15 @@ class Us {
|
|
|
3126
3159
|
targetsOf(t) {
|
|
3127
3160
|
if (typeof t == "string")
|
|
3128
3161
|
return Array.from(this.selectorRoot.querySelectorAll(t));
|
|
3129
|
-
if (
|
|
3130
|
-
if (!
|
|
3162
|
+
if (ie(t)) return [t];
|
|
3163
|
+
if (!or(t)) return [t];
|
|
3131
3164
|
const e = [];
|
|
3132
3165
|
for (const n of Array.from(t))
|
|
3133
3166
|
e.push(...this.targetsOf(n));
|
|
3134
3167
|
return e;
|
|
3135
3168
|
}
|
|
3136
3169
|
nameFor(t) {
|
|
3137
|
-
return
|
|
3170
|
+
return ie(t) ? this.elementName(t) : this.objectName(t);
|
|
3138
3171
|
}
|
|
3139
3172
|
objectName(t) {
|
|
3140
3173
|
const e = this.objectNames.get(t);
|
|
@@ -3156,15 +3189,15 @@ class Us {
|
|
|
3156
3189
|
return this.names.set(t, n), this.elements.set(n, t), this.adapter.registerTarget(n, t), n;
|
|
3157
3190
|
}
|
|
3158
3191
|
}
|
|
3159
|
-
function
|
|
3192
|
+
function ie(i) {
|
|
3160
3193
|
return typeof i == "object" && i !== null && i.nodeType === 1;
|
|
3161
3194
|
}
|
|
3162
|
-
function
|
|
3195
|
+
function or(i) {
|
|
3163
3196
|
if (Array.isArray(i)) return !0;
|
|
3164
3197
|
const t = i;
|
|
3165
3198
|
return typeof t.length == "number" && typeof t.item == "function";
|
|
3166
3199
|
}
|
|
3167
|
-
function
|
|
3200
|
+
function Ot(i) {
|
|
3168
3201
|
const t = i.style;
|
|
3169
3202
|
if (!t) return i.getBoundingClientRect();
|
|
3170
3203
|
const e = t.transform;
|
|
@@ -3172,30 +3205,30 @@ function $t(i) {
|
|
|
3172
3205
|
const n = i.getBoundingClientRect();
|
|
3173
3206
|
return t.transform = e, n;
|
|
3174
3207
|
}
|
|
3175
|
-
const
|
|
3176
|
-
function
|
|
3208
|
+
const ze = (i) => typeof i == "object" && i !== null && i.nodeType === 1;
|
|
3209
|
+
function ar(i) {
|
|
3177
3210
|
const t = {};
|
|
3178
3211
|
for (const e of Array.from(i.attributes)) t[e.name] = e.value;
|
|
3179
3212
|
return t;
|
|
3180
3213
|
}
|
|
3181
|
-
function
|
|
3214
|
+
function cr(i) {
|
|
3182
3215
|
const t = i.getScreenCTM?.();
|
|
3183
3216
|
if (t) return [t.a, t.b, t.c, t.d, t.e, t.f];
|
|
3184
3217
|
const e = i.getBoundingClientRect();
|
|
3185
3218
|
return [1, 0, 0, 1, e.left, e.top];
|
|
3186
3219
|
}
|
|
3187
|
-
function
|
|
3188
|
-
const e = typeof i == "string" || Array.isArray(i) ||
|
|
3189
|
-
const S =
|
|
3190
|
-
return S || t.warn(`gsap-compat: motionPath could not find "${String(
|
|
3220
|
+
function lr(i, t) {
|
|
3221
|
+
const e = typeof i == "string" || Array.isArray(i) || ze(i) ? { path: i } : i, { align: n, alignOrigin: s, path: r, ...o } = e, a = (k) => {
|
|
3222
|
+
const S = ze(k) ? k : t.query(k);
|
|
3223
|
+
return S || t.warn(`gsap-compat: motionPath could not find "${String(k)}"`), S;
|
|
3191
3224
|
};
|
|
3192
3225
|
let c = null, l = "";
|
|
3193
|
-
if (Array.isArray(r) || typeof r == "string" &&
|
|
3226
|
+
if (Array.isArray(r) || typeof r == "string" && St(r))
|
|
3194
3227
|
l = r;
|
|
3195
3228
|
else {
|
|
3196
3229
|
c = a(r);
|
|
3197
|
-
const
|
|
3198
|
-
c && !
|
|
3230
|
+
const k = c && Te({ tag: c.localName, attributes: ar(c) });
|
|
3231
|
+
c && !k && t.warn(`gsap-compat: motionPath element <${c.localName}> has no path geometry`), l = k ?? "";
|
|
3199
3232
|
}
|
|
3200
3233
|
const h = { ...o, path: l };
|
|
3201
3234
|
if (n === void 0 || n === !1) return h;
|
|
@@ -3204,9 +3237,9 @@ function Ks(i, t) {
|
|
|
3204
3237
|
return n === !0 && t.warn("gsap-compat: motionPath align: true needs the path to be an element"), h;
|
|
3205
3238
|
const u = t.targets[0];
|
|
3206
3239
|
if (!u) return h;
|
|
3207
|
-
const [d, m, p, g, y, v] =
|
|
3208
|
-
for (const
|
|
3209
|
-
const S =
|
|
3240
|
+
const [d, m, p, g, y, v] = cr(f), b = Ot(u), [T, w] = s ?? [0.5, 0.5];
|
|
3241
|
+
for (const k of t.targets.slice(1)) {
|
|
3242
|
+
const S = Ot(k);
|
|
3210
3243
|
if (Math.abs(S.left - b.left) > 0.5 || Math.abs(S.top - b.top) > 0.5) {
|
|
3211
3244
|
t.warn("gsap-compat: motionPath align measures the first target; the others are laid out elsewhere");
|
|
3212
3245
|
break;
|
|
@@ -3214,37 +3247,37 @@ function Ks(i, t) {
|
|
|
3214
3247
|
}
|
|
3215
3248
|
return h.matrix = [d, m, p, g, y - b.left - T * b.width, v - b.top - w * b.height], h;
|
|
3216
3249
|
}
|
|
3217
|
-
const
|
|
3218
|
-
function
|
|
3250
|
+
const Yi = (i) => typeof i == "object" && i !== null && i.nodeType === 1;
|
|
3251
|
+
function Xi(i) {
|
|
3219
3252
|
const t = {};
|
|
3220
3253
|
for (const e of Array.from(i.attributes)) t[e.name] = e.value;
|
|
3221
3254
|
return t;
|
|
3222
3255
|
}
|
|
3223
|
-
function
|
|
3256
|
+
function Vi(i) {
|
|
3224
3257
|
if (!i) return null;
|
|
3225
|
-
const t =
|
|
3258
|
+
const t = Te({ tag: i.localName, attributes: Xi(i) });
|
|
3226
3259
|
return t || (i.querySelector("path")?.getAttribute("d") ?? null);
|
|
3227
3260
|
}
|
|
3228
|
-
function
|
|
3229
|
-
const n =
|
|
3230
|
-
if (typeof n == "string" &&
|
|
3231
|
-
const s =
|
|
3261
|
+
function hr(i, t, e) {
|
|
3262
|
+
const n = qi(i);
|
|
3263
|
+
if (typeof n == "string" && St(n)) return n;
|
|
3264
|
+
const s = Yi(n) ? n : typeof n == "string" ? t(n) : null, r = Vi(s);
|
|
3232
3265
|
return r || (e(`gsap-compat: morphSVG could not find a shape for "${String(n)}"`), "");
|
|
3233
3266
|
}
|
|
3234
|
-
const
|
|
3235
|
-
function
|
|
3236
|
-
return (typeof i == "string" ? Array.from(t.querySelectorAll(i)) :
|
|
3267
|
+
const ur = /* @__PURE__ */ new Set(["cx", "cy", "r", "rx", "ry", "x", "y", "width", "height", "x1", "y1", "x2", "y2", "points"]);
|
|
3268
|
+
function fr(i, t = document) {
|
|
3269
|
+
return (typeof i == "string" ? Array.from(t.querySelectorAll(i)) : Yi(i) ? [i] : Array.from(i)).map((n) => {
|
|
3237
3270
|
if (n.localName === "path") return n;
|
|
3238
|
-
const s =
|
|
3271
|
+
const s = Te({ tag: n.localName, attributes: Xi(n) });
|
|
3239
3272
|
if (!s || !n.parentNode) return n;
|
|
3240
3273
|
const r = n.ownerDocument.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3241
3274
|
for (const o of Array.from(n.attributes))
|
|
3242
|
-
|
|
3275
|
+
ur.has(o.name) || r.setAttribute(o.name, o.value);
|
|
3243
3276
|
return r.setAttribute("d", s), n.parentNode.replaceChild(r, n), r;
|
|
3244
3277
|
});
|
|
3245
3278
|
}
|
|
3246
|
-
const
|
|
3247
|
-
class
|
|
3279
|
+
const Ge = 0.3;
|
|
3280
|
+
class dr {
|
|
3248
3281
|
options;
|
|
3249
3282
|
target;
|
|
3250
3283
|
running = !1;
|
|
@@ -3278,7 +3311,7 @@ class tr {
|
|
|
3278
3311
|
}
|
|
3279
3312
|
// --- gesture lifecycle --------------------------------------------------
|
|
3280
3313
|
begin(t, e, n) {
|
|
3281
|
-
this.dragging = !0, this.passedTolerance = !1, this.startX = t, this.startY = e, this.lastX = t, this.lastY = e, this.velocityX = 0, this.velocityY = 0, this.lastTime =
|
|
3314
|
+
this.dragging = !0, this.passedTolerance = !1, this.startX = t, this.startY = e, this.lastX = t, this.lastY = e, this.velocityX = 0, this.velocityY = 0, this.lastTime = Ke(), this.options.onPress?.(this.stateFrom(0, 0, n));
|
|
3282
3315
|
}
|
|
3283
3316
|
move(t, e, n) {
|
|
3284
3317
|
if (!this.dragging) return;
|
|
@@ -3295,10 +3328,10 @@ class tr {
|
|
|
3295
3328
|
this.dragging && (this.dragging = !1, this.options.onRelease?.(this.stateFrom(0, 0, t)));
|
|
3296
3329
|
}
|
|
3297
3330
|
updateVelocity(t, e) {
|
|
3298
|
-
const n =
|
|
3331
|
+
const n = Ke(), s = Math.max(1, n - this.lastTime);
|
|
3299
3332
|
this.lastTime = n;
|
|
3300
3333
|
const r = t / s * 1e3, o = e / s * 1e3;
|
|
3301
|
-
this.velocityX += (r - this.velocityX) *
|
|
3334
|
+
this.velocityX += (r - this.velocityX) * Ge, this.velocityY += (o - this.velocityY) * Ge;
|
|
3302
3335
|
}
|
|
3303
3336
|
stateFrom(t, e, n) {
|
|
3304
3337
|
return {
|
|
@@ -3350,10 +3383,10 @@ class tr {
|
|
|
3350
3383
|
});
|
|
3351
3384
|
};
|
|
3352
3385
|
}
|
|
3353
|
-
function
|
|
3386
|
+
function Ke() {
|
|
3354
3387
|
return typeof performance < "u" ? performance.now() : Date.now();
|
|
3355
3388
|
}
|
|
3356
|
-
function
|
|
3389
|
+
function pr(i, t, e) {
|
|
3357
3390
|
let n = { delta: 0, line: null }, s = e;
|
|
3358
3391
|
for (const r of i)
|
|
3359
3392
|
for (const o of t) {
|
|
@@ -3362,10 +3395,10 @@ function er(i, t, e) {
|
|
|
3362
3395
|
}
|
|
3363
3396
|
return n;
|
|
3364
3397
|
}
|
|
3365
|
-
function
|
|
3398
|
+
function mr(i, t) {
|
|
3366
3399
|
return t <= 0 ? [] : i.map((e) => Math.round(e / t) * t);
|
|
3367
3400
|
}
|
|
3368
|
-
class
|
|
3401
|
+
class Wi {
|
|
3369
3402
|
options;
|
|
3370
3403
|
observer;
|
|
3371
3404
|
x;
|
|
@@ -3377,7 +3410,7 @@ class Ni {
|
|
|
3377
3410
|
snappedX = null;
|
|
3378
3411
|
snappedY = null;
|
|
3379
3412
|
constructor(t) {
|
|
3380
|
-
this.options = t, this.x = t.initialX ?? 0, this.y = t.initialY ?? 0, this.observer = new
|
|
3413
|
+
this.options = t, this.x = t.initialX ?? 0, this.y = t.initialY ?? 0, this.observer = new dr({
|
|
3381
3414
|
target: t.target,
|
|
3382
3415
|
onPress: (e) => {
|
|
3383
3416
|
const n = t.getPosition?.();
|
|
@@ -3430,7 +3463,7 @@ class Ni {
|
|
|
3430
3463
|
if (e <= 0) return;
|
|
3431
3464
|
const n = this.options.scrubDistance ?? 500;
|
|
3432
3465
|
if (n === 0) return;
|
|
3433
|
-
const s = (this.options.axis ?? "both") === "y" ? this.y : this.x, r =
|
|
3466
|
+
const s = (this.options.axis ?? "both") === "y" ? this.y : this.x, r = gr(s / n);
|
|
3434
3467
|
t.pause(), t.seek(r * e);
|
|
3435
3468
|
}
|
|
3436
3469
|
/**
|
|
@@ -3443,9 +3476,9 @@ class Ni {
|
|
|
3443
3476
|
applyConstraints(t, e) {
|
|
3444
3477
|
let n = t;
|
|
3445
3478
|
const s = [
|
|
3446
|
-
...
|
|
3479
|
+
...mr([n], this.options.snap ?? 0),
|
|
3447
3480
|
...(e === "x" ? this.options.snapLinesX : this.options.snapLinesY) ?? []
|
|
3448
|
-
], r =
|
|
3481
|
+
], r = pr([n], s, this.snapThreshold());
|
|
3449
3482
|
n += r.delta, e === "x" ? this.snappedX = r.line : this.snappedY = r.line;
|
|
3450
3483
|
const o = this.options.bounds;
|
|
3451
3484
|
if (o) {
|
|
@@ -3455,16 +3488,16 @@ class Ni {
|
|
|
3455
3488
|
return n;
|
|
3456
3489
|
}
|
|
3457
3490
|
}
|
|
3458
|
-
function
|
|
3491
|
+
function gr(i) {
|
|
3459
3492
|
return i < 0 ? 0 : i > 1 ? 1 : i;
|
|
3460
3493
|
}
|
|
3461
|
-
function
|
|
3462
|
-
const t = new
|
|
3494
|
+
function ma(i) {
|
|
3495
|
+
const t = new Wi(i);
|
|
3463
3496
|
return t.start(), t;
|
|
3464
3497
|
}
|
|
3465
|
-
const
|
|
3466
|
-
function
|
|
3467
|
-
const e =
|
|
3498
|
+
const yr = { x: "x", y: "y", "x,y": "both" }, pe = (i) => typeof i == "object" && i !== null && i.nodeType === 1;
|
|
3499
|
+
function Ze(i, t) {
|
|
3500
|
+
const e = Ot(i), n = t.getBoundingClientRect();
|
|
3468
3501
|
return {
|
|
3469
3502
|
minX: n.left - e.left,
|
|
3470
3503
|
maxX: n.right - e.right,
|
|
@@ -3472,35 +3505,35 @@ function je(i, t) {
|
|
|
3472
3505
|
maxY: n.bottom - e.bottom
|
|
3473
3506
|
};
|
|
3474
3507
|
}
|
|
3475
|
-
function
|
|
3508
|
+
function Qe(i) {
|
|
3476
3509
|
return Array.isArray(i) ? [...i] : i;
|
|
3477
3510
|
}
|
|
3478
|
-
function
|
|
3511
|
+
function br(i, t, e, n = {}) {
|
|
3479
3512
|
const [s] = t.resolveTargets(e), r = s ? t.elementFor(s) : void 0;
|
|
3480
3513
|
if (!s || !r)
|
|
3481
3514
|
throw new Error(`gsap-compat: live.draggable could not find ${String(e)}`);
|
|
3482
|
-
if (n.type === "rotation") return
|
|
3483
|
-
const o =
|
|
3515
|
+
if (n.type === "rotation") return vr(i, t, s, r, n);
|
|
3516
|
+
const o = yr[n.type ?? "x,y"], a = () => {
|
|
3484
3517
|
const p = t.appliedValue(s, "x"), g = t.appliedValue(s, "y");
|
|
3485
3518
|
return { x: typeof p == "number" ? p : 0, y: typeof g == "number" ? g : 0 };
|
|
3486
|
-
}, c = typeof n.bounds == "string" ? t.query(n.bounds) :
|
|
3519
|
+
}, c = typeof n.bounds == "string" ? t.query(n.bounds) : pe(n.bounds) ? n.bounds : null, h = { bounds: (!c && n.bounds && !pe(n.bounds) ? n.bounds : void 0) ?? (c ? Ze(r, c) : void 0) };
|
|
3487
3520
|
let f = null;
|
|
3488
3521
|
const u = () => {
|
|
3489
3522
|
f?.kill(), f = null;
|
|
3490
3523
|
}, d = (p) => {
|
|
3491
|
-
const g = n.inertia === !0 ? {} : n.inertia, y = g.friction ?? (g.resistance !== void 0 ?
|
|
3524
|
+
const g = n.inertia === !0 ? {} : n.inertia, y = g.friction ?? (g.resistance !== void 0 ? Se(g.resistance) : 4), v = a(), b = h.bounds ?? {};
|
|
3492
3525
|
let T, w;
|
|
3493
|
-
const
|
|
3494
|
-
if (Array.isArray(
|
|
3495
|
-
const _ =
|
|
3496
|
-
let A =
|
|
3497
|
-
for (const
|
|
3498
|
-
Math.hypot(
|
|
3526
|
+
const k = g.end;
|
|
3527
|
+
if (Array.isArray(k)) {
|
|
3528
|
+
const _ = $t({ from: v.x, velocity: o === "y" ? 0 : p.x, friction: y }), B = $t({ from: v.y, velocity: o === "x" ? 0 : p.y, friction: y });
|
|
3529
|
+
let A = k[0];
|
|
3530
|
+
for (const x of k)
|
|
3531
|
+
Math.hypot(x.x - _, x.y - B) < Math.hypot(A.x - _, A.y - B) && (A = x);
|
|
3499
3532
|
A && (T = [A.x], w = [A.y]);
|
|
3500
|
-
} else typeof
|
|
3533
|
+
} else typeof k == "number" ? (T = k, w = k) : k && (T = Qe(k.x), w = Qe(k.y));
|
|
3501
3534
|
const S = {};
|
|
3502
3535
|
o !== "y" && (S.x = { velocity: p.x, friction: y, min: b.minX, max: b.maxX, end: T }), o !== "x" && (S.y = { velocity: p.y, friction: y, min: b.minY, max: b.maxY, end: w }), f = i.to(r, { inertia: S, onComplete: () => n.onThrowComplete?.() });
|
|
3503
|
-
}, m = new
|
|
3536
|
+
}, m = new Wi({
|
|
3504
3537
|
target: r,
|
|
3505
3538
|
axis: o,
|
|
3506
3539
|
snap: n.snap,
|
|
@@ -3509,7 +3542,7 @@ function rr(i, t, e, n = {}) {
|
|
|
3509
3542
|
},
|
|
3510
3543
|
getPosition: a,
|
|
3511
3544
|
onPress: () => {
|
|
3512
|
-
u(), c && (h.bounds =
|
|
3545
|
+
u(), c && (h.bounds = Ze(r, c)), n.onPress?.();
|
|
3513
3546
|
},
|
|
3514
3547
|
onDrag: (p) => {
|
|
3515
3548
|
t.apply(s, o === "x" ? { x: p.x } : o === "y" ? { y: p.y } : { x: p.x, y: p.y }), n.onDrag?.(p);
|
|
@@ -3533,8 +3566,8 @@ function rr(i, t, e, n = {}) {
|
|
|
3533
3566
|
}
|
|
3534
3567
|
};
|
|
3535
3568
|
}
|
|
3536
|
-
function
|
|
3537
|
-
const r = typeof s.bounds == "object" && s.bounds !== null && !
|
|
3569
|
+
function vr(i, t, e, n, s) {
|
|
3570
|
+
const r = typeof s.bounds == "object" && s.bounds !== null && !pe(s.bounds) ? s.bounds : {}, o = () => {
|
|
3538
3571
|
const b = t.appliedValue(e, "rotate");
|
|
3539
3572
|
return typeof b == "number" ? b : 0;
|
|
3540
3573
|
}, a = (b) => Math.min(r.maxRotation ?? 1 / 0, Math.max(r.minRotation ?? -1 / 0, b));
|
|
@@ -3549,26 +3582,26 @@ function or(i, t, e, n, s) {
|
|
|
3549
3582
|
const T = p(b);
|
|
3550
3583
|
let w = T - u;
|
|
3551
3584
|
w > 180 && (w -= 360), w < -180 && (w += 360), u = T, d += w;
|
|
3552
|
-
let
|
|
3553
|
-
s.snap && (
|
|
3585
|
+
let k = a(d);
|
|
3586
|
+
s.snap && (k = a(Math.round(k / s.snap) * s.snap)), t.apply(e, { rotate: k });
|
|
3554
3587
|
const S = performance.now();
|
|
3555
|
-
for (m.push({ time: S, rotation:
|
|
3588
|
+
for (m.push({ time: S, rotation: k }); m.length > 2 && S - m[0].time > 100; ) m.shift();
|
|
3556
3589
|
const _ = { x: 0, y: 0 };
|
|
3557
3590
|
s.onDrag?.(_);
|
|
3558
3591
|
}, v = (b) => {
|
|
3559
3592
|
if (!l || b.pointerId !== h) return;
|
|
3560
3593
|
l = !1;
|
|
3561
|
-
const T = m[0], w = m[m.length - 1],
|
|
3594
|
+
const T = m[0], w = m[m.length - 1], k = T && w ? (w.time - T.time) / 1e3 : 0, S = k > 0 ? (w.rotation - T.rotation) / k : 0;
|
|
3562
3595
|
if (s.onRelease?.({ x: S, y: 0 }), !s.inertia) return;
|
|
3563
|
-
const _ = s.inertia === !0 ? {} : s.inertia,
|
|
3596
|
+
const _ = s.inertia === !0 ? {} : s.inertia, B = _.friction ?? (_.resistance !== void 0 ? Se(_.resistance) : 4), A = typeof _.end == "number" || Array.isArray(_.end) ? _.end : void 0;
|
|
3564
3597
|
c = i.to(n, {
|
|
3565
3598
|
inertia: {
|
|
3566
3599
|
rotate: {
|
|
3567
3600
|
velocity: S,
|
|
3568
|
-
friction:
|
|
3601
|
+
friction: B,
|
|
3569
3602
|
min: r.minRotation,
|
|
3570
3603
|
max: r.maxRotation,
|
|
3571
|
-
end: Array.isArray(A) ? A.filter((
|
|
3604
|
+
end: Array.isArray(A) ? A.filter((x) => typeof x == "number") : A
|
|
3572
3605
|
}
|
|
3573
3606
|
},
|
|
3574
3607
|
onComplete: () => s.onThrowComplete?.()
|
|
@@ -3585,28 +3618,28 @@ function or(i, t, e, n, s) {
|
|
|
3585
3618
|
}
|
|
3586
3619
|
};
|
|
3587
3620
|
}
|
|
3588
|
-
const
|
|
3589
|
-
function
|
|
3621
|
+
const wr = { opacity: 0, scale: 0.6 };
|
|
3622
|
+
function Tr(i) {
|
|
3590
3623
|
const t = i.getBoundingClientRect();
|
|
3591
3624
|
return t.width === 0 && t.height === 0 ? null : { cx: t.left + t.width / 2, cy: t.top + t.height / 2, width: t.width, height: t.height };
|
|
3592
3625
|
}
|
|
3593
|
-
function
|
|
3594
|
-
const t =
|
|
3626
|
+
function Je(i) {
|
|
3627
|
+
const t = Ot(i);
|
|
3595
3628
|
return t.width === 0 && t.height === 0 ? null : { cx: t.left + t.width / 2, cy: t.top + t.height / 2, width: t.width, height: t.height };
|
|
3596
3629
|
}
|
|
3597
|
-
function
|
|
3630
|
+
function me(i, t) {
|
|
3598
3631
|
const n = i.resolveTargets(t).map((o) => i.elementFor(o)).filter((o) => !!o), s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
3599
3632
|
for (const o of n) {
|
|
3600
|
-
const a =
|
|
3633
|
+
const a = Tr(o);
|
|
3601
3634
|
s.set(o, a);
|
|
3602
|
-
const c =
|
|
3635
|
+
const c = ji(o);
|
|
3603
3636
|
a && c !== void 0 && !r.has(c) && r.set(c, { element: o, box: a });
|
|
3604
3637
|
}
|
|
3605
3638
|
return { elements: n, boxes: s, ids: r };
|
|
3606
3639
|
}
|
|
3607
|
-
const
|
|
3608
|
-
function
|
|
3609
|
-
const s = n.duration ?? 0.6, r = n.ease ?? "power2.inOut", o = n.stagger ?? 0, a = n.scale !== !1, c = n.enter === void 0 ?
|
|
3640
|
+
const ne = /* @__PURE__ */ new WeakMap();
|
|
3641
|
+
function ge(i, t, e, n = {}) {
|
|
3642
|
+
const s = n.duration ?? 0.6, r = n.ease ?? "power2.inOut", o = n.stagger ?? 0, a = n.scale !== !1, c = n.enter === void 0 ? wr : n.enter, l = new Set(e.elements);
|
|
3610
3643
|
if (n.targets !== void 0)
|
|
3611
3644
|
for (const d of i.resolveTargets(n.targets)) {
|
|
3612
3645
|
const m = i.elementFor(d);
|
|
@@ -3617,48 +3650,48 @@ function ue(i, t, e, n = {}) {
|
|
|
3617
3650
|
), f = t({ onComplete: n.onComplete });
|
|
3618
3651
|
let u = 0;
|
|
3619
3652
|
for (const d of h) {
|
|
3620
|
-
const m =
|
|
3653
|
+
const m = Je(d);
|
|
3621
3654
|
if (!m) continue;
|
|
3622
3655
|
let p = e.boxes.get(d) ?? null, g;
|
|
3623
|
-
const y =
|
|
3656
|
+
const y = ji(d), v = !p && y !== void 0 ? e.ids.get(y) : void 0;
|
|
3624
3657
|
v && v.element !== d && (p = v.box, g = v.element);
|
|
3625
3658
|
const [b] = i.resolveTargets(d);
|
|
3626
|
-
|
|
3659
|
+
ne.get(d)?.timeline.removeTracks({ target: b });
|
|
3627
3660
|
const T = u * o;
|
|
3628
3661
|
if (!p) {
|
|
3629
3662
|
if (c === !1) continue;
|
|
3630
|
-
f.fromTo(d, { x: 0, y: 0, scaleX: 1, scaleY: 1, ...c }, { ...
|
|
3663
|
+
f.fromTo(d, { x: 0, y: 0, scaleX: 1, scaleY: 1, ...c }, { ...Ui(c), x: 0, y: 0, scaleX: 1, scaleY: 1, duration: s, ease: r, delay: T }, 0), ne.set(d, f), u++;
|
|
3631
3664
|
continue;
|
|
3632
3665
|
}
|
|
3633
|
-
const w = p.cx - m.cx,
|
|
3634
|
-
if (!(Math.abs(w) > 0.5 || Math.abs(
|
|
3635
|
-
const
|
|
3666
|
+
const w = p.cx - m.cx, k = p.cy - m.cy, S = a ? p.width / m.width : 1, _ = a ? p.height / m.height : 1;
|
|
3667
|
+
if (!(Math.abs(w) > 0.5 || Math.abs(k) > 0.5 || Math.abs(S - 1) > 1e-3 || Math.abs(_ - 1) > 1e-3)) {
|
|
3668
|
+
const x = (P, E) => {
|
|
3636
3669
|
const C = i.appliedValue(b, P);
|
|
3637
3670
|
return typeof C == "number" && Math.abs(C - E) > 1e-6;
|
|
3638
3671
|
};
|
|
3639
|
-
(
|
|
3672
|
+
(x("x", 0) || x("y", 0) || x("scaleX", 1) || x("scaleY", 1)) && f.set(d, { x: 0, y: 0, scaleX: 1, scaleY: 1 }, 0);
|
|
3640
3673
|
continue;
|
|
3641
3674
|
}
|
|
3642
3675
|
const A = n.fade === !0 && g !== void 0;
|
|
3643
3676
|
f.fromTo(
|
|
3644
3677
|
d,
|
|
3645
|
-
{ x: w, y:
|
|
3678
|
+
{ x: w, y: k, scaleX: S, scaleY: _, ...A && { opacity: 0 } },
|
|
3646
3679
|
{ x: 0, y: 0, scaleX: 1, scaleY: 1, ...A && { opacity: 1 }, duration: s, ease: r, delay: T },
|
|
3647
3680
|
0
|
|
3648
|
-
), A && g &&
|
|
3681
|
+
), A && g && Je(g) && f.fromTo(g, { opacity: 1 }, { opacity: 0, duration: s, ease: r, delay: T }, 0), ne.set(d, f), u++;
|
|
3649
3682
|
}
|
|
3650
3683
|
return f;
|
|
3651
3684
|
}
|
|
3652
|
-
function
|
|
3685
|
+
function ji(i) {
|
|
3653
3686
|
return i.dataset?.flipId;
|
|
3654
3687
|
}
|
|
3655
|
-
function
|
|
3688
|
+
function Ui(i) {
|
|
3656
3689
|
const t = {};
|
|
3657
3690
|
for (const e of Object.keys(i))
|
|
3658
3691
|
t[e] = e === "opacity" || e.startsWith("scale") ? 1 : 0;
|
|
3659
3692
|
return t;
|
|
3660
3693
|
}
|
|
3661
|
-
function
|
|
3694
|
+
function kr(i, t = {}) {
|
|
3662
3695
|
const e = new Set((t.type ?? "chars,words,lines").split(",").map((p) => p.trim())), n = {
|
|
3663
3696
|
chars: t.charsClass ?? "char",
|
|
3664
3697
|
words: t.wordsClass ?? "word",
|
|
@@ -3677,16 +3710,16 @@ function lr(i, t = {}) {
|
|
|
3677
3710
|
}, u = () => {
|
|
3678
3711
|
const p = { chars: [], words: [], lines: [], masks: [] };
|
|
3679
3712
|
for (const { element: g } of r) {
|
|
3680
|
-
const y = (g.textContent ?? "").replace(/\s+/g, " ").trim(), v =
|
|
3713
|
+
const y = (g.textContent ?? "").replace(/\s+/g, " ").trim(), v = xr(g, n.words), b = e.has("chars") ? v.flatMap((k) => Sr(k, n.chars)) : [], T = e.has("lines") ? Ar(g, v, n.lines) : [];
|
|
3681
3714
|
if (s) {
|
|
3682
3715
|
!g.hasAttribute("aria-label") && y && g.setAttribute("aria-label", y);
|
|
3683
|
-
for (const
|
|
3716
|
+
for (const k of v) k.setAttribute("aria-hidden", "true");
|
|
3684
3717
|
}
|
|
3685
3718
|
if (e.has("words")) p.words.push(...v);
|
|
3686
|
-
else for (const
|
|
3719
|
+
else for (const k of v) k.removeAttribute("class");
|
|
3687
3720
|
p.chars.push(...b), p.lines.push(...T);
|
|
3688
3721
|
const w = t.mask === "lines" ? T : t.mask === "words" ? v : t.mask === "chars" ? b : [];
|
|
3689
|
-
for (const
|
|
3722
|
+
for (const k of w) p.masks.push(Er(k, `${n[t.mask]}-mask`));
|
|
3690
3723
|
}
|
|
3691
3724
|
o = p;
|
|
3692
3725
|
}, d = {
|
|
@@ -3726,8 +3759,8 @@ function lr(i, t = {}) {
|
|
|
3726
3759
|
c = new ResizeObserver((b) => {
|
|
3727
3760
|
let T = !1;
|
|
3728
3761
|
for (const w of b) {
|
|
3729
|
-
const
|
|
3730
|
-
p.set(w.target,
|
|
3762
|
+
const k = Math.round(w.contentRect.width), S = p.get(w.target);
|
|
3763
|
+
p.set(w.target, k), S !== void 0 && S !== k && (T = !0);
|
|
3731
3764
|
}
|
|
3732
3765
|
T && y();
|
|
3733
3766
|
});
|
|
@@ -3738,7 +3771,7 @@ function lr(i, t = {}) {
|
|
|
3738
3771
|
}
|
|
3739
3772
|
return d;
|
|
3740
3773
|
}
|
|
3741
|
-
function
|
|
3774
|
+
function xr(i, t) {
|
|
3742
3775
|
const e = i.ownerDocument, n = [], s = e.createTreeWalker(
|
|
3743
3776
|
i,
|
|
3744
3777
|
4
|
|
@@ -3761,18 +3794,18 @@ function hr(i, t) {
|
|
|
3761
3794
|
}
|
|
3762
3795
|
return n;
|
|
3763
3796
|
}
|
|
3764
|
-
function
|
|
3765
|
-
const e = i.ownerDocument, n =
|
|
3797
|
+
function Sr(i, t) {
|
|
3798
|
+
const e = i.ownerDocument, n = Mr(i.textContent ?? "").map((s) => {
|
|
3766
3799
|
const r = e.createElement("span");
|
|
3767
3800
|
return r.className = t, r.style.display = "inline-block", r.textContent = s, r;
|
|
3768
3801
|
});
|
|
3769
3802
|
return i.replaceChildren(...n), n;
|
|
3770
3803
|
}
|
|
3771
|
-
function
|
|
3804
|
+
function Mr(i) {
|
|
3772
3805
|
const t = Intl.Segmenter;
|
|
3773
3806
|
return t ? Array.from(new t(void 0, { granularity: "grapheme" }).segment(i), (e) => e.segment) : Array.from(i);
|
|
3774
3807
|
}
|
|
3775
|
-
function
|
|
3808
|
+
function Ar(i, t, e) {
|
|
3776
3809
|
const n = i.ownerDocument, s = new Map(t.map((m) => [m, m.getBoundingClientRect()])), r = [], o = (m) => {
|
|
3777
3810
|
for (const p of Array.from(m.childNodes))
|
|
3778
3811
|
p.nodeType === 3 || s.has(p) || p.tagName === "BR" ? r.push(p) : o(p);
|
|
@@ -3804,11 +3837,11 @@ function dr(i, t, e) {
|
|
|
3804
3837
|
}
|
|
3805
3838
|
return i.replaceChildren(...a), a;
|
|
3806
3839
|
}
|
|
3807
|
-
function
|
|
3840
|
+
function Er(i, t) {
|
|
3808
3841
|
const e = i.ownerDocument.createElement("span");
|
|
3809
3842
|
return e.className = t, e.style.display = i.style.display === "block" ? "block" : "inline-block", e.style.overflow = "clip", e.style.paddingBottom = "0.12em", e.style.marginBottom = "-0.12em", i.replaceWith(e), e.appendChild(i), e;
|
|
3810
3843
|
}
|
|
3811
|
-
const
|
|
3844
|
+
const ti = {
|
|
3812
3845
|
top: 0,
|
|
3813
3846
|
left: 0,
|
|
3814
3847
|
start: 0,
|
|
@@ -3819,15 +3852,15 @@ const He = {
|
|
|
3819
3852
|
right: 1,
|
|
3820
3853
|
end: 1
|
|
3821
3854
|
};
|
|
3822
|
-
function
|
|
3855
|
+
function ei(i) {
|
|
3823
3856
|
const t = i.trim().toLowerCase();
|
|
3824
|
-
if (t in
|
|
3857
|
+
if (t in ti) return ti[t];
|
|
3825
3858
|
if (t.endsWith("%")) {
|
|
3826
3859
|
const e = Number.parseFloat(t.slice(0, -1));
|
|
3827
3860
|
return Number.isNaN(e) ? void 0 : e / 100;
|
|
3828
3861
|
}
|
|
3829
3862
|
}
|
|
3830
|
-
function
|
|
3863
|
+
function Hi(i) {
|
|
3831
3864
|
if (typeof i == "number")
|
|
3832
3865
|
return { elementFraction: 0, viewportFraction: 0, offsetPx: 0, absolutePx: i };
|
|
3833
3866
|
let t = 0;
|
|
@@ -3839,31 +3872,31 @@ function Xi(i) {
|
|
|
3839
3872
|
offsetPx: 0,
|
|
3840
3873
|
absolutePx: Number.parseFloat(n[0]) + t
|
|
3841
3874
|
};
|
|
3842
|
-
const s = n[0] !== void 0 ?
|
|
3875
|
+
const s = n[0] !== void 0 ? ei(n[0]) : void 0, r = n[1] !== void 0 ? ei(n[1]) : void 0;
|
|
3843
3876
|
return {
|
|
3844
3877
|
elementFraction: s ?? 0,
|
|
3845
3878
|
viewportFraction: r ?? 0,
|
|
3846
3879
|
offsetPx: t
|
|
3847
3880
|
};
|
|
3848
3881
|
}
|
|
3849
|
-
function
|
|
3850
|
-
const n =
|
|
3882
|
+
function Tt(i, t, e) {
|
|
3883
|
+
const n = Hi(e), s = n.absolutePx !== void 0 ? i.top + n.absolutePx : i.top + i.height * n.elementFraction, r = t * n.viewportFraction;
|
|
3851
3884
|
return s - r + n.offsetPx;
|
|
3852
3885
|
}
|
|
3853
|
-
function
|
|
3854
|
-
const s =
|
|
3855
|
-
return o <= 0 ? s <= 0 ? 1 : 0 :
|
|
3886
|
+
function ga(i, t, e, n) {
|
|
3887
|
+
const s = Tt(i, t, e), o = Tt(i, t, n) - s;
|
|
3888
|
+
return o <= 0 ? s <= 0 ? 1 : 0 : zi(-s / o);
|
|
3856
3889
|
}
|
|
3857
|
-
function
|
|
3890
|
+
function zi(i) {
|
|
3858
3891
|
return i < 0 ? 0 : i > 1 ? 1 : i === 0 ? 0 : i;
|
|
3859
3892
|
}
|
|
3860
|
-
function
|
|
3893
|
+
function Pr(i, t, e, n) {
|
|
3861
3894
|
if (e <= 0) return t;
|
|
3862
3895
|
const s = 1 - Math.exp(-(n / 1e3) / e);
|
|
3863
3896
|
return i + (t - i) * s;
|
|
3864
3897
|
}
|
|
3865
|
-
function
|
|
3866
|
-
const r = (h) =>
|
|
3898
|
+
function ii(i, t, e, n, s) {
|
|
3899
|
+
const r = (h) => Tt({ top: i + s(h), bottom: i + s(h) + t, height: t }, e, n), o = r(0), a = r(1);
|
|
3867
3900
|
if (Math.sign(o) === Math.sign(a) || o === 0 || a === 0)
|
|
3868
3901
|
return o === 0 ? 0 : a === 0 ? 1 : Math.abs(o) < Math.abs(a) ? 0 : 1;
|
|
3869
3902
|
let c = 0, l = 1;
|
|
@@ -3873,7 +3906,7 @@ function Ke(i, t, e, n, s) {
|
|
|
3873
3906
|
}
|
|
3874
3907
|
return (c + l) / 2;
|
|
3875
3908
|
}
|
|
3876
|
-
class
|
|
3909
|
+
class Cr {
|
|
3877
3910
|
timeline;
|
|
3878
3911
|
trigger;
|
|
3879
3912
|
behaviour;
|
|
@@ -3920,11 +3953,11 @@ class gr {
|
|
|
3920
3953
|
this.options.onLeave?.(), this.behaviour === "reset" && this.timeline.stop();
|
|
3921
3954
|
}
|
|
3922
3955
|
}
|
|
3923
|
-
function
|
|
3924
|
-
const t = new
|
|
3956
|
+
function ya(i) {
|
|
3957
|
+
const t = new Cr(i);
|
|
3925
3958
|
return t.start(), t;
|
|
3926
3959
|
}
|
|
3927
|
-
class
|
|
3960
|
+
class _r {
|
|
3928
3961
|
element;
|
|
3929
3962
|
spacer;
|
|
3930
3963
|
saved;
|
|
@@ -3953,28 +3986,28 @@ class yr {
|
|
|
3953
3986
|
this.element.style.position = this.saved.position, this.element.style.top = this.saved.top, this.element.style.left = this.saved.left, this.spacer.parentNode && this.spacer.replaceWith(this.element);
|
|
3954
3987
|
}
|
|
3955
3988
|
}
|
|
3956
|
-
const
|
|
3957
|
-
function
|
|
3989
|
+
const Ir = 0.15;
|
|
3990
|
+
function Rr(i) {
|
|
3958
3991
|
return typeof i == "object" && !Array.isArray(i) ? i : { snapTo: i };
|
|
3959
3992
|
}
|
|
3960
|
-
function
|
|
3961
|
-
const n =
|
|
3962
|
-
if (typeof e == "function") return
|
|
3993
|
+
function Lr(i, t, e) {
|
|
3994
|
+
const n = Ct(i + t * Ir);
|
|
3995
|
+
if (typeof e == "function") return Ct(e(n));
|
|
3963
3996
|
if (typeof e == "number")
|
|
3964
|
-
return e <= 0 ? i :
|
|
3997
|
+
return e <= 0 ? i : Ct(Math.round(n / e) * e);
|
|
3965
3998
|
if (e.length === 0) return i;
|
|
3966
3999
|
let s = e[0];
|
|
3967
4000
|
for (const r of e)
|
|
3968
4001
|
Math.abs(r - n) < Math.abs(s - n) && (s = r);
|
|
3969
|
-
return
|
|
4002
|
+
return Ct(s);
|
|
3970
4003
|
}
|
|
3971
|
-
function
|
|
4004
|
+
function $r(i, t, e) {
|
|
3972
4005
|
const n = i.duration ?? { min: 0.2, max: 0.8 };
|
|
3973
4006
|
if (typeof n == "number") return n;
|
|
3974
4007
|
const s = Math.min(1, Math.abs(t) / Math.max(1, e));
|
|
3975
4008
|
return n.min + (n.max - n.min) * s;
|
|
3976
4009
|
}
|
|
3977
|
-
class
|
|
4010
|
+
class Fr {
|
|
3978
4011
|
rafId = null;
|
|
3979
4012
|
cancelEvents = ["wheel", "touchstart", "pointerdown", "keydown"];
|
|
3980
4013
|
onInterrupt = () => this.cancel();
|
|
@@ -3986,7 +4019,7 @@ class xr {
|
|
|
3986
4019
|
get active() {
|
|
3987
4020
|
return this.rafId !== null;
|
|
3988
4021
|
}
|
|
3989
|
-
animate(t, e, n, s =
|
|
4022
|
+
animate(t, e, n, s = Wt, r) {
|
|
3990
4023
|
if (this.cancel(), typeof requestAnimationFrame > "u" || n <= 0) {
|
|
3991
4024
|
this.write(e), r?.();
|
|
3992
4025
|
return;
|
|
@@ -4007,10 +4040,10 @@ class xr {
|
|
|
4007
4040
|
for (const t of this.cancelEvents) this.eventTarget?.removeEventListener(t, this.onInterrupt);
|
|
4008
4041
|
}
|
|
4009
4042
|
}
|
|
4010
|
-
function
|
|
4043
|
+
function Ct(i) {
|
|
4011
4044
|
return Math.max(0, Math.min(1, i));
|
|
4012
4045
|
}
|
|
4013
|
-
class
|
|
4046
|
+
class Dr {
|
|
4014
4047
|
options;
|
|
4015
4048
|
scroller;
|
|
4016
4049
|
nodes = [];
|
|
@@ -4051,24 +4084,24 @@ class kr {
|
|
|
4051
4084
|
for (const t of this.nodes.splice(0)) t.remove();
|
|
4052
4085
|
}
|
|
4053
4086
|
}
|
|
4054
|
-
const
|
|
4055
|
-
let
|
|
4056
|
-
const
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
for (const i of
|
|
4087
|
+
const Br = 120, st = [], lt = /* @__PURE__ */ new Set();
|
|
4088
|
+
let se = !1;
|
|
4089
|
+
const Or = () => {
|
|
4090
|
+
se || lt.size === 0 || (se = !0, queueMicrotask(() => {
|
|
4091
|
+
se = !1;
|
|
4092
|
+
for (const i of lt) i.afterRefresh();
|
|
4060
4093
|
}));
|
|
4061
|
-
},
|
|
4062
|
-
for (const i of
|
|
4063
|
-
for (const i of
|
|
4064
|
-
for (const i of
|
|
4094
|
+
}, Gi = () => {
|
|
4095
|
+
for (const i of lt) i.beforeRefresh();
|
|
4096
|
+
for (const i of st) i.refresh();
|
|
4097
|
+
for (const i of lt) i.afterRefresh();
|
|
4065
4098
|
};
|
|
4066
|
-
let
|
|
4067
|
-
const
|
|
4068
|
-
const i = window.innerWidth, t = window.innerHeight, e = i ===
|
|
4069
|
-
e && n && s || (
|
|
4099
|
+
let rt = { width: 0, height: 0 };
|
|
4100
|
+
const ni = () => {
|
|
4101
|
+
const i = window.innerWidth, t = window.innerHeight, e = i === rt.width && t !== rt.height, n = Math.abs(t - rt.height) < rt.height * 0.25, s = typeof navigator < "u" && (navigator.maxTouchPoints ?? 0) > 0;
|
|
4102
|
+
e && n && s || (rt = { width: i, height: t }, Gi());
|
|
4070
4103
|
};
|
|
4071
|
-
class
|
|
4104
|
+
class jt {
|
|
4072
4105
|
timeline;
|
|
4073
4106
|
options;
|
|
4074
4107
|
running = !1;
|
|
@@ -4098,16 +4131,16 @@ class qt {
|
|
|
4098
4131
|
markers = null;
|
|
4099
4132
|
markerGeometry = null;
|
|
4100
4133
|
constructor(t) {
|
|
4101
|
-
this.timeline = t.timeline, this.options = t, this.snapper = new
|
|
4134
|
+
this.timeline = t.timeline, this.options = t, this.snapper = new Fr((e) => this.scrollTo(e), typeof window < "u" ? window : null);
|
|
4102
4135
|
}
|
|
4103
4136
|
start() {
|
|
4104
4137
|
if (this.running) return;
|
|
4105
4138
|
this.running = !0, this.timeline?.pause();
|
|
4106
4139
|
const t = this.options.pin === !0 ? this.options.trigger : this.options.pin || null;
|
|
4107
|
-
t && !this.options.container && (this.pin = new
|
|
4140
|
+
t && !this.options.container && (this.pin = new _r(t, { axis: this.options.horizontal ? "x" : "y", spacing: this.options.pinSpacing !== !1 })), this.options.markers && !this.options.horizontal && typeof document < "u" && (this.markers = new Dr(document, this.options.scroller ?? null, this.options.markers)), this.scrollTarget()?.addEventListener("scroll", this.onScroll, { passive: !0 }), st.length === 0 && typeof window < "u" && (rt = { width: window.innerWidth, height: window.innerHeight }, window.addEventListener("resize", ni, { passive: !0 })), st.push(this), this.refresh();
|
|
4108
4141
|
}
|
|
4109
4142
|
stop() {
|
|
4110
|
-
this.running && (this.running = !1, this.scrollTarget()?.removeEventListener("scroll", this.onScroll),
|
|
4143
|
+
this.running && (this.running = !1, this.scrollTarget()?.removeEventListener("scroll", this.onScroll), st.splice(st.indexOf(this), 1), st.length === 0 && typeof window < "u" && window.removeEventListener("resize", ni), this.stopSmoothing(), this.idleTimer !== null && clearTimeout(this.idleTimer), this.idleTimer = null, this.snapTimer !== null && clearTimeout(this.snapTimer), this.snapTimer = null, this.snapper.cancel());
|
|
4111
4144
|
}
|
|
4112
4145
|
/** Stop, and remove any pin spacer. */
|
|
4113
4146
|
destroy() {
|
|
@@ -4125,11 +4158,11 @@ class qt {
|
|
|
4125
4158
|
* layout change a resize would not catch (images or fonts loading).
|
|
4126
4159
|
*/
|
|
4127
4160
|
static refreshAll() {
|
|
4128
|
-
|
|
4161
|
+
Gi();
|
|
4129
4162
|
}
|
|
4130
4163
|
/** Be told around every re-measure; returns a function that stops it. */
|
|
4131
4164
|
static onRefresh(t) {
|
|
4132
|
-
return
|
|
4165
|
+
return lt.add(t), () => lt.delete(t);
|
|
4133
4166
|
}
|
|
4134
4167
|
/** Current scroll progress, 0..1. */
|
|
4135
4168
|
get progress() {
|
|
@@ -4155,13 +4188,13 @@ class qt {
|
|
|
4155
4188
|
this.measureInContainer(this.options.container);
|
|
4156
4189
|
else if (e) {
|
|
4157
4190
|
const n = this.viewportHeight();
|
|
4158
|
-
if (this.startPx = t +
|
|
4191
|
+
if (this.startPx = t + Tt(e, n, gt(this.options.start) ?? "top bottom"), this.endPx = this.resolveEnd(e, n, t), this.pin) {
|
|
4159
4192
|
const s = this.relativeRect(this.pin.element.getBoundingClientRect());
|
|
4160
4193
|
this.pin.apply(s.top - (this.startPx - t), this.endPx - this.startPx);
|
|
4161
4194
|
}
|
|
4162
4195
|
this.markerGeometry = this.markers ? this.markersFor(n) : null;
|
|
4163
4196
|
}
|
|
4164
|
-
this.markers && this.markerGeometry && this.markers.place(this.markerGeometry, t), this.lastScroll = null, this.updateFrom(t, !this.measured), this.measured = !0,
|
|
4197
|
+
this.markers && this.markerGeometry && this.markers.place(this.markerGeometry, t), this.lastScroll = null, this.updateFrom(t, !this.measured), this.measured = !0, Or();
|
|
4165
4198
|
}
|
|
4166
4199
|
/** Same as `refresh()`. */
|
|
4167
4200
|
sample() {
|
|
@@ -4179,7 +4212,7 @@ class qt {
|
|
|
4179
4212
|
updateFrom(t, e) {
|
|
4180
4213
|
this.trackVelocity(t), this.markers && this.markerGeometry && this.markers.follow(this.markerGeometry, t);
|
|
4181
4214
|
const n = this.endPx - this.startPx, s = this.zone;
|
|
4182
|
-
this.targetProgress = n > 0 ?
|
|
4215
|
+
this.targetProgress = n > 0 ? zi((t - this.startPx) / n) : t >= this.startPx ? 1 : 0, this.zone = n > 0 ? t <= this.startPx ? "before" : t >= this.endPx ? "after" : "active" : t >= this.startPx ? "after" : "before", this.fireBoundaryCallbacks(s, this.zone), e || this.smoothing() <= 0 ? (this.displayProgress = this.targetProgress, this.applyProgress()) : (this.emitUpdate(), this.startSmoothing());
|
|
4183
4216
|
}
|
|
4184
4217
|
/** Seconds of smoothing, or 0 for exact tracking. */
|
|
4185
4218
|
smoothing() {
|
|
@@ -4187,12 +4220,12 @@ class qt {
|
|
|
4187
4220
|
return typeof t == "number" ? Math.max(0, t) : 0;
|
|
4188
4221
|
}
|
|
4189
4222
|
resolveEnd(t, e, n) {
|
|
4190
|
-
const s =
|
|
4223
|
+
const s = gt(this.options.end) ?? "bottom top", r = typeof s == "string" ? s.trim().match(/^\+=\s*(-?[\d.]+)\s*(%|px)?$/) : null;
|
|
4191
4224
|
if (r) {
|
|
4192
4225
|
const o = Number.parseFloat(r[1]);
|
|
4193
4226
|
return this.startPx + (r[2] === "%" ? e * o / 100 : o);
|
|
4194
4227
|
}
|
|
4195
|
-
return n +
|
|
4228
|
+
return n + Tt(t, e, s);
|
|
4196
4229
|
}
|
|
4197
4230
|
applyProgress() {
|
|
4198
4231
|
const t = this.timeline?.duration ?? 0;
|
|
@@ -4207,7 +4240,7 @@ class qt {
|
|
|
4207
4240
|
const e = typeof performance < "u" ? performance.now() : Date.now();
|
|
4208
4241
|
this.lastScroll !== null && e > this.lastScrollTime && t !== this.lastScroll && (this.velocityPxPerSecond = (t - this.lastScroll) / (e - this.lastScrollTime) * 1e3), (this.lastScroll === null || t !== this.lastScroll) && (this.lastScroll = t, this.lastScrollTime = e), !(this.velocityPxPerSecond === 0 || typeof setTimeout > "u") && (this.idleTimer !== null && clearTimeout(this.idleTimer), this.idleTimer = setTimeout(() => {
|
|
4209
4242
|
this.idleTimer = null, this.releaseVelocity = this.velocityPxPerSecond, this.velocityPxPerSecond = 0, this.emitUpdate(), this.scheduleSnap();
|
|
4210
|
-
},
|
|
4243
|
+
}, Br));
|
|
4211
4244
|
}
|
|
4212
4245
|
/**
|
|
4213
4246
|
* Emit enter/leave callbacks as the scroll position moves between zones. A jump
|
|
@@ -4223,12 +4256,12 @@ class qt {
|
|
|
4223
4256
|
scheduleSnap() {
|
|
4224
4257
|
const t = this.options.snap;
|
|
4225
4258
|
if (t === void 0 || this.snapper.active) return;
|
|
4226
|
-
const e =
|
|
4259
|
+
const e = Rr(t), n = () => {
|
|
4227
4260
|
this.snapTimer = null;
|
|
4228
4261
|
const s = this.endPx - this.startPx, r = this.scrollPosition();
|
|
4229
4262
|
if (!this.running || s <= 0 || r <= this.startPx || r >= this.endPx) return;
|
|
4230
|
-
const o = (r - this.startPx) / s, a = this.startPx +
|
|
4231
|
-
Math.abs(a - r) < 1 || this.snapper.animate(r, a,
|
|
4263
|
+
const o = (r - this.startPx) / s, a = this.startPx + Lr(o, this.releaseVelocity / s, e.snapTo) * s;
|
|
4264
|
+
Math.abs(a - r) < 1 || this.snapper.animate(r, a, $r(e, a - r, this.viewportHeight()), e.ease);
|
|
4232
4265
|
};
|
|
4233
4266
|
e.delay ? this.snapTimer = setTimeout(n, e.delay * 1e3) : n();
|
|
4234
4267
|
}
|
|
@@ -4244,18 +4277,18 @@ class qt {
|
|
|
4244
4277
|
measureInContainer(t) {
|
|
4245
4278
|
const e = this.options.trigger;
|
|
4246
4279
|
if (typeof e?.getBoundingClientRect != "function") return;
|
|
4247
|
-
const n = e.getBoundingClientRect(), s = this.options.scroller?.getBoundingClientRect?.().left ?? 0, r = this.options.scroller ? this.options.scroller.clientWidth : typeof window < "u" ? window.innerWidth : 0, o = n.left - s - t.shiftAt(t.progress()), { start: a, end: c } = t.range(), l = (d) => a + d * (c - a), h =
|
|
4280
|
+
const n = e.getBoundingClientRect(), s = this.options.scroller?.getBoundingClientRect?.().left ?? 0, r = this.options.scroller ? this.options.scroller.clientWidth : typeof window < "u" ? window.innerWidth : 0, o = n.left - s - t.shiftAt(t.progress()), { start: a, end: c } = t.range(), l = (d) => a + d * (c - a), h = ii(o, n.width, r, gt(this.options.start) ?? "left right", t.shiftAt);
|
|
4248
4281
|
this.startPx = l(h);
|
|
4249
|
-
const f =
|
|
4250
|
-
this.endPx = u ? this.startPx + Number.parseFloat(u[1]) : l(
|
|
4282
|
+
const f = gt(this.options.end) ?? "right left", u = typeof f == "string" ? f.trim().match(/^\+=\s*(-?[\d.]+)\s*(px)?$/) : null;
|
|
4283
|
+
this.endPx = u ? this.startPx + Number.parseFloat(u[1]) : l(ii(o, n.width, r, f, t.shiftAt)), this.markerGeometry = null;
|
|
4251
4284
|
}
|
|
4252
4285
|
/** Where the markers go: the element points on the page, and the viewport lines they meet. */
|
|
4253
4286
|
markersFor(t) {
|
|
4254
4287
|
const e = (r, o) => {
|
|
4255
|
-
const a =
|
|
4288
|
+
const a = gt(r) ?? o;
|
|
4256
4289
|
if (typeof a == "number") return 0;
|
|
4257
4290
|
if (/^\s*\+=/.test(a)) return;
|
|
4258
|
-
const c =
|
|
4291
|
+
const c = Hi(a);
|
|
4259
4292
|
return t * c.viewportFraction - c.offsetPx;
|
|
4260
4293
|
}, n = e(this.options.start, "top bottom") ?? 0, s = e(this.options.end, "bottom top") ?? n;
|
|
4261
4294
|
return {
|
|
@@ -4270,7 +4303,7 @@ class qt {
|
|
|
4270
4303
|
const t = (e) => {
|
|
4271
4304
|
if (this.rafId = null, !this.running) return;
|
|
4272
4305
|
const n = this.lastFrameTime === null ? 16.67 : e - this.lastFrameTime;
|
|
4273
|
-
this.lastFrameTime = e, this.displayProgress =
|
|
4306
|
+
this.lastFrameTime = e, this.displayProgress = Pr(this.displayProgress, this.targetProgress, this.smoothing(), n);
|
|
4274
4307
|
const s = Math.abs(this.targetProgress - this.displayProgress) < 1e-4;
|
|
4275
4308
|
s && (this.displayProgress = this.targetProgress), this.applyProgress(), s ? this.lastFrameTime = null : this.rafId = requestAnimationFrame(t);
|
|
4276
4309
|
};
|
|
@@ -4308,15 +4341,15 @@ class qt {
|
|
|
4308
4341
|
return t ? e ? t.clientWidth : t.clientHeight : typeof window < "u" ? e ? window.innerWidth : window.innerHeight : 0;
|
|
4309
4342
|
}
|
|
4310
4343
|
}
|
|
4311
|
-
function
|
|
4344
|
+
function gt(i) {
|
|
4312
4345
|
return typeof i == "function" ? i() : i;
|
|
4313
4346
|
}
|
|
4314
|
-
function
|
|
4315
|
-
const t = new
|
|
4347
|
+
function ba(i) {
|
|
4348
|
+
const t = new jt(i);
|
|
4316
4349
|
return t.start(), t;
|
|
4317
4350
|
}
|
|
4318
|
-
const
|
|
4319
|
-
class
|
|
4351
|
+
const re = /* @__PURE__ */ new Set(), Nr = 16, si = 0.5, qr = 2;
|
|
4352
|
+
class ri {
|
|
4320
4353
|
options;
|
|
4321
4354
|
frames;
|
|
4322
4355
|
running = !1;
|
|
@@ -4346,22 +4379,22 @@ class Je {
|
|
|
4346
4379
|
if (this.running || typeof window > "u") return this;
|
|
4347
4380
|
this.running = !0, this.reduced = this.options.reducedMotion ?? (typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches), this.current = this.target = this.position();
|
|
4348
4381
|
const t = this.options.scroller ?? window;
|
|
4349
|
-
return t.addEventListener("wheel", this.onWheel, { passive: !1 }), t.addEventListener("scroll", this.onScroll, { passive: !0 }), window.addEventListener("resize", this.onResize, { passive: !0 }), window.addEventListener("load", this.onLoad),
|
|
4382
|
+
return t.addEventListener("wheel", this.onWheel, { passive: !1 }), t.addEventListener("scroll", this.onScroll, { passive: !0 }), window.addEventListener("resize", this.onResize, { passive: !0 }), window.addEventListener("load", this.onLoad), re.add(this), this.stopListening = jt.onRefresh({ beforeRefresh: () => this.rest(), afterRefresh: () => this.refresh() }), this.refresh(), this;
|
|
4350
4383
|
}
|
|
4351
4384
|
/** Re-measure every started smoother, after layout changes a resize would not catch. */
|
|
4352
4385
|
static refreshAll() {
|
|
4353
|
-
for (const t of
|
|
4386
|
+
for (const t of re) t.refresh();
|
|
4354
4387
|
}
|
|
4355
4388
|
stop() {
|
|
4356
4389
|
if (!this.running) return this;
|
|
4357
4390
|
this.running = !1;
|
|
4358
4391
|
const t = this.options.scroller ?? window;
|
|
4359
|
-
return t.removeEventListener("wheel", this.onWheel), t.removeEventListener("scroll", this.onScroll), window.removeEventListener("resize", this.onResize), window.removeEventListener("load", this.onLoad),
|
|
4392
|
+
return t.removeEventListener("wheel", this.onWheel), t.removeEventListener("scroll", this.onScroll), window.removeEventListener("resize", this.onResize), window.removeEventListener("load", this.onLoad), re.delete(this), this.stopListening?.(), this.stopListening = null, this.cancelFrame(), this.journey = null, this;
|
|
4360
4393
|
}
|
|
4361
4394
|
/** Stop, and put every effect element back where it was. */
|
|
4362
4395
|
destroy() {
|
|
4363
4396
|
this.stop();
|
|
4364
|
-
for (const t of this.effects)
|
|
4397
|
+
for (const t of this.effects) oe(t.element, t.saved);
|
|
4365
4398
|
this.effects = [];
|
|
4366
4399
|
}
|
|
4367
4400
|
/** GSAP's name for `destroy()`. */
|
|
@@ -4387,7 +4420,7 @@ class Je {
|
|
|
4387
4420
|
this.journey = null, this.current = this.target = n, this.write(n), this.applyEffects(0);
|
|
4388
4421
|
return;
|
|
4389
4422
|
}
|
|
4390
|
-
this.target = n, this.journey = { from: this.current, to: n, ms: r * 1e3, ease: e.ease ??
|
|
4423
|
+
this.target = n, this.journey = { from: this.current, to: n, ms: r * 1e3, ease: e.ease ?? Wt, elapsed: 0 }, this.requestFrame();
|
|
4391
4424
|
}
|
|
4392
4425
|
/** Re-measure the scrollable length and every effect element (resizes do this). */
|
|
4393
4426
|
refresh() {
|
|
@@ -4413,18 +4446,18 @@ class Je {
|
|
|
4413
4446
|
}
|
|
4414
4447
|
/** Put effect elements at their natural place, for measuring. */
|
|
4415
4448
|
rest() {
|
|
4416
|
-
for (const t of this.effects)
|
|
4449
|
+
for (const t of this.effects) oe(t.element, t.saved);
|
|
4417
4450
|
}
|
|
4418
4451
|
// --- input ----------------------------------------------------------------
|
|
4419
4452
|
wheel(t) {
|
|
4420
4453
|
if (this.pausedState || this.reduced || (this.options.smooth ?? 0.8) <= 0 || t.ctrlKey || Math.abs(t.deltaX) > Math.abs(t.deltaY) || this.nestedScrollerTakes(t)) return;
|
|
4421
|
-
const e = t.deltaMode === 1 ?
|
|
4454
|
+
const e = t.deltaMode === 1 ? Nr : t.deltaMode === 2 ? this.viewportHeight() : 1, n = t.deltaY * e * (this.options.wheelMultiplier ?? 1), s = this.clamp(this.target + n);
|
|
4422
4455
|
s === this.target && s === this.current || (t.preventDefault(), this.journey = null, this.target = s, this.requestFrame());
|
|
4423
4456
|
}
|
|
4424
4457
|
/** A scroll that this smoother did not write: follow it. */
|
|
4425
4458
|
nativeScroll() {
|
|
4426
4459
|
const t = this.position();
|
|
4427
|
-
this.written !== null && Math.abs(t - this.written) <=
|
|
4460
|
+
this.written !== null && Math.abs(t - this.written) <= qr || (this.written = null, this.journey = null, this.cancelFrame(), this.current = this.target = t, this.requestFrame());
|
|
4428
4461
|
}
|
|
4429
4462
|
nestedScrollerTakes(t) {
|
|
4430
4463
|
const e = this.options.scroller ?? document.documentElement;
|
|
@@ -4455,7 +4488,7 @@ class Je {
|
|
|
4455
4488
|
this.current = r.from + (r.to - r.from) * r.ease(o), o >= 1 && (this.journey = null);
|
|
4456
4489
|
} else if (this.current !== this.target) {
|
|
4457
4490
|
const r = (this.options.smooth ?? 0.8) * 1e3 / 3;
|
|
4458
|
-
this.current += (this.target - this.current) * (1 - Math.exp(-e / r)), Math.abs(this.target - this.current) <
|
|
4491
|
+
this.current += (this.target - this.current) * (1 - Math.exp(-e / r)), Math.abs(this.target - this.current) < si && (this.current = this.target);
|
|
4459
4492
|
}
|
|
4460
4493
|
this.current !== n && this.write(this.current), this.velocityPxPerSecond = e > 0 ? (this.current - n) * 1e3 / e : 0;
|
|
4461
4494
|
const s = this.applyEffects(e);
|
|
@@ -4469,9 +4502,9 @@ class Je {
|
|
|
4469
4502
|
let r = 0;
|
|
4470
4503
|
if (s.speed !== void 0 && (r += (n - s.centre) * (1 - s.speed)), s.lag !== void 0) {
|
|
4471
4504
|
const o = s.lag * 1e3 / 3;
|
|
4472
|
-
s.lagged = t === 0 ? n : s.lagged + (n - s.lagged) * (1 - Math.exp(-t / o)), Math.abs(n - s.lagged) <
|
|
4505
|
+
s.lagged = t === 0 ? n : s.lagged + (n - s.lagged) * (1 - Math.exp(-t / o)), Math.abs(n - s.lagged) < si ? s.lagged = n : e = !0, r += n - s.lagged;
|
|
4473
4506
|
}
|
|
4474
|
-
|
|
4507
|
+
oe(s.element, r === 0 ? s.saved : `0 ${Yr(r)}px`), s.shift = r;
|
|
4475
4508
|
}
|
|
4476
4509
|
return e;
|
|
4477
4510
|
}
|
|
@@ -4505,13 +4538,13 @@ class Je {
|
|
|
4505
4538
|
return n.getBoundingClientRect().top - s + this.position() - r;
|
|
4506
4539
|
}
|
|
4507
4540
|
}
|
|
4508
|
-
function
|
|
4541
|
+
function oe(i, t) {
|
|
4509
4542
|
t ? i.style.setProperty("translate", t) : i.style.removeProperty("translate");
|
|
4510
4543
|
}
|
|
4511
|
-
function
|
|
4544
|
+
function Yr(i) {
|
|
4512
4545
|
return Math.round(i * 100) / 100;
|
|
4513
4546
|
}
|
|
4514
|
-
function
|
|
4547
|
+
function Xr(i, t) {
|
|
4515
4548
|
switch (t) {
|
|
4516
4549
|
// Play forward from wherever it is; reverse() flips a reversed timeline and plays.
|
|
4517
4550
|
// Neither restarts an animation that is already at that end.
|
|
@@ -4540,7 +4573,7 @@ function Cr(i, t) {
|
|
|
4540
4573
|
break;
|
|
4541
4574
|
}
|
|
4542
4575
|
}
|
|
4543
|
-
function
|
|
4576
|
+
function Me(i, t, e, n, s = () => {
|
|
4544
4577
|
}) {
|
|
4545
4578
|
const r = (d) => typeof d == "string" ? i.query(d) ?? void 0 : d, o = r(t.trigger) ?? n;
|
|
4546
4579
|
if (!o) {
|
|
@@ -4550,9 +4583,9 @@ function ve(i, t, e, n, s = () => {
|
|
|
4550
4583
|
const a = t.scrub === void 0 || t.scrub === !1 ? !1 : t.scrub, c = (t.toggleActions ?? "play none none none").trim().split(/\s+/);
|
|
4551
4584
|
let l = 0, h;
|
|
4552
4585
|
const f = (d, m) => () => {
|
|
4553
|
-
m?.(), e && !a &&
|
|
4554
|
-
}, u = t.containerAnimation ?
|
|
4555
|
-
return h = new
|
|
4586
|
+
m?.(), e && !a && Xr(e, c[d] ?? "none"), t.once && d === 0 && queueMicrotask(() => h.destroy());
|
|
4587
|
+
}, u = t.containerAnimation ? jr(i, t.containerAnimation, o, s) : void 0;
|
|
4588
|
+
return h = new jt({
|
|
4556
4589
|
trigger: o,
|
|
4557
4590
|
start: t.start,
|
|
4558
4591
|
end: t.end,
|
|
@@ -4562,7 +4595,7 @@ function ve(i, t, e, n, s = () => {
|
|
|
4562
4595
|
horizontal: t.horizontal,
|
|
4563
4596
|
pinSpacing: t.pinSpacing,
|
|
4564
4597
|
onRefresh: t.invalidateOnRefresh && e?.invalidate ? () => e.invalidate() : void 0,
|
|
4565
|
-
snap: t.snap === void 0 ? void 0 :
|
|
4598
|
+
snap: t.snap === void 0 ? void 0 : Vr(t.snap, e),
|
|
4566
4599
|
markers: t.markers,
|
|
4567
4600
|
container: u,
|
|
4568
4601
|
onUpdate: (d, m) => {
|
|
@@ -4578,21 +4611,21 @@ function ve(i, t, e, n, s = () => {
|
|
|
4578
4611
|
onLeaveBack: f(3, t.onLeaveBack)
|
|
4579
4612
|
}), e && a === !1 && e.progress(0), h.start(), i.own(h);
|
|
4580
4613
|
}
|
|
4581
|
-
function
|
|
4582
|
-
const e = (s) => s === "labels" ? (r) =>
|
|
4614
|
+
function Vr(i, t) {
|
|
4615
|
+
const e = (s) => s === "labels" ? (r) => Wr(r, t?.labelProgresses?.() ?? []) : s;
|
|
4583
4616
|
if (typeof i != "object" || Array.isArray(i)) return e(i);
|
|
4584
|
-
const n = i.ease ?
|
|
4617
|
+
const n = i.ease ? Dt(i.ease) : void 0;
|
|
4585
4618
|
return {
|
|
4586
4619
|
snapTo: e(i.snapTo),
|
|
4587
4620
|
duration: i.duration,
|
|
4588
4621
|
delay: i.delay,
|
|
4589
|
-
ease: n ? n.fn ??
|
|
4622
|
+
ease: n ? n.fn ?? z(n.easing) : void 0
|
|
4590
4623
|
};
|
|
4591
4624
|
}
|
|
4592
|
-
function
|
|
4625
|
+
function Wr(i, t) {
|
|
4593
4626
|
return t.reduce((e, n) => Math.abs(n - i) < Math.abs(e - i) ? n : e, t[0] ?? i);
|
|
4594
4627
|
}
|
|
4595
|
-
function
|
|
4628
|
+
function jr(i, t, e, n) {
|
|
4596
4629
|
const s = () => t.timeline.getTracks({ property: "x" }).map((r) => r.target).filter((r) => {
|
|
4597
4630
|
const o = i.elementFor(r);
|
|
4598
4631
|
return !!o && o !== e && o.contains(e);
|
|
@@ -4614,7 +4647,7 @@ function Rr(i, t, e, n) {
|
|
|
4614
4647
|
}
|
|
4615
4648
|
};
|
|
4616
4649
|
}
|
|
4617
|
-
class
|
|
4650
|
+
class Ki {
|
|
4618
4651
|
/** For contexts made by matchMedia: which named queries match */
|
|
4619
4652
|
conditions = {};
|
|
4620
4653
|
scope;
|
|
@@ -4657,7 +4690,7 @@ class Wi {
|
|
|
4657
4690
|
this.revert();
|
|
4658
4691
|
}
|
|
4659
4692
|
}
|
|
4660
|
-
class
|
|
4693
|
+
class Ur {
|
|
4661
4694
|
host;
|
|
4662
4695
|
scope;
|
|
4663
4696
|
entries = [];
|
|
@@ -4697,11 +4730,11 @@ class Lr {
|
|
|
4697
4730
|
for (const [o, a] of t.queries) e[o] = a.matches;
|
|
4698
4731
|
const n = Object.values(e).some(Boolean), s = n ? JSON.stringify(e) : void 0;
|
|
4699
4732
|
if (s === t.key || (t.context?.revert(), t.context = void 0, t.key = s, !n)) return;
|
|
4700
|
-
const r = new
|
|
4733
|
+
const r = new Ki(this.host, this.scope);
|
|
4701
4734
|
r.conditions = e, r.add(() => t.setup(r)), t.context = r;
|
|
4702
4735
|
}
|
|
4703
4736
|
}
|
|
4704
|
-
class
|
|
4737
|
+
class Hr {
|
|
4705
4738
|
frames;
|
|
4706
4739
|
canvas;
|
|
4707
4740
|
context;
|
|
@@ -4775,29 +4808,29 @@ class $r {
|
|
|
4775
4808
|
e.onload = () => n(!0), e.onerror = () => n(!1), e.src = this.options.url(t);
|
|
4776
4809
|
}
|
|
4777
4810
|
}
|
|
4778
|
-
const
|
|
4779
|
-
async function
|
|
4811
|
+
const zr = { opacity: 0, y: -16 }, Gr = { opacity: 0, y: 16 };
|
|
4812
|
+
async function Kr(i, t, e, n) {
|
|
4780
4813
|
const s = t.collector?.scope ?? t.root, r = s.ownerDocument ?? s, o = () => n.shared ? [...s.querySelectorAll(n.shared)] : [];
|
|
4781
4814
|
if (n.native && typeof r.startViewTransition == "function")
|
|
4782
|
-
return
|
|
4815
|
+
return Zr(r, n, o);
|
|
4783
4816
|
const a = n.duration ?? 0.35, c = n.ease ?? "power2.inOut", l = (g) => new Promise((y) => {
|
|
4784
4817
|
g(y) || y();
|
|
4785
|
-
}), h = o(), f = h.length ?
|
|
4818
|
+
}), h = o(), f = h.length ? me(t, h) : void 0, u = n.from !== void 0 ? oi(t, n.from, n.shared) : [];
|
|
4786
4819
|
if (u.length && n.leave !== !1) {
|
|
4787
|
-
const g = n.leave ??
|
|
4820
|
+
const g = n.leave ?? zr;
|
|
4788
4821
|
await l((y) => i.to(u, { ...g, duration: a, ease: c, onComplete: y }));
|
|
4789
4822
|
}
|
|
4790
4823
|
await n.update();
|
|
4791
|
-
const d = [], m = typeof n.to == "function" ? n.to() : n.to, p = m !== void 0 ?
|
|
4824
|
+
const d = [], m = typeof n.to == "function" ? n.to() : n.to, p = m !== void 0 ? oi(t, m, n.shared) : [];
|
|
4792
4825
|
if (p.length && n.enter !== !1) {
|
|
4793
|
-
const g = n.enter ??
|
|
4794
|
-
d.push(l((y) => i.fromTo(p, g, { ...
|
|
4826
|
+
const g = n.enter ?? Gr;
|
|
4827
|
+
d.push(l((y) => i.fromTo(p, g, { ...Ui(g), duration: a, ease: c, onComplete: y })));
|
|
4795
4828
|
}
|
|
4796
4829
|
if (f) {
|
|
4797
4830
|
const g = o().filter((y) => !h.includes(y));
|
|
4798
4831
|
g.length && d.push(
|
|
4799
4832
|
l(
|
|
4800
|
-
(y) =>
|
|
4833
|
+
(y) => ge(t, e, f, {
|
|
4801
4834
|
targets: g,
|
|
4802
4835
|
duration: a * 1.4,
|
|
4803
4836
|
ease: c,
|
|
@@ -4809,11 +4842,11 @@ async function Or(i, t, e, n) {
|
|
|
4809
4842
|
}
|
|
4810
4843
|
await Promise.all(d);
|
|
4811
4844
|
}
|
|
4812
|
-
function
|
|
4845
|
+
function oi(i, t, e) {
|
|
4813
4846
|
const n = i.resolveTargets(t).map((s) => i.elementFor(s)).filter((s) => !!s);
|
|
4814
4847
|
return e ? n.flatMap((s) => !s.querySelector(e) && !s.matches(e) ? [s] : [...s.children].filter((r) => !r.matches(e) && !r.querySelector(e))) : n;
|
|
4815
4848
|
}
|
|
4816
|
-
async function
|
|
4849
|
+
async function Zr(i, t, e) {
|
|
4817
4850
|
const n = (a, c) => {
|
|
4818
4851
|
const l = a.dataset?.flipId;
|
|
4819
4852
|
l && a.style.setProperty("view-transition-name", c ? `tf-${l.replace(/[^\w-]/g, "-")}` : "");
|
|
@@ -4824,16 +4857,16 @@ async function Nr(i, t, e) {
|
|
|
4824
4857
|
s.forEach((a) => n(a, !1)), await t.update(), r = e(), r.forEach((a) => n(a, !0));
|
|
4825
4858
|
}).finished, r.forEach((a) => n(a, !1));
|
|
4826
4859
|
}
|
|
4827
|
-
const
|
|
4860
|
+
const Qr = {
|
|
4828
4861
|
/** Register a curve from SVG path data or bezier points. Returns the name. */
|
|
4829
|
-
create: (i, t) =>
|
|
4830
|
-
},
|
|
4862
|
+
create: (i, t) => ke(i, gs(t))
|
|
4863
|
+
}, Jr = {
|
|
4831
4864
|
/** Register a bouncing ease that lands and settles on the end value. Returns the name. */
|
|
4832
|
-
create: (i, t) =>
|
|
4833
|
-
},
|
|
4865
|
+
create: (i, t) => ke(i, { fn: ys(t) })
|
|
4866
|
+
}, to = {
|
|
4834
4867
|
/** Register a wiggle that swings around the start value and returns to it. Returns the name. */
|
|
4835
|
-
create: (i, t) =>
|
|
4836
|
-
},
|
|
4868
|
+
create: (i, t) => ke(i, { fn: bs(t) })
|
|
4869
|
+
}, eo = /* @__PURE__ */ new Set([
|
|
4837
4870
|
"keyframes",
|
|
4838
4871
|
"duration",
|
|
4839
4872
|
"delay",
|
|
@@ -4852,20 +4885,20 @@ const Br = {
|
|
|
4852
4885
|
"onRepeat",
|
|
4853
4886
|
"onReverseComplete",
|
|
4854
4887
|
"scrollTrigger"
|
|
4855
|
-
]),
|
|
4856
|
-
function
|
|
4888
|
+
]), ai = 0.5, io = "power1.inOut";
|
|
4889
|
+
function no(i) {
|
|
4857
4890
|
return i.keyframes !== void 0 && i.keyframes !== null;
|
|
4858
4891
|
}
|
|
4859
|
-
function
|
|
4892
|
+
function so(i) {
|
|
4860
4893
|
const t = i.keyframes, e = {};
|
|
4861
|
-
for (const [l, h] of Object.entries(i))
|
|
4894
|
+
for (const [l, h] of Object.entries(i)) eo.has(l) || (e[l] = h);
|
|
4862
4895
|
if (Array.isArray(t))
|
|
4863
4896
|
return t.map((l) => ({
|
|
4864
4897
|
...e,
|
|
4865
4898
|
...l,
|
|
4866
|
-
duration: l.duration ?? i.duration ??
|
|
4899
|
+
duration: l.duration ?? i.duration ?? ai
|
|
4867
4900
|
}));
|
|
4868
|
-
const n = Object.entries(t), s = i.duration ??
|
|
4901
|
+
const n = Object.entries(t), s = i.duration ?? ai, r = t.easeEach ?? i.easeEach ?? io;
|
|
4869
4902
|
if (n.length > 0 && n.every(([l]) => /^\s*-?\d+(\.\d+)?\s*%\s*$/.test(l) || l === "easeEach")) {
|
|
4870
4903
|
const l = n.filter(([u]) => u !== "easeEach").map(([u, d]) => ({ at: Number.parseFloat(u) / 100, step: d })).sort((u, d) => u.at - d.at), h = [];
|
|
4871
4904
|
let f = 0;
|
|
@@ -4884,7 +4917,7 @@ function jr(i) {
|
|
|
4884
4917
|
}
|
|
4885
4918
|
return c;
|
|
4886
4919
|
}
|
|
4887
|
-
function
|
|
4920
|
+
function ci(i, t, e, n = {}) {
|
|
4888
4921
|
const s = t.collector?.scope ?? t.root, r = typeof n.scroller == "string" ? s.querySelector(n.scroller) : n.scroller ?? null, o = {
|
|
4889
4922
|
x: r ? r.scrollLeft : window.scrollX,
|
|
4890
4923
|
y: r ? r.scrollTop : window.scrollY
|
|
@@ -4897,8 +4930,8 @@ function ii(i, t, e, n = {}) {
|
|
|
4897
4930
|
if (b === "max") return a[v];
|
|
4898
4931
|
const T = typeof b == "string" ? s.querySelector(b) : b;
|
|
4899
4932
|
if (!T) return o[v];
|
|
4900
|
-
const w = T.getBoundingClientRect(),
|
|
4901
|
-
return v === "x" ? w.left - (
|
|
4933
|
+
const w = T.getBoundingClientRect(), k = r?.getBoundingClientRect(), S = (v === "x" ? n.offsetX : n.offsetY) ?? n.offset ?? 0;
|
|
4934
|
+
return v === "x" ? w.left - (k?.left ?? 0) + o.x - S : w.top - (k?.top ?? 0) + o.y - S;
|
|
4902
4935
|
}, l = typeof e == "object" && e !== null && !("nodeType" in e) ? { x: c("x", e.x), y: c("y", e.y) } : { x: o.x, y: c("y", e) }, h = { x: Math.max(0, Math.min(a.x, l.x)), y: Math.max(0, Math.min(a.y, l.y)) }, f = { ...o }, u = () => {
|
|
4903
4936
|
r ? (r.scrollLeft = f.x, r.scrollTop = f.y) : window.scrollTo({ left: f.x, top: f.y, behavior: "instant" });
|
|
4904
4937
|
}, d = ["wheel", "touchstart", "keydown"], m = r ?? window, p = () => {
|
|
@@ -4921,7 +4954,7 @@ function ii(i, t, e, n = {}) {
|
|
|
4921
4954
|
if (n.autoKill !== !1) for (const v of d) m.addEventListener(v, p, { passive: !0 });
|
|
4922
4955
|
return y;
|
|
4923
4956
|
}
|
|
4924
|
-
function
|
|
4957
|
+
function ro(i, t, e) {
|
|
4925
4958
|
const n = i.collector?.scope ?? i.root, s = typeof t == "string" ? [...n.querySelectorAll(t)] : "nodeType" in t ? [t] : Array.from(t), { interval: r = 0.1, batchMax: o, onEnter: a, onLeave: c, onEnterBack: l, onLeaveBack: h, ...f } = e, u = { onEnter: a, onLeave: c, onEnterBack: l, onLeaveBack: h }, d = { onEnter: [], onLeave: [], onEnterBack: [], onLeaveBack: [] }, m = {}, p = (y) => {
|
|
4926
4959
|
m[y] !== void 0 && clearTimeout(m[y]), m[y] = void 0;
|
|
4927
4960
|
const v = d[y].splice(0);
|
|
@@ -4933,7 +4966,7 @@ function Ur(i, t, e) {
|
|
|
4933
4966
|
}
|
|
4934
4967
|
};
|
|
4935
4968
|
return s.map(
|
|
4936
|
-
(y) =>
|
|
4969
|
+
(y) => Me(i, {
|
|
4937
4970
|
...f,
|
|
4938
4971
|
trigger: y,
|
|
4939
4972
|
onEnter: () => g("onEnter", y),
|
|
@@ -4943,7 +4976,7 @@ function Ur(i, t, e) {
|
|
|
4943
4976
|
})
|
|
4944
4977
|
).filter((y) => y !== void 0);
|
|
4945
4978
|
}
|
|
4946
|
-
class
|
|
4979
|
+
class H {
|
|
4947
4980
|
/** The compiled compat timeline. */
|
|
4948
4981
|
compat;
|
|
4949
4982
|
stage;
|
|
@@ -4971,29 +5004,29 @@ class j {
|
|
|
4971
5004
|
constructor(t, e = {}) {
|
|
4972
5005
|
this.stage = t;
|
|
4973
5006
|
const n = { ...e, onWarning: e.onWarning ?? t.onWarning };
|
|
4974
|
-
if (this.options = n, this.compat = new
|
|
5007
|
+
if (this.options = n, this.compat = new ot({
|
|
4975
5008
|
...n,
|
|
4976
5009
|
startValue: (s, r) => {
|
|
4977
5010
|
const o = t.objectFor(s);
|
|
4978
|
-
if (o) return
|
|
5011
|
+
if (o) return lo(o[r]);
|
|
4979
5012
|
const a = t.appliedValue(s, r);
|
|
4980
5013
|
if (a !== void 0) return a;
|
|
4981
|
-
if (r === "d") return
|
|
5014
|
+
if (r === "d") return Vi(t.elementFor(s)) ?? void 0;
|
|
4982
5015
|
if (r === "text") return t.elementFor(s)?.textContent ?? void 0;
|
|
4983
5016
|
if (r === "strokeDasharray" || r === "strokeDashoffset") {
|
|
4984
|
-
const c =
|
|
5017
|
+
const c = ui(t.elementFor(s));
|
|
4985
5018
|
if (c !== void 0) return r === "strokeDasharray" ? [c, c] : 0;
|
|
4986
5019
|
}
|
|
4987
5020
|
},
|
|
4988
5021
|
startVelocity: (s, r) => t.velocityOf(s, r),
|
|
4989
|
-
layoutColumns: (s) =>
|
|
5022
|
+
layoutColumns: (s) => hi(s.map((r) => t.elementFor(r))),
|
|
4990
5023
|
random: () => t.utils.random(0, 1)
|
|
4991
5024
|
}), this.compat.timeline.onComplete = () => {
|
|
4992
5025
|
this.finishedThisFrame = !0;
|
|
4993
5026
|
}, t.collector?.track(this), t.liveTimelines.add(this), this.autoplayPending = !n.paused && !n.scrollTrigger, n.scrollTrigger) {
|
|
4994
5027
|
const s = n.scrollTrigger;
|
|
4995
5028
|
queueMicrotask(() => {
|
|
4996
|
-
this.killed || (this.scrollDriver =
|
|
5029
|
+
this.killed || (this.scrollDriver = Me(t, s, this, this.firstElement, (r) => n.onWarning?.(r)));
|
|
4997
5030
|
});
|
|
4998
5031
|
}
|
|
4999
5032
|
this.autoplayPending && queueMicrotask(() => {
|
|
@@ -5010,7 +5043,7 @@ class j {
|
|
|
5010
5043
|
}
|
|
5011
5044
|
// --- building -----------------------------------------------------------
|
|
5012
5045
|
to(t, e, n) {
|
|
5013
|
-
return
|
|
5046
|
+
return no(e) ? this.record(() => this.keyframed(t, e, n)) : this.record(() => this.tween(t, [e], n, ([s], r, o) => this.compat.to(r, s, o)));
|
|
5014
5047
|
}
|
|
5015
5048
|
from(t, e, n) {
|
|
5016
5049
|
return this.record(() => this.tween(t, [e], n, ([s], r, o) => this.compat.from(r, s, o)));
|
|
@@ -5072,7 +5105,7 @@ class j {
|
|
|
5072
5105
|
/** Jump to `from`, then animate the playhead to `to` (seconds or labels). */
|
|
5073
5106
|
tweenFromTo(t, e, n = {}) {
|
|
5074
5107
|
this.pause(), this.seek(t);
|
|
5075
|
-
const s = this.timeline.currentTime, r = Math.max(0, Math.min(this.timeline.duration, this.compat.timeOf(e))), o = { time: s }, a = n.duration ?? Math.abs(r - s) / 1e3 / (this.timeScale() || 1), c = new
|
|
5108
|
+
const s = this.timeline.currentTime, r = Math.max(0, Math.min(this.timeline.duration, this.compat.timeOf(e))), o = { time: s }, a = n.duration ?? Math.abs(r - s) / 1e3 / (this.timeScale() || 1), c = new H(this.stage, { onStart: n.onStart, onComplete: n.onComplete });
|
|
5076
5109
|
return c.to(o, {
|
|
5077
5110
|
time: r,
|
|
5078
5111
|
duration: a,
|
|
@@ -5214,7 +5247,7 @@ class j {
|
|
|
5214
5247
|
/** Fire events and repeats between two playheads. Returns true if a pause stopped it. */
|
|
5215
5248
|
runCrossings(t, e, n) {
|
|
5216
5249
|
if (this.events.length === 0 && this.ranges.length === 0 && !this.options.onRepeat && !this.options.repeatRefresh) return !1;
|
|
5217
|
-
const s = this.events, { crossings: r, passes: o } =
|
|
5250
|
+
const s = this.events, { crossings: r, passes: o } = _i(
|
|
5218
5251
|
s.map((a) => a.time),
|
|
5219
5252
|
t,
|
|
5220
5253
|
e,
|
|
@@ -5267,14 +5300,14 @@ class j {
|
|
|
5267
5300
|
keyframed(t, e, n) {
|
|
5268
5301
|
const s = this.resolve(t);
|
|
5269
5302
|
if (!s) return;
|
|
5270
|
-
const r =
|
|
5303
|
+
const r = so(e);
|
|
5271
5304
|
if (r.length === 0) return;
|
|
5272
|
-
const o = s.length > 1 ?
|
|
5305
|
+
const o = s.length > 1 ? de(e.stagger, this.staggerContext(s)) : void 0, a = s.map((g) => this.targetFor(g)).filter((g) => g !== void 0), c = o ? a.map((g) => [g]) : [a], l = o ? ae(s.length, o).map((g) => g / 1e3) : [0], h = this.compat.timeOf(n) / 1e3 + Bt(e.delay, 0) / 1e3;
|
|
5273
5306
|
let f = 1 / 0, u = -1 / 0;
|
|
5274
5307
|
if (c.forEach((g, y) => {
|
|
5275
5308
|
r.forEach((v, b) => {
|
|
5276
5309
|
const T = b === 0 ? h + l[y] : ">";
|
|
5277
|
-
this.tween(g, [v], T, ([w],
|
|
5310
|
+
this.tween(g, [v], T, ([w], k, S) => this.compat.to(k, w, S)), f = Math.min(f, this.compat.lastStart), u = Math.max(u, this.compat.lastEnd);
|
|
5278
5311
|
});
|
|
5279
5312
|
}), f === 1 / 0) return;
|
|
5280
5313
|
const { onStart: d, onUpdate: m, onComplete: p } = e;
|
|
@@ -5283,20 +5316,20 @@ class j {
|
|
|
5283
5316
|
staggerContext(t) {
|
|
5284
5317
|
return {
|
|
5285
5318
|
count: t.length,
|
|
5286
|
-
columnsFromLayout: () =>
|
|
5319
|
+
columnsFromLayout: () => hi(t.map((e) => this.stage.elementFor(e))),
|
|
5287
5320
|
random: () => this.stage.utils.random(0, 1)
|
|
5288
5321
|
};
|
|
5289
5322
|
}
|
|
5290
5323
|
buildTween(t, e, n, s) {
|
|
5291
5324
|
const r = t.map((u) => this.targetFor(u));
|
|
5292
|
-
if (!(t.length > 1 && (e.some(
|
|
5325
|
+
if (!(t.length > 1 && (e.some(co) || t.some((u) => this.stage.objectFor(u) !== void 0)))) {
|
|
5293
5326
|
const u = this.targetFor(t[0]);
|
|
5294
|
-
s(e.map((d) => this.prepare(
|
|
5327
|
+
s(e.map((d) => this.prepare(li(d, 0, u, this.stage.utils, r), t)), t, n);
|
|
5295
5328
|
return;
|
|
5296
5329
|
}
|
|
5297
|
-
const a = e.length - 1, { stagger: c, ...l } = e[a], h =
|
|
5330
|
+
const a = e.length - 1, { stagger: c, ...l } = e[a], h = de(c, this.staggerContext(t)), f = h ? ae(t.length, h).map((u) => u / 1e3) : t.map(() => 0);
|
|
5298
5331
|
t.forEach((u, d) => {
|
|
5299
|
-
const m = d === 0 ?
|
|
5332
|
+
const m = d === 0 ? Bt(l.delay, 0) / 1e3 + f[0] : 0, p = d === 0 ? 0 : f[d] - f[d - 1], g = d === 0 ? n : `<${p < 0 ? "-" : "+"}${Math.abs(p).toFixed(6)}`, v = e.map((b, T) => T === a ? { ...l, delay: m } : b).map((b) => this.prepare(li(b, d, this.targetFor(u), this.stage.utils, r), [u]));
|
|
5300
5333
|
s(v, [u], g);
|
|
5301
5334
|
});
|
|
5302
5335
|
}
|
|
@@ -5312,7 +5345,7 @@ class j {
|
|
|
5312
5345
|
const n = (o) => this.options.onWarning?.(o), s = (o) => this.stage.query(o);
|
|
5313
5346
|
let r = t;
|
|
5314
5347
|
if (t.motionPath !== void 0) {
|
|
5315
|
-
const o =
|
|
5348
|
+
const o = lr(t.motionPath, {
|
|
5316
5349
|
query: s,
|
|
5317
5350
|
targets: e.map((a) => this.stage.elementFor(a)).filter((a) => !!a),
|
|
5318
5351
|
warn: n
|
|
@@ -5320,33 +5353,33 @@ class j {
|
|
|
5320
5353
|
r = { ...r, motionPath: o };
|
|
5321
5354
|
}
|
|
5322
5355
|
if (t.morphSVG !== void 0) {
|
|
5323
|
-
const o =
|
|
5356
|
+
const o = hr(t.morphSVG, s, n), { morphSVG: a, ...c } = r;
|
|
5324
5357
|
r = o ? { ...r, morphSVG: o } : c;
|
|
5325
5358
|
}
|
|
5326
5359
|
if (t.drawSVG !== void 0) {
|
|
5327
|
-
const o =
|
|
5360
|
+
const o = ui(this.stage.elementFor(e[0]));
|
|
5328
5361
|
if (o === void 0) {
|
|
5329
5362
|
n("gsap-compat: drawSVG needs an SVG shape with a stroke (path, line, circle…)");
|
|
5330
5363
|
const { drawSVG: a, ...c } = r;
|
|
5331
5364
|
r = c;
|
|
5332
5365
|
} else
|
|
5333
|
-
r =
|
|
5366
|
+
r = Ns(r, o);
|
|
5334
5367
|
}
|
|
5335
5368
|
return r;
|
|
5336
5369
|
}
|
|
5337
5370
|
resolve(t) {
|
|
5338
5371
|
const e = this.stage.resolveTargets(t);
|
|
5339
5372
|
if (e.length === 0) {
|
|
5340
|
-
this.options.onWarning?.(`gsap-compat: no elements found for target ${
|
|
5373
|
+
this.options.onWarning?.(`gsap-compat: no elements found for target ${ho(t)}`);
|
|
5341
5374
|
return;
|
|
5342
5375
|
}
|
|
5343
5376
|
return this.firstElement ??= e.map((n) => this.stage.elementFor(n)).find((n) => n !== void 0), e;
|
|
5344
5377
|
}
|
|
5345
5378
|
}
|
|
5346
|
-
function
|
|
5379
|
+
function oo(i = new rr()) {
|
|
5347
5380
|
const t = (r) => {
|
|
5348
|
-
const { config: o } =
|
|
5349
|
-
return new
|
|
5381
|
+
const { config: o } = It(r);
|
|
5382
|
+
return new H(i, {
|
|
5350
5383
|
repeat: o.repeat,
|
|
5351
5384
|
yoyo: o.yoyo,
|
|
5352
5385
|
repeatDelay: o.repeatDelay,
|
|
@@ -5370,34 +5403,34 @@ function zr(i = new Us()) {
|
|
|
5370
5403
|
const [a] = i.resolveTargets(r);
|
|
5371
5404
|
if (a === void 0) return;
|
|
5372
5405
|
const c = i.objectFor(a);
|
|
5373
|
-
return c ? c[o] : i.appliedValue(a, o) ??
|
|
5406
|
+
return c ? c[o] : i.appliedValue(a, o) ?? Ni(o);
|
|
5374
5407
|
},
|
|
5375
|
-
scrollTrigger: (r) => n(
|
|
5376
|
-
scrollBatch: (r, o) =>
|
|
5377
|
-
scrollTo: (r, o) =>
|
|
5408
|
+
scrollTrigger: (r) => n(Me(i, r)),
|
|
5409
|
+
scrollBatch: (r, o) => ro(i, r, o).map((a) => n(a)),
|
|
5410
|
+
scrollTo: (r, o) => ci(s, i, r, o),
|
|
5378
5411
|
refreshScroll: () => {
|
|
5379
|
-
|
|
5412
|
+
jt.refreshAll(), ri.refreshAll();
|
|
5380
5413
|
},
|
|
5381
5414
|
smoothScroll: (r = {}) => {
|
|
5382
5415
|
const o = typeof r.scroller == "string" ? (i.collector?.scope ?? i.root).querySelector(r.scroller) : r.scroller;
|
|
5383
|
-
return n(new
|
|
5416
|
+
return n(new ri({ ...r, scroller: o }).start());
|
|
5384
5417
|
},
|
|
5385
5418
|
context: (r, o) => {
|
|
5386
|
-
const a = new
|
|
5419
|
+
const a = new Ki(i, o);
|
|
5387
5420
|
return r && a.add(() => r(a)), a;
|
|
5388
5421
|
},
|
|
5389
|
-
matchMedia: (r) => new
|
|
5390
|
-
customEase:
|
|
5391
|
-
customBounce:
|
|
5392
|
-
customWiggle:
|
|
5393
|
-
pageTransition: (r) =>
|
|
5422
|
+
matchMedia: (r) => new Ur(i, r),
|
|
5423
|
+
customEase: Qr.create,
|
|
5424
|
+
customBounce: Jr.create,
|
|
5425
|
+
customWiggle: to.create,
|
|
5426
|
+
pageTransition: (r) => Kr(s, i, (o) => new H(i, o), r),
|
|
5394
5427
|
imageSequence: (r, o) => {
|
|
5395
5428
|
const a = typeof r == "string" ? (i.collector?.scope ?? i.root).querySelector(r) : r;
|
|
5396
5429
|
if (!(a instanceof HTMLCanvasElement)) throw new Error(`gsap-compat: imageSequence needs a <canvas>, got ${String(r)}`);
|
|
5397
|
-
return n(new
|
|
5430
|
+
return n(new Hr(a, o));
|
|
5398
5431
|
},
|
|
5399
5432
|
quickTo: (r, o, a = {}) => {
|
|
5400
|
-
const c = new
|
|
5433
|
+
const c = new H(i, { paused: !0 }), [l] = i.resolveTargets(r);
|
|
5401
5434
|
return Object.assign((f) => {
|
|
5402
5435
|
if (!l) return;
|
|
5403
5436
|
const u = a.spring !== void 0 ? i.velocityOf(l, o) ?? 0 : 0;
|
|
@@ -5405,16 +5438,16 @@ function zr(i = new Us()) {
|
|
|
5405
5438
|
[o]: f,
|
|
5406
5439
|
duration: a.duration ?? 0.4,
|
|
5407
5440
|
ease: a.ease ?? "power3.out",
|
|
5408
|
-
...a.spring !== void 0 && { spring:
|
|
5441
|
+
...a.spring !== void 0 && { spring: ao(a.spring, o, u) }
|
|
5409
5442
|
}), c.timeline.stop(), c.timeline.play(), i.activate(c.timeline);
|
|
5410
5443
|
}, { tween: c, kill: () => c.kill() });
|
|
5411
5444
|
},
|
|
5412
|
-
timeline: (r) => new
|
|
5445
|
+
timeline: (r) => new H(i, r),
|
|
5413
5446
|
// A single tween's callbacks are its timeline's, so they are not placed again as events.
|
|
5414
5447
|
to: (r, o) => {
|
|
5415
5448
|
if (o.scrollTo !== void 0) {
|
|
5416
5449
|
const { scrollTo: a, ...c } = o, l = typeof a == "object" && a !== null && !("nodeType" in a) ? a : {}, h = typeof r != "string" && r !== window && r.nodeType === 1;
|
|
5417
|
-
return
|
|
5450
|
+
return ci(s, i, a, {
|
|
5418
5451
|
...c,
|
|
5419
5452
|
offsetX: l.offsetX,
|
|
5420
5453
|
offsetY: l.offsetY,
|
|
@@ -5426,44 +5459,44 @@ function zr(i = new Us()) {
|
|
|
5426
5459
|
from: (r, o) => t(o).from(r, e(o)),
|
|
5427
5460
|
fromTo: (r, o, a) => t(a).fromTo(r, o, e(a)),
|
|
5428
5461
|
set: (r, o) => t(o).set(r, e(o)),
|
|
5429
|
-
delayedCall: (r, o, a) => new
|
|
5462
|
+
delayedCall: (r, o, a) => new H(i).call(o, a, r),
|
|
5430
5463
|
killTweensOf: (r, o) => {
|
|
5431
5464
|
const a = i.resolveTargets(r), c = typeof o == "string" ? o.split(",").map((l) => l.trim()).filter(Boolean) : o;
|
|
5432
5465
|
for (const l of [...i.liveTimelines]) l.killTweensOf(a, c);
|
|
5433
5466
|
},
|
|
5434
|
-
convertToPath: (r) =>
|
|
5467
|
+
convertToPath: (r) => fr(r, i.root),
|
|
5435
5468
|
splitText: (r, o) => {
|
|
5436
5469
|
const a = i.collector?.scope ?? i.root, c = typeof r == "string" ? Array.from(a.querySelectorAll(r)) : "nodeType" in r ? [r] : Array.from(r);
|
|
5437
|
-
return n(
|
|
5470
|
+
return n(kr(c, o));
|
|
5438
5471
|
},
|
|
5439
|
-
draggable: (r, o) => n(
|
|
5440
|
-
getFlipState: (r) =>
|
|
5441
|
-
flipFrom: (r, o) =>
|
|
5472
|
+
draggable: (r, o) => n(br(s, i, r, o)),
|
|
5473
|
+
getFlipState: (r) => me(i, r),
|
|
5474
|
+
flipFrom: (r, o) => ge(i, (a) => new H(i, a), r, o),
|
|
5442
5475
|
flip: (r, o, a) => {
|
|
5443
|
-
const c =
|
|
5444
|
-
return o(),
|
|
5476
|
+
const c = me(i, r);
|
|
5477
|
+
return o(), ge(i, (l) => new H(i, l), c, { targets: r, ...a });
|
|
5445
5478
|
}
|
|
5446
5479
|
};
|
|
5447
5480
|
return s;
|
|
5448
5481
|
}
|
|
5449
|
-
const
|
|
5450
|
-
function
|
|
5482
|
+
const Y = /* @__PURE__ */ oo();
|
|
5483
|
+
function ao(i, t, e) {
|
|
5451
5484
|
return i === !0 ? { velocity: { [t]: e } } : typeof i == "string" ? { preset: i, velocity: { [t]: e } } : { ...i, velocity: { [t]: e } };
|
|
5452
5485
|
}
|
|
5453
|
-
function
|
|
5454
|
-
return i.morphSVG !== void 0 || i.drawSVG !== void 0 || i.text !== void 0 || i.scrambleText !== void 0 ||
|
|
5486
|
+
function co(i) {
|
|
5487
|
+
return i.morphSVG !== void 0 || i.drawSVG !== void 0 || i.text !== void 0 || i.scrambleText !== void 0 || Zi(i);
|
|
5455
5488
|
}
|
|
5456
|
-
function
|
|
5457
|
-
return Object.entries(i).some(([t, e]) => (typeof e == "function" ||
|
|
5489
|
+
function Zi(i) {
|
|
5490
|
+
return Object.entries(i).some(([t, e]) => (typeof e == "function" || Oi(e)) && !xe.has(t));
|
|
5458
5491
|
}
|
|
5459
|
-
function
|
|
5460
|
-
if (!
|
|
5492
|
+
function li(i, t, e, n, s) {
|
|
5493
|
+
if (!Zi(i)) return i;
|
|
5461
5494
|
const r = {};
|
|
5462
5495
|
for (const [o, a] of Object.entries(i))
|
|
5463
|
-
|
|
5496
|
+
xe.has(o) ? r[o] = a : typeof a == "function" ? r[o] = a(t, e, s) : Oi(a) ? r[o] = n.resolveRandomString(a) : r[o] = a;
|
|
5464
5497
|
return r;
|
|
5465
5498
|
}
|
|
5466
|
-
function
|
|
5499
|
+
function hi(i) {
|
|
5467
5500
|
const t = i.map((n) => n?.getBoundingClientRect().top);
|
|
5468
5501
|
if (t[0] === void 0) return i.length;
|
|
5469
5502
|
let e = 0;
|
|
@@ -5473,18 +5506,18 @@ function si(i) {
|
|
|
5473
5506
|
}
|
|
5474
5507
|
return Math.max(1, e);
|
|
5475
5508
|
}
|
|
5476
|
-
function
|
|
5509
|
+
function ui(i) {
|
|
5477
5510
|
const t = i;
|
|
5478
5511
|
if (typeof t?.getTotalLength == "function")
|
|
5479
5512
|
return t.getTotalLength();
|
|
5480
5513
|
}
|
|
5481
|
-
function
|
|
5514
|
+
function lo(i) {
|
|
5482
5515
|
if (typeof i == "number" || typeof i == "string" || Array.isArray(i) && i.every((t) => typeof t == "number")) return i;
|
|
5483
5516
|
}
|
|
5484
|
-
function
|
|
5517
|
+
function ho(i) {
|
|
5485
5518
|
return typeof i == "string" ? `"${i}"` : String(i);
|
|
5486
5519
|
}
|
|
5487
|
-
class
|
|
5520
|
+
class fi {
|
|
5488
5521
|
media;
|
|
5489
5522
|
offset;
|
|
5490
5523
|
driftTolerance;
|
|
@@ -5523,7 +5556,7 @@ class oi {
|
|
|
5523
5556
|
});
|
|
5524
5557
|
}
|
|
5525
5558
|
}
|
|
5526
|
-
function
|
|
5559
|
+
function uo(i, t, e, n, s) {
|
|
5527
5560
|
const r = e - s;
|
|
5528
5561
|
if (r < 0) {
|
|
5529
5562
|
t.paused || t.pause(), t.currentTime = 0;
|
|
@@ -5531,7 +5564,7 @@ function Qr(i, t, e, n, s) {
|
|
|
5531
5564
|
}
|
|
5532
5565
|
i.update(r, n);
|
|
5533
5566
|
}
|
|
5534
|
-
class
|
|
5567
|
+
class Ae {
|
|
5535
5568
|
container;
|
|
5536
5569
|
timeline = null;
|
|
5537
5570
|
adapter;
|
|
@@ -5570,7 +5603,7 @@ class we {
|
|
|
5570
5603
|
this.container = n;
|
|
5571
5604
|
} else
|
|
5572
5605
|
this.container = t;
|
|
5573
|
-
this.options = e, this.adapter = new
|
|
5606
|
+
this.options = e, this.adapter = new J();
|
|
5574
5607
|
}
|
|
5575
5608
|
/**
|
|
5576
5609
|
* Load animation from a URL or JSON object.
|
|
@@ -5596,7 +5629,7 @@ class we {
|
|
|
5596
5629
|
*/
|
|
5597
5630
|
useDefinition(t) {
|
|
5598
5631
|
const e = { ...t.config };
|
|
5599
|
-
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 =
|
|
5632
|
+
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 = wt({ ...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();
|
|
5600
5633
|
}
|
|
5601
5634
|
// --- scenarios: the reader chooses which timeline plays --------------------
|
|
5602
5635
|
/**
|
|
@@ -5763,13 +5796,13 @@ class we {
|
|
|
5763
5796
|
scanMedia() {
|
|
5764
5797
|
this.mediaTargets = [], this.container.querySelectorAll("[data-tinyfly-media]").forEach((e) => {
|
|
5765
5798
|
const n = e, s = Number(n.getAttribute("data-tinyfly-start") ?? "0") || 0, r = n.getAttribute("data-volume");
|
|
5766
|
-
r !== null && (n.volume = Math.max(0, Math.min(1, Number(r) || 0))), this.mediaTargets.push({ el: n, startTime: s, sync: new
|
|
5799
|
+
r !== null && (n.volume = Math.max(0, Math.min(1, Number(r) || 0))), this.mediaTargets.push({ el: n, startTime: s, sync: new fi(n) });
|
|
5767
5800
|
});
|
|
5768
5801
|
}
|
|
5769
5802
|
/** Sync all discovered media targets to a timeline time. */
|
|
5770
5803
|
syncAllMedia(t, e) {
|
|
5771
5804
|
for (const n of this.mediaTargets)
|
|
5772
|
-
|
|
5805
|
+
uo(n.sync, n.el, t, e, n.startTime);
|
|
5773
5806
|
}
|
|
5774
5807
|
/**
|
|
5775
5808
|
* Load animation from inline JSON string.
|
|
@@ -5819,11 +5852,11 @@ class we {
|
|
|
5819
5852
|
if (!s) return;
|
|
5820
5853
|
const r = e.get(s);
|
|
5821
5854
|
if (!r || !r.timeline.tracks?.length) return;
|
|
5822
|
-
const o = new
|
|
5855
|
+
const o = new J();
|
|
5823
5856
|
n.querySelectorAll("[data-tinyfly]").forEach((a) => {
|
|
5824
5857
|
const c = a.getAttribute("data-tinyfly");
|
|
5825
5858
|
c && o.registerTarget(c, a);
|
|
5826
|
-
}), this.symbolInstances.push({ adapter: o, timeline:
|
|
5859
|
+
}), this.symbolInstances.push({ adapter: o, timeline: wt(r.timeline) });
|
|
5827
5860
|
});
|
|
5828
5861
|
}
|
|
5829
5862
|
/**
|
|
@@ -5833,7 +5866,7 @@ class we {
|
|
|
5833
5866
|
* plays. Pass `{ offset }` to start the media at a timeline offset.
|
|
5834
5867
|
*/
|
|
5835
5868
|
attachMedia(t, e) {
|
|
5836
|
-
this.mediaSync = new
|
|
5869
|
+
this.mediaSync = new fi(t, e), this.timeline && (this.mediaSync.setRate(this.timeline.speed), this.mediaSync.update(this.timeline.currentTime, this.isPlaying));
|
|
5837
5870
|
}
|
|
5838
5871
|
/** Detach and pause the currently synced media, if any. */
|
|
5839
5872
|
detachMedia() {
|
|
@@ -5932,7 +5965,7 @@ class we {
|
|
|
5932
5965
|
this.playhead = n;
|
|
5933
5966
|
const s = this.markers;
|
|
5934
5967
|
if (s.length === 0) return;
|
|
5935
|
-
const { crossings: r } =
|
|
5968
|
+
const { crossings: r } = _i(
|
|
5936
5969
|
s.map((o) => o.time),
|
|
5937
5970
|
t,
|
|
5938
5971
|
n,
|
|
@@ -5960,14 +5993,14 @@ class we {
|
|
|
5960
5993
|
}
|
|
5961
5994
|
}
|
|
5962
5995
|
}
|
|
5963
|
-
async function
|
|
5964
|
-
const n = new
|
|
5996
|
+
async function va(i, t, e = {}) {
|
|
5997
|
+
const n = new Ae(i, { ...e, autoplay: !0 });
|
|
5965
5998
|
return await n.load(t), n;
|
|
5966
5999
|
}
|
|
5967
|
-
function
|
|
5968
|
-
return new
|
|
6000
|
+
function wa(i, t = {}) {
|
|
6001
|
+
return new Ae(i, t);
|
|
5969
6002
|
}
|
|
5970
|
-
const
|
|
6003
|
+
const fo = {
|
|
5971
6004
|
play: "Play",
|
|
5972
6005
|
pause: "Pause",
|
|
5973
6006
|
prev: "Previous step",
|
|
@@ -5982,7 +6015,7 @@ const Jr = {
|
|
|
5982
6015
|
scenario: "Scenario",
|
|
5983
6016
|
fullscreen: "Full screen",
|
|
5984
6017
|
exitFullscreen: "Exit full screen"
|
|
5985
|
-
},
|
|
6018
|
+
}, di = "tinyfly-controls-style", po = `
|
|
5986
6019
|
.tf-ctl { --tf-ctl-fg: #1d1d1f; --tf-ctl-bg: #f4f2ee; --tf-ctl-accent: #c2410c; --tf-ctl-radius: 8px;
|
|
5987
6020
|
font: 14px/1.4 var(--tf-ctl-font, system-ui, sans-serif); color: var(--tf-ctl-fg); margin-top: 8px; }
|
|
5988
6021
|
.tf-ctl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; border-radius: var(--tf-ctl-radius); background: var(--tf-ctl-bg); }
|
|
@@ -6031,16 +6064,16 @@ const Jr = {
|
|
|
6031
6064
|
.tf-fullscreen > :not(svg):not(canvas) { grid-column: 2; }
|
|
6032
6065
|
}
|
|
6033
6066
|
`;
|
|
6034
|
-
let
|
|
6035
|
-
function
|
|
6036
|
-
if (i.getElementById(
|
|
6067
|
+
let mo = 0;
|
|
6068
|
+
function go(i) {
|
|
6069
|
+
if (i.getElementById(di)) return;
|
|
6037
6070
|
const t = i.createElement("style");
|
|
6038
|
-
t.id =
|
|
6071
|
+
t.id = di, t.textContent = po, i.head.appendChild(t);
|
|
6039
6072
|
}
|
|
6040
|
-
function
|
|
6073
|
+
function yo(i, t, e = {}) {
|
|
6041
6074
|
const n = t.ownerDocument;
|
|
6042
|
-
|
|
6043
|
-
const s = { ...
|
|
6075
|
+
go(n);
|
|
6076
|
+
const s = { ...fo, ...e.labels }, r = e.speeds ?? [0.5, 1, 2], o = () => i.markers.length > 0, a = () => i.markers.some((M) => M.label !== void 0 || i.caption(M.id) !== void 0), c = n.createElement("div");
|
|
6044
6077
|
c.className = "tf-ctl";
|
|
6045
6078
|
const l = n.createElement("div");
|
|
6046
6079
|
l.className = "tf-ctl-bar", l.setAttribute("role", "group");
|
|
@@ -6064,18 +6097,18 @@ function no(i, t, e = {}) {
|
|
|
6064
6097
|
I.value = String(M), I.textContent = `${M}×`, M === 1 && (I.selected = !0), v.appendChild(I);
|
|
6065
6098
|
}
|
|
6066
6099
|
v.addEventListener("change", () => i.setSpeed(Number(v.value))), l.append(f, u, d, m, g, y), r.length > 0 && l.append(v), c.append(l);
|
|
6067
|
-
const b = e.fullscreen ?
|
|
6100
|
+
const b = e.fullscreen ? To(t, n, s) : void 0;
|
|
6068
6101
|
b && l.append(b.button);
|
|
6069
6102
|
const T = n.createElement("p");
|
|
6070
6103
|
T.className = "tf-ctl-caption", T.setAttribute("aria-live", "polite"), e.captions !== !1 && c.append(T);
|
|
6071
6104
|
const w = n.createElement("div");
|
|
6072
6105
|
w.className = "tf-ctl-question", w.hidden = !0;
|
|
6073
|
-
const
|
|
6074
|
-
w.append(
|
|
6075
|
-
const _ =
|
|
6106
|
+
const k = n.createElement("span"), S = h(s.reveal, s.reveal, () => i.play(), "tf-ctl-primary");
|
|
6107
|
+
w.append(k, S), c.append(w);
|
|
6108
|
+
const _ = bo(i, n, s.scenario, e.scenarioControl ?? "buttons");
|
|
6076
6109
|
_ && c.append(_.element);
|
|
6077
|
-
const
|
|
6078
|
-
|
|
6110
|
+
const B = e.mount;
|
|
6111
|
+
B ? B.appendChild(c) : t.insertAdjacentElement("afterend", c);
|
|
6079
6112
|
const A = () => {
|
|
6080
6113
|
const M = i.isPlaying;
|
|
6081
6114
|
d.textContent = M ? "❚❚" : "▶", d.setAttribute("aria-label", M ? s.pause : s.play), d.title = M ? s.pause : s.play;
|
|
@@ -6088,11 +6121,11 @@ function no(i, t, e = {}) {
|
|
|
6088
6121
|
const R = i.caption() ?? "";
|
|
6089
6122
|
T.textContent !== R && (T.textContent = R), T.hidden = !a();
|
|
6090
6123
|
const $ = !M && N?.question !== void 0 && Math.abs(i.currentTime - N.time) < 1;
|
|
6091
|
-
w.hidden = !$, $ &&
|
|
6124
|
+
w.hidden = !$, $ && k.textContent !== N.question && (k.textContent = N.question);
|
|
6092
6125
|
} else
|
|
6093
6126
|
w.hidden = !0, T.hidden = !0;
|
|
6094
6127
|
_?.update();
|
|
6095
|
-
},
|
|
6128
|
+
}, x = i.subscribe(A);
|
|
6096
6129
|
A();
|
|
6097
6130
|
const P = e.keyboardScope ?? t;
|
|
6098
6131
|
!P.hasAttribute("tabindex") && P.tabIndex < 0 && (P.tabIndex = 0);
|
|
@@ -6132,11 +6165,11 @@ function no(i, t, e = {}) {
|
|
|
6132
6165
|
exit: b.exit
|
|
6133
6166
|
},
|
|
6134
6167
|
destroy() {
|
|
6135
|
-
b?.destroy(),
|
|
6168
|
+
b?.destroy(), x(), P.removeEventListener("keydown", C), c.removeEventListener("keydown", C), c.remove();
|
|
6136
6169
|
}
|
|
6137
6170
|
};
|
|
6138
6171
|
}
|
|
6139
|
-
function
|
|
6172
|
+
function bo(i, t, e, n) {
|
|
6140
6173
|
const s = i.scenarios;
|
|
6141
6174
|
if (s.length < 2) return;
|
|
6142
6175
|
if (n === "slider") {
|
|
@@ -6161,7 +6194,7 @@ function so(i, t, e, n) {
|
|
|
6161
6194
|
r.className = "tf-ctl-choices";
|
|
6162
6195
|
const o = t.createElement("legend");
|
|
6163
6196
|
o.textContent = e, r.append(o);
|
|
6164
|
-
const a = `tf-ctl-scenario-${++
|
|
6197
|
+
const a = `tf-ctl-scenario-${++mo}`, c = s.map((h) => {
|
|
6165
6198
|
const f = t.createElement("label");
|
|
6166
6199
|
f.className = "tf-ctl-choice";
|
|
6167
6200
|
const u = t.createElement("input");
|
|
@@ -6178,14 +6211,14 @@ function so(i, t, e, n) {
|
|
|
6178
6211
|
}
|
|
6179
6212
|
} };
|
|
6180
6213
|
}
|
|
6181
|
-
const
|
|
6182
|
-
function
|
|
6214
|
+
const vo = '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5"/></svg>', wo = '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M9 4v5H4M15 4v5h5M9 20v-5H4M15 20v-5h5"/></svg>';
|
|
6215
|
+
function To(i, t, e) {
|
|
6183
6216
|
const n = t, s = i, r = t.createElement("button");
|
|
6184
6217
|
r.type = "button", r.className = "tf-ctl-btn tf-ctl-fullscreen";
|
|
6185
6218
|
let o, a = "";
|
|
6186
6219
|
const c = () => {
|
|
6187
6220
|
const p = o !== void 0;
|
|
6188
|
-
r.innerHTML = p ?
|
|
6221
|
+
r.innerHTML = p ? wo : vo;
|
|
6189
6222
|
const g = p ? e.exitFullscreen : e.fullscreen;
|
|
6190
6223
|
r.setAttribute("aria-label", g), r.title = g, r.setAttribute("aria-pressed", String(p)), i.classList.toggle("tf-fullscreen", p), i.classList.toggle("tf-fullscreen-overlay", o === "overlay");
|
|
6191
6224
|
}, l = () => n.fullscreenElement ?? n.webkitFullscreenElement ?? null, h = () => {
|
|
@@ -6231,20 +6264,20 @@ function ao(i, t, e) {
|
|
|
6231
6264
|
}
|
|
6232
6265
|
};
|
|
6233
6266
|
}
|
|
6234
|
-
const
|
|
6267
|
+
const pi = "tinyfly-choices-style", ko = `
|
|
6235
6268
|
[data-tinyfly-choose] { cursor: pointer; }
|
|
6236
6269
|
[data-tinyfly-choose]:focus-visible { outline: 2px solid var(--tf-ctl-accent, #c2410c); outline-offset: 2px; }
|
|
6237
6270
|
`;
|
|
6238
|
-
function
|
|
6239
|
-
if (i.getElementById(
|
|
6271
|
+
function xo(i) {
|
|
6272
|
+
if (i.getElementById(pi)) return;
|
|
6240
6273
|
const t = i.createElement("style");
|
|
6241
|
-
t.id =
|
|
6274
|
+
t.id = pi, t.textContent = ko, i.head.appendChild(t);
|
|
6242
6275
|
}
|
|
6243
|
-
function
|
|
6276
|
+
function So(i, t) {
|
|
6244
6277
|
const e = Array.from(t.querySelectorAll("[data-tinyfly-choose]"));
|
|
6245
6278
|
if (e.length === 0) return () => {
|
|
6246
6279
|
};
|
|
6247
|
-
|
|
6280
|
+
xo(t.ownerDocument);
|
|
6248
6281
|
const n = [], s = [];
|
|
6249
6282
|
for (const a of e) {
|
|
6250
6283
|
const c = a.getAttribute("data-tinyfly-choose") ?? "", l = [], h = (m, p) => {
|
|
@@ -6271,9 +6304,9 @@ function ho(i, t) {
|
|
|
6271
6304
|
for (const { element: a, attributes: c } of n) for (const l of c) a.removeAttribute(l);
|
|
6272
6305
|
};
|
|
6273
6306
|
}
|
|
6274
|
-
const
|
|
6275
|
-
let
|
|
6276
|
-
function
|
|
6307
|
+
const Nt = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap();
|
|
6308
|
+
let Mo = 0;
|
|
6309
|
+
function vt(i, t, e) {
|
|
6277
6310
|
if (i)
|
|
6278
6311
|
try {
|
|
6279
6312
|
return JSON.parse(i);
|
|
@@ -6282,36 +6315,36 @@ function mt(i, t, e) {
|
|
|
6282
6315
|
return;
|
|
6283
6316
|
}
|
|
6284
6317
|
}
|
|
6285
|
-
async function
|
|
6286
|
-
const e =
|
|
6318
|
+
async function Ao(i, t = {}) {
|
|
6319
|
+
const e = Nt.get(i);
|
|
6287
6320
|
if (e) return e;
|
|
6288
|
-
const n = Array.from(i.querySelectorAll("script[data-tinyfly-timeline]")), s = n[0], r = i.getAttribute("data-src"), o =
|
|
6321
|
+
const n = Array.from(i.querySelectorAll("script[data-tinyfly-timeline]")), s = n[0], r = i.getAttribute("data-src"), o = Po(i.getAttribute("data-markers")), a = n.length > 1 || s?.hasAttribute("data-scenario") ? Eo(n, o, i) : void 0;
|
|
6289
6322
|
if (a && a.length === 0) return;
|
|
6290
|
-
let c = s && !a ?
|
|
6323
|
+
let c = s && !a ? vt(s.textContent, "timeline", i) : void 0;
|
|
6291
6324
|
if (!c && r && o) {
|
|
6292
6325
|
const d = await fetch(r);
|
|
6293
6326
|
d.ok && (c = await d.json());
|
|
6294
6327
|
}
|
|
6295
|
-
if (c && o && (c =
|
|
6328
|
+
if (c && o && (c = Qi(c, o)), !c && !r && !a) {
|
|
6296
6329
|
console.warn('tinyfly: embed has no timeline (a <script type="application/json" data-tinyfly-timeline> or data-src)', i);
|
|
6297
6330
|
return;
|
|
6298
6331
|
}
|
|
6299
|
-
const l =
|
|
6332
|
+
const l = vt(i.querySelector("script[data-tinyfly-captions]")?.textContent, "captions", i), h = {
|
|
6300
6333
|
playWhenVisible: !0,
|
|
6301
6334
|
...t.player,
|
|
6302
6335
|
...l && { captions: l },
|
|
6303
|
-
...
|
|
6336
|
+
...vt(i.getAttribute("data-options"), "data-options", i)
|
|
6304
6337
|
};
|
|
6305
|
-
|
|
6306
|
-
const f = new
|
|
6307
|
-
if (
|
|
6338
|
+
_o(i);
|
|
6339
|
+
const f = new Ae(i, h), u = { element: i, player: f };
|
|
6340
|
+
if (Nt.set(i, u), i.setAttribute("data-tinyfly-mounted", ""), a) {
|
|
6308
6341
|
const d = i.getAttribute("data-scenario") ?? void 0;
|
|
6309
|
-
await f.loadScenarios(a, { initial: a.some((m) => m.id === d) ? d : void 0 }),
|
|
6342
|
+
await f.loadScenarios(a, { initial: a.some((m) => m.id === d) ? d : void 0 }), ye.set(i, So(f, i));
|
|
6310
6343
|
} else
|
|
6311
6344
|
await f.load(c ?? r);
|
|
6312
6345
|
if (i.getAttribute("data-controls") !== "false") {
|
|
6313
|
-
const d =
|
|
6314
|
-
u.controls =
|
|
6346
|
+
const d = vt(i.getAttribute("data-labels"), "data-labels", i), m = i.querySelector("figcaption"), p = i.getAttribute("data-scenario-legend"), g = i.getAttribute("data-scenario-control");
|
|
6347
|
+
u.controls = yo(f, i, {
|
|
6315
6348
|
...t.controls,
|
|
6316
6349
|
...i.getAttribute("data-fullscreen") === "true" ? { fullscreen: !0 } : {},
|
|
6317
6350
|
...g === "slider" || g === "buttons" ? { scenarioControl: g } : {},
|
|
@@ -6322,10 +6355,10 @@ async function fo(i, t = {}) {
|
|
|
6322
6355
|
}
|
|
6323
6356
|
return u;
|
|
6324
6357
|
}
|
|
6325
|
-
function
|
|
6358
|
+
function Eo(i, t, e) {
|
|
6326
6359
|
const n = [];
|
|
6327
6360
|
return i.forEach((s, r) => {
|
|
6328
|
-
const o =
|
|
6361
|
+
const o = vt(s.textContent, "timeline", e);
|
|
6329
6362
|
if (!o) return;
|
|
6330
6363
|
const a = s.getAttribute("data-scenario") || `scenario-${r + 1}`;
|
|
6331
6364
|
if (n.some((l) => l.id === a)) {
|
|
@@ -6333,39 +6366,39 @@ function po(i, t, e) {
|
|
|
6333
6366
|
return;
|
|
6334
6367
|
}
|
|
6335
6368
|
const c = s.getAttribute("data-scenario-label") ?? void 0;
|
|
6336
|
-
n.push({ id: a, label: c, timeline: t ?
|
|
6369
|
+
n.push({ id: a, label: c, timeline: t ? Qi(o, t) : o });
|
|
6337
6370
|
}), n;
|
|
6338
6371
|
}
|
|
6339
|
-
function
|
|
6372
|
+
function Qi(i, t) {
|
|
6340
6373
|
return i.config.markers?.length ? i : { ...i, config: { ...i.config, markers: t.map((e, n) => ({ id: `step-${n + 1}`, time: e })) } };
|
|
6341
6374
|
}
|
|
6342
|
-
function
|
|
6375
|
+
function Po(i) {
|
|
6343
6376
|
if (!i) return;
|
|
6344
6377
|
const t = i.split(/[\s,]+/).filter(Boolean).map(Number).filter((e) => Number.isFinite(e) && e >= 0).sort((e, n) => e - n);
|
|
6345
6378
|
return t.length > 0 ? t : void 0;
|
|
6346
6379
|
}
|
|
6347
|
-
async function
|
|
6380
|
+
async function Co(i = document, t = {}) {
|
|
6348
6381
|
const e = Array.from(i.querySelectorAll("[data-tinyfly-embed]"));
|
|
6349
|
-
return (await Promise.all(e.map((s) =>
|
|
6382
|
+
return (await Promise.all(e.map((s) => Ao(s, t)))).filter((s) => s !== void 0);
|
|
6350
6383
|
}
|
|
6351
|
-
function
|
|
6352
|
-
const t =
|
|
6353
|
-
t && (
|
|
6384
|
+
function Ta(i) {
|
|
6385
|
+
const t = Nt.get(i);
|
|
6386
|
+
t && (ye.get(i)?.(), ye.delete(i), t.controls?.destroy(), t.player.destroy(), Nt.delete(i), i.removeAttribute("data-tinyfly-mounted"));
|
|
6354
6387
|
}
|
|
6355
|
-
function
|
|
6388
|
+
function _o(i) {
|
|
6356
6389
|
const t = i.querySelector("svg");
|
|
6357
6390
|
if (!t || t.hasAttribute("role") || t.hasAttribute("aria-hidden")) return;
|
|
6358
6391
|
const e = i.getAttribute("data-alt"), n = i.querySelector("figcaption");
|
|
6359
|
-
t.setAttribute("role", "img"), e ? t.setAttribute("aria-label", e) : n && (n.id ||= `tinyfly-caption-${++
|
|
6392
|
+
t.setAttribute("role", "img"), e ? t.setAttribute("aria-label", e) : n && (n.id ||= `tinyfly-caption-${++Mo}`, t.setAttribute("aria-labelledby", n.id));
|
|
6360
6393
|
}
|
|
6361
|
-
function
|
|
6394
|
+
function Io() {
|
|
6362
6395
|
if (!(typeof document < "u" ? document.currentScript : null)?.hasAttribute("data-tinyfly-auto")) return;
|
|
6363
6396
|
const t = () => {
|
|
6364
|
-
|
|
6397
|
+
Co();
|
|
6365
6398
|
};
|
|
6366
6399
|
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", t, { once: !0 }) : t();
|
|
6367
6400
|
}
|
|
6368
|
-
class
|
|
6401
|
+
class Ro {
|
|
6369
6402
|
container;
|
|
6370
6403
|
containerA;
|
|
6371
6404
|
containerB;
|
|
@@ -6395,7 +6428,7 @@ class vo {
|
|
|
6395
6428
|
this.container = n;
|
|
6396
6429
|
} else
|
|
6397
6430
|
this.container = t;
|
|
6398
|
-
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
|
|
6431
|
+
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 J(), this.adapterB = new J();
|
|
6399
6432
|
}
|
|
6400
6433
|
/**
|
|
6401
6434
|
* Load a sequence from a URL or inline definition.
|
|
@@ -6515,11 +6548,11 @@ class vo {
|
|
|
6515
6548
|
if (!r) return;
|
|
6516
6549
|
const o = this.symbolDefs.get(r);
|
|
6517
6550
|
if (!o) return;
|
|
6518
|
-
const a = new
|
|
6551
|
+
const a = new J();
|
|
6519
6552
|
s.querySelectorAll("[data-tinyfly]").forEach((c) => {
|
|
6520
6553
|
const l = c.getAttribute("data-tinyfly");
|
|
6521
6554
|
l && a.registerTarget(l, c);
|
|
6522
|
-
}), n.push({ adapter: a, timeline:
|
|
6555
|
+
}), n.push({ adapter: a, timeline: wt(o) });
|
|
6523
6556
|
}), n.length ? this.nestedByAdapter.set(e, n) : this.nestedByAdapter.delete(e);
|
|
6524
6557
|
}
|
|
6525
6558
|
/** Apply the nested symbol states for a slot at a given scene time. */
|
|
@@ -6535,7 +6568,7 @@ class vo {
|
|
|
6535
6568
|
t.innerHTML = "";
|
|
6536
6569
|
}
|
|
6537
6570
|
createTimeline(t) {
|
|
6538
|
-
return t.timeline ?
|
|
6571
|
+
return t.timeline ? wt(t.timeline) : null;
|
|
6539
6572
|
}
|
|
6540
6573
|
onSceneComplete() {
|
|
6541
6574
|
if (this._isDestroyed || !this.sequence) return;
|
|
@@ -6634,13 +6667,209 @@ class vo {
|
|
|
6634
6667
|
this.animationFrameId !== void 0 && (cancelAnimationFrame(this.animationFrameId), this.animationFrameId = void 0);
|
|
6635
6668
|
}
|
|
6636
6669
|
}
|
|
6637
|
-
async function
|
|
6638
|
-
const n = new
|
|
6670
|
+
async function ka(i, t, e = {}) {
|
|
6671
|
+
const n = new Ro(i, { ...e, autoplay: !0 });
|
|
6639
6672
|
return await n.load(t), n;
|
|
6640
6673
|
}
|
|
6641
|
-
const
|
|
6642
|
-
|
|
6643
|
-
|
|
6674
|
+
const xa = { type: "none", duration: 0 }, ht = {
|
|
6675
|
+
lean: 0,
|
|
6676
|
+
headTilt: 0,
|
|
6677
|
+
leftShoulder: 18,
|
|
6678
|
+
rightShoulder: 18,
|
|
6679
|
+
leftElbow: -6,
|
|
6680
|
+
rightElbow: -6,
|
|
6681
|
+
leftHip: 8,
|
|
6682
|
+
rightHip: 8,
|
|
6683
|
+
leftKnee: 0,
|
|
6684
|
+
rightKnee: 0,
|
|
6685
|
+
mouth: 0,
|
|
6686
|
+
smile: 0.6,
|
|
6687
|
+
mouthWidth: 1,
|
|
6688
|
+
blink: 0,
|
|
6689
|
+
leftEye: 1,
|
|
6690
|
+
rightEye: 1,
|
|
6691
|
+
leftBrow: 0,
|
|
6692
|
+
rightBrow: 0,
|
|
6693
|
+
browTilt: 0,
|
|
6694
|
+
lookX: 0,
|
|
6695
|
+
lookY: 0
|
|
6696
|
+
};
|
|
6697
|
+
function j(i) {
|
|
6698
|
+
return { ...ht, ...i };
|
|
6699
|
+
}
|
|
6700
|
+
const Ji = {
|
|
6701
|
+
mouth: 0,
|
|
6702
|
+
smile: 0,
|
|
6703
|
+
mouthWidth: 1,
|
|
6704
|
+
leftEye: 1,
|
|
6705
|
+
rightEye: 1,
|
|
6706
|
+
leftBrow: 0,
|
|
6707
|
+
rightBrow: 0,
|
|
6708
|
+
browTilt: 0,
|
|
6709
|
+
lookX: 0,
|
|
6710
|
+
lookY: 0
|
|
6711
|
+
}, D = (i) => ({ ...Ji, ...i }), Z = {
|
|
6712
|
+
neutral: Ji,
|
|
6713
|
+
happy: D({ smile: 0.9, leftBrow: 0.2, rightBrow: 0.2 }),
|
|
6714
|
+
joyful: D({ mouth: 0.6, smile: 1, mouthWidth: 1.2, leftEye: 0, rightEye: 0, leftBrow: 0.4, rightBrow: 0.4 }),
|
|
6715
|
+
sad: D({ smile: -0.8, leftEye: 0.8, rightEye: 0.8, browTilt: 0.9, leftBrow: -0.1, rightBrow: -0.1, lookY: 0.6 }),
|
|
6716
|
+
crying: D({ mouth: 0.45, smile: -1, leftEye: 0, rightEye: 0, browTilt: 1, lookY: 0.4 }),
|
|
6717
|
+
surprised: D({ mouth: 0.7, mouthWidth: 0.7, leftEye: 1.5, rightEye: 1.5, leftBrow: 1, rightBrow: 1 }),
|
|
6718
|
+
shocked: D({ mouth: 1, mouthWidth: 0.8, leftEye: 1.6, rightEye: 1.6, leftBrow: 1, rightBrow: 1, browTilt: 0.4 }),
|
|
6719
|
+
angry: D({ smile: -0.6, mouthWidth: 0.9, leftEye: 0.8, rightEye: 0.8, leftBrow: -0.6, rightBrow: -0.6, browTilt: -1 }),
|
|
6720
|
+
furious: D({ mouth: 0.5, smile: -1, mouthWidth: 1.3, leftEye: 0.9, rightEye: 0.9, leftBrow: -0.9, rightBrow: -0.9, browTilt: -1 }),
|
|
6721
|
+
worried: D({ smile: -0.3, mouthWidth: 0.8, leftEye: 1.1, rightEye: 1.1, leftBrow: 0.3, rightBrow: 0.3, browTilt: 0.8, lookX: -0.5 }),
|
|
6722
|
+
scared: D({ mouth: 0.35, smile: -0.5, mouthWidth: 0.8, leftEye: 1.45, rightEye: 1.45, leftBrow: 0.8, rightBrow: 0.8, browTilt: 0.9 }),
|
|
6723
|
+
confused: D({ smile: -0.2, mouthWidth: 0.8, leftEye: 0.9, rightEye: 1.15, leftBrow: -0.3, rightBrow: 0.8, lookX: 0.5, lookY: -0.4 }),
|
|
6724
|
+
skeptical: D({ smile: -0.1, leftEye: 0.6, rightEye: 1, leftBrow: -0.4, rightBrow: 0.7, lookX: 0.4 }),
|
|
6725
|
+
thinking: D({ smile: 0, mouthWidth: 0.7, leftBrow: 0.3, rightBrow: 0.5, lookX: 0.6, lookY: -0.8 }),
|
|
6726
|
+
sleepy: D({ smile: 0.1, leftEye: 0.25, rightEye: 0.25, leftBrow: -0.3, rightBrow: -0.3, lookY: 0.5 }),
|
|
6727
|
+
disgusted: D({ smile: -0.7, mouthWidth: 0.9, leftEye: 0.6, rightEye: 0.75, leftBrow: -0.5, rightBrow: -0.2, browTilt: -0.4, lookX: -0.6 }),
|
|
6728
|
+
smug: D({ smile: 0.6, mouthWidth: 0.9, leftEye: 0.6, rightEye: 0.6, leftBrow: 0.1, rightBrow: 0.5, lookX: 0.5 }),
|
|
6729
|
+
wink: D({ smile: 0.9, leftEye: 0, rightEye: 1, leftBrow: -0.2, rightBrow: 0.3 })
|
|
6730
|
+
};
|
|
6731
|
+
function Lo(i, t) {
|
|
6732
|
+
return { ...i, ...typeof t == "string" ? Z[t] : t };
|
|
6733
|
+
}
|
|
6734
|
+
const $o = {
|
|
6735
|
+
rest: ht,
|
|
6736
|
+
wave: j({ rightShoulder: 135, rightElbow: 30, headTilt: 6, ...Z.happy }),
|
|
6737
|
+
cheer: j({ leftShoulder: 125, leftElbow: 20, rightShoulder: 125, rightElbow: 20, ...Z.joyful }),
|
|
6738
|
+
shrug: j({ leftShoulder: 30, leftElbow: 85, rightShoulder: 30, rightElbow: 85, headTilt: -10, ...Z.confused, lookX: 0, lookY: 0 }),
|
|
6739
|
+
point: j({ rightShoulder: 90, rightElbow: 0, lean: 4, smile: 0.4 }),
|
|
6740
|
+
// The forearm passes 180° to fold back in, so the hand reaches the chin.
|
|
6741
|
+
think: j({ rightShoulder: 60, rightElbow: 150, headTilt: 10, ...Z.thinking }),
|
|
6742
|
+
handsOnHips: j({ leftShoulder: 45, leftElbow: -100, rightShoulder: 45, rightElbow: -100, leftHip: 14, rightHip: 14, smile: 0.8 }),
|
|
6743
|
+
sad: j({ leftShoulder: 14, rightShoulder: 14, leftElbow: -4, rightElbow: -4, headTilt: -14, lean: -3, ...Z.sad }),
|
|
6744
|
+
surprised: j({ leftShoulder: 70, leftElbow: 60, rightShoulder: 70, rightElbow: 60, ...Z.surprised })
|
|
6745
|
+
}, tn = Object.keys(ht);
|
|
6746
|
+
function Fo(i, t, e) {
|
|
6747
|
+
const n = { ...i };
|
|
6748
|
+
for (const s of tn) n[s] = i[s] + (t[s] - i[s]) * e;
|
|
6749
|
+
return n;
|
|
6750
|
+
}
|
|
6751
|
+
const be = 24, Do = 40;
|
|
6752
|
+
function Bo(i, t = ht, e = 1) {
|
|
6753
|
+
const n = Math.sin(i * Math.PI * 2) * e, s = Math.cos(i * Math.PI * 2) * e, r = (o) => o <= Do ? 22 * n : o;
|
|
6754
|
+
return {
|
|
6755
|
+
...t,
|
|
6756
|
+
// Left foot forward while swing > 0, right foot back; then the other way.
|
|
6757
|
+
leftHip: -be * n,
|
|
6758
|
+
rightHip: -be * n,
|
|
6759
|
+
// The leg swinging forward lifts, its shin trailing backward (-x). A positive
|
|
6760
|
+
// knee folds toward the centre, which is backward only for the right leg.
|
|
6761
|
+
leftKnee: -30 * Math.max(0, s),
|
|
6762
|
+
rightKnee: 30 * Math.max(0, -s),
|
|
6763
|
+
// Arms swing against the legs: left arm back while the left foot is forward.
|
|
6764
|
+
leftShoulder: r(t.leftShoulder),
|
|
6765
|
+
rightShoulder: r(t.rightShoulder)
|
|
6766
|
+
};
|
|
6767
|
+
}
|
|
6768
|
+
function Sa(i, t = 1) {
|
|
6769
|
+
return 4 * ((en + nn) * i) * Math.sin(be * t * Math.PI / 180);
|
|
6770
|
+
}
|
|
6771
|
+
function Oo(i) {
|
|
6772
|
+
const t = Math.abs(Math.sin(i / 65)), e = 0.55 + 0.45 * Math.sin(i / 310);
|
|
6773
|
+
return t * e;
|
|
6774
|
+
}
|
|
6775
|
+
const No = 0.12, qo = 0.1, Yo = 0.21, Xo = 0.19, en = 0.24, nn = 0.22, qt = (i) => i * Math.PI / 180, Vo = (i, t) => ({ x: t * Math.sin(qt(i)), y: Math.cos(qt(i)) });
|
|
6776
|
+
function Wo(i, t, e, n, s, r) {
|
|
6777
|
+
const o = Math.max(1, r * 0.6), a = 0.12 * e, c = n - 0.12 * e, l = a + t.lookX * 0.08 * e, h = t.lookY * 0.07 * e, f = [
|
|
6778
|
+
{ x: -0.34 * e, open: t.leftEye, brow: t.leftBrow, side: -1 },
|
|
6779
|
+
{ x: 0.34 * e, open: t.rightEye, brow: t.rightBrow, side: 1 }
|
|
6780
|
+
];
|
|
6781
|
+
i.fillStyle = s, i.strokeStyle = s, i.lineWidth = o;
|
|
6782
|
+
for (const g of f) {
|
|
6783
|
+
const y = Math.max(0, g.open) * (1 - Math.min(1, Math.max(0, t.blink)));
|
|
6784
|
+
if (y < 0.2) {
|
|
6785
|
+
const w = t.smile > 0.5 ? -0.12 * e : 0.06 * e;
|
|
6786
|
+
i.beginPath(), i.moveTo(g.x + a - 0.12 * e, c), i.quadraticCurveTo(g.x + a, c + w, g.x + a + 0.12 * e, c), i.stroke();
|
|
6787
|
+
} else {
|
|
6788
|
+
if (y > 1.2) {
|
|
6789
|
+
const k = 0.13 * e * y;
|
|
6790
|
+
i.beginPath(), i.ellipse(g.x + a, c, k * 0.85, k, 0, 0, Math.PI * 2), i.fillStyle = "#ffffff", i.fill(), i.stroke(), i.fillStyle = s;
|
|
6791
|
+
}
|
|
6792
|
+
const w = y > 1.2 ? 0.075 * e : 0.1 * e;
|
|
6793
|
+
i.beginPath(), i.ellipse(g.x + l, c + h, w, w * 1.1 * Math.min(y, 1), 0, 0, Math.PI * 2), i.fill();
|
|
6794
|
+
}
|
|
6795
|
+
const v = c - 0.3 * e - g.brow * 0.14 * e - Math.max(0, y - 1) * 0.12 * e, b = g.x + a - g.side * 0.13 * e, T = g.x + a + g.side * 0.13 * e;
|
|
6796
|
+
i.beginPath(), i.moveTo(T, v), i.lineTo(b, v - t.browTilt * 0.1 * e), i.stroke();
|
|
6797
|
+
}
|
|
6798
|
+
const u = n + 0.4 * e, d = 0.25 * e * Math.max(0.3, t.mouthWidth), m = Math.min(1, Math.max(0, t.mouth));
|
|
6799
|
+
if (i.beginPath(), m <= 0.05) {
|
|
6800
|
+
i.moveTo(a - d, u), i.quadraticCurveTo(a, u + t.smile * 0.25 * e, a + d, u), i.stroke();
|
|
6801
|
+
return;
|
|
6802
|
+
}
|
|
6803
|
+
const p = 0.3 * e * m;
|
|
6804
|
+
t.smile > 0.3 ? (i.moveTo(a - d, u - 0.05 * e), i.lineTo(a + d, u - 0.05 * e), i.quadraticCurveTo(a, u + p * 2, a - d, u - 0.05 * e)) : t.smile < -0.3 ? (i.moveTo(a - d, u + p * 0.6), i.lineTo(a + d, u + p * 0.6), i.quadraticCurveTo(a, u - p * 1.4, a - d, u + p * 0.6)) : i.ellipse(a, u, d * 0.8, p, 0, 0, Math.PI * 2), i.fill();
|
|
6805
|
+
}
|
|
6806
|
+
function jo(i, t, e = {}) {
|
|
6807
|
+
const n = e.height ?? 300, s = e.color ?? "#1e293b", r = (e.facing ?? 1) < 0 ? -1 : 1, o = No * n, a = -0.46 * n, c = -0.76 * n;
|
|
6808
|
+
i.save(), i.scale(r, 1), i.strokeStyle = s, i.lineWidth = e.lineWidth ?? n * 0.025, i.lineCap = "round", i.lineJoin = "round";
|
|
6809
|
+
const l = (m, p, g, y, v) => {
|
|
6810
|
+
const b = Vo(g, y);
|
|
6811
|
+
return { x: m + b.x * v * n, y: p + b.y * v * n };
|
|
6812
|
+
}, h = (...m) => {
|
|
6813
|
+
i.beginPath(), i.moveTo(m[0].x, m[0].y);
|
|
6814
|
+
for (const p of m.slice(1)) i.lineTo(p.x, p.y);
|
|
6815
|
+
i.stroke();
|
|
6816
|
+
};
|
|
6817
|
+
for (const [m, p, g] of [
|
|
6818
|
+
[-1, t.leftHip, t.leftKnee],
|
|
6819
|
+
[1, t.rightHip, t.rightKnee]
|
|
6820
|
+
]) {
|
|
6821
|
+
const y = l(0, a, p, m, en);
|
|
6822
|
+
h({ x: 0, y: a }, y, l(y.x, y.y, p - g, m, nn));
|
|
6823
|
+
}
|
|
6824
|
+
i.translate(0, a), i.rotate(qt(t.lean)), i.translate(0, -a), h({ x: 0, y: a }, { x: 0, y: c });
|
|
6825
|
+
const f = c + qo * n;
|
|
6826
|
+
for (const [m, p, g] of [
|
|
6827
|
+
[-1, t.leftShoulder, t.leftElbow],
|
|
6828
|
+
[1, t.rightShoulder, t.rightElbow]
|
|
6829
|
+
]) {
|
|
6830
|
+
const y = l(0, f, p, m, Yo);
|
|
6831
|
+
h({ x: 0, y: f }, y, l(y.x, y.y, p + g, m, Xo));
|
|
6832
|
+
}
|
|
6833
|
+
i.translate(0, c), i.rotate(qt(t.headTilt));
|
|
6834
|
+
const u = -o;
|
|
6835
|
+
i.beginPath(), i.arc(0, u, o, 0, Math.PI * 2);
|
|
6836
|
+
const d = e.headFill ?? "#ffffff";
|
|
6837
|
+
d !== "none" && (i.fillStyle = d, i.fill()), i.stroke(), Wo(i, t, o, u, s, e.lineWidth ?? n * 0.025), i.restore(), e.label && (i.save(), i.fillStyle = s, i.font = e.labelFont ?? `700 ${Math.round(n * 0.11)}px sans-serif`, i.textAlign = "center", i.textBaseline = "bottom", i.fillText(e.label, 0, -n - 0.04 * n), i.restore());
|
|
6838
|
+
}
|
|
6839
|
+
function Ma(i) {
|
|
6840
|
+
const t = i.style ?? {}, e = t.height ?? 300, n = e * 0.8, s = { ...j(i.pose ?? {}), walk: 0, walking: 0, talk: 0 };
|
|
6841
|
+
return {
|
|
6842
|
+
type: "custom",
|
|
6843
|
+
x: i.x - n / 2,
|
|
6844
|
+
y: i.y - e,
|
|
6845
|
+
width: n,
|
|
6846
|
+
height: e,
|
|
6847
|
+
props: { ...s },
|
|
6848
|
+
draw(r, o, a) {
|
|
6849
|
+
const c = o.props, l = { ...c };
|
|
6850
|
+
let h = c.walking > 0 ? Fo(l, Bo(c.walk, l), c.walking) : l;
|
|
6851
|
+
c.talk > 0 && (h = { ...h, mouth: Math.max(h.mouth, c.talk * Oo(a)) }), r.translate(n / 2, e), jo(r, h, t);
|
|
6852
|
+
}
|
|
6853
|
+
};
|
|
6854
|
+
}
|
|
6855
|
+
function Aa(i, t) {
|
|
6856
|
+
const e = [];
|
|
6857
|
+
return t.forEach((n, s) => {
|
|
6858
|
+
const r = s === 0 ? ht : e[s - 1], o = typeof n.pose == "string" ? $o[n.pose] : { ...r, ...n.pose };
|
|
6859
|
+
e.push(n.expression ? Lo(o, n.expression) : o);
|
|
6860
|
+
}), tn.filter((n) => e.some((s) => s[n] !== ht[n])).map((n) => ({
|
|
6861
|
+
id: `${i}-${n}`,
|
|
6862
|
+
target: i,
|
|
6863
|
+
property: n,
|
|
6864
|
+
keyframes: t.map((s, r) => ({
|
|
6865
|
+
time: s.time,
|
|
6866
|
+
value: e[r][n],
|
|
6867
|
+
...s.easing ? { easing: s.easing } : {}
|
|
6868
|
+
}))
|
|
6869
|
+
}));
|
|
6870
|
+
}
|
|
6871
|
+
function Ea(i) {
|
|
6872
|
+
const { timeline: t } = i, e = new J();
|
|
6644
6873
|
for (const [l, h] of Object.entries(i.targets)) {
|
|
6645
6874
|
const f = typeof h == "string" ? document.querySelector(h) : h;
|
|
6646
6875
|
if (!f)
|
|
@@ -6680,188 +6909,203 @@ function Go(i) {
|
|
|
6680
6909
|
}
|
|
6681
6910
|
};
|
|
6682
6911
|
}
|
|
6683
|
-
const
|
|
6684
|
-
timeline:
|
|
6912
|
+
const Pa = {
|
|
6913
|
+
timeline: Us,
|
|
6685
6914
|
to(i, t, e) {
|
|
6686
|
-
const n = new
|
|
6915
|
+
const n = new ot(e);
|
|
6687
6916
|
return n.to(i, t), n;
|
|
6688
6917
|
},
|
|
6689
6918
|
from(i, t, e) {
|
|
6690
|
-
const n = new
|
|
6919
|
+
const n = new ot(e);
|
|
6691
6920
|
return n.from(i, t), n;
|
|
6692
6921
|
},
|
|
6693
6922
|
fromTo(i, t, e, n) {
|
|
6694
|
-
const s = new
|
|
6923
|
+
const s = new ot(n);
|
|
6695
6924
|
return s.fromTo(i, t, e), s;
|
|
6696
6925
|
},
|
|
6697
6926
|
set(i, t, e) {
|
|
6698
|
-
const n = new
|
|
6927
|
+
const n = new ot(e);
|
|
6699
6928
|
return n.set(i, t), n;
|
|
6700
6929
|
}
|
|
6701
|
-
},
|
|
6702
|
-
|
|
6930
|
+
}, Ca = Y.to, _a = Y.from, Ia = Y.fromTo, Ra = Y.set, La = Y.timeline, $a = Y.ticker, Fa = Y.splitText, Da = Y.context, Ba = Y.matchMedia, Oa = Y.quickTo, Na = Y.imageSequence, qa = Y.pageTransition;
|
|
6931
|
+
Io();
|
|
6703
6932
|
export {
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6933
|
+
zo as Clock,
|
|
6934
|
+
ot as CompatTimeline,
|
|
6935
|
+
Jr as CustomBounce,
|
|
6936
|
+
Qr as CustomEase,
|
|
6937
|
+
to as CustomWiggle,
|
|
6938
|
+
xi as DEFAULT_BAKE_INTERVAL_MS,
|
|
6939
|
+
Ee as DEFAULT_INERTIA_FRICTION,
|
|
6940
|
+
fo as DEFAULT_LABELS,
|
|
6712
6941
|
X as DEFAULT_SPRING,
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6942
|
+
xa as DEFAULT_TRANSITION,
|
|
6943
|
+
Wi as Draggable,
|
|
6944
|
+
Z as EXPRESSIONS,
|
|
6945
|
+
Lt as FORMAT_VERSION,
|
|
6946
|
+
dn as INERTIA_MAX_DURATION_MS,
|
|
6947
|
+
ns as InertiaTrackPlayer,
|
|
6948
|
+
H as LiveTimeline,
|
|
6949
|
+
ea as MORPH_SAMPLES,
|
|
6950
|
+
Ho as ManualClock,
|
|
6951
|
+
fi as MediaSync,
|
|
6952
|
+
dr as Observer,
|
|
6953
|
+
$o as POSES,
|
|
6954
|
+
ht as REST_POSE,
|
|
6955
|
+
bi as SPRING_MAX_DURATION_MS,
|
|
6956
|
+
Ht as SPRING_PRESETS,
|
|
6957
|
+
yt as SPRING_STEP_MS,
|
|
6958
|
+
Fr as ScrollAnimator,
|
|
6959
|
+
jt as ScrollDriver,
|
|
6960
|
+
Dr as ScrollMarkers,
|
|
6961
|
+
_r as ScrollPin,
|
|
6962
|
+
ri as SmoothScroll,
|
|
6963
|
+
Xt as SpringSampler,
|
|
6964
|
+
is as SpringTrackPlayer,
|
|
6965
|
+
rr as Stage,
|
|
6966
|
+
Ci as Timeline,
|
|
6967
|
+
Ae as TinyflyPlayer,
|
|
6968
|
+
Ro as TinyflySequencer,
|
|
6969
|
+
Qt as TrackPlayer,
|
|
6970
|
+
ua as ValueResolver,
|
|
6971
|
+
Cr as VisibilityDriver,
|
|
6972
|
+
Mn as backOut,
|
|
6973
|
+
Ei as bakeEasing,
|
|
6974
|
+
Mi as bakeInertiaTrack,
|
|
6975
|
+
Si as bakeSpringTrack,
|
|
6976
|
+
So as bindChoiceHotspots,
|
|
6977
|
+
Fo as blendPose,
|
|
6978
|
+
Sn as bounceOut,
|
|
6979
|
+
rs as charactersFor,
|
|
6980
|
+
zi as clamp01,
|
|
6981
|
+
ia as clearMorphCache,
|
|
6982
|
+
Jo as clearPathCache,
|
|
6983
|
+
ii as containerProgressAt,
|
|
6984
|
+
Da as context,
|
|
6985
|
+
wa as create,
|
|
6986
|
+
yo as createControls,
|
|
6987
|
+
kn as createCubicBezier,
|
|
6988
|
+
oo as createLive,
|
|
6989
|
+
fs as createRandom,
|
|
6990
|
+
ue as createTrack,
|
|
6991
|
+
Zo as criticalDamping,
|
|
6992
|
+
ys as customBounce,
|
|
6993
|
+
gs as customEase,
|
|
6994
|
+
bs as customWiggle,
|
|
6995
|
+
wt as deserializeTimeline,
|
|
6996
|
+
hs as deserializeTrack,
|
|
6997
|
+
ma as draggable,
|
|
6998
|
+
jo as drawStickFigure,
|
|
6999
|
+
bn as easeIn,
|
|
7000
|
+
vi as easeInCubic,
|
|
7001
|
+
wn as easeInOut,
|
|
7002
|
+
Wt as easeInOutCubic,
|
|
7003
|
+
yn as easeInOutQuad,
|
|
7004
|
+
mn as easeInQuad,
|
|
7005
|
+
vn as easeOut,
|
|
7006
|
+
wi as easeOutCubic,
|
|
7007
|
+
gn as easeOutQuad,
|
|
7008
|
+
xn as elasticOut,
|
|
7009
|
+
ts as expandParametricEasings,
|
|
7010
|
+
_a as from,
|
|
7011
|
+
aa as fromJSON,
|
|
7012
|
+
Ia as fromTo,
|
|
7013
|
+
z as getEasingFunction,
|
|
7014
|
+
Ft as getInterpolator,
|
|
7015
|
+
Pi as getMotionPathPoint,
|
|
7016
|
+
ta as getPathLength,
|
|
7017
|
+
Dn as getPointAtProgress,
|
|
7018
|
+
mr as gridLinesFor,
|
|
7019
|
+
ln as hasKeyframes,
|
|
7020
|
+
ca as hashSeed,
|
|
7021
|
+
Na as imageSequence,
|
|
7022
|
+
xt as inertiaDuration,
|
|
7023
|
+
kt as inertiaRest,
|
|
7024
|
+
ce as inertiaValueAt,
|
|
7025
|
+
Qo as inertiaVelocityAt,
|
|
7026
|
+
Qn as interpolateArray,
|
|
7027
|
+
Zn as interpolateColor,
|
|
7028
|
+
ra as interpolateMotionPath,
|
|
7029
|
+
U as interpolateNumber,
|
|
7030
|
+
Jn as interpolatePathString,
|
|
7031
|
+
Ye as interpolateString,
|
|
7032
|
+
cn as isCubicBezierEasing,
|
|
7033
|
+
tt as isInertiaTrack,
|
|
7034
|
+
Uo as isMotionPathPoint,
|
|
7035
|
+
mi as isMotionPathTrack,
|
|
7036
|
+
Rt as isParametricEasing,
|
|
7037
|
+
St as isPathData,
|
|
7038
|
+
et as isSpringTrack,
|
|
7039
|
+
ve as isTextTrack,
|
|
7040
|
+
Ko as isUnderdamped,
|
|
7041
|
+
ha as isUnresolved,
|
|
7042
|
+
le as linear,
|
|
7043
|
+
Y as live,
|
|
7044
|
+
Dt as mapEase,
|
|
7045
|
+
Ba as matchMedia,
|
|
7046
|
+
yi as maxStaggerDistance,
|
|
7047
|
+
zn as morphPath,
|
|
7048
|
+
Ao as mount,
|
|
7049
|
+
Co as mountAll,
|
|
7050
|
+
da as narrationMarkers,
|
|
7051
|
+
pa as narrationSceneAt,
|
|
7052
|
+
$t as naturalRest,
|
|
7053
|
+
qa as pageTransition,
|
|
7054
|
+
En as parametricEasing,
|
|
7055
|
+
ei as parseEdge,
|
|
7056
|
+
at as parsePath,
|
|
7057
|
+
Hi as parseTrigger,
|
|
7058
|
+
fa as planNarration,
|
|
7059
|
+
va as play,
|
|
7060
|
+
ka as playSequence,
|
|
7061
|
+
ya as playWhenVisible,
|
|
7062
|
+
_i as playheadCrossings,
|
|
7063
|
+
Ti as pointAtDistance,
|
|
7064
|
+
Ss as pointsToPath,
|
|
7065
|
+
j as pose,
|
|
7066
|
+
Aa as poseTracks,
|
|
7067
|
+
Ea as quickPlay,
|
|
7068
|
+
Oa as quickTo,
|
|
7069
|
+
Ri as randomBetween,
|
|
7070
|
+
la as randomChoice,
|
|
7071
|
+
ds as randomSnapped,
|
|
7072
|
+
ps as resolveSequence,
|
|
7073
|
+
Fi as resolveValue,
|
|
7074
|
+
ga as scrollProgress,
|
|
7075
|
+
ba as scrubOnScroll,
|
|
7076
|
+
us as serializeTimeline,
|
|
7077
|
+
ls as serializeTrack,
|
|
7078
|
+
Ra as set,
|
|
7079
|
+
Te as shapeToPathData,
|
|
7080
|
+
es as simplifyKeyframes,
|
|
7081
|
+
Pr as smoothToward,
|
|
7082
|
+
pr as snapAxis,
|
|
7083
|
+
Rr as snapConfig,
|
|
7084
|
+
$r as snapDuration,
|
|
7085
|
+
Lr as snapProgress,
|
|
7086
|
+
Fa as splitText,
|
|
7087
|
+
hn as springDuration,
|
|
7088
|
+
Go as springValueAt,
|
|
7089
|
+
gi as staggerDistance,
|
|
7090
|
+
we as staggerOffset,
|
|
7091
|
+
ae as staggerOffsets,
|
|
7092
|
+
Yt as staggerSpan,
|
|
7093
|
+
An as stepsEasing,
|
|
7094
|
+
Ma as stickFigureTarget,
|
|
7095
|
+
Sa as strideLength,
|
|
7096
|
+
uo as syncMediaElement,
|
|
7097
|
+
Oo as talkingMouth,
|
|
7098
|
+
as as textAt,
|
|
7099
|
+
Pa as tf,
|
|
7100
|
+
$a as ticker,
|
|
7101
|
+
La as timeline,
|
|
7102
|
+
Ca as to,
|
|
7103
|
+
oa as toJSON,
|
|
7104
|
+
na as toKeyframedTrack,
|
|
7105
|
+
sa as toKeyframedTracks,
|
|
7106
|
+
Q as trackTargets,
|
|
7107
|
+
Tt as triggerDistance,
|
|
7108
|
+
Ta as unmount,
|
|
7109
|
+
Bo as walkPose,
|
|
7110
|
+
Lo as withExpression
|
|
6867
7111
|
};
|