@wix/interact 2.5.20 → 2.5.22
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-BwQcAOxd.mjs → index-CUMAPyzu.mjs} +960 -937
- package/dist/index-CUMAPyzu.mjs.map +1 -0
- package/dist/index-DzjSnJ2D.js +26 -0
- package/dist/index-DzjSnJ2D.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/core/Interact.d.ts +2 -1
- package/dist/types/core/Interact.d.ts.map +1 -1
- package/dist/types/core/css.d.ts.map +1 -1
- package/dist/types/types/effects.d.ts +0 -1
- package/dist/types/types/effects.d.ts.map +1 -1
- package/docs/api/types.md +0 -2
- package/package.json +2 -2
- package/rules/full-lean.md +0 -1
- package/rules/validate.md +4 -4
- package/dist/index-BwQcAOxd.mjs.map +0 -1
- package/dist/index-d29S3IRs.js +0 -26
- package/dist/index-d29S3IRs.js.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
function
|
|
2
|
-
return [...e.matchAll(/\[([
|
|
1
|
+
function Vt(e) {
|
|
2
|
+
return [...e.matchAll(/\[([^\]]+)]/g)].map(([t, n]) => n);
|
|
3
3
|
}
|
|
4
4
|
function q(e, t) {
|
|
5
|
-
const n =
|
|
5
|
+
const n = Vt(t);
|
|
6
6
|
let s = 0;
|
|
7
7
|
return n.length ? e.replace(/\[]/g, () => {
|
|
8
8
|
const i = n[s++];
|
|
9
9
|
return i !== void 0 ? `[${i}]` : "[]";
|
|
10
10
|
}) : e;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
return e.trigger === "viewEnter" && t.triggerType === "once" &&
|
|
12
|
+
function Kt(e, t) {
|
|
13
|
+
return e.trigger === "viewEnter" && t.triggerType === "once" && V(e) === V(t);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function V(e) {
|
|
16
16
|
const { key: t, listContainer: n, listItemSelector: s, selector: i } = e;
|
|
17
17
|
return `${t}\0${n || ""}\0${s || ""}\0${i || ""}`;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
class
|
|
19
|
+
const ot = "$";
|
|
20
|
+
class ee {
|
|
21
21
|
animations;
|
|
22
22
|
options;
|
|
23
23
|
ready;
|
|
@@ -121,64 +121,64 @@ class Z {
|
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
const
|
|
125
|
-
linear:
|
|
126
|
-
sineIn:
|
|
127
|
-
sineOut:
|
|
128
|
-
sineInOut:
|
|
129
|
-
quadIn:
|
|
130
|
-
quadOut:
|
|
131
|
-
quadInOut:
|
|
132
|
-
cubicIn:
|
|
133
|
-
cubicOut:
|
|
134
|
-
cubicInOut:
|
|
135
|
-
quartIn:
|
|
136
|
-
quartOut:
|
|
137
|
-
quartInOut:
|
|
138
|
-
quintIn:
|
|
139
|
-
quintOut:
|
|
140
|
-
quintInOut:
|
|
141
|
-
expoIn:
|
|
142
|
-
expoOut:
|
|
143
|
-
expoInOut:
|
|
144
|
-
circIn:
|
|
145
|
-
circOut:
|
|
146
|
-
circInOut:
|
|
147
|
-
backIn:
|
|
148
|
-
backOut:
|
|
149
|
-
backInOut:
|
|
150
|
-
},
|
|
124
|
+
const rt = (e) => e, Yt = (e) => 1 - Math.cos(e * Math.PI / 2), Bt = (e) => Math.sin(e * Math.PI / 2), Ut = (e) => -(Math.cos(Math.PI * e) - 1) / 2, Qt = (e) => e ** 2, Xt = (e) => 1 - (1 - e) ** 2, Zt = (e) => e < 0.5 ? 2 * e ** 2 : 1 - (-2 * e + 2) ** 2 / 2, Jt = (e) => e ** 3, en = (e) => 1 - (1 - e) ** 3, tn = (e) => e < 0.5 ? 4 * e ** 3 : 1 - (-2 * e + 2) ** 3 / 2, nn = (e) => e ** 4, sn = (e) => 1 - (1 - e) ** 4, on = (e) => e < 0.5 ? 8 * e ** 4 : 1 - (-2 * e + 2) ** 4 / 2, rn = (e) => e ** 5, an = (e) => 1 - (1 - e) ** 5, cn = (e) => e < 0.5 ? 16 * e ** 5 : 1 - (-2 * e + 2) ** 5 / 2, ln = (e) => e === 0 ? 0 : 2 ** (10 * e - 10), un = (e) => e === 1 ? 1 : 1 - 2 ** (-10 * e), fn = (e) => e === 0 ? 0 : e === 1 ? 1 : e < 0.5 ? 2 ** (20 * e - 10) / 2 : (2 - 2 ** (-20 * e + 10)) / 2, dn = (e) => 1 - Math.sqrt(1 - e ** 2), hn = (e) => Math.sqrt(1 - (e - 1) ** 2), mn = (e) => e < 0.5 ? (1 - Math.sqrt(1 - 4 * e ** 2)) / 2 : (Math.sqrt(-(2 * e - 3) * (2 * e - 1)) + 1) / 2, pn = (e) => 2.70158 * e ** 3 - 1.70158 * e ** 2, gn = (e) => 1 + 2.70158 * (e - 1) ** 3 + 1.70158 * (e - 1) ** 2, vn = (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, De = {
|
|
125
|
+
linear: rt,
|
|
126
|
+
sineIn: Yt,
|
|
127
|
+
sineOut: Bt,
|
|
128
|
+
sineInOut: Ut,
|
|
129
|
+
quadIn: Qt,
|
|
130
|
+
quadOut: Xt,
|
|
131
|
+
quadInOut: Zt,
|
|
132
|
+
cubicIn: Jt,
|
|
133
|
+
cubicOut: en,
|
|
134
|
+
cubicInOut: tn,
|
|
135
|
+
quartIn: nn,
|
|
136
|
+
quartOut: sn,
|
|
137
|
+
quartInOut: on,
|
|
138
|
+
quintIn: rn,
|
|
139
|
+
quintOut: an,
|
|
140
|
+
quintInOut: cn,
|
|
141
|
+
expoIn: ln,
|
|
142
|
+
expoOut: un,
|
|
143
|
+
expoInOut: fn,
|
|
144
|
+
circIn: dn,
|
|
145
|
+
circOut: hn,
|
|
146
|
+
circInOut: mn,
|
|
147
|
+
backIn: pn,
|
|
148
|
+
backOut: gn,
|
|
149
|
+
backInOut: vn
|
|
150
|
+
}, K = (e, t, n, s, i) => {
|
|
151
151
|
const o = 3 * t, r = 3 * (s - 2 * t), a = 1 - 3 * s + 3 * t, c = 3 * n, u = 3 * (i - 2 * n), l = 1 - 3 * i + 3 * n;
|
|
152
152
|
let f;
|
|
153
153
|
if (a === 0)
|
|
154
154
|
f = r === 0 ? `(${e} / ${o})` : `((sqrt(max(0, ${o * o} + ${4 * r} * ${e})) - ${o}) / ${2 * r})`;
|
|
155
155
|
else {
|
|
156
|
-
const d = r / (3 * a), h = 2 * Math.pow(r, 3) - 9 * o * r * a, m = 54 * Math.pow(a, 3), p = (3 * a * o - r * r) / (9 * a * a),
|
|
156
|
+
const d = r / (3 * a), h = 2 * Math.pow(r, 3) - 9 * o * r * a, m = 54 * Math.pow(a, 3), p = (3 * a * o - r * r) / (9 * a * a), v = `((${h} - ${27 * a * a} * ${e}) / ${m})`;
|
|
157
157
|
if (p < 0) {
|
|
158
158
|
const y = 2 * Math.sqrt(-p);
|
|
159
|
-
let
|
|
160
|
-
for (const
|
|
159
|
+
let g = 0;
|
|
160
|
+
for (const w of [0, 1, 2])
|
|
161
161
|
[0, 0.25, 0.5, 0.75, 1].every((S) => {
|
|
162
|
-
const
|
|
162
|
+
const T = Math.min(
|
|
163
163
|
Math.max(2 * (h - 27 * a * a * S) / (m * p * y), -1),
|
|
164
164
|
1
|
|
165
|
-
),
|
|
166
|
-
return
|
|
167
|
-
}) && (
|
|
168
|
-
const E = `(acos(clamp(-1, ${2 / (p * y)} * ${
|
|
165
|
+
), C = y * Math.cos((Math.acos(T) - w * 2 * Math.PI) / 3) - d;
|
|
166
|
+
return C >= -1e-6 && C <= 1.000001;
|
|
167
|
+
}) && (g = w);
|
|
168
|
+
const E = `(acos(clamp(-1, ${2 / (p * y)} * ${v}, 1)) - ${360 * g}deg) / 3`;
|
|
169
169
|
f = `(${y} * cos(${E}) - ${d})`;
|
|
170
170
|
} else {
|
|
171
|
-
const y = `sqrt(pow(${
|
|
172
|
-
f = `(pow(${y} - ${
|
|
171
|
+
const y = `sqrt(pow(${v}, 2) + ${Math.pow(p, 3)})`;
|
|
172
|
+
f = `(pow(${y} - ${v}, 1 / 3) - pow(${y} + ${v}, 1 / 3) - ${d})`;
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
return `(${l} * pow(${f}, 3) + ${u} * pow(${f}, 2) + ${c} * ${f})`;
|
|
176
|
-
},
|
|
176
|
+
}, Ge = {
|
|
177
177
|
linear: (e) => e,
|
|
178
|
-
ease: (e) =>
|
|
179
|
-
easeIn: (e) =>
|
|
180
|
-
easeOut: (e) =>
|
|
181
|
-
easeInOut: (e) =>
|
|
178
|
+
ease: (e) => K(e, 0.25, 0.1, 0.25, 1),
|
|
179
|
+
easeIn: (e) => K(e, 0.42, 0, 1, 1),
|
|
180
|
+
easeOut: (e) => K(e, 0, 0, 0.58, 1),
|
|
181
|
+
easeInOut: (e) => K(e, 0.42, 0, 0.58, 1),
|
|
182
182
|
sineIn: (e) => `(1 - cos(${e} * 90deg))`,
|
|
183
183
|
sineOut: (e) => `(sin(${e} * 90deg))`,
|
|
184
184
|
sineInOut: (e) => `((1 - cos(${e} * 180deg)) / 2)`,
|
|
@@ -203,7 +203,7 @@ const et = (e) => e, zt = (e) => 1 - Math.cos(e * Math.PI / 2), Ht = (e) => Math
|
|
|
203
203
|
backIn: (e) => `(2.70158 * pow(${e}, 3) - 1.70158 * ${e} * ${e})`,
|
|
204
204
|
backOut: (e) => `(1 + 2.70158 * pow(${e} - 1, 3) + 1.70158 * (${e} - 1) * (${e} - 1))`,
|
|
205
205
|
backInOut: (e) => `((round(${e}) * (2 + (2 * ${e} - 2) * (2 * ${e} - 2) * (2.5949095 + 3.5949095 * (2 * ${e} - 2))) + (1 - round(${e})) * 4 * ${e} * ${e} * (3.5949095 * 2 * ${e} - 2.5949095)) / 2)`
|
|
206
|
-
},
|
|
206
|
+
}, We = {
|
|
207
207
|
linear: "linear",
|
|
208
208
|
ease: "ease",
|
|
209
209
|
easeIn: "ease-in",
|
|
@@ -234,68 +234,68 @@ const et = (e) => e, zt = (e) => 1 - Math.cos(e * Math.PI / 2), Ht = (e) => Math
|
|
|
234
234
|
backOut: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
|
|
235
235
|
backInOut: "cubic-bezier(0.68, -0.55, 0.265, 1.55)"
|
|
236
236
|
};
|
|
237
|
-
function
|
|
237
|
+
function yn(e) {
|
|
238
238
|
return e === "percentage" ? "%" : e || "px";
|
|
239
239
|
}
|
|
240
|
-
const
|
|
240
|
+
const En = /^(webkit|moz|ms|o)(?=[A-Z])/, wn = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
241
241
|
float: "cssFloat",
|
|
242
242
|
"animation-timing-function": "easing",
|
|
243
243
|
"animation-composition": "composite"
|
|
244
244
|
});
|
|
245
|
-
function
|
|
246
|
-
return e.startsWith("--") ? e : (
|
|
245
|
+
function me(e) {
|
|
246
|
+
return e.startsWith("--") ? e : (En.test(e) ? `-${e}` : e).replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`);
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function $n(e) {
|
|
249
249
|
return e.startsWith("--") || !e.includes("-") ? e : e.replace(/^-/, "").replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
250
250
|
}
|
|
251
|
-
function
|
|
252
|
-
return
|
|
251
|
+
function at(e) {
|
|
252
|
+
return wn[e] || $n(e);
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function bn(e) {
|
|
255
255
|
for (const t in e)
|
|
256
|
-
if (Object.hasOwn(e, t) &&
|
|
256
|
+
if (Object.hasOwn(e, t) && at(t) !== t)
|
|
257
257
|
return !0;
|
|
258
258
|
return !1;
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function Sn(e) {
|
|
261
261
|
if (!Array.isArray(e))
|
|
262
262
|
return e;
|
|
263
263
|
let t;
|
|
264
264
|
return e.forEach((n, s) => {
|
|
265
|
-
if (!n || typeof n != "object" || !
|
|
265
|
+
if (!n || typeof n != "object" || !bn(n))
|
|
266
266
|
return;
|
|
267
267
|
t ??= e.slice();
|
|
268
268
|
const i = {};
|
|
269
269
|
for (const o in n)
|
|
270
|
-
Object.hasOwn(n, o) && (i[
|
|
270
|
+
Object.hasOwn(n, o) && (i[at(o)] = n[o]);
|
|
271
271
|
t[s] = i;
|
|
272
272
|
}), t || e;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
return e ?
|
|
274
|
+
function ue(e) {
|
|
275
|
+
return e ? We[e] || e : We.linear;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function In(e, t, n, s) {
|
|
278
278
|
const i = 3 * e, o = 3 * (n - e) - i, r = 1 - i - o, a = 3 * t, c = 3 * (s - t) - a, u = 1 - a - c, l = (m) => ((r * m + o) * m + i) * m, f = (m) => ((u * m + c) * m + a) * m, d = (m) => (3 * r * m + 2 * o) * m + i;
|
|
279
279
|
function h(m) {
|
|
280
280
|
let p = m;
|
|
281
|
-
for (let
|
|
281
|
+
for (let g = 0; g < 8; g++) {
|
|
282
282
|
const E = l(p) - m;
|
|
283
283
|
if (Math.abs(E) < 1e-7) return p;
|
|
284
|
-
const
|
|
285
|
-
if (Math.abs(
|
|
286
|
-
p -= E /
|
|
284
|
+
const w = d(p);
|
|
285
|
+
if (Math.abs(w) < 1e-6) break;
|
|
286
|
+
p -= E / w;
|
|
287
287
|
}
|
|
288
|
-
let
|
|
289
|
-
for (p = (
|
|
290
|
-
const
|
|
291
|
-
if (Math.abs(
|
|
292
|
-
m >
|
|
288
|
+
let v = 0, y = 1;
|
|
289
|
+
for (p = (v + y) / 2; y - v > 1e-7; ) {
|
|
290
|
+
const g = l(p);
|
|
291
|
+
if (Math.abs(g - m) < 1e-7) return p;
|
|
292
|
+
m > g ? v = p : y = p, p = (v + y) / 2;
|
|
293
293
|
}
|
|
294
294
|
return p;
|
|
295
295
|
}
|
|
296
296
|
return (m) => m <= 0 ? 0 : m >= 1 ? 1 : f(h(m));
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function ct(e) {
|
|
299
299
|
const t = e.match(
|
|
300
300
|
/^cubic-bezier\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*\)$/
|
|
301
301
|
);
|
|
@@ -304,17 +304,17 @@ function nt(e) {
|
|
|
304
304
|
if (![n, s, i, o].some(isNaN))
|
|
305
305
|
return [n, s, i, o];
|
|
306
306
|
}
|
|
307
|
-
function
|
|
308
|
-
const t =
|
|
307
|
+
function Tn(e) {
|
|
308
|
+
const t = ct(e);
|
|
309
309
|
if (!(!t || t.some(isNaN)))
|
|
310
|
-
return
|
|
310
|
+
return In(...t);
|
|
311
311
|
}
|
|
312
|
-
function
|
|
313
|
-
const t =
|
|
312
|
+
function Cn(e) {
|
|
313
|
+
const t = ct(e);
|
|
314
314
|
if (!(!t || t.some(isNaN)))
|
|
315
|
-
return (n) =>
|
|
315
|
+
return (n) => K(n, ...t);
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function lt(e) {
|
|
318
318
|
const t = e.match(/^linear\((.+)\)$/);
|
|
319
319
|
if (!t) return;
|
|
320
320
|
const n = t[1].split(",").map((o) => o.trim()).filter(Boolean);
|
|
@@ -350,8 +350,8 @@ function st(e) {
|
|
|
350
350
|
s[o].pos < s[o - 1].pos && (s[o].pos = s[o - 1].pos);
|
|
351
351
|
return s;
|
|
352
352
|
}
|
|
353
|
-
function
|
|
354
|
-
const t =
|
|
353
|
+
function On(e) {
|
|
354
|
+
const t = lt(e);
|
|
355
355
|
if (t)
|
|
356
356
|
return (n) => {
|
|
357
357
|
if (n <= t[0].pos) return t[0].output;
|
|
@@ -366,8 +366,8 @@ function wn(e) {
|
|
|
366
366
|
return a.pos === r.pos ? a.output : r.output + (a.output - r.output) * (n - r.pos) / (a.pos - r.pos);
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
|
-
function
|
|
370
|
-
const t =
|
|
369
|
+
function _n(e) {
|
|
370
|
+
const t = lt(e);
|
|
371
371
|
if (t)
|
|
372
372
|
return (n) => {
|
|
373
373
|
const s = [`${t[0].output}`];
|
|
@@ -383,17 +383,17 @@ function $n(e) {
|
|
|
383
383
|
return `(${s.join(" + ")})`;
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function ut(e) {
|
|
387
387
|
if (!e) return;
|
|
388
|
-
const t =
|
|
389
|
-
return t || (
|
|
388
|
+
const t = De[e];
|
|
389
|
+
return t || (Tn(e) ?? On(e) ?? De.linear);
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function kn(e) {
|
|
392
392
|
if (!e) return;
|
|
393
|
-
const t =
|
|
394
|
-
return t || (
|
|
393
|
+
const t = Ge[e];
|
|
394
|
+
return t || (Cn(e) ?? _n(e) ?? Ge.linear);
|
|
395
395
|
}
|
|
396
|
-
class
|
|
396
|
+
class An extends ee {
|
|
397
397
|
animationGroups;
|
|
398
398
|
delay;
|
|
399
399
|
offset;
|
|
@@ -402,7 +402,7 @@ class Sn extends Z {
|
|
|
402
402
|
timingOptions;
|
|
403
403
|
constructor(t, n = {}) {
|
|
404
404
|
const s = t.flatMap((i) => [...i.animations]);
|
|
405
|
-
super(s), this.animationGroups = t, this.delay = n.delay ?? 0, this.offset = n.offset ?? 0, this.sequenceId = n.sequenceId, this.offsetEasing = typeof n.offsetEasing == "function" ? n.offsetEasing :
|
|
405
|
+
super(s), this.animationGroups = t, this.delay = n.delay ?? 0, this.offset = n.offset ?? 0, this.sequenceId = n.sequenceId, this.offsetEasing = typeof n.offsetEasing == "function" ? n.offsetEasing : ut(n.offsetEasing) ?? rt, this.timingOptions = this.animationGroups.map((i) => i.getTimingOptions().map(({ delay: o, duration: r, iterations: a }) => ({
|
|
406
406
|
delay: o,
|
|
407
407
|
duration: Number.isFinite(r) ? r : 0,
|
|
408
408
|
iterations: Number.isFinite(a) ? a : 1
|
|
@@ -491,7 +491,7 @@ class Sn extends Z {
|
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
class
|
|
494
|
+
class Mn {
|
|
495
495
|
_animation;
|
|
496
496
|
customEffect;
|
|
497
497
|
progress;
|
|
@@ -631,12 +631,12 @@ class In {
|
|
|
631
631
|
return this._animation.dispatchEvent(t);
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function qn(e) {
|
|
635
635
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
636
636
|
}
|
|
637
|
-
var
|
|
638
|
-
function
|
|
639
|
-
return
|
|
637
|
+
var fe = { exports: {} }, Ve = fe.exports, Ke;
|
|
638
|
+
function Pn() {
|
|
639
|
+
return Ke || (Ke = 1, (function(e) {
|
|
640
640
|
(function(t) {
|
|
641
641
|
var n = function() {
|
|
642
642
|
}, s = t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.msRequestAnimationFrame || function(l) {
|
|
@@ -762,51 +762,55 @@ function Cn() {
|
|
|
762
762
|
}
|
|
763
763
|
var u = t.fastdom = t.fastdom || new i();
|
|
764
764
|
e.exports = u;
|
|
765
|
-
})(typeof window < "u" ? window : typeof
|
|
766
|
-
})(
|
|
765
|
+
})(typeof window < "u" ? window : typeof Ve < "u" ? Ve : globalThis);
|
|
766
|
+
})(fe)), fe.exports;
|
|
767
767
|
}
|
|
768
|
-
var
|
|
769
|
-
const
|
|
770
|
-
function
|
|
771
|
-
Object.assign(
|
|
768
|
+
var Ln = Pn();
|
|
769
|
+
const O = /* @__PURE__ */ qn(Ln), _e = {};
|
|
770
|
+
function xn(e) {
|
|
771
|
+
Object.assign(_e, e);
|
|
772
772
|
}
|
|
773
|
-
function
|
|
774
|
-
return e in
|
|
773
|
+
function je(e, t = !0) {
|
|
774
|
+
return e in _e ? _e[e] : (t && console.warn(
|
|
775
775
|
`${e} not found in registry. Please make sure to import and register the preset.`
|
|
776
776
|
), null);
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function X(e, t) {
|
|
779
779
|
return e ? (t || document).getElementById(e) : null;
|
|
780
780
|
}
|
|
781
|
-
function
|
|
781
|
+
function ft(e, t) {
|
|
782
782
|
return e?.matches(`[data-motion-part~="${t}"]`) ? e : e?.querySelector(`[data-motion-part~="${t}"]`);
|
|
783
783
|
}
|
|
784
|
-
function
|
|
784
|
+
function dt(e, t) {
|
|
785
|
+
const n = typeof e == "string" ? X(e) : e;
|
|
786
|
+
return t?.length ? t.map((s) => ft(n, s)).filter(Boolean) : n ? [n] : [];
|
|
787
|
+
}
|
|
788
|
+
function Fn(e) {
|
|
785
789
|
const t = e.alternate ? "alternate" : "";
|
|
786
790
|
return e.reversed ? `${t ? `${t}-` : ""}reverse` : t || "normal";
|
|
787
791
|
}
|
|
788
|
-
function
|
|
789
|
-
return `${e.value}${
|
|
792
|
+
function Ie(e) {
|
|
793
|
+
return `${e.value}${yn(e.unit)}`;
|
|
790
794
|
}
|
|
791
|
-
function
|
|
792
|
-
return `${e.name || "cover"} ${n && e.offset.unit !== "percentage" ? `calc(100% + ${
|
|
795
|
+
function Ye(e, t, n) {
|
|
796
|
+
return `${e.name || "cover"} ${n && e.offset.unit !== "percentage" ? `calc(100% + ${Ie(e.offset)}${t ? ` + ${t}` : ""})` : t ? `calc(${Ie(e.offset)} + ${t})` : Ie(e.offset)}`;
|
|
793
797
|
}
|
|
794
|
-
function
|
|
798
|
+
function ht(e) {
|
|
795
799
|
return {
|
|
796
|
-
start:
|
|
797
|
-
end:
|
|
800
|
+
start: Ye(e.startOffset, e.startOffsetAdd),
|
|
801
|
+
end: Ye(e.endOffset, e.endOffsetAdd, !0)
|
|
798
802
|
};
|
|
799
803
|
}
|
|
800
|
-
function
|
|
801
|
-
return (t) =>
|
|
804
|
+
function mt(e) {
|
|
805
|
+
return (t) => O.measure(() => t(e));
|
|
802
806
|
}
|
|
803
|
-
function
|
|
804
|
-
return (t) =>
|
|
807
|
+
function pt(e) {
|
|
808
|
+
return (t) => O.mutate(() => t(e));
|
|
805
809
|
}
|
|
806
|
-
function
|
|
810
|
+
function Z(e) {
|
|
807
811
|
if (e.namedEffect) {
|
|
808
812
|
const t = e.namedEffect.type;
|
|
809
|
-
return typeof t == "string" ?
|
|
813
|
+
return typeof t == "string" ? je(t) : null;
|
|
810
814
|
} else if (e.keyframeEffect) {
|
|
811
815
|
const t = (s) => {
|
|
812
816
|
const { name: i, keyframes: o } = s.keyframeEffect;
|
|
@@ -820,17 +824,17 @@ function Q(e) {
|
|
|
820
824
|
return (t) => [{ ...t, keyframes: [] }];
|
|
821
825
|
return null;
|
|
822
826
|
}
|
|
823
|
-
function
|
|
827
|
+
function gt(e, t, n, s) {
|
|
824
828
|
return e.map((i, o) => {
|
|
825
829
|
const r = {
|
|
826
830
|
fill: i.fill,
|
|
827
|
-
easing:
|
|
831
|
+
easing: ue(i.easing),
|
|
828
832
|
iterations: i.iterations === 0 ? 1 / 0 : i.iterations || 1,
|
|
829
833
|
composite: i.composite,
|
|
830
|
-
direction:
|
|
834
|
+
direction: Fn(i)
|
|
831
835
|
};
|
|
832
|
-
|
|
833
|
-
const a =
|
|
836
|
+
ze(t) ? (r.duration = i.duration, r.delay = i.delay || 0) : t?.trigger === "view-progress" && (s || window.ViewTimeline) ? r.duration = "auto" : (r.duration = 99.99, r.delay = 0.01);
|
|
837
|
+
const a = Sn(i.keyframes);
|
|
834
838
|
return {
|
|
835
839
|
effect: a === i.keyframes ? i : { ...i, keyframes: a },
|
|
836
840
|
options: r,
|
|
@@ -839,32 +843,32 @@ function lt(e, t, n, s) {
|
|
|
839
843
|
};
|
|
840
844
|
});
|
|
841
845
|
}
|
|
842
|
-
function
|
|
846
|
+
function ze(e) {
|
|
843
847
|
return !e || e.trigger !== "pointer-move" && e.trigger !== "view-progress";
|
|
844
848
|
}
|
|
845
|
-
function
|
|
849
|
+
function Be(e, t, n, s, i) {
|
|
846
850
|
if (e) {
|
|
847
|
-
if (
|
|
851
|
+
if (ze(s) && (t.duration = t.duration || 1, i?.reducedMotion))
|
|
848
852
|
if (t.iterations === 1 || t.iterations == null)
|
|
849
853
|
t = { ...t, duration: 1 };
|
|
850
854
|
else
|
|
851
855
|
return [];
|
|
852
856
|
let o;
|
|
853
|
-
return n instanceof HTMLElement && (o = { measure:
|
|
857
|
+
return n instanceof HTMLElement && (o = { measure: mt(n), mutate: pt(n) }), e.web ? e.web(t, o, i) : e(t, o, i);
|
|
854
858
|
}
|
|
855
859
|
return [];
|
|
856
860
|
}
|
|
857
|
-
function
|
|
858
|
-
const o = typeof e == "string" ?
|
|
861
|
+
function vt(e, t, n, s, i) {
|
|
862
|
+
const o = typeof e == "string" ? X(e, i) : e;
|
|
859
863
|
if (n?.trigger === "pointer-move" && !t.keyframeEffect) {
|
|
860
864
|
let d = t;
|
|
861
865
|
t.customEffect && (d = {
|
|
862
866
|
...t,
|
|
863
867
|
namedEffect: { id: "", type: "CustomMouse" }
|
|
864
868
|
});
|
|
865
|
-
const h =
|
|
869
|
+
const h = Z(
|
|
866
870
|
d
|
|
867
|
-
), m =
|
|
871
|
+
), m = Be(
|
|
868
872
|
h,
|
|
869
873
|
t,
|
|
870
874
|
o,
|
|
@@ -873,7 +877,7 @@ function ut(e, t, n, s, i) {
|
|
|
873
877
|
);
|
|
874
878
|
return typeof m != "function" ? null : m(o);
|
|
875
879
|
}
|
|
876
|
-
const r =
|
|
880
|
+
const r = Z(t), a = Be(
|
|
877
881
|
r,
|
|
878
882
|
t,
|
|
879
883
|
o,
|
|
@@ -882,33 +886,33 @@ function ut(e, t, n, s, i) {
|
|
|
882
886
|
);
|
|
883
887
|
if (!a || a.length === 0)
|
|
884
888
|
return null;
|
|
885
|
-
const c =
|
|
889
|
+
const c = gt(a, n, t.effectId);
|
|
886
890
|
let u;
|
|
887
891
|
const l = n?.trigger === "view-progress";
|
|
888
892
|
l && window.ViewTimeline && (u = new ViewTimeline({
|
|
889
|
-
subject: n.element ||
|
|
893
|
+
subject: n.element || X(n.componentId)
|
|
890
894
|
}));
|
|
891
895
|
const f = c.map(({ effect: d, options: h, id: m, part: p }) => {
|
|
892
|
-
const
|
|
893
|
-
|
|
896
|
+
const v = p ? ft(o, p) : o, y = new KeyframeEffect(v || null, [], h);
|
|
897
|
+
O.mutate(() => {
|
|
894
898
|
"timing" in d && y.updateTiming(d.timing), y.setKeyframes(d.keyframes);
|
|
895
899
|
});
|
|
896
|
-
const
|
|
900
|
+
const g = l && u ? { timeline: u } : {}, E = typeof d.customEffect == "function" ? new Mn(
|
|
897
901
|
d.customEffect,
|
|
898
|
-
|
|
902
|
+
v || null,
|
|
899
903
|
h,
|
|
900
|
-
|
|
901
|
-
) : new Animation(y,
|
|
904
|
+
g
|
|
905
|
+
) : new Animation(y, g.timeline);
|
|
902
906
|
if (l)
|
|
903
907
|
if (u)
|
|
904
|
-
|
|
905
|
-
const { start:
|
|
906
|
-
E.rangeStart =
|
|
908
|
+
O.mutate(() => {
|
|
909
|
+
const { start: w, end: b } = ht(d);
|
|
910
|
+
E.rangeStart = w, E.rangeEnd = b, E.play();
|
|
907
911
|
});
|
|
908
912
|
else {
|
|
909
|
-
const { startOffset:
|
|
910
|
-
|
|
911
|
-
const S = d.startOffset ||
|
|
913
|
+
const { startOffset: w, endOffset: b } = t;
|
|
914
|
+
O.mutate(() => {
|
|
915
|
+
const S = d.startOffset || w, T = d.endOffset || b;
|
|
912
916
|
Object.assign(E, {
|
|
913
917
|
start: {
|
|
914
918
|
name: S.name,
|
|
@@ -916,8 +920,8 @@ function ut(e, t, n, s, i) {
|
|
|
916
920
|
add: d.startOffsetAdd
|
|
917
921
|
},
|
|
918
922
|
end: {
|
|
919
|
-
name:
|
|
920
|
-
offset:
|
|
923
|
+
name: T.name,
|
|
924
|
+
offset: T.offset?.value,
|
|
921
925
|
add: d.endOffsetAdd
|
|
922
926
|
}
|
|
923
927
|
});
|
|
@@ -925,44 +929,41 @@ function ut(e, t, n, s, i) {
|
|
|
925
929
|
}
|
|
926
930
|
return m && (E.id = m), E;
|
|
927
931
|
});
|
|
928
|
-
return new
|
|
932
|
+
return new ee(f, {
|
|
929
933
|
...t,
|
|
930
934
|
trigger: { ...n || {} },
|
|
931
935
|
// make sure the group is ready after all animation targets are measured and mutated
|
|
932
|
-
measured: new Promise((d) =>
|
|
936
|
+
measured: new Promise((d) => O.mutate(d))
|
|
933
937
|
});
|
|
934
938
|
}
|
|
935
|
-
function
|
|
936
|
-
return e ? `#${e}${t ? `[data-motion-part~="${t}"]` : ""}` : "";
|
|
937
|
-
}
|
|
938
|
-
function Mn(e, t, n) {
|
|
939
|
+
function Rn(e, t, n) {
|
|
939
940
|
const { duration: s, delay: i, iterations: o = 1, fill: r, easing: a = "linear", direction: c } = e.options, u = e.effect.name, l = s === "auto", { sequenceId: f, delay: d, offset: h, offsetEasing: m = "linear" } = n || {};
|
|
940
941
|
let p = `${i ?? 0}ms`;
|
|
941
942
|
if (f && typeof m == "string") {
|
|
942
|
-
const
|
|
943
|
-
if (
|
|
943
|
+
const v = kn(m);
|
|
944
|
+
if (v) {
|
|
944
945
|
const y = (i ?? 0) + (d ?? 0);
|
|
945
946
|
if (h) {
|
|
946
|
-
const
|
|
947
|
+
const g = v(
|
|
947
948
|
`(var(--motion-${f}-index, 0) / var(--motion-${f}-last, 1))`
|
|
948
949
|
);
|
|
949
|
-
p = `calc(${`(${y} + ${
|
|
950
|
+
p = `calc(${`(${y} + ${g} * ${h} * var(--motion-${f}-last, 1))`} * 1ms)`;
|
|
950
951
|
} else
|
|
951
952
|
p = `${y}ms`;
|
|
952
953
|
}
|
|
953
954
|
}
|
|
954
955
|
return `${u} ${l ? "auto" : `${s}ms`}${l ? " " : ` ${p} `}${a}${r && r !== "none" ? ` ${r}` : ""} ${!o || o === 1 / 0 ? "infinite" : o}${c === "normal" ? "" : ` ${c}`} ${t ? "" : "paused"}`;
|
|
955
956
|
}
|
|
956
|
-
function
|
|
957
|
-
return e?.style ? (
|
|
957
|
+
function Nn(e, t, n) {
|
|
958
|
+
return e?.style ? (ze(n) && (t.duration = t.duration || 1), e.style(t)) : [];
|
|
958
959
|
}
|
|
959
|
-
function
|
|
960
|
-
const i =
|
|
960
|
+
function jn(e, t, n, s) {
|
|
961
|
+
const i = Z(t), o = Nn(i, t), r = gt(o, n, t.effectId, !0), a = n?.trigger === "view-progress";
|
|
961
962
|
return r.map((c, u) => {
|
|
962
|
-
const { start: l, end: f } = a ?
|
|
963
|
+
const { start: l, end: f } = a ? ht(c.effect) : {};
|
|
963
964
|
return {
|
|
964
|
-
|
|
965
|
-
animation:
|
|
965
|
+
part: c.part,
|
|
966
|
+
animation: Rn(c, a, s),
|
|
966
967
|
composition: c.options.composite,
|
|
967
968
|
custom: c.effect.custom,
|
|
968
969
|
name: c.effect.name,
|
|
@@ -973,41 +974,41 @@ function Ln(e, t, n, s) {
|
|
|
973
974
|
};
|
|
974
975
|
});
|
|
975
976
|
}
|
|
976
|
-
function
|
|
977
|
-
const s =
|
|
977
|
+
function zn(e, t, n) {
|
|
978
|
+
const s = Z(t), i = e instanceof HTMLElement ? e : X(e);
|
|
978
979
|
if (s && s.prepare && i) {
|
|
979
|
-
const o = { measure:
|
|
980
|
+
const o = { measure: mt(i), mutate: pt(i) };
|
|
980
981
|
s.prepare(t, o);
|
|
981
982
|
}
|
|
982
|
-
n &&
|
|
983
|
+
n && O.mutate(n);
|
|
983
984
|
}
|
|
984
|
-
function
|
|
985
|
-
const n =
|
|
985
|
+
function yt(e, t) {
|
|
986
|
+
const n = Z(t);
|
|
986
987
|
if (!n)
|
|
987
988
|
return null;
|
|
988
989
|
if (!n.style)
|
|
989
|
-
return t.effectId && e ?
|
|
990
|
-
const s = n.getNames(t), o = (
|
|
990
|
+
return t.effectId && e ? Hn(e, t.effectId, n.parts) : null;
|
|
991
|
+
const s = n.getNames(t), o = dt(e, n.parts)?.flatMap((c) => c.getAnimations()), r = o?.map((c) => c.animationName) || [], a = [];
|
|
991
992
|
return s.forEach((c) => {
|
|
992
993
|
r.includes(c) && a.push(
|
|
993
994
|
o?.find((u) => u.animationName === c)
|
|
994
995
|
);
|
|
995
|
-
}), a?.length ? new
|
|
996
|
+
}), a?.length ? new ee(a) : null;
|
|
996
997
|
}
|
|
997
|
-
function
|
|
998
|
-
const
|
|
999
|
-
const
|
|
1000
|
-
return
|
|
998
|
+
function Hn(e, t, n) {
|
|
999
|
+
const i = dt(e, n)?.flatMap((o) => o.getAnimations()).filter((o) => {
|
|
1000
|
+
const r = o.id || o.animationName;
|
|
1001
|
+
return r ? r.startsWith(t) : !0;
|
|
1001
1002
|
});
|
|
1002
|
-
return
|
|
1003
|
+
return i?.length ? new ee(i) : null;
|
|
1003
1004
|
}
|
|
1004
|
-
function
|
|
1005
|
-
const { disabled: i, allowActiveEvent: o, ...r } = s, a =
|
|
1005
|
+
function Et(e, t, n, s = {}) {
|
|
1006
|
+
const { disabled: i, allowActiveEvent: o, ...r } = s, a = vt(e, t, n, r);
|
|
1006
1007
|
if (!a)
|
|
1007
1008
|
return null;
|
|
1008
1009
|
let c = {};
|
|
1009
1010
|
if (n.trigger === "view-progress" && !window.ViewTimeline) {
|
|
1010
|
-
const u = n.element ||
|
|
1011
|
+
const u = n.element || X(n.componentId), { ready: l } = a;
|
|
1011
1012
|
return a.animations.map((f) => ({
|
|
1012
1013
|
/* we use getters for start and end in order to access the animation's start and end
|
|
1013
1014
|
only when initializing the scrub scene rather than immediately */
|
|
@@ -1043,9 +1044,9 @@ function dt(e, t, n, s = {}) {
|
|
|
1043
1044
|
getProgress() {
|
|
1044
1045
|
return this._currentProgress;
|
|
1045
1046
|
},
|
|
1046
|
-
effect(
|
|
1047
|
-
const
|
|
1048
|
-
this._currentProgress =
|
|
1047
|
+
effect(v, y) {
|
|
1048
|
+
const g = h === "x" ? y.x : y.y;
|
|
1049
|
+
this._currentProgress = g, m.progress(g);
|
|
1049
1050
|
},
|
|
1050
1051
|
disabled: i ?? !1,
|
|
1051
1052
|
destroy() {
|
|
@@ -1056,7 +1057,7 @@ function dt(e, t, n, s = {}) {
|
|
|
1056
1057
|
c = {
|
|
1057
1058
|
centeredToTarget: l,
|
|
1058
1059
|
allowActiveEvent: o
|
|
1059
|
-
}, t.customEffect && f && (c.transitionDuration = f, c.transitionEasing =
|
|
1060
|
+
}, t.customEffect && f && (c.transitionDuration = f, c.transitionEasing = ut(d)), c.target = a.target;
|
|
1060
1061
|
}
|
|
1061
1062
|
return {
|
|
1062
1063
|
...c,
|
|
@@ -1079,48 +1080,48 @@ function dt(e, t, n, s = {}) {
|
|
|
1079
1080
|
}
|
|
1080
1081
|
};
|
|
1081
1082
|
}
|
|
1082
|
-
function
|
|
1083
|
-
const i =
|
|
1083
|
+
function te(e, t, n, s = !1) {
|
|
1084
|
+
const i = yt(e, t);
|
|
1084
1085
|
return i ? (i.ready = new Promise((o) => {
|
|
1085
|
-
|
|
1086
|
-
}), i) :
|
|
1086
|
+
zn(e, t, o);
|
|
1087
|
+
}), i) : vt(e, t, n, { reducedMotion: s });
|
|
1087
1088
|
}
|
|
1088
|
-
function
|
|
1089
|
+
function Dn(e) {
|
|
1089
1090
|
return e === null ? [null] : typeof e == "string" ? Array.from(document.querySelectorAll(e)) : Array.isArray(e) ? e : [e];
|
|
1090
1091
|
}
|
|
1091
|
-
function
|
|
1092
|
+
function wt(e, t) {
|
|
1092
1093
|
const n = [];
|
|
1093
1094
|
for (const { target: s, options: i } of e) {
|
|
1094
|
-
const o =
|
|
1095
|
+
const o = Dn(s);
|
|
1095
1096
|
for (const r of o) {
|
|
1096
|
-
const a =
|
|
1097
|
+
const a = te(
|
|
1097
1098
|
r,
|
|
1098
1099
|
i,
|
|
1099
1100
|
void 0,
|
|
1100
1101
|
t?.reducedMotion
|
|
1101
1102
|
);
|
|
1102
|
-
a instanceof
|
|
1103
|
+
a instanceof ee && n.push(a);
|
|
1103
1104
|
}
|
|
1104
1105
|
}
|
|
1105
1106
|
return n;
|
|
1106
1107
|
}
|
|
1107
|
-
function
|
|
1108
|
-
const s =
|
|
1109
|
-
return new
|
|
1108
|
+
function Gn(e, t, n) {
|
|
1109
|
+
const s = wt(t, n);
|
|
1110
|
+
return new An(s, e);
|
|
1110
1111
|
}
|
|
1111
|
-
function
|
|
1112
|
+
function Wn(e, t = 2) {
|
|
1112
1113
|
return parseFloat(e.toFixed(t));
|
|
1113
1114
|
}
|
|
1114
|
-
function
|
|
1115
|
+
function Vn(e) {
|
|
1115
1116
|
return /\[]/g.test(e);
|
|
1116
1117
|
}
|
|
1117
|
-
function
|
|
1118
|
+
function Kn(e) {
|
|
1118
1119
|
return e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
|
|
1119
1120
|
}
|
|
1120
|
-
function
|
|
1121
|
+
function de(e, t) {
|
|
1121
1122
|
return t.includes("&") ? t.replace(/&/g, e) : `${e}${t}`;
|
|
1122
1123
|
}
|
|
1123
|
-
function
|
|
1124
|
+
function J() {
|
|
1124
1125
|
return "wi-12343210".replace(
|
|
1125
1126
|
/\d/g,
|
|
1126
1127
|
(e) => String.fromCharCode(
|
|
@@ -1129,34 +1130,34 @@ function X() {
|
|
|
1129
1130
|
// 97 for "a"
|
|
1130
1131
|
);
|
|
1131
1132
|
}
|
|
1132
|
-
function
|
|
1133
|
+
function $t(e) {
|
|
1133
1134
|
const { transition: t, transitionProperties: n } = e;
|
|
1134
1135
|
return (t?.styleProperties || n || []).map((i) => ({
|
|
1135
1136
|
...i,
|
|
1136
|
-
name:
|
|
1137
|
+
name: me(i.name)
|
|
1137
1138
|
}));
|
|
1138
1139
|
}
|
|
1139
|
-
function
|
|
1140
|
+
function bt(e) {
|
|
1140
1141
|
let { transition: t, transitionProperties: n } = e, s = [];
|
|
1141
1142
|
if (t?.styleProperties) {
|
|
1142
1143
|
const { duration: i, easing: o, delay: r } = t;
|
|
1143
1144
|
i && (t.styleProperties.some(
|
|
1144
1145
|
(c) => c.name.startsWith("--")
|
|
1145
1146
|
) ? s = [
|
|
1146
|
-
`all ${i}ms ${
|
|
1147
|
+
`all ${i}ms ${ue(o || "ease")}${r ? ` ${r}ms` : ""}`,
|
|
1147
1148
|
"visibility 0s"
|
|
1148
1149
|
] : s = t.styleProperties.map(
|
|
1149
|
-
(c) => `${
|
|
1150
|
+
(c) => `${me(c.name)} ${i}ms ${ue(
|
|
1150
1151
|
o || "ease"
|
|
1151
1152
|
)}${r ? ` ${r}ms` : ""}`
|
|
1152
1153
|
));
|
|
1153
1154
|
} else
|
|
1154
1155
|
s = n?.filter((i) => i.duration).map(
|
|
1155
|
-
(i) => `${
|
|
1156
|
+
(i) => `${me(i.name)} ${i.duration}ms ${ue(i.easing) || "ease"}${i.delay ? ` ${i.delay}ms` : ""}`
|
|
1156
1157
|
) || [];
|
|
1157
1158
|
return s;
|
|
1158
1159
|
}
|
|
1159
|
-
function
|
|
1160
|
+
function Yn({
|
|
1160
1161
|
key: e,
|
|
1161
1162
|
effectId: t,
|
|
1162
1163
|
transition: n,
|
|
@@ -1164,12 +1165,12 @@ function Dn({
|
|
|
1164
1165
|
childSelector: i = "> :first-child",
|
|
1165
1166
|
selectorCondition: o
|
|
1166
1167
|
}) {
|
|
1167
|
-
const r =
|
|
1168
|
+
const r = bt({
|
|
1168
1169
|
transition: n,
|
|
1169
1170
|
transitionProperties: s
|
|
1170
|
-
}), a =
|
|
1171
|
+
}), a = $t({ transition: n, transitionProperties: s }).map(
|
|
1171
1172
|
(m) => `${m.name}: ${m.value};`
|
|
1172
|
-
), c = e.replace(/"/g, "'"), u = `:is(:state(${t}), :--${t}) ${i}`, l = `[data-interact-effect~="${t}"] ${i}`, f = o ?
|
|
1173
|
+
), c = e.replace(/"/g, "'"), u = `:is(:state(${t}), :--${t}) ${i}`, l = `[data-interact-effect~="${t}"] ${i}`, f = o ? de(u, o) : u, d = o ? de(l, o) : l, h = [
|
|
1173
1174
|
`${f},
|
|
1174
1175
|
${d} {
|
|
1175
1176
|
${a.join(`
|
|
@@ -1177,25 +1178,25 @@ function Dn({
|
|
|
1177
1178
|
}`
|
|
1178
1179
|
];
|
|
1179
1180
|
if (r.length) {
|
|
1180
|
-
const m = `[data-interact-key="${c}"] ${i}`, p = o ?
|
|
1181
|
+
const m = `[data-interact-key="${c}"] ${i}`, p = o ? de(m, o) : m;
|
|
1181
1182
|
h.push(`@media (prefers-reduced-motion: no-preference) { ${p} {
|
|
1182
1183
|
transition: ${r.join(", ")};
|
|
1183
1184
|
} }`);
|
|
1184
1185
|
}
|
|
1185
1186
|
return h;
|
|
1186
1187
|
}
|
|
1187
|
-
function
|
|
1188
|
+
function ne(e, t, n) {
|
|
1188
1189
|
const s = (e || []).filter((i) => t[i]?.type === n && t[i].predicate).map((i) => t[i].predicate).join(") and (");
|
|
1189
1190
|
return s && `(${s})`;
|
|
1190
1191
|
}
|
|
1191
|
-
function
|
|
1192
|
-
const n =
|
|
1192
|
+
function L(e, t) {
|
|
1193
|
+
const n = ne(e, t, "media");
|
|
1193
1194
|
return n && window.matchMedia(n);
|
|
1194
1195
|
}
|
|
1195
|
-
function
|
|
1196
|
+
function x(e, t) {
|
|
1196
1197
|
return (e || []).filter((n) => t[n]?.type === "selector" && t[n].predicate).map((n) => `:is(${t[n].predicate})`).join("");
|
|
1197
1198
|
}
|
|
1198
|
-
const
|
|
1199
|
+
const St = /* @__PURE__ */ new Map([
|
|
1199
1200
|
["viewEnter", "once"],
|
|
1200
1201
|
["animationEnd", "once"],
|
|
1201
1202
|
["hover", "alternate"],
|
|
@@ -1203,9 +1204,9 @@ const gt = /* @__PURE__ */ new Map([
|
|
|
1203
1204
|
["activate", "alternate"],
|
|
1204
1205
|
["interest", "alternate"]
|
|
1205
1206
|
]);
|
|
1206
|
-
function
|
|
1207
|
+
function It(e, t, n, s) {
|
|
1207
1208
|
const { effects: i = {}, conditions: o = {} } = n, { key: r, trigger: a } = t, c = a === "pointerMove";
|
|
1208
|
-
e.effectId || (e.effectId = s ||
|
|
1209
|
+
e.effectId || (e.effectId = s || J());
|
|
1209
1210
|
const { effectId: u } = e, l = { ...i[u] || {}, ...e };
|
|
1210
1211
|
let { key: f, conditions: d, triggerType: h } = l;
|
|
1211
1212
|
if (!f) {
|
|
@@ -1213,31 +1214,31 @@ function vt(e, t, n, s) {
|
|
|
1213
1214
|
return null;
|
|
1214
1215
|
f = r;
|
|
1215
1216
|
}
|
|
1216
|
-
if (
|
|
1217
|
+
if (Vn(f))
|
|
1217
1218
|
return null;
|
|
1218
1219
|
d = [
|
|
1219
1220
|
...new Set((d || []).filter((b) => o[b]))
|
|
1220
|
-
], h || (h =
|
|
1221
|
-
const { namedEffect: m, customEffect: p, keyframeEffect:
|
|
1221
|
+
], h || (h = St.get(a));
|
|
1222
|
+
const { namedEffect: m, customEffect: p, keyframeEffect: v, transition: y, transitionProperties: g, ...E } = {
|
|
1222
1223
|
...l,
|
|
1223
1224
|
key: f,
|
|
1224
1225
|
conditions: d,
|
|
1225
1226
|
effectId: u,
|
|
1226
1227
|
triggerType: h
|
|
1227
|
-
},
|
|
1228
|
+
}, w = Kt(t, E);
|
|
1228
1229
|
if (m)
|
|
1229
|
-
return c || !m.type ? null : { namedEffect: m, initial:
|
|
1230
|
-
if (
|
|
1231
|
-
if (!
|
|
1230
|
+
return c || !m.type ? null : { namedEffect: m, initial: w, ...E };
|
|
1231
|
+
if (v) {
|
|
1232
|
+
if (!v.name) {
|
|
1232
1233
|
const b = u && !(i[u] && "keyframeEffect" in e);
|
|
1233
|
-
|
|
1234
|
+
v.name = b ? u : J();
|
|
1234
1235
|
}
|
|
1235
|
-
return { keyframeEffect:
|
|
1236
|
-
} else return p ? c ? null : { initial:
|
|
1236
|
+
return { keyframeEffect: v, initial: w, ...E };
|
|
1237
|
+
} else return p ? c ? null : { initial: w, ...E } : y ? { transition: y, initial: w, ...E } : g ? { transitionProperties: g, initial: w, ...E } : { initial: w, ...E };
|
|
1237
1238
|
}
|
|
1238
|
-
function
|
|
1239
|
+
function Bn(e, t, n, s, i) {
|
|
1239
1240
|
const { sequences: o = {}, conditions: r = {} } = n;
|
|
1240
|
-
e.sequenceId || (e.sequenceId = s ||
|
|
1241
|
+
e.sequenceId || (e.sequenceId = s || J());
|
|
1241
1242
|
const { sequenceId: a } = e, c = { ...o[a] || {}, ...e };
|
|
1242
1243
|
let {
|
|
1243
1244
|
effects: u,
|
|
@@ -1249,32 +1250,32 @@ function Gn(e, t, n, s, i) {
|
|
|
1249
1250
|
} = c;
|
|
1250
1251
|
if (typeof m == "function" || !u)
|
|
1251
1252
|
return null;
|
|
1252
|
-
f || (f =
|
|
1253
|
+
f || (f = St.get(t.trigger)), l = [
|
|
1253
1254
|
...new Set((l || []).filter((y) => r[y]))
|
|
1254
1255
|
];
|
|
1255
|
-
const
|
|
1256
|
-
const E =
|
|
1256
|
+
const v = u.map((y, g) => {
|
|
1257
|
+
const E = It(
|
|
1257
1258
|
{ ...y, triggerType: f, conditions: [...y.conditions || [], ...l] },
|
|
1258
1259
|
t,
|
|
1259
1260
|
n,
|
|
1260
|
-
`${a}-eff-${
|
|
1261
|
+
`${a}-eff-${g}`
|
|
1261
1262
|
);
|
|
1262
|
-
return E && Object.assign(E, { slotKey: i?.(
|
|
1263
|
+
return E && Object.assign(E, { slotKey: i?.(g) });
|
|
1263
1264
|
}).filter((y) => y !== null);
|
|
1264
|
-
return
|
|
1265
|
+
return v.length ? {
|
|
1265
1266
|
sequenceId: a,
|
|
1266
1267
|
triggerType: f,
|
|
1267
1268
|
conditions: l,
|
|
1268
1269
|
delay: d,
|
|
1269
1270
|
offset: h,
|
|
1270
1271
|
offsetEasing: m,
|
|
1271
|
-
effects:
|
|
1272
|
+
effects: v
|
|
1272
1273
|
} : null;
|
|
1273
1274
|
}
|
|
1274
|
-
function
|
|
1275
|
-
return e === "cssFloat" ? "float" : e === "easing" ? "animation-timing-function" : e === "cssOffset" ? "offset" : e === "composite" ? "animation-composition" :
|
|
1275
|
+
function Un(e) {
|
|
1276
|
+
return e === "cssFloat" ? "float" : e === "easing" ? "animation-timing-function" : e === "cssOffset" ? "offset" : e === "composite" ? "animation-composition" : me(e);
|
|
1276
1277
|
}
|
|
1277
|
-
function
|
|
1278
|
+
function Qn(e) {
|
|
1278
1279
|
if (!e.length)
|
|
1279
1280
|
return [];
|
|
1280
1281
|
const t = e.map((i) => ({ ...i }));
|
|
@@ -1296,27 +1297,27 @@ function Vn(e) {
|
|
|
1296
1297
|
}
|
|
1297
1298
|
return t;
|
|
1298
1299
|
}
|
|
1299
|
-
function
|
|
1300
|
-
const n = Object.entries(e).filter(([s, i]) => s !== "offset" && i !== void 0 && i !== null).map(([s, i]) => `${
|
|
1300
|
+
function Xn(e, t) {
|
|
1301
|
+
const n = Object.entries(e).filter(([s, i]) => s !== "offset" && i !== void 0 && i !== null).map(([s, i]) => `${Un(s)}: ${i};`).join(`
|
|
1301
1302
|
`);
|
|
1302
1303
|
return `${t}% {
|
|
1303
1304
|
${n}
|
|
1304
1305
|
}`;
|
|
1305
1306
|
}
|
|
1306
|
-
function
|
|
1307
|
-
const n =
|
|
1307
|
+
function Zn(e, t) {
|
|
1308
|
+
const n = Qn(t);
|
|
1308
1309
|
if (!n.length)
|
|
1309
1310
|
return "";
|
|
1310
1311
|
let s = n.map((i) => {
|
|
1311
|
-
const o = i.offset, r =
|
|
1312
|
-
return
|
|
1312
|
+
const o = i.offset, r = Wn(o * 100);
|
|
1313
|
+
return Xn(i, r);
|
|
1313
1314
|
}).join(`
|
|
1314
1315
|
`);
|
|
1315
1316
|
return `@keyframes ${e} {
|
|
1316
1317
|
${s}
|
|
1317
1318
|
}`;
|
|
1318
1319
|
}
|
|
1319
|
-
function
|
|
1320
|
+
function Jn(e) {
|
|
1320
1321
|
const { key: t, childSelector: n, declarations: s, media: i, states: o, selectorCondition: r, selectorSuffix: a } = e;
|
|
1321
1322
|
if (!s.length)
|
|
1322
1323
|
return "";
|
|
@@ -1325,7 +1326,7 @@ function Bn(e) {
|
|
|
1325
1326
|
const f = o.map((d) => `:state(${d}), :--${d}, [data-interact-effect~="${d}"]`).join(", ");
|
|
1326
1327
|
c = `${c}:is(${f})`;
|
|
1327
1328
|
}
|
|
1328
|
-
n && (c = `${c} ${n}`), a && (c = `${c}${a}`), r && (c =
|
|
1329
|
+
n && (c = `${c} ${n}`), a && (c = `${c}${a}`), r && (c = de(c, r));
|
|
1329
1330
|
const u = s.map(({ name: f, value: d, important: h }) => `${f}: ${d}${h ? " !important" : ""};`).join(`
|
|
1330
1331
|
`), l = `${c} {
|
|
1331
1332
|
${u}
|
|
@@ -1334,20 +1335,20 @@ function Bn(e) {
|
|
|
1334
1335
|
${l}
|
|
1335
1336
|
}` : l;
|
|
1336
1337
|
}
|
|
1337
|
-
const
|
|
1338
|
+
const ke = [
|
|
1338
1339
|
"animation",
|
|
1339
1340
|
"animation-composition",
|
|
1340
1341
|
"animation-timeline",
|
|
1341
1342
|
"animation-range"
|
|
1342
|
-
],
|
|
1343
|
-
...
|
|
1343
|
+
], we = [
|
|
1344
|
+
...ke,
|
|
1344
1345
|
"transition",
|
|
1345
1346
|
"view-timeline"
|
|
1346
|
-
],
|
|
1347
|
-
function
|
|
1347
|
+
], He = ["animation", "transition", "timeline"];
|
|
1348
|
+
function N(e) {
|
|
1348
1349
|
return e === "transition" ? "transition" : e === "view-timeline" ? "timeline" : "animation";
|
|
1349
1350
|
}
|
|
1350
|
-
const
|
|
1351
|
+
const H = {
|
|
1351
1352
|
transition: "_",
|
|
1352
1353
|
animation: "none",
|
|
1353
1354
|
"animation-composition": "replace",
|
|
@@ -1355,10 +1356,10 @@ const j = {
|
|
|
1355
1356
|
"animation-range": "normal",
|
|
1356
1357
|
"view-timeline": "none"
|
|
1357
1358
|
};
|
|
1358
|
-
function
|
|
1359
|
+
function j(e, t, n = !1) {
|
|
1359
1360
|
return `--${e.replace(new RegExp("(?<!(^|-))([aeiou]|tion)", "g"), "")}${n ? "-slot" : ""}-${t}`;
|
|
1360
1361
|
}
|
|
1361
|
-
function
|
|
1362
|
+
function es(e, t, n, s, i = 0) {
|
|
1362
1363
|
const o = {
|
|
1363
1364
|
animation: e,
|
|
1364
1365
|
transition: t,
|
|
@@ -1368,51 +1369,51 @@ function Un(e, t, n, s, i = 0) {
|
|
|
1368
1369
|
transition: s,
|
|
1369
1370
|
timeline: 0
|
|
1370
1371
|
};
|
|
1371
|
-
return
|
|
1372
|
+
return we.flatMap((a) => [
|
|
1372
1373
|
...Array.from(
|
|
1373
|
-
{ length: o[
|
|
1374
|
-
(c, u) => `@property ${
|
|
1374
|
+
{ length: o[N(a)] },
|
|
1375
|
+
(c, u) => `@property ${j(a, u)} { syntax: "*"; inherits: false; initial-value: ${H[a]}; }`
|
|
1375
1376
|
),
|
|
1376
1377
|
...Array.from(
|
|
1377
|
-
{ length: r[
|
|
1378
|
-
(c, u) => `@property ${
|
|
1378
|
+
{ length: r[N(a)] },
|
|
1379
|
+
(c, u) => `@property ${j(a, u, !0)} { syntax: "*"; inherits: false; initial-value: ${H[a]}; }`
|
|
1379
1380
|
)
|
|
1380
1381
|
]);
|
|
1381
1382
|
}
|
|
1382
|
-
function
|
|
1383
|
-
const s =
|
|
1384
|
-
(r) => e[
|
|
1383
|
+
function ts(e, t, n) {
|
|
1384
|
+
const s = we.filter(
|
|
1385
|
+
(r) => e[N(r)].slotsInSequence > 0
|
|
1385
1386
|
);
|
|
1386
1387
|
if (s.length === 0)
|
|
1387
1388
|
return null;
|
|
1388
1389
|
const i = s.map((r) => {
|
|
1389
|
-
const { listIndex: a, slotCursor: c, slotsInSequence: u } = e[
|
|
1390
|
+
const { listIndex: a, slotCursor: c, slotsInSequence: u } = e[N(r)];
|
|
1390
1391
|
return {
|
|
1391
|
-
name:
|
|
1392
|
+
name: j(r, a),
|
|
1392
1393
|
value: Array.from(
|
|
1393
1394
|
{ length: u },
|
|
1394
|
-
(l, f) => `var(${
|
|
1395
|
+
(l, f) => `var(${j(r, c + f, !0)})`
|
|
1395
1396
|
).join(", ")
|
|
1396
1397
|
};
|
|
1397
1398
|
}), o = { key: e.key, childSelector: e.childSelector, declarations: i };
|
|
1398
|
-
return t && (o.media =
|
|
1399
|
+
return t && (o.media = ne(t, n || {}, "media"), o.selectorCondition = x(t, n || {})), o;
|
|
1399
1400
|
}
|
|
1400
|
-
function
|
|
1401
|
+
function ns(e, t, n, s = 0) {
|
|
1401
1402
|
if (e.length === 0)
|
|
1402
1403
|
return "";
|
|
1403
1404
|
const i = {
|
|
1404
1405
|
animation: t,
|
|
1405
1406
|
transition: n,
|
|
1406
1407
|
timeline: s
|
|
1407
|
-
}, o =
|
|
1408
|
+
}, o = we.filter((c) => i[N(c)] > 0);
|
|
1408
1409
|
if (o.length === 0)
|
|
1409
1410
|
return "";
|
|
1410
1411
|
const r = o.map((c) => ({
|
|
1411
1412
|
name: c,
|
|
1412
1413
|
value: Array.from(
|
|
1413
|
-
{ length: i[
|
|
1414
|
+
{ length: i[N(c)] },
|
|
1414
1415
|
// TODO: maybe add `-intrct` to names? --anm-0 or --trns-0 could collide with user-defined names
|
|
1415
|
-
(u, l) => `var(${
|
|
1416
|
+
(u, l) => `var(${j(c, l)})`
|
|
1416
1417
|
).join(", ")
|
|
1417
1418
|
}));
|
|
1418
1419
|
return `${e.map(
|
|
@@ -1422,27 +1423,27 @@ ${r.map(({ name: c, value: u }) => ` ${c}: ${u};`).join(`
|
|
|
1422
1423
|
`)}
|
|
1423
1424
|
}`;
|
|
1424
1425
|
}
|
|
1425
|
-
const
|
|
1426
|
+
const oe = {
|
|
1426
1427
|
rangeStart: { name: "cover", offset: { value: 0, unit: "percentage" } },
|
|
1427
1428
|
rangeEnd: { name: "cover", offset: { value: 100, unit: "percentage" } }
|
|
1428
1429
|
};
|
|
1429
|
-
function
|
|
1430
|
-
const n = e?.name ??
|
|
1430
|
+
function ss(e, t) {
|
|
1431
|
+
const n = e?.name ?? oe.rangeStart.name, s = t?.name ?? e?.name ?? oe.rangeEnd.name, i = {
|
|
1431
1432
|
name: n,
|
|
1432
|
-
offset: e?.offset ||
|
|
1433
|
+
offset: e?.offset || oe.rangeStart.offset
|
|
1433
1434
|
}, o = {
|
|
1434
1435
|
name: s,
|
|
1435
|
-
offset: t?.offset ||
|
|
1436
|
+
offset: t?.offset || oe.rangeEnd.offset
|
|
1436
1437
|
};
|
|
1437
1438
|
return { startOffset: i, endOffset: o };
|
|
1438
1439
|
}
|
|
1439
|
-
function
|
|
1440
|
+
function F(e) {
|
|
1440
1441
|
if ("keyframeEffect" in e && !e.keyframeEffect.name && "effectId" in e && (e.keyframeEffect.name = e.effectId), "duration" in e)
|
|
1441
1442
|
return {
|
|
1442
1443
|
id: "",
|
|
1443
1444
|
...e
|
|
1444
1445
|
};
|
|
1445
|
-
const { rangeStart: t, rangeEnd: n, ...s } = e, { startOffset: i, endOffset: o } =
|
|
1446
|
+
const { rangeStart: t, rangeEnd: n, ...s } = e, { startOffset: i, endOffset: o } = ss(t, n);
|
|
1446
1447
|
return {
|
|
1447
1448
|
id: "",
|
|
1448
1449
|
startOffset: i,
|
|
@@ -1450,11 +1451,11 @@ function L(e) {
|
|
|
1450
1451
|
...s
|
|
1451
1452
|
};
|
|
1452
1453
|
}
|
|
1453
|
-
function
|
|
1454
|
+
function M(e, t, n) {
|
|
1454
1455
|
let s = e.get(t);
|
|
1455
1456
|
s || (s = /* @__PURE__ */ new Set(), e.set(t, s)), s.add(n);
|
|
1456
1457
|
}
|
|
1457
|
-
function
|
|
1458
|
+
function se(e, t) {
|
|
1458
1459
|
e.get(t)?.forEach((s) => {
|
|
1459
1460
|
const { source: i, target: o, cleanup: r } = s;
|
|
1460
1461
|
r();
|
|
@@ -1462,15 +1463,15 @@ function te(e, t) {
|
|
|
1462
1463
|
e.get(a)?.delete(s);
|
|
1463
1464
|
}), e.delete(t);
|
|
1464
1465
|
}
|
|
1465
|
-
const
|
|
1466
|
+
const is = [
|
|
1466
1467
|
{ name: "visibility", value: "hidden" },
|
|
1467
1468
|
{ name: "clip-path", value: "none", important: !0 },
|
|
1468
1469
|
{ name: "transform", value: "none", important: !0 },
|
|
1469
1470
|
{ name: "translate", value: "none", important: !0 },
|
|
1470
1471
|
{ name: "scale", value: "none", important: !0 },
|
|
1471
1472
|
{ name: "rotate", value: "none", important: !0 }
|
|
1472
|
-
],
|
|
1473
|
-
function
|
|
1473
|
+
], Ae = { animation: !1, transition: !1, timeline: !1 };
|
|
1474
|
+
function Tt(e, t) {
|
|
1474
1475
|
const n = () => ({
|
|
1475
1476
|
listIndex: 0,
|
|
1476
1477
|
slotCursor: 0,
|
|
@@ -1481,6 +1482,7 @@ function yt(e, t) {
|
|
|
1481
1482
|
return {
|
|
1482
1483
|
key: e,
|
|
1483
1484
|
childSelector: t,
|
|
1485
|
+
partSelectors: /* @__PURE__ */ new Set(),
|
|
1484
1486
|
assigned: /* @__PURE__ */ new Set(),
|
|
1485
1487
|
animation: n(),
|
|
1486
1488
|
transition: n(),
|
|
@@ -1488,33 +1490,33 @@ function yt(e, t) {
|
|
|
1488
1490
|
keyframeEntries: /* @__PURE__ */ new Map()
|
|
1489
1491
|
};
|
|
1490
1492
|
}
|
|
1491
|
-
function
|
|
1493
|
+
function Ct(e, t) {
|
|
1492
1494
|
return Object.fromEntries(
|
|
1493
|
-
|
|
1494
|
-
const s =
|
|
1495
|
+
we.map((n) => {
|
|
1496
|
+
const s = N(n), { listIndex: i, slotCursor: o, slotsInSequence: r } = e[s];
|
|
1495
1497
|
return [
|
|
1496
1498
|
n,
|
|
1497
|
-
t[s] ?
|
|
1499
|
+
t[s] ? j(n, o + r, !0) : j(n, i)
|
|
1498
1500
|
];
|
|
1499
1501
|
})
|
|
1500
1502
|
);
|
|
1501
1503
|
}
|
|
1502
|
-
function
|
|
1503
|
-
|
|
1504
|
+
function Me(e, t, n) {
|
|
1505
|
+
He.forEach((s) => {
|
|
1504
1506
|
t[s] && (e[s].touched = !0, n[s] && (e[s].slotsInSequence += 1));
|
|
1505
1507
|
});
|
|
1506
1508
|
}
|
|
1507
|
-
function
|
|
1509
|
+
function Ot(e) {
|
|
1508
1510
|
const { namedEffect: t, keyframeEffect: n, transition: s, transitionProperties: i } = e;
|
|
1509
1511
|
return t || n ? "animation" : s || i ? "transition" : null;
|
|
1510
1512
|
}
|
|
1511
|
-
function
|
|
1513
|
+
function os(e) {
|
|
1512
1514
|
const t = /* @__PURE__ */ new Map();
|
|
1513
1515
|
return e.effects.forEach((n) => {
|
|
1514
|
-
const s =
|
|
1516
|
+
const s = Ot(n);
|
|
1515
1517
|
if (!s)
|
|
1516
1518
|
return;
|
|
1517
|
-
const i =
|
|
1519
|
+
const i = V(n), o = t.get(i) || { animation: 0, transition: 0, timeline: 0 };
|
|
1518
1520
|
o[s] += 1, t.set(i, o);
|
|
1519
1521
|
}), new Map(
|
|
1520
1522
|
[...t].map(([n, { animation: s, transition: i }]) => [
|
|
@@ -1523,31 +1525,31 @@ function es(e) {
|
|
|
1523
1525
|
])
|
|
1524
1526
|
);
|
|
1525
1527
|
}
|
|
1526
|
-
function
|
|
1527
|
-
|
|
1528
|
+
function rs(e) {
|
|
1529
|
+
He.forEach((t) => {
|
|
1528
1530
|
const n = e[t];
|
|
1529
1531
|
n.slotsInInteraction = Math.max(n.slotsInInteraction, n.slotsInSequence), n.slotsInSequence = 0;
|
|
1530
1532
|
});
|
|
1531
1533
|
}
|
|
1532
|
-
function
|
|
1533
|
-
|
|
1534
|
+
function as(e) {
|
|
1535
|
+
He.forEach((t) => {
|
|
1534
1536
|
const n = e[t];
|
|
1535
1537
|
n.listIndex += n.touched ? 1 : 0, n.slotCursor += n.slotsInInteraction, n.slotsInInteraction = 0, n.touched = !1;
|
|
1536
1538
|
});
|
|
1537
1539
|
}
|
|
1538
|
-
const
|
|
1540
|
+
const cs = {
|
|
1539
1541
|
animation: "animation",
|
|
1540
1542
|
"animation-composition": "composition",
|
|
1541
1543
|
"animation-timeline": "animationTimeline",
|
|
1542
1544
|
"animation-range": "animationRange"
|
|
1543
1545
|
};
|
|
1544
|
-
function
|
|
1545
|
-
const { key: i, conditions: o } = t, r =
|
|
1546
|
+
function ls(e, t, n, s) {
|
|
1547
|
+
const { key: i, conditions: o } = t, r = ne(o, e.configConditions, "media"), a = x(o, e.configConditions), c = W(t, {
|
|
1546
1548
|
asCombinator: !0,
|
|
1547
1549
|
useFirstChild: e.useFirstChild,
|
|
1548
1550
|
addItemFilter: !0
|
|
1549
|
-
}), u =
|
|
1550
|
-
return
|
|
1551
|
+
}), u = V(t), l = e.targetsMap.get(u) || Tt(i, c), f = Ct(l, Ae)["view-timeline"];
|
|
1552
|
+
return Me(l, { animation: !1, transition: !1, timeline: !0 }, Ae), e.targetsMap.set(u, l), s.add(u), {
|
|
1551
1553
|
key: i,
|
|
1552
1554
|
media: r,
|
|
1553
1555
|
selectorCondition: a,
|
|
@@ -1560,10 +1562,10 @@ function is(e, t, n, s) {
|
|
|
1560
1562
|
]
|
|
1561
1563
|
};
|
|
1562
1564
|
}
|
|
1563
|
-
function
|
|
1565
|
+
function _t(e, t, n, s, i) {
|
|
1564
1566
|
const o = [];
|
|
1565
1567
|
for (const r of Object.keys(i)) {
|
|
1566
|
-
const a = `${
|
|
1568
|
+
const a = `${ot}${r}`;
|
|
1567
1569
|
a in t && o.push(
|
|
1568
1570
|
...i[r](t[a], {
|
|
1569
1571
|
key: n,
|
|
@@ -1574,90 +1576,102 @@ function $t(e, t, n, s, i) {
|
|
|
1574
1576
|
}
|
|
1575
1577
|
return o;
|
|
1576
1578
|
}
|
|
1577
|
-
function
|
|
1578
|
-
const { assigned: r, childSelector: a } = n,
|
|
1579
|
-
key:
|
|
1580
|
-
effectId:
|
|
1581
|
-
conditions:
|
|
1582
|
-
namedEffect:
|
|
1583
|
-
keyframeEffect:
|
|
1584
|
-
transition:
|
|
1585
|
-
transitionProperties:
|
|
1586
|
-
initial:
|
|
1587
|
-
} = t,
|
|
1579
|
+
function us(e, t, n, s, i, o) {
|
|
1580
|
+
const { assigned: r, childSelector: a, partSelectors: c } = n, u = { animation: !1, transition: !1, timeline: !1 }, {
|
|
1581
|
+
key: l,
|
|
1582
|
+
effectId: f,
|
|
1583
|
+
conditions: d,
|
|
1584
|
+
namedEffect: h,
|
|
1585
|
+
keyframeEffect: m,
|
|
1586
|
+
transition: p,
|
|
1587
|
+
transitionProperties: v,
|
|
1588
|
+
initial: y
|
|
1589
|
+
} = t, g = ne(d, e.configConditions, "media"), E = x(d, e.configConditions), w = [
|
|
1588
1590
|
{
|
|
1589
|
-
key:
|
|
1590
|
-
media:
|
|
1591
|
-
selectorCondition:
|
|
1591
|
+
key: l,
|
|
1592
|
+
media: g,
|
|
1593
|
+
selectorCondition: E,
|
|
1592
1594
|
childSelector: a,
|
|
1593
1595
|
declarations: []
|
|
1594
1596
|
}
|
|
1595
1597
|
];
|
|
1596
|
-
let
|
|
1597
|
-
const { declarations:
|
|
1598
|
-
if (e.plugins &&
|
|
1599
|
-
const
|
|
1598
|
+
let b = [];
|
|
1599
|
+
const { declarations: S } = w[0];
|
|
1600
|
+
if (e.plugins && w.push(..._t("effect", t, l, g, e.plugins)), h || m) {
|
|
1601
|
+
const T = F(t), C = jn(null, T, s, o).filter(
|
|
1600
1602
|
(I) => I.name
|
|
1601
|
-
);
|
|
1602
|
-
|
|
1603
|
+
), _ = C.length ? {} : { "": [] };
|
|
1604
|
+
C.forEach((I) => {
|
|
1605
|
+
const k = I.part || "";
|
|
1606
|
+
(_[k] ||= []).push(I);
|
|
1607
|
+
}), b = C.map((I) => ({
|
|
1603
1608
|
name: I.name,
|
|
1604
1609
|
keyframes: I.keyframes
|
|
1605
|
-
})),
|
|
1610
|
+
})), S.push(
|
|
1606
1611
|
...C.flatMap(
|
|
1607
|
-
({ custom: I }) => Object.entries(I || {}).filter(([
|
|
1612
|
+
({ custom: I }) => Object.entries(I || {}).filter(([k, A]) => A !== void 0).map(([k, A]) => ({ name: k, value: A }))
|
|
1608
1613
|
)
|
|
1609
|
-
)
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1614
|
+
), Object.entries(_).forEach(([I, k]) => {
|
|
1615
|
+
const A = ke.map((P) => ({
|
|
1616
|
+
_listPropertyName: P,
|
|
1617
|
+
name: i[P],
|
|
1618
|
+
value: k.map((be) => {
|
|
1619
|
+
const Se = cs[P];
|
|
1620
|
+
return be[Se] || H[P];
|
|
1621
|
+
}).join(", ")
|
|
1622
|
+
})).filter(
|
|
1623
|
+
({ _listPropertyName: P, name: be, value: Se }) => Se !== H[P] || r.has(be)
|
|
1624
|
+
);
|
|
1625
|
+
A.forEach(({ name: P }) => r.add(P)), u.animation = u.animation || A.length > 0;
|
|
1626
|
+
const ie = I ? `[data-motion-part~="${I}"]` : a;
|
|
1627
|
+
I && A.length && c.add(ie), y ? (w.push({
|
|
1628
|
+
key: l,
|
|
1629
|
+
media: g,
|
|
1630
|
+
selectorCondition: E,
|
|
1631
|
+
childSelector: ie,
|
|
1632
|
+
declarations: is,
|
|
1633
|
+
selectorSuffix: ":not([data-interact-enter])"
|
|
1634
|
+
}), w.push({
|
|
1635
|
+
key: l,
|
|
1636
|
+
media: g,
|
|
1637
|
+
selectorCondition: E,
|
|
1638
|
+
childSelector: ie,
|
|
1639
|
+
declarations: A,
|
|
1640
|
+
selectorSuffix: ':not([data-interact-enter="done"])'
|
|
1641
|
+
})) : I ? w.push({
|
|
1642
|
+
key: l,
|
|
1643
|
+
media: g,
|
|
1644
|
+
selectorCondition: E,
|
|
1645
|
+
childSelector: ie,
|
|
1646
|
+
declarations: A
|
|
1647
|
+
}) : S.push(...A);
|
|
1648
|
+
});
|
|
1649
|
+
} else if (p || v) {
|
|
1650
|
+
const T = $t(t), C = bt(t);
|
|
1651
|
+
(C.length || r.has(i.transition)) && (S.push({
|
|
1638
1652
|
name: i.transition,
|
|
1639
|
-
value: C.join(", ") ||
|
|
1640
|
-
}), r.add(i.transition),
|
|
1641
|
-
key:
|
|
1642
|
-
media:
|
|
1643
|
-
selectorCondition:
|
|
1653
|
+
value: C.join(", ") || H.transition
|
|
1654
|
+
}), r.add(i.transition), u.transition = !0), w.push({
|
|
1655
|
+
key: l,
|
|
1656
|
+
media: g,
|
|
1657
|
+
selectorCondition: E,
|
|
1644
1658
|
childSelector: a,
|
|
1645
|
-
states: [
|
|
1646
|
-
declarations:
|
|
1659
|
+
states: [f],
|
|
1660
|
+
declarations: T
|
|
1647
1661
|
});
|
|
1648
1662
|
} else
|
|
1649
|
-
|
|
1650
|
-
...
|
|
1651
|
-
(
|
|
1652
|
-
).map((
|
|
1653
|
-
name: i[
|
|
1654
|
-
value:
|
|
1663
|
+
S.push(
|
|
1664
|
+
...ke.filter(
|
|
1665
|
+
(T) => r.has(i[T])
|
|
1666
|
+
).map((T) => ({
|
|
1667
|
+
name: i[T],
|
|
1668
|
+
value: H[T]
|
|
1655
1669
|
}))
|
|
1656
1670
|
);
|
|
1657
|
-
return { rules:
|
|
1671
|
+
return { rules: w.filter((T) => T.declarations.length), keyframes: b, wrote: u };
|
|
1658
1672
|
}
|
|
1659
|
-
function
|
|
1660
|
-
const s = t.namedEffect &&
|
|
1673
|
+
function fs(e, t, n) {
|
|
1674
|
+
const s = t.namedEffect && je(t.namedEffect.type, !1);
|
|
1661
1675
|
if (!s?.getNames)
|
|
1662
1676
|
return;
|
|
1663
1677
|
const i = (r) => s.getNames({ ...t, suffix: r });
|
|
@@ -1666,28 +1680,28 @@ function rs(e, t, n) {
|
|
|
1666
1680
|
const o = e.keyframeEntries.get(n) || [];
|
|
1667
1681
|
e.keyframeEntries.set(n, [...o, { slotKey: t.slotKey, getNames: i }]);
|
|
1668
1682
|
}
|
|
1669
|
-
function
|
|
1670
|
-
const r =
|
|
1683
|
+
function kt(e, t, n, s, i, o) {
|
|
1684
|
+
const r = V(t), a = e.targetsMap.get(r) || Tt(
|
|
1671
1685
|
t.key,
|
|
1672
|
-
|
|
1686
|
+
W(t, {
|
|
1673
1687
|
asCombinator: !0,
|
|
1674
1688
|
useFirstChild: e.useFirstChild,
|
|
1675
1689
|
addItemFilter: !0
|
|
1676
1690
|
})
|
|
1677
1691
|
);
|
|
1678
1692
|
s.add(r);
|
|
1679
|
-
const c = o?.get(r) ||
|
|
1693
|
+
const c = o?.get(r) || Ae, u = Ct(a, c);
|
|
1680
1694
|
if (e.collectSlots) {
|
|
1681
|
-
|
|
1682
|
-
const h =
|
|
1683
|
-
return
|
|
1695
|
+
fs(a, t, u.animation);
|
|
1696
|
+
const h = Ot(t);
|
|
1697
|
+
return Me(
|
|
1684
1698
|
a,
|
|
1685
1699
|
{ animation: h === "animation", transition: h === "transition", timeline: !1 },
|
|
1686
1700
|
c
|
|
1687
1701
|
), e.targetsMap.set(r, a), [];
|
|
1688
1702
|
}
|
|
1689
1703
|
t.namedEffect && (t.suffix = e.keyframeSlots.get(t.slotKey));
|
|
1690
|
-
const { rules: l, keyframes: f, wrote: d } =
|
|
1704
|
+
const { rules: l, keyframes: f, wrote: d } = us(
|
|
1691
1705
|
e,
|
|
1692
1706
|
t,
|
|
1693
1707
|
a,
|
|
@@ -1695,86 +1709,86 @@ function bt(e, t, n, s, i, o) {
|
|
|
1695
1709
|
u,
|
|
1696
1710
|
i
|
|
1697
1711
|
);
|
|
1698
|
-
return f.forEach(({ name: h, keyframes: m }) => e.keyframesMap.set(h, m)),
|
|
1712
|
+
return f.forEach(({ name: h, keyframes: m }) => e.keyframesMap.set(h, m)), Me(a, d, c), e.targetsMap.set(r, a), l;
|
|
1699
1713
|
}
|
|
1700
|
-
function
|
|
1701
|
-
const i = [], o = /* @__PURE__ */ new Set(), r =
|
|
1714
|
+
function ds(e, t, n, s) {
|
|
1715
|
+
const i = [], o = /* @__PURE__ */ new Set(), r = os(t);
|
|
1702
1716
|
i.push(
|
|
1703
1717
|
...t.effects.flatMap(
|
|
1704
|
-
(c) =>
|
|
1718
|
+
(c) => kt(e, c, n, o, t, r)
|
|
1705
1719
|
)
|
|
1706
1720
|
);
|
|
1707
1721
|
const { conditions: a } = t;
|
|
1708
1722
|
return o.forEach((c) => {
|
|
1709
1723
|
s.add(c);
|
|
1710
|
-
const u = e.targetsMap.get(c), l =
|
|
1711
|
-
l && (l.declarations.forEach(({ name: f }) => u.assigned.add(f)), i.push(l)),
|
|
1724
|
+
const u = e.targetsMap.get(c), l = ts(u, a, e.configConditions);
|
|
1725
|
+
l && (l.declarations.forEach(({ name: f }) => u.assigned.add(f)), i.push(l)), rs(u);
|
|
1712
1726
|
}), i;
|
|
1713
1727
|
}
|
|
1714
|
-
function
|
|
1715
|
-
const { key: s, conditions: i, effects: o = [], sequences: r = [] } = t, a = e.plugins ?
|
|
1728
|
+
function hs(e, t, n) {
|
|
1729
|
+
const { key: s, conditions: i, effects: o = [], sequences: r = [] } = t, a = e.plugins ? _t(
|
|
1716
1730
|
"interaction",
|
|
1717
1731
|
t,
|
|
1718
1732
|
s,
|
|
1719
|
-
|
|
1733
|
+
ne(i, e.configConditions, "media"),
|
|
1720
1734
|
e.plugins
|
|
1721
1735
|
) : [], { trigger: c } = t, u = {
|
|
1722
|
-
trigger:
|
|
1736
|
+
trigger: Kn(c),
|
|
1723
1737
|
id: ["trigger", n].join("-")
|
|
1724
1738
|
}, l = /* @__PURE__ */ new Set();
|
|
1725
|
-
c === "viewProgress" && a.push(
|
|
1739
|
+
c === "viewProgress" && a.push(ls(e, t, u.id, l));
|
|
1726
1740
|
const f = o.map((h, m) => {
|
|
1727
|
-
const p =
|
|
1741
|
+
const p = It(
|
|
1728
1742
|
h,
|
|
1729
1743
|
t,
|
|
1730
1744
|
e.config,
|
|
1731
1745
|
`eff-${n}-${m}`
|
|
1732
1746
|
);
|
|
1733
|
-
return p && Object.assign(p, { slotKey:
|
|
1747
|
+
return p && Object.assign(p, { slotKey: pe(n, m) });
|
|
1734
1748
|
}).filter((h) => h !== null);
|
|
1735
1749
|
a.push(
|
|
1736
|
-
...f.flatMap((h) =>
|
|
1750
|
+
...f.flatMap((h) => kt(e, h, u, l))
|
|
1737
1751
|
);
|
|
1738
1752
|
const d = r.map(
|
|
1739
|
-
(h, m) =>
|
|
1753
|
+
(h, m) => Bn(
|
|
1740
1754
|
h,
|
|
1741
1755
|
t,
|
|
1742
1756
|
e.config,
|
|
1743
1757
|
`seq-${n}-${m}`,
|
|
1744
|
-
(p) =>
|
|
1758
|
+
(p) => pe(n, p, m)
|
|
1745
1759
|
)
|
|
1746
1760
|
).filter((h) => h !== null);
|
|
1747
1761
|
return a.push(
|
|
1748
1762
|
...d.flatMap(
|
|
1749
|
-
(h) =>
|
|
1763
|
+
(h) => ds(e, h, u, l)
|
|
1750
1764
|
)
|
|
1751
|
-
), c === "viewProgress" && l.size > 1 && e.scopedTimelines.push(`--${u.id}`), l.forEach((h) =>
|
|
1765
|
+
), c === "viewProgress" && l.size > 1 && e.scopedTimelines.push(`--${u.id}`), l.forEach((h) => as(e.targetsMap.get(h))), a;
|
|
1752
1766
|
}
|
|
1753
|
-
function
|
|
1767
|
+
function ms(e = {}) {
|
|
1754
1768
|
const { useFirstChild: t = !0, plugins: n } = typeof e == "boolean" ? { useFirstChild: e, plugins: void 0 } : e;
|
|
1755
1769
|
return { useFirstChild: t, plugins: n };
|
|
1756
1770
|
}
|
|
1757
|
-
function
|
|
1771
|
+
function At(e, t) {
|
|
1758
1772
|
const { useFirstChild: n = !0, plugins: s, collectSlots: i = !1 } = t, o = {
|
|
1759
1773
|
config: e,
|
|
1760
1774
|
configConditions: e.conditions || {},
|
|
1761
1775
|
targetsMap: /* @__PURE__ */ new Map(),
|
|
1762
1776
|
keyframesMap: /* @__PURE__ */ new Map(),
|
|
1763
|
-
keyframeSlots: i ? /* @__PURE__ */ new Map() :
|
|
1777
|
+
keyframeSlots: i ? /* @__PURE__ */ new Map() : Mt(e),
|
|
1764
1778
|
scopedTimelines: [],
|
|
1765
1779
|
collectSlots: i,
|
|
1766
1780
|
useFirstChild: n,
|
|
1767
1781
|
plugins: s
|
|
1768
1782
|
}, r = e.interactions.flatMap(
|
|
1769
|
-
(a, c) =>
|
|
1783
|
+
(a, c) => hs(o, a, c)
|
|
1770
1784
|
);
|
|
1771
1785
|
return { ctx: o, cssRules: r };
|
|
1772
1786
|
}
|
|
1773
|
-
function
|
|
1787
|
+
function pe(e, t, n) {
|
|
1774
1788
|
return [e, n, t].filter((s) => s !== void 0).join(":");
|
|
1775
1789
|
}
|
|
1776
|
-
function
|
|
1777
|
-
const { ctx: t } =
|
|
1790
|
+
function Mt(e) {
|
|
1791
|
+
const { ctx: t } = At(e, { collectSlots: !0 }), n = /* @__PURE__ */ new Map(), s = (i) => i ? `-${i}` : void 0;
|
|
1778
1792
|
return t.targetsMap.forEach(({ keyframeEntries: i }) => {
|
|
1779
1793
|
const o = /* @__PURE__ */ new Set();
|
|
1780
1794
|
i.forEach((r) => {
|
|
@@ -1786,11 +1800,19 @@ function It(e) {
|
|
|
1786
1800
|
});
|
|
1787
1801
|
}), n;
|
|
1788
1802
|
}
|
|
1789
|
-
function
|
|
1790
|
-
const { ctx: n, cssRules: s } =
|
|
1803
|
+
function ps(e, t) {
|
|
1804
|
+
const { ctx: n, cssRules: s } = At(e, ms(t)), i = [...n.targetsMap.values()], o = Math.max(0, ...i.map(({ animation: h }) => h.listIndex)), r = Math.max(0, ...i.map(({ transition: h }) => h.listIndex)), a = Math.max(0, ...i.map(({ timeline: h }) => h.listIndex)), c = ns(
|
|
1805
|
+
i.flatMap((h) => [
|
|
1806
|
+
h,
|
|
1807
|
+
...[...h.partSelectors].map((m) => ({ key: h.key, childSelector: m }))
|
|
1808
|
+
]),
|
|
1809
|
+
o,
|
|
1810
|
+
r,
|
|
1811
|
+
a
|
|
1812
|
+
), u = Math.max(0, ...i.map(({ animation: h }) => h.slotCursor)), l = Math.max(
|
|
1791
1813
|
0,
|
|
1792
1814
|
...i.map(({ transition: h }) => h.slotCursor)
|
|
1793
|
-
), f =
|
|
1815
|
+
), f = es(
|
|
1794
1816
|
o,
|
|
1795
1817
|
r,
|
|
1796
1818
|
u,
|
|
@@ -1801,140 +1823,140 @@ function us(e, t) {
|
|
|
1801
1823
|
}` : "";
|
|
1802
1824
|
return { keyframes: n.keyframesMap, atProperty: f, cssRules: s, listsRule: c, timelineScopeRule: d };
|
|
1803
1825
|
}
|
|
1804
|
-
function
|
|
1805
|
-
const { cssRules: n, keyframes: s, atProperty: i, listsRule: o, timelineScopeRule: r } =
|
|
1826
|
+
function xi(e, t) {
|
|
1827
|
+
const { cssRules: n, keyframes: s, atProperty: i, listsRule: o, timelineScopeRule: r } = ps(
|
|
1806
1828
|
e,
|
|
1807
1829
|
t
|
|
1808
1830
|
);
|
|
1809
1831
|
return [
|
|
1810
1832
|
...i,
|
|
1811
|
-
...[...s.entries()].map(([c, u]) =>
|
|
1812
|
-
...n.map(
|
|
1833
|
+
...[...s.entries()].map(([c, u]) => Zn(c, u)),
|
|
1834
|
+
...n.map(Jn),
|
|
1813
1835
|
o,
|
|
1814
1836
|
r
|
|
1815
1837
|
].filter((c) => c).join(`
|
|
1816
1838
|
`);
|
|
1817
1839
|
}
|
|
1818
|
-
const
|
|
1840
|
+
const gs = {
|
|
1819
1841
|
root: null,
|
|
1820
1842
|
rootMargin: "0px 0px -10% 0px",
|
|
1821
1843
|
threshold: [0]
|
|
1822
|
-
},
|
|
1844
|
+
}, vs = {
|
|
1823
1845
|
root: null,
|
|
1824
1846
|
rootMargin: "0px",
|
|
1825
1847
|
threshold: [0]
|
|
1826
|
-
},
|
|
1827
|
-
function
|
|
1848
|
+
}, ys = 0.2;
|
|
1849
|
+
function Es(e) {
|
|
1828
1850
|
const t = e.trim().split(/\s+/), n = t[0], s = t.length > 1 ? t[1] : t[0], i = (o) => o.startsWith("-") ? o.slice(1) : parseFloat(o) ? `-${o}` : o;
|
|
1829
1851
|
return `${i(n)} 0px ${i(s)}`;
|
|
1830
1852
|
}
|
|
1831
|
-
const
|
|
1832
|
-
let
|
|
1833
|
-
function
|
|
1834
|
-
|
|
1853
|
+
const Q = {}, R = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakSet(), Y = /* @__PURE__ */ new WeakMap();
|
|
1854
|
+
let qt = {}, B = null;
|
|
1855
|
+
function ws(e) {
|
|
1856
|
+
qt = e;
|
|
1835
1857
|
}
|
|
1836
|
-
function
|
|
1837
|
-
|
|
1858
|
+
function Pt(e, t, n) {
|
|
1859
|
+
R.get(e)?.forEach(({ source: i, handler: o }) => {
|
|
1838
1860
|
i === e && o(t, n);
|
|
1839
1861
|
});
|
|
1840
1862
|
}
|
|
1841
|
-
function
|
|
1842
|
-
return
|
|
1863
|
+
function Ue() {
|
|
1864
|
+
return B || (B = new IntersectionObserver((e) => {
|
|
1843
1865
|
e.forEach((t) => {
|
|
1844
1866
|
const n = t.target;
|
|
1845
|
-
t.isIntersecting ||
|
|
1867
|
+
t.isIntersecting || Pt(n, !1, !0);
|
|
1846
1868
|
});
|
|
1847
|
-
},
|
|
1869
|
+
}, vs), B);
|
|
1848
1870
|
}
|
|
1849
|
-
function
|
|
1871
|
+
function Lt(e, t = !1) {
|
|
1850
1872
|
const n = JSON.stringify({ ...e, isSafeMode: t });
|
|
1851
|
-
if (
|
|
1852
|
-
return
|
|
1853
|
-
const s = e.threshold ??
|
|
1873
|
+
if (Q[n])
|
|
1874
|
+
return Q[n];
|
|
1875
|
+
const s = e.threshold ?? ys, i = t ? gs : {
|
|
1854
1876
|
root: null,
|
|
1855
|
-
rootMargin: e.inset ?
|
|
1877
|
+
rootMargin: e.inset ? Es(e.inset) : "0px",
|
|
1856
1878
|
threshold: s
|
|
1857
1879
|
}, o = new IntersectionObserver((r) => {
|
|
1858
1880
|
r.forEach((a) => {
|
|
1859
|
-
const c = a.target, u = !
|
|
1860
|
-
if (u && (
|
|
1861
|
-
|
|
1881
|
+
const c = a.target, u = !ge.has(c);
|
|
1882
|
+
if (u && (ge.add(c), e.useSafeViewEnter && !a.isIntersecting)) {
|
|
1883
|
+
O.measure(() => {
|
|
1862
1884
|
const l = a.boundingClientRect.height, f = a.rootBounds?.height;
|
|
1863
1885
|
if (!f)
|
|
1864
1886
|
return;
|
|
1865
1887
|
const d = Array.isArray(e.threshold) ? Math.min(...e.threshold) : e.threshold;
|
|
1866
|
-
d && l * d > f &&
|
|
1888
|
+
d && l * d > f && O.mutate(() => {
|
|
1867
1889
|
o.unobserve(c);
|
|
1868
|
-
const m =
|
|
1869
|
-
|
|
1890
|
+
const m = Lt(e, !0);
|
|
1891
|
+
Y.set(c, m), m.observe(c);
|
|
1870
1892
|
});
|
|
1871
1893
|
});
|
|
1872
1894
|
return;
|
|
1873
1895
|
}
|
|
1874
|
-
(a.isIntersecting || !u) &&
|
|
1896
|
+
(a.isIntersecting || !u) && Pt(c, a.isIntersecting);
|
|
1875
1897
|
});
|
|
1876
1898
|
}, i);
|
|
1877
|
-
return
|
|
1899
|
+
return Q[n] = o, o;
|
|
1878
1900
|
}
|
|
1879
|
-
function
|
|
1880
|
-
const a = { ...
|
|
1901
|
+
function $s(e, t, n, s = {}, { reducedMotion: i, selectorCondition: o, animation: r } = {}) {
|
|
1902
|
+
const a = { ...qt, ...s }, c = n.triggerType || "once", u = r || te(
|
|
1881
1903
|
t,
|
|
1882
|
-
|
|
1904
|
+
F(n),
|
|
1883
1905
|
void 0,
|
|
1884
1906
|
i
|
|
1885
1907
|
);
|
|
1886
1908
|
if (!u)
|
|
1887
1909
|
return;
|
|
1888
|
-
const l =
|
|
1910
|
+
const l = Lt(a);
|
|
1889
1911
|
c !== "once" && u.persist?.();
|
|
1890
1912
|
let f = !0, d = !1, h;
|
|
1891
|
-
h = { source: e, target: t, handler: (
|
|
1913
|
+
h = { source: e, target: t, handler: (v, y) => {
|
|
1892
1914
|
if (!(o && !t.matches(o)))
|
|
1893
1915
|
if (c === "once") {
|
|
1894
|
-
if (
|
|
1916
|
+
if (v && !d) {
|
|
1895
1917
|
d = !0;
|
|
1896
|
-
const
|
|
1897
|
-
(!
|
|
1898
|
-
|
|
1918
|
+
const g = R.get(e);
|
|
1919
|
+
(!g || g.size === 0 || g.size === 1 && g.has(h)) && ((Y.get(e) || l).unobserve(e), ge.delete(e)), u.onFinish(() => {
|
|
1920
|
+
R.get(e)?.delete(h), R.get(t)?.delete(h);
|
|
1899
1921
|
}), u.play(() => {
|
|
1900
1922
|
const E = () => {
|
|
1901
1923
|
t.dataset.interactEnter = "start";
|
|
1902
1924
|
};
|
|
1903
1925
|
if (u.isCSS) {
|
|
1904
|
-
|
|
1926
|
+
O.mutate(() => {
|
|
1905
1927
|
requestAnimationFrame(E);
|
|
1906
1928
|
});
|
|
1907
|
-
const
|
|
1908
|
-
|
|
1929
|
+
const w = () => {
|
|
1930
|
+
O.mutate(() => {
|
|
1909
1931
|
t.dataset.interactEnter = "done";
|
|
1910
1932
|
});
|
|
1911
1933
|
};
|
|
1912
|
-
u.onFinish(
|
|
1934
|
+
u.onFinish(w), u.onAbort(w);
|
|
1913
1935
|
} else
|
|
1914
|
-
|
|
1936
|
+
O.mutate(E);
|
|
1915
1937
|
});
|
|
1916
1938
|
}
|
|
1917
|
-
} else c === "alternate" ? f &&
|
|
1939
|
+
} else c === "alternate" ? f && v ? (f = !1, u.play()) : f || u.reverse() : c === "repeat" ? v ? (u.progress(0), u.play()) : y && (u.pause(), u.progress(0)) : c === "state" && (v ? u.play() : y && u.pause());
|
|
1918
1940
|
}, cleanup: () => {
|
|
1919
|
-
(
|
|
1920
|
-
} },
|
|
1941
|
+
(Y.get(e) || l).unobserve(e), (c === "repeat" || c === "state") && Ue().unobserve(e), u.cancel(), ge.delete(e), Y.delete(e);
|
|
1942
|
+
} }, M(R, e, h), M(R, t, h), Y.set(e, l), l.observe(e), (c === "repeat" || c === "state") && Ue().observe(e);
|
|
1921
1943
|
}
|
|
1922
|
-
function
|
|
1923
|
-
|
|
1944
|
+
function bs(e) {
|
|
1945
|
+
se(R, e);
|
|
1924
1946
|
}
|
|
1925
|
-
function
|
|
1926
|
-
|
|
1947
|
+
function Ss() {
|
|
1948
|
+
B = null, Object.keys(Q).forEach((e) => delete Q[e]);
|
|
1927
1949
|
}
|
|
1928
|
-
const
|
|
1929
|
-
add:
|
|
1930
|
-
remove:
|
|
1931
|
-
setOptions:
|
|
1932
|
-
reset:
|
|
1950
|
+
const Is = {
|
|
1951
|
+
add: $s,
|
|
1952
|
+
remove: bs,
|
|
1953
|
+
setOptions: ws,
|
|
1954
|
+
reset: Ss
|
|
1933
1955
|
};
|
|
1934
|
-
function
|
|
1956
|
+
function xt(e, t) {
|
|
1935
1957
|
return Object.assign(Object.create(t), e);
|
|
1936
1958
|
}
|
|
1937
|
-
function
|
|
1959
|
+
function Ts(e, t, n, s) {
|
|
1938
1960
|
let i = e * (1 - n) + t * n;
|
|
1939
1961
|
if (s) {
|
|
1940
1962
|
const o = i - e;
|
|
@@ -1945,7 +1967,7 @@ function ws(e, t, n, s) {
|
|
|
1945
1967
|
}
|
|
1946
1968
|
return i;
|
|
1947
1969
|
}
|
|
1948
|
-
function
|
|
1970
|
+
function Cs(e) {
|
|
1949
1971
|
let t = !1;
|
|
1950
1972
|
return function() {
|
|
1951
1973
|
t || (t = !0, window.requestAnimationFrame(() => {
|
|
@@ -1953,7 +1975,7 @@ function $s(e) {
|
|
|
1953
1975
|
}));
|
|
1954
1976
|
};
|
|
1955
1977
|
}
|
|
1956
|
-
function
|
|
1978
|
+
function Qe(e, t) {
|
|
1957
1979
|
let n = 0;
|
|
1958
1980
|
return function() {
|
|
1959
1981
|
n && window.clearTimeout(n), n = window.setTimeout(() => {
|
|
@@ -1961,19 +1983,19 @@ function We(e, t) {
|
|
|
1961
1983
|
}, t);
|
|
1962
1984
|
};
|
|
1963
1985
|
}
|
|
1964
|
-
function
|
|
1986
|
+
function Os(e, t) {
|
|
1965
1987
|
const n = e.match(/^calc\s*\(\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\+\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\)\s*$/);
|
|
1966
|
-
return
|
|
1988
|
+
return ve(n[1], t) + ve(n[6], t);
|
|
1967
1989
|
}
|
|
1968
|
-
function
|
|
1969
|
-
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) ?
|
|
1990
|
+
function ve(e, t) {
|
|
1991
|
+
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) ? Os(e, t) : parseInt(e) || 0 : 0;
|
|
1970
1992
|
}
|
|
1971
|
-
function
|
|
1993
|
+
function z(e, t, n) {
|
|
1972
1994
|
const { name: s, offset: i = 0 } = e, { start: o, end: r } = n, a = r - o, c = i / 100;
|
|
1973
1995
|
let u, l;
|
|
1974
1996
|
return s === "entry" ? (u = o - t, l = Math.min(t, a)) : s === "entry-crossing" ? (u = o - t, l = a) : s === "contain" ? (u = Math.min(r - t, o), l = Math.abs(t - a)) : s === "exit" ? (u = Math.max(o, r - t), l = Math.min(t, a)) : s === "exit-crossing" ? (u = o, l = a) : s === "cover" && (u = o - t, l = a + t), u + c * l | 0;
|
|
1975
1997
|
}
|
|
1976
|
-
function
|
|
1998
|
+
function Te(e, t, n, s, i) {
|
|
1977
1999
|
let o = 0;
|
|
1978
2000
|
const r = { start: t, end: n };
|
|
1979
2001
|
return e.forEach((a, c) => {
|
|
@@ -1982,8 +2004,8 @@ function we(e, t, n, s, i) {
|
|
|
1982
2004
|
if (u) {
|
|
1983
2005
|
if ("end" in u && e[c - 1]?.element) {
|
|
1984
2006
|
const d = ((i ? a.element.offsetWidth : a.element.offsetHeight) || 0) + u.end - s, h = o + d - a.offset, m = h < r.start, p = !m && h <= n;
|
|
1985
|
-
let
|
|
1986
|
-
(m || p) && (
|
|
2007
|
+
let v = 0;
|
|
2008
|
+
(m || p) && (v = a.offset, r.end += v), m && (r.start += v);
|
|
1987
2009
|
}
|
|
1988
2010
|
if ("start" in u) {
|
|
1989
2011
|
const l = o - u.start, f = l < r.start, d = !f && l <= r.end;
|
|
@@ -1991,8 +2013,8 @@ function we(e, t, n, s, i) {
|
|
|
1991
2013
|
const m = e[c - 1]?.element;
|
|
1992
2014
|
if (m) {
|
|
1993
2015
|
if (f || d) {
|
|
1994
|
-
const p = (i ? m.offsetWidth : m.offsetHeight) || 0,
|
|
1995
|
-
h = p - (
|
|
2016
|
+
const p = (i ? m.offsetWidth : m.offsetHeight) || 0, v = a.offset, y = (i ? a.element.offsetWidth : a.element.offsetHeight) || 0;
|
|
2017
|
+
h = p - (v + y), o += h, r.end += h;
|
|
1996
2018
|
}
|
|
1997
2019
|
f && (r.start += h);
|
|
1998
2020
|
}
|
|
@@ -2000,55 +2022,55 @@ function we(e, t, n, s, i) {
|
|
|
2000
2022
|
}
|
|
2001
2023
|
}), r;
|
|
2002
2024
|
}
|
|
2003
|
-
function
|
|
2025
|
+
function _s(e, t, n, s, i, o) {
|
|
2004
2026
|
const { start: r, end: a, duration: c } = e;
|
|
2005
2027
|
let u = r, l = a, f = e.startRange, d = e.endRange, h;
|
|
2006
2028
|
if (typeof c == "string") {
|
|
2007
|
-
f = { name: c, offset: 0 }, d = { name: c, offset: 100 }, u =
|
|
2008
|
-
const m =
|
|
2029
|
+
f = { name: c, offset: 0 }, d = { name: c, offset: 100 }, u = z(f, n, t), l = z(d, n, t), h = l - u;
|
|
2030
|
+
const m = Te(o, u, l, n, s);
|
|
2009
2031
|
u = m.start, l = m.end;
|
|
2010
2032
|
} else {
|
|
2011
2033
|
if (f || r?.name) {
|
|
2012
2034
|
f = f || r;
|
|
2013
|
-
const m =
|
|
2035
|
+
const m = ve(f.add, i), p = z({ ...f, offset: 0 }, n, t), v = z({ ...f, offset: 100 }, n, t), y = Te(o, p, v, n, s);
|
|
2014
2036
|
u = y.start + f.offset / 100 * (y.end - y.start) + m;
|
|
2015
2037
|
}
|
|
2016
2038
|
if (d || a?.name) {
|
|
2017
2039
|
d = d || a;
|
|
2018
|
-
const m =
|
|
2040
|
+
const m = ve(d.add, i), p = z({ ...d, offset: 0 }, n, t), v = z({ ...d, offset: 100 }, n, t), y = Te(o, p, v, n, s);
|
|
2019
2041
|
l = y.start + d.offset / 100 * (y.end - y.start) + m;
|
|
2020
2042
|
} else typeof c == "number" && (l = u + c);
|
|
2021
2043
|
}
|
|
2022
2044
|
return !h && !c && (h = l - u), { ...e, start: u, end: l, startRange: f, endRange: d, duration: h || c };
|
|
2023
2045
|
}
|
|
2024
|
-
function
|
|
2046
|
+
function ks(e) {
|
|
2025
2047
|
return e.position === "sticky";
|
|
2026
2048
|
}
|
|
2027
|
-
function
|
|
2049
|
+
function As(e, t, n) {
|
|
2028
2050
|
return e.position === "fixed" && (!t || t === window.document.body || t === n);
|
|
2029
2051
|
}
|
|
2030
|
-
function
|
|
2052
|
+
function Ms(e, t) {
|
|
2031
2053
|
return parseInt(t ? e.left : e.top);
|
|
2032
2054
|
}
|
|
2033
|
-
function
|
|
2055
|
+
function qs(e, t) {
|
|
2034
2056
|
return parseInt(t ? e.right : e.bottom);
|
|
2035
2057
|
}
|
|
2036
|
-
function
|
|
2058
|
+
function Ps(e, t, n) {
|
|
2037
2059
|
n && (e.style.position = "static");
|
|
2038
2060
|
const s = (t ? e.offsetLeft : e.offsetTop) || 0;
|
|
2039
2061
|
return n && (e.style.position = null), s;
|
|
2040
2062
|
}
|
|
2041
|
-
function
|
|
2063
|
+
function Ls(e, t) {
|
|
2042
2064
|
let n;
|
|
2043
|
-
const s =
|
|
2065
|
+
const s = Ms(e, t), i = qs(e, t), o = !isNaN(s), r = !isNaN(i);
|
|
2044
2066
|
return (o || r) && (n = {}, o && (n.start = s), r && (n.end = i)), n;
|
|
2045
2067
|
}
|
|
2046
|
-
function
|
|
2068
|
+
function re(e, t, n, s, i) {
|
|
2047
2069
|
const o = e[0].viewSource, r = [];
|
|
2048
2070
|
let a = (s ? o.offsetWidth : o.offsetHeight) || 0, c = 0, u = o;
|
|
2049
2071
|
for (; u; ) {
|
|
2050
|
-
const f = window.getComputedStyle(u), d =
|
|
2051
|
-
if ((!h || !("end" in h)) && (c += m), r.push({ element: u, offset: m, sticky: h }), u = u.offsetParent,
|
|
2072
|
+
const f = window.getComputedStyle(u), d = ks(f), h = d ? Ls(f, s) : void 0, m = Ps(u, s, d);
|
|
2073
|
+
if ((!h || !("end" in h)) && (c += m), r.push({ element: u, offset: m, sticky: h }), u = u.offsetParent, As(f, u, t))
|
|
2052
2074
|
break;
|
|
2053
2075
|
if (u === t) {
|
|
2054
2076
|
r.push({ element: u, offset: 0 });
|
|
@@ -2056,7 +2078,7 @@ function se(e, t, n, s, i) {
|
|
|
2056
2078
|
}
|
|
2057
2079
|
}
|
|
2058
2080
|
return r.reverse(), e.map((f) => ({
|
|
2059
|
-
...
|
|
2081
|
+
..._s(
|
|
2060
2082
|
f,
|
|
2061
2083
|
{ start: c, end: c + a },
|
|
2062
2084
|
n,
|
|
@@ -2066,7 +2088,7 @@ function se(e, t, n, s, i) {
|
|
|
2066
2088
|
)
|
|
2067
2089
|
}));
|
|
2068
2090
|
}
|
|
2069
|
-
const
|
|
2091
|
+
const Xe = 100, xs = {
|
|
2070
2092
|
horizontal: !1,
|
|
2071
2093
|
observeViewportEntry: !0,
|
|
2072
2094
|
viewportRootMargin: "7% 7%",
|
|
@@ -2074,74 +2096,74 @@ const Ve = 100, ks = {
|
|
|
2074
2096
|
observeSourcesResize: !1,
|
|
2075
2097
|
observeContentResize: !1
|
|
2076
2098
|
};
|
|
2077
|
-
function
|
|
2099
|
+
function Fs(e, t, n, s) {
|
|
2078
2100
|
let i = 0;
|
|
2079
2101
|
return e >= t && e <= n ? i = s ? (e - t) / s : 1 : e > n && (i = 1), i;
|
|
2080
2102
|
}
|
|
2081
|
-
function
|
|
2103
|
+
function Ze(e, t) {
|
|
2082
2104
|
return e === window ? t ? window.document.documentElement.clientWidth : window.document.documentElement.clientHeight : t ? e.clientWidth : e.clientHeight;
|
|
2083
2105
|
}
|
|
2084
|
-
function
|
|
2106
|
+
function Rs() {
|
|
2085
2107
|
return {
|
|
2086
2108
|
viewportWidth: window.document.documentElement.clientWidth,
|
|
2087
2109
|
viewportHeight: window.document.documentElement.clientHeight
|
|
2088
2110
|
};
|
|
2089
2111
|
}
|
|
2090
|
-
function
|
|
2091
|
-
const t =
|
|
2092
|
-
let o =
|
|
2093
|
-
const f = [], d =
|
|
2112
|
+
function Ns(e) {
|
|
2113
|
+
const t = xt(e, xs), n = t.root, s = t.horizontal, i = /* @__PURE__ */ new WeakMap();
|
|
2114
|
+
let o = Ze(n, s), r, a, c, u, l;
|
|
2115
|
+
const f = [], d = Rs();
|
|
2094
2116
|
if (t.scenes = Object.values(
|
|
2095
2117
|
// TODO(ameerf): find a polyfill and use groupBy instead of following reduce
|
|
2096
2118
|
e.scenes.reduce(
|
|
2097
|
-
(p,
|
|
2098
|
-
const
|
|
2099
|
-
return p[
|
|
2119
|
+
(p, v, y) => {
|
|
2120
|
+
const g = v.groupId ? `group-${v.groupId}` : String(y);
|
|
2121
|
+
return p[g] ? p[g].push(v) : p[g] = [v], p;
|
|
2100
2122
|
},
|
|
2101
2123
|
{}
|
|
2102
2124
|
)
|
|
2103
|
-
).flatMap((p) => (p.every((
|
|
2104
|
-
|
|
2105
|
-
}), p)), t.scenes.forEach((p,
|
|
2106
|
-
p.index =
|
|
2125
|
+
).flatMap((p) => (p.every((v) => v.viewSource && (typeof v.duration == "string" || v.start?.name)) ? (p = re(p, n, o, s, d), (t.observeSourcesResize || t.observeContentResize) && f.push(p)) : p.forEach((v) => {
|
|
2126
|
+
v.end == null && (v.end = v.start + v.duration), v.duration == null && (v.duration = v.end - v.start);
|
|
2127
|
+
}), p)), t.scenes.forEach((p, v) => {
|
|
2128
|
+
p.index = v;
|
|
2107
2129
|
}), f.length) {
|
|
2108
2130
|
const p = /* @__PURE__ */ new Map();
|
|
2109
|
-
window.ResizeObserver && (c = new window.ResizeObserver(function(
|
|
2110
|
-
|
|
2111
|
-
const
|
|
2112
|
-
E.forEach((
|
|
2113
|
-
t.scenes[
|
|
2114
|
-
}), f.splice(f.indexOf(
|
|
2131
|
+
window.ResizeObserver && (c = new window.ResizeObserver(function(v) {
|
|
2132
|
+
v.forEach((y) => {
|
|
2133
|
+
const g = p.get(y.target), E = re(g, n, o, s, d);
|
|
2134
|
+
E.forEach((w, b) => {
|
|
2135
|
+
t.scenes[w.index] = E[b];
|
|
2136
|
+
}), f.splice(f.indexOf(g), 1, E);
|
|
2115
2137
|
});
|
|
2116
|
-
}), f.forEach((
|
|
2117
|
-
c.observe(
|
|
2118
|
-
}), t.observeContentResize && t.contentRoot && new window.ResizeObserver(
|
|
2119
|
-
const y = f.map((
|
|
2120
|
-
const E =
|
|
2121
|
-
return E.forEach((
|
|
2122
|
-
t.scenes[
|
|
2138
|
+
}), f.forEach((v) => {
|
|
2139
|
+
c.observe(v[0].viewSource, { box: "border-box" }), p.set(v[0].viewSource, v);
|
|
2140
|
+
}), t.observeContentResize && t.contentRoot && new window.ResizeObserver(Qe(() => {
|
|
2141
|
+
const y = f.map((g) => {
|
|
2142
|
+
const E = re(g, n, o, s, d);
|
|
2143
|
+
return E.forEach((w, b) => {
|
|
2144
|
+
t.scenes[w.index] = E[b];
|
|
2123
2145
|
}), E;
|
|
2124
2146
|
});
|
|
2125
|
-
f.length = 0, f.push(...y), f.forEach((
|
|
2126
|
-
p.set(
|
|
2147
|
+
f.length = 0, f.push(...y), f.forEach((g) => {
|
|
2148
|
+
p.set(g[0].viewSource, g);
|
|
2127
2149
|
});
|
|
2128
|
-
},
|
|
2129
|
-
o =
|
|
2130
|
-
const
|
|
2131
|
-
const
|
|
2132
|
-
return
|
|
2133
|
-
t.scenes[E.index] =
|
|
2134
|
-
}),
|
|
2150
|
+
}, Xe)).observe(t.contentRoot, { box: "border-box" })), t.observeViewportResize && (u = Qe(function() {
|
|
2151
|
+
o = Ze(n, s);
|
|
2152
|
+
const v = f.map((y) => {
|
|
2153
|
+
const g = re(y, n, o, s, d);
|
|
2154
|
+
return g.forEach((E, w) => {
|
|
2155
|
+
t.scenes[E.index] = g[w];
|
|
2156
|
+
}), g;
|
|
2135
2157
|
});
|
|
2136
|
-
f.length = 0, f.push(...
|
|
2158
|
+
f.length = 0, f.push(...v), f.forEach((y) => {
|
|
2137
2159
|
p.set(y[0].viewSource, y);
|
|
2138
2160
|
});
|
|
2139
|
-
},
|
|
2161
|
+
}, Xe), n === window ? window.addEventListener("resize", u) : window.ResizeObserver && (l = new window.ResizeObserver(u), l.observe(n, { box: "border-box" })));
|
|
2140
2162
|
}
|
|
2141
2163
|
t.observeViewportEntry && window.IntersectionObserver && (a = new window.IntersectionObserver(function(p) {
|
|
2142
|
-
p.forEach((
|
|
2143
|
-
(i.get(
|
|
2144
|
-
y.disabled = !
|
|
2164
|
+
p.forEach((v) => {
|
|
2165
|
+
(i.get(v.target) || []).forEach((y) => {
|
|
2166
|
+
y.disabled = !v.isIntersecting;
|
|
2145
2167
|
});
|
|
2146
2168
|
});
|
|
2147
2169
|
}, {
|
|
@@ -2150,18 +2172,18 @@ function Ps(e) {
|
|
|
2150
2172
|
threshold: 0
|
|
2151
2173
|
}), t.scenes.forEach((p) => {
|
|
2152
2174
|
if (p.viewSource) {
|
|
2153
|
-
let
|
|
2154
|
-
|
|
2175
|
+
let v = i.get(p.viewSource);
|
|
2176
|
+
v || (v = [], i.set(p.viewSource, v), a.observe(p.viewSource)), v.push(p);
|
|
2155
2177
|
}
|
|
2156
2178
|
}));
|
|
2157
|
-
function h({ p, vp:
|
|
2179
|
+
function h({ p, vp: v }) {
|
|
2158
2180
|
p = +p.toFixed(1);
|
|
2159
|
-
const y = +
|
|
2181
|
+
const y = +v.toFixed(4);
|
|
2160
2182
|
if (p !== r) {
|
|
2161
|
-
for (let
|
|
2162
|
-
if (!
|
|
2163
|
-
const { start: E, end:
|
|
2164
|
-
|
|
2183
|
+
for (let g of t.scenes)
|
|
2184
|
+
if (!g.disabled) {
|
|
2185
|
+
const { start: E, end: w, duration: b } = g, S = Fs(p, E, w, b);
|
|
2186
|
+
g.effect(g, S, y);
|
|
2165
2187
|
}
|
|
2166
2188
|
r = p;
|
|
2167
2189
|
}
|
|
@@ -2174,16 +2196,16 @@ function Ps(e) {
|
|
|
2174
2196
|
destroy: m
|
|
2175
2197
|
};
|
|
2176
2198
|
}
|
|
2177
|
-
const
|
|
2199
|
+
const js = {
|
|
2178
2200
|
transitionActive: !1,
|
|
2179
2201
|
transitionFriction: 0.9,
|
|
2180
2202
|
transitionEpsilon: 1,
|
|
2181
2203
|
velocityActive: !1,
|
|
2182
2204
|
velocityMax: 1
|
|
2183
2205
|
};
|
|
2184
|
-
class
|
|
2206
|
+
class zs {
|
|
2185
2207
|
constructor(t = {}) {
|
|
2186
|
-
this.config =
|
|
2208
|
+
this.config = xt(t, js), this.progress = {
|
|
2187
2209
|
p: 0,
|
|
2188
2210
|
prevP: 0,
|
|
2189
2211
|
vp: 0
|
|
@@ -2196,7 +2218,7 @@ class xs {
|
|
|
2196
2218
|
this.config.root = n ? window : this.config.root, this.config.contentRoot = this.config.contentRoot || (n ? window.document.body : this.config.root.firstElementChild), this.config.resetProgress = this.config.resetProgress || this.resetProgress.bind(this), this._measure = this.config.measure || (() => {
|
|
2197
2219
|
const s = this.config.root;
|
|
2198
2220
|
this.progress.p = this.config.horizontal ? s.scrollX || s.scrollLeft || 0 : s.scrollY || s.scrollTop || 0;
|
|
2199
|
-
}), this._trigger =
|
|
2221
|
+
}), this._trigger = Cs(() => {
|
|
2200
2222
|
this._measure?.(), this.tick(!0);
|
|
2201
2223
|
});
|
|
2202
2224
|
}
|
|
@@ -2242,7 +2264,7 @@ class xs {
|
|
|
2242
2264
|
* Calculate current progress.
|
|
2243
2265
|
*/
|
|
2244
2266
|
lerp() {
|
|
2245
|
-
this.currentProgress.p =
|
|
2267
|
+
this.currentProgress.p = Ts(this.currentProgress.p, this.progress.p, +(1 - this.config.transitionFriction).toFixed(3), this.config.transitionEpsilon);
|
|
2246
2268
|
}
|
|
2247
2269
|
/**
|
|
2248
2270
|
* Stop the event and effect, and remove all DOM side-effects.
|
|
@@ -2266,7 +2288,7 @@ class xs {
|
|
|
2266
2288
|
* Reset registered effect.
|
|
2267
2289
|
*/
|
|
2268
2290
|
setupEffect() {
|
|
2269
|
-
this.removeEffect(), this.effect =
|
|
2291
|
+
this.removeEffect(), this.effect = Ns(this.config);
|
|
2270
2292
|
}
|
|
2271
2293
|
/**
|
|
2272
2294
|
* Remove registered effect.
|
|
@@ -2275,20 +2297,20 @@ class xs {
|
|
|
2275
2297
|
this.effect && this.effect.destroy(), this.effect = null;
|
|
2276
2298
|
}
|
|
2277
2299
|
}
|
|
2278
|
-
const
|
|
2279
|
-
let
|
|
2280
|
-
function
|
|
2281
|
-
|
|
2300
|
+
const qe = /* @__PURE__ */ new WeakMap();
|
|
2301
|
+
let Ft = () => ({});
|
|
2302
|
+
function Hs(e) {
|
|
2303
|
+
Ft = e;
|
|
2282
2304
|
}
|
|
2283
|
-
function
|
|
2305
|
+
function Ds(e, t, n, s, { reducedMotion: i, selectorCondition: o }) {
|
|
2284
2306
|
if (i || o && !t.matches(o)) return;
|
|
2285
2307
|
const r = {
|
|
2286
2308
|
trigger: "view-progress",
|
|
2287
2309
|
element: e
|
|
2288
|
-
}, a =
|
|
2310
|
+
}, a = F(n);
|
|
2289
2311
|
let c;
|
|
2290
2312
|
if ("ViewTimeline" in window) {
|
|
2291
|
-
const l =
|
|
2313
|
+
const l = te(
|
|
2292
2314
|
t,
|
|
2293
2315
|
a,
|
|
2294
2316
|
r
|
|
@@ -2299,16 +2321,16 @@ function Rs(e, t, n, s, { reducedMotion: i, selectorCondition: o }) {
|
|
|
2299
2321
|
});
|
|
2300
2322
|
});
|
|
2301
2323
|
} else {
|
|
2302
|
-
const l =
|
|
2324
|
+
const l = Et(t, a, r);
|
|
2303
2325
|
if (l) {
|
|
2304
|
-
const f = Array.isArray(l) ? l : [l], d = new
|
|
2326
|
+
const f = Array.isArray(l) ? l : [l], d = new zs({
|
|
2305
2327
|
viewSource: e,
|
|
2306
2328
|
scenes: f,
|
|
2307
2329
|
observeViewportEntry: !1,
|
|
2308
2330
|
observeViewportResize: !1,
|
|
2309
2331
|
observeSourcesResize: !0,
|
|
2310
2332
|
root: document.body,
|
|
2311
|
-
...
|
|
2333
|
+
...Ft()
|
|
2312
2334
|
});
|
|
2313
2335
|
c = () => {
|
|
2314
2336
|
d.destroy();
|
|
@@ -2321,20 +2343,20 @@ function Rs(e, t, n, s, { reducedMotion: i, selectorCondition: o }) {
|
|
|
2321
2343
|
}
|
|
2322
2344
|
if (!c) return;
|
|
2323
2345
|
const u = { source: e, target: t, cleanup: c };
|
|
2324
|
-
|
|
2346
|
+
M(qe, e, u), M(qe, t, u);
|
|
2325
2347
|
}
|
|
2326
|
-
function
|
|
2327
|
-
|
|
2348
|
+
function Gs(e) {
|
|
2349
|
+
se(qe, e);
|
|
2328
2350
|
}
|
|
2329
|
-
const
|
|
2330
|
-
add:
|
|
2331
|
-
remove:
|
|
2332
|
-
registerOptionsGetter:
|
|
2351
|
+
const Ws = {
|
|
2352
|
+
add: Ds,
|
|
2353
|
+
remove: Gs,
|
|
2354
|
+
registerOptionsGetter: Hs
|
|
2333
2355
|
};
|
|
2334
|
-
function
|
|
2356
|
+
function Je(e, t, n) {
|
|
2335
2357
|
return Math.min(Math.max(e, n), t);
|
|
2336
2358
|
}
|
|
2337
|
-
function
|
|
2359
|
+
function et(e) {
|
|
2338
2360
|
let t = !1;
|
|
2339
2361
|
return function() {
|
|
2340
2362
|
if (!t)
|
|
@@ -2343,7 +2365,7 @@ function Be(e) {
|
|
|
2343
2365
|
});
|
|
2344
2366
|
};
|
|
2345
2367
|
}
|
|
2346
|
-
function
|
|
2368
|
+
function Vs(e) {
|
|
2347
2369
|
let t = e, n = 0, s = 0;
|
|
2348
2370
|
if (t.offsetParent)
|
|
2349
2371
|
do
|
|
@@ -2356,7 +2378,7 @@ function zs(e) {
|
|
|
2356
2378
|
height: e.offsetHeight
|
|
2357
2379
|
};
|
|
2358
2380
|
}
|
|
2359
|
-
function
|
|
2381
|
+
function Ks() {
|
|
2360
2382
|
const e = window.devicePixelRatio;
|
|
2361
2383
|
let t = !1;
|
|
2362
2384
|
if (e === 1)
|
|
@@ -2369,7 +2391,7 @@ function Hs() {
|
|
|
2369
2391
|
});
|
|
2370
2392
|
return document.body.dispatchEvent(n), t;
|
|
2371
2393
|
}
|
|
2372
|
-
function
|
|
2394
|
+
function Ys() {
|
|
2373
2395
|
return new Promise((e) => {
|
|
2374
2396
|
const t = window.scrollY;
|
|
2375
2397
|
let n = !1, s;
|
|
@@ -2388,42 +2410,42 @@ function Ds() {
|
|
|
2388
2410
|
i(), window.addEventListener("scroll", o), window.scrollY > 0 && window.scrollBy(0, -1);
|
|
2389
2411
|
});
|
|
2390
2412
|
}
|
|
2391
|
-
function
|
|
2392
|
-
|
|
2413
|
+
function Bs(e) {
|
|
2414
|
+
Ys().then((t) => {
|
|
2393
2415
|
e.fixRequired = t, t && (window.addEventListener("scroll", e.scrollHandler), e.scrollHandler());
|
|
2394
2416
|
});
|
|
2395
2417
|
}
|
|
2396
|
-
let
|
|
2397
|
-
const
|
|
2398
|
-
function
|
|
2418
|
+
let ae = 0;
|
|
2419
|
+
const he = /* @__PURE__ */ new Set();
|
|
2420
|
+
function Us() {
|
|
2399
2421
|
const e = (n) => {
|
|
2400
2422
|
for (let s of n.changedTouches)
|
|
2401
|
-
|
|
2423
|
+
he.add(s.identifier);
|
|
2402
2424
|
}, t = (n) => {
|
|
2403
2425
|
for (let s of n.changedTouches)
|
|
2404
|
-
|
|
2426
|
+
he.delete(s.identifier);
|
|
2405
2427
|
};
|
|
2406
2428
|
return document.addEventListener("touchstart", e, { passive: !0 }), document.addEventListener("touchend", t, { passive: !0 }), function() {
|
|
2407
|
-
|
|
2429
|
+
he.clear(), document.removeEventListener("touchstart", e), document.removeEventListener("touchend", t);
|
|
2408
2430
|
};
|
|
2409
2431
|
}
|
|
2410
|
-
function
|
|
2432
|
+
function Qs(e, t) {
|
|
2411
2433
|
if ("onscrollend" in window)
|
|
2412
2434
|
return e.addEventListener("scrollend", t), function() {
|
|
2413
2435
|
e.removeEventListener("scrollend", t);
|
|
2414
2436
|
};
|
|
2415
2437
|
let n = 0, s;
|
|
2416
|
-
|
|
2438
|
+
ae || (s = Us()), ae += 1;
|
|
2417
2439
|
function i(o) {
|
|
2418
2440
|
clearTimeout(n), n = setTimeout(() => {
|
|
2419
|
-
|
|
2441
|
+
he.size ? setTimeout(i, 100) : (t(o), n = 0);
|
|
2420
2442
|
}, 100);
|
|
2421
2443
|
}
|
|
2422
2444
|
return e.addEventListener("scroll", i), function() {
|
|
2423
|
-
e.removeEventListener("scroll", i),
|
|
2445
|
+
e.removeEventListener("scroll", i), ae -= 1, ae || s();
|
|
2424
2446
|
};
|
|
2425
2447
|
}
|
|
2426
|
-
function
|
|
2448
|
+
function Xs(e, t, n) {
|
|
2427
2449
|
return {
|
|
2428
2450
|
x(s) {
|
|
2429
2451
|
const i = e.left - n.x + e.width / 2, o = i >= t.width / 2, r = (o ? i : t.width - i) * 2, a = o ? 0 : i - r / 2;
|
|
@@ -2435,13 +2457,13 @@ function Ks(e, t, n) {
|
|
|
2435
2457
|
}
|
|
2436
2458
|
};
|
|
2437
2459
|
}
|
|
2438
|
-
function
|
|
2460
|
+
function Zs(e, t) {
|
|
2439
2461
|
this.x = window.scrollX, this.y = window.scrollY, requestAnimationFrame(() => e && e(t));
|
|
2440
2462
|
}
|
|
2441
|
-
function
|
|
2463
|
+
function Js(e) {
|
|
2442
2464
|
e.rect.width = window.document.documentElement.clientWidth, e.rect.height = window.document.documentElement.clientHeight;
|
|
2443
2465
|
}
|
|
2444
|
-
function
|
|
2466
|
+
function ei(e) {
|
|
2445
2467
|
const t = new ResizeObserver((n) => {
|
|
2446
2468
|
n.forEach((s) => {
|
|
2447
2469
|
e.rect.width = s.borderBoxSize[0].inlineSize, e.rect.height = s.borderBoxSize[0].blockSize;
|
|
@@ -2449,19 +2471,19 @@ function Us(e) {
|
|
|
2449
2471
|
});
|
|
2450
2472
|
return t.observe(e.root, { box: "border-box" }), t;
|
|
2451
2473
|
}
|
|
2452
|
-
function
|
|
2474
|
+
function ti(e) {
|
|
2453
2475
|
let t = !1, n = { x: e.rect.width / 2, y: e.rect.height / 2, vx: 0, vy: 0 }, s, i, o, r, a;
|
|
2454
2476
|
const c = { x: 0, y: 0 };
|
|
2455
2477
|
e.scenes.forEach((l) => {
|
|
2456
|
-
l.target && l.centeredToTarget && (l.transform =
|
|
2478
|
+
l.target && l.centeredToTarget && (l.transform = Xs(Vs(l.target), e.rect, c), t = !0), e.root ? i = ei(e) : (o = Js.bind(null, e), window.addEventListener("resize", o));
|
|
2457
2479
|
}), s = function(l) {
|
|
2458
2480
|
for (let f of e.scenes)
|
|
2459
2481
|
if (!f.disabled) {
|
|
2460
|
-
const d = f.transform?.x(l.x) || l.x / e.rect.width, h = f.transform?.y(l.y) || l.y / e.rect.height, m = +
|
|
2461
|
-
e.allowActiveEvent && (l.active = d <= 1 && h <= 1 && d >= 0 && h >= 0), f.effect(f, { x: m, y: p },
|
|
2482
|
+
const d = f.transform?.x(l.x) || l.x / e.rect.width, h = f.transform?.y(l.y) || l.y / e.rect.height, m = +Je(0, 1, d).toPrecision(4), p = +Je(0, 1, h).toPrecision(4), v = { x: l.vx, y: l.vy };
|
|
2483
|
+
e.allowActiveEvent && (l.active = d <= 1 && h <= 1 && d >= 0 && h >= 0), f.effect(f, { x: m, y: p }, v, l.active);
|
|
2462
2484
|
}
|
|
2463
2485
|
Object.assign(n, l);
|
|
2464
|
-
}, t && (r =
|
|
2486
|
+
}, t && (r = Zs.bind(c, s, n), a = Qs(document, r));
|
|
2465
2487
|
function u() {
|
|
2466
2488
|
e.scenes.forEach((l) => l.destroy?.()), a?.(), i ? (i.disconnect(), i = null) : (window.removeEventListener("resize", o), o = null), s = null, n = null;
|
|
2467
2489
|
}
|
|
@@ -2470,17 +2492,17 @@ function Qs(e) {
|
|
|
2470
2492
|
destroy: u
|
|
2471
2493
|
};
|
|
2472
2494
|
}
|
|
2473
|
-
const
|
|
2474
|
-
let
|
|
2475
|
-
function
|
|
2476
|
-
|
|
2495
|
+
const ni = 1e3 / 60 * 3;
|
|
2496
|
+
let ce;
|
|
2497
|
+
function si() {
|
|
2498
|
+
D.x = window.scrollX, D.y = window.scrollY;
|
|
2477
2499
|
}
|
|
2478
|
-
const
|
|
2479
|
-
class
|
|
2500
|
+
const D = { x: 0, y: 0, scrollHandler: si, fixRequired: void 0 };
|
|
2501
|
+
class ii {
|
|
2480
2502
|
constructor(t = {}) {
|
|
2481
2503
|
this.config = { ...t }, this.effect = null, this._nextTick = null, this._nextTransitionTick = null, this._startTime = 0;
|
|
2482
2504
|
let n;
|
|
2483
|
-
this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() :
|
|
2505
|
+
this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() : et(() => this.transition()) : n = this.config.noThrottle ? () => (this.tick(), null) : et(() => {
|
|
2484
2506
|
this.tick();
|
|
2485
2507
|
}), this.config.rect = this.config.root ? {
|
|
2486
2508
|
width: this.config.root.offsetWidth,
|
|
@@ -2503,15 +2525,15 @@ class Js {
|
|
|
2503
2525
|
}, this._pointerEnter = () => {
|
|
2504
2526
|
this.progress.active = !0, this._nextTick = n();
|
|
2505
2527
|
}, this.config.root) {
|
|
2506
|
-
|
|
2507
|
-
const i =
|
|
2508
|
-
typeof
|
|
2528
|
+
ce = typeof ce == "boolean" ? ce : Ks();
|
|
2529
|
+
const i = ce ? window.devicePixelRatio : 1;
|
|
2530
|
+
typeof D.fixRequired > "u" && Bs(D), this._measure = (o) => {
|
|
2509
2531
|
if (o.target !== this.config.root) {
|
|
2510
2532
|
const r = new PointerEvent("pointermove", {
|
|
2511
2533
|
bubbles: !0,
|
|
2512
2534
|
cancelable: !0,
|
|
2513
|
-
clientX: o.x * i +
|
|
2514
|
-
clientY: o.y * i +
|
|
2535
|
+
clientX: o.x * i + D.x,
|
|
2536
|
+
clientY: o.y * i + D.y
|
|
2515
2537
|
});
|
|
2516
2538
|
o.stopPropagation(), this.config.root.dispatchEvent(r);
|
|
2517
2539
|
} else
|
|
@@ -2548,7 +2570,7 @@ class Js {
|
|
|
2548
2570
|
let i = !1;
|
|
2549
2571
|
const o = (r) => {
|
|
2550
2572
|
const a = (r - this._startTime) / t, c = n(Math.min(1, a));
|
|
2551
|
-
i && (this.progress.vx = 0, this.progress.vy = 0, i = !1), this.currentProgress = Object.entries(this.progress).reduce((u, [l, f]) => (l === "active" ? u[l] = f : u[l] = this.previousProgress[l] + (f - this.previousProgress[l]) * c, u), this.currentProgress || {}), a < 1 && (this._nextTransitionTick = requestAnimationFrame(o), i = r - this._startTime >
|
|
2573
|
+
i && (this.progress.vx = 0, this.progress.vy = 0, i = !1), this.currentProgress = Object.entries(this.progress).reduce((u, [l, f]) => (l === "active" ? u[l] = f : u[l] = this.previousProgress[l] + (f - this.previousProgress[l]) * c, u), this.currentProgress || {}), a < 1 && (this._nextTransitionTick = requestAnimationFrame(o), i = r - this._startTime > ni), this.effect.tick(this.currentProgress);
|
|
2552
2574
|
};
|
|
2553
2575
|
return this._startTime ? (this._nextTransitionTick && cancelAnimationFrame(this._nextTransitionTick), Object.assign(this.previousProgress, this.currentProgress), this._startTime = s, o(s)) : this._startTime = s, this._nextTransitionTick;
|
|
2554
2576
|
}
|
|
@@ -2577,7 +2599,7 @@ class Js {
|
|
|
2577
2599
|
* Reset registered effect.
|
|
2578
2600
|
*/
|
|
2579
2601
|
setupEffect() {
|
|
2580
|
-
this.removeEffect(), this.effect =
|
|
2602
|
+
this.removeEffect(), this.effect = ti(this.config);
|
|
2581
2603
|
}
|
|
2582
2604
|
/**
|
|
2583
2605
|
* Remove registered effect.
|
|
@@ -2586,50 +2608,50 @@ class Js {
|
|
|
2586
2608
|
this.effect && this.effect.destroy(), this.effect = null;
|
|
2587
2609
|
}
|
|
2588
2610
|
}
|
|
2589
|
-
const
|
|
2590
|
-
let
|
|
2591
|
-
function
|
|
2592
|
-
|
|
2611
|
+
const Pe = /* @__PURE__ */ new WeakMap();
|
|
2612
|
+
let Rt = () => ({});
|
|
2613
|
+
function oi(e) {
|
|
2614
|
+
Rt = e;
|
|
2593
2615
|
}
|
|
2594
|
-
function
|
|
2616
|
+
function ri(e, t, n, s = {}, { reducedMotion: i, selectorCondition: o }) {
|
|
2595
2617
|
if (i || o && !t.matches(o)) return;
|
|
2596
2618
|
const r = {
|
|
2597
2619
|
trigger: "pointer-move",
|
|
2598
2620
|
element: e,
|
|
2599
2621
|
axis: s.axis ?? "y"
|
|
2600
|
-
}, a =
|
|
2622
|
+
}, a = Et(t, F(n), r);
|
|
2601
2623
|
if (a) {
|
|
2602
|
-
const c = Array.isArray(a) ? a : [a], u = new
|
|
2624
|
+
const c = Array.isArray(a) ? a : [a], u = new ii({
|
|
2603
2625
|
root: s.hitArea === "self" ? e : void 0,
|
|
2604
2626
|
scenes: c,
|
|
2605
|
-
...
|
|
2627
|
+
...Rt()
|
|
2606
2628
|
}), f = { source: e, target: t, cleanup: () => {
|
|
2607
2629
|
u.destroy();
|
|
2608
2630
|
} };
|
|
2609
|
-
|
|
2631
|
+
M(Pe, e, f), M(Pe, t, f), Promise.all(
|
|
2610
2632
|
c.map((d) => d.ready || Promise.resolve())
|
|
2611
2633
|
).then(() => {
|
|
2612
2634
|
u.start();
|
|
2613
2635
|
});
|
|
2614
2636
|
}
|
|
2615
2637
|
}
|
|
2616
|
-
function
|
|
2617
|
-
|
|
2638
|
+
function ai(e) {
|
|
2639
|
+
se(Pe, e);
|
|
2618
2640
|
}
|
|
2619
|
-
const
|
|
2620
|
-
add:
|
|
2621
|
-
remove:
|
|
2622
|
-
registerOptionsGetter:
|
|
2623
|
-
},
|
|
2624
|
-
function
|
|
2641
|
+
const ci = {
|
|
2642
|
+
add: ri,
|
|
2643
|
+
remove: ai,
|
|
2644
|
+
registerOptionsGetter: oi
|
|
2645
|
+
}, Le = /* @__PURE__ */ new WeakMap();
|
|
2646
|
+
function li(e, t, n, s, {
|
|
2625
2647
|
reducedMotion: i,
|
|
2626
2648
|
selectorCondition: o,
|
|
2627
2649
|
animation: r,
|
|
2628
2650
|
sourceAnimationOptions: a
|
|
2629
2651
|
}) {
|
|
2630
|
-
const c = r ||
|
|
2652
|
+
const c = r || te(
|
|
2631
2653
|
t,
|
|
2632
|
-
|
|
2654
|
+
F(n),
|
|
2633
2655
|
void 0,
|
|
2634
2656
|
i
|
|
2635
2657
|
);
|
|
@@ -2637,30 +2659,30 @@ function ii(e, t, n, s, {
|
|
|
2637
2659
|
return;
|
|
2638
2660
|
const { effectId: u } = s, l = (h) => {
|
|
2639
2661
|
if (o && !t.matches(o)) return;
|
|
2640
|
-
const m = h.animationName, p = h.detail?.effectId,
|
|
2641
|
-
if (
|
|
2642
|
-
if (
|
|
2662
|
+
const m = h.animationName, p = h.detail?.effectId, v = a ? yt(e, a) : null;
|
|
2663
|
+
if (v) {
|
|
2664
|
+
if (v.playState === "running" || m && !v.hasAnimationName(m))
|
|
2643
2665
|
return;
|
|
2644
|
-
if (p && p !== u && !
|
|
2666
|
+
if (p && p !== u && !v.hasAnimationId(p))
|
|
2645
2667
|
return;
|
|
2646
2668
|
}
|
|
2647
2669
|
c.play();
|
|
2648
2670
|
}, d = { source: e, target: t, cleanup: () => {
|
|
2649
2671
|
c.cancel(), e.removeEventListener("animationend", l);
|
|
2650
2672
|
} };
|
|
2651
|
-
|
|
2673
|
+
M(Le, e, d), M(Le, t, d), e.addEventListener("animationend", l);
|
|
2652
2674
|
}
|
|
2653
|
-
function
|
|
2654
|
-
|
|
2675
|
+
function ui(e) {
|
|
2676
|
+
se(Le, e);
|
|
2655
2677
|
}
|
|
2656
|
-
const
|
|
2657
|
-
add:
|
|
2658
|
-
remove:
|
|
2678
|
+
const fi = {
|
|
2679
|
+
add: li,
|
|
2680
|
+
remove: ui
|
|
2659
2681
|
};
|
|
2660
|
-
function
|
|
2661
|
-
const r = o ||
|
|
2682
|
+
function di(e, t, n = !1, s, i, o) {
|
|
2683
|
+
const r = o || te(
|
|
2662
2684
|
e,
|
|
2663
|
-
|
|
2685
|
+
F(t),
|
|
2664
2686
|
void 0,
|
|
2665
2687
|
n
|
|
2666
2688
|
);
|
|
@@ -2677,7 +2699,7 @@ function ai(e, t, n = !1, s, i, o) {
|
|
|
2677
2699
|
else {
|
|
2678
2700
|
if (r.progress(0), delete e.dataset.interactEnter, r.isCSS) {
|
|
2679
2701
|
const h = () => {
|
|
2680
|
-
|
|
2702
|
+
O.mutate(() => {
|
|
2681
2703
|
e.dataset.interactEnter = "done";
|
|
2682
2704
|
});
|
|
2683
2705
|
};
|
|
@@ -2687,12 +2709,12 @@ function ai(e, t, n = !1, s, i, o) {
|
|
|
2687
2709
|
}
|
|
2688
2710
|
return;
|
|
2689
2711
|
}
|
|
2690
|
-
d && (c === "alternate" ? r.reverse() : c === "repeat" ? (r.cancel(),
|
|
2712
|
+
d && (c === "alternate" ? r.reverse() : c === "repeat" ? (r.cancel(), O.mutate(() => {
|
|
2691
2713
|
delete e.dataset.interactEnter;
|
|
2692
2714
|
})) : c === "state" && r.playState === "running" && r.pause());
|
|
2693
2715
|
};
|
|
2694
2716
|
}
|
|
2695
|
-
function
|
|
2717
|
+
function hi(e, t, {
|
|
2696
2718
|
effectId: n,
|
|
2697
2719
|
listContainer: s,
|
|
2698
2720
|
listItemSelector: i,
|
|
@@ -2707,70 +2729,70 @@ function ci(e, t, {
|
|
|
2707
2729
|
h ? t.toggleEffect(n, u, d) : (m && t.toggleEffect(n, l ? "add" : u, d), p && l && t.toggleEffect(n, "remove", d));
|
|
2708
2730
|
};
|
|
2709
2731
|
}
|
|
2710
|
-
const
|
|
2711
|
-
function
|
|
2732
|
+
const xe = /* @__PURE__ */ new WeakMap();
|
|
2733
|
+
function tt(e, t) {
|
|
2712
2734
|
return (n) => {
|
|
2713
2735
|
const s = n;
|
|
2714
2736
|
e.contains(s.relatedTarget) || t(s);
|
|
2715
2737
|
};
|
|
2716
2738
|
}
|
|
2717
|
-
function
|
|
2739
|
+
function mi(e) {
|
|
2718
2740
|
return (t) => {
|
|
2719
2741
|
const n = t;
|
|
2720
2742
|
n.pointerType && e(n);
|
|
2721
2743
|
};
|
|
2722
2744
|
}
|
|
2723
|
-
function
|
|
2745
|
+
function pi(e) {
|
|
2724
2746
|
return (t) => {
|
|
2725
2747
|
const n = t;
|
|
2726
2748
|
n.code === "Space" ? (n.preventDefault(), e(n)) : n.code === "Enter" && e(n);
|
|
2727
2749
|
};
|
|
2728
2750
|
}
|
|
2729
|
-
const
|
|
2730
|
-
focusin: (e, t) =>
|
|
2731
|
-
focusout: (e, t) =>
|
|
2732
|
-
click: (e, t) =>
|
|
2733
|
-
keydown: (e, t) =>
|
|
2751
|
+
const gi = {
|
|
2752
|
+
focusin: (e, t) => tt(e, t),
|
|
2753
|
+
focusout: (e, t) => tt(e, t),
|
|
2754
|
+
click: (e, t) => mi(t),
|
|
2755
|
+
keydown: (e, t) => pi(t)
|
|
2734
2756
|
};
|
|
2735
|
-
function
|
|
2736
|
-
const s =
|
|
2757
|
+
function vi(e, t, n) {
|
|
2758
|
+
const s = gi[e];
|
|
2737
2759
|
return s ? s(t, n) : (i) => n(i);
|
|
2738
2760
|
}
|
|
2739
|
-
function
|
|
2761
|
+
function yi(e) {
|
|
2740
2762
|
return typeof e == "object" && !Array.isArray(e) && ("enter" in e || "leave" in e);
|
|
2741
2763
|
}
|
|
2742
|
-
function
|
|
2764
|
+
function Ei(e) {
|
|
2743
2765
|
if (typeof e == "string")
|
|
2744
2766
|
return { toggle: [e] };
|
|
2745
2767
|
if (Array.isArray(e))
|
|
2746
2768
|
return { toggle: [...e] };
|
|
2747
|
-
if (
|
|
2769
|
+
if (yi(e)) {
|
|
2748
2770
|
const t = e.enter ? [...e.enter] : [], n = e.leave ? [...e.leave] : [];
|
|
2749
2771
|
return { enter: t, leave: n };
|
|
2750
2772
|
}
|
|
2751
2773
|
return {};
|
|
2752
2774
|
}
|
|
2753
|
-
function
|
|
2775
|
+
function wi(e) {
|
|
2754
2776
|
return !!(e.enter?.length || e.leave?.length);
|
|
2755
2777
|
}
|
|
2756
|
-
function
|
|
2757
|
-
return
|
|
2778
|
+
function $i(e) {
|
|
2779
|
+
return wi(e) ? { enter: e.enter ?? [], leave: e.leave ?? [] } : void 0;
|
|
2758
2780
|
}
|
|
2759
|
-
function
|
|
2781
|
+
function bi(e, t, n, s, {
|
|
2760
2782
|
reducedMotion: i,
|
|
2761
2783
|
targetController: o,
|
|
2762
2784
|
selectorCondition: r,
|
|
2763
2785
|
animation: a
|
|
2764
2786
|
}) {
|
|
2765
|
-
const c =
|
|
2787
|
+
const c = Ei(s.eventConfig), u = n.transition || n.transitionProperties, l = $i(c);
|
|
2766
2788
|
let f, d = !1;
|
|
2767
|
-
if (u ? f =
|
|
2789
|
+
if (u ? f = hi(
|
|
2768
2790
|
t,
|
|
2769
2791
|
o,
|
|
2770
2792
|
n,
|
|
2771
2793
|
r,
|
|
2772
2794
|
l
|
|
2773
|
-
) : (f =
|
|
2795
|
+
) : (f = di(
|
|
2774
2796
|
t,
|
|
2775
2797
|
n,
|
|
2776
2798
|
i,
|
|
@@ -2780,20 +2802,20 @@ function vi(e, t, n, s, {
|
|
|
2780
2802
|
), d = n.triggerType === "once"), !f)
|
|
2781
2803
|
return;
|
|
2782
2804
|
const h = f, m = new AbortController();
|
|
2783
|
-
function p(
|
|
2784
|
-
const b =
|
|
2785
|
-
|
|
2805
|
+
function p(g, E, w) {
|
|
2806
|
+
const b = vi(E, e, h);
|
|
2807
|
+
g.addEventListener(E, b, { ...w, signal: m.signal });
|
|
2786
2808
|
}
|
|
2787
2809
|
const y = { source: e, target: t, cleanup: () => {
|
|
2788
2810
|
m.abort();
|
|
2789
2811
|
} };
|
|
2790
|
-
if (
|
|
2791
|
-
const
|
|
2792
|
-
|
|
2812
|
+
if (M(xe, e, y), M(xe, t, y), l) {
|
|
2813
|
+
const g = c.enter, E = c.leave;
|
|
2814
|
+
g.forEach((S) => {
|
|
2793
2815
|
S === "focusin" && (e.tabIndex = 0), p(e, S, { passive: !0, once: d });
|
|
2794
2816
|
});
|
|
2795
|
-
const
|
|
2796
|
-
(u ?
|
|
2817
|
+
const w = !n.stateAction || n.stateAction === "toggle";
|
|
2818
|
+
(u ? w : n.triggerType !== "once") && E.forEach((S) => {
|
|
2797
2819
|
if (S === "focusout") {
|
|
2798
2820
|
p(e, S, { once: d });
|
|
2799
2821
|
return;
|
|
@@ -2805,13 +2827,13 @@ function vi(e, t, n, s, {
|
|
|
2805
2827
|
p(e, E, { once: d, passive: E !== "keydown" });
|
|
2806
2828
|
});
|
|
2807
2829
|
}
|
|
2808
|
-
function
|
|
2809
|
-
|
|
2830
|
+
function Si(e) {
|
|
2831
|
+
se(xe, e);
|
|
2810
2832
|
}
|
|
2811
|
-
const
|
|
2812
|
-
add:
|
|
2813
|
-
remove:
|
|
2814
|
-
},
|
|
2833
|
+
const U = {
|
|
2834
|
+
add: bi,
|
|
2835
|
+
remove: Si
|
|
2836
|
+
}, Fe = {
|
|
2815
2837
|
click: ["click"],
|
|
2816
2838
|
activate: ["click", "keydown"],
|
|
2817
2839
|
hover: { enter: ["mouseenter"], leave: ["mouseleave"] },
|
|
@@ -2819,43 +2841,43 @@ const B = {
|
|
|
2819
2841
|
enter: ["mouseenter", "focusin"],
|
|
2820
2842
|
leave: ["mouseleave", "focusout"]
|
|
2821
2843
|
}
|
|
2822
|
-
},
|
|
2823
|
-
click:
|
|
2824
|
-
hover:
|
|
2844
|
+
}, nt = {
|
|
2845
|
+
click: Fe.activate,
|
|
2846
|
+
hover: Fe.interest
|
|
2825
2847
|
};
|
|
2826
|
-
function
|
|
2827
|
-
const t =
|
|
2848
|
+
function le(e) {
|
|
2849
|
+
const t = Fe[e];
|
|
2828
2850
|
return (n, s, i, o, r) => {
|
|
2829
|
-
const a = r?.allowA11yTriggers && e in
|
|
2830
|
-
|
|
2851
|
+
const a = r?.allowA11yTriggers && e in nt ? nt[e] : t;
|
|
2852
|
+
U.add(n, s, i, { eventConfig: a }, r ?? {});
|
|
2831
2853
|
};
|
|
2832
2854
|
}
|
|
2833
|
-
const
|
|
2834
|
-
viewEnter:
|
|
2855
|
+
const G = {
|
|
2856
|
+
viewEnter: Is,
|
|
2835
2857
|
hover: {
|
|
2836
|
-
add:
|
|
2837
|
-
remove:
|
|
2858
|
+
add: le("hover"),
|
|
2859
|
+
remove: U.remove
|
|
2838
2860
|
},
|
|
2839
2861
|
click: {
|
|
2840
|
-
add:
|
|
2841
|
-
remove:
|
|
2862
|
+
add: le("click"),
|
|
2863
|
+
remove: U.remove
|
|
2842
2864
|
},
|
|
2843
|
-
animationEnd:
|
|
2844
|
-
viewProgress:
|
|
2845
|
-
pointerMove:
|
|
2865
|
+
animationEnd: fi,
|
|
2866
|
+
viewProgress: Ws,
|
|
2867
|
+
pointerMove: ci,
|
|
2846
2868
|
activate: {
|
|
2847
|
-
add:
|
|
2848
|
-
remove:
|
|
2869
|
+
add: le("activate"),
|
|
2870
|
+
remove: U.remove
|
|
2849
2871
|
},
|
|
2850
2872
|
interest: {
|
|
2851
|
-
add:
|
|
2852
|
-
remove:
|
|
2873
|
+
add: le("interest"),
|
|
2874
|
+
remove: U.remove
|
|
2853
2875
|
}
|
|
2854
2876
|
};
|
|
2855
|
-
function
|
|
2856
|
-
return e.replace(/\[
|
|
2877
|
+
function Ii(e) {
|
|
2878
|
+
return e.replace(/\[[^\]]+]/g, "[]");
|
|
2857
2879
|
}
|
|
2858
|
-
class
|
|
2880
|
+
class $ {
|
|
2859
2881
|
static defineInteractElement;
|
|
2860
2882
|
dataCache;
|
|
2861
2883
|
addedInteractions;
|
|
@@ -2875,12 +2897,12 @@ class w {
|
|
|
2875
2897
|
init(t, n) {
|
|
2876
2898
|
if (typeof window > "u" || !window.customElements)
|
|
2877
2899
|
return;
|
|
2878
|
-
const s = n?.useCustomElement ??
|
|
2879
|
-
this.dataCache =
|
|
2880
|
-
const i =
|
|
2900
|
+
const s = n?.useCustomElement ?? !!$.defineInteractElement;
|
|
2901
|
+
this.dataCache = Oi(t, s);
|
|
2902
|
+
const i = $.defineInteractElement?.();
|
|
2881
2903
|
s && i === !1 ? document.querySelectorAll("interact-element").forEach((o) => {
|
|
2882
2904
|
o.connect();
|
|
2883
|
-
}) :
|
|
2905
|
+
}) : $.controllerCache.forEach(
|
|
2884
2906
|
(o, r) => o.connect(r)
|
|
2885
2907
|
);
|
|
2886
2908
|
}
|
|
@@ -2889,20 +2911,20 @@ class w {
|
|
|
2889
2911
|
n.disconnect({ removeFromCache: t });
|
|
2890
2912
|
for (const [, n] of this.mediaQueryListeners.entries())
|
|
2891
2913
|
n.mql.removeEventListener("change", n.handler);
|
|
2892
|
-
this.mediaQueryListeners.clear(), this.addedInteractions = {}, this.listInteractionsCache = {}, this.controllers.clear(), this.dataCache = { effects: {}, sequences: {}, conditions: {}, interactions: {} },
|
|
2914
|
+
this.mediaQueryListeners.clear(), this.addedInteractions = {}, this.listInteractionsCache = {}, this.controllers.clear(), this.dataCache = { effects: {}, sequences: {}, conditions: {}, interactions: {} }, $.instances.splice($.instances.indexOf(this), 1);
|
|
2893
2915
|
}
|
|
2894
2916
|
setController(t, n) {
|
|
2895
|
-
this.controllers.add(n),
|
|
2917
|
+
this.controllers.add(n), $.setController(t, n);
|
|
2896
2918
|
}
|
|
2897
2919
|
deleteController(t, n = !1) {
|
|
2898
|
-
const s =
|
|
2899
|
-
this.clearInteractionStateForKey(t), this.clearMediaQueryListenersForKey(t), s && n && (this.controllers.delete(s),
|
|
2920
|
+
const s = $.controllerCache.get(t);
|
|
2921
|
+
this.clearInteractionStateForKey(t), this.clearMediaQueryListenersForKey(t), s && n && (this.controllers.delete(s), $.deleteController(t));
|
|
2900
2922
|
}
|
|
2901
2923
|
has(t) {
|
|
2902
2924
|
return !!this.get(t);
|
|
2903
2925
|
}
|
|
2904
2926
|
get(t) {
|
|
2905
|
-
const n =
|
|
2927
|
+
const n = Ii(t);
|
|
2906
2928
|
return this.dataCache.interactions[n];
|
|
2907
2929
|
}
|
|
2908
2930
|
clearMediaQueryListenersForKey(t) {
|
|
@@ -2915,8 +2937,8 @@ class w {
|
|
|
2915
2937
|
delete this.addedInteractions[o];
|
|
2916
2938
|
});
|
|
2917
2939
|
const s = `${t}::seq::`;
|
|
2918
|
-
for (const i of
|
|
2919
|
-
i.startsWith(s) && (
|
|
2940
|
+
for (const i of $.sequenceCache.keys())
|
|
2941
|
+
i.startsWith(s) && ($.sequenceCache.delete(i), delete this.addedInteractions[i]);
|
|
2920
2942
|
}
|
|
2921
2943
|
setupMediaQueryListener(t, n, s, i) {
|
|
2922
2944
|
this.mediaQueryListeners.has(t) || (n.addEventListener("change", i), this.mediaQueryListeners.set(t, {
|
|
@@ -2926,91 +2948,92 @@ class w {
|
|
|
2926
2948
|
}));
|
|
2927
2949
|
}
|
|
2928
2950
|
static create(t, n) {
|
|
2929
|
-
const s = new
|
|
2930
|
-
return
|
|
2951
|
+
const s = new $();
|
|
2952
|
+
return $.instances.push(s), s.init(t, n), s;
|
|
2931
2953
|
}
|
|
2932
2954
|
static destroy() {
|
|
2933
|
-
|
|
2955
|
+
$.controllerCache.forEach((t) => {
|
|
2934
2956
|
t.disconnect();
|
|
2935
|
-
}),
|
|
2957
|
+
}), $.instances.length = 0, $.controllerCache.clear(), $.sequenceCache.clear(), $.elementSequenceMap = /* @__PURE__ */ new WeakMap();
|
|
2936
2958
|
}
|
|
2937
2959
|
static setup(t) {
|
|
2938
|
-
t.scrollOptionsGetter &&
|
|
2960
|
+
t.scrollOptionsGetter && G.viewProgress.registerOptionsGetter?.(
|
|
2939
2961
|
t.scrollOptionsGetter
|
|
2940
|
-
), t.pointerOptionsGetter &&
|
|
2962
|
+
), t.pointerOptionsGetter && G.pointerMove.registerOptionsGetter?.(
|
|
2941
2963
|
t.pointerOptionsGetter
|
|
2942
|
-
), t.viewEnter &&
|
|
2964
|
+
), t.viewEnter && G.viewEnter.setOptions(
|
|
2943
2965
|
t.viewEnter
|
|
2944
|
-
), t.allowA11yTriggers !== void 0 && (
|
|
2966
|
+
), t.allowA11yTriggers !== void 0 && ($.allowA11yTriggers = t.allowA11yTriggers);
|
|
2945
2967
|
}
|
|
2946
2968
|
static getInstance(t) {
|
|
2947
|
-
const n =
|
|
2969
|
+
const n = $.instances.find((s) => s.has(t));
|
|
2948
2970
|
return n || console.warn(`Interact: Instance for key "${t}" not found`), n;
|
|
2949
2971
|
}
|
|
2950
2972
|
static getController(t) {
|
|
2951
|
-
const n = t ?
|
|
2973
|
+
const n = t ? $.controllerCache.get(t) : void 0;
|
|
2952
2974
|
return n || console.warn(`Interact: Controller for key "${t}" not found`), n;
|
|
2953
2975
|
}
|
|
2954
2976
|
static setController(t, n) {
|
|
2955
|
-
|
|
2977
|
+
$.controllerCache.set(t, n);
|
|
2956
2978
|
}
|
|
2957
2979
|
static deleteController(t) {
|
|
2958
|
-
|
|
2980
|
+
$.controllerCache.delete(t);
|
|
2959
2981
|
}
|
|
2960
|
-
static registerEffects =
|
|
2982
|
+
static registerEffects = xn;
|
|
2983
|
+
static getRegisteredEffect = je;
|
|
2961
2984
|
/**
|
|
2962
2985
|
* Registers a plugin under a name. When the config carries a plugin field (e.g. `$splitText`) with a matching key
|
|
2963
2986
|
* (on an interaction or effect), Interact invokes the plugin with the field's value and a
|
|
2964
2987
|
* context. Interact is agnostic to what the plugin does — see the `InteractPlugin` type.
|
|
2965
2988
|
*/
|
|
2966
2989
|
static use(t, n) {
|
|
2967
|
-
|
|
2990
|
+
$.plugins.set(t, n);
|
|
2968
2991
|
}
|
|
2969
2992
|
static getPlugin(t) {
|
|
2970
|
-
return
|
|
2993
|
+
return $.plugins.get(t);
|
|
2971
2994
|
}
|
|
2972
2995
|
static getPluginsNames() {
|
|
2973
|
-
return new Set(
|
|
2996
|
+
return new Set($.plugins.keys());
|
|
2974
2997
|
}
|
|
2975
2998
|
static getSequence(t, n, s, i) {
|
|
2976
|
-
const o =
|
|
2999
|
+
const o = $.sequenceCache.get(t);
|
|
2977
3000
|
if (o) return o;
|
|
2978
|
-
const r =
|
|
2979
|
-
return
|
|
3001
|
+
const r = Gn(n, s, i);
|
|
3002
|
+
return $.sequenceCache.set(t, r), $._registerSequenceElements(s, r), r;
|
|
2980
3003
|
}
|
|
2981
3004
|
static addToSequence(t, n, s, i) {
|
|
2982
|
-
const o =
|
|
3005
|
+
const o = $.sequenceCache.get(t);
|
|
2983
3006
|
if (!o) return !1;
|
|
2984
|
-
const a =
|
|
3007
|
+
const a = wt(n, i).map((c, u) => ({
|
|
2985
3008
|
index: s[u] ?? o.animationGroups.length,
|
|
2986
3009
|
group: c
|
|
2987
3010
|
}));
|
|
2988
|
-
return o.addGroups(a),
|
|
3011
|
+
return o.addGroups(a), $._registerSequenceElements(n, o), !0;
|
|
2989
3012
|
}
|
|
2990
3013
|
static _registerSequenceElements(t, n) {
|
|
2991
3014
|
for (const { target: s } of t) {
|
|
2992
3015
|
const i = Array.isArray(s) ? s : s instanceof HTMLElement ? [s] : [];
|
|
2993
3016
|
for (const o of i) {
|
|
2994
|
-
let r =
|
|
2995
|
-
r || (r = /* @__PURE__ */ new Set(),
|
|
3017
|
+
let r = $.elementSequenceMap.get(o);
|
|
3018
|
+
r || (r = /* @__PURE__ */ new Set(), $.elementSequenceMap.set(o, r)), r.add(n);
|
|
2996
3019
|
}
|
|
2997
3020
|
}
|
|
2998
3021
|
}
|
|
2999
3022
|
static removeFromSequences(t) {
|
|
3000
3023
|
for (const n of t) {
|
|
3001
|
-
const s =
|
|
3024
|
+
const s = $.elementSequenceMap.get(n);
|
|
3002
3025
|
if (s) {
|
|
3003
3026
|
for (const i of s)
|
|
3004
3027
|
i.removeGroups(
|
|
3005
3028
|
(o) => o.animations.some((r) => r.effect?.target === n)
|
|
3006
3029
|
);
|
|
3007
|
-
|
|
3030
|
+
$.elementSequenceMap.delete(n);
|
|
3008
3031
|
}
|
|
3009
3032
|
}
|
|
3010
3033
|
}
|
|
3011
3034
|
}
|
|
3012
|
-
let
|
|
3013
|
-
function
|
|
3035
|
+
let Ti = 0;
|
|
3036
|
+
function W(e, {
|
|
3014
3037
|
asCombinator: t = !1,
|
|
3015
3038
|
addItemFilter: n = !1,
|
|
3016
3039
|
useFirstChild: s = !1
|
|
@@ -3022,10 +3045,10 @@ function D(e, {
|
|
|
3022
3045
|
return e.selector;
|
|
3023
3046
|
return s ? t ? "> :first-child" : ":scope > :first-child" : "";
|
|
3024
3047
|
}
|
|
3025
|
-
function
|
|
3048
|
+
function st(e) {
|
|
3026
3049
|
return "sequenceId" in e && !("effects" in e);
|
|
3027
3050
|
}
|
|
3028
|
-
function
|
|
3051
|
+
function Ce(e, t) {
|
|
3029
3052
|
return e[t] || (e[t] = {
|
|
3030
3053
|
triggers: [],
|
|
3031
3054
|
effects: {},
|
|
@@ -3034,7 +3057,7 @@ function $e(e, t) {
|
|
|
3034
3057
|
selectors: /* @__PURE__ */ new Set()
|
|
3035
3058
|
}), e[t];
|
|
3036
3059
|
}
|
|
3037
|
-
function
|
|
3060
|
+
function Ci(e, t, n) {
|
|
3038
3061
|
const { effects: s = [] } = e;
|
|
3039
3062
|
return s.some((i, o) => n.has(t(o))) ? {
|
|
3040
3063
|
...e,
|
|
@@ -3044,66 +3067,66 @@ function $i(e, t, n) {
|
|
|
3044
3067
|
})
|
|
3045
3068
|
} : e;
|
|
3046
3069
|
}
|
|
3047
|
-
function
|
|
3048
|
-
const { effects: n = {}, sequences: s = {}, conditions: i = {} } = e, o = {}, r = e.interactions ?
|
|
3070
|
+
function Oi(e, t = !1) {
|
|
3071
|
+
const { effects: n = {}, sequences: s = {}, conditions: i = {} } = e, o = {}, r = e.interactions ? Mt(e) : /* @__PURE__ */ new Map();
|
|
3049
3072
|
return e.interactions?.forEach((a, c) => {
|
|
3050
|
-
const u = a.key, l = ++
|
|
3073
|
+
const u = a.key, l = ++Ti, { effects: f, sequences: d, ...h } = a;
|
|
3051
3074
|
if (!u) {
|
|
3052
3075
|
console.error(`Interaction ${l} is missing a key for source element.`);
|
|
3053
3076
|
return;
|
|
3054
3077
|
}
|
|
3055
|
-
|
|
3078
|
+
Ce(o, u);
|
|
3056
3079
|
const m = f ? Array.from(f) : [];
|
|
3057
3080
|
m.reverse();
|
|
3058
|
-
const p = d?.map((
|
|
3059
|
-
if (
|
|
3060
|
-
const b = s[
|
|
3061
|
-
return b ? { ...b, ...
|
|
3081
|
+
const p = d?.map((g, E) => {
|
|
3082
|
+
if (st(g)) {
|
|
3083
|
+
const b = s[g.sequenceId];
|
|
3084
|
+
return b ? { ...b, ...g } : (console.warn(`Interact: Sequence "${g.sequenceId}" not found in config`), g);
|
|
3062
3085
|
}
|
|
3063
|
-
const
|
|
3064
|
-
return
|
|
3065
|
-
}),
|
|
3086
|
+
const w = g;
|
|
3087
|
+
return w.sequenceId || (w.sequenceId = `seq-${c}-${E}`), w;
|
|
3088
|
+
}), v = {
|
|
3066
3089
|
...h,
|
|
3067
3090
|
effects: m.length > 0 ? m : void 0,
|
|
3068
3091
|
sequences: p?.map(
|
|
3069
|
-
(
|
|
3092
|
+
(g, E) => Ci(g, (w) => pe(c, w, E), r)
|
|
3070
3093
|
)
|
|
3071
3094
|
};
|
|
3072
|
-
o[u].triggers.push(
|
|
3073
|
-
|
|
3095
|
+
o[u].triggers.push(v), o[u].selectors.add(
|
|
3096
|
+
W(v, { useFirstChild: t })
|
|
3074
3097
|
);
|
|
3075
|
-
const y =
|
|
3076
|
-
m.forEach((
|
|
3077
|
-
const
|
|
3078
|
-
let b =
|
|
3098
|
+
const y = v.listContainer;
|
|
3099
|
+
m.forEach((g, E) => {
|
|
3100
|
+
const w = g.effectId ? n[g.effectId] : void 0;
|
|
3101
|
+
let b = g.key || w?.key;
|
|
3079
3102
|
const S = m.length - 1 - E;
|
|
3080
|
-
|
|
3081
|
-
const
|
|
3082
|
-
if (
|
|
3103
|
+
g.effectId || (g.effectId = `eff-${c}-${S}`);
|
|
3104
|
+
const T = r.get(pe(c, S));
|
|
3105
|
+
if (T && (g.suffix = T), b = b || u, g.key = b, y && g.listContainer && (b !== u || g.listContainer !== y))
|
|
3083
3106
|
return;
|
|
3084
|
-
const
|
|
3085
|
-
if (
|
|
3107
|
+
const C = V({ ...w, ...g, key: b }), _ = `${u}::${C}::${l}`;
|
|
3108
|
+
if (g.interactionId = _, o[u].interactionIds.add(_), b === u)
|
|
3086
3109
|
return;
|
|
3087
|
-
const
|
|
3088
|
-
|
|
3089
|
-
}), p?.forEach((
|
|
3090
|
-
if (!
|
|
3091
|
-
const E =
|
|
3092
|
-
E.effects.forEach((S,
|
|
3093
|
-
S.effectId || (S.effectId = `eff-${
|
|
3094
|
-
let
|
|
3095
|
-
if (!
|
|
3096
|
-
const
|
|
3097
|
-
|
|
3110
|
+
const I = Ce(o, b);
|
|
3111
|
+
I.effects[_] || (I.effects[_] = [], I.interactionIds.add(_)), I.effects[_].push({ ...h, effect: g }), I.selectors.add(W(g, { useFirstChild: t }));
|
|
3112
|
+
}), p?.forEach((g) => {
|
|
3113
|
+
if (!g || st(g)) return;
|
|
3114
|
+
const E = g, w = E.sequenceId;
|
|
3115
|
+
E.effects.forEach((S, T) => {
|
|
3116
|
+
S.effectId || (S.effectId = `eff-${w}-${T}`);
|
|
3117
|
+
let C = S.key;
|
|
3118
|
+
if (!C && S.effectId) {
|
|
3119
|
+
const I = n[S.effectId];
|
|
3120
|
+
I && (C = I.key);
|
|
3098
3121
|
}
|
|
3099
|
-
|
|
3100
|
-
const
|
|
3101
|
-
if (
|
|
3102
|
-
const
|
|
3103
|
-
|
|
3122
|
+
C = C || u;
|
|
3123
|
+
const _ = W(S, { useFirstChild: t });
|
|
3124
|
+
if (_ && o[u].selectors.add(_), C !== u) {
|
|
3125
|
+
const I = Ce(o, C), k = `${C}::seq::${w}::${l}`;
|
|
3126
|
+
I.sequences[k] || (I.sequences[k] = [], I.interactionIds.add(k)), I.sequences[k].push({
|
|
3104
3127
|
...h,
|
|
3105
3128
|
sequence: E
|
|
3106
|
-
}),
|
|
3129
|
+
}), I.selectors.add(_);
|
|
3107
3130
|
}
|
|
3108
3131
|
});
|
|
3109
3132
|
});
|
|
@@ -3114,10 +3137,10 @@ function bi(e, t = !1) {
|
|
|
3114
3137
|
interactions: o
|
|
3115
3138
|
};
|
|
3116
3139
|
}
|
|
3117
|
-
function
|
|
3118
|
-
const o =
|
|
3140
|
+
function $e(e, t, n, s, i) {
|
|
3141
|
+
const o = $.getPluginsNames();
|
|
3119
3142
|
for (const r of o) {
|
|
3120
|
-
const a = `${
|
|
3143
|
+
const a = `${ot}${r}`;
|
|
3121
3144
|
if (!(a in n))
|
|
3122
3145
|
continue;
|
|
3123
3146
|
const c = n[a];
|
|
@@ -3126,11 +3149,11 @@ function ye(e, t, n, s, i) {
|
|
|
3126
3149
|
continue;
|
|
3127
3150
|
e._appliedPlugins.add(c);
|
|
3128
3151
|
}
|
|
3129
|
-
const l =
|
|
3152
|
+
const l = $.getPlugin(r)(c, { root: t, key: s, scope: i, config: n });
|
|
3130
3153
|
typeof l == "function" && e._pluginCleanups.push(l);
|
|
3131
3154
|
}
|
|
3132
3155
|
}
|
|
3133
|
-
function
|
|
3156
|
+
function ye(e, t, n) {
|
|
3134
3157
|
if (e.listContainer) {
|
|
3135
3158
|
const s = t.querySelector(e.listContainer);
|
|
3136
3159
|
return s ? e.selector ? Array.from(s.querySelectorAll(e.selector)) : Array.from(s.children) : (console.warn(`Interact: No container found for list container "${e.listContainer}"`), []);
|
|
@@ -3143,20 +3166,20 @@ function pe(e, t, n) {
|
|
|
3143
3166
|
}
|
|
3144
3167
|
return n ? t.firstElementChild : t;
|
|
3145
3168
|
}
|
|
3146
|
-
function
|
|
3169
|
+
function Ee(e, t) {
|
|
3147
3170
|
return t.map((n) => e.selector ? n.querySelector(e.selector) : n).filter(Boolean);
|
|
3148
3171
|
}
|
|
3149
|
-
function
|
|
3172
|
+
function Nt(e, t, n, s, i, o, r, a) {
|
|
3150
3173
|
return [
|
|
3151
|
-
r ?
|
|
3152
|
-
a ?
|
|
3174
|
+
r ? Ee(e, r) : ye(e, n, s),
|
|
3175
|
+
a ? Ee(t, a) : ye(t, i, o)
|
|
3153
3176
|
];
|
|
3154
3177
|
}
|
|
3155
|
-
function
|
|
3178
|
+
function jt(e, t, n, s, i, o, r, a) {
|
|
3156
3179
|
const c = Array.isArray(s), u = Array.isArray(i);
|
|
3157
3180
|
c ? s.forEach((l, f) => {
|
|
3158
3181
|
const d = u ? i[f] : i;
|
|
3159
|
-
d &&
|
|
3182
|
+
d && it(
|
|
3160
3183
|
e,
|
|
3161
3184
|
l,
|
|
3162
3185
|
t.trigger,
|
|
@@ -3168,7 +3191,7 @@ function Mt(e, t, n, s, i, o, r, a) {
|
|
|
3168
3191
|
a
|
|
3169
3192
|
);
|
|
3170
3193
|
}) : (u ? i : [i]).forEach((f) => {
|
|
3171
|
-
|
|
3194
|
+
it(
|
|
3172
3195
|
e,
|
|
3173
3196
|
s,
|
|
3174
3197
|
t.trigger,
|
|
@@ -3181,7 +3204,7 @@ function Mt(e, t, n, s, i, o, r, a) {
|
|
|
3181
3204
|
);
|
|
3182
3205
|
});
|
|
3183
3206
|
}
|
|
3184
|
-
function
|
|
3207
|
+
function zt(e, t, n, s, i) {
|
|
3185
3208
|
const o = {}, r = [];
|
|
3186
3209
|
(s.effects || []).forEach((a, c) => {
|
|
3187
3210
|
const u = a.effectId, l = {
|
|
@@ -3191,7 +3214,7 @@ function Pt(e, t, n, s, i) {
|
|
|
3191
3214
|
}, f = l.key, d = q(a.interactionId, e);
|
|
3192
3215
|
if (o[d] || n.addedInteractions[d] && !i)
|
|
3193
3216
|
return;
|
|
3194
|
-
const h =
|
|
3217
|
+
const h = L(l.conditions || [], n.dataCache.conditions);
|
|
3195
3218
|
if (h && n.setupMediaQueryListener(`${d}::${c}`, h, e, () => {
|
|
3196
3219
|
t.update();
|
|
3197
3220
|
}), !h || h.matches) {
|
|
@@ -3199,19 +3222,19 @@ function Pt(e, t, n, s, i) {
|
|
|
3199
3222
|
const m = f && q(f, e);
|
|
3200
3223
|
let p;
|
|
3201
3224
|
if (m) {
|
|
3202
|
-
if (p =
|
|
3225
|
+
if (p = $.getController(m), !p)
|
|
3203
3226
|
return;
|
|
3204
3227
|
l.listContainer && p.watchChildList(l.listContainer);
|
|
3205
3228
|
} else
|
|
3206
3229
|
p = t;
|
|
3207
|
-
|
|
3230
|
+
$e(
|
|
3208
3231
|
p,
|
|
3209
3232
|
p.element,
|
|
3210
3233
|
l,
|
|
3211
3234
|
m || s.key,
|
|
3212
3235
|
"effect"
|
|
3213
3236
|
);
|
|
3214
|
-
const [
|
|
3237
|
+
const [v, y] = Nt(
|
|
3215
3238
|
s,
|
|
3216
3239
|
l,
|
|
3217
3240
|
t.element,
|
|
@@ -3220,18 +3243,18 @@ function Pt(e, t, n, s, i) {
|
|
|
3220
3243
|
p.useFirstChild,
|
|
3221
3244
|
i
|
|
3222
3245
|
);
|
|
3223
|
-
if (!
|
|
3246
|
+
if (!v || !y)
|
|
3224
3247
|
return;
|
|
3225
3248
|
n.addedInteractions[d] = !0;
|
|
3226
|
-
const
|
|
3249
|
+
const g = m || s.key, E = x(
|
|
3227
3250
|
l.conditions || [],
|
|
3228
3251
|
n.dataCache.conditions
|
|
3229
3252
|
);
|
|
3230
3253
|
r.push([
|
|
3231
|
-
|
|
3254
|
+
g,
|
|
3232
3255
|
s,
|
|
3233
3256
|
l,
|
|
3234
|
-
|
|
3257
|
+
v,
|
|
3235
3258
|
y,
|
|
3236
3259
|
E,
|
|
3237
3260
|
p.useFirstChild,
|
|
@@ -3239,14 +3262,14 @@ function Pt(e, t, n, s, i) {
|
|
|
3239
3262
|
]);
|
|
3240
3263
|
}
|
|
3241
3264
|
}), r.reverse().forEach((a) => {
|
|
3242
|
-
|
|
3243
|
-
}),
|
|
3265
|
+
jt(...a);
|
|
3266
|
+
}), ki(e, t, n, s, i);
|
|
3244
3267
|
}
|
|
3245
|
-
function
|
|
3268
|
+
function _i(e) {
|
|
3246
3269
|
return "sequenceId" in e && !("effects" in e);
|
|
3247
3270
|
}
|
|
3248
|
-
function
|
|
3249
|
-
const a =
|
|
3271
|
+
function Ht(e, t, n, s, i, o, r) {
|
|
3272
|
+
const a = L(e.conditions || [], i.dataCache.conditions);
|
|
3250
3273
|
if (a && i.setupMediaQueryListener(t, a, o.updateKey, o.onUpdate), a && !a.matches) return null;
|
|
3251
3274
|
const c = e.effects || [], u = [];
|
|
3252
3275
|
let l = !1;
|
|
@@ -3254,7 +3277,7 @@ function Lt(e, t, n, s, i, o, r) {
|
|
|
3254
3277
|
const d = f.effectId, m = {
|
|
3255
3278
|
...d ? i.dataCache.effects[d] || {} : {},
|
|
3256
3279
|
...f
|
|
3257
|
-
}, p =
|
|
3280
|
+
}, p = L(m.conditions || [], i.dataCache.conditions);
|
|
3258
3281
|
if (p) {
|
|
3259
3282
|
const S = `${t}::${d || "eff"}`;
|
|
3260
3283
|
i.setupMediaQueryListener(
|
|
@@ -3265,52 +3288,52 @@ function Lt(e, t, n, s, i, o, r) {
|
|
|
3265
3288
|
);
|
|
3266
3289
|
}
|
|
3267
3290
|
if (p && !p.matches) continue;
|
|
3268
|
-
const
|
|
3269
|
-
let
|
|
3291
|
+
const v = m.key, y = v && q(v, n);
|
|
3292
|
+
let g;
|
|
3270
3293
|
if (y) {
|
|
3271
|
-
if (
|
|
3294
|
+
if (g = $.getController(y), !g) return null;
|
|
3272
3295
|
} else
|
|
3273
|
-
|
|
3296
|
+
g = s;
|
|
3274
3297
|
const E = y || n;
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3298
|
+
$e(
|
|
3299
|
+
g,
|
|
3300
|
+
g.element,
|
|
3278
3301
|
m,
|
|
3279
3302
|
E,
|
|
3280
3303
|
"effect"
|
|
3281
3304
|
);
|
|
3282
|
-
let
|
|
3283
|
-
if (r && E === r.controllerKey && m.listContainer === r.listContainer ? (
|
|
3305
|
+
let w;
|
|
3306
|
+
if (r && E === r.controllerKey && m.listContainer === r.listContainer ? (w = Ee(m, r.elements), w.length > 0 && (l = !0)) : w = ye(
|
|
3284
3307
|
m,
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
),
|
|
3288
|
-
const b =
|
|
3289
|
-
u.push({ target:
|
|
3308
|
+
g.element,
|
|
3309
|
+
g.useFirstChild
|
|
3310
|
+
), !w || Array.isArray(w) && w.length === 0) return null;
|
|
3311
|
+
const b = F(m);
|
|
3312
|
+
u.push({ target: w, options: b });
|
|
3290
3313
|
}
|
|
3291
3314
|
return r && !l ? null : u.length > 0 ? u : null;
|
|
3292
3315
|
}
|
|
3293
|
-
function
|
|
3294
|
-
const s = n ?
|
|
3316
|
+
function Re(e, t, n) {
|
|
3317
|
+
const s = n ? Ee(e, n) : ye(e, t.element, t.useFirstChild);
|
|
3295
3318
|
return Array.isArray(s) && s.length === 0 ? null : s;
|
|
3296
3319
|
}
|
|
3297
|
-
function
|
|
3320
|
+
function Ne(e, t, n, s, i) {
|
|
3298
3321
|
(Array.isArray(n) ? n : [n]).forEach((r) => {
|
|
3299
|
-
|
|
3322
|
+
G[e.trigger]?.add(
|
|
3300
3323
|
r,
|
|
3301
3324
|
r,
|
|
3302
3325
|
{ triggerType: t.triggerType },
|
|
3303
3326
|
e.params || {},
|
|
3304
3327
|
{
|
|
3305
|
-
reducedMotion:
|
|
3328
|
+
reducedMotion: $.forceReducedMotion,
|
|
3306
3329
|
selectorCondition: i,
|
|
3307
3330
|
animation: s,
|
|
3308
|
-
allowA11yTriggers:
|
|
3331
|
+
allowA11yTriggers: $.allowA11yTriggers
|
|
3309
3332
|
}
|
|
3310
3333
|
);
|
|
3311
3334
|
});
|
|
3312
3335
|
}
|
|
3313
|
-
function
|
|
3336
|
+
function Dt(e, t, n) {
|
|
3314
3337
|
const o = (e.useFirstChild ? e.element.firstElementChild : e.element)?.querySelector(t);
|
|
3315
3338
|
if (!o) return n.map((a, c) => c);
|
|
3316
3339
|
const r = Array.from(o.children);
|
|
@@ -3319,10 +3342,10 @@ function xt(e, t, n) {
|
|
|
3319
3342
|
return c >= 0 ? c : r.length;
|
|
3320
3343
|
});
|
|
3321
3344
|
}
|
|
3322
|
-
function
|
|
3345
|
+
function ki(e, t, n, s, i) {
|
|
3323
3346
|
s.sequences?.forEach((o) => {
|
|
3324
3347
|
let r;
|
|
3325
|
-
if (
|
|
3348
|
+
if (_i(o)) {
|
|
3326
3349
|
const m = n.dataCache.sequences[o.sequenceId];
|
|
3327
3350
|
if (!m) {
|
|
3328
3351
|
console.warn(`Interact: Sequence "${o.sequenceId}" not found in cache`);
|
|
@@ -3331,9 +3354,9 @@ function Ii(e, t, n, s, i) {
|
|
|
3331
3354
|
r = { ...m, ...o };
|
|
3332
3355
|
} else
|
|
3333
3356
|
r = o;
|
|
3334
|
-
const a = r.sequenceId ||
|
|
3357
|
+
const a = r.sequenceId || J(), c = q(`${e}::seq::${a}`, e);
|
|
3335
3358
|
if (n.addedInteractions[c] && !i) return;
|
|
3336
|
-
const u = i && s.listContainer ? { controllerKey: e, listContainer: s.listContainer, elements: i } : void 0, l =
|
|
3359
|
+
const u = i && s.listContainer ? { controllerKey: e, listContainer: s.listContainer, elements: i } : void 0, l = Ht(
|
|
3337
3360
|
r,
|
|
3338
3361
|
c,
|
|
3339
3362
|
e,
|
|
@@ -3344,36 +3367,36 @@ function Ii(e, t, n, s, i) {
|
|
|
3344
3367
|
);
|
|
3345
3368
|
if (!l) return;
|
|
3346
3369
|
if (i && n.addedInteractions[c]) {
|
|
3347
|
-
const m =
|
|
3370
|
+
const m = Dt(
|
|
3348
3371
|
t,
|
|
3349
3372
|
s.listContainer,
|
|
3350
3373
|
i
|
|
3351
3374
|
);
|
|
3352
|
-
|
|
3353
|
-
reducedMotion:
|
|
3375
|
+
$.addToSequence(c, l, m, {
|
|
3376
|
+
reducedMotion: $.forceReducedMotion
|
|
3354
3377
|
});
|
|
3355
|
-
const p =
|
|
3356
|
-
reducedMotion:
|
|
3357
|
-
}),
|
|
3378
|
+
const p = $.getSequence(c, r, l, {
|
|
3379
|
+
reducedMotion: $.forceReducedMotion
|
|
3380
|
+
}), v = x(
|
|
3358
3381
|
s.conditions || [],
|
|
3359
3382
|
n.dataCache.conditions
|
|
3360
|
-
), y =
|
|
3361
|
-
y &&
|
|
3383
|
+
), y = Re(s, t, i);
|
|
3384
|
+
y && Ne(
|
|
3362
3385
|
s,
|
|
3363
3386
|
r,
|
|
3364
3387
|
y,
|
|
3365
3388
|
p,
|
|
3366
|
-
|
|
3389
|
+
v
|
|
3367
3390
|
);
|
|
3368
3391
|
return;
|
|
3369
3392
|
}
|
|
3370
|
-
const f =
|
|
3371
|
-
reducedMotion:
|
|
3372
|
-
}), d =
|
|
3393
|
+
const f = $.getSequence(c, r, l, {
|
|
3394
|
+
reducedMotion: $.forceReducedMotion
|
|
3395
|
+
}), d = x(
|
|
3373
3396
|
s.conditions || [],
|
|
3374
3397
|
n.dataCache.conditions
|
|
3375
|
-
), h =
|
|
3376
|
-
h && (n.addedInteractions[c] = !0,
|
|
3398
|
+
), h = Re(s, t, i);
|
|
3399
|
+
h && (n.addedInteractions[c] = !0, Ne(
|
|
3377
3400
|
s,
|
|
3378
3401
|
r,
|
|
3379
3402
|
h,
|
|
@@ -3382,23 +3405,23 @@ function Ii(e, t, n, s, i) {
|
|
|
3382
3405
|
));
|
|
3383
3406
|
});
|
|
3384
3407
|
}
|
|
3385
|
-
function
|
|
3408
|
+
function Ai(e, t, n, s, i) {
|
|
3386
3409
|
const o = n.get(e)?.sequences || {};
|
|
3387
3410
|
Object.keys(o).forEach((a) => {
|
|
3388
3411
|
o[a].some(({ sequence: u, ...l }) => {
|
|
3389
|
-
const f =
|
|
3412
|
+
const f = L(
|
|
3390
3413
|
l.conditions || [],
|
|
3391
3414
|
n.dataCache.conditions
|
|
3392
3415
|
);
|
|
3393
3416
|
if (f && !f.matches)
|
|
3394
3417
|
return !1;
|
|
3395
|
-
const d = l.key && q(l.key, e), h =
|
|
3418
|
+
const d = l.key && q(l.key, e), h = $.getController(d);
|
|
3396
3419
|
if (!h)
|
|
3397
3420
|
return !0;
|
|
3398
|
-
const m = u.sequenceId ||
|
|
3421
|
+
const m = u.sequenceId || J(), p = q(`${d}::seq::${m}`, d);
|
|
3399
3422
|
if (n.addedInteractions[p] && !i)
|
|
3400
3423
|
return !0;
|
|
3401
|
-
const y =
|
|
3424
|
+
const y = Ht(
|
|
3402
3425
|
u,
|
|
3403
3426
|
p,
|
|
3404
3427
|
d,
|
|
@@ -3409,48 +3432,48 @@ function Ti(e, t, n, s, i) {
|
|
|
3409
3432
|
);
|
|
3410
3433
|
if (!y) return !0;
|
|
3411
3434
|
if (i && n.addedInteractions[p]) {
|
|
3412
|
-
const b =
|
|
3413
|
-
return
|
|
3414
|
-
reducedMotion:
|
|
3435
|
+
const b = Dt(t, s, i);
|
|
3436
|
+
return $.addToSequence(p, y, b, {
|
|
3437
|
+
reducedMotion: $.forceReducedMotion
|
|
3415
3438
|
}), !0;
|
|
3416
3439
|
}
|
|
3417
|
-
const
|
|
3418
|
-
reducedMotion:
|
|
3419
|
-
}), E =
|
|
3440
|
+
const g = $.getSequence(p, u, y, {
|
|
3441
|
+
reducedMotion: $.forceReducedMotion
|
|
3442
|
+
}), E = x(
|
|
3420
3443
|
l.conditions || [],
|
|
3421
3444
|
n.dataCache.conditions
|
|
3422
|
-
),
|
|
3423
|
-
return
|
|
3445
|
+
), w = Re(l, h);
|
|
3446
|
+
return w && (n.addedInteractions[p] = !0, Ne(
|
|
3424
3447
|
l,
|
|
3425
3448
|
u,
|
|
3426
|
-
|
|
3427
|
-
|
|
3449
|
+
w,
|
|
3450
|
+
g,
|
|
3428
3451
|
E
|
|
3429
3452
|
)), !0;
|
|
3430
3453
|
});
|
|
3431
3454
|
});
|
|
3432
3455
|
}
|
|
3433
|
-
function
|
|
3456
|
+
function Gt(e, t, n, s, i) {
|
|
3434
3457
|
const o = n.get(e), r = o?.effects || {}, a = Object.keys(r), c = [];
|
|
3435
3458
|
a.forEach((l) => {
|
|
3436
3459
|
const f = q(l, e);
|
|
3437
3460
|
if (n.addedInteractions[f] && !i)
|
|
3438
3461
|
return;
|
|
3439
3462
|
r[l].some(({ effect: h, ...m }, p) => {
|
|
3440
|
-
const
|
|
3463
|
+
const v = L(
|
|
3441
3464
|
m.conditions || [],
|
|
3442
3465
|
n.dataCache.conditions
|
|
3443
3466
|
);
|
|
3444
|
-
if (
|
|
3467
|
+
if (v && !v.matches)
|
|
3445
3468
|
return !1;
|
|
3446
|
-
const y = h.effectId,
|
|
3469
|
+
const y = h.effectId, g = {
|
|
3447
3470
|
...n.dataCache.effects[y] || {},
|
|
3448
3471
|
...h,
|
|
3449
3472
|
effectId: y
|
|
3450
3473
|
};
|
|
3451
|
-
if (s &&
|
|
3474
|
+
if (s && g.listContainer !== s)
|
|
3452
3475
|
return !1;
|
|
3453
|
-
const E =
|
|
3476
|
+
const E = L(g.conditions || [], n.dataCache.conditions);
|
|
3454
3477
|
if (E && n.setupMediaQueryListener(
|
|
3455
3478
|
`${f}::${p}`,
|
|
3456
3479
|
E,
|
|
@@ -3459,19 +3482,19 @@ function Ft(e, t, n, s, i) {
|
|
|
3459
3482
|
t.update();
|
|
3460
3483
|
}
|
|
3461
3484
|
), !E || E.matches) {
|
|
3462
|
-
const
|
|
3485
|
+
const w = m.key && q(m.key, e), b = $.getController(w);
|
|
3463
3486
|
if (!b)
|
|
3464
3487
|
return !0;
|
|
3465
|
-
|
|
3488
|
+
$e(
|
|
3466
3489
|
t,
|
|
3467
3490
|
t.element,
|
|
3468
|
-
|
|
3491
|
+
g,
|
|
3469
3492
|
e,
|
|
3470
3493
|
"effect"
|
|
3471
|
-
),
|
|
3472
|
-
const [S,
|
|
3494
|
+
), g.listContainer && t.watchChildList(g.listContainer);
|
|
3495
|
+
const [S, T] = Nt(
|
|
3473
3496
|
m,
|
|
3474
|
-
|
|
3497
|
+
g,
|
|
3475
3498
|
b.element,
|
|
3476
3499
|
b.useFirstChild,
|
|
3477
3500
|
t.element,
|
|
@@ -3479,33 +3502,33 @@ function Ft(e, t, n, s, i) {
|
|
|
3479
3502
|
void 0,
|
|
3480
3503
|
i
|
|
3481
3504
|
);
|
|
3482
|
-
if (!S || !
|
|
3505
|
+
if (!S || !T)
|
|
3483
3506
|
return !0;
|
|
3484
3507
|
n.addedInteractions[f] = !0;
|
|
3485
|
-
const
|
|
3486
|
-
|
|
3508
|
+
const C = x(
|
|
3509
|
+
g.conditions || [],
|
|
3487
3510
|
n.dataCache.conditions
|
|
3488
3511
|
);
|
|
3489
3512
|
return c.push([
|
|
3490
3513
|
e,
|
|
3491
3514
|
m,
|
|
3492
|
-
|
|
3515
|
+
g,
|
|
3493
3516
|
S,
|
|
3517
|
+
T,
|
|
3494
3518
|
C,
|
|
3495
|
-
O,
|
|
3496
3519
|
t.useFirstChild,
|
|
3497
|
-
|
|
3520
|
+
w || void 0
|
|
3498
3521
|
]), !0;
|
|
3499
3522
|
}
|
|
3500
3523
|
return !1;
|
|
3501
3524
|
});
|
|
3502
3525
|
}), c.reverse().forEach((l) => {
|
|
3503
|
-
|
|
3504
|
-
}),
|
|
3526
|
+
jt(...l);
|
|
3527
|
+
}), Ai(e, t, n, s, i);
|
|
3505
3528
|
const u = Object.keys(o?.sequences || {}).length > 0;
|
|
3506
3529
|
return a.length > 0 || u;
|
|
3507
3530
|
}
|
|
3508
|
-
function
|
|
3531
|
+
function it(e, t, n, s, i, o, r, a, c) {
|
|
3509
3532
|
let u;
|
|
3510
3533
|
if (i.transition || i.transitionProperties) {
|
|
3511
3534
|
const f = {
|
|
@@ -3513,83 +3536,83 @@ function Ze(e, t, n, s, i, o, r, a, c) {
|
|
|
3513
3536
|
effectId: i.effectId,
|
|
3514
3537
|
transition: i.transition,
|
|
3515
3538
|
transitionProperties: i.transitionProperties,
|
|
3516
|
-
childSelector:
|
|
3539
|
+
childSelector: W(i, {
|
|
3517
3540
|
asCombinator: !0,
|
|
3518
3541
|
addItemFilter: !0,
|
|
3519
3542
|
useFirstChild: a
|
|
3520
3543
|
}),
|
|
3521
3544
|
selectorCondition: r
|
|
3522
3545
|
};
|
|
3523
|
-
if (u =
|
|
3546
|
+
if (u = $.getController(e), !u)
|
|
3524
3547
|
return;
|
|
3525
|
-
u.renderStyle(
|
|
3548
|
+
u.renderStyle(Yn(f));
|
|
3526
3549
|
}
|
|
3527
3550
|
let l;
|
|
3528
3551
|
if (n === "animationEnd") {
|
|
3529
|
-
const f = o.effectId, h = (c ?
|
|
3530
|
-
h && (l =
|
|
3552
|
+
const f = o.effectId, h = (c ? $.getInstance(c) : void 0)?.dataCache.effects[f];
|
|
3553
|
+
h && (l = F(h));
|
|
3531
3554
|
}
|
|
3532
|
-
|
|
3533
|
-
reducedMotion:
|
|
3555
|
+
G[n]?.add(t, s, i, o, {
|
|
3556
|
+
reducedMotion: $.forceReducedMotion,
|
|
3534
3557
|
targetController: u,
|
|
3535
3558
|
selectorCondition: r,
|
|
3536
|
-
allowA11yTriggers:
|
|
3559
|
+
allowA11yTriggers: $.allowA11yTriggers,
|
|
3537
3560
|
sourceAnimationOptions: l
|
|
3538
3561
|
});
|
|
3539
3562
|
}
|
|
3540
|
-
function
|
|
3541
|
-
const t = e.key, n =
|
|
3563
|
+
function Mi(e) {
|
|
3564
|
+
const t = e.key, n = $.getInstance(t);
|
|
3542
3565
|
if (!n)
|
|
3543
|
-
return console.warn(`No instance found for key: ${t}`),
|
|
3566
|
+
return console.warn(`No instance found for key: ${t}`), $.setController(t, e), !1;
|
|
3544
3567
|
const { triggers: s = [] } = n?.get(t) || {}, i = s.length > 0;
|
|
3545
3568
|
n.setController(t, e), s.forEach((r, a) => {
|
|
3546
|
-
const c =
|
|
3569
|
+
const c = L(r.conditions, n.dataCache.conditions);
|
|
3547
3570
|
if (c) {
|
|
3548
3571
|
const u = `${t}::trigger::${a}`;
|
|
3549
3572
|
n.setupMediaQueryListener(u, c, t, () => {
|
|
3550
3573
|
e.update();
|
|
3551
3574
|
});
|
|
3552
3575
|
}
|
|
3553
|
-
(!c || c.matches) && (
|
|
3576
|
+
(!c || c.matches) && ($e(e, e.element, r, t, "interaction"), r.listContainer && e.watchChildList(r.listContainer), zt(t, e, n, r));
|
|
3554
3577
|
});
|
|
3555
3578
|
let o = !1;
|
|
3556
|
-
return n && (o =
|
|
3579
|
+
return n && (o = Gt(t, e, n)), i || o;
|
|
3557
3580
|
}
|
|
3558
|
-
function
|
|
3559
|
-
const s = e.key, i =
|
|
3581
|
+
function qi(e, t, n) {
|
|
3582
|
+
const s = e.key, i = $.getInstance(s);
|
|
3560
3583
|
if (i) {
|
|
3561
3584
|
const { triggers: o = [] } = i?.get(s) || {};
|
|
3562
3585
|
o.forEach((r, a) => {
|
|
3563
3586
|
if (r.listContainer !== t)
|
|
3564
3587
|
return;
|
|
3565
|
-
const c =
|
|
3588
|
+
const c = L(r.conditions, i.dataCache.conditions);
|
|
3566
3589
|
if (c) {
|
|
3567
3590
|
const u = `${s}::listTrigger::${t}::${a}`;
|
|
3568
3591
|
i.setupMediaQueryListener(u, c, s, () => {
|
|
3569
3592
|
e.update();
|
|
3570
3593
|
});
|
|
3571
3594
|
}
|
|
3572
|
-
(!c || c.matches) &&
|
|
3573
|
-
}),
|
|
3595
|
+
(!c || c.matches) && zt(s, e, i, r, n);
|
|
3596
|
+
}), Gt(s, e, i, t, n);
|
|
3574
3597
|
}
|
|
3575
3598
|
}
|
|
3576
|
-
function
|
|
3577
|
-
const n = e.key, s =
|
|
3599
|
+
function Pi(e, t = !1) {
|
|
3600
|
+
const n = e.key, s = $.getInstance(n);
|
|
3578
3601
|
if (!s)
|
|
3579
3602
|
return;
|
|
3580
3603
|
const i = [...s.get(n)?.selectors.values() || []].filter(Boolean).join(",");
|
|
3581
3604
|
let o;
|
|
3582
|
-
i ? (o = [...e.element.querySelectorAll(i)], e.useFirstChild || o.push(e.element)) : o = [e.element],
|
|
3605
|
+
i ? (o = [...e.element.querySelectorAll(i)], e.useFirstChild || o.push(e.element)) : o = [e.element], Wt(o), s.deleteController(n, t);
|
|
3583
3606
|
}
|
|
3584
|
-
function
|
|
3585
|
-
const t = Object.values(
|
|
3607
|
+
function Wt(e) {
|
|
3608
|
+
const t = Object.values(G);
|
|
3586
3609
|
for (const n of e)
|
|
3587
3610
|
for (const s of t)
|
|
3588
3611
|
s.remove(n);
|
|
3589
|
-
|
|
3612
|
+
$.removeFromSequences(e);
|
|
3590
3613
|
}
|
|
3591
|
-
const
|
|
3592
|
-
class
|
|
3614
|
+
const Oe = "interactEffect";
|
|
3615
|
+
class Li {
|
|
3593
3616
|
element;
|
|
3594
3617
|
key;
|
|
3595
3618
|
connected;
|
|
@@ -3611,10 +3634,10 @@ class Ai {
|
|
|
3611
3634
|
}
|
|
3612
3635
|
n !== t && (n && console.warn(
|
|
3613
3636
|
`Interact: Key mismatch between element ${n} and parameter ${t}, updating element key`
|
|
3614
|
-
), this.element.dataset.interactKey = t), this.key = t, this.connected =
|
|
3637
|
+
), this.element.dataset.interactKey = t), this.key = t, this.connected = Mi(this);
|
|
3615
3638
|
}
|
|
3616
3639
|
disconnect({ removeFromCache: t = !1 } = {}) {
|
|
3617
|
-
if ((this.key || this.element.dataset.interactKey) &&
|
|
3640
|
+
if ((this.key || this.element.dataset.interactKey) && Pi(this, t), this._pluginCleanups.length) {
|
|
3618
3641
|
for (const s of this._pluginCleanups)
|
|
3619
3642
|
try {
|
|
3620
3643
|
s();
|
|
@@ -3657,12 +3680,12 @@ class Ai {
|
|
|
3657
3680
|
return;
|
|
3658
3681
|
}
|
|
3659
3682
|
const o = new Set(
|
|
3660
|
-
this.element.dataset[
|
|
3683
|
+
this.element.dataset[Oe]?.split(" ") || []
|
|
3661
3684
|
);
|
|
3662
|
-
n === "toggle" ? o.has(t) ? o.delete(t) : o.add(t) : n === "add" ? o.add(t) : n === "remove" ? o.delete(t) : n === "clear" && o.clear(), (s || this.element).dataset[
|
|
3685
|
+
n === "toggle" ? o.has(t) ? o.delete(t) : o.add(t) : n === "add" ? o.add(t) : n === "remove" ? o.delete(t) : n === "clear" && o.clear(), (s || this.element).dataset[Oe] = Array.from(o).join(" ");
|
|
3663
3686
|
}
|
|
3664
3687
|
getActiveEffects() {
|
|
3665
|
-
const n = (this.element.dataset[
|
|
3688
|
+
const n = (this.element.dataset[Oe] || "").trim();
|
|
3666
3689
|
return n ? n.split(/\s+/) : [];
|
|
3667
3690
|
}
|
|
3668
3691
|
watchChildList(t) {
|
|
@@ -3680,21 +3703,21 @@ class Ai {
|
|
|
3680
3703
|
}), r.addedNodes.forEach((a) => {
|
|
3681
3704
|
a instanceof HTMLElement && o.push(a);
|
|
3682
3705
|
});
|
|
3683
|
-
}),
|
|
3706
|
+
}), Wt(i), s && qi(this, t, o);
|
|
3684
3707
|
}
|
|
3685
3708
|
}
|
|
3686
|
-
function
|
|
3687
|
-
new
|
|
3709
|
+
function Fi(e, t) {
|
|
3710
|
+
new Li(e, t).connect();
|
|
3688
3711
|
}
|
|
3689
|
-
function
|
|
3690
|
-
const t =
|
|
3712
|
+
function Ri(e) {
|
|
3713
|
+
const t = $.getController(e);
|
|
3691
3714
|
t && t.disconnect({ removeFromCache: !0 });
|
|
3692
3715
|
}
|
|
3693
3716
|
export {
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3717
|
+
Li as I,
|
|
3718
|
+
$ as a,
|
|
3719
|
+
Fi as b,
|
|
3720
|
+
xi as g,
|
|
3721
|
+
Ri as r
|
|
3699
3722
|
};
|
|
3700
|
-
//# sourceMappingURL=index-
|
|
3723
|
+
//# sourceMappingURL=index-CUMAPyzu.mjs.map
|