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