@wix/interact 2.1.4 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/react.js +1 -1
- package/dist/cjs/web.js +1 -1
- package/dist/cjs/web.js.map +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/react.js +2 -2
- package/dist/es/web.js +15 -15
- package/dist/es/web.js.map +1 -1
- package/dist/index-C0nIxDnf.js +18 -0
- package/dist/index-C0nIxDnf.js.map +1 -0
- package/dist/{index-DHqlFmW8.mjs → index-CJl_iRUI.mjs} +495 -487
- package/dist/index-CJl_iRUI.mjs.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/core/Interact.d.ts +2 -2
- package/dist/types/core/Interact.d.ts.map +1 -1
- package/dist/types/core/InteractionController.d.ts +2 -2
- package/dist/types/core/InteractionController.d.ts.map +1 -1
- package/dist/types/core/add.d.ts.map +1 -1
- package/dist/types/core/css.d.ts.map +1 -1
- package/dist/types/handlers/effectHandlers.d.ts +4 -4
- package/dist/types/handlers/effectHandlers.d.ts.map +1 -1
- package/dist/types/handlers/eventTrigger.d.ts +2 -2
- package/dist/types/handlers/eventTrigger.d.ts.map +1 -1
- package/dist/types/handlers/index.d.ts.map +1 -1
- package/dist/types/handlers/viewEnter.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/react/index.d.ts +1 -1
- package/dist/types/react/index.d.ts.map +1 -1
- package/dist/types/types/config.d.ts +47 -0
- package/dist/types/types/config.d.ts.map +1 -0
- package/dist/types/types/controller.d.ts +34 -0
- package/dist/types/types/controller.d.ts.map +1 -0
- package/dist/types/types/effects.d.ts +75 -0
- package/dist/types/types/effects.d.ts.map +1 -0
- package/dist/types/types/external.d.ts +6 -0
- package/dist/types/types/external.d.ts.map +1 -0
- package/dist/types/types/global.d.ts +11 -0
- package/dist/types/types/global.d.ts.map +1 -0
- package/dist/types/types/handlers.d.ts +41 -0
- package/dist/types/types/handlers.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +8 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/internal.d.ts +36 -0
- package/dist/types/types/internal.d.ts.map +1 -0
- package/dist/types/types/triggers.d.ts +28 -0
- package/dist/types/types/triggers.d.ts.map +1 -0
- package/dist/types/web/InteractElement.d.ts +2 -2
- package/dist/types/web/InteractElement.d.ts.map +1 -1
- package/dist/types/web/index.d.ts +1 -1
- package/dist/types/web/index.d.ts.map +1 -1
- package/docs/api/README.md +2 -3
- package/docs/api/functions.md +4 -4
- package/docs/api/interact-class.md +2 -3
- package/docs/api/interact-element.md +2 -2
- package/docs/api/interaction-controller.md +4 -4
- package/docs/api/types.md +38 -69
- package/docs/examples/README.md +1 -1
- package/docs/examples/click-interactions.md +0 -7
- package/docs/examples/entrance-animations.md +28 -27
- package/docs/examples/list-patterns.md +17 -16
- package/docs/guides/conditions-and-media-queries.md +2 -3
- package/docs/guides/configuration-structure.md +5 -7
- package/docs/guides/effects-and-animations.md +2 -4
- package/docs/guides/getting-started.md +0 -1
- package/docs/guides/lists-and-dynamic-content.md +10 -9
- package/docs/guides/sequences.md +3 -4
- package/docs/guides/state-management.md +0 -2
- package/docs/guides/understanding-triggers.md +9 -13
- package/package.json +2 -2
- package/rules/click.md +96 -560
- package/rules/full-lean.md +546 -359
- package/rules/hover.md +107 -530
- package/rules/integration.md +222 -261
- package/rules/pointermove.md +154 -1407
- package/rules/viewenter.md +128 -863
- package/rules/viewprogress.md +88 -322
- package/dist/index-DHqlFmW8.mjs.map +0 -1
- package/dist/index-DYEvpIGz.js +0 -18
- package/dist/index-DYEvpIGz.js.map +0 -1
- package/dist/types/types.d.ts +0 -256
- package/dist/types/types.d.ts.map +0 -1
- package/rules/MASTER-CLEANUP-PLAN.md +0 -286
- package/rules/scroll-list.md +0 -748
|
@@ -9,16 +9,23 @@ function C(t, e) {
|
|
|
9
9
|
return r !== void 0 ? `[${r}]` : "[]";
|
|
10
10
|
}) : t;
|
|
11
11
|
}
|
|
12
|
-
class
|
|
12
|
+
class N {
|
|
13
13
|
animations;
|
|
14
14
|
options;
|
|
15
15
|
ready;
|
|
16
16
|
isCSS;
|
|
17
|
+
longestAnimation;
|
|
17
18
|
constructor(e, n) {
|
|
18
|
-
this.animations = e, this.options = n, this.ready = n?.measured || Promise.resolve(), this.isCSS = e[0] instanceof CSSAnimation;
|
|
19
|
+
this.animations = e, this.options = n, this.ready = n?.measured || Promise.resolve(), this.isCSS = e[0] instanceof CSSAnimation, this.longestAnimation = this._getAnimationWithLongestEndTime();
|
|
20
|
+
}
|
|
21
|
+
_getAnimationWithLongestEndTime() {
|
|
22
|
+
return this.animations.reduce((e, n) => {
|
|
23
|
+
const s = e.effect?.getComputedTiming().endTime ?? 0, r = n.effect?.getComputedTiming().endTime ?? 0;
|
|
24
|
+
return s > r ? e : n;
|
|
25
|
+
}, this.animations[0]);
|
|
19
26
|
}
|
|
20
27
|
getProgress() {
|
|
21
|
-
return this.
|
|
28
|
+
return this.longestAnimation?.effect?.getComputedTiming().progress || 0;
|
|
22
29
|
}
|
|
23
30
|
async play(e) {
|
|
24
31
|
await this.ready;
|
|
@@ -100,7 +107,7 @@ class G {
|
|
|
100
107
|
});
|
|
101
108
|
}
|
|
102
109
|
}
|
|
103
|
-
const Re = (t) => t, it = (t) => 1 - Math.cos(t * Math.PI / 2), rt = (t) => Math.sin(t * Math.PI / 2), ot = (t) => -(Math.cos(Math.PI * t) - 1) / 2, ct = (t) => t ** 2, at = (t) => 1 - (1 - t) ** 2, ft = (t) => t < 0.5 ? 2 * t ** 2 : 1 - (-2 * t + 2) ** 2 / 2, lt = (t) => t ** 3, ut = (t) => 1 - (1 - t) ** 3, dt = (t) => t < 0.5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2, ht = (t) => t ** 4, mt = (t) => 1 - (1 - t) ** 4, pt = (t) => t < 0.5 ? 8 * t ** 4 : 1 - (-2 * t + 2) ** 4 / 2, gt = (t) => t ** 5, vt = (t) => 1 - (1 - t) ** 5, yt = (t) => t < 0.5 ? 16 * t ** 5 : 1 - (-2 * t + 2) ** 5 / 2, Et = (t) => t === 0 ? 0 : 2 ** (10 * t - 10), wt = (t) => t === 1 ? 1 : 1 - 2 ** (-10 * t), bt = (t) => t === 0 ? 0 : t === 1 ? 1 : t < 0.5 ? 2 ** (20 * t - 10) / 2 : (2 - 2 ** (-20 * t + 10)) / 2, St = (t) => 1 - Math.sqrt(1 - t ** 2),
|
|
110
|
+
const Re = (t) => t, it = (t) => 1 - Math.cos(t * Math.PI / 2), rt = (t) => Math.sin(t * Math.PI / 2), ot = (t) => -(Math.cos(Math.PI * t) - 1) / 2, ct = (t) => t ** 2, at = (t) => 1 - (1 - t) ** 2, ft = (t) => t < 0.5 ? 2 * t ** 2 : 1 - (-2 * t + 2) ** 2 / 2, lt = (t) => t ** 3, ut = (t) => 1 - (1 - t) ** 3, dt = (t) => t < 0.5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2, ht = (t) => t ** 4, mt = (t) => 1 - (1 - t) ** 4, pt = (t) => t < 0.5 ? 8 * t ** 4 : 1 - (-2 * t + 2) ** 4 / 2, gt = (t) => t ** 5, vt = (t) => 1 - (1 - t) ** 5, yt = (t) => t < 0.5 ? 16 * t ** 5 : 1 - (-2 * t + 2) ** 5 / 2, Et = (t) => t === 0 ? 0 : 2 ** (10 * t - 10), wt = (t) => t === 1 ? 1 : 1 - 2 ** (-10 * t), bt = (t) => t === 0 ? 0 : t === 1 ? 1 : t < 0.5 ? 2 ** (20 * t - 10) / 2 : (2 - 2 ** (-20 * t + 10)) / 2, St = (t) => 1 - Math.sqrt(1 - t ** 2), Tt = (t) => Math.sqrt(1 - (t - 1) ** 2), It = (t) => t < 0.5 ? (1 - Math.sqrt(1 - 4 * t ** 2)) / 2 : (Math.sqrt(-(2 * t - 3) * (2 * t - 1)) + 1) / 2, Ot = (t) => 2.70158 * t ** 3 - 1.70158 * t ** 2, Ct = (t) => 1 + 2.70158 * (t - 1) ** 3 + 1.70158 * (t - 1) ** 2, At = (t, e = 1.70158 * 1.525) => t < 0.5 ? (2 * t) ** 2 * ((e + 1) * 2 * t - e) / 2 : ((2 * t - 2) ** 2 * ((e + 1) * (t * 2 - 2) + e) + 2) / 2, we = {
|
|
104
111
|
linear: Re,
|
|
105
112
|
sineIn: it,
|
|
106
113
|
sineOut: rt,
|
|
@@ -121,11 +128,11 @@ const Re = (t) => t, it = (t) => 1 - Math.cos(t * Math.PI / 2), rt = (t) => Math
|
|
|
121
128
|
expoOut: wt,
|
|
122
129
|
expoInOut: bt,
|
|
123
130
|
circIn: St,
|
|
124
|
-
circOut:
|
|
125
|
-
circInOut:
|
|
131
|
+
circOut: Tt,
|
|
132
|
+
circInOut: It,
|
|
126
133
|
backIn: Ot,
|
|
127
134
|
backOut: Ct,
|
|
128
|
-
backInOut:
|
|
135
|
+
backInOut: At
|
|
129
136
|
}, be = {
|
|
130
137
|
linear: "linear",
|
|
131
138
|
ease: "ease",
|
|
@@ -157,41 +164,41 @@ const Re = (t) => t, it = (t) => 1 - Math.cos(t * Math.PI / 2), rt = (t) => Math
|
|
|
157
164
|
backOut: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
|
|
158
165
|
backInOut: "cubic-bezier(0.68, -0.55, 0.265, 1.55)"
|
|
159
166
|
};
|
|
160
|
-
function
|
|
167
|
+
function kt(t) {
|
|
161
168
|
return t === "percentage" ? "%" : t || "px";
|
|
162
169
|
}
|
|
163
|
-
function
|
|
170
|
+
function Q(t) {
|
|
164
171
|
return t ? be[t] || t : be.linear;
|
|
165
172
|
}
|
|
166
|
-
function
|
|
167
|
-
const r = 3 * t, i = 3 * (n - t) - r, o = 1 - r - i, c = 3 * e, l = 3 * (s - e) - c, f = 1 - c - l, a = (d) => ((o * d + i) * d + r) * d, u = (d) => ((f * d + l) * d + c) * d,
|
|
173
|
+
function _t(t, e, n, s) {
|
|
174
|
+
const r = 3 * t, i = 3 * (n - t) - r, o = 1 - r - i, c = 3 * e, l = 3 * (s - e) - c, f = 1 - c - l, a = (d) => ((o * d + i) * d + r) * d, u = (d) => ((f * d + l) * d + c) * d, h = (d) => (3 * o * d + 2 * i) * d + r;
|
|
168
175
|
function g(d) {
|
|
169
|
-
let
|
|
170
|
-
for (let
|
|
171
|
-
const w = a(
|
|
172
|
-
if (Math.abs(w) < 1e-7) return
|
|
173
|
-
const b = m
|
|
176
|
+
let m = d;
|
|
177
|
+
for (let v = 0; v < 8; v++) {
|
|
178
|
+
const w = a(m) - d;
|
|
179
|
+
if (Math.abs(w) < 1e-7) return m;
|
|
180
|
+
const b = h(m);
|
|
174
181
|
if (Math.abs(b) < 1e-6) break;
|
|
175
|
-
|
|
182
|
+
m -= w / b;
|
|
176
183
|
}
|
|
177
|
-
let p = 0,
|
|
178
|
-
for (
|
|
179
|
-
const
|
|
180
|
-
if (Math.abs(
|
|
181
|
-
d >
|
|
184
|
+
let p = 0, y = 1;
|
|
185
|
+
for (m = (p + y) / 2; y - p > 1e-7; ) {
|
|
186
|
+
const v = a(m);
|
|
187
|
+
if (Math.abs(v - d) < 1e-7) return m;
|
|
188
|
+
d > v ? p = m : y = m, m = (p + y) / 2;
|
|
182
189
|
}
|
|
183
|
-
return
|
|
190
|
+
return m;
|
|
184
191
|
}
|
|
185
192
|
return (d) => d <= 0 ? 0 : d >= 1 ? 1 : u(g(d));
|
|
186
193
|
}
|
|
187
|
-
function
|
|
194
|
+
function qt(t) {
|
|
188
195
|
const e = t.match(
|
|
189
196
|
/^cubic-bezier\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*\)$/
|
|
190
197
|
);
|
|
191
198
|
if (!e) return;
|
|
192
199
|
const n = parseFloat(e[1]), s = parseFloat(e[2]), r = parseFloat(e[3]), i = parseFloat(e[4]);
|
|
193
200
|
if (![n, s, r, i].some(isNaN))
|
|
194
|
-
return
|
|
201
|
+
return _t(n, s, r, i);
|
|
195
202
|
}
|
|
196
203
|
function xt(t) {
|
|
197
204
|
const e = t.match(/^linear\((.+)\)$/);
|
|
@@ -234,8 +241,8 @@ function xt(t) {
|
|
|
234
241
|
if (o >= c.pos) return c.output;
|
|
235
242
|
let l = 0, f = i.length - 1;
|
|
236
243
|
for (; l < f - 1; ) {
|
|
237
|
-
const
|
|
238
|
-
i[
|
|
244
|
+
const h = l + f >>> 1;
|
|
245
|
+
i[h].pos <= o ? l = h : f = h;
|
|
239
246
|
}
|
|
240
247
|
const a = i[l], u = i[f];
|
|
241
248
|
return u.pos === a.pos ? u.output : a.output + (u.output - a.output) * (o - a.pos) / (u.pos - a.pos);
|
|
@@ -244,9 +251,9 @@ function xt(t) {
|
|
|
244
251
|
function He(t) {
|
|
245
252
|
if (!t) return;
|
|
246
253
|
const e = we[t];
|
|
247
|
-
return e || (
|
|
254
|
+
return e || (qt(t) ?? xt(t) ?? we.linear);
|
|
248
255
|
}
|
|
249
|
-
class Mt extends
|
|
256
|
+
class Mt extends N {
|
|
250
257
|
animationGroups;
|
|
251
258
|
delay;
|
|
252
259
|
offset;
|
|
@@ -282,8 +289,8 @@ class Mt extends G {
|
|
|
282
289
|
s.animations.forEach((i, o) => {
|
|
283
290
|
const c = i.effect;
|
|
284
291
|
if (!c) return;
|
|
285
|
-
const { delay: l, duration: f, iterations: a } = this.timingOptions[r][o], u = l + e[r],
|
|
286
|
-
c.updateTiming({ delay: u + this.delay, endDelay:
|
|
292
|
+
const { delay: l, duration: f, iterations: a } = this.timingOptions[r][o], u = l + e[r], h = n - (u + f * a);
|
|
293
|
+
c.updateTiming({ delay: u + this.delay, endDelay: h });
|
|
287
294
|
});
|
|
288
295
|
});
|
|
289
296
|
}
|
|
@@ -479,12 +486,12 @@ class Lt {
|
|
|
479
486
|
return this._animation.dispatchEvent(e);
|
|
480
487
|
}
|
|
481
488
|
}
|
|
482
|
-
function
|
|
489
|
+
function $t(t) {
|
|
483
490
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
484
491
|
}
|
|
485
|
-
var
|
|
486
|
-
function
|
|
487
|
-
return
|
|
492
|
+
var X = { exports: {} }, Se = X.exports, Te;
|
|
493
|
+
function Pt() {
|
|
494
|
+
return Te || (Te = 1, (function(t) {
|
|
488
495
|
(function(e) {
|
|
489
496
|
var n = function() {
|
|
490
497
|
}, s = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.msRequestAnimationFrame || function(a) {
|
|
@@ -516,8 +523,8 @@ function $t() {
|
|
|
516
523
|
* @public
|
|
517
524
|
*/
|
|
518
525
|
measure: function(a, u) {
|
|
519
|
-
var
|
|
520
|
-
return this.reads.push(
|
|
526
|
+
var h = u ? a.bind(u) : a;
|
|
527
|
+
return this.reads.push(h), i(this), h;
|
|
521
528
|
},
|
|
522
529
|
/**
|
|
523
530
|
* Adds a job to the
|
|
@@ -529,8 +536,8 @@ function $t() {
|
|
|
529
536
|
* @public
|
|
530
537
|
*/
|
|
531
538
|
mutate: function(a, u) {
|
|
532
|
-
var
|
|
533
|
-
return this.writes.push(
|
|
539
|
+
var h = u ? a.bind(u) : a;
|
|
540
|
+
return this.writes.push(h), i(this), h;
|
|
534
541
|
},
|
|
535
542
|
/**
|
|
536
543
|
* Clears a scheduled 'read' or 'write' task.
|
|
@@ -590,31 +597,31 @@ function $t() {
|
|
|
590
597
|
a.scheduled || (a.scheduled = !0, a.raf(o.bind(null, a)));
|
|
591
598
|
}
|
|
592
599
|
function o(a) {
|
|
593
|
-
var u = a.writes,
|
|
600
|
+
var u = a.writes, h = a.reads, g;
|
|
594
601
|
try {
|
|
595
|
-
n("flushing reads",
|
|
602
|
+
n("flushing reads", h.length), a.runTasks(h), n("flushing writes", u.length), a.runTasks(u);
|
|
596
603
|
} catch (d) {
|
|
597
604
|
g = d;
|
|
598
605
|
}
|
|
599
|
-
if (a.scheduled = !1, (
|
|
606
|
+
if (a.scheduled = !1, (h.length || u.length) && i(a), g)
|
|
600
607
|
if (n("task errored", g.message), a.catch) a.catch(g);
|
|
601
608
|
else throw g;
|
|
602
609
|
}
|
|
603
610
|
function c(a, u) {
|
|
604
|
-
var
|
|
605
|
-
return !!~
|
|
611
|
+
var h = a.indexOf(u);
|
|
612
|
+
return !!~h && !!a.splice(h, 1);
|
|
606
613
|
}
|
|
607
614
|
function l(a, u) {
|
|
608
|
-
for (var
|
|
609
|
-
u.hasOwnProperty(
|
|
615
|
+
for (var h in u)
|
|
616
|
+
u.hasOwnProperty(h) && (a[h] = u[h]);
|
|
610
617
|
}
|
|
611
618
|
var f = e.fastdom = e.fastdom || new r();
|
|
612
619
|
t.exports = f;
|
|
613
620
|
})(typeof window < "u" ? window : typeof Se < "u" ? Se : globalThis);
|
|
614
|
-
})(
|
|
621
|
+
})(X)), X.exports;
|
|
615
622
|
}
|
|
616
|
-
var Ft =
|
|
617
|
-
const
|
|
623
|
+
var Ft = Pt();
|
|
624
|
+
const I = /* @__PURE__ */ $t(Ft), fe = {};
|
|
618
625
|
function Rt(t) {
|
|
619
626
|
Object.assign(fe, t);
|
|
620
627
|
}
|
|
@@ -623,33 +630,33 @@ function Ht(t) {
|
|
|
623
630
|
`${t} not found in registry. Please make sure to import and register the preset.`
|
|
624
631
|
), null);
|
|
625
632
|
}
|
|
626
|
-
function
|
|
633
|
+
function L(t, e) {
|
|
627
634
|
return t ? document.getElementById(t) : null;
|
|
628
635
|
}
|
|
629
636
|
function zt(t, e) {
|
|
630
637
|
return t?.matches(`[data-motion-part~="${e}"]`) ? t : t?.querySelector(`[data-motion-part~="${e}"]`);
|
|
631
638
|
}
|
|
632
|
-
function
|
|
639
|
+
function Dt(t) {
|
|
633
640
|
const e = t.alternate ? "alternate" : "";
|
|
634
641
|
return t.reversed ? `${e ? `${e}-` : ""}reverse` : e || "normal";
|
|
635
642
|
}
|
|
636
643
|
function re(t) {
|
|
637
|
-
return `${t.value}${
|
|
644
|
+
return `${t.value}${kt(t.unit)}`;
|
|
638
645
|
}
|
|
639
|
-
function
|
|
646
|
+
function Ie(t, e, n) {
|
|
640
647
|
return `${t.name || "cover"} ${n && t.offset.unit !== "percentage" ? `calc(100% + ${re(t.offset)}${e ? ` + ${e}` : ""})` : e ? `calc(${re(t.offset)} + ${e})` : re(t.offset)}`;
|
|
641
648
|
}
|
|
642
|
-
function
|
|
649
|
+
function Gt(t) {
|
|
643
650
|
return {
|
|
644
|
-
start:
|
|
645
|
-
end:
|
|
651
|
+
start: Ie(t.startOffset, t.startOffsetAdd),
|
|
652
|
+
end: Ie(t.endOffset, t.endOffsetAdd, !0)
|
|
646
653
|
};
|
|
647
654
|
}
|
|
648
655
|
function ze(t) {
|
|
649
|
-
return (e) =>
|
|
656
|
+
return (e) => I.measure(() => e(t));
|
|
650
657
|
}
|
|
651
|
-
function
|
|
652
|
-
return (e) =>
|
|
658
|
+
function De(t) {
|
|
659
|
+
return (e) => I.mutate(() => e(t));
|
|
653
660
|
}
|
|
654
661
|
function Z(t) {
|
|
655
662
|
if (t.namedEffect) {
|
|
@@ -672,12 +679,12 @@ function Nt(t, e, n) {
|
|
|
672
679
|
return t.map((s, r) => {
|
|
673
680
|
const i = {
|
|
674
681
|
fill: s.fill,
|
|
675
|
-
easing:
|
|
682
|
+
easing: Q(s.easing),
|
|
676
683
|
iterations: s.iterations === 0 ? 1 / 0 : s.iterations || 1,
|
|
677
684
|
composite: s.composite,
|
|
678
|
-
direction:
|
|
685
|
+
direction: Dt(s)
|
|
679
686
|
};
|
|
680
|
-
return
|
|
687
|
+
return Ge(e) ? (i.duration = s.duration, i.delay = s.delay || 0) : window.ViewTimeline && e?.trigger === "view-progress" ? i.duration = "auto" : (i.duration = 99.99, i.delay = 0.01), {
|
|
681
688
|
effect: s,
|
|
682
689
|
options: i,
|
|
683
690
|
id: n && `${n}-${r + 1}`,
|
|
@@ -685,31 +692,31 @@ function Nt(t, e, n) {
|
|
|
685
692
|
};
|
|
686
693
|
});
|
|
687
694
|
}
|
|
688
|
-
function
|
|
695
|
+
function Ge(t) {
|
|
689
696
|
return !t || t.trigger !== "pointer-move" && t.trigger !== "view-progress";
|
|
690
697
|
}
|
|
691
698
|
function Oe(t, e, n, s, r) {
|
|
692
699
|
if (t) {
|
|
693
|
-
if (
|
|
700
|
+
if (Ge(s) && (e.duration = e.duration || 1, r?.reducedMotion))
|
|
694
701
|
if (e.iterations === 1 || e.iterations == null)
|
|
695
702
|
e = { ...e, duration: 1 };
|
|
696
703
|
else
|
|
697
704
|
return [];
|
|
698
705
|
let i;
|
|
699
|
-
return n instanceof HTMLElement && (i = { measure: ze(n), mutate:
|
|
706
|
+
return n instanceof HTMLElement && (i = { measure: ze(n), mutate: De(n) }), t.web ? t.web(e, i, r) : t(e, i, r);
|
|
700
707
|
}
|
|
701
708
|
return [];
|
|
702
709
|
}
|
|
703
710
|
function ve(t, e, n, s, r) {
|
|
704
|
-
const i = t instanceof HTMLElement ? t :
|
|
711
|
+
const i = t instanceof HTMLElement ? t : L(t);
|
|
705
712
|
if (n?.trigger === "pointer-move" && !e.keyframeEffect) {
|
|
706
|
-
let
|
|
707
|
-
e.customEffect && (
|
|
713
|
+
let h = e;
|
|
714
|
+
e.customEffect && (h = {
|
|
708
715
|
...e,
|
|
709
716
|
namedEffect: { id: "", type: "CustomMouse" }
|
|
710
717
|
});
|
|
711
718
|
const g = Z(
|
|
712
|
-
|
|
719
|
+
h
|
|
713
720
|
), d = Oe(
|
|
714
721
|
g,
|
|
715
722
|
e,
|
|
@@ -732,79 +739,79 @@ function ve(t, e, n, s, r) {
|
|
|
732
739
|
let f;
|
|
733
740
|
const a = n?.trigger === "view-progress";
|
|
734
741
|
a && window.ViewTimeline && (f = new ViewTimeline({
|
|
735
|
-
subject: n.element ||
|
|
742
|
+
subject: n.element || L(n.componentId)
|
|
736
743
|
}));
|
|
737
|
-
const u = l.map(({ effect:
|
|
738
|
-
const p =
|
|
739
|
-
|
|
740
|
-
"timing" in
|
|
744
|
+
const u = l.map(({ effect: h, options: g, id: d, part: m }) => {
|
|
745
|
+
const p = m ? zt(i, m) : i, y = new KeyframeEffect(p || null, [], g);
|
|
746
|
+
I.mutate(() => {
|
|
747
|
+
"timing" in h && y.updateTiming(h.timing), y.setKeyframes(h.keyframes);
|
|
741
748
|
});
|
|
742
|
-
const
|
|
743
|
-
|
|
749
|
+
const v = a && f ? { timeline: f } : {}, w = typeof h.customEffect == "function" ? new Lt(
|
|
750
|
+
h.customEffect,
|
|
744
751
|
p || null,
|
|
745
752
|
g,
|
|
746
|
-
|
|
747
|
-
) : new Animation(
|
|
753
|
+
v
|
|
754
|
+
) : new Animation(y, v.timeline);
|
|
748
755
|
if (a)
|
|
749
756
|
if (f)
|
|
750
|
-
|
|
751
|
-
const { start: b, end: S } =
|
|
757
|
+
I.mutate(() => {
|
|
758
|
+
const { start: b, end: S } = Gt(h);
|
|
752
759
|
w.rangeStart = b, w.rangeEnd = S, w.play();
|
|
753
760
|
});
|
|
754
761
|
else {
|
|
755
762
|
const { startOffset: b, endOffset: S } = e;
|
|
756
|
-
|
|
757
|
-
const
|
|
763
|
+
I.mutate(() => {
|
|
764
|
+
const T = h.startOffset || b, F = h.endOffset || S;
|
|
758
765
|
Object.assign(w, {
|
|
759
766
|
start: {
|
|
760
|
-
name:
|
|
761
|
-
offset:
|
|
762
|
-
add:
|
|
767
|
+
name: T.name,
|
|
768
|
+
offset: T.offset?.value,
|
|
769
|
+
add: h.startOffsetAdd
|
|
763
770
|
},
|
|
764
771
|
end: {
|
|
765
|
-
name:
|
|
766
|
-
offset:
|
|
767
|
-
add:
|
|
772
|
+
name: F.name,
|
|
773
|
+
offset: F.offset?.value,
|
|
774
|
+
add: h.endOffsetAdd
|
|
768
775
|
}
|
|
769
776
|
});
|
|
770
777
|
});
|
|
771
778
|
}
|
|
772
779
|
return d && (w.id = d), w;
|
|
773
780
|
});
|
|
774
|
-
return new
|
|
781
|
+
return new N(u, {
|
|
775
782
|
...e,
|
|
776
783
|
trigger: { ...n || {} },
|
|
777
784
|
// make sure the group is ready after all animation targets are measured and mutated
|
|
778
|
-
measured: new Promise((
|
|
785
|
+
measured: new Promise((h) => I.mutate(h))
|
|
779
786
|
});
|
|
780
787
|
}
|
|
781
|
-
function
|
|
782
|
-
const s = Z(e), r = t instanceof HTMLElement ? t :
|
|
788
|
+
function Wt(t, e, n) {
|
|
789
|
+
const s = Z(e), r = t instanceof HTMLElement ? t : L(t);
|
|
783
790
|
if (s && s.prepare && r) {
|
|
784
|
-
const i = { measure: ze(r), mutate:
|
|
791
|
+
const i = { measure: ze(r), mutate: De(r) };
|
|
785
792
|
s.prepare(e, i);
|
|
786
793
|
}
|
|
787
|
-
n &&
|
|
794
|
+
n && I.mutate(n);
|
|
788
795
|
}
|
|
789
|
-
function
|
|
796
|
+
function Vt(t, e) {
|
|
790
797
|
const n = Z(e);
|
|
791
798
|
if (!n)
|
|
792
799
|
return null;
|
|
793
800
|
if (!n.style)
|
|
794
801
|
return e.effectId && t ? jt(t, e.effectId) : null;
|
|
795
|
-
const s = n.getNames(e), i = (typeof t == "string" ?
|
|
802
|
+
const s = n.getNames(e), i = (typeof t == "string" ? L(t) : t)?.getAnimations(), o = i?.map((l) => l.animationName) || [], c = [];
|
|
796
803
|
return s.forEach((l) => {
|
|
797
804
|
o.includes(l) && c.push(
|
|
798
805
|
i?.find((f) => f.animationName === l)
|
|
799
806
|
);
|
|
800
|
-
}), c?.length ? new
|
|
807
|
+
}), c?.length ? new N(c) : null;
|
|
801
808
|
}
|
|
802
809
|
function jt(t, e) {
|
|
803
|
-
const s = (typeof t == "string" ?
|
|
810
|
+
const s = (typeof t == "string" ? L(t) : t)?.getAnimations().filter((r) => {
|
|
804
811
|
const i = r.id || r.animationName;
|
|
805
812
|
return i ? i.startsWith(e) : !0;
|
|
806
813
|
});
|
|
807
|
-
return s?.length ? new
|
|
814
|
+
return s?.length ? new N(s) : null;
|
|
808
815
|
}
|
|
809
816
|
function Ne(t, e, n, s = {}) {
|
|
810
817
|
const { disabled: r, allowActiveEvent: i, ...o } = s, c = ve(t, e, n, o);
|
|
@@ -812,7 +819,7 @@ function Ne(t, e, n, s = {}) {
|
|
|
812
819
|
return null;
|
|
813
820
|
let l = {};
|
|
814
821
|
if (n.trigger === "view-progress" && !window.ViewTimeline) {
|
|
815
|
-
const f = n.element ||
|
|
822
|
+
const f = n.element || L(n.componentId), { ready: a } = c;
|
|
816
823
|
return c.animations.map((u) => ({
|
|
817
824
|
/* we use getters for start and end in order to access the animation's start and end
|
|
818
825
|
only when initializing the scrub scene rather than immediately */
|
|
@@ -827,9 +834,9 @@ function Ne(t, e, n, s = {}) {
|
|
|
827
834
|
getProgress() {
|
|
828
835
|
return c.getProgress();
|
|
829
836
|
},
|
|
830
|
-
effect(
|
|
831
|
-
const { activeDuration: d } = u.effect.getComputedTiming(), { delay:
|
|
832
|
-
u.currentTime = ((
|
|
837
|
+
effect(h, g) {
|
|
838
|
+
const { activeDuration: d } = u.effect.getComputedTiming(), { delay: m } = u.effect.getTiming();
|
|
839
|
+
u.currentTime = ((m || 0) + (d || 0)) * g;
|
|
833
840
|
},
|
|
834
841
|
disabled: r,
|
|
835
842
|
destroy() {
|
|
@@ -837,7 +844,7 @@ function Ne(t, e, n, s = {}) {
|
|
|
837
844
|
}
|
|
838
845
|
}));
|
|
839
846
|
} else if (n.trigger === "pointer-move") {
|
|
840
|
-
const f = e, { centeredToTarget: a, transitionDuration: u, transitionEasing:
|
|
847
|
+
const f = e, { centeredToTarget: a, transitionDuration: u, transitionEasing: h } = f, g = n.axis;
|
|
841
848
|
if (f.keyframeEffect) {
|
|
842
849
|
const d = c;
|
|
843
850
|
return d.animations?.length === 0 ? null : {
|
|
@@ -848,9 +855,9 @@ function Ne(t, e, n, s = {}) {
|
|
|
848
855
|
getProgress() {
|
|
849
856
|
return this._currentProgress;
|
|
850
857
|
},
|
|
851
|
-
effect(p,
|
|
852
|
-
const
|
|
853
|
-
this._currentProgress =
|
|
858
|
+
effect(p, y) {
|
|
859
|
+
const v = g === "x" ? y.x : y.y;
|
|
860
|
+
this._currentProgress = v, d.progress(v);
|
|
854
861
|
},
|
|
855
862
|
disabled: r ?? !1,
|
|
856
863
|
destroy() {
|
|
@@ -861,20 +868,20 @@ function Ne(t, e, n, s = {}) {
|
|
|
861
868
|
l = {
|
|
862
869
|
centeredToTarget: a,
|
|
863
870
|
allowActiveEvent: i
|
|
864
|
-
}, e.customEffect && u && (l.transitionDuration = u, l.transitionEasing = He(
|
|
871
|
+
}, e.customEffect && u && (l.transitionDuration = u, l.transitionEasing = He(h)), l.target = c.target;
|
|
865
872
|
}
|
|
866
873
|
return {
|
|
867
874
|
...l,
|
|
868
875
|
getProgress() {
|
|
869
876
|
return c.getProgress();
|
|
870
877
|
},
|
|
871
|
-
effect(f, a, u,
|
|
878
|
+
effect(f, a, u, h) {
|
|
872
879
|
c.progress(
|
|
873
880
|
u ? {
|
|
874
881
|
// @ts-expect-error spread error on p
|
|
875
882
|
...a,
|
|
876
883
|
v: u,
|
|
877
|
-
active:
|
|
884
|
+
active: h
|
|
878
885
|
} : a
|
|
879
886
|
);
|
|
880
887
|
},
|
|
@@ -885,15 +892,15 @@ function Ne(t, e, n, s = {}) {
|
|
|
885
892
|
};
|
|
886
893
|
}
|
|
887
894
|
function ne(t, e, n, s = !1) {
|
|
888
|
-
const r =
|
|
895
|
+
const r = Vt(t, e);
|
|
889
896
|
return r ? (r.ready = new Promise((i) => {
|
|
890
|
-
|
|
897
|
+
Wt(t, e, i);
|
|
891
898
|
}), r) : ve(t, e, n, { reducedMotion: s });
|
|
892
899
|
}
|
|
893
900
|
function Yt(t) {
|
|
894
901
|
return t === null ? [null] : typeof t == "string" ? Array.from(document.querySelectorAll(t)) : Array.isArray(t) ? t : [t];
|
|
895
902
|
}
|
|
896
|
-
function
|
|
903
|
+
function We(t, e) {
|
|
897
904
|
const n = [];
|
|
898
905
|
for (const { target: s, options: r } of t) {
|
|
899
906
|
const i = Yt(s);
|
|
@@ -904,19 +911,19 @@ function Ve(t, e) {
|
|
|
904
911
|
void 0,
|
|
905
912
|
e?.reducedMotion
|
|
906
913
|
);
|
|
907
|
-
c instanceof
|
|
914
|
+
c instanceof N && n.push(c);
|
|
908
915
|
}
|
|
909
916
|
}
|
|
910
917
|
return n;
|
|
911
918
|
}
|
|
912
919
|
function Bt(t, e, n) {
|
|
913
|
-
const s =
|
|
920
|
+
const s = We(e, n);
|
|
914
921
|
return new Mt(s, t);
|
|
915
922
|
}
|
|
916
|
-
function
|
|
923
|
+
function U(t, e) {
|
|
917
924
|
return e.includes("&") ? e.replace(/&/g, t) : `${t}${e}`;
|
|
918
925
|
}
|
|
919
|
-
function
|
|
926
|
+
function x() {
|
|
920
927
|
return "wi-12343210".replace(
|
|
921
928
|
/\d/g,
|
|
922
929
|
(t) => String.fromCharCode(
|
|
@@ -935,58 +942,58 @@ function Kt({
|
|
|
935
942
|
}) {
|
|
936
943
|
let o = [];
|
|
937
944
|
if (n?.styleProperties) {
|
|
938
|
-
const { duration: d, easing:
|
|
945
|
+
const { duration: d, easing: m, delay: p } = n;
|
|
939
946
|
d && (n.styleProperties.some(
|
|
940
|
-
(
|
|
947
|
+
(v) => v.name.startsWith("--")
|
|
941
948
|
) ? o = [
|
|
942
|
-
`all ${d}ms ${
|
|
949
|
+
`all ${d}ms ${Q(m || "ease")}${p ? ` ${p}ms` : ""}`,
|
|
943
950
|
"visibility 0s"
|
|
944
951
|
] : o = n.styleProperties.map(
|
|
945
|
-
(
|
|
946
|
-
|
|
952
|
+
(v) => `${v.name} ${d}ms ${Q(
|
|
953
|
+
m || "ease"
|
|
947
954
|
)}${p ? ` ${p}ms` : ""}`
|
|
948
955
|
)), s = n.styleProperties;
|
|
949
956
|
} else
|
|
950
957
|
o = s?.filter((d) => d.duration).map(
|
|
951
|
-
(d) => `${d.name} ${d.duration}ms ${
|
|
958
|
+
(d) => `${d.name} ${d.duration}ms ${Q(d.easing) || "ease"}${d.delay ? ` ${d.delay}ms` : ""}`
|
|
952
959
|
) || [];
|
|
953
|
-
const c = s?.map((d) => `${d.name}: ${d.value};`) || [], l = t.replace(/"/g, "'"), f = `:is(:state(${e}), :--${e}) ${r}`, a = `[data-interact-effect~="${e}"] ${r}`, u = i ?
|
|
960
|
+
const c = s?.map((d) => `${d.name}: ${d.value};`) || [], l = t.replace(/"/g, "'"), f = `:is(:state(${e}), :--${e}) ${r}`, a = `[data-interact-effect~="${e}"] ${r}`, u = i ? U(f, i) : f, h = i ? U(a, i) : a, g = [
|
|
954
961
|
`${u},
|
|
955
|
-
${
|
|
962
|
+
${h} {
|
|
956
963
|
${c.join(`
|
|
957
964
|
`)}
|
|
958
965
|
}`
|
|
959
966
|
];
|
|
960
967
|
if (o.length) {
|
|
961
|
-
const d = `[data-interact-key="${l}"] ${r}`,
|
|
962
|
-
g.push(`@media (prefers-reduced-motion: no-preference) { ${
|
|
968
|
+
const d = `[data-interact-key="${l}"] ${r}`, m = i ? U(d, i) : d;
|
|
969
|
+
g.push(`@media (prefers-reduced-motion: no-preference) { ${m} {
|
|
963
970
|
transition: ${o.join(", ")};
|
|
964
971
|
} }`);
|
|
965
972
|
}
|
|
966
973
|
return g;
|
|
967
974
|
}
|
|
968
|
-
function
|
|
975
|
+
function A(t, e) {
|
|
969
976
|
const n = (t || []).filter((i) => e[i]?.type === "media" && e[i].predicate).map((i) => e[i].predicate).join(") and ("), s = n && `(${n})`;
|
|
970
977
|
return s && window.matchMedia(s);
|
|
971
978
|
}
|
|
972
|
-
function
|
|
979
|
+
function $(t, e) {
|
|
973
980
|
for (const n of t || []) {
|
|
974
981
|
const s = e[n];
|
|
975
982
|
if (s?.type === "selector" && s.predicate)
|
|
976
983
|
return s.predicate;
|
|
977
984
|
}
|
|
978
985
|
}
|
|
979
|
-
const
|
|
986
|
+
const V = {
|
|
980
987
|
rangeStart: { name: "cover", offset: { value: 0, unit: "percentage" } },
|
|
981
988
|
rangeEnd: { name: "cover", offset: { value: 100, unit: "percentage" } }
|
|
982
989
|
};
|
|
983
990
|
function Qt(t, e) {
|
|
984
|
-
const n = t?.name ??
|
|
991
|
+
const n = t?.name ?? V.rangeStart.name, s = e?.name ?? t?.name ?? V.rangeEnd.name, r = {
|
|
985
992
|
name: n,
|
|
986
|
-
offset: t?.offset ||
|
|
993
|
+
offset: t?.offset || V.rangeStart.offset
|
|
987
994
|
}, i = {
|
|
988
995
|
name: s,
|
|
989
|
-
offset: e?.offset ||
|
|
996
|
+
offset: e?.offset || V.rangeEnd.offset
|
|
990
997
|
};
|
|
991
998
|
return { startOffset: r, endOffset: i };
|
|
992
999
|
}
|
|
@@ -1008,7 +1015,7 @@ function O(t, e, n) {
|
|
|
1008
1015
|
let s = t.get(e);
|
|
1009
1016
|
s || (s = /* @__PURE__ */ new Set(), t.set(e, s)), s.add(n);
|
|
1010
1017
|
}
|
|
1011
|
-
function
|
|
1018
|
+
function W(t, e) {
|
|
1012
1019
|
t.get(e)?.forEach((s) => {
|
|
1013
1020
|
const { source: r, target: i, cleanup: o } = s;
|
|
1014
1021
|
o();
|
|
@@ -1029,57 +1036,56 @@ function Zt(t) {
|
|
|
1029
1036
|
const e = t.trim().split(/\s+/), n = e[0], s = e.length > 1 ? e[1] : e[0], r = (i) => i.startsWith("-") ? i.slice(1) : parseFloat(i) ? `-${i}` : i;
|
|
1030
1037
|
return `${r(n)} 0px ${r(s)}`;
|
|
1031
1038
|
}
|
|
1032
|
-
const
|
|
1033
|
-
let
|
|
1039
|
+
const D = {}, k = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakSet(), R = /* @__PURE__ */ new WeakMap();
|
|
1040
|
+
let Ve = {}, H = null;
|
|
1034
1041
|
function en(t) {
|
|
1035
|
-
|
|
1042
|
+
Ve = t;
|
|
1036
1043
|
}
|
|
1037
|
-
function je(t, e) {
|
|
1038
|
-
|
|
1039
|
-
|
|
1044
|
+
function je(t, e, n) {
|
|
1045
|
+
k.get(t)?.forEach(({ source: r, handler: i }) => {
|
|
1046
|
+
r === t && i(e, n);
|
|
1040
1047
|
});
|
|
1041
1048
|
}
|
|
1042
1049
|
function Ce() {
|
|
1043
|
-
return
|
|
1050
|
+
return H || (H = new IntersectionObserver((t) => {
|
|
1044
1051
|
t.forEach((e) => {
|
|
1045
1052
|
const n = e.target;
|
|
1046
|
-
e.isIntersecting || je(n, !1);
|
|
1053
|
+
e.isIntersecting || je(n, !1, !0);
|
|
1047
1054
|
});
|
|
1048
|
-
}, Ut),
|
|
1055
|
+
}, Ut), H);
|
|
1049
1056
|
}
|
|
1050
1057
|
function Ye(t, e = !1) {
|
|
1051
1058
|
const n = JSON.stringify({ ...t, isSafeMode: e });
|
|
1052
|
-
if (
|
|
1053
|
-
return
|
|
1059
|
+
if (D[n])
|
|
1060
|
+
return D[n];
|
|
1054
1061
|
const s = t.threshold ?? Jt, r = e ? Xt : {
|
|
1055
1062
|
root: null,
|
|
1056
1063
|
rootMargin: t.inset ? Zt(t.inset) : "0px",
|
|
1057
1064
|
threshold: s
|
|
1058
1065
|
}, i = new IntersectionObserver((o) => {
|
|
1059
1066
|
o.forEach((c) => {
|
|
1060
|
-
const l = c.target, f = !
|
|
1061
|
-
if (f && (
|
|
1062
|
-
|
|
1063
|
-
const
|
|
1064
|
-
if (!
|
|
1067
|
+
const l = c.target, f = !ee.has(l);
|
|
1068
|
+
if (f && (ee.add(l), t.useSafeViewEnter && !c.isIntersecting)) {
|
|
1069
|
+
I.measure(() => {
|
|
1070
|
+
const a = c.boundingClientRect.height, u = c.rootBounds?.height;
|
|
1071
|
+
if (!u)
|
|
1065
1072
|
return;
|
|
1066
|
-
const
|
|
1067
|
-
|
|
1073
|
+
const h = Array.isArray(t.threshold) ? Math.min(...t.threshold) : t.threshold;
|
|
1074
|
+
h && a * h > u && I.mutate(() => {
|
|
1068
1075
|
i.unobserve(l);
|
|
1069
|
-
const
|
|
1070
|
-
|
|
1076
|
+
const d = Ye(t, !0);
|
|
1077
|
+
R.set(l, d), d.observe(l);
|
|
1071
1078
|
});
|
|
1072
1079
|
});
|
|
1073
1080
|
return;
|
|
1074
1081
|
}
|
|
1075
|
-
|
|
1076
|
-
(c.isIntersecting || a === "alternate" && !f) && (je(l, c.isIntersecting), a === "once" && (i.unobserve(c.target), X.delete(l)));
|
|
1082
|
+
(c.isIntersecting || !f) && je(l, c.isIntersecting);
|
|
1077
1083
|
});
|
|
1078
1084
|
}, r);
|
|
1079
|
-
return
|
|
1085
|
+
return D[n] = i, i;
|
|
1080
1086
|
}
|
|
1081
1087
|
function tn(t, e, n, s = {}, { reducedMotion: r, selectorCondition: i, animation: o } = {}) {
|
|
1082
|
-
const c = { ...
|
|
1088
|
+
const c = { ...Ve, ...s }, l = n.triggerType || "once", f = o || ne(
|
|
1083
1089
|
e,
|
|
1084
1090
|
P(n),
|
|
1085
1091
|
void 0,
|
|
@@ -1089,37 +1095,43 @@ function tn(t, e, n, s = {}, { reducedMotion: r, selectorCondition: i, animation
|
|
|
1089
1095
|
return;
|
|
1090
1096
|
const a = Ye(c);
|
|
1091
1097
|
l !== "once" && f.persist?.();
|
|
1092
|
-
let u = !0;
|
|
1093
|
-
|
|
1094
|
-
i && !e.matches(i)
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1098
|
+
let u = !0, h = !1, g;
|
|
1099
|
+
g = { source: t, target: e, handler: (p, y) => {
|
|
1100
|
+
if (!(i && !e.matches(i)))
|
|
1101
|
+
if (l === "once") {
|
|
1102
|
+
if (p && !h) {
|
|
1103
|
+
h = !0, k.get(t)?.delete(g), k.get(e)?.delete(g);
|
|
1104
|
+
const v = k.get(t);
|
|
1105
|
+
(!v || v.size === 0) && ((R.get(t) || a).unobserve(t), ee.delete(t)), f.play(() => {
|
|
1106
|
+
const w = () => {
|
|
1107
|
+
e.dataset.interactEnter = "start";
|
|
1108
|
+
};
|
|
1109
|
+
if (f.isCSS) {
|
|
1110
|
+
I.mutate(() => {
|
|
1111
|
+
requestAnimationFrame(w);
|
|
1112
|
+
});
|
|
1113
|
+
const b = () => {
|
|
1114
|
+
I.mutate(() => {
|
|
1115
|
+
e.dataset.interactEnter = "done";
|
|
1116
|
+
});
|
|
1117
|
+
};
|
|
1118
|
+
f.onFinish(b), f.onAbort(b);
|
|
1119
|
+
} else
|
|
1120
|
+
I.mutate(w);
|
|
1105
1121
|
});
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
} else
|
|
1109
|
-
T.mutate(p);
|
|
1110
|
-
}) : l === "alternate" ? u && h ? (u = !1, f.play()) : u || f.reverse() : l === "repeat" ? h ? (f.progress(0), f.play()) : (f.pause(), f.progress(0)) : l === "state" && (h ? f.play() : f.pause()));
|
|
1122
|
+
}
|
|
1123
|
+
} else l === "alternate" ? u && p ? (u = !1, f.play()) : u || f.reverse() : l === "repeat" ? p ? (f.progress(0), f.play()) : y && (f.pause(), f.progress(0)) : l === "state" && (p ? f.play() : y && f.pause());
|
|
1111
1124
|
}, cleanup: () => {
|
|
1112
|
-
(
|
|
1113
|
-
} };
|
|
1114
|
-
O(ee, t, d), O(ee, e, d), U.set(t, a), a.observe(t), (l === "repeat" || l === "state") && Ce().observe(t);
|
|
1125
|
+
(R.get(t) || a).unobserve(t), (l === "repeat" || l === "state") && Ce().unobserve(t), f.cancel(), ee.delete(t), R.delete(t);
|
|
1126
|
+
} }, O(k, t, g), O(k, e, g), R.set(t, a), a.observe(t), (l === "repeat" || l === "state") && Ce().observe(t);
|
|
1115
1127
|
}
|
|
1116
1128
|
function nn(t) {
|
|
1117
|
-
|
|
1129
|
+
W(k, t);
|
|
1118
1130
|
}
|
|
1119
1131
|
function sn() {
|
|
1120
|
-
|
|
1132
|
+
H = null, Object.keys(D).forEach((t) => delete D[t]);
|
|
1121
1133
|
}
|
|
1122
|
-
const
|
|
1134
|
+
const Ae = {
|
|
1123
1135
|
add: tn,
|
|
1124
1136
|
remove: nn,
|
|
1125
1137
|
setOptions: en,
|
|
@@ -1147,7 +1159,7 @@ function on(t) {
|
|
|
1147
1159
|
}));
|
|
1148
1160
|
};
|
|
1149
1161
|
}
|
|
1150
|
-
function
|
|
1162
|
+
function ke(t, e) {
|
|
1151
1163
|
let n = 0;
|
|
1152
1164
|
return function() {
|
|
1153
1165
|
n && window.clearTimeout(n), n = window.setTimeout(() => {
|
|
@@ -1175,18 +1187,18 @@ function oe(t, e, n, s, r) {
|
|
|
1175
1187
|
const f = c.sticky;
|
|
1176
1188
|
if (f) {
|
|
1177
1189
|
if ("end" in f && t[l - 1]?.element) {
|
|
1178
|
-
const
|
|
1190
|
+
const h = ((r ? c.element.offsetWidth : c.element.offsetHeight) || 0) + f.end - s, g = i + h - c.offset, d = g < o.start, m = !d && g <= n;
|
|
1179
1191
|
let p = 0;
|
|
1180
|
-
(d ||
|
|
1192
|
+
(d || m) && (p = c.offset, o.end += p), d && (o.start += p);
|
|
1181
1193
|
}
|
|
1182
1194
|
if ("start" in f) {
|
|
1183
|
-
const a = i - f.start, u = a < o.start,
|
|
1195
|
+
const a = i - f.start, u = a < o.start, h = !u && a <= o.end;
|
|
1184
1196
|
let g = 0;
|
|
1185
1197
|
const d = t[l - 1]?.element;
|
|
1186
1198
|
if (d) {
|
|
1187
|
-
if (u ||
|
|
1188
|
-
const
|
|
1189
|
-
g =
|
|
1199
|
+
if (u || h) {
|
|
1200
|
+
const m = (r ? d.offsetWidth : d.offsetHeight) || 0, p = c.offset, y = (r ? c.element.offsetWidth : c.element.offsetHeight) || 0;
|
|
1201
|
+
g = m - (p + y), i += g, o.end += g;
|
|
1190
1202
|
}
|
|
1191
1203
|
u && (o.start += g);
|
|
1192
1204
|
}
|
|
@@ -1196,24 +1208,24 @@ function oe(t, e, n, s, r) {
|
|
|
1196
1208
|
}
|
|
1197
1209
|
function an(t, e, n, s, r, i) {
|
|
1198
1210
|
const { start: o, end: c, duration: l } = t;
|
|
1199
|
-
let f = o, a = c, u = t.startRange,
|
|
1211
|
+
let f = o, a = c, u = t.startRange, h = t.endRange, g;
|
|
1200
1212
|
if (typeof l == "string") {
|
|
1201
|
-
u = { name: l, offset: 0 },
|
|
1213
|
+
u = { name: l, offset: 0 }, h = { name: l, offset: 100 }, f = q(u, n, e), a = q(h, n, e), g = a - f;
|
|
1202
1214
|
const d = oe(i, f, a, n, s);
|
|
1203
1215
|
f = d.start, a = d.end;
|
|
1204
1216
|
} else {
|
|
1205
1217
|
if (u || o?.name) {
|
|
1206
1218
|
u = u || o;
|
|
1207
|
-
const d = te(u.add, r),
|
|
1208
|
-
f =
|
|
1219
|
+
const d = te(u.add, r), m = q({ ...u, offset: 0 }, n, e), p = q({ ...u, offset: 100 }, n, e), y = oe(i, m, p, n, s);
|
|
1220
|
+
f = y.start + u.offset / 100 * (y.end - y.start) + d;
|
|
1209
1221
|
}
|
|
1210
|
-
if (
|
|
1211
|
-
|
|
1212
|
-
const d = te(
|
|
1213
|
-
a =
|
|
1222
|
+
if (h || c?.name) {
|
|
1223
|
+
h = h || c;
|
|
1224
|
+
const d = te(h.add, r), m = q({ ...h, offset: 0 }, n, e), p = q({ ...h, offset: 100 }, n, e), y = oe(i, m, p, n, s);
|
|
1225
|
+
a = y.start + h.offset / 100 * (y.end - y.start) + d;
|
|
1214
1226
|
} else typeof l == "number" && (a = f + l);
|
|
1215
1227
|
}
|
|
1216
|
-
return !g && !l && (g = a - f), { ...t, start: f, end: a, startRange: u, endRange:
|
|
1228
|
+
return !g && !l && (g = a - f), { ...t, start: f, end: a, startRange: u, endRange: h, duration: g || l };
|
|
1217
1229
|
}
|
|
1218
1230
|
function fn(t) {
|
|
1219
1231
|
return t.position === "sticky";
|
|
@@ -1237,11 +1249,11 @@ function mn(t, e) {
|
|
|
1237
1249
|
const s = un(t, e), r = dn(t, e), i = !isNaN(s), o = !isNaN(r);
|
|
1238
1250
|
return (i || o) && (n = {}, i && (n.start = s), o && (n.end = r)), n;
|
|
1239
1251
|
}
|
|
1240
|
-
function
|
|
1252
|
+
function j(t, e, n, s, r) {
|
|
1241
1253
|
const i = t[0].viewSource, o = [];
|
|
1242
1254
|
let c = (s ? i.offsetWidth : i.offsetHeight) || 0, l = 0, f = i;
|
|
1243
1255
|
for (; f; ) {
|
|
1244
|
-
const u = window.getComputedStyle(f),
|
|
1256
|
+
const u = window.getComputedStyle(f), h = fn(u), g = h ? mn(u, s) : void 0, d = hn(f, s, h);
|
|
1245
1257
|
if ((!g || !("end" in g)) && (l += d), o.push({ element: f, offset: d, sticky: g }), f = f.offsetParent, ln(u, f, e))
|
|
1246
1258
|
break;
|
|
1247
1259
|
if (f === e) {
|
|
@@ -1260,7 +1272,7 @@ function V(t, e, n, s, r) {
|
|
|
1260
1272
|
)
|
|
1261
1273
|
}));
|
|
1262
1274
|
}
|
|
1263
|
-
const
|
|
1275
|
+
const _e = 100, pn = {
|
|
1264
1276
|
horizontal: !1,
|
|
1265
1277
|
observeViewportEntry: !0,
|
|
1266
1278
|
viewportRootMargin: "7% 7%",
|
|
@@ -1272,7 +1284,7 @@ function gn(t, e, n, s) {
|
|
|
1272
1284
|
let r = 0;
|
|
1273
1285
|
return t >= e && t <= n ? r = s ? (t - e) / s : 1 : t > n && (r = 1), r;
|
|
1274
1286
|
}
|
|
1275
|
-
function
|
|
1287
|
+
function qe(t, e) {
|
|
1276
1288
|
return t === window ? e ? window.document.documentElement.clientWidth : window.document.documentElement.clientHeight : e ? t.clientWidth : t.clientHeight;
|
|
1277
1289
|
}
|
|
1278
1290
|
function vn() {
|
|
@@ -1283,85 +1295,85 @@ function vn() {
|
|
|
1283
1295
|
}
|
|
1284
1296
|
function yn(t) {
|
|
1285
1297
|
const e = Be(t, pn), n = e.root, s = e.horizontal, r = /* @__PURE__ */ new WeakMap();
|
|
1286
|
-
let i =
|
|
1287
|
-
const u = [],
|
|
1298
|
+
let i = qe(n, s), o, c, l, f, a;
|
|
1299
|
+
const u = [], h = vn();
|
|
1288
1300
|
if (e.scenes = Object.values(
|
|
1289
1301
|
// TODO(ameerf): find a polyfill and use groupBy instead of following reduce
|
|
1290
1302
|
t.scenes.reduce(
|
|
1291
|
-
(
|
|
1292
|
-
const
|
|
1293
|
-
return
|
|
1303
|
+
(m, p, y) => {
|
|
1304
|
+
const v = p.groupId ? `group-${p.groupId}` : String(y);
|
|
1305
|
+
return m[v] ? m[v].push(p) : m[v] = [p], m;
|
|
1294
1306
|
},
|
|
1295
1307
|
{}
|
|
1296
1308
|
)
|
|
1297
|
-
).flatMap((
|
|
1309
|
+
).flatMap((m) => (m.every((p) => p.viewSource && (typeof p.duration == "string" || p.start?.name)) ? (m = j(m, n, i, s, h), (e.observeSourcesResize || e.observeContentResize) && u.push(m)) : m.forEach((p) => {
|
|
1298
1310
|
p.end == null && (p.end = p.start + p.duration), p.duration == null && (p.duration = p.end - p.start);
|
|
1299
|
-
}),
|
|
1300
|
-
|
|
1311
|
+
}), m)), e.scenes.forEach((m, p) => {
|
|
1312
|
+
m.index = p;
|
|
1301
1313
|
}), u.length) {
|
|
1302
|
-
const
|
|
1314
|
+
const m = /* @__PURE__ */ new Map();
|
|
1303
1315
|
window.ResizeObserver && (l = new window.ResizeObserver(function(p) {
|
|
1304
|
-
p.forEach((
|
|
1305
|
-
const
|
|
1316
|
+
p.forEach((y) => {
|
|
1317
|
+
const v = m.get(y.target), w = j(v, n, i, s, h);
|
|
1306
1318
|
w.forEach((b, S) => {
|
|
1307
1319
|
e.scenes[b.index] = w[S];
|
|
1308
|
-
}), u.splice(u.indexOf(
|
|
1320
|
+
}), u.splice(u.indexOf(v), 1, w);
|
|
1309
1321
|
});
|
|
1310
1322
|
}), u.forEach((p) => {
|
|
1311
|
-
l.observe(p[0].viewSource, { box: "border-box" }),
|
|
1312
|
-
}), e.observeContentResize && e.contentRoot && new window.ResizeObserver(
|
|
1313
|
-
const
|
|
1314
|
-
const w =
|
|
1323
|
+
l.observe(p[0].viewSource, { box: "border-box" }), m.set(p[0].viewSource, p);
|
|
1324
|
+
}), e.observeContentResize && e.contentRoot && new window.ResizeObserver(ke(() => {
|
|
1325
|
+
const y = u.map((v) => {
|
|
1326
|
+
const w = j(v, n, i, s, h);
|
|
1315
1327
|
return w.forEach((b, S) => {
|
|
1316
1328
|
e.scenes[b.index] = w[S];
|
|
1317
1329
|
}), w;
|
|
1318
1330
|
});
|
|
1319
|
-
u.length = 0, u.push(...
|
|
1320
|
-
|
|
1331
|
+
u.length = 0, u.push(...y), u.forEach((v) => {
|
|
1332
|
+
m.set(v[0].viewSource, v);
|
|
1321
1333
|
});
|
|
1322
|
-
},
|
|
1323
|
-
i =
|
|
1324
|
-
const p = u.map((
|
|
1325
|
-
const
|
|
1326
|
-
return
|
|
1327
|
-
e.scenes[w.index] =
|
|
1328
|
-
}),
|
|
1334
|
+
}, _e)).observe(e.contentRoot, { box: "border-box" })), e.observeViewportResize && (f = ke(function() {
|
|
1335
|
+
i = qe(n, s);
|
|
1336
|
+
const p = u.map((y) => {
|
|
1337
|
+
const v = j(y, n, i, s, h);
|
|
1338
|
+
return v.forEach((w, b) => {
|
|
1339
|
+
e.scenes[w.index] = v[b];
|
|
1340
|
+
}), v;
|
|
1329
1341
|
});
|
|
1330
|
-
u.length = 0, u.push(...p), u.forEach((
|
|
1331
|
-
|
|
1342
|
+
u.length = 0, u.push(...p), u.forEach((y) => {
|
|
1343
|
+
m.set(y[0].viewSource, y);
|
|
1332
1344
|
});
|
|
1333
|
-
},
|
|
1345
|
+
}, _e), n === window ? window.addEventListener("resize", f) : window.ResizeObserver && (a = new window.ResizeObserver(f), a.observe(n, { box: "border-box" })));
|
|
1334
1346
|
}
|
|
1335
|
-
e.observeViewportEntry && window.IntersectionObserver && (c = new window.IntersectionObserver(function(
|
|
1336
|
-
|
|
1337
|
-
(r.get(p.target) || []).forEach((
|
|
1338
|
-
|
|
1347
|
+
e.observeViewportEntry && window.IntersectionObserver && (c = new window.IntersectionObserver(function(m) {
|
|
1348
|
+
m.forEach((p) => {
|
|
1349
|
+
(r.get(p.target) || []).forEach((y) => {
|
|
1350
|
+
y.disabled = !p.isIntersecting;
|
|
1339
1351
|
});
|
|
1340
1352
|
});
|
|
1341
1353
|
}, {
|
|
1342
1354
|
root: n === window ? window.document : n,
|
|
1343
1355
|
rootMargin: e.viewportRootMargin,
|
|
1344
1356
|
threshold: 0
|
|
1345
|
-
}), e.scenes.forEach((
|
|
1346
|
-
if (
|
|
1347
|
-
let p = r.get(
|
|
1348
|
-
p || (p = [], r.set(
|
|
1357
|
+
}), e.scenes.forEach((m) => {
|
|
1358
|
+
if (m.viewSource) {
|
|
1359
|
+
let p = r.get(m.viewSource);
|
|
1360
|
+
p || (p = [], r.set(m.viewSource, p), c.observe(m.viewSource)), p.push(m);
|
|
1349
1361
|
}
|
|
1350
1362
|
}));
|
|
1351
|
-
function g({ p:
|
|
1352
|
-
|
|
1353
|
-
const
|
|
1354
|
-
if (
|
|
1355
|
-
for (let
|
|
1356
|
-
if (!
|
|
1357
|
-
const { start: w, end: b, duration: S } =
|
|
1358
|
-
|
|
1363
|
+
function g({ p: m, vp: p }) {
|
|
1364
|
+
m = +m.toFixed(1);
|
|
1365
|
+
const y = +p.toFixed(4);
|
|
1366
|
+
if (m !== o) {
|
|
1367
|
+
for (let v of e.scenes)
|
|
1368
|
+
if (!v.disabled) {
|
|
1369
|
+
const { start: w, end: b, duration: S } = v, T = gn(m, w, b, S);
|
|
1370
|
+
v.effect(v, T, y);
|
|
1359
1371
|
}
|
|
1360
|
-
o =
|
|
1372
|
+
o = m;
|
|
1361
1373
|
}
|
|
1362
1374
|
}
|
|
1363
1375
|
function d() {
|
|
1364
|
-
e.scenes.forEach((
|
|
1376
|
+
e.scenes.forEach((m) => m.destroy?.()), c && (c.disconnect(), c = null), l && (l.disconnect(), l = null), f && (a ? (a.disconnect(), a = null) : window.removeEventListener("resize", f));
|
|
1365
1377
|
}
|
|
1366
1378
|
return {
|
|
1367
1379
|
tick: g,
|
|
@@ -1503,7 +1515,7 @@ function Sn(t, e, n, s, { reducedMotion: r }) {
|
|
|
1503
1515
|
});
|
|
1504
1516
|
c = () => {
|
|
1505
1517
|
u.destroy();
|
|
1506
|
-
}, Promise.all(a.map((
|
|
1518
|
+
}, Promise.all(a.map((h) => h.ready || Promise.resolve())).then(
|
|
1507
1519
|
() => {
|
|
1508
1520
|
u.start();
|
|
1509
1521
|
}
|
|
@@ -1514,12 +1526,12 @@ function Sn(t, e, n, s, { reducedMotion: r }) {
|
|
|
1514
1526
|
const l = { source: t, target: e, cleanup: c };
|
|
1515
1527
|
O(le, t, l), O(le, e, l);
|
|
1516
1528
|
}
|
|
1517
|
-
function
|
|
1518
|
-
|
|
1529
|
+
function Tn(t) {
|
|
1530
|
+
W(le, t);
|
|
1519
1531
|
}
|
|
1520
|
-
const
|
|
1532
|
+
const In = {
|
|
1521
1533
|
add: Sn,
|
|
1522
|
-
remove:
|
|
1534
|
+
remove: Tn,
|
|
1523
1535
|
registerOptionsGetter: bn
|
|
1524
1536
|
};
|
|
1525
1537
|
function xe(t, e, n) {
|
|
@@ -1560,7 +1572,7 @@ function Cn() {
|
|
|
1560
1572
|
});
|
|
1561
1573
|
return document.body.dispatchEvent(n), e;
|
|
1562
1574
|
}
|
|
1563
|
-
function
|
|
1575
|
+
function An() {
|
|
1564
1576
|
return new Promise((t) => {
|
|
1565
1577
|
const e = window.scrollY;
|
|
1566
1578
|
let n = !1, s;
|
|
@@ -1579,14 +1591,14 @@ function kn() {
|
|
|
1579
1591
|
r(), window.addEventListener("scroll", i), window.scrollY > 0 && window.scrollBy(0, -1);
|
|
1580
1592
|
});
|
|
1581
1593
|
}
|
|
1582
|
-
function
|
|
1583
|
-
|
|
1594
|
+
function kn(t) {
|
|
1595
|
+
An().then((e) => {
|
|
1584
1596
|
t.fixRequired = e, e && (window.addEventListener("scroll", t.scrollHandler), t.scrollHandler());
|
|
1585
1597
|
});
|
|
1586
1598
|
}
|
|
1587
|
-
let
|
|
1599
|
+
let Y = 0;
|
|
1588
1600
|
const J = /* @__PURE__ */ new Set();
|
|
1589
|
-
function
|
|
1601
|
+
function _n() {
|
|
1590
1602
|
const t = (n) => {
|
|
1591
1603
|
for (let s of n.changedTouches)
|
|
1592
1604
|
J.add(s.identifier);
|
|
@@ -1598,20 +1610,20 @@ function qn() {
|
|
|
1598
1610
|
J.clear(), document.removeEventListener("touchstart", t), document.removeEventListener("touchend", e);
|
|
1599
1611
|
};
|
|
1600
1612
|
}
|
|
1601
|
-
function
|
|
1613
|
+
function qn(t, e) {
|
|
1602
1614
|
if ("onscrollend" in window)
|
|
1603
1615
|
return t.addEventListener("scrollend", e), function() {
|
|
1604
1616
|
t.removeEventListener("scrollend", e);
|
|
1605
1617
|
};
|
|
1606
1618
|
let n = 0, s;
|
|
1607
|
-
|
|
1619
|
+
Y || (s = _n()), Y += 1;
|
|
1608
1620
|
function r(i) {
|
|
1609
1621
|
clearTimeout(n), n = setTimeout(() => {
|
|
1610
1622
|
J.size ? setTimeout(r, 100) : (e(i), n = 0);
|
|
1611
1623
|
}, 100);
|
|
1612
1624
|
}
|
|
1613
1625
|
return t.addEventListener("scroll", r), function() {
|
|
1614
|
-
t.removeEventListener("scroll", r),
|
|
1626
|
+
t.removeEventListener("scroll", r), Y -= 1, Y || s();
|
|
1615
1627
|
};
|
|
1616
1628
|
}
|
|
1617
1629
|
function xn(t, e, n) {
|
|
@@ -1632,7 +1644,7 @@ function Mn(t, e) {
|
|
|
1632
1644
|
function Ln(t) {
|
|
1633
1645
|
t.rect.width = window.document.documentElement.clientWidth, t.rect.height = window.document.documentElement.clientHeight;
|
|
1634
1646
|
}
|
|
1635
|
-
function
|
|
1647
|
+
function $n(t) {
|
|
1636
1648
|
const e = new ResizeObserver((n) => {
|
|
1637
1649
|
n.forEach((s) => {
|
|
1638
1650
|
t.rect.width = s.borderBoxSize[0].inlineSize, t.rect.height = s.borderBoxSize[0].blockSize;
|
|
@@ -1640,19 +1652,19 @@ function Pn(t) {
|
|
|
1640
1652
|
});
|
|
1641
1653
|
return e.observe(t.root, { box: "border-box" }), e;
|
|
1642
1654
|
}
|
|
1643
|
-
function
|
|
1655
|
+
function Pn(t) {
|
|
1644
1656
|
let e = !1, n = { x: t.rect.width / 2, y: t.rect.height / 2, vx: 0, vy: 0 }, s, r, i, o, c;
|
|
1645
1657
|
const l = { x: 0, y: 0 };
|
|
1646
1658
|
t.scenes.forEach((a) => {
|
|
1647
|
-
a.target && a.centeredToTarget && (a.transform = xn(On(a.target), t.rect, l), e = !0), t.root ? r =
|
|
1659
|
+
a.target && a.centeredToTarget && (a.transform = xn(On(a.target), t.rect, l), e = !0), t.root ? r = $n(t) : (i = Ln.bind(null, t), window.addEventListener("resize", i));
|
|
1648
1660
|
}), s = function(a) {
|
|
1649
1661
|
for (let u of t.scenes)
|
|
1650
1662
|
if (!u.disabled) {
|
|
1651
|
-
const
|
|
1652
|
-
t.allowActiveEvent && (a.active =
|
|
1663
|
+
const h = u.transform?.x(a.x) || a.x / t.rect.width, g = u.transform?.y(a.y) || a.y / t.rect.height, d = +xe(0, 1, h).toPrecision(4), m = +xe(0, 1, g).toPrecision(4), p = { x: a.vx, y: a.vy };
|
|
1664
|
+
t.allowActiveEvent && (a.active = h <= 1 && g <= 1 && h >= 0 && g >= 0), u.effect(u, { x: d, y: m }, p, a.active);
|
|
1653
1665
|
}
|
|
1654
1666
|
Object.assign(n, a);
|
|
1655
|
-
}, e && (o = Mn.bind(l, s, n), c =
|
|
1667
|
+
}, e && (o = Mn.bind(l, s, n), c = qn(document, o));
|
|
1656
1668
|
function f() {
|
|
1657
1669
|
t.scenes.forEach((a) => a.destroy?.()), c?.(), r ? (r.disconnect(), r = null) : (window.removeEventListener("resize", i), i = null), s = null, n = null;
|
|
1658
1670
|
}
|
|
@@ -1662,11 +1674,11 @@ function $n(t) {
|
|
|
1662
1674
|
};
|
|
1663
1675
|
}
|
|
1664
1676
|
const Fn = 1e3 / 60 * 3;
|
|
1665
|
-
let
|
|
1677
|
+
let B;
|
|
1666
1678
|
function Rn() {
|
|
1667
|
-
|
|
1679
|
+
M.x = window.scrollX, M.y = window.scrollY;
|
|
1668
1680
|
}
|
|
1669
|
-
const
|
|
1681
|
+
const M = { x: 0, y: 0, scrollHandler: Rn, fixRequired: void 0 };
|
|
1670
1682
|
class Hn {
|
|
1671
1683
|
constructor(e = {}) {
|
|
1672
1684
|
this.config = { ...e }, this.effect = null, this._nextTick = null, this._nextTransitionTick = null, this._startTime = 0;
|
|
@@ -1694,15 +1706,15 @@ class Hn {
|
|
|
1694
1706
|
}, this._pointerEnter = () => {
|
|
1695
1707
|
this.progress.active = !0, this._nextTick = n();
|
|
1696
1708
|
}, this.config.root) {
|
|
1697
|
-
|
|
1698
|
-
const r =
|
|
1699
|
-
typeof
|
|
1709
|
+
B = typeof B == "boolean" ? B : Cn();
|
|
1710
|
+
const r = B ? window.devicePixelRatio : 1;
|
|
1711
|
+
typeof M.fixRequired > "u" && kn(M), this._measure = (i) => {
|
|
1700
1712
|
if (i.target !== this.config.root) {
|
|
1701
1713
|
const o = new PointerEvent("pointermove", {
|
|
1702
1714
|
bubbles: !0,
|
|
1703
1715
|
cancelable: !0,
|
|
1704
|
-
clientX: i.x * r +
|
|
1705
|
-
clientY: i.y * r +
|
|
1716
|
+
clientX: i.x * r + M.x,
|
|
1717
|
+
clientY: i.y * r + M.y
|
|
1706
1718
|
});
|
|
1707
1719
|
i.stopPropagation(), this.config.root.dispatchEvent(o);
|
|
1708
1720
|
} else
|
|
@@ -1768,7 +1780,7 @@ class Hn {
|
|
|
1768
1780
|
* Reset registered effect.
|
|
1769
1781
|
*/
|
|
1770
1782
|
setupEffect() {
|
|
1771
|
-
this.removeEffect(), this.effect =
|
|
1783
|
+
this.removeEffect(), this.effect = Pn(this.config);
|
|
1772
1784
|
}
|
|
1773
1785
|
/**
|
|
1774
1786
|
* Remove registered effect.
|
|
@@ -1782,7 +1794,7 @@ let Qe = () => ({});
|
|
|
1782
1794
|
function zn(t) {
|
|
1783
1795
|
Qe = t;
|
|
1784
1796
|
}
|
|
1785
|
-
function
|
|
1797
|
+
function Dn(t, e, n, s = {}, { reducedMotion: r }) {
|
|
1786
1798
|
if (r)
|
|
1787
1799
|
return;
|
|
1788
1800
|
const i = {
|
|
@@ -1805,15 +1817,15 @@ function Gn(t, e, n, s = {}, { reducedMotion: r }) {
|
|
|
1805
1817
|
});
|
|
1806
1818
|
}
|
|
1807
1819
|
}
|
|
1808
|
-
function
|
|
1809
|
-
|
|
1820
|
+
function Gn(t) {
|
|
1821
|
+
W(ue, t);
|
|
1810
1822
|
}
|
|
1811
1823
|
const Nn = {
|
|
1812
|
-
add:
|
|
1813
|
-
remove:
|
|
1824
|
+
add: Dn,
|
|
1825
|
+
remove: Gn,
|
|
1814
1826
|
registerOptionsGetter: zn
|
|
1815
1827
|
}, de = /* @__PURE__ */ new WeakMap();
|
|
1816
|
-
function
|
|
1828
|
+
function Wn(t, e, n, s, { reducedMotion: r, selectorCondition: i, animation: o }) {
|
|
1817
1829
|
const c = o || ne(
|
|
1818
1830
|
e,
|
|
1819
1831
|
P(n),
|
|
@@ -1829,60 +1841,61 @@ function Vn(t, e, n, s, { reducedMotion: r, selectorCondition: i, animation: o }
|
|
|
1829
1841
|
} };
|
|
1830
1842
|
O(de, t, a), O(de, e, a), t.addEventListener("animationend", l);
|
|
1831
1843
|
}
|
|
1832
|
-
function
|
|
1833
|
-
|
|
1844
|
+
function Vn(t) {
|
|
1845
|
+
W(de, t);
|
|
1834
1846
|
}
|
|
1835
1847
|
const jn = {
|
|
1836
|
-
add:
|
|
1837
|
-
remove:
|
|
1848
|
+
add: Wn,
|
|
1849
|
+
remove: Vn
|
|
1838
1850
|
};
|
|
1839
|
-
function Yn(t, e, n
|
|
1840
|
-
const
|
|
1851
|
+
function Yn(t, e, n = !1, s, r, i) {
|
|
1852
|
+
const o = i || ne(
|
|
1841
1853
|
t,
|
|
1842
1854
|
P(e),
|
|
1843
1855
|
void 0,
|
|
1844
|
-
|
|
1856
|
+
n
|
|
1845
1857
|
);
|
|
1846
|
-
if (!
|
|
1858
|
+
if (!o)
|
|
1847
1859
|
return null;
|
|
1848
|
-
let
|
|
1849
|
-
const
|
|
1850
|
-
return (
|
|
1851
|
-
if (
|
|
1852
|
-
const
|
|
1853
|
-
if (
|
|
1854
|
-
if (
|
|
1855
|
-
|
|
1860
|
+
let c = !0;
|
|
1861
|
+
const l = e.triggerType || "alternate";
|
|
1862
|
+
return (f) => {
|
|
1863
|
+
if (s && !t.matches(s)) return;
|
|
1864
|
+
const a = !r, u = r?.enter?.includes(f.type), h = r?.leave?.includes(f.type);
|
|
1865
|
+
if (u || a) {
|
|
1866
|
+
if (l === "alternate" || l === "state")
|
|
1867
|
+
c ? (c = !1, o.play()) : l === "alternate" ? o.reverse() : l === "state" && (o.playState === "running" ? o.pause() : o.playState !== "finished" && o.play());
|
|
1856
1868
|
else {
|
|
1857
|
-
if (
|
|
1858
|
-
const
|
|
1859
|
-
|
|
1869
|
+
if (o.progress(0), delete t.dataset.interactEnter, o.isCSS) {
|
|
1870
|
+
const g = () => {
|
|
1871
|
+
I.mutate(() => {
|
|
1860
1872
|
t.dataset.interactEnter = "done";
|
|
1861
1873
|
});
|
|
1862
1874
|
};
|
|
1863
|
-
|
|
1875
|
+
o.onFinish(g), o.onAbort(g);
|
|
1864
1876
|
}
|
|
1865
|
-
|
|
1877
|
+
o.play();
|
|
1866
1878
|
}
|
|
1867
1879
|
return;
|
|
1868
1880
|
}
|
|
1869
|
-
|
|
1881
|
+
h && (l === "alternate" ? o.reverse() : l === "repeat" ? (o.cancel(), I.mutate(() => {
|
|
1870
1882
|
delete t.dataset.interactEnter;
|
|
1871
|
-
})) :
|
|
1883
|
+
})) : l === "state" && o.playState === "running" && o.pause());
|
|
1872
1884
|
};
|
|
1873
1885
|
}
|
|
1874
1886
|
function Bn(t, e, {
|
|
1875
1887
|
effectId: n,
|
|
1876
1888
|
listContainer: s,
|
|
1877
|
-
listItemSelector: r
|
|
1878
|
-
|
|
1879
|
-
|
|
1889
|
+
listItemSelector: r,
|
|
1890
|
+
stateAction: i
|
|
1891
|
+
}, o, c) {
|
|
1892
|
+
const l = !!s, f = i ?? "toggle", a = f === "toggle";
|
|
1880
1893
|
return (u) => {
|
|
1881
1894
|
if (o && !t.matches(o)) return;
|
|
1882
|
-
const
|
|
1895
|
+
const h = l ? t.closest(
|
|
1883
1896
|
`${s} > ${r || ""}:has(:scope)`
|
|
1884
|
-
) : void 0, g = !c, d = c?.enter?.includes(u.type),
|
|
1885
|
-
g ? e.toggleEffect(n, f,
|
|
1897
|
+
) : void 0, g = !c, d = c?.enter?.includes(u.type), m = c?.leave?.includes(u.type);
|
|
1898
|
+
g ? e.toggleEffect(n, f, h) : (d && e.toggleEffect(n, a ? "add" : f, h), m && a && e.toggleEffect(n, "remove", h));
|
|
1886
1899
|
};
|
|
1887
1900
|
}
|
|
1888
1901
|
const he = /* @__PURE__ */ new WeakMap();
|
|
@@ -1941,54 +1954,52 @@ function ns(t, e, n, s, {
|
|
|
1941
1954
|
animation: c
|
|
1942
1955
|
}) {
|
|
1943
1956
|
const l = Zn(s.eventConfig), f = n.transition || n.transitionProperties, a = ts(l);
|
|
1944
|
-
let u,
|
|
1957
|
+
let u, h = !1;
|
|
1945
1958
|
if (f ? u = Bn(
|
|
1946
1959
|
e,
|
|
1947
1960
|
i,
|
|
1948
1961
|
n,
|
|
1949
|
-
s,
|
|
1950
1962
|
o,
|
|
1951
1963
|
a
|
|
1952
1964
|
) : (u = Yn(
|
|
1953
1965
|
e,
|
|
1954
1966
|
n,
|
|
1955
|
-
s,
|
|
1956
1967
|
r,
|
|
1957
1968
|
o,
|
|
1958
1969
|
a,
|
|
1959
1970
|
c
|
|
1960
|
-
),
|
|
1971
|
+
), h = n.triggerType === "once"), !u)
|
|
1961
1972
|
return;
|
|
1962
1973
|
const g = u, d = new AbortController();
|
|
1963
|
-
function
|
|
1974
|
+
function m(v, w, b) {
|
|
1964
1975
|
const S = Un(w, t, g);
|
|
1965
|
-
|
|
1976
|
+
v.addEventListener(w, S, { ...b, signal: d.signal });
|
|
1966
1977
|
}
|
|
1967
|
-
const
|
|
1978
|
+
const y = { source: t, target: e, cleanup: () => {
|
|
1968
1979
|
d.abort();
|
|
1969
1980
|
} };
|
|
1970
|
-
if (O(he, t,
|
|
1971
|
-
const
|
|
1972
|
-
|
|
1973
|
-
|
|
1981
|
+
if (O(he, t, y), O(he, e, y), a) {
|
|
1982
|
+
const v = l.enter, w = l.leave;
|
|
1983
|
+
v.forEach((T) => {
|
|
1984
|
+
T === "focusin" && (t.tabIndex = 0), m(t, T, { passive: !0, once: h });
|
|
1974
1985
|
});
|
|
1975
|
-
const b = !
|
|
1976
|
-
(f ? b :
|
|
1977
|
-
if (
|
|
1978
|
-
|
|
1986
|
+
const b = !n.stateAction || n.stateAction === "toggle";
|
|
1987
|
+
(f ? b : n.triggerType !== "once") && w.forEach((T) => {
|
|
1988
|
+
if (T === "focusout") {
|
|
1989
|
+
m(t, T, { once: h });
|
|
1979
1990
|
return;
|
|
1980
1991
|
}
|
|
1981
|
-
|
|
1992
|
+
m(t, T, { passive: !0 });
|
|
1982
1993
|
});
|
|
1983
1994
|
} else
|
|
1984
1995
|
(l.toggle ?? []).forEach((w) => {
|
|
1985
|
-
|
|
1996
|
+
m(t, w, { once: h, passive: w !== "keydown" });
|
|
1986
1997
|
});
|
|
1987
1998
|
}
|
|
1988
1999
|
function ss(t) {
|
|
1989
|
-
|
|
2000
|
+
W(he, t);
|
|
1990
2001
|
}
|
|
1991
|
-
const
|
|
2002
|
+
const z = {
|
|
1992
2003
|
add: ns,
|
|
1993
2004
|
remove: ss
|
|
1994
2005
|
}, me = {
|
|
@@ -1999,38 +2010,38 @@ const R = {
|
|
|
1999
2010
|
enter: ["mouseenter", "focusin"],
|
|
2000
2011
|
leave: ["mouseleave", "focusout"]
|
|
2001
2012
|
}
|
|
2002
|
-
},
|
|
2013
|
+
}, $e = {
|
|
2003
2014
|
click: me.activate,
|
|
2004
2015
|
hover: me.interest
|
|
2005
2016
|
};
|
|
2006
|
-
function
|
|
2017
|
+
function K(t) {
|
|
2007
2018
|
const e = me[t];
|
|
2008
2019
|
return (n, s, r, i, o) => {
|
|
2009
|
-
const c = o?.allowA11yTriggers && t in
|
|
2010
|
-
|
|
2020
|
+
const c = o?.allowA11yTriggers && t in $e ? $e[t] : e;
|
|
2021
|
+
z.add(n, s, r, { eventConfig: c }, o ?? {});
|
|
2011
2022
|
};
|
|
2012
2023
|
}
|
|
2013
|
-
const
|
|
2014
|
-
viewEnter:
|
|
2024
|
+
const _ = {
|
|
2025
|
+
viewEnter: Ae,
|
|
2015
2026
|
hover: {
|
|
2016
|
-
add:
|
|
2017
|
-
remove:
|
|
2027
|
+
add: K("hover"),
|
|
2028
|
+
remove: z.remove
|
|
2018
2029
|
},
|
|
2019
2030
|
click: {
|
|
2020
|
-
add:
|
|
2021
|
-
remove:
|
|
2031
|
+
add: K("click"),
|
|
2032
|
+
remove: z.remove
|
|
2022
2033
|
},
|
|
2023
|
-
pageVisible:
|
|
2034
|
+
pageVisible: Ae,
|
|
2024
2035
|
animationEnd: jn,
|
|
2025
|
-
viewProgress:
|
|
2036
|
+
viewProgress: In,
|
|
2026
2037
|
pointerMove: Nn,
|
|
2027
2038
|
activate: {
|
|
2028
|
-
add:
|
|
2029
|
-
remove:
|
|
2039
|
+
add: K("activate"),
|
|
2040
|
+
remove: z.remove
|
|
2030
2041
|
},
|
|
2031
2042
|
interest: {
|
|
2032
|
-
add:
|
|
2033
|
-
remove:
|
|
2043
|
+
add: K("interest"),
|
|
2044
|
+
remove: z.remove
|
|
2034
2045
|
}
|
|
2035
2046
|
};
|
|
2036
2047
|
function is(t) {
|
|
@@ -2055,7 +2066,7 @@ class E {
|
|
|
2055
2066
|
init(e, n) {
|
|
2056
2067
|
if (typeof window > "u" || !window.customElements)
|
|
2057
2068
|
return;
|
|
2058
|
-
const s = n?.
|
|
2069
|
+
const s = n?.useCustomElement ?? !!E.defineInteractElement;
|
|
2059
2070
|
this.dataCache = os(e, s);
|
|
2060
2071
|
const r = E.defineInteractElement?.();
|
|
2061
2072
|
s && r === !1 ? document.querySelectorAll("interact-element").forEach((i) => {
|
|
@@ -2115,19 +2126,21 @@ class E {
|
|
|
2115
2126
|
}), E.instances.length = 0, E.controllerCache.clear(), E.sequenceCache.clear(), E.elementSequenceMap = /* @__PURE__ */ new WeakMap();
|
|
2116
2127
|
}
|
|
2117
2128
|
static setup(e) {
|
|
2118
|
-
e.scrollOptionsGetter &&
|
|
2129
|
+
e.scrollOptionsGetter && _.viewProgress.registerOptionsGetter?.(
|
|
2119
2130
|
e.scrollOptionsGetter
|
|
2120
|
-
), e.pointerOptionsGetter &&
|
|
2131
|
+
), e.pointerOptionsGetter && _.pointerMove.registerOptionsGetter?.(
|
|
2121
2132
|
e.pointerOptionsGetter
|
|
2122
|
-
), e.viewEnter &&
|
|
2133
|
+
), e.viewEnter && _.viewEnter.setOptions(
|
|
2123
2134
|
e.viewEnter
|
|
2124
2135
|
), e.allowA11yTriggers !== void 0 && (E.allowA11yTriggers = e.allowA11yTriggers);
|
|
2125
2136
|
}
|
|
2126
2137
|
static getInstance(e) {
|
|
2127
|
-
|
|
2138
|
+
const n = E.instances.find((s) => s.has(e));
|
|
2139
|
+
return n || console.warn(`Interact: Instance for key "${e}" not found`), n;
|
|
2128
2140
|
}
|
|
2129
2141
|
static getController(e) {
|
|
2130
|
-
|
|
2142
|
+
const n = e ? E.controllerCache.get(e) : void 0;
|
|
2143
|
+
return n || console.warn(`Interact: Controller for key "${e}" not found`), n;
|
|
2131
2144
|
}
|
|
2132
2145
|
static setController(e, n) {
|
|
2133
2146
|
E.controllerCache.set(e, n);
|
|
@@ -2145,7 +2158,7 @@ class E {
|
|
|
2145
2158
|
static addToSequence(e, n, s, r) {
|
|
2146
2159
|
const i = E.sequenceCache.get(e);
|
|
2147
2160
|
if (!i) return !1;
|
|
2148
|
-
const c =
|
|
2161
|
+
const c = We(n, r).map((l, f) => ({
|
|
2149
2162
|
index: s[f] ?? i.animationGroups.length,
|
|
2150
2163
|
group: l
|
|
2151
2164
|
}));
|
|
@@ -2174,7 +2187,7 @@ class E {
|
|
|
2174
2187
|
}
|
|
2175
2188
|
}
|
|
2176
2189
|
let rs = 0;
|
|
2177
|
-
function
|
|
2190
|
+
function G(t, {
|
|
2178
2191
|
asCombinator: e = !1,
|
|
2179
2192
|
addItemFilter: n = !1,
|
|
2180
2193
|
useFirstChild: s = !1
|
|
@@ -2186,7 +2199,7 @@ function z(t, {
|
|
|
2186
2199
|
return t.selector;
|
|
2187
2200
|
return s ? e ? "> :first-child" : ":scope > :first-child" : "";
|
|
2188
2201
|
}
|
|
2189
|
-
function
|
|
2202
|
+
function Pe(t) {
|
|
2190
2203
|
return "sequenceId" in t && !("effects" in t);
|
|
2191
2204
|
}
|
|
2192
2205
|
function ce(t, e) {
|
|
@@ -2210,52 +2223,52 @@ function os(t, e = !1) {
|
|
|
2210
2223
|
const a = c ? Array.from(c) : [];
|
|
2211
2224
|
a.reverse();
|
|
2212
2225
|
const u = l?.map((d) => {
|
|
2213
|
-
if (
|
|
2226
|
+
if (Pe(d)) {
|
|
2214
2227
|
const p = t.sequences?.[d.sequenceId];
|
|
2215
2228
|
return p ? { ...p, ...d } : (console.warn(`Interact: Sequence "${d.sequenceId}" not found in config`), d);
|
|
2216
2229
|
}
|
|
2217
|
-
const
|
|
2218
|
-
return
|
|
2219
|
-
}),
|
|
2230
|
+
const m = d;
|
|
2231
|
+
return m.sequenceId || (m.sequenceId = x()), m;
|
|
2232
|
+
}), h = {
|
|
2220
2233
|
...f,
|
|
2221
2234
|
effects: a.length > 0 ? a : void 0,
|
|
2222
2235
|
sequences: u
|
|
2223
2236
|
};
|
|
2224
|
-
s[i].triggers.push(
|
|
2225
|
-
|
|
2237
|
+
s[i].triggers.push(h), s[i].selectors.add(
|
|
2238
|
+
G(h, { useFirstChild: e })
|
|
2226
2239
|
);
|
|
2227
|
-
const g =
|
|
2240
|
+
const g = h.listContainer;
|
|
2228
2241
|
a.forEach((d) => {
|
|
2229
|
-
let
|
|
2230
|
-
if (!
|
|
2242
|
+
let m = d.key;
|
|
2243
|
+
if (!m && d.effectId) {
|
|
2231
2244
|
const w = t.effects[d.effectId];
|
|
2232
|
-
w && (
|
|
2245
|
+
w && (m = w.key);
|
|
2233
2246
|
}
|
|
2234
|
-
d.effectId || (d.effectId =
|
|
2247
|
+
d.effectId || (d.effectId = x()), m = m || i, d.key = m;
|
|
2235
2248
|
const p = d.effectId;
|
|
2236
|
-
if (g && d.listContainer && (
|
|
2249
|
+
if (g && d.listContainer && (m !== i || d.listContainer !== g))
|
|
2237
2250
|
return;
|
|
2238
|
-
const
|
|
2239
|
-
if (d.interactionId =
|
|
2251
|
+
const y = `${i}::${m}::${p}::${o}`;
|
|
2252
|
+
if (d.interactionId = y, s[i].interactionIds.add(y), m === i)
|
|
2240
2253
|
return;
|
|
2241
|
-
const
|
|
2242
|
-
|
|
2254
|
+
const v = ce(s, m);
|
|
2255
|
+
v.effects[y] || (v.effects[y] = [], v.interactionIds.add(y)), v.effects[y].push({ ...f, effect: d }), v.selectors.add(G(d, { useFirstChild: e }));
|
|
2243
2256
|
}), u?.forEach((d) => {
|
|
2244
|
-
if (!d ||
|
|
2245
|
-
const
|
|
2246
|
-
for (const
|
|
2247
|
-
|
|
2248
|
-
let w =
|
|
2249
|
-
if (!w &&
|
|
2250
|
-
const b = t.effects[
|
|
2257
|
+
if (!d || Pe(d)) return;
|
|
2258
|
+
const m = d, p = m.sequenceId || x(), y = m.effects;
|
|
2259
|
+
for (const v of y) {
|
|
2260
|
+
v.effectId || (v.effectId = x());
|
|
2261
|
+
let w = v.key;
|
|
2262
|
+
if (!w && v.effectId) {
|
|
2263
|
+
const b = t.effects[v.effectId];
|
|
2251
2264
|
b && (w = b.key);
|
|
2252
2265
|
}
|
|
2253
2266
|
if (w = w || i, w !== i) {
|
|
2254
2267
|
const b = ce(s, w), S = `${w}::seq::${p}::${o}`;
|
|
2255
2268
|
b.sequences[S] || (b.sequences[S] = [], b.interactionIds.add(S)), b.sequences[S].push({
|
|
2256
2269
|
...f,
|
|
2257
|
-
sequence:
|
|
2258
|
-
}), b.selectors.add(
|
|
2270
|
+
sequence: m
|
|
2271
|
+
}), b.selectors.add(G(v, { useFirstChild: e }));
|
|
2259
2272
|
}
|
|
2260
2273
|
}
|
|
2261
2274
|
});
|
|
@@ -2325,10 +2338,10 @@ function Je(t, e, n, s, r) {
|
|
|
2325
2338
|
}, a = f.key, u = C(c.interactionId, t);
|
|
2326
2339
|
if (i[u] || n.addedInteractions[u] && !r)
|
|
2327
2340
|
return;
|
|
2328
|
-
const
|
|
2329
|
-
if (
|
|
2341
|
+
const h = A(f.conditions || [], n.dataCache.conditions);
|
|
2342
|
+
if (h && n.setupMediaQueryListener(u, h, t, () => {
|
|
2330
2343
|
e.update();
|
|
2331
|
-
}), !
|
|
2344
|
+
}), !h || h.matches) {
|
|
2332
2345
|
i[u] = !0;
|
|
2333
2346
|
const g = a && C(a, t);
|
|
2334
2347
|
let d;
|
|
@@ -2338,7 +2351,7 @@ function Je(t, e, n, s, r) {
|
|
|
2338
2351
|
f.listContainer && d.watchChildList(f.listContainer);
|
|
2339
2352
|
} else
|
|
2340
2353
|
d = e;
|
|
2341
|
-
const [
|
|
2354
|
+
const [m, p] = Xe(
|
|
2342
2355
|
s,
|
|
2343
2356
|
f,
|
|
2344
2357
|
e.element,
|
|
@@ -2347,20 +2360,20 @@ function Je(t, e, n, s, r) {
|
|
|
2347
2360
|
d.useFirstChild,
|
|
2348
2361
|
r
|
|
2349
2362
|
);
|
|
2350
|
-
if (!
|
|
2363
|
+
if (!m || !p)
|
|
2351
2364
|
return;
|
|
2352
2365
|
n.addedInteractions[u] = !0;
|
|
2353
|
-
const
|
|
2366
|
+
const y = g || s.key, v = $(
|
|
2354
2367
|
f.conditions || [],
|
|
2355
2368
|
n.dataCache.conditions
|
|
2356
2369
|
);
|
|
2357
2370
|
o.push([
|
|
2358
|
-
|
|
2371
|
+
y,
|
|
2359
2372
|
s,
|
|
2360
2373
|
f,
|
|
2361
|
-
|
|
2374
|
+
m,
|
|
2362
2375
|
p,
|
|
2363
|
-
|
|
2376
|
+
v,
|
|
2364
2377
|
d.useFirstChild
|
|
2365
2378
|
]);
|
|
2366
2379
|
}
|
|
@@ -2372,37 +2385,37 @@ function cs(t) {
|
|
|
2372
2385
|
return "sequenceId" in t && !("effects" in t);
|
|
2373
2386
|
}
|
|
2374
2387
|
function Ze(t, e, n, s, r, i, o) {
|
|
2375
|
-
const c =
|
|
2388
|
+
const c = A(t.conditions || [], r.dataCache.conditions);
|
|
2376
2389
|
if (c && r.setupMediaQueryListener(e, c, i.updateKey, i.onUpdate), c && !c.matches) return null;
|
|
2377
2390
|
const l = t.effects || [], f = [];
|
|
2378
2391
|
let a = !1;
|
|
2379
2392
|
for (const u of l) {
|
|
2380
|
-
const
|
|
2381
|
-
...
|
|
2393
|
+
const h = u.effectId, d = {
|
|
2394
|
+
...h ? r.dataCache.effects[h] || {} : {},
|
|
2382
2395
|
...u
|
|
2383
|
-
},
|
|
2384
|
-
if (
|
|
2385
|
-
const
|
|
2396
|
+
}, m = A(d.conditions || [], r.dataCache.conditions);
|
|
2397
|
+
if (m) {
|
|
2398
|
+
const T = `${e}::${h || "eff"}`;
|
|
2386
2399
|
r.setupMediaQueryListener(
|
|
2387
|
-
|
|
2388
|
-
|
|
2400
|
+
T,
|
|
2401
|
+
m,
|
|
2389
2402
|
i.updateKey,
|
|
2390
2403
|
i.onUpdate
|
|
2391
2404
|
);
|
|
2392
2405
|
}
|
|
2393
|
-
if (
|
|
2394
|
-
const p = d.key,
|
|
2395
|
-
let
|
|
2396
|
-
if (
|
|
2397
|
-
if (
|
|
2406
|
+
if (m && !m.matches) continue;
|
|
2407
|
+
const p = d.key, y = p && C(p, n);
|
|
2408
|
+
let v;
|
|
2409
|
+
if (y) {
|
|
2410
|
+
if (v = E.getController(y), !v) return null;
|
|
2398
2411
|
} else
|
|
2399
|
-
|
|
2400
|
-
const w =
|
|
2412
|
+
v = s;
|
|
2413
|
+
const w = y || n;
|
|
2401
2414
|
let b;
|
|
2402
2415
|
if (o && w === o.controllerKey && d.listContainer === o.listContainer ? (b = ge(d, o.elements), b.length > 0 && (a = !0)) : b = pe(
|
|
2403
2416
|
d,
|
|
2404
|
-
|
|
2405
|
-
|
|
2417
|
+
v.element,
|
|
2418
|
+
v.useFirstChild
|
|
2406
2419
|
), !b || Array.isArray(b) && b.length === 0) return null;
|
|
2407
2420
|
const S = P(d);
|
|
2408
2421
|
f.push({ target: b, options: S });
|
|
@@ -2430,7 +2443,7 @@ function as(t, e, n, s, r) {
|
|
|
2430
2443
|
o = { ...g, ...i };
|
|
2431
2444
|
} else
|
|
2432
2445
|
o = i;
|
|
2433
|
-
const c = o.sequenceId ||
|
|
2446
|
+
const c = o.sequenceId || x(), l = C(`${t}::seq::${c}`, t);
|
|
2434
2447
|
if (n.addedInteractions[l] && !r) return;
|
|
2435
2448
|
const f = r && s.listContainer ? { controllerKey: t, listContainer: s.listContainer, elements: r } : void 0, a = Ze(
|
|
2436
2449
|
o,
|
|
@@ -2457,18 +2470,18 @@ function as(t, e, n, s, r) {
|
|
|
2457
2470
|
reducedMotion: E.forceReducedMotion
|
|
2458
2471
|
});
|
|
2459
2472
|
n.addedInteractions[l] = !0;
|
|
2460
|
-
const
|
|
2473
|
+
const h = $(
|
|
2461
2474
|
s.conditions || [],
|
|
2462
2475
|
n.dataCache.conditions
|
|
2463
2476
|
);
|
|
2464
|
-
|
|
2477
|
+
_[s.trigger]?.add(
|
|
2465
2478
|
e.element,
|
|
2466
2479
|
e.element,
|
|
2467
|
-
{},
|
|
2480
|
+
{ triggerType: o.triggerType },
|
|
2468
2481
|
s.params || {},
|
|
2469
2482
|
{
|
|
2470
2483
|
reducedMotion: E.forceReducedMotion,
|
|
2471
|
-
selectorCondition:
|
|
2484
|
+
selectorCondition: h,
|
|
2472
2485
|
animation: u,
|
|
2473
2486
|
allowA11yTriggers: E.allowA11yTriggers
|
|
2474
2487
|
}
|
|
@@ -2479,51 +2492,51 @@ function fs(t, e, n, s, r) {
|
|
|
2479
2492
|
const i = n.get(t)?.sequences || {};
|
|
2480
2493
|
Object.keys(i).forEach((c) => {
|
|
2481
2494
|
i[c].some(({ sequence: f, ...a }) => {
|
|
2482
|
-
const u =
|
|
2495
|
+
const u = A(
|
|
2483
2496
|
a.conditions || [],
|
|
2484
2497
|
n.dataCache.conditions
|
|
2485
2498
|
);
|
|
2486
2499
|
if (u && !u.matches)
|
|
2487
2500
|
return !1;
|
|
2488
|
-
const
|
|
2501
|
+
const h = a.key && C(a.key, t), g = E.getController(h);
|
|
2489
2502
|
if (!g)
|
|
2490
2503
|
return !0;
|
|
2491
|
-
const d = f.sequenceId ||
|
|
2492
|
-
if (n.addedInteractions[
|
|
2504
|
+
const d = f.sequenceId || x(), m = C(`${h}::seq::${d}`, h);
|
|
2505
|
+
if (n.addedInteractions[m] && !r)
|
|
2493
2506
|
return !0;
|
|
2494
|
-
const
|
|
2507
|
+
const y = Ze(
|
|
2495
2508
|
f,
|
|
2496
|
-
h,
|
|
2497
2509
|
m,
|
|
2510
|
+
h,
|
|
2498
2511
|
g,
|
|
2499
2512
|
n,
|
|
2500
2513
|
{ updateKey: t, onUpdate: () => e.update() },
|
|
2501
2514
|
r && s ? { controllerKey: t, listContainer: s, elements: r } : void 0
|
|
2502
2515
|
);
|
|
2503
|
-
if (!
|
|
2504
|
-
if (r && n.addedInteractions[
|
|
2516
|
+
if (!y) return !0;
|
|
2517
|
+
if (r && n.addedInteractions[m]) {
|
|
2505
2518
|
const b = et(e, s, r);
|
|
2506
|
-
return E.addToSequence(
|
|
2519
|
+
return E.addToSequence(m, y, b, {
|
|
2507
2520
|
reducedMotion: E.forceReducedMotion
|
|
2508
2521
|
}), !0;
|
|
2509
2522
|
}
|
|
2510
|
-
const
|
|
2523
|
+
const v = E.getSequence(m, f, y, {
|
|
2511
2524
|
reducedMotion: E.forceReducedMotion
|
|
2512
2525
|
});
|
|
2513
|
-
n.addedInteractions[
|
|
2514
|
-
const w =
|
|
2526
|
+
n.addedInteractions[m] = !0;
|
|
2527
|
+
const w = $(
|
|
2515
2528
|
a.conditions || [],
|
|
2516
2529
|
n.dataCache.conditions
|
|
2517
2530
|
);
|
|
2518
|
-
return
|
|
2531
|
+
return _[a.trigger]?.add(
|
|
2519
2532
|
g.element,
|
|
2520
2533
|
g.element,
|
|
2521
|
-
{},
|
|
2534
|
+
{ triggerType: f.triggerType },
|
|
2522
2535
|
a.params || {},
|
|
2523
2536
|
{
|
|
2524
2537
|
reducedMotion: E.forceReducedMotion,
|
|
2525
2538
|
selectorCondition: w,
|
|
2526
|
-
animation:
|
|
2539
|
+
animation: v,
|
|
2527
2540
|
allowA11yTriggers: E.allowA11yTriggers
|
|
2528
2541
|
}
|
|
2529
2542
|
), !0;
|
|
@@ -2537,30 +2550,30 @@ function tt(t, e, n, s, r) {
|
|
|
2537
2550
|
if (n.addedInteractions[u] && !r)
|
|
2538
2551
|
return;
|
|
2539
2552
|
o[a].some(({ effect: g, ...d }) => {
|
|
2540
|
-
const
|
|
2553
|
+
const m = A(
|
|
2541
2554
|
d.conditions || [],
|
|
2542
2555
|
n.dataCache.conditions
|
|
2543
2556
|
);
|
|
2544
|
-
if (
|
|
2557
|
+
if (m && !m.matches)
|
|
2545
2558
|
return !1;
|
|
2546
|
-
const p = g.effectId,
|
|
2559
|
+
const p = g.effectId, y = {
|
|
2547
2560
|
...n.dataCache.effects[p] || {},
|
|
2548
2561
|
...g,
|
|
2549
2562
|
effectId: p
|
|
2550
2563
|
};
|
|
2551
|
-
if (s &&
|
|
2564
|
+
if (s && y.listContainer !== s)
|
|
2552
2565
|
return !1;
|
|
2553
|
-
const
|
|
2554
|
-
if (
|
|
2566
|
+
const v = A(y.conditions || [], n.dataCache.conditions);
|
|
2567
|
+
if (v && n.setupMediaQueryListener(u, v, t, () => {
|
|
2555
2568
|
e.update();
|
|
2556
|
-
}), !
|
|
2569
|
+
}), !v || v.matches) {
|
|
2557
2570
|
const w = d.key && C(d.key, t), b = E.getController(w);
|
|
2558
2571
|
if (!b)
|
|
2559
2572
|
return !0;
|
|
2560
|
-
|
|
2561
|
-
const [S,
|
|
2573
|
+
y.listContainer && e.watchChildList(y.listContainer);
|
|
2574
|
+
const [S, T] = Xe(
|
|
2562
2575
|
d,
|
|
2563
|
-
|
|
2576
|
+
y,
|
|
2564
2577
|
b.element,
|
|
2565
2578
|
b.useFirstChild,
|
|
2566
2579
|
e.element,
|
|
@@ -2568,20 +2581,20 @@ function tt(t, e, n, s, r) {
|
|
|
2568
2581
|
void 0,
|
|
2569
2582
|
r
|
|
2570
2583
|
);
|
|
2571
|
-
if (!S || !
|
|
2584
|
+
if (!S || !T)
|
|
2572
2585
|
return !0;
|
|
2573
2586
|
n.addedInteractions[u] = !0;
|
|
2574
|
-
const
|
|
2575
|
-
|
|
2587
|
+
const F = $(
|
|
2588
|
+
y.conditions || [],
|
|
2576
2589
|
n.dataCache.conditions
|
|
2577
2590
|
);
|
|
2578
2591
|
return l.push([
|
|
2579
2592
|
t,
|
|
2580
2593
|
d,
|
|
2581
|
-
|
|
2594
|
+
y,
|
|
2582
2595
|
S,
|
|
2583
|
-
|
|
2584
|
-
|
|
2596
|
+
T,
|
|
2597
|
+
F,
|
|
2585
2598
|
e.useFirstChild
|
|
2586
2599
|
]), !0;
|
|
2587
2600
|
}
|
|
@@ -2601,7 +2614,7 @@ function Fe(t, e, n, s, r, i, o, c) {
|
|
|
2601
2614
|
effectId: r.effectId,
|
|
2602
2615
|
transition: r.transition,
|
|
2603
2616
|
properties: r.transitionProperties,
|
|
2604
|
-
childSelector:
|
|
2617
|
+
childSelector: G(r, {
|
|
2605
2618
|
asCombinator: !0,
|
|
2606
2619
|
addItemFilter: !0,
|
|
2607
2620
|
useFirstChild: c
|
|
@@ -2612,7 +2625,7 @@ function Fe(t, e, n, s, r, i, o, c) {
|
|
|
2612
2625
|
return;
|
|
2613
2626
|
l.renderStyle(Kt(f));
|
|
2614
2627
|
}
|
|
2615
|
-
|
|
2628
|
+
_[n]?.add(e, s, r, i, {
|
|
2616
2629
|
reducedMotion: E.forceReducedMotion,
|
|
2617
2630
|
targetController: l,
|
|
2618
2631
|
selectorCondition: o,
|
|
@@ -2625,7 +2638,7 @@ function ls(t) {
|
|
|
2625
2638
|
return console.warn(`No instance found for key: ${e}`), E.setController(e, t), !1;
|
|
2626
2639
|
const { triggers: s = [] } = n?.get(e) || {}, r = s.length > 0;
|
|
2627
2640
|
n.setController(e, t), s.forEach((o, c) => {
|
|
2628
|
-
const l =
|
|
2641
|
+
const l = A(o.conditions, n.dataCache.conditions);
|
|
2629
2642
|
if (l) {
|
|
2630
2643
|
const f = `${e}::trigger::${c}`;
|
|
2631
2644
|
n.setupMediaQueryListener(f, l, e, () => {
|
|
@@ -2644,7 +2657,7 @@ function us(t, e, n) {
|
|
|
2644
2657
|
i.forEach((o, c) => {
|
|
2645
2658
|
if (o.listContainer !== e)
|
|
2646
2659
|
return;
|
|
2647
|
-
const l =
|
|
2660
|
+
const l = A(o.conditions, r.dataCache.conditions);
|
|
2648
2661
|
if (l) {
|
|
2649
2662
|
const f = `${s}::listTrigger::${e}::${c}`;
|
|
2650
2663
|
r.setupMediaQueryListener(f, l, s, () => {
|
|
@@ -2664,7 +2677,7 @@ function ds(t, e = !1) {
|
|
|
2664
2677
|
r ? (i = [...t.element.querySelectorAll(r)], t.useFirstChild || i.push(t.element)) : i = [t.element], nt(i), s.deleteController(n, e);
|
|
2665
2678
|
}
|
|
2666
2679
|
function nt(t) {
|
|
2667
|
-
const e = Object.values(
|
|
2680
|
+
const e = Object.values(_);
|
|
2668
2681
|
for (const n of t)
|
|
2669
2682
|
for (const s of e)
|
|
2670
2683
|
s.remove(n);
|
|
@@ -2751,19 +2764,19 @@ class hs {
|
|
|
2751
2764
|
}), nt(r), s && us(this, e, i);
|
|
2752
2765
|
}
|
|
2753
2766
|
}
|
|
2754
|
-
function
|
|
2767
|
+
function gs(t, e) {
|
|
2755
2768
|
new hs(t, e).connect();
|
|
2756
2769
|
}
|
|
2757
|
-
function
|
|
2770
|
+
function vs(t) {
|
|
2758
2771
|
const e = E.getController(t);
|
|
2759
2772
|
e && e.disconnect({ removeFromCache: !0 });
|
|
2760
2773
|
}
|
|
2761
2774
|
const ms = (t, e, n, s) => {
|
|
2762
2775
|
let i = `[data-interact-key="${t.replace(/"/g, "'")}"]`;
|
|
2763
|
-
const o =
|
|
2764
|
-
return o && (i = `${i} ${o}`), n && (i =
|
|
2776
|
+
const o = G(e, { asCombinator: !0, useFirstChild: s });
|
|
2777
|
+
return o && (i = `${i} ${o}`), n && (i = U(i, n)), i;
|
|
2765
2778
|
};
|
|
2766
|
-
function
|
|
2779
|
+
function ys(t, e = !1) {
|
|
2767
2780
|
const n = [], s = /* @__PURE__ */ new Set();
|
|
2768
2781
|
return t.interactions.forEach(
|
|
2769
2782
|
({
|
|
@@ -2772,36 +2785,32 @@ function ws(t, e = !1) {
|
|
|
2772
2785
|
listContainer: o,
|
|
2773
2786
|
listItemSelector: c,
|
|
2774
2787
|
trigger: l,
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
conditions: u
|
|
2788
|
+
effects: f,
|
|
2789
|
+
conditions: a
|
|
2778
2790
|
}) => {
|
|
2779
|
-
|
|
2780
|
-
const g =
|
|
2781
|
-
(!g
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
e
|
|
2803
|
-
);
|
|
2804
|
-
s.has(ie) || (s.add(ie), n.push(`@media (prefers-reduced-motion: no-preference) {
|
|
2791
|
+
l === "viewEnter" && f?.forEach((h) => {
|
|
2792
|
+
const g = h?.effectId && t.effects[h.effectId] || h;
|
|
2793
|
+
if (!(!g.triggerType || g.triggerType === "once")) return;
|
|
2794
|
+
const {
|
|
2795
|
+
key: m,
|
|
2796
|
+
selector: p,
|
|
2797
|
+
listContainer: y,
|
|
2798
|
+
listItemSelector: v,
|
|
2799
|
+
conditions: w
|
|
2800
|
+
} = g;
|
|
2801
|
+
if (!(!m || m === r) || !(!p && !i || p === i) || !(!y && !o || y === o) || !(!v && !c || v === c)) return;
|
|
2802
|
+
const ye = t.conditions || {}, Ee = $(w, ye), se = $(
|
|
2803
|
+
a,
|
|
2804
|
+
ye
|
|
2805
|
+
);
|
|
2806
|
+
if (!(!Ee && !se || Ee === se)) return;
|
|
2807
|
+
const ie = ms(
|
|
2808
|
+
r,
|
|
2809
|
+
g,
|
|
2810
|
+
se,
|
|
2811
|
+
e
|
|
2812
|
+
);
|
|
2813
|
+
s.has(ie) || (s.add(ie), n.push(`@media (prefers-reduced-motion: no-preference) {
|
|
2805
2814
|
${ie}:not([data-interact-enter]) {
|
|
2806
2815
|
visibility: hidden;
|
|
2807
2816
|
transform: none;
|
|
@@ -2810,8 +2819,7 @@ function ws(t, e = !1) {
|
|
|
2810
2819
|
rotate: none;
|
|
2811
2820
|
}
|
|
2812
2821
|
}`));
|
|
2813
|
-
|
|
2814
|
-
}
|
|
2822
|
+
});
|
|
2815
2823
|
}
|
|
2816
2824
|
), n.join(`
|
|
2817
2825
|
`);
|
|
@@ -2819,8 +2827,8 @@ function ws(t, e = !1) {
|
|
|
2819
2827
|
export {
|
|
2820
2828
|
hs as I,
|
|
2821
2829
|
E as a,
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2830
|
+
gs as b,
|
|
2831
|
+
ys as g,
|
|
2832
|
+
vs as r
|
|
2825
2833
|
};
|
|
2826
|
-
//# sourceMappingURL=index-
|
|
2834
|
+
//# sourceMappingURL=index-CJl_iRUI.mjs.map
|