@20minutes/hela 2.17.7 → 2.17.9

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.
Files changed (119) hide show
  1. package/dist/index.es.js +9277 -10768
  2. package/dist/index.umd.cjs +1 -1
  3. package/dist/js/scripts.es.js +671 -586
  4. package/dist/js/scripts.umd.cjs +1 -1
  5. package/dist/scss/abstracts/variables/_token-variables.scss +1 -1
  6. package/dist/src/components/atoms/Ad/Ad.stories.d.ts +1 -2
  7. package/dist/src/components/atoms/Alert/Alert.stories.d.ts +2 -3
  8. package/dist/src/components/atoms/Avatar/Avatar.stories.d.ts +1 -2
  9. package/dist/src/components/atoms/Button/Button.d.ts +1 -1
  10. package/dist/src/components/atoms/Checkbox/Checkbox.stories.d.ts +2 -2
  11. package/dist/src/components/atoms/Icon/Icon.stories.d.ts +1 -0
  12. package/dist/src/components/atoms/Icon/SvgSprite.d.ts +1 -2
  13. package/dist/src/components/atoms/IconTooltip/IconTooltip.stories.d.ts +1 -2
  14. package/dist/src/components/atoms/Iframe/Iframe.d.ts +1 -1
  15. package/dist/src/components/atoms/Iframe/Iframe.stories.d.ts +1 -1
  16. package/dist/src/components/atoms/Img/Img.stories.d.ts +1 -2
  17. package/dist/src/components/atoms/Input/Input.stories.d.ts +1 -1
  18. package/dist/src/components/atoms/LabelSection/LabelSection.stories.d.ts +2 -3
  19. package/dist/src/components/atoms/Layout/Flex/Flex.stories.d.ts +1 -2
  20. package/dist/src/components/atoms/Layout/Grid/Grid.stories.d.ts +2 -3
  21. package/dist/src/components/atoms/Layout/index.d.ts +1 -1
  22. package/dist/src/components/atoms/Link/Link.d.ts +1 -1
  23. package/dist/src/components/atoms/Link/Link.stories.d.ts +2 -3
  24. package/dist/src/components/atoms/Modal/Modal.stories.d.ts +1 -2
  25. package/dist/src/components/atoms/RadioButton/RadioButton.stories.d.ts +1 -1
  26. package/dist/src/components/atoms/ScrollToTopButton/ScrollToTopButton.stories.d.ts +164 -165
  27. package/dist/src/components/atoms/Slider/Slider.stories.d.ts +2 -3
  28. package/dist/src/components/atoms/Textarea/Textarea.stories.d.ts +1 -1
  29. package/dist/src/components/atoms/Typography/index.d.ts +1 -1
  30. package/dist/src/components/atoms/index.d.ts +1 -1
  31. package/dist/src/components/molecules/Article/ArticleHeader/ArticleHeader.stories.d.ts +1 -1
  32. package/dist/src/components/molecules/Article/ArticleSummary/ArticleSummary.stories.d.ts +2 -3
  33. package/dist/src/components/molecules/Article/Media/Media.stories.d.ts +1 -1
  34. package/dist/src/components/molecules/Breadcrumb/Breadcrumb.stories.d.ts +3 -4
  35. package/dist/src/components/molecules/Calendar/Calendar.stories.d.ts +1 -1
  36. package/dist/src/components/molecules/Card/CardContainer/CardContainer.stories.d.ts +2 -3
  37. package/dist/src/components/molecules/Card/CardImage/CardImage.stories.d.ts +1 -2
  38. package/dist/src/components/molecules/Card/CardTitle/CardTitle.stories.d.ts +2 -3
  39. package/dist/src/components/molecules/Card/Templates/CardExtraLarge/CardExtraLarge.stories.d.ts +2 -3
  40. package/dist/src/components/molecules/Card/Templates/CardExtraSmall/CardExtraSmall.stories.d.ts +2 -3
  41. package/dist/src/components/molecules/Card/Templates/CardFrame/CardFrame.stories.d.ts +1 -1
  42. package/dist/src/components/molecules/Card/Templates/CardLarge/CardLarge.stories.d.ts +1 -1
  43. package/dist/src/components/molecules/Card/Templates/CardLarge/CardLargeLive/CardLargeLive.stories.d.ts +1 -1
  44. package/dist/src/components/molecules/Card/Templates/CardMedium/CardMedium.stories.d.ts +1 -2
  45. package/dist/src/components/molecules/Card/Templates/CardMost/CardMost.stories.d.ts +1 -1
  46. package/dist/src/components/molecules/Card/Templates/CardMovie/CardMovie.stories.d.ts +2 -3
  47. package/dist/src/components/molecules/Card/Templates/CardNotification/CardNotification.stories.d.ts +2 -3
  48. package/dist/src/components/molecules/Card/Templates/CardSideImage/CardSideImage.stories.d.ts +2 -3
  49. package/dist/src/components/molecules/Card/Templates/CardSmall/CardSmall.stories.d.ts +2 -3
  50. package/dist/src/components/molecules/Card/Templates/CardVertical/CardVertical.stories.d.ts +2 -3
  51. package/dist/src/components/molecules/Card/Templates/CardVideo/CardVideo.stories.d.ts +3 -4
  52. package/dist/src/components/molecules/Card/Templates/CardVideoSmall/CardVideoSmall.stories.d.ts +2 -3
  53. package/dist/src/components/molecules/Card/Templates/CardWithSummary/CardWithSummary.stories.d.ts +1 -1
  54. package/dist/src/components/molecules/Carousel/Carousel.stories.d.ts +2 -3
  55. package/dist/src/components/molecules/Chart/HalfDonut/HalfDonut.stories.d.ts +1 -1
  56. package/dist/src/components/molecules/Comment/Comment.stories.d.ts +1 -1
  57. package/dist/src/components/molecules/Comment/CommentButton.stories.d.ts +1 -1
  58. package/dist/src/components/molecules/Comment/CommentCount.stories.d.ts +1 -1
  59. package/dist/src/components/molecules/DarkModeSwitch/DarkModeSwitch.stories.d.ts +2 -2
  60. package/dist/src/components/molecules/DiscoverList/DiscoverList.stories.d.ts +165 -166
  61. package/dist/src/components/molecules/Elections/SearchBanner/SearchBanner.d.ts +0 -1
  62. package/dist/src/components/molecules/Elections/SearchBanner/SearchBanner.stories.d.ts +1 -2
  63. package/dist/src/components/molecules/EmojiToolbar/EmojiToolbar.stories.d.ts +1 -1
  64. package/dist/src/components/molecules/Expandable/Expandable.stories.d.ts +2 -3
  65. package/dist/src/components/molecules/Header/HeaderMini/HeaderMini.stories.d.ts +2 -2
  66. package/dist/src/components/molecules/Header/HeaderPage/HeaderPage.stories.d.ts +2 -3
  67. package/dist/src/components/molecules/ImageSlider/ImageSlider.stories.d.ts +1 -1
  68. package/dist/src/components/molecules/InfoBanner/InfoBanner.stories.d.ts +2 -3
  69. package/dist/src/components/molecules/Legend/Legend.stories.d.ts +1 -1
  70. package/dist/src/components/molecules/ListWithDiode/ListWithDiode.stories.d.ts +2 -3
  71. package/dist/src/components/molecules/Live/LiveQuestion/LiveQuestion.stories.d.ts +1 -1
  72. package/dist/src/components/molecules/LogoutButton/LogoutButton.stories.d.ts +1 -1
  73. package/dist/src/components/molecules/Maps/MapDepartments/MapDepartments.stories.d.ts +3 -4
  74. package/dist/src/components/molecules/Maps/MapDistricts/MapDistricts.stories.d.ts +3 -4
  75. package/dist/src/components/molecules/Maps/MapEurope/MapEurope.stories.d.ts +3 -4
  76. package/dist/src/components/molecules/Maps/MapTownsByDepartments/MapTownsByDepartments.d.ts +1 -2
  77. package/dist/src/components/molecules/Maps/MapTownsByDepartments/MapTownsByDepartments.stories.d.ts +1 -1
  78. package/dist/src/components/molecules/MediaLink/MediaLink.stories.d.ts +1 -1
  79. package/dist/src/components/molecules/Menu/Menu.stories.d.ts +2 -2
  80. package/dist/src/components/molecules/MenuList/MenuList.stories.d.ts +3 -4
  81. package/dist/src/components/molecules/Newsletter/Newsletter.stories.d.ts +1 -2
  82. package/dist/src/components/molecules/OrderedListWithNumber/OrderedListWithNumber.stories.d.ts +2 -3
  83. package/dist/src/components/molecules/React/ReactButton.d.ts +4 -1
  84. package/dist/src/components/molecules/React/ReactButton.stories.d.ts +4 -1
  85. package/dist/src/components/molecules/ReadAlsoBanner/ReadAlsoBanner.stories.d.ts +2 -3
  86. package/dist/src/components/molecules/ShowCover/ShowCover.stories.d.ts +1 -1
  87. package/dist/src/components/molecules/Signature/Signature.stories.d.ts +1 -1
  88. package/dist/src/components/molecules/SubMenu/SubMenu.stories.d.ts +1 -1
  89. package/dist/src/components/molecules/Table/Table.stories.d.ts +2 -3
  90. package/dist/src/components/molecules/TagBar/TagBar.stories.d.ts +2 -3
  91. package/dist/src/components/molecules/TextTooltip/TextTooltip.stories.d.ts +1 -2
  92. package/dist/src/components/molecules/Timeline/Timeline.stories.d.ts +2 -3
  93. package/dist/src/components/molecules/UserPanel/UserPanel.stories.d.ts +2 -2
  94. package/dist/src/components/molecules/VerticalTimeline/VerticalTimeline.stories.d.ts +165 -166
  95. package/dist/src/components/molecules/index.d.ts +1 -1
  96. package/dist/src/components/organisms/Elections/ElectionsResult.stories.d.ts +1 -1
  97. package/dist/src/components/organisms/Footer/Footer.stories.d.ts +2 -2
  98. package/dist/src/components/organisms/Header/Header.stories.d.ts +2 -2
  99. package/dist/src/components/organisms/MostReadArticles/MostReadArticles.stories.d.ts +2 -3
  100. package/dist/src/components/organisms/MostWatchVideos/MostWatchVideos.stories.d.ts +2 -3
  101. package/dist/src/components/organisms/PhotoSwipeGallery/PhotoSwipeGallery.stories.d.ts +1 -1
  102. package/dist/src/components/organisms/ThreeColumnsArticles/ThreeColumnsArticles.stories.d.ts +3 -4
  103. package/dist/src/constants/cssProperties/index.d.ts +1 -1
  104. package/dist/src/constants/index.d.ts +6 -6
  105. package/dist/src/constants/storybook/flexBoxSystemPropsControls.d.ts +1 -1
  106. package/dist/src/constants/storybook/flexItemBoxSystemPropsControls.d.ts +1 -1
  107. package/dist/src/constants/storybook/index.d.ts +6 -6
  108. package/dist/src/constants/storybook/spacingSystemPropsControls.d.ts +1 -1
  109. package/dist/src/constants/storybook/systemPropsControls.d.ts +1 -1
  110. package/dist/src/constants/systemProps/index.d.ts +1 -1
  111. package/dist/src/helpers/systemPropsHelper/index.d.ts +8 -8
  112. package/dist/src/helpers/townSprite.d.ts +8 -0
  113. package/dist/src/index.d.ts +2 -2
  114. package/dist/src/types/ComponentWithAs.d.ts +4 -4
  115. package/dist/src/types/CssProperties/index.d.ts +1 -1
  116. package/dist/src/types/SystemProps/index.d.ts +4 -4
  117. package/dist/src/types/index.d.ts +1 -1
  118. package/dist/style.css +1 -1
  119. package/package.json +18 -29
@@ -1,15 +1,15 @@
1
- const Bt = () => /Android/i.test(navigator.userAgent), Ft = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), Zt = () => {
1
+ const kt = () => /Android/i.test(navigator.userAgent), qt = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), Nt = () => {
2
2
  const s = document.getElementById("js-download-band");
3
- s && Bt() && s.setAttribute(
3
+ s && kt() && s.setAttribute(
4
4
  "href",
5
5
  "https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome"
6
6
  );
7
- }, qt = () => {
7
+ }, Ht = () => {
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
- }, kt = () => {
12
+ }, Wt = () => {
13
13
  const s = document.querySelector(".c-search-banner");
14
14
  if (!s)
15
15
  return;
@@ -24,7 +24,7 @@ const Bt = () => /Android/i.test(navigator.userAgent), Ft = 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
- }, Nt = [
27
+ }, Vt = [
28
28
  {
29
29
  text: "Paris",
30
30
  _index: "town_1717424751904",
@@ -55,48 +55,50 @@ const Bt = () => /Android/i.test(navigator.userAgent), Ft = typeof window < "u"
55
55
  url: "/elections/resultats/paris/paris-75011"
56
56
  }
57
57
  }
58
- ], Ht = (s, t, e, i, n, o) => {
58
+ ], jt = (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 (g) => {
65
+ const h = r.querySelector(".c-autocomplete__input-spinner"), u = l.getAttribute("data-trigger-message"), m = async (v) => {
66
66
  try {
67
- let _;
68
- return a && t.includes("20minutes.fr") ? _ = Nt : _ = await (await fetch(`${c}${e}${encodeURIComponent(g)}`)).json(), o ? _[o] : _;
69
- } catch (_) {
70
- return console.error("Error fetching autocomplete results:", _), [];
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), [];
71
73
  }
72
- }, f = (g, _) => {
74
+ }, f = (v, g) => {
73
75
  const w = document.createElement("li");
74
- w.id = `/${g}`, w.textContent = _, w.addEventListener("click", () => {
75
- l instanceof HTMLInputElement && (l.value = _, d.classList.add("u-hidden"));
76
+ w.id = `/${v}`, w.textContent = g, w.addEventListener("click", () => {
77
+ l instanceof HTMLInputElement && (l.value = g, d.classList.add("u-hidden"));
76
78
  }), d.appendChild(w);
77
79
  }, p = () => {
78
80
  h?.classList.toggle("u-hidden");
79
- }, y = () => {
80
- const g = document.createElement("li");
81
- g.textContent = u, d.appendChild(g);
82
- }, S = async (g) => {
81
+ }, _ = () => {
82
+ const v = document.createElement("li");
83
+ v.textContent = u, d.appendChild(v);
84
+ }, b = async (v) => {
83
85
  p(), d.classList.remove("u-hidden");
84
- const _ = await m(g);
85
- d.innerHTML = "", _.length === 0 && d.classList.add("u-hidden"), _.forEach((w) => {
86
+ const g = await m(v);
87
+ d.innerHTML = "", g.length === 0 && d.classList.add("u-hidden"), g.forEach((w) => {
86
88
  f(w[i], w[n]);
87
89
  }), p();
88
- }, L = (g) => {
89
- if (!(g.target instanceof HTMLInputElement))
90
+ }, A = (v) => {
91
+ if (!(v.target instanceof HTMLInputElement))
90
92
  return;
91
- const _ = g.target.value;
92
- d.classList.remove("u-hidden"), _.length >= 3 ? S(_) : (d.innerHTML = "", y());
93
+ const g = v.target.value;
94
+ d.classList.remove("u-hidden"), g.length >= 3 ? b(g) : (d.innerHTML = "", _());
93
95
  };
94
- l.addEventListener("input", L), l.addEventListener("focusout", () => {
96
+ l.addEventListener("input", A), l.addEventListener("focusout", () => {
95
97
  setTimeout(() => d.classList.add("u-hidden"), 300);
96
98
  }), l.addEventListener("focusin", () => {
97
99
  d.childElementCount > 0 && d.classList.remove("u-hidden");
98
100
  });
99
- }, Wt = () => {
101
+ }, Gt = () => {
100
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;
101
103
  if (s && t && e) {
102
104
  const o = new IntersectionObserver(
@@ -109,7 +111,7 @@ const Bt = () => /Android/i.test(navigator.userAgent), Ft = typeof window < "u"
109
111
  );
110
112
  o.observe(s), o.observe(t);
111
113
  }
112
- }, Vt = (s) => {
114
+ }, Ut = (s) => {
113
115
  s.stopImmediatePropagation(), s.preventDefault();
114
116
  const t = s.currentTarget;
115
117
  if (t instanceof HTMLButtonElement) {
@@ -118,15 +120,15 @@ const Bt = () => /Android/i.test(navigator.userAgent), Ft = typeof window < "u"
118
120
  );
119
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"));
120
122
  }
121
- }, jt = (s = document.querySelector(
123
+ }, Kt = (s = document.querySelector(
122
124
  ".js-collapse__button"
123
125
  )) => {
124
126
  s && document.querySelectorAll(".c-collapse__button").forEach((e) => {
125
127
  e.addEventListener("click", (i) => {
126
- Vt(i);
128
+ Ut(i);
127
129
  });
128
130
  });
129
- }, V = (s, t) => {
131
+ }, K = (s, t) => {
130
132
  const e = document.querySelector(
131
133
  `#${t}`
132
134
  );
@@ -141,7 +143,7 @@ const Bt = () => /Android/i.test(navigator.userAgent), Ft = typeof window < "u"
141
143
  worldFoot2026: "2026-06-11 15:00:00"
142
144
  };
143
145
  const a = window.counters[s], l = new Date(a).getTime(), c = setInterval(() => {
144
- const d = (/* @__PURE__ */ new Date()).getTime(), h = l - d;
146
+ const d = Date.now(), h = l - d;
145
147
  if (h <= 0)
146
148
  clearInterval(c);
147
149
  else {
@@ -150,12 +152,12 @@ const Bt = () => /Android/i.test(navigator.userAgent), Ft = typeof window < "u"
150
152
  }
151
153
  }, 1e3);
152
154
  }
153
- }, Gt = (s) => {
155
+ }, Xt = (s) => {
154
156
  const t = s.getBBox(), e = t.width / 20;
155
157
  return [t.x - e, t.y - e, t.width + e * 2, t.height + e * 2].join(
156
158
  " "
157
159
  );
158
- }, Ut = () => {
160
+ }, Yt = () => {
159
161
  const s = document.querySelector(".c-map-districts-container"), t = document.querySelector(".c-map-districts");
160
162
  if (!s || !t)
161
163
  return;
@@ -167,28 +169,28 @@ const Bt = () => /Android/i.test(navigator.userAgent), Ft = typeof window < "u"
167
169
  ".c-map-districts-container__unzoom-button"
168
170
  );
169
171
  let o = t;
170
- const r = t.getAttribute("viewBox"), a = (f, p) => f.matches?.call(f, p), l = (f, p, y = ".c-map-districts__zoomable:not(.js-selected-area)") => {
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)") => {
171
173
  if (!f)
172
174
  return;
173
- let S, L = f.parentElement;
174
- for (; L instanceof SVGGraphicsElement && L !== p; )
175
- a(L, y) && (S = L), L = L.parentElement;
176
- return S;
177
- }, c = (f, p, y) => {
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, _) => {
178
180
  if (!f)
179
181
  return;
180
- let S = f.parentElement;
181
- for (; S instanceof SVGGraphicsElement && S !== y; ) {
182
- if (p === S)
182
+ let b = f.parentElement;
183
+ for (; b instanceof SVGGraphicsElement && b !== _; ) {
184
+ if (p === b)
183
185
  return !0;
184
- S = S.parentElement;
186
+ b = b.parentElement;
185
187
  }
186
- return y === p;
188
+ return _ === p;
187
189
  }, d = (f, p) => {
188
190
  if (p && n && e) {
189
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;
190
- const y = o.getAttribute("data-info");
191
- i && y && (s.classList.add("c-map-districts-container--department-view"), i.classList.remove("u-hidden"), i.innerHTML = y), o.classList.add("js-selected-area"), t.setAttribute("viewBox", p);
192
+ const _ = o.getAttribute("data-info");
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);
192
194
  }
193
195
  }, h = (f) => {
194
196
  f.stopPropagation();
@@ -200,13 +202,13 @@ const Bt = () => /Android/i.test(navigator.userAgent), Ft = typeof window < "u"
200
202
  d(t, r);
201
203
  return;
202
204
  }
203
- const y = l(
205
+ const _ = l(
204
206
  p,
205
207
  o
206
208
  );
207
209
  d(
208
- y || p,
209
- Gt(y || p)
210
+ _ || p,
211
+ Xt(_ || p)
210
212
  );
211
213
  }
212
214
  }, u = () => {
@@ -215,7 +217,7 @@ const Bt = () => /Android/i.test(navigator.userAgent), Ft = typeof window < "u"
215
217
  t.addEventListener("click", u), n && n.addEventListener("click", u), document.querySelectorAll(".c-map-districts__zoomable").forEach((f) => {
216
218
  f.addEventListener("click", (p) => h(p));
217
219
  });
218
- }, Kt = () => {
220
+ }, Jt = () => {
219
221
  const s = document.getElementById("elections-form-search"), t = document.querySelector(".c-search-form__autocomplete");
220
222
  if (!s || !t)
221
223
  return;
@@ -223,8 +225,7 @@ const Bt = () => /Android/i.test(navigator.userAgent), Ft = typeof window < "u"
223
225
  t.classList.remove("u-hidden");
224
226
  const r = t.querySelectorAll("li"), a = [];
225
227
  return r.forEach((l) => {
226
- const c = l.querySelector("a");
227
- c && c.innerHTML.toLowerCase().includes(o.toLowerCase()) && a.push(l.innerHTML);
228
+ l.querySelector("a")?.innerHTML.toLowerCase().includes(o.toLowerCase()) && a.push(l.innerHTML);
228
229
  }), a;
229
230
  }, i = (o) => {
230
231
  t.innerHTML += `<li>${o}</li>`;
@@ -244,52 +245,62 @@ const Bt = () => /Android/i.test(navigator.userAgent), Ft = typeof window < "u"
244
245
  }), s.addEventListener("focusin", () => {
245
246
  t.childElementCount > 0 && t.classList.remove("u-hidden");
246
247
  });
247
- }, Xt = (s, t) => {
248
- s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => n.classList.remove(t));
248
+ }, Qt = (s, t) => {
249
+ s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => {
250
+ n.classList.remove(t);
251
+ });
249
252
  const i = s.querySelector(".js-ellipsis-button__label");
250
253
  i instanceof HTMLSpanElement && (i.innerHTML = "Voir moins");
251
- }, Yt = (s, t) => {
252
- s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => n.classList.add(t)), s.setAttribute("aria-expanded", "false");
254
+ }, te = (s, t) => {
255
+ s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => {
256
+ n.classList.add(t);
257
+ }), s.setAttribute("aria-expanded", "false");
253
258
  const i = s.querySelector(".js-ellipsis-button__label");
254
259
  i instanceof HTMLSpanElement && (i.innerHTML = "Voir plus");
255
- }, Jt = (s, t) => {
260
+ }, ee = (s, t) => {
256
261
  const e = s.currentTarget;
257
262
  if (s.preventDefault(), e instanceof HTMLButtonElement) {
258
263
  const i = t ? "u-ellipsis-multiline" : "u-ellipsis";
259
- return e.getAttribute("aria-expanded") === "true" ? Yt(e, i) : Xt(e, i);
264
+ return e.getAttribute("aria-expanded") === "true" ? te(e, i) : Qt(e, i);
260
265
  }
261
266
  return null;
262
- }, Qt = (s = document.querySelector(
267
+ }, ie = (s = document.querySelector(
263
268
  ".js-ellipsis-button"
264
269
  )) => {
265
270
  s && document.querySelectorAll(".js-ellipsis-button").forEach((e) => {
266
271
  const i = e.getAttribute("data-multiple") === "true";
267
- e.addEventListener("click", (n) => Jt(n, i));
272
+ e.addEventListener("click", (n) => ee(n, i));
273
+ });
274
+ }, se = (s) => {
275
+ s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => {
276
+ i.setAttribute("aria-hidden", "false");
268
277
  });
269
- }, te = (s) => {
270
- s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => i.setAttribute("aria-hidden", "false"));
271
278
  const e = s.querySelector(".js-expand-button__label");
272
279
  e instanceof HTMLSpanElement && (e.innerHTML = "Voir moins");
273
- }, ee = (s) => {
274
- s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => i.setAttribute("aria-hidden", "true")), s.setAttribute("aria-expanded", "false");
280
+ }, ne = (s) => {
281
+ s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => {
282
+ i.setAttribute("aria-hidden", "true");
283
+ }), s.setAttribute("aria-expanded", "false");
275
284
  const e = s.querySelector(".js-expand-button__label");
276
285
  e instanceof HTMLSpanElement && (e.innerHTML = "Voir plus");
277
- }, ie = (s) => {
286
+ }, oe = (s) => {
278
287
  const t = s.currentTarget;
279
- return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? ee(t) : te(t) : null;
280
- }, se = (s) => {
288
+ return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? ne(t) : se(t) : null;
289
+ }, re = (s) => {
281
290
  const t = s.parentNode?.querySelector(".js-expand-target");
282
291
  return !t || t.classList.contains("c-elections-result__members") ? !1 : (t.textContent?.trim().length ?? 0) < 255;
283
- }, ne = (s = document.querySelector(
292
+ }, ae = (s = document.querySelector(
284
293
  ".js-expand-button"
285
294
  )) => {
286
295
  s && document.querySelectorAll(".js-expand-button").forEach((e) => {
287
- se(e) ? (e.style.display = "none", e.parentNode?.querySelectorAll(".js-expand-target")?.forEach((n) => n.setAttribute("aria-hidden", "false"))) : e.addEventListener("click", ie);
296
+ re(e) ? (e.style.display = "none", e.parentNode?.querySelectorAll(".js-expand-target")?.forEach((n) => {
297
+ n.setAttribute("aria-hidden", "false");
298
+ })) : e.addEventListener("click", oe);
288
299
  });
289
- }, oe = () => {
300
+ }, le = () => {
290
301
  const s = document.querySelector(".js-game-alert");
291
- Ft && s && s.classList.remove("u-hidden");
292
- }, re = () => {
302
+ qt && s && s.classList.remove("u-hidden");
303
+ }, ce = () => {
293
304
  const s = document.querySelectorAll(".js-half-donut-result");
294
305
  for (const t of Array.from(s)) {
295
306
  const e = t.querySelector(".c-half-donut"), i = t.querySelector(".c-legend");
@@ -308,7 +319,7 @@ const Bt = () => /Android/i.test(navigator.userAgent), Ft = typeof window < "u"
308
319
  });
309
320
  });
310
321
  }
311
- }, ae = () => {
322
+ }, de = () => {
312
323
  const s = document.querySelector(".c-image-slider__container");
313
324
  if (!s)
314
325
  return () => {
@@ -316,22 +327,22 @@ const Bt = () => /Android/i.test(navigator.userAgent), Ft = typeof window < "u"
316
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");
317
328
  let o = 0, r = null, a = !1;
318
329
  const l = () => {
319
- n.forEach((g, _) => {
320
- g.classList.toggle("c-image-slider__indicator--is-active", _ === o);
330
+ n.forEach((v, g) => {
331
+ v.classList.toggle("c-image-slider__indicator--is-active", g === o);
321
332
  });
322
- }, c = (g = !0) => {
333
+ }, c = (v = !0) => {
323
334
  if (!(s instanceof HTMLElement))
324
335
  return;
325
- s.style.transition = g ? "transform 0.3s ease" : "none";
326
- const _ = -o * 100;
327
- s.style.transform = `translateX(${_}%)`, l();
328
- }, d = (g) => {
329
- o = g, c(!0);
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);
330
341
  }, h = () => {
331
342
  r && clearInterval(r), r = setInterval(() => {
332
343
  if (!a) {
333
- const g = (o + 1) % t.length;
334
- d(g);
344
+ const v = (o + 1) % t.length;
345
+ d(v);
335
346
  }
336
347
  }, 4e3);
337
348
  }, u = () => {
@@ -343,83 +354,83 @@ const Bt = () => /Android/i.test(navigator.userAgent), Ft = typeof window < "u"
343
354
  };
344
355
  e?.addEventListener("click", () => {
345
356
  m();
346
- const g = (o - 1 + t.length) % t.length;
347
- d(g), setTimeout(f, 5e3);
357
+ const v = (o - 1 + t.length) % t.length;
358
+ d(v), setTimeout(f, 5e3);
348
359
  }), i?.addEventListener("click", () => {
349
360
  m();
350
- const g = (o + 1) % t.length;
351
- d(g), setTimeout(f, 5e3);
352
- }), n.forEach((g, _) => {
353
- g.addEventListener("click", () => {
354
- m(), d(_), setTimeout(f, 5e3);
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);
355
366
  });
356
367
  });
357
- let p = 0, y = 0, S = !1;
358
- return s.addEventListener("touchstart", (g) => {
359
- s instanceof HTMLElement && (m(), p = g.touches[0].clientX, y = p, S = !0, s.style.transition = "none");
360
- }), s.addEventListener("touchmove", (g) => {
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) => {
361
372
  if (!(s instanceof HTMLElement))
362
373
  return;
363
- y = g.touches[0].clientX;
364
- const _ = y - p, w = -o * window.innerWidth + _;
374
+ _ = v.touches[0].clientX;
375
+ const g = _ - p, w = -o * window.innerWidth + g;
365
376
  s.style.transform = `translateX(${w}px)`;
366
377
  }), s.addEventListener("touchend", () => {
367
- if (!S)
378
+ if (!b)
368
379
  return;
369
- S = !1;
370
- const g = y - p;
371
- 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(f, 5e3);
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);
372
383
  }), c(!0), h(), () => {
373
384
  u();
374
385
  };
375
- }, le = (s) => {
386
+ }, he = (s) => {
376
387
  s.stopImmediatePropagation(), s.preventDefault();
377
388
  const t = s.currentTarget, e = document.getElementById("info-button-content");
378
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")));
379
- }, ce = () => {
390
+ }, ue = () => {
380
391
  const s = document.querySelector(".js-info-banner__button");
381
- s instanceof HTMLButtonElement && s.addEventListener("click", le);
382
- }, v = {
392
+ s instanceof HTMLButtonElement && s.addEventListener("click", he);
393
+ }, y = {
383
394
  inert: ":not([inert]):not([inert] *)",
384
395
  negTabIndex: ':not([tabindex^="-"])',
385
396
  disabled: ":not(:disabled)"
386
397
  };
387
- var de = [
388
- `a[href]${v.inert}${v.negTabIndex}`,
389
- `area[href]${v.inert}${v.negTabIndex}`,
390
- `input:not([type="hidden"]):not([type="radio"])${v.inert}${v.negTabIndex}${v.disabled}`,
391
- `input[type="radio"]${v.inert}${v.negTabIndex}${v.disabled}`,
392
- `select${v.inert}${v.negTabIndex}${v.disabled}`,
393
- `textarea${v.inert}${v.negTabIndex}${v.disabled}`,
394
- `button${v.inert}${v.negTabIndex}${v.disabled}`,
395
- `details${v.inert} > summary:first-of-type${v.negTabIndex}`,
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}`,
396
407
  // Discard until Firefox supports `:has()`
397
408
  // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
398
409
  // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
399
- `iframe${v.inert}${v.negTabIndex}`,
400
- `audio[controls]${v.inert}${v.negTabIndex}`,
401
- `video[controls]${v.inert}${v.negTabIndex}`,
402
- `[contenteditable]${v.inert}${v.negTabIndex}`,
403
- `[tabindex]${v.inert}${v.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}`
404
415
  ];
405
- function et(s) {
416
+ function ot(s) {
406
417
  (s.querySelector("[autofocus]") || s).focus();
407
418
  }
408
- function he(s) {
409
- const t = $(s, !0), e = t ? $(s, !1) || t : null;
419
+ function me(s) {
420
+ const t = Z(s, !0), e = t ? Z(s, !1) || t : null;
410
421
  return [t, e];
411
422
  }
412
- function $(s, t) {
413
- if (t && nt(s))
423
+ function Z(s, t) {
424
+ if (t && lt(s))
414
425
  return s;
415
- if (pe(s))
426
+ if (ge(s))
416
427
  if (s.shadowRoot) {
417
- let e = it(s.shadowRoot, t);
428
+ let e = rt(s.shadowRoot, t);
418
429
  for (; e; ) {
419
- const i = $(e, t);
430
+ const i = Z(e, t);
420
431
  if (i)
421
432
  return i;
422
- e = st(e, t);
433
+ e = at(e, t);
423
434
  }
424
435
  } else if (s.localName === "slot") {
425
436
  const e = s.assignedElements({
@@ -427,56 +438,56 @@ function $(s, t) {
427
438
  });
428
439
  t || e.reverse();
429
440
  for (const i of e) {
430
- const n = $(i, t);
441
+ const n = Z(i, t);
431
442
  if (n)
432
443
  return n;
433
444
  }
434
445
  } else {
435
- let e = it(s, t);
446
+ let e = rt(s, t);
436
447
  for (; e; ) {
437
- const i = $(e, t);
448
+ const i = Z(e, t);
438
449
  if (i)
439
450
  return i;
440
- e = st(e, t);
451
+ e = at(e, t);
441
452
  }
442
453
  }
443
- return !t && nt(s) ? s : null;
454
+ return !t && lt(s) ? s : null;
444
455
  }
445
- function it(s, t) {
456
+ function rt(s, t) {
446
457
  return t ? s.firstElementChild : s.lastElementChild;
447
458
  }
448
- function st(s, t) {
459
+ function at(s, t) {
449
460
  return t ? s.nextElementSibling : s.previousElementSibling;
450
461
  }
451
- const ue = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), nt = (s) => s.shadowRoot?.delegatesFocus ? !1 : s.matches(de.join(",")) && !ue(s);
452
- function pe(s) {
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) {
453
464
  return s.shadowRoot && s.getAttribute("tabindex") === "-1" ? !1 : !s.matches(":disabled,[hidden],[inert]");
454
465
  }
455
- function R(s = document) {
466
+ function k(s = document) {
456
467
  const t = s.activeElement;
457
- return t ? t.shadowRoot ? R(t.shadowRoot) || document.activeElement : t : null;
468
+ return t ? t.shadowRoot ? k(t.shadowRoot) || document.activeElement : t : null;
458
469
  }
459
- function me(s, t) {
460
- const [e, i] = he(s);
470
+ function ve(s, t) {
471
+ const [e, i] = me(s);
461
472
  if (!e)
462
473
  return t.preventDefault();
463
- const n = R();
474
+ const n = k();
464
475
  t.shiftKey && n === e ? (i.focus(), t.preventDefault()) : !t.shiftKey && n === i && (e.focus(), t.preventDefault());
465
476
  }
466
- function I(s, t) {
477
+ function O(s, t) {
467
478
  function e(i) {
468
479
  if (!i || i === document || i === window)
469
480
  return null;
470
- const n = bt(i);
481
+ const n = Et(i);
471
482
  return n && (i = n), i.closest(s) || e(i.getRootNode().host);
472
483
  }
473
484
  return e(t);
474
485
  }
475
- function bt(s) {
476
- return s.assignedSlot || (s.parentNode ? bt(s.parentNode) : null);
486
+ function Et(s) {
487
+ return s.assignedSlot || (s.parentNode ? Et(s.parentNode) : null);
477
488
  }
478
- const T = "data-a11y-dialog";
479
- class St {
489
+ const D = "data-a11y-dialog";
490
+ class Ct {
480
491
  $el;
481
492
  id;
482
493
  previouslyFocused;
@@ -499,7 +510,7 @@ class St {
499
510
  * `[data-a11y-dialog-show="<id>"]` and `[data-a11y-dialog-hide="<id>"]`.
500
511
  */
501
512
  constructor(t) {
502
- this.$el = t, this.id = this.$el.getAttribute(T) || 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(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);
503
514
  }
504
515
  /**
505
516
  * Destroy the current instance (after making sure the dialog has been hidden)
@@ -525,7 +536,7 @@ class St {
525
536
  * Returns the instance to allow method chaining.
526
537
  */
527
538
  show(t) {
528
- return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = R(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() : et(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 = 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);
529
540
  }
530
541
  /**
531
542
  * Hide the dialog.
@@ -573,7 +584,7 @@ class St {
573
584
  * dialog are clicked, and call `show` or `hide`, respectively
574
585
  */
575
586
  handleTriggerClicks(t) {
576
- const e = t.composedPath()[0], i = I(`[${T}-show="${this.id}"]`, e), n = I(`[${T}-hide="${this.id}"]`, e), o = I(`[${T}-hide]`, e) && I('[aria-modal="true"]', e) === this.$el;
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;
577
588
  i && this.show(t), (n || o) && this.hide(t);
578
589
  }
579
590
  /**
@@ -581,14 +592,14 @@ class St {
581
592
  * (namely ESC and TAB)
582
593
  */
583
594
  bindKeypress(t) {
584
- if (I('[aria-modal="true"]', R()) !== this.$el)
595
+ if (O('[aria-modal="true"]', k()) !== this.$el)
585
596
  return;
586
597
  let e = !1;
587
598
  try {
588
599
  e = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
589
600
  } catch {
590
601
  }
591
- t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && me(this.$el, t);
602
+ t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && ve(this.$el, t);
592
603
  }
593
604
  /**
594
605
  * If the dialog is shown and the focus is not within a dialog element (either
@@ -597,25 +608,33 @@ class St {
597
608
  * See: https://github.com/KittyGiraudel/a11y-dialog/issues/177
598
609
  */
599
610
  maintainFocus() {
600
- const t = R();
601
- I(`[aria-modal="true"], [${T}-ignore-focus-trap]`, t) || et(this.$el);
611
+ const t = k();
612
+ O(`[aria-modal="true"], [${D}-ignore-focus-trap]`, t) || ot(this.$el);
602
613
  }
603
614
  }
604
- function ot() {
615
+ function ct() {
605
616
  for (const s of document.querySelectorAll("[data-a11y-dialog]"))
606
- new St(s);
617
+ new Ct(s);
607
618
  }
608
- typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", ot) : ot());
609
- const fe = () => document.querySelectorAll(".js-modal").forEach((s) => {
619
+ typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", ct) : ct());
620
+ const ye = () => document.querySelectorAll(".js-modal").forEach((s) => {
610
621
  if (!(s instanceof HTMLElement))
611
622
  return;
612
- const t = new St(s);
623
+ const t = new Ct(s);
613
624
  if (s.id === "dialog-menu") {
614
625
  const e = document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"), i = document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");
615
626
  e.length > 0 && i.length > 0 && (t.on("show", () => {
616
- e.forEach((n) => n.classList.add("u-hidden")), i.forEach((n) => n.classList.remove("u-hidden"));
627
+ e.forEach((n) => {
628
+ n.classList.add("u-hidden");
629
+ }), i.forEach((n) => {
630
+ n.classList.remove("u-hidden");
631
+ });
617
632
  }), t.on("hide", () => {
618
- e.forEach((n) => n.classList.remove("u-hidden")), i.forEach((n) => n.classList.add("u-hidden"));
633
+ e.forEach((n) => {
634
+ n.classList.remove("u-hidden");
635
+ }), i.forEach((n) => {
636
+ n.classList.add("u-hidden");
637
+ });
619
638
  }));
620
639
  }
621
640
  t.on("show", () => {
@@ -623,28 +642,28 @@ const fe = () => document.querySelectorAll(".js-modal").forEach((s) => {
623
642
  }).on("hide", () => {
624
643
  document.body.classList.remove("noscroll");
625
644
  });
626
- }), Lt = "68px", At = "50px", Q = ({
645
+ }), xt = "68px", Pt = "50px", st = ({
627
646
  navigationContainer: s,
628
647
  navigatedList: t,
629
648
  nextBtn: e,
630
649
  prevBtn: i
631
650
  }) => {
632
- const n = s.classList.contains("c-breadcrumb--is-small") ? At : Lt;
651
+ const n = s.classList.contains("c-breadcrumb--is-small") ? Pt : xt;
633
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 = "");
634
- }, ge = ({
653
+ }, _e = ({
635
654
  navigationContainer: s,
636
655
  navigatedList: t,
637
656
  nextBtn: e,
638
657
  prevBtn: i
639
658
  }) => {
640
659
  const n = t.scrollLeft > 0, o = t.scrollLeft + (t.clientWidth + 0.5) < t.scrollWidth;
641
- 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") && Q({
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({
642
661
  navigationContainer: s,
643
662
  navigatedList: t,
644
663
  nextBtn: e,
645
664
  prevBtn: i
646
665
  });
647
- }, ve = ({
666
+ }, we = ({
648
667
  navigationContainer: s,
649
668
  navigatedList: t,
650
669
  nextBtn: e,
@@ -689,14 +708,14 @@ const fe = () => document.querySelectorAll(".js-modal").forEach((s) => {
689
708
  behavior: "smooth"
690
709
  }), e.classList.remove("o-nav-button--visible"), i.classList.add("o-nav-button--visible");
691
710
  }
692
- e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && Q({
711
+ e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && st({
693
712
  navigationContainer: s,
694
713
  navigatedList: t,
695
714
  nextBtn: e,
696
715
  prevBtn: i
697
716
  });
698
717
  }
699
- }, ye = ({
718
+ }, be = ({
700
719
  navigationContainer: s,
701
720
  navigatedList: t,
702
721
  nextBtn: e,
@@ -737,26 +756,26 @@ const fe = () => document.querySelectorAll(".js-modal").forEach((s) => {
737
756
  left: 0,
738
757
  behavior: "smooth"
739
758
  }), i.classList.remove("o-nav-button--visible"), t.clientWidth < t.scrollWidth && e.classList.add("o-nav-button--visible");
740
- e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && Q({
759
+ e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && st({
741
760
  navigationContainer: s,
742
761
  navigatedList: t,
743
762
  nextBtn: e,
744
763
  prevBtn: i
745
764
  });
746
765
  }
747
- }, _e = ({
766
+ }, Se = ({
748
767
  navigationContainer: s,
749
768
  navigatedList: t,
750
769
  nextBtn: e,
751
770
  prevBtn: i
752
771
  }) => {
753
- ge({
772
+ _e({
754
773
  navigationContainer: s,
755
774
  navigatedList: t,
756
775
  nextBtn: e,
757
776
  prevBtn: i
758
777
  });
759
- }, we = (s) => {
778
+ }, Le = (s) => {
760
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(
761
780
  ".js-navigation-container__list"
762
781
  ), c = s.querySelector(".o-nav-button--next-button"), d = s.querySelector(
@@ -764,12 +783,12 @@ const fe = () => document.querySelectorAll(".js-modal").forEach((s) => {
764
783
  );
765
784
  if (!(!l || !c || !d)) {
766
785
  if (l.clientWidth < l.scrollWidth && (c.classList.add("o-nav-button--visible"), c.classList.contains("c-slider__button-container--has-space-around"))) {
767
- const h = s.classList.contains("c-breadcrumb--is-small") ? At : Lt;
786
+ const h = s.classList.contains("c-breadcrumb--is-small") ? Pt : xt;
768
787
  s.style.paddingRight = h;
769
788
  }
770
789
  if (c.addEventListener(
771
790
  "click",
772
- ve.bind(!1, {
791
+ we.bind(!1, {
773
792
  navigationContainer: s,
774
793
  navigatedList: l,
775
794
  nextBtn: c,
@@ -778,7 +797,7 @@ const fe = () => document.querySelectorAll(".js-modal").forEach((s) => {
778
797
  })
779
798
  ), d.addEventListener(
780
799
  "click",
781
- ye.bind(!1, {
800
+ be.bind(!1, {
782
801
  navigationContainer: s,
783
802
  navigatedList: l,
784
803
  nextBtn: c,
@@ -803,7 +822,7 @@ const fe = () => document.querySelectorAll(".js-modal").forEach((s) => {
803
822
  }, n);
804
823
  }
805
824
  }
806
- }, be = () => {
825
+ }, Ae = () => {
807
826
  const s = document.querySelectorAll(".js-navigation-container");
808
827
  Array.from(s).forEach((t) => {
809
828
  const e = t.querySelector(
@@ -813,13 +832,13 @@ const fe = () => document.querySelectorAll(".js-modal").forEach((s) => {
813
832
  const i = new ResizeObserver((n) => {
814
833
  n.forEach((o) => {
815
834
  const { width: r } = o.contentRect;
816
- r > 0 && (we(t), i.disconnect());
835
+ r > 0 && (Le(t), i.disconnect());
817
836
  });
818
837
  });
819
838
  i.observe(e);
820
839
  }
821
840
  });
822
- }, Se = () => {
841
+ }, Ee = () => {
823
842
  const s = document.querySelectorAll(".js-navigation-container");
824
843
  for (const t of Array.from(s))
825
844
  if (t) {
@@ -832,7 +851,7 @@ const fe = () => document.querySelectorAll(".js-modal").forEach((s) => {
832
851
  );
833
852
  e && i && n && window.addEventListener(
834
853
  "resize",
835
- _e.bind(!1, {
854
+ Se.bind(!1, {
836
855
  navigationContainer: t,
837
856
  navigatedList: e,
838
857
  nextBtn: i,
@@ -841,59 +860,59 @@ const fe = () => document.querySelectorAll(".js-modal").forEach((s) => {
841
860
  );
842
861
  }
843
862
  };
844
- function A(s, t, e) {
863
+ function E(s, t, e) {
845
864
  const i = document.createElement(t);
846
865
  return s && (i.className = s), e && e.appendChild(i), i;
847
866
  }
848
- function b(s, t) {
867
+ function S(s, t) {
849
868
  return s.x = t.x, s.y = t.y, t.id !== void 0 && (s.id = t.id), s;
850
869
  }
851
- function Et(s) {
870
+ function Tt(s) {
852
871
  s.x = Math.round(s.x), s.y = Math.round(s.y);
853
872
  }
854
- function G(s, t) {
873
+ function Y(s, t) {
855
874
  const e = Math.abs(s.x - t.x), i = Math.abs(s.y - t.y);
856
875
  return Math.sqrt(e * e + i * i);
857
876
  }
858
- function B(s, t) {
877
+ function q(s, t) {
859
878
  return s.x === t.x && s.y === t.y;
860
879
  }
861
- function Z(s, t, e) {
880
+ function H(s, t, e) {
862
881
  return Math.min(Math.max(s, t), e);
863
882
  }
864
- function F(s, t, e) {
883
+ function N(s, t, e) {
865
884
  let i = `translate3d(${s}px,${t || 0}px,0)`;
866
885
  return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
867
886
  }
868
- function P(s, t, e, i) {
869
- s.style.transform = F(t, e, i);
887
+ function z(s, t, e, i) {
888
+ s.style.transform = N(t, e, i);
870
889
  }
871
- const Le = "cubic-bezier(.4,0,.22,1)";
872
- function Ct(s, t, e, i) {
873
- s.style.transition = t ? `${t} ${e}ms ${i || Le}` : "none";
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";
874
893
  }
875
- function U(s, t, e) {
894
+ function J(s, t, e) {
876
895
  s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
877
896
  }
878
- function Ae(s) {
879
- Ct(s);
897
+ function xe(s) {
898
+ It(s);
880
899
  }
881
- function Ee(s) {
900
+ function Pe(s) {
882
901
  return "decode" in s ? s.decode().catch(() => {
883
902
  }) : s.complete ? Promise.resolve(s) : new Promise((t, e) => {
884
903
  s.onload = () => t(s), s.onerror = e;
885
904
  });
886
905
  }
887
- const E = {
906
+ const C = {
888
907
  IDLE: "idle",
889
908
  LOADING: "loading",
890
909
  LOADED: "loaded",
891
910
  ERROR: "error"
892
911
  };
893
- function Ce(s) {
912
+ function Te(s) {
894
913
  return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
895
914
  }
896
- function xe(s, t, e = document) {
915
+ function Ie(s, t, e = document) {
897
916
  let i = [];
898
917
  if (s instanceof Element)
899
918
  i = [s];
@@ -905,19 +924,19 @@ function xe(s, t, e = document) {
905
924
  }
906
925
  return i;
907
926
  }
908
- function rt() {
927
+ function dt() {
909
928
  return !!(navigator.vendor && navigator.vendor.match(/apple/i));
910
929
  }
911
- let xt = !1;
930
+ let zt = !1;
912
931
  try {
913
932
  window.addEventListener("test", null, Object.defineProperty({}, "passive", {
914
933
  get: () => {
915
- xt = !0;
934
+ zt = !0;
916
935
  }
917
936
  }));
918
937
  } catch {
919
938
  }
920
- class Pe {
939
+ class ze {
921
940
  constructor() {
922
941
  this._pool = [];
923
942
  }
@@ -974,7 +993,7 @@ class Pe {
974
993
  listener: i,
975
994
  passive: n
976
995
  }));
977
- const d = xt ? {
996
+ const d = zt ? {
978
997
  passive: n || !1
979
998
  } : !1;
980
999
  t[a](c, i, d);
@@ -982,7 +1001,7 @@ class Pe {
982
1001
  });
983
1002
  }
984
1003
  }
985
- function Pt(s, t) {
1004
+ function Mt(s, t) {
986
1005
  if (s.getViewportSizeFn) {
987
1006
  const e = s.getViewportSizeFn(s, t);
988
1007
  if (e)
@@ -997,7 +1016,7 @@ function Pt(s, t) {
997
1016
  y: window.innerHeight
998
1017
  };
999
1018
  }
1000
- function M(s, t, e, i, n) {
1019
+ function R(s, t, e, i, n) {
1001
1020
  let o = 0;
1002
1021
  if (t.paddingFn)
1003
1022
  o = t.paddingFn(e, i, n)[s];
@@ -1009,13 +1028,13 @@ function M(s, t, e, i, n) {
1009
1028
  }
1010
1029
  return Number(o) || 0;
1011
1030
  }
1012
- function It(s, t, e, i) {
1031
+ function Ot(s, t, e, i) {
1013
1032
  return {
1014
- x: t.x - M("left", s, t, e, i) - M("right", s, t, e, i),
1015
- y: t.y - M("top", s, t, e, i) - M("bottom", s, t, e, i)
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)
1016
1035
  };
1017
1036
  }
1018
- class Ie {
1037
+ class Me {
1019
1038
  /**
1020
1039
  * @param {Slide} slide
1021
1040
  */
@@ -1052,7 +1071,7 @@ class Ie {
1052
1071
  _updateAxis(t) {
1053
1072
  const {
1054
1073
  pswp: e
1055
- } = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o = M(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 = R(t === "x" ? "left" : "top", e.options, e.viewportSize, this.slide.data, this.slide.index), r = this.slide.panAreaSize[t];
1056
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];
1057
1076
  }
1058
1077
  // _getZeroBounds
@@ -1067,11 +1086,11 @@ class Ie {
1067
1086
  * @returns {number}
1068
1087
  */
1069
1088
  correctPan(t, e) {
1070
- return Z(e, this.max[t], this.min[t]);
1089
+ return H(e, this.max[t], this.min[t]);
1071
1090
  }
1072
1091
  }
1073
- const at = 4e3;
1074
- let Tt = class {
1092
+ const ht = 4e3;
1093
+ let Dt = class {
1075
1094
  /**
1076
1095
  * @param {PhotoSwipeOptions} options PhotoSwipe options
1077
1096
  * @param {SlideData} itemData Slide data
@@ -1128,7 +1147,7 @@ let Tt = class {
1128
1147
  */
1129
1148
  _getSecondary() {
1130
1149
  let t = this._parseZoomLevelOption("secondary");
1131
- return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > at && (t = at / this.elementSize.x), t);
1150
+ return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > ht && (t = ht / this.elementSize.x), t);
1132
1151
  }
1133
1152
  /**
1134
1153
  * Get initial image zoom level.
@@ -1151,7 +1170,7 @@ let Tt = class {
1151
1170
  return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
1152
1171
  }
1153
1172
  };
1154
- class Te {
1173
+ class Oe {
1155
1174
  /**
1156
1175
  * @param {SlideData} data
1157
1176
  * @param {number} index
@@ -1164,11 +1183,11 @@ class Te {
1164
1183
  }, this.pan = {
1165
1184
  x: 0,
1166
1185
  y: 0
1167
- }, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new Tt(i.options, t, e, i), this.pswp.dispatch("gettingData", {
1186
+ }, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new Dt(i.options, t, e, i), this.pswp.dispatch("gettingData", {
1168
1187
  slide: this,
1169
1188
  data: this.data,
1170
1189
  index: e
1171
- }), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = A("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 Ie(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
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", {
1172
1191
  slide: this
1173
1192
  });
1174
1193
  }
@@ -1292,7 +1311,7 @@ class Te {
1292
1311
  transitionDuration: i
1293
1312
  }), o.animations.stopAllPan();
1294
1313
  const r = this.currZoomLevel;
1295
- n || (t = Z(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), Et(this.pan);
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);
1296
1315
  const a = () => {
1297
1316
  this._setResolution(t), this.applyCurrentZoomPan();
1298
1317
  };
@@ -1374,7 +1393,7 @@ class Te {
1374
1393
  });
1375
1394
  }
1376
1395
  zoomAndPanToInitial() {
1377
- this.currZoomLevel = this.zoomLevels.initial, this.bounds.update(this.currZoomLevel), b(this.pan, this.bounds.center), this.pswp.dispatch("initialZoomPan", {
1396
+ this.currZoomLevel = this.zoomLevels.initial, this.bounds.update(this.currZoomLevel), S(this.pan, this.bounds.center), this.pswp.dispatch("initialZoomPan", {
1378
1397
  slide: this
1379
1398
  });
1380
1399
  }
@@ -1387,20 +1406,20 @@ class Te {
1387
1406
  * @private
1388
1407
  */
1389
1408
  _applyZoomTransform(t, e, i) {
1390
- i /= this.currentResolution || this.zoomLevels.initial, P(this.container, t, e, i);
1409
+ i /= this.currentResolution || this.zoomLevels.initial, z(this.container, t, e, i);
1391
1410
  }
1392
1411
  calculateSize() {
1393
1412
  const {
1394
1413
  pswp: t
1395
1414
  } = this;
1396
- b(this.panAreaSize, It(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
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", {
1397
1416
  slide: this
1398
1417
  });
1399
1418
  }
1400
1419
  /** @returns {string} */
1401
1420
  getCurrentTransform() {
1402
1421
  const t = this.currZoomLevel / (this.currentResolution || this.zoomLevels.initial);
1403
- return F(this.pan.x, this.pan.y, t);
1422
+ return N(this.pan.x, this.pan.y, t);
1404
1423
  }
1405
1424
  /**
1406
1425
  * Set resolution and re-render the image.
@@ -1421,11 +1440,11 @@ class Te {
1421
1440
  t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
1422
1441
  }
1423
1442
  }
1424
- const ze = 0.35, Me = 0.6, lt = 0.4, ct = 0.5;
1425
- function Oe(s, t) {
1443
+ const De = 0.35, $e = 0.6, ut = 0.4, pt = 0.5;
1444
+ function Re(s, t) {
1426
1445
  return s * t / (1 - t);
1427
1446
  }
1428
- class De {
1447
+ class Be {
1429
1448
  /**
1430
1449
  * @param {Gestures} gestures
1431
1450
  */
@@ -1436,7 +1455,7 @@ class De {
1436
1455
  };
1437
1456
  }
1438
1457
  start() {
1439
- this.pswp.currSlide && b(this.startPan, this.pswp.currSlide.pan), this.pswp.animations.stopAll();
1458
+ this.pswp.currSlide && S(this.startPan, this.pswp.currSlide.pan), this.pswp.animations.stopAll();
1440
1459
  }
1441
1460
  change() {
1442
1461
  const {
@@ -1451,12 +1470,12 @@ class De {
1451
1470
  if (!this.pswp.dispatch("verticalDrag", {
1452
1471
  panY: o
1453
1472
  }).defaultPrevented) {
1454
- this._setPanWithFriction("y", o, Me);
1473
+ this._setPanWithFriction("y", o, $e);
1455
1474
  const r = 1 - Math.abs(this._getVerticalDragRatio(n.pan.y));
1456
1475
  this.pswp.applyBgOpacity(r), n.applyCurrentZoomPan();
1457
1476
  }
1458
1477
  } else
1459
- this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (Et(n.pan), n.applyCurrentZoomPan()));
1478
+ this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (Tt(n.pan), n.applyCurrentZoomPan()));
1460
1479
  }
1461
1480
  end() {
1462
1481
  const {
@@ -1468,7 +1487,7 @@ class De {
1468
1487
  let n = 0;
1469
1488
  if (this.pswp.animations.stopAll(), e.isShifted()) {
1470
1489
  const r = (e.x - e.getCurrSlideX()) / this.pswp.viewportSize.x;
1471
- t.x < -ct && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > ct && 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 < -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);
1472
1491
  }
1473
1492
  i && i.currZoomLevel > i.zoomLevels.max || this.gestures.isMultitouch ? this.gestures.zoomLevels.correctZoomPan(!0) : (this._finishPanGestureForAxis("x"), this._finishPanGestureForAxis("y"));
1474
1493
  }
@@ -1487,10 +1506,10 @@ class De {
1487
1506
  const {
1488
1507
  pan: n,
1489
1508
  bounds: o
1490
- } = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + Oe(e[t], 0.995);
1509
+ } = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + Re(e[t], 0.995);
1491
1510
  if (a) {
1492
1511
  const f = this._getVerticalDragRatio(r), p = this._getVerticalDragRatio(c);
1493
- if (f < 0 && p < -lt || f > 0 && p > lt) {
1512
+ if (f < 0 && p < -ut || f > 0 && p > ut) {
1494
1513
  this.pswp.close();
1495
1514
  return;
1496
1515
  }
@@ -1509,7 +1528,7 @@ class De {
1509
1528
  onUpdate: (f) => {
1510
1529
  if (a && this.pswp.bgOpacity < 1) {
1511
1530
  const p = 1 - (d - f) / m;
1512
- this.pswp.applyBgOpacity(Z(u + (1 - u) * p, 0, 1));
1531
+ this.pswp.applyBgOpacity(H(u + (1 - u) * p, 0, 1));
1513
1532
  }
1514
1533
  n[t] = Math.floor(f), i.applyCurrentZoomPan();
1515
1534
  }
@@ -1602,16 +1621,16 @@ class De {
1602
1621
  } = n;
1603
1622
  if (r.correctPan(t, e) !== e || i) {
1604
1623
  const l = Math.round(e - o[t]);
1605
- o[t] += l * (i || ze);
1624
+ o[t] += l * (i || De);
1606
1625
  } else
1607
1626
  o[t] = e;
1608
1627
  }
1609
1628
  }
1610
- const $e = 0.05, Re = 0.15;
1611
- function dt(s, t, e) {
1629
+ const Fe = 0.05, Ze = 0.15;
1630
+ function mt(s, t, e) {
1612
1631
  return s.x = (t.x + e.x) / 2, s.y = (t.y + e.y) / 2, s;
1613
1632
  }
1614
- class Be {
1633
+ class ke {
1615
1634
  /**
1616
1635
  * @param {Gestures} gestures
1617
1636
  */
@@ -1631,7 +1650,7 @@ class Be {
1631
1650
  const {
1632
1651
  currSlide: t
1633
1652
  } = this.gestures.pswp;
1634
- t && (this._startZoomLevel = t.currZoomLevel, b(this._startPan, t.pan)), this.gestures.pswp.animations.stopAllPan(), this._wasOverFitZoomLevel = !1;
1653
+ t && (this._startZoomLevel = t.currZoomLevel, S(this._startPan, t.pan)), this.gestures.pswp.animations.stopAllPan(), this._wasOverFitZoomLevel = !1;
1635
1654
  }
1636
1655
  change() {
1637
1656
  const {
@@ -1648,8 +1667,8 @@ class Be {
1648
1667
  const a = r.zoomLevels.min, l = r.zoomLevels.max;
1649
1668
  if (!r.isZoomable() || o.mainScroll.isShifted())
1650
1669
  return;
1651
- dt(this._startZoomPoint, e, n), dt(this._zoomPoint, t, i);
1652
- let c = 1 / G(e, n) * G(t, i) * this._startZoomLevel;
1670
+ mt(this._startZoomPoint, e, n), mt(this._zoomPoint, t, i);
1671
+ let c = 1 / Y(e, n) * Y(t, i) * this._startZoomLevel;
1653
1672
  if (c > r.zoomLevels.initial + r.zoomLevels.initial / 15 && (this._wasOverFitZoomLevel = !0), c < a)
1654
1673
  if (o.options.pinchToClose && !this._wasOverFitZoomLevel && this._startZoomLevel <= r.zoomLevels.initial) {
1655
1674
  const d = 1 - (a - c) / (a / 1.2);
@@ -1657,8 +1676,8 @@ class Be {
1657
1676
  bgOpacity: d
1658
1677
  }).defaultPrevented || o.applyBgOpacity(d);
1659
1678
  } else
1660
- c = a - (a - c) * Re;
1661
- else c > l && (c = l + (c - l) * $e);
1679
+ c = a - (a - c) * Ze;
1680
+ else c > l && (c = l + (c - l) * Fe);
1662
1681
  r.pan.x = this._calculatePanForZoomLevel("x", c), r.pan.y = this._calculatePanForZoomLevel("y", c), r.setZoomLevel(c), r.applyCurrentZoomPan();
1663
1682
  }
1664
1683
  end() {
@@ -1699,22 +1718,22 @@ class Be {
1699
1718
  const n = i.currZoomLevel;
1700
1719
  let o, r = !0;
1701
1720
  n < i.zoomLevels.initial ? o = i.zoomLevels.initial : n > i.zoomLevels.max ? o = i.zoomLevels.max : (r = !1, o = n);
1702
- const a = e.bgOpacity, l = e.bgOpacity < 1, c = b({
1721
+ const a = e.bgOpacity, l = e.bgOpacity < 1, c = S({
1703
1722
  x: 0,
1704
1723
  y: 0
1705
1724
  }, i.pan);
1706
- let d = b({
1725
+ let d = S({
1707
1726
  x: 0,
1708
1727
  y: 0
1709
1728
  }, c);
1710
- t && (this._zoomPoint.x = 0, this._zoomPoint.y = 0, this._startZoomPoint.x = 0, this._startZoomPoint.y = 0, this._startZoomLevel = n, b(this._startPan, c)), r && (d = {
1729
+ t && (this._zoomPoint.x = 0, this._zoomPoint.y = 0, this._startZoomPoint.x = 0, this._startZoomPoint.y = 0, this._startZoomLevel = n, S(this._startPan, c)), r && (d = {
1711
1730
  x: this._calculatePanForZoomLevel("x", o),
1712
1731
  y: this._calculatePanForZoomLevel("y", o)
1713
1732
  }), i.setZoomLevel(o), d = {
1714
1733
  x: i.bounds.correctPan("x", d.x),
1715
1734
  y: i.bounds.correctPan("y", d.y)
1716
1735
  }, i.setZoomLevel(n);
1717
- const h = !B(d, c);
1736
+ const h = !q(d, c);
1718
1737
  if (!h && !r && !l) {
1719
1738
  i._setResolution(o), i.applyCurrentZoomPan();
1720
1739
  return;
@@ -1734,7 +1753,7 @@ class Be {
1734
1753
  }
1735
1754
  i.applyCurrentZoomPan();
1736
1755
  }
1737
- l && e.bgOpacity < 1 && e.applyBgOpacity(Z(a + (1 - a) * u, 0, 1));
1756
+ l && e.bgOpacity < 1 && e.applyBgOpacity(H(a + (1 - a) * u, 0, 1));
1738
1757
  },
1739
1758
  onComplete: () => {
1740
1759
  i._setResolution(o), i.applyCurrentZoomPan();
@@ -1742,11 +1761,11 @@ class Be {
1742
1761
  });
1743
1762
  }
1744
1763
  }
1745
- function ht(s) {
1764
+ function ft(s) {
1746
1765
  return !!/** @type {HTMLElement} */
1747
1766
  s.target.closest(".pswp__container");
1748
1767
  }
1749
- class Fe {
1768
+ class qe {
1750
1769
  /**
1751
1770
  * @param {Gestures} gestures
1752
1771
  */
@@ -1769,14 +1788,14 @@ class Fe {
1769
1788
  * @param {PointerEvent} originalEvent
1770
1789
  */
1771
1790
  tap(t, e) {
1772
- ht(e) && this._doClickOrTapAction("tap", t, e);
1791
+ ft(e) && this._doClickOrTapAction("tap", t, e);
1773
1792
  }
1774
1793
  /**
1775
1794
  * @param {Point} point
1776
1795
  * @param {PointerEvent} originalEvent
1777
1796
  */
1778
1797
  doubleTap(t, e) {
1779
- ht(e) && this._doClickOrTapAction("doubleTap", t, e);
1798
+ ft(e) && this._doClickOrTapAction("doubleTap", t, e);
1780
1799
  }
1781
1800
  /**
1782
1801
  * @private
@@ -1820,8 +1839,8 @@ class Fe {
1820
1839
  }
1821
1840
  }
1822
1841
  }
1823
- const Ze = 10, qe = 300, ke = 25;
1824
- class Ne {
1842
+ const Ne = 10, He = 300, We = 25;
1843
+ class Ve {
1825
1844
  /**
1826
1845
  * @param {PhotoSwipe} pswp
1827
1846
  */
@@ -1853,7 +1872,7 @@ class Ne {
1853
1872
  }, this._intervalP1 = {
1854
1873
  x: 0,
1855
1874
  y: 0
1856
- }, 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 De(this), this.zoomLevels = new Be(this), this.tapHandler = new Fe(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 Be(this), this.zoomLevels = new ke(this), this.tapHandler = new qe(this), t.on("bindEvents", () => {
1857
1876
  t.events.add(
1858
1877
  t.scrollWrap,
1859
1878
  "click",
@@ -1915,7 +1934,7 @@ class Ne {
1915
1934
  }
1916
1935
  i.dispatch("pointerDown", {
1917
1936
  originalEvent: t
1918
- }).defaultPrevented || (e && (i.mouseDetected(), this._preventPointerEventBehaviour(t, "down")), i.animations.stopAll(), this._updatePoints(t, "down"), this._numActivePoints === 1 && (this.dragAxis = null, b(this.startP1, this.p1)), this._numActivePoints > 1 ? (this._clearTapTimer(), this.isMultitouch = !0) : this.isMultitouch = !1);
1937
+ }).defaultPrevented || (e && (i.mouseDetected(), this._preventPointerEventBehaviour(t, "down")), i.animations.stopAll(), this._updatePoints(t, "down"), this._numActivePoints === 1 && (this.dragAxis = null, S(this.startP1, this.p1)), this._numActivePoints > 1 ? (this._clearTapTimer(), this.isMultitouch = !0) : this.isMultitouch = !1);
1919
1938
  }
1920
1939
  /**
1921
1940
  * @param {PointerEvent} e
@@ -1923,7 +1942,7 @@ class Ne {
1923
1942
  onPointerMove(t) {
1924
1943
  this._preventPointerEventBehaviour(t, "move"), this._numActivePoints && (this._updatePoints(t, "move"), !this.pswp.dispatch("pointerMove", {
1925
1944
  originalEvent: t
1926
- }).defaultPrevented && (this._numActivePoints === 1 && !this.isDragging ? (this.dragAxis || this._calculateDragDirection(), this.dragAxis && !this.isDragging && (this.isZooming && (this.isZooming = !1, this.zoomLevels.end()), this.isDragging = !0, this._clearTapTimer(), this._updateStartPoints(), this._intervalTime = Date.now(), this._velocityCalculated = !1, b(this._intervalP1, this.p1), this.velocity.x = 0, this.velocity.y = 0, this.drag.start(), this._rafStopLoop(), this._rafRenderLoop())) : this._numActivePoints > 1 && !this.isZooming && (this._finishDrag(), this.isZooming = !0, this._updateStartPoints(), this.zoomLevels.start(), this._rafStopLoop(), this._rafRenderLoop())));
1945
+ }).defaultPrevented && (this._numActivePoints === 1 && !this.isDragging ? (this.dragAxis || this._calculateDragDirection(), this.dragAxis && !this.isDragging && (this.isZooming && (this.isZooming = !1, this.zoomLevels.end()), this.isDragging = !0, this._clearTapTimer(), this._updateStartPoints(), this._intervalTime = Date.now(), this._velocityCalculated = !1, S(this._intervalP1, this.p1), this.velocity.x = 0, this.velocity.y = 0, this.drag.start(), this._rafStopLoop(), this._rafRenderLoop())) : this._numActivePoints > 1 && !this.isZooming && (this._finishDrag(), this.isZooming = !0, this._updateStartPoints(), this.zoomLevels.start(), this._rafStopLoop(), this._rafRenderLoop())));
1927
1946
  }
1928
1947
  /**
1929
1948
  * @private
@@ -1943,7 +1962,7 @@ class Ne {
1943
1962
  * @private
1944
1963
  */
1945
1964
  _rafRenderLoop() {
1946
- (this.isDragging || this.isZooming) && (this._updateVelocity(), this.isDragging ? B(this.p1, this.prevP1) || this.drag.change() : (!B(this.p1, this.prevP1) || !B(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 ? 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)));
1947
1966
  }
1948
1967
  /**
1949
1968
  * Update velocity at 50ms interval
@@ -1953,7 +1972,7 @@ class Ne {
1953
1972
  */
1954
1973
  _updateVelocity(t) {
1955
1974
  const e = Date.now(), i = e - this._intervalTime;
1956
- i < 50 && !t || (this.velocity.x = this._getVelocity("x", i), this.velocity.y = this._getVelocity("y", i), this._intervalTime = e, b(this._intervalP1, this.p1), this._velocityCalculated = !0);
1975
+ i < 50 && !t || (this.velocity.x = this._getVelocity("x", i), this.velocity.y = this._getVelocity("y", i), this._intervalTime = e, S(this._intervalP1, this.p1), this._velocityCalculated = !0);
1957
1976
  }
1958
1977
  /**
1959
1978
  * @private
@@ -1973,8 +1992,8 @@ class Ne {
1973
1992
  this.tapHandler.click(this.startP1, t);
1974
1993
  return;
1975
1994
  }
1976
- const i = this.pswp.options.doubleTapAction ? qe : 0;
1977
- this._tapTimer ? (this._clearTapTimer(), G(this._lastStartP1, this.startP1) < ke && this.tapHandler.doubleTap(this.startP1, t)) : (b(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
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(() => {
1978
1997
  this.tapHandler.tap(this.startP1, t), this._clearTapTimer();
1979
1998
  }, i));
1980
1999
  }
@@ -2027,7 +2046,7 @@ class Ne {
2027
2046
  e === "up" && n > -1 ? this._ongoingPointers.splice(n, 1) : e === "down" && n === -1 ? this._ongoingPointers.push(this._convertEventPosToPoint(i, {
2028
2047
  x: 0,
2029
2048
  y: 0
2030
- })) : n > -1 && this._convertEventPosToPoint(i, this._ongoingPointers[n]), this._numActivePoints = this._ongoingPointers.length, this._numActivePoints > 0 && b(this.p1, this._ongoingPointers[0]), this._numActivePoints > 1 && b(this.p2, this._ongoingPointers[1]);
2049
+ })) : n > -1 && this._convertEventPosToPoint(i, this._ongoingPointers[n]), this._numActivePoints = this._ongoingPointers.length, this._numActivePoints > 0 && S(this.p1, this._ongoingPointers[0]), this._numActivePoints > 1 && S(this.p2, this._ongoingPointers[1]);
2031
2050
  } else {
2032
2051
  const i = (
2033
2052
  /** @type {TouchEvent} */
@@ -2044,13 +2063,13 @@ class Ne {
2044
2063
  * @private
2045
2064
  */
2046
2065
  _updatePrevPoints() {
2047
- b(this.prevP1, this.p1), b(this.prevP2, this.p2);
2066
+ S(this.prevP1, this.p1), S(this.prevP2, this.p2);
2048
2067
  }
2049
2068
  /** update points at the start of gesture
2050
2069
  * @private
2051
2070
  */
2052
2071
  _updateStartPoints() {
2053
- b(this.startP1, this.p1), b(this.startP2, this.p2), this._updatePrevPoints();
2072
+ S(this.startP1, this.p1), S(this.startP2, this.p2), this._updatePrevPoints();
2054
2073
  }
2055
2074
  /** @private */
2056
2075
  _calculateDragDirection() {
@@ -2060,7 +2079,7 @@ class Ne {
2060
2079
  const t = Math.abs(this.p1.x - this.startP1.x) - Math.abs(this.p1.y - this.startP1.y);
2061
2080
  if (t !== 0) {
2062
2081
  const e = t > 0 ? "x" : "y";
2063
- Math.abs(this.p1[e] - this.startP1[e]) >= Ze && (this.dragAxis = e);
2082
+ Math.abs(this.p1[e] - this.startP1[e]) >= Ne && (this.dragAxis = e);
2064
2083
  }
2065
2084
  }
2066
2085
  }
@@ -2084,8 +2103,8 @@ class Ne {
2084
2103
  this.pswp.mainScroll.isShifted() && (t.preventDefault(), t.stopPropagation());
2085
2104
  }
2086
2105
  }
2087
- const He = 0.35;
2088
- class We {
2106
+ const je = 0.35;
2107
+ class Ge {
2089
2108
  /**
2090
2109
  * @param {PhotoSwipe} pswp
2091
2110
  */
@@ -2103,7 +2122,7 @@ class We {
2103
2122
  pswp: e
2104
2123
  } = this, i = Math.round(e.viewportSize.x + e.viewportSize.x * e.options.spacing), n = i !== this.slideWidth;
2105
2124
  n && (this.slideWidth = i, this.moveTo(this.getCurrSlideX())), this.itemHolders.forEach((o, r) => {
2106
- n && P(o.el, (r + this._containerShiftIndex) * this.slideWidth), t && o.slide && o.slide.resize();
2125
+ n && z(o.el, (r + this._containerShiftIndex) * this.slideWidth), t && o.slide && o.slide.resize();
2107
2126
  });
2108
2127
  }
2109
2128
  /**
@@ -2119,7 +2138,7 @@ class We {
2119
2138
  appendHolders() {
2120
2139
  this.itemHolders = [];
2121
2140
  for (let t = 0; t < 3; t++) {
2122
- const e = A("pswp__item", "div", this.pswp.container);
2141
+ const e = E("pswp__item", "div", this.pswp.container);
2123
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({
2124
2143
  el: e
2125
2144
  //index: -1
@@ -2222,7 +2241,7 @@ class We {
2222
2241
  (a = r.slide) === null || a === void 0 || a.destroy(), r.slide = void 0;
2223
2242
  }));
2224
2243
  for (let r = 0; r < n; r++)
2225
- i > 0 ? (o = this.itemHolders.shift(), o && (this.itemHolders[2] = o, this._containerShiftIndex++, P(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--, P(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++, 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)));
2226
2245
  Math.abs(this._containerShiftIndex) > 50 && !this.isShifted() && (this.resetPosition(), this.resize()), e.animations.stopAllPan(), this.itemHolders.forEach((r, a) => {
2227
2246
  r.slide && r.slide.setIsActive(a === 1);
2228
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");
@@ -2238,15 +2257,15 @@ class We {
2238
2257
  let i = (this.slideWidth * this._currPositionIndex - t) / this.slideWidth;
2239
2258
  i += this.pswp.currIndex;
2240
2259
  const n = Math.round(t - this.x);
2241
- (i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * He);
2260
+ (i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * je);
2242
2261
  }
2243
- this.x = t, this.pswp.container && P(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
2262
+ this.x = t, this.pswp.container && z(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
2244
2263
  x: t,
2245
2264
  dragging: e ?? !1
2246
2265
  });
2247
2266
  }
2248
2267
  }
2249
- const Ve = {
2268
+ const Ue = {
2250
2269
  Escape: 27,
2251
2270
  z: 90,
2252
2271
  ArrowLeft: 37,
@@ -2254,8 +2273,8 @@ const Ve = {
2254
2273
  ArrowRight: 39,
2255
2274
  ArrowDown: 40,
2256
2275
  Tab: 9
2257
- }, x = (s, t) => t ? s : Ve[s];
2258
- class je {
2276
+ }, I = (s, t) => t ? s : Ue[s];
2277
+ class Ke {
2259
2278
  /**
2260
2279
  * @param {PhotoSwipe} pswp
2261
2280
  */
@@ -2295,30 +2314,30 @@ class je {
2295
2314
  } = this;
2296
2315
  if (e.dispatch("keydown", {
2297
2316
  originalEvent: t
2298
- }).defaultPrevented || Ce(t))
2317
+ }).defaultPrevented || Te(t))
2299
2318
  return;
2300
2319
  let i, n, o = !1;
2301
2320
  const r = "key" in t;
2302
2321
  switch (r ? t.key : t.keyCode) {
2303
- case x("Escape", r):
2322
+ case I("Escape", r):
2304
2323
  e.options.escKey && (i = "close");
2305
2324
  break;
2306
- case x("z", r):
2325
+ case I("z", r):
2307
2326
  i = "toggleZoom";
2308
2327
  break;
2309
- case x("ArrowLeft", r):
2328
+ case I("ArrowLeft", r):
2310
2329
  n = "x";
2311
2330
  break;
2312
- case x("ArrowUp", r):
2331
+ case I("ArrowUp", r):
2313
2332
  n = "y";
2314
2333
  break;
2315
- case x("ArrowRight", r):
2334
+ case I("ArrowRight", r):
2316
2335
  n = "x", o = !0;
2317
2336
  break;
2318
- case x("ArrowDown", r):
2337
+ case I("ArrowDown", r):
2319
2338
  o = !0, n = "y";
2320
2339
  break;
2321
- case x("Tab", r):
2340
+ case I("Tab", r):
2322
2341
  this._focusRoot();
2323
2342
  break;
2324
2343
  }
@@ -2347,8 +2366,8 @@ class je {
2347
2366
  ) && e.focus();
2348
2367
  }
2349
2368
  }
2350
- const Ge = "cubic-bezier(.4,0,.22,1)";
2351
- class Ue {
2369
+ const Xe = "cubic-bezier(.4,0,.22,1)";
2370
+ class Ye {
2352
2371
  /**
2353
2372
  * onComplete can be unpredictable, be careful about current state
2354
2373
  *
@@ -2364,12 +2383,12 @@ class Ue {
2364
2383
  onFinish: r = () => {
2365
2384
  },
2366
2385
  duration: a = 333,
2367
- easing: l = Ge
2386
+ easing: l = Xe
2368
2387
  } = t;
2369
2388
  this.onFinish = r;
2370
2389
  const c = o ? "transform" : "opacity", d = (e = t[c]) !== null && e !== void 0 ? e : "";
2371
2390
  this._target = i, this._onComplete = n, this._finished = !1, this._onTransitionEnd = this._onTransitionEnd.bind(this), this._helperTimeout = setTimeout(() => {
2372
- Ct(i, c, a, l), this._helperTimeout = setTimeout(() => {
2391
+ It(i, c, a, l), this._helperTimeout = setTimeout(() => {
2373
2392
  i.addEventListener("transitionend", this._onTransitionEnd, !1), i.addEventListener("transitioncancel", this._onTransitionEnd, !1), this._helperTimeout = setTimeout(() => {
2374
2393
  this._finalizeAnimation();
2375
2394
  }, a + 500), i.style[c] = d;
@@ -2391,11 +2410,11 @@ class Ue {
2391
2410
  }
2392
2411
  // Destroy is called automatically onFinish
2393
2412
  destroy() {
2394
- this._helperTimeout && clearTimeout(this._helperTimeout), Ae(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), xe(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
2395
2414
  }
2396
2415
  }
2397
- const Ke = 12, Xe = 0.75;
2398
- class Ye {
2416
+ const Je = 12, Qe = 0.75;
2417
+ class ti {
2399
2418
  /**
2400
2419
  * @param {number} initialVelocity Initial velocity, px per ms.
2401
2420
  *
@@ -2412,7 +2431,7 @@ class Ye {
2412
2431
  * Recommended value from 10 to 50
2413
2432
  */
2414
2433
  constructor(t, e, i) {
2415
- this.velocity = t * 1e3, this._dampingRatio = e || Xe, this._naturalFrequency = i || Ke, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
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));
2416
2435
  }
2417
2436
  /**
2418
2437
  * @param {number} deltaPosition Difference between current and end position of the animation
@@ -2434,7 +2453,7 @@ class Ye {
2434
2453
  return i;
2435
2454
  }
2436
2455
  }
2437
- class Je {
2456
+ class ei {
2438
2457
  /**
2439
2458
  * @param {SpringAnimationProps} props
2440
2459
  */
@@ -2452,7 +2471,7 @@ class Je {
2452
2471
  naturalFrequency: c
2453
2472
  } = t;
2454
2473
  this.onFinish = a;
2455
- const d = new Ye(n, l, c);
2474
+ const d = new ti(n, l, c);
2456
2475
  let h = Date.now(), u = e - i;
2457
2476
  const m = () => {
2458
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)));
@@ -2464,7 +2483,7 @@ class Je {
2464
2483
  this._raf >= 0 && cancelAnimationFrame(this._raf), this._raf = 0;
2465
2484
  }
2466
2485
  }
2467
- class Qe {
2486
+ class ii {
2468
2487
  constructor() {
2469
2488
  this.activeAnimations = [];
2470
2489
  }
@@ -2487,10 +2506,10 @@ class Qe {
2487
2506
  * @returns {Animation}
2488
2507
  */
2489
2508
  _start(t, e) {
2490
- const i = e ? new Je(
2509
+ const i = e ? new ei(
2491
2510
  /** @type SpringAnimationProps */
2492
2511
  t
2493
- ) : new Ue(
2512
+ ) : new Ye(
2494
2513
  /** @type CssAnimationProps */
2495
2514
  t
2496
2515
  );
@@ -2533,7 +2552,7 @@ class Qe {
2533
2552
  return this.activeAnimations.some((t) => t.props.isPan);
2534
2553
  }
2535
2554
  }
2536
- class ti {
2555
+ class si {
2537
2556
  /**
2538
2557
  * @param {PhotoSwipe} pswp
2539
2558
  */
@@ -2575,7 +2594,7 @@ class ti {
2575
2594
  e.isPannable() && (t.deltaMode === 1 && (i *= 18, n *= 18), e.panTo(e.pan.x - i, e.pan.y - n));
2576
2595
  }
2577
2596
  }
2578
- function ei(s) {
2597
+ function ni(s) {
2579
2598
  if (typeof s == "string")
2580
2599
  return s;
2581
2600
  if (!s || !s.isCustomSVG)
@@ -2587,7 +2606,7 @@ function ei(s) {
2587
2606
  t.size || 32
2588
2607
  ), t.outlineID && (e += '<use class="pswp__icn-shadow" xlink:href="#' + t.outlineID + '"/>'), e += t.inner, e += "</svg>", e;
2589
2608
  }
2590
- class ii {
2609
+ class oi {
2591
2610
  /**
2592
2611
  * @param {PhotoSwipe} pswp
2593
2612
  * @param {UIElementData} data
@@ -2606,7 +2625,7 @@ class ii {
2606
2625
  let a = e.isButton ? e.tagName || "button" : e.tagName || "div";
2607
2626
  a = /** @type {keyof HTMLElementTagNameMap} */
2608
2627
  a.toLowerCase();
2609
- const l = A(r, a);
2628
+ const l = E(r, a);
2610
2629
  if (e.isButton) {
2611
2630
  a === "button" && (l.type = "button");
2612
2631
  let {
@@ -2619,20 +2638,20 @@ class ii {
2619
2638
  const m = u || h;
2620
2639
  m && l.setAttribute("aria-label", m);
2621
2640
  }
2622
- l.innerHTML = ei(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (h) => {
2641
+ l.innerHTML = ni(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (h) => {
2623
2642
  typeof e.onClick == "string" ? t[e.onClick]() : typeof e.onClick == "function" && e.onClick(h, l, t);
2624
2643
  });
2625
2644
  const c = e.appendTo || "bar";
2626
2645
  let d = t.element;
2627
- c === "bar" ? (t.topBar || (t.topBar = A("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 = 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));
2628
2647
  }
2629
2648
  }
2630
- function zt(s, t, e) {
2649
+ function $t(s, t, e) {
2631
2650
  s.classList.add("pswp__button--arrow"), s.setAttribute("aria-controls", "pswp__items"), t.on("change", () => {
2632
2651
  t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
2633
2652
  });
2634
2653
  }
2635
- const si = {
2654
+ const ri = {
2636
2655
  name: "arrowPrev",
2637
2656
  className: "pswp__button--arrow--prev",
2638
2657
  title: "Previous",
@@ -2646,8 +2665,8 @@ const si = {
2646
2665
  outlineID: "pswp__icn-arrow"
2647
2666
  },
2648
2667
  onClick: "prev",
2649
- onInit: zt
2650
- }, ni = {
2668
+ onInit: $t
2669
+ }, ai = {
2651
2670
  name: "arrowNext",
2652
2671
  className: "pswp__button--arrow--next",
2653
2672
  title: "Next",
@@ -2662,9 +2681,9 @@ const si = {
2662
2681
  },
2663
2682
  onClick: "next",
2664
2683
  onInit: (s, t) => {
2665
- zt(s, t, !0);
2684
+ $t(s, t, !0);
2666
2685
  }
2667
- }, oi = {
2686
+ }, li = {
2668
2687
  name: "close",
2669
2688
  title: "Close",
2670
2689
  order: 20,
@@ -2675,7 +2694,7 @@ const si = {
2675
2694
  outlineID: "pswp__icn-close"
2676
2695
  },
2677
2696
  onClick: "close"
2678
- }, ri = {
2697
+ }, ci = {
2679
2698
  name: "zoom",
2680
2699
  title: "Zoom",
2681
2700
  order: 10,
@@ -2687,7 +2706,7 @@ const si = {
2687
2706
  outlineID: "pswp__icn-zoom"
2688
2707
  },
2689
2708
  onClick: "toggleZoom"
2690
- }, ai = {
2709
+ }, di = {
2691
2710
  name: "preloader",
2692
2711
  appendTo: "bar",
2693
2712
  order: 7,
@@ -2718,7 +2737,7 @@ const si = {
2718
2737
  t.currSlide === a.slide && r();
2719
2738
  }), t.ui && (t.ui.updatePreloaderVisibility = r);
2720
2739
  }
2721
- }, li = {
2740
+ }, hi = {
2722
2741
  name: "counter",
2723
2742
  order: 5,
2724
2743
  onInit: (s, t) => {
@@ -2727,10 +2746,10 @@ const si = {
2727
2746
  });
2728
2747
  }
2729
2748
  };
2730
- function ut(s, t) {
2749
+ function gt(s, t) {
2731
2750
  s.classList.toggle("pswp--zoomed-in", t);
2732
2751
  }
2733
- class ci {
2752
+ class ui {
2734
2753
  /**
2735
2754
  * @param {PhotoSwipe} pswp
2736
2755
  */
@@ -2742,7 +2761,7 @@ class ci {
2742
2761
  const {
2743
2762
  pswp: t
2744
2763
  } = this;
2745
- this.isRegistered = !1, this.uiElementsData = [oi, si, ni, ri, ai, li], 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 = [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) => {
2746
2765
  this.registerElement(e);
2747
2766
  }), t.on("change", () => {
2748
2767
  var e;
@@ -2753,7 +2772,7 @@ class ci {
2753
2772
  * @param {UIElementData} elementData
2754
2773
  */
2755
2774
  registerElement(t) {
2756
- this.isRegistered ? this.items.push(new ii(this.pswp, t)) : this.uiElementsData.push(t);
2775
+ this.isRegistered ? this.items.push(new oi(this.pswp, t)) : this.uiElementsData.push(t);
2757
2776
  }
2758
2777
  /**
2759
2778
  * Fired each time zoom or pan position is changed.
@@ -2777,15 +2796,15 @@ class ci {
2777
2796
  this._lastUpdatedZoomLevel = n;
2778
2797
  const o = e.zoomLevels.initial - e.zoomLevels.secondary;
2779
2798
  if (Math.abs(o) < 0.01 || !e.isZoomable()) {
2780
- ut(t, !1), t.classList.remove("pswp--zoom-allowed");
2799
+ gt(t, !1), t.classList.remove("pswp--zoom-allowed");
2781
2800
  return;
2782
2801
  }
2783
2802
  t.classList.add("pswp--zoom-allowed");
2784
2803
  const r = n === e.zoomLevels.initial ? e.zoomLevels.secondary : e.zoomLevels.initial;
2785
- ut(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
2804
+ gt(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
2786
2805
  }
2787
2806
  }
2788
- function di(s) {
2807
+ function pi(s) {
2789
2808
  const t = s.getBoundingClientRect();
2790
2809
  return {
2791
2810
  x: t.left,
@@ -2793,7 +2812,7 @@ function di(s) {
2793
2812
  w: t.width
2794
2813
  };
2795
2814
  }
2796
- function hi(s, t, e) {
2815
+ function mi(s, t, e) {
2797
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 = {
2798
2817
  x: i.left + a,
2799
2818
  y: i.top + l,
@@ -2806,7 +2825,7 @@ function hi(s, t, e) {
2806
2825
  y: l
2807
2826
  }, c;
2808
2827
  }
2809
- function ui(s, t, e) {
2828
+ function fi(s, t, e) {
2810
2829
  const i = e.dispatch("thumbBounds", {
2811
2830
  index: s,
2812
2831
  itemData: t,
@@ -2825,9 +2844,9 @@ function ui(s, t, e) {
2825
2844
  n.querySelector(a)
2826
2845
  );
2827
2846
  }
2828
- return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = hi(r, t.width || t.w || 0, t.height || t.h || 0) : o = di(r)), e.applyFilters("thumbBounds", o, t, s);
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);
2829
2848
  }
2830
- let pi = class {
2849
+ let gi = class {
2831
2850
  /**
2832
2851
  * @param {T} type
2833
2852
  * @param {PhotoSwipeEventsMap[T]} [details]
@@ -2838,7 +2857,7 @@ let pi = class {
2838
2857
  preventDefault() {
2839
2858
  this.defaultPrevented = !0;
2840
2859
  }
2841
- }, mi = class {
2860
+ }, vi = class {
2842
2861
  constructor() {
2843
2862
  this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
2844
2863
  }
@@ -2905,19 +2924,19 @@ let pi = class {
2905
2924
  return this.pswp.dispatch(t, e);
2906
2925
  const n = (
2907
2926
  /** @type {AugmentedEvent<T>} */
2908
- new pi(t, e)
2927
+ new gi(t, e)
2909
2928
  );
2910
2929
  return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
2911
2930
  o.call(this, n);
2912
2931
  }), n;
2913
2932
  }
2914
- }, fi = class {
2933
+ }, yi = class {
2915
2934
  /**
2916
2935
  * @param {string | false} imageSrc
2917
2936
  * @param {HTMLElement} container
2918
2937
  */
2919
2938
  constructor(t, e) {
2920
- if (this.element = A("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
2939
+ if (this.element = E("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
2921
2940
  const i = (
2922
2941
  /** @type {HTMLImageElement} */
2923
2942
  this.element
@@ -2931,20 +2950,20 @@ let pi = class {
2931
2950
  * @param {number} height
2932
2951
  */
2933
2952
  setDisplayedSize(t, e) {
2934
- this.element && (this.element.tagName === "IMG" ? (U(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = F(0, 0, t / 250)) : U(this.element, 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));
2935
2954
  }
2936
2955
  destroy() {
2937
2956
  var t;
2938
2957
  (t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
2939
2958
  }
2940
- }, gi = class {
2959
+ }, _i = class {
2941
2960
  /**
2942
2961
  * @param {SlideData} itemData Slide data
2943
2962
  * @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
2944
2963
  * @param {number} index
2945
2964
  */
2946
2965
  constructor(t, e, i) {
2947
- 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 = E.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 = C.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", {
2948
2967
  content: this
2949
2968
  });
2950
2969
  }
@@ -2972,12 +2991,12 @@ let pi = class {
2972
2991
  this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
2973
2992
  this
2974
2993
  );
2975
- this.placeholder = new fi(i, this.slide.container);
2994
+ this.placeholder = new yi(i, this.slide.container);
2976
2995
  }
2977
2996
  this.element && !e || this.instance.dispatch("contentLoad", {
2978
2997
  content: this,
2979
2998
  isLazy: t
2980
- }).defaultPrevented || (this.isImageContent() ? (this.element = A("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = A("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), e && this.slide && this.slide.updateContentSize(!0));
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));
2981
3000
  }
2982
3001
  /**
2983
3002
  * Preload image
@@ -2995,7 +3014,7 @@ let pi = class {
2995
3014
  /** @type HTMLImageElement */
2996
3015
  this.element
2997
3016
  );
2998
- 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 = E.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 = C.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
2999
3018
  this.onLoaded();
3000
3019
  }, n.onerror = () => {
3001
3020
  this.onError();
@@ -3013,16 +3032,16 @@ let pi = class {
3013
3032
  * Content load success handler
3014
3033
  */
3015
3034
  onLoaded() {
3016
- this.state = E.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
3035
+ this.state = C.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
3017
3036
  slide: this.slide,
3018
3037
  content: this
3019
- }), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === E.LOADED || this.state === E.ERROR) && this.removePlaceholder());
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());
3020
3039
  }
3021
3040
  /**
3022
3041
  * Content load error handler
3023
3042
  */
3024
3043
  onError() {
3025
- this.state = E.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
3044
+ this.state = C.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
3026
3045
  slide: this.slide,
3027
3046
  isError: !0,
3028
3047
  content: this
@@ -3035,13 +3054,13 @@ let pi = class {
3035
3054
  * @returns {Boolean} If the content is currently loading
3036
3055
  */
3037
3056
  isLoading() {
3038
- return this.instance.applyFilters("isContentLoading", this.state === E.LOADING, this);
3057
+ return this.instance.applyFilters("isContentLoading", this.state === C.LOADING, this);
3039
3058
  }
3040
3059
  /**
3041
3060
  * @returns {Boolean} If the content is in error state
3042
3061
  */
3043
3062
  isError() {
3044
- return this.state === E.ERROR;
3063
+ return this.state === C.ERROR;
3045
3064
  }
3046
3065
  /**
3047
3066
  * @returns {boolean} If the content is image
@@ -3060,7 +3079,7 @@ let pi = class {
3060
3079
  content: this,
3061
3080
  width: t,
3062
3081
  height: e
3063
- }).defaultPrevented && (U(this.element, t, e), this.isImageContent() && !this.isError()))) {
3082
+ }).defaultPrevented && (J(this.element, t, e), this.isImageContent() && !this.isError()))) {
3064
3083
  const i = !this.displayedImageWidth && t;
3065
3084
  this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
3066
3085
  slide: this.slide,
@@ -3074,7 +3093,7 @@ let pi = class {
3074
3093
  * @returns {boolean} If the content can be zoomed
3075
3094
  */
3076
3095
  isZoomable() {
3077
- return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== E.ERROR, this);
3096
+ return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== C.ERROR, this);
3078
3097
  }
3079
3098
  /**
3080
3099
  * Update image srcset sizes attribute based on width and height
@@ -3122,9 +3141,9 @@ let pi = class {
3122
3141
  displayError() {
3123
3142
  if (this.slide) {
3124
3143
  var t, e;
3125
- let i = A("pswp__error-msg", "div");
3144
+ let i = E("pswp__error-msg", "div");
3126
3145
  i.innerText = (t = (e = this.instance.options) === null || e === void 0 ? void 0 : e.errorMsg) !== null && t !== void 0 ? t : "", i = /** @type {HTMLDivElement} */
3127
- this.instance.applyFilters("contentErrorElement", i, this), this.element = A("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 = 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();
3128
3147
  }
3129
3148
  }
3130
3149
  /**
@@ -3133,7 +3152,7 @@ let pi = class {
3133
3152
  append() {
3134
3153
  if (this.isAttached || !this.element)
3135
3154
  return;
3136
- if (this.isAttached = !0, this.state === E.ERROR) {
3155
+ if (this.isAttached = !0, this.state === C.ERROR) {
3137
3156
  this.displayError();
3138
3157
  return;
3139
3158
  }
@@ -3142,7 +3161,7 @@ let pi = class {
3142
3161
  }).defaultPrevented)
3143
3162
  return;
3144
3163
  const t = "decode" in this.element;
3145
- this.isImageContent() ? t && this.slide && (!this.slide.isActive || rt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
3164
+ this.isImageContent() ? t && this.slide && (!this.slide.isActive || dt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
3146
3165
  }).finally(() => {
3147
3166
  this.isDecoding = !1, this.appendImage();
3148
3167
  })) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
@@ -3155,7 +3174,7 @@ let pi = class {
3155
3174
  activate() {
3156
3175
  this.instance.dispatch("contentActivate", {
3157
3176
  content: this
3158
- }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !rt() ? 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 && !dt() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
3159
3178
  }
3160
3179
  /**
3161
3180
  * Deactivate the content
@@ -3179,39 +3198,39 @@ let pi = class {
3179
3198
  appendImage() {
3180
3199
  this.isAttached && (this.instance.dispatch("contentAppendImage", {
3181
3200
  content: this
3182
- }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === E.LOADED || this.state === E.ERROR) && this.removePlaceholder()));
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()));
3183
3202
  }
3184
3203
  };
3185
- const vi = 5;
3186
- function Mt(s, t, e) {
3204
+ const wi = 5;
3205
+ function Rt(s, t, e) {
3187
3206
  const i = t.createContentFromData(s, e);
3188
3207
  let n;
3189
3208
  const {
3190
3209
  options: o
3191
3210
  } = t;
3192
3211
  if (o) {
3193
- n = new Tt(o, s, -1);
3212
+ n = new Dt(o, s, -1);
3194
3213
  let r;
3195
- t.pswp ? r = t.pswp.viewportSize : r = Pt(o, t);
3196
- const a = It(o, r, s, e);
3214
+ t.pswp ? r = t.pswp.viewportSize : r = Mt(o, t);
3215
+ const a = Ot(o, r, s, e);
3197
3216
  n.update(i.width, i.height, a);
3198
3217
  }
3199
3218
  return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
3200
3219
  }
3201
- function yi(s, t) {
3220
+ function bi(s, t) {
3202
3221
  const e = t.getItemData(s);
3203
3222
  if (!t.dispatch("lazyLoadSlide", {
3204
3223
  index: s,
3205
3224
  itemData: e
3206
3225
  }).defaultPrevented)
3207
- return Mt(e, t, s);
3226
+ return Rt(e, t, s);
3208
3227
  }
3209
- class _i {
3228
+ class Si {
3210
3229
  /**
3211
3230
  * @param {PhotoSwipe} pswp
3212
3231
  */
3213
3232
  constructor(t) {
3214
- this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, vi), this._cachedItems = [];
3233
+ this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, wi), this._cachedItems = [];
3215
3234
  }
3216
3235
  /**
3217
3236
  * Lazy load nearby slides based on `preload` option.
@@ -3239,7 +3258,7 @@ class _i {
3239
3258
  loadSlideByIndex(t) {
3240
3259
  const e = this.pswp.getLoopedIndex(t);
3241
3260
  let i = this.getContentByIndex(e);
3242
- i || (i = yi(e, this.pswp), i && this.addToCache(i));
3261
+ i || (i = bi(e, this.pswp), i && this.addToCache(i));
3243
3262
  }
3244
3263
  /**
3245
3264
  * @param {Slide} slide
@@ -3278,7 +3297,7 @@ class _i {
3278
3297
  this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
3279
3298
  }
3280
3299
  }
3281
- let wi = class extends mi {
3300
+ let Li = class extends vi {
3282
3301
  /**
3283
3302
  * Get total number of slides
3284
3303
  *
@@ -3301,7 +3320,7 @@ let wi = class extends mi {
3301
3320
  * @returns {Content}
3302
3321
  */
3303
3322
  createContentFromData(t, e) {
3304
- return new gi(t, this, e);
3323
+ return new _i(t, this, e);
3305
3324
  }
3306
3325
  /**
3307
3326
  * Get item data by index.
@@ -3335,7 +3354,7 @@ let wi = class extends mi {
3335
3354
  */
3336
3355
  _getGalleryDOMElements(t) {
3337
3356
  var e, i;
3338
- return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? xe(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 ? Ie(this.options.children, this.options.childSelector, t) || [] : [t];
3339
3358
  }
3340
3359
  /**
3341
3360
  * Converts DOM element to item data object.
@@ -3369,11 +3388,11 @@ let wi = class extends mi {
3369
3388
  * @returns {Content} Image that is being decoded or false.
3370
3389
  */
3371
3390
  lazyLoadData(t, e) {
3372
- return Mt(t, this, e);
3391
+ return Rt(t, this, e);
3373
3392
  }
3374
3393
  };
3375
- const z = 3e-3;
3376
- class bi {
3394
+ const $ = 3e-3;
3395
+ class Ai {
3377
3396
  /**
3378
3397
  * @param {PhotoSwipe} pswp
3379
3398
  */
@@ -3411,8 +3430,8 @@ class bi {
3411
3430
  var n;
3412
3431
  this._animateRootOpacity = (n = i.showHideOpacity) !== null && n !== void 0 ? n : !1;
3413
3432
  }
3414
- if (this._animateBgOpacity = !this._animateRootOpacity && this.pswp.options.bgOpacity > z, this._opacityElement = this._animateRootOpacity ? t.element : t.bg, !this._useAnimation) {
3415
- this._duration = 0, this._animateZoom = !1, this._animateBgOpacity = !1, this._animateRootOpacity = !0, this.isOpening && (t.element && (t.element.style.opacity = String(z)), t.applyBgOpacity(1));
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));
3416
3435
  return;
3417
3436
  }
3418
3437
  if (this._animateZoom && this._thumbBounds && this._thumbBounds.innerRect) {
@@ -3420,13 +3439,13 @@ class bi {
3420
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");
3421
3440
  } else
3422
3441
  this._croppedZoom = !1;
3423
- this.isOpening ? (this._animateRootOpacity ? (t.element && (t.element.style.opacity = String(z)), t.applyBgOpacity(1)) : (this._animateBgOpacity && t.bg && (t.bg.style.opacity = String(z)), t.element && (t.element.style.opacity = "1")), this._animateZoom && (this._setClosedStateZoomPan(), this._placeholder && (this._placeholder.style.willChange = "transform", this._placeholder.style.opacity = String(z)))) : 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($)), 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()));
3424
3443
  }
3425
3444
  /** @private */
3426
3445
  _start() {
3427
3446
  this.isOpening && this._useAnimation && this._placeholder && this._placeholder.tagName === "IMG" ? new Promise((t) => {
3428
3447
  let e = !1, i = !0;
3429
- Ee(
3448
+ Pe(
3430
3449
  /** @type {HTMLImageElement} */
3431
3450
  this._placeholder
3432
3451
  ).finally(() => {
@@ -3489,9 +3508,9 @@ class bi {
3489
3508
  } = e;
3490
3509
  if (this._croppedZoom && i && this._cropContainer1 && this._cropContainer2) {
3491
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;
3492
- t ? (this._animateTo(this._cropContainer1, "transform", F(r, a)), this._animateTo(this._cropContainer2, "transform", F(l, c))) : (P(this._cropContainer1, r, a), P(this._cropContainer2, l, c));
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));
3493
3512
  }
3494
- n && (b(n.pan, i || this._thumbBounds), n.currZoomLevel = this._thumbBounds.w / n.width, t ? this._animateTo(n.container, "transform", n.getCurrentTransform()) : n.applyCurrentZoomPan());
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());
3495
3514
  }
3496
3515
  /**
3497
3516
  * @private
@@ -3517,7 +3536,7 @@ class bi {
3517
3536
  o[e] = i, n.startTransition(o);
3518
3537
  }
3519
3538
  }
3520
- const Si = {
3539
+ const Ei = {
3521
3540
  allowPanToNext: !0,
3522
3541
  spacing: 0.1,
3523
3542
  loop: !0,
@@ -3544,7 +3563,7 @@ const Si = {
3544
3563
  preload: [1, 2],
3545
3564
  easing: "cubic-bezier(.4,0,.22,1)"
3546
3565
  };
3547
- class Li extends wi {
3566
+ class Ci extends Li {
3548
3567
  /**
3549
3568
  * @param {PhotoSwipeOptions} [options]
3550
3569
  */
@@ -3558,7 +3577,7 @@ class Li extends wi {
3558
3577
  }, this.viewportSize = {
3559
3578
  x: 0,
3560
3579
  y: 0
3561
- }, 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 Pe(), this.animations = new Qe(), this.mainScroll = new We(this), this.gestures = new Ne(this), this.opener = new bi(this), this.keyboard = new je(this), this.contentLoader = new _i(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 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);
3562
3581
  }
3563
3582
  /** @returns {boolean} */
3564
3583
  init() {
@@ -3566,7 +3585,7 @@ class Li extends wi {
3566
3585
  return !1;
3567
3586
  this.isOpen = !0, this.dispatch("init"), this.dispatch("beforeOpen"), this._createMainStructure();
3568
3587
  let t = "pswp--open";
3569
- 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 ti(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 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", {
3570
3589
  index: this.currIndex,
3571
3590
  data: this._initialItemData,
3572
3591
  slide: void 0
@@ -3586,7 +3605,7 @@ class Li extends wi {
3586
3605
  */
3587
3606
  getLoopedIndex(t) {
3588
3607
  const e = this.getNumItems();
3589
- return this.options.loop && (t > e - 1 && (t -= e), t < 0 && (t += e)), Z(t, 0, e - 1);
3608
+ return this.options.loop && (t > e - 1 && (t -= e), t < 0 && (t += e)), H(t, 0, e - 1);
3590
3609
  }
3591
3610
  appendHeavy() {
3592
3611
  this.mainScroll.itemHolders.forEach((t) => {
@@ -3685,7 +3704,7 @@ class Li extends wi {
3685
3704
  if (!this.canLoop() && (e < 0 || e >= this.getNumItems()))
3686
3705
  return;
3687
3706
  const n = this.getItemData(e);
3688
- t.slide = new Te(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
3707
+ t.slide = new Oe(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
3689
3708
  }
3690
3709
  /** @returns {Point} */
3691
3710
  getViewportCenterPoint() {
@@ -3703,8 +3722,8 @@ class Li extends wi {
3703
3722
  updateSize(t) {
3704
3723
  if (this.isDestroying)
3705
3724
  return;
3706
- const e = Pt(this.options, this);
3707
- !t && B(e, this._prevViewportSize) || (b(this._prevViewportSize, e), this.dispatch("beforeResize"), b(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 = 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"));
3708
3727
  }
3709
3728
  /**
3710
3729
  * @param {number} opacity
@@ -3755,7 +3774,7 @@ class Li extends wi {
3755
3774
  * @private
3756
3775
  */
3757
3776
  _createMainStructure() {
3758
- this.element = A("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = A("pswp__bg", "div", this.element), this.scrollWrap = A("pswp__scroll-wrap", "section", this.element), this.container = A("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 ci(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
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);
3759
3778
  }
3760
3779
  /**
3761
3780
  * Get position and dimensions of small thumbnail
@@ -3766,7 +3785,7 @@ class Li extends wi {
3766
3785
  * @returns {Bounds | undefined}
3767
3786
  */
3768
3787
  getThumbBounds() {
3769
- return ui(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
3788
+ return fi(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
3770
3789
  }
3771
3790
  /**
3772
3791
  * If the PhotoSwipe can have continuous loop
@@ -3782,32 +3801,32 @@ class Li extends wi {
3782
3801
  */
3783
3802
  _prepareOptions(t) {
3784
3803
  return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches && (t.showHideAnimationType = "none", t.zoomAnimationDuration = 0), {
3785
- ...Si,
3804
+ ...Ei,
3786
3805
  ...t
3787
3806
  };
3788
3807
  }
3789
3808
  }
3790
- function O(s, t, e) {
3809
+ function B(s, t, e) {
3791
3810
  const i = document.createElement(t);
3792
3811
  return s && (i.className = s), e && e.appendChild(i), i;
3793
3812
  }
3794
- function Ai(s, t, e) {
3813
+ function xi(s, t, e) {
3795
3814
  let i = `translate3d(${s}px,0px,0)`;
3796
3815
  return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
3797
3816
  }
3798
- function K(s, t, e) {
3817
+ function Q(s, t, e) {
3799
3818
  s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
3800
3819
  }
3801
- const C = {
3820
+ const x = {
3802
3821
  IDLE: "idle",
3803
3822
  LOADING: "loading",
3804
3823
  LOADED: "loaded",
3805
3824
  ERROR: "error"
3806
3825
  };
3807
- function Ei(s) {
3826
+ function Pi(s) {
3808
3827
  return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
3809
3828
  }
3810
- function D(s, t, e = document) {
3829
+ function F(s, t, e = document) {
3811
3830
  let i = [];
3812
3831
  if (s instanceof Element)
3813
3832
  i = [s];
@@ -3819,13 +3838,13 @@ function D(s, t, e = document) {
3819
3838
  }
3820
3839
  return i;
3821
3840
  }
3822
- function Ci(s) {
3841
+ function Ti(s) {
3823
3842
  return typeof s == "function" && s.prototype && s.prototype.goTo;
3824
3843
  }
3825
- function pt() {
3844
+ function vt() {
3826
3845
  return !!(navigator.vendor && navigator.vendor.match(/apple/i));
3827
3846
  }
3828
- class xi {
3847
+ class Ii {
3829
3848
  /**
3830
3849
  * @param {T} type
3831
3850
  * @param {PhotoSwipeEventsMap[T]} [details]
@@ -3837,7 +3856,7 @@ class xi {
3837
3856
  this.defaultPrevented = !0;
3838
3857
  }
3839
3858
  }
3840
- class Pi {
3859
+ class zi {
3841
3860
  constructor() {
3842
3861
  this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
3843
3862
  }
@@ -3904,20 +3923,20 @@ class Pi {
3904
3923
  return this.pswp.dispatch(t, e);
3905
3924
  const n = (
3906
3925
  /** @type {AugmentedEvent<T>} */
3907
- new xi(t, e)
3926
+ new Ii(t, e)
3908
3927
  );
3909
3928
  return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
3910
3929
  o.call(this, n);
3911
3930
  }), n;
3912
3931
  }
3913
3932
  }
3914
- class Ii {
3933
+ class Mi {
3915
3934
  /**
3916
3935
  * @param {string | false} imageSrc
3917
3936
  * @param {HTMLElement} container
3918
3937
  */
3919
3938
  constructor(t, e) {
3920
- if (this.element = O("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
3939
+ if (this.element = B("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
3921
3940
  const i = (
3922
3941
  /** @type {HTMLImageElement} */
3923
3942
  this.element
@@ -3931,21 +3950,21 @@ class Ii {
3931
3950
  * @param {number} height
3932
3951
  */
3933
3952
  setDisplayedSize(t, e) {
3934
- this.element && (this.element.tagName === "IMG" ? (K(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = Ai(0, 0, t / 250)) : K(this.element, 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));
3935
3954
  }
3936
3955
  destroy() {
3937
3956
  var t;
3938
3957
  (t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
3939
3958
  }
3940
3959
  }
3941
- class Ti {
3960
+ class Oi {
3942
3961
  /**
3943
3962
  * @param {SlideData} itemData Slide data
3944
3963
  * @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
3945
3964
  * @param {number} index
3946
3965
  */
3947
3966
  constructor(t, e, i) {
3948
- 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", {
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", {
3949
3968
  content: this
3950
3969
  });
3951
3970
  }
@@ -3973,12 +3992,12 @@ class Ti {
3973
3992
  this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
3974
3993
  this
3975
3994
  );
3976
- this.placeholder = new Ii(i, this.slide.container);
3995
+ this.placeholder = new Mi(i, this.slide.container);
3977
3996
  }
3978
3997
  this.element && !e || this.instance.dispatch("contentLoad", {
3979
3998
  content: this,
3980
3999
  isLazy: t
3981
- }).defaultPrevented || (this.isImageContent() ? (this.element = O("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = O("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), e && this.slide && this.slide.updateContentSize(!0));
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));
3982
4001
  }
3983
4002
  /**
3984
4003
  * Preload image
@@ -3996,7 +4015,7 @@ class Ti {
3996
4015
  /** @type HTMLImageElement */
3997
4016
  this.element
3998
4017
  );
3999
- 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 = () => {
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 = () => {
4000
4019
  this.onLoaded();
4001
4020
  }, n.onerror = () => {
4002
4021
  this.onError();
@@ -4014,16 +4033,16 @@ class Ti {
4014
4033
  * Content load success handler
4015
4034
  */
4016
4035
  onLoaded() {
4017
- this.state = C.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
4036
+ this.state = x.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
4018
4037
  slide: this.slide,
4019
4038
  content: this
4020
- }), 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());
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());
4021
4040
  }
4022
4041
  /**
4023
4042
  * Content load error handler
4024
4043
  */
4025
4044
  onError() {
4026
- this.state = C.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
4045
+ this.state = x.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
4027
4046
  slide: this.slide,
4028
4047
  isError: !0,
4029
4048
  content: this
@@ -4036,13 +4055,13 @@ class Ti {
4036
4055
  * @returns {Boolean} If the content is currently loading
4037
4056
  */
4038
4057
  isLoading() {
4039
- return this.instance.applyFilters("isContentLoading", this.state === C.LOADING, this);
4058
+ return this.instance.applyFilters("isContentLoading", this.state === x.LOADING, this);
4040
4059
  }
4041
4060
  /**
4042
4061
  * @returns {Boolean} If the content is in error state
4043
4062
  */
4044
4063
  isError() {
4045
- return this.state === C.ERROR;
4064
+ return this.state === x.ERROR;
4046
4065
  }
4047
4066
  /**
4048
4067
  * @returns {boolean} If the content is image
@@ -4061,7 +4080,7 @@ class Ti {
4061
4080
  content: this,
4062
4081
  width: t,
4063
4082
  height: e
4064
- }).defaultPrevented && (K(this.element, t, e), this.isImageContent() && !this.isError()))) {
4083
+ }).defaultPrevented && (Q(this.element, t, e), this.isImageContent() && !this.isError()))) {
4065
4084
  const i = !this.displayedImageWidth && t;
4066
4085
  this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
4067
4086
  slide: this.slide,
@@ -4075,7 +4094,7 @@ class Ti {
4075
4094
  * @returns {boolean} If the content can be zoomed
4076
4095
  */
4077
4096
  isZoomable() {
4078
- return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== C.ERROR, this);
4097
+ return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== x.ERROR, this);
4079
4098
  }
4080
4099
  /**
4081
4100
  * Update image srcset sizes attribute based on width and height
@@ -4123,9 +4142,9 @@ class Ti {
4123
4142
  displayError() {
4124
4143
  if (this.slide) {
4125
4144
  var t, e;
4126
- let i = O("pswp__error-msg", "div");
4145
+ let i = B("pswp__error-msg", "div");
4127
4146
  i.innerText = (t = (e = this.instance.options) === null || e === void 0 ? void 0 : e.errorMsg) !== null && t !== void 0 ? t : "", i = /** @type {HTMLDivElement} */
4128
- this.instance.applyFilters("contentErrorElement", i, this), this.element = O("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 = 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();
4129
4148
  }
4130
4149
  }
4131
4150
  /**
@@ -4134,7 +4153,7 @@ class Ti {
4134
4153
  append() {
4135
4154
  if (this.isAttached || !this.element)
4136
4155
  return;
4137
- if (this.isAttached = !0, this.state === C.ERROR) {
4156
+ if (this.isAttached = !0, this.state === x.ERROR) {
4138
4157
  this.displayError();
4139
4158
  return;
4140
4159
  }
@@ -4143,7 +4162,7 @@ class Ti {
4143
4162
  }).defaultPrevented)
4144
4163
  return;
4145
4164
  const t = "decode" in this.element;
4146
- this.isImageContent() ? t && this.slide && (!this.slide.isActive || pt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
4165
+ this.isImageContent() ? t && this.slide && (!this.slide.isActive || vt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
4147
4166
  }).finally(() => {
4148
4167
  this.isDecoding = !1, this.appendImage();
4149
4168
  })) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
@@ -4156,7 +4175,7 @@ class Ti {
4156
4175
  activate() {
4157
4176
  this.instance.dispatch("contentActivate", {
4158
4177
  content: this
4159
- }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !pt() ? 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 && !vt() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
4160
4179
  }
4161
4180
  /**
4162
4181
  * Deactivate the content
@@ -4180,10 +4199,10 @@ class Ti {
4180
4199
  appendImage() {
4181
4200
  this.isAttached && (this.instance.dispatch("contentAppendImage", {
4182
4201
  content: this
4183
- }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === C.LOADED || this.state === C.ERROR) && this.removePlaceholder()));
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()));
4184
4203
  }
4185
4204
  }
4186
- function zi(s, t) {
4205
+ function Di(s, t) {
4187
4206
  if (s.getViewportSizeFn) {
4188
4207
  const e = s.getViewportSizeFn(s, t);
4189
4208
  if (e)
@@ -4198,7 +4217,7 @@ function zi(s, t) {
4198
4217
  y: window.innerHeight
4199
4218
  };
4200
4219
  }
4201
- function k(s, t, e, i, n) {
4220
+ function V(s, t, e, i, n) {
4202
4221
  let o = 0;
4203
4222
  if (t.paddingFn)
4204
4223
  o = t.paddingFn(e, i, n)[s];
@@ -4210,14 +4229,14 @@ function k(s, t, e, i, n) {
4210
4229
  }
4211
4230
  return Number(o) || 0;
4212
4231
  }
4213
- function Mi(s, t, e, i) {
4232
+ function $i(s, t, e, i) {
4214
4233
  return {
4215
- x: t.x - k("left", s, t, e, i) - k("right", s, t, e, i),
4216
- y: t.y - k("top", s, t, e, i) - k("bottom", s, t, e, i)
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)
4217
4236
  };
4218
4237
  }
4219
- const mt = 4e3;
4220
- class Oi {
4238
+ const yt = 4e3;
4239
+ class Ri {
4221
4240
  /**
4222
4241
  * @param {PhotoSwipeOptions} options PhotoSwipe options
4223
4242
  * @param {SlideData} itemData Slide data
@@ -4274,7 +4293,7 @@ class Oi {
4274
4293
  */
4275
4294
  _getSecondary() {
4276
4295
  let t = this._parseZoomLevelOption("secondary");
4277
- return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > mt && (t = mt / this.elementSize.x), t);
4296
+ return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > yt && (t = yt / this.elementSize.x), t);
4278
4297
  }
4279
4298
  /**
4280
4299
  * Get initial image zoom level.
@@ -4297,30 +4316,30 @@ class Oi {
4297
4316
  return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
4298
4317
  }
4299
4318
  }
4300
- function Ot(s, t, e) {
4319
+ function Bt(s, t, e) {
4301
4320
  const i = t.createContentFromData(s, e);
4302
4321
  let n;
4303
4322
  const {
4304
4323
  options: o
4305
4324
  } = t;
4306
4325
  if (o) {
4307
- n = new Oi(o, s, -1);
4326
+ n = new Ri(o, s, -1);
4308
4327
  let r;
4309
- t.pswp ? r = t.pswp.viewportSize : r = zi(o, t);
4310
- const a = Mi(o, r, s, e);
4328
+ t.pswp ? r = t.pswp.viewportSize : r = Di(o, t);
4329
+ const a = $i(o, r, s, e);
4311
4330
  n.update(i.width, i.height, a);
4312
4331
  }
4313
4332
  return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
4314
4333
  }
4315
- function Di(s, t) {
4334
+ function Bi(s, t) {
4316
4335
  const e = t.getItemData(s);
4317
4336
  if (!t.dispatch("lazyLoadSlide", {
4318
4337
  index: s,
4319
4338
  itemData: e
4320
4339
  }).defaultPrevented)
4321
- return Ot(e, t, s);
4340
+ return Bt(e, t, s);
4322
4341
  }
4323
- class $i extends Pi {
4342
+ class Fi extends zi {
4324
4343
  /**
4325
4344
  * Get total number of slides
4326
4345
  *
@@ -4343,7 +4362,7 @@ class $i extends Pi {
4343
4362
  * @returns {Content}
4344
4363
  */
4345
4364
  createContentFromData(t, e) {
4346
- return new Ti(t, this, e);
4365
+ return new Oi(t, this, e);
4347
4366
  }
4348
4367
  /**
4349
4368
  * Get item data by index.
@@ -4377,7 +4396,7 @@ class $i extends Pi {
4377
4396
  */
4378
4397
  _getGalleryDOMElements(t) {
4379
4398
  var e, i;
4380
- return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? D(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 ? F(this.options.children, this.options.childSelector, t) || [] : [t];
4381
4400
  }
4382
4401
  /**
4383
4402
  * Converts DOM element to item data object.
@@ -4411,10 +4430,10 @@ class $i extends Pi {
4411
4430
  * @returns {Content} Image that is being decoded or false.
4412
4431
  */
4413
4432
  lazyLoadData(t, e) {
4414
- return Ot(t, this, e);
4433
+ return Bt(t, this, e);
4415
4434
  }
4416
4435
  }
4417
- class Ri extends $i {
4436
+ class Zi extends Fi {
4418
4437
  /**
4419
4438
  * @param {PhotoSwipeOptions} [options]
4420
4439
  */
@@ -4426,7 +4445,7 @@ class Ri extends $i {
4426
4445
  * It's not included in the main constructor, so you may bind events before it.
4427
4446
  */
4428
4447
  init() {
4429
- D(this.options.gallery, this.options.gallerySelector).forEach((t) => {
4448
+ F(this.options.gallery, this.options.gallerySelector).forEach((t) => {
4430
4449
  t.addEventListener("click", this.onThumbnailsClick, !1);
4431
4450
  });
4432
4451
  }
@@ -4434,7 +4453,7 @@ class Ri extends $i {
4434
4453
  * @param {MouseEvent} e
4435
4454
  */
4436
4455
  onThumbnailsClick(t) {
4437
- if (Ei(t) || window.pswp)
4456
+ if (Pi(t) || window.pswp)
4438
4457
  return;
4439
4458
  let e = {
4440
4459
  x: t.clientX,
@@ -4463,7 +4482,7 @@ class Ri extends $i {
4463
4482
  const e = (
4464
4483
  /** @type {HTMLElement} */
4465
4484
  t.target
4466
- ), n = D(
4485
+ ), n = F(
4467
4486
  this.options.children,
4468
4487
  this.options.childSelector,
4469
4488
  /** @type {HTMLElement} */
@@ -4483,7 +4502,7 @@ class Ri extends $i {
4483
4502
  if (window.pswp || !this.options)
4484
4503
  return !1;
4485
4504
  if (!e && this.options.gallery && this.options.children) {
4486
- const n = D(this.options.gallery);
4505
+ const n = F(this.options.gallery);
4487
4506
  n[0] && (e = {
4488
4507
  gallery: n[0]
4489
4508
  });
@@ -4502,7 +4521,7 @@ class Ri extends $i {
4502
4521
  } = this;
4503
4522
  e && (i.dataSource = e);
4504
4523
  const n = [], o = typeof i.pswpModule;
4505
- if (Ci(i.pswpModule))
4524
+ if (Ti(i.pswpModule))
4506
4525
  n.push(Promise.resolve(
4507
4526
  /** @type {Type<PhotoSwipe>} */
4508
4527
  i.pswpModule
@@ -4518,7 +4537,7 @@ class Ri extends $i {
4518
4537
  else
4519
4538
  throw new Error("pswpModule is not valid");
4520
4539
  }
4521
- typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = Di(t, this));
4540
+ typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = Bi(t, this));
4522
4541
  const r = ++this._uid;
4523
4542
  Promise.all(n).then((a) => {
4524
4543
  if (this.shouldOpen) {
@@ -4559,17 +4578,17 @@ class Ri extends $i {
4559
4578
  */
4560
4579
  destroy() {
4561
4580
  var t;
4562
- (t = this.pswp) === null || t === void 0 || t.destroy(), this.shouldOpen = !1, this._listeners = {}, D(this.options.gallery, this.options.gallerySelector).forEach((e) => {
4581
+ (t = this.pswp) === null || t === void 0 || t.destroy(), this.shouldOpen = !1, this._listeners = {}, F(this.options.gallery, this.options.gallerySelector).forEach((e) => {
4563
4582
  e.removeEventListener("click", this.onThumbnailsClick, !1);
4564
4583
  });
4565
4584
  }
4566
4585
  }
4567
- const Bi = () => {
4586
+ const ki = () => {
4568
4587
  let s = null;
4569
- return s = new Ri({
4588
+ return s = new Zi({
4570
4589
  gallery: "#photoswipe-gallery",
4571
4590
  children: "a",
4572
- pswpModule: Li,
4591
+ pswpModule: Ci,
4573
4592
  zoom: !1,
4574
4593
  imageClickAction: "next",
4575
4594
  tapAction: "next"
@@ -4590,7 +4609,7 @@ const Bi = () => {
4590
4609
  }), s.init(), () => {
4591
4610
  s && (s.destroy(), s = null);
4592
4611
  };
4593
- }, ft = (s) => Math.min(100, Math.max(0, Math.round(s))), Fi = () => {
4612
+ }, _t = (s) => Math.min(100, Math.max(0, Math.round(s))), qi = () => {
4594
4613
  const s = document.querySelector(".js-limit-scroll-progress-bar"), t = document.querySelector(".c-progress__bar"), e = document.querySelector(".c-btn__close-progress");
4595
4614
  if (!t && !e)
4596
4615
  return;
@@ -4599,22 +4618,25 @@ const Bi = () => {
4599
4618
  let o = i.scrollHeight - i.clientHeight;
4600
4619
  if (!o)
4601
4620
  return;
4602
- s && (o = s.scrollHeight - i.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top)), t.style.width = `${ft(n / o * 100)}%`;
4621
+ s && (o = s.scrollHeight - i.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top)), t.style.width = `${_t(n / o * 100)}%`;
4603
4622
  }
4604
4623
  if (e) {
4605
4624
  const o = document.querySelector(".js-content-header"), r = document.querySelector(".js-limit-scroll-close-article-btn");
4606
4625
  if (o && r) {
4607
4626
  const a = window.pageYOffset + o.getBoundingClientRect().bottom, c = window.pageYOffset + r.getBoundingClientRect().bottom - i.clientHeight - a;
4608
4627
  if (c > 0) {
4609
- const d = ft((n - a) / c * 100);
4610
- e.style.setProperty("--progress", `${d}`), e.parentElement?.classList.toggle("c-btn--close-progress-complete", d >= 100);
4628
+ const d = _t((n - a) / c * 100);
4629
+ e.style.setProperty("--progress", `${d}`), e.parentElement?.classList.toggle(
4630
+ "c-btn--close-progress-complete",
4631
+ d >= 100
4632
+ );
4611
4633
  }
4612
4634
  }
4613
4635
  }
4614
- }, Zi = () => {
4636
+ }, Ni = () => {
4615
4637
  const s = document.querySelector(".c-progress"), t = document.querySelector(".c-btn__close-progress");
4616
- (s || t) && window.addEventListener("scroll", Fi);
4617
- }, qi = (s = {}) => {
4638
+ (s || t) && window.addEventListener("scroll", qi);
4639
+ }, Hi = (s = {}) => {
4618
4640
  const { buttonSelector: t = ".c-scroll-to-top" } = s, e = document.querySelector(t), i = e?.querySelector("button");
4619
4641
  if (!e || !i)
4620
4642
  return;
@@ -4636,21 +4658,21 @@ const Bi = () => {
4636
4658
  });
4637
4659
  };
4638
4660
  window.addEventListener("scroll", r), i.addEventListener("click", a), r();
4639
- }, ki = 500, Ni = () => {
4640
- const s = document.querySelector("#mbrs-comments-container"), t = s?.querySelector(".c-comment__scroll-to-top-button");
4661
+ }, Wi = 500, Vi = () => {
4662
+ const s = document.querySelector("#mbrs-comments-container"), t = document.querySelector(".c-scroll-to-top-comment");
4641
4663
  if (!s || !t)
4642
4664
  return;
4643
4665
  t.style.display = "none";
4644
4666
  let e = !1;
4645
4667
  const i = () => {
4646
4668
  const { top: u } = s.getBoundingClientRect();
4647
- t.style.display = u < -400 ? "block" : "none";
4669
+ t.style.display = u < -400 ? "flex" : "none";
4648
4670
  }, n = () => {
4649
4671
  e || (e = !0, window.addEventListener("scroll", i, { passive: !0 }), i());
4650
4672
  }, o = () => {
4651
4673
  e && (e = !1, window.removeEventListener("scroll", i), t.style.display = "none");
4652
4674
  }, r = (u) => {
4653
- u.offsetHeight > ki ? n() : o();
4675
+ u.offsetHeight > Wi ? n() : o();
4654
4676
  }, a = (u) => {
4655
4677
  new ResizeObserver(() => {
4656
4678
  r(u);
@@ -4678,16 +4700,16 @@ const Bi = () => {
4678
4700
  if (p instanceof HTMLIFrameElement)
4679
4701
  return c(p), !0;
4680
4702
  if (p instanceof HTMLElement) {
4681
- const y = p.querySelector("iframe");
4682
- if (y)
4683
- return c(y), !0;
4703
+ const _ = p.querySelector("iframe");
4704
+ if (_)
4705
+ return c(_), !0;
4684
4706
  }
4685
4707
  return !1;
4686
4708
  })
4687
4709
  ) && h.disconnect();
4688
4710
  });
4689
4711
  h.observe(s, { childList: !0, subtree: !0 });
4690
- }, j = "#page-content", X = "#text-tooltip", Hi = ".tooltip-btn", Dt = "c-text-tooltip--show", Wi = [
4712
+ }, X = "#page-content", tt = "#text-tooltip", ji = ".tooltip-btn", Ft = "c-text-tooltip--show", Gi = [
4691
4713
  "#page-content .c-content p",
4692
4714
  "#page-content .c-content h2",
4693
4715
  "#page-content .c-content h3",
@@ -4699,62 +4721,64 @@ const Bi = () => {
4699
4721
  "#page-content header span",
4700
4722
  "#page-content header h1",
4701
4723
  "#page-content header h2"
4702
- ], gt = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, Vi = (s, t) => {
4724
+ ], wt = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, Ui = (s, t) => {
4703
4725
  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;
4704
- return !!e && gt(e, t) || !!i && gt(i, t);
4705
- }, ji = (s) => {
4726
+ return !!e && wt(e, t) || !!i && wt(i, t);
4727
+ }, Ki = (s) => {
4706
4728
  if (!s.focusNode)
4707
4729
  return null;
4708
4730
  const t = s.anchorNode?.compareDocumentPosition(s.focusNode);
4709
4731
  return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
4710
- }, Gi = (s, t, e) => {
4711
- const i = document.querySelector(`${j} ${X}`), n = document.querySelector(`${j}`), o = document.querySelectorAll(
4712
- `${j} ${X} ${Hi}`
4732
+ }, Xi = (s, t, e) => {
4733
+ const i = document.querySelector(`${X} ${tt}`), n = document.querySelector(`${X}`), o = document.querySelectorAll(
4734
+ `${X} ${tt} ${ji}`
4713
4735
  );
4714
4736
  if (!i || !n) {
4715
4737
  console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");
4716
4738
  return;
4717
4739
  }
4718
- Array.from(o).forEach((l) => l.setAttribute("data-selected-text", e));
4740
+ Array.from(o).forEach((l) => {
4741
+ l.setAttribute("data-selected-text", e);
4742
+ });
4719
4743
  const r = s.getClientRects(), a = r[t ? r.length - 1 : 0];
4720
- 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(Dt);
4721
- }, vt = () => {
4722
- const s = document.querySelector(`${X}`);
4723
- s && s.classList.remove(Dt);
4724
- }, N = ({ type: s }) => {
4744
+ 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);
4745
+ }, bt = () => {
4746
+ const s = document.querySelector(`${tt}`);
4747
+ s && s.classList.remove(Ft);
4748
+ }, j = ({ type: s }) => {
4725
4749
  const t = window.getSelection();
4726
4750
  if (s === "selectionchange") {
4727
- vt();
4751
+ bt();
4728
4752
  return;
4729
4753
  }
4730
4754
  if (!t || !t.rangeCount)
4731
4755
  return;
4732
4756
  const e = t.getRangeAt(0), i = t.toString().trim();
4733
4757
  if (i.length) {
4734
- const n = Vi(e, Wi), o = ji(t) || !1;
4735
- n && Gi(e, o, i);
4758
+ const n = Ui(e, Gi), o = Ki(t) || !1;
4759
+ n && Xi(e, o, i);
4736
4760
  return;
4737
4761
  }
4738
- vt();
4739
- }, Ui = () => {
4762
+ bt();
4763
+ }, Yi = () => {
4740
4764
  if (!window?.getSelection) {
4741
4765
  console.warn("Selection API isn't supported");
4742
4766
  return;
4743
4767
  }
4744
- document.addEventListener("mouseup", N), document.addEventListener("selectionchange", N), document.addEventListener("touchend", N), document.addEventListener("touchcancel", N);
4745
- }, Ki = (s) => {
4768
+ document.addEventListener("mouseup", j), document.addEventListener("selectionchange", j), document.addEventListener("touchend", j), document.addEventListener("touchcancel", j);
4769
+ }, Ji = (s) => {
4746
4770
  const { target: t } = s;
4747
4771
  if (t instanceof Element) {
4748
4772
  const e = t.closest(".c-search-form--button");
4749
4773
  e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
4750
4774
  }
4751
- }, Xi = (s = document.querySelector(
4775
+ }, Qi = (s = document.querySelector(
4752
4776
  ".c-search-form--button"
4753
4777
  )) => {
4754
4778
  s && s.addEventListener("click", (t) => {
4755
- Ki(t);
4779
+ Ji(t);
4756
4780
  });
4757
- }, Yi = ({
4781
+ }, ts = ({
4758
4782
  tabsContainerElement: s,
4759
4783
  event: t
4760
4784
  }) => {
@@ -4770,38 +4794,38 @@ const Bi = () => {
4770
4794
  }), n.forEach((a) => {
4771
4795
  a.setAttribute("aria-hidden", "true");
4772
4796
  }), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
4773
- }, yt = (s) => s.code === "ArrowLeft" || s.keyCode === 39, _t = (s) => s.code === "ArrowRight" || s.keyCode === 37, Ji = (s = document.querySelectorAll(
4797
+ }, St = (s) => s.code === "ArrowLeft" || s.keyCode === 39, Lt = (s) => s.code === "ArrowRight" || s.keyCode === 37, es = (s = document.querySelectorAll(
4774
4798
  ".js-tabs"
4775
4799
  )) => {
4776
4800
  s.length > 0 && s.forEach((t) => {
4777
4801
  const e = t.querySelectorAll('[role="tab"]');
4778
4802
  e.forEach((n) => {
4779
4803
  n.addEventListener("click", (o) => {
4780
- Yi({ tabsContainerElement: t, event: o });
4804
+ ts({ tabsContainerElement: t, event: o });
4781
4805
  });
4782
4806
  });
4783
4807
  const i = t.querySelector('[role="tablist"]');
4784
4808
  if (i && e.length > 0) {
4785
4809
  let n = 0;
4786
4810
  i.addEventListener("keydown", (o) => {
4787
- o instanceof KeyboardEvent && (yt(o) || _t(o)) && (e[n].setAttribute("tabindex", "-1"), yt(o) ? (n += 1, n >= e.length && (n = 0)) : _t(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
4811
+ 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());
4788
4812
  });
4789
4813
  }
4790
4814
  });
4791
- }, H = (s) => {
4815
+ }, G = (s) => {
4792
4816
  const [t, e] = s.split("h").map(Number);
4793
4817
  return t * 60 + e;
4794
- }, $t = () => {
4818
+ }, Zt = () => {
4795
4819
  const s = /* @__PURE__ */ new Date(), t = s.getHours(), e = s.getMinutes();
4796
4820
  return t * 60 + e;
4797
- }, Qi = (s, t) => {
4798
- const e = $t();
4821
+ }, is = (s, t) => {
4822
+ const e = Zt();
4799
4823
  if (e < s || e > t)
4800
4824
  return 0;
4801
4825
  const i = t - s;
4802
4826
  return (e - s) / i;
4803
- }, ts = (s) => {
4804
- const t = $t();
4827
+ }, ss = (s) => {
4828
+ const t = Zt();
4805
4829
  let e = null, i = null, n = -1;
4806
4830
  return Array.from(s).find((o, r, a) => {
4807
4831
  if (r === a.length - 1)
@@ -4809,17 +4833,17 @@ const Bi = () => {
4809
4833
  const l = o.textContent, c = a[r + 1].textContent;
4810
4834
  if (!l || !c)
4811
4835
  return !1;
4812
- const d = H(l), h = H(c);
4836
+ const d = G(l), h = G(c);
4813
4837
  return t >= d && t < h ? (e = l, i = c, n = r, !0) : !1;
4814
4838
  }), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n };
4815
- }, es = () => {
4839
+ }, ns = () => {
4816
4840
  const s = document.querySelectorAll(".c-timeline__time");
4817
4841
  if (!s || s.length < 2)
4818
4842
  return;
4819
- const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = ts(s);
4843
+ const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = ss(s);
4820
4844
  if (!e || !i)
4821
4845
  return;
4822
- const o = H(e), r = H(i), a = Qi(o, r);
4846
+ const o = G(e), r = G(i), a = is(o, r);
4823
4847
  if (t instanceof HTMLElement) {
4824
4848
  if (t.classList.contains("c-timeline__progress-bar--is-desktop") && s.length >= 5) {
4825
4849
  const l = "172px / 2";
@@ -4858,57 +4882,57 @@ const Bi = () => {
4858
4882
  }
4859
4883
  }
4860
4884
  }
4861
- }, Y = "c-icon-item__container--is-highlighted", is = (s) => {
4885
+ }, et = "c-icon-item__container--is-highlighted", os = (s) => {
4862
4886
  s.find(
4863
- (e) => e.classList.contains(Y)
4864
- )?.classList.remove(Y);
4865
- }, ss = () => {
4887
+ (e) => e.classList.contains(et)
4888
+ )?.classList.remove(et);
4889
+ }, rs = () => {
4866
4890
  const s = document.querySelector(".c-toolbar");
4867
4891
  if (s) {
4868
4892
  const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-icon-item__container"));
4869
- is(e), e.find(
4893
+ os(e), e.find(
4870
4894
  (n) => n.querySelector("a")?.getAttribute("href") === t
4871
- )?.classList.add(Y);
4895
+ )?.classList.add(et);
4872
4896
  }
4873
- }, tt = (s) => {
4897
+ }, as = 12, nt = (s) => {
4874
4898
  const t = s || document.querySelector(".c-map-towns");
4875
4899
  if (!t) {
4876
4900
  new MutationObserver((o, r) => {
4877
4901
  if (typeof document < "u") {
4878
4902
  const a = document.querySelector(".c-map-towns");
4879
- a && (r.disconnect(), tt(a));
4903
+ a && (r.disconnect(), nt(a));
4880
4904
  }
4881
4905
  }).observe(document.body, { childList: !0, subtree: !0 });
4882
4906
  return;
4883
4907
  }
4884
4908
  const e = () => {
4885
- const n = document.querySelectorAll(".js-city-marker");
4909
+ const n = t.querySelectorAll(".js-city-marker");
4886
4910
  if (n.length === 0)
4887
4911
  return !1;
4888
- const o = () => {
4889
- let r = !0;
4890
- n.forEach((a) => {
4891
- if (a.getAttribute("aria-hidden") === "false")
4912
+ const o = (r = 0) => {
4913
+ let a = !0;
4914
+ n.forEach((l) => {
4915
+ if (l.getAttribute("aria-hidden") === "false")
4892
4916
  return;
4893
- const l = a.querySelector(".js-city-anchor"), c = a.querySelector(".js-city-text"), d = a.querySelector(".js-city-bg");
4894
- if (!(l instanceof SVGGraphicsElement) || !(c instanceof SVGTextElement) || !(d instanceof SVGRectElement))
4917
+ const c = l.querySelector(".js-city-anchor"), d = l.querySelector(".js-city-text"), h = l.querySelector(".js-city-bg");
4918
+ if (!(c instanceof SVGGraphicsElement) || !(d instanceof SVGTextElement) || !(h instanceof SVGRectElement))
4895
4919
  return;
4896
- const h = l.getBBox();
4897
- if (h.width > 0) {
4898
- const { x: u, y: m, width: f, height: p } = h, y = a.getAttribute("data-scale"), S = y ? ` scale(${y})` : "";
4899
- a.setAttribute(
4920
+ const u = c.getBBox();
4921
+ if (u.width > 0) {
4922
+ const { x: m, y: f, width: p, height: _ } = u, b = l.getAttribute("data-scale"), A = b ? ` scale(${b})` : "";
4923
+ l.setAttribute(
4900
4924
  "transform",
4901
- `translate(${u + f / 2}, ${m + p / 2})${S}`
4925
+ `translate(${m + p / 2}, ${f + _ / 2})${A}`
4902
4926
  );
4903
- const L = c.getBBox(), g = 8, _ = 4, w = 8, q = L.width + g, W = L.height + _;
4904
- d.setAttribute("width", `${q}`), d.setAttribute("height", `${W}`), d.setAttribute("x", `${-q / 2}`), d.setAttribute("y", `${-W - w}`);
4905
- const Rt = -W / 2 - w;
4906
- c.setAttribute("y", `${Rt}`), a.setAttribute("aria-hidden", "false");
4927
+ const v = d.getBBox(), g = 8, w = 4, L = 8, P = v.width + g, T = v.height + w;
4928
+ h.setAttribute("width", `${P}`), h.setAttribute("height", `${T}`), h.setAttribute("x", `${-P / 2}`), h.setAttribute("y", `${-T - L}`);
4929
+ const M = -T / 2 - L;
4930
+ d.setAttribute("y", `${M}`), l.setAttribute("aria-hidden", "false");
4907
4931
  } else
4908
- r = !1;
4909
- }), r || requestAnimationFrame(o);
4932
+ a = !1;
4933
+ }), !a && r < as && requestAnimationFrame(() => o(r + 1));
4910
4934
  };
4911
- return requestAnimationFrame(o), !0;
4935
+ return requestAnimationFrame(() => o()), !0;
4912
4936
  };
4913
4937
  if (e())
4914
4938
  return;
@@ -4918,7 +4942,7 @@ const Bi = () => {
4918
4942
  childList: !0,
4919
4943
  subtree: !0
4920
4944
  });
4921
- }, ns = {
4945
+ }, ls = {
4922
4946
  10: [{ id: "10387", name: "Troyes" }, { id: "10323", name: "Romilly-sur-Seine" }, { id: "10033", name: "Bar-sur-Aube" }],
4923
4947
  11: [{ id: "11262", name: "Narbonne" }, { id: "11069", name: "Carcassonne" }, { id: "11076", name: "Castelnaudary" }],
4924
4948
  12: [{ id: "12202", name: "Rodez" }, { id: "12145", name: "Millau" }, { id: "12300", name: "Villefranche-de-Rouergue" }],
@@ -5019,104 +5043,165 @@ const Bi = () => {
5019
5043
  "07": [{ id: "07010", name: "Annonay" }, { id: "07019", name: "Aubenas" }, { id: "07324", name: "Tournon-sur-Rhône" }],
5020
5044
  "05": [{ id: "05061", name: "Gap" }, { id: "05023", name: "Briançon" }, { id: "05046", name: "Embrun" }],
5021
5045
  "08": [{ id: "08105", name: "Charleville-Mézières" }, { id: "08362", name: "Rethel" }, { id: "08190", name: "Givet" }]
5022
- }, os = (s, t) => {
5023
- if (s.startsWith("97"))
5024
- return Array.from(
5025
- document.querySelectorAll(`path[id^="town-${s}"][id$="-drom"]`)
5046
+ }, cs = /<path\b([^>]*?)\/>/g, ds = /\b([:\w-]+)="([^"]*)"/g, hs = (s) => {
5047
+ const t = [];
5048
+ for (const e of s.matchAll(cs)) {
5049
+ const i = e[1];
5050
+ if (!i)
5051
+ continue;
5052
+ const n = /* @__PURE__ */ new Map();
5053
+ for (const c of i.matchAll(ds)) {
5054
+ const [, d, h] = c;
5055
+ d && n.set(d, h || "");
5056
+ }
5057
+ const o = n.get("id"), r = n.get("d"), a = n.get("data-name"), l = n.get("data-url");
5058
+ !o || !r || !a || !l || t.push({
5059
+ id: o,
5060
+ path: r,
5061
+ name: a,
5062
+ url: l
5063
+ });
5064
+ }
5065
+ return t;
5066
+ }, us = (s) => new Map(s.map((t) => [t.id, t])), ps = (s, t, e) => {
5067
+ const i = e.get(s);
5068
+ if (i)
5069
+ return i;
5070
+ const n = s.startsWith("97") ? Array.from(
5071
+ document.querySelectorAll(`path[id^="town-${s}"][id$="-drom"]`)
5072
+ ).map((o) => ({
5073
+ id: o.getAttribute("id") || "",
5074
+ path: o.getAttribute("d") || "",
5075
+ name: o.getAttribute("data-name") || "",
5076
+ url: o.getAttribute("data-url") || ""
5077
+ })) : Array.from(t().values()).filter(
5078
+ (o) => o.id.startsWith(`town-${s}`)
5079
+ );
5080
+ return e.set(s, n), n;
5081
+ }, ms = (s, t) => t.get(s), fs = (s) => {
5082
+ if (s.size > 0)
5083
+ return;
5084
+ document.querySelectorAll(
5085
+ ".c-map-towns__map .c-map-towns__layer-towns path[data-town-id], .c-map-towns__map-drom .c-map-towns__layer-towns path[id]"
5086
+ ).forEach((e) => {
5087
+ const i = e.getAttribute("data-town-id") || e.getAttribute("id");
5088
+ i && s.set(
5089
+ i,
5090
+ Array.from(e.classList).filter((n) => n.startsWith("c-map-towns__path--"))
5026
5091
  );
5027
- const e = `[id^="town-${s}"]`;
5028
- return t ? Array.from(t.querySelectorAll(e)) : [];
5029
- }, rs = (s, t, e, i) => {
5030
- (i.startsWith("97") ? s : document.querySelector(
5031
- `.c-map-towns__layer-towns [href="#${e}"], .c-map-towns__layer-towns [xlink\\:href="#${e}"]`
5032
- ))?.classList.forEach((o) => {
5033
- o.includes("--") && t.classList.add(o);
5034
5092
  });
5035
- }, as = (s, t) => {
5036
- const e = s.getAttribute("id"), i = s.getAttribute("data-url"), n = s.getAttribute("data-name");
5093
+ }, gs = (s, t) => {
5094
+ const e = s.id, i = s.url;
5037
5095
  if (!e || !i)
5038
5096
  return null;
5039
- const o = document.createElementNS("http://www.w3.org/2000/svg", "a");
5040
- o.setAttribute("href", i);
5041
- let r;
5042
- if (t.startsWith("97")) {
5043
- const a = s.cloneNode(!0);
5044
- if (!(a instanceof SVGElement))
5045
- return null;
5046
- r = a, r.removeAttribute("id");
5047
- } else
5048
- r = document.createElementNS("http://www.w3.org/2000/svg", "use"), r.setAttribute("href", `#${e}`);
5049
- if (r.classList.add("c-map-towns__path"), n) {
5050
- const a = document.createElementNS("http://www.w3.org/2000/svg", "title");
5051
- a.textContent = n, r.appendChild(a);
5052
- }
5053
- return rs(s, r, e, t), o.appendChild(r), o;
5054
- }, ls = (s, t, e) => {
5097
+ const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
5098
+ n.setAttribute("d", s.path), n.setAttribute("class", "c-map-towns__path c-map-towns__zoom-town"), n.setAttribute("data-url", i);
5099
+ const o = ms(e, t);
5100
+ return o && o.forEach((r) => {
5101
+ n.classList.add(r);
5102
+ }), n;
5103
+ }, vs = (s, t) => {
5104
+ const e = document.createDocumentFragment();
5105
+ return s.forEach((i) => {
5106
+ const n = gs(i, t);
5107
+ n && e.appendChild(n);
5108
+ }), e;
5109
+ }, ys = (s, t) => {
5110
+ s.replaceChildren(t);
5111
+ }, _s = (s, t, e) => {
5055
5112
  const i = document.createElementNS("http://www.w3.org/2000/svg", "g");
5056
5113
  i.setAttribute("class", "js-city-marker c-map-towns__city-marker"), i.setAttribute("aria-hidden", "true"), i.setAttribute("data-scale", e.toString());
5057
- const n = document.createElementNS("http://www.w3.org/2000/svg", "use"), r = t.startsWith("97") ? `#town-${t}-drom` : `#town-${t}`;
5058
- n.setAttribute("href", r), n.setAttribute("class", "js-city-anchor c-map-towns__city-anchor");
5059
- const a = document.createElementNS("http://www.w3.org/2000/svg", "circle");
5060
- a.setAttribute("class", "c-map-towns__city-circle"), a.setAttribute("r", "5"), a.setAttribute("fill", "white"), a.setAttribute("stroke", "black"), a.setAttribute("strokeWidth", "1");
5061
- const l = document.createElementNS("http://www.w3.org/2000/svg", "rect");
5062
- l.setAttribute("class", "js-city-bg"), l.setAttribute("fill", "white"), l.setAttribute("rx", "4"), l.setAttribute("ry", "4");
5063
- const c = document.createElementNS("http://www.w3.org/2000/svg", "text");
5064
- return c.setAttribute("class", "js-city-text c-map-towns__city-text"), c.textContent = s, i.appendChild(n), i.appendChild(a), i.appendChild(l), i.appendChild(c), i;
5065
- }, cs = (s, t, e) => {
5066
- s.innerHTML = "", e.forEach((c) => s.appendChild(c));
5067
- const i = s.getBBox(), n = 5, o = i.width + n * 2, r = i.height + n * 2;
5068
- t.setAttribute(
5114
+ const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
5115
+ n.setAttribute("d", t), n.setAttribute("class", "js-city-anchor c-map-towns__city-anchor");
5116
+ const o = document.createElementNS("http://www.w3.org/2000/svg", "circle");
5117
+ o.setAttribute("class", "c-map-towns__city-circle"), o.setAttribute("r", "5"), o.setAttribute("fill", "white"), o.setAttribute("stroke", "black"), o.setAttribute("strokeWidth", "1");
5118
+ const r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
5119
+ r.setAttribute("class", "js-city-bg"), r.setAttribute("fill", "white"), r.setAttribute("rx", "4"), r.setAttribute("ry", "4");
5120
+ const a = document.createElementNS("http://www.w3.org/2000/svg", "text");
5121
+ 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;
5122
+ }, ws = (s, t) => {
5123
+ const e = t.getBBox(), i = 5, n = e.width + i * 2, o = e.height + i * 2;
5124
+ s.setAttribute(
5069
5125
  "viewBox",
5070
- `${i.x - n} ${i.y - n} ${o} ${r}`
5126
+ `${e.x - i} ${e.y - i} ${n} ${o}`
5071
5127
  );
5072
- const a = t.clientWidth || 800, l = t.clientHeight || 600;
5073
- return Math.max(o / a, r / l);
5128
+ const r = s.clientWidth || 800, a = s.clientHeight || 600;
5129
+ return Math.max(n / r, o / a);
5074
5130
  };
5075
- let wt = !1;
5076
- const J = () => {
5077
- if (wt)
5131
+ let At = !1;
5132
+ const it = () => {
5133
+ if (At)
5078
5134
  return;
5079
5135
  if (!document.querySelector(".c-map-towns")) {
5080
- new MutationObserver((h, u) => {
5081
- typeof document < "u" && document.querySelector(".c-map-towns") && (u.disconnect(), J());
5136
+ new MutationObserver((w, L) => {
5137
+ typeof document < "u" && document.querySelector(".c-map-towns") && (L.disconnect(), it());
5082
5138
  }).observe(document.body, { childList: !0, subtree: !0 });
5083
5139
  return;
5084
5140
  }
5085
5141
  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");
5086
5142
  if (!(t instanceof HTMLElement) || !(e instanceof SVGSVGElement) || !(i instanceof SVGGElement) || !(n instanceof HTMLElement)) {
5087
- requestAnimationFrame(J);
5143
+ requestAnimationFrame(it);
5088
5144
  return;
5089
5145
  }
5090
- wt = !0;
5091
- const o = document.querySelector(".c-map-towns__map"), r = document.querySelector(".c-map-towns__droms"), a = document.getElementById("js-zoom-label"), l = (d) => {
5092
- const { target: h } = d;
5093
- if (!(h instanceof Element))
5146
+ At = !0;
5147
+ 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();
5148
+ let u = null;
5149
+ const m = () => {
5150
+ if (u)
5151
+ return u;
5152
+ const g = c instanceof HTMLScriptElement ? JSON.parse(c.textContent || '""') : "";
5153
+ return u = us(hs(g)), u;
5154
+ }, f = () => {
5155
+ t.setAttribute("aria-hidden", "true"), i.replaceChildren();
5156
+ }, p = (g, w) => g.startsWith("97") ? document.querySelector(`path[id="town-${w}-drom"]`)?.getAttribute("d") || null : m().get(`town-${w}`)?.path || null, _ = (g, w) => {
5157
+ const P = ls[g] || [];
5158
+ if (P.length === 0)
5159
+ return;
5160
+ const T = document.createDocumentFragment();
5161
+ P.forEach((M) => {
5162
+ const W = p(g, M.id);
5163
+ if (!W)
5164
+ return;
5165
+ const U = _s(M.name, W, w);
5166
+ T.appendChild(U);
5167
+ }), i.appendChild(T), requestAnimationFrame(() => {
5168
+ nt(i);
5169
+ });
5170
+ }, b = (g) => {
5171
+ const { target: w } = g;
5172
+ if (!(w instanceof Element))
5173
+ return;
5174
+ const L = w?.closest(".c-map-towns__dept-trigger");
5175
+ if (!L)
5176
+ return;
5177
+ const P = L.getAttribute("id")?.replace("out-", "") || "", T = L.getAttribute("data-name"), M = ps(P, m, d);
5178
+ fs(h);
5179
+ const W = vs(M, h);
5180
+ if (a && l && T && (a.textContent = T, l.textContent = `Carte détaillée du département : ${T}`), !(L instanceof SVGGraphicsElement))
5094
5181
  return;
5095
- const u = h?.closest(".c-map-towns__dept-trigger");
5096
- if (!u)
5182
+ const U = ws(e, L);
5183
+ t.setAttribute("aria-hidden", "false"), ys(i, W), _(P, U);
5184
+ }, A = (g) => {
5185
+ const { target: w } = g;
5186
+ if (!(w instanceof Element))
5097
5187
  return;
5098
- const m = u.getAttribute("id")?.replace("out-", "") || "", f = u.getAttribute("data-name"), p = document.querySelector(".c-map-towns__sprite"), S = os(m, p).map((w) => as(w, m)).filter((w) => w !== null);
5099
- a && f && (a.textContent = f);
5100
- const L = cs(i, e, S);
5101
- (ns[m] || []).forEach((w) => {
5102
- const q = ls(w.name, w.id, L);
5103
- i.appendChild(q);
5104
- }), tt(i), t.setAttribute("aria-hidden", "false");
5188
+ const P = w.closest(".c-map-towns__zoom-town")?.getAttribute("data-url");
5189
+ P && (window.location.href = P);
5105
5190
  };
5106
- o?.addEventListener("click", l), r?.addEventListener("click", l), n.addEventListener("click", () => {
5107
- t.setAttribute("aria-hidden", "true");
5108
- }), t.addEventListener("click", (d) => {
5109
- d.target === t && t.setAttribute("aria-hidden", "true");
5191
+ o?.addEventListener("click", b), r?.addEventListener("click", b), i.addEventListener("click", A), n.addEventListener("click", () => {
5192
+ f();
5193
+ }), t.addEventListener("click", (g) => {
5194
+ g.target === t && f();
5110
5195
  });
5111
- }, gs = () => {
5112
- ne(), Ji(), jt(), ce(), Qt(), Zi(), Bi(), fe(), Xi(), V("winterOlympicsGames", "countdown-winter-olympics-games"), V("eurovision", "countdown-eurovision"), V("worldFoot2026", "countdown-world-foot-2026"), Ui(), Wt(), re(), Kt(), Ht(
5196
+ }, xs = () => {
5197
+ 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(
5113
5198
  "localisation-input",
5114
5199
  "https://www.20minutes.fr/elections/resultats/recherche",
5115
5200
  "?searchValue=",
5116
5201
  "text",
5117
5202
  "text"
5118
- ), Ut(), tt(), ss(), qt(), kt(), ae(), J(), be(), Se(), oe(), Zt(), es(), qi(), Ni();
5203
+ ), Yt(), nt(), rs(), Ht(), Wt(), de(), it(), Ae(), Ee(), le(), Nt(), ns(), Hi(), Vi();
5119
5204
  };
5120
5205
  export {
5121
- gs as initScripts
5206
+ xs as initScripts
5122
5207
  };