@20minutes/hela 2.18.3 → 2.18.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,15 +1,15 @@
1
- const kt = () => /Android/i.test(navigator.userAgent), qt = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), Nt = () => {
1
+ const Vt = () => /Android/i.test(navigator.userAgent), jt = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), Gt = () => {
2
2
  const s = document.getElementById("js-download-band");
3
- s && kt() && s.setAttribute(
3
+ s && Vt() && s.setAttribute(
4
4
  "href",
5
5
  "https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome"
6
6
  );
7
- }, Ht = () => {
7
+ }, Ut = () => {
8
8
  const s = document.querySelector("#js-election-selector");
9
9
  s && s.addEventListener("change", (t) => {
10
10
  window.location.replace(t.target.value);
11
11
  });
12
- }, Wt = () => {
12
+ }, Kt = () => {
13
13
  const s = document.querySelector(".c-search-banner");
14
14
  if (!s)
15
15
  return;
@@ -24,7 +24,7 @@ const kt = () => /Android/i.test(navigator.userAgent), qt = typeof window < "u"
24
24
  e.getAttribute("aria-expanded") === "true" ? (e.setAttribute("aria-expanded", "false"), i.setAttribute("aria-hidden", "true")) : (e.setAttribute("aria-expanded", "true"), i.setAttribute("aria-hidden", "false"));
25
25
  });
26
26
  }
27
- }, Vt = [
27
+ }, Xt = [
28
28
  {
29
29
  text: "Paris",
30
30
  _index: "town_1717424751904",
@@ -55,50 +55,50 @@ const kt = () => /Android/i.test(navigator.userAgent), qt = typeof window < "u"
55
55
  url: "/elections/resultats/paris/paris-75011"
56
56
  }
57
57
  }
58
- ], jt = (s, t, e, i, n, o) => {
58
+ ], Yt = (s, t, e, i, n, o) => {
59
59
  const r = document.getElementById(s);
60
60
  if (!r)
61
61
  return;
62
62
  const a = r.dataset.storybook, l = r.querySelector(`#${s}-search`), c = l?.getAttribute("data-api-url"), d = r.querySelector(".c-autocomplete__menu");
63
63
  if (!l || !d || !c)
64
64
  return;
65
- const h = r.querySelector(".c-autocomplete__input-spinner"), u = l.getAttribute("data-trigger-message"), m = async (v) => {
65
+ const h = r.querySelector(".c-autocomplete__input-spinner"), u = l.getAttribute("data-trigger-message"), f = async (g) => {
66
66
  try {
67
- const g = a && t.includes("20minutes.fr") ? Vt : await fetch(`${c}${e}${encodeURIComponent(v)}`).then(
68
- (L) => L.json()
69
- ), w = o && typeof g == "object" && g !== null ? g[o] : g;
70
- return Array.isArray(w) ? w : [];
71
- } catch (g) {
72
- return console.error("Error fetching autocomplete results:", g), [];
67
+ const y = a && t.includes("20minutes.fr") ? Xt : await fetch(`${c}${e}${encodeURIComponent(g)}`).then(
68
+ (B) => B.json()
69
+ ), A = o && typeof y == "object" && y !== null ? y[o] : y;
70
+ return Array.isArray(A) ? A : [];
71
+ } catch (y) {
72
+ return console.error("Error fetching autocomplete results:", y), [];
73
73
  }
74
- }, f = (v, g) => {
75
- const w = document.createElement("li");
76
- w.id = `/${v}`, w.textContent = g, w.addEventListener("click", () => {
77
- l instanceof HTMLInputElement && (l.value = g, d.classList.add("u-hidden"));
78
- }), d.appendChild(w);
74
+ }, m = (g, y) => {
75
+ const A = document.createElement("li");
76
+ A.id = `/${g}`, A.textContent = y, A.addEventListener("click", () => {
77
+ l instanceof HTMLInputElement && (l.value = y, d.classList.add("u-hidden"));
78
+ }), d.appendChild(A);
79
79
  }, p = () => {
80
80
  h?.classList.toggle("u-hidden");
81
81
  }, _ = () => {
82
- const v = document.createElement("li");
83
- v.textContent = u, d.appendChild(v);
84
- }, b = async (v) => {
82
+ const g = document.createElement("li");
83
+ g.textContent = u, d.appendChild(g);
84
+ }, w = async (g) => {
85
85
  p(), d.classList.remove("u-hidden");
86
- const g = await m(v);
87
- d.innerHTML = "", g.length === 0 && d.classList.add("u-hidden"), g.forEach((w) => {
88
- f(w[i], w[n]);
86
+ const y = await f(g);
87
+ d.innerHTML = "", y.length === 0 && d.classList.add("u-hidden"), y.forEach((A) => {
88
+ m(A[i], A[n]);
89
89
  }), p();
90
- }, A = (v) => {
91
- if (!(v.target instanceof HTMLInputElement))
90
+ }, C = (g) => {
91
+ if (!(g.target instanceof HTMLInputElement))
92
92
  return;
93
- const g = v.target.value;
94
- d.classList.remove("u-hidden"), g.length >= 3 ? b(g) : (d.innerHTML = "", _());
93
+ const y = g.target.value;
94
+ d.classList.remove("u-hidden"), y.length >= 3 ? w(y) : (d.innerHTML = "", _());
95
95
  };
96
- l.addEventListener("input", A), l.addEventListener("focusout", () => {
96
+ l.addEventListener("input", C), l.addEventListener("focusout", () => {
97
97
  setTimeout(() => d.classList.add("u-hidden"), 300);
98
98
  }), l.addEventListener("focusin", () => {
99
99
  d.childElementCount > 0 && d.classList.remove("u-hidden");
100
100
  });
101
- }, Gt = () => {
101
+ }, Jt = () => {
102
102
  const s = document.querySelector(".js-content-header"), t = document.querySelector(".js-limit-scroll-close-article-btn"), e = document.querySelector(".js-close-article-btn"), i = document.querySelector(".c-header-mobile"), n = i instanceof HTMLElement ? i.offsetHeight : 0;
103
103
  if (s && t && e) {
104
104
  const o = new IntersectionObserver(
@@ -111,7 +111,7 @@ const kt = () => /Android/i.test(navigator.userAgent), qt = typeof window < "u"
111
111
  );
112
112
  o.observe(s), o.observe(t);
113
113
  }
114
- }, Ut = (s) => {
114
+ }, Qt = (s) => {
115
115
  s.stopImmediatePropagation(), s.preventDefault();
116
116
  const t = s.currentTarget;
117
117
  if (t instanceof HTMLButtonElement) {
@@ -120,15 +120,15 @@ const kt = () => /Android/i.test(navigator.userAgent), qt = typeof window < "u"
120
120
  );
121
121
  t.getAttribute("aria-expanded") === "true" ? (t.setAttribute("aria-expanded", "false"), i?.setAttribute("aria-hidden", "true")) : (t.setAttribute("aria-expanded", "true"), i?.setAttribute("aria-hidden", "false"));
122
122
  }
123
- }, Kt = (s = document.querySelector(
123
+ }, te = (s = document.querySelector(
124
124
  ".js-collapse__button"
125
125
  )) => {
126
126
  s && document.querySelectorAll(".c-collapse__button").forEach((e) => {
127
127
  e.addEventListener("click", (i) => {
128
- Ut(i);
128
+ Qt(i);
129
129
  });
130
130
  });
131
- }, K = (s, t) => {
131
+ }, Q = (s, t) => {
132
132
  const e = document.querySelector(
133
133
  `#${t}`
134
134
  );
@@ -147,17 +147,17 @@ const kt = () => /Android/i.test(navigator.userAgent), qt = typeof window < "u"
147
147
  if (h <= 0)
148
148
  clearInterval(c);
149
149
  else {
150
- const u = Math.floor(h / 864e5), m = Math.floor(h % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)), f = Math.floor(h % (1e3 * 60 * 60) / (1e3 * 60)), p = Math.floor(h % (1e3 * 60) / 1e3);
151
- i.innerHTML = u.toString(), n.innerHTML = m.toString(), o.innerHTML = f.toString(), r.innerHTML = p.toString();
150
+ const u = Math.floor(h / 864e5), f = Math.floor(h % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)), m = Math.floor(h % (1e3 * 60 * 60) / (1e3 * 60)), p = Math.floor(h % (1e3 * 60) / 1e3);
151
+ i.innerHTML = u.toString(), n.innerHTML = f.toString(), o.innerHTML = m.toString(), r.innerHTML = p.toString();
152
152
  }
153
153
  }, 1e3);
154
154
  }
155
- }, Xt = (s) => {
155
+ }, ee = (s) => {
156
156
  const t = s.getBBox(), e = t.width / 20;
157
157
  return [t.x - e, t.y - e, t.width + e * 2, t.height + e * 2].join(
158
158
  " "
159
159
  );
160
- }, Yt = () => {
160
+ }, ie = () => {
161
161
  const s = document.querySelector(".c-map-districts-container"), t = document.querySelector(".c-map-districts");
162
162
  if (!s || !t)
163
163
  return;
@@ -169,36 +169,36 @@ const kt = () => /Android/i.test(navigator.userAgent), qt = typeof window < "u"
169
169
  ".c-map-districts-container__unzoom-button"
170
170
  );
171
171
  let o = t;
172
- const r = t.getAttribute("viewBox"), a = (f, p) => f.matches?.call(f, p), l = (f, p, _ = ".c-map-districts__zoomable:not(.js-selected-area)") => {
173
- if (!f)
172
+ const r = t.getAttribute("viewBox"), a = (m, p) => m.matches?.call(m, p), l = (m, p, _ = ".c-map-districts__zoomable:not(.js-selected-area)") => {
173
+ if (!m)
174
174
  return;
175
- let b, A = f.parentElement;
176
- for (; A instanceof SVGGraphicsElement && A !== p; )
177
- a(A, _) && (b = A), A = A.parentElement;
178
- return b;
179
- }, c = (f, p, _) => {
180
- if (!f)
175
+ let w, C = m.parentElement;
176
+ for (; C instanceof SVGGraphicsElement && C !== p; )
177
+ a(C, _) && (w = C), C = C.parentElement;
178
+ return w;
179
+ }, c = (m, p, _) => {
180
+ if (!m)
181
181
  return;
182
- let b = f.parentElement;
183
- for (; b instanceof SVGGraphicsElement && b !== _; ) {
184
- if (p === b)
182
+ let w = m.parentElement;
183
+ for (; w instanceof SVGGraphicsElement && w !== _; ) {
184
+ if (p === w)
185
185
  return !0;
186
- b = b.parentElement;
186
+ w = w.parentElement;
187
187
  }
188
188
  return _ === p;
189
- }, d = (f, p) => {
189
+ }, d = (m, p) => {
190
190
  if (p && n && e) {
191
- s.classList.remove("c-map-districts-container--department-view"), e.classList.remove("u-hidden"), i?.classList.add("u-hidden"), n.classList.add("u-hidden"), p !== r && (e.classList.add("u-hidden"), n.classList.remove("u-hidden")), o.classList.remove("js-selected-area"), o = f;
191
+ s.classList.remove("c-map-districts-container--department-view"), e.classList.remove("u-hidden"), i?.classList.add("u-hidden"), n.classList.add("u-hidden"), p !== r && (e.classList.add("u-hidden"), n.classList.remove("u-hidden")), o.classList.remove("js-selected-area"), o = m;
192
192
  const _ = o.getAttribute("data-info");
193
193
  i && _ && (s.classList.add("c-map-districts-container--department-view"), i.classList.remove("u-hidden"), i.innerHTML = _), o.classList.add("js-selected-area"), t.setAttribute("viewBox", p);
194
194
  }
195
- }, h = (f) => {
196
- f.stopPropagation();
197
- const p = f.currentTarget;
195
+ }, h = (m) => {
196
+ m.stopPropagation();
197
+ const p = m.currentTarget;
198
198
  if (o && t && p instanceof SVGGraphicsElement) {
199
199
  if (p === o)
200
200
  return;
201
- if (f.preventDefault(), o !== t && !c(p, o, t)) {
201
+ if (m.preventDefault(), o !== t && !c(p, o, t)) {
202
202
  d(t, r);
203
203
  return;
204
204
  }
@@ -208,16 +208,16 @@ const kt = () => /Android/i.test(navigator.userAgent), qt = typeof window < "u"
208
208
  );
209
209
  d(
210
210
  _ || p,
211
- Xt(_ || p)
211
+ ee(_ || p)
212
212
  );
213
213
  }
214
214
  }, u = () => {
215
215
  t && o !== t && d(t, r);
216
216
  };
217
- t.addEventListener("click", u), n && n.addEventListener("click", u), document.querySelectorAll(".c-map-districts__zoomable").forEach((f) => {
218
- f.addEventListener("click", (p) => h(p));
217
+ t.addEventListener("click", u), n && n.addEventListener("click", u), document.querySelectorAll(".c-map-districts__zoomable").forEach((m) => {
218
+ m.addEventListener("click", (p) => h(p));
219
219
  });
220
- }, Jt = () => {
220
+ }, se = () => {
221
221
  const s = document.getElementById("elections-form-search"), t = document.querySelector(".c-search-form__autocomplete");
222
222
  if (!s || !t)
223
223
  return;
@@ -245,62 +245,62 @@ const kt = () => /Android/i.test(navigator.userAgent), qt = typeof window < "u"
245
245
  }), s.addEventListener("focusin", () => {
246
246
  t.childElementCount > 0 && t.classList.remove("u-hidden");
247
247
  });
248
- }, Qt = (s, t) => {
248
+ }, ne = (s, t) => {
249
249
  s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => {
250
250
  n.classList.remove(t);
251
251
  });
252
252
  const i = s.querySelector(".js-ellipsis-button__label");
253
253
  i instanceof HTMLSpanElement && (i.innerHTML = "Voir moins");
254
- }, te = (s, t) => {
254
+ }, oe = (s, t) => {
255
255
  s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => {
256
256
  n.classList.add(t);
257
257
  }), s.setAttribute("aria-expanded", "false");
258
258
  const i = s.querySelector(".js-ellipsis-button__label");
259
259
  i instanceof HTMLSpanElement && (i.innerHTML = "Voir plus");
260
- }, ee = (s, t) => {
260
+ }, re = (s, t) => {
261
261
  const e = s.currentTarget;
262
262
  if (s.preventDefault(), e instanceof HTMLButtonElement) {
263
263
  const i = t ? "u-ellipsis-multiline" : "u-ellipsis";
264
- return e.getAttribute("aria-expanded") === "true" ? te(e, i) : Qt(e, i);
264
+ return e.getAttribute("aria-expanded") === "true" ? oe(e, i) : ne(e, i);
265
265
  }
266
266
  return null;
267
- }, ie = (s = document.querySelector(
267
+ }, ae = (s = document.querySelector(
268
268
  ".js-ellipsis-button"
269
269
  )) => {
270
270
  s && document.querySelectorAll(".js-ellipsis-button").forEach((e) => {
271
271
  const i = e.getAttribute("data-multiple") === "true";
272
- e.addEventListener("click", (n) => ee(n, i));
272
+ e.addEventListener("click", (n) => re(n, i));
273
273
  });
274
- }, se = (s) => {
274
+ }, le = (s) => {
275
275
  s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => {
276
276
  i.setAttribute("aria-hidden", "false");
277
277
  });
278
278
  const e = s.querySelector(".js-expand-button__label");
279
279
  e instanceof HTMLSpanElement && (e.innerHTML = "Voir moins");
280
- }, ne = (s) => {
280
+ }, ce = (s) => {
281
281
  s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => {
282
282
  i.setAttribute("aria-hidden", "true");
283
283
  }), s.setAttribute("aria-expanded", "false");
284
284
  const e = s.querySelector(".js-expand-button__label");
285
285
  e instanceof HTMLSpanElement && (e.innerHTML = "Voir plus");
286
- }, oe = (s) => {
286
+ }, de = (s) => {
287
287
  const t = s.currentTarget;
288
- return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? ne(t) : se(t) : null;
289
- }, re = (s) => {
288
+ return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? ce(t) : le(t) : null;
289
+ }, he = (s) => {
290
290
  const t = s.parentNode?.querySelector(".js-expand-target");
291
291
  return !t || t.classList.contains("c-elections-result__members") ? !1 : (t.textContent?.trim().length ?? 0) < 255;
292
- }, ae = (s = document.querySelector(
292
+ }, ue = (s = document.querySelector(
293
293
  ".js-expand-button"
294
294
  )) => {
295
295
  s && document.querySelectorAll(".js-expand-button").forEach((e) => {
296
- re(e) ? (e.style.display = "none", e.parentNode?.querySelectorAll(".js-expand-target")?.forEach((n) => {
296
+ he(e) ? (e.style.display = "none", e.parentNode?.querySelectorAll(".js-expand-target")?.forEach((n) => {
297
297
  n.setAttribute("aria-hidden", "false");
298
- })) : e.addEventListener("click", oe);
298
+ })) : e.addEventListener("click", de);
299
299
  });
300
- }, le = () => {
300
+ }, pe = () => {
301
301
  const s = document.querySelector(".js-game-alert");
302
- qt && s && s.classList.remove("u-hidden");
303
- }, ce = () => {
302
+ jt && s && s.classList.remove("u-hidden");
303
+ }, me = () => {
304
304
  const s = document.querySelectorAll(".js-half-donut-result");
305
305
  for (const t of Array.from(s)) {
306
306
  const e = t.querySelector(".c-half-donut"), i = t.querySelector(".c-legend");
@@ -319,7 +319,7 @@ const kt = () => /Android/i.test(navigator.userAgent), qt = typeof window < "u"
319
319
  });
320
320
  });
321
321
  }
322
- }, de = () => {
322
+ }, fe = () => {
323
323
  const s = document.querySelector(".c-image-slider__container");
324
324
  if (!s)
325
325
  return () => {
@@ -327,110 +327,110 @@ const kt = () => /Android/i.test(navigator.userAgent), qt = typeof window < "u"
327
327
  const t = document.querySelectorAll(".c-image-slider__slide"), e = document.querySelector(".c-image-slider__button-container--previous"), i = document.querySelector(".c-image-slider__button-container--next"), n = document.querySelectorAll(".c-image-slider__indicator");
328
328
  let o = 0, r = null, a = !1;
329
329
  const l = () => {
330
- n.forEach((v, g) => {
331
- v.classList.toggle("c-image-slider__indicator--is-active", g === o);
330
+ n.forEach((g, y) => {
331
+ g.classList.toggle("c-image-slider__indicator--is-active", y === o);
332
332
  });
333
- }, c = (v = !0) => {
333
+ }, c = (g = !0) => {
334
334
  if (!(s instanceof HTMLElement))
335
335
  return;
336
- s.style.transition = v ? "transform 0.3s ease" : "none";
337
- const g = -o * 100;
338
- s.style.transform = `translateX(${g}%)`, l();
339
- }, d = (v) => {
340
- o = v, c(!0);
336
+ s.style.transition = g ? "transform 0.3s ease" : "none";
337
+ const y = -o * 100;
338
+ s.style.transform = `translateX(${y}%)`, l();
339
+ }, d = (g) => {
340
+ o = g, c(!0);
341
341
  }, h = () => {
342
342
  r && clearInterval(r), r = setInterval(() => {
343
343
  if (!a) {
344
- const v = (o + 1) % t.length;
345
- d(v);
344
+ const g = (o + 1) % t.length;
345
+ d(g);
346
346
  }
347
347
  }, 4e3);
348
348
  }, u = () => {
349
349
  r && (clearInterval(r), r = null);
350
- }, m = () => {
351
- a = !0, u();
352
350
  }, f = () => {
351
+ a = !0, u();
352
+ }, m = () => {
353
353
  a = !1, h();
354
354
  };
355
355
  e?.addEventListener("click", () => {
356
- m();
357
- const v = (o - 1 + t.length) % t.length;
358
- d(v), setTimeout(f, 5e3);
356
+ f();
357
+ const g = (o - 1 + t.length) % t.length;
358
+ d(g), setTimeout(m, 5e3);
359
359
  }), i?.addEventListener("click", () => {
360
- m();
361
- const v = (o + 1) % t.length;
362
- d(v), setTimeout(f, 5e3);
363
- }), n.forEach((v, g) => {
364
- v.addEventListener("click", () => {
365
- m(), d(g), setTimeout(f, 5e3);
360
+ f();
361
+ const g = (o + 1) % t.length;
362
+ d(g), setTimeout(m, 5e3);
363
+ }), n.forEach((g, y) => {
364
+ g.addEventListener("click", () => {
365
+ f(), d(y), setTimeout(m, 5e3);
366
366
  });
367
367
  });
368
- let p = 0, _ = 0, b = !1;
369
- return s.addEventListener("touchstart", (v) => {
370
- s instanceof HTMLElement && (m(), p = v.touches[0].clientX, _ = p, b = !0, s.style.transition = "none");
371
- }), s.addEventListener("touchmove", (v) => {
368
+ let p = 0, _ = 0, w = !1;
369
+ return s.addEventListener("touchstart", (g) => {
370
+ s instanceof HTMLElement && (f(), p = g.touches[0].clientX, _ = p, w = !0, s.style.transition = "none");
371
+ }), s.addEventListener("touchmove", (g) => {
372
372
  if (!(s instanceof HTMLElement))
373
373
  return;
374
- _ = v.touches[0].clientX;
375
- const g = _ - p, w = -o * window.innerWidth + g;
376
- s.style.transform = `translateX(${w}px)`;
374
+ _ = g.touches[0].clientX;
375
+ const y = _ - p, A = -o * window.innerWidth + y;
376
+ s.style.transform = `translateX(${A}px)`;
377
377
  }), s.addEventListener("touchend", () => {
378
- if (!b)
378
+ if (!w)
379
379
  return;
380
- b = !1;
381
- const v = _ - p;
382
- Math.abs(v) > 75 && (v < 0 ? o = Math.min(o + 1, t.length - 1) : v > 0 && (o = Math.max(o - 1, 0))), c(!0), setTimeout(f, 5e3);
380
+ w = !1;
381
+ const g = _ - p;
382
+ Math.abs(g) > 75 && (g < 0 ? o = Math.min(o + 1, t.length - 1) : g > 0 && (o = Math.max(o - 1, 0))), c(!0), setTimeout(m, 5e3);
383
383
  }), c(!0), h(), () => {
384
384
  u();
385
385
  };
386
- }, he = (s) => {
386
+ }, ge = (s) => {
387
387
  s.stopImmediatePropagation(), s.preventDefault();
388
388
  const t = s.currentTarget, e = document.getElementById("info-button-content");
389
389
  !(t instanceof HTMLButtonElement) || !e || (t.getAttribute("aria-expanded") === "true" ? (t.setAttribute("aria-expanded", "false"), e.setAttribute("aria-hidden", "true")) : (t.setAttribute("aria-expanded", "true"), e.setAttribute("aria-hidden", "false")));
390
- }, ue = () => {
390
+ }, ve = () => {
391
391
  const s = document.querySelector(".js-info-banner__button");
392
- s instanceof HTMLButtonElement && s.addEventListener("click", he);
393
- }, y = {
392
+ s instanceof HTMLButtonElement && s.addEventListener("click", ge);
393
+ }, v = {
394
394
  inert: ":not([inert]):not([inert] *)",
395
395
  negTabIndex: ':not([tabindex^="-"])',
396
396
  disabled: ":not(:disabled)"
397
397
  };
398
- var pe = [
399
- `a[href]${y.inert}${y.negTabIndex}`,
400
- `area[href]${y.inert}${y.negTabIndex}`,
401
- `input:not([type="hidden"]):not([type="radio"])${y.inert}${y.negTabIndex}${y.disabled}`,
402
- `input[type="radio"]${y.inert}${y.negTabIndex}${y.disabled}`,
403
- `select${y.inert}${y.negTabIndex}${y.disabled}`,
404
- `textarea${y.inert}${y.negTabIndex}${y.disabled}`,
405
- `button${y.inert}${y.negTabIndex}${y.disabled}`,
406
- `details${y.inert} > summary:first-of-type${y.negTabIndex}`,
398
+ var ye = [
399
+ `a[href]${v.inert}${v.negTabIndex}`,
400
+ `area[href]${v.inert}${v.negTabIndex}`,
401
+ `input:not([type="hidden"]):not([type="radio"])${v.inert}${v.negTabIndex}${v.disabled}`,
402
+ `input[type="radio"]${v.inert}${v.negTabIndex}${v.disabled}`,
403
+ `select${v.inert}${v.negTabIndex}${v.disabled}`,
404
+ `textarea${v.inert}${v.negTabIndex}${v.disabled}`,
405
+ `button${v.inert}${v.negTabIndex}${v.disabled}`,
406
+ `details${v.inert} > summary:first-of-type${v.negTabIndex}`,
407
407
  // Discard until Firefox supports `:has()`
408
408
  // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
409
409
  // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
410
- `iframe${y.inert}${y.negTabIndex}`,
411
- `audio[controls]${y.inert}${y.negTabIndex}`,
412
- `video[controls]${y.inert}${y.negTabIndex}`,
413
- `[contenteditable]${y.inert}${y.negTabIndex}`,
414
- `[tabindex]${y.inert}${y.negTabIndex}`
410
+ `iframe${v.inert}${v.negTabIndex}`,
411
+ `audio[controls]${v.inert}${v.negTabIndex}`,
412
+ `video[controls]${v.inert}${v.negTabIndex}`,
413
+ `[contenteditable]${v.inert}${v.negTabIndex}`,
414
+ `[tabindex]${v.inert}${v.negTabIndex}`
415
415
  ];
416
- function ot(s) {
416
+ function dt(s) {
417
417
  (s.querySelector("[autofocus]") || s).focus();
418
418
  }
419
- function me(s) {
420
- const t = Z(s, !0), e = t ? Z(s, !1) || t : null;
419
+ function _e(s) {
420
+ const t = W(s, !0), e = t ? W(s, !1) || t : null;
421
421
  return [t, e];
422
422
  }
423
- function Z(s, t) {
424
- if (t && lt(s))
423
+ function W(s, t) {
424
+ if (t && pt(s))
425
425
  return s;
426
- if (ge(s))
426
+ if (be(s))
427
427
  if (s.shadowRoot) {
428
- let e = rt(s.shadowRoot, t);
428
+ let e = ht(s.shadowRoot, t);
429
429
  for (; e; ) {
430
- const i = Z(e, t);
430
+ const i = W(e, t);
431
431
  if (i)
432
432
  return i;
433
- e = at(e, t);
433
+ e = ut(e, t);
434
434
  }
435
435
  } else if (s.localName === "slot") {
436
436
  const e = s.assignedElements({
@@ -438,56 +438,56 @@ function Z(s, t) {
438
438
  });
439
439
  t || e.reverse();
440
440
  for (const i of e) {
441
- const n = Z(i, t);
441
+ const n = W(i, t);
442
442
  if (n)
443
443
  return n;
444
444
  }
445
445
  } else {
446
- let e = rt(s, t);
446
+ let e = ht(s, t);
447
447
  for (; e; ) {
448
- const i = Z(e, t);
448
+ const i = W(e, t);
449
449
  if (i)
450
450
  return i;
451
- e = at(e, t);
451
+ e = ut(e, t);
452
452
  }
453
453
  }
454
- return !t && lt(s) ? s : null;
454
+ return !t && pt(s) ? s : null;
455
455
  }
456
- function rt(s, t) {
456
+ function ht(s, t) {
457
457
  return t ? s.firstElementChild : s.lastElementChild;
458
458
  }
459
- function at(s, t) {
459
+ function ut(s, t) {
460
460
  return t ? s.nextElementSibling : s.previousElementSibling;
461
461
  }
462
- const fe = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), lt = (s) => s.shadowRoot?.delegatesFocus ? !1 : s.matches(pe.join(",")) && !fe(s);
463
- function ge(s) {
462
+ const we = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), pt = (s) => s.shadowRoot?.delegatesFocus ? !1 : s.matches(ye.join(",")) && !we(s);
463
+ function be(s) {
464
464
  return s.shadowRoot && s.getAttribute("tabindex") === "-1" ? !1 : !s.matches(":disabled,[hidden],[inert]");
465
465
  }
466
- function k(s = document) {
466
+ function V(s = document) {
467
467
  const t = s.activeElement;
468
- return t ? t.shadowRoot ? k(t.shadowRoot) || document.activeElement : t : null;
468
+ return t ? t.shadowRoot ? V(t.shadowRoot) || document.activeElement : t : null;
469
469
  }
470
- function ve(s, t) {
471
- const [e, i] = me(s);
470
+ function Se(s, t) {
471
+ const [e, i] = _e(s);
472
472
  if (!e)
473
473
  return t.preventDefault();
474
- const n = k();
474
+ const n = V();
475
475
  t.shiftKey && n === e ? (i.focus(), t.preventDefault()) : !t.shiftKey && n === i && (e.focus(), t.preventDefault());
476
476
  }
477
- function O(s, t) {
477
+ function R(s, t) {
478
478
  function e(i) {
479
479
  if (!i || i === document || i === window)
480
480
  return null;
481
- const n = Et(i);
481
+ const n = Tt(i);
482
482
  return n && (i = n), i.closest(s) || e(i.getRootNode().host);
483
483
  }
484
484
  return e(t);
485
485
  }
486
- function Et(s) {
487
- return s.assignedSlot || (s.parentNode ? Et(s.parentNode) : null);
486
+ function Tt(s) {
487
+ return s.assignedSlot || (s.parentNode ? Tt(s.parentNode) : null);
488
488
  }
489
- const D = "data-a11y-dialog";
490
- class Ct {
489
+ const Z = "data-a11y-dialog";
490
+ class It {
491
491
  $el;
492
492
  id;
493
493
  previouslyFocused;
@@ -510,7 +510,7 @@ class Ct {
510
510
  * `[data-a11y-dialog-show="<id>"]` and `[data-a11y-dialog-hide="<id>"]`.
511
511
  */
512
512
  constructor(t) {
513
- this.$el = t, this.id = this.$el.getAttribute(D) || this.$el.id, this.previouslyFocused = null, this.shown = !1, this.maintainFocus = this.maintainFocus.bind(this), this.bindKeypress = this.bindKeypress.bind(this), this.handleTriggerClicks = this.handleTriggerClicks.bind(this), this.show = this.show.bind(this), this.hide = this.hide.bind(this), this.$el.setAttribute("aria-hidden", "true"), this.$el.setAttribute("aria-modal", "true"), this.$el.setAttribute("tabindex", "-1"), this.$el.hasAttribute("role") || this.$el.setAttribute("role", "dialog"), document.addEventListener("click", this.handleTriggerClicks, !0);
513
+ this.$el = t, this.id = this.$el.getAttribute(Z) || this.$el.id, this.previouslyFocused = null, this.shown = !1, this.maintainFocus = this.maintainFocus.bind(this), this.bindKeypress = this.bindKeypress.bind(this), this.handleTriggerClicks = this.handleTriggerClicks.bind(this), this.show = this.show.bind(this), this.hide = this.hide.bind(this), this.$el.setAttribute("aria-hidden", "true"), this.$el.setAttribute("aria-modal", "true"), this.$el.setAttribute("tabindex", "-1"), this.$el.hasAttribute("role") || this.$el.setAttribute("role", "dialog"), document.addEventListener("click", this.handleTriggerClicks, !0);
514
514
  }
515
515
  /**
516
516
  * Destroy the current instance (after making sure the dialog has been hidden)
@@ -536,7 +536,7 @@ class Ct {
536
536
  * Returns the instance to allow method chaining.
537
537
  */
538
538
  show(t) {
539
- return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = k(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() : ot(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
539
+ return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = V(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() : dt(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
540
540
  }
541
541
  /**
542
542
  * Hide the dialog.
@@ -584,7 +584,7 @@ class Ct {
584
584
  * dialog are clicked, and call `show` or `hide`, respectively
585
585
  */
586
586
  handleTriggerClicks(t) {
587
- const e = t.composedPath()[0], i = O(`[${D}-show="${this.id}"]`, e), n = O(`[${D}-hide="${this.id}"]`, e), o = O(`[${D}-hide]`, e) && O('[aria-modal="true"]', e) === this.$el;
587
+ const e = t.composedPath()[0], i = R(`[${Z}-show="${this.id}"]`, e), n = R(`[${Z}-hide="${this.id}"]`, e), o = R(`[${Z}-hide]`, e) && R('[aria-modal="true"]', e) === this.$el;
588
588
  i && this.show(t), (n || o) && this.hide(t);
589
589
  }
590
590
  /**
@@ -592,14 +592,14 @@ class Ct {
592
592
  * (namely ESC and TAB)
593
593
  */
594
594
  bindKeypress(t) {
595
- if (O('[aria-modal="true"]', k()) !== this.$el)
595
+ if (R('[aria-modal="true"]', V()) !== this.$el)
596
596
  return;
597
597
  let e = !1;
598
598
  try {
599
599
  e = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
600
600
  } catch {
601
601
  }
602
- t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && ve(this.$el, t);
602
+ t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && Se(this.$el, t);
603
603
  }
604
604
  /**
605
605
  * If the dialog is shown and the focus is not within a dialog element (either
@@ -608,19 +608,19 @@ class Ct {
608
608
  * See: https://github.com/KittyGiraudel/a11y-dialog/issues/177
609
609
  */
610
610
  maintainFocus() {
611
- const t = k();
612
- O(`[aria-modal="true"], [${D}-ignore-focus-trap]`, t) || ot(this.$el);
611
+ const t = V();
612
+ R(`[aria-modal="true"], [${Z}-ignore-focus-trap]`, t) || dt(this.$el);
613
613
  }
614
614
  }
615
- function ct() {
615
+ function mt() {
616
616
  for (const s of document.querySelectorAll("[data-a11y-dialog]"))
617
- new Ct(s);
617
+ new It(s);
618
618
  }
619
- typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", ct) : ct());
620
- const ye = () => document.querySelectorAll(".js-modal").forEach((s) => {
619
+ typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", mt) : mt());
620
+ const Le = () => document.querySelectorAll(".js-modal").forEach((s) => {
621
621
  if (!(s instanceof HTMLElement))
622
622
  return;
623
- const t = new Ct(s);
623
+ const t = new It(s);
624
624
  if (s.id === "dialog-menu") {
625
625
  const e = document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"), i = document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");
626
626
  e.length > 0 && i.length > 0 && (t.on("show", () => {
@@ -642,28 +642,28 @@ const ye = () => document.querySelectorAll(".js-modal").forEach((s) => {
642
642
  }).on("hide", () => {
643
643
  document.body.classList.remove("noscroll");
644
644
  });
645
- }), xt = "68px", Pt = "50px", st = ({
645
+ }), zt = "68px", Mt = "50px", lt = ({
646
646
  navigationContainer: s,
647
647
  navigatedList: t,
648
648
  nextBtn: e,
649
649
  prevBtn: i
650
650
  }) => {
651
- const n = s.classList.contains("c-breadcrumb--is-small") ? Pt : xt;
651
+ const n = s.classList.contains("c-breadcrumb--is-small") ? Mt : zt;
652
652
  e.classList.contains("o-nav-button--visible") && !i.classList.contains("o-nav-button--visible") && (s.style.paddingRight = n, s.style.paddingLeft = ""), i.classList.contains("o-nav-button--visible") && (s.style.paddingLeft = n, e.classList.contains("o-nav-button--visible") && (s.style.paddingRight = n), e.classList.contains("o-nav-button--visible") || (s.style.paddingRight = "")), !e.classList.contains("o-nav-button--visible") && !i.classList.contains("o-nav-button--visible") && (t.style.width = "", s.style.paddingRight = "");
653
- }, _e = ({
653
+ }, Ae = ({
654
654
  navigationContainer: s,
655
655
  navigatedList: t,
656
656
  nextBtn: e,
657
657
  prevBtn: i
658
658
  }) => {
659
659
  const n = t.scrollLeft > 0, o = t.scrollLeft + (t.clientWidth + 0.5) < t.scrollWidth;
660
- n && o ? (e.classList?.add("o-nav-button--visible"), i.classList?.add("o-nav-button--visible")) : n ? (e.classList?.remove("o-nav-button--visible"), i.classList?.add("o-nav-button--visible")) : o ? (e.classList?.add("o-nav-button--visible"), i.classList?.remove("o-nav-button--visible")) : (e.classList?.remove("o-nav-button--visible"), i.classList?.remove("o-nav-button--visible")), e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && st({
660
+ n && o ? (e.classList?.add("o-nav-button--visible"), i.classList?.add("o-nav-button--visible")) : n ? (e.classList?.remove("o-nav-button--visible"), i.classList?.add("o-nav-button--visible")) : o ? (e.classList?.add("o-nav-button--visible"), i.classList?.remove("o-nav-button--visible")) : (e.classList?.remove("o-nav-button--visible"), i.classList?.remove("o-nav-button--visible")), e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && lt({
661
661
  navigationContainer: s,
662
662
  navigatedList: t,
663
663
  nextBtn: e,
664
664
  prevBtn: i
665
665
  });
666
- }, we = ({
666
+ }, Ee = ({
667
667
  navigationContainer: s,
668
668
  navigatedList: t,
669
669
  nextBtn: e,
@@ -708,14 +708,14 @@ const ye = () => document.querySelectorAll(".js-modal").forEach((s) => {
708
708
  behavior: "smooth"
709
709
  }), e.classList.remove("o-nav-button--visible"), i.classList.add("o-nav-button--visible");
710
710
  }
711
- e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && st({
711
+ e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && lt({
712
712
  navigationContainer: s,
713
713
  navigatedList: t,
714
714
  nextBtn: e,
715
715
  prevBtn: i
716
716
  });
717
717
  }
718
- }, be = ({
718
+ }, Ce = ({
719
719
  navigationContainer: s,
720
720
  navigatedList: t,
721
721
  nextBtn: e,
@@ -756,26 +756,26 @@ const ye = () => document.querySelectorAll(".js-modal").forEach((s) => {
756
756
  left: 0,
757
757
  behavior: "smooth"
758
758
  }), i.classList.remove("o-nav-button--visible"), t.clientWidth < t.scrollWidth && e.classList.add("o-nav-button--visible");
759
- e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && st({
759
+ e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && lt({
760
760
  navigationContainer: s,
761
761
  navigatedList: t,
762
762
  nextBtn: e,
763
763
  prevBtn: i
764
764
  });
765
765
  }
766
- }, Se = ({
766
+ }, xe = ({
767
767
  navigationContainer: s,
768
768
  navigatedList: t,
769
769
  nextBtn: e,
770
770
  prevBtn: i
771
771
  }) => {
772
- _e({
772
+ Ae({
773
773
  navigationContainer: s,
774
774
  navigatedList: t,
775
775
  nextBtn: e,
776
776
  prevBtn: i
777
777
  });
778
- }, Le = (s) => {
778
+ }, Pe = (s) => {
779
779
  const { sliderVariant: t } = s.dataset, { sliderAuto: e } = s.dataset, { sliderDelay: i } = s.dataset, n = i ? parseInt(i, 10) : 3e3, r = s.closest(".js-overview-bar-container")?.querySelector(".c-stepper"), a = r?.querySelectorAll(".c-stepper__item"), l = s.querySelector(
780
780
  ".js-navigation-container__list"
781
781
  ), c = s.querySelector(".o-nav-button--next-button"), d = s.querySelector(
@@ -783,12 +783,12 @@ const ye = () => document.querySelectorAll(".js-modal").forEach((s) => {
783
783
  );
784
784
  if (!(!l || !c || !d)) {
785
785
  if (l.clientWidth < l.scrollWidth && (c.classList.add("o-nav-button--visible"), c.classList.contains("c-slider__button-container--has-space-around"))) {
786
- const h = s.classList.contains("c-breadcrumb--is-small") ? Pt : xt;
786
+ const h = s.classList.contains("c-breadcrumb--is-small") ? Mt : zt;
787
787
  s.style.paddingRight = h;
788
788
  }
789
789
  if (c.addEventListener(
790
790
  "click",
791
- we.bind(!1, {
791
+ Ee.bind(!1, {
792
792
  navigationContainer: s,
793
793
  navigatedList: l,
794
794
  nextBtn: c,
@@ -797,7 +797,7 @@ const ye = () => document.querySelectorAll(".js-modal").forEach((s) => {
797
797
  })
798
798
  ), d.addEventListener(
799
799
  "click",
800
- be.bind(!1, {
800
+ Ce.bind(!1, {
801
801
  navigationContainer: s,
802
802
  navigatedList: l,
803
803
  nextBtn: c,
@@ -808,13 +808,13 @@ const ye = () => document.querySelectorAll(".js-modal").forEach((s) => {
808
808
  ), e === "true") {
809
809
  const h = r ? r.querySelector(".c-stepper__item--loading") : null;
810
810
  a && (a.forEach((u) => {
811
- const m = u.querySelector(".c-stepper__loader");
812
- m && m instanceof HTMLElement && (m.style.transition = `width ${n / 1e3}s linear`);
811
+ const f = u.querySelector(".c-stepper__loader");
812
+ f && f instanceof HTMLElement && (f.style.transition = `width ${n / 1e3}s linear`);
813
813
  }), h || a[0].classList.add("c-stepper__item--loading")), setInterval(() => {
814
814
  c.classList.contains("o-nav-button--visible") ? c.click() : l && d && (l.scrollLeft = 0, a && (a.forEach((u) => {
815
- const m = u.querySelector(".c-stepper__loader");
816
- m && m instanceof HTMLElement && (m.style.transition = "width 0s linear"), u.classList.remove("c-stepper__item--loading"), u.classList.remove("c-stepper__item--loaded"), setTimeout(() => {
817
- m && m instanceof HTMLElement && (m.style.transition = `width ${n / 1e3}s linear`);
815
+ const f = u.querySelector(".c-stepper__loader");
816
+ f && f instanceof HTMLElement && (f.style.transition = "width 0s linear"), u.classList.remove("c-stepper__item--loading"), u.classList.remove("c-stepper__item--loaded"), setTimeout(() => {
817
+ f && f instanceof HTMLElement && (f.style.transition = `width ${n / 1e3}s linear`);
818
818
  }, 0);
819
819
  }), setTimeout(() => {
820
820
  a[0].classList.add("c-stepper__item--loading");
@@ -822,7 +822,7 @@ const ye = () => document.querySelectorAll(".js-modal").forEach((s) => {
822
822
  }, n);
823
823
  }
824
824
  }
825
- }, Ae = () => {
825
+ }, Te = () => {
826
826
  const s = document.querySelectorAll(".js-navigation-container");
827
827
  Array.from(s).forEach((t) => {
828
828
  const e = t.querySelector(
@@ -832,13 +832,13 @@ const ye = () => document.querySelectorAll(".js-modal").forEach((s) => {
832
832
  const i = new ResizeObserver((n) => {
833
833
  n.forEach((o) => {
834
834
  const { width: r } = o.contentRect;
835
- r > 0 && (Le(t), i.disconnect());
835
+ r > 0 && (Pe(t), i.disconnect());
836
836
  });
837
837
  });
838
838
  i.observe(e);
839
839
  }
840
840
  });
841
- }, Ee = () => {
841
+ }, Ie = () => {
842
842
  const s = document.querySelectorAll(".js-navigation-container");
843
843
  for (const t of Array.from(s))
844
844
  if (t) {
@@ -851,7 +851,7 @@ const ye = () => document.querySelectorAll(".js-modal").forEach((s) => {
851
851
  );
852
852
  e && i && n && window.addEventListener(
853
853
  "resize",
854
- Se.bind(!1, {
854
+ xe.bind(!1, {
855
855
  navigationContainer: t,
856
856
  navigatedList: e,
857
857
  nextBtn: i,
@@ -860,59 +860,59 @@ const ye = () => document.querySelectorAll(".js-modal").forEach((s) => {
860
860
  );
861
861
  }
862
862
  };
863
- function E(s, t, e) {
863
+ function x(s, t, e) {
864
864
  const i = document.createElement(t);
865
865
  return s && (i.className = s), e && e.appendChild(i), i;
866
866
  }
867
867
  function S(s, t) {
868
868
  return s.x = t.x, s.y = t.y, t.id !== void 0 && (s.id = t.id), s;
869
869
  }
870
- function Tt(s) {
870
+ function Ot(s) {
871
871
  s.x = Math.round(s.x), s.y = Math.round(s.y);
872
872
  }
873
- function Y(s, t) {
873
+ function it(s, t) {
874
874
  const e = Math.abs(s.x - t.x), i = Math.abs(s.y - t.y);
875
875
  return Math.sqrt(e * e + i * i);
876
876
  }
877
- function q(s, t) {
877
+ function j(s, t) {
878
878
  return s.x === t.x && s.y === t.y;
879
879
  }
880
- function H(s, t, e) {
880
+ function U(s, t, e) {
881
881
  return Math.min(Math.max(s, t), e);
882
882
  }
883
- function N(s, t, e) {
883
+ function G(s, t, e) {
884
884
  let i = `translate3d(${s}px,${t || 0}px,0)`;
885
885
  return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
886
886
  }
887
- function z(s, t, e, i) {
888
- s.style.transform = N(t, e, i);
887
+ function D(s, t, e, i) {
888
+ s.style.transform = G(t, e, i);
889
889
  }
890
- const Ce = "cubic-bezier(.4,0,.22,1)";
891
- function It(s, t, e, i) {
892
- s.style.transition = t ? `${t} ${e}ms ${i || Ce}` : "none";
890
+ const ze = "cubic-bezier(.4,0,.22,1)";
891
+ function Dt(s, t, e, i) {
892
+ s.style.transition = t ? `${t} ${e}ms ${i || ze}` : "none";
893
893
  }
894
- function J(s, t, e) {
894
+ function st(s, t, e) {
895
895
  s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
896
896
  }
897
- function xe(s) {
898
- It(s);
897
+ function Me(s) {
898
+ Dt(s);
899
899
  }
900
- function Pe(s) {
900
+ function Oe(s) {
901
901
  return "decode" in s ? s.decode().catch(() => {
902
902
  }) : s.complete ? Promise.resolve(s) : new Promise((t, e) => {
903
903
  s.onload = () => t(s), s.onerror = e;
904
904
  });
905
905
  }
906
- const C = {
906
+ const P = {
907
907
  IDLE: "idle",
908
908
  LOADING: "loading",
909
909
  LOADED: "loaded",
910
910
  ERROR: "error"
911
911
  };
912
- function Te(s) {
912
+ function De(s) {
913
913
  return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
914
914
  }
915
- function Ie(s, t, e = document) {
915
+ function $e(s, t, e = document) {
916
916
  let i = [];
917
917
  if (s instanceof Element)
918
918
  i = [s];
@@ -924,19 +924,19 @@ function Ie(s, t, e = document) {
924
924
  }
925
925
  return i;
926
926
  }
927
- function dt() {
927
+ function ft() {
928
928
  return !!(navigator.vendor && navigator.vendor.match(/apple/i));
929
929
  }
930
- let zt = !1;
930
+ let $t = !1;
931
931
  try {
932
932
  window.addEventListener("test", null, Object.defineProperty({}, "passive", {
933
933
  get: () => {
934
- zt = !0;
934
+ $t = !0;
935
935
  }
936
936
  }));
937
937
  } catch {
938
938
  }
939
- class ze {
939
+ class Re {
940
940
  constructor() {
941
941
  this._pool = [];
942
942
  }
@@ -993,7 +993,7 @@ class ze {
993
993
  listener: i,
994
994
  passive: n
995
995
  }));
996
- const d = zt ? {
996
+ const d = $t ? {
997
997
  passive: n || !1
998
998
  } : !1;
999
999
  t[a](c, i, d);
@@ -1001,7 +1001,7 @@ class ze {
1001
1001
  });
1002
1002
  }
1003
1003
  }
1004
- function Mt(s, t) {
1004
+ function Rt(s, t) {
1005
1005
  if (s.getViewportSizeFn) {
1006
1006
  const e = s.getViewportSizeFn(s, t);
1007
1007
  if (e)
@@ -1016,7 +1016,7 @@ function Mt(s, t) {
1016
1016
  y: window.innerHeight
1017
1017
  };
1018
1018
  }
1019
- function R(s, t, e, i, n) {
1019
+ function q(s, t, e, i, n) {
1020
1020
  let o = 0;
1021
1021
  if (t.paddingFn)
1022
1022
  o = t.paddingFn(e, i, n)[s];
@@ -1028,13 +1028,13 @@ function R(s, t, e, i, n) {
1028
1028
  }
1029
1029
  return Number(o) || 0;
1030
1030
  }
1031
- function Ot(s, t, e, i) {
1031
+ function Bt(s, t, e, i) {
1032
1032
  return {
1033
- x: t.x - R("left", s, t, e, i) - R("right", s, t, e, i),
1034
- y: t.y - R("top", s, t, e, i) - R("bottom", s, t, e, i)
1033
+ x: t.x - q("left", s, t, e, i) - q("right", s, t, e, i),
1034
+ y: t.y - q("top", s, t, e, i) - q("bottom", s, t, e, i)
1035
1035
  };
1036
1036
  }
1037
- class Me {
1037
+ class Be {
1038
1038
  /**
1039
1039
  * @param {Slide} slide
1040
1040
  */
@@ -1071,7 +1071,7 @@ class Me {
1071
1071
  _updateAxis(t) {
1072
1072
  const {
1073
1073
  pswp: e
1074
- } = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o = R(t === "x" ? "left" : "top", e.options, e.viewportSize, this.slide.data, this.slide.index), r = this.slide.panAreaSize[t];
1074
+ } = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o = q(t === "x" ? "left" : "top", e.options, e.viewportSize, this.slide.data, this.slide.index), r = this.slide.panAreaSize[t];
1075
1075
  this.center[t] = Math.round((r - i) / 2) + o, this.max[t] = i > r ? Math.round(r - i) + o : this.center[t], this.min[t] = i > r ? o : this.center[t];
1076
1076
  }
1077
1077
  // _getZeroBounds
@@ -1086,11 +1086,11 @@ class Me {
1086
1086
  * @returns {number}
1087
1087
  */
1088
1088
  correctPan(t, e) {
1089
- return H(e, this.max[t], this.min[t]);
1089
+ return U(e, this.max[t], this.min[t]);
1090
1090
  }
1091
1091
  }
1092
- const ht = 4e3;
1093
- let Dt = class {
1092
+ const gt = 4e3;
1093
+ let Ft = class {
1094
1094
  /**
1095
1095
  * @param {PhotoSwipeOptions} options PhotoSwipe options
1096
1096
  * @param {SlideData} itemData Slide data
@@ -1147,7 +1147,7 @@ let Dt = class {
1147
1147
  */
1148
1148
  _getSecondary() {
1149
1149
  let t = this._parseZoomLevelOption("secondary");
1150
- return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > ht && (t = ht / this.elementSize.x), t);
1150
+ return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > gt && (t = gt / this.elementSize.x), t);
1151
1151
  }
1152
1152
  /**
1153
1153
  * Get initial image zoom level.
@@ -1170,7 +1170,7 @@ let Dt = class {
1170
1170
  return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
1171
1171
  }
1172
1172
  };
1173
- class Oe {
1173
+ class Fe {
1174
1174
  /**
1175
1175
  * @param {SlideData} data
1176
1176
  * @param {number} index
@@ -1183,11 +1183,11 @@ class Oe {
1183
1183
  }, this.pan = {
1184
1184
  x: 0,
1185
1185
  y: 0
1186
- }, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new Dt(i.options, t, e, i), this.pswp.dispatch("gettingData", {
1186
+ }, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new Ft(i.options, t, e, i), this.pswp.dispatch("gettingData", {
1187
1187
  slide: this,
1188
1188
  data: this.data,
1189
1189
  index: e
1190
- }), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = E("pswp__zoom-wrap", "div"), this.holderElement = null, this.currZoomLevel = 1, this.width = this.content.width, this.height = this.content.height, this.heavyAppended = !1, this.bounds = new Me(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
1190
+ }), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = x("pswp__zoom-wrap", "div"), this.holderElement = null, this.currZoomLevel = 1, this.width = this.content.width, this.height = this.content.height, this.heavyAppended = !1, this.bounds = new Be(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
1191
1191
  slide: this
1192
1192
  });
1193
1193
  }
@@ -1311,7 +1311,7 @@ class Oe {
1311
1311
  transitionDuration: i
1312
1312
  }), o.animations.stopAllPan();
1313
1313
  const r = this.currZoomLevel;
1314
- n || (t = H(t, this.zoomLevels.min, this.zoomLevels.max)), this.setZoomLevel(t), this.pan.x = this.calculateZoomToPanOffset("x", e, r), this.pan.y = this.calculateZoomToPanOffset("y", e, r), Tt(this.pan);
1314
+ n || (t = U(t, this.zoomLevels.min, this.zoomLevels.max)), this.setZoomLevel(t), this.pan.x = this.calculateZoomToPanOffset("x", e, r), this.pan.y = this.calculateZoomToPanOffset("y", e, r), Ot(this.pan);
1315
1315
  const a = () => {
1316
1316
  this._setResolution(t), this.applyCurrentZoomPan();
1317
1317
  };
@@ -1406,20 +1406,20 @@ class Oe {
1406
1406
  * @private
1407
1407
  */
1408
1408
  _applyZoomTransform(t, e, i) {
1409
- i /= this.currentResolution || this.zoomLevels.initial, z(this.container, t, e, i);
1409
+ i /= this.currentResolution || this.zoomLevels.initial, D(this.container, t, e, i);
1410
1410
  }
1411
1411
  calculateSize() {
1412
1412
  const {
1413
1413
  pswp: t
1414
1414
  } = this;
1415
- S(this.panAreaSize, Ot(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
1415
+ S(this.panAreaSize, Bt(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
1416
1416
  slide: this
1417
1417
  });
1418
1418
  }
1419
1419
  /** @returns {string} */
1420
1420
  getCurrentTransform() {
1421
1421
  const t = this.currZoomLevel / (this.currentResolution || this.zoomLevels.initial);
1422
- return N(this.pan.x, this.pan.y, t);
1422
+ return G(this.pan.x, this.pan.y, t);
1423
1423
  }
1424
1424
  /**
1425
1425
  * Set resolution and re-render the image.
@@ -1440,11 +1440,11 @@ class Oe {
1440
1440
  t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
1441
1441
  }
1442
1442
  }
1443
- const De = 0.35, $e = 0.6, ut = 0.4, pt = 0.5;
1444
- function Re(s, t) {
1443
+ const Ze = 0.35, ke = 0.6, vt = 0.4, yt = 0.5;
1444
+ function qe(s, t) {
1445
1445
  return s * t / (1 - t);
1446
1446
  }
1447
- class Be {
1447
+ class Ne {
1448
1448
  /**
1449
1449
  * @param {Gestures} gestures
1450
1450
  */
@@ -1470,12 +1470,12 @@ class Be {
1470
1470
  if (!this.pswp.dispatch("verticalDrag", {
1471
1471
  panY: o
1472
1472
  }).defaultPrevented) {
1473
- this._setPanWithFriction("y", o, $e);
1473
+ this._setPanWithFriction("y", o, ke);
1474
1474
  const r = 1 - Math.abs(this._getVerticalDragRatio(n.pan.y));
1475
1475
  this.pswp.applyBgOpacity(r), n.applyCurrentZoomPan();
1476
1476
  }
1477
1477
  } else
1478
- this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (Tt(n.pan), n.applyCurrentZoomPan()));
1478
+ this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (Ot(n.pan), n.applyCurrentZoomPan()));
1479
1479
  }
1480
1480
  end() {
1481
1481
  const {
@@ -1487,7 +1487,7 @@ class Be {
1487
1487
  let n = 0;
1488
1488
  if (this.pswp.animations.stopAll(), e.isShifted()) {
1489
1489
  const r = (e.x - e.getCurrSlideX()) / this.pswp.viewportSize.x;
1490
- t.x < -pt && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > pt && r > 0 || t.x > -0.1 && r > 0.5) && (n = -1, t.x = Math.max(t.x, 0)), e.moveIndexBy(n, !0, t.x);
1490
+ t.x < -yt && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > yt && r > 0 || t.x > -0.1 && r > 0.5) && (n = -1, t.x = Math.max(t.x, 0)), e.moveIndexBy(n, !0, t.x);
1491
1491
  }
1492
1492
  i && i.currZoomLevel > i.zoomLevels.max || this.gestures.isMultitouch ? this.gestures.zoomLevels.correctZoomPan(!0) : (this._finishPanGestureForAxis("x"), this._finishPanGestureForAxis("y"));
1493
1493
  }
@@ -1506,10 +1506,10 @@ class Be {
1506
1506
  const {
1507
1507
  pan: n,
1508
1508
  bounds: o
1509
- } = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + Re(e[t], 0.995);
1509
+ } = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + qe(e[t], 0.995);
1510
1510
  if (a) {
1511
- const f = this._getVerticalDragRatio(r), p = this._getVerticalDragRatio(c);
1512
- if (f < 0 && p < -ut || f > 0 && p > ut) {
1511
+ const m = this._getVerticalDragRatio(r), p = this._getVerticalDragRatio(c);
1512
+ if (m < 0 && p < -vt || m > 0 && p > vt) {
1513
1513
  this.pswp.close();
1514
1514
  return;
1515
1515
  }
@@ -1517,7 +1517,7 @@ class Be {
1517
1517
  const d = o.correctPan(t, c);
1518
1518
  if (r === d)
1519
1519
  return;
1520
- const h = d === c ? 1 : 0.82, u = this.pswp.bgOpacity, m = d - r;
1520
+ const h = d === c ? 1 : 0.82, u = this.pswp.bgOpacity, f = d - r;
1521
1521
  this.pswp.animations.startSpring({
1522
1522
  name: "panGesture" + t,
1523
1523
  isPan: !0,
@@ -1525,12 +1525,12 @@ class Be {
1525
1525
  end: d,
1526
1526
  velocity: e[t],
1527
1527
  dampingRatio: h,
1528
- onUpdate: (f) => {
1528
+ onUpdate: (m) => {
1529
1529
  if (a && this.pswp.bgOpacity < 1) {
1530
- const p = 1 - (d - f) / m;
1531
- this.pswp.applyBgOpacity(H(u + (1 - u) * p, 0, 1));
1530
+ const p = 1 - (d - m) / f;
1531
+ this.pswp.applyBgOpacity(U(u + (1 - u) * p, 0, 1));
1532
1532
  }
1533
- n[t] = Math.floor(f), i.applyCurrentZoomPan();
1533
+ n[t] = Math.floor(m), i.applyCurrentZoomPan();
1534
1534
  }
1535
1535
  });
1536
1536
  }
@@ -1562,8 +1562,8 @@ class Be {
1562
1562
  bounds: d
1563
1563
  } = r, h = r.pan[t] + l;
1564
1564
  if (this.pswp.options.allowPanToNext && i === "x" && t === "x" && !o) {
1565
- const u = a.getCurrSlideX(), m = a.x - u, f = l > 0, p = !f;
1566
- if (h > d.min[t] && f) {
1565
+ const u = a.getCurrSlideX(), f = a.x - u, m = l > 0, p = !m;
1566
+ if (h > d.min[t] && m) {
1567
1567
  if (d.min[t] <= this.startPan[t])
1568
1568
  return a.moveTo(c, !0), !0;
1569
1569
  this._setPanWithFriction(t, h);
@@ -1571,10 +1571,10 @@ class Be {
1571
1571
  if (this.startPan[t] <= d.max[t])
1572
1572
  return a.moveTo(c, !0), !0;
1573
1573
  this._setPanWithFriction(t, h);
1574
- } else if (m !== 0) {
1575
- if (m > 0)
1574
+ } else if (f !== 0) {
1575
+ if (f > 0)
1576
1576
  return a.moveTo(Math.max(c, u), !0), !0;
1577
- if (m < 0)
1577
+ if (f < 0)
1578
1578
  return a.moveTo(Math.min(c, u), !0), !0;
1579
1579
  } else
1580
1580
  this._setPanWithFriction(t, h);
@@ -1621,16 +1621,16 @@ class Be {
1621
1621
  } = n;
1622
1622
  if (r.correctPan(t, e) !== e || i) {
1623
1623
  const l = Math.round(e - o[t]);
1624
- o[t] += l * (i || De);
1624
+ o[t] += l * (i || Ze);
1625
1625
  } else
1626
1626
  o[t] = e;
1627
1627
  }
1628
1628
  }
1629
- const Fe = 0.05, Ze = 0.15;
1630
- function mt(s, t, e) {
1629
+ const He = 0.05, We = 0.15;
1630
+ function _t(s, t, e) {
1631
1631
  return s.x = (t.x + e.x) / 2, s.y = (t.y + e.y) / 2, s;
1632
1632
  }
1633
- class ke {
1633
+ class Ve {
1634
1634
  /**
1635
1635
  * @param {Gestures} gestures
1636
1636
  */
@@ -1667,8 +1667,8 @@ class ke {
1667
1667
  const a = r.zoomLevels.min, l = r.zoomLevels.max;
1668
1668
  if (!r.isZoomable() || o.mainScroll.isShifted())
1669
1669
  return;
1670
- mt(this._startZoomPoint, e, n), mt(this._zoomPoint, t, i);
1671
- let c = 1 / Y(e, n) * Y(t, i) * this._startZoomLevel;
1670
+ _t(this._startZoomPoint, e, n), _t(this._zoomPoint, t, i);
1671
+ let c = 1 / it(e, n) * it(t, i) * this._startZoomLevel;
1672
1672
  if (c > r.zoomLevels.initial + r.zoomLevels.initial / 15 && (this._wasOverFitZoomLevel = !0), c < a)
1673
1673
  if (o.options.pinchToClose && !this._wasOverFitZoomLevel && this._startZoomLevel <= r.zoomLevels.initial) {
1674
1674
  const d = 1 - (a - c) / (a / 1.2);
@@ -1676,8 +1676,8 @@ class ke {
1676
1676
  bgOpacity: d
1677
1677
  }).defaultPrevented || o.applyBgOpacity(d);
1678
1678
  } else
1679
- c = a - (a - c) * Ze;
1680
- else c > l && (c = l + (c - l) * Fe);
1679
+ c = a - (a - c) * We;
1680
+ else c > l && (c = l + (c - l) * He);
1681
1681
  r.pan.x = this._calculatePanForZoomLevel("x", c), r.pan.y = this._calculatePanForZoomLevel("y", c), r.setZoomLevel(c), r.applyCurrentZoomPan();
1682
1682
  }
1683
1683
  end() {
@@ -1733,7 +1733,7 @@ class ke {
1733
1733
  x: i.bounds.correctPan("x", d.x),
1734
1734
  y: i.bounds.correctPan("y", d.y)
1735
1735
  }, i.setZoomLevel(n);
1736
- const h = !q(d, c);
1736
+ const h = !j(d, c);
1737
1737
  if (!h && !r && !l) {
1738
1738
  i._setResolution(o), i.applyCurrentZoomPan();
1739
1739
  return;
@@ -1748,12 +1748,12 @@ class ke {
1748
1748
  onUpdate: (u) => {
1749
1749
  if (u /= 1e3, h || r) {
1750
1750
  if (h && (i.pan.x = c.x + (d.x - c.x) * u, i.pan.y = c.y + (d.y - c.y) * u), r) {
1751
- const m = n + (o - n) * u;
1752
- i.setZoomLevel(m);
1751
+ const f = n + (o - n) * u;
1752
+ i.setZoomLevel(f);
1753
1753
  }
1754
1754
  i.applyCurrentZoomPan();
1755
1755
  }
1756
- l && e.bgOpacity < 1 && e.applyBgOpacity(H(a + (1 - a) * u, 0, 1));
1756
+ l && e.bgOpacity < 1 && e.applyBgOpacity(U(a + (1 - a) * u, 0, 1));
1757
1757
  },
1758
1758
  onComplete: () => {
1759
1759
  i._setResolution(o), i.applyCurrentZoomPan();
@@ -1761,11 +1761,11 @@ class ke {
1761
1761
  });
1762
1762
  }
1763
1763
  }
1764
- function ft(s) {
1764
+ function wt(s) {
1765
1765
  return !!/** @type {HTMLElement} */
1766
1766
  s.target.closest(".pswp__container");
1767
1767
  }
1768
- class qe {
1768
+ class je {
1769
1769
  /**
1770
1770
  * @param {Gestures} gestures
1771
1771
  */
@@ -1788,14 +1788,14 @@ class qe {
1788
1788
  * @param {PointerEvent} originalEvent
1789
1789
  */
1790
1790
  tap(t, e) {
1791
- ft(e) && this._doClickOrTapAction("tap", t, e);
1791
+ wt(e) && this._doClickOrTapAction("tap", t, e);
1792
1792
  }
1793
1793
  /**
1794
1794
  * @param {Point} point
1795
1795
  * @param {PointerEvent} originalEvent
1796
1796
  */
1797
1797
  doubleTap(t, e) {
1798
- ft(e) && this._doClickOrTapAction("doubleTap", t, e);
1798
+ wt(e) && this._doClickOrTapAction("doubleTap", t, e);
1799
1799
  }
1800
1800
  /**
1801
1801
  * @private
@@ -1839,8 +1839,8 @@ class qe {
1839
1839
  }
1840
1840
  }
1841
1841
  }
1842
- const Ne = 10, He = 300, We = 25;
1843
- class Ve {
1842
+ const Ge = 10, Ue = 300, Ke = 25;
1843
+ class Xe {
1844
1844
  /**
1845
1845
  * @param {PhotoSwipe} pswp
1846
1846
  */
@@ -1872,7 +1872,7 @@ class Ve {
1872
1872
  }, this._intervalP1 = {
1873
1873
  x: 0,
1874
1874
  y: 0
1875
- }, this._numActivePoints = 0, this._ongoingPointers = [], this._touchEventEnabled = "ontouchstart" in window, this._pointerEventEnabled = !!window.PointerEvent, this.supportsTouch = this._touchEventEnabled || this._pointerEventEnabled && navigator.maxTouchPoints > 1, this._numActivePoints = 0, this._intervalTime = 0, this._velocityCalculated = !1, this.isMultitouch = !1, this.isDragging = !1, this.isZooming = !1, this.raf = null, this._tapTimer = null, this.supportsTouch || (t.options.allowPanToNext = !1), this.drag = new Be(this), this.zoomLevels = new ke(this), this.tapHandler = new qe(this), t.on("bindEvents", () => {
1875
+ }, this._numActivePoints = 0, this._ongoingPointers = [], this._touchEventEnabled = "ontouchstart" in window, this._pointerEventEnabled = !!window.PointerEvent, this.supportsTouch = this._touchEventEnabled || this._pointerEventEnabled && navigator.maxTouchPoints > 1, this._numActivePoints = 0, this._intervalTime = 0, this._velocityCalculated = !1, this.isMultitouch = !1, this.isDragging = !1, this.isZooming = !1, this.raf = null, this._tapTimer = null, this.supportsTouch || (t.options.allowPanToNext = !1), this.drag = new Ne(this), this.zoomLevels = new Ve(this), this.tapHandler = new je(this), t.on("bindEvents", () => {
1876
1876
  t.events.add(
1877
1877
  t.scrollWrap,
1878
1878
  "click",
@@ -1962,7 +1962,7 @@ class Ve {
1962
1962
  * @private
1963
1963
  */
1964
1964
  _rafRenderLoop() {
1965
- (this.isDragging || this.isZooming) && (this._updateVelocity(), this.isDragging ? q(this.p1, this.prevP1) || this.drag.change() : (!q(this.p1, this.prevP1) || !q(this.p2, this.prevP2)) && this.zoomLevels.change(), this._updatePrevPoints(), this.raf = requestAnimationFrame(this._rafRenderLoop.bind(this)));
1965
+ (this.isDragging || this.isZooming) && (this._updateVelocity(), this.isDragging ? j(this.p1, this.prevP1) || this.drag.change() : (!j(this.p1, this.prevP1) || !j(this.p2, this.prevP2)) && this.zoomLevels.change(), this._updatePrevPoints(), this.raf = requestAnimationFrame(this._rafRenderLoop.bind(this)));
1966
1966
  }
1967
1967
  /**
1968
1968
  * Update velocity at 50ms interval
@@ -1992,8 +1992,8 @@ class Ve {
1992
1992
  this.tapHandler.click(this.startP1, t);
1993
1993
  return;
1994
1994
  }
1995
- const i = this.pswp.options.doubleTapAction ? He : 0;
1996
- this._tapTimer ? (this._clearTapTimer(), Y(this._lastStartP1, this.startP1) < We && this.tapHandler.doubleTap(this.startP1, t)) : (S(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
1995
+ const i = this.pswp.options.doubleTapAction ? Ue : 0;
1996
+ this._tapTimer ? (this._clearTapTimer(), it(this._lastStartP1, this.startP1) < Ke && this.tapHandler.doubleTap(this.startP1, t)) : (S(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
1997
1997
  this.tapHandler.tap(this.startP1, t), this._clearTapTimer();
1998
1998
  }, i));
1999
1999
  }
@@ -2079,7 +2079,7 @@ class Ve {
2079
2079
  const t = Math.abs(this.p1.x - this.startP1.x) - Math.abs(this.p1.y - this.startP1.y);
2080
2080
  if (t !== 0) {
2081
2081
  const e = t > 0 ? "x" : "y";
2082
- Math.abs(this.p1[e] - this.startP1[e]) >= Ne && (this.dragAxis = e);
2082
+ Math.abs(this.p1[e] - this.startP1[e]) >= Ge && (this.dragAxis = e);
2083
2083
  }
2084
2084
  }
2085
2085
  }
@@ -2103,8 +2103,8 @@ class Ve {
2103
2103
  this.pswp.mainScroll.isShifted() && (t.preventDefault(), t.stopPropagation());
2104
2104
  }
2105
2105
  }
2106
- const je = 0.35;
2107
- class Ge {
2106
+ const Ye = 0.35;
2107
+ class Je {
2108
2108
  /**
2109
2109
  * @param {PhotoSwipe} pswp
2110
2110
  */
@@ -2122,7 +2122,7 @@ class Ge {
2122
2122
  pswp: e
2123
2123
  } = this, i = Math.round(e.viewportSize.x + e.viewportSize.x * e.options.spacing), n = i !== this.slideWidth;
2124
2124
  n && (this.slideWidth = i, this.moveTo(this.getCurrSlideX())), this.itemHolders.forEach((o, r) => {
2125
- n && z(o.el, (r + this._containerShiftIndex) * this.slideWidth), t && o.slide && o.slide.resize();
2125
+ n && D(o.el, (r + this._containerShiftIndex) * this.slideWidth), t && o.slide && o.slide.resize();
2126
2126
  });
2127
2127
  }
2128
2128
  /**
@@ -2138,7 +2138,7 @@ class Ge {
2138
2138
  appendHolders() {
2139
2139
  this.itemHolders = [];
2140
2140
  for (let t = 0; t < 3; t++) {
2141
- const e = E("pswp__item", "div", this.pswp.container);
2141
+ const e = x("pswp__item", "div", this.pswp.container);
2142
2142
  e.setAttribute("role", "group"), e.setAttribute("aria-roledescription", "slide"), e.setAttribute("aria-hidden", "true"), e.style.display = t === 1 ? "block" : "none", this.itemHolders.push({
2143
2143
  el: e
2144
2144
  //index: -1
@@ -2241,7 +2241,7 @@ class Ge {
2241
2241
  (a = r.slide) === null || a === void 0 || a.destroy(), r.slide = void 0;
2242
2242
  }));
2243
2243
  for (let r = 0; r < n; r++)
2244
- i > 0 ? (o = this.itemHolders.shift(), o && (this.itemHolders[2] = o, this._containerShiftIndex++, z(o.el, (this._containerShiftIndex + 2) * this.slideWidth), e.setContent(o, e.currIndex - n + r + 2))) : (o = this.itemHolders.pop(), o && (this.itemHolders.unshift(o), this._containerShiftIndex--, z(o.el, this._containerShiftIndex * this.slideWidth), e.setContent(o, e.currIndex + n - r - 2)));
2244
+ i > 0 ? (o = this.itemHolders.shift(), o && (this.itemHolders[2] = o, this._containerShiftIndex++, D(o.el, (this._containerShiftIndex + 2) * this.slideWidth), e.setContent(o, e.currIndex - n + r + 2))) : (o = this.itemHolders.pop(), o && (this.itemHolders.unshift(o), this._containerShiftIndex--, D(o.el, this._containerShiftIndex * this.slideWidth), e.setContent(o, e.currIndex + n - r - 2)));
2245
2245
  Math.abs(this._containerShiftIndex) > 50 && !this.isShifted() && (this.resetPosition(), this.resize()), e.animations.stopAllPan(), this.itemHolders.forEach((r, a) => {
2246
2246
  r.slide && r.slide.setIsActive(a === 1);
2247
2247
  }), e.currSlide = (t = this.itemHolders[1]) === null || t === void 0 ? void 0 : t.slide, e.contentLoader.updateLazy(i), e.currSlide && e.currSlide.applyCurrentZoomPan(), e.dispatch("change");
@@ -2257,15 +2257,15 @@ class Ge {
2257
2257
  let i = (this.slideWidth * this._currPositionIndex - t) / this.slideWidth;
2258
2258
  i += this.pswp.currIndex;
2259
2259
  const n = Math.round(t - this.x);
2260
- (i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * je);
2260
+ (i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * Ye);
2261
2261
  }
2262
- this.x = t, this.pswp.container && z(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
2262
+ this.x = t, this.pswp.container && D(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
2263
2263
  x: t,
2264
2264
  dragging: e ?? !1
2265
2265
  });
2266
2266
  }
2267
2267
  }
2268
- const Ue = {
2268
+ const Qe = {
2269
2269
  Escape: 27,
2270
2270
  z: 90,
2271
2271
  ArrowLeft: 37,
@@ -2273,8 +2273,8 @@ const Ue = {
2273
2273
  ArrowRight: 39,
2274
2274
  ArrowDown: 40,
2275
2275
  Tab: 9
2276
- }, I = (s, t) => t ? s : Ue[s];
2277
- class Ke {
2276
+ }, O = (s, t) => t ? s : Qe[s];
2277
+ class ti {
2278
2278
  /**
2279
2279
  * @param {PhotoSwipe} pswp
2280
2280
  */
@@ -2314,30 +2314,30 @@ class Ke {
2314
2314
  } = this;
2315
2315
  if (e.dispatch("keydown", {
2316
2316
  originalEvent: t
2317
- }).defaultPrevented || Te(t))
2317
+ }).defaultPrevented || De(t))
2318
2318
  return;
2319
2319
  let i, n, o = !1;
2320
2320
  const r = "key" in t;
2321
2321
  switch (r ? t.key : t.keyCode) {
2322
- case I("Escape", r):
2322
+ case O("Escape", r):
2323
2323
  e.options.escKey && (i = "close");
2324
2324
  break;
2325
- case I("z", r):
2325
+ case O("z", r):
2326
2326
  i = "toggleZoom";
2327
2327
  break;
2328
- case I("ArrowLeft", r):
2328
+ case O("ArrowLeft", r):
2329
2329
  n = "x";
2330
2330
  break;
2331
- case I("ArrowUp", r):
2331
+ case O("ArrowUp", r):
2332
2332
  n = "y";
2333
2333
  break;
2334
- case I("ArrowRight", r):
2334
+ case O("ArrowRight", r):
2335
2335
  n = "x", o = !0;
2336
2336
  break;
2337
- case I("ArrowDown", r):
2337
+ case O("ArrowDown", r):
2338
2338
  o = !0, n = "y";
2339
2339
  break;
2340
- case I("Tab", r):
2340
+ case O("Tab", r):
2341
2341
  this._focusRoot();
2342
2342
  break;
2343
2343
  }
@@ -2366,8 +2366,8 @@ class Ke {
2366
2366
  ) && e.focus();
2367
2367
  }
2368
2368
  }
2369
- const Xe = "cubic-bezier(.4,0,.22,1)";
2370
- class Ye {
2369
+ const ei = "cubic-bezier(.4,0,.22,1)";
2370
+ class ii {
2371
2371
  /**
2372
2372
  * onComplete can be unpredictable, be careful about current state
2373
2373
  *
@@ -2383,12 +2383,12 @@ class Ye {
2383
2383
  onFinish: r = () => {
2384
2384
  },
2385
2385
  duration: a = 333,
2386
- easing: l = Xe
2386
+ easing: l = ei
2387
2387
  } = t;
2388
2388
  this.onFinish = r;
2389
2389
  const c = o ? "transform" : "opacity", d = (e = t[c]) !== null && e !== void 0 ? e : "";
2390
2390
  this._target = i, this._onComplete = n, this._finished = !1, this._onTransitionEnd = this._onTransitionEnd.bind(this), this._helperTimeout = setTimeout(() => {
2391
- It(i, c, a, l), this._helperTimeout = setTimeout(() => {
2391
+ Dt(i, c, a, l), this._helperTimeout = setTimeout(() => {
2392
2392
  i.addEventListener("transitionend", this._onTransitionEnd, !1), i.addEventListener("transitioncancel", this._onTransitionEnd, !1), this._helperTimeout = setTimeout(() => {
2393
2393
  this._finalizeAnimation();
2394
2394
  }, a + 500), i.style[c] = d;
@@ -2410,11 +2410,11 @@ class Ye {
2410
2410
  }
2411
2411
  // Destroy is called automatically onFinish
2412
2412
  destroy() {
2413
- this._helperTimeout && clearTimeout(this._helperTimeout), xe(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
2413
+ this._helperTimeout && clearTimeout(this._helperTimeout), Me(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
2414
2414
  }
2415
2415
  }
2416
- const Je = 12, Qe = 0.75;
2417
- class ti {
2416
+ const si = 12, ni = 0.75;
2417
+ class oi {
2418
2418
  /**
2419
2419
  * @param {number} initialVelocity Initial velocity, px per ms.
2420
2420
  *
@@ -2431,7 +2431,7 @@ class ti {
2431
2431
  * Recommended value from 10 to 50
2432
2432
  */
2433
2433
  constructor(t, e, i) {
2434
- this.velocity = t * 1e3, this._dampingRatio = e || Qe, this._naturalFrequency = i || Je, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
2434
+ this.velocity = t * 1e3, this._dampingRatio = e || ni, this._naturalFrequency = i || si, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
2435
2435
  }
2436
2436
  /**
2437
2437
  * @param {number} deltaPosition Difference between current and end position of the animation
@@ -2453,7 +2453,7 @@ class ti {
2453
2453
  return i;
2454
2454
  }
2455
2455
  }
2456
- class ei {
2456
+ class ri {
2457
2457
  /**
2458
2458
  * @param {SpringAnimationProps} props
2459
2459
  */
@@ -2471,19 +2471,19 @@ class ei {
2471
2471
  naturalFrequency: c
2472
2472
  } = t;
2473
2473
  this.onFinish = a;
2474
- const d = new ti(n, l, c);
2474
+ const d = new oi(n, l, c);
2475
2475
  let h = Date.now(), u = e - i;
2476
- const m = () => {
2477
- this._raf && (u = d.easeFrame(u, Date.now() - h), Math.abs(u) < 1 && Math.abs(d.velocity) < 50 ? (o(i), r && r(), this.onFinish()) : (h = Date.now(), o(u + i), this._raf = requestAnimationFrame(m)));
2476
+ const f = () => {
2477
+ this._raf && (u = d.easeFrame(u, Date.now() - h), Math.abs(u) < 1 && Math.abs(d.velocity) < 50 ? (o(i), r && r(), this.onFinish()) : (h = Date.now(), o(u + i), this._raf = requestAnimationFrame(f)));
2478
2478
  };
2479
- this._raf = requestAnimationFrame(m);
2479
+ this._raf = requestAnimationFrame(f);
2480
2480
  }
2481
2481
  // Destroy is called automatically onFinish
2482
2482
  destroy() {
2483
2483
  this._raf >= 0 && cancelAnimationFrame(this._raf), this._raf = 0;
2484
2484
  }
2485
2485
  }
2486
- class ii {
2486
+ class ai {
2487
2487
  constructor() {
2488
2488
  this.activeAnimations = [];
2489
2489
  }
@@ -2506,10 +2506,10 @@ class ii {
2506
2506
  * @returns {Animation}
2507
2507
  */
2508
2508
  _start(t, e) {
2509
- const i = e ? new ei(
2509
+ const i = e ? new ri(
2510
2510
  /** @type SpringAnimationProps */
2511
2511
  t
2512
- ) : new Ye(
2512
+ ) : new ii(
2513
2513
  /** @type CssAnimationProps */
2514
2514
  t
2515
2515
  );
@@ -2552,7 +2552,7 @@ class ii {
2552
2552
  return this.activeAnimations.some((t) => t.props.isPan);
2553
2553
  }
2554
2554
  }
2555
- class si {
2555
+ class li {
2556
2556
  /**
2557
2557
  * @param {PhotoSwipe} pswp
2558
2558
  */
@@ -2594,7 +2594,7 @@ class si {
2594
2594
  e.isPannable() && (t.deltaMode === 1 && (i *= 18, n *= 18), e.panTo(e.pan.x - i, e.pan.y - n));
2595
2595
  }
2596
2596
  }
2597
- function ni(s) {
2597
+ function ci(s) {
2598
2598
  if (typeof s == "string")
2599
2599
  return s;
2600
2600
  if (!s || !s.isCustomSVG)
@@ -2606,7 +2606,7 @@ function ni(s) {
2606
2606
  t.size || 32
2607
2607
  ), t.outlineID && (e += '<use class="pswp__icn-shadow" xlink:href="#' + t.outlineID + '"/>'), e += t.inner, e += "</svg>", e;
2608
2608
  }
2609
- class oi {
2609
+ class di {
2610
2610
  /**
2611
2611
  * @param {PhotoSwipe} pswp
2612
2612
  * @param {UIElementData} data
@@ -2625,7 +2625,7 @@ class oi {
2625
2625
  let a = e.isButton ? e.tagName || "button" : e.tagName || "div";
2626
2626
  a = /** @type {keyof HTMLElementTagNameMap} */
2627
2627
  a.toLowerCase();
2628
- const l = E(r, a);
2628
+ const l = x(r, a);
2629
2629
  if (e.isButton) {
2630
2630
  a === "button" && (l.type = "button");
2631
2631
  let {
@@ -2635,23 +2635,23 @@ class oi {
2635
2635
  ariaLabel: u
2636
2636
  } = e;
2637
2637
  typeof t.options[n + "Title"] == "string" && (h = t.options[n + "Title"]), h && (l.title = h);
2638
- const m = u || h;
2639
- m && l.setAttribute("aria-label", m);
2638
+ const f = u || h;
2639
+ f && l.setAttribute("aria-label", f);
2640
2640
  }
2641
- l.innerHTML = ni(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (h) => {
2641
+ l.innerHTML = ci(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (h) => {
2642
2642
  typeof e.onClick == "string" ? t[e.onClick]() : typeof e.onClick == "function" && e.onClick(h, l, t);
2643
2643
  });
2644
2644
  const c = e.appendTo || "bar";
2645
2645
  let d = t.element;
2646
- c === "bar" ? (t.topBar || (t.topBar = E("pswp__top-bar pswp__hide-on-close", "div", t.scrollWrap)), d = t.topBar) : (l.classList.add("pswp__hide-on-close"), c === "wrapper" && (d = t.scrollWrap)), (i = d) === null || i === void 0 || i.appendChild(t.applyFilters("uiElement", l, e));
2646
+ c === "bar" ? (t.topBar || (t.topBar = x("pswp__top-bar pswp__hide-on-close", "div", t.scrollWrap)), d = t.topBar) : (l.classList.add("pswp__hide-on-close"), c === "wrapper" && (d = t.scrollWrap)), (i = d) === null || i === void 0 || i.appendChild(t.applyFilters("uiElement", l, e));
2647
2647
  }
2648
2648
  }
2649
- function $t(s, t, e) {
2649
+ function Zt(s, t, e) {
2650
2650
  s.classList.add("pswp__button--arrow"), s.setAttribute("aria-controls", "pswp__items"), t.on("change", () => {
2651
2651
  t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
2652
2652
  });
2653
2653
  }
2654
- const ri = {
2654
+ const hi = {
2655
2655
  name: "arrowPrev",
2656
2656
  className: "pswp__button--arrow--prev",
2657
2657
  title: "Previous",
@@ -2665,8 +2665,8 @@ const ri = {
2665
2665
  outlineID: "pswp__icn-arrow"
2666
2666
  },
2667
2667
  onClick: "prev",
2668
- onInit: $t
2669
- }, ai = {
2668
+ onInit: Zt
2669
+ }, ui = {
2670
2670
  name: "arrowNext",
2671
2671
  className: "pswp__button--arrow--next",
2672
2672
  title: "Next",
@@ -2681,9 +2681,9 @@ const ri = {
2681
2681
  },
2682
2682
  onClick: "next",
2683
2683
  onInit: (s, t) => {
2684
- $t(s, t, !0);
2684
+ Zt(s, t, !0);
2685
2685
  }
2686
- }, li = {
2686
+ }, pi = {
2687
2687
  name: "close",
2688
2688
  title: "Close",
2689
2689
  order: 20,
@@ -2694,7 +2694,7 @@ const ri = {
2694
2694
  outlineID: "pswp__icn-close"
2695
2695
  },
2696
2696
  onClick: "close"
2697
- }, ci = {
2697
+ }, mi = {
2698
2698
  name: "zoom",
2699
2699
  title: "Zoom",
2700
2700
  order: 10,
@@ -2706,7 +2706,7 @@ const ri = {
2706
2706
  outlineID: "pswp__icn-zoom"
2707
2707
  },
2708
2708
  onClick: "toggleZoom"
2709
- }, di = {
2709
+ }, fi = {
2710
2710
  name: "preloader",
2711
2711
  appendTo: "bar",
2712
2712
  order: 7,
@@ -2737,7 +2737,7 @@ const ri = {
2737
2737
  t.currSlide === a.slide && r();
2738
2738
  }), t.ui && (t.ui.updatePreloaderVisibility = r);
2739
2739
  }
2740
- }, hi = {
2740
+ }, gi = {
2741
2741
  name: "counter",
2742
2742
  order: 5,
2743
2743
  onInit: (s, t) => {
@@ -2746,10 +2746,10 @@ const ri = {
2746
2746
  });
2747
2747
  }
2748
2748
  };
2749
- function gt(s, t) {
2749
+ function bt(s, t) {
2750
2750
  s.classList.toggle("pswp--zoomed-in", t);
2751
2751
  }
2752
- class ui {
2752
+ class vi {
2753
2753
  /**
2754
2754
  * @param {PhotoSwipe} pswp
2755
2755
  */
@@ -2761,7 +2761,7 @@ class ui {
2761
2761
  const {
2762
2762
  pswp: t
2763
2763
  } = this;
2764
- this.isRegistered = !1, this.uiElementsData = [li, ri, ai, ci, di, hi], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
2764
+ this.isRegistered = !1, this.uiElementsData = [pi, hi, ui, mi, fi, gi], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
2765
2765
  this.registerElement(e);
2766
2766
  }), t.on("change", () => {
2767
2767
  var e;
@@ -2772,7 +2772,7 @@ class ui {
2772
2772
  * @param {UIElementData} elementData
2773
2773
  */
2774
2774
  registerElement(t) {
2775
- this.isRegistered ? this.items.push(new oi(this.pswp, t)) : this.uiElementsData.push(t);
2775
+ this.isRegistered ? this.items.push(new di(this.pswp, t)) : this.uiElementsData.push(t);
2776
2776
  }
2777
2777
  /**
2778
2778
  * Fired each time zoom or pan position is changed.
@@ -2796,15 +2796,15 @@ class ui {
2796
2796
  this._lastUpdatedZoomLevel = n;
2797
2797
  const o = e.zoomLevels.initial - e.zoomLevels.secondary;
2798
2798
  if (Math.abs(o) < 0.01 || !e.isZoomable()) {
2799
- gt(t, !1), t.classList.remove("pswp--zoom-allowed");
2799
+ bt(t, !1), t.classList.remove("pswp--zoom-allowed");
2800
2800
  return;
2801
2801
  }
2802
2802
  t.classList.add("pswp--zoom-allowed");
2803
2803
  const r = n === e.zoomLevels.initial ? e.zoomLevels.secondary : e.zoomLevels.initial;
2804
- gt(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
2804
+ bt(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
2805
2805
  }
2806
2806
  }
2807
- function pi(s) {
2807
+ function yi(s) {
2808
2808
  const t = s.getBoundingClientRect();
2809
2809
  return {
2810
2810
  x: t.left,
@@ -2812,7 +2812,7 @@ function pi(s) {
2812
2812
  w: t.width
2813
2813
  };
2814
2814
  }
2815
- function mi(s, t, e) {
2815
+ function _i(s, t, e) {
2816
2816
  const i = s.getBoundingClientRect(), n = i.width / t, o = i.height / e, r = n > o ? n : o, a = (i.width - t * r) / 2, l = (i.height - e * r) / 2, c = {
2817
2817
  x: i.left + a,
2818
2818
  y: i.top + l,
@@ -2825,7 +2825,7 @@ function mi(s, t, e) {
2825
2825
  y: l
2826
2826
  }, c;
2827
2827
  }
2828
- function fi(s, t, e) {
2828
+ function wi(s, t, e) {
2829
2829
  const i = e.dispatch("thumbBounds", {
2830
2830
  index: s,
2831
2831
  itemData: t,
@@ -2844,9 +2844,9 @@ function fi(s, t, e) {
2844
2844
  n.querySelector(a)
2845
2845
  );
2846
2846
  }
2847
- return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = mi(r, t.width || t.w || 0, t.height || t.h || 0) : o = pi(r)), e.applyFilters("thumbBounds", o, t, s);
2847
+ return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = _i(r, t.width || t.w || 0, t.height || t.h || 0) : o = yi(r)), e.applyFilters("thumbBounds", o, t, s);
2848
2848
  }
2849
- let gi = class {
2849
+ let bi = class {
2850
2850
  /**
2851
2851
  * @param {T} type
2852
2852
  * @param {PhotoSwipeEventsMap[T]} [details]
@@ -2857,7 +2857,7 @@ let gi = class {
2857
2857
  preventDefault() {
2858
2858
  this.defaultPrevented = !0;
2859
2859
  }
2860
- }, vi = class {
2860
+ }, Si = class {
2861
2861
  constructor() {
2862
2862
  this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
2863
2863
  }
@@ -2924,19 +2924,19 @@ let gi = class {
2924
2924
  return this.pswp.dispatch(t, e);
2925
2925
  const n = (
2926
2926
  /** @type {AugmentedEvent<T>} */
2927
- new gi(t, e)
2927
+ new bi(t, e)
2928
2928
  );
2929
2929
  return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
2930
2930
  o.call(this, n);
2931
2931
  }), n;
2932
2932
  }
2933
- }, yi = class {
2933
+ }, Li = class {
2934
2934
  /**
2935
2935
  * @param {string | false} imageSrc
2936
2936
  * @param {HTMLElement} container
2937
2937
  */
2938
2938
  constructor(t, e) {
2939
- if (this.element = E("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
2939
+ if (this.element = x("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
2940
2940
  const i = (
2941
2941
  /** @type {HTMLImageElement} */
2942
2942
  this.element
@@ -2950,20 +2950,20 @@ let gi = class {
2950
2950
  * @param {number} height
2951
2951
  */
2952
2952
  setDisplayedSize(t, e) {
2953
- this.element && (this.element.tagName === "IMG" ? (J(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = N(0, 0, t / 250)) : J(this.element, t, e));
2953
+ this.element && (this.element.tagName === "IMG" ? (st(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = G(0, 0, t / 250)) : st(this.element, t, e));
2954
2954
  }
2955
2955
  destroy() {
2956
2956
  var t;
2957
2957
  (t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
2958
2958
  }
2959
- }, _i = class {
2959
+ }, Ai = class {
2960
2960
  /**
2961
2961
  * @param {SlideData} itemData Slide data
2962
2962
  * @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
2963
2963
  * @param {number} index
2964
2964
  */
2965
2965
  constructor(t, e, i) {
2966
- this.instance = e, this.data = t, this.index = i, this.element = void 0, this.placeholder = void 0, this.slide = void 0, this.displayedImageWidth = 0, this.displayedImageHeight = 0, this.width = Number(this.data.w) || Number(this.data.width) || 0, this.height = Number(this.data.h) || Number(this.data.height) || 0, this.isAttached = !1, this.hasSlide = !1, this.isDecoding = !1, this.state = C.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", {
2966
+ this.instance = e, this.data = t, this.index = i, this.element = void 0, this.placeholder = void 0, this.slide = void 0, this.displayedImageWidth = 0, this.displayedImageHeight = 0, this.width = Number(this.data.w) || Number(this.data.width) || 0, this.height = Number(this.data.h) || Number(this.data.height) || 0, this.isAttached = !1, this.hasSlide = !1, this.isDecoding = !1, this.state = P.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", {
2967
2967
  content: this
2968
2968
  });
2969
2969
  }
@@ -2991,12 +2991,12 @@ let gi = class {
2991
2991
  this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
2992
2992
  this
2993
2993
  );
2994
- this.placeholder = new yi(i, this.slide.container);
2994
+ this.placeholder = new Li(i, this.slide.container);
2995
2995
  }
2996
2996
  this.element && !e || this.instance.dispatch("contentLoad", {
2997
2997
  content: this,
2998
2998
  isLazy: t
2999
- }).defaultPrevented || (this.isImageContent() ? (this.element = E("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = E("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), e && this.slide && this.slide.updateContentSize(!0));
2999
+ }).defaultPrevented || (this.isImageContent() ? (this.element = x("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = x("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), e && this.slide && this.slide.updateContentSize(!0));
3000
3000
  }
3001
3001
  /**
3002
3002
  * Preload image
@@ -3014,7 +3014,7 @@ let gi = class {
3014
3014
  /** @type HTMLImageElement */
3015
3015
  this.element
3016
3016
  );
3017
- this.updateSrcsetSizes(), this.data.srcset && (n.srcset = this.data.srcset), n.src = (e = this.data.src) !== null && e !== void 0 ? e : "", n.alt = (i = this.data.alt) !== null && i !== void 0 ? i : "", this.state = C.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
3017
+ this.updateSrcsetSizes(), this.data.srcset && (n.srcset = this.data.srcset), n.src = (e = this.data.src) !== null && e !== void 0 ? e : "", n.alt = (i = this.data.alt) !== null && i !== void 0 ? i : "", this.state = P.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
3018
3018
  this.onLoaded();
3019
3019
  }, n.onerror = () => {
3020
3020
  this.onError();
@@ -3032,16 +3032,16 @@ let gi = class {
3032
3032
  * Content load success handler
3033
3033
  */
3034
3034
  onLoaded() {
3035
- this.state = C.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
3035
+ this.state = P.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
3036
3036
  slide: this.slide,
3037
3037
  content: this
3038
- }), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === C.LOADED || this.state === C.ERROR) && this.removePlaceholder());
3038
+ }), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === P.LOADED || this.state === P.ERROR) && this.removePlaceholder());
3039
3039
  }
3040
3040
  /**
3041
3041
  * Content load error handler
3042
3042
  */
3043
3043
  onError() {
3044
- this.state = C.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
3044
+ this.state = P.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
3045
3045
  slide: this.slide,
3046
3046
  isError: !0,
3047
3047
  content: this
@@ -3054,13 +3054,13 @@ let gi = class {
3054
3054
  * @returns {Boolean} If the content is currently loading
3055
3055
  */
3056
3056
  isLoading() {
3057
- return this.instance.applyFilters("isContentLoading", this.state === C.LOADING, this);
3057
+ return this.instance.applyFilters("isContentLoading", this.state === P.LOADING, this);
3058
3058
  }
3059
3059
  /**
3060
3060
  * @returns {Boolean} If the content is in error state
3061
3061
  */
3062
3062
  isError() {
3063
- return this.state === C.ERROR;
3063
+ return this.state === P.ERROR;
3064
3064
  }
3065
3065
  /**
3066
3066
  * @returns {boolean} If the content is image
@@ -3079,7 +3079,7 @@ let gi = class {
3079
3079
  content: this,
3080
3080
  width: t,
3081
3081
  height: e
3082
- }).defaultPrevented && (J(this.element, t, e), this.isImageContent() && !this.isError()))) {
3082
+ }).defaultPrevented && (st(this.element, t, e), this.isImageContent() && !this.isError()))) {
3083
3083
  const i = !this.displayedImageWidth && t;
3084
3084
  this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
3085
3085
  slide: this.slide,
@@ -3093,7 +3093,7 @@ let gi = class {
3093
3093
  * @returns {boolean} If the content can be zoomed
3094
3094
  */
3095
3095
  isZoomable() {
3096
- return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== C.ERROR, this);
3096
+ return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== P.ERROR, this);
3097
3097
  }
3098
3098
  /**
3099
3099
  * Update image srcset sizes attribute based on width and height
@@ -3141,9 +3141,9 @@ let gi = class {
3141
3141
  displayError() {
3142
3142
  if (this.slide) {
3143
3143
  var t, e;
3144
- let i = E("pswp__error-msg", "div");
3144
+ let i = x("pswp__error-msg", "div");
3145
3145
  i.innerText = (t = (e = this.instance.options) === null || e === void 0 ? void 0 : e.errorMsg) !== null && t !== void 0 ? t : "", i = /** @type {HTMLDivElement} */
3146
- this.instance.applyFilters("contentErrorElement", i, this), this.element = E("pswp__content pswp__error-msg-container", "div"), this.element.appendChild(i), this.slide.container.innerText = "", this.slide.container.appendChild(this.element), this.slide.updateContentSize(!0), this.removePlaceholder();
3146
+ this.instance.applyFilters("contentErrorElement", i, this), this.element = x("pswp__content pswp__error-msg-container", "div"), this.element.appendChild(i), this.slide.container.innerText = "", this.slide.container.appendChild(this.element), this.slide.updateContentSize(!0), this.removePlaceholder();
3147
3147
  }
3148
3148
  }
3149
3149
  /**
@@ -3152,7 +3152,7 @@ let gi = class {
3152
3152
  append() {
3153
3153
  if (this.isAttached || !this.element)
3154
3154
  return;
3155
- if (this.isAttached = !0, this.state === C.ERROR) {
3155
+ if (this.isAttached = !0, this.state === P.ERROR) {
3156
3156
  this.displayError();
3157
3157
  return;
3158
3158
  }
@@ -3161,7 +3161,7 @@ let gi = class {
3161
3161
  }).defaultPrevented)
3162
3162
  return;
3163
3163
  const t = "decode" in this.element;
3164
- this.isImageContent() ? t && this.slide && (!this.slide.isActive || dt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
3164
+ this.isImageContent() ? t && this.slide && (!this.slide.isActive || ft()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
3165
3165
  }).finally(() => {
3166
3166
  this.isDecoding = !1, this.appendImage();
3167
3167
  })) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
@@ -3174,7 +3174,7 @@ let gi = class {
3174
3174
  activate() {
3175
3175
  this.instance.dispatch("contentActivate", {
3176
3176
  content: this
3177
- }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !dt() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
3177
+ }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !ft() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
3178
3178
  }
3179
3179
  /**
3180
3180
  * Deactivate the content
@@ -3198,39 +3198,39 @@ let gi = class {
3198
3198
  appendImage() {
3199
3199
  this.isAttached && (this.instance.dispatch("contentAppendImage", {
3200
3200
  content: this
3201
- }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === C.LOADED || this.state === C.ERROR) && this.removePlaceholder()));
3201
+ }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === P.LOADED || this.state === P.ERROR) && this.removePlaceholder()));
3202
3202
  }
3203
3203
  };
3204
- const wi = 5;
3205
- function Rt(s, t, e) {
3204
+ const Ei = 5;
3205
+ function kt(s, t, e) {
3206
3206
  const i = t.createContentFromData(s, e);
3207
3207
  let n;
3208
3208
  const {
3209
3209
  options: o
3210
3210
  } = t;
3211
3211
  if (o) {
3212
- n = new Dt(o, s, -1);
3212
+ n = new Ft(o, s, -1);
3213
3213
  let r;
3214
- t.pswp ? r = t.pswp.viewportSize : r = Mt(o, t);
3215
- const a = Ot(o, r, s, e);
3214
+ t.pswp ? r = t.pswp.viewportSize : r = Rt(o, t);
3215
+ const a = Bt(o, r, s, e);
3216
3216
  n.update(i.width, i.height, a);
3217
3217
  }
3218
3218
  return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
3219
3219
  }
3220
- function bi(s, t) {
3220
+ function Ci(s, t) {
3221
3221
  const e = t.getItemData(s);
3222
3222
  if (!t.dispatch("lazyLoadSlide", {
3223
3223
  index: s,
3224
3224
  itemData: e
3225
3225
  }).defaultPrevented)
3226
- return Rt(e, t, s);
3226
+ return kt(e, t, s);
3227
3227
  }
3228
- class Si {
3228
+ class xi {
3229
3229
  /**
3230
3230
  * @param {PhotoSwipe} pswp
3231
3231
  */
3232
3232
  constructor(t) {
3233
- this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, wi), this._cachedItems = [];
3233
+ this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, Ei), this._cachedItems = [];
3234
3234
  }
3235
3235
  /**
3236
3236
  * Lazy load nearby slides based on `preload` option.
@@ -3258,7 +3258,7 @@ class Si {
3258
3258
  loadSlideByIndex(t) {
3259
3259
  const e = this.pswp.getLoopedIndex(t);
3260
3260
  let i = this.getContentByIndex(e);
3261
- i || (i = bi(e, this.pswp), i && this.addToCache(i));
3261
+ i || (i = Ci(e, this.pswp), i && this.addToCache(i));
3262
3262
  }
3263
3263
  /**
3264
3264
  * @param {Slide} slide
@@ -3297,7 +3297,7 @@ class Si {
3297
3297
  this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
3298
3298
  }
3299
3299
  }
3300
- let Li = class extends vi {
3300
+ let Pi = class extends Si {
3301
3301
  /**
3302
3302
  * Get total number of slides
3303
3303
  *
@@ -3320,7 +3320,7 @@ let Li = class extends vi {
3320
3320
  * @returns {Content}
3321
3321
  */
3322
3322
  createContentFromData(t, e) {
3323
- return new _i(t, this, e);
3323
+ return new Ai(t, this, e);
3324
3324
  }
3325
3325
  /**
3326
3326
  * Get item data by index.
@@ -3354,7 +3354,7 @@ let Li = class extends vi {
3354
3354
  */
3355
3355
  _getGalleryDOMElements(t) {
3356
3356
  var e, i;
3357
- return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? Ie(this.options.children, this.options.childSelector, t) || [] : [t];
3357
+ return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? $e(this.options.children, this.options.childSelector, t) || [] : [t];
3358
3358
  }
3359
3359
  /**
3360
3360
  * Converts DOM element to item data object.
@@ -3388,11 +3388,11 @@ let Li = class extends vi {
3388
3388
  * @returns {Content} Image that is being decoded or false.
3389
3389
  */
3390
3390
  lazyLoadData(t, e) {
3391
- return Rt(t, this, e);
3391
+ return kt(t, this, e);
3392
3392
  }
3393
3393
  };
3394
- const $ = 3e-3;
3395
- class Ai {
3394
+ const k = 3e-3;
3395
+ class Ti {
3396
3396
  /**
3397
3397
  * @param {PhotoSwipe} pswp
3398
3398
  */
@@ -3430,8 +3430,8 @@ class Ai {
3430
3430
  var n;
3431
3431
  this._animateRootOpacity = (n = i.showHideOpacity) !== null && n !== void 0 ? n : !1;
3432
3432
  }
3433
- if (this._animateBgOpacity = !this._animateRootOpacity && this.pswp.options.bgOpacity > $, this._opacityElement = this._animateRootOpacity ? t.element : t.bg, !this._useAnimation) {
3434
- this._duration = 0, this._animateZoom = !1, this._animateBgOpacity = !1, this._animateRootOpacity = !0, this.isOpening && (t.element && (t.element.style.opacity = String($)), t.applyBgOpacity(1));
3433
+ if (this._animateBgOpacity = !this._animateRootOpacity && this.pswp.options.bgOpacity > k, this._opacityElement = this._animateRootOpacity ? t.element : t.bg, !this._useAnimation) {
3434
+ this._duration = 0, this._animateZoom = !1, this._animateBgOpacity = !1, this._animateRootOpacity = !0, this.isOpening && (t.element && (t.element.style.opacity = String(k)), t.applyBgOpacity(1));
3435
3435
  return;
3436
3436
  }
3437
3437
  if (this._animateZoom && this._thumbBounds && this._thumbBounds.innerRect) {
@@ -3439,13 +3439,13 @@ class Ai {
3439
3439
  this._croppedZoom = !0, this._cropContainer1 = this.pswp.container, this._cropContainer2 = (o = this.pswp.currSlide) === null || o === void 0 ? void 0 : o.holderElement, t.container && (t.container.style.overflow = "hidden", t.container.style.width = t.viewportSize.x + "px");
3440
3440
  } else
3441
3441
  this._croppedZoom = !1;
3442
- this.isOpening ? (this._animateRootOpacity ? (t.element && (t.element.style.opacity = String($)), t.applyBgOpacity(1)) : (this._animateBgOpacity && t.bg && (t.bg.style.opacity = String($)), t.element && (t.element.style.opacity = "1")), this._animateZoom && (this._setClosedStateZoomPan(), this._placeholder && (this._placeholder.style.willChange = "transform", this._placeholder.style.opacity = String($)))) : this.isClosing && (t.mainScroll.itemHolders[0] && (t.mainScroll.itemHolders[0].el.style.display = "none"), t.mainScroll.itemHolders[2] && (t.mainScroll.itemHolders[2].el.style.display = "none"), this._croppedZoom && t.mainScroll.x !== 0 && (t.mainScroll.resetPosition(), t.mainScroll.resize()));
3442
+ this.isOpening ? (this._animateRootOpacity ? (t.element && (t.element.style.opacity = String(k)), t.applyBgOpacity(1)) : (this._animateBgOpacity && t.bg && (t.bg.style.opacity = String(k)), t.element && (t.element.style.opacity = "1")), this._animateZoom && (this._setClosedStateZoomPan(), this._placeholder && (this._placeholder.style.willChange = "transform", this._placeholder.style.opacity = String(k)))) : this.isClosing && (t.mainScroll.itemHolders[0] && (t.mainScroll.itemHolders[0].el.style.display = "none"), t.mainScroll.itemHolders[2] && (t.mainScroll.itemHolders[2].el.style.display = "none"), this._croppedZoom && t.mainScroll.x !== 0 && (t.mainScroll.resetPosition(), t.mainScroll.resize()));
3443
3443
  }
3444
3444
  /** @private */
3445
3445
  _start() {
3446
3446
  this.isOpening && this._useAnimation && this._placeholder && this._placeholder.tagName === "IMG" ? new Promise((t) => {
3447
3447
  let e = !1, i = !0;
3448
- Pe(
3448
+ Oe(
3449
3449
  /** @type {HTMLImageElement} */
3450
3450
  this._placeholder
3451
3451
  ).finally(() => {
@@ -3508,7 +3508,7 @@ class Ai {
3508
3508
  } = e;
3509
3509
  if (this._croppedZoom && i && this._cropContainer1 && this._cropContainer2) {
3510
3510
  const r = -o.x + (this._thumbBounds.x - i.x) + i.w, a = -o.y + (this._thumbBounds.y - i.y) + i.h, l = o.x - i.w, c = o.y - i.h;
3511
- t ? (this._animateTo(this._cropContainer1, "transform", N(r, a)), this._animateTo(this._cropContainer2, "transform", N(l, c))) : (z(this._cropContainer1, r, a), z(this._cropContainer2, l, c));
3511
+ t ? (this._animateTo(this._cropContainer1, "transform", G(r, a)), this._animateTo(this._cropContainer2, "transform", G(l, c))) : (D(this._cropContainer1, r, a), D(this._cropContainer2, l, c));
3512
3512
  }
3513
3513
  n && (S(n.pan, i || this._thumbBounds), n.currZoomLevel = this._thumbBounds.w / n.width, t ? this._animateTo(n.container, "transform", n.getCurrentTransform()) : n.applyCurrentZoomPan());
3514
3514
  }
@@ -3536,7 +3536,7 @@ class Ai {
3536
3536
  o[e] = i, n.startTransition(o);
3537
3537
  }
3538
3538
  }
3539
- const Ei = {
3539
+ const Ii = {
3540
3540
  allowPanToNext: !0,
3541
3541
  spacing: 0.1,
3542
3542
  loop: !0,
@@ -3563,7 +3563,7 @@ const Ei = {
3563
3563
  preload: [1, 2],
3564
3564
  easing: "cubic-bezier(.4,0,.22,1)"
3565
3565
  };
3566
- class Ci extends Li {
3566
+ class zi extends Pi {
3567
3567
  /**
3568
3568
  * @param {PhotoSwipeOptions} [options]
3569
3569
  */
@@ -3577,7 +3577,7 @@ class Ci extends Li {
3577
3577
  }, this.viewportSize = {
3578
3578
  x: 0,
3579
3579
  y: 0
3580
- }, this.bgOpacity = 1, this.currIndex = 0, this.potentialIndex = 0, this.isOpen = !1, this.isDestroying = !1, this.hasMouse = !1, this._initialItemData = {}, this._initialThumbBounds = void 0, this.topBar = void 0, this.element = void 0, this.template = void 0, this.container = void 0, this.scrollWrap = void 0, this.currSlide = void 0, this.events = new ze(), this.animations = new ii(), this.mainScroll = new Ge(this), this.gestures = new Ve(this), this.opener = new Ai(this), this.keyboard = new Ke(this), this.contentLoader = new Si(this);
3580
+ }, this.bgOpacity = 1, this.currIndex = 0, this.potentialIndex = 0, this.isOpen = !1, this.isDestroying = !1, this.hasMouse = !1, this._initialItemData = {}, this._initialThumbBounds = void 0, this.topBar = void 0, this.element = void 0, this.template = void 0, this.container = void 0, this.scrollWrap = void 0, this.currSlide = void 0, this.events = new Re(), this.animations = new ai(), this.mainScroll = new Je(this), this.gestures = new Xe(this), this.opener = new Ti(this), this.keyboard = new ti(this), this.contentLoader = new xi(this);
3581
3581
  }
3582
3582
  /** @returns {boolean} */
3583
3583
  init() {
@@ -3585,7 +3585,7 @@ class Ci extends Li {
3585
3585
  return !1;
3586
3586
  this.isOpen = !0, this.dispatch("init"), this.dispatch("beforeOpen"), this._createMainStructure();
3587
3587
  let t = "pswp--open";
3588
- return this.gestures.supportsTouch && (t += " pswp--touch"), this.options.mainClass && (t += " " + this.options.mainClass), this.element && (this.element.className += " " + t), this.currIndex = this.options.index || 0, this.potentialIndex = this.currIndex, this.dispatch("firstUpdate"), this.scrollWheel = new si(this), (Number.isNaN(this.currIndex) || this.currIndex < 0 || this.currIndex >= this.getNumItems()) && (this.currIndex = 0), this.gestures.supportsTouch || this.mouseDetected(), this.updateSize(), this.offset.y = window.pageYOffset, this._initialItemData = this.getItemData(this.currIndex), this.dispatch("gettingData", {
3588
+ return this.gestures.supportsTouch && (t += " pswp--touch"), this.options.mainClass && (t += " " + this.options.mainClass), this.element && (this.element.className += " " + t), this.currIndex = this.options.index || 0, this.potentialIndex = this.currIndex, this.dispatch("firstUpdate"), this.scrollWheel = new li(this), (Number.isNaN(this.currIndex) || this.currIndex < 0 || this.currIndex >= this.getNumItems()) && (this.currIndex = 0), this.gestures.supportsTouch || this.mouseDetected(), this.updateSize(), this.offset.y = window.pageYOffset, this._initialItemData = this.getItemData(this.currIndex), this.dispatch("gettingData", {
3589
3589
  index: this.currIndex,
3590
3590
  data: this._initialItemData,
3591
3591
  slide: void 0
@@ -3605,7 +3605,7 @@ class Ci extends Li {
3605
3605
  */
3606
3606
  getLoopedIndex(t) {
3607
3607
  const e = this.getNumItems();
3608
- return this.options.loop && (t > e - 1 && (t -= e), t < 0 && (t += e)), H(t, 0, e - 1);
3608
+ return this.options.loop && (t > e - 1 && (t -= e), t < 0 && (t += e)), U(t, 0, e - 1);
3609
3609
  }
3610
3610
  appendHeavy() {
3611
3611
  this.mainScroll.itemHolders.forEach((t) => {
@@ -3704,7 +3704,7 @@ class Ci extends Li {
3704
3704
  if (!this.canLoop() && (e < 0 || e >= this.getNumItems()))
3705
3705
  return;
3706
3706
  const n = this.getItemData(e);
3707
- t.slide = new Oe(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
3707
+ t.slide = new Fe(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
3708
3708
  }
3709
3709
  /** @returns {Point} */
3710
3710
  getViewportCenterPoint() {
@@ -3722,8 +3722,8 @@ class Ci extends Li {
3722
3722
  updateSize(t) {
3723
3723
  if (this.isDestroying)
3724
3724
  return;
3725
- const e = Mt(this.options, this);
3726
- !t && q(e, this._prevViewportSize) || (S(this._prevViewportSize, e), this.dispatch("beforeResize"), S(this.viewportSize, this._prevViewportSize), this._updatePageScrollOffset(), this.dispatch("viewportSize"), this.mainScroll.resize(this.opener.isOpen), !this.hasMouse && window.matchMedia("(any-hover: hover)").matches && this.mouseDetected(), this.dispatch("resize"));
3725
+ const e = Rt(this.options, this);
3726
+ !t && j(e, this._prevViewportSize) || (S(this._prevViewportSize, e), this.dispatch("beforeResize"), S(this.viewportSize, this._prevViewportSize), this._updatePageScrollOffset(), this.dispatch("viewportSize"), this.mainScroll.resize(this.opener.isOpen), !this.hasMouse && window.matchMedia("(any-hover: hover)").matches && this.mouseDetected(), this.dispatch("resize"));
3727
3727
  }
3728
3728
  /**
3729
3729
  * @param {number} opacity
@@ -3774,7 +3774,7 @@ class Ci extends Li {
3774
3774
  * @private
3775
3775
  */
3776
3776
  _createMainStructure() {
3777
- this.element = E("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = E("pswp__bg", "div", this.element), this.scrollWrap = E("pswp__scroll-wrap", "section", this.element), this.container = E("pswp__container", "div", this.scrollWrap), this.scrollWrap.setAttribute("aria-roledescription", "carousel"), this.container.setAttribute("aria-live", "off"), this.container.setAttribute("id", "pswp__items"), this.mainScroll.appendHolders(), this.ui = new ui(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
3777
+ this.element = x("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = x("pswp__bg", "div", this.element), this.scrollWrap = x("pswp__scroll-wrap", "section", this.element), this.container = x("pswp__container", "div", this.scrollWrap), this.scrollWrap.setAttribute("aria-roledescription", "carousel"), this.container.setAttribute("aria-live", "off"), this.container.setAttribute("id", "pswp__items"), this.mainScroll.appendHolders(), this.ui = new vi(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
3778
3778
  }
3779
3779
  /**
3780
3780
  * Get position and dimensions of small thumbnail
@@ -3785,7 +3785,7 @@ class Ci extends Li {
3785
3785
  * @returns {Bounds | undefined}
3786
3786
  */
3787
3787
  getThumbBounds() {
3788
- return fi(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
3788
+ return wi(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
3789
3789
  }
3790
3790
  /**
3791
3791
  * If the PhotoSwipe can have continuous loop
@@ -3801,32 +3801,32 @@ class Ci extends Li {
3801
3801
  */
3802
3802
  _prepareOptions(t) {
3803
3803
  return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches && (t.showHideAnimationType = "none", t.zoomAnimationDuration = 0), {
3804
- ...Ei,
3804
+ ...Ii,
3805
3805
  ...t
3806
3806
  };
3807
3807
  }
3808
3808
  }
3809
- function B(s, t, e) {
3809
+ function N(s, t, e) {
3810
3810
  const i = document.createElement(t);
3811
3811
  return s && (i.className = s), e && e.appendChild(i), i;
3812
3812
  }
3813
- function xi(s, t, e) {
3813
+ function Mi(s, t, e) {
3814
3814
  let i = `translate3d(${s}px,0px,0)`;
3815
3815
  return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
3816
3816
  }
3817
- function Q(s, t, e) {
3817
+ function nt(s, t, e) {
3818
3818
  s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
3819
3819
  }
3820
- const x = {
3820
+ const T = {
3821
3821
  IDLE: "idle",
3822
3822
  LOADING: "loading",
3823
3823
  LOADED: "loaded",
3824
3824
  ERROR: "error"
3825
3825
  };
3826
- function Pi(s) {
3826
+ function Oi(s) {
3827
3827
  return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
3828
3828
  }
3829
- function F(s, t, e = document) {
3829
+ function H(s, t, e = document) {
3830
3830
  let i = [];
3831
3831
  if (s instanceof Element)
3832
3832
  i = [s];
@@ -3838,13 +3838,13 @@ function F(s, t, e = document) {
3838
3838
  }
3839
3839
  return i;
3840
3840
  }
3841
- function Ti(s) {
3841
+ function Di(s) {
3842
3842
  return typeof s == "function" && s.prototype && s.prototype.goTo;
3843
3843
  }
3844
- function vt() {
3844
+ function St() {
3845
3845
  return !!(navigator.vendor && navigator.vendor.match(/apple/i));
3846
3846
  }
3847
- class Ii {
3847
+ class $i {
3848
3848
  /**
3849
3849
  * @param {T} type
3850
3850
  * @param {PhotoSwipeEventsMap[T]} [details]
@@ -3856,7 +3856,7 @@ class Ii {
3856
3856
  this.defaultPrevented = !0;
3857
3857
  }
3858
3858
  }
3859
- class zi {
3859
+ class Ri {
3860
3860
  constructor() {
3861
3861
  this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
3862
3862
  }
@@ -3923,20 +3923,20 @@ class zi {
3923
3923
  return this.pswp.dispatch(t, e);
3924
3924
  const n = (
3925
3925
  /** @type {AugmentedEvent<T>} */
3926
- new Ii(t, e)
3926
+ new $i(t, e)
3927
3927
  );
3928
3928
  return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
3929
3929
  o.call(this, n);
3930
3930
  }), n;
3931
3931
  }
3932
3932
  }
3933
- class Mi {
3933
+ class Bi {
3934
3934
  /**
3935
3935
  * @param {string | false} imageSrc
3936
3936
  * @param {HTMLElement} container
3937
3937
  */
3938
3938
  constructor(t, e) {
3939
- if (this.element = B("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
3939
+ if (this.element = N("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
3940
3940
  const i = (
3941
3941
  /** @type {HTMLImageElement} */
3942
3942
  this.element
@@ -3950,21 +3950,21 @@ class Mi {
3950
3950
  * @param {number} height
3951
3951
  */
3952
3952
  setDisplayedSize(t, e) {
3953
- this.element && (this.element.tagName === "IMG" ? (Q(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = xi(0, 0, t / 250)) : Q(this.element, t, e));
3953
+ this.element && (this.element.tagName === "IMG" ? (nt(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = Mi(0, 0, t / 250)) : nt(this.element, t, e));
3954
3954
  }
3955
3955
  destroy() {
3956
3956
  var t;
3957
3957
  (t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
3958
3958
  }
3959
3959
  }
3960
- class Oi {
3960
+ class Fi {
3961
3961
  /**
3962
3962
  * @param {SlideData} itemData Slide data
3963
3963
  * @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
3964
3964
  * @param {number} index
3965
3965
  */
3966
3966
  constructor(t, e, i) {
3967
- this.instance = e, this.data = t, this.index = i, this.element = void 0, this.placeholder = void 0, this.slide = void 0, this.displayedImageWidth = 0, this.displayedImageHeight = 0, this.width = Number(this.data.w) || Number(this.data.width) || 0, this.height = Number(this.data.h) || Number(this.data.height) || 0, this.isAttached = !1, this.hasSlide = !1, this.isDecoding = !1, this.state = x.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", {
3967
+ this.instance = e, this.data = t, this.index = i, this.element = void 0, this.placeholder = void 0, this.slide = void 0, this.displayedImageWidth = 0, this.displayedImageHeight = 0, this.width = Number(this.data.w) || Number(this.data.width) || 0, this.height = Number(this.data.h) || Number(this.data.height) || 0, this.isAttached = !1, this.hasSlide = !1, this.isDecoding = !1, this.state = T.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", {
3968
3968
  content: this
3969
3969
  });
3970
3970
  }
@@ -3992,12 +3992,12 @@ class Oi {
3992
3992
  this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
3993
3993
  this
3994
3994
  );
3995
- this.placeholder = new Mi(i, this.slide.container);
3995
+ this.placeholder = new Bi(i, this.slide.container);
3996
3996
  }
3997
3997
  this.element && !e || this.instance.dispatch("contentLoad", {
3998
3998
  content: this,
3999
3999
  isLazy: t
4000
- }).defaultPrevented || (this.isImageContent() ? (this.element = B("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = B("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), e && this.slide && this.slide.updateContentSize(!0));
4000
+ }).defaultPrevented || (this.isImageContent() ? (this.element = N("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = N("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), e && this.slide && this.slide.updateContentSize(!0));
4001
4001
  }
4002
4002
  /**
4003
4003
  * Preload image
@@ -4015,7 +4015,7 @@ class Oi {
4015
4015
  /** @type HTMLImageElement */
4016
4016
  this.element
4017
4017
  );
4018
- this.updateSrcsetSizes(), this.data.srcset && (n.srcset = this.data.srcset), n.src = (e = this.data.src) !== null && e !== void 0 ? e : "", n.alt = (i = this.data.alt) !== null && i !== void 0 ? i : "", this.state = x.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
4018
+ this.updateSrcsetSizes(), this.data.srcset && (n.srcset = this.data.srcset), n.src = (e = this.data.src) !== null && e !== void 0 ? e : "", n.alt = (i = this.data.alt) !== null && i !== void 0 ? i : "", this.state = T.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
4019
4019
  this.onLoaded();
4020
4020
  }, n.onerror = () => {
4021
4021
  this.onError();
@@ -4033,16 +4033,16 @@ class Oi {
4033
4033
  * Content load success handler
4034
4034
  */
4035
4035
  onLoaded() {
4036
- this.state = x.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
4036
+ this.state = T.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
4037
4037
  slide: this.slide,
4038
4038
  content: this
4039
- }), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === x.LOADED || this.state === x.ERROR) && this.removePlaceholder());
4039
+ }), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === T.LOADED || this.state === T.ERROR) && this.removePlaceholder());
4040
4040
  }
4041
4041
  /**
4042
4042
  * Content load error handler
4043
4043
  */
4044
4044
  onError() {
4045
- this.state = x.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
4045
+ this.state = T.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
4046
4046
  slide: this.slide,
4047
4047
  isError: !0,
4048
4048
  content: this
@@ -4055,13 +4055,13 @@ class Oi {
4055
4055
  * @returns {Boolean} If the content is currently loading
4056
4056
  */
4057
4057
  isLoading() {
4058
- return this.instance.applyFilters("isContentLoading", this.state === x.LOADING, this);
4058
+ return this.instance.applyFilters("isContentLoading", this.state === T.LOADING, this);
4059
4059
  }
4060
4060
  /**
4061
4061
  * @returns {Boolean} If the content is in error state
4062
4062
  */
4063
4063
  isError() {
4064
- return this.state === x.ERROR;
4064
+ return this.state === T.ERROR;
4065
4065
  }
4066
4066
  /**
4067
4067
  * @returns {boolean} If the content is image
@@ -4080,7 +4080,7 @@ class Oi {
4080
4080
  content: this,
4081
4081
  width: t,
4082
4082
  height: e
4083
- }).defaultPrevented && (Q(this.element, t, e), this.isImageContent() && !this.isError()))) {
4083
+ }).defaultPrevented && (nt(this.element, t, e), this.isImageContent() && !this.isError()))) {
4084
4084
  const i = !this.displayedImageWidth && t;
4085
4085
  this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
4086
4086
  slide: this.slide,
@@ -4094,7 +4094,7 @@ class Oi {
4094
4094
  * @returns {boolean} If the content can be zoomed
4095
4095
  */
4096
4096
  isZoomable() {
4097
- return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== x.ERROR, this);
4097
+ return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== T.ERROR, this);
4098
4098
  }
4099
4099
  /**
4100
4100
  * Update image srcset sizes attribute based on width and height
@@ -4142,9 +4142,9 @@ class Oi {
4142
4142
  displayError() {
4143
4143
  if (this.slide) {
4144
4144
  var t, e;
4145
- let i = B("pswp__error-msg", "div");
4145
+ let i = N("pswp__error-msg", "div");
4146
4146
  i.innerText = (t = (e = this.instance.options) === null || e === void 0 ? void 0 : e.errorMsg) !== null && t !== void 0 ? t : "", i = /** @type {HTMLDivElement} */
4147
- this.instance.applyFilters("contentErrorElement", i, this), this.element = B("pswp__content pswp__error-msg-container", "div"), this.element.appendChild(i), this.slide.container.innerText = "", this.slide.container.appendChild(this.element), this.slide.updateContentSize(!0), this.removePlaceholder();
4147
+ this.instance.applyFilters("contentErrorElement", i, this), this.element = N("pswp__content pswp__error-msg-container", "div"), this.element.appendChild(i), this.slide.container.innerText = "", this.slide.container.appendChild(this.element), this.slide.updateContentSize(!0), this.removePlaceholder();
4148
4148
  }
4149
4149
  }
4150
4150
  /**
@@ -4153,7 +4153,7 @@ class Oi {
4153
4153
  append() {
4154
4154
  if (this.isAttached || !this.element)
4155
4155
  return;
4156
- if (this.isAttached = !0, this.state === x.ERROR) {
4156
+ if (this.isAttached = !0, this.state === T.ERROR) {
4157
4157
  this.displayError();
4158
4158
  return;
4159
4159
  }
@@ -4162,7 +4162,7 @@ class Oi {
4162
4162
  }).defaultPrevented)
4163
4163
  return;
4164
4164
  const t = "decode" in this.element;
4165
- this.isImageContent() ? t && this.slide && (!this.slide.isActive || vt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
4165
+ this.isImageContent() ? t && this.slide && (!this.slide.isActive || St()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
4166
4166
  }).finally(() => {
4167
4167
  this.isDecoding = !1, this.appendImage();
4168
4168
  })) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
@@ -4175,7 +4175,7 @@ class Oi {
4175
4175
  activate() {
4176
4176
  this.instance.dispatch("contentActivate", {
4177
4177
  content: this
4178
- }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !vt() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
4178
+ }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !St() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
4179
4179
  }
4180
4180
  /**
4181
4181
  * Deactivate the content
@@ -4199,10 +4199,10 @@ class Oi {
4199
4199
  appendImage() {
4200
4200
  this.isAttached && (this.instance.dispatch("contentAppendImage", {
4201
4201
  content: this
4202
- }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === x.LOADED || this.state === x.ERROR) && this.removePlaceholder()));
4202
+ }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === T.LOADED || this.state === T.ERROR) && this.removePlaceholder()));
4203
4203
  }
4204
4204
  }
4205
- function Di(s, t) {
4205
+ function Zi(s, t) {
4206
4206
  if (s.getViewportSizeFn) {
4207
4207
  const e = s.getViewportSizeFn(s, t);
4208
4208
  if (e)
@@ -4217,7 +4217,7 @@ function Di(s, t) {
4217
4217
  y: window.innerHeight
4218
4218
  };
4219
4219
  }
4220
- function V(s, t, e, i, n) {
4220
+ function K(s, t, e, i, n) {
4221
4221
  let o = 0;
4222
4222
  if (t.paddingFn)
4223
4223
  o = t.paddingFn(e, i, n)[s];
@@ -4229,14 +4229,14 @@ function V(s, t, e, i, n) {
4229
4229
  }
4230
4230
  return Number(o) || 0;
4231
4231
  }
4232
- function $i(s, t, e, i) {
4232
+ function ki(s, t, e, i) {
4233
4233
  return {
4234
- x: t.x - V("left", s, t, e, i) - V("right", s, t, e, i),
4235
- y: t.y - V("top", s, t, e, i) - V("bottom", s, t, e, i)
4234
+ x: t.x - K("left", s, t, e, i) - K("right", s, t, e, i),
4235
+ y: t.y - K("top", s, t, e, i) - K("bottom", s, t, e, i)
4236
4236
  };
4237
4237
  }
4238
- const yt = 4e3;
4239
- class Ri {
4238
+ const Lt = 4e3;
4239
+ class qi {
4240
4240
  /**
4241
4241
  * @param {PhotoSwipeOptions} options PhotoSwipe options
4242
4242
  * @param {SlideData} itemData Slide data
@@ -4293,7 +4293,7 @@ class Ri {
4293
4293
  */
4294
4294
  _getSecondary() {
4295
4295
  let t = this._parseZoomLevelOption("secondary");
4296
- return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > yt && (t = yt / this.elementSize.x), t);
4296
+ return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > Lt && (t = Lt / this.elementSize.x), t);
4297
4297
  }
4298
4298
  /**
4299
4299
  * Get initial image zoom level.
@@ -4316,30 +4316,30 @@ class Ri {
4316
4316
  return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
4317
4317
  }
4318
4318
  }
4319
- function Bt(s, t, e) {
4319
+ function qt(s, t, e) {
4320
4320
  const i = t.createContentFromData(s, e);
4321
4321
  let n;
4322
4322
  const {
4323
4323
  options: o
4324
4324
  } = t;
4325
4325
  if (o) {
4326
- n = new Ri(o, s, -1);
4326
+ n = new qi(o, s, -1);
4327
4327
  let r;
4328
- t.pswp ? r = t.pswp.viewportSize : r = Di(o, t);
4329
- const a = $i(o, r, s, e);
4328
+ t.pswp ? r = t.pswp.viewportSize : r = Zi(o, t);
4329
+ const a = ki(o, r, s, e);
4330
4330
  n.update(i.width, i.height, a);
4331
4331
  }
4332
4332
  return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
4333
4333
  }
4334
- function Bi(s, t) {
4334
+ function Ni(s, t) {
4335
4335
  const e = t.getItemData(s);
4336
4336
  if (!t.dispatch("lazyLoadSlide", {
4337
4337
  index: s,
4338
4338
  itemData: e
4339
4339
  }).defaultPrevented)
4340
- return Bt(e, t, s);
4340
+ return qt(e, t, s);
4341
4341
  }
4342
- class Fi extends zi {
4342
+ class Hi extends Ri {
4343
4343
  /**
4344
4344
  * Get total number of slides
4345
4345
  *
@@ -4362,7 +4362,7 @@ class Fi extends zi {
4362
4362
  * @returns {Content}
4363
4363
  */
4364
4364
  createContentFromData(t, e) {
4365
- return new Oi(t, this, e);
4365
+ return new Fi(t, this, e);
4366
4366
  }
4367
4367
  /**
4368
4368
  * Get item data by index.
@@ -4396,7 +4396,7 @@ class Fi extends zi {
4396
4396
  */
4397
4397
  _getGalleryDOMElements(t) {
4398
4398
  var e, i;
4399
- return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? F(this.options.children, this.options.childSelector, t) || [] : [t];
4399
+ return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? H(this.options.children, this.options.childSelector, t) || [] : [t];
4400
4400
  }
4401
4401
  /**
4402
4402
  * Converts DOM element to item data object.
@@ -4430,10 +4430,10 @@ class Fi extends zi {
4430
4430
  * @returns {Content} Image that is being decoded or false.
4431
4431
  */
4432
4432
  lazyLoadData(t, e) {
4433
- return Bt(t, this, e);
4433
+ return qt(t, this, e);
4434
4434
  }
4435
4435
  }
4436
- class Zi extends Fi {
4436
+ class Wi extends Hi {
4437
4437
  /**
4438
4438
  * @param {PhotoSwipeOptions} [options]
4439
4439
  */
@@ -4445,7 +4445,7 @@ class Zi extends Fi {
4445
4445
  * It's not included in the main constructor, so you may bind events before it.
4446
4446
  */
4447
4447
  init() {
4448
- F(this.options.gallery, this.options.gallerySelector).forEach((t) => {
4448
+ H(this.options.gallery, this.options.gallerySelector).forEach((t) => {
4449
4449
  t.addEventListener("click", this.onThumbnailsClick, !1);
4450
4450
  });
4451
4451
  }
@@ -4453,7 +4453,7 @@ class Zi extends Fi {
4453
4453
  * @param {MouseEvent} e
4454
4454
  */
4455
4455
  onThumbnailsClick(t) {
4456
- if (Pi(t) || window.pswp)
4456
+ if (Oi(t) || window.pswp)
4457
4457
  return;
4458
4458
  let e = {
4459
4459
  x: t.clientX,
@@ -4482,7 +4482,7 @@ class Zi extends Fi {
4482
4482
  const e = (
4483
4483
  /** @type {HTMLElement} */
4484
4484
  t.target
4485
- ), n = F(
4485
+ ), n = H(
4486
4486
  this.options.children,
4487
4487
  this.options.childSelector,
4488
4488
  /** @type {HTMLElement} */
@@ -4502,7 +4502,7 @@ class Zi extends Fi {
4502
4502
  if (window.pswp || !this.options)
4503
4503
  return !1;
4504
4504
  if (!e && this.options.gallery && this.options.children) {
4505
- const n = F(this.options.gallery);
4505
+ const n = H(this.options.gallery);
4506
4506
  n[0] && (e = {
4507
4507
  gallery: n[0]
4508
4508
  });
@@ -4521,7 +4521,7 @@ class Zi extends Fi {
4521
4521
  } = this;
4522
4522
  e && (i.dataSource = e);
4523
4523
  const n = [], o = typeof i.pswpModule;
4524
- if (Ti(i.pswpModule))
4524
+ if (Di(i.pswpModule))
4525
4525
  n.push(Promise.resolve(
4526
4526
  /** @type {Type<PhotoSwipe>} */
4527
4527
  i.pswpModule
@@ -4537,7 +4537,7 @@ class Zi extends Fi {
4537
4537
  else
4538
4538
  throw new Error("pswpModule is not valid");
4539
4539
  }
4540
- typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = Bi(t, this));
4540
+ typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = Ni(t, this));
4541
4541
  const r = ++this._uid;
4542
4542
  Promise.all(n).then((a) => {
4543
4543
  if (this.shouldOpen) {
@@ -4578,17 +4578,17 @@ class Zi extends Fi {
4578
4578
  */
4579
4579
  destroy() {
4580
4580
  var t;
4581
- (t = this.pswp) === null || t === void 0 || t.destroy(), this.shouldOpen = !1, this._listeners = {}, F(this.options.gallery, this.options.gallerySelector).forEach((e) => {
4581
+ (t = this.pswp) === null || t === void 0 || t.destroy(), this.shouldOpen = !1, this._listeners = {}, H(this.options.gallery, this.options.gallerySelector).forEach((e) => {
4582
4582
  e.removeEventListener("click", this.onThumbnailsClick, !1);
4583
4583
  });
4584
4584
  }
4585
4585
  }
4586
- const ki = () => {
4586
+ const Vi = () => {
4587
4587
  let s = null;
4588
- return s = new Zi({
4588
+ return s = new Wi({
4589
4589
  gallery: "#photoswipe-gallery",
4590
4590
  children: "a",
4591
- pswpModule: Ci,
4591
+ pswpModule: zi,
4592
4592
  zoom: !1,
4593
4593
  imageClickAction: "next",
4594
4594
  tapAction: "next"
@@ -4609,7 +4609,7 @@ const ki = () => {
4609
4609
  }), s.init(), () => {
4610
4610
  s && (s.destroy(), s = null);
4611
4611
  };
4612
- }, _t = (s) => Math.min(100, Math.max(0, Math.round(s))), qi = () => {
4612
+ }, At = (s) => Math.min(100, Math.max(0, Math.round(s))), ji = () => {
4613
4613
  const s = document.querySelector(".js-limit-scroll-progress-bar"), t = document.querySelector(".c-progress__bar"), e = document.querySelector(".c-btn__close-progress");
4614
4614
  if (!t && !e)
4615
4615
  return;
@@ -4618,14 +4618,14 @@ const ki = () => {
4618
4618
  let o = i.scrollHeight - i.clientHeight;
4619
4619
  if (!o)
4620
4620
  return;
4621
- s && (o = s.scrollHeight - i.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top)), t.style.width = `${_t(n / o * 100)}%`;
4621
+ s && (o = s.scrollHeight - i.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top)), t.style.width = `${At(n / o * 100)}%`;
4622
4622
  }
4623
4623
  if (e) {
4624
4624
  const o = document.querySelector(".js-content-header"), r = document.querySelector(".js-limit-scroll-close-article-btn");
4625
4625
  if (o && r) {
4626
4626
  const a = window.pageYOffset + o.getBoundingClientRect().bottom, c = window.pageYOffset + r.getBoundingClientRect().bottom - i.clientHeight - a;
4627
4627
  if (c > 0) {
4628
- const d = _t((n - a) / c * 100);
4628
+ const d = At((n - a) / c * 100);
4629
4629
  e.style.setProperty("--progress", `${d}`), e.parentElement?.classList.toggle(
4630
4630
  "c-btn--close-progress-complete",
4631
4631
  d >= 100
@@ -4633,10 +4633,10 @@ const ki = () => {
4633
4633
  }
4634
4634
  }
4635
4635
  }
4636
- }, Ni = () => {
4636
+ }, Gi = () => {
4637
4637
  const s = document.querySelector(".c-progress"), t = document.querySelector(".c-btn__close-progress");
4638
- (s || t) && window.addEventListener("scroll", qi);
4639
- }, Hi = (s = {}) => {
4638
+ (s || t) && window.addEventListener("scroll", ji);
4639
+ }, Ui = (s = {}) => {
4640
4640
  const { buttonSelector: t = ".c-scroll-to-top" } = s, e = document.querySelector(t), i = e?.querySelector("button");
4641
4641
  if (!e || !i)
4642
4642
  return;
@@ -4658,7 +4658,7 @@ const ki = () => {
4658
4658
  });
4659
4659
  };
4660
4660
  window.addEventListener("scroll", r), i.addEventListener("click", a), r();
4661
- }, Wi = 500, Vi = () => {
4661
+ }, Ki = 500, Xi = () => {
4662
4662
  const s = document.querySelector("#mbrs-comments-container"), t = document.querySelector(".c-scroll-to-top-comment");
4663
4663
  if (!s || !t)
4664
4664
  return;
@@ -4674,7 +4674,7 @@ const ki = () => {
4674
4674
  }, o = () => {
4675
4675
  e && (e = !1, window.removeEventListener("scroll", i), t.style.display = "none");
4676
4676
  }, r = (u) => {
4677
- u.offsetHeight > Wi ? n() : o();
4677
+ u.offsetHeight > Ki ? n() : o();
4678
4678
  }, a = (u) => {
4679
4679
  new ResizeObserver(() => {
4680
4680
  r(u);
@@ -4698,7 +4698,7 @@ const ki = () => {
4698
4698
  return;
4699
4699
  const h = new MutationObserver((u) => {
4700
4700
  u.some(
4701
- (f) => Array.from(f.addedNodes).some((p) => {
4701
+ (m) => Array.from(m.addedNodes).some((p) => {
4702
4702
  if (p instanceof HTMLIFrameElement)
4703
4703
  return c(p), !0;
4704
4704
  if (p instanceof HTMLElement) {
@@ -4711,7 +4711,7 @@ const ki = () => {
4711
4711
  ) && h.disconnect();
4712
4712
  });
4713
4713
  h.observe(s, { childList: !0, subtree: !0 });
4714
- }, X = "#page-content", tt = "#text-tooltip", ji = ".tooltip-btn", Ft = "c-text-tooltip--show", Gi = [
4714
+ }, tt = "#page-content", ot = "#text-tooltip", Yi = ".tooltip-btn", Nt = "c-text-tooltip--show", Ji = [
4715
4715
  "#page-content .c-content p",
4716
4716
  "#page-content .c-content h2",
4717
4717
  "#page-content .c-content h3",
@@ -4723,17 +4723,17 @@ const ki = () => {
4723
4723
  "#page-content header span",
4724
4724
  "#page-content header h1",
4725
4725
  "#page-content header h2"
4726
- ], wt = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, Ui = (s, t) => {
4726
+ ], Et = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, Qi = (s, t) => {
4727
4727
  const e = s.startContainer.nodeType === Node.ELEMENT_NODE ? s.startContainer : s.startContainer.parentElement, i = s.endContainer.nodeType === Node.ELEMENT_NODE ? s.endContainer : s.endContainer.parentElement;
4728
- return !!e && wt(e, t) || !!i && wt(i, t);
4729
- }, Ki = (s) => {
4728
+ return !!e && Et(e, t) || !!i && Et(i, t);
4729
+ }, ts = (s) => {
4730
4730
  if (!s.focusNode)
4731
4731
  return null;
4732
4732
  const t = s.anchorNode?.compareDocumentPosition(s.focusNode);
4733
4733
  return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
4734
- }, Xi = (s, t, e) => {
4735
- const i = document.querySelector(`${X} ${tt}`), n = document.querySelector(`${X}`), o = document.querySelectorAll(
4736
- `${X} ${tt} ${ji}`
4734
+ }, es = (s, t, e) => {
4735
+ const i = document.querySelector(`${tt} ${ot}`), n = document.querySelector(`${tt}`), o = document.querySelectorAll(
4736
+ `${tt} ${ot} ${Yi}`
4737
4737
  );
4738
4738
  if (!i || !n) {
4739
4739
  console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");
@@ -4743,44 +4743,44 @@ const ki = () => {
4743
4743
  l.setAttribute("data-selected-text", e);
4744
4744
  });
4745
4745
  const r = s.getClientRects(), a = r[t ? r.length - 1 : 0];
4746
- i.style.top = `${a.top - n.getBoundingClientRect().top - (i.offsetHeight + 10)}px`, a.width < i.offsetWidth ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width / 2 - i.offsetWidth / 2}px` : t ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width - i.offsetWidth}px` : i.style.left = `${a.left - n.getBoundingClientRect().left}px`, i.classList.add(Ft);
4747
- }, bt = () => {
4748
- const s = document.querySelector(`${tt}`);
4749
- s && s.classList.remove(Ft);
4750
- }, j = ({ type: s }) => {
4746
+ i.style.top = `${a.top - n.getBoundingClientRect().top - (i.offsetHeight + 10)}px`, a.width < i.offsetWidth ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width / 2 - i.offsetWidth / 2}px` : t ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width - i.offsetWidth}px` : i.style.left = `${a.left - n.getBoundingClientRect().left}px`, i.classList.add(Nt);
4747
+ }, Ct = () => {
4748
+ const s = document.querySelector(`${ot}`);
4749
+ s && s.classList.remove(Nt);
4750
+ }, X = ({ type: s }) => {
4751
4751
  const t = window.getSelection();
4752
4752
  if (s === "selectionchange") {
4753
- bt();
4753
+ Ct();
4754
4754
  return;
4755
4755
  }
4756
4756
  if (!t || !t.rangeCount)
4757
4757
  return;
4758
4758
  const e = t.getRangeAt(0), i = t.toString().trim();
4759
4759
  if (i.length) {
4760
- const n = Ui(e, Gi), o = Ki(t) || !1;
4761
- n && Xi(e, o, i);
4760
+ const n = Qi(e, Ji), o = ts(t) || !1;
4761
+ n && es(e, o, i);
4762
4762
  return;
4763
4763
  }
4764
- bt();
4765
- }, Yi = () => {
4764
+ Ct();
4765
+ }, is = () => {
4766
4766
  if (!window?.getSelection) {
4767
4767
  console.warn("Selection API isn't supported");
4768
4768
  return;
4769
4769
  }
4770
- document.addEventListener("mouseup", j), document.addEventListener("selectionchange", j), document.addEventListener("touchend", j), document.addEventListener("touchcancel", j);
4771
- }, Ji = (s) => {
4770
+ document.addEventListener("mouseup", X), document.addEventListener("selectionchange", X), document.addEventListener("touchend", X), document.addEventListener("touchcancel", X);
4771
+ }, ss = (s) => {
4772
4772
  const { target: t } = s;
4773
4773
  if (t instanceof Element) {
4774
4774
  const e = t.closest(".c-search-form--button");
4775
4775
  e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
4776
4776
  }
4777
- }, Qi = (s = document.querySelector(
4777
+ }, ns = (s = document.querySelector(
4778
4778
  ".c-search-form--button"
4779
4779
  )) => {
4780
4780
  s && s.addEventListener("click", (t) => {
4781
- Ji(t);
4781
+ ss(t);
4782
4782
  });
4783
- }, ts = ({
4783
+ }, os = ({
4784
4784
  tabsContainerElement: s,
4785
4785
  event: t
4786
4786
  }) => {
@@ -4796,38 +4796,38 @@ const ki = () => {
4796
4796
  }), n.forEach((a) => {
4797
4797
  a.setAttribute("aria-hidden", "true");
4798
4798
  }), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
4799
- }, St = (s) => s.code === "ArrowLeft" || s.keyCode === 39, Lt = (s) => s.code === "ArrowRight" || s.keyCode === 37, es = (s = document.querySelectorAll(
4799
+ }, xt = (s) => s.code === "ArrowLeft" || s.keyCode === 39, Pt = (s) => s.code === "ArrowRight" || s.keyCode === 37, rs = (s = document.querySelectorAll(
4800
4800
  ".js-tabs"
4801
4801
  )) => {
4802
4802
  s.length > 0 && s.forEach((t) => {
4803
4803
  const e = t.querySelectorAll('[role="tab"]');
4804
4804
  e.forEach((n) => {
4805
4805
  n.addEventListener("click", (o) => {
4806
- ts({ tabsContainerElement: t, event: o });
4806
+ os({ tabsContainerElement: t, event: o });
4807
4807
  });
4808
4808
  });
4809
4809
  const i = t.querySelector('[role="tablist"]');
4810
4810
  if (i && e.length > 0) {
4811
4811
  let n = 0;
4812
4812
  i.addEventListener("keydown", (o) => {
4813
- o instanceof KeyboardEvent && (St(o) || Lt(o)) && (e[n].setAttribute("tabindex", "-1"), St(o) ? (n += 1, n >= e.length && (n = 0)) : Lt(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
4813
+ o instanceof KeyboardEvent && (xt(o) || Pt(o)) && (e[n].setAttribute("tabindex", "-1"), xt(o) ? (n += 1, n >= e.length && (n = 0)) : Pt(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
4814
4814
  });
4815
4815
  }
4816
4816
  });
4817
- }, G = (s) => {
4817
+ }, J = (s) => {
4818
4818
  const [t, e] = s.split("h").map(Number);
4819
4819
  return t * 60 + e;
4820
- }, Zt = () => {
4820
+ }, Ht = () => {
4821
4821
  const s = /* @__PURE__ */ new Date(), t = s.getHours(), e = s.getMinutes();
4822
4822
  return t * 60 + e;
4823
- }, is = (s, t) => {
4824
- const e = Zt();
4823
+ }, as = (s, t) => {
4824
+ const e = Ht();
4825
4825
  if (e < s || e > t)
4826
4826
  return 0;
4827
4827
  const i = t - s;
4828
4828
  return (e - s) / i;
4829
- }, ss = (s) => {
4830
- const t = Zt();
4829
+ }, ls = (s) => {
4830
+ const t = Ht();
4831
4831
  let e = null, i = null, n = -1;
4832
4832
  return Array.from(s).find((o, r, a) => {
4833
4833
  if (r === a.length - 1)
@@ -4835,17 +4835,17 @@ const ki = () => {
4835
4835
  const l = o.textContent, c = a[r + 1].textContent;
4836
4836
  if (!l || !c)
4837
4837
  return !1;
4838
- const d = G(l), h = G(c);
4838
+ const d = J(l), h = J(c);
4839
4839
  return t >= d && t < h ? (e = l, i = c, n = r, !0) : !1;
4840
4840
  }), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n };
4841
- }, ns = () => {
4841
+ }, cs = () => {
4842
4842
  const s = document.querySelectorAll(".c-timeline__time");
4843
4843
  if (!s || s.length < 2)
4844
4844
  return;
4845
- const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = ss(s);
4845
+ const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = ls(s);
4846
4846
  if (!e || !i)
4847
4847
  return;
4848
- const o = G(e), r = G(i), a = is(o, r);
4848
+ const o = J(e), r = J(i), a = as(o, r);
4849
4849
  if (t instanceof HTMLElement) {
4850
4850
  if (t.classList.contains("c-timeline__progress-bar--is-desktop") && s.length >= 5) {
4851
4851
  const l = "172px / 2";
@@ -4884,25 +4884,25 @@ const ki = () => {
4884
4884
  }
4885
4885
  }
4886
4886
  }
4887
- }, et = "c-icon-item__container--is-highlighted", os = (s) => {
4887
+ }, rt = "c-icon-item__container--is-highlighted", ds = (s) => {
4888
4888
  s.find(
4889
- (e) => e.classList.contains(et)
4890
- )?.classList.remove(et);
4891
- }, rs = () => {
4889
+ (e) => e.classList.contains(rt)
4890
+ )?.classList.remove(rt);
4891
+ }, hs = () => {
4892
4892
  const s = document.querySelector(".c-toolbar");
4893
4893
  if (s) {
4894
4894
  const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-icon-item__container"));
4895
- os(e), e.find(
4895
+ ds(e), e.find(
4896
4896
  (n) => n.querySelector("a")?.getAttribute("href") === t
4897
- )?.classList.add(et);
4897
+ )?.classList.add(rt);
4898
4898
  }
4899
- }, as = 12, nt = (s) => {
4899
+ }, us = 12, ct = (s) => {
4900
4900
  const t = s || document.querySelector(".c-map-towns");
4901
4901
  if (!t) {
4902
4902
  new MutationObserver((o, r) => {
4903
4903
  if (typeof document < "u") {
4904
4904
  const a = document.querySelector(".c-map-towns");
4905
- a && (r.disconnect(), nt(a));
4905
+ a && (r.disconnect(), ct(a));
4906
4906
  }
4907
4907
  }).observe(document.body, { childList: !0, subtree: !0 });
4908
4908
  return;
@@ -4921,18 +4921,18 @@ const ki = () => {
4921
4921
  return;
4922
4922
  const u = c.getBBox();
4923
4923
  if (u.width > 0) {
4924
- const { x: m, y: f, width: p, height: _ } = u, b = l.getAttribute("data-scale"), A = b ? ` scale(${b})` : "";
4924
+ const { x: f, y: m, width: p, height: _ } = u, w = l.getAttribute("data-scale"), C = w ? ` scale(${w})` : "";
4925
4925
  l.setAttribute(
4926
4926
  "transform",
4927
- `translate(${m + p / 2}, ${f + _ / 2})${A}`
4927
+ `translate(${f + p / 2}, ${m + _ / 2})${C}`
4928
4928
  );
4929
- const v = d.getBBox(), g = 8, w = 4, L = 8, P = v.width + g, T = v.height + w;
4930
- h.setAttribute("width", `${P}`), h.setAttribute("height", `${T}`), h.setAttribute("x", `${-P / 2}`), h.setAttribute("y", `${-T - L}`);
4931
- const M = -T / 2 - L;
4932
- d.setAttribute("y", `${M}`), l.setAttribute("aria-hidden", "false");
4929
+ const g = d.getBBox(), y = 8, A = 4, B = 8, L = g.width + y, b = g.height + A;
4930
+ h.setAttribute("width", `${L}`), h.setAttribute("height", `${b}`), h.setAttribute("x", `${-L / 2}`), h.setAttribute("y", `${-b - B}`);
4931
+ const E = -b / 2 - B;
4932
+ d.setAttribute("y", `${E}`), l.setAttribute("aria-hidden", "false");
4933
4933
  } else
4934
4934
  a = !1;
4935
- }), !a && r < as && requestAnimationFrame(() => o(r + 1));
4935
+ }), !a && r < us && requestAnimationFrame(() => o(r + 1));
4936
4936
  };
4937
4937
  return requestAnimationFrame(() => o()), !0;
4938
4938
  };
@@ -4944,7 +4944,7 @@ const ki = () => {
4944
4944
  childList: !0,
4945
4945
  subtree: !0
4946
4946
  });
4947
- }, ls = {
4947
+ }, ps = {
4948
4948
  10: [{ id: "10387", name: "Troyes" }, { id: "10323", name: "Romilly-sur-Seine" }, { id: "10033", name: "Bar-sur-Aube" }],
4949
4949
  11: [{ id: "11262", name: "Narbonne" }, { id: "11069", name: "Carcassonne" }, { id: "11076", name: "Castelnaudary" }],
4950
4950
  12: [{ id: "12202", name: "Rodez" }, { id: "12145", name: "Millau" }, { id: "12300", name: "Villefranche-de-Rouergue" }],
@@ -5045,14 +5045,14 @@ const ki = () => {
5045
5045
  "07": [{ id: "07010", name: "Annonay" }, { id: "07019", name: "Aubenas" }, { id: "07324", name: "Tournon-sur-Rhône" }],
5046
5046
  "05": [{ id: "05061", name: "Gap" }, { id: "05023", name: "Briançon" }, { id: "05046", name: "Embrun" }],
5047
5047
  "08": [{ id: "08105", name: "Charleville-Mézières" }, { id: "08362", name: "Rethel" }, { id: "08190", name: "Givet" }]
5048
- }, cs = /<path\b([^>]*?)\/>/g, ds = /\b([:\w-]+)="([^"]*)"/g, hs = (s) => {
5048
+ }, ms = /<path\b([^>]*?)\/>/g, fs = /\b([:\w-]+)="([^"]*)"/g, gs = (s) => {
5049
5049
  const t = [];
5050
- for (const e of s.matchAll(cs)) {
5050
+ for (const e of s.matchAll(ms)) {
5051
5051
  const i = e[1];
5052
5052
  if (!i)
5053
5053
  continue;
5054
5054
  const n = /* @__PURE__ */ new Map();
5055
- for (const c of i.matchAll(ds)) {
5055
+ for (const c of i.matchAll(fs)) {
5056
5056
  const [, d, h] = c;
5057
5057
  d && n.set(d, h || "");
5058
5058
  }
@@ -5065,7 +5065,11 @@ const ki = () => {
5065
5065
  });
5066
5066
  }
5067
5067
  return t;
5068
- }, us = (s) => new Map(s.map((t) => [t.id, t])), ps = (s, t, e) => {
5068
+ }, vs = (s) => new Map(s.map((t) => [t.id, t]));
5069
+ var Wt = /* @__PURE__ */ ((s) => (s.MOBILE = "mobile", s.DESKTOP = "desktop", s))(Wt || {});
5070
+ const Y = (s) => {
5071
+ window.location.href = s;
5072
+ }, ys = (s, t, e) => {
5069
5073
  const i = e.get(s);
5070
5074
  if (i)
5071
5075
  return i;
@@ -5080,7 +5084,7 @@ const ki = () => {
5080
5084
  (o) => o.id.startsWith(`town-${s}`)
5081
5085
  );
5082
5086
  return e.set(s, n), n;
5083
- }, ms = (s, t) => t.get(s), fs = (s) => {
5087
+ }, _s = (s, t) => t.get(s), ws = (s) => {
5084
5088
  if (s.size > 0)
5085
5089
  return;
5086
5090
  document.querySelectorAll(
@@ -5092,13 +5096,13 @@ const ki = () => {
5092
5096
  Array.from(e.classList).filter((n) => n.startsWith("c-map-towns__path--"))
5093
5097
  );
5094
5098
  });
5095
- }, gs = (s, t) => {
5099
+ }, bs = (s, t) => {
5096
5100
  const e = s.id, i = s.url, n = s.name;
5097
5101
  if (!e || !i)
5098
5102
  return null;
5099
5103
  const o = document.createElementNS("http://www.w3.org/2000/svg", "path");
5100
5104
  o.setAttribute("d", s.path), o.setAttribute("class", "c-map-towns__path c-map-towns__zoom-town"), o.setAttribute("data-url", i);
5101
- const r = ms(e, t);
5105
+ const r = _s(e, t);
5102
5106
  if (r && r.forEach((a) => {
5103
5107
  o.classList.add(a);
5104
5108
  }), n) {
@@ -5106,15 +5110,15 @@ const ki = () => {
5106
5110
  a.textContent = n, o.appendChild(a);
5107
5111
  }
5108
5112
  return o;
5109
- }, vs = (s, t) => {
5113
+ }, Ss = (s, t) => {
5110
5114
  const e = document.createDocumentFragment();
5111
5115
  return s.forEach((i) => {
5112
- const n = gs(i, t);
5116
+ const n = bs(i, t);
5113
5117
  n && e.appendChild(n);
5114
5118
  }), e;
5115
- }, ys = (s, t) => {
5119
+ }, Ls = (s, t) => {
5116
5120
  s.replaceChildren(t);
5117
- }, _s = (s, t, e) => {
5121
+ }, As = (s, t, e) => {
5118
5122
  const i = document.createElementNS("http://www.w3.org/2000/svg", "g");
5119
5123
  i.setAttribute("class", "js-city-marker c-map-towns__city-marker"), i.setAttribute("aria-hidden", "true"), i.setAttribute("data-scale", e.toString());
5120
5124
  const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -5125,7 +5129,7 @@ const ki = () => {
5125
5129
  r.setAttribute("class", "js-city-bg"), r.setAttribute("fill", "white"), r.setAttribute("rx", "4"), r.setAttribute("ry", "4");
5126
5130
  const a = document.createElementNS("http://www.w3.org/2000/svg", "text");
5127
5131
  return a.setAttribute("class", "js-city-text c-map-towns__city-text"), a.textContent = s, i.appendChild(n), i.appendChild(o), i.appendChild(r), i.appendChild(a), i;
5128
- }, ws = (s, t) => {
5132
+ }, Es = (s, t) => {
5129
5133
  const e = t.getBBox(), i = 5, n = e.width + i * 2, o = e.height + i * 2;
5130
5134
  s.setAttribute(
5131
5135
  "viewBox",
@@ -5134,80 +5138,102 @@ const ki = () => {
5134
5138
  const r = s.clientWidth || 800, a = s.clientHeight || 600;
5135
5139
  return Math.max(n / r, o / a);
5136
5140
  };
5137
- let At = !1;
5138
- const it = () => {
5139
- if (At)
5141
+ let et = !1;
5142
+ const at = () => {
5143
+ if (et)
5140
5144
  return;
5141
5145
  if (!document.querySelector(".c-map-towns")) {
5142
- new MutationObserver((w, L) => {
5143
- typeof document < "u" && document.querySelector(".c-map-towns") && (L.disconnect(), it());
5146
+ new MutationObserver((b, E) => {
5147
+ typeof document < "u" && document.querySelector(".c-map-towns") && (E.disconnect(), at());
5144
5148
  }).observe(document.body, { childList: !0, subtree: !0 });
5145
5149
  return;
5146
5150
  }
5147
- const t = document.getElementById("js-zoom-overlay"), e = document.getElementById("js-zoom-svg"), i = document.getElementById("js-zoom-group"), n = document.getElementById("js-zoom-close");
5148
- if (!(t instanceof HTMLElement) || !(e instanceof SVGSVGElement) || !(i instanceof SVGGElement) || !(n instanceof HTMLElement)) {
5149
- requestAnimationFrame(it);
5151
+ const t = window.layout === Wt.MOBILE, e = document.querySelector(".c-map-towns__map"), i = document.querySelector(".c-map-towns__droms"), n = document.querySelector(".c-map-towns__zooms"), o = (L) => {
5152
+ const { target: b } = L;
5153
+ if (!(b instanceof Element))
5154
+ return;
5155
+ const E = b.closest(".js-city-marker");
5156
+ if (E) {
5157
+ const $ = E.getAttribute("data-url");
5158
+ $ && Y($);
5159
+ return;
5160
+ }
5161
+ const z = b.closest(".c-map-towns__zoom-item")?.getAttribute("data-city-url");
5162
+ if (z) {
5163
+ Y(z);
5164
+ return;
5165
+ }
5166
+ const M = b.closest(".c-map-towns__dept-trigger")?.getAttribute("data-url");
5167
+ M && Y(M);
5168
+ };
5169
+ if (t) {
5170
+ e?.addEventListener("click", o), i?.addEventListener("click", o), n?.addEventListener("click", o), et = !0;
5150
5171
  return;
5151
5172
  }
5152
- At = !0;
5153
- const o = document.querySelector(".c-map-towns__map"), r = document.querySelector(".c-map-towns__droms"), a = document.getElementById("js-zoom-label"), l = document.getElementById("js-zoom-title"), c = document.getElementById("js-town-sprite-data"), d = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map();
5154
- let u = null;
5155
- const m = () => {
5156
- if (u)
5157
- return u;
5158
- const g = c instanceof HTMLScriptElement ? JSON.parse(c.textContent || '""') : "";
5159
- return u = us(hs(g)), u;
5160
- }, f = () => {
5161
- t.setAttribute("aria-hidden", "true"), i.replaceChildren();
5162
- }, p = (g, w) => g.startsWith("97") ? document.querySelector(`path[id="town-${w}-drom"]`)?.getAttribute("d") || null : m().get(`town-${w}`)?.path || null, _ = (g, w) => {
5163
- const P = ls[g] || [];
5164
- if (P.length === 0)
5173
+ const r = document.getElementById("js-zoom-overlay"), a = document.getElementById("js-zoom-svg"), l = document.getElementById("js-zoom-group"), c = document.getElementById("js-zoom-close");
5174
+ if (!(r instanceof HTMLElement) || !(a instanceof SVGSVGElement) || !(l instanceof SVGGElement) || !(c instanceof HTMLElement)) {
5175
+ requestAnimationFrame(at);
5176
+ return;
5177
+ }
5178
+ et = !0;
5179
+ const d = document.getElementById("js-zoom-label"), h = document.getElementById("js-zoom-title"), u = document.getElementById("js-town-sprite-data"), f = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
5180
+ let p = null;
5181
+ const _ = () => {
5182
+ if (p)
5183
+ return p;
5184
+ const L = u instanceof HTMLScriptElement ? JSON.parse(u.textContent || '""') : "";
5185
+ return p = vs(gs(L)), p;
5186
+ }, w = () => {
5187
+ r.setAttribute("aria-hidden", "true"), l.replaceChildren();
5188
+ }, C = (L, b) => L.startsWith("97") ? document.querySelector(`path[id="town-${b}-drom"]`)?.getAttribute("d") || null : _().get(`town-${b}`)?.path || null, g = (L, b) => {
5189
+ const I = ps[L] || [];
5190
+ if (I.length === 0)
5165
5191
  return;
5166
- const T = document.createDocumentFragment();
5167
- P.forEach((M) => {
5168
- const W = p(g, M.id);
5169
- if (!W)
5192
+ const z = document.createDocumentFragment();
5193
+ I.forEach((F) => {
5194
+ const M = C(L, F.id);
5195
+ if (!M)
5170
5196
  return;
5171
- const U = _s(M.name, W, w);
5172
- T.appendChild(U);
5173
- }), i.appendChild(T), requestAnimationFrame(() => {
5174
- nt(i);
5197
+ const $ = As(F.name, M, b);
5198
+ z.appendChild($);
5199
+ }), l.appendChild(z), requestAnimationFrame(() => {
5200
+ ct(l);
5175
5201
  });
5176
- }, b = (g) => {
5177
- const { target: w } = g;
5178
- if (!(w instanceof Element))
5202
+ }, y = (L) => {
5203
+ const { target: b } = L;
5204
+ if (!(b instanceof Element))
5179
5205
  return;
5180
- const L = w?.closest(".c-map-towns__dept-trigger");
5181
- if (!L)
5206
+ const E = b?.closest(".c-map-towns__dept-trigger");
5207
+ if (!E)
5182
5208
  return;
5183
- const P = L.getAttribute("id")?.replace("out-", "") || "", T = L.getAttribute("data-name"), M = ps(P, m, d);
5184
- fs(h);
5185
- const W = vs(M, h);
5186
- if (a && l && T && (a.textContent = T, l.textContent = `Carte détaillée du département : ${T}`), !(L instanceof SVGGraphicsElement))
5209
+ const I = E.getAttribute("id")?.replace("out-", "") || "", z = E.getAttribute("data-name"), F = ys(I, _, f);
5210
+ ws(m);
5211
+ const M = Ss(F, m);
5212
+ if (d && h && z && (d.textContent = z, h.textContent = `Carte détaillée du département : ${z}`), !(E instanceof SVGGraphicsElement))
5187
5213
  return;
5188
- const U = ws(e, L);
5189
- t.setAttribute("aria-hidden", "false"), ys(i, W), _(P, U);
5190
- }, A = (g) => {
5191
- const { target: w } = g;
5192
- if (!(w instanceof Element))
5214
+ const $ = Es(a, E);
5215
+ r.setAttribute("aria-hidden", "false"), Ls(l, M), g(I, $);
5216
+ }, A = (L) => {
5217
+ const { target: b } = L;
5218
+ if (!(b instanceof Element))
5193
5219
  return;
5194
- const P = w.closest(".c-map-towns__zoom-town")?.getAttribute("data-url");
5195
- P && (window.location.href = P);
5220
+ const I = b.closest(".c-map-towns__zoom-town")?.getAttribute("data-url");
5221
+ I && Y(I);
5196
5222
  };
5197
- o?.addEventListener("click", b), r?.addEventListener("click", b), i.addEventListener("click", A), n.addEventListener("click", () => {
5198
- f();
5199
- }), t.addEventListener("click", (g) => {
5200
- g.target === t && f();
5223
+ e?.addEventListener("click", y), i?.addEventListener("click", y), l.addEventListener("click", A), c.addEventListener("click", () => {
5224
+ w();
5225
+ }), r.addEventListener("click", (L) => {
5226
+ L.target === r && w();
5201
5227
  });
5202
- }, xs = () => {
5203
- ae(), es(), Kt(), ue(), ie(), Ni(), ki(), ye(), Qi(), K("winterOlympicsGames", "countdown-winter-olympics-games"), K("eurovision", "countdown-eurovision"), K("worldFoot2026", "countdown-world-foot-2026"), Yi(), Gt(), ce(), Jt(), jt(
5228
+ }, Ms = () => {
5229
+ ue(), rs(), te(), ve(), ae(), Gi(), Vi(), Le(), ns(), Q("winterOlympicsGames", "countdown-winter-olympics-games"), Q("eurovision", "countdown-eurovision"), Q("worldFoot2026", "countdown-world-foot-2026"), is(), Jt(), me(), se(), Yt(
5204
5230
  "localisation-input",
5205
5231
  "https://www.20minutes.fr/elections/resultats/recherche",
5206
5232
  "?searchValue=",
5207
5233
  "text",
5208
5234
  "text"
5209
- ), Yt(), nt(), rs(), Ht(), Wt(), de(), it(), Ae(), Ee(), le(), Nt(), ns(), Hi(), Vi();
5235
+ ), ie(), ct(), hs(), Ut(), Kt(), fe(), at(), Te(), Ie(), pe(), Gt(), cs(), Ui(), Xi();
5210
5236
  };
5211
5237
  export {
5212
- xs as initScripts
5238
+ Ms as initScripts
5213
5239
  };