@wix/interact 2.7.0 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/react.js +1 -1
- package/dist/cjs/web.js +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/react.js +2 -2
- package/dist/es/web.js +2 -2
- package/dist/{index-76zNBcNy.mjs → index-Bn1cDv1F.mjs} +1652 -1465
- package/dist/index-Bn1cDv1F.mjs.map +1 -0
- package/dist/index-bjIzuPaD.js +29 -0
- package/dist/index-bjIzuPaD.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/core/Interact.d.ts +15 -15
- package/dist/types/core/Interact.d.ts.map +1 -1
- package/dist/types/core/add.d.ts.map +1 -1
- package/dist/types/core/css.d.ts +1 -1
- package/dist/types/core/css.d.ts.map +1 -1
- package/dist/types/core/reducedMotion.d.ts +21 -0
- package/dist/types/core/reducedMotion.d.ts.map +1 -0
- package/dist/types/core/resolvers.d.ts +3 -3
- package/dist/types/core/resolvers.d.ts.map +1 -1
- package/dist/types/handlers/animationEnd.d.ts +1 -1
- package/dist/types/handlers/animationEnd.d.ts.map +1 -1
- package/dist/types/handlers/effectHandlers.d.ts +2 -2
- package/dist/types/handlers/effectHandlers.d.ts.map +1 -1
- package/dist/types/handlers/eventTrigger.d.ts +1 -1
- package/dist/types/handlers/eventTrigger.d.ts.map +1 -1
- package/dist/types/handlers/pointerMove.d.ts +1 -1
- package/dist/types/handlers/pointerMove.d.ts.map +1 -1
- package/dist/types/handlers/viewEnter.d.ts +1 -1
- package/dist/types/handlers/viewEnter.d.ts.map +1 -1
- package/dist/types/handlers/viewProgress.d.ts +1 -1
- package/dist/types/handlers/viewProgress.d.ts.map +1 -1
- package/dist/types/types/config.d.ts +6 -1
- package/dist/types/types/config.d.ts.map +1 -1
- package/dist/types/types/css.d.ts +26 -0
- package/dist/types/types/css.d.ts.map +1 -1
- package/dist/types/types/effects.d.ts +2 -0
- package/dist/types/types/effects.d.ts.map +1 -1
- package/dist/types/types/handlers.d.ts +4 -1
- package/dist/types/types/handlers.d.ts.map +1 -1
- package/dist/types/types/internal.d.ts +3 -1
- package/dist/types/types/internal.d.ts.map +1 -1
- package/dist/types/utils.d.ts +1 -0
- package/dist/types/utils.d.ts.map +1 -1
- package/docs/api/interact-class.md +16 -2
- package/docs/api/types.md +21 -3
- package/docs/guides/conditions-and-media-queries.md +53 -0
- package/package.json +1 -1
- package/rules/full-lean.md +30 -3
- package/rules/integration.md +2 -2
- package/rules/validate.md +47 -38
- package/dist/index-76zNBcNy.mjs.map +0 -1
- package/dist/index-BMJFenGC.js +0 -29
- package/dist/index-BMJFenGC.js.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
function
|
|
1
|
+
function hn(e) {
|
|
2
2
|
return [...e.matchAll(/\[([^\]]+)]/g)].map(([t, n]) => n);
|
|
3
3
|
}
|
|
4
|
-
function
|
|
5
|
-
const n =
|
|
4
|
+
function A(e, t) {
|
|
5
|
+
const n = hn(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 mn(e, t) {
|
|
13
|
+
return e.trigger === "viewEnter" && t.triggerType === "once" && B(e) === B(t);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function B(e) {
|
|
16
16
|
const { key: t, listContainer: n, listItemSelector: s, selector: i } = e;
|
|
17
17
|
return `${t}\0${n || ""}\0${s || ""}\0${i || ""}`;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
class
|
|
19
|
+
const Ke = "$";
|
|
20
|
+
class ie {
|
|
21
21
|
animations;
|
|
22
22
|
options;
|
|
23
23
|
ready;
|
|
@@ -121,64 +121,64 @@ class se {
|
|
|
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
|
-
},
|
|
151
|
-
const o = 3 * t, r = 3 * (s - 2 * t),
|
|
152
|
-
let
|
|
153
|
-
if (
|
|
154
|
-
|
|
124
|
+
const $t = (e) => e, pn = (e) => 1 - Math.cos(e * Math.PI / 2), gn = (e) => Math.sin(e * Math.PI / 2), vn = (e) => -(Math.cos(Math.PI * e) - 1) / 2, yn = (e) => e ** 2, En = (e) => 1 - (1 - e) ** 2, wn = (e) => e < 0.5 ? 2 * e ** 2 : 1 - (-2 * e + 2) ** 2 / 2, $n = (e) => e ** 3, Sn = (e) => 1 - (1 - e) ** 3, bn = (e) => e < 0.5 ? 4 * e ** 3 : 1 - (-2 * e + 2) ** 3 / 2, In = (e) => e ** 4, Tn = (e) => 1 - (1 - e) ** 4, On = (e) => e < 0.5 ? 8 * e ** 4 : 1 - (-2 * e + 2) ** 4 / 2, Cn = (e) => e ** 5, Mn = (e) => 1 - (1 - e) ** 5, _n = (e) => e < 0.5 ? 16 * e ** 5 : 1 - (-2 * e + 2) ** 5 / 2, Pn = (e) => e === 0 ? 0 : 2 ** (10 * e - 10), kn = (e) => e === 1 ? 1 : 1 - 2 ** (-10 * e), An = (e) => e === 0 ? 0 : e === 1 ? 1 : e < 0.5 ? 2 ** (20 * e - 10) / 2 : (2 - 2 ** (-20 * e + 10)) / 2, qn = (e) => 1 - Math.sqrt(1 - e ** 2), Rn = (e) => Math.sqrt(1 - (e - 1) ** 2), Ln = (e) => e < 0.5 ? (1 - Math.sqrt(1 - 4 * e ** 2)) / 2 : (Math.sqrt(-(2 * e - 3) * (2 * e - 1)) + 1) / 2, Fn = (e) => 2.70158 * e ** 3 - 1.70158 * e ** 2, xn = (e) => 1 + 2.70158 * (e - 1) ** 3 + 1.70158 * (e - 1) ** 2, Nn = (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, Je = {
|
|
125
|
+
linear: $t,
|
|
126
|
+
sineIn: pn,
|
|
127
|
+
sineOut: gn,
|
|
128
|
+
sineInOut: vn,
|
|
129
|
+
quadIn: yn,
|
|
130
|
+
quadOut: En,
|
|
131
|
+
quadInOut: wn,
|
|
132
|
+
cubicIn: $n,
|
|
133
|
+
cubicOut: Sn,
|
|
134
|
+
cubicInOut: bn,
|
|
135
|
+
quartIn: In,
|
|
136
|
+
quartOut: Tn,
|
|
137
|
+
quartInOut: On,
|
|
138
|
+
quintIn: Cn,
|
|
139
|
+
quintOut: Mn,
|
|
140
|
+
quintInOut: _n,
|
|
141
|
+
expoIn: Pn,
|
|
142
|
+
expoOut: kn,
|
|
143
|
+
expoInOut: An,
|
|
144
|
+
circIn: qn,
|
|
145
|
+
circOut: Rn,
|
|
146
|
+
circInOut: Ln,
|
|
147
|
+
backIn: Fn,
|
|
148
|
+
backOut: xn,
|
|
149
|
+
backInOut: Nn
|
|
150
|
+
}, U = (e, t, n, s, i) => {
|
|
151
|
+
const o = 3 * t, r = 3 * (s - 2 * t), a = 1 - 3 * s + 3 * t, l = 3 * n, u = 3 * (i - 2 * n), c = 1 - 3 * i + 3 * n;
|
|
152
|
+
let f;
|
|
153
|
+
if (a === 0)
|
|
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 *
|
|
157
|
-
if (
|
|
158
|
-
const
|
|
156
|
+
const d = r / (3 * a), m = 2 * Math.pow(r, 3) - 9 * o * r * a, p = 54 * Math.pow(a, 3), h = (3 * a * o - r * r) / (9 * a * a), g = `((${m} - ${27 * a * a} * ${e}) / ${p})`;
|
|
157
|
+
if (h < 0) {
|
|
158
|
+
const v = 2 * Math.sqrt(-h);
|
|
159
159
|
let y = 0;
|
|
160
|
-
for (const
|
|
160
|
+
for (const E of [0, 1, 2])
|
|
161
161
|
[0, 0.25, 0.5, 0.75, 1].every((S) => {
|
|
162
|
-
const
|
|
163
|
-
Math.max(2 * (
|
|
162
|
+
const T = Math.min(
|
|
163
|
+
Math.max(2 * (m - 27 * a * a * S) / (p * h * v), -1),
|
|
164
164
|
1
|
|
165
|
-
),
|
|
166
|
-
return
|
|
167
|
-
}) && (y =
|
|
168
|
-
const
|
|
169
|
-
|
|
165
|
+
), I = v * Math.cos((Math.acos(T) - E * 2 * Math.PI) / 3) - d;
|
|
166
|
+
return I >= -1e-6 && I <= 1.000001;
|
|
167
|
+
}) && (y = E);
|
|
168
|
+
const $ = `(acos(clamp(-1, ${2 / (h * v)} * ${g}, 1)) - ${360 * y}deg) / 3`;
|
|
169
|
+
f = `(${v} * cos(${$}) - ${d})`;
|
|
170
170
|
} else {
|
|
171
|
-
const
|
|
172
|
-
|
|
171
|
+
const v = `sqrt(pow(${g}, 2) + ${Math.pow(h, 3)})`;
|
|
172
|
+
f = `(pow(${v} - ${g}, 1 / 3) - pow(${v} + ${g}, 1 / 3) - ${d})`;
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
-
return `(${
|
|
176
|
-
},
|
|
175
|
+
return `(${c} * pow(${f}, 3) + ${u} * pow(${f}, 2) + ${l} * ${f})`;
|
|
176
|
+
}, et = {
|
|
177
177
|
linear: (e) => e,
|
|
178
|
-
ease: (e) =>
|
|
179
|
-
easeIn: (e) =>
|
|
180
|
-
easeOut: (e) =>
|
|
181
|
-
easeInOut: (e) =>
|
|
178
|
+
ease: (e) => U(e, 0.25, 0.1, 0.25, 1),
|
|
179
|
+
easeIn: (e) => U(e, 0.42, 0, 1, 1),
|
|
180
|
+
easeOut: (e) => U(e, 0, 0, 0.58, 1),
|
|
181
|
+
easeInOut: (e) => U(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 ut = (e) => e, Jt = (e) => 1 - Math.cos(e * Math.PI / 2), en = (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
|
+
}, tt = {
|
|
207
207
|
linear: "linear",
|
|
208
208
|
ease: "ease",
|
|
209
209
|
easeIn: "ease-in",
|
|
@@ -234,68 +234,68 @@ const ut = (e) => e, Jt = (e) => 1 - Math.cos(e * Math.PI / 2), en = (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 Dn(e) {
|
|
238
238
|
return e === "percentage" ? "%" : e || "px";
|
|
239
239
|
}
|
|
240
|
-
const
|
|
240
|
+
const jn = /^(webkit|moz|ms|o)(?=[A-Z])/, zn = 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 ye(e) {
|
|
246
|
+
return e.startsWith("--") ? e : (jn.test(e) ? `-${e}` : e).replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`);
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function Hn(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 St(e) {
|
|
252
|
+
return zn[e] || Hn(e);
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function Gn(e) {
|
|
255
255
|
for (const t in e)
|
|
256
|
-
if (Object.hasOwn(e, t) &&
|
|
256
|
+
if (Object.hasOwn(e, t) && St(t) !== t)
|
|
257
257
|
return !0;
|
|
258
258
|
return !1;
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function bt(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" || !Gn(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[St(o)] = n[o]);
|
|
271
271
|
t[s] = i;
|
|
272
272
|
}), t || e;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
return e ?
|
|
274
|
+
function me(e) {
|
|
275
|
+
return e ? tt[e] || e : tt.linear;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
const i = 3 * e, o = 3 * (n - e) - i, r = 1 - i - o,
|
|
279
|
-
function
|
|
280
|
-
let
|
|
277
|
+
function Wn(e, t, n, s) {
|
|
278
|
+
const i = 3 * e, o = 3 * (n - e) - i, r = 1 - i - o, a = 3 * t, l = 3 * (s - t) - a, u = 1 - a - l, c = (p) => ((r * p + o) * p + i) * p, f = (p) => ((u * p + l) * p + a) * p, d = (p) => (3 * r * p + 2 * o) * p + i;
|
|
279
|
+
function m(p) {
|
|
280
|
+
let h = p;
|
|
281
281
|
for (let y = 0; y < 8; y++) {
|
|
282
|
-
const
|
|
283
|
-
if (Math.abs(
|
|
284
|
-
const
|
|
285
|
-
if (Math.abs(
|
|
286
|
-
|
|
282
|
+
const $ = c(h) - p;
|
|
283
|
+
if (Math.abs($) < 1e-7) return h;
|
|
284
|
+
const E = d(h);
|
|
285
|
+
if (Math.abs(E) < 1e-6) break;
|
|
286
|
+
h -= $ / E;
|
|
287
287
|
}
|
|
288
|
-
let g = 0,
|
|
289
|
-
for (
|
|
290
|
-
const y =
|
|
291
|
-
if (Math.abs(y - p) < 1e-7) return
|
|
292
|
-
p > y ? g =
|
|
288
|
+
let g = 0, v = 1;
|
|
289
|
+
for (h = (g + v) / 2; v - g > 1e-7; ) {
|
|
290
|
+
const y = c(h);
|
|
291
|
+
if (Math.abs(y - p) < 1e-7) return h;
|
|
292
|
+
p > y ? g = h : v = h, h = (g + v) / 2;
|
|
293
293
|
}
|
|
294
|
-
return
|
|
294
|
+
return h;
|
|
295
295
|
}
|
|
296
|
-
return (p) => p <= 0 ? 0 : p >= 1 ? 1 :
|
|
296
|
+
return (p) => p <= 0 ? 0 : p >= 1 ? 1 : f(m(p));
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function It(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,33 +304,33 @@ function mt(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 Vn(e) {
|
|
308
|
+
const t = It(e);
|
|
309
309
|
if (!(!t || t.some(isNaN)))
|
|
310
|
-
return
|
|
310
|
+
return Wn(...t);
|
|
311
311
|
}
|
|
312
|
-
function
|
|
313
|
-
const t =
|
|
312
|
+
function Bn(e) {
|
|
313
|
+
const t = It(e);
|
|
314
314
|
if (!(!t || t.some(isNaN)))
|
|
315
|
-
return (n) =>
|
|
315
|
+
return (n) => U(n, ...t);
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function Tt(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);
|
|
321
321
|
if (n.length === 0) return;
|
|
322
322
|
const s = [];
|
|
323
323
|
for (const o of n) {
|
|
324
|
-
const r = o.split(/\s+/),
|
|
325
|
-
if (isNaN(
|
|
324
|
+
const r = o.split(/\s+/), a = parseFloat(r[0]);
|
|
325
|
+
if (isNaN(a)) return;
|
|
326
326
|
const l = [];
|
|
327
|
-
for (let
|
|
328
|
-
if (r[
|
|
329
|
-
const
|
|
330
|
-
if (isNaN(
|
|
331
|
-
l.push(
|
|
327
|
+
for (let u = 1; u < r.length; u++)
|
|
328
|
+
if (r[u].endsWith("%")) {
|
|
329
|
+
const c = parseFloat(r[u]) / 100;
|
|
330
|
+
if (isNaN(c)) return;
|
|
331
|
+
l.push(c);
|
|
332
332
|
}
|
|
333
|
-
l.length === 0 ? s.push({ output:
|
|
333
|
+
l.length === 0 ? s.push({ output: a, pos: null }) : l.length === 1 ? s.push({ output: a, pos: l[0] }) : (s.push({ output: a, pos: l[0] }), s.push({ output: a, pos: l[1] }));
|
|
334
334
|
}
|
|
335
335
|
if (s.length === 0) return;
|
|
336
336
|
s[0].pos === null && (s[0].pos = 0), s[s.length - 1].pos === null && (s[s.length - 1].pos = 1);
|
|
@@ -340,9 +340,9 @@ function pt(e) {
|
|
|
340
340
|
const o = i - 1;
|
|
341
341
|
let r = i;
|
|
342
342
|
for (; r < s.length && s[r].pos === null; ) r++;
|
|
343
|
-
const
|
|
344
|
-
for (let
|
|
345
|
-
s[
|
|
343
|
+
const a = s[o].pos, l = s[r].pos, u = r - o;
|
|
344
|
+
for (let c = o + 1; c < r; c++)
|
|
345
|
+
s[c].pos = a + (l - a) * (c - o) / u;
|
|
346
346
|
i = r + 1;
|
|
347
347
|
} else
|
|
348
348
|
i++;
|
|
@@ -350,8 +350,8 @@ function pt(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 Yn(e) {
|
|
354
|
+
const t = Tt(e);
|
|
355
355
|
if (t)
|
|
356
356
|
return (n) => {
|
|
357
357
|
if (n <= t[0].pos) return t[0].output;
|
|
@@ -362,12 +362,12 @@ function qn(e) {
|
|
|
362
362
|
const l = i + o >>> 1;
|
|
363
363
|
t[l].pos <= n ? i = l : o = l;
|
|
364
364
|
}
|
|
365
|
-
const r = t[i],
|
|
366
|
-
return
|
|
365
|
+
const r = t[i], a = t[o];
|
|
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 Un(e) {
|
|
370
|
+
const t = Tt(e);
|
|
371
371
|
if (t)
|
|
372
372
|
return (n) => {
|
|
373
373
|
const s = [`${t[0].output}`];
|
|
@@ -376,24 +376,24 @@ function Pn(e) {
|
|
|
376
376
|
if (o === 0 && t[i - 1].pos === 0)
|
|
377
377
|
s.push(`${r}`);
|
|
378
378
|
else {
|
|
379
|
-
const
|
|
380
|
-
s.push(`clamp(0, ${
|
|
379
|
+
const a = o === 0 ? `round(${n} / ${2 * t[i - 1].pos})` : `(${n} - ${t[i - 1].pos}) / ${o}`;
|
|
380
|
+
s.push(`clamp(0, ${a}, 1) * ${r}`);
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
return `(${s.join(" + ")})`;
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function Xe(e) {
|
|
387
387
|
if (!e) return;
|
|
388
|
-
const t =
|
|
389
|
-
return t || (
|
|
388
|
+
const t = Je[e];
|
|
389
|
+
return t || (Vn(e) ?? Yn(e) ?? Je.linear);
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Kn(e) {
|
|
392
392
|
if (!e) return;
|
|
393
|
-
const t =
|
|
394
|
-
return t || (
|
|
393
|
+
const t = et[e];
|
|
394
|
+
return t || (Bn(e) ?? Un(e) ?? et.linear);
|
|
395
395
|
}
|
|
396
|
-
class
|
|
396
|
+
class Xn extends ie {
|
|
397
397
|
animationGroups;
|
|
398
398
|
delay;
|
|
399
399
|
offset;
|
|
@@ -402,10 +402,10 @@ class Fn extends se {
|
|
|
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 : Xe(n.offsetEasing) ?? $t, 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
|
-
iterations: Number.isFinite(
|
|
408
|
+
iterations: Number.isFinite(a) ? a : 1
|
|
409
409
|
}))), this.applyOffsets(), this.ready = Promise.all(t.map((i) => i.ready)).then(() => {
|
|
410
410
|
});
|
|
411
411
|
}
|
|
@@ -427,15 +427,15 @@ class Fn extends se {
|
|
|
427
427
|
if (this.animationGroups.length === 0 || this.animations.length === 0) return;
|
|
428
428
|
const t = this.calculateOffsets(), n = this.getSequenceActiveDuration(t), s = this.animationGroups.length - 1;
|
|
429
429
|
this.animationGroups.forEach((i, o) => {
|
|
430
|
-
i.animations.forEach((r,
|
|
430
|
+
i.animations.forEach((r, a) => {
|
|
431
431
|
const l = r.effect;
|
|
432
432
|
if (!l) return;
|
|
433
|
-
const { delay:
|
|
433
|
+
const { delay: u, duration: c, iterations: f } = this.timingOptions[o][a], d = u + t[o], m = n - (d + c * f);
|
|
434
434
|
if (i.isCSS && this.sequenceId) {
|
|
435
435
|
const { target: p } = l;
|
|
436
|
-
p instanceof HTMLElement && (p.style.setProperty(`--motion-${this.sequenceId}-index`, `${o}`), p.style.setProperty(`--motion-${this.sequenceId}-last`, `${s}`)), l.updateTiming({ endDelay:
|
|
436
|
+
p instanceof HTMLElement && (p.style.setProperty(`--motion-${this.sequenceId}-index`, `${o}`), p.style.setProperty(`--motion-${this.sequenceId}-last`, `${s}`)), l.updateTiming({ endDelay: m });
|
|
437
437
|
} else
|
|
438
|
-
l.updateTiming({ delay: d + this.delay, endDelay:
|
|
438
|
+
l.updateTiming({ delay: d + this.delay, endDelay: m });
|
|
439
439
|
});
|
|
440
440
|
});
|
|
441
441
|
}
|
|
@@ -444,8 +444,8 @@ class Fn extends se {
|
|
|
444
444
|
for (let s = 0; s < this.timingOptions.length; s++) {
|
|
445
445
|
const i = this.timingOptions[s].reduce((o, r) => {
|
|
446
446
|
if (!r) return o;
|
|
447
|
-
const { delay:
|
|
448
|
-
return Math.max(o,
|
|
447
|
+
const { delay: a, duration: l, iterations: u } = r;
|
|
448
|
+
return Math.max(o, a + l * u);
|
|
449
449
|
}, 0);
|
|
450
450
|
n.push(t[s] + i);
|
|
451
451
|
}
|
|
@@ -462,8 +462,8 @@ class Fn extends se {
|
|
|
462
462
|
for (const { index: s, group: i } of n) {
|
|
463
463
|
const o = Math.min(s, this.animationGroups.length);
|
|
464
464
|
this.animationGroups.splice(o, 0, i), this.timingOptions.splice(o, 0, i.getTimingOptions());
|
|
465
|
-
const r = [...i.animations],
|
|
466
|
-
this.animations.splice(
|
|
465
|
+
const r = [...i.animations], a = this.animationGroups.slice(0, o).reduce((l, u) => l + u.animations.length, 0);
|
|
466
|
+
this.animations.splice(a, 0, ...r);
|
|
467
467
|
}
|
|
468
468
|
this.applyOffsets(), this.ready = Promise.all(this.animationGroups.map((s) => s.ready)).then(() => {
|
|
469
469
|
});
|
|
@@ -491,7 +491,7 @@ class Fn extends se {
|
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
class
|
|
494
|
+
class Qn {
|
|
495
495
|
_animation;
|
|
496
496
|
customEffect;
|
|
497
497
|
progress;
|
|
@@ -502,7 +502,7 @@ class Rn {
|
|
|
502
502
|
...s,
|
|
503
503
|
composite: "add"
|
|
504
504
|
}), { timeline: r } = i;
|
|
505
|
-
this._animation = new Animation(o, r), this._tickCbId = null, this.progress = null, this.customEffect = (
|
|
505
|
+
this._animation = new Animation(o, r), this._tickCbId = null, this.progress = null, this.customEffect = (a) => t(o.target, a), this._finishHandler = (a) => {
|
|
506
506
|
this.effect.target?.getAnimations().find((l) => l === this._animation) || this.cancel();
|
|
507
507
|
}, this.addEventListener("finish", this._finishHandler), this.addEventListener("remove", this._finishHandler);
|
|
508
508
|
}
|
|
@@ -631,20 +631,20 @@ class Rn {
|
|
|
631
631
|
return this._animation.dispatchEvent(t);
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function Zn(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 pe = { exports: {} }, nt = pe.exports, st;
|
|
638
|
+
function Jn() {
|
|
639
|
+
return st || (st = 1, (function(e) {
|
|
640
640
|
(function(t) {
|
|
641
641
|
var n = function() {
|
|
642
|
-
}, s = t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.msRequestAnimationFrame || function(
|
|
643
|
-
return setTimeout(
|
|
642
|
+
}, s = t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.msRequestAnimationFrame || function(c) {
|
|
643
|
+
return setTimeout(c, 16);
|
|
644
644
|
};
|
|
645
645
|
function i() {
|
|
646
|
-
var
|
|
647
|
-
|
|
646
|
+
var c = this;
|
|
647
|
+
c.reads = [], c.writes = [], c.raf = s.bind(t);
|
|
648
648
|
}
|
|
649
649
|
i.prototype = {
|
|
650
650
|
constructor: i,
|
|
@@ -656,8 +656,8 @@ function Nn() {
|
|
|
656
656
|
*
|
|
657
657
|
* @param {Array} tasks
|
|
658
658
|
*/
|
|
659
|
-
runTasks: function(
|
|
660
|
-
for (var
|
|
659
|
+
runTasks: function(c) {
|
|
660
|
+
for (var f; f = c.shift(); ) f();
|
|
661
661
|
},
|
|
662
662
|
/**
|
|
663
663
|
* Adds a job to the read batch and
|
|
@@ -667,8 +667,8 @@ function Nn() {
|
|
|
667
667
|
* @param {Object} ctx the context to be bound to `fn` (optional).
|
|
668
668
|
* @public
|
|
669
669
|
*/
|
|
670
|
-
measure: function(
|
|
671
|
-
var d =
|
|
670
|
+
measure: function(c, f) {
|
|
671
|
+
var d = f ? c.bind(f) : c;
|
|
672
672
|
return this.reads.push(d), o(this), d;
|
|
673
673
|
},
|
|
674
674
|
/**
|
|
@@ -680,8 +680,8 @@ function Nn() {
|
|
|
680
680
|
* @param {Object} ctx the context to be bound to `fn` (optional).
|
|
681
681
|
* @public
|
|
682
682
|
*/
|
|
683
|
-
mutate: function(
|
|
684
|
-
var d =
|
|
683
|
+
mutate: function(c, f) {
|
|
684
|
+
var d = f ? c.bind(f) : c;
|
|
685
685
|
return this.writes.push(d), o(this), d;
|
|
686
686
|
},
|
|
687
687
|
/**
|
|
@@ -691,8 +691,8 @@ function Nn() {
|
|
|
691
691
|
* @return {Boolean} success
|
|
692
692
|
* @public
|
|
693
693
|
*/
|
|
694
|
-
clear: function(
|
|
695
|
-
return
|
|
694
|
+
clear: function(c) {
|
|
695
|
+
return a(this.reads, c) || a(this.writes, c);
|
|
696
696
|
},
|
|
697
697
|
/**
|
|
698
698
|
* Extend this FastDom with some
|
|
@@ -728,89 +728,89 @@ function Nn() {
|
|
|
728
728
|
* @param {Object} props properties to mixin
|
|
729
729
|
* @return {FastDom}
|
|
730
730
|
*/
|
|
731
|
-
extend: function(
|
|
732
|
-
if (typeof
|
|
733
|
-
var
|
|
734
|
-
return l(
|
|
731
|
+
extend: function(c) {
|
|
732
|
+
if (typeof c != "object") throw new Error("expected object");
|
|
733
|
+
var f = Object.create(this);
|
|
734
|
+
return l(f, c), f.fastdom = this, f.initialize && f.initialize(), f;
|
|
735
735
|
},
|
|
736
736
|
// override this with a function
|
|
737
737
|
// to prevent Errors in console
|
|
738
738
|
// when tasks throw
|
|
739
739
|
catch: null
|
|
740
740
|
};
|
|
741
|
-
function o(
|
|
742
|
-
|
|
741
|
+
function o(c) {
|
|
742
|
+
c.scheduled || (c.scheduled = !0, c.raf(r.bind(null, c)));
|
|
743
743
|
}
|
|
744
|
-
function r(
|
|
745
|
-
var
|
|
744
|
+
function r(c) {
|
|
745
|
+
var f = c.writes, d = c.reads, m;
|
|
746
746
|
try {
|
|
747
|
-
n("flushing reads", d.length),
|
|
747
|
+
n("flushing reads", d.length), c.runTasks(d), n("flushing writes", f.length), c.runTasks(f);
|
|
748
748
|
} catch (p) {
|
|
749
|
-
|
|
749
|
+
m = p;
|
|
750
750
|
}
|
|
751
|
-
if (
|
|
752
|
-
if (n("task errored",
|
|
753
|
-
else throw
|
|
751
|
+
if (c.scheduled = !1, (d.length || f.length) && o(c), m)
|
|
752
|
+
if (n("task errored", m.message), c.catch) c.catch(m);
|
|
753
|
+
else throw m;
|
|
754
754
|
}
|
|
755
|
-
function c
|
|
756
|
-
var d =
|
|
757
|
-
return !!~d && !!
|
|
755
|
+
function a(c, f) {
|
|
756
|
+
var d = c.indexOf(f);
|
|
757
|
+
return !!~d && !!c.splice(d, 1);
|
|
758
758
|
}
|
|
759
|
-
function l(
|
|
760
|
-
for (var d in
|
|
761
|
-
|
|
759
|
+
function l(c, f) {
|
|
760
|
+
for (var d in f)
|
|
761
|
+
f.hasOwnProperty(d) && (c[d] = f[d]);
|
|
762
762
|
}
|
|
763
|
-
var
|
|
764
|
-
e.exports =
|
|
765
|
-
})(typeof window < "u" ? window : typeof
|
|
766
|
-
})(
|
|
763
|
+
var u = t.fastdom = t.fastdom || new i();
|
|
764
|
+
e.exports = u;
|
|
765
|
+
})(typeof window < "u" ? window : typeof nt < "u" ? nt : globalThis);
|
|
766
|
+
})(pe)), pe.exports;
|
|
767
767
|
}
|
|
768
|
-
var
|
|
769
|
-
const
|
|
770
|
-
function
|
|
771
|
-
Object.assign(
|
|
768
|
+
var es = Jn();
|
|
769
|
+
const _ = /* @__PURE__ */ Zn(es), Fe = {};
|
|
770
|
+
function ts(e) {
|
|
771
|
+
Object.assign(Fe, e);
|
|
772
772
|
}
|
|
773
|
-
function
|
|
774
|
-
return e in
|
|
773
|
+
function Qe(e, t = !0) {
|
|
774
|
+
return e in Fe ? Fe[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 Y(e, t) {
|
|
779
779
|
return e ? (t || document).getElementById(e) : null;
|
|
780
780
|
}
|
|
781
|
-
function
|
|
781
|
+
function Ot(e, t) {
|
|
782
782
|
return e?.matches(`[data-motion-part~="${t}"]`) ? e : e?.querySelector(`[data-motion-part~="${t}"]`);
|
|
783
783
|
}
|
|
784
|
-
function
|
|
785
|
-
const n = typeof e == "string" ?
|
|
786
|
-
return t?.length ? t.map((s) =>
|
|
784
|
+
function Ct(e, t) {
|
|
785
|
+
const n = typeof e == "string" ? Y(e) : e;
|
|
786
|
+
return t?.length ? t.map((s) => Ot(n, s)).filter(Boolean) : n ? [n] : [];
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function ns(e) {
|
|
789
789
|
const t = e.alternate ? "alternate" : "";
|
|
790
790
|
return e.reversed ? `${t ? `${t}-` : ""}reverse` : t || "normal";
|
|
791
791
|
}
|
|
792
|
-
function
|
|
793
|
-
return `${e.value}${
|
|
792
|
+
function Ae(e) {
|
|
793
|
+
return `${e.value}${Dn(e.unit)}`;
|
|
794
794
|
}
|
|
795
|
-
function
|
|
796
|
-
return `${e.name || "cover"} ${n && e.offset.unit !== "percentage" ? `calc(100% + ${
|
|
795
|
+
function it(e, t, n) {
|
|
796
|
+
return `${e.name || "cover"} ${n && e.offset.unit !== "percentage" ? `calc(100% + ${Ae(e.offset)}${t ? ` + ${t}` : ""})` : t ? `calc(${Ae(e.offset)} + ${t})` : Ae(e.offset)}`;
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function Mt(e) {
|
|
799
799
|
return {
|
|
800
|
-
start:
|
|
801
|
-
end:
|
|
800
|
+
start: it(e.startOffset, e.startOffsetAdd),
|
|
801
|
+
end: it(e.endOffset, e.endOffsetAdd, !0)
|
|
802
802
|
};
|
|
803
803
|
}
|
|
804
|
-
function
|
|
805
|
-
return (t) =>
|
|
804
|
+
function _t(e) {
|
|
805
|
+
return (t) => _.measure(() => t(e));
|
|
806
806
|
}
|
|
807
|
-
function
|
|
808
|
-
return (t) =>
|
|
807
|
+
function Pt(e) {
|
|
808
|
+
return (t) => _.mutate(() => t(e));
|
|
809
809
|
}
|
|
810
|
-
function
|
|
810
|
+
function te(e) {
|
|
811
811
|
if (e.namedEffect) {
|
|
812
812
|
const t = e.namedEffect.type;
|
|
813
|
-
return typeof t == "string" ?
|
|
813
|
+
return typeof t == "string" ? Qe(t) : null;
|
|
814
814
|
} else if (e.keyframeEffect) {
|
|
815
815
|
const t = (s) => {
|
|
816
816
|
const { name: i, keyframes: o } = s.keyframeEffect;
|
|
@@ -824,16 +824,16 @@ function ee(e) {
|
|
|
824
824
|
return (t) => [{ ...t, keyframes: [] }];
|
|
825
825
|
return null;
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function kt(e, t, n, s) {
|
|
828
828
|
return e.map((i, o) => {
|
|
829
829
|
const r = {
|
|
830
830
|
fill: i.fill,
|
|
831
|
-
easing:
|
|
831
|
+
easing: me(i.easing),
|
|
832
832
|
iterations: i.iterations === 0 ? 1 / 0 : i.iterations || 1,
|
|
833
833
|
composite: i.composite,
|
|
834
|
-
direction:
|
|
834
|
+
direction: ns(i)
|
|
835
835
|
};
|
|
836
|
-
return
|
|
836
|
+
return 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
837
|
// pass the preset's object as is - its keyframes and ranges may be getters
|
|
838
838
|
// that must only be read after its measure() callbacks ran
|
|
839
839
|
effect: i,
|
|
@@ -843,33 +843,33 @@ function $t(e, t, n, s) {
|
|
|
843
843
|
};
|
|
844
844
|
});
|
|
845
845
|
}
|
|
846
|
-
function
|
|
846
|
+
function Ze(e) {
|
|
847
847
|
return !e || e.trigger !== "pointer-move" && e.trigger !== "view-progress";
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function ot(e, t, n, s, i) {
|
|
850
850
|
if (e) {
|
|
851
|
-
if (
|
|
851
|
+
if (Ze(s) && (t.duration = t.duration || 1, i?.reducedMotion))
|
|
852
852
|
if (t.iterations === 1 || t.iterations == null)
|
|
853
853
|
t = { ...t, duration: 1 };
|
|
854
854
|
else
|
|
855
855
|
return [];
|
|
856
856
|
let o;
|
|
857
|
-
return n instanceof HTMLElement && (o = { measure:
|
|
857
|
+
return n instanceof HTMLElement && (o = { measure: _t(n), mutate: Pt(n) }), e.web ? e.web(t, o, i) : e(t, o, i);
|
|
858
858
|
}
|
|
859
859
|
return [];
|
|
860
860
|
}
|
|
861
|
-
function
|
|
862
|
-
const o = typeof e == "string" ?
|
|
861
|
+
function At(e, t, n, s, i) {
|
|
862
|
+
const o = typeof e == "string" ? Y(e, i) : e;
|
|
863
863
|
if (n?.trigger === "pointer-move" && !t.keyframeEffect) {
|
|
864
864
|
let d = t;
|
|
865
865
|
t.customEffect && (d = {
|
|
866
866
|
...t,
|
|
867
867
|
namedEffect: { id: "", type: "CustomMouse" }
|
|
868
868
|
});
|
|
869
|
-
const
|
|
869
|
+
const m = te(
|
|
870
870
|
d
|
|
871
|
-
), p =
|
|
872
|
-
|
|
871
|
+
), p = ot(
|
|
872
|
+
m,
|
|
873
873
|
t,
|
|
874
874
|
o,
|
|
875
875
|
n,
|
|
@@ -877,175 +877,175 @@ function bt(e, t, n, s, i) {
|
|
|
877
877
|
);
|
|
878
878
|
return typeof p != "function" ? null : p(o);
|
|
879
879
|
}
|
|
880
|
-
const r =
|
|
880
|
+
const r = te(t), a = ot(
|
|
881
881
|
r,
|
|
882
882
|
t,
|
|
883
883
|
o,
|
|
884
884
|
n,
|
|
885
885
|
s
|
|
886
886
|
);
|
|
887
|
-
if (!
|
|
887
|
+
if (!a || a.length === 0)
|
|
888
888
|
return null;
|
|
889
|
-
const l =
|
|
890
|
-
let
|
|
891
|
-
const
|
|
892
|
-
|
|
893
|
-
subject: n.element ||
|
|
889
|
+
const l = kt(a, n, t.effectId);
|
|
890
|
+
let u;
|
|
891
|
+
const c = n?.trigger === "view-progress";
|
|
892
|
+
c && window.ViewTimeline && (u = new ViewTimeline({
|
|
893
|
+
subject: n.element || Y(n.componentId)
|
|
894
894
|
}));
|
|
895
|
-
const
|
|
896
|
-
const g =
|
|
897
|
-
|
|
898
|
-
"timing" in d &&
|
|
895
|
+
const f = l.map(({ effect: d, options: m, id: p, part: h }) => {
|
|
896
|
+
const g = h ? Ot(o, h) : o, v = new KeyframeEffect(g || null, [], m);
|
|
897
|
+
_.mutate(() => {
|
|
898
|
+
"timing" in d && v.updateTiming(d.timing), v.setKeyframes(bt(d.keyframes));
|
|
899
899
|
});
|
|
900
|
-
const y =
|
|
900
|
+
const y = c && u ? { timeline: u } : {}, $ = typeof d.customEffect == "function" ? new Qn(
|
|
901
901
|
d.customEffect,
|
|
902
902
|
g || null,
|
|
903
|
-
|
|
903
|
+
m,
|
|
904
904
|
y
|
|
905
|
-
) : new Animation(
|
|
906
|
-
if (
|
|
907
|
-
if (
|
|
908
|
-
|
|
909
|
-
const { start:
|
|
910
|
-
|
|
905
|
+
) : new Animation(v, y.timeline);
|
|
906
|
+
if (c)
|
|
907
|
+
if (u)
|
|
908
|
+
_.mutate(() => {
|
|
909
|
+
const { start: E, end: b } = Mt(d);
|
|
910
|
+
$.rangeStart = E, $.rangeEnd = b, $.play();
|
|
911
911
|
});
|
|
912
912
|
else {
|
|
913
|
-
const { startOffset:
|
|
914
|
-
|
|
915
|
-
const S = d.startOffset ||
|
|
916
|
-
Object.assign(
|
|
913
|
+
const { startOffset: E, endOffset: b } = t;
|
|
914
|
+
_.mutate(() => {
|
|
915
|
+
const S = d.startOffset || E, T = d.endOffset || b;
|
|
916
|
+
Object.assign($, {
|
|
917
917
|
start: {
|
|
918
918
|
name: S.name,
|
|
919
919
|
offset: S.offset?.value,
|
|
920
920
|
add: d.startOffsetAdd
|
|
921
921
|
},
|
|
922
922
|
end: {
|
|
923
|
-
name:
|
|
924
|
-
offset:
|
|
923
|
+
name: T.name,
|
|
924
|
+
offset: T.offset?.value,
|
|
925
925
|
add: d.endOffsetAdd
|
|
926
926
|
}
|
|
927
927
|
});
|
|
928
928
|
});
|
|
929
929
|
}
|
|
930
|
-
return p && (
|
|
930
|
+
return p && ($.id = p), $;
|
|
931
931
|
});
|
|
932
|
-
return
|
|
932
|
+
return f.length > 1 && f.forEach((d) => d.persist?.()), new ie(f, {
|
|
933
933
|
...t,
|
|
934
934
|
trigger: { ...n || {} },
|
|
935
935
|
// make sure the group is ready after all animation targets are measured and mutated
|
|
936
|
-
measured: new Promise((d) =>
|
|
936
|
+
measured: new Promise((d) => _.mutate(d))
|
|
937
937
|
});
|
|
938
938
|
}
|
|
939
|
-
function
|
|
940
|
-
const { duration: s, delay: i, iterations: o = 1, fill: r, easing:
|
|
941
|
-
let
|
|
942
|
-
if (
|
|
943
|
-
const g =
|
|
939
|
+
function ss(e, t, n) {
|
|
940
|
+
const { duration: s, delay: i, iterations: o = 1, fill: r, easing: a = "linear", direction: l } = e.options, u = e.effect.name, c = s === "auto", { sequenceId: f, delay: d, offset: m, offsetEasing: p = "linear" } = n || {};
|
|
941
|
+
let h = `${i ?? 0}ms`;
|
|
942
|
+
if (f && typeof p == "string") {
|
|
943
|
+
const g = Kn(p);
|
|
944
944
|
if (g) {
|
|
945
|
-
const
|
|
946
|
-
if (
|
|
945
|
+
const v = (i ?? 0) + (d ?? 0);
|
|
946
|
+
if (m) {
|
|
947
947
|
const y = g(
|
|
948
|
-
`(var(--motion-${
|
|
948
|
+
`(var(--motion-${f}-index, 0) / var(--motion-${f}-last, 1))`
|
|
949
949
|
);
|
|
950
|
-
|
|
950
|
+
h = `calc(${`(${v} + ${y} * ${m} * var(--motion-${f}-last, 1))`} * 1ms)`;
|
|
951
951
|
} else
|
|
952
|
-
|
|
952
|
+
h = `${v}ms`;
|
|
953
953
|
}
|
|
954
954
|
}
|
|
955
|
-
return `${
|
|
955
|
+
return `${u} ${c ? "auto" : `${s}ms`}${c ? " " : ` ${h} `}${a}${r && r !== "none" ? ` ${r}` : ""} ${!o || o === 1 / 0 ? "infinite" : o}${l === "normal" ? "" : ` ${l}`} ${t ? "" : "paused"}`;
|
|
956
956
|
}
|
|
957
|
-
function
|
|
958
|
-
return e?.style ? (
|
|
957
|
+
function is(e, t, n) {
|
|
958
|
+
return e?.style ? (Ze(n) && (t.duration = t.duration || 1), e.style(t)) : [];
|
|
959
959
|
}
|
|
960
|
-
function
|
|
961
|
-
const i =
|
|
962
|
-
return r.map((l,
|
|
963
|
-
const { start:
|
|
960
|
+
function os(e, t, n, s) {
|
|
961
|
+
const i = te(t), o = is(i, t), r = kt(o, n, t.effectId, !0), a = n?.trigger === "view-progress";
|
|
962
|
+
return r.map((l, u) => {
|
|
963
|
+
const { start: c, end: f } = a ? Mt(l.effect) : {};
|
|
964
964
|
return {
|
|
965
965
|
part: l.part,
|
|
966
|
-
animation:
|
|
966
|
+
animation: ss(l, a, s),
|
|
967
967
|
composition: l.options.composite,
|
|
968
968
|
custom: l.effect.custom,
|
|
969
969
|
name: l.effect.name,
|
|
970
|
-
keyframes:
|
|
971
|
-
id: l.id && `${l.id}-${
|
|
972
|
-
animationTimeline:
|
|
973
|
-
animationRange:
|
|
970
|
+
keyframes: bt(l.effect.keyframes),
|
|
971
|
+
id: l.id && `${l.id}-${u + 1}`,
|
|
972
|
+
animationTimeline: a ? `--${n?.id}` : "",
|
|
973
|
+
animationRange: c || f ? `${c} ${f}` : ""
|
|
974
974
|
};
|
|
975
975
|
});
|
|
976
976
|
}
|
|
977
|
-
function
|
|
978
|
-
const s =
|
|
977
|
+
function rs(e, t, n) {
|
|
978
|
+
const s = te(t), i = e instanceof HTMLElement ? e : Y(e);
|
|
979
979
|
if (s && s.prepare && i) {
|
|
980
|
-
const o = { measure:
|
|
980
|
+
const o = { measure: _t(i), mutate: Pt(i) };
|
|
981
981
|
s.prepare(t, o);
|
|
982
982
|
}
|
|
983
|
-
n &&
|
|
983
|
+
n && _.mutate(n);
|
|
984
984
|
}
|
|
985
|
-
function
|
|
986
|
-
const n =
|
|
985
|
+
function qt(e, t) {
|
|
986
|
+
const n = te(t);
|
|
987
987
|
if (!n)
|
|
988
988
|
return null;
|
|
989
989
|
if (!n.style)
|
|
990
|
-
return t.effectId && e ?
|
|
991
|
-
const s = n.getNames(t), o =
|
|
990
|
+
return t.effectId && e ? as(e, t.effectId, n.parts) : null;
|
|
991
|
+
const s = n.getNames(t), o = Ct(e, n.parts)?.flatMap((l) => l.getAnimations()), r = o?.map((l) => l.animationName) || [], a = [];
|
|
992
992
|
return s.forEach((l) => {
|
|
993
|
-
r.includes(l) &&
|
|
994
|
-
o?.find((
|
|
993
|
+
r.includes(l) && a.push(
|
|
994
|
+
o?.find((u) => u.animationName === l)
|
|
995
995
|
);
|
|
996
|
-
}),
|
|
996
|
+
}), a?.length ? new ie(a) : null;
|
|
997
997
|
}
|
|
998
|
-
function
|
|
999
|
-
const i =
|
|
998
|
+
function as(e, t, n) {
|
|
999
|
+
const i = Ct(e, n)?.flatMap((o) => o.getAnimations()).filter((o) => {
|
|
1000
1000
|
const r = o.id || o.animationName;
|
|
1001
1001
|
return r ? r.startsWith(t) : !0;
|
|
1002
1002
|
});
|
|
1003
|
-
return i?.length ? new
|
|
1003
|
+
return i?.length ? new ie(i) : null;
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1006
|
-
const { disabled: i, allowActiveEvent: o, ...r } = s,
|
|
1007
|
-
if (!
|
|
1005
|
+
function Rt(e, t, n, s = {}) {
|
|
1006
|
+
const { disabled: i, allowActiveEvent: o, ...r } = s, a = At(e, t, n, r);
|
|
1007
|
+
if (!a)
|
|
1008
1008
|
return null;
|
|
1009
1009
|
let l = {};
|
|
1010
1010
|
if (n.trigger === "view-progress" && !window.ViewTimeline) {
|
|
1011
|
-
const
|
|
1012
|
-
return
|
|
1011
|
+
const u = n.element || Y(n.componentId), { ready: c } = a;
|
|
1012
|
+
return a.animations.map((f) => ({
|
|
1013
1013
|
/* we use getters for start and end in order to access the animation's start and end
|
|
1014
1014
|
only when initializing the scrub scene rather than immediately */
|
|
1015
1015
|
get start() {
|
|
1016
|
-
return
|
|
1016
|
+
return f.start;
|
|
1017
1017
|
},
|
|
1018
1018
|
get end() {
|
|
1019
|
-
return
|
|
1019
|
+
return f.end;
|
|
1020
1020
|
},
|
|
1021
|
-
viewSource:
|
|
1022
|
-
ready:
|
|
1021
|
+
viewSource: u,
|
|
1022
|
+
ready: c,
|
|
1023
1023
|
getProgress() {
|
|
1024
|
-
return
|
|
1024
|
+
return a.getProgress();
|
|
1025
1025
|
},
|
|
1026
|
-
effect(d,
|
|
1027
|
-
const { activeDuration: p } =
|
|
1028
|
-
|
|
1026
|
+
effect(d, m) {
|
|
1027
|
+
const { activeDuration: p } = f.effect.getComputedTiming(), { delay: h } = f.effect.getTiming();
|
|
1028
|
+
f.currentTime = ((h || 0) + (p || 0)) * m;
|
|
1029
1029
|
},
|
|
1030
1030
|
disabled: i,
|
|
1031
1031
|
destroy() {
|
|
1032
|
-
|
|
1032
|
+
f.cancel();
|
|
1033
1033
|
}
|
|
1034
1034
|
}));
|
|
1035
1035
|
} else if (n.trigger === "pointer-move") {
|
|
1036
|
-
const
|
|
1037
|
-
if (
|
|
1038
|
-
const p =
|
|
1036
|
+
const u = t, { centeredToTarget: c, transitionDuration: f, transitionEasing: d } = u, m = n.axis;
|
|
1037
|
+
if (u.keyframeEffect) {
|
|
1038
|
+
const p = a;
|
|
1039
1039
|
return p.animations?.length === 0 ? null : {
|
|
1040
|
-
target: (typeof e == "string" ?
|
|
1041
|
-
centeredToTarget:
|
|
1040
|
+
target: (typeof e == "string" ? Y(e) : e) ?? void 0,
|
|
1041
|
+
centeredToTarget: c,
|
|
1042
1042
|
ready: p.ready,
|
|
1043
1043
|
_currentProgress: 0,
|
|
1044
1044
|
getProgress() {
|
|
1045
1045
|
return this._currentProgress;
|
|
1046
1046
|
},
|
|
1047
|
-
effect(g,
|
|
1048
|
-
const y =
|
|
1047
|
+
effect(g, v) {
|
|
1048
|
+
const y = m === "x" ? v.x : v.y;
|
|
1049
1049
|
this._currentProgress = y, p.progress(y);
|
|
1050
1050
|
},
|
|
1051
1051
|
disabled: i ?? !1,
|
|
@@ -1055,73 +1055,73 @@ function It(e, t, n, s = {}) {
|
|
|
1055
1055
|
};
|
|
1056
1056
|
}
|
|
1057
1057
|
l = {
|
|
1058
|
-
centeredToTarget:
|
|
1058
|
+
centeredToTarget: c,
|
|
1059
1059
|
allowActiveEvent: o
|
|
1060
|
-
}, t.customEffect &&
|
|
1060
|
+
}, t.customEffect && f && (l.transitionDuration = f, l.transitionEasing = Xe(d)), l.target = a.target;
|
|
1061
1061
|
}
|
|
1062
1062
|
return {
|
|
1063
1063
|
...l,
|
|
1064
1064
|
getProgress() {
|
|
1065
|
-
return
|
|
1065
|
+
return a.getProgress();
|
|
1066
1066
|
},
|
|
1067
|
-
effect(
|
|
1068
|
-
|
|
1069
|
-
|
|
1067
|
+
effect(u, c, f, d) {
|
|
1068
|
+
a.progress(
|
|
1069
|
+
f ? {
|
|
1070
1070
|
// @ts-expect-error spread error on p
|
|
1071
|
-
...
|
|
1072
|
-
v:
|
|
1071
|
+
...c,
|
|
1072
|
+
v: f,
|
|
1073
1073
|
active: d
|
|
1074
|
-
} :
|
|
1074
|
+
} : c
|
|
1075
1075
|
);
|
|
1076
1076
|
},
|
|
1077
1077
|
disabled: i,
|
|
1078
1078
|
destroy() {
|
|
1079
|
-
|
|
1079
|
+
a.cancel();
|
|
1080
1080
|
}
|
|
1081
1081
|
};
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1084
|
-
const i =
|
|
1083
|
+
function oe(e, t, n, s = !1) {
|
|
1084
|
+
const i = qt(e, t);
|
|
1085
1085
|
return i ? (i.ready = new Promise((o) => {
|
|
1086
|
-
|
|
1087
|
-
}), i) :
|
|
1086
|
+
rs(e, t, o);
|
|
1087
|
+
}), i) : At(e, t, n, { reducedMotion: s });
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function cs(e) {
|
|
1090
1090
|
return e === null ? [null] : typeof e == "string" ? Array.from(document.querySelectorAll(e)) : Array.isArray(e) ? e : [e];
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function Lt(e, t) {
|
|
1093
1093
|
const n = [];
|
|
1094
1094
|
for (const { target: s, options: i } of e) {
|
|
1095
|
-
const o =
|
|
1095
|
+
const o = cs(s);
|
|
1096
1096
|
for (const r of o) {
|
|
1097
|
-
const
|
|
1097
|
+
const a = oe(
|
|
1098
1098
|
r,
|
|
1099
1099
|
i,
|
|
1100
1100
|
void 0,
|
|
1101
1101
|
t?.reducedMotion
|
|
1102
1102
|
);
|
|
1103
|
-
|
|
1103
|
+
a instanceof ie && n.push(a);
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
1106
|
return n;
|
|
1107
1107
|
}
|
|
1108
|
-
function
|
|
1109
|
-
const s =
|
|
1110
|
-
return new
|
|
1108
|
+
function ls(e, t, n) {
|
|
1109
|
+
const s = Lt(t, n);
|
|
1110
|
+
return new Xn(s, e);
|
|
1111
1111
|
}
|
|
1112
|
-
function
|
|
1112
|
+
function us(e, t = 2) {
|
|
1113
1113
|
return parseFloat(e.toFixed(t));
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1115
|
+
function fs(e) {
|
|
1116
1116
|
return /\[]/g.test(e);
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1118
|
+
function ds(e) {
|
|
1119
1119
|
return e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function ge(e, t) {
|
|
1122
1122
|
return t.includes("&") ? t.replace(/&/g, e) : `${e}${t}`;
|
|
1123
1123
|
}
|
|
1124
|
-
function
|
|
1124
|
+
function ne() {
|
|
1125
1125
|
return "wi-12343210".replace(
|
|
1126
1126
|
/\d/g,
|
|
1127
1127
|
(e) => String.fromCharCode(
|
|
@@ -1130,34 +1130,37 @@ function te() {
|
|
|
1130
1130
|
// 97 for "a"
|
|
1131
1131
|
);
|
|
1132
1132
|
}
|
|
1133
|
-
function
|
|
1133
|
+
function Ft(e) {
|
|
1134
|
+
return !!(e.transition || e.transitionProperties);
|
|
1135
|
+
}
|
|
1136
|
+
function xt(e) {
|
|
1134
1137
|
const { transition: t, transitionProperties: n } = e;
|
|
1135
1138
|
return (t?.styleProperties || n || []).map((i) => ({
|
|
1136
1139
|
...i,
|
|
1137
|
-
name:
|
|
1140
|
+
name: ye(i.name)
|
|
1138
1141
|
}));
|
|
1139
1142
|
}
|
|
1140
|
-
function
|
|
1143
|
+
function Nt(e) {
|
|
1141
1144
|
let { transition: t, transitionProperties: n } = e, s = [];
|
|
1142
1145
|
if (t?.styleProperties) {
|
|
1143
1146
|
const { duration: i, easing: o, delay: r } = t;
|
|
1144
|
-
i && (t.styleProperties.some(
|
|
1147
|
+
(i || r) && (t.styleProperties.some(
|
|
1145
1148
|
(l) => l.name.startsWith("--")
|
|
1146
1149
|
) ? s = [
|
|
1147
|
-
`all ${i}ms ${
|
|
1150
|
+
`all ${i || 0}ms ${me(o || "ease")}${r ? ` ${r}ms` : ""}`,
|
|
1148
1151
|
"visibility 0s"
|
|
1149
1152
|
] : s = t.styleProperties.map(
|
|
1150
|
-
(l) => `${
|
|
1153
|
+
(l) => `${ye(l.name)} ${i || 0}ms ${me(
|
|
1151
1154
|
o || "ease"
|
|
1152
1155
|
)}${r ? ` ${r}ms` : ""}`
|
|
1153
1156
|
));
|
|
1154
1157
|
} else
|
|
1155
|
-
s = n?.filter((i) => i.duration).map(
|
|
1156
|
-
(i) => `${
|
|
1158
|
+
s = n?.filter((i) => i.duration || i.delay).map(
|
|
1159
|
+
(i) => `${ye(i.name)} ${i.duration || 0}ms ${me(i.easing) || "ease"}${i.delay ? ` ${i.delay}ms` : ""}`
|
|
1157
1160
|
) || [];
|
|
1158
1161
|
return s;
|
|
1159
1162
|
}
|
|
1160
|
-
function
|
|
1163
|
+
function hs({
|
|
1161
1164
|
key: e,
|
|
1162
1165
|
effectId: t,
|
|
1163
1166
|
transition: n,
|
|
@@ -1165,38 +1168,134 @@ function Zn({
|
|
|
1165
1168
|
childSelector: i = "> :first-child",
|
|
1166
1169
|
selectorCondition: o
|
|
1167
1170
|
}) {
|
|
1168
|
-
const r =
|
|
1171
|
+
const r = Nt({
|
|
1169
1172
|
transition: n,
|
|
1170
1173
|
transitionProperties: s
|
|
1171
|
-
}),
|
|
1174
|
+
}), a = xt({ transition: n, transitionProperties: s }).map(
|
|
1172
1175
|
(p) => `${p.name}: ${p.value};`
|
|
1173
|
-
), l = e.replace(/"/g, "'"),
|
|
1174
|
-
`${
|
|
1176
|
+
), l = e.replace(/"/g, "'"), u = `:is(:state(${t}), :--${t}) ${i}`, c = `[data-interact-effect~="${t}"] ${i}`, f = o ? ge(u, o) : u, d = o ? ge(c, o) : c, m = [
|
|
1177
|
+
`${f},
|
|
1175
1178
|
${d} {
|
|
1176
|
-
${
|
|
1179
|
+
${a.join(`
|
|
1177
1180
|
`)}
|
|
1178
1181
|
}`
|
|
1179
1182
|
];
|
|
1180
1183
|
if (r.length) {
|
|
1181
|
-
const p = `[data-interact-key="${l}"] ${i}`,
|
|
1182
|
-
|
|
1184
|
+
const p = `[data-interact-key="${l}"] ${i}`, h = o ? ge(p, o) : p;
|
|
1185
|
+
m.push(`${h} {
|
|
1183
1186
|
transition: ${r.join(", ")};
|
|
1184
|
-
}
|
|
1187
|
+
}`);
|
|
1185
1188
|
}
|
|
1186
|
-
return
|
|
1189
|
+
return m;
|
|
1187
1190
|
}
|
|
1188
|
-
function
|
|
1191
|
+
function re(e, t, n) {
|
|
1189
1192
|
const s = (e || []).filter((i) => t[i]?.type === n && t[i].predicate).map((i) => t[i].predicate).join(") and (");
|
|
1190
1193
|
return s && `(${s})`;
|
|
1191
1194
|
}
|
|
1192
|
-
function
|
|
1193
|
-
const n =
|
|
1195
|
+
function F(e, t) {
|
|
1196
|
+
const n = re(e, t, "media");
|
|
1194
1197
|
return n && window.matchMedia(n);
|
|
1195
1198
|
}
|
|
1196
|
-
function
|
|
1199
|
+
function x(e, t) {
|
|
1197
1200
|
return (e || []).filter((n) => t[n]?.type === "selector" && t[n].predicate).map((n) => `:is(${t[n].predicate})`).join("");
|
|
1198
1201
|
}
|
|
1199
|
-
const
|
|
1202
|
+
const Ie = "__rm-reduce", Dt = "__rm-no-preference", ms = {
|
|
1203
|
+
[Ie]: { type: "media", predicate: "prefers-reduced-motion: reduce" },
|
|
1204
|
+
[Dt]: {
|
|
1205
|
+
type: "media",
|
|
1206
|
+
predicate: "prefers-reduced-motion: no-preference"
|
|
1207
|
+
}
|
|
1208
|
+
}, ps = /* @__PURE__ */ new Set([
|
|
1209
|
+
"namedEffect",
|
|
1210
|
+
"keyframeEffect",
|
|
1211
|
+
"customEffect",
|
|
1212
|
+
"transition",
|
|
1213
|
+
"transitionProperties",
|
|
1214
|
+
"duration",
|
|
1215
|
+
"delay",
|
|
1216
|
+
"easing",
|
|
1217
|
+
"iterations",
|
|
1218
|
+
"alternate",
|
|
1219
|
+
"fill",
|
|
1220
|
+
"reversed",
|
|
1221
|
+
"composite",
|
|
1222
|
+
"rangeStart",
|
|
1223
|
+
"rangeEnd",
|
|
1224
|
+
"centeredToTarget",
|
|
1225
|
+
"transitionDuration",
|
|
1226
|
+
"transitionEasing"
|
|
1227
|
+
]);
|
|
1228
|
+
function jt(e = {}) {
|
|
1229
|
+
return { ...e, ...ms };
|
|
1230
|
+
}
|
|
1231
|
+
function Te(...e) {
|
|
1232
|
+
return e.find(Boolean) ?? "collapse";
|
|
1233
|
+
}
|
|
1234
|
+
function xe(e) {
|
|
1235
|
+
return Ft(e) ? "state" : "duration" in e ? "time" : "scrub";
|
|
1236
|
+
}
|
|
1237
|
+
function rt(e) {
|
|
1238
|
+
const t = xe(e);
|
|
1239
|
+
if (t === "state") {
|
|
1240
|
+
const { transition: s, transitionProperties: i } = e;
|
|
1241
|
+
return {
|
|
1242
|
+
...e,
|
|
1243
|
+
...s && { transition: { ...s, duration: 0 } },
|
|
1244
|
+
...i && {
|
|
1245
|
+
transitionProperties: i.map((o) => ({
|
|
1246
|
+
...o,
|
|
1247
|
+
duration: 0
|
|
1248
|
+
}))
|
|
1249
|
+
}
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
const { iterations: n = 1 } = e;
|
|
1253
|
+
return t === "scrub" || !n || n === 1 / 0 ? null : { ...e, duration: 0 };
|
|
1254
|
+
}
|
|
1255
|
+
function gs(e, t, n) {
|
|
1256
|
+
const s = ([o]) => ps.has(o), { keyframeEffect: i } = n;
|
|
1257
|
+
return {
|
|
1258
|
+
...Object.fromEntries(Object.entries(e).filter((o) => !s(o))),
|
|
1259
|
+
...Object.fromEntries(Object.entries(n).filter(s)),
|
|
1260
|
+
// named after the replacement, or its keyframes would take the original's name
|
|
1261
|
+
...i && {
|
|
1262
|
+
keyframeEffect: { ...i, name: i.name || t }
|
|
1263
|
+
}
|
|
1264
|
+
};
|
|
1265
|
+
}
|
|
1266
|
+
function vs(e, t, n) {
|
|
1267
|
+
switch (t) {
|
|
1268
|
+
case "ignore":
|
|
1269
|
+
return e;
|
|
1270
|
+
case "cancel":
|
|
1271
|
+
return null;
|
|
1272
|
+
case "collapse":
|
|
1273
|
+
return rt(e);
|
|
1274
|
+
default: {
|
|
1275
|
+
const s = n[t];
|
|
1276
|
+
return s && xe(s) === xe(e) ? gs(e, t, s) : rt(e);
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
function at(e, t) {
|
|
1281
|
+
return {
|
|
1282
|
+
...e,
|
|
1283
|
+
conditions: [...e.conditions || [], t]
|
|
1284
|
+
};
|
|
1285
|
+
}
|
|
1286
|
+
function ys(e) {
|
|
1287
|
+
return !!e.conditions?.includes(Ie);
|
|
1288
|
+
}
|
|
1289
|
+
function zt(e, t, { effects: n, force: s, collapsesStagger: i }) {
|
|
1290
|
+
const o = vs(e, t, n);
|
|
1291
|
+
if (s)
|
|
1292
|
+
return o ? [o] : [];
|
|
1293
|
+
if (o === e && !i)
|
|
1294
|
+
return [e];
|
|
1295
|
+
const r = at(e, Dt);
|
|
1296
|
+
return o ? [r, at(o, Ie)] : [r];
|
|
1297
|
+
}
|
|
1298
|
+
const Ht = /* @__PURE__ */ new Map([
|
|
1200
1299
|
["viewEnter", "once"],
|
|
1201
1300
|
["animationEnd", "once"],
|
|
1202
1301
|
["hover", "alternate"],
|
|
@@ -1204,93 +1303,108 @@ const _t = /* @__PURE__ */ new Map([
|
|
|
1204
1303
|
["activate", "alternate"],
|
|
1205
1304
|
["interest", "alternate"]
|
|
1206
1305
|
]);
|
|
1207
|
-
function
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1306
|
+
function Es({ namedEffect: e, keyframeEffect: t, customEffect: n }, s) {
|
|
1307
|
+
return e ? !s && !!e.type : !!t || !(n && s);
|
|
1308
|
+
}
|
|
1309
|
+
function ct(e, t) {
|
|
1310
|
+
const { namedEffect: n, customEffect: s, keyframeEffect: i, transition: o, transitionProperties: r, ...a } = e;
|
|
1311
|
+
return n ? t || !n.type ? a : { namedEffect: n, ...a } : i ? { keyframeEffect: i, ...a } : s ? a : o ? { transition: o, ...a } : r ? { transitionProperties: r, ...a } : a;
|
|
1312
|
+
}
|
|
1313
|
+
function Gt(e, t, n, s, i = {}) {
|
|
1314
|
+
const { effects: o = {}, conditions: r = {} } = n, { key: a, trigger: l, conditions: u = [] } = t, c = l === "pointerMove";
|
|
1315
|
+
e.effectId || (e.effectId = s || ne());
|
|
1316
|
+
const { effectId: f } = e, d = { ...o[f] || {}, ...e };
|
|
1317
|
+
let { key: m, conditions: p, triggerType: h } = d;
|
|
1318
|
+
if (!m) {
|
|
1319
|
+
if (!a)
|
|
1214
1320
|
return null;
|
|
1215
|
-
|
|
1321
|
+
m = a;
|
|
1216
1322
|
}
|
|
1217
|
-
if (
|
|
1323
|
+
if (fs(m))
|
|
1218
1324
|
return null;
|
|
1219
|
-
const
|
|
1220
|
-
(
|
|
1325
|
+
const g = u.filter(
|
|
1326
|
+
(S) => r[S].type === "media"
|
|
1221
1327
|
);
|
|
1222
|
-
|
|
1328
|
+
p = [
|
|
1223
1329
|
...new Set(
|
|
1224
|
-
[...
|
|
1225
|
-
(
|
|
1330
|
+
[...p || [], ...g].filter(
|
|
1331
|
+
(S) => r[S]
|
|
1226
1332
|
)
|
|
1227
1333
|
)
|
|
1228
|
-
],
|
|
1229
|
-
const { namedEffect:
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
const {
|
|
1334
|
+
], h || (h = Ht.get(l));
|
|
1335
|
+
const { namedEffect: v, keyframeEffect: y } = d;
|
|
1336
|
+
if (!v && y && !y.name) {
|
|
1337
|
+
const S = f && !(o[f] && "keyframeEffect" in e);
|
|
1338
|
+
y.name = S ? f : ne();
|
|
1339
|
+
}
|
|
1340
|
+
if (!Es(d, c))
|
|
1341
|
+
return null;
|
|
1342
|
+
const $ = { ...d, key: m, conditions: p, effectId: f, triggerType: h }, E = { ...$, initial: mn(t, $) }, b = zt(
|
|
1343
|
+
E,
|
|
1344
|
+
Te(
|
|
1345
|
+
d.reducedMotionPolicy,
|
|
1346
|
+
i.policy,
|
|
1347
|
+
t.reducedMotionPolicy,
|
|
1348
|
+
i.defaultPolicy
|
|
1349
|
+
),
|
|
1350
|
+
{ effects: o, force: i.force, collapsesStagger: i.collapsesStagger }
|
|
1351
|
+
).map((S) => ct(S, c));
|
|
1352
|
+
return b.length ? { ...ct(E, c), variants: b } : null;
|
|
1353
|
+
}
|
|
1354
|
+
function ws(e, t, n, s, i, o = {}) {
|
|
1355
|
+
const { sequences: r = {}, conditions: a = {} } = n, { trigger: l, conditions: u = [] } = t;
|
|
1356
|
+
e.sequenceId || (e.sequenceId = s || ne());
|
|
1357
|
+
const { sequenceId: c } = e, f = { ...r[c] || {}, ...e }, d = Te(
|
|
1358
|
+
f.reducedMotionPolicy,
|
|
1359
|
+
t.reducedMotionPolicy,
|
|
1360
|
+
o.defaultPolicy
|
|
1361
|
+
);
|
|
1250
1362
|
let {
|
|
1251
|
-
effects:
|
|
1252
|
-
conditions:
|
|
1363
|
+
effects: m,
|
|
1364
|
+
conditions: p,
|
|
1253
1365
|
triggerType: h,
|
|
1254
|
-
delay:
|
|
1255
|
-
offset:
|
|
1256
|
-
offsetEasing:
|
|
1257
|
-
} =
|
|
1258
|
-
if (typeof
|
|
1366
|
+
delay: g = 0,
|
|
1367
|
+
offset: v = 0,
|
|
1368
|
+
offsetEasing: y = "linear"
|
|
1369
|
+
} = f;
|
|
1370
|
+
if (typeof y == "function" || !m)
|
|
1259
1371
|
return null;
|
|
1260
|
-
h || (h =
|
|
1261
|
-
const
|
|
1262
|
-
(
|
|
1372
|
+
h || (h = Ht.get(l));
|
|
1373
|
+
const $ = u.filter(
|
|
1374
|
+
(S) => a[S].type === "media"
|
|
1263
1375
|
);
|
|
1264
|
-
|
|
1376
|
+
p = [
|
|
1265
1377
|
...new Set(
|
|
1266
|
-
[...
|
|
1267
|
-
(
|
|
1378
|
+
[...p || [], ...$].filter(
|
|
1379
|
+
(S) => a[S]
|
|
1268
1380
|
)
|
|
1269
1381
|
)
|
|
1270
1382
|
];
|
|
1271
|
-
const
|
|
1272
|
-
const
|
|
1273
|
-
{
|
|
1383
|
+
const b = m.map((S, T) => {
|
|
1384
|
+
const I = Gt(
|
|
1385
|
+
{ ...S, triggerType: h, conditions: [...S.conditions || [], ...p] },
|
|
1274
1386
|
t,
|
|
1275
1387
|
n,
|
|
1276
|
-
`${
|
|
1388
|
+
`${c}-eff-${T}`,
|
|
1389
|
+
{ ...o, policy: d, collapsesStagger: d !== "ignore" }
|
|
1277
1390
|
);
|
|
1278
|
-
return
|
|
1279
|
-
}).filter((
|
|
1280
|
-
return
|
|
1281
|
-
sequenceId:
|
|
1391
|
+
return I && Object.assign(I, { slotKey: i?.(T) });
|
|
1392
|
+
}).filter((S) => S !== null);
|
|
1393
|
+
return b.length ? {
|
|
1394
|
+
sequenceId: c,
|
|
1282
1395
|
triggerType: h,
|
|
1283
|
-
conditions:
|
|
1284
|
-
delay:
|
|
1285
|
-
offset:
|
|
1286
|
-
offsetEasing:
|
|
1287
|
-
|
|
1396
|
+
conditions: p,
|
|
1397
|
+
delay: g,
|
|
1398
|
+
offset: v,
|
|
1399
|
+
offsetEasing: y,
|
|
1400
|
+
reducedMotionPolicy: d,
|
|
1401
|
+
effects: b
|
|
1288
1402
|
} : null;
|
|
1289
1403
|
}
|
|
1290
|
-
function
|
|
1291
|
-
return e === "cssFloat" ? "float" : e === "easing" ? "animation-timing-function" : e === "cssOffset" ? "offset" : e === "composite" ? "animation-composition" :
|
|
1404
|
+
function $s(e) {
|
|
1405
|
+
return e === "cssFloat" ? "float" : e === "easing" ? "animation-timing-function" : e === "cssOffset" ? "offset" : e === "composite" ? "animation-composition" : ye(e);
|
|
1292
1406
|
}
|
|
1293
|
-
function
|
|
1407
|
+
function Ss(e) {
|
|
1294
1408
|
if (!e.length)
|
|
1295
1409
|
return [];
|
|
1296
1410
|
const t = e.map((i) => ({ ...i }));
|
|
@@ -1304,66 +1418,66 @@ function ts(e) {
|
|
|
1304
1418
|
if (o > 1)
|
|
1305
1419
|
return console.error("Offsets must be in the range [0,1]"), [];
|
|
1306
1420
|
const r = i - n;
|
|
1307
|
-
for (let
|
|
1308
|
-
const l = (
|
|
1309
|
-
t[
|
|
1421
|
+
for (let a = n + 1; a < i; a++) {
|
|
1422
|
+
const l = (a - n) / r;
|
|
1423
|
+
t[a].offset = s + (o - s) * l;
|
|
1310
1424
|
}
|
|
1311
1425
|
n = i, s = o;
|
|
1312
1426
|
}
|
|
1313
1427
|
return t;
|
|
1314
1428
|
}
|
|
1315
|
-
function
|
|
1316
|
-
const n = Object.entries(e).filter(([s, i]) => s !== "offset" && i !== void 0 && i !== null).map(([s, i]) => `${
|
|
1429
|
+
function bs(e, t) {
|
|
1430
|
+
const n = Object.entries(e).filter(([s, i]) => s !== "offset" && i !== void 0 && i !== null).map(([s, i]) => `${$s(s)}: ${i};`).join(`
|
|
1317
1431
|
`);
|
|
1318
1432
|
return `${t}% {
|
|
1319
1433
|
${n}
|
|
1320
1434
|
}`;
|
|
1321
1435
|
}
|
|
1322
|
-
function
|
|
1323
|
-
const n =
|
|
1436
|
+
function Is(e, t) {
|
|
1437
|
+
const n = Ss(t);
|
|
1324
1438
|
if (!n.length)
|
|
1325
1439
|
return "";
|
|
1326
1440
|
let s = n.map((i) => {
|
|
1327
|
-
const o = i.offset, r =
|
|
1328
|
-
return
|
|
1441
|
+
const o = i.offset, r = us(o * 100);
|
|
1442
|
+
return bs(i, r);
|
|
1329
1443
|
}).join(`
|
|
1330
1444
|
`);
|
|
1331
1445
|
return `@keyframes ${e} {
|
|
1332
1446
|
${s}
|
|
1333
1447
|
}`;
|
|
1334
1448
|
}
|
|
1335
|
-
function
|
|
1336
|
-
const { key: t, childSelector: n, declarations: s, media: i, states: o, selectorCondition: r, selectorSuffix:
|
|
1449
|
+
function Ts(e) {
|
|
1450
|
+
const { key: t, childSelector: n, declarations: s, media: i, states: o, selectorCondition: r, selectorSuffix: a } = e;
|
|
1337
1451
|
if (!s.length)
|
|
1338
1452
|
return "";
|
|
1339
1453
|
let l = `[data-interact-key="${t}"]`;
|
|
1340
1454
|
if (o && o.length) {
|
|
1341
|
-
const
|
|
1342
|
-
l = `${l}:is(${
|
|
1455
|
+
const f = o.map((d) => `:state(${d}), :--${d}, [data-interact-effect~="${d}"]`).join(", ");
|
|
1456
|
+
l = `${l}:is(${f})`;
|
|
1343
1457
|
}
|
|
1344
|
-
n && (l = `${l} ${n}`),
|
|
1345
|
-
const
|
|
1346
|
-
`),
|
|
1347
|
-
${
|
|
1458
|
+
n && (l = `${l} ${n}`), a && (l = `${l}${a}`), r && (l = ge(l, r));
|
|
1459
|
+
const u = s.map(({ name: f, value: d, important: m }) => `${f}: ${d}${m ? " !important" : ""};`).join(`
|
|
1460
|
+
`), c = `${l} {
|
|
1461
|
+
${u}
|
|
1348
1462
|
}`;
|
|
1349
1463
|
return i ? `@media ${i} {
|
|
1350
|
-
${
|
|
1351
|
-
}` :
|
|
1464
|
+
${c}
|
|
1465
|
+
}` : c;
|
|
1352
1466
|
}
|
|
1353
|
-
const
|
|
1467
|
+
const Ne = [
|
|
1354
1468
|
"animation",
|
|
1355
1469
|
"animation-composition",
|
|
1356
1470
|
"animation-timeline",
|
|
1357
1471
|
"animation-range"
|
|
1358
|
-
],
|
|
1359
|
-
...
|
|
1472
|
+
], Oe = [
|
|
1473
|
+
...Ne,
|
|
1360
1474
|
"transition",
|
|
1361
1475
|
"view-timeline"
|
|
1362
|
-
],
|
|
1363
|
-
function
|
|
1476
|
+
], Ce = ["animation", "transition", "timeline"];
|
|
1477
|
+
function L(e) {
|
|
1364
1478
|
return e === "transition" ? "transition" : e === "view-timeline" ? "timeline" : "animation";
|
|
1365
1479
|
}
|
|
1366
|
-
const
|
|
1480
|
+
const K = {
|
|
1367
1481
|
transition: "_",
|
|
1368
1482
|
animation: "none",
|
|
1369
1483
|
"animation-composition": "replace",
|
|
@@ -1371,95 +1485,95 @@ const B = {
|
|
|
1371
1485
|
"animation-range": "normal",
|
|
1372
1486
|
"view-timeline": "none"
|
|
1373
1487
|
};
|
|
1374
|
-
function
|
|
1488
|
+
function Wt(e) {
|
|
1375
1489
|
return e.replace(new RegExp("(?<!(^|-))([aeiou]|tion)", "g"), "");
|
|
1376
1490
|
}
|
|
1377
1491
|
function j(e, t, n = !1, s) {
|
|
1378
1492
|
const i = s === void 0 ? "" : `-c${s}`;
|
|
1379
|
-
return `--${
|
|
1493
|
+
return `--${Wt(e)}${i}${n ? "-slot" : ""}-${t}`;
|
|
1380
1494
|
}
|
|
1381
|
-
function
|
|
1382
|
-
return `--${
|
|
1495
|
+
function se(e, t) {
|
|
1496
|
+
return `--${Wt(e)}-c${t}`;
|
|
1383
1497
|
}
|
|
1384
|
-
function
|
|
1498
|
+
function Os(e, t) {
|
|
1385
1499
|
return Array.from(
|
|
1386
1500
|
{ length: t + 1 },
|
|
1387
|
-
(n, s) => `var(${
|
|
1501
|
+
(n, s) => `var(${se(e, s)})`
|
|
1388
1502
|
).join(", ");
|
|
1389
1503
|
}
|
|
1390
|
-
function
|
|
1504
|
+
function Cs(e, t, n, s, i = 0, o) {
|
|
1391
1505
|
const r = {
|
|
1392
1506
|
animation: e,
|
|
1393
1507
|
transition: t,
|
|
1394
1508
|
timeline: i
|
|
1395
|
-
},
|
|
1509
|
+
}, a = {
|
|
1396
1510
|
animation: n,
|
|
1397
1511
|
transition: s,
|
|
1398
1512
|
timeline: 0
|
|
1399
|
-
}, l = (
|
|
1400
|
-
return
|
|
1513
|
+
}, l = (u, c) => `@property ${c} { syntax: "*"; inherits: false; initial-value: ${K[u]}; }`;
|
|
1514
|
+
return Oe.flatMap((u) => [
|
|
1401
1515
|
...Array.from(
|
|
1402
|
-
{ length: r[
|
|
1403
|
-
(
|
|
1516
|
+
{ length: r[L(u)] },
|
|
1517
|
+
(c, f) => l(u, j(u, f, !1, o))
|
|
1404
1518
|
),
|
|
1405
1519
|
...Array.from(
|
|
1406
|
-
{ length:
|
|
1407
|
-
(
|
|
1520
|
+
{ length: a[L(u)] },
|
|
1521
|
+
(c, f) => l(u, j(u, f, !0, o))
|
|
1408
1522
|
),
|
|
1409
1523
|
// registers the lists of the configs before it too, for elements they don't target
|
|
1410
1524
|
...Array.from(
|
|
1411
|
-
{ length: o !== void 0 && r[
|
|
1412
|
-
(
|
|
1525
|
+
{ length: o !== void 0 && r[L(u)] ? o + 1 : 0 },
|
|
1526
|
+
(c, f) => l(u, se(u, f))
|
|
1413
1527
|
)
|
|
1414
1528
|
]);
|
|
1415
1529
|
}
|
|
1416
|
-
function
|
|
1417
|
-
const i =
|
|
1418
|
-
(
|
|
1530
|
+
function Ms(e, t, n, s) {
|
|
1531
|
+
const i = Oe.filter(
|
|
1532
|
+
(a) => e[L(a)].slotsInSequence > 0
|
|
1419
1533
|
);
|
|
1420
1534
|
if (i.length === 0)
|
|
1421
1535
|
return null;
|
|
1422
|
-
const o = i.map((
|
|
1423
|
-
const { listIndex: l, slotCursor:
|
|
1536
|
+
const o = i.map((a) => {
|
|
1537
|
+
const { listIndex: l, slotCursor: u, slotsInSequence: c } = e[L(a)];
|
|
1424
1538
|
return {
|
|
1425
|
-
name: j(
|
|
1539
|
+
name: j(a, l, !1, s),
|
|
1426
1540
|
value: Array.from(
|
|
1427
|
-
{ length:
|
|
1428
|
-
(
|
|
1541
|
+
{ length: c },
|
|
1542
|
+
(f, d) => `var(${j(a, u + d, !0, s)})`
|
|
1429
1543
|
).join(", ")
|
|
1430
1544
|
};
|
|
1431
1545
|
}), r = { key: e.key, childSelector: e.childSelector, declarations: o };
|
|
1432
|
-
return t && (r.media =
|
|
1546
|
+
return t && (r.media = re(t, n || {}, "media"), r.selectorCondition = x(t, n || {})), r;
|
|
1433
1547
|
}
|
|
1434
|
-
function
|
|
1548
|
+
function _s(e, t, n, s = 0, i) {
|
|
1435
1549
|
if (e.length === 0)
|
|
1436
1550
|
return "";
|
|
1437
1551
|
const o = {
|
|
1438
1552
|
animation: t,
|
|
1439
1553
|
transition: n,
|
|
1440
1554
|
timeline: s
|
|
1441
|
-
}, r =
|
|
1555
|
+
}, r = Oe.filter((u) => o[L(u)] > 0);
|
|
1442
1556
|
if (r.length === 0)
|
|
1443
1557
|
return "";
|
|
1444
|
-
const
|
|
1445
|
-
const
|
|
1446
|
-
{ length: o[
|
|
1558
|
+
const a = r.flatMap((u) => {
|
|
1559
|
+
const c = Array.from(
|
|
1560
|
+
{ length: o[L(u)] },
|
|
1447
1561
|
// TODO: maybe add `-intrct` to names? --anm-0 or --trns-0 could collide with user-defined names
|
|
1448
|
-
(
|
|
1562
|
+
(f, d) => `var(${j(u, d, !1, i)})`
|
|
1449
1563
|
).join(", ");
|
|
1450
|
-
return i === void 0 ? [{ name:
|
|
1451
|
-
{ name:
|
|
1452
|
-
{ name:
|
|
1564
|
+
return i === void 0 ? [{ name: u, value: c }] : [
|
|
1565
|
+
{ name: se(u, i), value: c },
|
|
1566
|
+
{ name: u, value: Os(u, i) }
|
|
1453
1567
|
];
|
|
1454
1568
|
});
|
|
1455
1569
|
return `${e.map(
|
|
1456
|
-
({ key:
|
|
1570
|
+
({ key: u, childSelector: c }) => `[data-interact-key="${u}"]${c ? ` ${c}` : ""}`
|
|
1457
1571
|
).join(", ")} {
|
|
1458
|
-
${
|
|
1572
|
+
${a.map(({ name: u, value: c }) => ` ${u}: ${c};`).join(`
|
|
1459
1573
|
`)}
|
|
1460
1574
|
}`;
|
|
1461
1575
|
}
|
|
1462
|
-
function
|
|
1576
|
+
function Ps(e, t) {
|
|
1463
1577
|
if (e.length === 0)
|
|
1464
1578
|
return "";
|
|
1465
1579
|
if (t === void 0)
|
|
@@ -1468,34 +1582,34 @@ function ls(e, t) {
|
|
|
1468
1582
|
}`;
|
|
1469
1583
|
const n = Array.from(
|
|
1470
1584
|
{ length: t + 1 },
|
|
1471
|
-
(s, i) => `var(${
|
|
1585
|
+
(s, i) => `var(${se("timeline-scope", i)}, --_)`
|
|
1472
1586
|
).join(", ");
|
|
1473
1587
|
return `:root {
|
|
1474
|
-
${
|
|
1588
|
+
${se("timeline-scope", t)}: ${e.join(", ")};
|
|
1475
1589
|
timeline-scope: ${n};
|
|
1476
1590
|
}`;
|
|
1477
1591
|
}
|
|
1478
|
-
const
|
|
1592
|
+
const le = {
|
|
1479
1593
|
rangeStart: { name: "cover", offset: { value: 0, unit: "percentage" } },
|
|
1480
1594
|
rangeEnd: { name: "cover", offset: { value: 100, unit: "percentage" } }
|
|
1481
1595
|
};
|
|
1482
|
-
function
|
|
1483
|
-
const n = e?.name ??
|
|
1596
|
+
function ks(e, t) {
|
|
1597
|
+
const n = e?.name ?? le.rangeStart.name, s = t?.name ?? e?.name ?? le.rangeEnd.name, i = {
|
|
1484
1598
|
name: n,
|
|
1485
|
-
offset: e?.offset ||
|
|
1599
|
+
offset: e?.offset || le.rangeStart.offset
|
|
1486
1600
|
}, o = {
|
|
1487
1601
|
name: s,
|
|
1488
|
-
offset: t?.offset ||
|
|
1602
|
+
offset: t?.offset || le.rangeEnd.offset
|
|
1489
1603
|
};
|
|
1490
1604
|
return { startOffset: i, endOffset: o };
|
|
1491
1605
|
}
|
|
1492
|
-
function
|
|
1606
|
+
function N(e) {
|
|
1493
1607
|
if ("keyframeEffect" in e && !e.keyframeEffect.name && "effectId" in e && (e.keyframeEffect.name = e.effectId), "duration" in e)
|
|
1494
1608
|
return {
|
|
1495
1609
|
id: "",
|
|
1496
1610
|
...e
|
|
1497
1611
|
};
|
|
1498
|
-
const { rangeStart: t, rangeEnd: n, ...s } = e, { startOffset: i, endOffset: o } =
|
|
1612
|
+
const { rangeStart: t, rangeEnd: n, ...s } = e, { startOffset: i, endOffset: o } = ks(t, n);
|
|
1499
1613
|
return {
|
|
1500
1614
|
id: "",
|
|
1501
1615
|
startOffset: i,
|
|
@@ -1507,23 +1621,23 @@ function q(e, t, n) {
|
|
|
1507
1621
|
let s = e.get(t);
|
|
1508
1622
|
s || (s = /* @__PURE__ */ new Set(), e.set(t, s)), s.add(n);
|
|
1509
1623
|
}
|
|
1510
|
-
function
|
|
1624
|
+
function ae(e, t) {
|
|
1511
1625
|
e.get(t)?.forEach((s) => {
|
|
1512
1626
|
const { source: i, target: o, cleanup: r } = s;
|
|
1513
1627
|
r();
|
|
1514
|
-
const
|
|
1515
|
-
e.get(
|
|
1628
|
+
const a = i === t ? o : i;
|
|
1629
|
+
e.get(a)?.delete(s);
|
|
1516
1630
|
}), e.delete(t);
|
|
1517
1631
|
}
|
|
1518
|
-
const
|
|
1632
|
+
const lt = [
|
|
1519
1633
|
{ name: "visibility", value: "hidden" },
|
|
1520
1634
|
{ name: "clip-path", value: "none", important: !0 },
|
|
1521
1635
|
{ name: "transform", value: "none", important: !0 },
|
|
1522
1636
|
{ name: "translate", value: "none", important: !0 },
|
|
1523
1637
|
{ name: "scale", value: "none", important: !0 },
|
|
1524
1638
|
{ name: "rotate", value: "none", important: !0 }
|
|
1525
|
-
],
|
|
1526
|
-
function
|
|
1639
|
+
], De = { animation: !1, transition: !1, timeline: !1 };
|
|
1640
|
+
function Vt(e, t) {
|
|
1527
1641
|
const n = () => ({
|
|
1528
1642
|
listIndex: 0,
|
|
1529
1643
|
slotCursor: 0,
|
|
@@ -1542,33 +1656,36 @@ function kt(e, t) {
|
|
|
1542
1656
|
keyframeEntries: /* @__PURE__ */ new Map()
|
|
1543
1657
|
};
|
|
1544
1658
|
}
|
|
1545
|
-
function
|
|
1659
|
+
function Bt(e, t, n) {
|
|
1546
1660
|
return Object.fromEntries(
|
|
1547
|
-
|
|
1548
|
-
const i =
|
|
1661
|
+
Oe.map((s) => {
|
|
1662
|
+
const i = L(s), { listIndex: o, slotCursor: r, slotsInSequence: a } = e[i];
|
|
1549
1663
|
return [
|
|
1550
1664
|
s,
|
|
1551
|
-
t[i] ? j(s, r +
|
|
1665
|
+
t[i] ? j(s, r + a, !0, n) : j(s, o, !1, n)
|
|
1552
1666
|
];
|
|
1553
1667
|
})
|
|
1554
1668
|
);
|
|
1555
1669
|
}
|
|
1556
|
-
function
|
|
1557
|
-
|
|
1670
|
+
function je(e, t, n) {
|
|
1671
|
+
Ce.forEach((s) => {
|
|
1558
1672
|
t[s] && (e[s].touched = !0, n[s] && (e[s].slotsInSequence += 1));
|
|
1559
1673
|
});
|
|
1560
1674
|
}
|
|
1561
|
-
function
|
|
1675
|
+
function As(e) {
|
|
1562
1676
|
const { namedEffect: t, keyframeEffect: n, transition: s, transitionProperties: i } = e;
|
|
1563
1677
|
return t || n ? "animation" : s || i ? "transition" : null;
|
|
1564
1678
|
}
|
|
1565
|
-
function
|
|
1679
|
+
function Yt(e) {
|
|
1680
|
+
return (e.variants || [e]).map(As).find(Boolean) || null;
|
|
1681
|
+
}
|
|
1682
|
+
function qs(e) {
|
|
1566
1683
|
const t = /* @__PURE__ */ new Map();
|
|
1567
1684
|
return e.effects.forEach((n) => {
|
|
1568
|
-
const s =
|
|
1685
|
+
const s = Yt(n);
|
|
1569
1686
|
if (!s)
|
|
1570
1687
|
return;
|
|
1571
|
-
const i =
|
|
1688
|
+
const i = B(n), o = t.get(i) || { animation: 0, transition: 0, timeline: 0 };
|
|
1572
1689
|
o[s] += 1, t.set(i, o);
|
|
1573
1690
|
}), new Map(
|
|
1574
1691
|
[...t].map(([n, { animation: s, transition: i }]) => [
|
|
@@ -1577,49 +1694,49 @@ function ds(e) {
|
|
|
1577
1694
|
])
|
|
1578
1695
|
);
|
|
1579
1696
|
}
|
|
1580
|
-
function
|
|
1581
|
-
|
|
1697
|
+
function Rs(e) {
|
|
1698
|
+
Ce.forEach((t) => {
|
|
1582
1699
|
const n = e[t];
|
|
1583
1700
|
n.slotsInInteraction = Math.max(n.slotsInInteraction, n.slotsInSequence), n.slotsInSequence = 0;
|
|
1584
1701
|
});
|
|
1585
1702
|
}
|
|
1586
|
-
function
|
|
1587
|
-
|
|
1703
|
+
function Ls(e) {
|
|
1704
|
+
Ce.forEach((t) => {
|
|
1588
1705
|
const n = e[t];
|
|
1589
1706
|
n.listIndex += n.touched ? 1 : 0, n.slotCursor += n.slotsInInteraction, n.slotsInInteraction = 0, n.touched = !1;
|
|
1590
1707
|
});
|
|
1591
1708
|
}
|
|
1592
|
-
const
|
|
1709
|
+
const Fs = {
|
|
1593
1710
|
animation: "animation",
|
|
1594
1711
|
"animation-composition": "composition",
|
|
1595
1712
|
"animation-timeline": "animationTimeline",
|
|
1596
1713
|
"animation-range": "animationRange"
|
|
1597
1714
|
};
|
|
1598
|
-
function
|
|
1599
|
-
const { key: i, conditions: o } = t, r =
|
|
1715
|
+
function xs(e, t, n, s) {
|
|
1716
|
+
const { key: i, conditions: o } = t, r = re(o, e.configConditions, "media"), a = x(o, e.configConditions), l = V(t, {
|
|
1600
1717
|
asCombinator: !0,
|
|
1601
1718
|
useFirstChild: e.useFirstChild,
|
|
1602
1719
|
addItemFilter: !0
|
|
1603
|
-
}),
|
|
1604
|
-
return
|
|
1720
|
+
}), u = B(t), c = e.targetsMap.get(u) || Vt(i, l), f = Bt(c, De, e.configIndex)["view-timeline"];
|
|
1721
|
+
return je(c, { animation: !1, transition: !1, timeline: !0 }, De), e.targetsMap.set(u, c), s.add(u), {
|
|
1605
1722
|
key: i,
|
|
1606
1723
|
media: r,
|
|
1607
|
-
selectorCondition:
|
|
1724
|
+
selectorCondition: a,
|
|
1608
1725
|
childSelector: l,
|
|
1609
1726
|
declarations: [
|
|
1610
1727
|
{
|
|
1611
|
-
name:
|
|
1728
|
+
name: f,
|
|
1612
1729
|
value: `--${n}`
|
|
1613
1730
|
}
|
|
1614
1731
|
]
|
|
1615
1732
|
};
|
|
1616
1733
|
}
|
|
1617
|
-
function
|
|
1734
|
+
function Ut(e, t, n, s, i) {
|
|
1618
1735
|
const o = [];
|
|
1619
1736
|
for (const r of Object.keys(i)) {
|
|
1620
|
-
const
|
|
1621
|
-
|
|
1622
|
-
...i[r](t[
|
|
1737
|
+
const a = `${Ke}${r}`;
|
|
1738
|
+
a in t && o.push(
|
|
1739
|
+
...i[r](t[a], {
|
|
1623
1740
|
key: n,
|
|
1624
1741
|
scope: e,
|
|
1625
1742
|
config: t
|
|
@@ -1628,385 +1745,411 @@ function Lt(e, t, n, s, i) {
|
|
|
1628
1745
|
}
|
|
1629
1746
|
return o;
|
|
1630
1747
|
}
|
|
1631
|
-
function
|
|
1632
|
-
const { assigned: r, childSelector:
|
|
1633
|
-
key:
|
|
1634
|
-
effectId:
|
|
1748
|
+
function Ns(e, t, n, s, i, o) {
|
|
1749
|
+
const { assigned: r, childSelector: a, partSelectors: l } = n, u = { animation: !1, transition: !1, timeline: !1 }, {
|
|
1750
|
+
key: c,
|
|
1751
|
+
effectId: f,
|
|
1635
1752
|
conditions: d,
|
|
1636
|
-
namedEffect:
|
|
1753
|
+
namedEffect: m,
|
|
1637
1754
|
keyframeEffect: p,
|
|
1638
|
-
transition:
|
|
1755
|
+
transition: h,
|
|
1639
1756
|
transitionProperties: g,
|
|
1640
|
-
initial:
|
|
1641
|
-
} = t, y =
|
|
1757
|
+
initial: v
|
|
1758
|
+
} = t, y = re(d, e.configConditions, "media"), $ = x(d, e.configConditions), E = [
|
|
1642
1759
|
{
|
|
1643
|
-
key:
|
|
1760
|
+
key: c,
|
|
1644
1761
|
media: y,
|
|
1645
|
-
selectorCondition:
|
|
1646
|
-
childSelector:
|
|
1762
|
+
selectorCondition: $,
|
|
1763
|
+
childSelector: a,
|
|
1647
1764
|
declarations: []
|
|
1648
1765
|
}
|
|
1649
1766
|
];
|
|
1650
1767
|
let b = [];
|
|
1651
|
-
const { declarations: S } =
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1768
|
+
const { declarations: S } = E[0];
|
|
1769
|
+
e.plugins && E.push(...Ut("effect", t, c, y, e.plugins));
|
|
1770
|
+
const T = v && t.duration === 0;
|
|
1771
|
+
if ((m || p) && !T) {
|
|
1772
|
+
const I = N(t), P = os(null, I, s, o).filter(
|
|
1773
|
+
(O) => O.name
|
|
1774
|
+
), k = P.length ? {} : { "": [] };
|
|
1775
|
+
P.forEach((O) => {
|
|
1776
|
+
const C = O.part || "";
|
|
1777
|
+
(k[C] ||= []).push(O);
|
|
1778
|
+
}), b = P.map((O) => ({
|
|
1779
|
+
name: O.name,
|
|
1780
|
+
keyframes: O.keyframes
|
|
1662
1781
|
})), S.push(
|
|
1663
|
-
...
|
|
1664
|
-
({ custom:
|
|
1782
|
+
...P.flatMap(
|
|
1783
|
+
({ custom: O }) => Object.entries(O || {}).filter(([C, M]) => M !== void 0).map(([C, M]) => ({ name: C, value: M }))
|
|
1665
1784
|
)
|
|
1666
|
-
), Object.entries(
|
|
1667
|
-
const
|
|
1668
|
-
_listPropertyName:
|
|
1669
|
-
name: i[
|
|
1670
|
-
value: C.map((
|
|
1671
|
-
const
|
|
1672
|
-
return
|
|
1785
|
+
), Object.entries(k).forEach(([O, C]) => {
|
|
1786
|
+
const M = Ne.map((R) => ({
|
|
1787
|
+
_listPropertyName: R,
|
|
1788
|
+
name: i[R],
|
|
1789
|
+
value: C.map((Pe) => {
|
|
1790
|
+
const ke = Fs[R];
|
|
1791
|
+
return Pe[ke] || K[R];
|
|
1673
1792
|
}).join(", ")
|
|
1674
1793
|
})).filter(
|
|
1675
|
-
({ _listPropertyName:
|
|
1794
|
+
({ _listPropertyName: R, name: Pe, value: ke }) => ke !== K[R] || r.has(Pe)
|
|
1676
1795
|
);
|
|
1677
|
-
|
|
1678
|
-
const
|
|
1679
|
-
|
|
1680
|
-
key:
|
|
1796
|
+
M.forEach(({ name: R }) => r.add(R)), u.animation = u.animation || M.length > 0;
|
|
1797
|
+
const ce = O ? `[data-motion-part~="${O}"]` : a;
|
|
1798
|
+
O && M.length && l.add(ce), v ? (E.push({
|
|
1799
|
+
key: c,
|
|
1681
1800
|
media: y,
|
|
1682
|
-
selectorCondition:
|
|
1683
|
-
childSelector:
|
|
1684
|
-
declarations:
|
|
1801
|
+
selectorCondition: $,
|
|
1802
|
+
childSelector: ce,
|
|
1803
|
+
declarations: lt,
|
|
1685
1804
|
selectorSuffix: ":not([data-interact-enter])"
|
|
1686
|
-
}),
|
|
1687
|
-
key:
|
|
1805
|
+
}), E.push({
|
|
1806
|
+
key: c,
|
|
1688
1807
|
media: y,
|
|
1689
|
-
selectorCondition:
|
|
1690
|
-
childSelector:
|
|
1691
|
-
declarations:
|
|
1808
|
+
selectorCondition: $,
|
|
1809
|
+
childSelector: ce,
|
|
1810
|
+
declarations: M,
|
|
1692
1811
|
selectorSuffix: ':not([data-interact-enter="done"])'
|
|
1693
|
-
})) :
|
|
1694
|
-
key:
|
|
1812
|
+
})) : O ? E.push({
|
|
1813
|
+
key: c,
|
|
1695
1814
|
media: y,
|
|
1696
|
-
selectorCondition:
|
|
1697
|
-
childSelector:
|
|
1698
|
-
declarations:
|
|
1699
|
-
}) : S.push(...
|
|
1815
|
+
selectorCondition: $,
|
|
1816
|
+
childSelector: ce,
|
|
1817
|
+
declarations: M
|
|
1818
|
+
}) : S.push(...M);
|
|
1700
1819
|
});
|
|
1701
|
-
} else if (
|
|
1702
|
-
const I =
|
|
1703
|
-
(
|
|
1820
|
+
} else if (h || g) {
|
|
1821
|
+
const I = xt(t), P = Nt(t);
|
|
1822
|
+
(P.length || r.has(i.transition)) && (S.push({
|
|
1704
1823
|
name: i.transition,
|
|
1705
|
-
value:
|
|
1706
|
-
}), r.add(i.transition),
|
|
1707
|
-
key:
|
|
1824
|
+
value: P.join(", ") || K.transition
|
|
1825
|
+
}), r.add(i.transition), u.transition = !0), E.push({
|
|
1826
|
+
key: c,
|
|
1708
1827
|
media: y,
|
|
1709
|
-
selectorCondition:
|
|
1710
|
-
childSelector:
|
|
1711
|
-
states: [
|
|
1828
|
+
selectorCondition: $,
|
|
1829
|
+
childSelector: a,
|
|
1830
|
+
states: [f],
|
|
1712
1831
|
declarations: I
|
|
1713
1832
|
});
|
|
1714
1833
|
} else
|
|
1715
|
-
|
|
1716
|
-
|
|
1834
|
+
T && E.push({
|
|
1835
|
+
key: c,
|
|
1836
|
+
media: y,
|
|
1837
|
+
selectorCondition: $,
|
|
1838
|
+
childSelector: a,
|
|
1839
|
+
declarations: lt,
|
|
1840
|
+
selectorSuffix: ":not([data-interact-enter])"
|
|
1841
|
+
}), S.push(
|
|
1842
|
+
...Ne.filter(
|
|
1717
1843
|
(I) => r.has(i[I])
|
|
1718
1844
|
).map((I) => ({
|
|
1719
1845
|
name: i[I],
|
|
1720
|
-
value:
|
|
1846
|
+
value: K[I]
|
|
1721
1847
|
}))
|
|
1722
1848
|
);
|
|
1723
|
-
return { rules:
|
|
1849
|
+
return { rules: E.filter((I) => I.declarations.length), keyframes: b, wrote: u };
|
|
1724
1850
|
}
|
|
1725
|
-
function
|
|
1726
|
-
const
|
|
1727
|
-
if (!
|
|
1851
|
+
function Ds(e, t, n, s) {
|
|
1852
|
+
const i = t.namedEffect && Qe(t.namedEffect.type, !1);
|
|
1853
|
+
if (!i?.getNames)
|
|
1728
1854
|
return;
|
|
1729
|
-
const
|
|
1730
|
-
if (
|
|
1855
|
+
const o = (a) => i.getNames({ ...t, suffix: a });
|
|
1856
|
+
if (o("-1").join() === o().join())
|
|
1731
1857
|
return;
|
|
1732
|
-
const
|
|
1733
|
-
e.keyframeEntries.set(n, [...
|
|
1858
|
+
const r = e.keyframeEntries.get(n) || [];
|
|
1859
|
+
e.keyframeEntries.set(n, [...r, { slotKey: s, getNames: o }]);
|
|
1734
1860
|
}
|
|
1735
|
-
function
|
|
1736
|
-
const
|
|
1861
|
+
function js(e, t, n) {
|
|
1862
|
+
const s = e.forceReducedMotion || ys(t);
|
|
1863
|
+
return n && s && n.reducedMotionPolicy !== "ignore" ? { ...n, offset: 0 } : n;
|
|
1864
|
+
}
|
|
1865
|
+
function Kt(e, t, n, s, i, o) {
|
|
1866
|
+
const r = B(t), a = e.targetsMap.get(r) || Vt(
|
|
1737
1867
|
t.key,
|
|
1738
|
-
|
|
1868
|
+
V(t, {
|
|
1739
1869
|
asCombinator: !0,
|
|
1740
1870
|
useFirstChild: e.useFirstChild,
|
|
1741
1871
|
addItemFilter: !0
|
|
1742
1872
|
})
|
|
1743
1873
|
);
|
|
1744
1874
|
s.add(r);
|
|
1745
|
-
const l = o?.get(r) ||
|
|
1746
|
-
if (e.collectSlots)
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
{ animation:
|
|
1875
|
+
const l = o?.get(r) || De, u = Bt(a, l, e.configIndex), c = t.variants || [t], f = Yt(t);
|
|
1876
|
+
if (e.collectSlots)
|
|
1877
|
+
return c.forEach(
|
|
1878
|
+
(h) => Ds(a, h, u.animation, t.slotKey)
|
|
1879
|
+
), je(
|
|
1880
|
+
a,
|
|
1881
|
+
{ animation: f === "animation", transition: f === "transition", timeline: !1 },
|
|
1752
1882
|
l
|
|
1753
|
-
), e.targetsMap.set(r,
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1883
|
+
), e.targetsMap.set(r, a), [];
|
|
1884
|
+
const d = a.assigned, m = c.map((h) => (h.namedEffect && (h.suffix = e.keyframeSlots.get(t.slotKey)), a.assigned = new Set(d), {
|
|
1885
|
+
...Ns(
|
|
1886
|
+
e,
|
|
1887
|
+
h,
|
|
1888
|
+
a,
|
|
1889
|
+
n,
|
|
1890
|
+
u,
|
|
1891
|
+
js(e, h, i)
|
|
1892
|
+
),
|
|
1893
|
+
assigned: a.assigned
|
|
1894
|
+
}));
|
|
1895
|
+
a.assigned = new Set(m.flatMap((h) => [...h.assigned])), m.forEach(
|
|
1896
|
+
({ keyframes: h }) => h.forEach(({ name: g, keyframes: v }) => e.keyframesMap.set(g, v))
|
|
1897
|
+
);
|
|
1898
|
+
const p = Object.fromEntries(
|
|
1899
|
+
Ce.map((h) => [h, m.some((g) => g.wrote[h])])
|
|
1763
1900
|
);
|
|
1764
|
-
return
|
|
1901
|
+
return je(a, p, l), e.targetsMap.set(r, a), m.flatMap(({ rules: h }) => h);
|
|
1765
1902
|
}
|
|
1766
|
-
function
|
|
1767
|
-
const i = [], o = /* @__PURE__ */ new Set(), r =
|
|
1903
|
+
function zs(e, t, n, s) {
|
|
1904
|
+
const i = [], o = /* @__PURE__ */ new Set(), r = qs(t);
|
|
1768
1905
|
i.push(
|
|
1769
1906
|
...t.effects.flatMap(
|
|
1770
|
-
(l) =>
|
|
1907
|
+
(l) => Kt(e, l, n, o, t, r)
|
|
1771
1908
|
)
|
|
1772
1909
|
);
|
|
1773
|
-
const { conditions:
|
|
1910
|
+
const { conditions: a } = t;
|
|
1774
1911
|
return o.forEach((l) => {
|
|
1775
1912
|
s.add(l);
|
|
1776
|
-
const
|
|
1777
|
-
|
|
1913
|
+
const u = e.targetsMap.get(l), c = Ms(u, a, e.configConditions, e.configIndex);
|
|
1914
|
+
c && (c.declarations.forEach(({ name: f }) => u.assigned.add(f)), i.push(c)), Rs(u);
|
|
1778
1915
|
}), i;
|
|
1779
1916
|
}
|
|
1780
|
-
function
|
|
1781
|
-
const { key: s, conditions: i, effects: o = [], sequences: r = [] } = t,
|
|
1917
|
+
function Hs(e, t, n) {
|
|
1918
|
+
const { key: s, conditions: i, effects: o = [], sequences: r = [] } = t, a = e.plugins ? Ut(
|
|
1782
1919
|
"interaction",
|
|
1783
1920
|
t,
|
|
1784
1921
|
s,
|
|
1785
|
-
|
|
1922
|
+
re(i, e.configConditions, "media"),
|
|
1786
1923
|
e.plugins
|
|
1787
|
-
) : [], { trigger: l } = t,
|
|
1788
|
-
trigger:
|
|
1789
|
-
id:
|
|
1790
|
-
},
|
|
1791
|
-
l === "viewProgress" &&
|
|
1792
|
-
const
|
|
1793
|
-
const
|
|
1794
|
-
|
|
1924
|
+
) : [], { trigger: l } = t, u = {
|
|
1925
|
+
trigger: ds(l),
|
|
1926
|
+
id: J("trigger", [n], e.configIndex)
|
|
1927
|
+
}, c = /* @__PURE__ */ new Set();
|
|
1928
|
+
l === "viewProgress" && a.push(xs(e, t, u.id, c));
|
|
1929
|
+
const f = o.map((m, p) => {
|
|
1930
|
+
const h = Gt(
|
|
1931
|
+
m,
|
|
1795
1932
|
t,
|
|
1796
1933
|
e.config,
|
|
1797
|
-
|
|
1934
|
+
J("eff", [n, p], e.configIndex),
|
|
1935
|
+
{ force: e.forceReducedMotion, defaultPolicy: e.reducedMotionPolicy }
|
|
1798
1936
|
);
|
|
1799
|
-
return
|
|
1800
|
-
}).filter((
|
|
1801
|
-
|
|
1802
|
-
...
|
|
1937
|
+
return h && Object.assign(h, { slotKey: Ee(n, p) });
|
|
1938
|
+
}).filter((m) => m !== null);
|
|
1939
|
+
a.push(
|
|
1940
|
+
...f.flatMap((m) => Kt(e, m, u, c))
|
|
1803
1941
|
);
|
|
1804
1942
|
const d = r.map(
|
|
1805
|
-
(
|
|
1806
|
-
|
|
1943
|
+
(m, p) => ws(
|
|
1944
|
+
m,
|
|
1807
1945
|
t,
|
|
1808
1946
|
e.config,
|
|
1809
|
-
|
|
1810
|
-
(
|
|
1947
|
+
J("seq", [n, p], e.configIndex),
|
|
1948
|
+
(h) => Ee(n, h, p),
|
|
1949
|
+
{ force: e.forceReducedMotion, defaultPolicy: e.reducedMotionPolicy }
|
|
1811
1950
|
)
|
|
1812
|
-
).filter((
|
|
1813
|
-
return
|
|
1951
|
+
).filter((m) => m !== null);
|
|
1952
|
+
return a.push(
|
|
1814
1953
|
...d.flatMap(
|
|
1815
|
-
(
|
|
1954
|
+
(m) => zs(e, m, u, c)
|
|
1816
1955
|
)
|
|
1817
|
-
), l === "viewProgress" &&
|
|
1956
|
+
), l === "viewProgress" && c.size > 1 && e.scopedTimelines.push(`--${u.id}`), c.forEach((m) => Ls(e.targetsMap.get(m))), a;
|
|
1818
1957
|
}
|
|
1819
|
-
function
|
|
1958
|
+
function Gs(e = {}) {
|
|
1820
1959
|
return typeof e == "boolean" ? { useFirstChild: e } : e;
|
|
1821
1960
|
}
|
|
1822
|
-
function
|
|
1823
|
-
const {
|
|
1961
|
+
function Xt(e, t) {
|
|
1962
|
+
const {
|
|
1963
|
+
useFirstChild: n = !0,
|
|
1964
|
+
plugins: s,
|
|
1965
|
+
configIndex: i,
|
|
1966
|
+
collectSlots: o = !1,
|
|
1967
|
+
forceReducedMotion: r = w.forceReducedMotion,
|
|
1968
|
+
reducedMotionPolicy: a = w.reducedMotionPolicy
|
|
1969
|
+
} = t, l = {
|
|
1824
1970
|
config: e,
|
|
1825
|
-
configConditions: e.conditions
|
|
1971
|
+
configConditions: jt(e.conditions),
|
|
1826
1972
|
targetsMap: /* @__PURE__ */ new Map(),
|
|
1827
1973
|
keyframesMap: /* @__PURE__ */ new Map(),
|
|
1828
|
-
keyframeSlots: o ? /* @__PURE__ */ new Map() :
|
|
1974
|
+
keyframeSlots: o ? /* @__PURE__ */ new Map() : Qt(e, { configIndex: i, forceReducedMotion: r, reducedMotionPolicy: a }),
|
|
1829
1975
|
scopedTimelines: [],
|
|
1830
1976
|
collectSlots: o,
|
|
1831
1977
|
useFirstChild: n,
|
|
1978
|
+
forceReducedMotion: r,
|
|
1979
|
+
reducedMotionPolicy: a,
|
|
1832
1980
|
plugins: s,
|
|
1833
1981
|
configIndex: i
|
|
1834
|
-
},
|
|
1835
|
-
(
|
|
1982
|
+
}, u = e.interactions.flatMap(
|
|
1983
|
+
(c, f) => Hs(l, c, f)
|
|
1836
1984
|
);
|
|
1837
|
-
return { ctx:
|
|
1985
|
+
return { ctx: l, cssRules: u };
|
|
1838
1986
|
}
|
|
1839
|
-
function
|
|
1987
|
+
function J(e, t, n) {
|
|
1840
1988
|
return [e, ...n === void 0 ? [] : [`c${n}`], ...t].join("-");
|
|
1841
1989
|
}
|
|
1842
|
-
function
|
|
1990
|
+
function Ee(e, t, n) {
|
|
1843
1991
|
return [e, n, t].filter((s) => s !== void 0).join(":");
|
|
1844
1992
|
}
|
|
1845
|
-
function
|
|
1846
|
-
const { ctx: n } =
|
|
1993
|
+
function Qt(e, t = {}) {
|
|
1994
|
+
const { ctx: n } = Xt(e, { ...t, collectSlots: !0 }), s = /* @__PURE__ */ new Map(), i = (o) => o ? `-${o}` : void 0;
|
|
1847
1995
|
return n.targetsMap.forEach(({ keyframeEntries: o }) => {
|
|
1848
1996
|
const r = /* @__PURE__ */ new Set();
|
|
1849
|
-
o.forEach((
|
|
1850
|
-
const l = (
|
|
1851
|
-
let
|
|
1852
|
-
for (;
|
|
1853
|
-
|
|
1854
|
-
|
|
1997
|
+
o.forEach((a) => {
|
|
1998
|
+
const l = (f) => a.flatMap(({ getNames: d }) => d(i(f)));
|
|
1999
|
+
let u = 0, c = l(u);
|
|
2000
|
+
for (; c.some((f) => r.has(f)); )
|
|
2001
|
+
c = l(++u);
|
|
2002
|
+
c.forEach((f) => r.add(f)), u && a.forEach(({ slotKey: f }) => s.set(f, i(u)));
|
|
1855
2003
|
});
|
|
1856
2004
|
}), s;
|
|
1857
2005
|
}
|
|
1858
|
-
function
|
|
1859
|
-
const { ctx: n, cssRules: s } =
|
|
1860
|
-
i.flatMap((
|
|
1861
|
-
|
|
1862
|
-
...[...
|
|
2006
|
+
function Ws(e, t) {
|
|
2007
|
+
const { ctx: n, cssRules: s } = Xt(e, Gs(t)), i = [...n.targetsMap.values()], o = Math.max(0, ...i.map(({ animation: m }) => m.listIndex)), r = Math.max(0, ...i.map(({ transition: m }) => m.listIndex)), a = Math.max(0, ...i.map(({ timeline: m }) => m.listIndex)), l = _s(
|
|
2008
|
+
i.flatMap((m) => [
|
|
2009
|
+
m,
|
|
2010
|
+
...[...m.partSelectors].map((p) => ({ key: m.key, childSelector: p }))
|
|
1863
2011
|
]),
|
|
1864
2012
|
o,
|
|
1865
2013
|
r,
|
|
1866
|
-
|
|
2014
|
+
a,
|
|
1867
2015
|
n.configIndex
|
|
1868
|
-
),
|
|
2016
|
+
), u = Math.max(0, ...i.map(({ animation: m }) => m.slotCursor)), c = Math.max(
|
|
1869
2017
|
0,
|
|
1870
|
-
...i.map(({ transition:
|
|
1871
|
-
),
|
|
2018
|
+
...i.map(({ transition: m }) => m.slotCursor)
|
|
2019
|
+
), f = Cs(
|
|
1872
2020
|
o,
|
|
1873
2021
|
r,
|
|
1874
|
-
|
|
1875
|
-
a,
|
|
2022
|
+
u,
|
|
1876
2023
|
c,
|
|
2024
|
+
a,
|
|
1877
2025
|
n.configIndex
|
|
1878
|
-
), d =
|
|
1879
|
-
return { keyframes: n.keyframesMap, atProperty:
|
|
2026
|
+
), d = Ps(n.scopedTimelines, n.configIndex);
|
|
2027
|
+
return { keyframes: n.keyframesMap, atProperty: f, cssRules: s, listsRule: l, timelineScopeRule: d };
|
|
1880
2028
|
}
|
|
1881
|
-
function
|
|
1882
|
-
const { cssRules: n, keyframes: s, atProperty: i, listsRule: o, timelineScopeRule: r } =
|
|
2029
|
+
function uo(e, t) {
|
|
2030
|
+
const { cssRules: n, keyframes: s, atProperty: i, listsRule: o, timelineScopeRule: r } = Ws(
|
|
1883
2031
|
e,
|
|
1884
2032
|
t
|
|
1885
2033
|
);
|
|
1886
2034
|
return [
|
|
1887
2035
|
...i,
|
|
1888
|
-
...[...s.entries()].map(([l,
|
|
1889
|
-
...n.map(
|
|
2036
|
+
...[...s.entries()].map(([l, u]) => Is(l, u)),
|
|
2037
|
+
...n.map(Ts),
|
|
1890
2038
|
o,
|
|
1891
2039
|
r
|
|
1892
2040
|
].filter((l) => l).join(`
|
|
1893
2041
|
`);
|
|
1894
2042
|
}
|
|
1895
|
-
const
|
|
2043
|
+
const Vs = {
|
|
1896
2044
|
root: null,
|
|
1897
2045
|
rootMargin: "0px 0px -10% 0px",
|
|
1898
2046
|
threshold: [0]
|
|
1899
|
-
},
|
|
2047
|
+
}, Bs = {
|
|
1900
2048
|
root: null,
|
|
1901
2049
|
rootMargin: "0px",
|
|
1902
2050
|
threshold: [0]
|
|
1903
|
-
},
|
|
1904
|
-
function
|
|
2051
|
+
}, Ys = 0.2;
|
|
2052
|
+
function Us(e) {
|
|
1905
2053
|
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;
|
|
1906
2054
|
return `${i(n)} 0px ${i(s)}`;
|
|
1907
2055
|
}
|
|
1908
|
-
const
|
|
1909
|
-
let
|
|
1910
|
-
function
|
|
1911
|
-
|
|
2056
|
+
const ee = {}, D = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakSet(), X = /* @__PURE__ */ new WeakMap();
|
|
2057
|
+
let Zt = {}, Q = null;
|
|
2058
|
+
function Ks(e) {
|
|
2059
|
+
Zt = e;
|
|
1912
2060
|
}
|
|
1913
|
-
function
|
|
1914
|
-
|
|
2061
|
+
function Jt(e, t, n) {
|
|
2062
|
+
D.get(e)?.forEach(({ source: i, handler: o }) => {
|
|
1915
2063
|
i === e && o(t, n);
|
|
1916
2064
|
});
|
|
1917
2065
|
}
|
|
1918
|
-
function
|
|
2066
|
+
function ut() {
|
|
1919
2067
|
return Q || (Q = new IntersectionObserver((e) => {
|
|
1920
2068
|
e.forEach((t) => {
|
|
1921
2069
|
const n = t.target;
|
|
1922
|
-
t.isIntersecting ||
|
|
2070
|
+
t.isIntersecting || Jt(n, !1, !0);
|
|
1923
2071
|
});
|
|
1924
|
-
},
|
|
2072
|
+
}, Bs), Q);
|
|
1925
2073
|
}
|
|
1926
|
-
function
|
|
2074
|
+
function en(e, t = !1) {
|
|
1927
2075
|
const n = JSON.stringify({ ...e, isSafeMode: t });
|
|
1928
|
-
if (
|
|
1929
|
-
return
|
|
1930
|
-
const s = e.threshold ??
|
|
2076
|
+
if (ee[n])
|
|
2077
|
+
return ee[n];
|
|
2078
|
+
const s = e.threshold ?? Ys, i = t ? Vs : {
|
|
1931
2079
|
root: null,
|
|
1932
|
-
rootMargin: e.inset ?
|
|
2080
|
+
rootMargin: e.inset ? Us(e.inset) : "0px",
|
|
1933
2081
|
threshold: s
|
|
1934
2082
|
}, o = new IntersectionObserver((r) => {
|
|
1935
|
-
r.forEach((
|
|
1936
|
-
const l =
|
|
1937
|
-
if (
|
|
1938
|
-
|
|
1939
|
-
const
|
|
1940
|
-
if (!
|
|
2083
|
+
r.forEach((a) => {
|
|
2084
|
+
const l = a.target, u = !we.has(l);
|
|
2085
|
+
if (u && (we.add(l), e.useSafeViewEnter && !a.isIntersecting)) {
|
|
2086
|
+
_.measure(() => {
|
|
2087
|
+
const c = a.boundingClientRect.height, f = a.rootBounds?.height;
|
|
2088
|
+
if (!f)
|
|
1941
2089
|
return;
|
|
1942
2090
|
const d = Array.isArray(e.threshold) ? Math.min(...e.threshold) : e.threshold;
|
|
1943
|
-
d &&
|
|
2091
|
+
d && c * d > f && _.mutate(() => {
|
|
1944
2092
|
o.unobserve(l);
|
|
1945
|
-
const p =
|
|
1946
|
-
|
|
2093
|
+
const p = en(e, !0);
|
|
2094
|
+
X.set(l, p), p.observe(l);
|
|
1947
2095
|
});
|
|
1948
2096
|
});
|
|
1949
2097
|
return;
|
|
1950
2098
|
}
|
|
1951
|
-
(
|
|
2099
|
+
(a.isIntersecting || !u) && Jt(l, a.isIntersecting);
|
|
1952
2100
|
});
|
|
1953
2101
|
}, i);
|
|
1954
|
-
return
|
|
2102
|
+
return ee[n] = o, o;
|
|
1955
2103
|
}
|
|
1956
|
-
function
|
|
1957
|
-
const
|
|
1958
|
-
|
|
1959
|
-
x(n),
|
|
1960
|
-
void 0,
|
|
1961
|
-
i
|
|
1962
|
-
);
|
|
1963
|
-
if (!f)
|
|
2104
|
+
function Xs(e, t, n, s = {}, { selectorCondition: i, animation: o } = {}) {
|
|
2105
|
+
const r = { ...Zt, ...s }, a = n.triggerType || "once", l = o || oe(t, N(n));
|
|
2106
|
+
if (!l)
|
|
1964
2107
|
return;
|
|
1965
|
-
const
|
|
1966
|
-
|
|
1967
|
-
let
|
|
1968
|
-
|
|
1969
|
-
if (!(
|
|
1970
|
-
if (
|
|
1971
|
-
if (
|
|
1972
|
-
|
|
1973
|
-
const
|
|
1974
|
-
(!
|
|
1975
|
-
|
|
1976
|
-
}),
|
|
1977
|
-
const
|
|
2108
|
+
const u = en(r);
|
|
2109
|
+
a !== "once" && l.persist?.();
|
|
2110
|
+
let c = !0, f = !1, d;
|
|
2111
|
+
d = { source: e, target: t, handler: (h, g) => {
|
|
2112
|
+
if (!(i && !t.matches(i)))
|
|
2113
|
+
if (a === "once") {
|
|
2114
|
+
if (h && !f) {
|
|
2115
|
+
f = !0;
|
|
2116
|
+
const v = D.get(e);
|
|
2117
|
+
(!v || v.size === 0 || v.size === 1 && v.has(d)) && ((X.get(e) || u).unobserve(e), we.delete(e)), l.onFinish(() => {
|
|
2118
|
+
D.get(e)?.delete(d), D.get(t)?.delete(d);
|
|
2119
|
+
}), l.play(() => {
|
|
2120
|
+
const y = () => {
|
|
1978
2121
|
t.dataset.interactEnter = "start";
|
|
1979
2122
|
}, $ = () => {
|
|
1980
|
-
|
|
2123
|
+
_.mutate(() => {
|
|
1981
2124
|
t.dataset.interactEnter = "done";
|
|
1982
2125
|
});
|
|
1983
2126
|
};
|
|
1984
|
-
|
|
1985
|
-
requestAnimationFrame(
|
|
1986
|
-
}),
|
|
2127
|
+
l.isCSS ? (_.mutate(() => {
|
|
2128
|
+
requestAnimationFrame(y);
|
|
2129
|
+
}), l.onFinish($), l.onAbort($)) : (_.mutate(y), l.onFinish($));
|
|
1987
2130
|
});
|
|
1988
2131
|
}
|
|
1989
|
-
} else
|
|
2132
|
+
} else a === "alternate" ? c && h ? (c = !1, l.play()) : c || l.reverse() : a === "repeat" ? h ? (l.progress(0), l.play()) : g && (l.pause(), l.progress(0)) : a === "state" && (h ? l.play() : g && l.pause());
|
|
1990
2133
|
}, cleanup: () => {
|
|
1991
|
-
(
|
|
1992
|
-
} }, q(
|
|
2134
|
+
(X.get(e) || u).unobserve(e), (a === "repeat" || a === "state") && ut().unobserve(e), l.cancel(), we.delete(e), X.delete(e);
|
|
2135
|
+
} }, q(D, e, d), q(D, t, d), X.set(e, u), u.observe(e), (a === "repeat" || a === "state") && ut().observe(e);
|
|
1993
2136
|
}
|
|
1994
|
-
function
|
|
1995
|
-
|
|
2137
|
+
function Qs(e) {
|
|
2138
|
+
ae(D, e);
|
|
1996
2139
|
}
|
|
1997
|
-
function
|
|
1998
|
-
Q = null, Object.keys(
|
|
2140
|
+
function Zs() {
|
|
2141
|
+
Q = null, Object.keys(ee).forEach((e) => delete ee[e]);
|
|
1999
2142
|
}
|
|
2000
|
-
const
|
|
2001
|
-
add:
|
|
2002
|
-
remove:
|
|
2003
|
-
setOptions:
|
|
2004
|
-
reset:
|
|
2143
|
+
const Js = {
|
|
2144
|
+
add: Xs,
|
|
2145
|
+
remove: Qs,
|
|
2146
|
+
setOptions: Ks,
|
|
2147
|
+
reset: Zs
|
|
2005
2148
|
};
|
|
2006
|
-
function
|
|
2149
|
+
function tn(e, t) {
|
|
2007
2150
|
return Object.assign(Object.create(t), e);
|
|
2008
2151
|
}
|
|
2009
|
-
function
|
|
2152
|
+
function ei(e, t, n, s) {
|
|
2010
2153
|
let i = e * (1 - n) + t * n;
|
|
2011
2154
|
if (s) {
|
|
2012
2155
|
const o = i - e;
|
|
@@ -2017,7 +2160,7 @@ function qs(e, t, n, s) {
|
|
|
2017
2160
|
}
|
|
2018
2161
|
return i;
|
|
2019
2162
|
}
|
|
2020
|
-
function
|
|
2163
|
+
function ti(e) {
|
|
2021
2164
|
let t = !1;
|
|
2022
2165
|
return function() {
|
|
2023
2166
|
t || (t = !0, window.requestAnimationFrame(() => {
|
|
@@ -2025,7 +2168,7 @@ function Ps(e) {
|
|
|
2025
2168
|
}));
|
|
2026
2169
|
};
|
|
2027
2170
|
}
|
|
2028
|
-
function
|
|
2171
|
+
function ft(e, t) {
|
|
2029
2172
|
let n = 0;
|
|
2030
2173
|
return function() {
|
|
2031
2174
|
n && window.clearTimeout(n), n = window.setTimeout(() => {
|
|
@@ -2033,104 +2176,104 @@ function tt(e, t) {
|
|
|
2033
2176
|
}, t);
|
|
2034
2177
|
};
|
|
2035
2178
|
}
|
|
2036
|
-
function
|
|
2179
|
+
function ni(e, t) {
|
|
2037
2180
|
const n = e.match(/^calc\s*\(\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\+\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\)\s*$/);
|
|
2038
|
-
return
|
|
2181
|
+
return $e(n[1], t) + $e(n[6], t);
|
|
2039
2182
|
}
|
|
2040
|
-
function
|
|
2041
|
-
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) ?
|
|
2183
|
+
function $e(e, t) {
|
|
2184
|
+
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) ? ni(e, t) : parseInt(e) || 0 : 0;
|
|
2042
2185
|
}
|
|
2043
|
-
function
|
|
2044
|
-
const { name: s, offset: i = 0 } = e, { start: o, end: r } = n,
|
|
2045
|
-
let
|
|
2046
|
-
return s === "entry" ? (
|
|
2186
|
+
function H(e, t, n) {
|
|
2187
|
+
const { name: s, offset: i = 0 } = e, { start: o, end: r } = n, a = r - o, l = i / 100;
|
|
2188
|
+
let u, c;
|
|
2189
|
+
return s === "entry" ? (u = o - t, c = Math.min(t, a)) : s === "entry-crossing" ? (u = o - t, c = a) : s === "contain" ? (u = Math.min(r - t, o), c = Math.abs(t - a)) : s === "exit" ? (u = Math.max(o, r - t), c = Math.min(t, a)) : s === "exit-crossing" ? (u = o, c = a) : s === "cover" && (u = o - t, c = a + t), u + l * c | 0;
|
|
2047
2190
|
}
|
|
2048
|
-
function
|
|
2191
|
+
function qe(e, t, n, s, i) {
|
|
2049
2192
|
let o = 0;
|
|
2050
2193
|
const r = { start: t, end: n };
|
|
2051
|
-
return e.forEach((
|
|
2052
|
-
o +=
|
|
2053
|
-
const
|
|
2054
|
-
if (
|
|
2055
|
-
if ("end" in
|
|
2056
|
-
const d = ((i ?
|
|
2194
|
+
return e.forEach((a, l) => {
|
|
2195
|
+
o += a.offset;
|
|
2196
|
+
const u = a.sticky;
|
|
2197
|
+
if (u) {
|
|
2198
|
+
if ("end" in u && e[l - 1]?.element) {
|
|
2199
|
+
const d = ((i ? a.element.offsetWidth : a.element.offsetHeight) || 0) + u.end - s, m = o + d - a.offset, p = m < r.start, h = !p && m <= n;
|
|
2057
2200
|
let g = 0;
|
|
2058
|
-
(p ||
|
|
2201
|
+
(p || h) && (g = a.offset, r.end += g), p && (r.start += g);
|
|
2059
2202
|
}
|
|
2060
|
-
if ("start" in
|
|
2061
|
-
const
|
|
2062
|
-
let
|
|
2203
|
+
if ("start" in u) {
|
|
2204
|
+
const c = o - u.start, f = c < r.start, d = !f && c <= r.end;
|
|
2205
|
+
let m = 0;
|
|
2063
2206
|
const p = e[l - 1]?.element;
|
|
2064
2207
|
if (p) {
|
|
2065
|
-
if (
|
|
2066
|
-
const
|
|
2067
|
-
|
|
2208
|
+
if (f || d) {
|
|
2209
|
+
const h = (i ? p.offsetWidth : p.offsetHeight) || 0, g = a.offset, v = (i ? a.element.offsetWidth : a.element.offsetHeight) || 0;
|
|
2210
|
+
m = h - (g + v), o += m, r.end += m;
|
|
2068
2211
|
}
|
|
2069
|
-
|
|
2212
|
+
f && (r.start += m);
|
|
2070
2213
|
}
|
|
2071
2214
|
}
|
|
2072
2215
|
}
|
|
2073
2216
|
}), r;
|
|
2074
2217
|
}
|
|
2075
|
-
function
|
|
2076
|
-
const { start: r, end:
|
|
2077
|
-
let
|
|
2218
|
+
function si(e, t, n, s, i, o) {
|
|
2219
|
+
const { start: r, end: a, duration: l } = e;
|
|
2220
|
+
let u = r, c = a, f = e.startRange, d = e.endRange, m;
|
|
2078
2221
|
if (typeof l == "string") {
|
|
2079
|
-
|
|
2080
|
-
const p =
|
|
2081
|
-
|
|
2222
|
+
f = { name: l, offset: 0 }, d = { name: l, offset: 100 }, u = H(f, n, t), c = H(d, n, t), m = c - u;
|
|
2223
|
+
const p = qe(o, u, c, n, s);
|
|
2224
|
+
u = p.start, c = p.end;
|
|
2082
2225
|
} else {
|
|
2083
|
-
if (
|
|
2084
|
-
|
|
2085
|
-
const p =
|
|
2086
|
-
|
|
2226
|
+
if (f || r?.name) {
|
|
2227
|
+
f = f || r;
|
|
2228
|
+
const p = $e(f.add, i), h = H({ ...f, offset: 0 }, n, t), g = H({ ...f, offset: 100 }, n, t), v = qe(o, h, g, n, s);
|
|
2229
|
+
u = v.start + f.offset / 100 * (v.end - v.start) + p;
|
|
2087
2230
|
}
|
|
2088
|
-
if (d ||
|
|
2089
|
-
d = d ||
|
|
2090
|
-
const p =
|
|
2091
|
-
|
|
2092
|
-
} else typeof l == "number" && (
|
|
2231
|
+
if (d || a?.name) {
|
|
2232
|
+
d = d || a;
|
|
2233
|
+
const p = $e(d.add, i), h = H({ ...d, offset: 0 }, n, t), g = H({ ...d, offset: 100 }, n, t), v = qe(o, h, g, n, s);
|
|
2234
|
+
c = v.start + d.offset / 100 * (v.end - v.start) + p;
|
|
2235
|
+
} else typeof l == "number" && (c = u + l);
|
|
2093
2236
|
}
|
|
2094
|
-
return !
|
|
2237
|
+
return !m && !l && (m = c - u), { ...e, start: u, end: c, startRange: f, endRange: d, duration: m || l };
|
|
2095
2238
|
}
|
|
2096
|
-
function
|
|
2239
|
+
function ii(e) {
|
|
2097
2240
|
return e.position === "sticky";
|
|
2098
2241
|
}
|
|
2099
|
-
function
|
|
2242
|
+
function oi(e, t, n) {
|
|
2100
2243
|
return e.position === "fixed" && (!t || t === window.document.body || t === n);
|
|
2101
2244
|
}
|
|
2102
|
-
function
|
|
2245
|
+
function ri(e, t) {
|
|
2103
2246
|
return parseInt(t ? e.left : e.top);
|
|
2104
2247
|
}
|
|
2105
|
-
function
|
|
2248
|
+
function ai(e, t) {
|
|
2106
2249
|
return parseInt(t ? e.right : e.bottom);
|
|
2107
2250
|
}
|
|
2108
|
-
function
|
|
2251
|
+
function ci(e, t, n) {
|
|
2109
2252
|
n && (e.style.position = "static");
|
|
2110
2253
|
const s = (t ? e.offsetLeft : e.offsetTop) || 0;
|
|
2111
2254
|
return n && (e.style.position = null), s;
|
|
2112
2255
|
}
|
|
2113
|
-
function
|
|
2256
|
+
function li(e, t) {
|
|
2114
2257
|
let n;
|
|
2115
|
-
const s =
|
|
2258
|
+
const s = ri(e, t), i = ai(e, t), o = !isNaN(s), r = !isNaN(i);
|
|
2116
2259
|
return (o || r) && (n = {}, o && (n.start = s), r && (n.end = i)), n;
|
|
2117
2260
|
}
|
|
2118
|
-
function
|
|
2261
|
+
function ue(e, t, n, s, i) {
|
|
2119
2262
|
const o = e[0].viewSource, r = [];
|
|
2120
|
-
let
|
|
2121
|
-
for (;
|
|
2122
|
-
const
|
|
2123
|
-
if ((!
|
|
2263
|
+
let a = (s ? o.offsetWidth : o.offsetHeight) || 0, l = 0, u = o;
|
|
2264
|
+
for (; u; ) {
|
|
2265
|
+
const f = window.getComputedStyle(u), d = ii(f), m = d ? li(f, s) : void 0, p = ci(u, s, d);
|
|
2266
|
+
if ((!m || !("end" in m)) && (l += p), r.push({ element: u, offset: p, sticky: m }), u = u.offsetParent, oi(f, u, t))
|
|
2124
2267
|
break;
|
|
2125
|
-
if (
|
|
2126
|
-
r.push({ element:
|
|
2268
|
+
if (u === t) {
|
|
2269
|
+
r.push({ element: u, offset: 0 });
|
|
2127
2270
|
break;
|
|
2128
2271
|
}
|
|
2129
2272
|
}
|
|
2130
|
-
return r.reverse(), e.map((
|
|
2131
|
-
...
|
|
2132
|
-
|
|
2133
|
-
{ start: l, end: l +
|
|
2273
|
+
return r.reverse(), e.map((f) => ({
|
|
2274
|
+
...si(
|
|
2275
|
+
f,
|
|
2276
|
+
{ start: l, end: l + a },
|
|
2134
2277
|
n,
|
|
2135
2278
|
s,
|
|
2136
2279
|
i,
|
|
@@ -2138,7 +2281,7 @@ function le(e, t, n, s, i) {
|
|
|
2138
2281
|
)
|
|
2139
2282
|
}));
|
|
2140
2283
|
}
|
|
2141
|
-
const
|
|
2284
|
+
const dt = 100, ui = {
|
|
2142
2285
|
horizontal: !1,
|
|
2143
2286
|
observeViewportEntry: !0,
|
|
2144
2287
|
viewportRootMargin: "7% 7%",
|
|
@@ -2146,116 +2289,116 @@ const nt = 100, Hs = {
|
|
|
2146
2289
|
observeSourcesResize: !1,
|
|
2147
2290
|
observeContentResize: !1
|
|
2148
2291
|
};
|
|
2149
|
-
function
|
|
2292
|
+
function fi(e, t, n, s) {
|
|
2150
2293
|
let i = 0;
|
|
2151
2294
|
return e >= t && e <= n ? i = s ? (e - t) / s : 1 : e > n && (i = 1), i;
|
|
2152
2295
|
}
|
|
2153
|
-
function
|
|
2296
|
+
function ht(e, t) {
|
|
2154
2297
|
return e === window ? t ? window.document.documentElement.clientWidth : window.document.documentElement.clientHeight : t ? e.clientWidth : e.clientHeight;
|
|
2155
2298
|
}
|
|
2156
|
-
function
|
|
2299
|
+
function di() {
|
|
2157
2300
|
return {
|
|
2158
2301
|
viewportWidth: window.document.documentElement.clientWidth,
|
|
2159
2302
|
viewportHeight: window.document.documentElement.clientHeight
|
|
2160
2303
|
};
|
|
2161
2304
|
}
|
|
2162
|
-
function
|
|
2163
|
-
const t =
|
|
2164
|
-
let o =
|
|
2165
|
-
const
|
|
2305
|
+
function hi(e) {
|
|
2306
|
+
const t = tn(e, ui), n = t.root, s = t.horizontal, i = /* @__PURE__ */ new WeakMap();
|
|
2307
|
+
let o = ht(n, s), r, a, l, u, c;
|
|
2308
|
+
const f = [], d = di();
|
|
2166
2309
|
if (t.scenes = Object.values(
|
|
2167
2310
|
// TODO(ameerf): find a polyfill and use groupBy instead of following reduce
|
|
2168
2311
|
e.scenes.reduce(
|
|
2169
|
-
(
|
|
2170
|
-
const y = g.groupId ? `group-${g.groupId}` : String(
|
|
2171
|
-
return
|
|
2312
|
+
(h, g, v) => {
|
|
2313
|
+
const y = g.groupId ? `group-${g.groupId}` : String(v);
|
|
2314
|
+
return h[y] ? h[y].push(g) : h[y] = [g], h;
|
|
2172
2315
|
},
|
|
2173
2316
|
{}
|
|
2174
2317
|
)
|
|
2175
|
-
).flatMap((
|
|
2318
|
+
).flatMap((h) => (h.every((g) => g.viewSource && (typeof g.duration == "string" || g.start?.name)) ? (h = ue(h, n, o, s, d), (t.observeSourcesResize || t.observeContentResize) && f.push(h)) : h.forEach((g) => {
|
|
2176
2319
|
g.end == null && (g.end = g.start + g.duration), g.duration == null && (g.duration = g.end - g.start);
|
|
2177
|
-
}),
|
|
2178
|
-
|
|
2179
|
-
}),
|
|
2180
|
-
const
|
|
2320
|
+
}), h)), t.scenes.forEach((h, g) => {
|
|
2321
|
+
h.index = g;
|
|
2322
|
+
}), f.length) {
|
|
2323
|
+
const h = /* @__PURE__ */ new Map();
|
|
2181
2324
|
window.ResizeObserver && (l = new window.ResizeObserver(function(g) {
|
|
2182
|
-
g.forEach((
|
|
2183
|
-
const y =
|
|
2184
|
-
|
|
2185
|
-
t.scenes[
|
|
2186
|
-
}),
|
|
2325
|
+
g.forEach((v) => {
|
|
2326
|
+
const y = h.get(v.target), $ = ue(y, n, o, s, d);
|
|
2327
|
+
$.forEach((E, b) => {
|
|
2328
|
+
t.scenes[E.index] = $[b];
|
|
2329
|
+
}), f.splice(f.indexOf(y), 1, $);
|
|
2187
2330
|
});
|
|
2188
|
-
}),
|
|
2189
|
-
l.observe(g[0].viewSource, { box: "border-box" }),
|
|
2190
|
-
}), t.observeContentResize && t.contentRoot && new window.ResizeObserver(
|
|
2191
|
-
const
|
|
2192
|
-
const
|
|
2193
|
-
return
|
|
2194
|
-
t.scenes[
|
|
2195
|
-
}),
|
|
2331
|
+
}), f.forEach((g) => {
|
|
2332
|
+
l.observe(g[0].viewSource, { box: "border-box" }), h.set(g[0].viewSource, g);
|
|
2333
|
+
}), t.observeContentResize && t.contentRoot && new window.ResizeObserver(ft(() => {
|
|
2334
|
+
const v = f.map((y) => {
|
|
2335
|
+
const $ = ue(y, n, o, s, d);
|
|
2336
|
+
return $.forEach((E, b) => {
|
|
2337
|
+
t.scenes[E.index] = $[b];
|
|
2338
|
+
}), $;
|
|
2196
2339
|
});
|
|
2197
|
-
|
|
2198
|
-
|
|
2340
|
+
f.length = 0, f.push(...v), f.forEach((y) => {
|
|
2341
|
+
h.set(y[0].viewSource, y);
|
|
2199
2342
|
});
|
|
2200
|
-
},
|
|
2201
|
-
o =
|
|
2202
|
-
const g =
|
|
2203
|
-
const y =
|
|
2204
|
-
return y.forEach((
|
|
2205
|
-
t.scenes[
|
|
2343
|
+
}, dt)).observe(t.contentRoot, { box: "border-box" })), t.observeViewportResize && (u = ft(function() {
|
|
2344
|
+
o = ht(n, s);
|
|
2345
|
+
const g = f.map((v) => {
|
|
2346
|
+
const y = ue(v, n, o, s, d);
|
|
2347
|
+
return y.forEach(($, E) => {
|
|
2348
|
+
t.scenes[$.index] = y[E];
|
|
2206
2349
|
}), y;
|
|
2207
2350
|
});
|
|
2208
|
-
|
|
2209
|
-
|
|
2351
|
+
f.length = 0, f.push(...g), f.forEach((v) => {
|
|
2352
|
+
h.set(v[0].viewSource, v);
|
|
2210
2353
|
});
|
|
2211
|
-
},
|
|
2354
|
+
}, dt), n === window ? window.addEventListener("resize", u) : window.ResizeObserver && (c = new window.ResizeObserver(u), c.observe(n, { box: "border-box" })));
|
|
2212
2355
|
}
|
|
2213
|
-
t.observeViewportEntry && window.IntersectionObserver && (
|
|
2214
|
-
|
|
2215
|
-
(i.get(g.target) || []).forEach((
|
|
2216
|
-
|
|
2356
|
+
t.observeViewportEntry && window.IntersectionObserver && (a = new window.IntersectionObserver(function(h) {
|
|
2357
|
+
h.forEach((g) => {
|
|
2358
|
+
(i.get(g.target) || []).forEach((v) => {
|
|
2359
|
+
v.disabled = !g.isIntersecting;
|
|
2217
2360
|
});
|
|
2218
2361
|
});
|
|
2219
2362
|
}, {
|
|
2220
2363
|
root: n === window ? window.document : n,
|
|
2221
2364
|
rootMargin: t.viewportRootMargin,
|
|
2222
2365
|
threshold: 0
|
|
2223
|
-
}), t.scenes.forEach((
|
|
2224
|
-
if (
|
|
2225
|
-
let g = i.get(
|
|
2226
|
-
g || (g = [], i.set(
|
|
2366
|
+
}), t.scenes.forEach((h) => {
|
|
2367
|
+
if (h.viewSource) {
|
|
2368
|
+
let g = i.get(h.viewSource);
|
|
2369
|
+
g || (g = [], i.set(h.viewSource, g), a.observe(h.viewSource)), g.push(h);
|
|
2227
2370
|
}
|
|
2228
2371
|
}));
|
|
2229
|
-
function
|
|
2230
|
-
|
|
2231
|
-
const
|
|
2232
|
-
if (
|
|
2372
|
+
function m({ p: h, vp: g }) {
|
|
2373
|
+
h = +h.toFixed(1);
|
|
2374
|
+
const v = +g.toFixed(4);
|
|
2375
|
+
if (h !== r) {
|
|
2233
2376
|
for (let y of t.scenes)
|
|
2234
2377
|
if (!y.disabled) {
|
|
2235
|
-
const { start:
|
|
2236
|
-
y.effect(y, S,
|
|
2378
|
+
const { start: $, end: E, duration: b } = y, S = fi(h, $, E, b);
|
|
2379
|
+
y.effect(y, S, v);
|
|
2237
2380
|
}
|
|
2238
|
-
r =
|
|
2381
|
+
r = h;
|
|
2239
2382
|
}
|
|
2240
2383
|
}
|
|
2241
2384
|
function p() {
|
|
2242
|
-
t.scenes.forEach((
|
|
2385
|
+
t.scenes.forEach((h) => h.destroy?.()), a && (a.disconnect(), a = null), l && (l.disconnect(), l = null), u && (c ? (c.disconnect(), c = null) : window.removeEventListener("resize", u));
|
|
2243
2386
|
}
|
|
2244
2387
|
return {
|
|
2245
|
-
tick:
|
|
2388
|
+
tick: m,
|
|
2246
2389
|
destroy: p
|
|
2247
2390
|
};
|
|
2248
2391
|
}
|
|
2249
|
-
const
|
|
2392
|
+
const mi = {
|
|
2250
2393
|
transitionActive: !1,
|
|
2251
2394
|
transitionFriction: 0.9,
|
|
2252
2395
|
transitionEpsilon: 1,
|
|
2253
2396
|
velocityActive: !1,
|
|
2254
2397
|
velocityMax: 1
|
|
2255
2398
|
};
|
|
2256
|
-
class
|
|
2399
|
+
class pi {
|
|
2257
2400
|
constructor(t = {}) {
|
|
2258
|
-
this.config =
|
|
2401
|
+
this.config = tn(t, mi), this.progress = {
|
|
2259
2402
|
p: 0,
|
|
2260
2403
|
prevP: 0,
|
|
2261
2404
|
vp: 0
|
|
@@ -2268,7 +2411,7 @@ class Ys {
|
|
|
2268
2411
|
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 || (() => {
|
|
2269
2412
|
const s = this.config.root;
|
|
2270
2413
|
this.progress.p = this.config.horizontal ? s.scrollX || s.scrollLeft || 0 : s.scrollY || s.scrollTop || 0;
|
|
2271
|
-
}), this._trigger =
|
|
2414
|
+
}), this._trigger = ti(() => {
|
|
2272
2415
|
this._measure?.(), this.tick(!0);
|
|
2273
2416
|
});
|
|
2274
2417
|
}
|
|
@@ -2314,7 +2457,7 @@ class Ys {
|
|
|
2314
2457
|
* Calculate current progress.
|
|
2315
2458
|
*/
|
|
2316
2459
|
lerp() {
|
|
2317
|
-
this.currentProgress.p =
|
|
2460
|
+
this.currentProgress.p = ei(this.currentProgress.p, this.progress.p, +(1 - this.config.transitionFriction).toFixed(3), this.config.transitionEpsilon);
|
|
2318
2461
|
}
|
|
2319
2462
|
/**
|
|
2320
2463
|
* Stop the event and effect, and remove all DOM side-effects.
|
|
@@ -2338,7 +2481,7 @@ class Ys {
|
|
|
2338
2481
|
* Reset registered effect.
|
|
2339
2482
|
*/
|
|
2340
2483
|
setupEffect() {
|
|
2341
|
-
this.removeEffect(), this.effect =
|
|
2484
|
+
this.removeEffect(), this.effect = hi(this.config);
|
|
2342
2485
|
}
|
|
2343
2486
|
/**
|
|
2344
2487
|
* Remove registered effect.
|
|
@@ -2347,66 +2490,66 @@ class Ys {
|
|
|
2347
2490
|
this.effect && this.effect.destroy(), this.effect = null;
|
|
2348
2491
|
}
|
|
2349
2492
|
}
|
|
2350
|
-
const
|
|
2351
|
-
let
|
|
2352
|
-
function
|
|
2353
|
-
|
|
2493
|
+
const ze = /* @__PURE__ */ new WeakMap();
|
|
2494
|
+
let nn = () => ({});
|
|
2495
|
+
function gi(e) {
|
|
2496
|
+
nn = e;
|
|
2354
2497
|
}
|
|
2355
|
-
function
|
|
2356
|
-
if (i
|
|
2357
|
-
const
|
|
2498
|
+
function vi(e, t, n, s, { selectorCondition: i }) {
|
|
2499
|
+
if (i && !t.matches(i)) return;
|
|
2500
|
+
const o = {
|
|
2358
2501
|
trigger: "view-progress",
|
|
2359
2502
|
element: e
|
|
2360
|
-
},
|
|
2361
|
-
let
|
|
2503
|
+
}, r = N(n);
|
|
2504
|
+
let a;
|
|
2362
2505
|
if ("ViewTimeline" in window) {
|
|
2363
|
-
const
|
|
2506
|
+
const u = oe(
|
|
2364
2507
|
t,
|
|
2365
|
-
|
|
2366
|
-
|
|
2508
|
+
r,
|
|
2509
|
+
o
|
|
2367
2510
|
);
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2511
|
+
u && !u.isCSS && (u.play(), a = () => {
|
|
2512
|
+
u.ready.then(() => {
|
|
2513
|
+
u.cancel();
|
|
2371
2514
|
});
|
|
2372
2515
|
});
|
|
2373
2516
|
} else {
|
|
2374
|
-
const
|
|
2375
|
-
if (
|
|
2376
|
-
const
|
|
2517
|
+
const u = Rt(t, r, o);
|
|
2518
|
+
if (u) {
|
|
2519
|
+
const c = Array.isArray(u) ? u : [u], f = new pi({
|
|
2377
2520
|
viewSource: e,
|
|
2378
|
-
scenes:
|
|
2521
|
+
scenes: c,
|
|
2379
2522
|
observeViewportEntry: !1,
|
|
2380
2523
|
observeViewportResize: !1,
|
|
2381
2524
|
observeSourcesResize: !0,
|
|
2382
2525
|
root: document.body,
|
|
2383
|
-
...
|
|
2526
|
+
...nn()
|
|
2384
2527
|
});
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
}, Promise.all(
|
|
2528
|
+
a = () => {
|
|
2529
|
+
f.destroy();
|
|
2530
|
+
}, Promise.all(c.map((d) => d.ready || Promise.resolve())).then(
|
|
2388
2531
|
() => {
|
|
2389
|
-
|
|
2532
|
+
f.start();
|
|
2390
2533
|
}
|
|
2391
2534
|
);
|
|
2392
2535
|
}
|
|
2393
2536
|
}
|
|
2394
|
-
if (!
|
|
2395
|
-
const
|
|
2396
|
-
q(
|
|
2537
|
+
if (!a) return;
|
|
2538
|
+
const l = { source: e, target: t, cleanup: a };
|
|
2539
|
+
q(ze, e, l), q(ze, t, l);
|
|
2397
2540
|
}
|
|
2398
|
-
function
|
|
2399
|
-
|
|
2541
|
+
function yi(e) {
|
|
2542
|
+
ae(ze, e);
|
|
2400
2543
|
}
|
|
2401
|
-
const
|
|
2402
|
-
add:
|
|
2403
|
-
remove:
|
|
2404
|
-
registerOptionsGetter:
|
|
2544
|
+
const Ei = {
|
|
2545
|
+
add: vi,
|
|
2546
|
+
remove: yi,
|
|
2547
|
+
registerOptionsGetter: gi
|
|
2405
2548
|
};
|
|
2406
|
-
function
|
|
2549
|
+
function mt(e, t, n) {
|
|
2407
2550
|
return Math.min(Math.max(e, n), t);
|
|
2408
2551
|
}
|
|
2409
|
-
function
|
|
2552
|
+
function pt(e) {
|
|
2410
2553
|
let t = !1;
|
|
2411
2554
|
return function() {
|
|
2412
2555
|
if (!t)
|
|
@@ -2415,7 +2558,7 @@ function ot(e) {
|
|
|
2415
2558
|
});
|
|
2416
2559
|
};
|
|
2417
2560
|
}
|
|
2418
|
-
function
|
|
2561
|
+
function wi(e) {
|
|
2419
2562
|
let t = e, n = 0, s = 0;
|
|
2420
2563
|
if (t.offsetParent)
|
|
2421
2564
|
do
|
|
@@ -2428,7 +2571,7 @@ function Zs(e) {
|
|
|
2428
2571
|
height: e.offsetHeight
|
|
2429
2572
|
};
|
|
2430
2573
|
}
|
|
2431
|
-
function
|
|
2574
|
+
function $i() {
|
|
2432
2575
|
const e = window.devicePixelRatio;
|
|
2433
2576
|
let t = !1;
|
|
2434
2577
|
if (e === 1)
|
|
@@ -2441,13 +2584,13 @@ function Js() {
|
|
|
2441
2584
|
});
|
|
2442
2585
|
return document.body.dispatchEvent(n), t;
|
|
2443
2586
|
}
|
|
2444
|
-
function
|
|
2587
|
+
function Si() {
|
|
2445
2588
|
return new Promise((e) => {
|
|
2446
2589
|
const t = window.scrollY;
|
|
2447
2590
|
let n = !1, s;
|
|
2448
2591
|
function i() {
|
|
2449
|
-
document.body.addEventListener("pointerdown", (
|
|
2450
|
-
s === void 0 ? s =
|
|
2592
|
+
document.body.addEventListener("pointerdown", (a) => {
|
|
2593
|
+
s === void 0 ? s = a.offsetY : n = a.offsetY === s;
|
|
2451
2594
|
}, { once: !0 });
|
|
2452
2595
|
const r = new PointerEvent("pointerdown", {
|
|
2453
2596
|
clientY: 500
|
|
@@ -2460,60 +2603,60 @@ function ei() {
|
|
|
2460
2603
|
i(), window.addEventListener("scroll", o), window.scrollY > 0 && window.scrollBy(0, -1);
|
|
2461
2604
|
});
|
|
2462
2605
|
}
|
|
2463
|
-
function
|
|
2464
|
-
|
|
2606
|
+
function bi(e) {
|
|
2607
|
+
Si().then((t) => {
|
|
2465
2608
|
e.fixRequired = t, t && (window.addEventListener("scroll", e.scrollHandler), e.scrollHandler());
|
|
2466
2609
|
});
|
|
2467
2610
|
}
|
|
2468
2611
|
let fe = 0;
|
|
2469
|
-
const
|
|
2470
|
-
function
|
|
2612
|
+
const ve = /* @__PURE__ */ new Set();
|
|
2613
|
+
function Ii() {
|
|
2471
2614
|
const e = (n) => {
|
|
2472
2615
|
for (let s of n.changedTouches)
|
|
2473
|
-
|
|
2616
|
+
ve.add(s.identifier);
|
|
2474
2617
|
}, t = (n) => {
|
|
2475
2618
|
for (let s of n.changedTouches)
|
|
2476
|
-
|
|
2619
|
+
ve.delete(s.identifier);
|
|
2477
2620
|
};
|
|
2478
2621
|
return document.addEventListener("touchstart", e, { passive: !0 }), document.addEventListener("touchend", t, { passive: !0 }), function() {
|
|
2479
|
-
|
|
2622
|
+
ve.clear(), document.removeEventListener("touchstart", e), document.removeEventListener("touchend", t);
|
|
2480
2623
|
};
|
|
2481
2624
|
}
|
|
2482
|
-
function
|
|
2625
|
+
function Ti(e, t) {
|
|
2483
2626
|
if ("onscrollend" in window)
|
|
2484
2627
|
return e.addEventListener("scrollend", t), function() {
|
|
2485
2628
|
e.removeEventListener("scrollend", t);
|
|
2486
2629
|
};
|
|
2487
2630
|
let n = 0, s;
|
|
2488
|
-
fe || (s =
|
|
2631
|
+
fe || (s = Ii()), fe += 1;
|
|
2489
2632
|
function i(o) {
|
|
2490
2633
|
clearTimeout(n), n = setTimeout(() => {
|
|
2491
|
-
|
|
2634
|
+
ve.size ? setTimeout(i, 100) : (t(o), n = 0);
|
|
2492
2635
|
}, 100);
|
|
2493
2636
|
}
|
|
2494
2637
|
return e.addEventListener("scroll", i), function() {
|
|
2495
2638
|
e.removeEventListener("scroll", i), fe -= 1, fe || s();
|
|
2496
2639
|
};
|
|
2497
2640
|
}
|
|
2498
|
-
function
|
|
2641
|
+
function Oi(e, t, n) {
|
|
2499
2642
|
return {
|
|
2500
2643
|
x(s) {
|
|
2501
|
-
const i = e.left - n.x + e.width / 2, o = i >= t.width / 2, r = (o ? i : t.width - i) * 2,
|
|
2502
|
-
return (s -
|
|
2644
|
+
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;
|
|
2645
|
+
return (s - a) / r;
|
|
2503
2646
|
},
|
|
2504
2647
|
y(s) {
|
|
2505
|
-
const i = e.top - n.y + e.height / 2, o = i >= t.height / 2, r = (o ? i : t.height - i) * 2,
|
|
2506
|
-
return (s -
|
|
2648
|
+
const i = e.top - n.y + e.height / 2, o = i >= t.height / 2, r = (o ? i : t.height - i) * 2, a = o ? 0 : i - r / 2;
|
|
2649
|
+
return (s - a) / r;
|
|
2507
2650
|
}
|
|
2508
2651
|
};
|
|
2509
2652
|
}
|
|
2510
|
-
function
|
|
2653
|
+
function Ci(e, t) {
|
|
2511
2654
|
this.x = window.scrollX, this.y = window.scrollY, requestAnimationFrame(() => e && e(t));
|
|
2512
2655
|
}
|
|
2513
|
-
function
|
|
2656
|
+
function Mi(e) {
|
|
2514
2657
|
e.rect.width = window.document.documentElement.clientWidth, e.rect.height = window.document.documentElement.clientHeight;
|
|
2515
2658
|
}
|
|
2516
|
-
function
|
|
2659
|
+
function _i(e) {
|
|
2517
2660
|
const t = new ResizeObserver((n) => {
|
|
2518
2661
|
n.forEach((s) => {
|
|
2519
2662
|
e.rect.width = s.borderBoxSize[0].inlineSize, e.rect.height = s.borderBoxSize[0].blockSize;
|
|
@@ -2521,38 +2664,38 @@ function ai(e) {
|
|
|
2521
2664
|
});
|
|
2522
2665
|
return t.observe(e.root, { box: "border-box" }), t;
|
|
2523
2666
|
}
|
|
2524
|
-
function
|
|
2525
|
-
let t = !1, n = { x: e.rect.width / 2, y: e.rect.height / 2, vx: 0, vy: 0 }, s, i, o, r,
|
|
2667
|
+
function Pi(e) {
|
|
2668
|
+
let t = !1, n = { x: e.rect.width / 2, y: e.rect.height / 2, vx: 0, vy: 0 }, s, i, o, r, a;
|
|
2526
2669
|
const l = { x: 0, y: 0 };
|
|
2527
|
-
e.scenes.forEach((
|
|
2528
|
-
|
|
2529
|
-
}), s = function(
|
|
2530
|
-
for (let
|
|
2531
|
-
if (!
|
|
2532
|
-
const d =
|
|
2533
|
-
e.allowActiveEvent && (
|
|
2670
|
+
e.scenes.forEach((c) => {
|
|
2671
|
+
c.target && c.centeredToTarget && (c.transform = Oi(wi(c.target), e.rect, l), t = !0), e.root ? i = _i(e) : (o = Mi.bind(null, e), window.addEventListener("resize", o));
|
|
2672
|
+
}), s = function(c) {
|
|
2673
|
+
for (let f of e.scenes)
|
|
2674
|
+
if (!f.disabled) {
|
|
2675
|
+
const d = f.transform?.x(c.x) || c.x / e.rect.width, m = f.transform?.y(c.y) || c.y / e.rect.height, p = +mt(0, 1, d).toPrecision(4), h = +mt(0, 1, m).toPrecision(4), g = { x: c.vx, y: c.vy };
|
|
2676
|
+
e.allowActiveEvent && (c.active = d <= 1 && m <= 1 && d >= 0 && m >= 0), f.effect(f, { x: p, y: h }, g, c.active);
|
|
2534
2677
|
}
|
|
2535
|
-
Object.assign(n,
|
|
2536
|
-
}, t && (r =
|
|
2537
|
-
function
|
|
2538
|
-
e.scenes.forEach((
|
|
2678
|
+
Object.assign(n, c);
|
|
2679
|
+
}, t && (r = Ci.bind(l, s, n), a = Ti(document, r));
|
|
2680
|
+
function u() {
|
|
2681
|
+
e.scenes.forEach((c) => c.destroy?.()), a?.(), i ? (i.disconnect(), i = null) : (window.removeEventListener("resize", o), o = null), s = null, n = null;
|
|
2539
2682
|
}
|
|
2540
2683
|
return {
|
|
2541
2684
|
tick: s,
|
|
2542
|
-
destroy:
|
|
2685
|
+
destroy: u
|
|
2543
2686
|
};
|
|
2544
2687
|
}
|
|
2545
|
-
const
|
|
2546
|
-
let
|
|
2547
|
-
function
|
|
2548
|
-
|
|
2688
|
+
const ki = 1e3 / 60 * 3;
|
|
2689
|
+
let de;
|
|
2690
|
+
function Ai() {
|
|
2691
|
+
G.x = window.scrollX, G.y = window.scrollY;
|
|
2549
2692
|
}
|
|
2550
|
-
const
|
|
2551
|
-
class
|
|
2693
|
+
const G = { x: 0, y: 0, scrollHandler: Ai, fixRequired: void 0 };
|
|
2694
|
+
class qi {
|
|
2552
2695
|
constructor(t = {}) {
|
|
2553
2696
|
this.config = { ...t }, this.effect = null, this._nextTick = null, this._nextTransitionTick = null, this._startTime = 0;
|
|
2554
2697
|
let n;
|
|
2555
|
-
this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() :
|
|
2698
|
+
this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() : pt(() => this.transition()) : n = this.config.noThrottle ? () => (this.tick(), null) : pt(() => {
|
|
2556
2699
|
this.tick();
|
|
2557
2700
|
}), this.config.rect = this.config.root ? {
|
|
2558
2701
|
width: this.config.root.offsetWidth,
|
|
@@ -2575,15 +2718,15 @@ class ui {
|
|
|
2575
2718
|
}, this._pointerEnter = () => {
|
|
2576
2719
|
this.progress.active = !0, this._nextTick = n();
|
|
2577
2720
|
}, this.config.root) {
|
|
2578
|
-
|
|
2579
|
-
const i =
|
|
2580
|
-
typeof
|
|
2721
|
+
de = typeof de == "boolean" ? de : $i();
|
|
2722
|
+
const i = de ? window.devicePixelRatio : 1;
|
|
2723
|
+
typeof G.fixRequired > "u" && bi(G), this._measure = (o) => {
|
|
2581
2724
|
if (o.target !== this.config.root) {
|
|
2582
2725
|
const r = new PointerEvent("pointermove", {
|
|
2583
2726
|
bubbles: !0,
|
|
2584
2727
|
cancelable: !0,
|
|
2585
|
-
clientX: o.x * i +
|
|
2586
|
-
clientY: o.y * i +
|
|
2728
|
+
clientX: o.x * i + G.x,
|
|
2729
|
+
clientY: o.y * i + G.y
|
|
2587
2730
|
});
|
|
2588
2731
|
o.stopPropagation(), this.config.root.dispatchEvent(r);
|
|
2589
2732
|
} else
|
|
@@ -2619,8 +2762,8 @@ class ui {
|
|
|
2619
2762
|
const t = this.config.transitionDuration, n = this.config.transitionEasing || ((r) => r), s = performance.now();
|
|
2620
2763
|
let i = !1;
|
|
2621
2764
|
const o = (r) => {
|
|
2622
|
-
const
|
|
2623
|
-
i && (this.progress.vx = 0, this.progress.vy = 0, i = !1), this.currentProgress = Object.entries(this.progress).reduce((
|
|
2765
|
+
const a = (r - this._startTime) / t, l = n(Math.min(1, a));
|
|
2766
|
+
i && (this.progress.vx = 0, this.progress.vy = 0, i = !1), this.currentProgress = Object.entries(this.progress).reduce((u, [c, f]) => (c === "active" ? u[c] = f : u[c] = this.previousProgress[c] + (f - this.previousProgress[c]) * l, u), this.currentProgress || {}), a < 1 && (this._nextTransitionTick = requestAnimationFrame(o), i = r - this._startTime > ki), this.effect.tick(this.currentProgress);
|
|
2624
2767
|
};
|
|
2625
2768
|
return this._startTime ? (this._nextTransitionTick && cancelAnimationFrame(this._nextTransitionTick), Object.assign(this.previousProgress, this.currentProgress), this._startTime = s, o(s)) : this._startTime = s, this._nextTransitionTick;
|
|
2626
2769
|
}
|
|
@@ -2649,7 +2792,7 @@ class ui {
|
|
|
2649
2792
|
* Reset registered effect.
|
|
2650
2793
|
*/
|
|
2651
2794
|
setupEffect() {
|
|
2652
|
-
this.removeEffect(), this.effect =
|
|
2795
|
+
this.removeEffect(), this.effect = Pi(this.config);
|
|
2653
2796
|
}
|
|
2654
2797
|
/**
|
|
2655
2798
|
* Remove registered effect.
|
|
@@ -2658,239 +2801,227 @@ class ui {
|
|
|
2658
2801
|
this.effect && this.effect.destroy(), this.effect = null;
|
|
2659
2802
|
}
|
|
2660
2803
|
}
|
|
2661
|
-
const
|
|
2662
|
-
let
|
|
2663
|
-
function
|
|
2664
|
-
|
|
2804
|
+
const He = /* @__PURE__ */ new WeakMap();
|
|
2805
|
+
let sn = () => ({});
|
|
2806
|
+
function Ri(e) {
|
|
2807
|
+
sn = e;
|
|
2665
2808
|
}
|
|
2666
|
-
function
|
|
2809
|
+
function Li(e) {
|
|
2667
2810
|
return !("keyframeEffect" in e || "customEffect" in e) || !e.transitionDuration ? {} : {
|
|
2668
2811
|
transitionDuration: e.transitionDuration,
|
|
2669
|
-
transitionEasing:
|
|
2812
|
+
transitionEasing: Xe(e.transitionEasing)
|
|
2670
2813
|
};
|
|
2671
2814
|
}
|
|
2672
|
-
function
|
|
2673
|
-
if (i
|
|
2674
|
-
const
|
|
2815
|
+
function Fi(e, t, n, s = {}, { selectorCondition: i }) {
|
|
2816
|
+
if (i && !t.matches(i)) return;
|
|
2817
|
+
const o = {
|
|
2675
2818
|
trigger: "pointer-move",
|
|
2676
2819
|
element: e,
|
|
2677
2820
|
axis: s.axis ?? "y"
|
|
2678
|
-
},
|
|
2679
|
-
if (
|
|
2680
|
-
const
|
|
2821
|
+
}, r = Rt(t, N(n), o);
|
|
2822
|
+
if (r) {
|
|
2823
|
+
const a = Array.isArray(r) ? r : [r], l = new qi({
|
|
2681
2824
|
root: s.hitArea === "self" ? e : void 0,
|
|
2682
|
-
scenes:
|
|
2683
|
-
...
|
|
2684
|
-
...
|
|
2685
|
-
}),
|
|
2686
|
-
|
|
2825
|
+
scenes: a,
|
|
2826
|
+
...sn(),
|
|
2827
|
+
...Li(n)
|
|
2828
|
+
}), c = { source: e, target: t, cleanup: () => {
|
|
2829
|
+
l.destroy();
|
|
2687
2830
|
} };
|
|
2688
|
-
q(
|
|
2689
|
-
|
|
2831
|
+
q(He, e, c), q(He, t, c), Promise.all(
|
|
2832
|
+
a.map((f) => f.ready || Promise.resolve())
|
|
2690
2833
|
).then(() => {
|
|
2691
|
-
|
|
2834
|
+
l.start();
|
|
2692
2835
|
});
|
|
2693
2836
|
}
|
|
2694
2837
|
}
|
|
2695
|
-
function
|
|
2696
|
-
|
|
2838
|
+
function xi(e) {
|
|
2839
|
+
ae(He, e);
|
|
2697
2840
|
}
|
|
2698
|
-
const
|
|
2699
|
-
add:
|
|
2700
|
-
remove:
|
|
2701
|
-
registerOptionsGetter:
|
|
2702
|
-
},
|
|
2703
|
-
function
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
animation: r,
|
|
2707
|
-
sourceAnimationOptions: c
|
|
2708
|
-
}) {
|
|
2709
|
-
const l = r || ie(
|
|
2710
|
-
t,
|
|
2711
|
-
x(n),
|
|
2712
|
-
void 0,
|
|
2713
|
-
i
|
|
2714
|
-
);
|
|
2715
|
-
if (!l)
|
|
2841
|
+
const Ni = {
|
|
2842
|
+
add: Fi,
|
|
2843
|
+
remove: xi,
|
|
2844
|
+
registerOptionsGetter: Ri
|
|
2845
|
+
}, Ge = /* @__PURE__ */ new WeakMap();
|
|
2846
|
+
function Di(e, t, n, s, { selectorCondition: i, animation: o, sourceAnimationOptions: r }) {
|
|
2847
|
+
const a = o || oe(t, N(n));
|
|
2848
|
+
if (!a)
|
|
2716
2849
|
return;
|
|
2717
|
-
const { effectId:
|
|
2718
|
-
if (
|
|
2719
|
-
const
|
|
2720
|
-
if (
|
|
2721
|
-
if (
|
|
2850
|
+
const { effectId: l } = s, u = (d) => {
|
|
2851
|
+
if (i && !t.matches(i)) return;
|
|
2852
|
+
const m = d.animationName, p = d.detail?.effectId, h = r ? qt(e, r) : null;
|
|
2853
|
+
if (h) {
|
|
2854
|
+
if (h.playState === "running" || m && !h.hasAnimationName(m))
|
|
2722
2855
|
return;
|
|
2723
|
-
if (
|
|
2856
|
+
if (p && p !== l && !h.hasAnimationId(p))
|
|
2724
2857
|
return;
|
|
2725
2858
|
}
|
|
2726
|
-
|
|
2727
|
-
},
|
|
2728
|
-
|
|
2859
|
+
a.play();
|
|
2860
|
+
}, f = { source: e, target: t, cleanup: () => {
|
|
2861
|
+
a.cancel(), e.removeEventListener("animationend", u);
|
|
2729
2862
|
} };
|
|
2730
|
-
q(
|
|
2863
|
+
q(Ge, e, f), q(Ge, t, f), e.addEventListener("animationend", u);
|
|
2731
2864
|
}
|
|
2732
|
-
function
|
|
2733
|
-
|
|
2865
|
+
function ji(e) {
|
|
2866
|
+
ae(Ge, e);
|
|
2734
2867
|
}
|
|
2735
|
-
const
|
|
2736
|
-
add:
|
|
2737
|
-
remove:
|
|
2868
|
+
const zi = {
|
|
2869
|
+
add: Di,
|
|
2870
|
+
remove: ji
|
|
2738
2871
|
};
|
|
2739
|
-
function
|
|
2740
|
-
const
|
|
2741
|
-
|
|
2742
|
-
x(t),
|
|
2743
|
-
void 0,
|
|
2744
|
-
n
|
|
2745
|
-
);
|
|
2746
|
-
if (!r)
|
|
2872
|
+
function Hi(e, t, n, s, i) {
|
|
2873
|
+
const o = i || oe(e, N(t));
|
|
2874
|
+
if (!o)
|
|
2747
2875
|
return null;
|
|
2748
|
-
let
|
|
2749
|
-
const
|
|
2750
|
-
return
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
if (
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2876
|
+
let r = !0;
|
|
2877
|
+
const a = t.triggerType || "alternate";
|
|
2878
|
+
return {
|
|
2879
|
+
handler: (u) => {
|
|
2880
|
+
if (n && !e.matches(n)) return;
|
|
2881
|
+
const c = !s, f = s?.enter?.includes(u.type), d = s?.leave?.includes(u.type);
|
|
2882
|
+
if (f || c) {
|
|
2883
|
+
if (a === "alternate" || a === "state")
|
|
2884
|
+
r ? (r = !1, o.play()) : a === "alternate" ? o.reverse() : a === "state" && (o.playState === "running" ? o.pause() : o.playState !== "finished" && o.play());
|
|
2885
|
+
else {
|
|
2886
|
+
if (o.progress(0), delete e.dataset.interactEnter, o.isCSS) {
|
|
2887
|
+
const m = () => {
|
|
2888
|
+
_.mutate(() => {
|
|
2889
|
+
e.dataset.interactEnter = "done";
|
|
2890
|
+
});
|
|
2891
|
+
};
|
|
2892
|
+
o.onFinish(m), o.onAbort(m);
|
|
2893
|
+
}
|
|
2894
|
+
o.play();
|
|
2764
2895
|
}
|
|
2765
|
-
|
|
2896
|
+
return;
|
|
2766
2897
|
}
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2898
|
+
d && (a === "alternate" ? o.reverse() : a === "repeat" ? (o.cancel(), _.mutate(() => {
|
|
2899
|
+
delete e.dataset.interactEnter;
|
|
2900
|
+
})) : a === "state" && o.playState === "running" && o.pause());
|
|
2901
|
+
},
|
|
2902
|
+
cleanup: () => o.cancel()
|
|
2772
2903
|
};
|
|
2773
2904
|
}
|
|
2774
|
-
function
|
|
2905
|
+
function Gi(e, t, {
|
|
2775
2906
|
effectId: n,
|
|
2776
2907
|
listContainer: s,
|
|
2777
2908
|
listItemSelector: i,
|
|
2778
2909
|
stateAction: o
|
|
2779
|
-
}, r,
|
|
2780
|
-
const l = !!s,
|
|
2781
|
-
return (
|
|
2910
|
+
}, r, a) {
|
|
2911
|
+
const l = !!s, u = o ?? "toggle", c = u === "toggle";
|
|
2912
|
+
return (f) => {
|
|
2782
2913
|
if (r && !e.matches(r)) return;
|
|
2783
2914
|
const d = l ? e.closest(
|
|
2784
2915
|
`${s} > ${i || ""}:has(:scope)`
|
|
2785
|
-
) : void 0,
|
|
2786
|
-
|
|
2916
|
+
) : void 0, m = !a, p = a?.enter?.includes(f.type), h = a?.leave?.includes(f.type);
|
|
2917
|
+
m ? t.toggleEffect(n, u, d) : (p && t.toggleEffect(n, c ? "add" : u, d), h && c && t.toggleEffect(n, "remove", d));
|
|
2787
2918
|
};
|
|
2788
2919
|
}
|
|
2789
|
-
const
|
|
2790
|
-
function
|
|
2920
|
+
const We = /* @__PURE__ */ new WeakMap();
|
|
2921
|
+
function gt(e, t) {
|
|
2791
2922
|
return (n) => {
|
|
2792
2923
|
const s = n;
|
|
2793
2924
|
e.contains(s.relatedTarget) || t(s);
|
|
2794
2925
|
};
|
|
2795
2926
|
}
|
|
2796
|
-
function
|
|
2927
|
+
function Wi(e) {
|
|
2797
2928
|
return (t) => {
|
|
2798
2929
|
const n = t;
|
|
2799
2930
|
(n.pointerType || n.detail > 0) && e(n);
|
|
2800
2931
|
};
|
|
2801
2932
|
}
|
|
2802
|
-
function
|
|
2933
|
+
function Vi(e) {
|
|
2803
2934
|
return (t) => {
|
|
2804
2935
|
const n = t;
|
|
2805
2936
|
n.code === "Space" ? (n.preventDefault(), e(n)) : n.code === "Enter" && e(n);
|
|
2806
2937
|
};
|
|
2807
2938
|
}
|
|
2808
|
-
const
|
|
2809
|
-
focusin: (e, t) =>
|
|
2810
|
-
focusout: (e, t) =>
|
|
2811
|
-
click: (e, t) =>
|
|
2812
|
-
keydown: (e, t) =>
|
|
2939
|
+
const Bi = {
|
|
2940
|
+
focusin: (e, t) => gt(e, t),
|
|
2941
|
+
focusout: (e, t) => gt(e, t),
|
|
2942
|
+
click: (e, t) => Wi(t),
|
|
2943
|
+
keydown: (e, t) => Vi(t)
|
|
2813
2944
|
};
|
|
2814
|
-
function
|
|
2815
|
-
const s =
|
|
2945
|
+
function Yi(e, t, n) {
|
|
2946
|
+
const s = Bi[e];
|
|
2816
2947
|
return s ? s(t, n) : (i) => n(i);
|
|
2817
2948
|
}
|
|
2818
|
-
function
|
|
2949
|
+
function Ui(e) {
|
|
2819
2950
|
return typeof e == "object" && !Array.isArray(e) && ("enter" in e || "leave" in e);
|
|
2820
2951
|
}
|
|
2821
|
-
function
|
|
2952
|
+
function Ki(e) {
|
|
2822
2953
|
if (typeof e == "string")
|
|
2823
2954
|
return { toggle: [e] };
|
|
2824
2955
|
if (Array.isArray(e))
|
|
2825
2956
|
return { toggle: [...e] };
|
|
2826
|
-
if (
|
|
2957
|
+
if (Ui(e)) {
|
|
2827
2958
|
const t = e.enter ? [...e.enter] : [], n = e.leave ? [...e.leave] : [];
|
|
2828
2959
|
return { enter: t, leave: n };
|
|
2829
2960
|
}
|
|
2830
2961
|
return {};
|
|
2831
2962
|
}
|
|
2832
|
-
function
|
|
2963
|
+
function Xi(e) {
|
|
2833
2964
|
return !!(e.enter?.length || e.leave?.length);
|
|
2834
2965
|
}
|
|
2835
|
-
function
|
|
2836
|
-
return
|
|
2966
|
+
function Qi(e) {
|
|
2967
|
+
return Xi(e) ? { enter: e.enter ?? [], leave: e.leave ?? [] } : void 0;
|
|
2837
2968
|
}
|
|
2838
|
-
function
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2969
|
+
function Zi(e, t, n, s, { targetController: i, selectorCondition: o, animation: r }) {
|
|
2970
|
+
const a = Ki(s.eventConfig), l = n.transition || n.transitionProperties, u = Qi(a);
|
|
2971
|
+
let c, f, d = !1;
|
|
2972
|
+
if (l)
|
|
2973
|
+
c = Gi(
|
|
2974
|
+
t,
|
|
2975
|
+
i,
|
|
2976
|
+
n,
|
|
2977
|
+
o,
|
|
2978
|
+
u
|
|
2979
|
+
);
|
|
2980
|
+
else {
|
|
2981
|
+
const y = Hi(
|
|
2982
|
+
t,
|
|
2983
|
+
n,
|
|
2984
|
+
o,
|
|
2985
|
+
u,
|
|
2986
|
+
r
|
|
2987
|
+
);
|
|
2988
|
+
c = y?.handler ?? null, f = y?.cleanup, d = n.triggerType === "once";
|
|
2989
|
+
}
|
|
2990
|
+
if (!c)
|
|
2860
2991
|
return;
|
|
2861
|
-
const
|
|
2862
|
-
function
|
|
2863
|
-
const b =
|
|
2864
|
-
y.addEventListener(
|
|
2992
|
+
const m = c, p = new AbortController();
|
|
2993
|
+
function h(y, $, E) {
|
|
2994
|
+
const b = Yi($, e, m);
|
|
2995
|
+
y.addEventListener($, b, { ...E, signal: p.signal });
|
|
2865
2996
|
}
|
|
2866
|
-
const
|
|
2867
|
-
p.abort();
|
|
2997
|
+
const v = { source: e, target: t, cleanup: () => {
|
|
2998
|
+
p.abort(), f?.();
|
|
2868
2999
|
} };
|
|
2869
|
-
if (q(
|
|
2870
|
-
const y =
|
|
3000
|
+
if (q(We, e, v), q(We, t, v), u) {
|
|
3001
|
+
const y = a.enter, $ = a.leave;
|
|
2871
3002
|
y.forEach((S) => {
|
|
2872
|
-
S === "focusin" && (e.tabIndex = 0),
|
|
3003
|
+
S === "focusin" && (e.tabIndex = 0), h(e, S, { passive: !0, once: d });
|
|
2873
3004
|
});
|
|
2874
|
-
const
|
|
2875
|
-
(
|
|
3005
|
+
const E = !n.stateAction || n.stateAction === "toggle";
|
|
3006
|
+
(l ? E : n.triggerType !== "once") && $.forEach((S) => {
|
|
2876
3007
|
if (S === "focusout") {
|
|
2877
|
-
|
|
3008
|
+
h(e, S, { once: d });
|
|
2878
3009
|
return;
|
|
2879
3010
|
}
|
|
2880
|
-
|
|
3011
|
+
h(e, S, { passive: !0 });
|
|
2881
3012
|
});
|
|
2882
3013
|
} else
|
|
2883
|
-
(
|
|
2884
|
-
|
|
3014
|
+
(a.toggle ?? []).forEach(($) => {
|
|
3015
|
+
h(e, $, { once: d, passive: $ !== "keydown" });
|
|
2885
3016
|
});
|
|
2886
3017
|
}
|
|
2887
|
-
function
|
|
2888
|
-
|
|
3018
|
+
function Ji(e) {
|
|
3019
|
+
ae(We, e);
|
|
2889
3020
|
}
|
|
2890
|
-
const
|
|
2891
|
-
add:
|
|
2892
|
-
remove:
|
|
2893
|
-
},
|
|
3021
|
+
const Z = {
|
|
3022
|
+
add: Zi,
|
|
3023
|
+
remove: Ji
|
|
3024
|
+
}, Ve = {
|
|
2894
3025
|
click: ["click"],
|
|
2895
3026
|
activate: ["click", "keydown"],
|
|
2896
3027
|
hover: { enter: ["mouseenter"], leave: ["mouseleave"] },
|
|
@@ -2898,40 +3029,40 @@ const X = {
|
|
|
2898
3029
|
enter: ["mouseenter", "focusin"],
|
|
2899
3030
|
leave: ["mouseleave", "focusout"]
|
|
2900
3031
|
}
|
|
2901
|
-
},
|
|
2902
|
-
click:
|
|
2903
|
-
hover:
|
|
3032
|
+
}, vt = {
|
|
3033
|
+
click: Ve.activate,
|
|
3034
|
+
hover: Ve.interest
|
|
2904
3035
|
};
|
|
2905
|
-
function
|
|
2906
|
-
const t =
|
|
3036
|
+
function he(e) {
|
|
3037
|
+
const t = Ve[e];
|
|
2907
3038
|
return (n, s, i, o, r) => {
|
|
2908
|
-
const
|
|
2909
|
-
|
|
3039
|
+
const a = r?.allowA11yTriggers && e in vt ? vt[e] : t;
|
|
3040
|
+
Z.add(n, s, i, { eventConfig: a }, r ?? {});
|
|
2910
3041
|
};
|
|
2911
3042
|
}
|
|
2912
|
-
const
|
|
2913
|
-
viewEnter:
|
|
3043
|
+
const W = {
|
|
3044
|
+
viewEnter: Js,
|
|
2914
3045
|
hover: {
|
|
2915
|
-
add:
|
|
2916
|
-
remove:
|
|
3046
|
+
add: he("hover"),
|
|
3047
|
+
remove: Z.remove
|
|
2917
3048
|
},
|
|
2918
3049
|
click: {
|
|
2919
|
-
add:
|
|
2920
|
-
remove:
|
|
3050
|
+
add: he("click"),
|
|
3051
|
+
remove: Z.remove
|
|
2921
3052
|
},
|
|
2922
|
-
animationEnd:
|
|
2923
|
-
viewProgress:
|
|
2924
|
-
pointerMove:
|
|
3053
|
+
animationEnd: zi,
|
|
3054
|
+
viewProgress: Ei,
|
|
3055
|
+
pointerMove: Ni,
|
|
2925
3056
|
activate: {
|
|
2926
|
-
add:
|
|
2927
|
-
remove:
|
|
3057
|
+
add: he("activate"),
|
|
3058
|
+
remove: Z.remove
|
|
2928
3059
|
},
|
|
2929
3060
|
interest: {
|
|
2930
|
-
add:
|
|
2931
|
-
remove:
|
|
3061
|
+
add: he("interest"),
|
|
3062
|
+
remove: Z.remove
|
|
2932
3063
|
}
|
|
2933
3064
|
};
|
|
2934
|
-
function
|
|
3065
|
+
function eo(e) {
|
|
2935
3066
|
return e.replace(/\[[^\]]+]/g, "[]");
|
|
2936
3067
|
}
|
|
2937
3068
|
class w {
|
|
@@ -2942,6 +3073,7 @@ class w {
|
|
|
2942
3073
|
listInteractionsCache;
|
|
2943
3074
|
controllers;
|
|
2944
3075
|
static forceReducedMotion = !1;
|
|
3076
|
+
static reducedMotionPolicy = "collapse";
|
|
2945
3077
|
static allowA11yTriggers = !0;
|
|
2946
3078
|
static instances = [];
|
|
2947
3079
|
static controllerCache = /* @__PURE__ */ new Map();
|
|
@@ -2958,7 +3090,11 @@ class w {
|
|
|
2958
3090
|
if (typeof window > "u" || !window.customElements)
|
|
2959
3091
|
return;
|
|
2960
3092
|
const s = n?.useCustomElement ?? !!w.defineInteractElement;
|
|
2961
|
-
this.dataCache =
|
|
3093
|
+
this.dataCache = so(t, s, {
|
|
3094
|
+
configIndex: n?.configIndex,
|
|
3095
|
+
forceReducedMotion: n?.forceReducedMotion ?? w.forceReducedMotion,
|
|
3096
|
+
reducedMotionPolicy: n?.reducedMotionPolicy ?? w.reducedMotionPolicy
|
|
3097
|
+
});
|
|
2962
3098
|
const i = w.defineInteractElement?.();
|
|
2963
3099
|
s && i === !1 ? document.querySelectorAll("interact-element").forEach((o) => {
|
|
2964
3100
|
o.connect();
|
|
@@ -2984,7 +3120,7 @@ class w {
|
|
|
2984
3120
|
return !!this.get(t);
|
|
2985
3121
|
}
|
|
2986
3122
|
get(t) {
|
|
2987
|
-
const n =
|
|
3123
|
+
const n = eo(t);
|
|
2988
3124
|
return this.dataCache.interactions[n];
|
|
2989
3125
|
}
|
|
2990
3126
|
clearMediaQueryListenersForKey(t) {
|
|
@@ -2993,7 +3129,7 @@ class w {
|
|
|
2993
3129
|
}
|
|
2994
3130
|
clearInteractionStateForKey(t) {
|
|
2995
3131
|
(this.get(t)?.interactionIds || []).forEach((i) => {
|
|
2996
|
-
const o =
|
|
3132
|
+
const o = A(i, t);
|
|
2997
3133
|
delete this.addedInteractions[o];
|
|
2998
3134
|
});
|
|
2999
3135
|
const s = `${t}::seq::`;
|
|
@@ -3017,13 +3153,13 @@ class w {
|
|
|
3017
3153
|
}), w.instances.length = 0, w.controllerCache.clear(), w.sequenceCache.clear(), w.elementSequenceMap = /* @__PURE__ */ new WeakMap(), w._released.clear();
|
|
3018
3154
|
}
|
|
3019
3155
|
static setup(t) {
|
|
3020
|
-
t.scrollOptionsGetter &&
|
|
3156
|
+
t.scrollOptionsGetter && W.viewProgress.registerOptionsGetter?.(
|
|
3021
3157
|
t.scrollOptionsGetter
|
|
3022
|
-
), t.pointerOptionsGetter &&
|
|
3158
|
+
), t.pointerOptionsGetter && W.pointerMove.registerOptionsGetter?.(
|
|
3023
3159
|
t.pointerOptionsGetter
|
|
3024
|
-
), t.viewEnter &&
|
|
3160
|
+
), t.viewEnter && W.viewEnter.setOptions(
|
|
3025
3161
|
t.viewEnter
|
|
3026
|
-
), t.allowA11yTriggers !== void 0 && (w.allowA11yTriggers = t.allowA11yTriggers);
|
|
3162
|
+
), t.allowA11yTriggers !== void 0 && (w.allowA11yTriggers = t.allowA11yTriggers), t.forceReducedMotion !== void 0 && (w.forceReducedMotion = t.forceReducedMotion), t.reducedMotionPolicy !== void 0 && (w.reducedMotionPolicy = t.reducedMotionPolicy);
|
|
3027
3163
|
}
|
|
3028
3164
|
static getInstance(t) {
|
|
3029
3165
|
const n = w.instances.find((s) => s.has(t));
|
|
@@ -3039,8 +3175,8 @@ class w {
|
|
|
3039
3175
|
static deleteController(t) {
|
|
3040
3176
|
w.controllerCache.delete(t);
|
|
3041
3177
|
}
|
|
3042
|
-
static registerEffects =
|
|
3043
|
-
static getRegisteredEffect =
|
|
3178
|
+
static registerEffects = ts;
|
|
3179
|
+
static getRegisteredEffect = Qe;
|
|
3044
3180
|
/**
|
|
3045
3181
|
* Registers a plugin under a name. When the config carries a plugin field (e.g. `$splitText`) with a matching key
|
|
3046
3182
|
* (on an interaction or effect), Interact invokes the plugin with the field's value and a
|
|
@@ -3073,20 +3209,20 @@ class w {
|
|
|
3073
3209
|
static getPluginsNames() {
|
|
3074
3210
|
return new Set(w.plugins.keys());
|
|
3075
3211
|
}
|
|
3076
|
-
static getSequence(t, n, s
|
|
3077
|
-
const
|
|
3078
|
-
if (
|
|
3079
|
-
const
|
|
3080
|
-
return w.sequenceCache.set(t,
|
|
3081
|
-
}
|
|
3082
|
-
static addToSequence(t, n, s
|
|
3083
|
-
const
|
|
3084
|
-
if (!
|
|
3085
|
-
const
|
|
3086
|
-
index: s[
|
|
3087
|
-
group:
|
|
3212
|
+
static getSequence(t, n, s) {
|
|
3213
|
+
const i = w.sequenceCache.get(t);
|
|
3214
|
+
if (i) return i;
|
|
3215
|
+
const o = ls(n, s);
|
|
3216
|
+
return w.sequenceCache.set(t, o), w._registerSequenceElements(s, o), o;
|
|
3217
|
+
}
|
|
3218
|
+
static addToSequence(t, n, s) {
|
|
3219
|
+
const i = w.sequenceCache.get(t);
|
|
3220
|
+
if (!i) return !1;
|
|
3221
|
+
const r = Lt(n).map((a, l) => ({
|
|
3222
|
+
index: s[l] ?? i.animationGroups.length,
|
|
3223
|
+
group: a
|
|
3088
3224
|
}));
|
|
3089
|
-
return
|
|
3225
|
+
return i.addGroups(r), w._registerSequenceElements(n, i), !0;
|
|
3090
3226
|
}
|
|
3091
3227
|
static _registerSequenceElements(t, n) {
|
|
3092
3228
|
for (const { target: s } of t) {
|
|
@@ -3110,8 +3246,8 @@ class w {
|
|
|
3110
3246
|
}
|
|
3111
3247
|
}
|
|
3112
3248
|
}
|
|
3113
|
-
let
|
|
3114
|
-
function
|
|
3249
|
+
let to = 0;
|
|
3250
|
+
function V(e, {
|
|
3115
3251
|
asCombinator: t = !1,
|
|
3116
3252
|
addItemFilter: n = !1,
|
|
3117
3253
|
useFirstChild: s = !1
|
|
@@ -3123,10 +3259,10 @@ function W(e, {
|
|
|
3123
3259
|
return e.selector;
|
|
3124
3260
|
return s ? t ? "> :first-child" : ":scope > :first-child" : "";
|
|
3125
3261
|
}
|
|
3126
|
-
function
|
|
3262
|
+
function yt(e) {
|
|
3127
3263
|
return "sequenceId" in e && !("effects" in e);
|
|
3128
3264
|
}
|
|
3129
|
-
function
|
|
3265
|
+
function Re(e, t) {
|
|
3130
3266
|
return e[t] || (e[t] = {
|
|
3131
3267
|
triggers: [],
|
|
3132
3268
|
effects: {},
|
|
@@ -3135,7 +3271,7 @@ function Ae(e, t) {
|
|
|
3135
3271
|
selectors: /* @__PURE__ */ new Set()
|
|
3136
3272
|
}), e[t];
|
|
3137
3273
|
}
|
|
3138
|
-
function
|
|
3274
|
+
function no(e, t, n) {
|
|
3139
3275
|
const { effects: s = [] } = e;
|
|
3140
3276
|
return s.some((i, o) => n.has(t(o))) ? {
|
|
3141
3277
|
...e,
|
|
@@ -3145,107 +3281,109 @@ function Li(e, t, n) {
|
|
|
3145
3281
|
})
|
|
3146
3282
|
} : e;
|
|
3147
3283
|
}
|
|
3148
|
-
function
|
|
3149
|
-
const {
|
|
3150
|
-
return e.interactions?.forEach((
|
|
3151
|
-
const
|
|
3152
|
-
if (!
|
|
3153
|
-
console.error(`Interaction ${
|
|
3284
|
+
function so(e, t, n) {
|
|
3285
|
+
const { configIndex: s } = n, { effects: i = {}, sequences: o = {}, conditions: r = {} } = e, a = {}, l = e.interactions ? Qt(e, n) : /* @__PURE__ */ new Map();
|
|
3286
|
+
return e.interactions?.forEach((u, c) => {
|
|
3287
|
+
const f = u.key, d = ++to, { effects: m, sequences: p, ...h } = u;
|
|
3288
|
+
if (!f) {
|
|
3289
|
+
console.error(`Interaction ${d} is missing a key for source element.`);
|
|
3154
3290
|
return;
|
|
3155
3291
|
}
|
|
3156
|
-
|
|
3157
|
-
const
|
|
3158
|
-
|
|
3159
|
-
const
|
|
3160
|
-
if (
|
|
3161
|
-
const
|
|
3162
|
-
return
|
|
3292
|
+
Re(a, f);
|
|
3293
|
+
const g = m ? Array.from(m) : [];
|
|
3294
|
+
g.reverse();
|
|
3295
|
+
const v = p?.map((E, b) => {
|
|
3296
|
+
if (yt(E)) {
|
|
3297
|
+
const T = o[E.sequenceId];
|
|
3298
|
+
return T ? { ...T, ...E } : (console.warn(`Interact: Sequence "${E.sequenceId}" not found in config`), E);
|
|
3163
3299
|
}
|
|
3164
|
-
const
|
|
3165
|
-
return
|
|
3166
|
-
}),
|
|
3167
|
-
...
|
|
3168
|
-
effects:
|
|
3169
|
-
sequences:
|
|
3170
|
-
(
|
|
3171
|
-
|
|
3172
|
-
(
|
|
3173
|
-
|
|
3300
|
+
const S = E;
|
|
3301
|
+
return S.sequenceId || (S.sequenceId = J("seq", [c, b], s)), S;
|
|
3302
|
+
}), y = {
|
|
3303
|
+
...h,
|
|
3304
|
+
effects: g.length > 0 ? g : void 0,
|
|
3305
|
+
sequences: v?.map(
|
|
3306
|
+
(E, b) => no(
|
|
3307
|
+
E,
|
|
3308
|
+
(S) => Ee(c, S, b),
|
|
3309
|
+
l
|
|
3174
3310
|
)
|
|
3175
3311
|
)
|
|
3176
3312
|
};
|
|
3177
|
-
|
|
3178
|
-
|
|
3313
|
+
a[f].triggers.push(y), a[f].selectors.add(
|
|
3314
|
+
V(y, { useFirstChild: t })
|
|
3179
3315
|
);
|
|
3180
|
-
const
|
|
3181
|
-
|
|
3182
|
-
const
|
|
3183
|
-
let
|
|
3184
|
-
const I =
|
|
3185
|
-
|
|
3316
|
+
const $ = y.listContainer;
|
|
3317
|
+
g.forEach((E, b) => {
|
|
3318
|
+
const S = E.effectId ? i[E.effectId] : void 0;
|
|
3319
|
+
let T = E.key || S?.key;
|
|
3320
|
+
const I = g.length - 1 - b;
|
|
3321
|
+
E.effectId || (E.effectId = J(
|
|
3186
3322
|
"eff",
|
|
3187
|
-
[
|
|
3188
|
-
|
|
3323
|
+
[c, I],
|
|
3324
|
+
s
|
|
3189
3325
|
));
|
|
3190
|
-
const
|
|
3191
|
-
if (
|
|
3326
|
+
const P = l.get(Ee(c, I));
|
|
3327
|
+
if (P && (E.suffix = P), T = T || f, E.key = T, $ && E.listContainer && (T !== f || E.listContainer !== $))
|
|
3192
3328
|
return;
|
|
3193
|
-
const
|
|
3194
|
-
if (
|
|
3329
|
+
const k = B({ ...S, ...E, key: T }), O = `${f}::${k}::${d}`;
|
|
3330
|
+
if (E.interactionId = O, a[f].interactionIds.add(O), T === f)
|
|
3195
3331
|
return;
|
|
3196
|
-
const C =
|
|
3197
|
-
C.effects[
|
|
3198
|
-
}),
|
|
3199
|
-
if (!
|
|
3200
|
-
const
|
|
3201
|
-
|
|
3202
|
-
I.effectId || (I.effectId = `eff-${
|
|
3203
|
-
let
|
|
3204
|
-
if (!
|
|
3205
|
-
const C =
|
|
3206
|
-
C && (
|
|
3332
|
+
const C = Re(a, T);
|
|
3333
|
+
C.effects[O] || (C.effects[O] = [], C.interactionIds.add(O)), C.effects[O].push({ ...h, effect: E }), C.selectors.add(V(E, { useFirstChild: t }));
|
|
3334
|
+
}), v?.forEach((E) => {
|
|
3335
|
+
if (!E || yt(E)) return;
|
|
3336
|
+
const b = E, S = b.sequenceId;
|
|
3337
|
+
b.effects.forEach((I, P) => {
|
|
3338
|
+
I.effectId || (I.effectId = `eff-${S}-${P}`);
|
|
3339
|
+
let k = I.key;
|
|
3340
|
+
if (!k && I.effectId) {
|
|
3341
|
+
const C = i[I.effectId];
|
|
3342
|
+
C && (k = C.key);
|
|
3207
3343
|
}
|
|
3208
|
-
|
|
3209
|
-
const
|
|
3210
|
-
if (
|
|
3211
|
-
const C =
|
|
3212
|
-
C.sequences[
|
|
3213
|
-
...
|
|
3214
|
-
sequence:
|
|
3215
|
-
}), C.selectors.add(
|
|
3344
|
+
k = k || f;
|
|
3345
|
+
const O = V(I, { useFirstChild: t });
|
|
3346
|
+
if (O && a[f].selectors.add(O), k !== f) {
|
|
3347
|
+
const C = Re(a, k), M = `${k}::seq::${S}::${d}`;
|
|
3348
|
+
C.sequences[M] || (C.sequences[M] = [], C.interactionIds.add(M)), C.sequences[M].push({
|
|
3349
|
+
...h,
|
|
3350
|
+
sequence: b
|
|
3351
|
+
}), C.selectors.add(O);
|
|
3216
3352
|
}
|
|
3217
3353
|
});
|
|
3218
3354
|
});
|
|
3219
3355
|
}), {
|
|
3220
|
-
effects:
|
|
3221
|
-
sequences:
|
|
3222
|
-
conditions:
|
|
3223
|
-
|
|
3356
|
+
effects: i,
|
|
3357
|
+
sequences: o,
|
|
3358
|
+
conditions: jt(r),
|
|
3359
|
+
reducedMotionPolicy: n.reducedMotionPolicy,
|
|
3360
|
+
forceReducedMotion: n.forceReducedMotion,
|
|
3361
|
+
interactions: a
|
|
3224
3362
|
};
|
|
3225
3363
|
}
|
|
3226
|
-
function
|
|
3364
|
+
function Me(e, t, n, s, i) {
|
|
3227
3365
|
const o = w.getPluginsNames();
|
|
3228
3366
|
for (const r of o) {
|
|
3229
|
-
const
|
|
3230
|
-
if (!(
|
|
3367
|
+
const a = `${Ke}${r}`;
|
|
3368
|
+
if (!(a in n))
|
|
3231
3369
|
continue;
|
|
3232
|
-
const l = n[
|
|
3370
|
+
const l = n[a];
|
|
3233
3371
|
if (l !== null && typeof l == "object") {
|
|
3234
3372
|
if (e._appliedPlugins.has(l))
|
|
3235
3373
|
continue;
|
|
3236
3374
|
e._appliedPlugins.add(l);
|
|
3237
3375
|
}
|
|
3238
|
-
const
|
|
3239
|
-
typeof
|
|
3376
|
+
const c = w.getPlugin(r)(l, { root: t, key: s, scope: i, config: n });
|
|
3377
|
+
typeof c == "function" && e._pluginCleanups.push(c);
|
|
3240
3378
|
}
|
|
3241
3379
|
}
|
|
3242
|
-
function
|
|
3380
|
+
function z(e, t) {
|
|
3243
3381
|
for (const n of w.getPluginsNames())
|
|
3244
|
-
if (`${
|
|
3382
|
+
if (`${Ke}${n}` in t && !w._isPluginReleased(n, e))
|
|
3245
3383
|
return !0;
|
|
3246
3384
|
return !1;
|
|
3247
3385
|
}
|
|
3248
|
-
function
|
|
3386
|
+
function Se(e, t, n) {
|
|
3249
3387
|
if (e.listContainer) {
|
|
3250
3388
|
const s = t.querySelector(e.listContainer);
|
|
3251
3389
|
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}"`), []);
|
|
@@ -3261,173 +3399,209 @@ function $e(e, t, n) {
|
|
|
3261
3399
|
function be(e, t) {
|
|
3262
3400
|
return t.map((n) => e.selector ? n.querySelector(e.selector) : n).filter(Boolean);
|
|
3263
3401
|
}
|
|
3264
|
-
function
|
|
3402
|
+
function _e(e, t, n, s = {}) {
|
|
3403
|
+
const { effects: i, conditions: o, reducedMotionPolicy: r, forceReducedMotion: a } = t.dataCache, l = zt(
|
|
3404
|
+
e,
|
|
3405
|
+
Te(e.reducedMotionPolicy, s.policy, r),
|
|
3406
|
+
{ effects: i, force: a, collapsesStagger: s.collapsesStagger }
|
|
3407
|
+
);
|
|
3408
|
+
let u;
|
|
3409
|
+
return l.forEach((c, f) => {
|
|
3410
|
+
const d = F(c.conditions || [], o);
|
|
3411
|
+
d && t.setupMediaQueryListener(
|
|
3412
|
+
f ? `${n.id}::rm${f}` : n.id,
|
|
3413
|
+
d,
|
|
3414
|
+
n.key,
|
|
3415
|
+
n.onUpdate
|
|
3416
|
+
), !u && (!d || d.matches) && (u = c);
|
|
3417
|
+
}), u;
|
|
3418
|
+
}
|
|
3419
|
+
function on(e, t, n, s, i, o, r, a) {
|
|
3265
3420
|
return [
|
|
3266
|
-
r ? be(e, r) :
|
|
3267
|
-
|
|
3421
|
+
r ? be(e, r) : Se(e, n, s),
|
|
3422
|
+
a ? be(t, a) : Se(t, i, o)
|
|
3268
3423
|
];
|
|
3269
3424
|
}
|
|
3270
|
-
function
|
|
3271
|
-
const l = Array.isArray(s),
|
|
3272
|
-
l ? s.forEach((
|
|
3273
|
-
const d =
|
|
3274
|
-
d &&
|
|
3425
|
+
function rn(e, t, n, s, i, o, r, a) {
|
|
3426
|
+
const l = Array.isArray(s), u = Array.isArray(i);
|
|
3427
|
+
l ? s.forEach((c, f) => {
|
|
3428
|
+
const d = u ? i[f] : i;
|
|
3429
|
+
d && Et(
|
|
3275
3430
|
e,
|
|
3276
|
-
|
|
3431
|
+
c,
|
|
3277
3432
|
t.trigger,
|
|
3278
3433
|
d,
|
|
3279
3434
|
n,
|
|
3280
3435
|
t.params,
|
|
3281
3436
|
o,
|
|
3282
3437
|
r,
|
|
3283
|
-
|
|
3438
|
+
a
|
|
3284
3439
|
);
|
|
3285
|
-
}) : (
|
|
3286
|
-
|
|
3440
|
+
}) : (u ? i : [i]).forEach((f) => {
|
|
3441
|
+
Et(
|
|
3287
3442
|
e,
|
|
3288
3443
|
s,
|
|
3289
3444
|
t.trigger,
|
|
3290
|
-
|
|
3445
|
+
f,
|
|
3291
3446
|
n,
|
|
3292
3447
|
t.params,
|
|
3293
3448
|
o,
|
|
3294
3449
|
r,
|
|
3295
|
-
|
|
3450
|
+
a
|
|
3296
3451
|
);
|
|
3297
3452
|
});
|
|
3298
3453
|
}
|
|
3299
|
-
function
|
|
3454
|
+
function an(e, t, n, s, i) {
|
|
3300
3455
|
const o = {}, r = [];
|
|
3301
|
-
(s.effects || []).forEach((
|
|
3302
|
-
const
|
|
3303
|
-
...n.dataCache.effects[
|
|
3304
|
-
...
|
|
3305
|
-
effectId:
|
|
3306
|
-
},
|
|
3456
|
+
(s.effects || []).forEach((a, l) => {
|
|
3457
|
+
const u = a.effectId, c = {
|
|
3458
|
+
...n.dataCache.effects[u] || {},
|
|
3459
|
+
...a,
|
|
3460
|
+
effectId: u
|
|
3461
|
+
}, f = c.key, d = A(a.interactionId, e);
|
|
3307
3462
|
if (o[d] || n.addedInteractions[d] && !i)
|
|
3308
3463
|
return;
|
|
3309
|
-
const
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3464
|
+
const m = _e(
|
|
3465
|
+
c,
|
|
3466
|
+
n,
|
|
3467
|
+
{
|
|
3468
|
+
id: `${d}::${l}`,
|
|
3469
|
+
key: e,
|
|
3470
|
+
onUpdate: () => {
|
|
3471
|
+
t.update();
|
|
3472
|
+
}
|
|
3473
|
+
},
|
|
3474
|
+
{ policy: s.reducedMotionPolicy }
|
|
3475
|
+
);
|
|
3476
|
+
if (m) {
|
|
3313
3477
|
o[d] = !0;
|
|
3314
|
-
const p =
|
|
3315
|
-
let
|
|
3478
|
+
const p = f && A(f, e);
|
|
3479
|
+
let h;
|
|
3316
3480
|
if (p) {
|
|
3317
|
-
if (
|
|
3481
|
+
if (h = w.getController(p), !h)
|
|
3318
3482
|
return;
|
|
3319
|
-
|
|
3483
|
+
m.listContainer && h.watchChildList(m.listContainer);
|
|
3320
3484
|
} else
|
|
3321
|
-
|
|
3322
|
-
if (
|
|
3485
|
+
h = t;
|
|
3486
|
+
if (z(p || s.key, m))
|
|
3323
3487
|
return;
|
|
3324
|
-
|
|
3488
|
+
Me(
|
|
3489
|
+
h,
|
|
3490
|
+
h.element,
|
|
3325
3491
|
m,
|
|
3326
|
-
m.element,
|
|
3327
|
-
a,
|
|
3328
3492
|
p || s.key,
|
|
3329
3493
|
"effect"
|
|
3330
3494
|
);
|
|
3331
|
-
const [g,
|
|
3495
|
+
const [g, v] = on(
|
|
3332
3496
|
s,
|
|
3333
|
-
|
|
3497
|
+
m,
|
|
3334
3498
|
t.element,
|
|
3335
3499
|
t.useFirstChild,
|
|
3336
|
-
|
|
3337
|
-
|
|
3500
|
+
h.element,
|
|
3501
|
+
h.useFirstChild,
|
|
3338
3502
|
i
|
|
3339
3503
|
);
|
|
3340
|
-
if (!g || !
|
|
3504
|
+
if (!g || !v)
|
|
3341
3505
|
return;
|
|
3342
3506
|
n.addedInteractions[d] = !0;
|
|
3343
|
-
const y = p || s.key,
|
|
3344
|
-
|
|
3507
|
+
const y = p || s.key, $ = x(
|
|
3508
|
+
m.conditions || [],
|
|
3345
3509
|
n.dataCache.conditions
|
|
3346
3510
|
);
|
|
3347
3511
|
r.push([
|
|
3348
3512
|
y,
|
|
3349
3513
|
s,
|
|
3350
|
-
|
|
3514
|
+
m,
|
|
3351
3515
|
g,
|
|
3352
|
-
E,
|
|
3353
3516
|
v,
|
|
3354
|
-
|
|
3517
|
+
$,
|
|
3518
|
+
h.useFirstChild,
|
|
3355
3519
|
e
|
|
3356
3520
|
]);
|
|
3357
3521
|
}
|
|
3358
|
-
}), r.reverse().forEach((
|
|
3359
|
-
|
|
3360
|
-
}),
|
|
3522
|
+
}), r.reverse().forEach((a) => {
|
|
3523
|
+
rn(...a);
|
|
3524
|
+
}), oo(e, t, n, s, i);
|
|
3525
|
+
}
|
|
3526
|
+
function cn(e, t, n) {
|
|
3527
|
+
return Te(
|
|
3528
|
+
e.reducedMotionPolicy,
|
|
3529
|
+
t.reducedMotionPolicy,
|
|
3530
|
+
n.dataCache.reducedMotionPolicy
|
|
3531
|
+
);
|
|
3361
3532
|
}
|
|
3362
|
-
function
|
|
3533
|
+
function Be(e, t, n) {
|
|
3534
|
+
const { forceReducedMotion: s, conditions: i } = n.dataCache, o = F([Ie], i);
|
|
3535
|
+
return (s || !!(o && o.matches)) && cn(e, t, n) !== "ignore" ? { ...e, offset: 0 } : e;
|
|
3536
|
+
}
|
|
3537
|
+
function io(e) {
|
|
3363
3538
|
return "sequenceId" in e && !("effects" in e);
|
|
3364
3539
|
}
|
|
3365
|
-
function
|
|
3366
|
-
const
|
|
3367
|
-
if (
|
|
3368
|
-
const
|
|
3369
|
-
const
|
|
3370
|
-
return { ...
|
|
3540
|
+
function ln(e, t, n, s, i, o, r, a) {
|
|
3541
|
+
const l = F(e.conditions || [], o.dataCache.conditions);
|
|
3542
|
+
if (l && o.setupMediaQueryListener(n, l, r.updateKey, r.onUpdate), l && !l.matches) return null;
|
|
3543
|
+
const u = e.effects || [], c = (h) => {
|
|
3544
|
+
const g = h.effectId;
|
|
3545
|
+
return { ...g ? o.dataCache.effects[g] || {} : {}, ...h };
|
|
3371
3546
|
};
|
|
3372
|
-
if (
|
|
3373
|
-
const
|
|
3374
|
-
if (
|
|
3375
|
-
const
|
|
3376
|
-
return
|
|
3547
|
+
if (u.some((h) => {
|
|
3548
|
+
const g = c(h), v = F(g.conditions || [], o.dataCache.conditions);
|
|
3549
|
+
if (v && !v.matches) return !1;
|
|
3550
|
+
const y = g.key && A(g.key, s);
|
|
3551
|
+
return z(y || s, g);
|
|
3377
3552
|
}))
|
|
3378
3553
|
return null;
|
|
3379
|
-
const
|
|
3380
|
-
let
|
|
3381
|
-
for (const h of
|
|
3382
|
-
const
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
if (
|
|
3393
|
-
const
|
|
3394
|
-
let
|
|
3395
|
-
if (
|
|
3396
|
-
if (
|
|
3554
|
+
const d = [], m = cn(e, t, o);
|
|
3555
|
+
let p = !1;
|
|
3556
|
+
for (const h of u) {
|
|
3557
|
+
const g = h.effectId, v = _e(
|
|
3558
|
+
c(h),
|
|
3559
|
+
o,
|
|
3560
|
+
{
|
|
3561
|
+
id: `${n}::${g || "eff"}`,
|
|
3562
|
+
key: r.updateKey,
|
|
3563
|
+
onUpdate: r.onUpdate
|
|
3564
|
+
},
|
|
3565
|
+
{ policy: m, collapsesStagger: m !== "ignore" }
|
|
3566
|
+
);
|
|
3567
|
+
if (!v) continue;
|
|
3568
|
+
const y = v.key, $ = y && A(y, s);
|
|
3569
|
+
let E;
|
|
3570
|
+
if ($) {
|
|
3571
|
+
if (E = w.getController($), !E) return null;
|
|
3397
3572
|
} else
|
|
3398
|
-
|
|
3399
|
-
const
|
|
3400
|
-
|
|
3573
|
+
E = i;
|
|
3574
|
+
const b = $ || s;
|
|
3575
|
+
Me(
|
|
3576
|
+
E,
|
|
3577
|
+
E.element,
|
|
3401
3578
|
v,
|
|
3402
|
-
|
|
3403
|
-
m,
|
|
3404
|
-
$,
|
|
3579
|
+
b,
|
|
3405
3580
|
"effect"
|
|
3406
3581
|
);
|
|
3407
|
-
let
|
|
3408
|
-
if (
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
), !
|
|
3413
|
-
const
|
|
3414
|
-
|
|
3582
|
+
let S;
|
|
3583
|
+
if (a && b === a.controllerKey && v.listContainer === a.listContainer ? (S = be(v, a.elements), S.length > 0 && (p = !0)) : S = Se(
|
|
3584
|
+
v,
|
|
3585
|
+
E.element,
|
|
3586
|
+
E.useFirstChild
|
|
3587
|
+
), !S || Array.isArray(S) && S.length === 0) return null;
|
|
3588
|
+
const T = N(v);
|
|
3589
|
+
d.push({ target: S, options: T });
|
|
3415
3590
|
}
|
|
3416
|
-
return
|
|
3591
|
+
return a && !p ? null : d.length > 0 ? d : null;
|
|
3417
3592
|
}
|
|
3418
|
-
function
|
|
3419
|
-
const s = n ? be(e, n) :
|
|
3593
|
+
function Ye(e, t, n) {
|
|
3594
|
+
const s = n ? be(e, n) : Se(e, t.element, t.useFirstChild);
|
|
3420
3595
|
return Array.isArray(s) && s.length === 0 ? null : s;
|
|
3421
3596
|
}
|
|
3422
|
-
function
|
|
3597
|
+
function Ue(e, t, n, s, i) {
|
|
3423
3598
|
(Array.isArray(n) ? n : [n]).forEach((r) => {
|
|
3424
|
-
|
|
3599
|
+
W[e.trigger]?.add(
|
|
3425
3600
|
r,
|
|
3426
3601
|
r,
|
|
3427
3602
|
{ triggerType: t.triggerType },
|
|
3428
3603
|
e.params || {},
|
|
3429
3604
|
{
|
|
3430
|
-
reducedMotion: w.forceReducedMotion,
|
|
3431
3605
|
selectorCondition: i,
|
|
3432
3606
|
animation: s,
|
|
3433
3607
|
allowA11yTriggers: w.allowA11yTriggers
|
|
@@ -3435,19 +3609,19 @@ function ze(e, t, n, s, i) {
|
|
|
3435
3609
|
);
|
|
3436
3610
|
});
|
|
3437
3611
|
}
|
|
3438
|
-
function
|
|
3612
|
+
function un(e, t, n) {
|
|
3439
3613
|
const o = (e.useFirstChild ? e.element.firstElementChild : e.element)?.querySelector(t);
|
|
3440
|
-
if (!o) return n.map((
|
|
3614
|
+
if (!o) return n.map((a, l) => l);
|
|
3441
3615
|
const r = Array.from(o.children);
|
|
3442
|
-
return n.map((
|
|
3443
|
-
const l = r.indexOf(
|
|
3616
|
+
return n.map((a) => {
|
|
3617
|
+
const l = r.indexOf(a);
|
|
3444
3618
|
return l >= 0 ? l : r.length;
|
|
3445
3619
|
});
|
|
3446
3620
|
}
|
|
3447
|
-
function
|
|
3621
|
+
function oo(e, t, n, s, i) {
|
|
3448
3622
|
s.sequences?.forEach((o) => {
|
|
3449
3623
|
let r;
|
|
3450
|
-
if (
|
|
3624
|
+
if (io(o)) {
|
|
3451
3625
|
const p = n.dataCache.sequences[o.sequenceId];
|
|
3452
3626
|
if (!p) {
|
|
3453
3627
|
console.warn(`Interact: Sequence "${o.sequenceId}" not found in cache`);
|
|
@@ -3456,10 +3630,11 @@ function xi(e, t, n, s, i) {
|
|
|
3456
3630
|
r = { ...p, ...o };
|
|
3457
3631
|
} else
|
|
3458
3632
|
r = o;
|
|
3459
|
-
const
|
|
3633
|
+
const a = r.sequenceId || ne(), l = A(`${e}::seq::${a}`, e);
|
|
3460
3634
|
if (n.addedInteractions[l] && !i) return;
|
|
3461
|
-
const
|
|
3635
|
+
const u = i && s.listContainer ? { controllerKey: e, listContainer: s.listContainer, elements: i } : void 0, c = ln(
|
|
3462
3636
|
r,
|
|
3637
|
+
s,
|
|
3463
3638
|
l,
|
|
3464
3639
|
e,
|
|
3465
3640
|
t,
|
|
@@ -3468,69 +3643,72 @@ function xi(e, t, n, s, i) {
|
|
|
3468
3643
|
updateKey: e,
|
|
3469
3644
|
onUpdate: () => t.update()
|
|
3470
3645
|
},
|
|
3471
|
-
|
|
3646
|
+
u
|
|
3472
3647
|
);
|
|
3473
|
-
if (!
|
|
3648
|
+
if (!c) return;
|
|
3474
3649
|
if (i && n.addedInteractions[l]) {
|
|
3475
|
-
const p =
|
|
3650
|
+
const p = un(
|
|
3476
3651
|
t,
|
|
3477
3652
|
s.listContainer,
|
|
3478
3653
|
i
|
|
3479
3654
|
);
|
|
3480
|
-
w.addToSequence(l,
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3655
|
+
w.addToSequence(l, c, p);
|
|
3656
|
+
const h = w.getSequence(
|
|
3657
|
+
l,
|
|
3658
|
+
Be(r, s, n),
|
|
3659
|
+
c
|
|
3660
|
+
), g = x(
|
|
3486
3661
|
s.conditions || [],
|
|
3487
3662
|
n.dataCache.conditions
|
|
3488
|
-
),
|
|
3489
|
-
|
|
3663
|
+
), v = Ye(s, t, i);
|
|
3664
|
+
v && Ue(
|
|
3490
3665
|
s,
|
|
3491
3666
|
r,
|
|
3492
|
-
|
|
3493
|
-
|
|
3667
|
+
v,
|
|
3668
|
+
h,
|
|
3494
3669
|
g
|
|
3495
3670
|
);
|
|
3496
3671
|
return;
|
|
3497
3672
|
}
|
|
3498
|
-
const
|
|
3499
|
-
|
|
3500
|
-
|
|
3673
|
+
const f = w.getSequence(
|
|
3674
|
+
l,
|
|
3675
|
+
Be(r, s, n),
|
|
3676
|
+
c
|
|
3677
|
+
), d = x(
|
|
3501
3678
|
s.conditions || [],
|
|
3502
3679
|
n.dataCache.conditions
|
|
3503
|
-
),
|
|
3504
|
-
|
|
3680
|
+
), m = Ye(s, t, i);
|
|
3681
|
+
m && (n.addedInteractions[l] = !0, Ue(
|
|
3505
3682
|
s,
|
|
3506
3683
|
r,
|
|
3507
|
-
|
|
3508
|
-
|
|
3684
|
+
m,
|
|
3685
|
+
f,
|
|
3509
3686
|
d
|
|
3510
3687
|
));
|
|
3511
3688
|
});
|
|
3512
3689
|
}
|
|
3513
|
-
function
|
|
3690
|
+
function ro(e, t, n, s, i) {
|
|
3514
3691
|
const o = n.get(e)?.sequences || {};
|
|
3515
|
-
Object.keys(o).forEach((
|
|
3516
|
-
o[
|
|
3517
|
-
const
|
|
3518
|
-
|
|
3692
|
+
Object.keys(o).forEach((a) => {
|
|
3693
|
+
o[a].some(({ sequence: u, ...c }) => {
|
|
3694
|
+
const f = F(
|
|
3695
|
+
c.conditions || [],
|
|
3519
3696
|
n.dataCache.conditions
|
|
3520
3697
|
);
|
|
3521
|
-
if (
|
|
3698
|
+
if (f && !f.matches)
|
|
3522
3699
|
return !1;
|
|
3523
|
-
const d =
|
|
3524
|
-
if (!
|
|
3700
|
+
const d = c.key && A(c.key, e), m = w.getController(d);
|
|
3701
|
+
if (!m)
|
|
3525
3702
|
return !0;
|
|
3526
|
-
const p =
|
|
3527
|
-
if (n.addedInteractions[
|
|
3703
|
+
const p = u.sequenceId || ne(), h = A(`${d}::seq::${p}`, d);
|
|
3704
|
+
if (n.addedInteractions[h] && !i || z(d, c))
|
|
3528
3705
|
return !0;
|
|
3529
|
-
const
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
d,
|
|
3706
|
+
const v = ln(
|
|
3707
|
+
u,
|
|
3708
|
+
c,
|
|
3533
3709
|
h,
|
|
3710
|
+
d,
|
|
3711
|
+
m,
|
|
3534
3712
|
n,
|
|
3535
3713
|
{
|
|
3536
3714
|
updateKey: e,
|
|
@@ -3538,71 +3716,75 @@ function Ni(e, t, n, s, i) {
|
|
|
3538
3716
|
},
|
|
3539
3717
|
i && s ? { controllerKey: e, listContainer: s, elements: i } : void 0
|
|
3540
3718
|
);
|
|
3541
|
-
if (!
|
|
3542
|
-
if (i && n.addedInteractions[
|
|
3543
|
-
const b =
|
|
3544
|
-
return w.addToSequence(
|
|
3545
|
-
reducedMotion: w.forceReducedMotion
|
|
3546
|
-
}), !0;
|
|
3719
|
+
if (!v) return !0;
|
|
3720
|
+
if (i && n.addedInteractions[h]) {
|
|
3721
|
+
const b = un(t, s, i);
|
|
3722
|
+
return w.addToSequence(h, v, b), !0;
|
|
3547
3723
|
}
|
|
3548
|
-
const y = w.getSequence(
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3724
|
+
const y = w.getSequence(
|
|
3725
|
+
h,
|
|
3726
|
+
Be(u, c, n),
|
|
3727
|
+
v
|
|
3728
|
+
), $ = x(
|
|
3729
|
+
c.conditions || [],
|
|
3552
3730
|
n.dataCache.conditions
|
|
3553
|
-
),
|
|
3554
|
-
return
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3731
|
+
), E = Ye(c, m);
|
|
3732
|
+
return E && (n.addedInteractions[h] = !0, Ue(
|
|
3733
|
+
c,
|
|
3734
|
+
u,
|
|
3735
|
+
E,
|
|
3558
3736
|
y,
|
|
3559
|
-
|
|
3737
|
+
$
|
|
3560
3738
|
)), !0;
|
|
3561
3739
|
});
|
|
3562
3740
|
});
|
|
3563
3741
|
}
|
|
3564
|
-
function
|
|
3565
|
-
const o = n.get(e), r = o?.effects || {},
|
|
3566
|
-
|
|
3567
|
-
const
|
|
3568
|
-
if (n.addedInteractions[
|
|
3742
|
+
function fn(e, t, n, s, i) {
|
|
3743
|
+
const o = n.get(e), r = o?.effects || {}, a = Object.keys(r), l = [];
|
|
3744
|
+
a.forEach((c) => {
|
|
3745
|
+
const f = A(c, e);
|
|
3746
|
+
if (n.addedInteractions[f] && !i)
|
|
3569
3747
|
return;
|
|
3570
|
-
r[
|
|
3571
|
-
const g =
|
|
3748
|
+
r[c].some(({ effect: m, ...p }, h) => {
|
|
3749
|
+
const g = F(
|
|
3572
3750
|
p.conditions || [],
|
|
3573
3751
|
n.dataCache.conditions
|
|
3574
3752
|
);
|
|
3575
3753
|
if (g && !g.matches)
|
|
3576
3754
|
return !1;
|
|
3577
|
-
const
|
|
3578
|
-
...n.dataCache.effects[
|
|
3579
|
-
...
|
|
3580
|
-
effectId:
|
|
3755
|
+
const v = m.effectId, y = {
|
|
3756
|
+
...n.dataCache.effects[v] || {},
|
|
3757
|
+
...m,
|
|
3758
|
+
effectId: v
|
|
3581
3759
|
};
|
|
3582
3760
|
if (s && y.listContainer !== s)
|
|
3583
3761
|
return !1;
|
|
3584
|
-
const
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3762
|
+
const $ = _e(
|
|
3763
|
+
y,
|
|
3764
|
+
n,
|
|
3765
|
+
{
|
|
3766
|
+
id: `${f}::${h}`,
|
|
3767
|
+
key: e,
|
|
3768
|
+
onUpdate: () => {
|
|
3769
|
+
t.update();
|
|
3770
|
+
}
|
|
3771
|
+
},
|
|
3772
|
+
{ policy: p.reducedMotionPolicy }
|
|
3773
|
+
);
|
|
3774
|
+
if ($) {
|
|
3775
|
+
const E = p.key && A(p.key, e), b = w.getController(E);
|
|
3776
|
+
if (!b || z(E, p) || z(e, $))
|
|
3595
3777
|
return !0;
|
|
3596
|
-
|
|
3778
|
+
Me(
|
|
3597
3779
|
t,
|
|
3598
3780
|
t.element,
|
|
3599
|
-
|
|
3781
|
+
$,
|
|
3600
3782
|
e,
|
|
3601
3783
|
"effect"
|
|
3602
|
-
),
|
|
3603
|
-
const [S,
|
|
3784
|
+
), $.listContainer && t.watchChildList($.listContainer);
|
|
3785
|
+
const [S, T] = on(
|
|
3604
3786
|
p,
|
|
3605
|
-
|
|
3787
|
+
$,
|
|
3606
3788
|
b.element,
|
|
3607
3789
|
b.useFirstChild,
|
|
3608
3790
|
t.element,
|
|
@@ -3610,125 +3792,130 @@ function Ut(e, t, n, s, i) {
|
|
|
3610
3792
|
void 0,
|
|
3611
3793
|
i
|
|
3612
3794
|
);
|
|
3613
|
-
if (!S || !
|
|
3795
|
+
if (!S || !T)
|
|
3614
3796
|
return !0;
|
|
3615
|
-
n.addedInteractions[
|
|
3616
|
-
const
|
|
3617
|
-
|
|
3797
|
+
n.addedInteractions[f] = !0;
|
|
3798
|
+
const I = x(
|
|
3799
|
+
$.conditions || [],
|
|
3618
3800
|
n.dataCache.conditions
|
|
3619
3801
|
);
|
|
3620
3802
|
return l.push([
|
|
3621
3803
|
e,
|
|
3622
3804
|
p,
|
|
3623
|
-
|
|
3805
|
+
$,
|
|
3624
3806
|
S,
|
|
3807
|
+
T,
|
|
3625
3808
|
I,
|
|
3626
|
-
O,
|
|
3627
3809
|
t.useFirstChild,
|
|
3628
|
-
|
|
3810
|
+
E || void 0
|
|
3629
3811
|
]), !0;
|
|
3630
3812
|
}
|
|
3631
3813
|
return !1;
|
|
3632
3814
|
});
|
|
3633
|
-
}), l.reverse().forEach((
|
|
3634
|
-
|
|
3635
|
-
}),
|
|
3636
|
-
const
|
|
3637
|
-
return
|
|
3815
|
+
}), l.reverse().forEach((c) => {
|
|
3816
|
+
rn(...c);
|
|
3817
|
+
}), ro(e, t, n, s, i);
|
|
3818
|
+
const u = Object.keys(o?.sequences || {}).length > 0;
|
|
3819
|
+
return a.length > 0 || u;
|
|
3638
3820
|
}
|
|
3639
|
-
function
|
|
3640
|
-
let
|
|
3641
|
-
if (i
|
|
3642
|
-
const
|
|
3821
|
+
function Et(e, t, n, s, i, o, r, a, l) {
|
|
3822
|
+
let u;
|
|
3823
|
+
if (Ft(i)) {
|
|
3824
|
+
const f = {
|
|
3643
3825
|
key: e,
|
|
3644
3826
|
effectId: i.effectId,
|
|
3645
3827
|
transition: i.transition,
|
|
3646
3828
|
transitionProperties: i.transitionProperties,
|
|
3647
|
-
childSelector:
|
|
3829
|
+
childSelector: V(i, {
|
|
3648
3830
|
asCombinator: !0,
|
|
3649
3831
|
addItemFilter: !0,
|
|
3650
|
-
useFirstChild:
|
|
3832
|
+
useFirstChild: a
|
|
3651
3833
|
}),
|
|
3652
3834
|
selectorCondition: r
|
|
3653
3835
|
};
|
|
3654
|
-
if (
|
|
3836
|
+
if (u = w.getController(e), !u)
|
|
3655
3837
|
return;
|
|
3656
|
-
|
|
3838
|
+
u.renderStyle(hs(f));
|
|
3657
3839
|
}
|
|
3658
|
-
let
|
|
3840
|
+
let c;
|
|
3659
3841
|
if (n === "animationEnd") {
|
|
3660
|
-
const
|
|
3661
|
-
|
|
3842
|
+
const f = o.effectId, d = l ? w.getInstance(l) : void 0, m = d?.dataCache.effects[f], p = m && _e(m, d, {
|
|
3843
|
+
id: `${l}::animationEnd::${f}`,
|
|
3844
|
+
key: l,
|
|
3845
|
+
onUpdate: () => {
|
|
3846
|
+
w.getController(l)?.update();
|
|
3847
|
+
}
|
|
3848
|
+
});
|
|
3849
|
+
p && (c = N(p));
|
|
3662
3850
|
}
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
targetController: f,
|
|
3851
|
+
W[n]?.add(t, s, i, o, {
|
|
3852
|
+
targetController: u,
|
|
3666
3853
|
selectorCondition: r,
|
|
3667
3854
|
allowA11yTriggers: w.allowA11yTriggers,
|
|
3668
|
-
sourceAnimationOptions:
|
|
3855
|
+
sourceAnimationOptions: c
|
|
3669
3856
|
});
|
|
3670
3857
|
}
|
|
3671
|
-
function
|
|
3858
|
+
function wt(e) {
|
|
3672
3859
|
const t = e.key, n = w.getInstance(t);
|
|
3673
3860
|
if (!n)
|
|
3674
3861
|
return console.warn(`No instance found for key: ${t}`), w.setController(t, e), !1;
|
|
3675
3862
|
const { triggers: s = [] } = n?.get(t) || {}, i = s.length > 0;
|
|
3676
|
-
n.setController(t, e), s.forEach((r,
|
|
3677
|
-
const l =
|
|
3863
|
+
n.setController(t, e), s.forEach((r, a) => {
|
|
3864
|
+
const l = F(r.conditions, n.dataCache.conditions);
|
|
3678
3865
|
if (l) {
|
|
3679
|
-
const
|
|
3680
|
-
n.setupMediaQueryListener(
|
|
3866
|
+
const u = `${t}::trigger::${a}`;
|
|
3867
|
+
n.setupMediaQueryListener(u, l, t, () => {
|
|
3681
3868
|
e.update();
|
|
3682
3869
|
});
|
|
3683
3870
|
}
|
|
3684
3871
|
if (!l || l.matches) {
|
|
3685
|
-
if (
|
|
3872
|
+
if (z(t, r))
|
|
3686
3873
|
return;
|
|
3687
|
-
|
|
3874
|
+
Me(e, e.element, r, t, "interaction"), r.listContainer && e.watchChildList(r.listContainer), an(t, e, n, r);
|
|
3688
3875
|
}
|
|
3689
3876
|
});
|
|
3690
3877
|
let o = !1;
|
|
3691
|
-
return n && (o =
|
|
3878
|
+
return n && (o = fn(t, e, n)), i || o;
|
|
3692
3879
|
}
|
|
3693
|
-
function
|
|
3880
|
+
function ao(e, t, n) {
|
|
3694
3881
|
const s = e.key, i = w.getInstance(s);
|
|
3695
3882
|
if (i) {
|
|
3696
3883
|
const { triggers: o = [] } = i?.get(s) || {};
|
|
3697
|
-
o.forEach((r,
|
|
3884
|
+
o.forEach((r, a) => {
|
|
3698
3885
|
if (r.listContainer !== t)
|
|
3699
3886
|
return;
|
|
3700
|
-
const l =
|
|
3887
|
+
const l = F(r.conditions, i.dataCache.conditions);
|
|
3701
3888
|
if (l) {
|
|
3702
|
-
const
|
|
3703
|
-
i.setupMediaQueryListener(
|
|
3889
|
+
const u = `${s}::listTrigger::${t}::${a}`;
|
|
3890
|
+
i.setupMediaQueryListener(u, l, s, () => {
|
|
3704
3891
|
e.update();
|
|
3705
3892
|
});
|
|
3706
3893
|
}
|
|
3707
3894
|
if (!l || l.matches) {
|
|
3708
|
-
if (
|
|
3895
|
+
if (z(s, r))
|
|
3709
3896
|
return;
|
|
3710
|
-
|
|
3897
|
+
an(s, e, i, r, n);
|
|
3711
3898
|
}
|
|
3712
|
-
}),
|
|
3899
|
+
}), fn(s, e, i, t, n);
|
|
3713
3900
|
}
|
|
3714
3901
|
}
|
|
3715
|
-
function
|
|
3902
|
+
function co(e, t = !1) {
|
|
3716
3903
|
const n = e.key, s = w.getInstance(n);
|
|
3717
3904
|
if (!s)
|
|
3718
3905
|
return;
|
|
3719
3906
|
const i = [...s.get(n)?.selectors.values() || []].filter(Boolean).join(",");
|
|
3720
3907
|
let o;
|
|
3721
|
-
i ? (o = [...e.element.querySelectorAll(i)], e.useFirstChild || o.push(e.element)) : o = [e.element],
|
|
3908
|
+
i ? (o = [...e.element.querySelectorAll(i)], e.useFirstChild || o.push(e.element)) : o = [e.element], dn(o), s.deleteController(n, t);
|
|
3722
3909
|
}
|
|
3723
|
-
function
|
|
3724
|
-
const t = Object.values(
|
|
3910
|
+
function dn(e) {
|
|
3911
|
+
const t = Object.values(W);
|
|
3725
3912
|
for (const n of e)
|
|
3726
3913
|
for (const s of t)
|
|
3727
3914
|
s.remove(n);
|
|
3728
3915
|
w.removeFromSequences(e);
|
|
3729
3916
|
}
|
|
3730
|
-
const
|
|
3731
|
-
class
|
|
3917
|
+
const Le = "interactEffect";
|
|
3918
|
+
class lo {
|
|
3732
3919
|
element;
|
|
3733
3920
|
key;
|
|
3734
3921
|
connected;
|
|
@@ -3750,10 +3937,10 @@ class zi {
|
|
|
3750
3937
|
}
|
|
3751
3938
|
n !== t && (n && console.warn(
|
|
3752
3939
|
`Interact: Key mismatch between element ${n} and parameter ${t}, updating element key`
|
|
3753
|
-
), this.element.dataset.interactKey = t), this.key = t, this.connected =
|
|
3940
|
+
), this.element.dataset.interactKey = t), this.key = t, this.connected = wt(this);
|
|
3754
3941
|
}
|
|
3755
3942
|
disconnect({ removeFromCache: t = !1 } = {}) {
|
|
3756
|
-
if ((this.key || this.element.dataset.interactKey) &&
|
|
3943
|
+
if ((this.key || this.element.dataset.interactKey) && co(this, t), this._pluginCleanups.length) {
|
|
3757
3944
|
for (const s of this._pluginCleanups)
|
|
3758
3945
|
try {
|
|
3759
3946
|
s();
|
|
@@ -3774,7 +3961,7 @@ class zi {
|
|
|
3774
3961
|
this.disconnect(), this.connect();
|
|
3775
3962
|
}
|
|
3776
3963
|
resume() {
|
|
3777
|
-
this.connected &&
|
|
3964
|
+
this.connected && wt(this);
|
|
3778
3965
|
}
|
|
3779
3966
|
renderStyle(t) {
|
|
3780
3967
|
const n = this.element?.getRootNode(), s = n.host ? n : document;
|
|
@@ -3799,12 +3986,12 @@ class zi {
|
|
|
3799
3986
|
return;
|
|
3800
3987
|
}
|
|
3801
3988
|
const o = new Set(
|
|
3802
|
-
this.element.dataset[
|
|
3989
|
+
this.element.dataset[Le]?.split(" ") || []
|
|
3803
3990
|
);
|
|
3804
|
-
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[
|
|
3991
|
+
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[Le] = Array.from(o).join(" ");
|
|
3805
3992
|
}
|
|
3806
3993
|
getActiveEffects() {
|
|
3807
|
-
const n = (this.element.dataset[
|
|
3994
|
+
const n = (this.element.dataset[Le] || "").trim();
|
|
3808
3995
|
return n ? n.split(/\s+/) : [];
|
|
3809
3996
|
}
|
|
3810
3997
|
watchChildList(t) {
|
|
@@ -3817,26 +4004,26 @@ class zi {
|
|
|
3817
4004
|
_childListChangeHandler(t, n) {
|
|
3818
4005
|
const s = this.key || this.element.dataset.interactKey, i = [], o = [];
|
|
3819
4006
|
n.forEach((r) => {
|
|
3820
|
-
r.removedNodes.forEach((
|
|
3821
|
-
|
|
3822
|
-
}), r.addedNodes.forEach((
|
|
3823
|
-
|
|
4007
|
+
r.removedNodes.forEach((a) => {
|
|
4008
|
+
a instanceof HTMLElement && i.push(a);
|
|
4009
|
+
}), r.addedNodes.forEach((a) => {
|
|
4010
|
+
a instanceof HTMLElement && o.push(a);
|
|
3824
4011
|
});
|
|
3825
|
-
}),
|
|
4012
|
+
}), dn(i), s && ao(this, t, o);
|
|
3826
4013
|
}
|
|
3827
4014
|
}
|
|
3828
|
-
function
|
|
3829
|
-
new
|
|
4015
|
+
function fo(e, t) {
|
|
4016
|
+
new lo(e, t).connect();
|
|
3830
4017
|
}
|
|
3831
|
-
function
|
|
4018
|
+
function ho(e) {
|
|
3832
4019
|
const t = w.getController(e);
|
|
3833
4020
|
t && t.disconnect({ removeFromCache: !0 });
|
|
3834
4021
|
}
|
|
3835
4022
|
export {
|
|
3836
|
-
|
|
4023
|
+
lo as I,
|
|
3837
4024
|
w as a,
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
4025
|
+
fo as b,
|
|
4026
|
+
uo as g,
|
|
4027
|
+
ho as r
|
|
3841
4028
|
};
|
|
3842
|
-
//# sourceMappingURL=index-
|
|
4029
|
+
//# sourceMappingURL=index-Bn1cDv1F.mjs.map
|