@wix/interact 2.6.0 → 2.7.0

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