@wix/interact 2.0.4 → 2.1.0
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-BZL18ynN.mjs → index-BP07b-Y1.mjs} +574 -535
- package/dist/index-BP07b-Y1.mjs.map +1 -0
- package/dist/index-D4orAyUu.js +18 -0
- package/dist/index-D4orAyUu.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/core/Interact.d.ts +3 -0
- package/dist/types/core/Interact.d.ts.map +1 -1
- package/dist/types/core/remove.d.ts.map +1 -1
- package/docs/api/types.md +114 -0
- package/docs/examples/README.md +10 -1
- package/docs/examples/list-patterns.md +148 -0
- package/docs/guides/README.md +5 -0
- package/docs/guides/sequences.md +421 -0
- package/package.json +2 -2
- package/rules/click.md +112 -1
- package/rules/full-lean.md +67 -3
- package/rules/hover.md +74 -0
- package/rules/integration.md +70 -1
- package/rules/viewenter.md +93 -163
- package/dist/index-BZL18ynN.mjs.map +0 -1
- package/dist/index-IaOsZpFD.js +0 -18
- package/dist/index-IaOsZpFD.js.map +0 -1
|
@@ -5,11 +5,11 @@ function C(e, t) {
|
|
|
5
5
|
const n = st(t);
|
|
6
6
|
let s = 0;
|
|
7
7
|
return n.length ? e.replace(/\[]/g, () => {
|
|
8
|
-
const
|
|
9
|
-
return
|
|
8
|
+
const r = n[s++];
|
|
9
|
+
return r !== void 0 ? `[${r}]` : "[]";
|
|
10
10
|
}) : e;
|
|
11
11
|
}
|
|
12
|
-
class
|
|
12
|
+
class G {
|
|
13
13
|
animations;
|
|
14
14
|
options;
|
|
15
15
|
ready;
|
|
@@ -38,7 +38,7 @@ class N {
|
|
|
38
38
|
}
|
|
39
39
|
progress(t) {
|
|
40
40
|
for (const n of this.animations) {
|
|
41
|
-
const { delay: s, duration:
|
|
41
|
+
const { delay: s, duration: r, iterations: i } = n.effect.getTiming(), o = (Number.isFinite(r) ? r : 0) * (Number.isFinite(i) ? i : 1);
|
|
42
42
|
n.currentTime = ((s || 0) + o) * t;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -57,8 +57,8 @@ class N {
|
|
|
57
57
|
if (n && !this.isCSS) {
|
|
58
58
|
const s = n.effect?.target;
|
|
59
59
|
if (s) {
|
|
60
|
-
const
|
|
61
|
-
s.dispatchEvent(
|
|
60
|
+
const r = new Event("animationend");
|
|
61
|
+
s.dispatchEvent(r);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
t();
|
|
@@ -74,16 +74,16 @@ class N {
|
|
|
74
74
|
}
|
|
75
75
|
getTimingOptions() {
|
|
76
76
|
return this.animations.map((t) => {
|
|
77
|
-
const n = t.effect?.getTiming(), s = n?.delay ?? 0,
|
|
77
|
+
const n = t.effect?.getTiming(), s = n?.delay ?? 0, r = Number(n?.duration) || 0, i = n?.iterations ?? 1;
|
|
78
78
|
return {
|
|
79
79
|
delay: s,
|
|
80
|
-
duration:
|
|
81
|
-
iterations:
|
|
80
|
+
duration: r,
|
|
81
|
+
iterations: i
|
|
82
82
|
};
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
const Re = (e) => e, it = (e) => 1 - Math.cos(e * Math.PI / 2), rt = (e) => Math.sin(e * Math.PI / 2), ot = (e) => -(Math.cos(Math.PI * e) - 1) / 2, ct = (e) => e ** 2, at = (e) => 1 - (1 - e) ** 2, ft = (e) => e < 0.5 ? 2 * e ** 2 : 1 - (-2 * e + 2) ** 2 / 2, lt = (e) => e ** 3, ut = (e) => 1 - (1 - e) ** 3, dt = (e) => e < 0.5 ? 4 * e ** 3 : 1 - (-2 * e + 2) ** 3 / 2, ht = (e) => e ** 4, mt = (e) => 1 - (1 - e) ** 4, pt = (e) => e < 0.5 ? 8 * e ** 4 : 1 - (-2 * e + 2) ** 4 / 2, gt = (e) => e ** 5, vt = (e) => 1 - (1 - e) ** 5, yt = (e) => e < 0.5 ? 16 * e ** 5 : 1 - (-2 * e + 2) ** 5 / 2, Et = (e) => e === 0 ? 0 : 2 ** (10 * e - 10), wt = (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, St = (e) => 1 - Math.sqrt(1 - e ** 2), It = (e) => Math.sqrt(1 - (e - 1) ** 2), Tt = (e) => e < 0.5 ? (1 - Math.sqrt(1 - 4 * e ** 2)) / 2 : (Math.sqrt(-(2 * e - 3) * (2 * e - 1)) + 1) / 2, Ot = (e) => 2.70158 * e ** 3 - 1.70158 * e ** 2, Ct = (e) => 1 + 2.70158 * (e - 1) ** 3 + 1.70158 * (e - 1) ** 2,
|
|
86
|
+
const Re = (e) => e, it = (e) => 1 - Math.cos(e * Math.PI / 2), rt = (e) => Math.sin(e * Math.PI / 2), ot = (e) => -(Math.cos(Math.PI * e) - 1) / 2, ct = (e) => e ** 2, at = (e) => 1 - (1 - e) ** 2, ft = (e) => e < 0.5 ? 2 * e ** 2 : 1 - (-2 * e + 2) ** 2 / 2, lt = (e) => e ** 3, ut = (e) => 1 - (1 - e) ** 3, dt = (e) => e < 0.5 ? 4 * e ** 3 : 1 - (-2 * e + 2) ** 3 / 2, ht = (e) => e ** 4, mt = (e) => 1 - (1 - e) ** 4, pt = (e) => e < 0.5 ? 8 * e ** 4 : 1 - (-2 * e + 2) ** 4 / 2, gt = (e) => e ** 5, vt = (e) => 1 - (1 - e) ** 5, yt = (e) => e < 0.5 ? 16 * e ** 5 : 1 - (-2 * e + 2) ** 5 / 2, Et = (e) => e === 0 ? 0 : 2 ** (10 * e - 10), wt = (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, St = (e) => 1 - Math.sqrt(1 - e ** 2), It = (e) => Math.sqrt(1 - (e - 1) ** 2), Tt = (e) => e < 0.5 ? (1 - Math.sqrt(1 - 4 * e ** 2)) / 2 : (Math.sqrt(-(2 * e - 3) * (2 * e - 1)) + 1) / 2, Ot = (e) => 2.70158 * e ** 3 - 1.70158 * e ** 2, Ct = (e) => 1 + 2.70158 * (e - 1) ** 3 + 1.70158 * (e - 1) ** 2, kt = (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, we = {
|
|
87
87
|
linear: Re,
|
|
88
88
|
sineIn: it,
|
|
89
89
|
sineOut: rt,
|
|
@@ -108,7 +108,7 @@ const Re = (e) => e, it = (e) => 1 - Math.cos(e * Math.PI / 2), rt = (e) => Math
|
|
|
108
108
|
circInOut: Tt,
|
|
109
109
|
backIn: Ot,
|
|
110
110
|
backOut: Ct,
|
|
111
|
-
backInOut:
|
|
111
|
+
backInOut: kt
|
|
112
112
|
}, be = {
|
|
113
113
|
linear: "linear",
|
|
114
114
|
ease: "ease",
|
|
@@ -140,22 +140,22 @@ const Re = (e) => e, it = (e) => 1 - Math.cos(e * Math.PI / 2), rt = (e) => Math
|
|
|
140
140
|
backOut: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
|
|
141
141
|
backInOut: "cubic-bezier(0.68, -0.55, 0.265, 1.55)"
|
|
142
142
|
};
|
|
143
|
-
function
|
|
143
|
+
function qt(e) {
|
|
144
144
|
return e === "percentage" ? "%" : e || "px";
|
|
145
145
|
}
|
|
146
146
|
function B(e) {
|
|
147
147
|
return e ? be[e] || e : be.linear;
|
|
148
148
|
}
|
|
149
149
|
function At(e, t, n, s) {
|
|
150
|
-
const
|
|
150
|
+
const r = 3 * e, i = 3 * (n - e) - r, o = 1 - r - i, c = 3 * t, u = 3 * (s - t) - c, f = 1 - c - u, a = (d) => ((o * d + i) * d + r) * d, l = (d) => ((f * d + u) * d + c) * d, m = (d) => (3 * o * d + 2 * i) * d + r;
|
|
151
151
|
function g(d) {
|
|
152
152
|
let h = d;
|
|
153
153
|
for (let v = 0; v < 8; v++) {
|
|
154
|
-
const
|
|
155
|
-
if (Math.abs(
|
|
154
|
+
const w = a(h) - d;
|
|
155
|
+
if (Math.abs(w) < 1e-7) return h;
|
|
156
156
|
const b = m(h);
|
|
157
157
|
if (Math.abs(b) < 1e-6) break;
|
|
158
|
-
h -=
|
|
158
|
+
h -= w / b;
|
|
159
159
|
}
|
|
160
160
|
let p = 0, y = 1;
|
|
161
161
|
for (h = (p + y) / 2; y - p > 1e-7; ) {
|
|
@@ -167,16 +167,16 @@ function At(e, t, n, s) {
|
|
|
167
167
|
}
|
|
168
168
|
return (d) => d <= 0 ? 0 : d >= 1 ? 1 : l(g(d));
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function _t(e) {
|
|
171
171
|
const t = e.match(
|
|
172
172
|
/^cubic-bezier\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*\)$/
|
|
173
173
|
);
|
|
174
174
|
if (!t) return;
|
|
175
|
-
const n = parseFloat(t[1]), s = parseFloat(t[2]),
|
|
176
|
-
if (![n, s,
|
|
177
|
-
return At(n, s,
|
|
175
|
+
const n = parseFloat(t[1]), s = parseFloat(t[2]), r = parseFloat(t[3]), i = parseFloat(t[4]);
|
|
176
|
+
if (![n, s, r, i].some(isNaN))
|
|
177
|
+
return At(n, s, r, i);
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function xt(e) {
|
|
180
180
|
const t = e.match(/^linear\((.+)\)$/);
|
|
181
181
|
if (!t) return;
|
|
182
182
|
const n = t[1].split(",").map((o) => o.trim()).filter(Boolean);
|
|
@@ -196,52 +196,52 @@ function qt(e) {
|
|
|
196
196
|
}
|
|
197
197
|
if (s.length === 0) return;
|
|
198
198
|
s[0].pos === null && (s[0].pos = 0), s[s.length - 1].pos === null && (s[s.length - 1].pos = 1);
|
|
199
|
-
let
|
|
200
|
-
for (;
|
|
201
|
-
if (s[
|
|
202
|
-
const o =
|
|
203
|
-
let c =
|
|
199
|
+
let r = 0;
|
|
200
|
+
for (; r < s.length; )
|
|
201
|
+
if (s[r].pos === null) {
|
|
202
|
+
const o = r - 1;
|
|
203
|
+
let c = r;
|
|
204
204
|
for (; c < s.length && s[c].pos === null; ) c++;
|
|
205
205
|
const u = s[o].pos, f = s[c].pos, a = c - o;
|
|
206
206
|
for (let l = o + 1; l < c; l++)
|
|
207
207
|
s[l].pos = u + (f - u) * (l - o) / a;
|
|
208
|
-
|
|
208
|
+
r = c + 1;
|
|
209
209
|
} else
|
|
210
|
-
|
|
210
|
+
r++;
|
|
211
211
|
for (let o = 1; o < s.length; o++)
|
|
212
212
|
s[o].pos < s[o - 1].pos && (s[o].pos = s[o - 1].pos);
|
|
213
|
-
const
|
|
213
|
+
const i = s;
|
|
214
214
|
return (o) => {
|
|
215
|
-
if (o <=
|
|
216
|
-
const c =
|
|
215
|
+
if (o <= i[0].pos) return i[0].output;
|
|
216
|
+
const c = i[i.length - 1];
|
|
217
217
|
if (o >= c.pos) return c.output;
|
|
218
|
-
let u = 0, f =
|
|
218
|
+
let u = 0, f = i.length - 1;
|
|
219
219
|
for (; u < f - 1; ) {
|
|
220
220
|
const m = u + f >>> 1;
|
|
221
|
-
|
|
221
|
+
i[m].pos <= o ? u = m : f = m;
|
|
222
222
|
}
|
|
223
|
-
const a =
|
|
223
|
+
const a = i[u], l = i[f];
|
|
224
224
|
return l.pos === a.pos ? l.output : a.output + (l.output - a.output) * (o - a.pos) / (l.pos - a.pos);
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
227
|
function ze(e) {
|
|
228
228
|
if (!e) return;
|
|
229
229
|
const t = we[e];
|
|
230
|
-
return t || (
|
|
230
|
+
return t || (_t(e) ?? xt(e) ?? we.linear);
|
|
231
231
|
}
|
|
232
|
-
class
|
|
232
|
+
class Mt extends G {
|
|
233
233
|
animationGroups;
|
|
234
234
|
delay;
|
|
235
235
|
offset;
|
|
236
236
|
offsetEasing;
|
|
237
237
|
timingOptions;
|
|
238
238
|
constructor(t, n = {}) {
|
|
239
|
-
const s = t.flatMap((
|
|
240
|
-
super(s), this.animationGroups = t, this.delay = n.delay ?? 0, this.offset = n.offset ?? 0, this.offsetEasing = typeof n.offsetEasing == "function" ? n.offsetEasing : ze(n.offsetEasing) ?? Re, this.timingOptions = this.animationGroups.map((
|
|
241
|
-
delay:
|
|
239
|
+
const s = t.flatMap((r) => [...r.animations]);
|
|
240
|
+
super(s), this.animationGroups = t, this.delay = n.delay ?? 0, this.offset = n.offset ?? 0, this.offsetEasing = typeof n.offsetEasing == "function" ? n.offsetEasing : ze(n.offsetEasing) ?? Re, this.timingOptions = this.animationGroups.map((r) => r.getTimingOptions().map(({ delay: i, duration: o, iterations: c }) => ({
|
|
241
|
+
delay: i,
|
|
242
242
|
duration: Number.isFinite(o) ? o : 0,
|
|
243
243
|
iterations: Number.isFinite(c) ? c : 1
|
|
244
|
-
}))), this.applyOffsets(), this.ready = Promise.all(t.map((
|
|
244
|
+
}))), this.applyOffsets(), this.ready = Promise.all(t.map((r) => r.ready)).then(() => {
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
247
|
/**
|
|
@@ -255,16 +255,17 @@ class Lt extends N {
|
|
|
255
255
|
const n = t - 1;
|
|
256
256
|
return Array.from(
|
|
257
257
|
{ length: t },
|
|
258
|
-
(s,
|
|
258
|
+
(s, r) => this.offsetEasing(r / n) * n * this.offset | 0
|
|
259
259
|
);
|
|
260
260
|
}
|
|
261
261
|
applyOffsets() {
|
|
262
|
+
if (this.animationGroups.length === 0 || this.animations.length === 0) return;
|
|
262
263
|
const t = this.calculateOffsets(), n = this.getSequenceActiveDuration(t);
|
|
263
|
-
this.animationGroups.forEach((s,
|
|
264
|
-
s.animations.forEach((
|
|
265
|
-
const c =
|
|
264
|
+
this.animationGroups.forEach((s, r) => {
|
|
265
|
+
s.animations.forEach((i, o) => {
|
|
266
|
+
const c = i.effect;
|
|
266
267
|
if (!c) return;
|
|
267
|
-
const { delay: u, duration: f, iterations: a } = this.timingOptions[
|
|
268
|
+
const { delay: u, duration: f, iterations: a } = this.timingOptions[r][o], l = u + t[r], m = n - (l + f * a);
|
|
268
269
|
c.updateTiming({ delay: l + this.delay, endDelay: m });
|
|
269
270
|
});
|
|
270
271
|
});
|
|
@@ -272,12 +273,12 @@ class Lt extends N {
|
|
|
272
273
|
getSequenceActiveDuration(t) {
|
|
273
274
|
const n = [];
|
|
274
275
|
for (let s = 0; s < this.timingOptions.length; s++) {
|
|
275
|
-
const
|
|
276
|
-
if (!o) return
|
|
276
|
+
const r = this.timingOptions[s].reduce((i, o) => {
|
|
277
|
+
if (!o) return i;
|
|
277
278
|
const { delay: c, duration: u, iterations: f } = o;
|
|
278
|
-
return Math.max(
|
|
279
|
+
return Math.max(i, c + u * f);
|
|
279
280
|
}, 0);
|
|
280
|
-
n.push(t[s] +
|
|
281
|
+
n.push(t[s] + r);
|
|
281
282
|
}
|
|
282
283
|
return Math.max(...n);
|
|
283
284
|
}
|
|
@@ -288,16 +289,31 @@ class Lt extends N {
|
|
|
288
289
|
*/
|
|
289
290
|
addGroups(t) {
|
|
290
291
|
if (t.length === 0) return;
|
|
291
|
-
const n = [...t].sort((s,
|
|
292
|
-
for (const { index: s, group:
|
|
293
|
-
const
|
|
294
|
-
this.animationGroups.splice(
|
|
295
|
-
const o = [...
|
|
292
|
+
const n = [...t].sort((s, r) => r.index - s.index);
|
|
293
|
+
for (const { index: s, group: r } of n) {
|
|
294
|
+
const i = Math.min(s, this.animationGroups.length);
|
|
295
|
+
this.animationGroups.splice(i, 0, r), this.timingOptions.splice(i, 0, r.getTimingOptions());
|
|
296
|
+
const o = [...r.animations], c = this.animationGroups.slice(0, i).reduce((u, f) => u + f.animations.length, 0);
|
|
296
297
|
this.animations.splice(c, 0, ...o);
|
|
297
298
|
}
|
|
298
299
|
this.applyOffsets(), this.ready = Promise.all(this.animationGroups.map((s) => s.ready)).then(() => {
|
|
299
300
|
});
|
|
300
301
|
}
|
|
302
|
+
/**
|
|
303
|
+
* Removes AnimationGroups that match the predicate, then recalculates
|
|
304
|
+
* stagger offsets for remaining groups. Cancelled animations in removed
|
|
305
|
+
* groups are returned.
|
|
306
|
+
*/
|
|
307
|
+
removeGroups(t) {
|
|
308
|
+
const n = [], s = [], r = [];
|
|
309
|
+
for (let i = 0; i < this.animationGroups.length; i++)
|
|
310
|
+
t(this.animationGroups[i]) ? n.push(this.animationGroups[i]) : (s.push(this.animationGroups[i]), r.push(this.timingOptions[i]));
|
|
311
|
+
if (n.length === 0) return n;
|
|
312
|
+
for (const i of n)
|
|
313
|
+
i.cancel();
|
|
314
|
+
return this.animationGroups = s, this.timingOptions = r, this.animations = s.flatMap((i) => [...i.animations]), this.applyOffsets(), this.ready = Promise.all(this.animationGroups.map((i) => i.ready)).then(() => {
|
|
315
|
+
}), n;
|
|
316
|
+
}
|
|
301
317
|
async onFinish(t) {
|
|
302
318
|
try {
|
|
303
319
|
await Promise.all(this.animationGroups.map((n) => n.finished)), t();
|
|
@@ -306,18 +322,18 @@ class Lt extends N {
|
|
|
306
322
|
}
|
|
307
323
|
}
|
|
308
324
|
}
|
|
309
|
-
class
|
|
325
|
+
class Lt {
|
|
310
326
|
_animation;
|
|
311
327
|
customEffect;
|
|
312
328
|
progress;
|
|
313
329
|
_tickCbId;
|
|
314
330
|
_finishHandler;
|
|
315
|
-
constructor(t, n, s,
|
|
316
|
-
const
|
|
331
|
+
constructor(t, n, s, r) {
|
|
332
|
+
const i = new KeyframeEffect(n, [], {
|
|
317
333
|
...s,
|
|
318
334
|
composite: "add"
|
|
319
|
-
}), { timeline: o } =
|
|
320
|
-
this._animation = new Animation(
|
|
335
|
+
}), { timeline: o } = r;
|
|
336
|
+
this._animation = new Animation(i, o), this._tickCbId = null, this.progress = null, this.customEffect = (c) => t(i.target, c), this._finishHandler = (c) => {
|
|
321
337
|
this.effect.target?.getAnimations().find((u) => u === this._animation) || this.cancel();
|
|
322
338
|
}, this.addEventListener("finish", this._finishHandler), this.addEventListener("remove", this._finishHandler);
|
|
323
339
|
}
|
|
@@ -446,23 +462,23 @@ class Mt {
|
|
|
446
462
|
return this._animation.dispatchEvent(t);
|
|
447
463
|
}
|
|
448
464
|
}
|
|
449
|
-
function
|
|
465
|
+
function Pt(e) {
|
|
450
466
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
451
467
|
}
|
|
452
468
|
var K = { exports: {} }, Se = K.exports, Ie;
|
|
453
|
-
function
|
|
469
|
+
function $t() {
|
|
454
470
|
return Ie || (Ie = 1, (function(e) {
|
|
455
471
|
(function(t) {
|
|
456
472
|
var n = function() {
|
|
457
473
|
}, s = t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.msRequestAnimationFrame || function(a) {
|
|
458
474
|
return setTimeout(a, 16);
|
|
459
475
|
};
|
|
460
|
-
function
|
|
476
|
+
function r() {
|
|
461
477
|
var a = this;
|
|
462
478
|
a.reads = [], a.writes = [], a.raf = s.bind(t);
|
|
463
479
|
}
|
|
464
|
-
|
|
465
|
-
constructor:
|
|
480
|
+
r.prototype = {
|
|
481
|
+
constructor: r,
|
|
466
482
|
/**
|
|
467
483
|
* We run this inside a try catch
|
|
468
484
|
* so that if any jobs error, we
|
|
@@ -484,7 +500,7 @@ function Pt() {
|
|
|
484
500
|
*/
|
|
485
501
|
measure: function(a, l) {
|
|
486
502
|
var m = l ? a.bind(l) : a;
|
|
487
|
-
return this.reads.push(m),
|
|
503
|
+
return this.reads.push(m), i(this), m;
|
|
488
504
|
},
|
|
489
505
|
/**
|
|
490
506
|
* Adds a job to the
|
|
@@ -497,7 +513,7 @@ function Pt() {
|
|
|
497
513
|
*/
|
|
498
514
|
mutate: function(a, l) {
|
|
499
515
|
var m = l ? a.bind(l) : a;
|
|
500
|
-
return this.writes.push(m),
|
|
516
|
+
return this.writes.push(m), i(this), m;
|
|
501
517
|
},
|
|
502
518
|
/**
|
|
503
519
|
* Clears a scheduled 'read' or 'write' task.
|
|
@@ -553,7 +569,7 @@ function Pt() {
|
|
|
553
569
|
// when tasks throw
|
|
554
570
|
catch: null
|
|
555
571
|
};
|
|
556
|
-
function
|
|
572
|
+
function i(a) {
|
|
557
573
|
a.scheduled || (a.scheduled = !0, a.raf(o.bind(null, a)));
|
|
558
574
|
}
|
|
559
575
|
function o(a) {
|
|
@@ -563,7 +579,7 @@ function Pt() {
|
|
|
563
579
|
} catch (d) {
|
|
564
580
|
g = d;
|
|
565
581
|
}
|
|
566
|
-
if (a.scheduled = !1, (m.length || l.length) &&
|
|
582
|
+
if (a.scheduled = !1, (m.length || l.length) && i(a), g)
|
|
567
583
|
if (n("task errored", g.message), a.catch) a.catch(g);
|
|
568
584
|
else throw g;
|
|
569
585
|
}
|
|
@@ -575,13 +591,13 @@ function Pt() {
|
|
|
575
591
|
for (var m in l)
|
|
576
592
|
l.hasOwnProperty(m) && (a[m] = l[m]);
|
|
577
593
|
}
|
|
578
|
-
var f = t.fastdom = t.fastdom || new
|
|
594
|
+
var f = t.fastdom = t.fastdom || new r();
|
|
579
595
|
e.exports = f;
|
|
580
596
|
})(typeof window < "u" ? window : typeof Se < "u" ? Se : globalThis);
|
|
581
597
|
})(K)), K.exports;
|
|
582
598
|
}
|
|
583
|
-
var Ft =
|
|
584
|
-
const I = /* @__PURE__ */
|
|
599
|
+
var Ft = $t();
|
|
600
|
+
const I = /* @__PURE__ */ Pt(Ft), fe = {};
|
|
585
601
|
function Rt(e) {
|
|
586
602
|
Object.assign(fe, e);
|
|
587
603
|
}
|
|
@@ -590,23 +606,23 @@ function zt(e) {
|
|
|
590
606
|
`${e} not found in registry. Please make sure to import and register the preset.`
|
|
591
607
|
), null);
|
|
592
608
|
}
|
|
593
|
-
function
|
|
609
|
+
function M(e, t) {
|
|
594
610
|
return e ? document.getElementById(e) : null;
|
|
595
611
|
}
|
|
596
612
|
function Ht(e, t) {
|
|
597
613
|
return e?.matches(`[data-motion-part~="${t}"]`) ? e : e?.querySelector(`[data-motion-part~="${t}"]`);
|
|
598
614
|
}
|
|
599
|
-
function
|
|
615
|
+
function Gt(e) {
|
|
600
616
|
const t = e.alternate ? "alternate" : "";
|
|
601
617
|
return e.reversed ? `${t ? `${t}-` : ""}reverse` : t || "normal";
|
|
602
618
|
}
|
|
603
619
|
function re(e) {
|
|
604
|
-
return `${e.value}${
|
|
620
|
+
return `${e.value}${qt(e.unit)}`;
|
|
605
621
|
}
|
|
606
622
|
function Te(e, t, n) {
|
|
607
623
|
return `${e.name || "cover"} ${n && e.offset.unit !== "percentage" ? `calc(100% + ${re(e.offset)}${t ? ` + ${t}` : ""})` : t ? `calc(${re(e.offset)} + ${t})` : re(e.offset)}`;
|
|
608
624
|
}
|
|
609
|
-
function
|
|
625
|
+
function Nt(e) {
|
|
610
626
|
return {
|
|
611
627
|
start: Te(e.startOffset, e.startOffsetAdd),
|
|
612
628
|
end: Te(e.endOffset, e.endOffsetAdd, !0)
|
|
@@ -615,7 +631,7 @@ function Dt(e) {
|
|
|
615
631
|
function He(e) {
|
|
616
632
|
return (t) => I.measure(() => t(e));
|
|
617
633
|
}
|
|
618
|
-
function
|
|
634
|
+
function Ge(e) {
|
|
619
635
|
return (t) => I.mutate(() => t(e));
|
|
620
636
|
}
|
|
621
637
|
function Z(e) {
|
|
@@ -624,51 +640,51 @@ function Z(e) {
|
|
|
624
640
|
return typeof t == "string" ? zt(t) : null;
|
|
625
641
|
} else if (e.keyframeEffect) {
|
|
626
642
|
const t = (s) => {
|
|
627
|
-
const { name:
|
|
628
|
-
return [{ ...s, name:
|
|
643
|
+
const { name: r, keyframes: i } = s.keyframeEffect;
|
|
644
|
+
return [{ ...s, name: r, keyframes: i }];
|
|
629
645
|
};
|
|
630
646
|
return { web: t, style: t, getNames: (s) => {
|
|
631
|
-
const { effectId:
|
|
647
|
+
const { effectId: r } = s, { name: i } = s.keyframeEffect, o = i || r;
|
|
632
648
|
return o ? [o] : [];
|
|
633
649
|
} };
|
|
634
650
|
} else if (e.customEffect)
|
|
635
651
|
return (t) => [{ ...t, keyframes: [] }];
|
|
636
652
|
return null;
|
|
637
653
|
}
|
|
638
|
-
function
|
|
639
|
-
return e.map((s,
|
|
640
|
-
const
|
|
654
|
+
function Dt(e, t, n) {
|
|
655
|
+
return e.map((s, r) => {
|
|
656
|
+
const i = {
|
|
641
657
|
fill: s.fill,
|
|
642
658
|
easing: B(s.easing),
|
|
643
659
|
iterations: s.iterations === 0 ? 1 / 0 : s.iterations || 1,
|
|
644
660
|
composite: s.composite,
|
|
645
|
-
direction:
|
|
661
|
+
direction: Gt(s)
|
|
646
662
|
};
|
|
647
|
-
return
|
|
663
|
+
return Ne(t) ? (i.duration = s.duration, i.delay = s.delay || 0) : window.ViewTimeline && t?.trigger === "view-progress" ? i.duration = "auto" : (i.duration = 99.99, i.delay = 0.01), {
|
|
648
664
|
effect: s,
|
|
649
|
-
options:
|
|
650
|
-
id: n && `${n}-${
|
|
665
|
+
options: i,
|
|
666
|
+
id: n && `${n}-${r + 1}`,
|
|
651
667
|
part: s.part
|
|
652
668
|
};
|
|
653
669
|
});
|
|
654
670
|
}
|
|
655
|
-
function
|
|
671
|
+
function Ne(e) {
|
|
656
672
|
return !e || e.trigger !== "pointer-move" && e.trigger !== "view-progress";
|
|
657
673
|
}
|
|
658
|
-
function Oe(e, t, n, s,
|
|
674
|
+
function Oe(e, t, n, s, r) {
|
|
659
675
|
if (e) {
|
|
660
|
-
if (
|
|
676
|
+
if (Ne(s) && (t.duration = t.duration || 1, r?.reducedMotion))
|
|
661
677
|
if (t.iterations === 1 || t.iterations == null)
|
|
662
678
|
t = { ...t, duration: 1 };
|
|
663
679
|
else
|
|
664
680
|
return [];
|
|
665
|
-
let
|
|
666
|
-
return n instanceof HTMLElement && (
|
|
681
|
+
let i;
|
|
682
|
+
return n instanceof HTMLElement && (i = { measure: He(n), mutate: Ge(n) }), e.web ? e.web(t, i, r) : e(t, i, r);
|
|
667
683
|
}
|
|
668
684
|
return [];
|
|
669
685
|
}
|
|
670
|
-
function ve(e, t, n, s,
|
|
671
|
-
const
|
|
686
|
+
function ve(e, t, n, s, r) {
|
|
687
|
+
const i = e instanceof HTMLElement ? e : M(e);
|
|
672
688
|
if (n?.trigger === "pointer-move" && !t.keyframeEffect) {
|
|
673
689
|
let m = t;
|
|
674
690
|
t.customEffect && (m = {
|
|
@@ -680,33 +696,33 @@ function ve(e, t, n, s, i) {
|
|
|
680
696
|
), d = Oe(
|
|
681
697
|
g,
|
|
682
698
|
t,
|
|
683
|
-
|
|
699
|
+
i,
|
|
684
700
|
n,
|
|
685
701
|
s
|
|
686
702
|
);
|
|
687
|
-
return typeof d != "function" ? null : d(
|
|
703
|
+
return typeof d != "function" ? null : d(i);
|
|
688
704
|
}
|
|
689
705
|
const o = Z(t), c = Oe(
|
|
690
706
|
o,
|
|
691
707
|
t,
|
|
692
|
-
|
|
708
|
+
i,
|
|
693
709
|
n,
|
|
694
710
|
s
|
|
695
711
|
);
|
|
696
712
|
if (!c || c.length === 0)
|
|
697
713
|
return null;
|
|
698
|
-
const u =
|
|
714
|
+
const u = Dt(c, n, t.effectId);
|
|
699
715
|
let f;
|
|
700
716
|
const a = n?.trigger === "view-progress";
|
|
701
717
|
a && window.ViewTimeline && (f = new ViewTimeline({
|
|
702
|
-
subject: n.element ||
|
|
718
|
+
subject: n.element || M(n.componentId)
|
|
703
719
|
}));
|
|
704
720
|
const l = u.map(({ effect: m, options: g, id: d, part: h }) => {
|
|
705
|
-
const p = h ? Ht(
|
|
721
|
+
const p = h ? Ht(i, h) : i, y = new KeyframeEffect(p || null, [], g);
|
|
706
722
|
I.mutate(() => {
|
|
707
723
|
"timing" in m && y.updateTiming(m.timing), y.setKeyframes(m.keyframes);
|
|
708
724
|
});
|
|
709
|
-
const v = a && f ? { timeline: f } : {},
|
|
725
|
+
const v = a && f ? { timeline: f } : {}, w = typeof m.customEffect == "function" ? new Lt(
|
|
710
726
|
m.customEffect,
|
|
711
727
|
p || null,
|
|
712
728
|
g,
|
|
@@ -715,30 +731,30 @@ function ve(e, t, n, s, i) {
|
|
|
715
731
|
if (a)
|
|
716
732
|
if (f)
|
|
717
733
|
I.mutate(() => {
|
|
718
|
-
const { start: b, end: S } =
|
|
719
|
-
|
|
734
|
+
const { start: b, end: S } = Nt(m);
|
|
735
|
+
w.rangeStart = b, w.rangeEnd = S, w.play();
|
|
720
736
|
});
|
|
721
737
|
else {
|
|
722
738
|
const { startOffset: b, endOffset: S } = t;
|
|
723
739
|
I.mutate(() => {
|
|
724
|
-
const T = m.startOffset || b,
|
|
725
|
-
Object.assign(
|
|
740
|
+
const T = m.startOffset || b, $ = m.endOffset || S;
|
|
741
|
+
Object.assign(w, {
|
|
726
742
|
start: {
|
|
727
743
|
name: T.name,
|
|
728
744
|
offset: T.offset?.value,
|
|
729
745
|
add: m.startOffsetAdd
|
|
730
746
|
},
|
|
731
747
|
end: {
|
|
732
|
-
name:
|
|
733
|
-
offset:
|
|
748
|
+
name: $.name,
|
|
749
|
+
offset: $.offset?.value,
|
|
734
750
|
add: m.endOffsetAdd
|
|
735
751
|
}
|
|
736
752
|
});
|
|
737
753
|
});
|
|
738
754
|
}
|
|
739
|
-
return d && (
|
|
755
|
+
return d && (w.id = d), w;
|
|
740
756
|
});
|
|
741
|
-
return new
|
|
757
|
+
return new G(l, {
|
|
742
758
|
...t,
|
|
743
759
|
trigger: { ...n || {} },
|
|
744
760
|
// make sure the group is ready after all animation targets are measured and mutated
|
|
@@ -746,40 +762,40 @@ function ve(e, t, n, s, i) {
|
|
|
746
762
|
});
|
|
747
763
|
}
|
|
748
764
|
function Vt(e, t, n) {
|
|
749
|
-
const s = Z(t),
|
|
750
|
-
if (s && s.prepare &&
|
|
751
|
-
const
|
|
752
|
-
s.prepare(t,
|
|
765
|
+
const s = Z(t), r = e instanceof HTMLElement ? e : M(e);
|
|
766
|
+
if (s && s.prepare && r) {
|
|
767
|
+
const i = { measure: He(r), mutate: Ge(r) };
|
|
768
|
+
s.prepare(t, i);
|
|
753
769
|
}
|
|
754
770
|
n && I.mutate(n);
|
|
755
771
|
}
|
|
756
|
-
function
|
|
772
|
+
function Wt(e, t) {
|
|
757
773
|
const n = Z(t);
|
|
758
774
|
if (!n)
|
|
759
775
|
return null;
|
|
760
776
|
if (!n.style)
|
|
761
|
-
return t.effectId && e ?
|
|
762
|
-
const s = n.getNames(t),
|
|
777
|
+
return t.effectId && e ? jt(e, t.effectId) : null;
|
|
778
|
+
const s = n.getNames(t), i = (typeof e == "string" ? M(e) : e)?.getAnimations(), o = i?.map((u) => u.animationName) || [], c = [];
|
|
763
779
|
return s.forEach((u) => {
|
|
764
780
|
o.includes(u) && c.push(
|
|
765
|
-
|
|
781
|
+
i?.find((f) => f.animationName === u)
|
|
766
782
|
);
|
|
767
|
-
}), c?.length ? new
|
|
783
|
+
}), c?.length ? new G(c) : null;
|
|
768
784
|
}
|
|
769
|
-
function
|
|
770
|
-
const s = (typeof e == "string" ?
|
|
771
|
-
const
|
|
772
|
-
return
|
|
785
|
+
function jt(e, t) {
|
|
786
|
+
const s = (typeof e == "string" ? M(e) : e)?.getAnimations().filter((r) => {
|
|
787
|
+
const i = r.id || r.animationName;
|
|
788
|
+
return i ? i.startsWith(t) : !0;
|
|
773
789
|
});
|
|
774
|
-
return s?.length ? new
|
|
790
|
+
return s?.length ? new G(s) : null;
|
|
775
791
|
}
|
|
776
|
-
function
|
|
777
|
-
const { disabled:
|
|
792
|
+
function De(e, t, n, s = {}) {
|
|
793
|
+
const { disabled: r, allowActiveEvent: i, ...o } = s, c = ve(e, t, n, o);
|
|
778
794
|
if (!c)
|
|
779
795
|
return null;
|
|
780
796
|
let u = {};
|
|
781
797
|
if (n.trigger === "view-progress" && !window.ViewTimeline) {
|
|
782
|
-
const f = n.element ||
|
|
798
|
+
const f = n.element || M(n.componentId), { ready: a } = c;
|
|
783
799
|
return c.animations.map((l) => ({
|
|
784
800
|
/* we use getters for start and end in order to access the animation's start and end
|
|
785
801
|
only when initializing the scrub scene rather than immediately */
|
|
@@ -798,7 +814,7 @@ function Ge(e, t, n, s = {}) {
|
|
|
798
814
|
const { activeDuration: d } = l.effect.getComputedTiming(), { delay: h } = l.effect.getTiming();
|
|
799
815
|
l.currentTime = ((h || 0) + (d || 0)) * g;
|
|
800
816
|
},
|
|
801
|
-
disabled:
|
|
817
|
+
disabled: r,
|
|
802
818
|
destroy() {
|
|
803
819
|
l.cancel();
|
|
804
820
|
}
|
|
@@ -819,7 +835,7 @@ function Ge(e, t, n, s = {}) {
|
|
|
819
835
|
const v = g === "x" ? y.x : y.y;
|
|
820
836
|
this._currentProgress = v, d.progress(v);
|
|
821
837
|
},
|
|
822
|
-
disabled:
|
|
838
|
+
disabled: r ?? !1,
|
|
823
839
|
destroy() {
|
|
824
840
|
d.cancel();
|
|
825
841
|
}
|
|
@@ -827,7 +843,7 @@ function Ge(e, t, n, s = {}) {
|
|
|
827
843
|
}
|
|
828
844
|
u = {
|
|
829
845
|
centeredToTarget: a,
|
|
830
|
-
allowActiveEvent:
|
|
846
|
+
allowActiveEvent: i
|
|
831
847
|
}, t.customEffect && l && (u.transitionDuration = l, u.transitionEasing = ze(m)), u.target = c.target;
|
|
832
848
|
}
|
|
833
849
|
return {
|
|
@@ -845,45 +861,45 @@ function Ge(e, t, n, s = {}) {
|
|
|
845
861
|
} : a
|
|
846
862
|
);
|
|
847
863
|
},
|
|
848
|
-
disabled:
|
|
864
|
+
disabled: r,
|
|
849
865
|
destroy() {
|
|
850
866
|
c.cancel();
|
|
851
867
|
}
|
|
852
868
|
};
|
|
853
869
|
}
|
|
854
870
|
function ne(e, t, n, s = !1) {
|
|
855
|
-
const
|
|
856
|
-
return
|
|
857
|
-
Vt(e, t,
|
|
858
|
-
}),
|
|
871
|
+
const r = Wt(e, t);
|
|
872
|
+
return r ? (r.ready = new Promise((i) => {
|
|
873
|
+
Vt(e, t, i);
|
|
874
|
+
}), r) : ve(e, t, n, { reducedMotion: s });
|
|
859
875
|
}
|
|
860
876
|
function Yt(e) {
|
|
861
877
|
return e === null ? [null] : typeof e == "string" ? Array.from(document.querySelectorAll(e)) : Array.isArray(e) ? e : [e];
|
|
862
878
|
}
|
|
863
879
|
function Ve(e, t) {
|
|
864
880
|
const n = [];
|
|
865
|
-
for (const { target: s, options:
|
|
866
|
-
const
|
|
867
|
-
for (const o of
|
|
881
|
+
for (const { target: s, options: r } of e) {
|
|
882
|
+
const i = Yt(s);
|
|
883
|
+
for (const o of i) {
|
|
868
884
|
const c = ne(
|
|
869
885
|
o,
|
|
870
|
-
|
|
886
|
+
r,
|
|
871
887
|
void 0,
|
|
872
888
|
t?.reducedMotion
|
|
873
889
|
);
|
|
874
|
-
c instanceof
|
|
890
|
+
c instanceof G && n.push(c);
|
|
875
891
|
}
|
|
876
892
|
}
|
|
877
893
|
return n;
|
|
878
894
|
}
|
|
879
895
|
function Bt(e, t, n) {
|
|
880
896
|
const s = Ve(t, n);
|
|
881
|
-
return new
|
|
897
|
+
return new Mt(s, e);
|
|
882
898
|
}
|
|
883
899
|
function Q(e, t) {
|
|
884
900
|
return t.includes("&") ? t.replace(/&/g, e) : `${e}${t}`;
|
|
885
901
|
}
|
|
886
|
-
function
|
|
902
|
+
function _() {
|
|
887
903
|
return "wi-12343210".replace(
|
|
888
904
|
/\d/g,
|
|
889
905
|
(e) => String.fromCharCode(
|
|
@@ -897,8 +913,8 @@ function Kt({
|
|
|
897
913
|
effectId: t,
|
|
898
914
|
transition: n,
|
|
899
915
|
properties: s,
|
|
900
|
-
childSelector:
|
|
901
|
-
selectorCondition:
|
|
916
|
+
childSelector: r = "> :first-child",
|
|
917
|
+
selectorCondition: i
|
|
902
918
|
}) {
|
|
903
919
|
let o = [];
|
|
904
920
|
if (n?.styleProperties) {
|
|
@@ -917,7 +933,7 @@ function Kt({
|
|
|
917
933
|
o = s?.filter((d) => d.duration).map(
|
|
918
934
|
(d) => `${d.name} ${d.duration}ms ${B(d.easing) || "ease"}${d.delay ? ` ${d.delay}ms` : ""}`
|
|
919
935
|
) || [];
|
|
920
|
-
const c = s?.map((d) => `${d.name}: ${d.value};`) || [], u = e.replace(/"/g, "'"), f = `:is(:state(${t}), :--${t}) ${
|
|
936
|
+
const c = s?.map((d) => `${d.name}: ${d.value};`) || [], u = e.replace(/"/g, "'"), f = `:is(:state(${t}), :--${t}) ${r}`, a = `[data-interact-effect~="${t}"] ${r}`, l = i ? Q(f, i) : f, m = i ? Q(a, i) : a, g = [
|
|
921
937
|
`${l},
|
|
922
938
|
${m} {
|
|
923
939
|
${c.join(`
|
|
@@ -925,49 +941,49 @@ function Kt({
|
|
|
925
941
|
}`
|
|
926
942
|
];
|
|
927
943
|
if (o.length) {
|
|
928
|
-
const d = `[data-interact-key="${u}"] ${
|
|
944
|
+
const d = `[data-interact-key="${u}"] ${r}`, h = i ? Q(d, i) : d;
|
|
929
945
|
g.push(`@media (prefers-reduced-motion: no-preference) { ${h} {
|
|
930
946
|
transition: ${o.join(", ")};
|
|
931
947
|
} }`);
|
|
932
948
|
}
|
|
933
949
|
return g;
|
|
934
950
|
}
|
|
935
|
-
function
|
|
936
|
-
const n = (e || []).filter((
|
|
951
|
+
function k(e, t) {
|
|
952
|
+
const n = (e || []).filter((i) => t[i]?.type === "media" && t[i].predicate).map((i) => t[i].predicate).join(") and ("), s = n && `(${n})`;
|
|
937
953
|
return s && window.matchMedia(s);
|
|
938
954
|
}
|
|
939
|
-
function
|
|
955
|
+
function L(e, t) {
|
|
940
956
|
for (const n of e || []) {
|
|
941
957
|
const s = t[n];
|
|
942
958
|
if (s?.type === "selector" && s.predicate)
|
|
943
959
|
return s.predicate;
|
|
944
960
|
}
|
|
945
961
|
}
|
|
946
|
-
const
|
|
962
|
+
const D = {
|
|
947
963
|
rangeStart: { name: "cover", offset: { value: 0, unit: "percentage" } },
|
|
948
964
|
rangeEnd: { name: "cover", offset: { value: 100, unit: "percentage" } }
|
|
949
965
|
};
|
|
950
966
|
function Qt(e, t) {
|
|
951
|
-
const n = e?.name ??
|
|
967
|
+
const n = e?.name ?? D.rangeStart.name, s = t?.name ?? e?.name ?? D.rangeEnd.name, r = {
|
|
952
968
|
name: n,
|
|
953
|
-
offset: e?.offset ||
|
|
954
|
-
},
|
|
969
|
+
offset: e?.offset || D.rangeStart.offset
|
|
970
|
+
}, i = {
|
|
955
971
|
name: s,
|
|
956
|
-
offset: t?.offset ||
|
|
972
|
+
offset: t?.offset || D.rangeEnd.offset
|
|
957
973
|
};
|
|
958
|
-
return { startOffset:
|
|
974
|
+
return { startOffset: r, endOffset: i };
|
|
959
975
|
}
|
|
960
|
-
function
|
|
976
|
+
function P(e) {
|
|
961
977
|
if ("keyframeEffect" in e && !e.keyframeEffect.name && "effectId" in e && (e.keyframeEffect.name = e.effectId), "duration" in e)
|
|
962
978
|
return {
|
|
963
979
|
id: "",
|
|
964
980
|
...e
|
|
965
981
|
};
|
|
966
|
-
const { rangeStart: t, rangeEnd: n, ...s } = e, { startOffset:
|
|
982
|
+
const { rangeStart: t, rangeEnd: n, ...s } = e, { startOffset: r, endOffset: i } = Qt(t, n);
|
|
967
983
|
return {
|
|
968
984
|
id: "",
|
|
969
|
-
startOffset:
|
|
970
|
-
endOffset:
|
|
985
|
+
startOffset: r,
|
|
986
|
+
endOffset: i,
|
|
971
987
|
...s
|
|
972
988
|
};
|
|
973
989
|
}
|
|
@@ -975,11 +991,11 @@ function O(e, t, n) {
|
|
|
975
991
|
let s = e.get(t);
|
|
976
992
|
s || (s = /* @__PURE__ */ new Set(), e.set(t, s)), s.add(n);
|
|
977
993
|
}
|
|
978
|
-
function
|
|
994
|
+
function N(e, t) {
|
|
979
995
|
e.get(t)?.forEach((s) => {
|
|
980
|
-
const { source:
|
|
996
|
+
const { source: r, target: i, cleanup: o } = s;
|
|
981
997
|
o();
|
|
982
|
-
const c =
|
|
998
|
+
const c = r === t ? i : r;
|
|
983
999
|
e.get(c)?.delete(s);
|
|
984
1000
|
}), e.delete(t);
|
|
985
1001
|
}
|
|
@@ -992,20 +1008,20 @@ const Xt = {
|
|
|
992
1008
|
rootMargin: "0px",
|
|
993
1009
|
threshold: [0]
|
|
994
1010
|
}, z = {}, ee = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakSet(), U = /* @__PURE__ */ new WeakMap();
|
|
995
|
-
let
|
|
1011
|
+
let We = {}, F = null;
|
|
996
1012
|
function Jt(e) {
|
|
997
|
-
|
|
1013
|
+
We = e;
|
|
998
1014
|
}
|
|
999
|
-
function
|
|
1000
|
-
ee.get(e)?.forEach(({ source: s, handler:
|
|
1001
|
-
s === e &&
|
|
1015
|
+
function je(e, t) {
|
|
1016
|
+
ee.get(e)?.forEach(({ source: s, handler: r }) => {
|
|
1017
|
+
s === e && r(t);
|
|
1002
1018
|
});
|
|
1003
1019
|
}
|
|
1004
1020
|
function Ce() {
|
|
1005
1021
|
return F || (F = new IntersectionObserver((e) => {
|
|
1006
1022
|
e.forEach((t) => {
|
|
1007
1023
|
const n = t.target;
|
|
1008
|
-
t.isIntersecting ||
|
|
1024
|
+
t.isIntersecting || je(n, !1);
|
|
1009
1025
|
});
|
|
1010
1026
|
}, Ut), F);
|
|
1011
1027
|
}
|
|
@@ -1017,8 +1033,8 @@ function Ye(e, t = !1) {
|
|
|
1017
1033
|
root: null,
|
|
1018
1034
|
rootMargin: e.inset ? `${e.inset} 0px ${e.inset}` : "0px",
|
|
1019
1035
|
threshold: e.threshold
|
|
1020
|
-
},
|
|
1021
|
-
|
|
1036
|
+
}, r = new IntersectionObserver((i) => {
|
|
1037
|
+
i.forEach((o) => {
|
|
1022
1038
|
const c = o.target, u = !X.has(c);
|
|
1023
1039
|
if (u && (X.add(c), e.useSafeViewEnter && !o.isIntersecting)) {
|
|
1024
1040
|
I.measure(() => {
|
|
@@ -1027,7 +1043,7 @@ function Ye(e, t = !1) {
|
|
|
1027
1043
|
return;
|
|
1028
1044
|
const m = Array.isArray(e.threshold) ? Math.min(...e.threshold) : e.threshold;
|
|
1029
1045
|
m && a * m > l && I.mutate(() => {
|
|
1030
|
-
|
|
1046
|
+
r.unobserve(c);
|
|
1031
1047
|
const d = Ye(e, !0);
|
|
1032
1048
|
U.set(c, d), d.observe(c);
|
|
1033
1049
|
});
|
|
@@ -1035,17 +1051,17 @@ function Ye(e, t = !1) {
|
|
|
1035
1051
|
return;
|
|
1036
1052
|
}
|
|
1037
1053
|
const f = e.type || "once";
|
|
1038
|
-
(o.isIntersecting || f === "alternate" && !u) && (
|
|
1054
|
+
(o.isIntersecting || f === "alternate" && !u) && (je(c, o.isIntersecting), f === "once" && (r.unobserve(o.target), X.delete(c)));
|
|
1039
1055
|
});
|
|
1040
1056
|
}, s);
|
|
1041
|
-
return z[n] =
|
|
1057
|
+
return z[n] = r, r;
|
|
1042
1058
|
}
|
|
1043
|
-
function Zt(e, t, n, s = {}, { reducedMotion:
|
|
1044
|
-
const c = { ...
|
|
1059
|
+
function Zt(e, t, n, s = {}, { reducedMotion: r, selectorCondition: i, animation: o } = {}) {
|
|
1060
|
+
const c = { ...We, ...s }, u = c.type || "once", f = o || ne(
|
|
1045
1061
|
t,
|
|
1046
|
-
|
|
1062
|
+
P(n),
|
|
1047
1063
|
void 0,
|
|
1048
|
-
|
|
1064
|
+
r
|
|
1049
1065
|
);
|
|
1050
1066
|
if (!f)
|
|
1051
1067
|
return;
|
|
@@ -1053,7 +1069,7 @@ function Zt(e, t, n, s = {}, { reducedMotion: i, selectorCondition: r, animation
|
|
|
1053
1069
|
u !== "once" && f.persist?.();
|
|
1054
1070
|
let l = !0;
|
|
1055
1071
|
const d = { source: e, target: t, handler: (h) => {
|
|
1056
|
-
|
|
1072
|
+
i && !t.matches(i) || (u === "once" ? h && f.play(() => {
|
|
1057
1073
|
const p = () => {
|
|
1058
1074
|
t.dataset.interactEnter = "start";
|
|
1059
1075
|
};
|
|
@@ -1071,12 +1087,12 @@ function Zt(e, t, n, s = {}, { reducedMotion: i, selectorCondition: r, animation
|
|
|
1071
1087
|
O(ee, e, d), O(ee, t, d), U.set(e, a), a.observe(e), (u === "repeat" || u === "state") && Ce().observe(e);
|
|
1072
1088
|
}
|
|
1073
1089
|
function en(e) {
|
|
1074
|
-
|
|
1090
|
+
N(ee, e);
|
|
1075
1091
|
}
|
|
1076
1092
|
function tn() {
|
|
1077
1093
|
F = null, Object.keys(z).forEach((e) => delete z[e]);
|
|
1078
1094
|
}
|
|
1079
|
-
const
|
|
1095
|
+
const ke = {
|
|
1080
1096
|
add: Zt,
|
|
1081
1097
|
remove: en,
|
|
1082
1098
|
setOptions: Jt,
|
|
@@ -1086,15 +1102,15 @@ function Be(e, t) {
|
|
|
1086
1102
|
return Object.assign(Object.create(t), e);
|
|
1087
1103
|
}
|
|
1088
1104
|
function nn(e, t, n, s) {
|
|
1089
|
-
let
|
|
1105
|
+
let r = e * (1 - n) + t * n;
|
|
1090
1106
|
if (s) {
|
|
1091
|
-
const
|
|
1092
|
-
Math.abs(
|
|
1093
|
-
const o = t -
|
|
1107
|
+
const i = r - e;
|
|
1108
|
+
Math.abs(i) < s && (r = e + s * Math.sign(i));
|
|
1109
|
+
const o = t - r;
|
|
1094
1110
|
if (Math.abs(o) < s)
|
|
1095
1111
|
return t;
|
|
1096
1112
|
}
|
|
1097
|
-
return
|
|
1113
|
+
return r;
|
|
1098
1114
|
}
|
|
1099
1115
|
function sn(e) {
|
|
1100
1116
|
let t = !1;
|
|
@@ -1104,7 +1120,7 @@ function sn(e) {
|
|
|
1104
1120
|
}));
|
|
1105
1121
|
};
|
|
1106
1122
|
}
|
|
1107
|
-
function
|
|
1123
|
+
function qe(e, t) {
|
|
1108
1124
|
let n = 0;
|
|
1109
1125
|
return function() {
|
|
1110
1126
|
n && window.clearTimeout(n), n = window.setTimeout(() => {
|
|
@@ -1120,30 +1136,30 @@ function te(e, t) {
|
|
|
1120
1136
|
return e ? /^-?\d+px$/.test(e) ? parseInt(e) : /^-?\d+[lsd]?vh$/.test(e) ? parseInt(e) * t.viewportHeight / 100 : /^-?\d+[lsd]?vw$/.test(e) ? parseInt(e) * t.viewportWidth / 100 : /^calc\s*\(\s*-?\d+((px)|([lsd]?vh)|([lsd]?vw))\s*\+\s*-?\d+((px)|([lsd]?vh)|([lsd]?vw))\s*\)\s*$/.test(e) ? rn(e, t) : parseInt(e) || 0 : 0;
|
|
1121
1137
|
}
|
|
1122
1138
|
function A(e, t, n) {
|
|
1123
|
-
const { name: s, offset:
|
|
1139
|
+
const { name: s, offset: r = 0 } = e, { start: i, end: o } = n, c = o - i, u = r / 100;
|
|
1124
1140
|
let f, a;
|
|
1125
|
-
return s === "entry" ? (f =
|
|
1141
|
+
return s === "entry" ? (f = i - t, a = Math.min(t, c)) : s === "entry-crossing" ? (f = i - t, a = c) : s === "contain" ? (f = Math.min(o - t, i), a = Math.abs(t - c)) : s === "exit" ? (f = Math.max(i, o - t), a = Math.min(t, c)) : s === "exit-crossing" ? (f = i, a = c) : s === "cover" && (f = i - t, a = c + t), f + u * a | 0;
|
|
1126
1142
|
}
|
|
1127
|
-
function oe(e, t, n, s,
|
|
1128
|
-
let
|
|
1143
|
+
function oe(e, t, n, s, r) {
|
|
1144
|
+
let i = 0;
|
|
1129
1145
|
const o = { start: t, end: n };
|
|
1130
1146
|
return e.forEach((c, u) => {
|
|
1131
|
-
|
|
1147
|
+
i += c.offset;
|
|
1132
1148
|
const f = c.sticky;
|
|
1133
1149
|
if (f) {
|
|
1134
1150
|
if ("end" in f && e[u - 1]?.element) {
|
|
1135
|
-
const m = ((
|
|
1151
|
+
const m = ((r ? c.element.offsetWidth : c.element.offsetHeight) || 0) + f.end - s, g = i + m - c.offset, d = g < o.start, h = !d && g <= n;
|
|
1136
1152
|
let p = 0;
|
|
1137
1153
|
(d || h) && (p = c.offset, o.end += p), d && (o.start += p);
|
|
1138
1154
|
}
|
|
1139
1155
|
if ("start" in f) {
|
|
1140
|
-
const a =
|
|
1156
|
+
const a = i - f.start, l = a < o.start, m = !l && a <= o.end;
|
|
1141
1157
|
let g = 0;
|
|
1142
1158
|
const d = e[u - 1]?.element;
|
|
1143
1159
|
if (d) {
|
|
1144
1160
|
if (l || m) {
|
|
1145
|
-
const h = (
|
|
1146
|
-
g = h - (p + y),
|
|
1161
|
+
const h = (r ? d.offsetWidth : d.offsetHeight) || 0, p = c.offset, y = (r ? c.element.offsetWidth : c.element.offsetHeight) || 0;
|
|
1162
|
+
g = h - (p + y), i += g, o.end += g;
|
|
1147
1163
|
}
|
|
1148
1164
|
l && (o.start += g);
|
|
1149
1165
|
}
|
|
@@ -1151,22 +1167,22 @@ function oe(e, t, n, s, i) {
|
|
|
1151
1167
|
}
|
|
1152
1168
|
}), o;
|
|
1153
1169
|
}
|
|
1154
|
-
function on(e, t, n, s,
|
|
1170
|
+
function on(e, t, n, s, r, i) {
|
|
1155
1171
|
const { start: o, end: c, duration: u } = e;
|
|
1156
1172
|
let f = o, a = c, l = e.startRange, m = e.endRange, g;
|
|
1157
1173
|
if (typeof u == "string") {
|
|
1158
1174
|
l = { name: u, offset: 0 }, m = { name: u, offset: 100 }, f = A(l, n, t), a = A(m, n, t), g = a - f;
|
|
1159
|
-
const d = oe(
|
|
1175
|
+
const d = oe(i, f, a, n, s);
|
|
1160
1176
|
f = d.start, a = d.end;
|
|
1161
1177
|
} else {
|
|
1162
1178
|
if (l || o?.name) {
|
|
1163
1179
|
l = l || o;
|
|
1164
|
-
const d = te(l.add,
|
|
1180
|
+
const d = te(l.add, r), h = A({ ...l, offset: 0 }, n, t), p = A({ ...l, offset: 100 }, n, t), y = oe(i, h, p, n, s);
|
|
1165
1181
|
f = y.start + l.offset / 100 * (y.end - y.start) + d;
|
|
1166
1182
|
}
|
|
1167
1183
|
if (m || c?.name) {
|
|
1168
1184
|
m = m || c;
|
|
1169
|
-
const d = te(m.add,
|
|
1185
|
+
const d = te(m.add, r), h = A({ ...m, offset: 0 }, n, t), p = A({ ...m, offset: 100 }, n, t), y = oe(i, h, p, n, s);
|
|
1170
1186
|
a = y.start + m.offset / 100 * (y.end - y.start) + d;
|
|
1171
1187
|
} else typeof u == "number" && (a = f + u);
|
|
1172
1188
|
}
|
|
@@ -1191,12 +1207,12 @@ function un(e, t, n) {
|
|
|
1191
1207
|
}
|
|
1192
1208
|
function dn(e, t) {
|
|
1193
1209
|
let n;
|
|
1194
|
-
const s = fn(e, t),
|
|
1195
|
-
return (
|
|
1210
|
+
const s = fn(e, t), r = ln(e, t), i = !isNaN(s), o = !isNaN(r);
|
|
1211
|
+
return (i || o) && (n = {}, i && (n.start = s), o && (n.end = r)), n;
|
|
1196
1212
|
}
|
|
1197
|
-
function V(e, t, n, s,
|
|
1198
|
-
const
|
|
1199
|
-
let c = (s ?
|
|
1213
|
+
function V(e, t, n, s, r) {
|
|
1214
|
+
const i = e[0].viewSource, o = [];
|
|
1215
|
+
let c = (s ? i.offsetWidth : i.offsetHeight) || 0, u = 0, f = i;
|
|
1200
1216
|
for (; f; ) {
|
|
1201
1217
|
const l = window.getComputedStyle(f), m = cn(l), g = m ? dn(l, s) : void 0, d = un(f, s, m);
|
|
1202
1218
|
if ((!g || !("end" in g)) && (u += d), o.push({ element: f, offset: d, sticky: g }), f = f.offsetParent, an(l, f, t))
|
|
@@ -1212,7 +1228,7 @@ function V(e, t, n, s, i) {
|
|
|
1212
1228
|
{ start: u, end: u + c },
|
|
1213
1229
|
n,
|
|
1214
1230
|
s,
|
|
1215
|
-
|
|
1231
|
+
r,
|
|
1216
1232
|
o
|
|
1217
1233
|
)
|
|
1218
1234
|
}));
|
|
@@ -1226,10 +1242,10 @@ const Ae = 100, hn = {
|
|
|
1226
1242
|
observeContentResize: !1
|
|
1227
1243
|
};
|
|
1228
1244
|
function mn(e, t, n, s) {
|
|
1229
|
-
let
|
|
1230
|
-
return e >= t && e <= n ?
|
|
1245
|
+
let r = 0;
|
|
1246
|
+
return e >= t && e <= n ? r = s ? (e - t) / s : 1 : e > n && (r = 1), r;
|
|
1231
1247
|
}
|
|
1232
|
-
function
|
|
1248
|
+
function _e(e, t) {
|
|
1233
1249
|
return e === window ? t ? window.document.documentElement.clientWidth : window.document.documentElement.clientHeight : t ? e.clientWidth : e.clientHeight;
|
|
1234
1250
|
}
|
|
1235
1251
|
function pn() {
|
|
@@ -1239,8 +1255,8 @@ function pn() {
|
|
|
1239
1255
|
};
|
|
1240
1256
|
}
|
|
1241
1257
|
function gn(e) {
|
|
1242
|
-
const t = Be(e, hn), n = t.root, s = t.horizontal,
|
|
1243
|
-
let
|
|
1258
|
+
const t = Be(e, hn), n = t.root, s = t.horizontal, r = /* @__PURE__ */ new WeakMap();
|
|
1259
|
+
let i = _e(n, s), o, c, u, f, a;
|
|
1244
1260
|
const l = [], m = pn();
|
|
1245
1261
|
if (t.scenes = Object.values(
|
|
1246
1262
|
// TODO(ameerf): find a polyfill and use groupBy instead of following reduce
|
|
@@ -1251,7 +1267,7 @@ function gn(e) {
|
|
|
1251
1267
|
},
|
|
1252
1268
|
{}
|
|
1253
1269
|
)
|
|
1254
|
-
).flatMap((h) => (h.every((p) => p.viewSource && (typeof p.duration == "string" || p.start?.name)) ? (h = V(h, n,
|
|
1270
|
+
).flatMap((h) => (h.every((p) => p.viewSource && (typeof p.duration == "string" || p.start?.name)) ? (h = V(h, n, i, s, m), (t.observeSourcesResize || t.observeContentResize) && l.push(h)) : h.forEach((p) => {
|
|
1255
1271
|
p.end == null && (p.end = p.start + p.duration), p.duration == null && (p.duration = p.end - p.start);
|
|
1256
1272
|
}), h)), t.scenes.forEach((h, p) => {
|
|
1257
1273
|
h.index = p;
|
|
@@ -1259,29 +1275,29 @@ function gn(e) {
|
|
|
1259
1275
|
const h = /* @__PURE__ */ new Map();
|
|
1260
1276
|
window.ResizeObserver && (u = new window.ResizeObserver(function(p) {
|
|
1261
1277
|
p.forEach((y) => {
|
|
1262
|
-
const v = h.get(y.target),
|
|
1263
|
-
|
|
1264
|
-
t.scenes[b.index] =
|
|
1265
|
-
}), l.splice(l.indexOf(v), 1,
|
|
1278
|
+
const v = h.get(y.target), w = V(v, n, i, s, m);
|
|
1279
|
+
w.forEach((b, S) => {
|
|
1280
|
+
t.scenes[b.index] = w[S];
|
|
1281
|
+
}), l.splice(l.indexOf(v), 1, w);
|
|
1266
1282
|
});
|
|
1267
1283
|
}), l.forEach((p) => {
|
|
1268
1284
|
u.observe(p[0].viewSource, { box: "border-box" }), h.set(p[0].viewSource, p);
|
|
1269
|
-
}), t.observeContentResize && t.contentRoot && new window.ResizeObserver(
|
|
1285
|
+
}), t.observeContentResize && t.contentRoot && new window.ResizeObserver(qe(() => {
|
|
1270
1286
|
const y = l.map((v) => {
|
|
1271
|
-
const
|
|
1272
|
-
return
|
|
1273
|
-
t.scenes[b.index] =
|
|
1274
|
-
}),
|
|
1287
|
+
const w = V(v, n, i, s, m);
|
|
1288
|
+
return w.forEach((b, S) => {
|
|
1289
|
+
t.scenes[b.index] = w[S];
|
|
1290
|
+
}), w;
|
|
1275
1291
|
});
|
|
1276
1292
|
l.length = 0, l.push(...y), l.forEach((v) => {
|
|
1277
1293
|
h.set(v[0].viewSource, v);
|
|
1278
1294
|
});
|
|
1279
|
-
}, Ae)).observe(t.contentRoot, { box: "border-box" })), t.observeViewportResize && (f =
|
|
1280
|
-
|
|
1295
|
+
}, Ae)).observe(t.contentRoot, { box: "border-box" })), t.observeViewportResize && (f = qe(function() {
|
|
1296
|
+
i = _e(n, s);
|
|
1281
1297
|
const p = l.map((y) => {
|
|
1282
|
-
const v = V(y, n,
|
|
1283
|
-
return v.forEach((
|
|
1284
|
-
t.scenes[
|
|
1298
|
+
const v = V(y, n, i, s, m);
|
|
1299
|
+
return v.forEach((w, b) => {
|
|
1300
|
+
t.scenes[w.index] = v[b];
|
|
1285
1301
|
}), v;
|
|
1286
1302
|
});
|
|
1287
1303
|
l.length = 0, l.push(...p), l.forEach((y) => {
|
|
@@ -1291,7 +1307,7 @@ function gn(e) {
|
|
|
1291
1307
|
}
|
|
1292
1308
|
t.observeViewportEntry && window.IntersectionObserver && (c = new window.IntersectionObserver(function(h) {
|
|
1293
1309
|
h.forEach((p) => {
|
|
1294
|
-
(
|
|
1310
|
+
(r.get(p.target) || []).forEach((y) => {
|
|
1295
1311
|
y.disabled = !p.isIntersecting;
|
|
1296
1312
|
});
|
|
1297
1313
|
});
|
|
@@ -1301,8 +1317,8 @@ function gn(e) {
|
|
|
1301
1317
|
threshold: 0
|
|
1302
1318
|
}), t.scenes.forEach((h) => {
|
|
1303
1319
|
if (h.viewSource) {
|
|
1304
|
-
let p =
|
|
1305
|
-
p || (p = [],
|
|
1320
|
+
let p = r.get(h.viewSource);
|
|
1321
|
+
p || (p = [], r.set(h.viewSource, p), c.observe(h.viewSource)), p.push(h);
|
|
1306
1322
|
}
|
|
1307
1323
|
}));
|
|
1308
1324
|
function g({ p: h, vp: p }) {
|
|
@@ -1311,7 +1327,7 @@ function gn(e) {
|
|
|
1311
1327
|
if (h !== o) {
|
|
1312
1328
|
for (let v of t.scenes)
|
|
1313
1329
|
if (!v.disabled) {
|
|
1314
|
-
const { start:
|
|
1330
|
+
const { start: w, end: b, duration: S } = v, T = mn(h, w, b, S);
|
|
1315
1331
|
v.effect(v, T, y);
|
|
1316
1332
|
}
|
|
1317
1333
|
o = h;
|
|
@@ -1371,8 +1387,8 @@ class yn {
|
|
|
1371
1387
|
* @param {number} [scrollPosition.y]
|
|
1372
1388
|
*/
|
|
1373
1389
|
resetProgress(t = {}) {
|
|
1374
|
-
const n = this.config.root, s = t.x || t.x === 0 ? t.x : n.scrollX || n.scrollLeft || 0,
|
|
1375
|
-
this.progress.p =
|
|
1390
|
+
const n = this.config.root, s = t.x || t.x === 0 ? t.x : n.scrollX || n.scrollLeft || 0, r = t.y || t.y === 0 ? t.y : n.scrollY || n.scrollTop || 0, i = this.config.horizontal ? s : r;
|
|
1391
|
+
this.progress.p = i, this.progress.prevP = i, this.progress.vp = 0, this.config.transitionActive && (this.currentProgress.p = i, this.currentProgress.prevP = i, this.currentProgress.vp = 0), t && this.config.root.scrollTo(s, r);
|
|
1376
1392
|
}
|
|
1377
1393
|
/**
|
|
1378
1394
|
* Handle animation frame work.
|
|
@@ -1384,8 +1400,8 @@ class yn {
|
|
|
1384
1400
|
n && this.lerp();
|
|
1385
1401
|
const s = n ? this.currentProgress : this.progress;
|
|
1386
1402
|
if (this.config.velocityActive) {
|
|
1387
|
-
const
|
|
1388
|
-
s.vp = Math.min(this.config.velocityMax, Math.abs(
|
|
1403
|
+
const r = s.p - s.prevP, i = r < 0 ? -1 : 1;
|
|
1404
|
+
s.vp = Math.min(this.config.velocityMax, Math.abs(r)) / this.config.velocityMax * i;
|
|
1389
1405
|
}
|
|
1390
1406
|
this.effect.tick(s), n && s.p !== this.progress.p && (t && this._lerpFrameId && window.cancelAnimationFrame(this._lerpFrameId), this._lerpFrameId = window.requestAnimationFrame(() => this.tick())), s.prevP = s.p;
|
|
1391
1407
|
}
|
|
@@ -1431,23 +1447,23 @@ let Ke = () => ({});
|
|
|
1431
1447
|
function En(e) {
|
|
1432
1448
|
Ke = e;
|
|
1433
1449
|
}
|
|
1434
|
-
function wn(e, t, n, s, { reducedMotion:
|
|
1435
|
-
if (
|
|
1450
|
+
function wn(e, t, n, s, { reducedMotion: r }) {
|
|
1451
|
+
if (r)
|
|
1436
1452
|
return;
|
|
1437
|
-
const
|
|
1453
|
+
const i = {
|
|
1438
1454
|
trigger: "view-progress",
|
|
1439
1455
|
element: e
|
|
1440
|
-
}, o =
|
|
1456
|
+
}, o = P(n);
|
|
1441
1457
|
let c;
|
|
1442
1458
|
if ("ViewTimeline" in window) {
|
|
1443
|
-
const f = ve(t, o,
|
|
1459
|
+
const f = ve(t, o, i);
|
|
1444
1460
|
f && (f.play(), c = () => {
|
|
1445
1461
|
f.ready.then(() => {
|
|
1446
1462
|
f.cancel();
|
|
1447
1463
|
});
|
|
1448
1464
|
});
|
|
1449
1465
|
} else {
|
|
1450
|
-
const f =
|
|
1466
|
+
const f = De(t, o, i);
|
|
1451
1467
|
if (f) {
|
|
1452
1468
|
const a = Array.isArray(f) ? f : [f], l = new yn({
|
|
1453
1469
|
viewSource: e,
|
|
@@ -1472,17 +1488,17 @@ function wn(e, t, n, s, { reducedMotion: i }) {
|
|
|
1472
1488
|
O(le, e, u), O(le, t, u);
|
|
1473
1489
|
}
|
|
1474
1490
|
function bn(e) {
|
|
1475
|
-
|
|
1491
|
+
N(le, e);
|
|
1476
1492
|
}
|
|
1477
1493
|
const Sn = {
|
|
1478
1494
|
add: wn,
|
|
1479
1495
|
remove: bn,
|
|
1480
1496
|
registerOptionsGetter: En
|
|
1481
1497
|
};
|
|
1482
|
-
function
|
|
1498
|
+
function xe(e, t, n) {
|
|
1483
1499
|
return Math.min(Math.max(e, n), t);
|
|
1484
1500
|
}
|
|
1485
|
-
function
|
|
1501
|
+
function Me(e) {
|
|
1486
1502
|
let t = !1;
|
|
1487
1503
|
return function() {
|
|
1488
1504
|
if (!t)
|
|
@@ -1521,7 +1537,7 @@ function On() {
|
|
|
1521
1537
|
return new Promise((e) => {
|
|
1522
1538
|
const t = window.scrollY;
|
|
1523
1539
|
let n = !1, s;
|
|
1524
|
-
function
|
|
1540
|
+
function r() {
|
|
1525
1541
|
document.body.addEventListener("pointerdown", (c) => {
|
|
1526
1542
|
s === void 0 ? s = c.offsetY : n = c.offsetY === s;
|
|
1527
1543
|
}, { once: !0 });
|
|
@@ -1530,10 +1546,10 @@ function On() {
|
|
|
1530
1546
|
});
|
|
1531
1547
|
document.body.dispatchEvent(o);
|
|
1532
1548
|
}
|
|
1533
|
-
function
|
|
1534
|
-
window.scrollY !== t && (window.removeEventListener("scroll",
|
|
1549
|
+
function i() {
|
|
1550
|
+
window.scrollY !== t && (window.removeEventListener("scroll", i), r(), e(n));
|
|
1535
1551
|
}
|
|
1536
|
-
|
|
1552
|
+
r(), window.addEventListener("scroll", i), window.scrollY > 0 && window.scrollBy(0, -1);
|
|
1537
1553
|
});
|
|
1538
1554
|
}
|
|
1539
1555
|
function Cn(e) {
|
|
@@ -1541,9 +1557,9 @@ function Cn(e) {
|
|
|
1541
1557
|
e.fixRequired = t, t && (window.addEventListener("scroll", e.scrollHandler), e.scrollHandler());
|
|
1542
1558
|
});
|
|
1543
1559
|
}
|
|
1544
|
-
let
|
|
1560
|
+
let W = 0;
|
|
1545
1561
|
const J = /* @__PURE__ */ new Set();
|
|
1546
|
-
function
|
|
1562
|
+
function kn() {
|
|
1547
1563
|
const e = (n) => {
|
|
1548
1564
|
for (let s of n.changedTouches)
|
|
1549
1565
|
J.add(s.identifier);
|
|
@@ -1555,41 +1571,41 @@ function _n() {
|
|
|
1555
1571
|
J.clear(), document.removeEventListener("touchstart", e), document.removeEventListener("touchend", t);
|
|
1556
1572
|
};
|
|
1557
1573
|
}
|
|
1558
|
-
function
|
|
1574
|
+
function qn(e, t) {
|
|
1559
1575
|
if ("onscrollend" in window)
|
|
1560
1576
|
return e.addEventListener("scrollend", t), function() {
|
|
1561
1577
|
e.removeEventListener("scrollend", t);
|
|
1562
1578
|
};
|
|
1563
1579
|
let n = 0, s;
|
|
1564
|
-
|
|
1565
|
-
function i
|
|
1580
|
+
W || (s = kn()), W += 1;
|
|
1581
|
+
function r(i) {
|
|
1566
1582
|
clearTimeout(n), n = setTimeout(() => {
|
|
1567
|
-
J.size ? setTimeout(
|
|
1583
|
+
J.size ? setTimeout(r, 100) : (t(i), n = 0);
|
|
1568
1584
|
}, 100);
|
|
1569
1585
|
}
|
|
1570
|
-
return e.addEventListener("scroll",
|
|
1571
|
-
e.removeEventListener("scroll",
|
|
1586
|
+
return e.addEventListener("scroll", r), function() {
|
|
1587
|
+
e.removeEventListener("scroll", r), W -= 1, W || s();
|
|
1572
1588
|
};
|
|
1573
1589
|
}
|
|
1574
1590
|
function An(e, t, n) {
|
|
1575
1591
|
return {
|
|
1576
1592
|
x(s) {
|
|
1577
|
-
const
|
|
1593
|
+
const r = e.left - n.x + e.width / 2, i = r >= t.width / 2, o = (i ? r : t.width - r) * 2, c = i ? 0 : r - o / 2;
|
|
1578
1594
|
return (s - c) / o;
|
|
1579
1595
|
},
|
|
1580
1596
|
y(s) {
|
|
1581
|
-
const
|
|
1597
|
+
const r = e.top - n.y + e.height / 2, i = r >= t.height / 2, o = (i ? r : t.height - r) * 2, c = i ? 0 : r - o / 2;
|
|
1582
1598
|
return (s - c) / o;
|
|
1583
1599
|
}
|
|
1584
1600
|
};
|
|
1585
1601
|
}
|
|
1586
|
-
function
|
|
1602
|
+
function _n(e, t) {
|
|
1587
1603
|
this.x = window.scrollX, this.y = window.scrollY, requestAnimationFrame(() => e && e(t));
|
|
1588
1604
|
}
|
|
1589
|
-
function
|
|
1605
|
+
function xn(e) {
|
|
1590
1606
|
e.rect.width = window.document.documentElement.clientWidth, e.rect.height = window.document.documentElement.clientHeight;
|
|
1591
1607
|
}
|
|
1592
|
-
function
|
|
1608
|
+
function Mn(e) {
|
|
1593
1609
|
const t = new ResizeObserver((n) => {
|
|
1594
1610
|
n.forEach((s) => {
|
|
1595
1611
|
e.rect.width = s.borderBoxSize[0].inlineSize, e.rect.height = s.borderBoxSize[0].blockSize;
|
|
@@ -1597,38 +1613,38 @@ function Ln(e) {
|
|
|
1597
1613
|
});
|
|
1598
1614
|
return t.observe(e.root, { box: "border-box" }), t;
|
|
1599
1615
|
}
|
|
1600
|
-
function
|
|
1601
|
-
let t = !1, n = { x: e.rect.width / 2, y: e.rect.height / 2, vx: 0, vy: 0 }, s,
|
|
1616
|
+
function Ln(e) {
|
|
1617
|
+
let t = !1, n = { x: e.rect.width / 2, y: e.rect.height / 2, vx: 0, vy: 0 }, s, r, i, o, c;
|
|
1602
1618
|
const u = { x: 0, y: 0 };
|
|
1603
1619
|
e.scenes.forEach((a) => {
|
|
1604
|
-
a.target && a.centeredToTarget && (a.transform = An(In(a.target), e.rect, u), t = !0), e.root ?
|
|
1620
|
+
a.target && a.centeredToTarget && (a.transform = An(In(a.target), e.rect, u), t = !0), e.root ? r = Mn(e) : (i = xn.bind(null, e), window.addEventListener("resize", i));
|
|
1605
1621
|
}), s = function(a) {
|
|
1606
1622
|
for (let l of e.scenes)
|
|
1607
1623
|
if (!l.disabled) {
|
|
1608
|
-
const m = l.transform?.x(a.x) || a.x / e.rect.width, g = l.transform?.y(a.y) || a.y / e.rect.height, d = +
|
|
1624
|
+
const m = l.transform?.x(a.x) || a.x / e.rect.width, g = l.transform?.y(a.y) || a.y / e.rect.height, d = +xe(0, 1, m).toPrecision(4), h = +xe(0, 1, g).toPrecision(4), p = { x: a.vx, y: a.vy };
|
|
1609
1625
|
e.allowActiveEvent && (a.active = m <= 1 && g <= 1 && m >= 0 && g >= 0), l.effect(l, { x: d, y: h }, p, a.active);
|
|
1610
1626
|
}
|
|
1611
1627
|
Object.assign(n, a);
|
|
1612
|
-
}, t && (o =
|
|
1628
|
+
}, t && (o = _n.bind(u, s, n), c = qn(document, o));
|
|
1613
1629
|
function f() {
|
|
1614
|
-
e.scenes.forEach((a) => a.destroy?.()), c?.(),
|
|
1630
|
+
e.scenes.forEach((a) => a.destroy?.()), c?.(), r ? (r.disconnect(), r = null) : (window.removeEventListener("resize", i), i = null), s = null, n = null;
|
|
1615
1631
|
}
|
|
1616
1632
|
return {
|
|
1617
1633
|
tick: s,
|
|
1618
1634
|
destroy: f
|
|
1619
1635
|
};
|
|
1620
1636
|
}
|
|
1621
|
-
const
|
|
1622
|
-
let
|
|
1623
|
-
function
|
|
1624
|
-
|
|
1637
|
+
const Pn = 1e3 / 60 * 3;
|
|
1638
|
+
let j;
|
|
1639
|
+
function $n() {
|
|
1640
|
+
x.x = window.scrollX, x.y = window.scrollY;
|
|
1625
1641
|
}
|
|
1626
|
-
const
|
|
1642
|
+
const x = { x: 0, y: 0, scrollHandler: $n, fixRequired: void 0 };
|
|
1627
1643
|
class Fn {
|
|
1628
1644
|
constructor(t = {}) {
|
|
1629
1645
|
this.config = { ...t }, this.effect = null, this._nextTick = null, this._nextTransitionTick = null, this._startTime = 0;
|
|
1630
1646
|
let n;
|
|
1631
|
-
this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() :
|
|
1647
|
+
this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() : Me(() => this.transition()) : n = this.config.noThrottle ? () => (this.tick(), null) : Me(() => {
|
|
1632
1648
|
this.tick();
|
|
1633
1649
|
}), this.config.rect = this.config.root ? {
|
|
1634
1650
|
width: this.config.root.offsetWidth,
|
|
@@ -1642,28 +1658,28 @@ class Fn {
|
|
|
1642
1658
|
vx: 0,
|
|
1643
1659
|
vy: 0
|
|
1644
1660
|
}, this.previousProgress = { ...this.progress }, this.currentProgress = null;
|
|
1645
|
-
const s = (
|
|
1646
|
-
const
|
|
1647
|
-
this.progress.vx =
|
|
1661
|
+
const s = (r) => {
|
|
1662
|
+
const i = this.config.root ? r.offsetX : r.x, o = this.config.root ? r.offsetY : r.y;
|
|
1663
|
+
this.progress.vx = i - this.progress.x, this.progress.vy = o - this.progress.y, this.progress.x = i, this.progress.y = o, this._nextTick = n();
|
|
1648
1664
|
};
|
|
1649
1665
|
if (this._pointerLeave = () => {
|
|
1650
1666
|
this.progress.active = !1, this.progress.vx = 0, this.progress.vy = 0, this._nextTick = n();
|
|
1651
1667
|
}, this._pointerEnter = () => {
|
|
1652
1668
|
this.progress.active = !0, this._nextTick = n();
|
|
1653
1669
|
}, this.config.root) {
|
|
1654
|
-
|
|
1655
|
-
const
|
|
1656
|
-
typeof
|
|
1657
|
-
if (
|
|
1670
|
+
j = typeof j == "boolean" ? j : Tn();
|
|
1671
|
+
const r = j ? window.devicePixelRatio : 1;
|
|
1672
|
+
typeof x.fixRequired > "u" && Cn(x), this._measure = (i) => {
|
|
1673
|
+
if (i.target !== this.config.root) {
|
|
1658
1674
|
const o = new PointerEvent("pointermove", {
|
|
1659
1675
|
bubbles: !0,
|
|
1660
1676
|
cancelable: !0,
|
|
1661
|
-
clientX:
|
|
1662
|
-
clientY:
|
|
1677
|
+
clientX: i.x * r + x.x,
|
|
1678
|
+
clientY: i.y * r + x.y
|
|
1663
1679
|
});
|
|
1664
|
-
|
|
1680
|
+
i.stopPropagation(), this.config.root.dispatchEvent(o);
|
|
1665
1681
|
} else
|
|
1666
|
-
s(
|
|
1682
|
+
s(i);
|
|
1667
1683
|
};
|
|
1668
1684
|
} else
|
|
1669
1685
|
this._measure = s;
|
|
@@ -1693,12 +1709,12 @@ class Fn {
|
|
|
1693
1709
|
*/
|
|
1694
1710
|
transition() {
|
|
1695
1711
|
const t = this.config.transitionDuration, n = this.config.transitionEasing || ((o) => o), s = performance.now();
|
|
1696
|
-
let
|
|
1697
|
-
const
|
|
1712
|
+
let r = !1;
|
|
1713
|
+
const i = (o) => {
|
|
1698
1714
|
const c = (o - this._startTime) / t, u = n(Math.min(1, c));
|
|
1699
|
-
|
|
1715
|
+
r && (this.progress.vx = 0, this.progress.vy = 0, r = !1), this.currentProgress = Object.entries(this.progress).reduce((f, [a, l]) => (a === "active" ? f[a] = l : f[a] = this.previousProgress[a] + (l - this.previousProgress[a]) * u, f), this.currentProgress || {}), c < 1 && (this._nextTransitionTick = requestAnimationFrame(i), r = o - this._startTime > Pn), this.effect.tick(this.currentProgress);
|
|
1700
1716
|
};
|
|
1701
|
-
return this._startTime ? (this._nextTransitionTick && cancelAnimationFrame(this._nextTransitionTick), Object.assign(this.previousProgress, this.currentProgress), this._startTime = s,
|
|
1717
|
+
return this._startTime ? (this._nextTransitionTick && cancelAnimationFrame(this._nextTransitionTick), Object.assign(this.previousProgress, this.currentProgress), this._startTime = s, i(s)) : this._startTime = s, this._nextTransitionTick;
|
|
1702
1718
|
}
|
|
1703
1719
|
/**
|
|
1704
1720
|
* Stop the event and effect, and remove all DOM side effects.
|
|
@@ -1725,7 +1741,7 @@ class Fn {
|
|
|
1725
1741
|
* Reset registered effect.
|
|
1726
1742
|
*/
|
|
1727
1743
|
setupEffect() {
|
|
1728
|
-
this.removeEffect(), this.effect =
|
|
1744
|
+
this.removeEffect(), this.effect = Ln(this.config);
|
|
1729
1745
|
}
|
|
1730
1746
|
/**
|
|
1731
1747
|
* Remove registered effect.
|
|
@@ -1739,14 +1755,14 @@ let Qe = () => ({});
|
|
|
1739
1755
|
function Rn(e) {
|
|
1740
1756
|
Qe = e;
|
|
1741
1757
|
}
|
|
1742
|
-
function zn(e, t, n, s = {}, { reducedMotion:
|
|
1743
|
-
if (
|
|
1758
|
+
function zn(e, t, n, s = {}, { reducedMotion: r }) {
|
|
1759
|
+
if (r)
|
|
1744
1760
|
return;
|
|
1745
|
-
const
|
|
1761
|
+
const i = {
|
|
1746
1762
|
trigger: "pointer-move",
|
|
1747
1763
|
element: e,
|
|
1748
1764
|
axis: s.axis ?? "y"
|
|
1749
|
-
}, o =
|
|
1765
|
+
}, o = De(t, P(n), i);
|
|
1750
1766
|
if (o) {
|
|
1751
1767
|
const c = Array.isArray(o) ? o : [o], u = new Fn({
|
|
1752
1768
|
root: s.hitArea === "self" ? e : void 0,
|
|
@@ -1763,40 +1779,40 @@ function zn(e, t, n, s = {}, { reducedMotion: i }) {
|
|
|
1763
1779
|
}
|
|
1764
1780
|
}
|
|
1765
1781
|
function Hn(e) {
|
|
1766
|
-
|
|
1782
|
+
N(ue, e);
|
|
1767
1783
|
}
|
|
1768
|
-
const
|
|
1784
|
+
const Gn = {
|
|
1769
1785
|
add: zn,
|
|
1770
1786
|
remove: Hn,
|
|
1771
1787
|
registerOptionsGetter: Rn
|
|
1772
1788
|
}, de = /* @__PURE__ */ new WeakMap();
|
|
1773
|
-
function
|
|
1789
|
+
function Nn(e, t, n, s, { reducedMotion: r, selectorCondition: i, animation: o }) {
|
|
1774
1790
|
const c = o || ne(
|
|
1775
1791
|
t,
|
|
1776
|
-
|
|
1792
|
+
P(n),
|
|
1777
1793
|
void 0,
|
|
1778
|
-
|
|
1794
|
+
r
|
|
1779
1795
|
);
|
|
1780
1796
|
if (!c)
|
|
1781
1797
|
return;
|
|
1782
1798
|
const u = () => {
|
|
1783
|
-
|
|
1799
|
+
i && !t.matches(i) || c.play();
|
|
1784
1800
|
}, a = { source: e, target: t, cleanup: () => {
|
|
1785
1801
|
c.cancel(), e.removeEventListener("animationend", u);
|
|
1786
1802
|
} };
|
|
1787
1803
|
O(de, e, a), O(de, t, a), e.addEventListener("animationend", u);
|
|
1788
1804
|
}
|
|
1789
|
-
function
|
|
1790
|
-
|
|
1805
|
+
function Dn(e) {
|
|
1806
|
+
N(de, e);
|
|
1791
1807
|
}
|
|
1792
1808
|
const Vn = {
|
|
1793
|
-
add:
|
|
1794
|
-
remove:
|
|
1809
|
+
add: Nn,
|
|
1810
|
+
remove: Dn
|
|
1795
1811
|
};
|
|
1796
|
-
function
|
|
1812
|
+
function Wn(e, t, n, s = !1, r, i, o) {
|
|
1797
1813
|
const c = o || ne(
|
|
1798
1814
|
e,
|
|
1799
|
-
|
|
1815
|
+
P(t),
|
|
1800
1816
|
void 0,
|
|
1801
1817
|
s
|
|
1802
1818
|
);
|
|
@@ -1805,8 +1821,8 @@ function jn(e, t, n, s = !1, i, r, o) {
|
|
|
1805
1821
|
let u = !0;
|
|
1806
1822
|
const f = n.type || "alternate";
|
|
1807
1823
|
return (a) => {
|
|
1808
|
-
if (
|
|
1809
|
-
const l = !
|
|
1824
|
+
if (r && !e.matches(r)) return;
|
|
1825
|
+
const l = !i, m = i?.enter?.includes(a.type), g = i?.leave?.includes(a.type);
|
|
1810
1826
|
if (m || l) {
|
|
1811
1827
|
f === "alternate" || f === "state" ? u ? (u = !1, c.play()) : f === "alternate" ? c.reverse() : f === "state" && (c.playState === "running" ? c.pause() : c.playState !== "finished" && c.play()) : (c.progress(0), delete e.dataset.interactEnter, c.isCSS && c.onFinish(() => {
|
|
1812
1828
|
I.mutate(() => {
|
|
@@ -1820,22 +1836,22 @@ function jn(e, t, n, s = !1, i, r, o) {
|
|
|
1820
1836
|
})) : f === "state" && c.playState === "running" && c.pause());
|
|
1821
1837
|
};
|
|
1822
1838
|
}
|
|
1823
|
-
function
|
|
1839
|
+
function jn(e, t, {
|
|
1824
1840
|
effectId: n,
|
|
1825
1841
|
listContainer: s,
|
|
1826
|
-
listItemSelector:
|
|
1827
|
-
},
|
|
1828
|
-
const u = !!s, f =
|
|
1842
|
+
listItemSelector: r
|
|
1843
|
+
}, i, o, c) {
|
|
1844
|
+
const u = !!s, f = i.method || "toggle", a = f === "toggle";
|
|
1829
1845
|
return (l) => {
|
|
1830
1846
|
if (o && !e.matches(o)) return;
|
|
1831
1847
|
const m = u ? e.closest(
|
|
1832
|
-
`${s} > ${
|
|
1848
|
+
`${s} > ${r || ""}:has(:scope)`
|
|
1833
1849
|
) : void 0, g = !c, d = c?.enter?.includes(l.type), h = c?.leave?.includes(l.type);
|
|
1834
1850
|
g ? t.toggleEffect(n, f, m) : (d && t.toggleEffect(n, a ? "add" : f, m), h && a && t.toggleEffect(n, "remove", m));
|
|
1835
1851
|
};
|
|
1836
1852
|
}
|
|
1837
1853
|
const he = /* @__PURE__ */ new WeakMap();
|
|
1838
|
-
function
|
|
1854
|
+
function Le(e, t) {
|
|
1839
1855
|
return (n) => {
|
|
1840
1856
|
const s = n;
|
|
1841
1857
|
e.contains(s.relatedTarget) || t(s);
|
|
@@ -1854,14 +1870,14 @@ function Bn(e) {
|
|
|
1854
1870
|
};
|
|
1855
1871
|
}
|
|
1856
1872
|
const Kn = {
|
|
1857
|
-
focusin: (e, t) =>
|
|
1858
|
-
focusout: (e, t) =>
|
|
1873
|
+
focusin: (e, t) => Le(e, t),
|
|
1874
|
+
focusout: (e, t) => Le(e, t),
|
|
1859
1875
|
click: (e, t) => Yn(t),
|
|
1860
1876
|
keydown: (e, t) => Bn(t)
|
|
1861
1877
|
};
|
|
1862
1878
|
function Qn(e, t, n) {
|
|
1863
1879
|
const s = Kn[e];
|
|
1864
|
-
return s ? s(t, n) : (
|
|
1880
|
+
return s ? s(t, n) : (r) => n(r);
|
|
1865
1881
|
}
|
|
1866
1882
|
function Xn(e) {
|
|
1867
1883
|
return typeof e == "object" && !Array.isArray(e) && ("enter" in e || "leave" in e);
|
|
@@ -1884,43 +1900,43 @@ function Zn(e) {
|
|
|
1884
1900
|
return Jn(e) ? { enter: e.enter ?? [], leave: e.leave ?? [] } : void 0;
|
|
1885
1901
|
}
|
|
1886
1902
|
function es(e, t, n, s, {
|
|
1887
|
-
reducedMotion:
|
|
1888
|
-
targetController:
|
|
1903
|
+
reducedMotion: r,
|
|
1904
|
+
targetController: i,
|
|
1889
1905
|
selectorCondition: o,
|
|
1890
1906
|
animation: c
|
|
1891
1907
|
}) {
|
|
1892
1908
|
const u = Un(s.eventConfig), f = n.transition || n.transitionProperties, a = Zn(u);
|
|
1893
1909
|
let l, m = !1;
|
|
1894
|
-
if (f ? l =
|
|
1910
|
+
if (f ? l = jn(
|
|
1895
1911
|
t,
|
|
1896
|
-
|
|
1912
|
+
i,
|
|
1897
1913
|
n,
|
|
1898
1914
|
s,
|
|
1899
1915
|
o,
|
|
1900
1916
|
a
|
|
1901
|
-
) : (l =
|
|
1917
|
+
) : (l = Wn(
|
|
1902
1918
|
t,
|
|
1903
1919
|
n,
|
|
1904
1920
|
s,
|
|
1905
|
-
|
|
1921
|
+
r,
|
|
1906
1922
|
o,
|
|
1907
1923
|
a,
|
|
1908
1924
|
c
|
|
1909
1925
|
), m = s.type === "once"), !l)
|
|
1910
1926
|
return;
|
|
1911
1927
|
const g = l, d = new AbortController();
|
|
1912
|
-
function h(v,
|
|
1913
|
-
const S = Qn(
|
|
1914
|
-
v.addEventListener(
|
|
1928
|
+
function h(v, w, b) {
|
|
1929
|
+
const S = Qn(w, e, g);
|
|
1930
|
+
v.addEventListener(w, S, { ...b, signal: d.signal });
|
|
1915
1931
|
}
|
|
1916
1932
|
const y = { source: e, target: t, cleanup: () => {
|
|
1917
1933
|
d.abort();
|
|
1918
1934
|
} };
|
|
1919
1935
|
if (O(he, e, y), O(he, t, y), a) {
|
|
1920
|
-
const v = u.enter,
|
|
1936
|
+
const v = u.enter, w = u.leave;
|
|
1921
1937
|
v.forEach((S) => {
|
|
1922
1938
|
S === "focusin" && (e.tabIndex = 0), h(e, S, { passive: !0, once: m });
|
|
1923
|
-
}), (f ? s.method === "toggle" : s.type !== "once") &&
|
|
1939
|
+
}), (f ? s.method === "toggle" : s.type !== "once") && w.forEach((S) => {
|
|
1924
1940
|
if (S === "focusout") {
|
|
1925
1941
|
h(e, S, { once: m });
|
|
1926
1942
|
return;
|
|
@@ -1928,12 +1944,12 @@ function es(e, t, n, s, {
|
|
|
1928
1944
|
h(e, S, { passive: !0 });
|
|
1929
1945
|
});
|
|
1930
1946
|
} else
|
|
1931
|
-
(u.toggle ?? []).forEach((
|
|
1932
|
-
h(e,
|
|
1947
|
+
(u.toggle ?? []).forEach((w) => {
|
|
1948
|
+
h(e, w, { once: m, passive: w !== "keydown" });
|
|
1933
1949
|
});
|
|
1934
1950
|
}
|
|
1935
1951
|
function ts(e) {
|
|
1936
|
-
|
|
1952
|
+
N(he, e);
|
|
1937
1953
|
}
|
|
1938
1954
|
const R = {
|
|
1939
1955
|
add: es,
|
|
@@ -1946,19 +1962,19 @@ const R = {
|
|
|
1946
1962
|
enter: ["mouseenter", "focusin"],
|
|
1947
1963
|
leave: ["mouseleave", "focusout"]
|
|
1948
1964
|
}
|
|
1949
|
-
},
|
|
1965
|
+
}, Pe = {
|
|
1950
1966
|
click: me.activate,
|
|
1951
1967
|
hover: me.interest
|
|
1952
1968
|
};
|
|
1953
1969
|
function Y(e) {
|
|
1954
1970
|
const t = me[e];
|
|
1955
|
-
return (n, s,
|
|
1956
|
-
const c = o?.allowA11yTriggers && e in
|
|
1957
|
-
R.add(n, s,
|
|
1971
|
+
return (n, s, r, i, o) => {
|
|
1972
|
+
const c = o?.allowA11yTriggers && e in Pe ? Pe[e] : t;
|
|
1973
|
+
R.add(n, s, r, { ...i, eventConfig: c }, o ?? {});
|
|
1958
1974
|
};
|
|
1959
1975
|
}
|
|
1960
|
-
const
|
|
1961
|
-
viewEnter:
|
|
1976
|
+
const q = {
|
|
1977
|
+
viewEnter: ke,
|
|
1962
1978
|
hover: {
|
|
1963
1979
|
add: Y("hover"),
|
|
1964
1980
|
remove: R.remove
|
|
@@ -1967,10 +1983,10 @@ const k = {
|
|
|
1967
1983
|
add: Y("click"),
|
|
1968
1984
|
remove: R.remove
|
|
1969
1985
|
},
|
|
1970
|
-
pageVisible:
|
|
1986
|
+
pageVisible: ke,
|
|
1971
1987
|
animationEnd: Vn,
|
|
1972
1988
|
viewProgress: Sn,
|
|
1973
|
-
pointerMove:
|
|
1989
|
+
pointerMove: Gn,
|
|
1974
1990
|
activate: {
|
|
1975
1991
|
add: Y("activate"),
|
|
1976
1992
|
remove: R.remove
|
|
@@ -1983,7 +1999,7 @@ const k = {
|
|
|
1983
1999
|
function ns(e) {
|
|
1984
2000
|
return e.replace(/\[([-\w]+)]/g, "[]");
|
|
1985
2001
|
}
|
|
1986
|
-
class
|
|
2002
|
+
class E {
|
|
1987
2003
|
static defineInteractElement;
|
|
1988
2004
|
dataCache;
|
|
1989
2005
|
addedInteractions;
|
|
@@ -1995,19 +2011,20 @@ class w {
|
|
|
1995
2011
|
static instances = [];
|
|
1996
2012
|
static controllerCache = /* @__PURE__ */ new Map();
|
|
1997
2013
|
static sequenceCache = /* @__PURE__ */ new Map();
|
|
2014
|
+
static elementSequenceMap = /* @__PURE__ */ new WeakMap();
|
|
1998
2015
|
constructor() {
|
|
1999
2016
|
this.dataCache = { effects: {}, sequences: {}, conditions: {}, interactions: {} }, this.addedInteractions = {}, this.mediaQueryListeners = /* @__PURE__ */ new Map(), this.listInteractionsCache = {}, this.controllers = /* @__PURE__ */ new Set();
|
|
2000
2017
|
}
|
|
2001
2018
|
init(t, n) {
|
|
2002
2019
|
if (typeof window > "u" || !window.customElements)
|
|
2003
2020
|
return;
|
|
2004
|
-
const s = n?.useCutsomElement ?? !!
|
|
2021
|
+
const s = n?.useCutsomElement ?? !!E.defineInteractElement;
|
|
2005
2022
|
this.dataCache = is(t, s);
|
|
2006
|
-
const
|
|
2007
|
-
s &&
|
|
2008
|
-
|
|
2009
|
-
}) :
|
|
2010
|
-
(
|
|
2023
|
+
const r = E.defineInteractElement?.();
|
|
2024
|
+
s && r === !1 ? document.querySelectorAll("interact-element").forEach((i) => {
|
|
2025
|
+
i.connect();
|
|
2026
|
+
}) : E.controllerCache.forEach(
|
|
2027
|
+
(i, o) => i.connect(o)
|
|
2011
2028
|
);
|
|
2012
2029
|
}
|
|
2013
2030
|
destroy() {
|
|
@@ -2015,14 +2032,14 @@ class w {
|
|
|
2015
2032
|
t.disconnect();
|
|
2016
2033
|
for (const [, t] of this.mediaQueryListeners.entries())
|
|
2017
2034
|
t.mql.removeEventListener("change", t.handler);
|
|
2018
|
-
this.mediaQueryListeners.clear(), this.addedInteractions = {}, this.listInteractionsCache = {}, this.controllers.clear(), this.dataCache = { effects: {}, sequences: {}, conditions: {}, interactions: {} },
|
|
2035
|
+
this.mediaQueryListeners.clear(), this.addedInteractions = {}, this.listInteractionsCache = {}, this.controllers.clear(), this.dataCache = { effects: {}, sequences: {}, conditions: {}, interactions: {} }, E.instances.splice(E.instances.indexOf(this), 1);
|
|
2019
2036
|
}
|
|
2020
2037
|
setController(t, n) {
|
|
2021
|
-
this.controllers.add(n),
|
|
2038
|
+
this.controllers.add(n), E.setController(t, n);
|
|
2022
2039
|
}
|
|
2023
2040
|
deleteController(t, n = !1) {
|
|
2024
|
-
const s =
|
|
2025
|
-
this.clearInteractionStateForKey(t), this.clearMediaQueryListenersForKey(t), s && n && (this.controllers.delete(s),
|
|
2041
|
+
const s = E.controllerCache.get(t);
|
|
2042
|
+
this.clearInteractionStateForKey(t), this.clearMediaQueryListenersForKey(t), s && n && (this.controllers.delete(s), E.deleteController(t));
|
|
2026
2043
|
}
|
|
2027
2044
|
has(t) {
|
|
2028
2045
|
return !!this.get(t);
|
|
@@ -2036,66 +2053,87 @@ class w {
|
|
|
2036
2053
|
s.key === t && (s.mql.removeEventListener("change", s.handler), this.mediaQueryListeners.delete(n));
|
|
2037
2054
|
}
|
|
2038
2055
|
clearInteractionStateForKey(t) {
|
|
2039
|
-
(this.get(t)?.interactionIds || []).forEach((
|
|
2040
|
-
const
|
|
2041
|
-
delete this.addedInteractions[
|
|
2056
|
+
(this.get(t)?.interactionIds || []).forEach((r) => {
|
|
2057
|
+
const i = C(r, t);
|
|
2058
|
+
delete this.addedInteractions[i];
|
|
2042
2059
|
});
|
|
2043
2060
|
const s = `${t}::seq::`;
|
|
2044
|
-
for (const
|
|
2045
|
-
|
|
2061
|
+
for (const r of E.sequenceCache.keys())
|
|
2062
|
+
r.startsWith(s) && (E.sequenceCache.delete(r), delete this.addedInteractions[r]);
|
|
2046
2063
|
}
|
|
2047
|
-
setupMediaQueryListener(t, n, s,
|
|
2048
|
-
this.mediaQueryListeners.has(t) || (n.addEventListener("change",
|
|
2064
|
+
setupMediaQueryListener(t, n, s, r) {
|
|
2065
|
+
this.mediaQueryListeners.has(t) || (n.addEventListener("change", r), this.mediaQueryListeners.set(t, {
|
|
2049
2066
|
mql: n,
|
|
2050
|
-
handler:
|
|
2067
|
+
handler: r,
|
|
2051
2068
|
key: s
|
|
2052
2069
|
}));
|
|
2053
2070
|
}
|
|
2054
2071
|
static create(t, n) {
|
|
2055
|
-
const s = new
|
|
2056
|
-
return
|
|
2072
|
+
const s = new E();
|
|
2073
|
+
return E.instances.push(s), s.init(t, n), s;
|
|
2057
2074
|
}
|
|
2058
2075
|
static destroy() {
|
|
2059
|
-
|
|
2076
|
+
E.controllerCache.forEach((t) => {
|
|
2060
2077
|
t.disconnect();
|
|
2061
|
-
}),
|
|
2078
|
+
}), E.instances.length = 0, E.controllerCache.clear(), E.sequenceCache.clear(), E.elementSequenceMap = /* @__PURE__ */ new WeakMap();
|
|
2062
2079
|
}
|
|
2063
2080
|
static setup(t) {
|
|
2064
|
-
t.scrollOptionsGetter &&
|
|
2081
|
+
t.scrollOptionsGetter && q.viewProgress.registerOptionsGetter?.(
|
|
2065
2082
|
t.scrollOptionsGetter
|
|
2066
|
-
), t.pointerOptionsGetter &&
|
|
2083
|
+
), t.pointerOptionsGetter && q.pointerMove.registerOptionsGetter?.(
|
|
2067
2084
|
t.pointerOptionsGetter
|
|
2068
|
-
), t.viewEnter &&
|
|
2085
|
+
), t.viewEnter && q.viewEnter.setOptions(
|
|
2069
2086
|
t.viewEnter
|
|
2070
|
-
), t.allowA11yTriggers !== void 0 && (
|
|
2087
|
+
), t.allowA11yTriggers !== void 0 && (E.allowA11yTriggers = t.allowA11yTriggers);
|
|
2071
2088
|
}
|
|
2072
2089
|
static getInstance(t) {
|
|
2073
|
-
return
|
|
2090
|
+
return E.instances.find((n) => n.has(t));
|
|
2074
2091
|
}
|
|
2075
2092
|
static getController(t) {
|
|
2076
|
-
return t ?
|
|
2093
|
+
return t ? E.controllerCache.get(t) : void 0;
|
|
2077
2094
|
}
|
|
2078
2095
|
static setController(t, n) {
|
|
2079
|
-
|
|
2096
|
+
E.controllerCache.set(t, n);
|
|
2080
2097
|
}
|
|
2081
2098
|
static deleteController(t) {
|
|
2082
|
-
|
|
2099
|
+
E.controllerCache.delete(t);
|
|
2083
2100
|
}
|
|
2084
2101
|
static registerEffects = Rt;
|
|
2085
|
-
static getSequence(t, n, s,
|
|
2086
|
-
const
|
|
2087
|
-
if (
|
|
2088
|
-
const o = Bt(n, s,
|
|
2089
|
-
return
|
|
2090
|
-
}
|
|
2091
|
-
static addToSequence(t, n, s,
|
|
2092
|
-
const
|
|
2093
|
-
if (!
|
|
2094
|
-
const c = Ve(n,
|
|
2095
|
-
index: s[f] ??
|
|
2102
|
+
static getSequence(t, n, s, r) {
|
|
2103
|
+
const i = E.sequenceCache.get(t);
|
|
2104
|
+
if (i) return i;
|
|
2105
|
+
const o = Bt(n, s, r);
|
|
2106
|
+
return E.sequenceCache.set(t, o), E._registerSequenceElements(s, o), o;
|
|
2107
|
+
}
|
|
2108
|
+
static addToSequence(t, n, s, r) {
|
|
2109
|
+
const i = E.sequenceCache.get(t);
|
|
2110
|
+
if (!i) return !1;
|
|
2111
|
+
const c = Ve(n, r).map((u, f) => ({
|
|
2112
|
+
index: s[f] ?? i.animationGroups.length,
|
|
2096
2113
|
group: u
|
|
2097
2114
|
}));
|
|
2098
|
-
return
|
|
2115
|
+
return i.addGroups(c), E._registerSequenceElements(n, i), !0;
|
|
2116
|
+
}
|
|
2117
|
+
static _registerSequenceElements(t, n) {
|
|
2118
|
+
for (const { target: s } of t) {
|
|
2119
|
+
const r = Array.isArray(s) ? s : s instanceof HTMLElement ? [s] : [];
|
|
2120
|
+
for (const i of r) {
|
|
2121
|
+
let o = E.elementSequenceMap.get(i);
|
|
2122
|
+
o || (o = /* @__PURE__ */ new Set(), E.elementSequenceMap.set(i, o)), o.add(n);
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
}
|
|
2126
|
+
static removeFromSequences(t) {
|
|
2127
|
+
for (const n of t) {
|
|
2128
|
+
const s = E.elementSequenceMap.get(n);
|
|
2129
|
+
if (s) {
|
|
2130
|
+
for (const r of s)
|
|
2131
|
+
r.removeGroups(
|
|
2132
|
+
(i) => i.animations.some((o) => o.effect?.target === n)
|
|
2133
|
+
);
|
|
2134
|
+
E.elementSequenceMap.delete(n);
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
2099
2137
|
}
|
|
2100
2138
|
}
|
|
2101
2139
|
let ss = 0;
|
|
@@ -2105,13 +2143,13 @@ function H(e, {
|
|
|
2105
2143
|
useFirstChild: s = !1
|
|
2106
2144
|
} = {}) {
|
|
2107
2145
|
if (e.listContainer) {
|
|
2108
|
-
const
|
|
2109
|
-
return e.selector ? `${e.listContainer}${
|
|
2146
|
+
const r = `${n && e.listItemSelector ? ` > ${e.listItemSelector}` : ""}`;
|
|
2147
|
+
return e.selector ? `${e.listContainer}${r} ${e.selector}` : `${e.listContainer}${r || " > *"}`;
|
|
2110
2148
|
} else if (e.selector)
|
|
2111
2149
|
return e.selector;
|
|
2112
2150
|
return s ? t ? "> :first-child" : ":scope > :first-child" : "";
|
|
2113
2151
|
}
|
|
2114
|
-
function
|
|
2152
|
+
function $e(e) {
|
|
2115
2153
|
return "sequenceId" in e && !("effects" in e);
|
|
2116
2154
|
}
|
|
2117
2155
|
function ce(e, t) {
|
|
@@ -2125,58 +2163,58 @@ function ce(e, t) {
|
|
|
2125
2163
|
}
|
|
2126
2164
|
function is(e, t = !1) {
|
|
2127
2165
|
const n = e.conditions || {}, s = {};
|
|
2128
|
-
return e.interactions?.forEach((
|
|
2129
|
-
const
|
|
2130
|
-
if (!
|
|
2166
|
+
return e.interactions?.forEach((r) => {
|
|
2167
|
+
const i = r.key, o = ++ss, { effects: c, sequences: u, ...f } = r;
|
|
2168
|
+
if (!i) {
|
|
2131
2169
|
console.error(`Interaction ${o} is missing a key for source element.`);
|
|
2132
2170
|
return;
|
|
2133
2171
|
}
|
|
2134
|
-
ce(s,
|
|
2172
|
+
ce(s, i);
|
|
2135
2173
|
const a = c ? Array.from(c) : [];
|
|
2136
2174
|
a.reverse();
|
|
2137
2175
|
const l = u?.map((d) => {
|
|
2138
|
-
if (
|
|
2176
|
+
if ($e(d)) {
|
|
2139
2177
|
const p = e.sequences?.[d.sequenceId];
|
|
2140
2178
|
return p ? { ...p, ...d } : (console.warn(`Interact: Sequence "${d.sequenceId}" not found in config`), d);
|
|
2141
2179
|
}
|
|
2142
2180
|
const h = d;
|
|
2143
|
-
return h.sequenceId || (h.sequenceId =
|
|
2181
|
+
return h.sequenceId || (h.sequenceId = _()), h;
|
|
2144
2182
|
}), m = {
|
|
2145
2183
|
...f,
|
|
2146
2184
|
effects: a.length > 0 ? a : void 0,
|
|
2147
2185
|
sequences: l
|
|
2148
2186
|
};
|
|
2149
|
-
s[
|
|
2187
|
+
s[i].triggers.push(m), s[i].selectors.add(
|
|
2150
2188
|
H(m, { useFirstChild: t })
|
|
2151
2189
|
);
|
|
2152
2190
|
const g = m.listContainer;
|
|
2153
2191
|
a.forEach((d) => {
|
|
2154
2192
|
let h = d.key;
|
|
2155
2193
|
if (!h && d.effectId) {
|
|
2156
|
-
const
|
|
2157
|
-
|
|
2194
|
+
const w = e.effects[d.effectId];
|
|
2195
|
+
w && (h = w.key);
|
|
2158
2196
|
}
|
|
2159
|
-
d.effectId || (d.effectId =
|
|
2197
|
+
d.effectId || (d.effectId = _()), h = h || i, d.key = h;
|
|
2160
2198
|
const p = d.effectId;
|
|
2161
|
-
if (g && d.listContainer && (h !==
|
|
2199
|
+
if (g && d.listContainer && (h !== i || d.listContainer !== g))
|
|
2162
2200
|
return;
|
|
2163
|
-
const y = `${
|
|
2164
|
-
if (d.interactionId = y, s[
|
|
2201
|
+
const y = `${i}::${h}::${p}::${o}`;
|
|
2202
|
+
if (d.interactionId = y, s[i].interactionIds.add(y), h === i)
|
|
2165
2203
|
return;
|
|
2166
2204
|
const v = ce(s, h);
|
|
2167
2205
|
v.effects[y] || (v.effects[y] = [], v.interactionIds.add(y)), v.effects[y].push({ ...f, effect: d }), v.selectors.add(H(d, { useFirstChild: t }));
|
|
2168
2206
|
}), l?.forEach((d) => {
|
|
2169
|
-
if (!d ||
|
|
2170
|
-
const h = d, p = h.sequenceId ||
|
|
2207
|
+
if (!d || $e(d)) return;
|
|
2208
|
+
const h = d, p = h.sequenceId || _(), y = h.effects;
|
|
2171
2209
|
for (const v of y) {
|
|
2172
|
-
v.effectId || (v.effectId =
|
|
2173
|
-
let
|
|
2174
|
-
if (!
|
|
2210
|
+
v.effectId || (v.effectId = _());
|
|
2211
|
+
let w = v.key;
|
|
2212
|
+
if (!w && v.effectId) {
|
|
2175
2213
|
const b = e.effects[v.effectId];
|
|
2176
|
-
b && (
|
|
2214
|
+
b && (w = b.key);
|
|
2177
2215
|
}
|
|
2178
|
-
if (
|
|
2179
|
-
const b = ce(s,
|
|
2216
|
+
if (w = w || i, w !== i) {
|
|
2217
|
+
const b = ce(s, w), S = `${w}::seq::${p}::${o}`;
|
|
2180
2218
|
b.sequences[S] || (b.sequences[S] = [], b.interactionIds.add(S)), b.sequences[S].push({
|
|
2181
2219
|
...f,
|
|
2182
2220
|
sequence: h
|
|
@@ -2207,16 +2245,16 @@ function pe(e, t, n) {
|
|
|
2207
2245
|
function ge(e, t) {
|
|
2208
2246
|
return t.map((n) => e.selector ? n.querySelector(e.selector) : n).filter(Boolean);
|
|
2209
2247
|
}
|
|
2210
|
-
function Xe(e, t, n, s,
|
|
2248
|
+
function Xe(e, t, n, s, r, i, o, c) {
|
|
2211
2249
|
return [
|
|
2212
2250
|
o ? ge(e, o) : pe(e, n, s),
|
|
2213
|
-
c ? ge(t, c) : pe(t,
|
|
2251
|
+
c ? ge(t, c) : pe(t, r, i)
|
|
2214
2252
|
];
|
|
2215
2253
|
}
|
|
2216
|
-
function Ue(e, t, n, s,
|
|
2217
|
-
const c = Array.isArray(s), u = Array.isArray(
|
|
2254
|
+
function Ue(e, t, n, s, r, i, o) {
|
|
2255
|
+
const c = Array.isArray(s), u = Array.isArray(r);
|
|
2218
2256
|
c ? s.forEach((f, a) => {
|
|
2219
|
-
const l = u ?
|
|
2257
|
+
const l = u ? r[a] : r;
|
|
2220
2258
|
l && Fe(
|
|
2221
2259
|
e,
|
|
2222
2260
|
f,
|
|
@@ -2224,10 +2262,10 @@ function Ue(e, t, n, s, i, r, o) {
|
|
|
2224
2262
|
l,
|
|
2225
2263
|
n,
|
|
2226
2264
|
t.params,
|
|
2227
|
-
|
|
2265
|
+
i,
|
|
2228
2266
|
o
|
|
2229
2267
|
);
|
|
2230
|
-
}) : (u ?
|
|
2268
|
+
}) : (u ? r : [r]).forEach((a) => {
|
|
2231
2269
|
Fe(
|
|
2232
2270
|
e,
|
|
2233
2271
|
s,
|
|
@@ -2235,30 +2273,30 @@ function Ue(e, t, n, s, i, r, o) {
|
|
|
2235
2273
|
a,
|
|
2236
2274
|
n,
|
|
2237
2275
|
t.params,
|
|
2238
|
-
|
|
2276
|
+
i,
|
|
2239
2277
|
o
|
|
2240
2278
|
);
|
|
2241
2279
|
});
|
|
2242
2280
|
}
|
|
2243
|
-
function Je(e, t, n, s,
|
|
2244
|
-
const
|
|
2281
|
+
function Je(e, t, n, s, r) {
|
|
2282
|
+
const i = {}, o = [];
|
|
2245
2283
|
(s.effects || []).forEach((c) => {
|
|
2246
2284
|
const u = c.effectId, f = {
|
|
2247
2285
|
...n.dataCache.effects[u] || {},
|
|
2248
2286
|
...c,
|
|
2249
2287
|
effectId: u
|
|
2250
2288
|
}, a = f.key, l = C(c.interactionId, e);
|
|
2251
|
-
if (
|
|
2289
|
+
if (i[l] || n.addedInteractions[l] && !r)
|
|
2252
2290
|
return;
|
|
2253
|
-
const m =
|
|
2291
|
+
const m = k(f.conditions || [], n.dataCache.conditions);
|
|
2254
2292
|
if (m && n.setupMediaQueryListener(l, m, e, () => {
|
|
2255
2293
|
t.update();
|
|
2256
2294
|
}), !m || m.matches) {
|
|
2257
|
-
|
|
2295
|
+
i[l] = !0;
|
|
2258
2296
|
const g = a && C(a, e);
|
|
2259
2297
|
let d;
|
|
2260
2298
|
if (g) {
|
|
2261
|
-
if (d =
|
|
2299
|
+
if (d = E.getController(g), !d)
|
|
2262
2300
|
return;
|
|
2263
2301
|
f.listContainer && d.watchChildList(f.listContainer);
|
|
2264
2302
|
} else
|
|
@@ -2270,12 +2308,12 @@ function Je(e, t, n, s, i) {
|
|
|
2270
2308
|
t.useFirstChild,
|
|
2271
2309
|
d.element,
|
|
2272
2310
|
d.useFirstChild,
|
|
2273
|
-
|
|
2311
|
+
r
|
|
2274
2312
|
);
|
|
2275
2313
|
if (!h || !p)
|
|
2276
2314
|
return;
|
|
2277
2315
|
n.addedInteractions[l] = !0;
|
|
2278
|
-
const y = g || s.key, v =
|
|
2316
|
+
const y = g || s.key, v = L(
|
|
2279
2317
|
f.conditions || [],
|
|
2280
2318
|
n.dataCache.conditions
|
|
2281
2319
|
);
|
|
@@ -2291,73 +2329,73 @@ function Je(e, t, n, s, i) {
|
|
|
2291
2329
|
}
|
|
2292
2330
|
}), o.reverse().forEach((c) => {
|
|
2293
2331
|
Ue(...c);
|
|
2294
|
-
}), os(e, t, n, s,
|
|
2332
|
+
}), os(e, t, n, s, r);
|
|
2295
2333
|
}
|
|
2296
2334
|
function rs(e) {
|
|
2297
2335
|
return "sequenceId" in e && !("effects" in e);
|
|
2298
2336
|
}
|
|
2299
|
-
function Ze(e, t, n, s,
|
|
2300
|
-
const c =
|
|
2301
|
-
if (c &&
|
|
2337
|
+
function Ze(e, t, n, s, r, i, o) {
|
|
2338
|
+
const c = k(e.conditions || [], r.dataCache.conditions);
|
|
2339
|
+
if (c && r.setupMediaQueryListener(t, c, i.updateKey, i.onUpdate), c && !c.matches) return null;
|
|
2302
2340
|
const u = e.effects || [], f = [];
|
|
2303
2341
|
let a = !1;
|
|
2304
2342
|
for (const l of u) {
|
|
2305
2343
|
const m = l.effectId, d = {
|
|
2306
|
-
...m ?
|
|
2344
|
+
...m ? r.dataCache.effects[m] || {} : {},
|
|
2307
2345
|
...l
|
|
2308
|
-
}, h =
|
|
2346
|
+
}, h = k(d.conditions || [], r.dataCache.conditions);
|
|
2309
2347
|
if (h) {
|
|
2310
2348
|
const T = `${t}::${m || "eff"}`;
|
|
2311
|
-
|
|
2349
|
+
r.setupMediaQueryListener(
|
|
2312
2350
|
T,
|
|
2313
2351
|
h,
|
|
2314
|
-
|
|
2315
|
-
|
|
2352
|
+
i.updateKey,
|
|
2353
|
+
i.onUpdate
|
|
2316
2354
|
);
|
|
2317
2355
|
}
|
|
2318
2356
|
if (h && !h.matches) continue;
|
|
2319
2357
|
const p = d.key, y = p && C(p, n);
|
|
2320
2358
|
let v;
|
|
2321
2359
|
if (y) {
|
|
2322
|
-
if (v =
|
|
2360
|
+
if (v = E.getController(y), !v) return null;
|
|
2323
2361
|
} else
|
|
2324
2362
|
v = s;
|
|
2325
|
-
const
|
|
2363
|
+
const w = y || n;
|
|
2326
2364
|
let b;
|
|
2327
|
-
if (o &&
|
|
2365
|
+
if (o && w === o.controllerKey && d.listContainer === o.listContainer ? (b = ge(d, o.elements), b.length > 0 && (a = !0)) : b = pe(
|
|
2328
2366
|
d,
|
|
2329
2367
|
v.element,
|
|
2330
2368
|
v.useFirstChild
|
|
2331
2369
|
), !b || Array.isArray(b) && b.length === 0) return null;
|
|
2332
|
-
const S =
|
|
2370
|
+
const S = P(d);
|
|
2333
2371
|
f.push({ target: b, options: S });
|
|
2334
2372
|
}
|
|
2335
2373
|
return o && !a ? null : f.length > 0 ? f : null;
|
|
2336
2374
|
}
|
|
2337
2375
|
function et(e, t, n) {
|
|
2338
|
-
const
|
|
2339
|
-
if (!
|
|
2340
|
-
const o = Array.from(
|
|
2376
|
+
const i = (e.useFirstChild ? e.element.firstElementChild : e.element)?.querySelector(t);
|
|
2377
|
+
if (!i) return n.map((c, u) => u);
|
|
2378
|
+
const o = Array.from(i.children);
|
|
2341
2379
|
return n.map((c) => {
|
|
2342
2380
|
const u = o.indexOf(c);
|
|
2343
2381
|
return u >= 0 ? u : o.length;
|
|
2344
2382
|
});
|
|
2345
2383
|
}
|
|
2346
|
-
function os(e, t, n, s,
|
|
2347
|
-
s.sequences?.forEach((
|
|
2384
|
+
function os(e, t, n, s, r) {
|
|
2385
|
+
s.sequences?.forEach((i) => {
|
|
2348
2386
|
let o;
|
|
2349
|
-
if (rs(
|
|
2350
|
-
const g = n.dataCache.sequences[
|
|
2387
|
+
if (rs(i)) {
|
|
2388
|
+
const g = n.dataCache.sequences[i.sequenceId];
|
|
2351
2389
|
if (!g) {
|
|
2352
|
-
console.warn(`Interact: Sequence "${
|
|
2390
|
+
console.warn(`Interact: Sequence "${i.sequenceId}" not found in cache`);
|
|
2353
2391
|
return;
|
|
2354
2392
|
}
|
|
2355
|
-
o = { ...g, ...
|
|
2393
|
+
o = { ...g, ...i };
|
|
2356
2394
|
} else
|
|
2357
|
-
o =
|
|
2358
|
-
const c = o.sequenceId ||
|
|
2359
|
-
if (n.addedInteractions[u] && !
|
|
2360
|
-
const f =
|
|
2395
|
+
o = i;
|
|
2396
|
+
const c = o.sequenceId || _(), u = C(`${e}::seq::${c}`, e);
|
|
2397
|
+
if (n.addedInteractions[u] && !r) return;
|
|
2398
|
+
const f = r && s.listContainer ? { controllerKey: e, listContainer: s.listContainer, elements: r } : void 0, a = Ze(
|
|
2361
2399
|
o,
|
|
2362
2400
|
u,
|
|
2363
2401
|
e,
|
|
@@ -2367,54 +2405,54 @@ function os(e, t, n, s, i) {
|
|
|
2367
2405
|
f
|
|
2368
2406
|
);
|
|
2369
2407
|
if (!a) return;
|
|
2370
|
-
if (
|
|
2408
|
+
if (r && n.addedInteractions[u]) {
|
|
2371
2409
|
const g = et(
|
|
2372
2410
|
t,
|
|
2373
2411
|
s.listContainer,
|
|
2374
|
-
|
|
2412
|
+
r
|
|
2375
2413
|
);
|
|
2376
|
-
|
|
2377
|
-
reducedMotion:
|
|
2414
|
+
E.addToSequence(u, a, g, {
|
|
2415
|
+
reducedMotion: E.forceReducedMotion
|
|
2378
2416
|
});
|
|
2379
2417
|
return;
|
|
2380
2418
|
}
|
|
2381
|
-
const l =
|
|
2382
|
-
reducedMotion:
|
|
2419
|
+
const l = E.getSequence(u, o, a, {
|
|
2420
|
+
reducedMotion: E.forceReducedMotion
|
|
2383
2421
|
});
|
|
2384
2422
|
n.addedInteractions[u] = !0;
|
|
2385
|
-
const m =
|
|
2423
|
+
const m = L(
|
|
2386
2424
|
s.conditions || [],
|
|
2387
2425
|
n.dataCache.conditions
|
|
2388
2426
|
);
|
|
2389
|
-
|
|
2427
|
+
q[s.trigger]?.add(
|
|
2390
2428
|
t.element,
|
|
2391
2429
|
t.element,
|
|
2392
2430
|
{},
|
|
2393
2431
|
s.params || {},
|
|
2394
2432
|
{
|
|
2395
|
-
reducedMotion:
|
|
2433
|
+
reducedMotion: E.forceReducedMotion,
|
|
2396
2434
|
selectorCondition: m,
|
|
2397
2435
|
animation: l,
|
|
2398
|
-
allowA11yTriggers:
|
|
2436
|
+
allowA11yTriggers: E.allowA11yTriggers
|
|
2399
2437
|
}
|
|
2400
2438
|
);
|
|
2401
2439
|
});
|
|
2402
2440
|
}
|
|
2403
|
-
function cs(e, t, n, s,
|
|
2404
|
-
const
|
|
2405
|
-
Object.keys(
|
|
2406
|
-
|
|
2407
|
-
const l =
|
|
2441
|
+
function cs(e, t, n, s, r) {
|
|
2442
|
+
const i = n.get(e)?.sequences || {};
|
|
2443
|
+
Object.keys(i).forEach((c) => {
|
|
2444
|
+
i[c].some(({ sequence: f, ...a }) => {
|
|
2445
|
+
const l = k(
|
|
2408
2446
|
a.conditions || [],
|
|
2409
2447
|
n.dataCache.conditions
|
|
2410
2448
|
);
|
|
2411
2449
|
if (l && !l.matches)
|
|
2412
2450
|
return !1;
|
|
2413
|
-
const m = a.key && C(a.key, e), g =
|
|
2451
|
+
const m = a.key && C(a.key, e), g = E.getController(m);
|
|
2414
2452
|
if (!g)
|
|
2415
2453
|
return !0;
|
|
2416
|
-
const d = f.sequenceId ||
|
|
2417
|
-
if (n.addedInteractions[h] && !
|
|
2454
|
+
const d = f.sequenceId || _(), h = C(`${m}::seq::${d}`, m);
|
|
2455
|
+
if (n.addedInteractions[h] && !r)
|
|
2418
2456
|
return !0;
|
|
2419
2457
|
const y = Ze(
|
|
2420
2458
|
f,
|
|
@@ -2423,46 +2461,46 @@ function cs(e, t, n, s, i) {
|
|
|
2423
2461
|
g,
|
|
2424
2462
|
n,
|
|
2425
2463
|
{ updateKey: e, onUpdate: () => t.update() },
|
|
2426
|
-
|
|
2464
|
+
r && s ? { controllerKey: e, listContainer: s, elements: r } : void 0
|
|
2427
2465
|
);
|
|
2428
2466
|
if (!y) return !0;
|
|
2429
|
-
if (
|
|
2430
|
-
const b = et(t, s,
|
|
2431
|
-
return
|
|
2432
|
-
reducedMotion:
|
|
2467
|
+
if (r && n.addedInteractions[h]) {
|
|
2468
|
+
const b = et(t, s, r);
|
|
2469
|
+
return E.addToSequence(h, y, b, {
|
|
2470
|
+
reducedMotion: E.forceReducedMotion
|
|
2433
2471
|
}), !0;
|
|
2434
2472
|
}
|
|
2435
|
-
const v =
|
|
2436
|
-
reducedMotion:
|
|
2473
|
+
const v = E.getSequence(h, f, y, {
|
|
2474
|
+
reducedMotion: E.forceReducedMotion
|
|
2437
2475
|
});
|
|
2438
2476
|
n.addedInteractions[h] = !0;
|
|
2439
|
-
const
|
|
2477
|
+
const w = L(
|
|
2440
2478
|
a.conditions || [],
|
|
2441
2479
|
n.dataCache.conditions
|
|
2442
2480
|
);
|
|
2443
|
-
return
|
|
2481
|
+
return q[a.trigger]?.add(
|
|
2444
2482
|
g.element,
|
|
2445
2483
|
g.element,
|
|
2446
2484
|
{},
|
|
2447
2485
|
a.params || {},
|
|
2448
2486
|
{
|
|
2449
|
-
reducedMotion:
|
|
2450
|
-
selectorCondition:
|
|
2487
|
+
reducedMotion: E.forceReducedMotion,
|
|
2488
|
+
selectorCondition: w,
|
|
2451
2489
|
animation: v,
|
|
2452
|
-
allowA11yTriggers:
|
|
2490
|
+
allowA11yTriggers: E.allowA11yTriggers
|
|
2453
2491
|
}
|
|
2454
2492
|
), !0;
|
|
2455
2493
|
});
|
|
2456
2494
|
});
|
|
2457
2495
|
}
|
|
2458
|
-
function tt(e, t, n, s,
|
|
2459
|
-
const
|
|
2496
|
+
function tt(e, t, n, s, r) {
|
|
2497
|
+
const i = n.get(e), o = i?.effects || {}, c = Object.keys(o), u = [];
|
|
2460
2498
|
c.forEach((a) => {
|
|
2461
2499
|
const l = C(a, e);
|
|
2462
|
-
if (n.addedInteractions[l] && !
|
|
2500
|
+
if (n.addedInteractions[l] && !r)
|
|
2463
2501
|
return;
|
|
2464
2502
|
o[a].some(({ effect: g, ...d }) => {
|
|
2465
|
-
const h =
|
|
2503
|
+
const h = k(
|
|
2466
2504
|
d.conditions || [],
|
|
2467
2505
|
n.dataCache.conditions
|
|
2468
2506
|
);
|
|
@@ -2475,11 +2513,11 @@ function tt(e, t, n, s, i) {
|
|
|
2475
2513
|
};
|
|
2476
2514
|
if (s && y.listContainer !== s)
|
|
2477
2515
|
return !1;
|
|
2478
|
-
const v =
|
|
2516
|
+
const v = k(y.conditions || [], n.dataCache.conditions);
|
|
2479
2517
|
if (v && n.setupMediaQueryListener(l, v, e, () => {
|
|
2480
2518
|
t.update();
|
|
2481
2519
|
}), !v || v.matches) {
|
|
2482
|
-
const
|
|
2520
|
+
const w = d.key && C(d.key, e), b = E.getController(w);
|
|
2483
2521
|
if (!b)
|
|
2484
2522
|
return !0;
|
|
2485
2523
|
y.listContainer && t.watchChildList(y.listContainer);
|
|
@@ -2491,12 +2529,12 @@ function tt(e, t, n, s, i) {
|
|
|
2491
2529
|
t.element,
|
|
2492
2530
|
t.useFirstChild,
|
|
2493
2531
|
void 0,
|
|
2494
|
-
|
|
2532
|
+
r
|
|
2495
2533
|
);
|
|
2496
2534
|
if (!S || !T)
|
|
2497
2535
|
return !0;
|
|
2498
2536
|
n.addedInteractions[l] = !0;
|
|
2499
|
-
const
|
|
2537
|
+
const $ = L(
|
|
2500
2538
|
y.conditions || [],
|
|
2501
2539
|
n.dataCache.conditions
|
|
2502
2540
|
);
|
|
@@ -2506,7 +2544,7 @@ function tt(e, t, n, s, i) {
|
|
|
2506
2544
|
y,
|
|
2507
2545
|
S,
|
|
2508
2546
|
T,
|
|
2509
|
-
|
|
2547
|
+
$,
|
|
2510
2548
|
t.useFirstChild
|
|
2511
2549
|
]), !0;
|
|
2512
2550
|
}
|
|
@@ -2514,43 +2552,43 @@ function tt(e, t, n, s, i) {
|
|
|
2514
2552
|
});
|
|
2515
2553
|
}), u.reverse().forEach((a) => {
|
|
2516
2554
|
Ue(...a);
|
|
2517
|
-
}), cs(e, t, n, s,
|
|
2518
|
-
const f = Object.keys(
|
|
2555
|
+
}), cs(e, t, n, s, r);
|
|
2556
|
+
const f = Object.keys(i?.sequences || {}).length > 0;
|
|
2519
2557
|
return c.length > 0 || f;
|
|
2520
2558
|
}
|
|
2521
|
-
function Fe(e, t, n, s,
|
|
2559
|
+
function Fe(e, t, n, s, r, i, o, c) {
|
|
2522
2560
|
let u;
|
|
2523
|
-
if (
|
|
2561
|
+
if (r.transition || r.transitionProperties) {
|
|
2524
2562
|
const f = {
|
|
2525
2563
|
key: e,
|
|
2526
|
-
effectId:
|
|
2527
|
-
transition:
|
|
2528
|
-
properties:
|
|
2529
|
-
childSelector: H(
|
|
2564
|
+
effectId: r.effectId,
|
|
2565
|
+
transition: r.transition,
|
|
2566
|
+
properties: r.transitionProperties,
|
|
2567
|
+
childSelector: H(r, {
|
|
2530
2568
|
asCombinator: !0,
|
|
2531
2569
|
addItemFilter: !0,
|
|
2532
2570
|
useFirstChild: c
|
|
2533
2571
|
}),
|
|
2534
2572
|
selectorCondition: o
|
|
2535
2573
|
};
|
|
2536
|
-
if (u =
|
|
2574
|
+
if (u = E.getController(e), !u)
|
|
2537
2575
|
return;
|
|
2538
2576
|
u.renderStyle(Kt(f));
|
|
2539
2577
|
}
|
|
2540
|
-
|
|
2541
|
-
reducedMotion:
|
|
2578
|
+
q[n]?.add(t, s, r, i, {
|
|
2579
|
+
reducedMotion: E.forceReducedMotion,
|
|
2542
2580
|
targetController: u,
|
|
2543
2581
|
selectorCondition: o,
|
|
2544
|
-
allowA11yTriggers:
|
|
2582
|
+
allowA11yTriggers: E.allowA11yTriggers
|
|
2545
2583
|
});
|
|
2546
2584
|
}
|
|
2547
2585
|
function as(e) {
|
|
2548
|
-
const t = e.key, n =
|
|
2586
|
+
const t = e.key, n = E.getInstance(t);
|
|
2549
2587
|
if (!n)
|
|
2550
|
-
return console.warn(`No instance found for key: ${t}`),
|
|
2551
|
-
const { triggers: s = [] } = n?.get(t) || {},
|
|
2588
|
+
return console.warn(`No instance found for key: ${t}`), E.setController(t, e), !1;
|
|
2589
|
+
const { triggers: s = [] } = n?.get(t) || {}, r = s.length > 0;
|
|
2552
2590
|
n.setController(t, e), s.forEach((o, c) => {
|
|
2553
|
-
const u =
|
|
2591
|
+
const u = k(o.conditions, n.dataCache.conditions);
|
|
2554
2592
|
if (u) {
|
|
2555
2593
|
const f = `${t}::trigger::${c}`;
|
|
2556
2594
|
n.setupMediaQueryListener(f, u, t, () => {
|
|
@@ -2559,40 +2597,41 @@ function as(e) {
|
|
|
2559
2597
|
}
|
|
2560
2598
|
(!u || u.matches) && (o.listContainer && e.watchChildList(o.listContainer), Je(t, e, n, o));
|
|
2561
2599
|
});
|
|
2562
|
-
let
|
|
2563
|
-
return n && (
|
|
2600
|
+
let i = !1;
|
|
2601
|
+
return n && (i = tt(t, e, n)), r || i;
|
|
2564
2602
|
}
|
|
2565
2603
|
function fs(e, t, n) {
|
|
2566
|
-
const s = e.key,
|
|
2567
|
-
if (
|
|
2568
|
-
const { triggers:
|
|
2569
|
-
|
|
2604
|
+
const s = e.key, r = E.getInstance(s);
|
|
2605
|
+
if (r) {
|
|
2606
|
+
const { triggers: i = [] } = r?.get(s) || {};
|
|
2607
|
+
i.forEach((o, c) => {
|
|
2570
2608
|
if (o.listContainer !== t)
|
|
2571
2609
|
return;
|
|
2572
|
-
const u =
|
|
2610
|
+
const u = k(o.conditions, r.dataCache.conditions);
|
|
2573
2611
|
if (u) {
|
|
2574
2612
|
const f = `${s}::listTrigger::${t}::${c}`;
|
|
2575
|
-
|
|
2613
|
+
r.setupMediaQueryListener(f, u, s, () => {
|
|
2576
2614
|
e.update();
|
|
2577
2615
|
});
|
|
2578
2616
|
}
|
|
2579
|
-
(!u || u.matches) && Je(s, e,
|
|
2580
|
-
}), tt(s, e,
|
|
2617
|
+
(!u || u.matches) && Je(s, e, r, o, n);
|
|
2618
|
+
}), tt(s, e, r, t, n);
|
|
2581
2619
|
}
|
|
2582
2620
|
}
|
|
2583
2621
|
function ls(e, t = !1) {
|
|
2584
|
-
const n = e.key, s =
|
|
2622
|
+
const n = e.key, s = E.getInstance(n);
|
|
2585
2623
|
if (!s)
|
|
2586
2624
|
return;
|
|
2587
|
-
const
|
|
2588
|
-
let
|
|
2589
|
-
|
|
2625
|
+
const r = [...s.get(n)?.selectors.values() || []].filter(Boolean).join(",");
|
|
2626
|
+
let i;
|
|
2627
|
+
r ? (i = [...e.element.querySelectorAll(r)], e.useFirstChild || i.push(e.element)) : i = [e.element], nt(i), s.deleteController(n, t);
|
|
2590
2628
|
}
|
|
2591
2629
|
function nt(e) {
|
|
2592
|
-
const t = Object.values(
|
|
2630
|
+
const t = Object.values(q);
|
|
2593
2631
|
for (const n of e)
|
|
2594
2632
|
for (const s of t)
|
|
2595
2633
|
s.remove(n);
|
|
2634
|
+
E.removeFromSequences(e);
|
|
2596
2635
|
}
|
|
2597
2636
|
const ae = "interactEffect";
|
|
2598
2637
|
class us {
|
|
@@ -2636,22 +2675,22 @@ class us {
|
|
|
2636
2675
|
for (const s of t)
|
|
2637
2676
|
try {
|
|
2638
2677
|
this.sheet.insertRule(s, n), n++;
|
|
2639
|
-
} catch (
|
|
2640
|
-
console.error(
|
|
2678
|
+
} catch (r) {
|
|
2679
|
+
console.error(r);
|
|
2641
2680
|
}
|
|
2642
2681
|
}
|
|
2643
2682
|
}
|
|
2644
|
-
toggleEffect(t, n, s,
|
|
2683
|
+
toggleEffect(t, n, s, r) {
|
|
2645
2684
|
if (s === null)
|
|
2646
2685
|
return;
|
|
2647
|
-
if (!
|
|
2686
|
+
if (!r && this.element.toggleEffect) {
|
|
2648
2687
|
this.element.toggleEffect(t, n, s);
|
|
2649
2688
|
return;
|
|
2650
2689
|
}
|
|
2651
|
-
const
|
|
2690
|
+
const i = new Set(
|
|
2652
2691
|
this.element.dataset[ae]?.split(" ") || []
|
|
2653
2692
|
);
|
|
2654
|
-
n === "toggle" ?
|
|
2693
|
+
n === "toggle" ? i.has(t) ? i.delete(t) : i.add(t) : n === "add" ? i.add(t) : n === "remove" ? i.delete(t) : n === "clear" && i.clear(), (s || this.element).dataset[ae] = Array.from(i).join(" ");
|
|
2655
2694
|
}
|
|
2656
2695
|
getActiveEffects() {
|
|
2657
2696
|
const n = (this.element.dataset[ae] || "").trim();
|
|
@@ -2665,34 +2704,34 @@ class us {
|
|
|
2665
2704
|
}
|
|
2666
2705
|
}
|
|
2667
2706
|
_childListChangeHandler(t, n) {
|
|
2668
|
-
const s = this.key || this.element.dataset.interactKey,
|
|
2707
|
+
const s = this.key || this.element.dataset.interactKey, r = [], i = [];
|
|
2669
2708
|
n.forEach((o) => {
|
|
2670
2709
|
o.removedNodes.forEach((c) => {
|
|
2671
|
-
c instanceof HTMLElement && i.push(c);
|
|
2672
|
-
}), o.addedNodes.forEach((c) => {
|
|
2673
2710
|
c instanceof HTMLElement && r.push(c);
|
|
2711
|
+
}), o.addedNodes.forEach((c) => {
|
|
2712
|
+
c instanceof HTMLElement && i.push(c);
|
|
2674
2713
|
});
|
|
2675
|
-
}), nt(
|
|
2714
|
+
}), nt(r), s && fs(this, t, i);
|
|
2676
2715
|
}
|
|
2677
2716
|
}
|
|
2678
2717
|
function gs(e, t) {
|
|
2679
2718
|
new us(e, t).connect();
|
|
2680
2719
|
}
|
|
2681
2720
|
function vs(e) {
|
|
2682
|
-
const t =
|
|
2721
|
+
const t = E.getController(e);
|
|
2683
2722
|
t && t.disconnect({ removeFromCache: !0 });
|
|
2684
2723
|
}
|
|
2685
2724
|
const ds = (e, t, n, s) => {
|
|
2686
|
-
let
|
|
2725
|
+
let i = `[data-interact-key="${e.replace(/"/g, "'")}"]`;
|
|
2687
2726
|
const o = H(t, { asCombinator: !0, useFirstChild: s });
|
|
2688
|
-
return o && (
|
|
2727
|
+
return o && (i = `${i} ${o}`), n && (i = Q(i, n)), i;
|
|
2689
2728
|
};
|
|
2690
2729
|
function ys(e, t = !1) {
|
|
2691
2730
|
const n = [], s = /* @__PURE__ */ new Set();
|
|
2692
2731
|
return e.interactions.forEach(
|
|
2693
2732
|
({
|
|
2694
|
-
key:
|
|
2695
|
-
selector:
|
|
2733
|
+
key: r,
|
|
2734
|
+
selector: i,
|
|
2696
2735
|
listContainer: o,
|
|
2697
2736
|
listItemSelector: c,
|
|
2698
2737
|
trigger: u,
|
|
@@ -2706,21 +2745,21 @@ function ys(e, t = !1) {
|
|
|
2706
2745
|
const p = h?.effectId && e.effects[h.effectId] || h, {
|
|
2707
2746
|
key: y,
|
|
2708
2747
|
selector: v,
|
|
2709
|
-
listContainer:
|
|
2748
|
+
listContainer: w,
|
|
2710
2749
|
listItemSelector: b,
|
|
2711
2750
|
conditions: S
|
|
2712
2751
|
} = p;
|
|
2713
|
-
if (!(!y || y ===
|
|
2714
|
-
const ye = e.conditions || {}, Ee =
|
|
2752
|
+
if (!(!y || y === r) || !(!v && !i || v === i) || !(!w && !o || w === o) || !(!b && !c || b === c)) return;
|
|
2753
|
+
const ye = e.conditions || {}, Ee = L(
|
|
2715
2754
|
S,
|
|
2716
2755
|
ye
|
|
2717
|
-
), se =
|
|
2756
|
+
), se = L(
|
|
2718
2757
|
l,
|
|
2719
2758
|
ye
|
|
2720
2759
|
);
|
|
2721
2760
|
if (!(!Ee && !se || Ee === se)) return;
|
|
2722
2761
|
const ie = ds(
|
|
2723
|
-
|
|
2762
|
+
r,
|
|
2724
2763
|
p,
|
|
2725
2764
|
se,
|
|
2726
2765
|
t
|
|
@@ -2742,9 +2781,9 @@ function ys(e, t = !1) {
|
|
|
2742
2781
|
}
|
|
2743
2782
|
export {
|
|
2744
2783
|
us as I,
|
|
2745
|
-
|
|
2784
|
+
E as a,
|
|
2746
2785
|
gs as b,
|
|
2747
2786
|
ys as g,
|
|
2748
2787
|
vs as r
|
|
2749
2788
|
};
|
|
2750
|
-
//# sourceMappingURL=index-
|
|
2789
|
+
//# sourceMappingURL=index-BP07b-Y1.mjs.map
|