@wix/interact 2.1.2 → 2.1.4

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