motion-v 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +962 -909
- package/dist/index.umd.cjs +1 -0
- package/dist/src/components/AnimatePresence.d.ts +2 -2
- package/dist/src/components/Motion.d.ts +2 -3
- package/dist/src/components/Primitive.d.ts +1 -1
- package/dist/src/components/context.d.ts +0 -5
- package/dist/src/components/presence.d.ts +1 -0
- package/dist/src/features/gestures/drag/types.d.ts +1 -1
- package/dist/src/features/gestures/types.d.ts +1 -1
- package/dist/src/state/event.d.ts +1 -1
- package/dist/src/state/motion-state.d.ts +4 -4
- package/dist/src/state/style.d.ts +5 -1
- package/dist/src/state/transform.d.ts +1 -1
- package/dist/src/state/utils.d.ts +1 -1
- package/dist/src/types/index.d.ts +2 -0
- package/dist/src/types/motion-values.d.ts +91 -0
- package/dist/src/{state/types.d.ts → types/state.d.ts} +1 -1
- package/package.json +8 -4
- package/dist/index.cjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function
|
|
1
|
+
import { inject as Js, provide as Qs, Fragment as ti, defineComponent as Ot, Comment as ei, mergeProps as re, cloneVNode as ni, h as $t, mergeDefaults as si, ref as ii, useAttrs as ri, getCurrentInstance as oi, onMounted as In, onUnmounted as Dt, onUpdated as ai, openBlock as Ln, createBlock as Nn, unref as li, withCtx as $n, renderSlot as Kn, toRefs as ui, resolveDynamicComponent as ci, TransitionGroup as fi, Transition as hi, onBeforeUpdate as Wn, watch as kn, onBeforeUnmount as di } from "vue";
|
|
2
|
+
function pi(e, t) {
|
|
3
3
|
e.indexOf(t) === -1 && e.push(t);
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function _n(e, t) {
|
|
6
6
|
const n = e.indexOf(t);
|
|
7
7
|
n > -1 && e.splice(n, 1);
|
|
8
8
|
}
|
|
9
|
-
class
|
|
9
|
+
class Gn {
|
|
10
10
|
constructor() {
|
|
11
11
|
this.subscriptions = [];
|
|
12
12
|
}
|
|
13
13
|
add(t) {
|
|
14
|
-
return
|
|
14
|
+
return pi(this.subscriptions, t), () => _n(this.subscriptions, t);
|
|
15
15
|
}
|
|
16
16
|
notify(t, n, s) {
|
|
17
17
|
const i = this.subscriptions.length;
|
|
@@ -31,18 +31,18 @@ class Un {
|
|
|
31
31
|
this.subscriptions.length = 0;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function oe(e, t) {
|
|
35
35
|
return t ? e * (1e3 / t) : 0;
|
|
36
36
|
}
|
|
37
37
|
const We = /* @__PURE__ */ new Set();
|
|
38
38
|
function Bt(e, t, n) {
|
|
39
39
|
e || We.has(t) || (console.warn(t), We.add(t));
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const mi = {
|
|
42
42
|
skipAnimations: !1,
|
|
43
43
|
useManualTiming: !1
|
|
44
44
|
}, K = (e) => e;
|
|
45
|
-
function
|
|
45
|
+
function gi(e) {
|
|
46
46
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = !1, i = !1;
|
|
47
47
|
const r = /* @__PURE__ */ new WeakSet();
|
|
48
48
|
let o = {
|
|
@@ -80,7 +80,7 @@ function yi(e) {
|
|
|
80
80
|
};
|
|
81
81
|
return l;
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const st = [
|
|
84
84
|
"read",
|
|
85
85
|
// Read
|
|
86
86
|
"resolveKeyframes",
|
|
@@ -93,41 +93,41 @@ const nt = [
|
|
|
93
93
|
// Write
|
|
94
94
|
"postRender"
|
|
95
95
|
// Compute
|
|
96
|
-
],
|
|
97
|
-
function
|
|
96
|
+
], yi = 40;
|
|
97
|
+
function vi(e, t) {
|
|
98
98
|
let n = !1, s = !0;
|
|
99
99
|
const i = {
|
|
100
100
|
delta: 0,
|
|
101
101
|
timestamp: 0,
|
|
102
102
|
isProcessing: !1
|
|
103
|
-
}, r = () => n = !0, o =
|
|
103
|
+
}, r = () => n = !0, o = st.reduce((g, y) => (g[y] = gi(r), g), {}), { read: a, resolveKeyframes: l, update: u, preRender: c, render: f, postRender: h } = o, p = () => {
|
|
104
104
|
const g = performance.now();
|
|
105
|
-
n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(g - i.timestamp,
|
|
105
|
+
n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(g - i.timestamp, yi), 1), i.timestamp = g, i.isProcessing = !0, a.process(i), l.process(i), u.process(i), c.process(i), f.process(i), h.process(i), i.isProcessing = !1, n && t && (s = !1, e(p));
|
|
106
106
|
}, m = () => {
|
|
107
107
|
n = !0, s = !0, i.isProcessing || e(p);
|
|
108
108
|
};
|
|
109
|
-
return { schedule:
|
|
109
|
+
return { schedule: st.reduce((g, y) => {
|
|
110
110
|
const T = o[y];
|
|
111
111
|
return g[y] = (V, S = !1, A = !1) => (n || m(), T.schedule(V, S, A)), g;
|
|
112
112
|
}, {}), cancel: (g) => {
|
|
113
|
-
for (let y = 0; y <
|
|
114
|
-
o[
|
|
113
|
+
for (let y = 0; y < st.length; y++)
|
|
114
|
+
o[st[y]].cancel(g);
|
|
115
115
|
}, state: i, steps: o };
|
|
116
116
|
}
|
|
117
|
-
const { schedule:
|
|
117
|
+
const { schedule: M, cancel: R, state: J, steps: Rl } = vi(typeof requestAnimationFrame < "u" ? requestAnimationFrame : K, !0);
|
|
118
118
|
let St;
|
|
119
|
-
function
|
|
119
|
+
function bi() {
|
|
120
120
|
St = void 0;
|
|
121
121
|
}
|
|
122
122
|
const N = {
|
|
123
|
-
now: () => (St === void 0 && N.set(
|
|
123
|
+
now: () => (St === void 0 && N.set(J.isProcessing || mi.useManualTiming ? J.timestamp : performance.now()), St),
|
|
124
124
|
set: (e) => {
|
|
125
|
-
St = e, queueMicrotask(
|
|
125
|
+
St = e, queueMicrotask(bi);
|
|
126
126
|
}
|
|
127
|
-
},
|
|
127
|
+
}, ke = 30, wi = (e) => !isNaN(parseFloat(e)), _ = {
|
|
128
128
|
current: void 0
|
|
129
129
|
};
|
|
130
|
-
class
|
|
130
|
+
class Si {
|
|
131
131
|
/**
|
|
132
132
|
* @param init - The initiating value
|
|
133
133
|
* @param config - Optional configuration options
|
|
@@ -143,7 +143,7 @@ class Ti {
|
|
|
143
143
|
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
|
|
144
144
|
}
|
|
145
145
|
setCurrent(t) {
|
|
146
|
-
this.current = t, this.updatedAt = N.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity =
|
|
146
|
+
this.current = t, this.updatedAt = N.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = wi(this.current));
|
|
147
147
|
}
|
|
148
148
|
setPrevFrameValue(t = this.current) {
|
|
149
149
|
this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -192,10 +192,10 @@ class Ti {
|
|
|
192
192
|
return process.env.NODE_ENV !== "production" && Bt(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
|
|
193
193
|
}
|
|
194
194
|
on(t, n) {
|
|
195
|
-
this.events[t] || (this.events[t] = new
|
|
195
|
+
this.events[t] || (this.events[t] = new Gn());
|
|
196
196
|
const s = this.events[t].add(n);
|
|
197
197
|
return t === "change" ? () => {
|
|
198
|
-
s(),
|
|
198
|
+
s(), M.read(() => {
|
|
199
199
|
this.events.change.getSize() || this.stop();
|
|
200
200
|
});
|
|
201
201
|
} : s;
|
|
@@ -248,7 +248,7 @@ class Ti {
|
|
|
248
248
|
* @public
|
|
249
249
|
*/
|
|
250
250
|
get() {
|
|
251
|
-
return
|
|
251
|
+
return _.current && _.current.push(this), this.current;
|
|
252
252
|
}
|
|
253
253
|
/**
|
|
254
254
|
* @public
|
|
@@ -265,10 +265,10 @@ class Ti {
|
|
|
265
265
|
*/
|
|
266
266
|
getVelocity() {
|
|
267
267
|
const t = N.now();
|
|
268
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt >
|
|
268
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > ke)
|
|
269
269
|
return 0;
|
|
270
|
-
const n = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
271
|
-
return
|
|
270
|
+
const n = Math.min(this.updatedAt - this.prevUpdatedAt, ke);
|
|
271
|
+
return oe(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
272
272
|
}
|
|
273
273
|
/**
|
|
274
274
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
@@ -322,14 +322,14 @@ class Ti {
|
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
function D(e, t) {
|
|
325
|
-
return new
|
|
325
|
+
return new Si(e, t);
|
|
326
326
|
}
|
|
327
327
|
function Rt(e) {
|
|
328
328
|
let t;
|
|
329
329
|
return () => (t === void 0 && (t = e()), t);
|
|
330
330
|
}
|
|
331
|
-
const
|
|
332
|
-
class
|
|
331
|
+
const zn = Rt(() => window.ScrollTimeline !== void 0);
|
|
332
|
+
class ae {
|
|
333
333
|
constructor(t) {
|
|
334
334
|
this.stop = () => this.runAll("stop"), this.animations = t.filter(Boolean);
|
|
335
335
|
}
|
|
@@ -347,7 +347,7 @@ class oe {
|
|
|
347
347
|
this.animations[s][t] = n;
|
|
348
348
|
}
|
|
349
349
|
attachTimeline(t, n) {
|
|
350
|
-
const s = this.animations.map((i) =>
|
|
350
|
+
const s = this.animations.map((i) => zn() && i.attachTimeline ? i.attachTimeline(t) : n(i));
|
|
351
351
|
return () => {
|
|
352
352
|
s.forEach((i, r) => {
|
|
353
353
|
i && i(), this.animations[r].stop();
|
|
@@ -391,24 +391,24 @@ class oe {
|
|
|
391
391
|
this.runAll("complete");
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
const
|
|
395
|
-
function
|
|
396
|
-
const s = Math.max(t -
|
|
397
|
-
return
|
|
394
|
+
const C = (e) => e * 1e3, B = (e) => e / 1e3, Ti = 5;
|
|
395
|
+
function Un(e, t, n) {
|
|
396
|
+
const s = Math.max(t - Ti, 0);
|
|
397
|
+
return oe(n - e(s), t - s);
|
|
398
398
|
}
|
|
399
|
-
let
|
|
400
|
-
process.env.NODE_ENV !== "production" && (
|
|
399
|
+
let ht = K, I = K;
|
|
400
|
+
process.env.NODE_ENV !== "production" && (ht = (e, t) => {
|
|
401
401
|
!e && typeof console < "u" && console.warn(t);
|
|
402
402
|
}, I = (e, t) => {
|
|
403
403
|
if (!e)
|
|
404
404
|
throw new Error(t);
|
|
405
405
|
});
|
|
406
|
-
const H = (e, t, n) => n > t ? t : n < e ? e : n, Kt = 1e-3,
|
|
406
|
+
const H = (e, t, n) => n > t ? t : n < e ? e : n, Kt = 1e-3, Vi = 0.01, _e = 10, xi = 0.05, Ai = 1;
|
|
407
407
|
function Mi({ duration: e = 800, bounce: t = 0.25, velocity: n = 0, mass: s = 1 }) {
|
|
408
408
|
let i, r;
|
|
409
|
-
|
|
409
|
+
ht(e <= C(_e), "Spring duration must be 10 seconds or less");
|
|
410
410
|
let o = 1 - t;
|
|
411
|
-
o = H(
|
|
411
|
+
o = H(xi, Ai, o), e = H(Vi, _e, B(e)), o < 1 ? (i = (u) => {
|
|
412
412
|
const c = u * o, f = c * e, h = c - n, p = jt(u, o), m = Math.exp(-f);
|
|
413
413
|
return Kt - h / p * m;
|
|
414
414
|
}, r = (u) => {
|
|
@@ -422,7 +422,7 @@ function Mi({ duration: e = 800, bounce: t = 0.25, velocity: n = 0, mass: s = 1
|
|
|
422
422
|
return c * f;
|
|
423
423
|
});
|
|
424
424
|
const a = 5 / e, l = Pi(i, r, a);
|
|
425
|
-
if (e =
|
|
425
|
+
if (e = C(e), isNaN(l))
|
|
426
426
|
return {
|
|
427
427
|
stiffness: 100,
|
|
428
428
|
damping: 10,
|
|
@@ -437,21 +437,21 @@ function Mi({ duration: e = 800, bounce: t = 0.25, velocity: n = 0, mass: s = 1
|
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
const
|
|
440
|
+
const Ei = 12;
|
|
441
441
|
function Pi(e, t, n) {
|
|
442
442
|
let s = n;
|
|
443
|
-
for (let i = 1; i <
|
|
443
|
+
for (let i = 1; i < Ei; i++)
|
|
444
444
|
s = s - e(s) / t(s);
|
|
445
445
|
return s;
|
|
446
446
|
}
|
|
447
447
|
function jt(e, t) {
|
|
448
448
|
return e * Math.sqrt(1 - t * t);
|
|
449
449
|
}
|
|
450
|
-
const
|
|
451
|
-
function
|
|
450
|
+
const Ci = ["duration", "bounce"], Fi = ["stiffness", "damping", "mass"];
|
|
451
|
+
function Ge(e, t) {
|
|
452
452
|
return t.some((n) => e[n] !== void 0);
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function Oi(e) {
|
|
455
455
|
let t = {
|
|
456
456
|
velocity: 0,
|
|
457
457
|
stiffness: 100,
|
|
@@ -460,7 +460,7 @@ function Di(e) {
|
|
|
460
460
|
isResolvedFromDuration: !1,
|
|
461
461
|
...e
|
|
462
462
|
};
|
|
463
|
-
if (!
|
|
463
|
+
if (!Ge(e, Fi) && Ge(e, Ci)) {
|
|
464
464
|
const n = Mi(e);
|
|
465
465
|
t = {
|
|
466
466
|
...t,
|
|
@@ -470,8 +470,8 @@ function Di(e) {
|
|
|
470
470
|
}
|
|
471
471
|
return t;
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
const i = e[0], r = e[e.length - 1], o = { done: !1, value: i }, { stiffness: a, damping: l, mass: u, duration: c, velocity: f, isResolvedFromDuration: h } =
|
|
473
|
+
function le({ keyframes: e, restDelta: t, restSpeed: n, ...s }) {
|
|
474
|
+
const i = e[0], r = e[e.length - 1], o = { done: !1, value: i }, { stiffness: a, damping: l, mass: u, duration: c, velocity: f, isResolvedFromDuration: h } = Oi({
|
|
475
475
|
...s,
|
|
476
476
|
velocity: -B(s.velocity || 0)
|
|
477
477
|
}), p = f || 0, m = l / (2 * Math.sqrt(a * u)), w = r - i, b = B(Math.sqrt(a / u)), g = Math.abs(w) < 5;
|
|
@@ -500,7 +500,7 @@ function ae({ keyframes: e, restDelta: t, restSpeed: n, ...s }) {
|
|
|
500
500
|
o.done = T >= c;
|
|
501
501
|
else {
|
|
502
502
|
let S = 0;
|
|
503
|
-
m < 1 && (S = T === 0 ?
|
|
503
|
+
m < 1 && (S = T === 0 ? C(p) : Un(y, T, V));
|
|
504
504
|
const A = Math.abs(S) <= n, F = Math.abs(r - V) <= t;
|
|
505
505
|
o.done = A && F;
|
|
506
506
|
}
|
|
@@ -508,39 +508,39 @@ function ae({ keyframes: e, restDelta: t, restSpeed: n, ...s }) {
|
|
|
508
508
|
}
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
|
-
const
|
|
512
|
-
function
|
|
511
|
+
const Ht = 2e4;
|
|
512
|
+
function jn(e) {
|
|
513
513
|
let t = 0;
|
|
514
514
|
const n = 50;
|
|
515
515
|
let s = e.next(t);
|
|
516
|
-
for (; !s.done && t <
|
|
516
|
+
for (; !s.done && t < Ht; )
|
|
517
517
|
t += n, s = e.next(t);
|
|
518
|
-
return t >=
|
|
518
|
+
return t >= Ht ? 1 / 0 : t;
|
|
519
519
|
}
|
|
520
|
-
function
|
|
521
|
-
const s = n({ ...e, keyframes: [0, t] }), i = Math.min(
|
|
520
|
+
function Hn(e, t = 100, n) {
|
|
521
|
+
const s = n({ ...e, keyframes: [0, t] }), i = Math.min(jn(s), Ht);
|
|
522
522
|
return {
|
|
523
523
|
type: "keyframes",
|
|
524
524
|
ease: (r) => s.next(i * r).value / t,
|
|
525
525
|
duration: B(i)
|
|
526
526
|
};
|
|
527
527
|
}
|
|
528
|
-
const
|
|
528
|
+
const dt = (e, t, n) => e + (t - e) * n, pt = (e, t, n) => {
|
|
529
529
|
const s = t - e;
|
|
530
530
|
return s === 0 ? 1 : (n - e) / s;
|
|
531
531
|
};
|
|
532
|
-
function
|
|
532
|
+
function Yn(e, t) {
|
|
533
533
|
const n = e[e.length - 1];
|
|
534
534
|
for (let s = 1; s <= t; s++) {
|
|
535
|
-
const i =
|
|
536
|
-
e.push(
|
|
535
|
+
const i = pt(0, t, s);
|
|
536
|
+
e.push(dt(n, 1, i));
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
|
-
function
|
|
539
|
+
function ue(e) {
|
|
540
540
|
const t = [0];
|
|
541
|
-
return
|
|
541
|
+
return Yn(t, e.length - 1), t;
|
|
542
542
|
}
|
|
543
|
-
const
|
|
543
|
+
const P = (e) => !!(e && e.getVelocity);
|
|
544
544
|
function It(e, t, n) {
|
|
545
545
|
var s;
|
|
546
546
|
if (typeof e == "string") {
|
|
@@ -549,46 +549,46 @@ function It(e, t, n) {
|
|
|
549
549
|
} else e instanceof Element && (e = [e]);
|
|
550
550
|
return Array.from(e || []);
|
|
551
551
|
}
|
|
552
|
-
function
|
|
552
|
+
function ce(e) {
|
|
553
553
|
return typeof e == "object" && !Array.isArray(e);
|
|
554
554
|
}
|
|
555
|
-
function
|
|
556
|
-
return typeof e == "string" &&
|
|
555
|
+
function Xn(e, t, n, s) {
|
|
556
|
+
return typeof e == "string" && ce(t) ? It(e, n, s) : e instanceof NodeList ? Array.from(e) : Array.isArray(e) ? e : [e];
|
|
557
557
|
}
|
|
558
|
-
function
|
|
558
|
+
function mt(e) {
|
|
559
559
|
return typeof e == "function";
|
|
560
560
|
}
|
|
561
561
|
function ze(e, t, n, s) {
|
|
562
562
|
var i;
|
|
563
563
|
return typeof t == "number" ? t : t.startsWith("-") || t.startsWith("+") ? Math.max(0, e + parseFloat(t)) : t === "<" ? n : (i = s.get(t)) !== null && i !== void 0 ? i : e;
|
|
564
564
|
}
|
|
565
|
-
const
|
|
565
|
+
const Di = (e, t, n) => {
|
|
566
566
|
const s = t - e;
|
|
567
567
|
return ((n - e) % s + s) % s + e;
|
|
568
|
-
},
|
|
569
|
-
function
|
|
570
|
-
return
|
|
568
|
+
}, qn = (e) => Array.isArray(e) && typeof e[0] != "number";
|
|
569
|
+
function Bi(e, t) {
|
|
570
|
+
return qn(e) ? e[Di(0, e.length, t)] : e;
|
|
571
571
|
}
|
|
572
|
-
function
|
|
572
|
+
function Ri(e, t, n) {
|
|
573
573
|
for (let s = 0; s < e.length; s++) {
|
|
574
574
|
const i = e[s];
|
|
575
|
-
i.at > t && i.at < n && (
|
|
575
|
+
i.at > t && i.at < n && (_n(e, i), s--);
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
|
-
function
|
|
579
|
-
|
|
578
|
+
function Ii(e, t, n, s, i, r) {
|
|
579
|
+
Ri(e, i, r);
|
|
580
580
|
for (let o = 0; o < t.length; o++)
|
|
581
581
|
e.push({
|
|
582
582
|
value: t[o],
|
|
583
|
-
at:
|
|
584
|
-
easing:
|
|
583
|
+
at: dt(i, r, s[o]),
|
|
584
|
+
easing: Bi(n, o)
|
|
585
585
|
});
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function Li(e, t) {
|
|
588
588
|
return e.at === t.at ? e.value === null ? 1 : t.value === null ? -1 : 0 : e.at - t.at;
|
|
589
589
|
}
|
|
590
|
-
const
|
|
591
|
-
function
|
|
590
|
+
const Ni = "easeInOut";
|
|
591
|
+
function $i(e, { defaultTransition: t = {}, ...n } = {}, s, i) {
|
|
592
592
|
const r = t.duration || 0.3, o = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), l = {}, u = /* @__PURE__ */ new Map();
|
|
593
593
|
let c = 0, f = 0, h = 0;
|
|
594
594
|
for (let p = 0; p < e.length; p++) {
|
|
@@ -604,36 +604,36 @@ function Ki(e, { defaultTransition: t = {}, ...n } = {}, s, i) {
|
|
|
604
604
|
g.at !== void 0 && (f = ze(f, g.at, c, u));
|
|
605
605
|
let y = 0;
|
|
606
606
|
const T = (V, S, A, F = 0, v = 0) => {
|
|
607
|
-
const x =
|
|
607
|
+
const x = Ki(V), { delay: O = 0, times: z = ue(x), type: Nt = "keyframes", ...qs } = S;
|
|
608
608
|
let { ease: Fe = t.ease || "easeOut", duration: L } = S;
|
|
609
|
-
const Oe = typeof O == "function" ? O(F, v) : O, De = x.length, Be =
|
|
609
|
+
const Oe = typeof O == "function" ? O(F, v) : O, De = x.length, Be = mt(Nt) ? Nt : i == null ? void 0 : i[Nt];
|
|
610
610
|
if (De <= 2 && Be) {
|
|
611
611
|
let Ne = 100;
|
|
612
|
-
if (De === 2 &&
|
|
613
|
-
const
|
|
614
|
-
Ne = Math.abs(
|
|
612
|
+
if (De === 2 && _i(x)) {
|
|
613
|
+
const Zs = x[1] - x[0];
|
|
614
|
+
Ne = Math.abs(Zs);
|
|
615
615
|
}
|
|
616
|
-
const $e = { ...
|
|
617
|
-
L !== void 0 && ($e.duration =
|
|
618
|
-
const Ke =
|
|
616
|
+
const $e = { ...qs };
|
|
617
|
+
L !== void 0 && ($e.duration = C(L));
|
|
618
|
+
const Ke = Hn($e, Ne, Be);
|
|
619
619
|
Fe = Ke.ease, L = Ke.duration;
|
|
620
620
|
}
|
|
621
621
|
L ?? (L = r);
|
|
622
622
|
const Re = f + Oe, Ie = Re + L;
|
|
623
623
|
z.length === 1 && z[0] === 0 && (z[1] = 1);
|
|
624
624
|
const Le = z.length - x.length;
|
|
625
|
-
Le > 0 &&
|
|
625
|
+
Le > 0 && Yn(z, Le), x.length === 1 && x.unshift(null), Ii(A, x, Fe, z, Re, Ie), y = Math.max(Oe + L, y), h = Math.max(Ie, h);
|
|
626
626
|
};
|
|
627
|
-
if (
|
|
628
|
-
const V =
|
|
629
|
-
T(b, g,
|
|
627
|
+
if (P(w)) {
|
|
628
|
+
const V = Ue(w, a);
|
|
629
|
+
T(b, g, je("default", V));
|
|
630
630
|
} else {
|
|
631
|
-
const V =
|
|
631
|
+
const V = Xn(w, b, s, l), S = V.length;
|
|
632
632
|
for (let A = 0; A < S; A++) {
|
|
633
633
|
b = b, g = g;
|
|
634
|
-
const F = V[A], v =
|
|
634
|
+
const F = V[A], v = Ue(F, a);
|
|
635
635
|
for (const x in b)
|
|
636
|
-
T(b[x],
|
|
636
|
+
T(b[x], Wi(g, x), je(x, v), A, S);
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
639
|
c = f, f += y;
|
|
@@ -641,13 +641,13 @@ function Ki(e, { defaultTransition: t = {}, ...n } = {}, s, i) {
|
|
|
641
641
|
return a.forEach((p, m) => {
|
|
642
642
|
for (const w in p) {
|
|
643
643
|
const b = p[w];
|
|
644
|
-
b.sort(
|
|
644
|
+
b.sort(Li);
|
|
645
645
|
const g = [], y = [], T = [];
|
|
646
646
|
for (let S = 0; S < b.length; S++) {
|
|
647
647
|
const { at: A, value: F, easing: v } = b[S];
|
|
648
|
-
g.push(F), y.push(
|
|
648
|
+
g.push(F), y.push(pt(0, h, A)), T.push(v || "easeOut");
|
|
649
649
|
}
|
|
650
|
-
y[0] !== 0 && (y.unshift(0), g.unshift(g[0]), T.unshift(
|
|
650
|
+
y[0] !== 0 && (y.unshift(0), g.unshift(g[0]), T.unshift(Ni)), y[y.length - 1] !== 1 && (y.push(1), g.push(null)), o.has(m) || o.set(m, {
|
|
651
651
|
keyframes: {},
|
|
652
652
|
transition: {}
|
|
653
653
|
});
|
|
@@ -662,22 +662,22 @@ function Ki(e, { defaultTransition: t = {}, ...n } = {}, s, i) {
|
|
|
662
662
|
}
|
|
663
663
|
}), o;
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function Ue(e, t) {
|
|
666
666
|
return !t.has(e) && t.set(e, {}), t.get(e);
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function je(e, t) {
|
|
669
669
|
return t[e] || (t[e] = []), t[e];
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function Ki(e) {
|
|
672
672
|
return Array.isArray(e) ? e : [e];
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function Wi(e, t) {
|
|
675
675
|
return e && e[t] ? {
|
|
676
676
|
...e,
|
|
677
677
|
...e[t]
|
|
678
678
|
} : { ...e };
|
|
679
679
|
}
|
|
680
|
-
const
|
|
680
|
+
const ki = (e) => typeof e == "number", _i = (e) => e.every(ki), $ = /* @__PURE__ */ new WeakMap(), gt = [
|
|
681
681
|
"transformPerspective",
|
|
682
682
|
"x",
|
|
683
683
|
"y",
|
|
@@ -695,12 +695,12 @@ const Gi = (e) => typeof e == "number", ki = (e) => e.every(Gi), $ = /* @__PURE_
|
|
|
695
695
|
"skew",
|
|
696
696
|
"skewX",
|
|
697
697
|
"skewY"
|
|
698
|
-
],
|
|
698
|
+
], X = new Set(gt), Gi = {
|
|
699
699
|
type: "spring",
|
|
700
700
|
stiffness: 500,
|
|
701
701
|
damping: 25,
|
|
702
702
|
restSpeed: 10
|
|
703
|
-
},
|
|
703
|
+
}, zi = (e) => ({
|
|
704
704
|
type: "spring",
|
|
705
705
|
stiffness: 550,
|
|
706
706
|
damping: e === 0 ? 2 * Math.sqrt(550) : 30,
|
|
@@ -708,80 +708,80 @@ const Gi = (e) => typeof e == "number", ki = (e) => e.every(Gi), $ = /* @__PURE_
|
|
|
708
708
|
}), Ui = {
|
|
709
709
|
type: "keyframes",
|
|
710
710
|
duration: 0.8
|
|
711
|
-
},
|
|
711
|
+
}, ji = {
|
|
712
712
|
type: "keyframes",
|
|
713
713
|
ease: [0.25, 0.1, 0.35, 1],
|
|
714
714
|
duration: 0.3
|
|
715
|
-
},
|
|
716
|
-
function
|
|
715
|
+
}, Hi = (e, { keyframes: t }) => t.length > 2 ? Ui : X.has(e) ? e.startsWith("scale") ? zi(t[1]) : Gi : ji;
|
|
716
|
+
function fe(e, t) {
|
|
717
717
|
return e ? e[t] || e.default || e : void 0;
|
|
718
718
|
}
|
|
719
|
-
const
|
|
720
|
-
function
|
|
721
|
-
const i = e.filter(
|
|
719
|
+
const Yi = (e) => e !== null;
|
|
720
|
+
function yt(e, { repeat: t, repeatType: n = "loop" }, s) {
|
|
721
|
+
const i = e.filter(Yi), r = t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
|
|
722
722
|
return !r || s === void 0 ? i[r] : s;
|
|
723
723
|
}
|
|
724
|
-
const
|
|
725
|
-
function
|
|
724
|
+
const Zn = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, Xi = 1e-7, qi = 12;
|
|
725
|
+
function Zi(e, t, n, s, i) {
|
|
726
726
|
let r, o, a = 0;
|
|
727
727
|
do
|
|
728
|
-
o = t + (n - t) / 2, r =
|
|
729
|
-
while (Math.abs(r) > Xi && ++a <
|
|
728
|
+
o = t + (n - t) / 2, r = Zn(o, s, i) - e, r > 0 ? n = o : t = o;
|
|
729
|
+
while (Math.abs(r) > Xi && ++a < qi);
|
|
730
730
|
return o;
|
|
731
731
|
}
|
|
732
|
-
function
|
|
732
|
+
function vt(e, t, n, s) {
|
|
733
733
|
if (e === t && n === s)
|
|
734
734
|
return K;
|
|
735
|
-
const i = (r) =>
|
|
736
|
-
return (r) => r === 0 || r === 1 ? r :
|
|
735
|
+
const i = (r) => Zi(r, 0, 1, e, n);
|
|
736
|
+
return (r) => r === 0 || r === 1 ? r : Zn(i(r), t, s);
|
|
737
737
|
}
|
|
738
|
-
const
|
|
739
|
-
function
|
|
740
|
-
return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" ||
|
|
738
|
+
const Jn = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Qn = (e) => (t) => 1 - e(1 - t), ts = /* @__PURE__ */ vt(0.33, 1.53, 0.69, 0.99), he = /* @__PURE__ */ Qn(ts), es = /* @__PURE__ */ Jn(he), ns = (e) => (e *= 2) < 1 ? 0.5 * he(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), de = (e) => 1 - Math.sin(Math.acos(e)), Ji = Qn(de), ss = Jn(de), is = (e) => /^0[^.\s]+$/u.test(e);
|
|
739
|
+
function Qi(e) {
|
|
740
|
+
return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || is(e) : !0;
|
|
741
741
|
}
|
|
742
|
-
const
|
|
742
|
+
const rs = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e), os = (e) => (t) => typeof t == "string" && t.startsWith(e), as = /* @__PURE__ */ os("--"), tr = /* @__PURE__ */ os("var(--"), pe = (e) => tr(e) ? er.test(e.split("/*")[0].trim()) : !1, er = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, nr = (
|
|
743
743
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
744
744
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
745
745
|
);
|
|
746
|
-
function
|
|
747
|
-
const t =
|
|
746
|
+
function sr(e) {
|
|
747
|
+
const t = nr.exec(e);
|
|
748
748
|
if (!t)
|
|
749
749
|
return [,];
|
|
750
750
|
const [, n, s, i] = t;
|
|
751
751
|
return [`--${n ?? s}`, i];
|
|
752
752
|
}
|
|
753
|
-
const
|
|
754
|
-
function
|
|
755
|
-
I(n <=
|
|
756
|
-
const [s, i] =
|
|
753
|
+
const ir = 4;
|
|
754
|
+
function ls(e, t, n = 1) {
|
|
755
|
+
I(n <= ir, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);
|
|
756
|
+
const [s, i] = sr(e);
|
|
757
757
|
if (!s)
|
|
758
758
|
return;
|
|
759
759
|
const r = window.getComputedStyle(t).getPropertyValue(s);
|
|
760
760
|
if (r) {
|
|
761
761
|
const o = r.trim();
|
|
762
|
-
return
|
|
762
|
+
return rs(o) ? parseFloat(o) : o;
|
|
763
763
|
}
|
|
764
|
-
return
|
|
764
|
+
return pe(i) ? ls(i, t, n + 1) : i;
|
|
765
765
|
}
|
|
766
|
-
const
|
|
766
|
+
const tt = {
|
|
767
767
|
test: (e) => typeof e == "number",
|
|
768
768
|
parse: parseFloat,
|
|
769
769
|
transform: (e) => e
|
|
770
|
-
},
|
|
771
|
-
...
|
|
770
|
+
}, lt = {
|
|
771
|
+
...tt,
|
|
772
772
|
transform: (e) => H(0, 1, e)
|
|
773
|
-
},
|
|
774
|
-
...
|
|
773
|
+
}, wt = {
|
|
774
|
+
...tt,
|
|
775
775
|
default: 1
|
|
776
|
-
},
|
|
776
|
+
}, bt = (e) => ({
|
|
777
777
|
test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
|
|
778
778
|
parse: parseFloat,
|
|
779
779
|
transform: (t) => `${t}${e}`
|
|
780
|
-
}), W = /* @__PURE__ */
|
|
781
|
-
...
|
|
782
|
-
parse: (e) =>
|
|
783
|
-
transform: (e) =>
|
|
784
|
-
},
|
|
780
|
+
}), W = /* @__PURE__ */ bt("deg"), Z = /* @__PURE__ */ bt("%"), d = /* @__PURE__ */ bt("px"), rr = /* @__PURE__ */ bt("vh"), or = /* @__PURE__ */ bt("vw"), He = {
|
|
781
|
+
...Z,
|
|
782
|
+
parse: (e) => Z.parse(e) / 100,
|
|
783
|
+
transform: (e) => Z.transform(e * 100)
|
|
784
|
+
}, ar = /* @__PURE__ */ new Set([
|
|
785
785
|
"width",
|
|
786
786
|
"height",
|
|
787
787
|
"top",
|
|
@@ -792,25 +792,25 @@ const Q = {
|
|
|
792
792
|
"y",
|
|
793
793
|
"translateX",
|
|
794
794
|
"translateY"
|
|
795
|
-
]), Ye = (e) => e ===
|
|
795
|
+
]), Ye = (e) => e === tt || e === d, Xe = (e, t) => parseFloat(e.split(", ")[t]), qe = (e, t) => (n, { transform: s }) => {
|
|
796
796
|
if (s === "none" || !s)
|
|
797
797
|
return 0;
|
|
798
798
|
const i = s.match(/^matrix3d\((.+)\)$/u);
|
|
799
799
|
if (i)
|
|
800
|
-
return
|
|
800
|
+
return Xe(i[1], t);
|
|
801
801
|
{
|
|
802
802
|
const r = s.match(/^matrix\((.+)\)$/u);
|
|
803
|
-
return r ?
|
|
803
|
+
return r ? Xe(r[1], e) : 0;
|
|
804
804
|
}
|
|
805
|
-
},
|
|
806
|
-
function
|
|
805
|
+
}, lr = /* @__PURE__ */ new Set(["x", "y", "z"]), ur = gt.filter((e) => !lr.has(e));
|
|
806
|
+
function cr(e) {
|
|
807
807
|
const t = [];
|
|
808
|
-
return
|
|
808
|
+
return ur.forEach((n) => {
|
|
809
809
|
const s = e.getValue(n);
|
|
810
810
|
s !== void 0 && (t.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
811
811
|
}), t;
|
|
812
812
|
}
|
|
813
|
-
const
|
|
813
|
+
const Q = {
|
|
814
814
|
// Dimensions
|
|
815
815
|
width: ({ x: e }, { paddingLeft: t = "0", paddingRight: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
|
|
816
816
|
height: ({ y: e }, { paddingTop: t = "0", paddingBottom: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
|
|
@@ -819,21 +819,21 @@ const J = {
|
|
|
819
819
|
bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
|
|
820
820
|
right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
|
|
821
821
|
// Transform
|
|
822
|
-
x:
|
|
823
|
-
y:
|
|
822
|
+
x: qe(4, 13),
|
|
823
|
+
y: qe(5, 14)
|
|
824
824
|
};
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
const
|
|
825
|
+
Q.translateX = Q.x;
|
|
826
|
+
Q.translateY = Q.y;
|
|
827
|
+
const us = (e) => (t) => t.test(e), fr = {
|
|
828
828
|
test: (e) => e === "auto",
|
|
829
829
|
parse: (e) => e
|
|
830
|
-
},
|
|
831
|
-
let
|
|
832
|
-
function
|
|
833
|
-
if (
|
|
834
|
-
const e = Array.from(
|
|
830
|
+
}, cs = [tt, d, Z, W, or, rr, fr], Ze = (e) => cs.find(us(e)), j = /* @__PURE__ */ new Set();
|
|
831
|
+
let Yt = !1, Xt = !1;
|
|
832
|
+
function fs() {
|
|
833
|
+
if (Xt) {
|
|
834
|
+
const e = Array.from(j).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
835
835
|
t.forEach((s) => {
|
|
836
|
-
const i =
|
|
836
|
+
const i = cr(s);
|
|
837
837
|
i.length && (n.set(s, i), s.render());
|
|
838
838
|
}), e.forEach((s) => s.measureInitialState()), t.forEach((s) => {
|
|
839
839
|
s.render();
|
|
@@ -846,22 +846,22 @@ function ps() {
|
|
|
846
846
|
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
847
847
|
});
|
|
848
848
|
}
|
|
849
|
-
|
|
849
|
+
Xt = !1, Yt = !1, j.forEach((e) => e.complete()), j.clear();
|
|
850
850
|
}
|
|
851
|
-
function
|
|
852
|
-
|
|
853
|
-
e.readKeyframes(), e.needsMeasurement && (
|
|
851
|
+
function hs() {
|
|
852
|
+
j.forEach((e) => {
|
|
853
|
+
e.readKeyframes(), e.needsMeasurement && (Xt = !0);
|
|
854
854
|
});
|
|
855
855
|
}
|
|
856
|
-
function
|
|
857
|
-
|
|
856
|
+
function hr() {
|
|
857
|
+
hs(), fs();
|
|
858
858
|
}
|
|
859
|
-
class
|
|
859
|
+
class me {
|
|
860
860
|
constructor(t, n, s, i, r, o = !1) {
|
|
861
861
|
this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = o;
|
|
862
862
|
}
|
|
863
863
|
scheduleResolve() {
|
|
864
|
-
this.isScheduled = !0, this.isAsync ? (
|
|
864
|
+
this.isScheduled = !0, this.isAsync ? (j.add(this), Yt || (Yt = !0, M.read(hs), M.resolveKeyframes(fs))) : (this.readKeyframes(), this.complete());
|
|
865
865
|
}
|
|
866
866
|
readKeyframes() {
|
|
867
867
|
const { unresolvedKeyframes: t, name: n, element: s, motionValue: i } = this;
|
|
@@ -888,38 +888,38 @@ class pe {
|
|
|
888
888
|
measureEndState() {
|
|
889
889
|
}
|
|
890
890
|
complete() {
|
|
891
|
-
this.isComplete = !0, this.onComplete(this.unresolvedKeyframes, this.finalKeyframe),
|
|
891
|
+
this.isComplete = !0, this.onComplete(this.unresolvedKeyframes, this.finalKeyframe), j.delete(this);
|
|
892
892
|
}
|
|
893
893
|
cancel() {
|
|
894
|
-
this.isComplete || (this.isScheduled = !1,
|
|
894
|
+
this.isComplete || (this.isScheduled = !1, j.delete(this));
|
|
895
895
|
}
|
|
896
896
|
resume() {
|
|
897
897
|
this.isComplete || this.scheduleResolve();
|
|
898
898
|
}
|
|
899
899
|
}
|
|
900
|
-
const
|
|
901
|
-
function
|
|
900
|
+
const rt = (e) => Math.round(e * 1e5) / 1e5, ge = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
901
|
+
function dr(e) {
|
|
902
902
|
return e == null;
|
|
903
903
|
}
|
|
904
|
-
const
|
|
904
|
+
const pr = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, ye = (e, t) => (n) => !!(typeof n == "string" && pr.test(n) && n.startsWith(e) || t && !dr(n) && Object.prototype.hasOwnProperty.call(n, t)), ds = (e, t, n) => (s) => {
|
|
905
905
|
if (typeof s != "string")
|
|
906
906
|
return s;
|
|
907
|
-
const [i, r, o, a] = s.match(
|
|
907
|
+
const [i, r, o, a] = s.match(ge);
|
|
908
908
|
return {
|
|
909
909
|
[e]: parseFloat(i),
|
|
910
910
|
[t]: parseFloat(r),
|
|
911
911
|
[n]: parseFloat(o),
|
|
912
912
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
913
913
|
};
|
|
914
|
-
},
|
|
915
|
-
...
|
|
916
|
-
transform: (e) => Math.round(
|
|
917
|
-
},
|
|
918
|
-
test: /* @__PURE__ */
|
|
919
|
-
parse: /* @__PURE__ */
|
|
920
|
-
transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Wt.transform(e) + ", " + Wt.transform(t) + ", " + Wt.transform(n) + ", " +
|
|
914
|
+
}, mr = (e) => H(0, 255, e), Wt = {
|
|
915
|
+
...tt,
|
|
916
|
+
transform: (e) => Math.round(mr(e))
|
|
917
|
+
}, U = {
|
|
918
|
+
test: /* @__PURE__ */ ye("rgb", "red"),
|
|
919
|
+
parse: /* @__PURE__ */ ds("red", "green", "blue"),
|
|
920
|
+
transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Wt.transform(e) + ", " + Wt.transform(t) + ", " + Wt.transform(n) + ", " + rt(lt.transform(s)) + ")"
|
|
921
921
|
};
|
|
922
|
-
function
|
|
922
|
+
function gr(e) {
|
|
923
923
|
let t = "", n = "", s = "", i = "";
|
|
924
924
|
return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), s = e.substring(5, 7), i = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), s = e.substring(3, 4), i = e.substring(4, 5), t += t, n += n, s += s, i += i), {
|
|
925
925
|
red: parseInt(t, 16),
|
|
@@ -929,77 +929,77 @@ function yr(e) {
|
|
|
929
929
|
};
|
|
930
930
|
}
|
|
931
931
|
const qt = {
|
|
932
|
-
test: /* @__PURE__ */
|
|
933
|
-
parse:
|
|
934
|
-
transform:
|
|
932
|
+
test: /* @__PURE__ */ ye("#"),
|
|
933
|
+
parse: gr,
|
|
934
|
+
transform: U.transform
|
|
935
935
|
}, q = {
|
|
936
|
-
test: /* @__PURE__ */
|
|
937
|
-
parse: /* @__PURE__ */
|
|
938
|
-
transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " +
|
|
939
|
-
},
|
|
940
|
-
test: (e) =>
|
|
941
|
-
parse: (e) =>
|
|
942
|
-
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ?
|
|
943
|
-
},
|
|
944
|
-
function
|
|
936
|
+
test: /* @__PURE__ */ ye("hsl", "hue"),
|
|
937
|
+
parse: /* @__PURE__ */ ds("hue", "saturation", "lightness"),
|
|
938
|
+
transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + Z.transform(rt(t)) + ", " + Z.transform(rt(n)) + ", " + rt(lt.transform(s)) + ")"
|
|
939
|
+
}, E = {
|
|
940
|
+
test: (e) => U.test(e) || qt.test(e) || q.test(e),
|
|
941
|
+
parse: (e) => U.test(e) ? U.parse(e) : q.test(e) ? q.parse(e) : qt.parse(e),
|
|
942
|
+
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? U.transform(e) : q.transform(e)
|
|
943
|
+
}, yr = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
944
|
+
function vr(e) {
|
|
945
945
|
var t, n;
|
|
946
|
-
return isNaN(e) && typeof e == "string" && (((t = e.match(
|
|
946
|
+
return isNaN(e) && typeof e == "string" && (((t = e.match(ge)) === null || t === void 0 ? void 0 : t.length) || 0) + (((n = e.match(yr)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
|
|
947
947
|
}
|
|
948
|
-
const
|
|
949
|
-
function
|
|
948
|
+
const ps = "number", ms = "color", br = "var", wr = "var(", Je = "${}", Sr = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
949
|
+
function ut(e) {
|
|
950
950
|
const t = e.toString(), n = [], s = {
|
|
951
951
|
color: [],
|
|
952
952
|
number: [],
|
|
953
953
|
var: []
|
|
954
954
|
}, i = [];
|
|
955
955
|
let r = 0;
|
|
956
|
-
const a = t.replace(
|
|
956
|
+
const a = t.replace(Sr, (l) => (E.test(l) ? (s.color.push(r), i.push(ms), n.push(E.parse(l))) : l.startsWith(wr) ? (s.var.push(r), i.push(br), n.push(l)) : (s.number.push(r), i.push(ps), n.push(parseFloat(l))), ++r, Je)).split(Je);
|
|
957
957
|
return { values: n, split: a, indexes: s, types: i };
|
|
958
958
|
}
|
|
959
|
-
function
|
|
960
|
-
return
|
|
959
|
+
function gs(e) {
|
|
960
|
+
return ut(e).values;
|
|
961
961
|
}
|
|
962
|
-
function
|
|
963
|
-
const { split: t, types: n } =
|
|
962
|
+
function ys(e) {
|
|
963
|
+
const { split: t, types: n } = ut(e), s = t.length;
|
|
964
964
|
return (i) => {
|
|
965
965
|
let r = "";
|
|
966
966
|
for (let o = 0; o < s; o++)
|
|
967
967
|
if (r += t[o], i[o] !== void 0) {
|
|
968
968
|
const a = n[o];
|
|
969
|
-
a ===
|
|
969
|
+
a === ps ? r += rt(i[o]) : a === ms ? r += E.transform(i[o]) : r += i[o];
|
|
970
970
|
}
|
|
971
971
|
return r;
|
|
972
972
|
};
|
|
973
973
|
}
|
|
974
|
-
const
|
|
975
|
-
function
|
|
976
|
-
const t =
|
|
977
|
-
return
|
|
978
|
-
}
|
|
979
|
-
const
|
|
980
|
-
test:
|
|
981
|
-
parse:
|
|
982
|
-
createTransformer:
|
|
983
|
-
getAnimatableNone:
|
|
984
|
-
},
|
|
985
|
-
function
|
|
974
|
+
const Tr = (e) => typeof e == "number" ? 0 : e;
|
|
975
|
+
function Vr(e) {
|
|
976
|
+
const t = gs(e);
|
|
977
|
+
return ys(e)(t.map(Tr));
|
|
978
|
+
}
|
|
979
|
+
const et = {
|
|
980
|
+
test: vr,
|
|
981
|
+
parse: gs,
|
|
982
|
+
createTransformer: ys,
|
|
983
|
+
getAnimatableNone: Vr
|
|
984
|
+
}, xr = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
985
|
+
function Ar(e) {
|
|
986
986
|
const [t, n] = e.slice(0, -1).split("(");
|
|
987
987
|
if (t === "drop-shadow")
|
|
988
988
|
return e;
|
|
989
|
-
const [s] = n.match(
|
|
989
|
+
const [s] = n.match(ge) || [];
|
|
990
990
|
if (!s)
|
|
991
991
|
return e;
|
|
992
992
|
const i = n.replace(s, "");
|
|
993
|
-
let r =
|
|
993
|
+
let r = xr.has(t) ? 1 : 0;
|
|
994
994
|
return s !== n && (r *= 100), t + "(" + r + i + ")";
|
|
995
995
|
}
|
|
996
|
-
const Mr = /\b([a-z-]*)\(.*?\)/gu,
|
|
997
|
-
...
|
|
996
|
+
const Mr = /\b([a-z-]*)\(.*?\)/gu, Zt = {
|
|
997
|
+
...et,
|
|
998
998
|
getAnimatableNone: (e) => {
|
|
999
999
|
const t = e.match(Mr);
|
|
1000
|
-
return t ? t.map(
|
|
1000
|
+
return t ? t.map(Ar).join(" ") : e;
|
|
1001
1001
|
}
|
|
1002
|
-
},
|
|
1002
|
+
}, Jt = {
|
|
1003
1003
|
// Border props
|
|
1004
1004
|
borderWidth: d,
|
|
1005
1005
|
borderTopWidth: d,
|
|
@@ -1035,15 +1035,15 @@ const Mr = /\b([a-z-]*)\(.*?\)/gu, Xt = {
|
|
|
1035
1035
|
// Misc
|
|
1036
1036
|
backgroundPositionX: d,
|
|
1037
1037
|
backgroundPositionY: d
|
|
1038
|
-
},
|
|
1038
|
+
}, Er = {
|
|
1039
1039
|
rotate: W,
|
|
1040
1040
|
rotateX: W,
|
|
1041
1041
|
rotateY: W,
|
|
1042
1042
|
rotateZ: W,
|
|
1043
|
-
scale:
|
|
1044
|
-
scaleX:
|
|
1045
|
-
scaleY:
|
|
1046
|
-
scaleZ:
|
|
1043
|
+
scale: wt,
|
|
1044
|
+
scaleX: wt,
|
|
1045
|
+
scaleY: wt,
|
|
1046
|
+
scaleZ: wt,
|
|
1047
1047
|
skew: W,
|
|
1048
1048
|
skewX: W,
|
|
1049
1049
|
skewY: W,
|
|
@@ -1056,55 +1056,55 @@ const Mr = /\b([a-z-]*)\(.*?\)/gu, Xt = {
|
|
|
1056
1056
|
z: d,
|
|
1057
1057
|
perspective: d,
|
|
1058
1058
|
transformPerspective: d,
|
|
1059
|
-
opacity:
|
|
1059
|
+
opacity: lt,
|
|
1060
1060
|
originX: He,
|
|
1061
1061
|
originY: He,
|
|
1062
1062
|
originZ: d
|
|
1063
1063
|
}, Qe = {
|
|
1064
|
-
...
|
|
1064
|
+
...tt,
|
|
1065
1065
|
transform: Math.round
|
|
1066
|
-
},
|
|
1067
|
-
...
|
|
1068
|
-
...
|
|
1066
|
+
}, ve = {
|
|
1067
|
+
...Jt,
|
|
1068
|
+
...Er,
|
|
1069
1069
|
zIndex: Qe,
|
|
1070
1070
|
size: d,
|
|
1071
1071
|
// SVG
|
|
1072
|
-
fillOpacity:
|
|
1073
|
-
strokeOpacity:
|
|
1072
|
+
fillOpacity: lt,
|
|
1073
|
+
strokeOpacity: lt,
|
|
1074
1074
|
numOctaves: Qe
|
|
1075
1075
|
}, Pr = {
|
|
1076
|
-
...
|
|
1076
|
+
...ve,
|
|
1077
1077
|
// Color props
|
|
1078
|
-
color:
|
|
1079
|
-
backgroundColor:
|
|
1080
|
-
outlineColor:
|
|
1081
|
-
fill:
|
|
1082
|
-
stroke:
|
|
1078
|
+
color: E,
|
|
1079
|
+
backgroundColor: E,
|
|
1080
|
+
outlineColor: E,
|
|
1081
|
+
fill: E,
|
|
1082
|
+
stroke: E,
|
|
1083
1083
|
// Border props
|
|
1084
|
-
borderColor:
|
|
1085
|
-
borderTopColor:
|
|
1086
|
-
borderRightColor:
|
|
1087
|
-
borderBottomColor:
|
|
1088
|
-
borderLeftColor:
|
|
1089
|
-
filter:
|
|
1090
|
-
WebkitFilter:
|
|
1091
|
-
},
|
|
1092
|
-
function
|
|
1093
|
-
let n =
|
|
1094
|
-
return n !==
|
|
1095
|
-
}
|
|
1096
|
-
const
|
|
1097
|
-
function
|
|
1084
|
+
borderColor: E,
|
|
1085
|
+
borderTopColor: E,
|
|
1086
|
+
borderRightColor: E,
|
|
1087
|
+
borderBottomColor: E,
|
|
1088
|
+
borderLeftColor: E,
|
|
1089
|
+
filter: Zt,
|
|
1090
|
+
WebkitFilter: Zt
|
|
1091
|
+
}, be = (e) => Pr[e];
|
|
1092
|
+
function vs(e, t) {
|
|
1093
|
+
let n = be(e);
|
|
1094
|
+
return n !== Zt && (n = et), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
|
|
1095
|
+
}
|
|
1096
|
+
const Cr = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
1097
|
+
function Fr(e, t, n) {
|
|
1098
1098
|
let s = 0, i;
|
|
1099
1099
|
for (; s < e.length && !i; ) {
|
|
1100
1100
|
const r = e[s];
|
|
1101
|
-
typeof r == "string" && !
|
|
1101
|
+
typeof r == "string" && !Cr.has(r) && ut(r).values.length && (i = e[s]), s++;
|
|
1102
1102
|
}
|
|
1103
1103
|
if (i && n)
|
|
1104
1104
|
for (const r of t)
|
|
1105
|
-
e[r] =
|
|
1105
|
+
e[r] = vs(n, i);
|
|
1106
1106
|
}
|
|
1107
|
-
class
|
|
1107
|
+
class bs extends me {
|
|
1108
1108
|
constructor(t, n, s, i, r) {
|
|
1109
1109
|
super(t, n, s, i, r, !0);
|
|
1110
1110
|
}
|
|
@@ -1115,12 +1115,12 @@ class Ts extends pe {
|
|
|
1115
1115
|
super.readKeyframes();
|
|
1116
1116
|
for (let l = 0; l < t.length; l++) {
|
|
1117
1117
|
let u = t[l];
|
|
1118
|
-
if (typeof u == "string" && (u = u.trim(),
|
|
1119
|
-
const c =
|
|
1118
|
+
if (typeof u == "string" && (u = u.trim(), pe(u))) {
|
|
1119
|
+
const c = ls(u, n.current);
|
|
1120
1120
|
c !== void 0 && (t[l] = c), l === t.length - 1 && (this.finalKeyframe = u);
|
|
1121
1121
|
}
|
|
1122
1122
|
}
|
|
1123
|
-
if (this.resolveNoneKeyframes(), !
|
|
1123
|
+
if (this.resolveNoneKeyframes(), !ar.has(s) || t.length !== 2)
|
|
1124
1124
|
return;
|
|
1125
1125
|
const [i, r] = t, o = Ze(i), a = Ze(r);
|
|
1126
1126
|
if (o !== a)
|
|
@@ -1135,14 +1135,14 @@ class Ts extends pe {
|
|
|
1135
1135
|
resolveNoneKeyframes() {
|
|
1136
1136
|
const { unresolvedKeyframes: t, name: n } = this, s = [];
|
|
1137
1137
|
for (let i = 0; i < t.length; i++)
|
|
1138
|
-
|
|
1139
|
-
s.length &&
|
|
1138
|
+
Qi(t[i]) && s.push(i);
|
|
1139
|
+
s.length && Fr(t, s, n);
|
|
1140
1140
|
}
|
|
1141
1141
|
measureInitialState() {
|
|
1142
1142
|
const { element: t, unresolvedKeyframes: n, name: s } = this;
|
|
1143
1143
|
if (!t || !t.current)
|
|
1144
1144
|
return;
|
|
1145
|
-
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin =
|
|
1145
|
+
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = Q[s](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
|
|
1146
1146
|
const i = n[n.length - 1];
|
|
1147
1147
|
i !== void 0 && t.getValue(s, i).jump(i, !1);
|
|
1148
1148
|
}
|
|
@@ -1154,15 +1154,15 @@ class Ts extends pe {
|
|
|
1154
1154
|
const r = n.getValue(s);
|
|
1155
1155
|
r && r.jump(this.measuredOrigin, !1);
|
|
1156
1156
|
const o = i.length - 1, a = i[o];
|
|
1157
|
-
i[o] =
|
|
1157
|
+
i[o] = Q[s](n.measureViewportBox(), window.getComputedStyle(n.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), !((t = this.removedTransforms) === null || t === void 0) && t.length && this.removedTransforms.forEach(([l, u]) => {
|
|
1158
1158
|
n.getValue(l).set(u);
|
|
1159
1159
|
}), this.resolveNoneKeyframes();
|
|
1160
1160
|
}
|
|
1161
1161
|
}
|
|
1162
1162
|
const tn = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
1163
|
-
(
|
|
1163
|
+
(et.test(e) || e === "0") && // And it contains numbers and/or colors
|
|
1164
1164
|
!e.startsWith("url("));
|
|
1165
|
-
function
|
|
1165
|
+
function Or(e) {
|
|
1166
1166
|
const t = e[0];
|
|
1167
1167
|
if (e.length === 1)
|
|
1168
1168
|
return !0;
|
|
@@ -1170,17 +1170,17 @@ function Dr(e) {
|
|
|
1170
1170
|
if (e[n] !== t)
|
|
1171
1171
|
return !0;
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1173
|
+
function Dr(e, t, n, s) {
|
|
1174
1174
|
const i = e[0];
|
|
1175
1175
|
if (i === null)
|
|
1176
1176
|
return !1;
|
|
1177
1177
|
if (t === "display" || t === "visibility")
|
|
1178
1178
|
return !0;
|
|
1179
1179
|
const r = e[e.length - 1], o = tn(i, t), a = tn(r, t);
|
|
1180
|
-
return
|
|
1180
|
+
return ht(o === a, `You are trying to animate ${t} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`), !o || !a ? !1 : Or(e) || (n === "spring" || mt(n)) && s;
|
|
1181
1181
|
}
|
|
1182
|
-
const
|
|
1183
|
-
class
|
|
1182
|
+
const Br = 40;
|
|
1183
|
+
class ws {
|
|
1184
1184
|
constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", ...a }) {
|
|
1185
1185
|
this.isStopped = !1, this.hasAttemptedResolve = !1, this.createdAt = N.now(), this.options = {
|
|
1186
1186
|
autoplay: t,
|
|
@@ -1203,7 +1203,7 @@ class Vs {
|
|
|
1203
1203
|
* to avoid a sudden jump into the animation.
|
|
1204
1204
|
*/
|
|
1205
1205
|
calcStartTime() {
|
|
1206
|
-
return this.resolvedAt ? this.resolvedAt - this.createdAt >
|
|
1206
|
+
return this.resolvedAt ? this.resolvedAt - this.createdAt > Br ? this.resolvedAt : this.createdAt : this.createdAt;
|
|
1207
1207
|
}
|
|
1208
1208
|
/**
|
|
1209
1209
|
* A getter for resolved data. If keyframes are not yet resolved, accessing
|
|
@@ -1211,7 +1211,7 @@ class Vs {
|
|
|
1211
1211
|
* This is a deoptimisation, but at its worst still batches read/writes.
|
|
1212
1212
|
*/
|
|
1213
1213
|
get resolved() {
|
|
1214
|
-
return !this._resolved && !this.hasAttemptedResolve &&
|
|
1214
|
+
return !this._resolved && !this.hasAttemptedResolve && hr(), this._resolved;
|
|
1215
1215
|
}
|
|
1216
1216
|
/**
|
|
1217
1217
|
* A method to be called when the keyframes resolver completes. This method
|
|
@@ -1221,11 +1221,11 @@ class Vs {
|
|
|
1221
1221
|
onKeyframesResolved(t, n) {
|
|
1222
1222
|
this.resolvedAt = N.now(), this.hasAttemptedResolve = !0;
|
|
1223
1223
|
const { name: s, type: i, velocity: r, delay: o, onComplete: a, onUpdate: l, isGenerator: u } = this.options;
|
|
1224
|
-
if (!u && !
|
|
1224
|
+
if (!u && !Dr(t, s, i, r))
|
|
1225
1225
|
if (o)
|
|
1226
1226
|
this.options.duration = 0;
|
|
1227
1227
|
else {
|
|
1228
|
-
l == null || l(
|
|
1228
|
+
l == null || l(yt(t, this.options, n)), a == null || a(), this.resolveFinishedPromise();
|
|
1229
1229
|
return;
|
|
1230
1230
|
}
|
|
1231
1231
|
const c = this.initPlayback(t, n);
|
|
@@ -1265,9 +1265,9 @@ function en({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
1265
1265
|
};
|
|
1266
1266
|
let S, A;
|
|
1267
1267
|
const F = (v) => {
|
|
1268
|
-
p(h.value) && (S = v, A =
|
|
1268
|
+
p(h.value) && (S = v, A = le({
|
|
1269
1269
|
keyframes: [h.value, m(h.value)],
|
|
1270
|
-
velocity:
|
|
1270
|
+
velocity: Un(T, v, h.value),
|
|
1271
1271
|
// TODO: This should be passing * 1000
|
|
1272
1272
|
damping: i,
|
|
1273
1273
|
stiffness: r,
|
|
@@ -1283,38 +1283,38 @@ function en({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
1283
1283
|
}
|
|
1284
1284
|
};
|
|
1285
1285
|
}
|
|
1286
|
-
const
|
|
1286
|
+
const Rr = /* @__PURE__ */ vt(0.42, 0, 1, 1), Ir = /* @__PURE__ */ vt(0, 0, 0.58, 1), Ss = /* @__PURE__ */ vt(0.42, 0, 0.58, 1), we = (e) => Array.isArray(e) && typeof e[0] == "number", nn = {
|
|
1287
1287
|
linear: K,
|
|
1288
|
-
easeIn:
|
|
1289
|
-
easeInOut:
|
|
1290
|
-
easeOut:
|
|
1291
|
-
circIn:
|
|
1292
|
-
circInOut:
|
|
1293
|
-
circOut:
|
|
1294
|
-
backIn:
|
|
1295
|
-
backInOut:
|
|
1296
|
-
backOut:
|
|
1297
|
-
anticipate:
|
|
1298
|
-
},
|
|
1299
|
-
if (
|
|
1288
|
+
easeIn: Rr,
|
|
1289
|
+
easeInOut: Ss,
|
|
1290
|
+
easeOut: Ir,
|
|
1291
|
+
circIn: de,
|
|
1292
|
+
circInOut: ss,
|
|
1293
|
+
circOut: Ji,
|
|
1294
|
+
backIn: he,
|
|
1295
|
+
backInOut: es,
|
|
1296
|
+
backOut: ts,
|
|
1297
|
+
anticipate: ns
|
|
1298
|
+
}, Qt = (e) => {
|
|
1299
|
+
if (we(e)) {
|
|
1300
1300
|
I(e.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
1301
1301
|
const [t, n, s, i] = e;
|
|
1302
|
-
return
|
|
1302
|
+
return vt(t, n, s, i);
|
|
1303
1303
|
} else if (typeof e == "string")
|
|
1304
1304
|
return I(nn[e] !== void 0, `Invalid easing type '${e}'`), nn[e];
|
|
1305
1305
|
return e;
|
|
1306
|
-
},
|
|
1307
|
-
function
|
|
1306
|
+
}, Lr = (e, t) => (n) => t(e(n)), Se = (...e) => e.reduce(Lr);
|
|
1307
|
+
function kt(e, t, n) {
|
|
1308
1308
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function Nr({ hue: e, saturation: t, lightness: n, alpha: s }) {
|
|
1311
1311
|
e /= 360, t /= 100, n /= 100;
|
|
1312
1312
|
let i = 0, r = 0, o = 0;
|
|
1313
1313
|
if (!t)
|
|
1314
1314
|
i = r = o = n;
|
|
1315
1315
|
else {
|
|
1316
1316
|
const a = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - a;
|
|
1317
|
-
i =
|
|
1317
|
+
i = kt(l, a, e + 1 / 3), r = kt(l, a, e), o = kt(l, a, e - 1 / 3);
|
|
1318
1318
|
}
|
|
1319
1319
|
return {
|
|
1320
1320
|
red: Math.round(i * 255),
|
|
@@ -1326,52 +1326,52 @@ function $r({ hue: e, saturation: t, lightness: n, alpha: s }) {
|
|
|
1326
1326
|
function At(e, t) {
|
|
1327
1327
|
return (n) => n > 0 ? t : e;
|
|
1328
1328
|
}
|
|
1329
|
-
const
|
|
1329
|
+
const _t = (e, t, n) => {
|
|
1330
1330
|
const s = e * e, i = n * (t * t - s) + s;
|
|
1331
1331
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
1332
|
-
},
|
|
1332
|
+
}, $r = [qt, U, q], Kr = (e) => $r.find((t) => t.test(e));
|
|
1333
1333
|
function sn(e) {
|
|
1334
|
-
const t =
|
|
1335
|
-
if (
|
|
1334
|
+
const t = Kr(e);
|
|
1335
|
+
if (ht(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`), !t)
|
|
1336
1336
|
return !1;
|
|
1337
1337
|
let n = t.parse(e);
|
|
1338
|
-
return t === q && (n =
|
|
1338
|
+
return t === q && (n = Nr(n)), n;
|
|
1339
1339
|
}
|
|
1340
1340
|
const rn = (e, t) => {
|
|
1341
1341
|
const n = sn(e), s = sn(t);
|
|
1342
1342
|
if (!n || !s)
|
|
1343
1343
|
return At(e, t);
|
|
1344
1344
|
const i = { ...n };
|
|
1345
|
-
return (r) => (i.red =
|
|
1346
|
-
},
|
|
1347
|
-
function
|
|
1348
|
-
return
|
|
1345
|
+
return (r) => (i.red = _t(n.red, s.red, r), i.green = _t(n.green, s.green, r), i.blue = _t(n.blue, s.blue, r), i.alpha = dt(n.alpha, s.alpha, r), U.transform(i));
|
|
1346
|
+
}, te = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
1347
|
+
function Wr(e, t) {
|
|
1348
|
+
return te.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1351
|
-
return (n) =>
|
|
1350
|
+
function kr(e, t) {
|
|
1351
|
+
return (n) => dt(e, t, n);
|
|
1352
1352
|
}
|
|
1353
|
-
function
|
|
1354
|
-
return typeof e == "number" ?
|
|
1353
|
+
function Te(e) {
|
|
1354
|
+
return typeof e == "number" ? kr : typeof e == "string" ? pe(e) ? At : E.test(e) ? rn : zr : Array.isArray(e) ? Ts : typeof e == "object" ? E.test(e) ? rn : _r : At;
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1357
|
-
const n = [...e], s = n.length, i = e.map((r, o) =>
|
|
1356
|
+
function Ts(e, t) {
|
|
1357
|
+
const n = [...e], s = n.length, i = e.map((r, o) => Te(r)(r, t[o]));
|
|
1358
1358
|
return (r) => {
|
|
1359
1359
|
for (let o = 0; o < s; o++)
|
|
1360
1360
|
n[o] = i[o](r);
|
|
1361
1361
|
return n;
|
|
1362
1362
|
};
|
|
1363
1363
|
}
|
|
1364
|
-
function
|
|
1364
|
+
function _r(e, t) {
|
|
1365
1365
|
const n = { ...e, ...t }, s = {};
|
|
1366
1366
|
for (const i in n)
|
|
1367
|
-
e[i] !== void 0 && t[i] !== void 0 && (s[i] =
|
|
1367
|
+
e[i] !== void 0 && t[i] !== void 0 && (s[i] = Te(e[i])(e[i], t[i]));
|
|
1368
1368
|
return (i) => {
|
|
1369
1369
|
for (const r in s)
|
|
1370
1370
|
n[r] = s[r](i);
|
|
1371
1371
|
return n;
|
|
1372
1372
|
};
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1374
|
+
function Gr(e, t) {
|
|
1375
1375
|
var n;
|
|
1376
1376
|
const s = [], i = { color: 0, var: 0, number: 0 };
|
|
1377
1377
|
for (let r = 0; r < t.values.length; r++) {
|
|
@@ -1380,26 +1380,26 @@ function zr(e, t) {
|
|
|
1380
1380
|
}
|
|
1381
1381
|
return s;
|
|
1382
1382
|
}
|
|
1383
|
-
const
|
|
1384
|
-
const n =
|
|
1385
|
-
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ?
|
|
1383
|
+
const zr = (e, t) => {
|
|
1384
|
+
const n = et.createTransformer(t), s = ut(e), i = ut(t);
|
|
1385
|
+
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? te.has(e) && !i.values.length || te.has(t) && !s.values.length ? Wr(e, t) : Se(Ts(Gr(s, i), i.values), n) : (ht(!0, `Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), At(e, t));
|
|
1386
1386
|
};
|
|
1387
|
-
function
|
|
1388
|
-
return typeof e == "number" && typeof t == "number" && typeof n == "number" ?
|
|
1387
|
+
function Vs(e, t, n) {
|
|
1388
|
+
return typeof e == "number" && typeof t == "number" && typeof n == "number" ? dt(e, t, n) : Te(e)(e, t);
|
|
1389
1389
|
}
|
|
1390
1390
|
function Ur(e, t, n) {
|
|
1391
|
-
const s = [], i = n ||
|
|
1391
|
+
const s = [], i = n || Vs, r = e.length - 1;
|
|
1392
1392
|
for (let o = 0; o < r; o++) {
|
|
1393
1393
|
let a = i(e[o], e[o + 1]);
|
|
1394
1394
|
if (t) {
|
|
1395
1395
|
const l = Array.isArray(t) ? t[o] || K : t;
|
|
1396
|
-
a =
|
|
1396
|
+
a = Se(l, a);
|
|
1397
1397
|
}
|
|
1398
1398
|
s.push(a);
|
|
1399
1399
|
}
|
|
1400
1400
|
return s;
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1402
|
+
function Ve(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
1403
1403
|
const r = e.length;
|
|
1404
1404
|
if (I(r === t.length, "Both input and output ranges must be the same length"), r === 1)
|
|
1405
1405
|
return () => t[0];
|
|
@@ -1411,53 +1411,53 @@ function Te(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
|
1411
1411
|
if (a > 1)
|
|
1412
1412
|
for (; c < e.length - 2 && !(u < e[c + 1]); c++)
|
|
1413
1413
|
;
|
|
1414
|
-
const f =
|
|
1414
|
+
const f = pt(e[c], e[c + 1], u);
|
|
1415
1415
|
return o[c](f);
|
|
1416
1416
|
};
|
|
1417
1417
|
return n ? (u) => l(H(e[0], e[r - 1], u)) : l;
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1419
|
+
function jr(e, t) {
|
|
1420
1420
|
return e.map((n) => n * t);
|
|
1421
1421
|
}
|
|
1422
|
-
function
|
|
1423
|
-
return e.map(() => t ||
|
|
1422
|
+
function Hr(e, t) {
|
|
1423
|
+
return e.map(() => t || Ss).splice(0, e.length - 1);
|
|
1424
1424
|
}
|
|
1425
|
-
function
|
|
1426
|
-
const i =
|
|
1425
|
+
function Mt({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }) {
|
|
1426
|
+
const i = qn(s) ? s.map(Qt) : Qt(s), r = {
|
|
1427
1427
|
done: !1,
|
|
1428
1428
|
value: t[0]
|
|
1429
|
-
}, o =
|
|
1429
|
+
}, o = jr(
|
|
1430
1430
|
// Only use the provided offsets if they're the correct length
|
|
1431
1431
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
1432
|
-
n && n.length === t.length ? n :
|
|
1432
|
+
n && n.length === t.length ? n : ue(t),
|
|
1433
1433
|
e
|
|
1434
|
-
), a =
|
|
1435
|
-
ease: Array.isArray(i) ? i :
|
|
1434
|
+
), a = Ve(o, t, {
|
|
1435
|
+
ease: Array.isArray(i) ? i : Hr(t, i)
|
|
1436
1436
|
});
|
|
1437
1437
|
return {
|
|
1438
1438
|
calculatedDuration: e,
|
|
1439
1439
|
next: (l) => (r.value = a(l), r.done = l >= e, r)
|
|
1440
1440
|
};
|
|
1441
1441
|
}
|
|
1442
|
-
const
|
|
1442
|
+
const Yr = (e) => {
|
|
1443
1443
|
const t = ({ timestamp: n }) => e(n);
|
|
1444
1444
|
return {
|
|
1445
|
-
start: () =>
|
|
1445
|
+
start: () => M.update(t, !0),
|
|
1446
1446
|
stop: () => R(t),
|
|
1447
1447
|
/**
|
|
1448
1448
|
* If we're processing this frame we can use the
|
|
1449
1449
|
* framelocked timestamp to keep things in sync.
|
|
1450
1450
|
*/
|
|
1451
|
-
now: () =>
|
|
1451
|
+
now: () => J.isProcessing ? J.timestamp : N.now()
|
|
1452
1452
|
};
|
|
1453
1453
|
}, Xr = {
|
|
1454
1454
|
decay: en,
|
|
1455
1455
|
inertia: en,
|
|
1456
|
-
tween:
|
|
1457
|
-
keyframes:
|
|
1458
|
-
spring:
|
|
1459
|
-
},
|
|
1460
|
-
class Lt extends
|
|
1456
|
+
tween: Mt,
|
|
1457
|
+
keyframes: Mt,
|
|
1458
|
+
spring: le
|
|
1459
|
+
}, qr = (e) => e / 100;
|
|
1460
|
+
class Lt extends ws {
|
|
1461
1461
|
constructor(t) {
|
|
1462
1462
|
super(t), this.holdTime = null, this.cancelTime = null, this.currentTime = 0, this.playbackSpeed = 1, this.pendingPlayState = "running", this.startTime = null, this.state = "idle", this.stop = () => {
|
|
1463
1463
|
if (this.resolver.cancel(), this.isStopped = !0, this.state === "idle")
|
|
@@ -1466,19 +1466,19 @@ class Lt extends Vs {
|
|
|
1466
1466
|
const { onStop: l } = this.options;
|
|
1467
1467
|
l && l();
|
|
1468
1468
|
};
|
|
1469
|
-
const { name: n, motionValue: s, element: i, keyframes: r } = this.options, o = (i == null ? void 0 : i.KeyframeResolver) ||
|
|
1469
|
+
const { name: n, motionValue: s, element: i, keyframes: r } = this.options, o = (i == null ? void 0 : i.KeyframeResolver) || me, a = (l, u) => this.onKeyframesResolved(l, u);
|
|
1470
1470
|
this.resolver = new o(r, a, n, s, i), this.resolver.scheduleResolve();
|
|
1471
1471
|
}
|
|
1472
1472
|
initPlayback(t) {
|
|
1473
|
-
const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = this.options, a =
|
|
1473
|
+
const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = this.options, a = mt(n) ? n : Xr[n] || Mt;
|
|
1474
1474
|
let l, u;
|
|
1475
|
-
a !==
|
|
1475
|
+
a !== Mt && typeof t[0] != "number" && (process.env.NODE_ENV !== "production" && I(t.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`), l = Se(qr, Vs(t[0], t[1])), t = [0, 100]);
|
|
1476
1476
|
const c = a({ ...this.options, keyframes: t });
|
|
1477
1477
|
r === "mirror" && (u = a({
|
|
1478
1478
|
...this.options,
|
|
1479
1479
|
keyframes: [...t].reverse(),
|
|
1480
1480
|
velocity: -o
|
|
1481
|
-
})), c.calculatedDuration === null && (c.calculatedDuration =
|
|
1481
|
+
})), c.calculatedDuration === null && (c.calculatedDuration = jn(c));
|
|
1482
1482
|
const { calculatedDuration: f } = c, h = f + i, p = h * (s + 1) - i;
|
|
1483
1483
|
return {
|
|
1484
1484
|
generator: c,
|
|
@@ -1517,7 +1517,7 @@ class Lt extends Vs {
|
|
|
1517
1517
|
let { done: A } = S;
|
|
1518
1518
|
!y && u !== null && (A = this.speed >= 0 ? this.currentTime >= c : this.currentTime <= 0);
|
|
1519
1519
|
const F = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
|
|
1520
|
-
return F && i !== void 0 && (S.value =
|
|
1520
|
+
return F && i !== void 0 && (S.value = yt(l, this.options, i)), b && b(S.value), F && this.finish(), S;
|
|
1521
1521
|
}
|
|
1522
1522
|
get duration() {
|
|
1523
1523
|
const { resolved: t } = this;
|
|
@@ -1527,7 +1527,7 @@ class Lt extends Vs {
|
|
|
1527
1527
|
return B(this.currentTime);
|
|
1528
1528
|
}
|
|
1529
1529
|
set time(t) {
|
|
1530
|
-
t =
|
|
1530
|
+
t = C(t), this.currentTime = t, this.holdTime !== null || this.speed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.speed);
|
|
1531
1531
|
}
|
|
1532
1532
|
get speed() {
|
|
1533
1533
|
return this.playbackSpeed;
|
|
@@ -1543,7 +1543,7 @@ class Lt extends Vs {
|
|
|
1543
1543
|
}
|
|
1544
1544
|
if (this.isStopped)
|
|
1545
1545
|
return;
|
|
1546
|
-
const { driver: t =
|
|
1546
|
+
const { driver: t = Yr, onPlay: n, startTime: s } = this.options;
|
|
1547
1547
|
this.driver || (this.driver = t((r) => this.tick(r))), n && n();
|
|
1548
1548
|
const i = this.driver.now();
|
|
1549
1549
|
this.holdTime !== null ? this.startTime = i - this.holdTime : this.startTime ? this.state === "finished" && (this.startTime = i) : this.startTime = s ?? this.calcStartTime(), this.state === "finished" && this.updateFinishedPromise(), this.cancelTime = this.startTime, this.holdTime = null, this.state = "running", this.driver.start();
|
|
@@ -1577,10 +1577,10 @@ class Lt extends Vs {
|
|
|
1577
1577
|
return this.startTime = 0, this.tick(t, !0);
|
|
1578
1578
|
}
|
|
1579
1579
|
}
|
|
1580
|
-
function
|
|
1580
|
+
function Zr(e) {
|
|
1581
1581
|
return new Lt(e);
|
|
1582
1582
|
}
|
|
1583
|
-
const
|
|
1583
|
+
const Jr = /* @__PURE__ */ new Set([
|
|
1584
1584
|
"opacity",
|
|
1585
1585
|
"clipPath",
|
|
1586
1586
|
"filter",
|
|
@@ -1588,23 +1588,23 @@ const Qr = /* @__PURE__ */ new Set([
|
|
|
1588
1588
|
// TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved
|
|
1589
1589
|
// or until we implement support for linear() easing.
|
|
1590
1590
|
// "background-color"
|
|
1591
|
-
]),
|
|
1591
|
+
]), Qr = 10, to = (e, t) => {
|
|
1592
1592
|
let n = "";
|
|
1593
|
-
const s = Math.max(Math.round(t /
|
|
1593
|
+
const s = Math.max(Math.round(t / Qr), 2);
|
|
1594
1594
|
for (let i = 0; i < s; i++)
|
|
1595
|
-
n += e(
|
|
1595
|
+
n += e(pt(0, s - 1, i)) + ", ";
|
|
1596
1596
|
return `linear(${n.substring(0, n.length - 2)})`;
|
|
1597
|
-
},
|
|
1597
|
+
}, eo = {
|
|
1598
1598
|
linearEasing: void 0
|
|
1599
1599
|
};
|
|
1600
|
-
function
|
|
1600
|
+
function no(e, t) {
|
|
1601
1601
|
const n = Rt(e);
|
|
1602
1602
|
return () => {
|
|
1603
1603
|
var s;
|
|
1604
|
-
return (s =
|
|
1604
|
+
return (s = eo[t]) !== null && s !== void 0 ? s : n();
|
|
1605
1605
|
};
|
|
1606
1606
|
}
|
|
1607
|
-
const
|
|
1607
|
+
const ct = /* @__PURE__ */ no(() => {
|
|
1608
1608
|
try {
|
|
1609
1609
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
1610
1610
|
} catch {
|
|
@@ -1612,28 +1612,28 @@ const lt = /* @__PURE__ */ so(() => {
|
|
|
1612
1612
|
}
|
|
1613
1613
|
return !0;
|
|
1614
1614
|
}, "linearEasing");
|
|
1615
|
-
function
|
|
1616
|
-
return !!(typeof e == "function" &&
|
|
1615
|
+
function xs(e) {
|
|
1616
|
+
return !!(typeof e == "function" && ct() || !e || typeof e == "string" && (e in ee || ct()) || we(e) || Array.isArray(e) && e.every(xs));
|
|
1617
1617
|
}
|
|
1618
|
-
const
|
|
1618
|
+
const it = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, ee = {
|
|
1619
1619
|
linear: "linear",
|
|
1620
1620
|
ease: "ease",
|
|
1621
1621
|
easeIn: "ease-in",
|
|
1622
1622
|
easeOut: "ease-out",
|
|
1623
1623
|
easeInOut: "ease-in-out",
|
|
1624
|
-
circIn: /* @__PURE__ */
|
|
1625
|
-
circOut: /* @__PURE__ */
|
|
1626
|
-
backIn: /* @__PURE__ */
|
|
1627
|
-
backOut: /* @__PURE__ */
|
|
1624
|
+
circIn: /* @__PURE__ */ it([0, 0.65, 0.55, 1]),
|
|
1625
|
+
circOut: /* @__PURE__ */ it([0.55, 0, 1, 0.45]),
|
|
1626
|
+
backIn: /* @__PURE__ */ it([0.31, 0.01, 0.66, -0.59]),
|
|
1627
|
+
backOut: /* @__PURE__ */ it([0.33, 1.53, 0.69, 0.99])
|
|
1628
1628
|
};
|
|
1629
|
-
function
|
|
1629
|
+
function As(e, t) {
|
|
1630
1630
|
if (e)
|
|
1631
|
-
return typeof e == "function" &&
|
|
1631
|
+
return typeof e == "function" && ct() ? to(e, t) : we(e) ? it(e) : Array.isArray(e) ? e.map((n) => As(n, t) || ee.easeOut) : ee[e];
|
|
1632
1632
|
}
|
|
1633
|
-
function
|
|
1633
|
+
function Ms(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a, times: l } = {}) {
|
|
1634
1634
|
const u = { [t]: n };
|
|
1635
1635
|
l && (u.offset = l);
|
|
1636
|
-
const c =
|
|
1636
|
+
const c = As(a, i);
|
|
1637
1637
|
return Array.isArray(c) && (u.easing = c), e.animate(u, {
|
|
1638
1638
|
delay: s,
|
|
1639
1639
|
duration: i,
|
|
@@ -1643,14 +1643,14 @@ function Ps(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatTyp
|
|
|
1643
1643
|
direction: o === "reverse" ? "alternate" : "normal"
|
|
1644
1644
|
});
|
|
1645
1645
|
}
|
|
1646
|
-
function
|
|
1646
|
+
function Et(e, t) {
|
|
1647
1647
|
e.timeline = t, e.onfinish = null;
|
|
1648
1648
|
}
|
|
1649
|
-
const
|
|
1650
|
-
function
|
|
1651
|
-
return
|
|
1649
|
+
const Es = /* @__PURE__ */ Rt(() => Object.hasOwnProperty.call(Element.prototype, "animate")), Pt = 10, so = 2e4;
|
|
1650
|
+
function io(e) {
|
|
1651
|
+
return mt(e.type) || e.type === "spring" || !xs(e.ease);
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1653
|
+
function ro(e, t) {
|
|
1654
1654
|
const n = new Lt({
|
|
1655
1655
|
...t,
|
|
1656
1656
|
keyframes: e,
|
|
@@ -1661,42 +1661,42 @@ function oo(e, t) {
|
|
|
1661
1661
|
let s = { done: !1, value: e[0] };
|
|
1662
1662
|
const i = [];
|
|
1663
1663
|
let r = 0;
|
|
1664
|
-
for (; !s.done && r <
|
|
1665
|
-
s = n.sample(r), i.push(s.value), r +=
|
|
1664
|
+
for (; !s.done && r < so; )
|
|
1665
|
+
s = n.sample(r), i.push(s.value), r += Pt;
|
|
1666
1666
|
return {
|
|
1667
1667
|
times: void 0,
|
|
1668
1668
|
keyframes: i,
|
|
1669
|
-
duration: r -
|
|
1669
|
+
duration: r - Pt,
|
|
1670
1670
|
ease: "linear"
|
|
1671
1671
|
};
|
|
1672
1672
|
}
|
|
1673
|
-
const
|
|
1674
|
-
anticipate:
|
|
1675
|
-
backInOut:
|
|
1676
|
-
circInOut:
|
|
1673
|
+
const Ps = {
|
|
1674
|
+
anticipate: ns,
|
|
1675
|
+
backInOut: es,
|
|
1676
|
+
circInOut: ss
|
|
1677
1677
|
};
|
|
1678
|
-
function
|
|
1679
|
-
return e in
|
|
1678
|
+
function oo(e) {
|
|
1679
|
+
return e in Ps;
|
|
1680
1680
|
}
|
|
1681
|
-
class on extends
|
|
1681
|
+
class on extends ws {
|
|
1682
1682
|
constructor(t) {
|
|
1683
1683
|
super(t);
|
|
1684
1684
|
const { name: n, motionValue: s, element: i, keyframes: r } = this.options;
|
|
1685
|
-
this.resolver = new
|
|
1685
|
+
this.resolver = new bs(r, (o, a) => this.onKeyframesResolved(o, a), n, s, i), this.resolver.scheduleResolve();
|
|
1686
1686
|
}
|
|
1687
1687
|
initPlayback(t, n) {
|
|
1688
1688
|
var s;
|
|
1689
1689
|
let { duration: i = 300, times: r, ease: o, type: a, motionValue: l, name: u, startTime: c } = this.options;
|
|
1690
1690
|
if (!(!((s = l.owner) === null || s === void 0) && s.current))
|
|
1691
1691
|
return !1;
|
|
1692
|
-
if (typeof o == "string" &&
|
|
1693
|
-
const { onComplete: h, onUpdate: p, motionValue: m, element: w, ...b } = this.options, g =
|
|
1692
|
+
if (typeof o == "string" && ct() && oo(o) && (o = Ps[o]), io(this.options)) {
|
|
1693
|
+
const { onComplete: h, onUpdate: p, motionValue: m, element: w, ...b } = this.options, g = ro(t, b);
|
|
1694
1694
|
t = g.keyframes, t.length === 1 && (t[1] = t[0]), i = g.duration, r = g.times, o = g.ease, a = "keyframes";
|
|
1695
1695
|
}
|
|
1696
|
-
const f =
|
|
1697
|
-
return f.startTime = c ?? this.calcStartTime(), this.pendingTimeline ? (
|
|
1696
|
+
const f = Ms(l.owner.current, u, t, { ...this.options, duration: i, times: r, ease: o });
|
|
1697
|
+
return f.startTime = c ?? this.calcStartTime(), this.pendingTimeline ? (Et(f, this.pendingTimeline), this.pendingTimeline = void 0) : f.onfinish = () => {
|
|
1698
1698
|
const { onComplete: h } = this.options;
|
|
1699
|
-
l.set(
|
|
1699
|
+
l.set(yt(t, this.options, n)), h && h(), this.cancel(), this.resolveFinishedPromise();
|
|
1700
1700
|
}, {
|
|
1701
1701
|
animation: f,
|
|
1702
1702
|
duration: i,
|
|
@@ -1725,7 +1725,7 @@ class on extends Vs {
|
|
|
1725
1725
|
if (!n)
|
|
1726
1726
|
return;
|
|
1727
1727
|
const { animation: s } = n;
|
|
1728
|
-
s.currentTime =
|
|
1728
|
+
s.currentTime = C(t);
|
|
1729
1729
|
}
|
|
1730
1730
|
get speed() {
|
|
1731
1731
|
const { resolved: t } = this;
|
|
@@ -1767,7 +1767,7 @@ class on extends Vs {
|
|
|
1767
1767
|
if (!n)
|
|
1768
1768
|
return K;
|
|
1769
1769
|
const { animation: s } = n;
|
|
1770
|
-
|
|
1770
|
+
Et(s, t);
|
|
1771
1771
|
}
|
|
1772
1772
|
return K;
|
|
1773
1773
|
}
|
|
@@ -1806,8 +1806,8 @@ class on extends Vs {
|
|
|
1806
1806
|
ease: o,
|
|
1807
1807
|
times: a,
|
|
1808
1808
|
isGenerator: !0
|
|
1809
|
-
}), w =
|
|
1810
|
-
u.setWithVelocity(m.sample(w -
|
|
1809
|
+
}), w = C(this.time);
|
|
1810
|
+
u.setWithVelocity(m.sample(w - Pt).value, m.sample(w).value, Pt);
|
|
1811
1811
|
}
|
|
1812
1812
|
const { onStop: l } = this.options;
|
|
1813
1813
|
l && l(), this.cancel();
|
|
@@ -1822,20 +1822,20 @@ class on extends Vs {
|
|
|
1822
1822
|
}
|
|
1823
1823
|
static supports(t) {
|
|
1824
1824
|
const { motionValue: n, name: s, repeatDelay: i, repeatType: r, damping: o, type: a } = t;
|
|
1825
|
-
return
|
|
1825
|
+
return Es() && s && Jr.has(s) && n && n.owner && n.owner.current instanceof HTMLElement && /**
|
|
1826
1826
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
1827
1827
|
* no way to read the value from WAAPI every frame.
|
|
1828
1828
|
*/
|
|
1829
1829
|
!n.owner.getProps().onUpdate && !i && r !== "mirror" && o !== 0 && a !== "inertia";
|
|
1830
1830
|
}
|
|
1831
1831
|
}
|
|
1832
|
-
function
|
|
1832
|
+
function ao({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: l, elapsed: u, ...c }) {
|
|
1833
1833
|
return !!Object.keys(c).length;
|
|
1834
1834
|
}
|
|
1835
|
-
const
|
|
1836
|
-
const a =
|
|
1835
|
+
const Cs = (e, t, n, s = {}, i, r) => (o) => {
|
|
1836
|
+
const a = fe(s, e) || {}, l = a.delay || s.delay || 0;
|
|
1837
1837
|
let { elapsed: u = 0 } = s;
|
|
1838
|
-
u = u -
|
|
1838
|
+
u = u - C(l);
|
|
1839
1839
|
let c = {
|
|
1840
1840
|
keyframes: Array.isArray(n) ? n : [null, n],
|
|
1841
1841
|
ease: "easeOut",
|
|
@@ -1852,27 +1852,27 @@ const Ds = (e, t, n, s = {}, i, r) => (o) => {
|
|
|
1852
1852
|
motionValue: t,
|
|
1853
1853
|
element: r ? void 0 : i
|
|
1854
1854
|
};
|
|
1855
|
-
|
|
1855
|
+
ao(a) || (c = {
|
|
1856
1856
|
...c,
|
|
1857
|
-
...
|
|
1858
|
-
}), c.duration && (c.duration =
|
|
1857
|
+
...Hi(e, c)
|
|
1858
|
+
}), c.duration && (c.duration = C(c.duration)), c.repeatDelay && (c.repeatDelay = C(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
|
|
1859
1859
|
let f = !1;
|
|
1860
1860
|
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (c.duration = 0, c.delay === 0 && (f = !0)), f && !r && t.get() !== void 0) {
|
|
1861
|
-
const h =
|
|
1861
|
+
const h = yt(c.keyframes, a);
|
|
1862
1862
|
if (h !== void 0)
|
|
1863
|
-
return
|
|
1863
|
+
return M.update(() => {
|
|
1864
1864
|
c.onUpdate(h), c.onComplete();
|
|
1865
|
-
}), new
|
|
1865
|
+
}), new ae([]);
|
|
1866
1866
|
}
|
|
1867
1867
|
return !r && on.supports(c) ? new on(c) : new Lt(c);
|
|
1868
|
-
},
|
|
1868
|
+
}, lo = (e) => Array.isArray(e), uo = (e) => lo(e) ? e[e.length - 1] || 0 : e;
|
|
1869
1869
|
function an(e) {
|
|
1870
1870
|
const t = [{}, {}];
|
|
1871
1871
|
return e == null || e.values.forEach((n, s) => {
|
|
1872
1872
|
t[0][s] = n.get(), t[1][s] = n.getVelocity();
|
|
1873
1873
|
}), t;
|
|
1874
1874
|
}
|
|
1875
|
-
function
|
|
1875
|
+
function Fs(e, t, n, s) {
|
|
1876
1876
|
if (typeof t == "function") {
|
|
1877
1877
|
const [i, r] = an(s);
|
|
1878
1878
|
t = t(n !== void 0 ? n : e.custom, i, r);
|
|
@@ -1883,108 +1883,108 @@ function Bs(e, t, n, s) {
|
|
|
1883
1883
|
}
|
|
1884
1884
|
return t;
|
|
1885
1885
|
}
|
|
1886
|
-
function
|
|
1886
|
+
function co(e, t, n) {
|
|
1887
1887
|
const s = e.getProps();
|
|
1888
|
-
return
|
|
1888
|
+
return Fs(s, t, s.custom, e);
|
|
1889
1889
|
}
|
|
1890
|
-
function
|
|
1890
|
+
function fo(e, t, n) {
|
|
1891
1891
|
e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, D(n));
|
|
1892
1892
|
}
|
|
1893
|
-
function
|
|
1894
|
-
const n =
|
|
1893
|
+
function ho(e, t) {
|
|
1894
|
+
const n = co(e, t);
|
|
1895
1895
|
let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
|
|
1896
1896
|
r = { ...r, ...s };
|
|
1897
1897
|
for (const o in r) {
|
|
1898
|
-
const a =
|
|
1899
|
-
|
|
1898
|
+
const a = uo(r[o]);
|
|
1899
|
+
fo(e, o, a);
|
|
1900
1900
|
}
|
|
1901
1901
|
}
|
|
1902
|
-
const
|
|
1903
|
-
function
|
|
1904
|
-
return e.props[
|
|
1902
|
+
const xe = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), po = "framerAppearId", mo = "data-" + xe(po);
|
|
1903
|
+
function go(e) {
|
|
1904
|
+
return e.props[mo];
|
|
1905
1905
|
}
|
|
1906
|
-
function
|
|
1907
|
-
return !!(
|
|
1906
|
+
function yo(e) {
|
|
1907
|
+
return !!(P(e) && e.add);
|
|
1908
1908
|
}
|
|
1909
|
-
function
|
|
1909
|
+
function vo(e, t) {
|
|
1910
1910
|
const n = e.getValue("willChange");
|
|
1911
|
-
if (
|
|
1911
|
+
if (yo(n))
|
|
1912
1912
|
return n.add(t);
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function bo({ protectedKeys: e, needsAnimating: t }, n) {
|
|
1915
1915
|
const s = e.hasOwnProperty(n) && t[n] !== !0;
|
|
1916
1916
|
return t[n] = !1, s;
|
|
1917
1917
|
}
|
|
1918
|
-
function
|
|
1918
|
+
function wo(e, t, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
1919
1919
|
var r;
|
|
1920
1920
|
let { transition: o = e.getDefaultTransition(), transitionEnd: a, ...l } = t;
|
|
1921
1921
|
s && (o = s);
|
|
1922
1922
|
const u = [], c = i && e.animationState && e.animationState.getState()[i];
|
|
1923
1923
|
for (const f in l) {
|
|
1924
1924
|
const h = e.getValue(f, (r = e.latestValues[f]) !== null && r !== void 0 ? r : null), p = l[f];
|
|
1925
|
-
if (p === void 0 || c &&
|
|
1925
|
+
if (p === void 0 || c && bo(c, f))
|
|
1926
1926
|
continue;
|
|
1927
1927
|
const m = {
|
|
1928
1928
|
delay: n,
|
|
1929
|
-
...
|
|
1929
|
+
...fe(o || {}, f)
|
|
1930
1930
|
};
|
|
1931
1931
|
let w = !1;
|
|
1932
1932
|
if (window.MotionHandoffAnimation) {
|
|
1933
|
-
const g =
|
|
1933
|
+
const g = go(e);
|
|
1934
1934
|
if (g) {
|
|
1935
|
-
const y = window.MotionHandoffAnimation(g, f,
|
|
1935
|
+
const y = window.MotionHandoffAnimation(g, f, M);
|
|
1936
1936
|
y !== null && (m.startTime = y, w = !0);
|
|
1937
1937
|
}
|
|
1938
1938
|
}
|
|
1939
|
-
|
|
1939
|
+
vo(e, f), h.start(Cs(f, h, p, e.shouldReduceMotion && X.has(f) ? { type: !1 } : m, e, w));
|
|
1940
1940
|
const b = h.animation;
|
|
1941
1941
|
b && u.push(b);
|
|
1942
1942
|
}
|
|
1943
1943
|
return a && Promise.all(u).then(() => {
|
|
1944
|
-
|
|
1945
|
-
a &&
|
|
1944
|
+
M.update(() => {
|
|
1945
|
+
a && ho(e, a);
|
|
1946
1946
|
});
|
|
1947
1947
|
}), u;
|
|
1948
1948
|
}
|
|
1949
|
-
function
|
|
1949
|
+
function So(e) {
|
|
1950
1950
|
return e instanceof SVGElement && e.tagName !== "svg";
|
|
1951
1951
|
}
|
|
1952
|
-
const
|
|
1953
|
-
function
|
|
1954
|
-
return
|
|
1952
|
+
const To = {};
|
|
1953
|
+
function Vo(e, { layout: t, layoutId: n }) {
|
|
1954
|
+
return X.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!To[e] || e === "opacity");
|
|
1955
1955
|
}
|
|
1956
|
-
function
|
|
1956
|
+
function Os(e, t, n) {
|
|
1957
1957
|
var s;
|
|
1958
1958
|
const { style: i } = e, r = {};
|
|
1959
1959
|
for (const o in i)
|
|
1960
|
-
(
|
|
1960
|
+
(P(i[o]) || t.style && P(t.style[o]) || Vo(o, e) || ((s = n == null ? void 0 : n.getValue(o)) === null || s === void 0 ? void 0 : s.liveStyle) !== void 0) && (r[o] = i[o]);
|
|
1961
1961
|
return r;
|
|
1962
1962
|
}
|
|
1963
|
-
function
|
|
1964
|
-
const s =
|
|
1963
|
+
function xo(e, t, n) {
|
|
1964
|
+
const s = Os(e, t, n);
|
|
1965
1965
|
for (const i in e)
|
|
1966
|
-
if (
|
|
1967
|
-
const r =
|
|
1966
|
+
if (P(e[i]) || P(t[i])) {
|
|
1967
|
+
const r = gt.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
1968
1968
|
s[r] = e[i];
|
|
1969
1969
|
}
|
|
1970
1970
|
return s;
|
|
1971
1971
|
}
|
|
1972
|
-
const
|
|
1972
|
+
const Ao = typeof window < "u", ne = { current: null }, Ds = { current: !1 };
|
|
1973
1973
|
function Mo() {
|
|
1974
|
-
if (
|
|
1974
|
+
if (Ds.current = !0, !!Ao)
|
|
1975
1975
|
if (window.matchMedia) {
|
|
1976
|
-
const e = window.matchMedia("(prefers-reduced-motion)"), t = () =>
|
|
1976
|
+
const e = window.matchMedia("(prefers-reduced-motion)"), t = () => ne.current = e.matches;
|
|
1977
1977
|
e.addListener(t), t();
|
|
1978
1978
|
} else
|
|
1979
|
-
|
|
1979
|
+
ne.current = !1;
|
|
1980
1980
|
}
|
|
1981
|
-
function
|
|
1981
|
+
function Eo(e) {
|
|
1982
1982
|
return e !== null && typeof e == "object" && typeof e.start == "function";
|
|
1983
1983
|
}
|
|
1984
1984
|
function Po(e) {
|
|
1985
1985
|
return typeof e == "string" || Array.isArray(e);
|
|
1986
1986
|
}
|
|
1987
|
-
const
|
|
1987
|
+
const Co = [
|
|
1988
1988
|
"animate",
|
|
1989
1989
|
"whileInView",
|
|
1990
1990
|
"whileFocus",
|
|
@@ -1992,19 +1992,19 @@ const Fo = [
|
|
|
1992
1992
|
"whileTap",
|
|
1993
1993
|
"whileDrag",
|
|
1994
1994
|
"exit"
|
|
1995
|
-
],
|
|
1996
|
-
function
|
|
1997
|
-
return
|
|
1995
|
+
], Fo = ["initial", ...Co];
|
|
1996
|
+
function Bs(e) {
|
|
1997
|
+
return Eo(e.animate) || Fo.some((t) => Po(e[t]));
|
|
1998
1998
|
}
|
|
1999
|
-
function
|
|
2000
|
-
return !!(
|
|
1999
|
+
function Oo(e) {
|
|
2000
|
+
return !!(Bs(e) || e.variants);
|
|
2001
2001
|
}
|
|
2002
|
-
function
|
|
2002
|
+
function Do(e, t, n) {
|
|
2003
2003
|
for (const s in t) {
|
|
2004
2004
|
const i = t[s], r = n[s];
|
|
2005
|
-
if (
|
|
2005
|
+
if (P(i))
|
|
2006
2006
|
e.addValue(s, i), process.env.NODE_ENV === "development" && Bt(i.version === "11.11.11", `Attempting to mix Framer Motion versions ${i.version} with 11.11.11 may not work as expected.`);
|
|
2007
|
-
else if (
|
|
2007
|
+
else if (P(r))
|
|
2008
2008
|
e.addValue(s, D(i, { owner: e }));
|
|
2009
2009
|
else if (r !== i)
|
|
2010
2010
|
if (e.hasValue(s)) {
|
|
@@ -2038,12 +2038,12 @@ const ln = {
|
|
|
2038
2038
|
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
2039
2039
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
2040
2040
|
layout: ["layout", "layoutId"]
|
|
2041
|
-
},
|
|
2041
|
+
}, se = {};
|
|
2042
2042
|
for (const e in ln)
|
|
2043
|
-
|
|
2043
|
+
se[e] = {
|
|
2044
2044
|
isEnabled: (t) => ln[e].some((n) => !!t[n])
|
|
2045
2045
|
};
|
|
2046
|
-
const
|
|
2046
|
+
const Bo = [...cs, E, et], Ro = (e) => Bo.find(us(e)), un = () => ({ min: 0, max: 0 }), Ae = () => ({
|
|
2047
2047
|
x: un(),
|
|
2048
2048
|
y: un()
|
|
2049
2049
|
}), cn = [
|
|
@@ -2055,7 +2055,7 @@ const Ro = [...ds, M, tt], Io = (e) => Ro.find(hs(e)), un = () => ({ min: 0, max
|
|
|
2055
2055
|
"LayoutAnimationStart",
|
|
2056
2056
|
"LayoutAnimationComplete"
|
|
2057
2057
|
];
|
|
2058
|
-
class
|
|
2058
|
+
class Rs {
|
|
2059
2059
|
/**
|
|
2060
2060
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
2061
2061
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -2067,22 +2067,22 @@ class Ns {
|
|
|
2067
2067
|
return {};
|
|
2068
2068
|
}
|
|
2069
2069
|
constructor({ parent: t, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: r, visualState: o }, a = {}) {
|
|
2070
|
-
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver =
|
|
2070
|
+
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = me, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
2071
2071
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
2072
2072
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
2073
2073
|
const h = N.now();
|
|
2074
|
-
this.renderScheduledAt < h && (this.renderScheduledAt = h,
|
|
2074
|
+
this.renderScheduledAt < h && (this.renderScheduledAt = h, M.render(this.render, !1, !0));
|
|
2075
2075
|
};
|
|
2076
2076
|
const { latestValues: l, renderState: u } = o;
|
|
2077
|
-
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = t, this.props = n, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!r, this.isControllingVariants =
|
|
2077
|
+
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = t, this.props = n, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!r, this.isControllingVariants = Bs(n), this.isVariantNode = Oo(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
|
|
2078
2078
|
const { willChange: c, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
2079
2079
|
for (const h in f) {
|
|
2080
2080
|
const p = f[h];
|
|
2081
|
-
l[h] !== void 0 &&
|
|
2081
|
+
l[h] !== void 0 && P(p) && p.set(l[h], !1);
|
|
2082
2082
|
}
|
|
2083
2083
|
}
|
|
2084
2084
|
mount(t) {
|
|
2085
|
-
this.current = t, $.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)),
|
|
2085
|
+
this.current = t, $.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), Ds.current || Mo(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : ne.current, process.env.NODE_ENV !== "production" && Bt(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
2086
2086
|
}
|
|
2087
2087
|
unmount() {
|
|
2088
2088
|
$.delete(this.current), this.projection && this.projection.unmount(), R(this.notifyUpdate), R(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
@@ -2096,8 +2096,8 @@ class Ns {
|
|
|
2096
2096
|
}
|
|
2097
2097
|
bindToMotionValue(t, n) {
|
|
2098
2098
|
this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)();
|
|
2099
|
-
const s =
|
|
2100
|
-
this.latestValues[t] = a, this.props.onUpdate &&
|
|
2099
|
+
const s = X.has(t), i = n.on("change", (a) => {
|
|
2100
|
+
this.latestValues[t] = a, this.props.onUpdate && M.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
|
|
2101
2101
|
}), r = n.on("renderRequest", this.scheduleRender);
|
|
2102
2102
|
let o;
|
|
2103
2103
|
window.MotionCheckAppearSync && (o = window.MotionCheckAppearSync(this, t, n)), this.valueSubscriptions.set(t, () => {
|
|
@@ -2109,8 +2109,8 @@ class Ns {
|
|
|
2109
2109
|
}
|
|
2110
2110
|
updateFeatures() {
|
|
2111
2111
|
let t = "animation";
|
|
2112
|
-
for (t in
|
|
2113
|
-
const n =
|
|
2112
|
+
for (t in se) {
|
|
2113
|
+
const n = se[t];
|
|
2114
2114
|
if (!n)
|
|
2115
2115
|
continue;
|
|
2116
2116
|
const { isEnabled: s, Feature: i } = n;
|
|
@@ -2129,7 +2129,7 @@ class Ns {
|
|
|
2129
2129
|
* removed with a re-render to work.
|
|
2130
2130
|
*/
|
|
2131
2131
|
measureViewportBox() {
|
|
2132
|
-
return this.current ? this.measureInstanceViewportBox(this.current, this.props) :
|
|
2132
|
+
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Ae();
|
|
2133
2133
|
}
|
|
2134
2134
|
getStaticValue(t) {
|
|
2135
2135
|
return this.latestValues[t];
|
|
@@ -2149,7 +2149,7 @@ class Ns {
|
|
|
2149
2149
|
const r = "on" + i, o = t[r];
|
|
2150
2150
|
o && (this.propEventSubscriptions[i] = this.on(i, o));
|
|
2151
2151
|
}
|
|
2152
|
-
this.prevMotionValues =
|
|
2152
|
+
this.prevMotionValues = Do(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
2153
2153
|
}
|
|
2154
2154
|
getProps() {
|
|
2155
2155
|
return this.props;
|
|
@@ -2215,7 +2215,7 @@ class Ns {
|
|
|
2215
2215
|
readValue(t, n) {
|
|
2216
2216
|
var s;
|
|
2217
2217
|
let i = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : (s = this.getBaseTargetFromProps(this.props, t)) !== null && s !== void 0 ? s : this.readValueFromInstance(this.current, t, this.options);
|
|
2218
|
-
return i != null && (typeof i == "string" && (
|
|
2218
|
+
return i != null && (typeof i == "string" && (rs(i) || is(i)) ? i = parseFloat(i) : !Ro(i) && et.test(n) && (i = vs(t, n)), this.setBaseTarget(t, P(i) ? i.get() : i)), P(i) ? i.get() : i;
|
|
2219
2219
|
}
|
|
2220
2220
|
/**
|
|
2221
2221
|
* Set the base target to later animate back to. This is currently
|
|
@@ -2233,24 +2233,24 @@ class Ns {
|
|
|
2233
2233
|
const { initial: s } = this.props;
|
|
2234
2234
|
let i;
|
|
2235
2235
|
if (typeof s == "string" || typeof s == "object") {
|
|
2236
|
-
const o =
|
|
2236
|
+
const o = Fs(this.props, s, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom);
|
|
2237
2237
|
o && (i = o[t]);
|
|
2238
2238
|
}
|
|
2239
2239
|
if (s && i !== void 0)
|
|
2240
2240
|
return i;
|
|
2241
2241
|
const r = this.getBaseTargetFromProps(this.props, t);
|
|
2242
|
-
return r !== void 0 && !
|
|
2242
|
+
return r !== void 0 && !P(r) ? r : this.initialValues[t] !== void 0 && i === void 0 ? void 0 : this.baseTarget[t];
|
|
2243
2243
|
}
|
|
2244
2244
|
on(t, n) {
|
|
2245
|
-
return this.events[t] || (this.events[t] = new
|
|
2245
|
+
return this.events[t] || (this.events[t] = new Gn()), this.events[t].add(n);
|
|
2246
2246
|
}
|
|
2247
2247
|
notify(t, ...n) {
|
|
2248
2248
|
this.events[t] && this.events[t].notify(...n);
|
|
2249
2249
|
}
|
|
2250
2250
|
}
|
|
2251
|
-
class
|
|
2251
|
+
class Is extends Rs {
|
|
2252
2252
|
constructor() {
|
|
2253
|
-
super(...arguments), this.KeyframeResolver =
|
|
2253
|
+
super(...arguments), this.KeyframeResolver = bs;
|
|
2254
2254
|
}
|
|
2255
2255
|
sortInstanceNodePosition(t, n) {
|
|
2256
2256
|
return t.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
@@ -2262,24 +2262,24 @@ class $s extends Ns {
|
|
|
2262
2262
|
delete n[t], delete s[t];
|
|
2263
2263
|
}
|
|
2264
2264
|
}
|
|
2265
|
-
const
|
|
2265
|
+
const Ls = (e, t) => t && typeof e == "number" ? t.transform(e) : e, Io = {
|
|
2266
2266
|
x: "translateX",
|
|
2267
2267
|
y: "translateY",
|
|
2268
2268
|
z: "translateZ",
|
|
2269
2269
|
transformPerspective: "perspective"
|
|
2270
|
-
},
|
|
2271
|
-
function
|
|
2270
|
+
}, Lo = gt.length;
|
|
2271
|
+
function No(e, t, n) {
|
|
2272
2272
|
let s = "", i = !0;
|
|
2273
|
-
for (let r = 0; r <
|
|
2274
|
-
const o =
|
|
2273
|
+
for (let r = 0; r < Lo; r++) {
|
|
2274
|
+
const o = gt[r], a = e[o];
|
|
2275
2275
|
if (a === void 0)
|
|
2276
2276
|
continue;
|
|
2277
2277
|
let l = !0;
|
|
2278
2278
|
if (typeof a == "number" ? l = a === (o.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
|
|
2279
|
-
const u =
|
|
2279
|
+
const u = Ls(a, ve[o]);
|
|
2280
2280
|
if (!l) {
|
|
2281
2281
|
i = !1;
|
|
2282
|
-
const c =
|
|
2282
|
+
const c = Io[o] || o;
|
|
2283
2283
|
s += `${c}(${u}) `;
|
|
2284
2284
|
}
|
|
2285
2285
|
n && (t[o] = u);
|
|
@@ -2287,23 +2287,23 @@ function $o(e, t, n) {
|
|
|
2287
2287
|
}
|
|
2288
2288
|
return s = s.trim(), n ? s = n(t, i ? "" : s) : i && (s = "none"), s;
|
|
2289
2289
|
}
|
|
2290
|
-
function
|
|
2290
|
+
function Ns(e, t, n) {
|
|
2291
2291
|
const { style: s, vars: i, transformOrigin: r } = e;
|
|
2292
2292
|
let o = !1, a = !1;
|
|
2293
2293
|
for (const l in t) {
|
|
2294
2294
|
const u = t[l];
|
|
2295
|
-
if (
|
|
2295
|
+
if (X.has(l)) {
|
|
2296
2296
|
o = !0;
|
|
2297
2297
|
continue;
|
|
2298
|
-
} else if (
|
|
2298
|
+
} else if (as(l)) {
|
|
2299
2299
|
i[l] = u;
|
|
2300
2300
|
continue;
|
|
2301
2301
|
} else {
|
|
2302
|
-
const c =
|
|
2302
|
+
const c = Ls(u, ve[l]);
|
|
2303
2303
|
l.startsWith("origin") ? (a = !0, r[l] = c) : s[l] = c;
|
|
2304
2304
|
}
|
|
2305
2305
|
}
|
|
2306
|
-
if (t.transform || (o || n ? s.transform =
|
|
2306
|
+
if (t.transform || (o || n ? s.transform = No(t, e.transform, n) : s.transform && (s.transform = "none")), a) {
|
|
2307
2307
|
const { originX: l = "50%", originY: u = "50%", originZ: c = 0 } = r;
|
|
2308
2308
|
s.transformOrigin = `${l} ${u} ${c}`;
|
|
2309
2309
|
}
|
|
@@ -2311,25 +2311,25 @@ function Ws(e, t, n) {
|
|
|
2311
2311
|
function fn(e, t, n) {
|
|
2312
2312
|
return typeof e == "string" ? e : d.transform(t + n * e);
|
|
2313
2313
|
}
|
|
2314
|
-
function
|
|
2314
|
+
function $o(e, t, n) {
|
|
2315
2315
|
const s = fn(t, e.x, e.width), i = fn(n, e.y, e.height);
|
|
2316
2316
|
return `${s} ${i}`;
|
|
2317
2317
|
}
|
|
2318
|
-
const
|
|
2318
|
+
const Ko = {
|
|
2319
2319
|
offset: "stroke-dashoffset",
|
|
2320
2320
|
array: "stroke-dasharray"
|
|
2321
|
-
},
|
|
2321
|
+
}, Wo = {
|
|
2322
2322
|
offset: "strokeDashoffset",
|
|
2323
2323
|
array: "strokeDasharray"
|
|
2324
2324
|
};
|
|
2325
|
-
function
|
|
2325
|
+
function ko(e, t, n = 1, s = 0, i = !0) {
|
|
2326
2326
|
e.pathLength = 1;
|
|
2327
|
-
const r = i ?
|
|
2327
|
+
const r = i ? Ko : Wo;
|
|
2328
2328
|
e[r.offset] = d.transform(-s);
|
|
2329
2329
|
const o = d.transform(t), a = d.transform(n);
|
|
2330
2330
|
e[r.array] = `${o} ${a}`;
|
|
2331
2331
|
}
|
|
2332
|
-
function
|
|
2332
|
+
function _o(e, {
|
|
2333
2333
|
attrX: t,
|
|
2334
2334
|
attrY: n,
|
|
2335
2335
|
attrScale: s,
|
|
@@ -2341,15 +2341,15 @@ function ko(e, {
|
|
|
2341
2341
|
// This is object creation, which we try to avoid per-frame.
|
|
2342
2342
|
...u
|
|
2343
2343
|
}, c, f) {
|
|
2344
|
-
if (
|
|
2344
|
+
if (Ns(e, u, f), c) {
|
|
2345
2345
|
e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
|
|
2346
2346
|
return;
|
|
2347
2347
|
}
|
|
2348
2348
|
e.attrs = e.style, e.style = {};
|
|
2349
2349
|
const { attrs: h, style: p, dimensions: m } = e;
|
|
2350
|
-
h.transform && (m && (p.transform = h.transform), delete h.transform), m && (i !== void 0 || r !== void 0 || p.transform) && (p.transformOrigin =
|
|
2350
|
+
h.transform && (m && (p.transform = h.transform), delete h.transform), m && (i !== void 0 || r !== void 0 || p.transform) && (p.transformOrigin = $o(m, i !== void 0 ? i : 0.5, r !== void 0 ? r : 0.5)), t !== void 0 && (h.x = t), n !== void 0 && (h.y = n), s !== void 0 && (h.scale = s), o !== void 0 && ko(h, o, a, l, !1);
|
|
2351
2351
|
}
|
|
2352
|
-
const
|
|
2352
|
+
const $s = /* @__PURE__ */ new Set([
|
|
2353
2353
|
"baseFrequency",
|
|
2354
2354
|
"diffuseConstant",
|
|
2355
2355
|
"kernelMatrix",
|
|
@@ -2374,51 +2374,51 @@ const _s = /* @__PURE__ */ new Set([
|
|
|
2374
2374
|
"textLength",
|
|
2375
2375
|
"lengthAdjust"
|
|
2376
2376
|
]);
|
|
2377
|
-
function
|
|
2377
|
+
function Ks(e, { style: t, vars: n }, s, i) {
|
|
2378
2378
|
Object.assign(e.style, t, i && i.getProjectionStyles(s));
|
|
2379
2379
|
for (const r in n)
|
|
2380
2380
|
e.style.setProperty(r, n[r]);
|
|
2381
2381
|
}
|
|
2382
|
-
function
|
|
2383
|
-
|
|
2382
|
+
function Go(e, t, n, s) {
|
|
2383
|
+
Ks(e, t, void 0, s);
|
|
2384
2384
|
for (const i in t.attrs)
|
|
2385
|
-
e.setAttribute(
|
|
2385
|
+
e.setAttribute($s.has(i) ? i : xe(i), t.attrs[i]);
|
|
2386
2386
|
}
|
|
2387
|
-
const
|
|
2388
|
-
class Uo extends
|
|
2387
|
+
const zo = (e) => typeof e == "string" && e.toLowerCase() === "svg";
|
|
2388
|
+
class Uo extends Is {
|
|
2389
2389
|
constructor() {
|
|
2390
|
-
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox =
|
|
2390
|
+
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Ae;
|
|
2391
2391
|
}
|
|
2392
2392
|
getBaseTargetFromProps(t, n) {
|
|
2393
2393
|
return t[n];
|
|
2394
2394
|
}
|
|
2395
2395
|
readValueFromInstance(t, n) {
|
|
2396
|
-
if (
|
|
2397
|
-
const s =
|
|
2396
|
+
if (X.has(n)) {
|
|
2397
|
+
const s = be(n);
|
|
2398
2398
|
return s && s.default || 0;
|
|
2399
2399
|
}
|
|
2400
|
-
return n =
|
|
2400
|
+
return n = $s.has(n) ? n : xe(n), t.getAttribute(n);
|
|
2401
2401
|
}
|
|
2402
2402
|
scrapeMotionValuesFromProps(t, n, s) {
|
|
2403
|
-
return
|
|
2403
|
+
return xo(t, n, s);
|
|
2404
2404
|
}
|
|
2405
2405
|
build(t, n, s) {
|
|
2406
|
-
|
|
2406
|
+
_o(t, n, this.isSVGTag, s.transformTemplate);
|
|
2407
2407
|
}
|
|
2408
2408
|
renderInstance(t, n, s, i) {
|
|
2409
|
-
|
|
2409
|
+
Go(t, n, s, i);
|
|
2410
2410
|
}
|
|
2411
2411
|
mount(t) {
|
|
2412
|
-
this.isSVGTag =
|
|
2412
|
+
this.isSVGTag = zo(t.tagName), super.mount(t);
|
|
2413
2413
|
}
|
|
2414
2414
|
}
|
|
2415
|
-
function
|
|
2415
|
+
function jo({ top: e, left: t, right: n, bottom: s }) {
|
|
2416
2416
|
return {
|
|
2417
2417
|
x: { min: t, max: n },
|
|
2418
2418
|
y: { min: e, max: s }
|
|
2419
2419
|
};
|
|
2420
2420
|
}
|
|
2421
|
-
function
|
|
2421
|
+
function Ho(e, t) {
|
|
2422
2422
|
if (!t)
|
|
2423
2423
|
return e;
|
|
2424
2424
|
const n = t({ x: e.left, y: e.top }), s = t({ x: e.right, y: e.bottom });
|
|
@@ -2429,51 +2429,51 @@ function Yo(e, t) {
|
|
|
2429
2429
|
right: s.x
|
|
2430
2430
|
};
|
|
2431
2431
|
}
|
|
2432
|
-
function
|
|
2433
|
-
return Ho(
|
|
2432
|
+
function Yo(e, t) {
|
|
2433
|
+
return jo(Ho(e.getBoundingClientRect(), t));
|
|
2434
2434
|
}
|
|
2435
2435
|
function Xo(e) {
|
|
2436
2436
|
return window.getComputedStyle(e);
|
|
2437
2437
|
}
|
|
2438
|
-
class
|
|
2438
|
+
class qo extends Is {
|
|
2439
2439
|
constructor() {
|
|
2440
|
-
super(...arguments), this.type = "html", this.renderInstance =
|
|
2440
|
+
super(...arguments), this.type = "html", this.renderInstance = Ks;
|
|
2441
2441
|
}
|
|
2442
2442
|
readValueFromInstance(t, n) {
|
|
2443
|
-
if (
|
|
2444
|
-
const s =
|
|
2443
|
+
if (X.has(n)) {
|
|
2444
|
+
const s = be(n);
|
|
2445
2445
|
return s && s.default || 0;
|
|
2446
2446
|
} else {
|
|
2447
|
-
const s = Xo(t), i = (
|
|
2447
|
+
const s = Xo(t), i = (as(n) ? s.getPropertyValue(n) : s[n]) || 0;
|
|
2448
2448
|
return typeof i == "string" ? i.trim() : i;
|
|
2449
2449
|
}
|
|
2450
2450
|
}
|
|
2451
2451
|
measureInstanceViewportBox(t, { transformPagePoint: n }) {
|
|
2452
|
-
return
|
|
2452
|
+
return Yo(t, n);
|
|
2453
2453
|
}
|
|
2454
2454
|
build(t, n, s) {
|
|
2455
|
-
|
|
2455
|
+
Ns(t, n, s.transformTemplate);
|
|
2456
2456
|
}
|
|
2457
2457
|
scrapeMotionValuesFromProps(t, n, s) {
|
|
2458
|
-
return
|
|
2458
|
+
return Os(t, n, s);
|
|
2459
2459
|
}
|
|
2460
2460
|
handleChildMotionValue() {
|
|
2461
2461
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
2462
2462
|
const { children: t } = this.props;
|
|
2463
|
-
|
|
2463
|
+
P(t) && (this.childSubscription = t.on("change", (n) => {
|
|
2464
2464
|
this.current && (this.current.textContent = `${n}`);
|
|
2465
2465
|
}));
|
|
2466
2466
|
}
|
|
2467
2467
|
}
|
|
2468
|
-
function
|
|
2468
|
+
function Zo(e, t) {
|
|
2469
2469
|
return e in t;
|
|
2470
2470
|
}
|
|
2471
|
-
class
|
|
2471
|
+
class Jo extends Rs {
|
|
2472
2472
|
constructor() {
|
|
2473
2473
|
super(...arguments), this.type = "object";
|
|
2474
2474
|
}
|
|
2475
2475
|
readValueFromInstance(t, n) {
|
|
2476
|
-
if (
|
|
2476
|
+
if (Zo(n, t)) {
|
|
2477
2477
|
const s = t[n];
|
|
2478
2478
|
if (typeof s == "string" || typeof s == "number")
|
|
2479
2479
|
return s;
|
|
@@ -2485,7 +2485,7 @@ class Qo extends Ns {
|
|
|
2485
2485
|
delete n.output[t];
|
|
2486
2486
|
}
|
|
2487
2487
|
measureInstanceViewportBox() {
|
|
2488
|
-
return
|
|
2488
|
+
return Ae();
|
|
2489
2489
|
}
|
|
2490
2490
|
build(t, n) {
|
|
2491
2491
|
Object.assign(t.output, n);
|
|
@@ -2497,7 +2497,7 @@ class Qo extends Ns {
|
|
|
2497
2497
|
return 0;
|
|
2498
2498
|
}
|
|
2499
2499
|
}
|
|
2500
|
-
function
|
|
2500
|
+
function Ws(e) {
|
|
2501
2501
|
const t = {
|
|
2502
2502
|
presenceContext: null,
|
|
2503
2503
|
props: {},
|
|
@@ -2511,10 +2511,10 @@ function ks(e) {
|
|
|
2511
2511
|
},
|
|
2512
2512
|
latestValues: {}
|
|
2513
2513
|
}
|
|
2514
|
-
}, n =
|
|
2514
|
+
}, n = So(e) ? new Uo(t) : new qo(t);
|
|
2515
2515
|
n.mount(e), $.set(e, n);
|
|
2516
2516
|
}
|
|
2517
|
-
function
|
|
2517
|
+
function Qo(e) {
|
|
2518
2518
|
const t = {
|
|
2519
2519
|
presenceContext: null,
|
|
2520
2520
|
props: {},
|
|
@@ -2524,58 +2524,58 @@ function ta(e) {
|
|
|
2524
2524
|
},
|
|
2525
2525
|
latestValues: {}
|
|
2526
2526
|
}
|
|
2527
|
-
}, n = new
|
|
2527
|
+
}, n = new Jo(t);
|
|
2528
2528
|
n.mount(e), $.set(e, n);
|
|
2529
2529
|
}
|
|
2530
|
-
function
|
|
2531
|
-
const s =
|
|
2532
|
-
return s.start(
|
|
2530
|
+
function ta(e, t, n) {
|
|
2531
|
+
const s = P(e) ? e : D(e);
|
|
2532
|
+
return s.start(Cs("", s, t, n)), s.animation;
|
|
2533
2533
|
}
|
|
2534
|
-
function
|
|
2535
|
-
return
|
|
2534
|
+
function ea(e, t) {
|
|
2535
|
+
return P(e) || typeof e == "number" || typeof e == "string" && !ce(t);
|
|
2536
2536
|
}
|
|
2537
|
-
function
|
|
2537
|
+
function ks(e, t, n, s) {
|
|
2538
2538
|
const i = [];
|
|
2539
|
-
if (
|
|
2540
|
-
i.push(
|
|
2539
|
+
if (ea(e, t))
|
|
2540
|
+
i.push(ta(e, ce(t) && t.default || t, n && (n.default || n)));
|
|
2541
2541
|
else {
|
|
2542
|
-
const r =
|
|
2542
|
+
const r = Xn(e, t, s), o = r.length;
|
|
2543
2543
|
I(!!o, "No valid elements provided.");
|
|
2544
2544
|
for (let a = 0; a < o; a++) {
|
|
2545
|
-
const l = r[a], u = l instanceof Element ?
|
|
2545
|
+
const l = r[a], u = l instanceof Element ? Ws : Qo;
|
|
2546
2546
|
$.has(l) || u(l);
|
|
2547
2547
|
const c = $.get(l), f = { ...n };
|
|
2548
|
-
"delay" in f && typeof f.delay == "function" && (f.delay = f.delay(a, o)), i.push(...
|
|
2548
|
+
"delay" in f && typeof f.delay == "function" && (f.delay = f.delay(a, o)), i.push(...wo(c, { ...t, transition: f }, {}));
|
|
2549
2549
|
}
|
|
2550
2550
|
}
|
|
2551
2551
|
return i;
|
|
2552
2552
|
}
|
|
2553
|
-
function
|
|
2553
|
+
function na(e, t, n) {
|
|
2554
2554
|
const s = [];
|
|
2555
|
-
return
|
|
2556
|
-
s.push(...
|
|
2555
|
+
return $i(e, t, n, { spring: le }).forEach(({ keyframes: r, transition: o }, a) => {
|
|
2556
|
+
s.push(...ks(a, r, o));
|
|
2557
2557
|
}), s;
|
|
2558
2558
|
}
|
|
2559
|
-
function
|
|
2559
|
+
function sa(e) {
|
|
2560
2560
|
return Array.isArray(e) && Array.isArray(e[0]);
|
|
2561
2561
|
}
|
|
2562
|
-
function
|
|
2562
|
+
function ia(e) {
|
|
2563
2563
|
function t(n, s, i) {
|
|
2564
2564
|
let r = [];
|
|
2565
|
-
|
|
2566
|
-
const o = new
|
|
2565
|
+
sa(n) ? r = na(n, s, e) : r = ks(n, s, i, e);
|
|
2566
|
+
const o = new ae(r);
|
|
2567
2567
|
return e && e.animations.push(o), o;
|
|
2568
2568
|
}
|
|
2569
2569
|
return t;
|
|
2570
2570
|
}
|
|
2571
|
-
const
|
|
2572
|
-
function
|
|
2571
|
+
const ra = ia();
|
|
2572
|
+
function oa(e, t, n) {
|
|
2573
2573
|
e.style.setProperty(`--${t}`, n);
|
|
2574
2574
|
}
|
|
2575
|
-
function
|
|
2575
|
+
function aa(e, t, n) {
|
|
2576
2576
|
e.style[t] = n;
|
|
2577
2577
|
}
|
|
2578
|
-
const
|
|
2578
|
+
const la = /* @__PURE__ */ Rt(() => {
|
|
2579
2579
|
try {
|
|
2580
2580
|
document.createElement("div").animate({ opacity: [1] });
|
|
2581
2581
|
} catch {
|
|
@@ -2583,26 +2583,26 @@ const ua = /* @__PURE__ */ Rt(() => {
|
|
|
2583
2583
|
}
|
|
2584
2584
|
return !0;
|
|
2585
2585
|
}), Tt = /* @__PURE__ */ new WeakMap();
|
|
2586
|
-
function
|
|
2586
|
+
function ua(e, t, n) {
|
|
2587
2587
|
for (let s = 0; s < t.length; s++)
|
|
2588
|
-
t[s] === null && (t[s] = s === 0 ? n() : t[s - 1]), typeof t[s] == "number" &&
|
|
2589
|
-
!
|
|
2588
|
+
t[s] === null && (t[s] = s === 0 ? n() : t[s - 1]), typeof t[s] == "number" && Jt[e] && (t[s] = Jt[e].transform(t[s]));
|
|
2589
|
+
!la() && t.length < 2 && t.unshift(n());
|
|
2590
2590
|
}
|
|
2591
2591
|
const hn = "easeOut";
|
|
2592
2592
|
function dn(e) {
|
|
2593
2593
|
const t = Tt.get(e) || /* @__PURE__ */ new Map();
|
|
2594
2594
|
return Tt.set(e, t), Tt.get(e);
|
|
2595
2595
|
}
|
|
2596
|
-
class
|
|
2596
|
+
class ca {
|
|
2597
2597
|
constructor(t, n, s, i) {
|
|
2598
2598
|
const r = n.startsWith("--");
|
|
2599
|
-
this.setValue = r ?
|
|
2599
|
+
this.setValue = r ? oa : aa, this.options = i, this.updateFinishedPromise(), I(typeof i.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "framer-motion"?`);
|
|
2600
2600
|
const o = dn(t).get(n);
|
|
2601
2601
|
o && o.stop();
|
|
2602
2602
|
const a = () => n.startsWith("--") ? t.style.getPropertyValue(n) : window.getComputedStyle(t)[n];
|
|
2603
|
-
if (Array.isArray(s) || (s = [s]),
|
|
2604
|
-
const u =
|
|
2605
|
-
i.ease =
|
|
2603
|
+
if (Array.isArray(s) || (s = [s]), ua(n, s, a), mt(i.type)) {
|
|
2604
|
+
const u = Hn(i, 100, i.type);
|
|
2605
|
+
i.ease = ct() ? u.ease : hn, i.duration = C(u.duration), i.type = "keyframes";
|
|
2606
2606
|
} else
|
|
2607
2607
|
i.ease = i.ease || hn;
|
|
2608
2608
|
this.removeAnimation = () => {
|
|
@@ -2610,9 +2610,9 @@ class fa {
|
|
|
2610
2610
|
return (u = Tt.get(t)) === null || u === void 0 ? void 0 : u.delete(n);
|
|
2611
2611
|
};
|
|
2612
2612
|
const l = () => {
|
|
2613
|
-
this.setValue(t, n,
|
|
2613
|
+
this.setValue(t, n, yt(s, this.options)), this.cancel(), this.resolveFinishedPromise();
|
|
2614
2614
|
};
|
|
2615
|
-
|
|
2615
|
+
Es() ? (this.animation = Ms(t, n, s, i), i.autoplay === !1 && this.animation.pause(), this.animation.onfinish = l, this.pendingTimeline && Et(this.animation, this.pendingTimeline), dn(t).set(n, this)) : l();
|
|
2616
2616
|
}
|
|
2617
2617
|
get duration() {
|
|
2618
2618
|
return B(this.options.duration || 300);
|
|
@@ -2622,7 +2622,7 @@ class fa {
|
|
|
2622
2622
|
return this.animation ? B(((t = this.animation) === null || t === void 0 ? void 0 : t.currentTime) || 0) : 0;
|
|
2623
2623
|
}
|
|
2624
2624
|
set time(t) {
|
|
2625
|
-
this.animation && (this.animation.currentTime =
|
|
2625
|
+
this.animation && (this.animation.currentTime = C(t));
|
|
2626
2626
|
}
|
|
2627
2627
|
get speed() {
|
|
2628
2628
|
return this.animation ? this.animation.playbackRate : 1;
|
|
@@ -2669,10 +2669,10 @@ class fa {
|
|
|
2669
2669
|
});
|
|
2670
2670
|
}
|
|
2671
2671
|
attachTimeline(t) {
|
|
2672
|
-
return this.animation ?
|
|
2672
|
+
return this.animation ? Et(this.animation, t) : this.pendingTimeline = t, K;
|
|
2673
2673
|
}
|
|
2674
2674
|
}
|
|
2675
|
-
function
|
|
2675
|
+
function fa(e, t, n, s) {
|
|
2676
2676
|
const i = It(e, s), r = i.length;
|
|
2677
2677
|
I(!!r, "No valid element provided.");
|
|
2678
2678
|
const o = [];
|
|
@@ -2681,21 +2681,21 @@ function ha(e, t, n, s) {
|
|
|
2681
2681
|
typeof u.delay == "function" && (u.delay = u.delay(a, r));
|
|
2682
2682
|
for (const c in t) {
|
|
2683
2683
|
const f = t[c], h = {
|
|
2684
|
-
...
|
|
2684
|
+
...fe(n, c)
|
|
2685
2685
|
};
|
|
2686
|
-
h.duration = h.duration ?
|
|
2686
|
+
h.duration = h.duration ? C(h.duration) : h.duration, h.delay = C(h.delay || 0), o.push(new ca(l, c, f, h));
|
|
2687
2687
|
}
|
|
2688
2688
|
}
|
|
2689
2689
|
return o;
|
|
2690
2690
|
}
|
|
2691
|
-
const
|
|
2691
|
+
const ha = (e) => {
|
|
2692
2692
|
function t(n, s, i) {
|
|
2693
|
-
return new
|
|
2693
|
+
return new ae(fa(n, s, i, e));
|
|
2694
2694
|
}
|
|
2695
2695
|
return t;
|
|
2696
|
-
},
|
|
2697
|
-
let
|
|
2698
|
-
function
|
|
2696
|
+
}, Il = /* @__PURE__ */ ha(), Vt = /* @__PURE__ */ new WeakMap();
|
|
2697
|
+
let k;
|
|
2698
|
+
function da(e, t) {
|
|
2699
2699
|
if (t) {
|
|
2700
2700
|
const { inlineSize: n, blockSize: s } = t[0];
|
|
2701
2701
|
return { width: n, height: s };
|
|
@@ -2704,41 +2704,41 @@ function pa(e, t) {
|
|
|
2704
2704
|
height: e.offsetHeight
|
|
2705
2705
|
};
|
|
2706
2706
|
}
|
|
2707
|
-
function
|
|
2707
|
+
function pa({ target: e, contentRect: t, borderBoxSize: n }) {
|
|
2708
2708
|
var s;
|
|
2709
2709
|
(s = Vt.get(e)) === null || s === void 0 || s.forEach((i) => {
|
|
2710
2710
|
i({
|
|
2711
2711
|
target: e,
|
|
2712
2712
|
contentSize: t,
|
|
2713
2713
|
get size() {
|
|
2714
|
-
return
|
|
2714
|
+
return da(e, n);
|
|
2715
2715
|
}
|
|
2716
2716
|
});
|
|
2717
2717
|
});
|
|
2718
2718
|
}
|
|
2719
|
-
function
|
|
2720
|
-
e.forEach(
|
|
2719
|
+
function ma(e) {
|
|
2720
|
+
e.forEach(pa);
|
|
2721
2721
|
}
|
|
2722
|
-
function
|
|
2723
|
-
typeof ResizeObserver > "u" || (
|
|
2722
|
+
function ga() {
|
|
2723
|
+
typeof ResizeObserver > "u" || (k = new ResizeObserver(ma));
|
|
2724
2724
|
}
|
|
2725
|
-
function
|
|
2726
|
-
|
|
2725
|
+
function ya(e, t) {
|
|
2726
|
+
k || ga();
|
|
2727
2727
|
const n = It(e);
|
|
2728
2728
|
return n.forEach((s) => {
|
|
2729
2729
|
let i = Vt.get(s);
|
|
2730
|
-
i || (i = /* @__PURE__ */ new Set(), Vt.set(s, i)), i.add(t),
|
|
2730
|
+
i || (i = /* @__PURE__ */ new Set(), Vt.set(s, i)), i.add(t), k == null || k.observe(s);
|
|
2731
2731
|
}), () => {
|
|
2732
2732
|
n.forEach((s) => {
|
|
2733
2733
|
const i = Vt.get(s);
|
|
2734
|
-
i == null || i.delete(t), i != null && i.size ||
|
|
2734
|
+
i == null || i.delete(t), i != null && i.size || k == null || k.unobserve(s);
|
|
2735
2735
|
});
|
|
2736
2736
|
};
|
|
2737
2737
|
}
|
|
2738
2738
|
const xt = /* @__PURE__ */ new Set();
|
|
2739
|
-
let
|
|
2740
|
-
function
|
|
2741
|
-
|
|
2739
|
+
let ot;
|
|
2740
|
+
function va() {
|
|
2741
|
+
ot = () => {
|
|
2742
2742
|
const e = {
|
|
2743
2743
|
width: window.innerWidth,
|
|
2744
2744
|
height: window.innerHeight
|
|
@@ -2748,17 +2748,17 @@ function ba() {
|
|
|
2748
2748
|
contentSize: e
|
|
2749
2749
|
};
|
|
2750
2750
|
xt.forEach((n) => n(t));
|
|
2751
|
-
}, window.addEventListener("resize",
|
|
2751
|
+
}, window.addEventListener("resize", ot);
|
|
2752
2752
|
}
|
|
2753
|
-
function
|
|
2754
|
-
return xt.add(e),
|
|
2755
|
-
xt.delete(e), !xt.size &&
|
|
2753
|
+
function ba(e) {
|
|
2754
|
+
return xt.add(e), ot || va(), () => {
|
|
2755
|
+
xt.delete(e), !xt.size && ot && (ot = void 0);
|
|
2756
2756
|
};
|
|
2757
2757
|
}
|
|
2758
|
-
function
|
|
2759
|
-
return typeof e == "function" ?
|
|
2758
|
+
function wa(e, t) {
|
|
2759
|
+
return typeof e == "function" ? ba(e) : ya(e, t);
|
|
2760
2760
|
}
|
|
2761
|
-
const
|
|
2761
|
+
const Sa = 50, pn = () => ({
|
|
2762
2762
|
current: 0,
|
|
2763
2763
|
offset: [],
|
|
2764
2764
|
progress: 0,
|
|
@@ -2767,11 +2767,11 @@ const Ta = 50, pn = () => ({
|
|
|
2767
2767
|
targetLength: 0,
|
|
2768
2768
|
containerLength: 0,
|
|
2769
2769
|
velocity: 0
|
|
2770
|
-
}),
|
|
2770
|
+
}), Ta = () => ({
|
|
2771
2771
|
time: 0,
|
|
2772
2772
|
x: pn(),
|
|
2773
2773
|
y: pn()
|
|
2774
|
-
}),
|
|
2774
|
+
}), Va = {
|
|
2775
2775
|
x: {
|
|
2776
2776
|
length: "Width",
|
|
2777
2777
|
position: "Left"
|
|
@@ -2782,15 +2782,15 @@ const Ta = 50, pn = () => ({
|
|
|
2782
2782
|
}
|
|
2783
2783
|
};
|
|
2784
2784
|
function mn(e, t, n, s) {
|
|
2785
|
-
const i = n[t], { length: r, position: o } =
|
|
2786
|
-
i.current = e[`scroll${o}`], i.scrollLength = e[`scroll${r}`] - e[`client${r}`], i.offset.length = 0, i.offset[0] = 0, i.offset[1] = i.scrollLength, i.progress =
|
|
2785
|
+
const i = n[t], { length: r, position: o } = Va[t], a = i.current, l = n.time;
|
|
2786
|
+
i.current = e[`scroll${o}`], i.scrollLength = e[`scroll${r}`] - e[`client${r}`], i.offset.length = 0, i.offset[0] = 0, i.offset[1] = i.scrollLength, i.progress = pt(0, i.scrollLength, i.current);
|
|
2787
2787
|
const u = s - l;
|
|
2788
|
-
i.velocity = u >
|
|
2788
|
+
i.velocity = u > Sa ? 0 : oe(i.current - a, u);
|
|
2789
2789
|
}
|
|
2790
|
-
function
|
|
2790
|
+
function xa(e, t, n) {
|
|
2791
2791
|
mn(e, "x", t, n), mn(e, "y", t, n), t.time = n;
|
|
2792
2792
|
}
|
|
2793
|
-
function
|
|
2793
|
+
function Aa(e, t) {
|
|
2794
2794
|
const n = { x: 0, y: 0 };
|
|
2795
2795
|
let s = e;
|
|
2796
2796
|
for (; s && s !== t; )
|
|
@@ -2829,30 +2829,30 @@ const Ma = {
|
|
|
2829
2829
|
[0, 0],
|
|
2830
2830
|
[1, 1]
|
|
2831
2831
|
]
|
|
2832
|
-
},
|
|
2832
|
+
}, ie = {
|
|
2833
2833
|
start: 0,
|
|
2834
2834
|
center: 0.5,
|
|
2835
2835
|
end: 1
|
|
2836
2836
|
};
|
|
2837
2837
|
function gn(e, t, n = 0) {
|
|
2838
2838
|
let s = 0;
|
|
2839
|
-
if (e in
|
|
2839
|
+
if (e in ie && (e = ie[e]), typeof e == "string") {
|
|
2840
2840
|
const i = parseFloat(e);
|
|
2841
2841
|
e.endsWith("px") ? s = i : e.endsWith("%") ? e = i / 100 : e.endsWith("vw") ? s = i / 100 * document.documentElement.clientWidth : e.endsWith("vh") ? s = i / 100 * document.documentElement.clientHeight : e = i;
|
|
2842
2842
|
}
|
|
2843
2843
|
return typeof e == "number" && (s = t * e), n + s;
|
|
2844
2844
|
}
|
|
2845
|
-
const
|
|
2845
|
+
const Ea = [0, 0];
|
|
2846
2846
|
function Pa(e, t, n, s) {
|
|
2847
|
-
let i = Array.isArray(e) ? e :
|
|
2848
|
-
return typeof e == "number" ? i = [e, e] : typeof e == "string" && (e = e.trim(), e.includes(" ") ? i = e.split(" ") : i = [e,
|
|
2847
|
+
let i = Array.isArray(e) ? e : Ea, r = 0, o = 0;
|
|
2848
|
+
return typeof e == "number" ? i = [e, e] : typeof e == "string" && (e = e.trim(), e.includes(" ") ? i = e.split(" ") : i = [e, ie[e] ? e : "0"]), r = gn(i[0], n, s), o = gn(i[1], t), r - o;
|
|
2849
2849
|
}
|
|
2850
|
-
const
|
|
2851
|
-
function
|
|
2850
|
+
const Ca = { x: 0, y: 0 };
|
|
2851
|
+
function Fa(e) {
|
|
2852
2852
|
return "getBBox" in e && e.tagName !== "svg" ? e.getBBox() : { width: e.clientWidth, height: e.clientHeight };
|
|
2853
2853
|
}
|
|
2854
|
-
function
|
|
2855
|
-
const { offset: s = Ma.All } = n, { target: i = e, axis: r = "y" } = n, o = r === "y" ? "height" : "width", a = i !== e ?
|
|
2854
|
+
function Oa(e, t, n) {
|
|
2855
|
+
const { offset: s = Ma.All } = n, { target: i = e, axis: r = "y" } = n, o = r === "y" ? "height" : "width", a = i !== e ? Aa(i, e) : Ca, l = i === e ? { width: e.scrollWidth, height: e.scrollHeight } : Fa(i), u = {
|
|
2856
2856
|
width: e.clientWidth,
|
|
2857
2857
|
height: e.clientHeight
|
|
2858
2858
|
};
|
|
@@ -2863,9 +2863,9 @@ function Da(e, t, n) {
|
|
|
2863
2863
|
const p = Pa(s[h], u[o], l[o], a[r]);
|
|
2864
2864
|
!c && p !== t[r].interpolatorOffsets[h] && (c = !0), t[r].offset[h] = p;
|
|
2865
2865
|
}
|
|
2866
|
-
c && (t[r].interpolate =
|
|
2866
|
+
c && (t[r].interpolate = Ve(t[r].offset, ue(s)), t[r].interpolatorOffsets = [...t[r].offset]), t[r].progress = t[r].interpolate(t[r].current);
|
|
2867
2867
|
}
|
|
2868
|
-
function
|
|
2868
|
+
function Da(e, t = e, n) {
|
|
2869
2869
|
if (n.x.targetOffset = 0, n.y.targetOffset = 0, t !== e) {
|
|
2870
2870
|
let s = t;
|
|
2871
2871
|
for (; s && s !== e; )
|
|
@@ -2873,101 +2873,101 @@ function Ba(e, t = e, n) {
|
|
|
2873
2873
|
}
|
|
2874
2874
|
n.x.targetLength = t === e ? t.scrollWidth : t.clientWidth, n.y.targetLength = t === e ? t.scrollHeight : t.clientHeight, n.x.containerLength = e.clientWidth, n.y.containerLength = e.clientHeight, process.env.NODE_ENV !== "production" && e && t && t !== e && Bt(getComputedStyle(e).position !== "static", "Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.");
|
|
2875
2875
|
}
|
|
2876
|
-
function
|
|
2876
|
+
function Ba(e, t, n, s = {}) {
|
|
2877
2877
|
return {
|
|
2878
|
-
measure: () =>
|
|
2878
|
+
measure: () => Da(e, s.target, n),
|
|
2879
2879
|
update: (i) => {
|
|
2880
|
-
|
|
2880
|
+
xa(e, n, i), (s.offset || s.target) && Oa(e, n, s);
|
|
2881
2881
|
},
|
|
2882
2882
|
notify: () => t(n)
|
|
2883
2883
|
};
|
|
2884
2884
|
}
|
|
2885
|
-
const
|
|
2886
|
-
function
|
|
2887
|
-
let s =
|
|
2888
|
-
s || (s = /* @__PURE__ */ new Set(),
|
|
2889
|
-
const i =
|
|
2890
|
-
if (s.add(r), !
|
|
2885
|
+
const nt = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), vn = (e) => e === document.documentElement ? window : e;
|
|
2886
|
+
function Me(e, { container: t = document.documentElement, ...n } = {}) {
|
|
2887
|
+
let s = Gt.get(t);
|
|
2888
|
+
s || (s = /* @__PURE__ */ new Set(), Gt.set(t, s));
|
|
2889
|
+
const i = Ta(), r = Ba(t, e, i, n);
|
|
2890
|
+
if (s.add(r), !nt.has(t)) {
|
|
2891
2891
|
const a = () => {
|
|
2892
2892
|
for (const h of s)
|
|
2893
2893
|
h.measure();
|
|
2894
2894
|
}, l = () => {
|
|
2895
2895
|
for (const h of s)
|
|
2896
|
-
h.update(
|
|
2896
|
+
h.update(J.timestamp);
|
|
2897
2897
|
}, u = () => {
|
|
2898
2898
|
for (const h of s)
|
|
2899
2899
|
h.notify();
|
|
2900
2900
|
}, c = () => {
|
|
2901
|
-
|
|
2901
|
+
M.read(a, !1, !0), M.read(l, !1, !0), M.update(u, !1, !0);
|
|
2902
2902
|
};
|
|
2903
|
-
|
|
2903
|
+
nt.set(t, c);
|
|
2904
2904
|
const f = vn(t);
|
|
2905
|
-
window.addEventListener("resize", c, { passive: !0 }), t !== document.documentElement && yn.set(t,
|
|
2905
|
+
window.addEventListener("resize", c, { passive: !0 }), t !== document.documentElement && yn.set(t, wa(t, c)), f.addEventListener("scroll", c, { passive: !0 });
|
|
2906
2906
|
}
|
|
2907
|
-
const o =
|
|
2908
|
-
return
|
|
2907
|
+
const o = nt.get(t);
|
|
2908
|
+
return M.read(o, !1, !0), () => {
|
|
2909
2909
|
var a;
|
|
2910
2910
|
R(o);
|
|
2911
|
-
const l =
|
|
2911
|
+
const l = Gt.get(t);
|
|
2912
2912
|
if (!l || (l.delete(r), l.size))
|
|
2913
2913
|
return;
|
|
2914
|
-
const u =
|
|
2915
|
-
|
|
2914
|
+
const u = nt.get(t);
|
|
2915
|
+
nt.delete(t), u && (vn(t).removeEventListener("scroll", u), (a = yn.get(t)) === null || a === void 0 || a(), window.removeEventListener("resize", u));
|
|
2916
2916
|
};
|
|
2917
2917
|
}
|
|
2918
|
-
function
|
|
2918
|
+
function _s(e, t) {
|
|
2919
2919
|
let n;
|
|
2920
2920
|
const s = () => {
|
|
2921
2921
|
const { currentTime: i } = t, o = (i === null ? 0 : i.value) / 100;
|
|
2922
2922
|
n !== o && e(o), n = o;
|
|
2923
2923
|
};
|
|
2924
|
-
return
|
|
2924
|
+
return M.update(s, !0), () => R(s);
|
|
2925
2925
|
}
|
|
2926
|
-
function
|
|
2926
|
+
function Ra({ source: e, container: t, axis: n = "y" }) {
|
|
2927
2927
|
e && (t = e);
|
|
2928
|
-
const s = { value: 0 }, i =
|
|
2928
|
+
const s = { value: 0 }, i = Me((r) => {
|
|
2929
2929
|
s.value = r[n].progress * 100;
|
|
2930
2930
|
}, { container: t, axis: n });
|
|
2931
2931
|
return { currentTime: s, cancel: i };
|
|
2932
2932
|
}
|
|
2933
2933
|
const zt = /* @__PURE__ */ new Map();
|
|
2934
|
-
function
|
|
2934
|
+
function Gs({ source: e, container: t = document.documentElement, axis: n = "y" } = {}) {
|
|
2935
2935
|
e && (t = e), zt.has(t) || zt.set(t, {});
|
|
2936
2936
|
const s = zt.get(t);
|
|
2937
|
-
return s[n] || (s[n] =
|
|
2937
|
+
return s[n] || (s[n] = zn() ? new ScrollTimeline({ source: t, axis: n }) : Ra({ source: t, axis: n })), s[n];
|
|
2938
2938
|
}
|
|
2939
|
-
function
|
|
2939
|
+
function Ia(e) {
|
|
2940
2940
|
return e.length === 2;
|
|
2941
2941
|
}
|
|
2942
|
-
function
|
|
2942
|
+
function zs(e) {
|
|
2943
2943
|
return e && (e.target || e.offset);
|
|
2944
2944
|
}
|
|
2945
|
-
function
|
|
2946
|
-
return
|
|
2945
|
+
function La(e, t) {
|
|
2946
|
+
return Ia(e) || zs(t) ? Me((n) => {
|
|
2947
2947
|
e(n[t.axis].progress, n);
|
|
2948
|
-
}, t) :
|
|
2948
|
+
}, t) : _s(e, Gs(t));
|
|
2949
2949
|
}
|
|
2950
|
-
function
|
|
2951
|
-
if (
|
|
2952
|
-
return e.pause(),
|
|
2950
|
+
function Na(e, t) {
|
|
2951
|
+
if (zs(t))
|
|
2952
|
+
return e.pause(), Me((n) => {
|
|
2953
2953
|
e.time = e.duration * n[t.axis].progress;
|
|
2954
2954
|
}, t);
|
|
2955
2955
|
{
|
|
2956
|
-
const n =
|
|
2957
|
-
return e.attachTimeline(n, (s) => (s.pause(),
|
|
2956
|
+
const n = Gs(t);
|
|
2957
|
+
return e.attachTimeline(n, (s) => (s.pause(), _s((i) => {
|
|
2958
2958
|
s.time = s.duration * i;
|
|
2959
2959
|
}, n)));
|
|
2960
2960
|
}
|
|
2961
2961
|
}
|
|
2962
|
-
function
|
|
2962
|
+
function $a(e, { axis: t = "y", ...n } = {}) {
|
|
2963
2963
|
const s = { axis: t, ...n };
|
|
2964
|
-
return typeof e == "function" ?
|
|
2964
|
+
return typeof e == "function" ? La(e, s) : Na(e, s);
|
|
2965
2965
|
}
|
|
2966
|
-
const
|
|
2966
|
+
const Ka = {
|
|
2967
2967
|
some: 0,
|
|
2968
2968
|
all: 1
|
|
2969
2969
|
};
|
|
2970
|
-
function
|
|
2970
|
+
function Wa(e, t, { root: n, margin: s, amount: i = "some" } = {}) {
|
|
2971
2971
|
const r = It(e), o = /* @__PURE__ */ new WeakMap(), a = (u) => {
|
|
2972
2972
|
u.forEach((c) => {
|
|
2973
2973
|
const f = o.get(c.target);
|
|
@@ -2980,18 +2980,18 @@ function _a(e, t, { root: n, margin: s, amount: i = "some" } = {}) {
|
|
|
2980
2980
|
}, l = new IntersectionObserver(a, {
|
|
2981
2981
|
root: n,
|
|
2982
2982
|
rootMargin: s,
|
|
2983
|
-
threshold: typeof i == "number" ? i :
|
|
2983
|
+
threshold: typeof i == "number" ? i : Ka[i]
|
|
2984
2984
|
});
|
|
2985
2985
|
return r.forEach((u) => l.observe(u)), () => l.disconnect();
|
|
2986
2986
|
}
|
|
2987
|
-
function
|
|
2987
|
+
function Ll(e, t = "end") {
|
|
2988
2988
|
return (n) => {
|
|
2989
2989
|
n = t === "end" ? Math.min(n, 0.999) : Math.max(n, 1e-3);
|
|
2990
2990
|
const s = n * e, i = t === "end" ? Math.floor(s) : Math.ceil(s);
|
|
2991
2991
|
return H(0, 1, i / e);
|
|
2992
2992
|
};
|
|
2993
2993
|
}
|
|
2994
|
-
function
|
|
2994
|
+
function ka(e, t) {
|
|
2995
2995
|
if (e === "first")
|
|
2996
2996
|
return 0;
|
|
2997
2997
|
{
|
|
@@ -2999,21 +2999,21 @@ function Ga(e, t) {
|
|
|
2999
2999
|
return e === "last" ? n : n / 2;
|
|
3000
3000
|
}
|
|
3001
3001
|
}
|
|
3002
|
-
function
|
|
3002
|
+
function Nl(e = 0.1, { startDelay: t = 0, from: n = 0, ease: s } = {}) {
|
|
3003
3003
|
return (i, r) => {
|
|
3004
|
-
const o = typeof n == "number" ? n :
|
|
3004
|
+
const o = typeof n == "number" ? n : ka(n, r), a = Math.abs(o - i);
|
|
3005
3005
|
let l = e * a;
|
|
3006
3006
|
if (s) {
|
|
3007
3007
|
const u = r * e;
|
|
3008
|
-
l =
|
|
3008
|
+
l = Qt(s)(l / u) * u;
|
|
3009
3009
|
}
|
|
3010
3010
|
return t + l;
|
|
3011
3011
|
};
|
|
3012
3012
|
}
|
|
3013
|
-
const
|
|
3014
|
-
function
|
|
3015
|
-
const t = !Array.isArray(e[0]), n = t ? 0 : -1, s = e[0 + n], i = e[1 + n], r = e[2 + n], o = e[3 + n], a =
|
|
3016
|
-
mixer:
|
|
3013
|
+
const _a = (e) => e && typeof e == "object" && e.mix, Ga = (e) => _a(e) ? e.mix : void 0;
|
|
3014
|
+
function za(...e) {
|
|
3015
|
+
const t = !Array.isArray(e[0]), n = t ? 0 : -1, s = e[0 + n], i = e[1 + n], r = e[2 + n], o = e[3 + n], a = Ve(i, r, {
|
|
3016
|
+
mixer: Ga(r[0]),
|
|
3017
3017
|
...o
|
|
3018
3018
|
});
|
|
3019
3019
|
return t ? a(s) : a;
|
|
@@ -3023,41 +3023,21 @@ function Ua(e, t) {
|
|
|
3023
3023
|
const r = i - n;
|
|
3024
3024
|
r >= t && (R(s), e(r - t));
|
|
3025
3025
|
};
|
|
3026
|
-
return
|
|
3026
|
+
return M.read(s, !0), () => R(s);
|
|
3027
3027
|
}
|
|
3028
|
-
function
|
|
3029
|
-
return Ua(e,
|
|
3028
|
+
function $l(e, t) {
|
|
3029
|
+
return Ua(e, C(t));
|
|
3030
3030
|
}
|
|
3031
3031
|
const bn = (e, t) => Math.abs(e - t);
|
|
3032
|
-
function
|
|
3032
|
+
function Kl(e, t) {
|
|
3033
3033
|
const n = bn(e.x, t.x), s = bn(e.y, t.y);
|
|
3034
3034
|
return Math.sqrt(n ** 2 + s ** 2);
|
|
3035
3035
|
}
|
|
3036
|
-
const
|
|
3037
|
-
function
|
|
3038
|
-
return typeof e == "function" ? e() : In(e);
|
|
3039
|
-
}
|
|
3040
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
3041
|
-
const wn = (e) => typeof e < "u";
|
|
3042
|
-
function Ya(e) {
|
|
3043
|
-
var t;
|
|
3044
|
-
const n = Ha(e);
|
|
3045
|
-
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
3046
|
-
}
|
|
3047
|
-
function qa() {
|
|
3048
|
-
const e = Ln(), t = ei(() => {
|
|
3049
|
-
var n, s;
|
|
3050
|
-
return ["#text", "#comment"].includes((n = e.value) == null ? void 0 : n.$el.nodeName) ? (s = e.value) == null ? void 0 : s.$el.nextElementSibling : Ya(e);
|
|
3051
|
-
});
|
|
3052
|
-
return {
|
|
3053
|
-
primitiveElement: e,
|
|
3054
|
-
currentElement: t
|
|
3055
|
-
};
|
|
3056
|
-
}
|
|
3057
|
-
function Ee(e, t) {
|
|
3036
|
+
const Wl = M, kl = st.reduce((e, t) => (e[t] = (n) => R(n), e), {});
|
|
3037
|
+
function Us(e, t) {
|
|
3058
3038
|
const n = typeof e == "string" && !t ? `${e}Context` : t, s = Symbol(n);
|
|
3059
3039
|
return [(o) => {
|
|
3060
|
-
const a =
|
|
3040
|
+
const a = Js(s, o);
|
|
3061
3041
|
if (a || a === null)
|
|
3062
3042
|
return a;
|
|
3063
3043
|
throw new Error(
|
|
@@ -3065,22 +3045,22 @@ function Ee(e, t) {
|
|
|
3065
3045
|
", "
|
|
3066
3046
|
)}` : `\`${e}\``}`
|
|
3067
3047
|
);
|
|
3068
|
-
}, (o) => (
|
|
3048
|
+
}, (o) => (Qs(s, o), o)];
|
|
3069
3049
|
}
|
|
3070
|
-
function
|
|
3050
|
+
function Y(e) {
|
|
3071
3051
|
return !!(e && e.getVelocity);
|
|
3072
3052
|
}
|
|
3073
|
-
const [
|
|
3074
|
-
function
|
|
3053
|
+
const [ja, Ha] = Us("Motion");
|
|
3054
|
+
function wn(e, t) {
|
|
3075
3055
|
if (typeof e == "object")
|
|
3076
3056
|
return e;
|
|
3077
3057
|
if (e && t)
|
|
3078
3058
|
return t[e];
|
|
3079
3059
|
}
|
|
3080
|
-
function
|
|
3081
|
-
return typeof e != typeof t ? !0 : Array.isArray(e) && Array.isArray(t) ? !
|
|
3060
|
+
function Ya(e, t) {
|
|
3061
|
+
return typeof e != typeof t ? !0 : Array.isArray(e) && Array.isArray(t) ? !Xa(e, t) : e !== t;
|
|
3082
3062
|
}
|
|
3083
|
-
function
|
|
3063
|
+
function Xa(e, t) {
|
|
3084
3064
|
const n = t.length;
|
|
3085
3065
|
if (n !== e.length)
|
|
3086
3066
|
return !1;
|
|
@@ -3089,26 +3069,26 @@ function tl(e, t) {
|
|
|
3089
3069
|
return !1;
|
|
3090
3070
|
return !0;
|
|
3091
3071
|
}
|
|
3092
|
-
function
|
|
3072
|
+
function qa(e, t) {
|
|
3093
3073
|
!e.includes(t) && e.push(t);
|
|
3094
3074
|
}
|
|
3095
|
-
function
|
|
3075
|
+
function Za(e, t) {
|
|
3096
3076
|
const n = e.indexOf(t);
|
|
3097
3077
|
n !== -1 && e.splice(n, 1);
|
|
3098
3078
|
}
|
|
3099
|
-
function
|
|
3079
|
+
function Ja(e, t) {
|
|
3100
3080
|
return e[t] ? { ...e, ...e[t] } : { ...e };
|
|
3101
3081
|
}
|
|
3102
|
-
function
|
|
3082
|
+
function Sn(e) {
|
|
3103
3083
|
return e == null ? void 0 : e.startsWith("--");
|
|
3104
3084
|
}
|
|
3105
|
-
function
|
|
3085
|
+
function Qa() {
|
|
3106
3086
|
}
|
|
3107
|
-
const
|
|
3108
|
-
function
|
|
3087
|
+
const tl = (e) => e;
|
|
3088
|
+
function el(e) {
|
|
3109
3089
|
return typeof e == "number";
|
|
3110
3090
|
}
|
|
3111
|
-
const
|
|
3091
|
+
const nl = [
|
|
3112
3092
|
"animate",
|
|
3113
3093
|
"circle",
|
|
3114
3094
|
"defs",
|
|
@@ -3164,51 +3144,52 @@ const al = [
|
|
|
3164
3144
|
"linearGradient",
|
|
3165
3145
|
"radialGradient",
|
|
3166
3146
|
"textPath"
|
|
3167
|
-
],
|
|
3168
|
-
function
|
|
3169
|
-
return
|
|
3147
|
+
], sl = new Set(nl);
|
|
3148
|
+
function il(e) {
|
|
3149
|
+
return sl.has(e);
|
|
3170
3150
|
}
|
|
3171
|
-
|
|
3151
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
3152
|
+
const Tn = (e) => typeof e < "u", Vn = {
|
|
3172
3153
|
syntax: "<angle>",
|
|
3173
3154
|
initialValue: "0deg",
|
|
3174
3155
|
toDefaultUnit: (e) => `${e}deg`
|
|
3175
|
-
},
|
|
3156
|
+
}, rl = {
|
|
3176
3157
|
translate: {
|
|
3177
3158
|
syntax: "<length-percentage>",
|
|
3178
3159
|
initialValue: "0px",
|
|
3179
3160
|
toDefaultUnit: (e) => `${e}px`
|
|
3180
3161
|
},
|
|
3181
|
-
rotate:
|
|
3162
|
+
rotate: Vn,
|
|
3182
3163
|
scale: {
|
|
3183
3164
|
syntax: "<number>",
|
|
3184
3165
|
initialValue: 1,
|
|
3185
|
-
toDefaultUnit:
|
|
3166
|
+
toDefaultUnit: tl
|
|
3186
3167
|
},
|
|
3187
|
-
skew:
|
|
3188
|
-
},
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3168
|
+
skew: Vn
|
|
3169
|
+
}, ol = ["translate", "scale", "rotate", "skew"], al = ["", "X", "Y", "Z"], Ee = /* @__PURE__ */ new Map(), Ct = ["transformPerspective", "x", "y", "z", "translateX", "translateY", "translateZ", "scale", "scaleX", "scaleY", "rotate", "rotateX", "rotateY", "rotateZ", "skew", "skewX", "skewY"];
|
|
3170
|
+
ol.forEach((e) => {
|
|
3171
|
+
al.forEach((t) => {
|
|
3172
|
+
Ct.push(e + t), Ee.set(
|
|
3192
3173
|
e + t,
|
|
3193
|
-
|
|
3174
|
+
rl[e]
|
|
3194
3175
|
);
|
|
3195
3176
|
});
|
|
3196
3177
|
});
|
|
3197
|
-
const
|
|
3178
|
+
const ll = new Set(Ct), ul = (e) => ll.has(e), xn = {
|
|
3198
3179
|
x: "translateX",
|
|
3199
3180
|
y: "translateY",
|
|
3200
3181
|
z: "translateZ"
|
|
3201
3182
|
};
|
|
3202
|
-
function
|
|
3203
|
-
return
|
|
3183
|
+
function cl([e], [t]) {
|
|
3184
|
+
return Ct.indexOf(e) - Ct.indexOf(t);
|
|
3204
3185
|
}
|
|
3205
|
-
function
|
|
3186
|
+
function fl(e, [t, n]) {
|
|
3206
3187
|
return `${e} ${t}(${n})`;
|
|
3207
3188
|
}
|
|
3208
|
-
function
|
|
3209
|
-
return e.sort(
|
|
3189
|
+
function hl(e) {
|
|
3190
|
+
return e.sort(cl).reduce(fl, "").trim();
|
|
3210
3191
|
}
|
|
3211
|
-
const
|
|
3192
|
+
const dl = {
|
|
3212
3193
|
translate: [0, 0],
|
|
3213
3194
|
rotate: 0,
|
|
3214
3195
|
scale: 1,
|
|
@@ -3216,35 +3197,95 @@ const yl = {
|
|
|
3216
3197
|
x: 0,
|
|
3217
3198
|
y: 0,
|
|
3218
3199
|
z: 0
|
|
3219
|
-
},
|
|
3200
|
+
}, pl = {
|
|
3220
3201
|
get: (e, t) => {
|
|
3221
|
-
let n =
|
|
3202
|
+
let n = Sn(t) ? e.style.getPropertyValue(t) : getComputedStyle(e)[t];
|
|
3222
3203
|
if (!n && n !== "0") {
|
|
3223
|
-
const s =
|
|
3204
|
+
const s = Ee.get(t);
|
|
3224
3205
|
s && (n = s.initialValue);
|
|
3225
3206
|
}
|
|
3226
3207
|
return n;
|
|
3227
3208
|
},
|
|
3228
3209
|
set: (e, t, n) => {
|
|
3229
|
-
|
|
3210
|
+
Sn(t) ? e.style.setProperty(t, n) : e.style[t] = n;
|
|
3230
3211
|
}
|
|
3231
3212
|
};
|
|
3232
|
-
function
|
|
3213
|
+
function Ut(e) {
|
|
3233
3214
|
var s;
|
|
3234
3215
|
const t = {}, n = [];
|
|
3235
3216
|
for (let i in e) {
|
|
3236
3217
|
let r = e[i];
|
|
3237
|
-
r =
|
|
3218
|
+
r = Y(r) ? r.get() : r, ul(i) && i in xn && (i = xn[i]);
|
|
3238
3219
|
let o = Array.isArray(r) ? r[0] : r;
|
|
3239
|
-
const a =
|
|
3240
|
-
a ? (o =
|
|
3241
|
-
}
|
|
3242
|
-
return n.length && (t.transform =
|
|
3220
|
+
const a = Ee.get(i);
|
|
3221
|
+
a ? (o = el(r) ? (s = a.toDefaultUnit) == null ? void 0 : s.call(a, r) : r, n.push([i, o])) : t[i] = o;
|
|
3222
|
+
}
|
|
3223
|
+
return n.length && (t.transform = hl(n)), t;
|
|
3224
|
+
}
|
|
3225
|
+
const An = {
|
|
3226
|
+
fill: !0,
|
|
3227
|
+
stroke: !0,
|
|
3228
|
+
strokeWidth: !0,
|
|
3229
|
+
opacity: !0,
|
|
3230
|
+
fillOpacity: !0,
|
|
3231
|
+
strokeOpacity: !0,
|
|
3232
|
+
strokeLinecap: !0,
|
|
3233
|
+
strokeLinejoin: !0,
|
|
3234
|
+
strokeDasharray: !0,
|
|
3235
|
+
strokeDashoffset: !0,
|
|
3236
|
+
cx: !0,
|
|
3237
|
+
cy: !0,
|
|
3238
|
+
r: !0,
|
|
3239
|
+
d: !0,
|
|
3240
|
+
x: !0,
|
|
3241
|
+
y: !0,
|
|
3242
|
+
x1: !0,
|
|
3243
|
+
y1: !0,
|
|
3244
|
+
x2: !0,
|
|
3245
|
+
y2: !0,
|
|
3246
|
+
points: !0,
|
|
3247
|
+
pathLength: !0,
|
|
3248
|
+
transform: !0,
|
|
3249
|
+
viewBox: !0,
|
|
3250
|
+
width: !0,
|
|
3251
|
+
height: !0,
|
|
3252
|
+
preserveAspectRatio: !0,
|
|
3253
|
+
clipPath: !0,
|
|
3254
|
+
filter: !0,
|
|
3255
|
+
mask: !0,
|
|
3256
|
+
stopColor: !0,
|
|
3257
|
+
stopOpacity: !0,
|
|
3258
|
+
gradientTransform: !0,
|
|
3259
|
+
gradientUnits: !0,
|
|
3260
|
+
spreadMethod: !0,
|
|
3261
|
+
markerEnd: !0,
|
|
3262
|
+
markerMid: !0,
|
|
3263
|
+
markerStart: !0,
|
|
3264
|
+
textAnchor: !0,
|
|
3265
|
+
dominantBaseline: !0,
|
|
3266
|
+
fontFamily: !0,
|
|
3267
|
+
fontSize: !0,
|
|
3268
|
+
fontWeight: !0,
|
|
3269
|
+
letterSpacing: !0,
|
|
3270
|
+
vectorEffect: !0
|
|
3271
|
+
};
|
|
3272
|
+
function ml(e) {
|
|
3273
|
+
const t = {}, n = {};
|
|
3274
|
+
for (const s in e)
|
|
3275
|
+
if (s in An) {
|
|
3276
|
+
const i = An[s], r = typeof i == "string" ? i : s, o = e[s];
|
|
3277
|
+
t[r] = Y(o) ? o.get() : o;
|
|
3278
|
+
} else
|
|
3279
|
+
n[s] = e[s];
|
|
3280
|
+
return {
|
|
3281
|
+
attributes: t,
|
|
3282
|
+
style: n
|
|
3283
|
+
};
|
|
3243
3284
|
}
|
|
3244
|
-
function
|
|
3245
|
-
return e ? e.flatMap((t) => t.type ===
|
|
3285
|
+
function js(e) {
|
|
3286
|
+
return e ? e.flatMap((t) => t.type === ti ? js(t.children) : [t]) : [];
|
|
3246
3287
|
}
|
|
3247
|
-
const
|
|
3288
|
+
const gl = Ot({
|
|
3248
3289
|
name: "PrimitiveSlot",
|
|
3249
3290
|
inheritAttrs: !1,
|
|
3250
3291
|
setup(e, { attrs: t, slots: n }) {
|
|
@@ -3252,20 +3293,20 @@ const vl = Ot({
|
|
|
3252
3293
|
var l, u;
|
|
3253
3294
|
if (!n.default)
|
|
3254
3295
|
return null;
|
|
3255
|
-
const s =
|
|
3296
|
+
const s = js(n.default()), i = s.findIndex((c) => c.type !== ei);
|
|
3256
3297
|
if (i === -1)
|
|
3257
3298
|
return s;
|
|
3258
3299
|
const r = s[i];
|
|
3259
3300
|
(l = r.props) == null || delete l.ref;
|
|
3260
|
-
const o = r.props ?
|
|
3301
|
+
const o = r.props ? re(t, r.props) : t;
|
|
3261
3302
|
t.class && ((u = r.props) != null && u.class) && delete r.props.class;
|
|
3262
|
-
const a =
|
|
3303
|
+
const a = ni(r, o);
|
|
3263
3304
|
for (const c in o)
|
|
3264
3305
|
c.startsWith("on") && (a.props || (a.props = {}), a.props[c] = o[c]);
|
|
3265
3306
|
return s.length === 1 ? a : (s[i] = a, s);
|
|
3266
3307
|
};
|
|
3267
3308
|
}
|
|
3268
|
-
}),
|
|
3309
|
+
}), yl = Ot({
|
|
3269
3310
|
name: "Primitive",
|
|
3270
3311
|
inheritAttrs: !1,
|
|
3271
3312
|
props: {
|
|
@@ -3280,33 +3321,33 @@ const vl = Ot({
|
|
|
3280
3321
|
},
|
|
3281
3322
|
setup(e, { attrs: t, slots: n }) {
|
|
3282
3323
|
const s = e.asChild ? "template" : e.as;
|
|
3283
|
-
return typeof s == "string" && ["area", "img", "input"].includes(s) ? () => $t(s, t) : s !== "template" ? () => $t(e.as, t, { default: n.default }) : () => $t(
|
|
3324
|
+
return typeof s == "string" && ["area", "img", "input"].includes(s) ? () => $t(s, t) : s !== "template" ? () => $t(e.as, t, { default: n.default }) : () => $t(gl, t, { default: n.default });
|
|
3284
3325
|
}
|
|
3285
3326
|
});
|
|
3286
|
-
var
|
|
3287
|
-
},
|
|
3327
|
+
var Hs = function() {
|
|
3328
|
+
}, Ys = function() {
|
|
3288
3329
|
};
|
|
3289
|
-
process.env.NODE_ENV !== "production" && (
|
|
3330
|
+
process.env.NODE_ENV !== "production" && (Hs = function(e, t) {
|
|
3290
3331
|
!e && typeof console < "u" && console.warn(t);
|
|
3291
|
-
},
|
|
3332
|
+
}, Ys = function(e, t) {
|
|
3292
3333
|
if (!e)
|
|
3293
3334
|
throw new Error(t);
|
|
3294
3335
|
});
|
|
3295
|
-
class
|
|
3336
|
+
class Xs {
|
|
3296
3337
|
constructor(t) {
|
|
3297
3338
|
this.state = t;
|
|
3298
3339
|
}
|
|
3299
3340
|
update() {
|
|
3300
3341
|
}
|
|
3301
3342
|
}
|
|
3302
|
-
class
|
|
3343
|
+
class vl {
|
|
3303
3344
|
constructor(t) {
|
|
3304
3345
|
this.features = [], this.features = [
|
|
3346
|
+
new bl(t),
|
|
3347
|
+
new wl(t),
|
|
3305
3348
|
new Sl(t),
|
|
3306
|
-
new Tl(t),
|
|
3307
|
-
new Vl(t),
|
|
3308
3349
|
// new DragGesture(state),
|
|
3309
|
-
new
|
|
3350
|
+
new Tl(t)
|
|
3310
3351
|
];
|
|
3311
3352
|
}
|
|
3312
3353
|
mount() {
|
|
@@ -3319,12 +3360,12 @@ class wl {
|
|
|
3319
3360
|
this.features.forEach((t) => t.update());
|
|
3320
3361
|
}
|
|
3321
3362
|
}
|
|
3322
|
-
function
|
|
3363
|
+
function ft(e, t, n) {
|
|
3323
3364
|
e.dispatchEvent(
|
|
3324
3365
|
new CustomEvent(t, { detail: { originalEvent: n } })
|
|
3325
3366
|
);
|
|
3326
3367
|
}
|
|
3327
|
-
class
|
|
3368
|
+
class Pe extends Xs {
|
|
3328
3369
|
updateGestureSubscriptions() {
|
|
3329
3370
|
const t = this.isActive();
|
|
3330
3371
|
t && !this.removeGestureSubscriptions ? this.removeGestureSubscriptions = this.subscribeEvents() : !t && this.removeGestureSubscriptions && (this.removeGestureSubscriptions(), this.removeGestureSubscriptions = void 0);
|
|
@@ -3334,20 +3375,20 @@ class Ce extends Js {
|
|
|
3334
3375
|
(t = this.removeGestureSubscriptions) == null || t.call(this);
|
|
3335
3376
|
}
|
|
3336
3377
|
}
|
|
3337
|
-
function
|
|
3378
|
+
function Mn(e, t, n) {
|
|
3338
3379
|
return (s) => {
|
|
3339
|
-
s.pointerType && s.pointerType !== "mouse" || (n(),
|
|
3380
|
+
s.pointerType && s.pointerType !== "mouse" || (n(), ft(e, t, s));
|
|
3340
3381
|
};
|
|
3341
3382
|
}
|
|
3342
|
-
class
|
|
3383
|
+
class bl extends Pe {
|
|
3343
3384
|
isActive() {
|
|
3344
3385
|
return !!this.state.getOptions().hover;
|
|
3345
3386
|
}
|
|
3346
3387
|
constructor(t) {
|
|
3347
3388
|
super(t), this.subscribeEvents = () => {
|
|
3348
|
-
const n = this.state.getElement(), s =
|
|
3389
|
+
const n = this.state.getElement(), s = Mn(n, "hoverstart", () => {
|
|
3349
3390
|
this.state.setActive("hover", !0);
|
|
3350
|
-
}), i =
|
|
3391
|
+
}), i = Mn(n, "hoverend", () => {
|
|
3351
3392
|
this.state.setActive("hover", !1);
|
|
3352
3393
|
});
|
|
3353
3394
|
return n.addEventListener("pointerenter", s), n.addEventListener("pointerleave", i), () => {
|
|
@@ -3362,16 +3403,16 @@ class Sl extends Ce {
|
|
|
3362
3403
|
this.updateGestureSubscriptions();
|
|
3363
3404
|
}
|
|
3364
3405
|
}
|
|
3365
|
-
class
|
|
3406
|
+
class wl extends Pe {
|
|
3366
3407
|
isActive() {
|
|
3367
3408
|
return !!this.state.getOptions().press;
|
|
3368
3409
|
}
|
|
3369
3410
|
constructor(t) {
|
|
3370
3411
|
super(t), this.subscribeEvents = () => {
|
|
3371
3412
|
const n = this.state.getElement(), s = (r) => {
|
|
3372
|
-
this.state.setActive("press", !1),
|
|
3413
|
+
this.state.setActive("press", !1), ft(n, "pressend", r), window.removeEventListener("pointerup", s);
|
|
3373
3414
|
}, i = (r) => {
|
|
3374
|
-
this.state.setActive("press", !0),
|
|
3415
|
+
this.state.setActive("press", !0), ft(n, "pressstart", r), window.addEventListener("pointerup", s);
|
|
3375
3416
|
};
|
|
3376
3417
|
return n.addEventListener("pointerdown", i), () => {
|
|
3377
3418
|
n.removeEventListener("pointerdown", i), window.removeEventListener("pointerup", s);
|
|
@@ -3385,7 +3426,7 @@ class Tl extends Ce {
|
|
|
3385
3426
|
this.updateGestureSubscriptions();
|
|
3386
3427
|
}
|
|
3387
3428
|
}
|
|
3388
|
-
class
|
|
3429
|
+
class Sl extends Pe {
|
|
3389
3430
|
isActive() {
|
|
3390
3431
|
return !!this.state.getOptions().inView;
|
|
3391
3432
|
}
|
|
@@ -3393,10 +3434,10 @@ class Vl extends Ce {
|
|
|
3393
3434
|
super(t), this.subscribeEvents = () => {
|
|
3394
3435
|
var r;
|
|
3395
3436
|
const n = this.state.getElement(), { once: s, ...i } = ((r = this.state.getOptions()) == null ? void 0 : r.inViewOptions) || {};
|
|
3396
|
-
return
|
|
3397
|
-
if (this.state.setActive("inView", !0),
|
|
3437
|
+
return Wa(n, (o) => {
|
|
3438
|
+
if (this.state.setActive("inView", !0), ft(n, "viewenter", o), !s)
|
|
3398
3439
|
return (a) => {
|
|
3399
|
-
this.state.setActive("inView", !1),
|
|
3440
|
+
this.state.setActive("inView", !1), ft(n, "viewleave", a);
|
|
3400
3441
|
};
|
|
3401
3442
|
}, i);
|
|
3402
3443
|
};
|
|
@@ -3408,7 +3449,7 @@ class Vl extends Ce {
|
|
|
3408
3449
|
this.updateGestureSubscriptions();
|
|
3409
3450
|
}
|
|
3410
3451
|
}
|
|
3411
|
-
class
|
|
3452
|
+
class Tl extends Xs {
|
|
3412
3453
|
constructor() {
|
|
3413
3454
|
super(...arguments), this.handlers = {};
|
|
3414
3455
|
}
|
|
@@ -3457,35 +3498,35 @@ class xl extends Js {
|
|
|
3457
3498
|
});
|
|
3458
3499
|
}
|
|
3459
3500
|
}
|
|
3460
|
-
let
|
|
3461
|
-
const
|
|
3462
|
-
function
|
|
3463
|
-
if (!
|
|
3501
|
+
let G;
|
|
3502
|
+
const En = (e) => e.next(), Vl = (e) => e.animateUpdates();
|
|
3503
|
+
function xl() {
|
|
3504
|
+
if (!G)
|
|
3464
3505
|
return;
|
|
3465
|
-
const e =
|
|
3466
|
-
e.forEach(
|
|
3506
|
+
const e = G.sort(Ml).map(Vl);
|
|
3507
|
+
e.forEach(En), e.forEach(En), G = void 0;
|
|
3467
3508
|
}
|
|
3468
|
-
function
|
|
3469
|
-
|
|
3509
|
+
function Pn(e) {
|
|
3510
|
+
G ? qa(G, e) : (G = [e], requestAnimationFrame(xl));
|
|
3470
3511
|
}
|
|
3471
|
-
function
|
|
3472
|
-
|
|
3512
|
+
function Al(e) {
|
|
3513
|
+
G && Za(G, e);
|
|
3473
3514
|
}
|
|
3474
|
-
function
|
|
3515
|
+
function Ml(e, t) {
|
|
3475
3516
|
return e.getDepth() - t.getDepth();
|
|
3476
3517
|
}
|
|
3477
|
-
function
|
|
3518
|
+
function Cn(e, t, n) {
|
|
3478
3519
|
return new CustomEvent(e, { detail: { target: t, isExit: n } });
|
|
3479
3520
|
}
|
|
3480
3521
|
const Fn = ["initial", "animate", "inView", "hover", "press", "exit", "drag"], Ft = /* @__PURE__ */ new WeakMap();
|
|
3481
|
-
class
|
|
3522
|
+
class El {
|
|
3482
3523
|
constructor(t, n) {
|
|
3483
3524
|
this.element = null, this.context = {}, this.activeStates = {
|
|
3484
3525
|
initial: !0,
|
|
3485
3526
|
animate: !0
|
|
3486
3527
|
}, this.options = t, this.parent = n, this.depth = (n == null ? void 0 : n.depth) + 1 || 0, this.initContext();
|
|
3487
3528
|
const s = t.initial === !1 ? "animate" : "initial";
|
|
3488
|
-
this.featureManager = new
|
|
3529
|
+
this.featureManager = new vl(this), this.initTarget(s);
|
|
3489
3530
|
}
|
|
3490
3531
|
initContext() {
|
|
3491
3532
|
var t;
|
|
@@ -3493,19 +3534,19 @@ class Pl {
|
|
|
3493
3534
|
this.context[n] = typeof this.options[n] == "string" ? this.options[n] : (t = this.parent) == null ? void 0 : t.context[n];
|
|
3494
3535
|
}
|
|
3495
3536
|
initTarget(t) {
|
|
3496
|
-
this.baseTarget =
|
|
3537
|
+
this.baseTarget = wn(this.options[t] || this.context[t], this.options.variants) || {}, this.target = { ...this.baseTarget };
|
|
3497
3538
|
}
|
|
3498
3539
|
get initial() {
|
|
3499
|
-
return
|
|
3540
|
+
return Tn(this.options.initial) ? this.options.initial : this.context.initial;
|
|
3500
3541
|
}
|
|
3501
3542
|
mount(t) {
|
|
3502
3543
|
var s;
|
|
3503
|
-
|
|
3544
|
+
Ys(
|
|
3504
3545
|
!!t,
|
|
3505
3546
|
"Animation state must be mounted with valid Element"
|
|
3506
|
-
), this.element = t, Ft.set(t, this), $.get(t) ||
|
|
3547
|
+
), this.element = t, Ft.set(t, this), $.get(t) || Ws(t);
|
|
3507
3548
|
const n = $.get(t);
|
|
3508
|
-
if (this.visualElement = n, n.
|
|
3549
|
+
if (this.visualElement = n, n.update(this.options, (s = this.parent) == null ? void 0 : s.context), typeof this.initial == "object")
|
|
3509
3550
|
for (const i in this.initial)
|
|
3510
3551
|
n.setStaticValue(i, this.initial[i]);
|
|
3511
3552
|
else if (typeof this.initial == "string" && this.options.variants)
|
|
@@ -3515,14 +3556,14 @@ class Pl {
|
|
|
3515
3556
|
}
|
|
3516
3557
|
unmount() {
|
|
3517
3558
|
var t;
|
|
3518
|
-
Ft.delete(this.element),
|
|
3559
|
+
Ft.delete(this.element), Al(this), (t = $.get(this.element)) == null || t.unmount(), this.featureManager.unmount();
|
|
3519
3560
|
}
|
|
3520
3561
|
update(t) {
|
|
3521
3562
|
var n;
|
|
3522
|
-
this.options = t, this.visualElement.update(this.options, (n = this.parent) == null ? void 0 : n.context), this.featureManager.update(),
|
|
3563
|
+
this.options = t, this.visualElement.update(this.options, (n = this.parent) == null ? void 0 : n.context), this.featureManager.update(), Pn(this);
|
|
3523
3564
|
}
|
|
3524
3565
|
setActive(t, n) {
|
|
3525
|
-
this.element && (this.activeStates[t] = n,
|
|
3566
|
+
this.element && (this.activeStates[t] = n, Pn(this));
|
|
3526
3567
|
}
|
|
3527
3568
|
*animateUpdates() {
|
|
3528
3569
|
const t = this.target;
|
|
@@ -3531,15 +3572,15 @@ class Pl {
|
|
|
3531
3572
|
for (const l of Fn) {
|
|
3532
3573
|
if (!this.activeStates[l])
|
|
3533
3574
|
continue;
|
|
3534
|
-
const u =
|
|
3535
|
-
|
|
3575
|
+
const u = wn(
|
|
3576
|
+
Tn(this.options[l]) ? this.options[l] : this.context[l],
|
|
3536
3577
|
this.options.variants
|
|
3537
3578
|
);
|
|
3538
3579
|
if (!u)
|
|
3539
3580
|
continue;
|
|
3540
3581
|
const c = { ...t, ...u };
|
|
3541
3582
|
for (const f in c)
|
|
3542
|
-
f !== "transition" && (this.target[f] = u[f], n[f] =
|
|
3583
|
+
f !== "transition" && (this.target[f] = u[f], n[f] = Ja(
|
|
3543
3584
|
u.transition ?? this.options.transition ?? {},
|
|
3544
3585
|
f
|
|
3545
3586
|
));
|
|
@@ -3550,11 +3591,11 @@ class Pl {
|
|
|
3550
3591
|
]), i = [];
|
|
3551
3592
|
s.forEach((l) => {
|
|
3552
3593
|
var u;
|
|
3553
|
-
this.target[l] === void 0 && (this.target[l] = this.baseTarget[l]),
|
|
3554
|
-
() =>
|
|
3594
|
+
this.target[l] === void 0 && (this.target[l] = this.baseTarget[l]), Ya(t[l], this.target[l]) && ((u = this.baseTarget)[l] ?? (u[l] = pl.get(this.element, l)), i.push(
|
|
3595
|
+
() => ra(
|
|
3555
3596
|
this.element,
|
|
3556
3597
|
{
|
|
3557
|
-
[l]: this.target[l] === "none" ?
|
|
3598
|
+
[l]: this.target[l] === "none" ? dl[l] : this.target[l]
|
|
3558
3599
|
},
|
|
3559
3600
|
n[l] || {}
|
|
3560
3601
|
)
|
|
@@ -3564,13 +3605,13 @@ class Pl {
|
|
|
3564
3605
|
if (!r.length)
|
|
3565
3606
|
return;
|
|
3566
3607
|
const o = this.target;
|
|
3567
|
-
this.element.dispatchEvent(
|
|
3608
|
+
this.element.dispatchEvent(Cn("motionstart", o));
|
|
3568
3609
|
const a = this.activeStates.exit;
|
|
3569
3610
|
Promise.all(r).then(() => {
|
|
3570
|
-
this.element.dispatchEvent(
|
|
3611
|
+
this.element.dispatchEvent(Cn("motioncomplete", {
|
|
3571
3612
|
...o
|
|
3572
3613
|
}, a));
|
|
3573
|
-
}).catch(
|
|
3614
|
+
}).catch(Qa);
|
|
3574
3615
|
}
|
|
3575
3616
|
isMounted() {
|
|
3576
3617
|
return !!this.element;
|
|
@@ -3588,11 +3629,16 @@ class Pl {
|
|
|
3588
3629
|
return this.target;
|
|
3589
3630
|
}
|
|
3590
3631
|
}
|
|
3591
|
-
const
|
|
3632
|
+
const at = /* @__PURE__ */ new WeakMap();
|
|
3633
|
+
function On(e) {
|
|
3634
|
+
const t = at.get(e);
|
|
3635
|
+
t && e.removeEventListener("motioncomplete", t), at.delete(e);
|
|
3636
|
+
}
|
|
3637
|
+
const [Pl, Cl] = Us("AnimatePresenceContext"), _l = /* @__PURE__ */ Ot({
|
|
3592
3638
|
name: "Motion",
|
|
3593
|
-
inheritAttrs: !
|
|
3639
|
+
inheritAttrs: !1,
|
|
3594
3640
|
__name: "Motion",
|
|
3595
|
-
props: /* @__PURE__ */
|
|
3641
|
+
props: /* @__PURE__ */ si({
|
|
3596
3642
|
as: {},
|
|
3597
3643
|
asChild: { type: Boolean },
|
|
3598
3644
|
inViewOptions: {},
|
|
@@ -3623,49 +3669,53 @@ const zl = /* @__PURE__ */ Ot({
|
|
|
3623
3669
|
inView: void 0
|
|
3624
3670
|
}),
|
|
3625
3671
|
setup(e) {
|
|
3626
|
-
const t = e, { initial: n } =
|
|
3672
|
+
const t = e, { initial: n, safeUnmount: s } = Pl({ initial: ii(void 0), safeUnmount: () => !0 }), i = ja(null), r = ri(), o = new El(
|
|
3627
3673
|
{
|
|
3674
|
+
...r,
|
|
3628
3675
|
...t
|
|
3629
3676
|
},
|
|
3630
|
-
|
|
3677
|
+
i
|
|
3631
3678
|
);
|
|
3632
|
-
|
|
3633
|
-
const
|
|
3634
|
-
|
|
3635
|
-
|
|
3679
|
+
Ha(o);
|
|
3680
|
+
const a = oi();
|
|
3681
|
+
In(() => {
|
|
3682
|
+
o.mount(a == null ? void 0 : a.vnode.el), o.update({
|
|
3683
|
+
...r,
|
|
3636
3684
|
...t,
|
|
3637
|
-
style: { ...
|
|
3638
|
-
initial: n.value === !1 ? n.value : t.initial === !0 ? void 0 : t.initial
|
|
3685
|
+
style: { ...Ut(o.getTarget()), ...t.style }
|
|
3639
3686
|
});
|
|
3640
3687
|
}), Dt(() => {
|
|
3641
|
-
|
|
3642
|
-
|
|
3688
|
+
s(a == null ? void 0 : a.vnode.el) && o.unmount();
|
|
3689
|
+
}), ai(() => {
|
|
3690
|
+
o.update({
|
|
3691
|
+
...r,
|
|
3643
3692
|
...t,
|
|
3644
3693
|
initial: n.value === !1 ? n.value : t.initial === !0 ? void 0 : t.initial
|
|
3645
3694
|
});
|
|
3646
3695
|
});
|
|
3647
|
-
function
|
|
3648
|
-
|
|
3696
|
+
function l() {
|
|
3697
|
+
const u = { ...r };
|
|
3698
|
+
Object.keys(r).forEach((f) => {
|
|
3699
|
+
Y(r[f]) && (u[f] = r[f].get());
|
|
3700
|
+
});
|
|
3701
|
+
let c = {};
|
|
3702
|
+
if (!o.isMounted() && il(t.as)) {
|
|
3703
|
+
const { attributes: f, style: h } = ml(o.getTarget());
|
|
3704
|
+
Object.assign(u, f), Object.assign(c, h, t.style);
|
|
3705
|
+
}
|
|
3706
|
+
return c = Ut(c), u.style = Ut(c), u;
|
|
3649
3707
|
}
|
|
3650
|
-
return (
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
}, {
|
|
3657
|
-
default: _n(() => [
|
|
3658
|
-
Gn(l.$slots, "default")
|
|
3708
|
+
return (u, c) => (Ln(), Nn(li(yl), re({
|
|
3709
|
+
as: u.as,
|
|
3710
|
+
"as-child": u.asChild
|
|
3711
|
+
}, l()), {
|
|
3712
|
+
default: $n(() => [
|
|
3713
|
+
Kn(u.$slots, "default")
|
|
3659
3714
|
]),
|
|
3660
3715
|
_: 3
|
|
3661
|
-
},
|
|
3716
|
+
}, 16, ["as", "as-child"]));
|
|
3662
3717
|
}
|
|
3663
|
-
}),
|
|
3664
|
-
function On(e) {
|
|
3665
|
-
const t = ie.get(e);
|
|
3666
|
-
t && e.removeEventListener("motioncomplete", t), ie.delete(e);
|
|
3667
|
-
}
|
|
3668
|
-
const [jl, Fl] = Ee("AnimatePresenceContext"), Ul = /* @__PURE__ */ Ot({
|
|
3718
|
+
}), Gl = /* @__PURE__ */ Ot({
|
|
3669
3719
|
name: "AnimatePresence",
|
|
3670
3720
|
inheritAttrs: !1,
|
|
3671
3721
|
__name: "AnimatePresence",
|
|
@@ -3676,9 +3726,12 @@ const [jl, Fl] = Ee("AnimatePresenceContext"), Ul = /* @__PURE__ */ Ot({
|
|
|
3676
3726
|
as: {}
|
|
3677
3727
|
},
|
|
3678
3728
|
setup(e) {
|
|
3679
|
-
const t = e, { initial: n } =
|
|
3680
|
-
|
|
3681
|
-
initial: n
|
|
3729
|
+
const t = e, { initial: n } = ui(t);
|
|
3730
|
+
Cl({
|
|
3731
|
+
initial: n,
|
|
3732
|
+
safeUnmount(r) {
|
|
3733
|
+
return !at.has(r);
|
|
3734
|
+
}
|
|
3682
3735
|
});
|
|
3683
3736
|
function s(r) {
|
|
3684
3737
|
const o = Ft.get(r);
|
|
@@ -3691,11 +3744,11 @@ const [jl, Fl] = Ee("AnimatePresenceContext"), Ul = /* @__PURE__ */ Ot({
|
|
|
3691
3744
|
a.setActive("exit", !0), On(r);
|
|
3692
3745
|
function l(u) {
|
|
3693
3746
|
var c;
|
|
3694
|
-
(c = u == null ? void 0 : u.detail) != null && c.isExit && o();
|
|
3747
|
+
(c = u == null ? void 0 : u.detail) != null && c.isExit && (at.delete(r), a.unmount(), o());
|
|
3695
3748
|
}
|
|
3696
|
-
|
|
3749
|
+
at.set(r, l), r.addEventListener("motioncomplete", l);
|
|
3697
3750
|
}
|
|
3698
|
-
return (r, o) => (
|
|
3751
|
+
return (r, o) => (Ln(), Nn(ci(r.multiple ? fi : hi), re({
|
|
3699
3752
|
tag: r.multiple ? r.as : void 0,
|
|
3700
3753
|
css: !1,
|
|
3701
3754
|
mode: r.mode === "wait" ? "out-in" : void 0
|
|
@@ -3703,15 +3756,15 @@ const [jl, Fl] = Ee("AnimatePresenceContext"), Ul = /* @__PURE__ */ Ot({
|
|
|
3703
3756
|
onEnter: s,
|
|
3704
3757
|
onLeave: i
|
|
3705
3758
|
}), {
|
|
3706
|
-
default:
|
|
3707
|
-
|
|
3759
|
+
default: $n(() => [
|
|
3760
|
+
Kn(r.$slots, "default")
|
|
3708
3761
|
]),
|
|
3709
3762
|
_: 3
|
|
3710
3763
|
}, 16, ["tag", "mode"]));
|
|
3711
3764
|
}
|
|
3712
3765
|
});
|
|
3713
|
-
function
|
|
3714
|
-
const t = D(e()), n = () => t.set(e()), s = () =>
|
|
3766
|
+
function Ce(e) {
|
|
3767
|
+
const t = D(e()), n = () => t.set(e()), s = () => M.preRender(n, !1, !0);
|
|
3715
3768
|
let i;
|
|
3716
3769
|
const r = (a) => {
|
|
3717
3770
|
i = a.map((l) => l.on("change", s));
|
|
@@ -3726,24 +3779,24 @@ function Pe(e) {
|
|
|
3726
3779
|
value: t
|
|
3727
3780
|
};
|
|
3728
3781
|
}
|
|
3729
|
-
function
|
|
3730
|
-
|
|
3731
|
-
const { value: t, subscribe: n, unsubscribe: s } =
|
|
3732
|
-
return n(
|
|
3733
|
-
s(),
|
|
3782
|
+
function Fl(e) {
|
|
3783
|
+
_.current = [];
|
|
3784
|
+
const { value: t, subscribe: n, unsubscribe: s } = Ce(e);
|
|
3785
|
+
return n(_.current), _.current = void 0, Wn(() => {
|
|
3786
|
+
s(), _.current = [], e(), n(_.current), _.current = void 0;
|
|
3734
3787
|
}), t;
|
|
3735
3788
|
}
|
|
3736
|
-
function
|
|
3789
|
+
function zl(e, t, n, s) {
|
|
3737
3790
|
if (typeof e == "function")
|
|
3738
|
-
return
|
|
3739
|
-
const i = typeof t == "function" ? t :
|
|
3791
|
+
return Fl(e);
|
|
3792
|
+
const i = typeof t == "function" ? t : za(t, n, s);
|
|
3740
3793
|
return Array.isArray(e) ? Dn(
|
|
3741
3794
|
e,
|
|
3742
3795
|
i
|
|
3743
3796
|
) : Dn([e], ([r]) => i(r));
|
|
3744
3797
|
}
|
|
3745
3798
|
function Dn(e, t) {
|
|
3746
|
-
const n = [], { value: s, subscribe: i } =
|
|
3799
|
+
const n = [], { value: s, subscribe: i } = Ce(() => {
|
|
3747
3800
|
n.length = 0;
|
|
3748
3801
|
const r = e.length;
|
|
3749
3802
|
for (let o = 0; o < r; o++)
|
|
@@ -3752,40 +3805,40 @@ function Dn(e, t) {
|
|
|
3752
3805
|
});
|
|
3753
3806
|
return i(e), s;
|
|
3754
3807
|
}
|
|
3755
|
-
function
|
|
3808
|
+
function Ol(e) {
|
|
3756
3809
|
let t = 0;
|
|
3757
3810
|
const n = ({ timestamp: i, delta: r }) => {
|
|
3758
3811
|
t || (t = i), e(i - t, r);
|
|
3759
3812
|
}, s = () => R(n);
|
|
3760
|
-
|
|
3761
|
-
s(),
|
|
3762
|
-
}), Dt(() => s()),
|
|
3813
|
+
Wn(() => {
|
|
3814
|
+
s(), M.update(n, !0);
|
|
3815
|
+
}), Dt(() => s()), M.update(n, !0);
|
|
3763
3816
|
}
|
|
3764
|
-
function
|
|
3817
|
+
function Ul() {
|
|
3765
3818
|
const e = D(0);
|
|
3766
|
-
return
|
|
3819
|
+
return Ol((t) => e.set(t)), e;
|
|
3767
3820
|
}
|
|
3768
|
-
function
|
|
3821
|
+
function jl(e, ...t) {
|
|
3769
3822
|
const n = e.length;
|
|
3770
3823
|
function s() {
|
|
3771
3824
|
let o = "";
|
|
3772
3825
|
for (let a = 0; a < n; a++) {
|
|
3773
3826
|
o += e[a];
|
|
3774
3827
|
const l = t[a];
|
|
3775
|
-
l && (o +=
|
|
3828
|
+
l && (o += Y(l) ? l.get() : l);
|
|
3776
3829
|
}
|
|
3777
3830
|
return o;
|
|
3778
3831
|
}
|
|
3779
|
-
const { value: i, subscribe: r } =
|
|
3780
|
-
return r(t.filter(
|
|
3832
|
+
const { value: i, subscribe: r } = Ce(s);
|
|
3833
|
+
return r(t.filter(Y)), i;
|
|
3781
3834
|
}
|
|
3782
3835
|
function Bn(e) {
|
|
3783
3836
|
return typeof e == "number" ? e : parseFloat(e);
|
|
3784
3837
|
}
|
|
3785
|
-
function
|
|
3838
|
+
function Hl(e, t = {}) {
|
|
3786
3839
|
let n = null;
|
|
3787
3840
|
const s = D(
|
|
3788
|
-
|
|
3841
|
+
Y(e) ? Bn(e.get()) : e
|
|
3789
3842
|
);
|
|
3790
3843
|
let i = s.get(), r = () => {
|
|
3791
3844
|
};
|
|
@@ -3793,7 +3846,7 @@ function Xl(e, t = {}) {
|
|
|
3793
3846
|
n && (n.stop(), n = null);
|
|
3794
3847
|
}, a = () => {
|
|
3795
3848
|
const l = n;
|
|
3796
|
-
(l == null ? void 0 : l.time) === 0 && l.sample(
|
|
3849
|
+
(l == null ? void 0 : l.time) === 0 && l.sample(J.delta), o(), n = Zr({
|
|
3797
3850
|
keyframes: [s.get(), i],
|
|
3798
3851
|
velocity: s.getVelocity(),
|
|
3799
3852
|
type: "spring",
|
|
@@ -3803,20 +3856,20 @@ function Xl(e, t = {}) {
|
|
|
3803
3856
|
onUpdate: r
|
|
3804
3857
|
});
|
|
3805
3858
|
};
|
|
3806
|
-
return
|
|
3807
|
-
const l = s.attach((u, c) => (i = u, r = c,
|
|
3808
|
-
|
|
3809
|
-
}, { immediate: !0 }),
|
|
3859
|
+
return kn(() => JSON.stringify(t), () => {
|
|
3860
|
+
const l = s.attach((u, c) => (i = u, r = c, M.update(a), s.get()), o);
|
|
3861
|
+
di(() => l());
|
|
3862
|
+
}, { immediate: !0 }), Y(e) && e.on("change", (l) => {
|
|
3810
3863
|
s.set(Bn(l));
|
|
3811
3864
|
}), s;
|
|
3812
3865
|
}
|
|
3813
3866
|
function Rn(e, t) {
|
|
3814
|
-
|
|
3867
|
+
Hs(
|
|
3815
3868
|
!!(!t || t.value),
|
|
3816
3869
|
`You have defined a ${e} options but the provided ref is not yet hydrated, probably because it's defined higher up the tree. Try calling useScroll() in the same component as the ref.`
|
|
3817
3870
|
);
|
|
3818
3871
|
}
|
|
3819
|
-
function
|
|
3872
|
+
function Dl() {
|
|
3820
3873
|
return {
|
|
3821
3874
|
scrollX: D(0),
|
|
3822
3875
|
scrollY: D(0),
|
|
@@ -3824,15 +3877,15 @@ function Bl() {
|
|
|
3824
3877
|
scrollYProgress: D(0)
|
|
3825
3878
|
};
|
|
3826
3879
|
}
|
|
3827
|
-
function
|
|
3880
|
+
function Yl({
|
|
3828
3881
|
container: e,
|
|
3829
3882
|
target: t,
|
|
3830
3883
|
...n
|
|
3831
3884
|
} = {}) {
|
|
3832
|
-
const s =
|
|
3885
|
+
const s = Dl();
|
|
3833
3886
|
let i;
|
|
3834
3887
|
const r = () => {
|
|
3835
|
-
i == null || i(), i =
|
|
3888
|
+
i == null || i(), i = $a(
|
|
3836
3889
|
(o, { x: a, y: l }) => {
|
|
3837
3890
|
s.scrollX.set(a.current), s.scrollXProgress.set(a.progress), s.scrollY.set(l.current), s.scrollYProgress.set(l.progress);
|
|
3838
3891
|
},
|
|
@@ -3843,64 +3896,64 @@ function Zl({
|
|
|
3843
3896
|
}
|
|
3844
3897
|
);
|
|
3845
3898
|
};
|
|
3846
|
-
return
|
|
3899
|
+
return In(() => {
|
|
3847
3900
|
Rn("target", t), Rn("container", e), r();
|
|
3848
|
-
}), Dt(() => i == null ? void 0 : i()),
|
|
3901
|
+
}), Dt(() => i == null ? void 0 : i()), kn(
|
|
3849
3902
|
() => [e == null ? void 0 : e.value, t == null ? void 0 : t.value, n.offset],
|
|
3850
3903
|
r
|
|
3851
3904
|
), s;
|
|
3852
3905
|
}
|
|
3853
3906
|
export {
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3907
|
+
Gl as AnimatePresence,
|
|
3908
|
+
_l as Motion,
|
|
3909
|
+
Si as MotionValue,
|
|
3910
|
+
ra as animate,
|
|
3911
|
+
Il as animateMini,
|
|
3912
|
+
ns as anticipate,
|
|
3913
|
+
he as backIn,
|
|
3914
|
+
es as backInOut,
|
|
3915
|
+
ts as backOut,
|
|
3863
3916
|
R as cancelFrame,
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3917
|
+
kl as cancelSync,
|
|
3918
|
+
de as circIn,
|
|
3919
|
+
ss as circInOut,
|
|
3920
|
+
Ji as circOut,
|
|
3868
3921
|
H as clamp,
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3922
|
+
ia as createScopedAnimate,
|
|
3923
|
+
vt as cubicBezier,
|
|
3924
|
+
$l as delay,
|
|
3872
3925
|
bn as distance,
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3926
|
+
Kl as distance2D,
|
|
3927
|
+
Rr as easeIn,
|
|
3928
|
+
Ss as easeInOut,
|
|
3929
|
+
Ir as easeOut,
|
|
3930
|
+
M as frame,
|
|
3931
|
+
J as frameData,
|
|
3932
|
+
Rl as frameSteps,
|
|
3933
|
+
Wa as inView,
|
|
3881
3934
|
en as inertia,
|
|
3882
|
-
|
|
3935
|
+
Ve as interpolate,
|
|
3883
3936
|
I as invariant,
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3937
|
+
Mt as keyframes,
|
|
3938
|
+
Jn as mirrorEasing,
|
|
3939
|
+
Vs as mix,
|
|
3887
3940
|
D as motionValue,
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3941
|
+
Se as pipe,
|
|
3942
|
+
pt as progress,
|
|
3943
|
+
Qn as reverseEasing,
|
|
3944
|
+
$a as scroll,
|
|
3945
|
+
Me as scrollInfo,
|
|
3946
|
+
le as spring,
|
|
3947
|
+
Nl as stagger,
|
|
3948
|
+
Ll as steps,
|
|
3949
|
+
Wl as sync,
|
|
3950
|
+
za as transform,
|
|
3951
|
+
jl as useMotionTemplate,
|
|
3899
3952
|
D as useMotionValue,
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3953
|
+
Yl as useScroll,
|
|
3954
|
+
Hl as useSpring,
|
|
3955
|
+
Ul as useTime,
|
|
3956
|
+
zl as useTransform,
|
|
3957
|
+
ht as warning,
|
|
3958
|
+
Di as wrap
|
|
3906
3959
|
};
|