@wix/interact 2.5.16 → 2.5.17
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/cjs/index.js +1 -1
- package/dist/cjs/react.js +1 -1
- package/dist/cjs/web.js +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/react.js +2 -2
- package/dist/es/web.js +2 -2
- package/dist/{index-Cv5FJznH.mjs → index-Bf1NVJq8.mjs} +523 -523
- package/dist/index-Bf1NVJq8.mjs.map +1 -0
- package/dist/index-CycaHryL.js +24 -0
- package/dist/index-CycaHryL.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/core/add.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-Cv5FJznH.mjs.map +0 -1
- package/dist/index-DsygTJ-K.js +0 -24
- package/dist/index-DsygTJ-K.js.map +0 -1
|
@@ -10,13 +10,13 @@ function q(e, t) {
|
|
|
10
10
|
}) : e;
|
|
11
11
|
}
|
|
12
12
|
function qt(e, t) {
|
|
13
|
-
return e.trigger === "viewEnter" && t.triggerType === "once" &&
|
|
13
|
+
return e.trigger === "viewEnter" && t.triggerType === "once" && B(e) === B(t);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function B(e) {
|
|
16
16
|
const { key: t, listContainer: n, listItemSelector: s, selector: i } = e;
|
|
17
17
|
return `${t}\0${n || ""}\0${s || ""}\0${i || ""}`;
|
|
18
18
|
}
|
|
19
|
-
class
|
|
19
|
+
class X {
|
|
20
20
|
animations;
|
|
21
21
|
options;
|
|
22
22
|
ready;
|
|
@@ -120,7 +120,7 @@ class Q {
|
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
const Qe = (e) => e, kt = (e) => 1 - Math.cos(e * Math.PI / 2), Mt = (e) => Math.sin(e * Math.PI / 2), Pt = (e) => -(Math.cos(Math.PI * e) - 1) / 2, xt = (e) => e ** 2, Lt = (e) => 1 - (1 - e) ** 2, Ft = (e) => e < 0.5 ? 2 * e ** 2 : 1 - (-2 * e + 2) ** 2 / 2, Rt = (e) => e ** 3, Nt = (e) => 1 - (1 - e) ** 3, zt = (e) => e < 0.5 ? 4 * e ** 3 : 1 - (-2 * e + 2) ** 3 / 2, jt = (e) => e ** 4,
|
|
123
|
+
const Qe = (e) => e, kt = (e) => 1 - Math.cos(e * Math.PI / 2), Mt = (e) => Math.sin(e * Math.PI / 2), Pt = (e) => -(Math.cos(Math.PI * e) - 1) / 2, xt = (e) => e ** 2, Lt = (e) => 1 - (1 - e) ** 2, Ft = (e) => e < 0.5 ? 2 * e ** 2 : 1 - (-2 * e + 2) ** 2 / 2, Rt = (e) => e ** 3, Nt = (e) => 1 - (1 - e) ** 3, zt = (e) => e < 0.5 ? 4 * e ** 3 : 1 - (-2 * e + 2) ** 3 / 2, jt = (e) => e ** 4, Ht = (e) => 1 - (1 - e) ** 4, Dt = (e) => e < 0.5 ? 8 * e ** 4 : 1 - (-2 * e + 2) ** 4 / 2, Gt = (e) => e ** 5, Wt = (e) => 1 - (1 - e) ** 5, Vt = (e) => e < 0.5 ? 16 * e ** 5 : 1 - (-2 * e + 2) ** 5 / 2, Yt = (e) => e === 0 ? 0 : 2 ** (10 * e - 10), Kt = (e) => e === 1 ? 1 : 1 - 2 ** (-10 * e), Bt = (e) => e === 0 ? 0 : e === 1 ? 1 : e < 0.5 ? 2 ** (20 * e - 10) / 2 : (2 - 2 ** (-20 * e + 10)) / 2, Ut = (e) => 1 - Math.sqrt(1 - e ** 2), Qt = (e) => Math.sqrt(1 - (e - 1) ** 2), Xt = (e) => e < 0.5 ? (1 - Math.sqrt(1 - 4 * e ** 2)) / 2 : (Math.sqrt(-(2 * e - 3) * (2 * e - 1)) + 1) / 2, Zt = (e) => 2.70158 * e ** 3 - 1.70158 * e ** 2, Jt = (e) => 1 + 2.70158 * (e - 1) ** 3 + 1.70158 * (e - 1) ** 2, en = (e, t = 1.70158 * 1.525) => e < 0.5 ? (2 * e) ** 2 * ((t + 1) * 2 * e - t) / 2 : ((2 * e - 2) ** 2 * ((t + 1) * (e * 2 - 2) + t) + 2) / 2, Pe = {
|
|
124
124
|
linear: Qe,
|
|
125
125
|
sineIn: kt,
|
|
126
126
|
sineOut: Mt,
|
|
@@ -132,8 +132,8 @@ const Qe = (e) => e, kt = (e) => 1 - Math.cos(e * Math.PI / 2), Mt = (e) => Math
|
|
|
132
132
|
cubicOut: Nt,
|
|
133
133
|
cubicInOut: zt,
|
|
134
134
|
quartIn: jt,
|
|
135
|
-
quartOut:
|
|
136
|
-
quartInOut:
|
|
135
|
+
quartOut: Ht,
|
|
136
|
+
quartInOut: Dt,
|
|
137
137
|
quintIn: Gt,
|
|
138
138
|
quintOut: Wt,
|
|
139
139
|
quintInOut: Vt,
|
|
@@ -147,31 +147,31 @@ const Qe = (e) => e, kt = (e) => 1 - Math.cos(e * Math.PI / 2), Mt = (e) => Math
|
|
|
147
147
|
backOut: Jt,
|
|
148
148
|
backInOut: en
|
|
149
149
|
}, G = (e, t, n, s, i) => {
|
|
150
|
-
const o = 3 * t, r = 3 * (s - 2 * t), a = 1 - 3 * s + 3 * t, c = 3 * n,
|
|
151
|
-
let
|
|
150
|
+
const o = 3 * t, r = 3 * (s - 2 * t), a = 1 - 3 * s + 3 * t, c = 3 * n, l = 3 * (i - 2 * n), u = 1 - 3 * i + 3 * n;
|
|
151
|
+
let f;
|
|
152
152
|
if (a === 0)
|
|
153
|
-
|
|
153
|
+
f = r === 0 ? `(${e} / ${o})` : `((sqrt(max(0, ${o * o} + ${4 * r} * ${e})) - ${o}) / ${2 * r})`;
|
|
154
154
|
else {
|
|
155
|
-
const d = r / (3 * a),
|
|
155
|
+
const d = r / (3 * a), h = 2 * Math.pow(r, 3) - 9 * o * r * a, m = 54 * Math.pow(a, 3), p = (3 * a * o - r * r) / (9 * a * a), g = `((${h} - ${27 * a * a} * ${e}) / ${m})`;
|
|
156
156
|
if (p < 0) {
|
|
157
157
|
const v = 2 * Math.sqrt(-p);
|
|
158
158
|
let y = 0;
|
|
159
159
|
for (const $ of [0, 1, 2])
|
|
160
160
|
[0, 0.25, 0.5, 0.75, 1].every((S) => {
|
|
161
161
|
const I = Math.min(
|
|
162
|
-
Math.max(2 * (
|
|
162
|
+
Math.max(2 * (h - 27 * a * a * S) / (m * p * v), -1),
|
|
163
163
|
1
|
|
164
164
|
), O = v * Math.cos((Math.acos(I) - $ * 2 * Math.PI) / 3) - d;
|
|
165
165
|
return O >= -1e-6 && O <= 1.000001;
|
|
166
166
|
}) && (y = $);
|
|
167
167
|
const E = `(acos(clamp(-1, ${2 / (p * v)} * ${g}, 1)) - ${360 * y}deg) / 3`;
|
|
168
|
-
|
|
168
|
+
f = `(${v} * cos(${E}) - ${d})`;
|
|
169
169
|
} else {
|
|
170
170
|
const v = `sqrt(pow(${g}, 2) + ${Math.pow(p, 3)})`;
|
|
171
|
-
|
|
171
|
+
f = `(pow(${v} - ${g}, 1 / 3) - pow(${v} + ${g}, 1 / 3) - ${d})`;
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
return `(${u} * pow(${
|
|
174
|
+
return `(${u} * pow(${f}, 3) + ${l} * pow(${f}, 2) + ${c} * ${f})`;
|
|
175
175
|
}, xe = {
|
|
176
176
|
linear: (e) => e,
|
|
177
177
|
ease: (e) => G(e, 0.25, 0.1, 0.25, 1),
|
|
@@ -241,7 +241,7 @@ const nn = /^(webkit|moz|ms|o)(?=[A-Z])/, sn = Object.assign(/* @__PURE__ */ Obj
|
|
|
241
241
|
"animation-timing-function": "easing",
|
|
242
242
|
"animation-composition": "composite"
|
|
243
243
|
});
|
|
244
|
-
function
|
|
244
|
+
function le(e) {
|
|
245
245
|
return e.startsWith("--") ? e : (nn.test(e) ? `-${e}` : e).replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`);
|
|
246
246
|
}
|
|
247
247
|
function on(e) {
|
|
@@ -270,15 +270,15 @@ function an(e) {
|
|
|
270
270
|
t[s] = i;
|
|
271
271
|
}), t || e;
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function re(e) {
|
|
274
274
|
return e ? Le[e] || e : Le.linear;
|
|
275
275
|
}
|
|
276
276
|
function cn(e, t, n, s) {
|
|
277
|
-
const i = 3 * e, o = 3 * (n - e) - i, r = 1 - i - o, a = 3 * t, c = 3 * (s - t) - a,
|
|
278
|
-
function m
|
|
279
|
-
let p =
|
|
277
|
+
const i = 3 * e, o = 3 * (n - e) - i, r = 1 - i - o, a = 3 * t, c = 3 * (s - t) - a, l = 1 - a - c, u = (m) => ((r * m + o) * m + i) * m, f = (m) => ((l * m + c) * m + a) * m, d = (m) => (3 * r * m + 2 * o) * m + i;
|
|
278
|
+
function h(m) {
|
|
279
|
+
let p = m;
|
|
280
280
|
for (let y = 0; y < 8; y++) {
|
|
281
|
-
const E = u(p) -
|
|
281
|
+
const E = u(p) - m;
|
|
282
282
|
if (Math.abs(E) < 1e-7) return p;
|
|
283
283
|
const $ = d(p);
|
|
284
284
|
if (Math.abs($) < 1e-6) break;
|
|
@@ -287,12 +287,12 @@ function cn(e, t, n, s) {
|
|
|
287
287
|
let g = 0, v = 1;
|
|
288
288
|
for (p = (g + v) / 2; v - g > 1e-7; ) {
|
|
289
289
|
const y = u(p);
|
|
290
|
-
if (Math.abs(y -
|
|
291
|
-
|
|
290
|
+
if (Math.abs(y - m) < 1e-7) return p;
|
|
291
|
+
m > y ? g = p : v = p, p = (g + v) / 2;
|
|
292
292
|
}
|
|
293
293
|
return p;
|
|
294
294
|
}
|
|
295
|
-
return (
|
|
295
|
+
return (m) => m <= 0 ? 0 : m >= 1 ? 1 : f(h(m));
|
|
296
296
|
}
|
|
297
297
|
function Ze(e) {
|
|
298
298
|
const t = e.match(
|
|
@@ -308,7 +308,7 @@ function un(e) {
|
|
|
308
308
|
if (!(!t || t.some(isNaN)))
|
|
309
309
|
return cn(...t);
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function ln(e) {
|
|
312
312
|
const t = Ze(e);
|
|
313
313
|
if (!(!t || t.some(isNaN)))
|
|
314
314
|
return (n) => G(n, ...t);
|
|
@@ -323,9 +323,9 @@ function Je(e) {
|
|
|
323
323
|
const r = o.split(/\s+/), a = parseFloat(r[0]);
|
|
324
324
|
if (isNaN(a)) return;
|
|
325
325
|
const c = [];
|
|
326
|
-
for (let
|
|
327
|
-
if (r[
|
|
328
|
-
const u = parseFloat(r[
|
|
326
|
+
for (let l = 1; l < r.length; l++)
|
|
327
|
+
if (r[l].endsWith("%")) {
|
|
328
|
+
const u = parseFloat(r[l]) / 100;
|
|
329
329
|
if (isNaN(u)) return;
|
|
330
330
|
c.push(u);
|
|
331
331
|
}
|
|
@@ -339,9 +339,9 @@ function Je(e) {
|
|
|
339
339
|
const o = i - 1;
|
|
340
340
|
let r = i;
|
|
341
341
|
for (; r < s.length && s[r].pos === null; ) r++;
|
|
342
|
-
const a = s[o].pos, c = s[r].pos,
|
|
342
|
+
const a = s[o].pos, c = s[r].pos, l = r - o;
|
|
343
343
|
for (let u = o + 1; u < r; u++)
|
|
344
|
-
s[u].pos = a + (c - a) * (u - o) /
|
|
344
|
+
s[u].pos = a + (c - a) * (u - o) / l;
|
|
345
345
|
i = r + 1;
|
|
346
346
|
} else
|
|
347
347
|
i++;
|
|
@@ -349,7 +349,7 @@ function Je(e) {
|
|
|
349
349
|
s[o].pos < s[o - 1].pos && (s[o].pos = s[o - 1].pos);
|
|
350
350
|
return s;
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function fn(e) {
|
|
353
353
|
const t = Je(e);
|
|
354
354
|
if (t)
|
|
355
355
|
return (n) => {
|
|
@@ -385,14 +385,14 @@ function dn(e) {
|
|
|
385
385
|
function et(e) {
|
|
386
386
|
if (!e) return;
|
|
387
387
|
const t = Pe[e];
|
|
388
|
-
return t || (un(e) ??
|
|
388
|
+
return t || (un(e) ?? fn(e) ?? Pe.linear);
|
|
389
389
|
}
|
|
390
390
|
function hn(e) {
|
|
391
391
|
if (!e) return;
|
|
392
392
|
const t = xe[e];
|
|
393
|
-
return t || (
|
|
393
|
+
return t || (ln(e) ?? dn(e) ?? xe.linear);
|
|
394
394
|
}
|
|
395
|
-
class mn extends
|
|
395
|
+
class mn extends X {
|
|
396
396
|
animationGroups;
|
|
397
397
|
delay;
|
|
398
398
|
offset;
|
|
@@ -429,12 +429,12 @@ class mn extends Q {
|
|
|
429
429
|
i.animations.forEach((r, a) => {
|
|
430
430
|
const c = r.effect;
|
|
431
431
|
if (!c) return;
|
|
432
|
-
const { delay:
|
|
432
|
+
const { delay: l, duration: u, iterations: f } = this.timingOptions[o][a], d = l + t[o], h = n - (d + u * f);
|
|
433
433
|
if (i.isCSS && this.sequenceId) {
|
|
434
|
-
const { target:
|
|
435
|
-
|
|
434
|
+
const { target: m } = c;
|
|
435
|
+
m instanceof HTMLElement && (m.style.setProperty(`--motion-${this.sequenceId}-index`, `${o}`), m.style.setProperty(`--motion-${this.sequenceId}-last`, `${s}`)), c.updateTiming({ endDelay: h });
|
|
436
436
|
} else
|
|
437
|
-
c.updateTiming({ delay: d + this.delay, endDelay:
|
|
437
|
+
c.updateTiming({ delay: d + this.delay, endDelay: h });
|
|
438
438
|
});
|
|
439
439
|
});
|
|
440
440
|
}
|
|
@@ -443,8 +443,8 @@ class mn extends Q {
|
|
|
443
443
|
for (let s = 0; s < this.timingOptions.length; s++) {
|
|
444
444
|
const i = this.timingOptions[s].reduce((o, r) => {
|
|
445
445
|
if (!r) return o;
|
|
446
|
-
const { delay: a, duration: c, iterations:
|
|
447
|
-
return Math.max(o, a + c *
|
|
446
|
+
const { delay: a, duration: c, iterations: l } = r;
|
|
447
|
+
return Math.max(o, a + c * l);
|
|
448
448
|
}, 0);
|
|
449
449
|
n.push(t[s] + i);
|
|
450
450
|
}
|
|
@@ -461,7 +461,7 @@ class mn extends Q {
|
|
|
461
461
|
for (const { index: s, group: i } of n) {
|
|
462
462
|
const o = Math.min(s, this.animationGroups.length);
|
|
463
463
|
this.animationGroups.splice(o, 0, i), this.timingOptions.splice(o, 0, i.getTimingOptions());
|
|
464
|
-
const r = [...i.animations], a = this.animationGroups.slice(0, o).reduce((c,
|
|
464
|
+
const r = [...i.animations], a = this.animationGroups.slice(0, o).reduce((c, l) => c + l.animations.length, 0);
|
|
465
465
|
this.animations.splice(a, 0, ...r);
|
|
466
466
|
}
|
|
467
467
|
this.applyOffsets(), this.ready = Promise.all(this.animationGroups.map((s) => s.ready)).then(() => {
|
|
@@ -633,7 +633,7 @@ class pn {
|
|
|
633
633
|
function gn(e) {
|
|
634
634
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
635
635
|
}
|
|
636
|
-
var
|
|
636
|
+
var ae = { exports: {} }, Fe = ae.exports, Re;
|
|
637
637
|
function vn() {
|
|
638
638
|
return Re || (Re = 1, (function(e) {
|
|
639
639
|
(function(t) {
|
|
@@ -656,7 +656,7 @@ function vn() {
|
|
|
656
656
|
* @param {Array} tasks
|
|
657
657
|
*/
|
|
658
658
|
runTasks: function(u) {
|
|
659
|
-
for (var
|
|
659
|
+
for (var f; f = u.shift(); ) f();
|
|
660
660
|
},
|
|
661
661
|
/**
|
|
662
662
|
* Adds a job to the read batch and
|
|
@@ -666,8 +666,8 @@ function vn() {
|
|
|
666
666
|
* @param {Object} ctx the context to be bound to `fn` (optional).
|
|
667
667
|
* @public
|
|
668
668
|
*/
|
|
669
|
-
measure: function(u,
|
|
670
|
-
var d =
|
|
669
|
+
measure: function(u, f) {
|
|
670
|
+
var d = f ? u.bind(f) : u;
|
|
671
671
|
return this.reads.push(d), o(this), d;
|
|
672
672
|
},
|
|
673
673
|
/**
|
|
@@ -679,8 +679,8 @@ function vn() {
|
|
|
679
679
|
* @param {Object} ctx the context to be bound to `fn` (optional).
|
|
680
680
|
* @public
|
|
681
681
|
*/
|
|
682
|
-
mutate: function(u,
|
|
683
|
-
var d =
|
|
682
|
+
mutate: function(u, f) {
|
|
683
|
+
var d = f ? u.bind(f) : u;
|
|
684
684
|
return this.writes.push(d), o(this), d;
|
|
685
685
|
},
|
|
686
686
|
/**
|
|
@@ -729,8 +729,8 @@ function vn() {
|
|
|
729
729
|
*/
|
|
730
730
|
extend: function(u) {
|
|
731
731
|
if (typeof u != "object") throw new Error("expected object");
|
|
732
|
-
var
|
|
733
|
-
return c(
|
|
732
|
+
var f = Object.create(this);
|
|
733
|
+
return c(f, u), f.fastdom = this, f.initialize && f.initialize(), f;
|
|
734
734
|
},
|
|
735
735
|
// override this with a function
|
|
736
736
|
// to prevent Errors in console
|
|
@@ -741,28 +741,28 @@ function vn() {
|
|
|
741
741
|
u.scheduled || (u.scheduled = !0, u.raf(r.bind(null, u)));
|
|
742
742
|
}
|
|
743
743
|
function r(u) {
|
|
744
|
-
var
|
|
744
|
+
var f = u.writes, d = u.reads, h;
|
|
745
745
|
try {
|
|
746
|
-
n("flushing reads", d.length), u.runTasks(d), n("flushing writes",
|
|
747
|
-
} catch (
|
|
748
|
-
|
|
746
|
+
n("flushing reads", d.length), u.runTasks(d), n("flushing writes", f.length), u.runTasks(f);
|
|
747
|
+
} catch (m) {
|
|
748
|
+
h = m;
|
|
749
749
|
}
|
|
750
|
-
if (u.scheduled = !1, (d.length ||
|
|
751
|
-
if (n("task errored",
|
|
752
|
-
else throw
|
|
750
|
+
if (u.scheduled = !1, (d.length || f.length) && o(u), h)
|
|
751
|
+
if (n("task errored", h.message), u.catch) u.catch(h);
|
|
752
|
+
else throw h;
|
|
753
753
|
}
|
|
754
|
-
function a(u,
|
|
755
|
-
var d = u.indexOf(
|
|
754
|
+
function a(u, f) {
|
|
755
|
+
var d = u.indexOf(f);
|
|
756
756
|
return !!~d && !!u.splice(d, 1);
|
|
757
757
|
}
|
|
758
|
-
function c(u,
|
|
759
|
-
for (var d in
|
|
760
|
-
|
|
758
|
+
function c(u, f) {
|
|
759
|
+
for (var d in f)
|
|
760
|
+
f.hasOwnProperty(d) && (u[d] = f[d]);
|
|
761
761
|
}
|
|
762
|
-
var
|
|
763
|
-
e.exports =
|
|
762
|
+
var l = t.fastdom = t.fastdom || new i();
|
|
763
|
+
e.exports = l;
|
|
764
764
|
})(typeof window < "u" ? window : typeof Fe < "u" ? Fe : globalThis);
|
|
765
|
-
})(
|
|
765
|
+
})(ae)), ae.exports;
|
|
766
766
|
}
|
|
767
767
|
var yn = vn();
|
|
768
768
|
const C = /* @__PURE__ */ gn(yn), $e = {};
|
|
@@ -774,7 +774,7 @@ function wn(e) {
|
|
|
774
774
|
`${e} not found in registry. Please make sure to import and register the preset.`
|
|
775
775
|
), null);
|
|
776
776
|
}
|
|
777
|
-
function
|
|
777
|
+
function D(e, t) {
|
|
778
778
|
return e ? (t || document).getElementById(e) : null;
|
|
779
779
|
}
|
|
780
780
|
function $n(e, t) {
|
|
@@ -802,7 +802,7 @@ function nt(e) {
|
|
|
802
802
|
function st(e) {
|
|
803
803
|
return (t) => C.mutate(() => t(e));
|
|
804
804
|
}
|
|
805
|
-
function
|
|
805
|
+
function U(e) {
|
|
806
806
|
if (e.namedEffect) {
|
|
807
807
|
const t = e.namedEffect.type;
|
|
808
808
|
return typeof t == "string" ? wn(t) : null;
|
|
@@ -823,7 +823,7 @@ function it(e, t, n, s) {
|
|
|
823
823
|
return e.map((i, o) => {
|
|
824
824
|
const r = {
|
|
825
825
|
fill: i.fill,
|
|
826
|
-
easing:
|
|
826
|
+
easing: re(i.easing),
|
|
827
827
|
iterations: i.iterations === 0 ? 1 / 0 : i.iterations || 1,
|
|
828
828
|
composite: i.composite,
|
|
829
829
|
direction: bn(i)
|
|
@@ -854,25 +854,25 @@ function ze(e, t, n, s, i) {
|
|
|
854
854
|
return [];
|
|
855
855
|
}
|
|
856
856
|
function ot(e, t, n, s, i) {
|
|
857
|
-
const o = typeof e == "string" ?
|
|
857
|
+
const o = typeof e == "string" ? D(e, i) : e;
|
|
858
858
|
if (n?.trigger === "pointer-move" && !t.keyframeEffect) {
|
|
859
859
|
let d = t;
|
|
860
860
|
t.customEffect && (d = {
|
|
861
861
|
...t,
|
|
862
862
|
namedEffect: { id: "", type: "CustomMouse" }
|
|
863
863
|
});
|
|
864
|
-
const
|
|
864
|
+
const h = U(
|
|
865
865
|
d
|
|
866
|
-
),
|
|
867
|
-
|
|
866
|
+
), m = ze(
|
|
867
|
+
h,
|
|
868
868
|
t,
|
|
869
869
|
o,
|
|
870
870
|
n,
|
|
871
871
|
s
|
|
872
872
|
);
|
|
873
|
-
return typeof
|
|
873
|
+
return typeof m != "function" ? null : m(o);
|
|
874
874
|
}
|
|
875
|
-
const r =
|
|
875
|
+
const r = U(t), a = ze(
|
|
876
876
|
r,
|
|
877
877
|
t,
|
|
878
878
|
o,
|
|
@@ -882,24 +882,24 @@ function ot(e, t, n, s, i) {
|
|
|
882
882
|
if (!a || a.length === 0)
|
|
883
883
|
return null;
|
|
884
884
|
const c = it(a, n, t.effectId);
|
|
885
|
-
let
|
|
885
|
+
let l;
|
|
886
886
|
const u = n?.trigger === "view-progress";
|
|
887
|
-
u && window.ViewTimeline && (
|
|
888
|
-
subject: n.element ||
|
|
887
|
+
u && window.ViewTimeline && (l = new ViewTimeline({
|
|
888
|
+
subject: n.element || D(n.componentId)
|
|
889
889
|
}));
|
|
890
|
-
const
|
|
891
|
-
const g = p ? $n(o, p) : o, v = new KeyframeEffect(g || null, [],
|
|
890
|
+
const f = c.map(({ effect: d, options: h, id: m, part: p }) => {
|
|
891
|
+
const g = p ? $n(o, p) : o, v = new KeyframeEffect(g || null, [], h);
|
|
892
892
|
C.mutate(() => {
|
|
893
893
|
"timing" in d && v.updateTiming(d.timing), v.setKeyframes(d.keyframes);
|
|
894
894
|
});
|
|
895
|
-
const y = u &&
|
|
895
|
+
const y = u && l ? { timeline: l } : {}, E = typeof d.customEffect == "function" ? new pn(
|
|
896
896
|
d.customEffect,
|
|
897
897
|
g || null,
|
|
898
|
-
|
|
898
|
+
h,
|
|
899
899
|
y
|
|
900
900
|
) : new Animation(v, y.timeline);
|
|
901
901
|
if (u)
|
|
902
|
-
if (
|
|
902
|
+
if (l)
|
|
903
903
|
C.mutate(() => {
|
|
904
904
|
const { start: $, end: b } = tt(d);
|
|
905
905
|
E.rangeStart = $, E.rangeEnd = b, E.play();
|
|
@@ -922,9 +922,9 @@ function ot(e, t, n, s, i) {
|
|
|
922
922
|
});
|
|
923
923
|
});
|
|
924
924
|
}
|
|
925
|
-
return
|
|
925
|
+
return m && (E.id = m), E;
|
|
926
926
|
});
|
|
927
|
-
return new
|
|
927
|
+
return new X(f, {
|
|
928
928
|
...t,
|
|
929
929
|
trigger: { ...n || {} },
|
|
930
930
|
// make sure the group is ready after all animation targets are measured and mutated
|
|
@@ -935,30 +935,30 @@ function Sn(e, t) {
|
|
|
935
935
|
return e ? `#${e}${t ? `[data-motion-part~="${t}"]` : ""}` : "";
|
|
936
936
|
}
|
|
937
937
|
function In(e, t, n) {
|
|
938
|
-
const { duration: s, delay: i, iterations: o = 1, fill: r, easing: a = "linear", direction: c } = e.options,
|
|
938
|
+
const { duration: s, delay: i, iterations: o = 1, fill: r, easing: a = "linear", direction: c } = e.options, l = e.effect.name, u = s === "auto", { sequenceId: f, delay: d, offset: h, offsetEasing: m = "linear" } = n || {};
|
|
939
939
|
let p = `${i ?? 0}ms`;
|
|
940
|
-
if (
|
|
941
|
-
const g = hn(
|
|
940
|
+
if (f && typeof m == "string") {
|
|
941
|
+
const g = hn(m);
|
|
942
942
|
if (g) {
|
|
943
943
|
const v = (i ?? 0) + (d ?? 0);
|
|
944
|
-
if (
|
|
944
|
+
if (h) {
|
|
945
945
|
const y = g(
|
|
946
|
-
`(var(--motion-${
|
|
946
|
+
`(var(--motion-${f}-index, 0) / var(--motion-${f}-last, 1))`
|
|
947
947
|
);
|
|
948
|
-
p = `calc(${`(${v} + ${y} * ${
|
|
948
|
+
p = `calc(${`(${v} + ${y} * ${h} * var(--motion-${f}-last, 1))`} * 1ms)`;
|
|
949
949
|
} else
|
|
950
950
|
p = `${v}ms`;
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
|
-
return `${
|
|
953
|
+
return `${l} ${u ? "auto" : `${s}ms`}${u ? " " : ` ${p} `}${a}${r && r !== "none" ? ` ${r}` : ""} ${!o || o === 1 / 0 ? "infinite" : o}${c === "normal" ? "" : ` ${c}`} ${t ? "" : "paused"}`;
|
|
954
954
|
}
|
|
955
955
|
function Tn(e, t, n) {
|
|
956
956
|
return e?.style ? (qe(n) && (t.duration = t.duration || 1), e.style(t)) : [];
|
|
957
957
|
}
|
|
958
958
|
function Cn(e, t, n, s) {
|
|
959
|
-
const i =
|
|
960
|
-
return r.map((c,
|
|
961
|
-
const { start: u, end:
|
|
959
|
+
const i = U(t), o = Tn(i, t), r = it(o, n, t.effectId, !0), a = n?.trigger === "view-progress";
|
|
960
|
+
return r.map((c, l) => {
|
|
961
|
+
const { start: u, end: f } = a ? tt(c.effect) : {};
|
|
962
962
|
return {
|
|
963
963
|
target: Sn(e, c.part),
|
|
964
964
|
animation: In(c, a, s),
|
|
@@ -966,14 +966,14 @@ function Cn(e, t, n, s) {
|
|
|
966
966
|
custom: c.effect.custom,
|
|
967
967
|
name: c.effect.name,
|
|
968
968
|
keyframes: c.effect.keyframes,
|
|
969
|
-
id: c.id && `${c.id}-${
|
|
969
|
+
id: c.id && `${c.id}-${l + 1}`,
|
|
970
970
|
animationTimeline: a ? `--${n?.id}` : "",
|
|
971
|
-
animationRange: u ||
|
|
971
|
+
animationRange: u || f ? `${u} ${f}` : ""
|
|
972
972
|
};
|
|
973
973
|
});
|
|
974
974
|
}
|
|
975
975
|
function On(e, t, n) {
|
|
976
|
-
const s =
|
|
976
|
+
const s = U(t), i = e instanceof HTMLElement ? e : D(e);
|
|
977
977
|
if (s && s.prepare && i) {
|
|
978
978
|
const o = { measure: nt(i), mutate: st(i) };
|
|
979
979
|
s.prepare(t, o);
|
|
@@ -981,24 +981,24 @@ function On(e, t, n) {
|
|
|
981
981
|
n && C.mutate(n);
|
|
982
982
|
}
|
|
983
983
|
function rt(e, t) {
|
|
984
|
-
const n =
|
|
984
|
+
const n = U(t);
|
|
985
985
|
if (!n)
|
|
986
986
|
return null;
|
|
987
987
|
if (!n.style)
|
|
988
988
|
return t.effectId && e ? _n(e, t.effectId) : null;
|
|
989
|
-
const s = n.getNames(t), o = (typeof e == "string" ?
|
|
989
|
+
const s = n.getNames(t), o = (typeof e == "string" ? D(e) : e)?.getAnimations(), r = o?.map((c) => c.animationName) || [], a = [];
|
|
990
990
|
return s.forEach((c) => {
|
|
991
991
|
r.includes(c) && a.push(
|
|
992
|
-
o?.find((
|
|
992
|
+
o?.find((l) => l.animationName === c)
|
|
993
993
|
);
|
|
994
|
-
}), a?.length ? new
|
|
994
|
+
}), a?.length ? new X(a) : null;
|
|
995
995
|
}
|
|
996
996
|
function _n(e, t) {
|
|
997
|
-
const s = (typeof e == "string" ?
|
|
997
|
+
const s = (typeof e == "string" ? D(e) : e)?.getAnimations().filter((i) => {
|
|
998
998
|
const o = i.id || i.animationName;
|
|
999
999
|
return o ? o.startsWith(t) : !0;
|
|
1000
1000
|
});
|
|
1001
|
-
return s?.length ? new
|
|
1001
|
+
return s?.length ? new X(s) : null;
|
|
1002
1002
|
}
|
|
1003
1003
|
function at(e, t, n, s = {}) {
|
|
1004
1004
|
const { disabled: i, allowActiveEvent: o, ...r } = s, a = ot(e, t, n, r);
|
|
@@ -1006,68 +1006,68 @@ function at(e, t, n, s = {}) {
|
|
|
1006
1006
|
return null;
|
|
1007
1007
|
let c = {};
|
|
1008
1008
|
if (n.trigger === "view-progress" && !window.ViewTimeline) {
|
|
1009
|
-
const
|
|
1010
|
-
return a.animations.map((
|
|
1009
|
+
const l = n.element || D(n.componentId), { ready: u } = a;
|
|
1010
|
+
return a.animations.map((f) => ({
|
|
1011
1011
|
/* we use getters for start and end in order to access the animation's start and end
|
|
1012
1012
|
only when initializing the scrub scene rather than immediately */
|
|
1013
1013
|
get start() {
|
|
1014
|
-
return
|
|
1014
|
+
return f.start;
|
|
1015
1015
|
},
|
|
1016
1016
|
get end() {
|
|
1017
|
-
return
|
|
1017
|
+
return f.end;
|
|
1018
1018
|
},
|
|
1019
|
-
viewSource:
|
|
1019
|
+
viewSource: l,
|
|
1020
1020
|
ready: u,
|
|
1021
1021
|
getProgress() {
|
|
1022
1022
|
return a.getProgress();
|
|
1023
1023
|
},
|
|
1024
|
-
effect(d,
|
|
1025
|
-
const { activeDuration:
|
|
1026
|
-
|
|
1024
|
+
effect(d, h) {
|
|
1025
|
+
const { activeDuration: m } = f.effect.getComputedTiming(), { delay: p } = f.effect.getTiming();
|
|
1026
|
+
f.currentTime = ((p || 0) + (m || 0)) * h;
|
|
1027
1027
|
},
|
|
1028
1028
|
disabled: i,
|
|
1029
1029
|
destroy() {
|
|
1030
|
-
|
|
1030
|
+
f.cancel();
|
|
1031
1031
|
}
|
|
1032
1032
|
}));
|
|
1033
1033
|
} else if (n.trigger === "pointer-move") {
|
|
1034
|
-
const
|
|
1035
|
-
if (
|
|
1036
|
-
const
|
|
1037
|
-
return
|
|
1034
|
+
const l = t, { centeredToTarget: u, transitionDuration: f, transitionEasing: d } = l, h = n.axis;
|
|
1035
|
+
if (l.keyframeEffect) {
|
|
1036
|
+
const m = a;
|
|
1037
|
+
return m.animations?.length === 0 ? null : {
|
|
1038
1038
|
target: void 0,
|
|
1039
1039
|
centeredToTarget: u,
|
|
1040
|
-
ready:
|
|
1040
|
+
ready: m.ready,
|
|
1041
1041
|
_currentProgress: 0,
|
|
1042
1042
|
getProgress() {
|
|
1043
1043
|
return this._currentProgress;
|
|
1044
1044
|
},
|
|
1045
1045
|
effect(g, v) {
|
|
1046
|
-
const y =
|
|
1047
|
-
this._currentProgress = y,
|
|
1046
|
+
const y = h === "x" ? v.x : v.y;
|
|
1047
|
+
this._currentProgress = y, m.progress(y);
|
|
1048
1048
|
},
|
|
1049
1049
|
disabled: i ?? !1,
|
|
1050
1050
|
destroy() {
|
|
1051
|
-
|
|
1051
|
+
m.cancel();
|
|
1052
1052
|
}
|
|
1053
1053
|
};
|
|
1054
1054
|
}
|
|
1055
1055
|
c = {
|
|
1056
1056
|
centeredToTarget: u,
|
|
1057
1057
|
allowActiveEvent: o
|
|
1058
|
-
}, t.customEffect &&
|
|
1058
|
+
}, t.customEffect && f && (c.transitionDuration = f, c.transitionEasing = et(d)), c.target = a.target;
|
|
1059
1059
|
}
|
|
1060
1060
|
return {
|
|
1061
1061
|
...c,
|
|
1062
1062
|
getProgress() {
|
|
1063
1063
|
return a.getProgress();
|
|
1064
1064
|
},
|
|
1065
|
-
effect(
|
|
1065
|
+
effect(l, u, f, d) {
|
|
1066
1066
|
a.progress(
|
|
1067
|
-
|
|
1067
|
+
f ? {
|
|
1068
1068
|
// @ts-expect-error spread error on p
|
|
1069
1069
|
...u,
|
|
1070
|
-
v:
|
|
1070
|
+
v: f,
|
|
1071
1071
|
active: d
|
|
1072
1072
|
} : u
|
|
1073
1073
|
);
|
|
@@ -1078,7 +1078,7 @@ function at(e, t, n, s = {}) {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
};
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function Z(e, t, n, s = !1) {
|
|
1082
1082
|
const i = rt(e, t);
|
|
1083
1083
|
return i ? (i.ready = new Promise((o) => {
|
|
1084
1084
|
On(e, t, o);
|
|
@@ -1092,13 +1092,13 @@ function ct(e, t) {
|
|
|
1092
1092
|
for (const { target: s, options: i } of e) {
|
|
1093
1093
|
const o = An(s);
|
|
1094
1094
|
for (const r of o) {
|
|
1095
|
-
const a =
|
|
1095
|
+
const a = Z(
|
|
1096
1096
|
r,
|
|
1097
1097
|
i,
|
|
1098
1098
|
void 0,
|
|
1099
1099
|
t?.reducedMotion
|
|
1100
1100
|
);
|
|
1101
|
-
a instanceof
|
|
1101
|
+
a instanceof X && n.push(a);
|
|
1102
1102
|
}
|
|
1103
1103
|
}
|
|
1104
1104
|
return n;
|
|
@@ -1107,17 +1107,17 @@ function qn(e, t, n) {
|
|
|
1107
1107
|
const s = ct(t, n);
|
|
1108
1108
|
return new mn(s, e);
|
|
1109
1109
|
}
|
|
1110
|
-
const
|
|
1110
|
+
const te = {
|
|
1111
1111
|
rangeStart: { name: "cover", offset: { value: 0, unit: "percentage" } },
|
|
1112
1112
|
rangeEnd: { name: "cover", offset: { value: 100, unit: "percentage" } }
|
|
1113
1113
|
};
|
|
1114
1114
|
function kn(e, t) {
|
|
1115
|
-
const n = e?.name ??
|
|
1115
|
+
const n = e?.name ?? te.rangeStart.name, s = t?.name ?? e?.name ?? te.rangeEnd.name, i = {
|
|
1116
1116
|
name: n,
|
|
1117
|
-
offset: e?.offset ||
|
|
1117
|
+
offset: e?.offset || te.rangeStart.offset
|
|
1118
1118
|
}, o = {
|
|
1119
1119
|
name: s,
|
|
1120
|
-
offset: t?.offset ||
|
|
1120
|
+
offset: t?.offset || te.rangeEnd.offset
|
|
1121
1121
|
};
|
|
1122
1122
|
return { startOffset: i, endOffset: o };
|
|
1123
1123
|
}
|
|
@@ -1139,7 +1139,7 @@ function A(e, t, n) {
|
|
|
1139
1139
|
let s = e.get(t);
|
|
1140
1140
|
s || (s = /* @__PURE__ */ new Set(), e.set(t, s)), s.add(n);
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1142
|
+
function J(e, t) {
|
|
1143
1143
|
e.get(t)?.forEach((s) => {
|
|
1144
1144
|
const { source: i, target: o, cleanup: r } = s;
|
|
1145
1145
|
r();
|
|
@@ -1160,12 +1160,12 @@ function Ln(e) {
|
|
|
1160
1160
|
const t = e.trim().split(/\s+/), n = t[0], s = t.length > 1 ? t[1] : t[0], i = (o) => o.startsWith("-") ? o.slice(1) : parseFloat(o) ? `-${o}` : o;
|
|
1161
1161
|
return `${i(n)} 0px ${i(s)}`;
|
|
1162
1162
|
}
|
|
1163
|
-
const K = {}, L = /* @__PURE__ */ new WeakMap(),
|
|
1163
|
+
const K = {}, L = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakSet(), W = /* @__PURE__ */ new WeakMap();
|
|
1164
1164
|
let ut = {}, V = null;
|
|
1165
1165
|
function Fn(e) {
|
|
1166
1166
|
ut = e;
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1168
|
+
function lt(e, t, n) {
|
|
1169
1169
|
L.get(e)?.forEach(({ source: i, handler: o }) => {
|
|
1170
1170
|
i === e && o(t, n);
|
|
1171
1171
|
});
|
|
@@ -1174,11 +1174,11 @@ function je() {
|
|
|
1174
1174
|
return V || (V = new IntersectionObserver((e) => {
|
|
1175
1175
|
e.forEach((t) => {
|
|
1176
1176
|
const n = t.target;
|
|
1177
|
-
t.isIntersecting ||
|
|
1177
|
+
t.isIntersecting || lt(n, !1, !0);
|
|
1178
1178
|
});
|
|
1179
1179
|
}, Pn), V);
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1181
|
+
function ft(e, t = !1) {
|
|
1182
1182
|
const n = JSON.stringify({ ...e, isSafeMode: t });
|
|
1183
1183
|
if (K[n])
|
|
1184
1184
|
return K[n];
|
|
@@ -1188,51 +1188,51 @@ function lt(e, t = !1) {
|
|
|
1188
1188
|
threshold: s
|
|
1189
1189
|
}, o = new IntersectionObserver((r) => {
|
|
1190
1190
|
r.forEach((a) => {
|
|
1191
|
-
const c = a.target,
|
|
1192
|
-
if (
|
|
1191
|
+
const c = a.target, l = !fe.has(c);
|
|
1192
|
+
if (l && (fe.add(c), e.useSafeViewEnter && !a.isIntersecting)) {
|
|
1193
1193
|
C.measure(() => {
|
|
1194
|
-
const u = a.boundingClientRect.height,
|
|
1195
|
-
if (!
|
|
1194
|
+
const u = a.boundingClientRect.height, f = a.rootBounds?.height;
|
|
1195
|
+
if (!f)
|
|
1196
1196
|
return;
|
|
1197
1197
|
const d = Array.isArray(e.threshold) ? Math.min(...e.threshold) : e.threshold;
|
|
1198
|
-
d && u * d >
|
|
1198
|
+
d && u * d > f && C.mutate(() => {
|
|
1199
1199
|
o.unobserve(c);
|
|
1200
|
-
const
|
|
1201
|
-
W.set(c,
|
|
1200
|
+
const m = ft(e, !0);
|
|
1201
|
+
W.set(c, m), m.observe(c);
|
|
1202
1202
|
});
|
|
1203
1203
|
});
|
|
1204
1204
|
return;
|
|
1205
1205
|
}
|
|
1206
|
-
(a.isIntersecting || !
|
|
1206
|
+
(a.isIntersecting || !l) && lt(c, a.isIntersecting);
|
|
1207
1207
|
});
|
|
1208
1208
|
}, i);
|
|
1209
1209
|
return K[n] = o, o;
|
|
1210
1210
|
}
|
|
1211
1211
|
function Rn(e, t, n, s = {}, { reducedMotion: i, selectorCondition: o, animation: r } = {}) {
|
|
1212
|
-
const a = { ...ut, ...s }, c = n.triggerType || "once",
|
|
1212
|
+
const a = { ...ut, ...s }, c = n.triggerType || "once", l = r || Z(
|
|
1213
1213
|
t,
|
|
1214
1214
|
P(n),
|
|
1215
1215
|
void 0,
|
|
1216
1216
|
i
|
|
1217
1217
|
);
|
|
1218
|
-
if (!
|
|
1218
|
+
if (!l)
|
|
1219
1219
|
return;
|
|
1220
|
-
const u =
|
|
1221
|
-
c !== "once" &&
|
|
1222
|
-
let
|
|
1223
|
-
|
|
1220
|
+
const u = ft(a);
|
|
1221
|
+
c !== "once" && l.persist?.();
|
|
1222
|
+
let f = !0, d = !1, h;
|
|
1223
|
+
h = { source: e, target: t, handler: (g, v) => {
|
|
1224
1224
|
if (!(o && !t.matches(o)))
|
|
1225
1225
|
if (c === "once") {
|
|
1226
1226
|
if (g && !d) {
|
|
1227
1227
|
d = !0;
|
|
1228
1228
|
const y = L.get(e);
|
|
1229
|
-
(!y || y.size === 0 || y.size === 1 && y.has(
|
|
1230
|
-
L.get(e)?.delete(
|
|
1231
|
-
}),
|
|
1229
|
+
(!y || y.size === 0 || y.size === 1 && y.has(h)) && ((W.get(e) || u).unobserve(e), fe.delete(e)), l.onFinish(() => {
|
|
1230
|
+
L.get(e)?.delete(h), L.get(t)?.delete(h);
|
|
1231
|
+
}), l.play(() => {
|
|
1232
1232
|
const E = () => {
|
|
1233
1233
|
t.dataset.interactEnter = "start";
|
|
1234
1234
|
};
|
|
1235
|
-
if (
|
|
1235
|
+
if (l.isCSS) {
|
|
1236
1236
|
C.mutate(() => {
|
|
1237
1237
|
requestAnimationFrame(E);
|
|
1238
1238
|
});
|
|
@@ -1241,18 +1241,18 @@ function Rn(e, t, n, s = {}, { reducedMotion: i, selectorCondition: o, animation
|
|
|
1241
1241
|
t.dataset.interactEnter = "done";
|
|
1242
1242
|
});
|
|
1243
1243
|
};
|
|
1244
|
-
|
|
1244
|
+
l.onFinish($), l.onAbort($);
|
|
1245
1245
|
} else
|
|
1246
1246
|
C.mutate(E);
|
|
1247
1247
|
});
|
|
1248
1248
|
}
|
|
1249
|
-
} else c === "alternate" ?
|
|
1249
|
+
} else c === "alternate" ? f && g ? (f = !1, l.play()) : f || l.reverse() : c === "repeat" ? g ? (l.progress(0), l.play()) : v && (l.pause(), l.progress(0)) : c === "state" && (g ? l.play() : v && l.pause());
|
|
1250
1250
|
}, cleanup: () => {
|
|
1251
|
-
(W.get(e) || u).unobserve(e), (c === "repeat" || c === "state") && je().unobserve(e),
|
|
1252
|
-
} }, A(L, e,
|
|
1251
|
+
(W.get(e) || u).unobserve(e), (c === "repeat" || c === "state") && je().unobserve(e), l.cancel(), fe.delete(e), W.delete(e);
|
|
1252
|
+
} }, A(L, e, h), A(L, t, h), W.set(e, u), u.observe(e), (c === "repeat" || c === "state") && je().observe(e);
|
|
1253
1253
|
}
|
|
1254
1254
|
function Nn(e) {
|
|
1255
|
-
|
|
1255
|
+
J(L, e);
|
|
1256
1256
|
}
|
|
1257
1257
|
function zn() {
|
|
1258
1258
|
V = null, Object.keys(K).forEach((e) => delete K[e]);
|
|
@@ -1266,7 +1266,7 @@ const jn = {
|
|
|
1266
1266
|
function dt(e, t) {
|
|
1267
1267
|
return Object.assign(Object.create(t), e);
|
|
1268
1268
|
}
|
|
1269
|
-
function
|
|
1269
|
+
function Hn(e, t, n, s) {
|
|
1270
1270
|
let i = e * (1 - n) + t * n;
|
|
1271
1271
|
if (s) {
|
|
1272
1272
|
const o = i - e;
|
|
@@ -1277,7 +1277,7 @@ function Dn(e, t, n, s) {
|
|
|
1277
1277
|
}
|
|
1278
1278
|
return i;
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1280
|
+
function Dn(e) {
|
|
1281
1281
|
let t = !1;
|
|
1282
1282
|
return function() {
|
|
1283
1283
|
t || (t = !0, window.requestAnimationFrame(() => {
|
|
@@ -1285,7 +1285,7 @@ function Hn(e) {
|
|
|
1285
1285
|
}));
|
|
1286
1286
|
};
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1288
|
+
function He(e, t) {
|
|
1289
1289
|
let n = 0;
|
|
1290
1290
|
return function() {
|
|
1291
1291
|
n && window.clearTimeout(n), n = window.setTimeout(() => {
|
|
@@ -1302,31 +1302,31 @@ function de(e, t) {
|
|
|
1302
1302
|
}
|
|
1303
1303
|
function R(e, t, n) {
|
|
1304
1304
|
const { name: s, offset: i = 0 } = e, { start: o, end: r } = n, a = r - o, c = i / 100;
|
|
1305
|
-
let
|
|
1306
|
-
return s === "entry" ? (
|
|
1305
|
+
let l, u;
|
|
1306
|
+
return s === "entry" ? (l = o - t, u = Math.min(t, a)) : s === "entry-crossing" ? (l = o - t, u = a) : s === "contain" ? (l = Math.min(r - t, o), u = Math.abs(t - a)) : s === "exit" ? (l = Math.max(o, r - t), u = Math.min(t, a)) : s === "exit-crossing" ? (l = o, u = a) : s === "cover" && (l = o - t, u = a + t), l + c * u | 0;
|
|
1307
1307
|
}
|
|
1308
1308
|
function ye(e, t, n, s, i) {
|
|
1309
1309
|
let o = 0;
|
|
1310
1310
|
const r = { start: t, end: n };
|
|
1311
1311
|
return e.forEach((a, c) => {
|
|
1312
1312
|
o += a.offset;
|
|
1313
|
-
const
|
|
1314
|
-
if (
|
|
1315
|
-
if ("end" in
|
|
1316
|
-
const d = ((i ? a.element.offsetWidth : a.element.offsetHeight) || 0) +
|
|
1313
|
+
const l = a.sticky;
|
|
1314
|
+
if (l) {
|
|
1315
|
+
if ("end" in l && e[c - 1]?.element) {
|
|
1316
|
+
const d = ((i ? a.element.offsetWidth : a.element.offsetHeight) || 0) + l.end - s, h = o + d - a.offset, m = h < r.start, p = !m && h <= n;
|
|
1317
1317
|
let g = 0;
|
|
1318
|
-
(
|
|
1318
|
+
(m || p) && (g = a.offset, r.end += g), m && (r.start += g);
|
|
1319
1319
|
}
|
|
1320
|
-
if ("start" in
|
|
1321
|
-
const u = o -
|
|
1322
|
-
let
|
|
1323
|
-
const
|
|
1324
|
-
if (
|
|
1325
|
-
if (
|
|
1326
|
-
const p = (i ?
|
|
1327
|
-
|
|
1320
|
+
if ("start" in l) {
|
|
1321
|
+
const u = o - l.start, f = u < r.start, d = !f && u <= r.end;
|
|
1322
|
+
let h = 0;
|
|
1323
|
+
const m = e[c - 1]?.element;
|
|
1324
|
+
if (m) {
|
|
1325
|
+
if (f || d) {
|
|
1326
|
+
const p = (i ? m.offsetWidth : m.offsetHeight) || 0, g = a.offset, v = (i ? a.element.offsetWidth : a.element.offsetHeight) || 0;
|
|
1327
|
+
h = p - (g + v), o += h, r.end += h;
|
|
1328
1328
|
}
|
|
1329
|
-
|
|
1329
|
+
f && (r.start += h);
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
@@ -1334,24 +1334,24 @@ function ye(e, t, n, s, i) {
|
|
|
1334
1334
|
}
|
|
1335
1335
|
function Wn(e, t, n, s, i, o) {
|
|
1336
1336
|
const { start: r, end: a, duration: c } = e;
|
|
1337
|
-
let
|
|
1337
|
+
let l = r, u = a, f = e.startRange, d = e.endRange, h;
|
|
1338
1338
|
if (typeof c == "string") {
|
|
1339
|
-
|
|
1340
|
-
const
|
|
1341
|
-
|
|
1339
|
+
f = { name: c, offset: 0 }, d = { name: c, offset: 100 }, l = R(f, n, t), u = R(d, n, t), h = u - l;
|
|
1340
|
+
const m = ye(o, l, u, n, s);
|
|
1341
|
+
l = m.start, u = m.end;
|
|
1342
1342
|
} else {
|
|
1343
|
-
if (
|
|
1344
|
-
|
|
1345
|
-
const
|
|
1346
|
-
|
|
1343
|
+
if (f || r?.name) {
|
|
1344
|
+
f = f || r;
|
|
1345
|
+
const m = de(f.add, i), p = R({ ...f, offset: 0 }, n, t), g = R({ ...f, offset: 100 }, n, t), v = ye(o, p, g, n, s);
|
|
1346
|
+
l = v.start + f.offset / 100 * (v.end - v.start) + m;
|
|
1347
1347
|
}
|
|
1348
1348
|
if (d || a?.name) {
|
|
1349
1349
|
d = d || a;
|
|
1350
|
-
const
|
|
1351
|
-
u = v.start + d.offset / 100 * (v.end - v.start) +
|
|
1352
|
-
} else typeof c == "number" && (u =
|
|
1350
|
+
const m = de(d.add, i), p = R({ ...d, offset: 0 }, n, t), g = R({ ...d, offset: 100 }, n, t), v = ye(o, p, g, n, s);
|
|
1351
|
+
u = v.start + d.offset / 100 * (v.end - v.start) + m;
|
|
1352
|
+
} else typeof c == "number" && (u = l + c);
|
|
1353
1353
|
}
|
|
1354
|
-
return !
|
|
1354
|
+
return !h && !c && (h = u - l), { ...e, start: l, end: u, startRange: f, endRange: d, duration: h || c };
|
|
1355
1355
|
}
|
|
1356
1356
|
function Vn(e) {
|
|
1357
1357
|
return e.position === "sticky";
|
|
@@ -1375,21 +1375,21 @@ function Qn(e, t) {
|
|
|
1375
1375
|
const s = Kn(e, t), i = Bn(e, t), o = !isNaN(s), r = !isNaN(i);
|
|
1376
1376
|
return (o || r) && (n = {}, o && (n.start = s), r && (n.end = i)), n;
|
|
1377
1377
|
}
|
|
1378
|
-
function
|
|
1378
|
+
function ne(e, t, n, s, i) {
|
|
1379
1379
|
const o = e[0].viewSource, r = [];
|
|
1380
|
-
let a = (s ? o.offsetWidth : o.offsetHeight) || 0, c = 0,
|
|
1381
|
-
for (;
|
|
1382
|
-
const
|
|
1383
|
-
if ((!
|
|
1380
|
+
let a = (s ? o.offsetWidth : o.offsetHeight) || 0, c = 0, l = o;
|
|
1381
|
+
for (; l; ) {
|
|
1382
|
+
const f = window.getComputedStyle(l), d = Vn(f), h = d ? Qn(f, s) : void 0, m = Un(l, s, d);
|
|
1383
|
+
if ((!h || !("end" in h)) && (c += m), r.push({ element: l, offset: m, sticky: h }), l = l.offsetParent, Yn(f, l, t))
|
|
1384
1384
|
break;
|
|
1385
|
-
if (
|
|
1386
|
-
r.push({ element:
|
|
1385
|
+
if (l === t) {
|
|
1386
|
+
r.push({ element: l, offset: 0 });
|
|
1387
1387
|
break;
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
|
-
return r.reverse(), e.map((
|
|
1390
|
+
return r.reverse(), e.map((f) => ({
|
|
1391
1391
|
...Wn(
|
|
1392
|
-
|
|
1392
|
+
f,
|
|
1393
1393
|
{ start: c, end: c + a },
|
|
1394
1394
|
n,
|
|
1395
1395
|
s,
|
|
@@ -1398,7 +1398,7 @@ function te(e, t, n, s, i) {
|
|
|
1398
1398
|
)
|
|
1399
1399
|
}));
|
|
1400
1400
|
}
|
|
1401
|
-
const
|
|
1401
|
+
const De = 100, Xn = {
|
|
1402
1402
|
horizontal: !1,
|
|
1403
1403
|
observeViewportEntry: !0,
|
|
1404
1404
|
viewportRootMargin: "7% 7%",
|
|
@@ -1421,8 +1421,8 @@ function Jn() {
|
|
|
1421
1421
|
}
|
|
1422
1422
|
function es(e) {
|
|
1423
1423
|
const t = dt(e, Xn), n = t.root, s = t.horizontal, i = /* @__PURE__ */ new WeakMap();
|
|
1424
|
-
let o = Ge(n, s), r, a, c,
|
|
1425
|
-
const
|
|
1424
|
+
let o = Ge(n, s), r, a, c, l, u;
|
|
1425
|
+
const f = [], d = Jn();
|
|
1426
1426
|
if (t.scenes = Object.values(
|
|
1427
1427
|
// TODO(ameerf): find a polyfill and use groupBy instead of following reduce
|
|
1428
1428
|
e.scenes.reduce(
|
|
@@ -1432,43 +1432,43 @@ function es(e) {
|
|
|
1432
1432
|
},
|
|
1433
1433
|
{}
|
|
1434
1434
|
)
|
|
1435
|
-
).flatMap((p) => (p.every((g) => g.viewSource && (typeof g.duration == "string" || g.start?.name)) ? (p =
|
|
1435
|
+
).flatMap((p) => (p.every((g) => g.viewSource && (typeof g.duration == "string" || g.start?.name)) ? (p = ne(p, n, o, s, d), (t.observeSourcesResize || t.observeContentResize) && f.push(p)) : p.forEach((g) => {
|
|
1436
1436
|
g.end == null && (g.end = g.start + g.duration), g.duration == null && (g.duration = g.end - g.start);
|
|
1437
1437
|
}), p)), t.scenes.forEach((p, g) => {
|
|
1438
1438
|
p.index = g;
|
|
1439
|
-
}),
|
|
1439
|
+
}), f.length) {
|
|
1440
1440
|
const p = /* @__PURE__ */ new Map();
|
|
1441
1441
|
window.ResizeObserver && (c = new window.ResizeObserver(function(g) {
|
|
1442
1442
|
g.forEach((v) => {
|
|
1443
|
-
const y = p.get(v.target), E =
|
|
1443
|
+
const y = p.get(v.target), E = ne(y, n, o, s, d);
|
|
1444
1444
|
E.forEach(($, b) => {
|
|
1445
1445
|
t.scenes[$.index] = E[b];
|
|
1446
|
-
}),
|
|
1446
|
+
}), f.splice(f.indexOf(y), 1, E);
|
|
1447
1447
|
});
|
|
1448
|
-
}),
|
|
1448
|
+
}), f.forEach((g) => {
|
|
1449
1449
|
c.observe(g[0].viewSource, { box: "border-box" }), p.set(g[0].viewSource, g);
|
|
1450
|
-
}), t.observeContentResize && t.contentRoot && new window.ResizeObserver(
|
|
1451
|
-
const v =
|
|
1452
|
-
const E =
|
|
1450
|
+
}), t.observeContentResize && t.contentRoot && new window.ResizeObserver(He(() => {
|
|
1451
|
+
const v = f.map((y) => {
|
|
1452
|
+
const E = ne(y, n, o, s, d);
|
|
1453
1453
|
return E.forEach(($, b) => {
|
|
1454
1454
|
t.scenes[$.index] = E[b];
|
|
1455
1455
|
}), E;
|
|
1456
1456
|
});
|
|
1457
|
-
|
|
1457
|
+
f.length = 0, f.push(...v), f.forEach((y) => {
|
|
1458
1458
|
p.set(y[0].viewSource, y);
|
|
1459
1459
|
});
|
|
1460
|
-
},
|
|
1460
|
+
}, De)).observe(t.contentRoot, { box: "border-box" })), t.observeViewportResize && (l = He(function() {
|
|
1461
1461
|
o = Ge(n, s);
|
|
1462
|
-
const g =
|
|
1463
|
-
const y =
|
|
1462
|
+
const g = f.map((v) => {
|
|
1463
|
+
const y = ne(v, n, o, s, d);
|
|
1464
1464
|
return y.forEach((E, $) => {
|
|
1465
1465
|
t.scenes[E.index] = y[$];
|
|
1466
1466
|
}), y;
|
|
1467
1467
|
});
|
|
1468
|
-
|
|
1468
|
+
f.length = 0, f.push(...g), f.forEach((v) => {
|
|
1469
1469
|
p.set(v[0].viewSource, v);
|
|
1470
1470
|
});
|
|
1471
|
-
},
|
|
1471
|
+
}, De), n === window ? window.addEventListener("resize", l) : window.ResizeObserver && (u = new window.ResizeObserver(l), u.observe(n, { box: "border-box" })));
|
|
1472
1472
|
}
|
|
1473
1473
|
t.observeViewportEntry && window.IntersectionObserver && (a = new window.IntersectionObserver(function(p) {
|
|
1474
1474
|
p.forEach((g) => {
|
|
@@ -1486,7 +1486,7 @@ function es(e) {
|
|
|
1486
1486
|
g || (g = [], i.set(p.viewSource, g), a.observe(p.viewSource)), g.push(p);
|
|
1487
1487
|
}
|
|
1488
1488
|
}));
|
|
1489
|
-
function
|
|
1489
|
+
function h({ p, vp: g }) {
|
|
1490
1490
|
p = +p.toFixed(1);
|
|
1491
1491
|
const v = +g.toFixed(4);
|
|
1492
1492
|
if (p !== r) {
|
|
@@ -1498,12 +1498,12 @@ function es(e) {
|
|
|
1498
1498
|
r = p;
|
|
1499
1499
|
}
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1502
|
-
t.scenes.forEach((p) => p.destroy?.()), a && (a.disconnect(), a = null), c && (c.disconnect(), c = null),
|
|
1501
|
+
function m() {
|
|
1502
|
+
t.scenes.forEach((p) => p.destroy?.()), a && (a.disconnect(), a = null), c && (c.disconnect(), c = null), l && (u ? (u.disconnect(), u = null) : window.removeEventListener("resize", l));
|
|
1503
1503
|
}
|
|
1504
1504
|
return {
|
|
1505
|
-
tick:
|
|
1506
|
-
destroy:
|
|
1505
|
+
tick: h,
|
|
1506
|
+
destroy: m
|
|
1507
1507
|
};
|
|
1508
1508
|
}
|
|
1509
1509
|
const ts = {
|
|
@@ -1528,7 +1528,7 @@ class ns {
|
|
|
1528
1528
|
this.config.root = n ? window : this.config.root, this.config.contentRoot = this.config.contentRoot || (n ? window.document.body : this.config.root.firstElementChild), this.config.resetProgress = this.config.resetProgress || this.resetProgress.bind(this), this._measure = this.config.measure || (() => {
|
|
1529
1529
|
const s = this.config.root;
|
|
1530
1530
|
this.progress.p = this.config.horizontal ? s.scrollX || s.scrollLeft || 0 : s.scrollY || s.scrollTop || 0;
|
|
1531
|
-
}), this._trigger =
|
|
1531
|
+
}), this._trigger = Dn(() => {
|
|
1532
1532
|
this._measure?.(), this.tick(!0);
|
|
1533
1533
|
});
|
|
1534
1534
|
}
|
|
@@ -1574,7 +1574,7 @@ class ns {
|
|
|
1574
1574
|
* Calculate current progress.
|
|
1575
1575
|
*/
|
|
1576
1576
|
lerp() {
|
|
1577
|
-
this.currentProgress.p =
|
|
1577
|
+
this.currentProgress.p = Hn(this.currentProgress.p, this.progress.p, +(1 - this.config.transitionFriction).toFixed(3), this.config.transitionEpsilon);
|
|
1578
1578
|
}
|
|
1579
1579
|
/**
|
|
1580
1580
|
* Stop the event and effect, and remove all DOM side-effects.
|
|
@@ -1621,20 +1621,20 @@ function is(e, t, n, s, { reducedMotion: i }) {
|
|
|
1621
1621
|
}, r = P(n);
|
|
1622
1622
|
let a;
|
|
1623
1623
|
if ("ViewTimeline" in window) {
|
|
1624
|
-
const
|
|
1624
|
+
const l = Z(
|
|
1625
1625
|
t,
|
|
1626
1626
|
r,
|
|
1627
1627
|
o
|
|
1628
1628
|
);
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1629
|
+
l && !l.isCSS && (l.play(), a = () => {
|
|
1630
|
+
l.ready.then(() => {
|
|
1631
|
+
l.cancel();
|
|
1632
1632
|
});
|
|
1633
1633
|
});
|
|
1634
1634
|
} else {
|
|
1635
|
-
const
|
|
1636
|
-
if (
|
|
1637
|
-
const u = Array.isArray(
|
|
1635
|
+
const l = at(t, r, o);
|
|
1636
|
+
if (l) {
|
|
1637
|
+
const u = Array.isArray(l) ? l : [l], f = new ns({
|
|
1638
1638
|
viewSource: e,
|
|
1639
1639
|
scenes: u,
|
|
1640
1640
|
observeViewportEntry: !1,
|
|
@@ -1644,10 +1644,10 @@ function is(e, t, n, s, { reducedMotion: i }) {
|
|
|
1644
1644
|
...ht()
|
|
1645
1645
|
});
|
|
1646
1646
|
a = () => {
|
|
1647
|
-
|
|
1647
|
+
f.destroy();
|
|
1648
1648
|
}, Promise.all(u.map((d) => d.ready || Promise.resolve())).then(
|
|
1649
1649
|
() => {
|
|
1650
|
-
|
|
1650
|
+
f.start();
|
|
1651
1651
|
}
|
|
1652
1652
|
);
|
|
1653
1653
|
}
|
|
@@ -1657,7 +1657,7 @@ function is(e, t, n, s, { reducedMotion: i }) {
|
|
|
1657
1657
|
A(be, e, c), A(be, t, c);
|
|
1658
1658
|
}
|
|
1659
1659
|
function os(e) {
|
|
1660
|
-
|
|
1660
|
+
J(be, e);
|
|
1661
1661
|
}
|
|
1662
1662
|
const rs = {
|
|
1663
1663
|
add: is,
|
|
@@ -1721,23 +1721,23 @@ function us() {
|
|
|
1721
1721
|
i(), window.addEventListener("scroll", o), window.scrollY > 0 && window.scrollBy(0, -1);
|
|
1722
1722
|
});
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1724
|
+
function ls(e) {
|
|
1725
1725
|
us().then((t) => {
|
|
1726
1726
|
e.fixRequired = t, t && (window.addEventListener("scroll", e.scrollHandler), e.scrollHandler());
|
|
1727
1727
|
});
|
|
1728
1728
|
}
|
|
1729
|
-
let
|
|
1730
|
-
const
|
|
1731
|
-
function
|
|
1729
|
+
let se = 0;
|
|
1730
|
+
const ce = /* @__PURE__ */ new Set();
|
|
1731
|
+
function fs() {
|
|
1732
1732
|
const e = (n) => {
|
|
1733
1733
|
for (let s of n.changedTouches)
|
|
1734
|
-
|
|
1734
|
+
ce.add(s.identifier);
|
|
1735
1735
|
}, t = (n) => {
|
|
1736
1736
|
for (let s of n.changedTouches)
|
|
1737
|
-
|
|
1737
|
+
ce.delete(s.identifier);
|
|
1738
1738
|
};
|
|
1739
1739
|
return document.addEventListener("touchstart", e, { passive: !0 }), document.addEventListener("touchend", t, { passive: !0 }), function() {
|
|
1740
|
-
|
|
1740
|
+
ce.clear(), document.removeEventListener("touchstart", e), document.removeEventListener("touchend", t);
|
|
1741
1741
|
};
|
|
1742
1742
|
}
|
|
1743
1743
|
function ds(e, t) {
|
|
@@ -1746,14 +1746,14 @@ function ds(e, t) {
|
|
|
1746
1746
|
e.removeEventListener("scrollend", t);
|
|
1747
1747
|
};
|
|
1748
1748
|
let n = 0, s;
|
|
1749
|
-
|
|
1749
|
+
se || (s = fs()), se += 1;
|
|
1750
1750
|
function i(o) {
|
|
1751
1751
|
clearTimeout(n), n = setTimeout(() => {
|
|
1752
|
-
|
|
1752
|
+
ce.size ? setTimeout(i, 100) : (t(o), n = 0);
|
|
1753
1753
|
}, 100);
|
|
1754
1754
|
}
|
|
1755
1755
|
return e.addEventListener("scroll", i), function() {
|
|
1756
|
-
e.removeEventListener("scroll", i),
|
|
1756
|
+
e.removeEventListener("scroll", i), se -= 1, se || s();
|
|
1757
1757
|
};
|
|
1758
1758
|
}
|
|
1759
1759
|
function hs(e, t, n) {
|
|
@@ -1788,23 +1788,23 @@ function vs(e) {
|
|
|
1788
1788
|
e.scenes.forEach((u) => {
|
|
1789
1789
|
u.target && u.centeredToTarget && (u.transform = hs(as(u.target), e.rect, c), t = !0), e.root ? i = gs(e) : (o = ps.bind(null, e), window.addEventListener("resize", o));
|
|
1790
1790
|
}), s = function(u) {
|
|
1791
|
-
for (let
|
|
1792
|
-
if (!
|
|
1793
|
-
const d =
|
|
1794
|
-
e.allowActiveEvent && (u.active = d <= 1 &&
|
|
1791
|
+
for (let f of e.scenes)
|
|
1792
|
+
if (!f.disabled) {
|
|
1793
|
+
const d = f.transform?.x(u.x) || u.x / e.rect.width, h = f.transform?.y(u.y) || u.y / e.rect.height, m = +We(0, 1, d).toPrecision(4), p = +We(0, 1, h).toPrecision(4), g = { x: u.vx, y: u.vy };
|
|
1794
|
+
e.allowActiveEvent && (u.active = d <= 1 && h <= 1 && d >= 0 && h >= 0), f.effect(f, { x: m, y: p }, g, u.active);
|
|
1795
1795
|
}
|
|
1796
1796
|
Object.assign(n, u);
|
|
1797
1797
|
}, t && (r = ms.bind(c, s, n), a = ds(document, r));
|
|
1798
|
-
function
|
|
1798
|
+
function l() {
|
|
1799
1799
|
e.scenes.forEach((u) => u.destroy?.()), a?.(), i ? (i.disconnect(), i = null) : (window.removeEventListener("resize", o), o = null), s = null, n = null;
|
|
1800
1800
|
}
|
|
1801
1801
|
return {
|
|
1802
1802
|
tick: s,
|
|
1803
|
-
destroy:
|
|
1803
|
+
destroy: l
|
|
1804
1804
|
};
|
|
1805
1805
|
}
|
|
1806
1806
|
const ys = 1e3 / 60 * 3;
|
|
1807
|
-
let
|
|
1807
|
+
let ie;
|
|
1808
1808
|
function Es() {
|
|
1809
1809
|
N.x = window.scrollX, N.y = window.scrollY;
|
|
1810
1810
|
}
|
|
@@ -1836,9 +1836,9 @@ class ws {
|
|
|
1836
1836
|
}, this._pointerEnter = () => {
|
|
1837
1837
|
this.progress.active = !0, this._nextTick = n();
|
|
1838
1838
|
}, this.config.root) {
|
|
1839
|
-
|
|
1840
|
-
const i =
|
|
1841
|
-
typeof N.fixRequired > "u" &&
|
|
1839
|
+
ie = typeof ie == "boolean" ? ie : cs();
|
|
1840
|
+
const i = ie ? window.devicePixelRatio : 1;
|
|
1841
|
+
typeof N.fixRequired > "u" && ls(N), this._measure = (o) => {
|
|
1842
1842
|
if (o.target !== this.config.root) {
|
|
1843
1843
|
const r = new PointerEvent("pointermove", {
|
|
1844
1844
|
bubbles: !0,
|
|
@@ -1881,7 +1881,7 @@ class ws {
|
|
|
1881
1881
|
let i = !1;
|
|
1882
1882
|
const o = (r) => {
|
|
1883
1883
|
const a = (r - this._startTime) / t, c = n(Math.min(1, a));
|
|
1884
|
-
i && (this.progress.vx = 0, this.progress.vy = 0, i = !1), this.currentProgress = Object.entries(this.progress).reduce((
|
|
1884
|
+
i && (this.progress.vx = 0, this.progress.vy = 0, i = !1), this.currentProgress = Object.entries(this.progress).reduce((l, [u, f]) => (u === "active" ? l[u] = f : l[u] = this.previousProgress[u] + (f - this.previousProgress[u]) * c, l), this.currentProgress || {}), a < 1 && (this._nextTransitionTick = requestAnimationFrame(o), i = r - this._startTime > ys), this.effect.tick(this.currentProgress);
|
|
1885
1885
|
};
|
|
1886
1886
|
return this._startTime ? (this._nextTransitionTick && cancelAnimationFrame(this._nextTransitionTick), Object.assign(this.previousProgress, this.currentProgress), this._startTime = s, o(s)) : this._startTime = s, this._nextTransitionTick;
|
|
1887
1887
|
}
|
|
@@ -1941,14 +1941,14 @@ function bs(e, t, n, s = {}, { reducedMotion: i }) {
|
|
|
1941
1941
|
c.destroy();
|
|
1942
1942
|
} };
|
|
1943
1943
|
A(Se, e, u), A(Se, t, u), Promise.all(
|
|
1944
|
-
a.map((
|
|
1944
|
+
a.map((f) => f.ready || Promise.resolve())
|
|
1945
1945
|
).then(() => {
|
|
1946
1946
|
c.start();
|
|
1947
1947
|
});
|
|
1948
1948
|
}
|
|
1949
1949
|
}
|
|
1950
1950
|
function Ss(e) {
|
|
1951
|
-
|
|
1951
|
+
J(Se, e);
|
|
1952
1952
|
}
|
|
1953
1953
|
const Is = {
|
|
1954
1954
|
add: bs,
|
|
@@ -1961,7 +1961,7 @@ function Ts(e, t, n, s, {
|
|
|
1961
1961
|
animation: r,
|
|
1962
1962
|
sourceAnimationOptions: a
|
|
1963
1963
|
}) {
|
|
1964
|
-
const c = r ||
|
|
1964
|
+
const c = r || Z(
|
|
1965
1965
|
t,
|
|
1966
1966
|
P(n),
|
|
1967
1967
|
void 0,
|
|
@@ -1969,13 +1969,13 @@ function Ts(e, t, n, s, {
|
|
|
1969
1969
|
);
|
|
1970
1970
|
if (!c)
|
|
1971
1971
|
return;
|
|
1972
|
-
const { effectId:
|
|
1972
|
+
const { effectId: l } = s, u = (h) => {
|
|
1973
1973
|
if (o && !t.matches(o)) return;
|
|
1974
|
-
const
|
|
1974
|
+
const m = h.animationName, p = h.detail?.effectId, g = a ? rt(e, a) : null;
|
|
1975
1975
|
if (g) {
|
|
1976
|
-
if (g.playState === "running" ||
|
|
1976
|
+
if (g.playState === "running" || m && !g.hasAnimationName(m))
|
|
1977
1977
|
return;
|
|
1978
|
-
if (p && p !==
|
|
1978
|
+
if (p && p !== l && !g.hasAnimationId(p))
|
|
1979
1979
|
return;
|
|
1980
1980
|
}
|
|
1981
1981
|
c.play();
|
|
@@ -1985,14 +1985,14 @@ function Ts(e, t, n, s, {
|
|
|
1985
1985
|
A(Ie, e, d), A(Ie, t, d), e.addEventListener("animationend", u);
|
|
1986
1986
|
}
|
|
1987
1987
|
function Cs(e) {
|
|
1988
|
-
|
|
1988
|
+
J(Ie, e);
|
|
1989
1989
|
}
|
|
1990
1990
|
const Os = {
|
|
1991
1991
|
add: Ts,
|
|
1992
1992
|
remove: Cs
|
|
1993
1993
|
};
|
|
1994
1994
|
function _s(e, t, n = !1, s, i, o) {
|
|
1995
|
-
const r = o ||
|
|
1995
|
+
const r = o || Z(
|
|
1996
1996
|
e,
|
|
1997
1997
|
P(t),
|
|
1998
1998
|
void 0,
|
|
@@ -2002,20 +2002,20 @@ function _s(e, t, n = !1, s, i, o) {
|
|
|
2002
2002
|
return null;
|
|
2003
2003
|
let a = !0;
|
|
2004
2004
|
const c = t.triggerType || "alternate";
|
|
2005
|
-
return (
|
|
2005
|
+
return (l) => {
|
|
2006
2006
|
if (s && !e.matches(s)) return;
|
|
2007
|
-
const u = !i,
|
|
2008
|
-
if (
|
|
2007
|
+
const u = !i, f = i?.enter?.includes(l.type), d = i?.leave?.includes(l.type);
|
|
2008
|
+
if (f || u) {
|
|
2009
2009
|
if (c === "alternate" || c === "state")
|
|
2010
2010
|
a ? (a = !1, r.play()) : c === "alternate" ? r.reverse() : c === "state" && (r.playState === "running" ? r.pause() : r.playState !== "finished" && r.play());
|
|
2011
2011
|
else {
|
|
2012
2012
|
if (r.progress(0), delete e.dataset.interactEnter, r.isCSS) {
|
|
2013
|
-
const
|
|
2013
|
+
const h = () => {
|
|
2014
2014
|
C.mutate(() => {
|
|
2015
2015
|
e.dataset.interactEnter = "done";
|
|
2016
2016
|
});
|
|
2017
2017
|
};
|
|
2018
|
-
r.onFinish(
|
|
2018
|
+
r.onFinish(h), r.onAbort(h);
|
|
2019
2019
|
}
|
|
2020
2020
|
r.play();
|
|
2021
2021
|
}
|
|
@@ -2032,13 +2032,13 @@ function As(e, t, {
|
|
|
2032
2032
|
listItemSelector: i,
|
|
2033
2033
|
stateAction: o
|
|
2034
2034
|
}, r, a) {
|
|
2035
|
-
const c = !!s,
|
|
2036
|
-
return (
|
|
2035
|
+
const c = !!s, l = o ?? "toggle", u = l === "toggle";
|
|
2036
|
+
return (f) => {
|
|
2037
2037
|
if (r && !e.matches(r)) return;
|
|
2038
2038
|
const d = c ? e.closest(
|
|
2039
2039
|
`${s} > ${i || ""}:has(:scope)`
|
|
2040
|
-
) : void 0,
|
|
2041
|
-
|
|
2040
|
+
) : void 0, h = !a, m = a?.enter?.includes(f.type), p = a?.leave?.includes(f.type);
|
|
2041
|
+
h ? t.toggleEffect(n, l, d) : (m && t.toggleEffect(n, u ? "add" : l, d), p && u && t.toggleEffect(n, "remove", d));
|
|
2042
2042
|
};
|
|
2043
2043
|
}
|
|
2044
2044
|
const Te = /* @__PURE__ */ new WeakMap();
|
|
@@ -2096,30 +2096,30 @@ function Ns(e, t, n, s, {
|
|
|
2096
2096
|
selectorCondition: r,
|
|
2097
2097
|
animation: a
|
|
2098
2098
|
}) {
|
|
2099
|
-
const c = Ls(s.eventConfig),
|
|
2100
|
-
let
|
|
2101
|
-
if (
|
|
2099
|
+
const c = Ls(s.eventConfig), l = n.transition || n.transitionProperties, u = Rs(c);
|
|
2100
|
+
let f, d = !1;
|
|
2101
|
+
if (l ? f = As(
|
|
2102
2102
|
t,
|
|
2103
2103
|
o,
|
|
2104
2104
|
n,
|
|
2105
2105
|
r,
|
|
2106
2106
|
u
|
|
2107
|
-
) : (
|
|
2107
|
+
) : (f = _s(
|
|
2108
2108
|
t,
|
|
2109
2109
|
n,
|
|
2110
2110
|
i,
|
|
2111
2111
|
r,
|
|
2112
2112
|
u,
|
|
2113
2113
|
a
|
|
2114
|
-
), d = n.triggerType === "once"), !
|
|
2114
|
+
), d = n.triggerType === "once"), !f)
|
|
2115
2115
|
return;
|
|
2116
|
-
const
|
|
2116
|
+
const h = f, m = new AbortController();
|
|
2117
2117
|
function p(y, E, $) {
|
|
2118
|
-
const b = Ps(E, e,
|
|
2119
|
-
y.addEventListener(E, b, { ...$, signal:
|
|
2118
|
+
const b = Ps(E, e, h);
|
|
2119
|
+
y.addEventListener(E, b, { ...$, signal: m.signal });
|
|
2120
2120
|
}
|
|
2121
2121
|
const v = { source: e, target: t, cleanup: () => {
|
|
2122
|
-
|
|
2122
|
+
m.abort();
|
|
2123
2123
|
} };
|
|
2124
2124
|
if (A(Te, e, v), A(Te, t, v), u) {
|
|
2125
2125
|
const y = c.enter, E = c.leave;
|
|
@@ -2127,7 +2127,7 @@ function Ns(e, t, n, s, {
|
|
|
2127
2127
|
S === "focusin" && (e.tabIndex = 0), p(e, S, { passive: !0, once: d });
|
|
2128
2128
|
});
|
|
2129
2129
|
const $ = !n.stateAction || n.stateAction === "toggle";
|
|
2130
|
-
(
|
|
2130
|
+
(l ? $ : n.triggerType !== "once") && E.forEach((S) => {
|
|
2131
2131
|
if (S === "focusout") {
|
|
2132
2132
|
p(e, S, { once: d });
|
|
2133
2133
|
return;
|
|
@@ -2140,7 +2140,7 @@ function Ns(e, t, n, s, {
|
|
|
2140
2140
|
});
|
|
2141
2141
|
}
|
|
2142
2142
|
function zs(e) {
|
|
2143
|
-
|
|
2143
|
+
J(Te, e);
|
|
2144
2144
|
}
|
|
2145
2145
|
const Y = {
|
|
2146
2146
|
add: Ns,
|
|
@@ -2157,7 +2157,7 @@ const Y = {
|
|
|
2157
2157
|
click: Ce.activate,
|
|
2158
2158
|
hover: Ce.interest
|
|
2159
2159
|
};
|
|
2160
|
-
function
|
|
2160
|
+
function oe(e) {
|
|
2161
2161
|
const t = Ce[e];
|
|
2162
2162
|
return (n, s, i, o, r) => {
|
|
2163
2163
|
const a = r?.allowA11yTriggers && e in Ke ? Ke[e] : t;
|
|
@@ -2167,22 +2167,22 @@ function ie(e) {
|
|
|
2167
2167
|
const j = {
|
|
2168
2168
|
viewEnter: jn,
|
|
2169
2169
|
hover: {
|
|
2170
|
-
add:
|
|
2170
|
+
add: oe("hover"),
|
|
2171
2171
|
remove: Y.remove
|
|
2172
2172
|
},
|
|
2173
2173
|
click: {
|
|
2174
|
-
add:
|
|
2174
|
+
add: oe("click"),
|
|
2175
2175
|
remove: Y.remove
|
|
2176
2176
|
},
|
|
2177
2177
|
animationEnd: Os,
|
|
2178
2178
|
viewProgress: rs,
|
|
2179
2179
|
pointerMove: Is,
|
|
2180
2180
|
activate: {
|
|
2181
|
-
add:
|
|
2181
|
+
add: oe("activate"),
|
|
2182
2182
|
remove: Y.remove
|
|
2183
2183
|
},
|
|
2184
2184
|
interest: {
|
|
2185
|
-
add:
|
|
2185
|
+
add: oe("interest"),
|
|
2186
2186
|
remove: Y.remove
|
|
2187
2187
|
}
|
|
2188
2188
|
};
|
|
@@ -2210,7 +2210,7 @@ class w {
|
|
|
2210
2210
|
if (typeof window > "u" || !window.customElements)
|
|
2211
2211
|
return;
|
|
2212
2212
|
const s = n?.useCustomElement ?? !!w.defineInteractElement;
|
|
2213
|
-
this.dataCache =
|
|
2213
|
+
this.dataCache = Ds(t, s);
|
|
2214
2214
|
const i = w.defineInteractElement?.();
|
|
2215
2215
|
s && i === !1 ? document.querySelectorAll("interact-element").forEach((o) => {
|
|
2216
2216
|
o.connect();
|
|
@@ -2315,8 +2315,8 @@ class w {
|
|
|
2315
2315
|
static addToSequence(t, n, s, i) {
|
|
2316
2316
|
const o = w.sequenceCache.get(t);
|
|
2317
2317
|
if (!o) return !1;
|
|
2318
|
-
const a = ct(n, i).map((c,
|
|
2319
|
-
index: s[
|
|
2318
|
+
const a = ct(n, i).map((c, l) => ({
|
|
2319
|
+
index: s[l] ?? o.animationGroups.length,
|
|
2320
2320
|
group: c
|
|
2321
2321
|
}));
|
|
2322
2322
|
return o.addGroups(a), w._registerSequenceElements(n, o), !0;
|
|
@@ -2343,8 +2343,8 @@ class w {
|
|
|
2343
2343
|
}
|
|
2344
2344
|
}
|
|
2345
2345
|
}
|
|
2346
|
-
let
|
|
2347
|
-
function
|
|
2346
|
+
let Hs = 0;
|
|
2347
|
+
function H(e, {
|
|
2348
2348
|
asCombinator: t = !1,
|
|
2349
2349
|
addItemFilter: n = !1,
|
|
2350
2350
|
useFirstChild: s = !1
|
|
@@ -2368,18 +2368,18 @@ function Ee(e, t) {
|
|
|
2368
2368
|
selectors: /* @__PURE__ */ new Set()
|
|
2369
2369
|
}), e[t];
|
|
2370
2370
|
}
|
|
2371
|
-
function
|
|
2371
|
+
function Ds(e, t = !1) {
|
|
2372
2372
|
const { effects: n = {}, sequences: s = {}, conditions: i = {} } = e, o = {};
|
|
2373
2373
|
return e.interactions?.forEach((r, a) => {
|
|
2374
|
-
const c = r.key,
|
|
2374
|
+
const c = r.key, l = ++Hs, { effects: u, sequences: f, ...d } = r;
|
|
2375
2375
|
if (!c) {
|
|
2376
|
-
console.error(`Interaction ${
|
|
2376
|
+
console.error(`Interaction ${l} is missing a key for source element.`);
|
|
2377
2377
|
return;
|
|
2378
2378
|
}
|
|
2379
2379
|
Ee(o, c);
|
|
2380
|
-
const
|
|
2381
|
-
|
|
2382
|
-
const
|
|
2380
|
+
const h = u ? Array.from(u) : [];
|
|
2381
|
+
h.reverse();
|
|
2382
|
+
const m = f?.map((v, y) => {
|
|
2383
2383
|
if (Be(v)) {
|
|
2384
2384
|
const $ = s[v.sequenceId];
|
|
2385
2385
|
return $ ? { ...$, ...v } : (console.warn(`Interact: Sequence "${v.sequenceId}" not found in config`), v);
|
|
@@ -2388,29 +2388,24 @@ function Hs(e, t = !1) {
|
|
|
2388
2388
|
return E.sequenceId || (E.sequenceId = `seq-${a}-${y}`), E;
|
|
2389
2389
|
}), p = {
|
|
2390
2390
|
...d,
|
|
2391
|
-
effects:
|
|
2392
|
-
sequences:
|
|
2391
|
+
effects: h.length > 0 ? h : void 0,
|
|
2392
|
+
sequences: m
|
|
2393
2393
|
};
|
|
2394
2394
|
o[c].triggers.push(p), o[c].selectors.add(
|
|
2395
|
-
|
|
2395
|
+
H(p, { useFirstChild: t })
|
|
2396
2396
|
);
|
|
2397
2397
|
const g = p.listContainer;
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
I && (E = I.key);
|
|
2403
|
-
}
|
|
2404
|
-
v.effectId || (v.effectId = `eff-${a}-${m.length - 1 - y}`), E = E || c, v.key = E;
|
|
2405
|
-
const $ = v.effectId;
|
|
2406
|
-
if (g && v.listContainer && (E !== c || v.listContainer !== g))
|
|
2398
|
+
h.forEach((v, y) => {
|
|
2399
|
+
const E = v.effectId ? n[v.effectId] : void 0;
|
|
2400
|
+
let $ = v.key || E?.key;
|
|
2401
|
+
if (v.effectId || (v.effectId = `eff-${a}-${h.length - 1 - y}`), $ = $ || c, v.key = $, g && v.listContainer && ($ !== c || v.listContainer !== g))
|
|
2407
2402
|
return;
|
|
2408
|
-
const b = `${c}::${
|
|
2409
|
-
if (v.interactionId =
|
|
2403
|
+
const b = B({ ...E, ...v, key: $ }), S = `${c}::${b}::${l}`;
|
|
2404
|
+
if (v.interactionId = S, o[c].interactionIds.add(S), $ === c)
|
|
2410
2405
|
return;
|
|
2411
|
-
const
|
|
2412
|
-
|
|
2413
|
-
}),
|
|
2406
|
+
const I = Ee(o, $);
|
|
2407
|
+
I.effects[S] || (I.effects[S] = [], I.interactionIds.add(S)), I.effects[S].push({ ...d, effect: v }), I.selectors.add(H(v, { useFirstChild: t }));
|
|
2408
|
+
}), m?.forEach((v) => {
|
|
2414
2409
|
if (!v || Be(v)) return;
|
|
2415
2410
|
const y = v, E = y.sequenceId;
|
|
2416
2411
|
y.effects.forEach((b, S) => {
|
|
@@ -2421,9 +2416,9 @@ function Hs(e, t = !1) {
|
|
|
2421
2416
|
T && (I = T.key);
|
|
2422
2417
|
}
|
|
2423
2418
|
I = I || c;
|
|
2424
|
-
const O =
|
|
2419
|
+
const O = H(b, { useFirstChild: t });
|
|
2425
2420
|
if (O && o[c].selectors.add(O), I !== c) {
|
|
2426
|
-
const T = Ee(o, I), _ = `${I}::seq::${E}::${
|
|
2421
|
+
const T = Ee(o, I), _ = `${I}::seq::${E}::${l}`;
|
|
2427
2422
|
T.sequences[_] || (T.sequences[_] = [], T.interactionIds.add(_)), T.sequences[_].push({
|
|
2428
2423
|
...d,
|
|
2429
2424
|
sequence: y
|
|
@@ -2448,10 +2443,10 @@ function Ws(e) {
|
|
|
2448
2443
|
function Vs(e) {
|
|
2449
2444
|
return e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
|
|
2450
2445
|
}
|
|
2451
|
-
function
|
|
2446
|
+
function ue(e, t) {
|
|
2452
2447
|
return t.includes("&") ? t.replace(/&/g, e) : `${e}${t}`;
|
|
2453
2448
|
}
|
|
2454
|
-
function
|
|
2449
|
+
function Q() {
|
|
2455
2450
|
return "wi-12343210".replace(
|
|
2456
2451
|
/\d/g,
|
|
2457
2452
|
(e) => String.fromCharCode(
|
|
@@ -2464,7 +2459,7 @@ function gt(e) {
|
|
|
2464
2459
|
const { transition: t, transitionProperties: n } = e;
|
|
2465
2460
|
return (t?.styleProperties || n || []).map((i) => ({
|
|
2466
2461
|
...i,
|
|
2467
|
-
name:
|
|
2462
|
+
name: le(i.name)
|
|
2468
2463
|
}));
|
|
2469
2464
|
}
|
|
2470
2465
|
function vt(e) {
|
|
@@ -2474,16 +2469,16 @@ function vt(e) {
|
|
|
2474
2469
|
i && (t.styleProperties.some(
|
|
2475
2470
|
(c) => c.name.startsWith("--")
|
|
2476
2471
|
) ? s = [
|
|
2477
|
-
`all ${i}ms ${
|
|
2472
|
+
`all ${i}ms ${re(o || "ease")}${r ? ` ${r}ms` : ""}`,
|
|
2478
2473
|
"visibility 0s"
|
|
2479
2474
|
] : s = t.styleProperties.map(
|
|
2480
|
-
(c) => `${
|
|
2475
|
+
(c) => `${le(c.name)} ${i}ms ${re(
|
|
2481
2476
|
o || "ease"
|
|
2482
2477
|
)}${r ? ` ${r}ms` : ""}`
|
|
2483
2478
|
));
|
|
2484
2479
|
} else
|
|
2485
2480
|
s = n?.filter((i) => i.duration).map(
|
|
2486
|
-
(i) => `${
|
|
2481
|
+
(i) => `${le(i.name)} ${i.duration}ms ${re(i.easing) || "ease"}${i.delay ? ` ${i.delay}ms` : ""}`
|
|
2487
2482
|
) || [];
|
|
2488
2483
|
return s;
|
|
2489
2484
|
}
|
|
@@ -2499,28 +2494,28 @@ function Ys({
|
|
|
2499
2494
|
transition: n,
|
|
2500
2495
|
transitionProperties: s
|
|
2501
2496
|
}), a = gt({ transition: n, transitionProperties: s }).map(
|
|
2502
|
-
(
|
|
2503
|
-
), c = e.replace(/"/g, "'"),
|
|
2504
|
-
`${
|
|
2497
|
+
(m) => `${m.name}: ${m.value};`
|
|
2498
|
+
), c = e.replace(/"/g, "'"), l = `:is(:state(${t}), :--${t}) ${i}`, u = `[data-interact-effect~="${t}"] ${i}`, f = o ? ue(l, o) : l, d = o ? ue(u, o) : u, h = [
|
|
2499
|
+
`${f},
|
|
2505
2500
|
${d} {
|
|
2506
2501
|
${a.join(`
|
|
2507
2502
|
`)}
|
|
2508
2503
|
}`
|
|
2509
2504
|
];
|
|
2510
2505
|
if (r.length) {
|
|
2511
|
-
const
|
|
2512
|
-
|
|
2506
|
+
const m = `[data-interact-key="${c}"] ${i}`, p = o ? ue(m, o) : m;
|
|
2507
|
+
h.push(`@media (prefers-reduced-motion: no-preference) { ${p} {
|
|
2513
2508
|
transition: ${r.join(", ")};
|
|
2514
2509
|
} }`);
|
|
2515
2510
|
}
|
|
2516
|
-
return
|
|
2511
|
+
return h;
|
|
2517
2512
|
}
|
|
2518
|
-
function
|
|
2513
|
+
function ee(e, t, n) {
|
|
2519
2514
|
const s = (e || []).filter((i) => t[i]?.type === n && t[i].predicate).map((i) => t[i].predicate).join(") and (");
|
|
2520
2515
|
return s && `(${s})`;
|
|
2521
2516
|
}
|
|
2522
2517
|
function k(e, t) {
|
|
2523
|
-
const n =
|
|
2518
|
+
const n = ee(e, t, "media");
|
|
2524
2519
|
return n && window.matchMedia(n);
|
|
2525
2520
|
}
|
|
2526
2521
|
function M(e, t) {
|
|
@@ -2565,9 +2560,9 @@ function yt(e, t, n, s, i, o, r, a) {
|
|
|
2565
2560
|
];
|
|
2566
2561
|
}
|
|
2567
2562
|
function Et(e, t, n, s, i, o, r, a) {
|
|
2568
|
-
const c = Array.isArray(s),
|
|
2569
|
-
c ? s.forEach((u,
|
|
2570
|
-
const d =
|
|
2563
|
+
const c = Array.isArray(s), l = Array.isArray(i);
|
|
2564
|
+
c ? s.forEach((u, f) => {
|
|
2565
|
+
const d = l ? i[f] : i;
|
|
2571
2566
|
d && Ue(
|
|
2572
2567
|
e,
|
|
2573
2568
|
u,
|
|
@@ -2579,12 +2574,12 @@ function Et(e, t, n, s, i, o, r, a) {
|
|
|
2579
2574
|
r,
|
|
2580
2575
|
a
|
|
2581
2576
|
);
|
|
2582
|
-
}) : (
|
|
2577
|
+
}) : (l ? i : [i]).forEach((f) => {
|
|
2583
2578
|
Ue(
|
|
2584
2579
|
e,
|
|
2585
2580
|
s,
|
|
2586
2581
|
t.trigger,
|
|
2587
|
-
|
|
2582
|
+
f,
|
|
2588
2583
|
n,
|
|
2589
2584
|
t.params,
|
|
2590
2585
|
o,
|
|
@@ -2595,58 +2590,58 @@ function Et(e, t, n, s, i, o, r, a) {
|
|
|
2595
2590
|
}
|
|
2596
2591
|
function wt(e, t, n, s, i) {
|
|
2597
2592
|
const o = {}, r = [];
|
|
2598
|
-
(s.effects || []).forEach((a) => {
|
|
2599
|
-
const
|
|
2600
|
-
...n.dataCache.effects[
|
|
2593
|
+
(s.effects || []).forEach((a, c) => {
|
|
2594
|
+
const l = a.effectId, u = {
|
|
2595
|
+
...n.dataCache.effects[l] || {},
|
|
2601
2596
|
...a,
|
|
2602
|
-
effectId:
|
|
2603
|
-
},
|
|
2604
|
-
if (o[
|
|
2597
|
+
effectId: l
|
|
2598
|
+
}, f = u.key, d = q(a.interactionId, e);
|
|
2599
|
+
if (o[d] || n.addedInteractions[d] && !i)
|
|
2605
2600
|
return;
|
|
2606
|
-
const
|
|
2607
|
-
if (
|
|
2601
|
+
const h = k(u.conditions || [], n.dataCache.conditions);
|
|
2602
|
+
if (h && n.setupMediaQueryListener(`${d}::${c}`, h, e, () => {
|
|
2608
2603
|
t.update();
|
|
2609
|
-
}), !
|
|
2610
|
-
o[
|
|
2611
|
-
const m =
|
|
2612
|
-
let
|
|
2604
|
+
}), !h || h.matches) {
|
|
2605
|
+
o[d] = !0;
|
|
2606
|
+
const m = f && q(f, e);
|
|
2607
|
+
let p;
|
|
2613
2608
|
if (m) {
|
|
2614
|
-
if (
|
|
2609
|
+
if (p = w.getController(m), !p)
|
|
2615
2610
|
return;
|
|
2616
|
-
|
|
2611
|
+
u.listContainer && p.watchChildList(u.listContainer);
|
|
2617
2612
|
} else
|
|
2618
|
-
|
|
2613
|
+
p = t;
|
|
2619
2614
|
ge(
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2615
|
+
p,
|
|
2616
|
+
p.element,
|
|
2617
|
+
u,
|
|
2623
2618
|
m || s.key,
|
|
2624
2619
|
"effect"
|
|
2625
2620
|
);
|
|
2626
|
-
const [
|
|
2621
|
+
const [g, v] = yt(
|
|
2627
2622
|
s,
|
|
2628
|
-
|
|
2623
|
+
u,
|
|
2629
2624
|
t.element,
|
|
2630
2625
|
t.useFirstChild,
|
|
2631
|
-
|
|
2632
|
-
|
|
2626
|
+
p.element,
|
|
2627
|
+
p.useFirstChild,
|
|
2633
2628
|
i
|
|
2634
2629
|
);
|
|
2635
|
-
if (!
|
|
2630
|
+
if (!g || !v)
|
|
2636
2631
|
return;
|
|
2637
|
-
n.addedInteractions[
|
|
2638
|
-
const
|
|
2639
|
-
|
|
2632
|
+
n.addedInteractions[d] = !0;
|
|
2633
|
+
const y = m || s.key, E = M(
|
|
2634
|
+
u.conditions || [],
|
|
2640
2635
|
n.dataCache.conditions
|
|
2641
2636
|
);
|
|
2642
2637
|
r.push([
|
|
2643
|
-
|
|
2638
|
+
y,
|
|
2644
2639
|
s,
|
|
2645
|
-
|
|
2646
|
-
p,
|
|
2640
|
+
u,
|
|
2647
2641
|
g,
|
|
2648
|
-
|
|
2649
|
-
|
|
2642
|
+
v,
|
|
2643
|
+
E,
|
|
2644
|
+
p.useFirstChild,
|
|
2650
2645
|
e
|
|
2651
2646
|
]);
|
|
2652
2647
|
}
|
|
@@ -2660,13 +2655,13 @@ function Ks(e) {
|
|
|
2660
2655
|
function $t(e, t, n, s, i, o, r) {
|
|
2661
2656
|
const a = k(e.conditions || [], i.dataCache.conditions);
|
|
2662
2657
|
if (a && i.setupMediaQueryListener(t, a, o.updateKey, o.onUpdate), a && !a.matches) return null;
|
|
2663
|
-
const c = e.effects || [],
|
|
2658
|
+
const c = e.effects || [], l = [];
|
|
2664
2659
|
let u = !1;
|
|
2665
|
-
for (const
|
|
2666
|
-
const d =
|
|
2660
|
+
for (const f of c) {
|
|
2661
|
+
const d = f.effectId, m = {
|
|
2667
2662
|
...d ? i.dataCache.effects[d] || {} : {},
|
|
2668
|
-
...
|
|
2669
|
-
}, p = k(
|
|
2663
|
+
...f
|
|
2664
|
+
}, p = k(m.conditions || [], i.dataCache.conditions);
|
|
2670
2665
|
if (p) {
|
|
2671
2666
|
const S = `${t}::${d || "eff"}`;
|
|
2672
2667
|
i.setupMediaQueryListener(
|
|
@@ -2677,7 +2672,7 @@ function $t(e, t, n, s, i, o, r) {
|
|
|
2677
2672
|
);
|
|
2678
2673
|
}
|
|
2679
2674
|
if (p && !p.matches) continue;
|
|
2680
|
-
const g =
|
|
2675
|
+
const g = m.key, v = g && q(g, n);
|
|
2681
2676
|
let y;
|
|
2682
2677
|
if (v) {
|
|
2683
2678
|
if (y = w.getController(v), !y) return null;
|
|
@@ -2687,20 +2682,20 @@ function $t(e, t, n, s, i, o, r) {
|
|
|
2687
2682
|
ge(
|
|
2688
2683
|
y,
|
|
2689
2684
|
y.element,
|
|
2690
|
-
|
|
2685
|
+
m,
|
|
2691
2686
|
E,
|
|
2692
2687
|
"effect"
|
|
2693
2688
|
);
|
|
2694
2689
|
let $;
|
|
2695
|
-
if (r && E === r.controllerKey &&
|
|
2696
|
-
|
|
2690
|
+
if (r && E === r.controllerKey && m.listContainer === r.listContainer ? ($ = me(m, r.elements), $.length > 0 && (u = !0)) : $ = he(
|
|
2691
|
+
m,
|
|
2697
2692
|
y.element,
|
|
2698
2693
|
y.useFirstChild
|
|
2699
2694
|
), !$ || Array.isArray($) && $.length === 0) return null;
|
|
2700
|
-
const b = P(
|
|
2701
|
-
|
|
2695
|
+
const b = P(m);
|
|
2696
|
+
l.push({ target: $, options: b });
|
|
2702
2697
|
}
|
|
2703
|
-
return r && !u ? null :
|
|
2698
|
+
return r && !u ? null : l.length > 0 ? l : null;
|
|
2704
2699
|
}
|
|
2705
2700
|
function Oe(e, t, n) {
|
|
2706
2701
|
const s = n ? me(e, n) : he(e, t.element, t.useFirstChild);
|
|
@@ -2735,33 +2730,33 @@ function Bs(e, t, n, s, i) {
|
|
|
2735
2730
|
s.sequences?.forEach((o) => {
|
|
2736
2731
|
let r;
|
|
2737
2732
|
if (Ks(o)) {
|
|
2738
|
-
const
|
|
2739
|
-
if (!
|
|
2733
|
+
const m = n.dataCache.sequences[o.sequenceId];
|
|
2734
|
+
if (!m) {
|
|
2740
2735
|
console.warn(`Interact: Sequence "${o.sequenceId}" not found in cache`);
|
|
2741
2736
|
return;
|
|
2742
2737
|
}
|
|
2743
|
-
r = { ...
|
|
2738
|
+
r = { ...m, ...o };
|
|
2744
2739
|
} else
|
|
2745
2740
|
r = o;
|
|
2746
|
-
const a = r.sequenceId ||
|
|
2741
|
+
const a = r.sequenceId || Q(), c = q(`${e}::seq::${a}`, e);
|
|
2747
2742
|
if (n.addedInteractions[c] && !i) return;
|
|
2748
|
-
const
|
|
2743
|
+
const l = i && s.listContainer ? { controllerKey: e, listContainer: s.listContainer, elements: i } : void 0, u = $t(
|
|
2749
2744
|
r,
|
|
2750
2745
|
c,
|
|
2751
2746
|
e,
|
|
2752
2747
|
t,
|
|
2753
2748
|
n,
|
|
2754
2749
|
{ updateKey: e, onUpdate: () => t.update() },
|
|
2755
|
-
|
|
2750
|
+
l
|
|
2756
2751
|
);
|
|
2757
2752
|
if (!u) return;
|
|
2758
2753
|
if (i && n.addedInteractions[c]) {
|
|
2759
|
-
const
|
|
2754
|
+
const m = bt(
|
|
2760
2755
|
t,
|
|
2761
2756
|
s.listContainer,
|
|
2762
2757
|
i
|
|
2763
2758
|
);
|
|
2764
|
-
w.addToSequence(c, u,
|
|
2759
|
+
w.addToSequence(c, u, m, {
|
|
2765
2760
|
reducedMotion: w.forceReducedMotion
|
|
2766
2761
|
});
|
|
2767
2762
|
const p = w.getSequence(c, r, u, {
|
|
@@ -2779,17 +2774,17 @@ function Bs(e, t, n, s, i) {
|
|
|
2779
2774
|
);
|
|
2780
2775
|
return;
|
|
2781
2776
|
}
|
|
2782
|
-
const
|
|
2777
|
+
const f = w.getSequence(c, r, u, {
|
|
2783
2778
|
reducedMotion: w.forceReducedMotion
|
|
2784
2779
|
}), d = M(
|
|
2785
2780
|
s.conditions || [],
|
|
2786
2781
|
n.dataCache.conditions
|
|
2787
|
-
),
|
|
2788
|
-
|
|
2782
|
+
), h = Oe(s, t, i);
|
|
2783
|
+
h && (n.addedInteractions[c] = !0, _e(
|
|
2789
2784
|
s,
|
|
2790
2785
|
r,
|
|
2791
|
-
|
|
2792
|
-
|
|
2786
|
+
h,
|
|
2787
|
+
f,
|
|
2793
2788
|
d
|
|
2794
2789
|
));
|
|
2795
2790
|
});
|
|
@@ -2797,24 +2792,24 @@ function Bs(e, t, n, s, i) {
|
|
|
2797
2792
|
function Us(e, t, n, s, i) {
|
|
2798
2793
|
const o = n.get(e)?.sequences || {};
|
|
2799
2794
|
Object.keys(o).forEach((a) => {
|
|
2800
|
-
o[a].some(({ sequence:
|
|
2801
|
-
const
|
|
2795
|
+
o[a].some(({ sequence: l, ...u }) => {
|
|
2796
|
+
const f = k(
|
|
2802
2797
|
u.conditions || [],
|
|
2803
2798
|
n.dataCache.conditions
|
|
2804
2799
|
);
|
|
2805
|
-
if (
|
|
2800
|
+
if (f && !f.matches)
|
|
2806
2801
|
return !1;
|
|
2807
|
-
const d = u.key && q(u.key, e),
|
|
2808
|
-
if (!
|
|
2802
|
+
const d = u.key && q(u.key, e), h = w.getController(d);
|
|
2803
|
+
if (!h)
|
|
2809
2804
|
return !0;
|
|
2810
|
-
const
|
|
2805
|
+
const m = l.sequenceId || Q(), p = q(`${d}::seq::${m}`, d);
|
|
2811
2806
|
if (n.addedInteractions[p] && !i)
|
|
2812
2807
|
return !0;
|
|
2813
2808
|
const v = $t(
|
|
2814
|
-
|
|
2809
|
+
l,
|
|
2815
2810
|
p,
|
|
2816
2811
|
d,
|
|
2817
|
-
|
|
2812
|
+
h,
|
|
2818
2813
|
n,
|
|
2819
2814
|
{ updateKey: e, onUpdate: () => t.update() },
|
|
2820
2815
|
i && s ? { controllerKey: e, listContainer: s, elements: i } : void 0
|
|
@@ -2826,15 +2821,15 @@ function Us(e, t, n, s, i) {
|
|
|
2826
2821
|
reducedMotion: w.forceReducedMotion
|
|
2827
2822
|
}), !0;
|
|
2828
2823
|
}
|
|
2829
|
-
const y = w.getSequence(p,
|
|
2824
|
+
const y = w.getSequence(p, l, v, {
|
|
2830
2825
|
reducedMotion: w.forceReducedMotion
|
|
2831
2826
|
}), E = M(
|
|
2832
2827
|
u.conditions || [],
|
|
2833
2828
|
n.dataCache.conditions
|
|
2834
|
-
), $ = Oe(u,
|
|
2829
|
+
), $ = Oe(u, h);
|
|
2835
2830
|
return $ && (n.addedInteractions[p] = !0, _e(
|
|
2836
2831
|
u,
|
|
2837
|
-
|
|
2832
|
+
l,
|
|
2838
2833
|
$,
|
|
2839
2834
|
y,
|
|
2840
2835
|
E
|
|
@@ -2845,63 +2840,68 @@ function Us(e, t, n, s, i) {
|
|
|
2845
2840
|
function St(e, t, n, s, i) {
|
|
2846
2841
|
const o = n.get(e), r = o?.effects || {}, a = Object.keys(r), c = [];
|
|
2847
2842
|
a.forEach((u) => {
|
|
2848
|
-
const
|
|
2849
|
-
if (n.addedInteractions[
|
|
2843
|
+
const f = q(u, e);
|
|
2844
|
+
if (n.addedInteractions[f] && !i)
|
|
2850
2845
|
return;
|
|
2851
|
-
r[u].some(({ effect:
|
|
2852
|
-
const
|
|
2853
|
-
|
|
2846
|
+
r[u].some(({ effect: h, ...m }, p) => {
|
|
2847
|
+
const g = k(
|
|
2848
|
+
m.conditions || [],
|
|
2854
2849
|
n.dataCache.conditions
|
|
2855
2850
|
);
|
|
2856
|
-
if (
|
|
2851
|
+
if (g && !g.matches)
|
|
2857
2852
|
return !1;
|
|
2858
|
-
const
|
|
2859
|
-
...n.dataCache.effects[
|
|
2860
|
-
...
|
|
2861
|
-
effectId:
|
|
2853
|
+
const v = h.effectId, y = {
|
|
2854
|
+
...n.dataCache.effects[v] || {},
|
|
2855
|
+
...h,
|
|
2856
|
+
effectId: v
|
|
2862
2857
|
};
|
|
2863
|
-
if (s &&
|
|
2858
|
+
if (s && y.listContainer !== s)
|
|
2864
2859
|
return !1;
|
|
2865
|
-
const
|
|
2866
|
-
if (
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2860
|
+
const E = k(y.conditions || [], n.dataCache.conditions);
|
|
2861
|
+
if (E && n.setupMediaQueryListener(
|
|
2862
|
+
`${f}::${p}`,
|
|
2863
|
+
E,
|
|
2864
|
+
e,
|
|
2865
|
+
() => {
|
|
2866
|
+
t.update();
|
|
2867
|
+
}
|
|
2868
|
+
), !E || E.matches) {
|
|
2869
|
+
const $ = m.key && q(m.key, e), b = w.getController($);
|
|
2870
|
+
if (!b)
|
|
2871
2871
|
return !0;
|
|
2872
2872
|
ge(
|
|
2873
2873
|
t,
|
|
2874
2874
|
t.element,
|
|
2875
|
-
|
|
2875
|
+
y,
|
|
2876
2876
|
e,
|
|
2877
2877
|
"effect"
|
|
2878
|
-
),
|
|
2879
|
-
const [
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2878
|
+
), y.listContainer && t.watchChildList(y.listContainer);
|
|
2879
|
+
const [S, I] = yt(
|
|
2880
|
+
m,
|
|
2881
|
+
y,
|
|
2882
|
+
b.element,
|
|
2883
|
+
b.useFirstChild,
|
|
2884
2884
|
t.element,
|
|
2885
2885
|
t.useFirstChild,
|
|
2886
2886
|
void 0,
|
|
2887
2887
|
i
|
|
2888
2888
|
);
|
|
2889
|
-
if (!
|
|
2889
|
+
if (!S || !I)
|
|
2890
2890
|
return !0;
|
|
2891
|
-
n.addedInteractions[
|
|
2892
|
-
const
|
|
2893
|
-
|
|
2891
|
+
n.addedInteractions[f] = !0;
|
|
2892
|
+
const O = M(
|
|
2893
|
+
y.conditions || [],
|
|
2894
2894
|
n.dataCache.conditions
|
|
2895
2895
|
);
|
|
2896
2896
|
return c.push([
|
|
2897
2897
|
e,
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
b,
|
|
2898
|
+
m,
|
|
2899
|
+
y,
|
|
2901
2900
|
S,
|
|
2902
2901
|
I,
|
|
2902
|
+
O,
|
|
2903
2903
|
t.useFirstChild,
|
|
2904
|
-
|
|
2904
|
+
$ || void 0
|
|
2905
2905
|
]), !0;
|
|
2906
2906
|
}
|
|
2907
2907
|
return !1;
|
|
@@ -2909,36 +2909,36 @@ function St(e, t, n, s, i) {
|
|
|
2909
2909
|
}), c.reverse().forEach((u) => {
|
|
2910
2910
|
Et(...u);
|
|
2911
2911
|
}), Us(e, t, n, s, i);
|
|
2912
|
-
const
|
|
2913
|
-
return a.length > 0 ||
|
|
2912
|
+
const l = Object.keys(o?.sequences || {}).length > 0;
|
|
2913
|
+
return a.length > 0 || l;
|
|
2914
2914
|
}
|
|
2915
2915
|
function Ue(e, t, n, s, i, o, r, a, c) {
|
|
2916
|
-
let
|
|
2916
|
+
let l;
|
|
2917
2917
|
if (i.transition || i.transitionProperties) {
|
|
2918
|
-
const
|
|
2918
|
+
const f = {
|
|
2919
2919
|
key: e,
|
|
2920
2920
|
effectId: i.effectId,
|
|
2921
2921
|
transition: i.transition,
|
|
2922
2922
|
transitionProperties: i.transitionProperties,
|
|
2923
|
-
childSelector:
|
|
2923
|
+
childSelector: H(i, {
|
|
2924
2924
|
asCombinator: !0,
|
|
2925
2925
|
addItemFilter: !0,
|
|
2926
2926
|
useFirstChild: a
|
|
2927
2927
|
}),
|
|
2928
2928
|
selectorCondition: r
|
|
2929
2929
|
};
|
|
2930
|
-
if (
|
|
2930
|
+
if (l = w.getController(e), !l)
|
|
2931
2931
|
return;
|
|
2932
|
-
|
|
2932
|
+
l.renderStyle(Ys(f));
|
|
2933
2933
|
}
|
|
2934
2934
|
let u;
|
|
2935
2935
|
if (n === "animationEnd") {
|
|
2936
|
-
const
|
|
2937
|
-
|
|
2936
|
+
const f = o.effectId, h = (c ? w.getInstance(c) : void 0)?.dataCache.effects[f];
|
|
2937
|
+
h && (u = P(h));
|
|
2938
2938
|
}
|
|
2939
2939
|
j[n]?.add(t, s, i, o, {
|
|
2940
2940
|
reducedMotion: w.forceReducedMotion,
|
|
2941
|
-
targetController:
|
|
2941
|
+
targetController: l,
|
|
2942
2942
|
selectorCondition: r,
|
|
2943
2943
|
allowA11yTriggers: w.allowA11yTriggers,
|
|
2944
2944
|
sourceAnimationOptions: u
|
|
@@ -2952,8 +2952,8 @@ function Qs(e) {
|
|
|
2952
2952
|
n.setController(t, e), s.forEach((r, a) => {
|
|
2953
2953
|
const c = k(r.conditions, n.dataCache.conditions);
|
|
2954
2954
|
if (c) {
|
|
2955
|
-
const
|
|
2956
|
-
n.setupMediaQueryListener(
|
|
2955
|
+
const l = `${t}::trigger::${a}`;
|
|
2956
|
+
n.setupMediaQueryListener(l, c, t, () => {
|
|
2957
2957
|
e.update();
|
|
2958
2958
|
});
|
|
2959
2959
|
}
|
|
@@ -2971,8 +2971,8 @@ function Xs(e, t, n) {
|
|
|
2971
2971
|
return;
|
|
2972
2972
|
const c = k(r.conditions, i.dataCache.conditions);
|
|
2973
2973
|
if (c) {
|
|
2974
|
-
const
|
|
2975
|
-
i.setupMediaQueryListener(
|
|
2974
|
+
const l = `${s}::listTrigger::${t}::${a}`;
|
|
2975
|
+
i.setupMediaQueryListener(l, c, s, () => {
|
|
2976
2976
|
e.update();
|
|
2977
2977
|
});
|
|
2978
2978
|
}
|
|
@@ -3107,54 +3107,54 @@ const Tt = /* @__PURE__ */ new Map([
|
|
|
3107
3107
|
]);
|
|
3108
3108
|
function Ct(e, t, n, s) {
|
|
3109
3109
|
const { effects: i = {}, conditions: o = {} } = n, { key: r, trigger: a } = t, c = a === "pointerMove";
|
|
3110
|
-
e.effectId || (e.effectId = s ||
|
|
3111
|
-
const { effectId:
|
|
3112
|
-
let { key:
|
|
3113
|
-
if (!
|
|
3110
|
+
e.effectId || (e.effectId = s || Q());
|
|
3111
|
+
const { effectId: l } = e, u = { ...i[l] || {}, ...e };
|
|
3112
|
+
let { key: f, conditions: d, triggerType: h } = u;
|
|
3113
|
+
if (!f) {
|
|
3114
3114
|
if (!r)
|
|
3115
3115
|
return null;
|
|
3116
|
-
|
|
3116
|
+
f = r;
|
|
3117
3117
|
}
|
|
3118
|
-
if (Ws(
|
|
3118
|
+
if (Ws(f))
|
|
3119
3119
|
return null;
|
|
3120
3120
|
d = [
|
|
3121
3121
|
...new Set((d || []).filter((b) => o[b]))
|
|
3122
|
-
],
|
|
3123
|
-
const { namedEffect:
|
|
3122
|
+
], h || (h = Tt.get(a));
|
|
3123
|
+
const { namedEffect: m, customEffect: p, keyframeEffect: g, transition: v, transitionProperties: y, ...E } = {
|
|
3124
3124
|
...u,
|
|
3125
|
-
key:
|
|
3125
|
+
key: f,
|
|
3126
3126
|
conditions: d,
|
|
3127
|
-
effectId:
|
|
3128
|
-
triggerType:
|
|
3127
|
+
effectId: l,
|
|
3128
|
+
triggerType: h
|
|
3129
3129
|
}, $ = qt(t, E);
|
|
3130
|
-
if (
|
|
3131
|
-
return c || !
|
|
3130
|
+
if (m)
|
|
3131
|
+
return c || !m.type ? null : { namedEffect: m, initial: $, ...E };
|
|
3132
3132
|
if (g) {
|
|
3133
3133
|
if (!g.name) {
|
|
3134
|
-
const b =
|
|
3135
|
-
g.name = b ?
|
|
3134
|
+
const b = l && !(i[l] && "keyframeEffect" in e);
|
|
3135
|
+
g.name = b ? l : Q();
|
|
3136
3136
|
}
|
|
3137
3137
|
return { keyframeEffect: g, initial: $, ...E };
|
|
3138
3138
|
} else return p ? c ? null : { initial: $, ...E } : v ? { transition: v, initial: $, ...E } : y ? { transitionProperties: y, initial: $, ...E } : { initial: $, ...E };
|
|
3139
3139
|
}
|
|
3140
3140
|
function ei(e, t, n, s) {
|
|
3141
3141
|
const { sequences: i = {}, conditions: o = {} } = n;
|
|
3142
|
-
e.sequenceId || (e.sequenceId = s ||
|
|
3142
|
+
e.sequenceId || (e.sequenceId = s || Q());
|
|
3143
3143
|
const { sequenceId: r } = e, a = { ...i[r] || {}, ...e };
|
|
3144
3144
|
let {
|
|
3145
3145
|
effects: c,
|
|
3146
|
-
conditions:
|
|
3146
|
+
conditions: l,
|
|
3147
3147
|
triggerType: u,
|
|
3148
|
-
delay:
|
|
3148
|
+
delay: f = 0,
|
|
3149
3149
|
offset: d = 0,
|
|
3150
|
-
offsetEasing:
|
|
3150
|
+
offsetEasing: h = "linear"
|
|
3151
3151
|
} = a;
|
|
3152
|
-
if (typeof
|
|
3152
|
+
if (typeof h == "function")
|
|
3153
3153
|
return null;
|
|
3154
|
-
u || (u = Tt.get(t.trigger)),
|
|
3155
|
-
...new Set((
|
|
3154
|
+
u || (u = Tt.get(t.trigger)), l = [
|
|
3155
|
+
...new Set((l || []).filter((g) => o[g]))
|
|
3156
3156
|
];
|
|
3157
|
-
const p = c.map((g, v) => (g.conditions ? g.conditions.push(...
|
|
3157
|
+
const p = c.map((g, v) => (g.conditions ? g.conditions.push(...l) : g.conditions = [...l], Ct(
|
|
3158
3158
|
{ ...g, triggerType: u },
|
|
3159
3159
|
t,
|
|
3160
3160
|
n,
|
|
@@ -3163,15 +3163,15 @@ function ei(e, t, n, s) {
|
|
|
3163
3163
|
return p.length ? {
|
|
3164
3164
|
sequenceId: r,
|
|
3165
3165
|
triggerType: u,
|
|
3166
|
-
conditions:
|
|
3167
|
-
delay:
|
|
3166
|
+
conditions: l,
|
|
3167
|
+
delay: f,
|
|
3168
3168
|
offset: d,
|
|
3169
|
-
offsetEasing:
|
|
3169
|
+
offsetEasing: h,
|
|
3170
3170
|
effects: p
|
|
3171
3171
|
} : null;
|
|
3172
3172
|
}
|
|
3173
3173
|
function ti(e) {
|
|
3174
|
-
return e === "cssFloat" ? "float" : e === "easing" ? "animation-timing-function" : e === "cssOffset" ? "offset" : e === "composite" ? "animation-composition" :
|
|
3174
|
+
return e === "cssFloat" ? "float" : e === "easing" ? "animation-timing-function" : e === "cssOffset" ? "offset" : e === "composite" ? "animation-composition" : le(e);
|
|
3175
3175
|
}
|
|
3176
3176
|
function ni(e) {
|
|
3177
3177
|
if (!e.length)
|
|
@@ -3221,13 +3221,13 @@ function oi(e) {
|
|
|
3221
3221
|
return "";
|
|
3222
3222
|
let c = `[data-interact-key="${t}"]`;
|
|
3223
3223
|
if (o && o.length) {
|
|
3224
|
-
const
|
|
3225
|
-
c = `${c}:is(${
|
|
3224
|
+
const f = o.map((d) => `:state(${d}), :--${d}, [data-interact-effect~="${d}"]`).join(", ");
|
|
3225
|
+
c = `${c}:is(${f})`;
|
|
3226
3226
|
}
|
|
3227
|
-
n && (c = `${c} ${n}`), a && (c = `${c}${a}`), r && (c =
|
|
3228
|
-
const
|
|
3227
|
+
n && (c = `${c} ${n}`), a && (c = `${c}${a}`), r && (c = ue(c, r));
|
|
3228
|
+
const l = s.map(({ name: f, value: d, important: h }) => `${f}: ${d}${h ? " !important" : ""};`).join(`
|
|
3229
3229
|
`), u = `${c} {
|
|
3230
|
-
${
|
|
3230
|
+
${l}
|
|
3231
3231
|
}`;
|
|
3232
3232
|
return i ? `@media ${i} {
|
|
3233
3233
|
${u}
|
|
@@ -3274,16 +3274,16 @@ function ai(e, t, n) {
|
|
|
3274
3274
|
if (s.length === 0)
|
|
3275
3275
|
return null;
|
|
3276
3276
|
const i = s.map((r) => {
|
|
3277
|
-
const { listIndex: a, slotCursor: c, slotsInSequence:
|
|
3277
|
+
const { listIndex: a, slotCursor: c, slotsInSequence: l } = e[Ae(r)];
|
|
3278
3278
|
return {
|
|
3279
3279
|
name: F(r, a),
|
|
3280
3280
|
value: Array.from(
|
|
3281
|
-
{ length:
|
|
3282
|
-
(u,
|
|
3281
|
+
{ length: l },
|
|
3282
|
+
(u, f) => `var(${F(r, c + f, !0)})`
|
|
3283
3283
|
).join(", ")
|
|
3284
3284
|
};
|
|
3285
3285
|
}), o = { key: e.key, childSelector: e.childSelector, declarations: i };
|
|
3286
|
-
return t && (o.media =
|
|
3286
|
+
return t && (o.media = ee(t, n || {}, "media"), o.selectorCondition = M(t, n || {})), o;
|
|
3287
3287
|
}
|
|
3288
3288
|
function ci(e, t, n) {
|
|
3289
3289
|
if (e.length === 0)
|
|
@@ -3315,8 +3315,8 @@ const ui = [
|
|
|
3315
3315
|
{ name: "translate", value: "none", important: !0 },
|
|
3316
3316
|
{ name: "scale", value: "none", important: !0 },
|
|
3317
3317
|
{ name: "rotate", value: "none", important: !0 }
|
|
3318
|
-
],
|
|
3319
|
-
function
|
|
3318
|
+
], li = { animation: !1, transition: !1 };
|
|
3319
|
+
function fi(e, t) {
|
|
3320
3320
|
const n = () => ({
|
|
3321
3321
|
listIndex: 0,
|
|
3322
3322
|
slotCursor: 0,
|
|
@@ -3358,7 +3358,7 @@ function pi(e) {
|
|
|
3358
3358
|
const s = mi(n);
|
|
3359
3359
|
if (!s)
|
|
3360
3360
|
return;
|
|
3361
|
-
const i =
|
|
3361
|
+
const i = B(n), o = t.get(i) || { animation: 0, transition: 0 };
|
|
3362
3362
|
o[s] += 1, t.set(i, o);
|
|
3363
3363
|
}), new Map(
|
|
3364
3364
|
[...t].map(([n, { animation: s, transition: i }]) => [
|
|
@@ -3386,7 +3386,7 @@ const yi = {
|
|
|
3386
3386
|
"animation-range": "animationRange"
|
|
3387
3387
|
};
|
|
3388
3388
|
function Ei(e, t, n) {
|
|
3389
|
-
const { key: s, conditions: i } = t, o =
|
|
3389
|
+
const { key: s, conditions: i } = t, o = ee(i, e.configConditions, "media"), r = M(i, e.configConditions), a = H(t, {
|
|
3390
3390
|
asCombinator: !0,
|
|
3391
3391
|
useFirstChild: e.useFirstChild,
|
|
3392
3392
|
addItemFilter: !0
|
|
@@ -3420,17 +3420,17 @@ function Ot(e, t, n, s, i) {
|
|
|
3420
3420
|
}
|
|
3421
3421
|
function wi(e, t, n, s, i, o) {
|
|
3422
3422
|
const { assigned: r, childSelector: a } = n, c = { animation: !1, transition: !1 }, {
|
|
3423
|
-
key:
|
|
3423
|
+
key: l,
|
|
3424
3424
|
effectId: u,
|
|
3425
|
-
conditions:
|
|
3425
|
+
conditions: f,
|
|
3426
3426
|
namedEffect: d,
|
|
3427
|
-
keyframeEffect:
|
|
3428
|
-
transition:
|
|
3427
|
+
keyframeEffect: h,
|
|
3428
|
+
transition: m,
|
|
3429
3429
|
transitionProperties: p,
|
|
3430
3430
|
initial: g
|
|
3431
|
-
} = t, v =
|
|
3431
|
+
} = t, v = ee(f, e.configConditions, "media"), y = M(f, e.configConditions), E = [
|
|
3432
3432
|
{
|
|
3433
|
-
key:
|
|
3433
|
+
key: l,
|
|
3434
3434
|
media: v,
|
|
3435
3435
|
selectorCondition: y,
|
|
3436
3436
|
childSelector: a,
|
|
@@ -3439,7 +3439,7 @@ function wi(e, t, n, s, i, o) {
|
|
|
3439
3439
|
];
|
|
3440
3440
|
let $ = [];
|
|
3441
3441
|
const { declarations: b } = E[0];
|
|
3442
|
-
if (e.plugins && E.push(...Ot("effect", t,
|
|
3442
|
+
if (e.plugins && E.push(...Ot("effect", t, l, v, e.plugins)), d || h) {
|
|
3443
3443
|
const S = P(t), I = Cn(null, S, s, o).filter(
|
|
3444
3444
|
(T) => T.name
|
|
3445
3445
|
);
|
|
@@ -3462,27 +3462,27 @@ function wi(e, t, n, s, i, o) {
|
|
|
3462
3462
|
({ _listPropertyName: T, name: _, value: x }) => x !== z[T] || r.has(_)
|
|
3463
3463
|
);
|
|
3464
3464
|
O.forEach(({ name: T }) => r.add(T)), c.animation = O.length > 0, g ? (E.push({
|
|
3465
|
-
key:
|
|
3465
|
+
key: l,
|
|
3466
3466
|
media: v,
|
|
3467
3467
|
selectorCondition: y,
|
|
3468
3468
|
childSelector: a,
|
|
3469
3469
|
declarations: ui,
|
|
3470
3470
|
selectorSuffix: ":not([data-interact-enter])"
|
|
3471
3471
|
}), E.push({
|
|
3472
|
-
key:
|
|
3472
|
+
key: l,
|
|
3473
3473
|
media: v,
|
|
3474
3474
|
selectorCondition: y,
|
|
3475
3475
|
childSelector: a,
|
|
3476
3476
|
declarations: O,
|
|
3477
3477
|
selectorSuffix: ':not([data-interact-enter="done"])'
|
|
3478
3478
|
})) : b.push(...O);
|
|
3479
|
-
} else if (
|
|
3479
|
+
} else if (m || p) {
|
|
3480
3480
|
const S = gt(t), I = vt(t);
|
|
3481
3481
|
(I.length || r.has(i.transition)) && (b.push({
|
|
3482
3482
|
name: i.transition,
|
|
3483
3483
|
value: I.join(", ") || z.transition
|
|
3484
3484
|
}), r.add(i.transition), c.transition = !0), E.push({
|
|
3485
|
-
key:
|
|
3485
|
+
key: l,
|
|
3486
3486
|
media: v,
|
|
3487
3487
|
selectorCondition: y,
|
|
3488
3488
|
childSelector: a,
|
|
@@ -3501,24 +3501,24 @@ function wi(e, t, n, s, i, o) {
|
|
|
3501
3501
|
return { rules: E.filter((S) => S.declarations.length), keyframes: $, wrote: c };
|
|
3502
3502
|
}
|
|
3503
3503
|
function _t(e, t, n, s, i, o) {
|
|
3504
|
-
const r =
|
|
3504
|
+
const r = B(t), a = e.targetsMap.get(r) || fi(
|
|
3505
3505
|
t.key,
|
|
3506
|
-
|
|
3506
|
+
H(t, {
|
|
3507
3507
|
asCombinator: !0,
|
|
3508
3508
|
useFirstChild: e.useFirstChild,
|
|
3509
3509
|
addItemFilter: !0
|
|
3510
3510
|
})
|
|
3511
3511
|
);
|
|
3512
3512
|
s.add(r);
|
|
3513
|
-
const c = o?.get(r) ||
|
|
3513
|
+
const c = o?.get(r) || li, l = di(a, c), { rules: u, keyframes: f, wrote: d } = wi(
|
|
3514
3514
|
e,
|
|
3515
3515
|
t,
|
|
3516
3516
|
a,
|
|
3517
3517
|
n,
|
|
3518
|
-
|
|
3518
|
+
l,
|
|
3519
3519
|
i
|
|
3520
3520
|
);
|
|
3521
|
-
return
|
|
3521
|
+
return f.forEach(({ name: h, keyframes: m }) => e.keyframesMap.set(h, m)), hi(a, d, c), e.targetsMap.set(r, a), u;
|
|
3522
3522
|
}
|
|
3523
3523
|
function $i(e, t, n, s) {
|
|
3524
3524
|
const i = [], o = /* @__PURE__ */ new Set(), r = pi(t);
|
|
@@ -3530,8 +3530,8 @@ function $i(e, t, n, s) {
|
|
|
3530
3530
|
const { conditions: a } = t;
|
|
3531
3531
|
return o.forEach((c) => {
|
|
3532
3532
|
s.add(c);
|
|
3533
|
-
const
|
|
3534
|
-
u && (u.declarations.forEach(({ name:
|
|
3533
|
+
const l = e.targetsMap.get(c), u = ai(l, a, e.configConditions);
|
|
3534
|
+
u && (u.declarations.forEach(({ name: f }) => l.assigned.add(f)), i.push(u)), gi(l);
|
|
3535
3535
|
}), i;
|
|
3536
3536
|
}
|
|
3537
3537
|
function bi(e, t, n) {
|
|
@@ -3539,27 +3539,27 @@ function bi(e, t, n) {
|
|
|
3539
3539
|
"interaction",
|
|
3540
3540
|
t,
|
|
3541
3541
|
s,
|
|
3542
|
-
|
|
3542
|
+
ee(i, e.configConditions, "media"),
|
|
3543
3543
|
e.plugins
|
|
3544
|
-
) : [], { trigger: c } = t,
|
|
3544
|
+
) : [], { trigger: c } = t, l = {
|
|
3545
3545
|
trigger: Vs(c),
|
|
3546
3546
|
id: ["trigger", n].join("-")
|
|
3547
3547
|
};
|
|
3548
|
-
c === "viewProgress" && a.push(Ei(e, t,
|
|
3549
|
-
const u = /* @__PURE__ */ new Set(),
|
|
3550
|
-
(
|
|
3551
|
-
).filter((
|
|
3548
|
+
c === "viewProgress" && a.push(Ei(e, t, l.id));
|
|
3549
|
+
const u = /* @__PURE__ */ new Set(), f = o.map(
|
|
3550
|
+
(h, m) => Ct(h, t, e.config, `eff-${n}-${m}`)
|
|
3551
|
+
).filter((h) => h !== null);
|
|
3552
3552
|
a.push(
|
|
3553
|
-
...
|
|
3553
|
+
...f.flatMap((h) => _t(e, h, l, u))
|
|
3554
3554
|
);
|
|
3555
3555
|
const d = r.map(
|
|
3556
|
-
(
|
|
3557
|
-
).filter((
|
|
3556
|
+
(h, m) => ei(h, t, e.config, `seq-${n}-${m}`)
|
|
3557
|
+
).filter((h) => h !== null);
|
|
3558
3558
|
return a.push(
|
|
3559
3559
|
...d.flatMap(
|
|
3560
|
-
(
|
|
3560
|
+
(h) => $i(e, h, l, u)
|
|
3561
3561
|
)
|
|
3562
|
-
), u.forEach((
|
|
3562
|
+
), u.forEach((h) => vi(e.targetsMap.get(h))), a;
|
|
3563
3563
|
}
|
|
3564
3564
|
function Si(e = {}) {
|
|
3565
3565
|
const { useFirstChild: t = !0, plugins: n } = typeof e == "boolean" ? { useFirstChild: e, plugins: void 0 } : e;
|
|
@@ -3574,17 +3574,17 @@ function Ii(e, t) {
|
|
|
3574
3574
|
useFirstChild: n,
|
|
3575
3575
|
plugins: s
|
|
3576
3576
|
}, o = e.interactions.flatMap(
|
|
3577
|
-
(
|
|
3578
|
-
), r = [...i.targetsMap.values()], a = Math.max(0, ...r.map(({ animation:
|
|
3577
|
+
(h, m) => bi(i, h, m)
|
|
3578
|
+
), r = [...i.targetsMap.values()], a = Math.max(0, ...r.map(({ animation: h }) => h.listIndex)), c = Math.max(0, ...r.map(({ transition: h }) => h.listIndex)), l = ci(r, a, c), u = Math.max(0, ...r.map(({ animation: h }) => h.slotCursor)), f = Math.max(
|
|
3579
3579
|
0,
|
|
3580
|
-
...r.map(({ transition:
|
|
3580
|
+
...r.map(({ transition: h }) => h.slotCursor)
|
|
3581
3581
|
), d = ri(
|
|
3582
3582
|
a,
|
|
3583
3583
|
c,
|
|
3584
3584
|
u,
|
|
3585
|
-
|
|
3585
|
+
f
|
|
3586
3586
|
);
|
|
3587
|
-
return { keyframes: i.keyframesMap, atProperty: d, cssRules: o, listsRule:
|
|
3587
|
+
return { keyframes: i.keyframesMap, atProperty: d, cssRules: o, listsRule: l };
|
|
3588
3588
|
}
|
|
3589
3589
|
function Oi(e, t) {
|
|
3590
3590
|
const { cssRules: n, keyframes: s, atProperty: i, listsRule: o } = Ii(e, t);
|
|
@@ -3603,4 +3603,4 @@ export {
|
|
|
3603
3603
|
Oi as g,
|
|
3604
3604
|
Ci as r
|
|
3605
3605
|
};
|
|
3606
|
-
//# sourceMappingURL=index-
|
|
3606
|
+
//# sourceMappingURL=index-Bf1NVJq8.mjs.map
|