@20minutes/hela 2.26.5 → 2.26.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/scripts/subMenuCards.d.ts +1 -0
- package/dist/components/atoms/Divider/Divider.d.ts +1 -1
- package/dist/components/atoms/InfoButton/InfoButton.d.ts +2 -1
- package/dist/components/atoms/index.d.ts +0 -1
- package/dist/components/molecules/Article/Media/Media.d.ts +1 -0
- package/dist/components/molecules/Astro/AstroTopicCard/AstroTopicCard.d.ts +1 -0
- package/dist/components/molecules/Card/Templates/CardMost/CardMost.d.ts +2 -1
- package/dist/components/molecules/Card/Templates/CardWithButton/CardWithButton.d.ts +2 -2
- package/dist/components/molecules/Card/Templates/CardWithSummary/CardWithSummary.d.ts +2 -1
- package/dist/components/molecules/index.d.ts +0 -1
- package/dist/components/organisms/MostWatchVideos/MostWatchVideos.d.ts +0 -3
- package/dist/components/{molecules → organisms}/SubMenu/SubMenu.d.ts +2 -2
- package/dist/components/organisms/SubMenu/SubMenuCards.d.ts +9 -0
- package/dist/components/organisms/SubMenu/index.d.ts +2 -0
- package/dist/components/organisms/ThreeColumnsArticles/ThreeColumnsArticles.d.ts +1 -1
- package/dist/components/organisms/index.d.ts +1 -0
- package/dist/index.es.js +1664 -1605
- package/dist/index.umd.cjs +1 -1
- package/dist/js/scripts.es.js +429 -385
- package/dist/js/scripts.umd.cjs +1 -1
- package/dist/scss/abstracts/variables/_token-variables.scss +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/atoms/DividerSection/DividerSection.d.ts +0 -4
- package/dist/components/atoms/DividerSection/index.d.ts +0 -1
- package/dist/components/molecules/SubMenu/index.d.ts +0 -1
package/dist/js/scripts.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
const
|
|
1
|
+
const ce = () => /Android/i.test(navigator.userAgent), de = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), he = () => {
|
|
2
2
|
const s = document.getElementById("js-download-band");
|
|
3
|
-
s &&
|
|
3
|
+
s && ce() && s.setAttribute(
|
|
4
4
|
"href",
|
|
5
5
|
"https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome"
|
|
6
6
|
);
|
|
7
|
-
},
|
|
7
|
+
}, ue = () => {
|
|
8
8
|
const s = document.getElementById("js-election-selector");
|
|
9
9
|
s instanceof HTMLSelectElement && s.addEventListener("change", (t) => {
|
|
10
10
|
window.location.replace(t.target.value);
|
|
11
11
|
});
|
|
12
|
-
},
|
|
12
|
+
}, pe = () => {
|
|
13
13
|
const s = document.querySelector(".c-search-banner");
|
|
14
14
|
if (!s)
|
|
15
15
|
return;
|
|
@@ -24,7 +24,51 @@ const ae = () => /Android/i.test(navigator.userAgent), le = 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
|
-
},
|
|
27
|
+
}, nt = /* @__PURE__ */ new Map(), me = (s) => {
|
|
28
|
+
const t = nt.get(s);
|
|
29
|
+
if (t)
|
|
30
|
+
return t;
|
|
31
|
+
const e = fetch(s, {
|
|
32
|
+
credentials: "same-origin"
|
|
33
|
+
}).then((i) => {
|
|
34
|
+
if (!i.ok)
|
|
35
|
+
throw new Error(`Unable to load submenu cards: ${i.status}`);
|
|
36
|
+
return i.text();
|
|
37
|
+
});
|
|
38
|
+
return nt.set(s, e), e.catch(() => {
|
|
39
|
+
nt.delete(s);
|
|
40
|
+
}), e;
|
|
41
|
+
}, fe = (s) => s.matches(":hover") || s.matches(":focus-within"), vt = async (s) => {
|
|
42
|
+
if (!(s instanceof Element))
|
|
43
|
+
return;
|
|
44
|
+
const t = s.closest(".c-header__link-and-submenu-container");
|
|
45
|
+
if (!(t instanceof HTMLElement))
|
|
46
|
+
return;
|
|
47
|
+
const e = t.querySelector(".js-sub-menu-cards-slot");
|
|
48
|
+
if (!(e instanceof HTMLElement))
|
|
49
|
+
return;
|
|
50
|
+
const i = e.dataset.cardsUrl;
|
|
51
|
+
if (!(!i || e.dataset.loaded === "true" || e.dataset.loading === "true")) {
|
|
52
|
+
e.dataset.loading = "true";
|
|
53
|
+
try {
|
|
54
|
+
const n = await me(i);
|
|
55
|
+
if (!fe(t) || e.dataset.loaded === "true")
|
|
56
|
+
return;
|
|
57
|
+
e.insertAdjacentHTML("beforeend", n), e.dataset.loaded = "true";
|
|
58
|
+
} catch (n) {
|
|
59
|
+
console.error(n);
|
|
60
|
+
} finally {
|
|
61
|
+
delete e.dataset.loading;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}, ge = () => {
|
|
65
|
+
const s = document.querySelector(".c-header__links-container");
|
|
66
|
+
s instanceof HTMLElement && (s.addEventListener("pointerover", (t) => {
|
|
67
|
+
vt(t.target);
|
|
68
|
+
}), s.addEventListener("focusin", (t) => {
|
|
69
|
+
vt(t.target);
|
|
70
|
+
}));
|
|
71
|
+
}, ve = [
|
|
28
72
|
{
|
|
29
73
|
text: "Paris",
|
|
30
74
|
_index: "town_1717424751904",
|
|
@@ -55,7 +99,7 @@ const ae = () => /Android/i.test(navigator.userAgent), le = typeof window < "u"
|
|
|
55
99
|
url: "/elections/resultats/paris/paris-75011"
|
|
56
100
|
}
|
|
57
101
|
}
|
|
58
|
-
],
|
|
102
|
+
], ye = (s, t, e, i, n, o) => {
|
|
59
103
|
const r = document.getElementById(s);
|
|
60
104
|
if (!r)
|
|
61
105
|
return;
|
|
@@ -64,7 +108,7 @@ const ae = () => /Android/i.test(navigator.userAgent), le = typeof window < "u"
|
|
|
64
108
|
return;
|
|
65
109
|
const h = r.querySelector(".c-autocomplete__input-spinner"), u = l.getAttribute("data-trigger-message"), f = async (g) => {
|
|
66
110
|
try {
|
|
67
|
-
const _ = a && t.includes("20minutes.fr") ?
|
|
111
|
+
const _ = a && t.includes("20minutes.fr") ? ve : await fetch(`${c}${e}${encodeURIComponent(g)}`).then(
|
|
68
112
|
(F) => F.json()
|
|
69
113
|
), E = o && typeof _ == "object" && _ !== null ? _[o] : _;
|
|
70
114
|
return Array.isArray(E) ? E : [];
|
|
@@ -99,83 +143,83 @@ const ae = () => /Android/i.test(navigator.userAgent), le = typeof window < "u"
|
|
|
99
143
|
d.childElementCount > 0 && d.classList.remove("u-hidden");
|
|
100
144
|
});
|
|
101
145
|
};
|
|
102
|
-
var
|
|
103
|
-
const
|
|
104
|
-
let
|
|
105
|
-
const
|
|
106
|
-
const t = s.getAttribute(
|
|
146
|
+
var ut = /* @__PURE__ */ ((s) => (s.MOBILE = "mobile", s.DESKTOP = "desktop", s))(ut || {});
|
|
147
|
+
const pt = ".js-bottom-sheet", Zt = `${pt}:not([aria-hidden='true'])`, _e = ".c-bottom-sheet__panel", qt = ".c-bottom-sheet__handle", Ht = `${qt}[data-a11y-dialog-hide]`, we = "[data-a11y-dialog-show]", be = "data-bottom-sheet-anchor", Se = 75, Nt = "c-bottom-sheet--dragging";
|
|
148
|
+
let yt = !1, U = null, R = null, mt = 0, K = 0;
|
|
149
|
+
const Wt = (s) => {
|
|
150
|
+
const t = s.getAttribute(be), e = t ? document.querySelector(t) : null;
|
|
107
151
|
if (!e)
|
|
108
152
|
return;
|
|
109
153
|
const i = Math.max(0, window.innerHeight - e.getBoundingClientRect().top);
|
|
110
154
|
s.style.setProperty("--modal-bottom-offset", `${i}px`);
|
|
111
|
-
},
|
|
112
|
-
document.querySelectorAll(
|
|
113
|
-
s instanceof HTMLElement &&
|
|
155
|
+
}, Le = () => {
|
|
156
|
+
document.querySelectorAll(Zt).forEach((s) => {
|
|
157
|
+
s instanceof HTMLElement && Wt(s);
|
|
114
158
|
});
|
|
115
|
-
},
|
|
116
|
-
U?.classList.remove(
|
|
117
|
-
},
|
|
159
|
+
}, Vt = () => {
|
|
160
|
+
U?.classList.remove(Nt), R && (R.style.transform = ""), U = null, R = null, mt = 0, K = 0;
|
|
161
|
+
}, Ee = (s) => {
|
|
118
162
|
const t = s.target;
|
|
119
163
|
if (!(t instanceof HTMLElement))
|
|
120
164
|
return;
|
|
121
|
-
const e = t.closest(
|
|
165
|
+
const e = t.closest(pt);
|
|
122
166
|
if (!(e instanceof HTMLElement) || e.getAttribute("aria-hidden") === "true")
|
|
123
167
|
return;
|
|
124
|
-
const i = e.querySelector(
|
|
125
|
-
i instanceof HTMLElement && (!t.closest(
|
|
126
|
-
},
|
|
127
|
-
R && (K = Math.max(0, s.touches[0].clientY -
|
|
168
|
+
const i = e.querySelector(_e);
|
|
169
|
+
i instanceof HTMLElement && (!t.closest(qt) && i.scrollTop > 0 || (U = e, R = i, mt = s.touches[0].clientY, K = 0, e.classList.add(Nt)));
|
|
170
|
+
}, Ae = (s) => {
|
|
171
|
+
R && (K = Math.max(0, s.touches[0].clientY - mt), R.style.transform = `translateY(${K}px)`);
|
|
128
172
|
};
|
|
129
|
-
let
|
|
130
|
-
const
|
|
173
|
+
let rt = !1;
|
|
174
|
+
const jt = (s) => {
|
|
131
175
|
const t = s.target;
|
|
132
176
|
if (!(t instanceof Element))
|
|
133
177
|
return null;
|
|
134
|
-
const e = t.closest(
|
|
178
|
+
const e = t.closest(we);
|
|
135
179
|
if (!(e instanceof HTMLElement))
|
|
136
180
|
return null;
|
|
137
181
|
const i = e.getAttribute("data-a11y-dialog-show"), n = i ? document.getElementById(i) : null;
|
|
138
182
|
return !(n instanceof HTMLElement) || n.contains(e) ? null : n;
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
if (!
|
|
183
|
+
}, Ce = (s) => {
|
|
184
|
+
rt = !!jt(s)?.matches(Zt);
|
|
185
|
+
}, xe = (s) => {
|
|
186
|
+
if (!rt)
|
|
143
187
|
return;
|
|
144
|
-
|
|
145
|
-
const t =
|
|
188
|
+
rt = !1;
|
|
189
|
+
const t = jt(s);
|
|
146
190
|
if (!(t instanceof HTMLElement))
|
|
147
191
|
return;
|
|
148
|
-
const e = t.querySelector(
|
|
192
|
+
const e = t.querySelector(Ht);
|
|
149
193
|
e instanceof HTMLElement && e.click();
|
|
150
|
-
},
|
|
194
|
+
}, Te = () => {
|
|
151
195
|
if (U) {
|
|
152
|
-
if (K >
|
|
153
|
-
const s = U.querySelector(
|
|
196
|
+
if (K > Se) {
|
|
197
|
+
const s = U.querySelector(Ht);
|
|
154
198
|
s instanceof HTMLElement && s.click();
|
|
155
199
|
}
|
|
156
|
-
|
|
200
|
+
Vt();
|
|
157
201
|
}
|
|
158
|
-
},
|
|
202
|
+
}, Pe = (s, t) => {
|
|
159
203
|
const e = s.id;
|
|
160
204
|
e && document.querySelectorAll(`[data-a11y-dialog-show="${e}"]`).forEach((i) => {
|
|
161
205
|
!(i instanceof HTMLElement) || s.contains(i) || i.setAttribute("aria-expanded", t ? "true" : "false");
|
|
162
206
|
});
|
|
163
|
-
},
|
|
207
|
+
}, Ie = () => {
|
|
164
208
|
new MutationObserver((t) => {
|
|
165
209
|
t.forEach(({ target: e }) => {
|
|
166
|
-
if (!(e instanceof HTMLElement) || !e.matches(
|
|
210
|
+
if (!(e instanceof HTMLElement) || !e.matches(pt))
|
|
167
211
|
return;
|
|
168
212
|
const i = e.getAttribute("aria-hidden") !== "true";
|
|
169
|
-
i &&
|
|
213
|
+
i && Wt(e), Pe(e, i);
|
|
170
214
|
});
|
|
171
215
|
}).observe(document.body, {
|
|
172
216
|
attributes: !0,
|
|
173
217
|
attributeFilter: ["aria-hidden"],
|
|
174
218
|
subtree: !0
|
|
175
219
|
});
|
|
176
|
-
},
|
|
177
|
-
window.layout ===
|
|
178
|
-
},
|
|
220
|
+
}, Me = () => {
|
|
221
|
+
window.layout === ut.MOBILE && (yt || (document.addEventListener("touchstart", Ee, { passive: !0 }), document.addEventListener("touchmove", Ae, { passive: !0 }), document.addEventListener("touchend", Te), document.addEventListener("touchcancel", Vt), document.addEventListener("mousedown", Ce), document.addEventListener("click", xe), window.addEventListener("resize", Le), Ie(), yt = !0));
|
|
222
|
+
}, Oe = (s) => {
|
|
179
223
|
s.stopImmediatePropagation(), s.preventDefault();
|
|
180
224
|
const t = s.currentTarget;
|
|
181
225
|
if (t instanceof HTMLButtonElement) {
|
|
@@ -184,15 +228,15 @@ const Wt = (s) => {
|
|
|
184
228
|
);
|
|
185
229
|
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"));
|
|
186
230
|
}
|
|
187
|
-
},
|
|
231
|
+
}, ze = (s = document.querySelector(
|
|
188
232
|
".js-collapse__button"
|
|
189
233
|
)) => {
|
|
190
234
|
s && document.querySelectorAll(".c-collapse__button").forEach((e) => {
|
|
191
235
|
e.addEventListener("click", (i) => {
|
|
192
|
-
|
|
236
|
+
Oe(i);
|
|
193
237
|
});
|
|
194
238
|
});
|
|
195
|
-
},
|
|
239
|
+
}, De = "[data-countdown][data-countdown-end-date]", $e = (s) => {
|
|
196
240
|
const t = s.querySelector(".js-countdown-days"), e = s.querySelector(".js-countdown-hours"), i = s.querySelector(".js-countdown-minutes"), n = s.querySelector(".js-countdown-seconds");
|
|
197
241
|
return !t || !e || !i || !n ? null : {
|
|
198
242
|
daysElement: t,
|
|
@@ -200,35 +244,35 @@ const Wt = (s) => {
|
|
|
200
244
|
minutesElement: i,
|
|
201
245
|
secondsElement: n
|
|
202
246
|
};
|
|
203
|
-
},
|
|
247
|
+
}, _t = (s, t) => {
|
|
204
248
|
const e = s - Date.now();
|
|
205
249
|
if (e <= 0)
|
|
206
250
|
return !1;
|
|
207
251
|
const i = Math.floor(e / (1e3 * 60 * 60 * 24)), n = Math.floor(e % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)), o = Math.floor(e % (1e3 * 60 * 60) / (1e3 * 60)), r = Math.floor(e % (1e3 * 60) / 1e3);
|
|
208
252
|
return t.daysElement.textContent = i.toString(), t.hoursElement.textContent = n.toString(), t.minutesElement.textContent = o.toString(), t.secondsElement.textContent = r.toString(), !0;
|
|
209
|
-
},
|
|
210
|
-
document.querySelectorAll(
|
|
211
|
-
const e = t.dataset.countdownEndDate, i = e ? new Date(e).getTime() : Number.NaN, n =
|
|
253
|
+
}, Be = () => {
|
|
254
|
+
document.querySelectorAll(De).forEach((t) => {
|
|
255
|
+
const e = t.dataset.countdownEndDate, i = e ? new Date(e).getTime() : Number.NaN, n = $e(t);
|
|
212
256
|
if (!n)
|
|
213
257
|
return;
|
|
214
258
|
if (Number.isNaN(i)) {
|
|
215
259
|
t.remove();
|
|
216
260
|
return;
|
|
217
261
|
}
|
|
218
|
-
if (!
|
|
262
|
+
if (!_t(i, n)) {
|
|
219
263
|
t.remove();
|
|
220
264
|
return;
|
|
221
265
|
}
|
|
222
266
|
const o = setInterval(() => {
|
|
223
|
-
|
|
267
|
+
_t(i, n) || (clearInterval(o), t.remove());
|
|
224
268
|
}, 1e3);
|
|
225
269
|
});
|
|
226
|
-
},
|
|
270
|
+
}, Re = (s) => {
|
|
227
271
|
const t = s.getBBox(), e = t.width / 20;
|
|
228
272
|
return [t.x - e, t.y - e, t.width + e * 2, t.height + e * 2].join(
|
|
229
273
|
" "
|
|
230
274
|
);
|
|
231
|
-
},
|
|
275
|
+
}, Fe = () => {
|
|
232
276
|
const s = document.querySelector(".c-map-districts-container"), t = document.querySelector(".c-map-districts");
|
|
233
277
|
if (!s || !t)
|
|
234
278
|
return;
|
|
@@ -279,7 +323,7 @@ const Wt = (s) => {
|
|
|
279
323
|
);
|
|
280
324
|
d(
|
|
281
325
|
y || p,
|
|
282
|
-
|
|
326
|
+
Re(y || p)
|
|
283
327
|
);
|
|
284
328
|
}
|
|
285
329
|
}, u = () => {
|
|
@@ -288,7 +332,7 @@ const Wt = (s) => {
|
|
|
288
332
|
t.addEventListener("click", u), n && n.addEventListener("click", u), document.querySelectorAll(".c-map-districts__zoomable").forEach((m) => {
|
|
289
333
|
m.addEventListener("click", (p) => h(p));
|
|
290
334
|
});
|
|
291
|
-
},
|
|
335
|
+
}, ke = () => {
|
|
292
336
|
const s = document.getElementById("elections-form-search"), t = document.querySelector(".c-search-form__autocomplete");
|
|
293
337
|
if (!s || !t)
|
|
294
338
|
return;
|
|
@@ -316,59 +360,59 @@ const Wt = (s) => {
|
|
|
316
360
|
}), s.addEventListener("focusin", () => {
|
|
317
361
|
t.childElementCount > 0 && t.classList.remove("u-hidden");
|
|
318
362
|
});
|
|
319
|
-
},
|
|
363
|
+
}, Ze = (s, t) => {
|
|
320
364
|
s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => {
|
|
321
365
|
n.classList.remove(t);
|
|
322
366
|
});
|
|
323
367
|
const i = s.querySelector(".js-ellipsis-button__label");
|
|
324
368
|
i instanceof HTMLSpanElement && (i.innerHTML = "Voir moins");
|
|
325
|
-
},
|
|
369
|
+
}, qe = (s, t) => {
|
|
326
370
|
s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => {
|
|
327
371
|
n.classList.add(t);
|
|
328
372
|
}), s.setAttribute("aria-expanded", "false");
|
|
329
373
|
const i = s.querySelector(".js-ellipsis-button__label");
|
|
330
374
|
i instanceof HTMLSpanElement && (i.innerHTML = "Voir plus");
|
|
331
|
-
},
|
|
375
|
+
}, He = (s, t) => {
|
|
332
376
|
const e = s.currentTarget;
|
|
333
377
|
if (s.preventDefault(), e instanceof HTMLButtonElement) {
|
|
334
378
|
const i = t ? "u-ellipsis-multiline" : "u-ellipsis";
|
|
335
|
-
return e.getAttribute("aria-expanded") === "true" ?
|
|
379
|
+
return e.getAttribute("aria-expanded") === "true" ? qe(e, i) : Ze(e, i);
|
|
336
380
|
}
|
|
337
381
|
return null;
|
|
338
|
-
},
|
|
382
|
+
}, Ne = (s = document.querySelector(
|
|
339
383
|
".js-ellipsis-button"
|
|
340
384
|
)) => {
|
|
341
385
|
s && document.querySelectorAll(".js-ellipsis-button").forEach((e) => {
|
|
342
386
|
const i = e.getAttribute("data-multiple") === "true";
|
|
343
|
-
e.addEventListener("click", (n) =>
|
|
387
|
+
e.addEventListener("click", (n) => He(n, i));
|
|
344
388
|
});
|
|
345
|
-
},
|
|
389
|
+
}, We = (s) => {
|
|
346
390
|
s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => {
|
|
347
391
|
i.setAttribute("aria-hidden", "false");
|
|
348
392
|
});
|
|
349
393
|
const e = s.querySelector(".js-expand-button__label");
|
|
350
394
|
e instanceof HTMLSpanElement && (e.innerHTML = "Voir moins");
|
|
351
|
-
},
|
|
395
|
+
}, Ve = (s) => {
|
|
352
396
|
s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => {
|
|
353
397
|
i.setAttribute("aria-hidden", "true");
|
|
354
398
|
}), s.setAttribute("aria-expanded", "false");
|
|
355
399
|
const e = s.querySelector(".js-expand-button__label");
|
|
356
400
|
e instanceof HTMLSpanElement && (e.innerHTML = "Voir plus");
|
|
357
|
-
},
|
|
401
|
+
}, je = (s) => {
|
|
358
402
|
const t = s.currentTarget;
|
|
359
|
-
return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ?
|
|
360
|
-
},
|
|
403
|
+
return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? Ve(t) : We(t) : null;
|
|
404
|
+
}, Ge = (s) => {
|
|
361
405
|
const t = s.parentNode?.querySelector(".js-expand-target");
|
|
362
406
|
return !t || t.classList.contains("c-elections-result__members") ? !1 : (t.textContent?.trim().length ?? 0) < 255;
|
|
363
|
-
},
|
|
407
|
+
}, Ue = (s = document.querySelector(
|
|
364
408
|
".js-expand-button"
|
|
365
409
|
)) => {
|
|
366
410
|
s && document.querySelectorAll(".js-expand-button").forEach((e) => {
|
|
367
|
-
|
|
411
|
+
Ge(e) ? (e.style.display = "none", e.parentNode?.querySelectorAll(".js-expand-target")?.forEach((n) => {
|
|
368
412
|
n.setAttribute("aria-hidden", "false");
|
|
369
|
-
})) : e.addEventListener("click",
|
|
413
|
+
})) : e.addEventListener("click", je);
|
|
370
414
|
});
|
|
371
|
-
},
|
|
415
|
+
}, Gt = (s, t) => {
|
|
372
416
|
const e = document.querySelector(".js-content-header"), i = document.querySelector(t), n = document.querySelector(s), o = document.querySelector(".c-header-mobile"), r = o instanceof HTMLElement ? o.offsetHeight : 0;
|
|
373
417
|
if (e && i && n) {
|
|
374
418
|
const a = new IntersectionObserver(
|
|
@@ -382,10 +426,10 @@ const Wt = (s) => {
|
|
|
382
426
|
);
|
|
383
427
|
a.observe(e), a.observe(i);
|
|
384
428
|
}
|
|
385
|
-
},
|
|
429
|
+
}, Ke = () => Gt(".js-close-article-btn", ".js-limit-scroll-close-article-btn"), Xe = () => Gt(".js-chatbot-btn", ".js-limit-scroll-chatbot-btn"), Ye = () => {
|
|
386
430
|
const s = document.querySelector(".js-game-alert");
|
|
387
|
-
|
|
388
|
-
},
|
|
431
|
+
de && s && s.classList.remove("u-hidden");
|
|
432
|
+
}, Je = () => {
|
|
389
433
|
const s = document.querySelectorAll(".js-half-donut-result");
|
|
390
434
|
for (const t of Array.from(s)) {
|
|
391
435
|
const e = t.querySelector(".c-half-donut"), i = t.querySelector(".c-legend");
|
|
@@ -404,7 +448,7 @@ const Wt = (s) => {
|
|
|
404
448
|
});
|
|
405
449
|
});
|
|
406
450
|
}
|
|
407
|
-
},
|
|
451
|
+
}, Qe = () => {
|
|
408
452
|
const s = document.querySelector(".c-image-slider__container");
|
|
409
453
|
if (!s)
|
|
410
454
|
return () => {
|
|
@@ -468,18 +512,18 @@ const Wt = (s) => {
|
|
|
468
512
|
}), c(!0), h(), () => {
|
|
469
513
|
u();
|
|
470
514
|
};
|
|
471
|
-
},
|
|
515
|
+
}, ti = (s) => {
|
|
472
516
|
const t = s.currentTarget, e = t instanceof HTMLElement ? t.nextElementSibling : null;
|
|
473
517
|
!(t instanceof HTMLButtonElement) || !(e instanceof HTMLElement) || (s.stopImmediatePropagation(), s.preventDefault(), 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")));
|
|
474
|
-
},
|
|
518
|
+
}, wt = /* @__PURE__ */ new WeakSet(), Ut = () => {
|
|
475
519
|
if (typeof document > "u")
|
|
476
520
|
return;
|
|
477
521
|
document.querySelectorAll(".js-info-button").forEach((t) => {
|
|
478
|
-
!(t instanceof HTMLButtonElement) ||
|
|
522
|
+
!(t instanceof HTMLButtonElement) || wt.has(t) || (wt.add(t), t.addEventListener("click", ti));
|
|
479
523
|
});
|
|
480
524
|
};
|
|
481
525
|
if (typeof document < "u") {
|
|
482
|
-
const s = () =>
|
|
526
|
+
const s = () => Ut();
|
|
483
527
|
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", s, { once: !0 }) : s();
|
|
484
528
|
}
|
|
485
529
|
const v = {
|
|
@@ -487,7 +531,7 @@ const v = {
|
|
|
487
531
|
negTabIndex: ':not([tabindex^="-"])',
|
|
488
532
|
disabled: ":not(:disabled)"
|
|
489
533
|
};
|
|
490
|
-
var
|
|
534
|
+
var ei = [
|
|
491
535
|
`a[href]${v.inert}${v.negTabIndex}`,
|
|
492
536
|
`area[href]${v.inert}${v.negTabIndex}`,
|
|
493
537
|
`input:not([type="hidden"]):not([type="radio"])${v.inert}${v.negTabIndex}${v.disabled}`,
|
|
@@ -505,24 +549,24 @@ var Xe = [
|
|
|
505
549
|
`[contenteditable]${v.inert}${v.negTabIndex}`,
|
|
506
550
|
`[tabindex]${v.inert}${v.negTabIndex}`
|
|
507
551
|
];
|
|
508
|
-
function
|
|
552
|
+
function bt(s) {
|
|
509
553
|
(s.querySelector("[autofocus]") || s).focus();
|
|
510
554
|
}
|
|
511
|
-
function
|
|
555
|
+
function ii(s) {
|
|
512
556
|
const t = V(s, !0), e = t ? V(s, !1) || t : null;
|
|
513
557
|
return [t, e];
|
|
514
558
|
}
|
|
515
559
|
function V(s, t) {
|
|
516
|
-
if (t &&
|
|
560
|
+
if (t && Et(s))
|
|
517
561
|
return s;
|
|
518
|
-
if (
|
|
562
|
+
if (ni(s))
|
|
519
563
|
if (s.shadowRoot) {
|
|
520
|
-
let e =
|
|
564
|
+
let e = St(s.shadowRoot, t);
|
|
521
565
|
for (; e; ) {
|
|
522
566
|
const i = V(e, t);
|
|
523
567
|
if (i)
|
|
524
568
|
return i;
|
|
525
|
-
e =
|
|
569
|
+
e = Lt(e, t);
|
|
526
570
|
}
|
|
527
571
|
} else if (s.localName === "slot") {
|
|
528
572
|
const e = s.assignedElements({
|
|
@@ -535,32 +579,32 @@ function V(s, t) {
|
|
|
535
579
|
return n;
|
|
536
580
|
}
|
|
537
581
|
} else {
|
|
538
|
-
let e =
|
|
582
|
+
let e = St(s, t);
|
|
539
583
|
for (; e; ) {
|
|
540
584
|
const i = V(e, t);
|
|
541
585
|
if (i)
|
|
542
586
|
return i;
|
|
543
|
-
e =
|
|
587
|
+
e = Lt(e, t);
|
|
544
588
|
}
|
|
545
589
|
}
|
|
546
|
-
return !t &&
|
|
590
|
+
return !t && Et(s) ? s : null;
|
|
547
591
|
}
|
|
548
|
-
function
|
|
592
|
+
function St(s, t) {
|
|
549
593
|
return t ? s.firstElementChild : s.lastElementChild;
|
|
550
594
|
}
|
|
551
|
-
function
|
|
595
|
+
function Lt(s, t) {
|
|
552
596
|
return t ? s.nextElementSibling : s.previousElementSibling;
|
|
553
597
|
}
|
|
554
|
-
const
|
|
555
|
-
function
|
|
598
|
+
const si = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), Et = (s) => s.shadowRoot?.delegatesFocus ? !1 : s.matches(ei.join(",")) && !si(s);
|
|
599
|
+
function ni(s) {
|
|
556
600
|
return s.shadowRoot && s.getAttribute("tabindex") === "-1" ? !1 : !s.matches(":disabled,[hidden],[inert]");
|
|
557
601
|
}
|
|
558
602
|
function j(s = document) {
|
|
559
603
|
const t = s.activeElement;
|
|
560
604
|
return t ? t.shadowRoot ? j(t.shadowRoot) || document.activeElement : t : null;
|
|
561
605
|
}
|
|
562
|
-
function
|
|
563
|
-
const [e, i] =
|
|
606
|
+
function oi(s, t) {
|
|
607
|
+
const [e, i] = ii(s);
|
|
564
608
|
if (!e)
|
|
565
609
|
return t.preventDefault();
|
|
566
610
|
const n = j();
|
|
@@ -570,16 +614,16 @@ function B(s, t) {
|
|
|
570
614
|
function e(i) {
|
|
571
615
|
if (!i || i === document || i === window)
|
|
572
616
|
return null;
|
|
573
|
-
const n =
|
|
617
|
+
const n = Kt(i);
|
|
574
618
|
return n && (i = n), i.closest(s) || e(i.getRootNode().host);
|
|
575
619
|
}
|
|
576
620
|
return e(t);
|
|
577
621
|
}
|
|
578
|
-
function
|
|
579
|
-
return s.assignedSlot || (s.parentNode ?
|
|
622
|
+
function Kt(s) {
|
|
623
|
+
return s.assignedSlot || (s.parentNode ? Kt(s.parentNode) : null);
|
|
580
624
|
}
|
|
581
625
|
const Z = "data-a11y-dialog";
|
|
582
|
-
class
|
|
626
|
+
class Xt {
|
|
583
627
|
$el;
|
|
584
628
|
id;
|
|
585
629
|
previouslyFocused;
|
|
@@ -628,7 +672,7 @@ class Ut {
|
|
|
628
672
|
* Returns the instance to allow method chaining.
|
|
629
673
|
*/
|
|
630
674
|
show(t) {
|
|
631
|
-
return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = j(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() :
|
|
675
|
+
return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = j(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() : bt(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
|
|
632
676
|
}
|
|
633
677
|
/**
|
|
634
678
|
* Hide the dialog.
|
|
@@ -691,7 +735,7 @@ class Ut {
|
|
|
691
735
|
e = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
|
|
692
736
|
} catch {
|
|
693
737
|
}
|
|
694
|
-
t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" &&
|
|
738
|
+
t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && oi(this.$el, t);
|
|
695
739
|
}
|
|
696
740
|
/**
|
|
697
741
|
* If the dialog is shown and the focus is not within a dialog element (either
|
|
@@ -701,18 +745,18 @@ class Ut {
|
|
|
701
745
|
*/
|
|
702
746
|
maintainFocus() {
|
|
703
747
|
const t = j();
|
|
704
|
-
B(`[aria-modal="true"], [${Z}-ignore-focus-trap]`, t) ||
|
|
748
|
+
B(`[aria-modal="true"], [${Z}-ignore-focus-trap]`, t) || bt(this.$el);
|
|
705
749
|
}
|
|
706
750
|
}
|
|
707
|
-
function
|
|
751
|
+
function At() {
|
|
708
752
|
for (const s of document.querySelectorAll("[data-a11y-dialog]"))
|
|
709
|
-
new
|
|
753
|
+
new Xt(s);
|
|
710
754
|
}
|
|
711
|
-
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded",
|
|
712
|
-
const
|
|
755
|
+
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", At) : At());
|
|
756
|
+
const ri = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
713
757
|
if (!(s instanceof HTMLElement))
|
|
714
758
|
return;
|
|
715
|
-
const t = new
|
|
759
|
+
const t = new Xt(s);
|
|
716
760
|
if (s.id === "dialog-menu") {
|
|
717
761
|
const e = document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"), i = document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");
|
|
718
762
|
e.length > 0 && i.length > 0 && (t.on("show", () => {
|
|
@@ -734,27 +778,27 @@ const ei = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
734
778
|
}).on("hide", () => {
|
|
735
779
|
document.body.classList.remove("noscroll");
|
|
736
780
|
});
|
|
737
|
-
}), et = "50px",
|
|
781
|
+
}), et = "50px", ft = ({
|
|
738
782
|
navigationContainer: s,
|
|
739
783
|
navigatedList: t,
|
|
740
784
|
nextBtn: e,
|
|
741
785
|
prevBtn: i
|
|
742
786
|
}) => {
|
|
743
787
|
e.classList.contains("o-nav-button--visible") && !i.classList.contains("o-nav-button--visible") && (s.style.paddingRight = et, s.style.paddingLeft = ""), i.classList.contains("o-nav-button--visible") && (s.style.paddingLeft = et, e.classList.contains("o-nav-button--visible") && (s.style.paddingRight = et), 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 = "");
|
|
744
|
-
},
|
|
788
|
+
}, ai = ({
|
|
745
789
|
navigationContainer: s,
|
|
746
790
|
navigatedList: t,
|
|
747
791
|
nextBtn: e,
|
|
748
792
|
prevBtn: i
|
|
749
793
|
}) => {
|
|
750
794
|
const n = t.scrollLeft > 0, o = t.scrollLeft + (t.clientWidth + 0.5) < t.scrollWidth;
|
|
751
|
-
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") &&
|
|
795
|
+
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") && ft({
|
|
752
796
|
navigationContainer: s,
|
|
753
797
|
navigatedList: t,
|
|
754
798
|
nextBtn: e,
|
|
755
799
|
prevBtn: i
|
|
756
800
|
});
|
|
757
|
-
},
|
|
801
|
+
}, li = ({
|
|
758
802
|
navigationContainer: s,
|
|
759
803
|
navigatedList: t,
|
|
760
804
|
nextBtn: e,
|
|
@@ -799,14 +843,14 @@ const ei = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
799
843
|
behavior: "smooth"
|
|
800
844
|
}), e.classList.remove("o-nav-button--visible"), i.classList.add("o-nav-button--visible");
|
|
801
845
|
}
|
|
802
|
-
e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") &&
|
|
846
|
+
e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && ft({
|
|
803
847
|
navigationContainer: s,
|
|
804
848
|
navigatedList: t,
|
|
805
849
|
nextBtn: e,
|
|
806
850
|
prevBtn: i
|
|
807
851
|
});
|
|
808
852
|
}
|
|
809
|
-
},
|
|
853
|
+
}, ci = ({
|
|
810
854
|
navigationContainer: s,
|
|
811
855
|
navigatedList: t,
|
|
812
856
|
nextBtn: e,
|
|
@@ -847,26 +891,26 @@ const ei = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
847
891
|
left: 0,
|
|
848
892
|
behavior: "smooth"
|
|
849
893
|
}), i.classList.remove("o-nav-button--visible"), t.clientWidth < t.scrollWidth && e.classList.add("o-nav-button--visible");
|
|
850
|
-
e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") &&
|
|
894
|
+
e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && ft({
|
|
851
895
|
navigationContainer: s,
|
|
852
896
|
navigatedList: t,
|
|
853
897
|
nextBtn: e,
|
|
854
898
|
prevBtn: i
|
|
855
899
|
});
|
|
856
900
|
}
|
|
857
|
-
},
|
|
901
|
+
}, di = ({
|
|
858
902
|
navigationContainer: s,
|
|
859
903
|
navigatedList: t,
|
|
860
904
|
nextBtn: e,
|
|
861
905
|
prevBtn: i
|
|
862
906
|
}) => {
|
|
863
|
-
|
|
907
|
+
ai({
|
|
864
908
|
navigationContainer: s,
|
|
865
909
|
navigatedList: t,
|
|
866
910
|
nextBtn: e,
|
|
867
911
|
prevBtn: i
|
|
868
912
|
});
|
|
869
|
-
},
|
|
913
|
+
}, hi = (s) => {
|
|
870
914
|
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(
|
|
871
915
|
".js-navigation-container__list"
|
|
872
916
|
), c = s.querySelector(".o-nav-button--next-button"), d = s.querySelector(
|
|
@@ -874,7 +918,7 @@ const ei = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
874
918
|
);
|
|
875
919
|
if (!(!l || !c || !d) && (l.clientWidth < l.scrollWidth && (c.classList.add("o-nav-button--visible"), c.classList.contains("c-slider__button-container--has-space-around") && (s.style.paddingRight = et)), c.addEventListener(
|
|
876
920
|
"click",
|
|
877
|
-
|
|
921
|
+
li.bind(!1, {
|
|
878
922
|
navigationContainer: s,
|
|
879
923
|
navigatedList: l,
|
|
880
924
|
nextBtn: c,
|
|
@@ -883,7 +927,7 @@ const ei = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
883
927
|
})
|
|
884
928
|
), d.addEventListener(
|
|
885
929
|
"click",
|
|
886
|
-
|
|
930
|
+
ci.bind(!1, {
|
|
887
931
|
navigationContainer: s,
|
|
888
932
|
navigatedList: l,
|
|
889
933
|
nextBtn: c,
|
|
@@ -907,7 +951,7 @@ const ei = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
907
951
|
}, 0)), d.click());
|
|
908
952
|
}, n);
|
|
909
953
|
}
|
|
910
|
-
},
|
|
954
|
+
}, ui = () => {
|
|
911
955
|
const s = document.querySelectorAll(".js-navigation-container");
|
|
912
956
|
Array.from(s).forEach((t) => {
|
|
913
957
|
const e = t.querySelector(
|
|
@@ -917,13 +961,13 @@ const ei = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
917
961
|
const i = new ResizeObserver((n) => {
|
|
918
962
|
n.forEach((o) => {
|
|
919
963
|
const { width: r } = o.contentRect;
|
|
920
|
-
r > 0 && (
|
|
964
|
+
r > 0 && (hi(t), i.disconnect());
|
|
921
965
|
});
|
|
922
966
|
});
|
|
923
967
|
i.observe(e);
|
|
924
968
|
}
|
|
925
969
|
});
|
|
926
|
-
},
|
|
970
|
+
}, pi = () => {
|
|
927
971
|
const s = document.querySelectorAll(".js-navigation-container");
|
|
928
972
|
for (const t of Array.from(s))
|
|
929
973
|
if (t) {
|
|
@@ -936,7 +980,7 @@ const ei = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
936
980
|
);
|
|
937
981
|
e && i && n && window.addEventListener(
|
|
938
982
|
"resize",
|
|
939
|
-
|
|
983
|
+
di.bind(!1, {
|
|
940
984
|
navigationContainer: t,
|
|
941
985
|
navigatedList: e,
|
|
942
986
|
nextBtn: i,
|
|
@@ -952,10 +996,10 @@ function x(s, t, e) {
|
|
|
952
996
|
function S(s, t) {
|
|
953
997
|
return s.x = t.x, s.y = t.y, t.id !== void 0 && (s.id = t.id), s;
|
|
954
998
|
}
|
|
955
|
-
function
|
|
999
|
+
function Yt(s) {
|
|
956
1000
|
s.x = Math.round(s.x), s.y = Math.round(s.y);
|
|
957
1001
|
}
|
|
958
|
-
function
|
|
1002
|
+
function at(s, t) {
|
|
959
1003
|
const e = Math.abs(s.x - t.x), i = Math.abs(s.y - t.y);
|
|
960
1004
|
return Math.sqrt(e * e + i * i);
|
|
961
1005
|
}
|
|
@@ -972,17 +1016,17 @@ function X(s, t, e) {
|
|
|
972
1016
|
function D(s, t, e, i) {
|
|
973
1017
|
s.style.transform = X(t, e, i);
|
|
974
1018
|
}
|
|
975
|
-
const
|
|
976
|
-
function
|
|
977
|
-
s.style.transition = t ? `${t} ${e}ms ${i ||
|
|
1019
|
+
const mi = "cubic-bezier(.4,0,.22,1)";
|
|
1020
|
+
function Jt(s, t, e, i) {
|
|
1021
|
+
s.style.transition = t ? `${t} ${e}ms ${i || mi}` : "none";
|
|
978
1022
|
}
|
|
979
|
-
function
|
|
1023
|
+
function lt(s, t, e) {
|
|
980
1024
|
s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
|
|
981
1025
|
}
|
|
982
|
-
function
|
|
983
|
-
|
|
1026
|
+
function fi(s) {
|
|
1027
|
+
Jt(s);
|
|
984
1028
|
}
|
|
985
|
-
function
|
|
1029
|
+
function gi(s) {
|
|
986
1030
|
return "decode" in s ? s.decode().catch(() => {
|
|
987
1031
|
}) : s.complete ? Promise.resolve(s) : new Promise((t, e) => {
|
|
988
1032
|
s.onload = () => t(s), s.onerror = e;
|
|
@@ -994,10 +1038,10 @@ const T = {
|
|
|
994
1038
|
LOADED: "loaded",
|
|
995
1039
|
ERROR: "error"
|
|
996
1040
|
};
|
|
997
|
-
function
|
|
1041
|
+
function vi(s) {
|
|
998
1042
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
999
1043
|
}
|
|
1000
|
-
function
|
|
1044
|
+
function yi(s, t, e = document) {
|
|
1001
1045
|
let i = [];
|
|
1002
1046
|
if (s instanceof Element)
|
|
1003
1047
|
i = [s];
|
|
@@ -1009,19 +1053,19 @@ function pi(s, t, e = document) {
|
|
|
1009
1053
|
}
|
|
1010
1054
|
return i;
|
|
1011
1055
|
}
|
|
1012
|
-
function
|
|
1056
|
+
function Ct() {
|
|
1013
1057
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
1014
1058
|
}
|
|
1015
|
-
let
|
|
1059
|
+
let Qt = !1;
|
|
1016
1060
|
try {
|
|
1017
1061
|
window.addEventListener("test", null, Object.defineProperty({}, "passive", {
|
|
1018
1062
|
get: () => {
|
|
1019
|
-
|
|
1063
|
+
Qt = !0;
|
|
1020
1064
|
}
|
|
1021
1065
|
}));
|
|
1022
1066
|
} catch {
|
|
1023
1067
|
}
|
|
1024
|
-
class
|
|
1068
|
+
class _i {
|
|
1025
1069
|
constructor() {
|
|
1026
1070
|
this._pool = [];
|
|
1027
1071
|
}
|
|
@@ -1078,7 +1122,7 @@ class mi {
|
|
|
1078
1122
|
listener: i,
|
|
1079
1123
|
passive: n
|
|
1080
1124
|
}));
|
|
1081
|
-
const d =
|
|
1125
|
+
const d = Qt ? {
|
|
1082
1126
|
passive: n || !1
|
|
1083
1127
|
} : !1;
|
|
1084
1128
|
t[a](c, i, d);
|
|
@@ -1086,7 +1130,7 @@ class mi {
|
|
|
1086
1130
|
});
|
|
1087
1131
|
}
|
|
1088
1132
|
}
|
|
1089
|
-
function
|
|
1133
|
+
function te(s, t) {
|
|
1090
1134
|
if (s.getViewportSizeFn) {
|
|
1091
1135
|
const e = s.getViewportSizeFn(s, t);
|
|
1092
1136
|
if (e)
|
|
@@ -1101,7 +1145,7 @@ function Jt(s, t) {
|
|
|
1101
1145
|
y: window.innerHeight
|
|
1102
1146
|
};
|
|
1103
1147
|
}
|
|
1104
|
-
function
|
|
1148
|
+
function H(s, t, e, i, n) {
|
|
1105
1149
|
let o = 0;
|
|
1106
1150
|
if (t.paddingFn)
|
|
1107
1151
|
o = t.paddingFn(e, i, n)[s];
|
|
@@ -1113,13 +1157,13 @@ function N(s, t, e, i, n) {
|
|
|
1113
1157
|
}
|
|
1114
1158
|
return Number(o) || 0;
|
|
1115
1159
|
}
|
|
1116
|
-
function
|
|
1160
|
+
function ee(s, t, e, i) {
|
|
1117
1161
|
return {
|
|
1118
|
-
x: t.x -
|
|
1119
|
-
y: t.y -
|
|
1162
|
+
x: t.x - H("left", s, t, e, i) - H("right", s, t, e, i),
|
|
1163
|
+
y: t.y - H("top", s, t, e, i) - H("bottom", s, t, e, i)
|
|
1120
1164
|
};
|
|
1121
1165
|
}
|
|
1122
|
-
class
|
|
1166
|
+
class wi {
|
|
1123
1167
|
/**
|
|
1124
1168
|
* @param {Slide} slide
|
|
1125
1169
|
*/
|
|
@@ -1156,7 +1200,7 @@ class fi {
|
|
|
1156
1200
|
_updateAxis(t) {
|
|
1157
1201
|
const {
|
|
1158
1202
|
pswp: e
|
|
1159
|
-
} = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o =
|
|
1203
|
+
} = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o = H(t === "x" ? "left" : "top", e.options, e.viewportSize, this.slide.data, this.slide.index), r = this.slide.panAreaSize[t];
|
|
1160
1204
|
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];
|
|
1161
1205
|
}
|
|
1162
1206
|
// _getZeroBounds
|
|
@@ -1174,8 +1218,8 @@ class fi {
|
|
|
1174
1218
|
return Y(e, this.max[t], this.min[t]);
|
|
1175
1219
|
}
|
|
1176
1220
|
}
|
|
1177
|
-
const
|
|
1178
|
-
let
|
|
1221
|
+
const xt = 4e3;
|
|
1222
|
+
let ie = class {
|
|
1179
1223
|
/**
|
|
1180
1224
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
1181
1225
|
* @param {SlideData} itemData Slide data
|
|
@@ -1232,7 +1276,7 @@ let te = class {
|
|
|
1232
1276
|
*/
|
|
1233
1277
|
_getSecondary() {
|
|
1234
1278
|
let t = this._parseZoomLevelOption("secondary");
|
|
1235
|
-
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x >
|
|
1279
|
+
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > xt && (t = xt / this.elementSize.x), t);
|
|
1236
1280
|
}
|
|
1237
1281
|
/**
|
|
1238
1282
|
* Get initial image zoom level.
|
|
@@ -1255,7 +1299,7 @@ let te = class {
|
|
|
1255
1299
|
return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
|
|
1256
1300
|
}
|
|
1257
1301
|
};
|
|
1258
|
-
class
|
|
1302
|
+
class bi {
|
|
1259
1303
|
/**
|
|
1260
1304
|
* @param {SlideData} data
|
|
1261
1305
|
* @param {number} index
|
|
@@ -1268,11 +1312,11 @@ class gi {
|
|
|
1268
1312
|
}, this.pan = {
|
|
1269
1313
|
x: 0,
|
|
1270
1314
|
y: 0
|
|
1271
|
-
}, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new
|
|
1315
|
+
}, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new ie(i.options, t, e, i), this.pswp.dispatch("gettingData", {
|
|
1272
1316
|
slide: this,
|
|
1273
1317
|
data: this.data,
|
|
1274
1318
|
index: e
|
|
1275
|
-
}), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = x("pswp__zoom-wrap", "div"), this.holderElement = null, this.currZoomLevel = 1, this.width = this.content.width, this.height = this.content.height, this.heavyAppended = !1, this.bounds = new
|
|
1319
|
+
}), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = x("pswp__zoom-wrap", "div"), this.holderElement = null, this.currZoomLevel = 1, this.width = this.content.width, this.height = this.content.height, this.heavyAppended = !1, this.bounds = new wi(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
|
|
1276
1320
|
slide: this
|
|
1277
1321
|
});
|
|
1278
1322
|
}
|
|
@@ -1396,7 +1440,7 @@ class gi {
|
|
|
1396
1440
|
transitionDuration: i
|
|
1397
1441
|
}), o.animations.stopAllPan();
|
|
1398
1442
|
const r = this.currZoomLevel;
|
|
1399
|
-
n || (t = Y(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),
|
|
1443
|
+
n || (t = Y(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), Yt(this.pan);
|
|
1400
1444
|
const a = () => {
|
|
1401
1445
|
this._setResolution(t), this.applyCurrentZoomPan();
|
|
1402
1446
|
};
|
|
@@ -1497,7 +1541,7 @@ class gi {
|
|
|
1497
1541
|
const {
|
|
1498
1542
|
pswp: t
|
|
1499
1543
|
} = this;
|
|
1500
|
-
S(this.panAreaSize,
|
|
1544
|
+
S(this.panAreaSize, ee(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
|
|
1501
1545
|
slide: this
|
|
1502
1546
|
});
|
|
1503
1547
|
}
|
|
@@ -1525,11 +1569,11 @@ class gi {
|
|
|
1525
1569
|
t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
|
|
1526
1570
|
}
|
|
1527
1571
|
}
|
|
1528
|
-
const
|
|
1529
|
-
function
|
|
1572
|
+
const Si = 0.35, Li = 0.6, Tt = 0.4, Pt = 0.5;
|
|
1573
|
+
function Ei(s, t) {
|
|
1530
1574
|
return s * t / (1 - t);
|
|
1531
1575
|
}
|
|
1532
|
-
class
|
|
1576
|
+
class Ai {
|
|
1533
1577
|
/**
|
|
1534
1578
|
* @param {Gestures} gestures
|
|
1535
1579
|
*/
|
|
@@ -1555,12 +1599,12 @@ class wi {
|
|
|
1555
1599
|
if (!this.pswp.dispatch("verticalDrag", {
|
|
1556
1600
|
panY: o
|
|
1557
1601
|
}).defaultPrevented) {
|
|
1558
|
-
this._setPanWithFriction("y", o,
|
|
1602
|
+
this._setPanWithFriction("y", o, Li);
|
|
1559
1603
|
const r = 1 - Math.abs(this._getVerticalDragRatio(n.pan.y));
|
|
1560
1604
|
this.pswp.applyBgOpacity(r), n.applyCurrentZoomPan();
|
|
1561
1605
|
}
|
|
1562
1606
|
} else
|
|
1563
|
-
this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (
|
|
1607
|
+
this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (Yt(n.pan), n.applyCurrentZoomPan()));
|
|
1564
1608
|
}
|
|
1565
1609
|
end() {
|
|
1566
1610
|
const {
|
|
@@ -1572,7 +1616,7 @@ class wi {
|
|
|
1572
1616
|
let n = 0;
|
|
1573
1617
|
if (this.pswp.animations.stopAll(), e.isShifted()) {
|
|
1574
1618
|
const r = (e.x - e.getCurrSlideX()) / this.pswp.viewportSize.x;
|
|
1575
|
-
t.x < -
|
|
1619
|
+
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);
|
|
1576
1620
|
}
|
|
1577
1621
|
i && i.currZoomLevel > i.zoomLevels.max || this.gestures.isMultitouch ? this.gestures.zoomLevels.correctZoomPan(!0) : (this._finishPanGestureForAxis("x"), this._finishPanGestureForAxis("y"));
|
|
1578
1622
|
}
|
|
@@ -1591,10 +1635,10 @@ class wi {
|
|
|
1591
1635
|
const {
|
|
1592
1636
|
pan: n,
|
|
1593
1637
|
bounds: o
|
|
1594
|
-
} = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r +
|
|
1638
|
+
} = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + Ei(e[t], 0.995);
|
|
1595
1639
|
if (a) {
|
|
1596
1640
|
const m = this._getVerticalDragRatio(r), p = this._getVerticalDragRatio(c);
|
|
1597
|
-
if (m < 0 && p < -
|
|
1641
|
+
if (m < 0 && p < -Tt || m > 0 && p > Tt) {
|
|
1598
1642
|
this.pswp.close();
|
|
1599
1643
|
return;
|
|
1600
1644
|
}
|
|
@@ -1706,16 +1750,16 @@ class wi {
|
|
|
1706
1750
|
} = n;
|
|
1707
1751
|
if (r.correctPan(t, e) !== e || i) {
|
|
1708
1752
|
const l = Math.round(e - o[t]);
|
|
1709
|
-
o[t] += l * (i ||
|
|
1753
|
+
o[t] += l * (i || Si);
|
|
1710
1754
|
} else
|
|
1711
1755
|
o[t] = e;
|
|
1712
1756
|
}
|
|
1713
1757
|
}
|
|
1714
|
-
const
|
|
1715
|
-
function
|
|
1758
|
+
const Ci = 0.05, xi = 0.15;
|
|
1759
|
+
function It(s, t, e) {
|
|
1716
1760
|
return s.x = (t.x + e.x) / 2, s.y = (t.y + e.y) / 2, s;
|
|
1717
1761
|
}
|
|
1718
|
-
class
|
|
1762
|
+
class Ti {
|
|
1719
1763
|
/**
|
|
1720
1764
|
* @param {Gestures} gestures
|
|
1721
1765
|
*/
|
|
@@ -1752,8 +1796,8 @@ class Li {
|
|
|
1752
1796
|
const a = r.zoomLevels.min, l = r.zoomLevels.max;
|
|
1753
1797
|
if (!r.isZoomable() || o.mainScroll.isShifted())
|
|
1754
1798
|
return;
|
|
1755
|
-
|
|
1756
|
-
let c = 1 /
|
|
1799
|
+
It(this._startZoomPoint, e, n), It(this._zoomPoint, t, i);
|
|
1800
|
+
let c = 1 / at(e, n) * at(t, i) * this._startZoomLevel;
|
|
1757
1801
|
if (c > r.zoomLevels.initial + r.zoomLevels.initial / 15 && (this._wasOverFitZoomLevel = !0), c < a)
|
|
1758
1802
|
if (o.options.pinchToClose && !this._wasOverFitZoomLevel && this._startZoomLevel <= r.zoomLevels.initial) {
|
|
1759
1803
|
const d = 1 - (a - c) / (a / 1.2);
|
|
@@ -1761,8 +1805,8 @@ class Li {
|
|
|
1761
1805
|
bgOpacity: d
|
|
1762
1806
|
}).defaultPrevented || o.applyBgOpacity(d);
|
|
1763
1807
|
} else
|
|
1764
|
-
c = a - (a - c) *
|
|
1765
|
-
else c > l && (c = l + (c - l) *
|
|
1808
|
+
c = a - (a - c) * xi;
|
|
1809
|
+
else c > l && (c = l + (c - l) * Ci);
|
|
1766
1810
|
r.pan.x = this._calculatePanForZoomLevel("x", c), r.pan.y = this._calculatePanForZoomLevel("y", c), r.setZoomLevel(c), r.applyCurrentZoomPan();
|
|
1767
1811
|
}
|
|
1768
1812
|
end() {
|
|
@@ -1846,11 +1890,11 @@ class Li {
|
|
|
1846
1890
|
});
|
|
1847
1891
|
}
|
|
1848
1892
|
}
|
|
1849
|
-
function
|
|
1893
|
+
function Mt(s) {
|
|
1850
1894
|
return !!/** @type {HTMLElement} */
|
|
1851
1895
|
s.target.closest(".pswp__container");
|
|
1852
1896
|
}
|
|
1853
|
-
class
|
|
1897
|
+
class Pi {
|
|
1854
1898
|
/**
|
|
1855
1899
|
* @param {Gestures} gestures
|
|
1856
1900
|
*/
|
|
@@ -1873,14 +1917,14 @@ class Ei {
|
|
|
1873
1917
|
* @param {PointerEvent} originalEvent
|
|
1874
1918
|
*/
|
|
1875
1919
|
tap(t, e) {
|
|
1876
|
-
|
|
1920
|
+
Mt(e) && this._doClickOrTapAction("tap", t, e);
|
|
1877
1921
|
}
|
|
1878
1922
|
/**
|
|
1879
1923
|
* @param {Point} point
|
|
1880
1924
|
* @param {PointerEvent} originalEvent
|
|
1881
1925
|
*/
|
|
1882
1926
|
doubleTap(t, e) {
|
|
1883
|
-
|
|
1927
|
+
Mt(e) && this._doClickOrTapAction("doubleTap", t, e);
|
|
1884
1928
|
}
|
|
1885
1929
|
/**
|
|
1886
1930
|
* @private
|
|
@@ -1924,8 +1968,8 @@ class Ei {
|
|
|
1924
1968
|
}
|
|
1925
1969
|
}
|
|
1926
1970
|
}
|
|
1927
|
-
const
|
|
1928
|
-
class
|
|
1971
|
+
const Ii = 10, Mi = 300, Oi = 25;
|
|
1972
|
+
class zi {
|
|
1929
1973
|
/**
|
|
1930
1974
|
* @param {PhotoSwipe} pswp
|
|
1931
1975
|
*/
|
|
@@ -1957,7 +2001,7 @@ class Ti {
|
|
|
1957
2001
|
}, this._intervalP1 = {
|
|
1958
2002
|
x: 0,
|
|
1959
2003
|
y: 0
|
|
1960
|
-
}, 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
|
|
2004
|
+
}, 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 Ai(this), this.zoomLevels = new Ti(this), this.tapHandler = new Pi(this), t.on("bindEvents", () => {
|
|
1961
2005
|
t.events.add(
|
|
1962
2006
|
t.scrollWrap,
|
|
1963
2007
|
"click",
|
|
@@ -2077,8 +2121,8 @@ class Ti {
|
|
|
2077
2121
|
this.tapHandler.click(this.startP1, t);
|
|
2078
2122
|
return;
|
|
2079
2123
|
}
|
|
2080
|
-
const i = this.pswp.options.doubleTapAction ?
|
|
2081
|
-
this._tapTimer ? (this._clearTapTimer(),
|
|
2124
|
+
const i = this.pswp.options.doubleTapAction ? Mi : 0;
|
|
2125
|
+
this._tapTimer ? (this._clearTapTimer(), at(this._lastStartP1, this.startP1) < Oi && this.tapHandler.doubleTap(this.startP1, t)) : (S(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
|
|
2082
2126
|
this.tapHandler.tap(this.startP1, t), this._clearTapTimer();
|
|
2083
2127
|
}, i));
|
|
2084
2128
|
}
|
|
@@ -2164,7 +2208,7 @@ class Ti {
|
|
|
2164
2208
|
const t = Math.abs(this.p1.x - this.startP1.x) - Math.abs(this.p1.y - this.startP1.y);
|
|
2165
2209
|
if (t !== 0) {
|
|
2166
2210
|
const e = t > 0 ? "x" : "y";
|
|
2167
|
-
Math.abs(this.p1[e] - this.startP1[e]) >=
|
|
2211
|
+
Math.abs(this.p1[e] - this.startP1[e]) >= Ii && (this.dragAxis = e);
|
|
2168
2212
|
}
|
|
2169
2213
|
}
|
|
2170
2214
|
}
|
|
@@ -2188,8 +2232,8 @@ class Ti {
|
|
|
2188
2232
|
this.pswp.mainScroll.isShifted() && (t.preventDefault(), t.stopPropagation());
|
|
2189
2233
|
}
|
|
2190
2234
|
}
|
|
2191
|
-
const
|
|
2192
|
-
class
|
|
2235
|
+
const Di = 0.35;
|
|
2236
|
+
class $i {
|
|
2193
2237
|
/**
|
|
2194
2238
|
* @param {PhotoSwipe} pswp
|
|
2195
2239
|
*/
|
|
@@ -2342,7 +2386,7 @@ class Ii {
|
|
|
2342
2386
|
let i = (this.slideWidth * this._currPositionIndex - t) / this.slideWidth;
|
|
2343
2387
|
i += this.pswp.currIndex;
|
|
2344
2388
|
const n = Math.round(t - this.x);
|
|
2345
|
-
(i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n *
|
|
2389
|
+
(i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * Di);
|
|
2346
2390
|
}
|
|
2347
2391
|
this.x = t, this.pswp.container && D(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
|
|
2348
2392
|
x: t,
|
|
@@ -2350,7 +2394,7 @@ class Ii {
|
|
|
2350
2394
|
});
|
|
2351
2395
|
}
|
|
2352
2396
|
}
|
|
2353
|
-
const
|
|
2397
|
+
const Bi = {
|
|
2354
2398
|
Escape: 27,
|
|
2355
2399
|
z: 90,
|
|
2356
2400
|
ArrowLeft: 37,
|
|
@@ -2358,8 +2402,8 @@ const Mi = {
|
|
|
2358
2402
|
ArrowRight: 39,
|
|
2359
2403
|
ArrowDown: 40,
|
|
2360
2404
|
Tab: 9
|
|
2361
|
-
}, z = (s, t) => t ? s :
|
|
2362
|
-
class
|
|
2405
|
+
}, z = (s, t) => t ? s : Bi[s];
|
|
2406
|
+
class Ri {
|
|
2363
2407
|
/**
|
|
2364
2408
|
* @param {PhotoSwipe} pswp
|
|
2365
2409
|
*/
|
|
@@ -2399,7 +2443,7 @@ class Oi {
|
|
|
2399
2443
|
} = this;
|
|
2400
2444
|
if (e.dispatch("keydown", {
|
|
2401
2445
|
originalEvent: t
|
|
2402
|
-
}).defaultPrevented ||
|
|
2446
|
+
}).defaultPrevented || vi(t))
|
|
2403
2447
|
return;
|
|
2404
2448
|
let i, n, o = !1;
|
|
2405
2449
|
const r = "key" in t;
|
|
@@ -2451,8 +2495,8 @@ class Oi {
|
|
|
2451
2495
|
) && e.focus();
|
|
2452
2496
|
}
|
|
2453
2497
|
}
|
|
2454
|
-
const
|
|
2455
|
-
class
|
|
2498
|
+
const Fi = "cubic-bezier(.4,0,.22,1)";
|
|
2499
|
+
class ki {
|
|
2456
2500
|
/**
|
|
2457
2501
|
* onComplete can be unpredictable, be careful about current state
|
|
2458
2502
|
*
|
|
@@ -2468,12 +2512,12 @@ class Di {
|
|
|
2468
2512
|
onFinish: r = () => {
|
|
2469
2513
|
},
|
|
2470
2514
|
duration: a = 333,
|
|
2471
|
-
easing: l =
|
|
2515
|
+
easing: l = Fi
|
|
2472
2516
|
} = t;
|
|
2473
2517
|
this.onFinish = r;
|
|
2474
2518
|
const c = o ? "transform" : "opacity", d = (e = t[c]) !== null && e !== void 0 ? e : "";
|
|
2475
2519
|
this._target = i, this._onComplete = n, this._finished = !1, this._onTransitionEnd = this._onTransitionEnd.bind(this), this._helperTimeout = setTimeout(() => {
|
|
2476
|
-
|
|
2520
|
+
Jt(i, c, a, l), this._helperTimeout = setTimeout(() => {
|
|
2477
2521
|
i.addEventListener("transitionend", this._onTransitionEnd, !1), i.addEventListener("transitioncancel", this._onTransitionEnd, !1), this._helperTimeout = setTimeout(() => {
|
|
2478
2522
|
this._finalizeAnimation();
|
|
2479
2523
|
}, a + 500), i.style[c] = d;
|
|
@@ -2495,11 +2539,11 @@ class Di {
|
|
|
2495
2539
|
}
|
|
2496
2540
|
// Destroy is called automatically onFinish
|
|
2497
2541
|
destroy() {
|
|
2498
|
-
this._helperTimeout && clearTimeout(this._helperTimeout),
|
|
2542
|
+
this._helperTimeout && clearTimeout(this._helperTimeout), fi(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
|
|
2499
2543
|
}
|
|
2500
2544
|
}
|
|
2501
|
-
const
|
|
2502
|
-
class
|
|
2545
|
+
const Zi = 12, qi = 0.75;
|
|
2546
|
+
class Hi {
|
|
2503
2547
|
/**
|
|
2504
2548
|
* @param {number} initialVelocity Initial velocity, px per ms.
|
|
2505
2549
|
*
|
|
@@ -2516,7 +2560,7 @@ class Ri {
|
|
|
2516
2560
|
* Recommended value from 10 to 50
|
|
2517
2561
|
*/
|
|
2518
2562
|
constructor(t, e, i) {
|
|
2519
|
-
this.velocity = t * 1e3, this._dampingRatio = e ||
|
|
2563
|
+
this.velocity = t * 1e3, this._dampingRatio = e || qi, this._naturalFrequency = i || Zi, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
|
|
2520
2564
|
}
|
|
2521
2565
|
/**
|
|
2522
2566
|
* @param {number} deltaPosition Difference between current and end position of the animation
|
|
@@ -2538,7 +2582,7 @@ class Ri {
|
|
|
2538
2582
|
return i;
|
|
2539
2583
|
}
|
|
2540
2584
|
}
|
|
2541
|
-
class
|
|
2585
|
+
class Ni {
|
|
2542
2586
|
/**
|
|
2543
2587
|
* @param {SpringAnimationProps} props
|
|
2544
2588
|
*/
|
|
@@ -2556,7 +2600,7 @@ class Fi {
|
|
|
2556
2600
|
naturalFrequency: c
|
|
2557
2601
|
} = t;
|
|
2558
2602
|
this.onFinish = a;
|
|
2559
|
-
const d = new
|
|
2603
|
+
const d = new Hi(n, l, c);
|
|
2560
2604
|
let h = Date.now(), u = e - i;
|
|
2561
2605
|
const f = () => {
|
|
2562
2606
|
this._raf && (u = d.easeFrame(u, Date.now() - h), Math.abs(u) < 1 && Math.abs(d.velocity) < 50 ? (o(i), r && r(), this.onFinish()) : (h = Date.now(), o(u + i), this._raf = requestAnimationFrame(f)));
|
|
@@ -2568,7 +2612,7 @@ class Fi {
|
|
|
2568
2612
|
this._raf >= 0 && cancelAnimationFrame(this._raf), this._raf = 0;
|
|
2569
2613
|
}
|
|
2570
2614
|
}
|
|
2571
|
-
class
|
|
2615
|
+
class Wi {
|
|
2572
2616
|
constructor() {
|
|
2573
2617
|
this.activeAnimations = [];
|
|
2574
2618
|
}
|
|
@@ -2591,10 +2635,10 @@ class ki {
|
|
|
2591
2635
|
* @returns {Animation}
|
|
2592
2636
|
*/
|
|
2593
2637
|
_start(t, e) {
|
|
2594
|
-
const i = e ? new
|
|
2638
|
+
const i = e ? new Ni(
|
|
2595
2639
|
/** @type SpringAnimationProps */
|
|
2596
2640
|
t
|
|
2597
|
-
) : new
|
|
2641
|
+
) : new ki(
|
|
2598
2642
|
/** @type CssAnimationProps */
|
|
2599
2643
|
t
|
|
2600
2644
|
);
|
|
@@ -2637,7 +2681,7 @@ class ki {
|
|
|
2637
2681
|
return this.activeAnimations.some((t) => t.props.isPan);
|
|
2638
2682
|
}
|
|
2639
2683
|
}
|
|
2640
|
-
class
|
|
2684
|
+
class Vi {
|
|
2641
2685
|
/**
|
|
2642
2686
|
* @param {PhotoSwipe} pswp
|
|
2643
2687
|
*/
|
|
@@ -2679,7 +2723,7 @@ class Zi {
|
|
|
2679
2723
|
e.isPannable() && (t.deltaMode === 1 && (i *= 18, n *= 18), e.panTo(e.pan.x - i, e.pan.y - n));
|
|
2680
2724
|
}
|
|
2681
2725
|
}
|
|
2682
|
-
function
|
|
2726
|
+
function ji(s) {
|
|
2683
2727
|
if (typeof s == "string")
|
|
2684
2728
|
return s;
|
|
2685
2729
|
if (!s || !s.isCustomSVG)
|
|
@@ -2691,7 +2735,7 @@ function qi(s) {
|
|
|
2691
2735
|
t.size || 32
|
|
2692
2736
|
), t.outlineID && (e += '<use class="pswp__icn-shadow" xlink:href="#' + t.outlineID + '"/>'), e += t.inner, e += "</svg>", e;
|
|
2693
2737
|
}
|
|
2694
|
-
class
|
|
2738
|
+
class Gi {
|
|
2695
2739
|
/**
|
|
2696
2740
|
* @param {PhotoSwipe} pswp
|
|
2697
2741
|
* @param {UIElementData} data
|
|
@@ -2723,7 +2767,7 @@ class Ni {
|
|
|
2723
2767
|
const f = u || h;
|
|
2724
2768
|
f && l.setAttribute("aria-label", f);
|
|
2725
2769
|
}
|
|
2726
|
-
l.innerHTML =
|
|
2770
|
+
l.innerHTML = ji(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (h) => {
|
|
2727
2771
|
typeof e.onClick == "string" ? t[e.onClick]() : typeof e.onClick == "function" && e.onClick(h, l, t);
|
|
2728
2772
|
});
|
|
2729
2773
|
const c = e.appendTo || "bar";
|
|
@@ -2731,12 +2775,12 @@ class Ni {
|
|
|
2731
2775
|
c === "bar" ? (t.topBar || (t.topBar = x("pswp__top-bar pswp__hide-on-close", "div", t.scrollWrap)), d = t.topBar) : (l.classList.add("pswp__hide-on-close"), c === "wrapper" && (d = t.scrollWrap)), (i = d) === null || i === void 0 || i.appendChild(t.applyFilters("uiElement", l, e));
|
|
2732
2776
|
}
|
|
2733
2777
|
}
|
|
2734
|
-
function
|
|
2778
|
+
function se(s, t, e) {
|
|
2735
2779
|
s.classList.add("pswp__button--arrow"), s.setAttribute("aria-controls", "pswp__items"), t.on("change", () => {
|
|
2736
2780
|
t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
|
|
2737
2781
|
});
|
|
2738
2782
|
}
|
|
2739
|
-
const
|
|
2783
|
+
const Ui = {
|
|
2740
2784
|
name: "arrowPrev",
|
|
2741
2785
|
className: "pswp__button--arrow--prev",
|
|
2742
2786
|
title: "Previous",
|
|
@@ -2750,8 +2794,8 @@ const Hi = {
|
|
|
2750
2794
|
outlineID: "pswp__icn-arrow"
|
|
2751
2795
|
},
|
|
2752
2796
|
onClick: "prev",
|
|
2753
|
-
onInit:
|
|
2754
|
-
},
|
|
2797
|
+
onInit: se
|
|
2798
|
+
}, Ki = {
|
|
2755
2799
|
name: "arrowNext",
|
|
2756
2800
|
className: "pswp__button--arrow--next",
|
|
2757
2801
|
title: "Next",
|
|
@@ -2766,9 +2810,9 @@ const Hi = {
|
|
|
2766
2810
|
},
|
|
2767
2811
|
onClick: "next",
|
|
2768
2812
|
onInit: (s, t) => {
|
|
2769
|
-
|
|
2813
|
+
se(s, t, !0);
|
|
2770
2814
|
}
|
|
2771
|
-
},
|
|
2815
|
+
}, Xi = {
|
|
2772
2816
|
name: "close",
|
|
2773
2817
|
title: "Close",
|
|
2774
2818
|
order: 20,
|
|
@@ -2779,7 +2823,7 @@ const Hi = {
|
|
|
2779
2823
|
outlineID: "pswp__icn-close"
|
|
2780
2824
|
},
|
|
2781
2825
|
onClick: "close"
|
|
2782
|
-
},
|
|
2826
|
+
}, Yi = {
|
|
2783
2827
|
name: "zoom",
|
|
2784
2828
|
title: "Zoom",
|
|
2785
2829
|
order: 10,
|
|
@@ -2791,7 +2835,7 @@ const Hi = {
|
|
|
2791
2835
|
outlineID: "pswp__icn-zoom"
|
|
2792
2836
|
},
|
|
2793
2837
|
onClick: "toggleZoom"
|
|
2794
|
-
},
|
|
2838
|
+
}, Ji = {
|
|
2795
2839
|
name: "preloader",
|
|
2796
2840
|
appendTo: "bar",
|
|
2797
2841
|
order: 7,
|
|
@@ -2822,7 +2866,7 @@ const Hi = {
|
|
|
2822
2866
|
t.currSlide === a.slide && r();
|
|
2823
2867
|
}), t.ui && (t.ui.updatePreloaderVisibility = r);
|
|
2824
2868
|
}
|
|
2825
|
-
},
|
|
2869
|
+
}, Qi = {
|
|
2826
2870
|
name: "counter",
|
|
2827
2871
|
order: 5,
|
|
2828
2872
|
onInit: (s, t) => {
|
|
@@ -2831,10 +2875,10 @@ const Hi = {
|
|
|
2831
2875
|
});
|
|
2832
2876
|
}
|
|
2833
2877
|
};
|
|
2834
|
-
function
|
|
2878
|
+
function Ot(s, t) {
|
|
2835
2879
|
s.classList.toggle("pswp--zoomed-in", t);
|
|
2836
2880
|
}
|
|
2837
|
-
class
|
|
2881
|
+
class ts {
|
|
2838
2882
|
/**
|
|
2839
2883
|
* @param {PhotoSwipe} pswp
|
|
2840
2884
|
*/
|
|
@@ -2846,7 +2890,7 @@ class Ki {
|
|
|
2846
2890
|
const {
|
|
2847
2891
|
pswp: t
|
|
2848
2892
|
} = this;
|
|
2849
|
-
this.isRegistered = !1, this.uiElementsData = [
|
|
2893
|
+
this.isRegistered = !1, this.uiElementsData = [Xi, Ui, Ki, Yi, Ji, Qi], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
|
|
2850
2894
|
this.registerElement(e);
|
|
2851
2895
|
}), t.on("change", () => {
|
|
2852
2896
|
var e;
|
|
@@ -2857,7 +2901,7 @@ class Ki {
|
|
|
2857
2901
|
* @param {UIElementData} elementData
|
|
2858
2902
|
*/
|
|
2859
2903
|
registerElement(t) {
|
|
2860
|
-
this.isRegistered ? this.items.push(new
|
|
2904
|
+
this.isRegistered ? this.items.push(new Gi(this.pswp, t)) : this.uiElementsData.push(t);
|
|
2861
2905
|
}
|
|
2862
2906
|
/**
|
|
2863
2907
|
* Fired each time zoom or pan position is changed.
|
|
@@ -2881,15 +2925,15 @@ class Ki {
|
|
|
2881
2925
|
this._lastUpdatedZoomLevel = n;
|
|
2882
2926
|
const o = e.zoomLevels.initial - e.zoomLevels.secondary;
|
|
2883
2927
|
if (Math.abs(o) < 0.01 || !e.isZoomable()) {
|
|
2884
|
-
|
|
2928
|
+
Ot(t, !1), t.classList.remove("pswp--zoom-allowed");
|
|
2885
2929
|
return;
|
|
2886
2930
|
}
|
|
2887
2931
|
t.classList.add("pswp--zoom-allowed");
|
|
2888
2932
|
const r = n === e.zoomLevels.initial ? e.zoomLevels.secondary : e.zoomLevels.initial;
|
|
2889
|
-
|
|
2933
|
+
Ot(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
|
|
2890
2934
|
}
|
|
2891
2935
|
}
|
|
2892
|
-
function
|
|
2936
|
+
function es(s) {
|
|
2893
2937
|
const t = s.getBoundingClientRect();
|
|
2894
2938
|
return {
|
|
2895
2939
|
x: t.left,
|
|
@@ -2897,7 +2941,7 @@ function Xi(s) {
|
|
|
2897
2941
|
w: t.width
|
|
2898
2942
|
};
|
|
2899
2943
|
}
|
|
2900
|
-
function
|
|
2944
|
+
function is(s, t, e) {
|
|
2901
2945
|
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 = {
|
|
2902
2946
|
x: i.left + a,
|
|
2903
2947
|
y: i.top + l,
|
|
@@ -2910,7 +2954,7 @@ function Yi(s, t, e) {
|
|
|
2910
2954
|
y: l
|
|
2911
2955
|
}, c;
|
|
2912
2956
|
}
|
|
2913
|
-
function
|
|
2957
|
+
function ss(s, t, e) {
|
|
2914
2958
|
const i = e.dispatch("thumbBounds", {
|
|
2915
2959
|
index: s,
|
|
2916
2960
|
itemData: t,
|
|
@@ -2929,9 +2973,9 @@ function Ji(s, t, e) {
|
|
|
2929
2973
|
n.querySelector(a)
|
|
2930
2974
|
);
|
|
2931
2975
|
}
|
|
2932
|
-
return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o =
|
|
2976
|
+
return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = is(r, t.width || t.w || 0, t.height || t.h || 0) : o = es(r)), e.applyFilters("thumbBounds", o, t, s);
|
|
2933
2977
|
}
|
|
2934
|
-
let
|
|
2978
|
+
let ns = class {
|
|
2935
2979
|
/**
|
|
2936
2980
|
* @param {T} type
|
|
2937
2981
|
* @param {PhotoSwipeEventsMap[T]} [details]
|
|
@@ -2942,7 +2986,7 @@ let Qi = class {
|
|
|
2942
2986
|
preventDefault() {
|
|
2943
2987
|
this.defaultPrevented = !0;
|
|
2944
2988
|
}
|
|
2945
|
-
},
|
|
2989
|
+
}, os = class {
|
|
2946
2990
|
constructor() {
|
|
2947
2991
|
this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
|
|
2948
2992
|
}
|
|
@@ -3009,13 +3053,13 @@ let Qi = class {
|
|
|
3009
3053
|
return this.pswp.dispatch(t, e);
|
|
3010
3054
|
const n = (
|
|
3011
3055
|
/** @type {AugmentedEvent<T>} */
|
|
3012
|
-
new
|
|
3056
|
+
new ns(t, e)
|
|
3013
3057
|
);
|
|
3014
3058
|
return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
|
|
3015
3059
|
o.call(this, n);
|
|
3016
3060
|
}), n;
|
|
3017
3061
|
}
|
|
3018
|
-
},
|
|
3062
|
+
}, rs = class {
|
|
3019
3063
|
/**
|
|
3020
3064
|
* @param {string | false} imageSrc
|
|
3021
3065
|
* @param {HTMLElement} container
|
|
@@ -3035,13 +3079,13 @@ let Qi = class {
|
|
|
3035
3079
|
* @param {number} height
|
|
3036
3080
|
*/
|
|
3037
3081
|
setDisplayedSize(t, e) {
|
|
3038
|
-
this.element && (this.element.tagName === "IMG" ? (
|
|
3082
|
+
this.element && (this.element.tagName === "IMG" ? (lt(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = X(0, 0, t / 250)) : lt(this.element, t, e));
|
|
3039
3083
|
}
|
|
3040
3084
|
destroy() {
|
|
3041
3085
|
var t;
|
|
3042
3086
|
(t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
|
|
3043
3087
|
}
|
|
3044
|
-
},
|
|
3088
|
+
}, as = class {
|
|
3045
3089
|
/**
|
|
3046
3090
|
* @param {SlideData} itemData Slide data
|
|
3047
3091
|
* @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
|
|
@@ -3076,7 +3120,7 @@ let Qi = class {
|
|
|
3076
3120
|
this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
|
|
3077
3121
|
this
|
|
3078
3122
|
);
|
|
3079
|
-
this.placeholder = new
|
|
3123
|
+
this.placeholder = new rs(i, this.slide.container);
|
|
3080
3124
|
}
|
|
3081
3125
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
3082
3126
|
content: this,
|
|
@@ -3164,7 +3208,7 @@ let Qi = class {
|
|
|
3164
3208
|
content: this,
|
|
3165
3209
|
width: t,
|
|
3166
3210
|
height: e
|
|
3167
|
-
}).defaultPrevented && (
|
|
3211
|
+
}).defaultPrevented && (lt(this.element, t, e), this.isImageContent() && !this.isError()))) {
|
|
3168
3212
|
const i = !this.displayedImageWidth && t;
|
|
3169
3213
|
this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
|
|
3170
3214
|
slide: this.slide,
|
|
@@ -3246,7 +3290,7 @@ let Qi = class {
|
|
|
3246
3290
|
}).defaultPrevented)
|
|
3247
3291
|
return;
|
|
3248
3292
|
const t = "decode" in this.element;
|
|
3249
|
-
this.isImageContent() ? t && this.slide && (!this.slide.isActive ||
|
|
3293
|
+
this.isImageContent() ? t && this.slide && (!this.slide.isActive || Ct()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
|
|
3250
3294
|
}).finally(() => {
|
|
3251
3295
|
this.isDecoding = !1, this.appendImage();
|
|
3252
3296
|
})) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
|
|
@@ -3259,7 +3303,7 @@ let Qi = class {
|
|
|
3259
3303
|
activate() {
|
|
3260
3304
|
this.instance.dispatch("contentActivate", {
|
|
3261
3305
|
content: this
|
|
3262
|
-
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !
|
|
3306
|
+
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !Ct() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
|
|
3263
3307
|
}
|
|
3264
3308
|
/**
|
|
3265
3309
|
* Deactivate the content
|
|
@@ -3286,36 +3330,36 @@ let Qi = class {
|
|
|
3286
3330
|
}).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === T.LOADED || this.state === T.ERROR) && this.removePlaceholder()));
|
|
3287
3331
|
}
|
|
3288
3332
|
};
|
|
3289
|
-
const
|
|
3290
|
-
function
|
|
3333
|
+
const ls = 5;
|
|
3334
|
+
function ne(s, t, e) {
|
|
3291
3335
|
const i = t.createContentFromData(s, e);
|
|
3292
3336
|
let n;
|
|
3293
3337
|
const {
|
|
3294
3338
|
options: o
|
|
3295
3339
|
} = t;
|
|
3296
3340
|
if (o) {
|
|
3297
|
-
n = new
|
|
3341
|
+
n = new ie(o, s, -1);
|
|
3298
3342
|
let r;
|
|
3299
|
-
t.pswp ? r = t.pswp.viewportSize : r =
|
|
3300
|
-
const a =
|
|
3343
|
+
t.pswp ? r = t.pswp.viewportSize : r = te(o, t);
|
|
3344
|
+
const a = ee(o, r, s, e);
|
|
3301
3345
|
n.update(i.width, i.height, a);
|
|
3302
3346
|
}
|
|
3303
3347
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
3304
3348
|
}
|
|
3305
|
-
function
|
|
3349
|
+
function cs(s, t) {
|
|
3306
3350
|
const e = t.getItemData(s);
|
|
3307
3351
|
if (!t.dispatch("lazyLoadSlide", {
|
|
3308
3352
|
index: s,
|
|
3309
3353
|
itemData: e
|
|
3310
3354
|
}).defaultPrevented)
|
|
3311
|
-
return
|
|
3355
|
+
return ne(e, t, s);
|
|
3312
3356
|
}
|
|
3313
|
-
class
|
|
3357
|
+
class ds {
|
|
3314
3358
|
/**
|
|
3315
3359
|
* @param {PhotoSwipe} pswp
|
|
3316
3360
|
*/
|
|
3317
3361
|
constructor(t) {
|
|
3318
|
-
this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1,
|
|
3362
|
+
this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, ls), this._cachedItems = [];
|
|
3319
3363
|
}
|
|
3320
3364
|
/**
|
|
3321
3365
|
* Lazy load nearby slides based on `preload` option.
|
|
@@ -3343,7 +3387,7 @@ class os {
|
|
|
3343
3387
|
loadSlideByIndex(t) {
|
|
3344
3388
|
const e = this.pswp.getLoopedIndex(t);
|
|
3345
3389
|
let i = this.getContentByIndex(e);
|
|
3346
|
-
i || (i =
|
|
3390
|
+
i || (i = cs(e, this.pswp), i && this.addToCache(i));
|
|
3347
3391
|
}
|
|
3348
3392
|
/**
|
|
3349
3393
|
* @param {Slide} slide
|
|
@@ -3382,7 +3426,7 @@ class os {
|
|
|
3382
3426
|
this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
|
|
3383
3427
|
}
|
|
3384
3428
|
}
|
|
3385
|
-
let
|
|
3429
|
+
let hs = class extends os {
|
|
3386
3430
|
/**
|
|
3387
3431
|
* Get total number of slides
|
|
3388
3432
|
*
|
|
@@ -3405,7 +3449,7 @@ let rs = class extends ts {
|
|
|
3405
3449
|
* @returns {Content}
|
|
3406
3450
|
*/
|
|
3407
3451
|
createContentFromData(t, e) {
|
|
3408
|
-
return new
|
|
3452
|
+
return new as(t, this, e);
|
|
3409
3453
|
}
|
|
3410
3454
|
/**
|
|
3411
3455
|
* Get item data by index.
|
|
@@ -3439,7 +3483,7 @@ let rs = class extends ts {
|
|
|
3439
3483
|
*/
|
|
3440
3484
|
_getGalleryDOMElements(t) {
|
|
3441
3485
|
var e, i;
|
|
3442
|
-
return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ?
|
|
3486
|
+
return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? yi(this.options.children, this.options.childSelector, t) || [] : [t];
|
|
3443
3487
|
}
|
|
3444
3488
|
/**
|
|
3445
3489
|
* Converts DOM element to item data object.
|
|
@@ -3473,11 +3517,11 @@ let rs = class extends ts {
|
|
|
3473
3517
|
* @returns {Content} Image that is being decoded or false.
|
|
3474
3518
|
*/
|
|
3475
3519
|
lazyLoadData(t, e) {
|
|
3476
|
-
return
|
|
3520
|
+
return ne(t, this, e);
|
|
3477
3521
|
}
|
|
3478
3522
|
};
|
|
3479
3523
|
const q = 3e-3;
|
|
3480
|
-
class
|
|
3524
|
+
class us {
|
|
3481
3525
|
/**
|
|
3482
3526
|
* @param {PhotoSwipe} pswp
|
|
3483
3527
|
*/
|
|
@@ -3530,7 +3574,7 @@ class as {
|
|
|
3530
3574
|
_start() {
|
|
3531
3575
|
this.isOpening && this._useAnimation && this._placeholder && this._placeholder.tagName === "IMG" ? new Promise((t) => {
|
|
3532
3576
|
let e = !1, i = !0;
|
|
3533
|
-
|
|
3577
|
+
gi(
|
|
3534
3578
|
/** @type {HTMLImageElement} */
|
|
3535
3579
|
this._placeholder
|
|
3536
3580
|
).finally(() => {
|
|
@@ -3621,7 +3665,7 @@ class as {
|
|
|
3621
3665
|
o[e] = i, n.startTransition(o);
|
|
3622
3666
|
}
|
|
3623
3667
|
}
|
|
3624
|
-
const
|
|
3668
|
+
const ps = {
|
|
3625
3669
|
allowPanToNext: !0,
|
|
3626
3670
|
spacing: 0.1,
|
|
3627
3671
|
loop: !0,
|
|
@@ -3648,7 +3692,7 @@ const ls = {
|
|
|
3648
3692
|
preload: [1, 2],
|
|
3649
3693
|
easing: "cubic-bezier(.4,0,.22,1)"
|
|
3650
3694
|
};
|
|
3651
|
-
class
|
|
3695
|
+
class ms extends hs {
|
|
3652
3696
|
/**
|
|
3653
3697
|
* @param {PhotoSwipeOptions} [options]
|
|
3654
3698
|
*/
|
|
@@ -3662,7 +3706,7 @@ class cs extends rs {
|
|
|
3662
3706
|
}, this.viewportSize = {
|
|
3663
3707
|
x: 0,
|
|
3664
3708
|
y: 0
|
|
3665
|
-
}, 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
|
|
3709
|
+
}, 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 _i(), this.animations = new Wi(), this.mainScroll = new $i(this), this.gestures = new zi(this), this.opener = new us(this), this.keyboard = new Ri(this), this.contentLoader = new ds(this);
|
|
3666
3710
|
}
|
|
3667
3711
|
/** @returns {boolean} */
|
|
3668
3712
|
init() {
|
|
@@ -3670,7 +3714,7 @@ class cs extends rs {
|
|
|
3670
3714
|
return !1;
|
|
3671
3715
|
this.isOpen = !0, this.dispatch("init"), this.dispatch("beforeOpen"), this._createMainStructure();
|
|
3672
3716
|
let t = "pswp--open";
|
|
3673
|
-
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
|
|
3717
|
+
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 Vi(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", {
|
|
3674
3718
|
index: this.currIndex,
|
|
3675
3719
|
data: this._initialItemData,
|
|
3676
3720
|
slide: void 0
|
|
@@ -3789,7 +3833,7 @@ class cs extends rs {
|
|
|
3789
3833
|
if (!this.canLoop() && (e < 0 || e >= this.getNumItems()))
|
|
3790
3834
|
return;
|
|
3791
3835
|
const n = this.getItemData(e);
|
|
3792
|
-
t.slide = new
|
|
3836
|
+
t.slide = new bi(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
|
|
3793
3837
|
}
|
|
3794
3838
|
/** @returns {Point} */
|
|
3795
3839
|
getViewportCenterPoint() {
|
|
@@ -3807,7 +3851,7 @@ class cs extends rs {
|
|
|
3807
3851
|
updateSize(t) {
|
|
3808
3852
|
if (this.isDestroying)
|
|
3809
3853
|
return;
|
|
3810
|
-
const e =
|
|
3854
|
+
const e = te(this.options, this);
|
|
3811
3855
|
!t && G(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"));
|
|
3812
3856
|
}
|
|
3813
3857
|
/**
|
|
@@ -3859,7 +3903,7 @@ class cs extends rs {
|
|
|
3859
3903
|
* @private
|
|
3860
3904
|
*/
|
|
3861
3905
|
_createMainStructure() {
|
|
3862
|
-
this.element = x("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = x("pswp__bg", "div", this.element), this.scrollWrap = x("pswp__scroll-wrap", "section", this.element), this.container = x("pswp__container", "div", this.scrollWrap), this.scrollWrap.setAttribute("aria-roledescription", "carousel"), this.container.setAttribute("aria-live", "off"), this.container.setAttribute("id", "pswp__items"), this.mainScroll.appendHolders(), this.ui = new
|
|
3906
|
+
this.element = x("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = x("pswp__bg", "div", this.element), this.scrollWrap = x("pswp__scroll-wrap", "section", this.element), this.container = x("pswp__container", "div", this.scrollWrap), this.scrollWrap.setAttribute("aria-roledescription", "carousel"), this.container.setAttribute("aria-live", "off"), this.container.setAttribute("id", "pswp__items"), this.mainScroll.appendHolders(), this.ui = new ts(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
|
|
3863
3907
|
}
|
|
3864
3908
|
/**
|
|
3865
3909
|
* Get position and dimensions of small thumbnail
|
|
@@ -3870,7 +3914,7 @@ class cs extends rs {
|
|
|
3870
3914
|
* @returns {Bounds | undefined}
|
|
3871
3915
|
*/
|
|
3872
3916
|
getThumbBounds() {
|
|
3873
|
-
return
|
|
3917
|
+
return ss(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
|
|
3874
3918
|
}
|
|
3875
3919
|
/**
|
|
3876
3920
|
* If the PhotoSwipe can have continuous loop
|
|
@@ -3886,20 +3930,20 @@ class cs extends rs {
|
|
|
3886
3930
|
*/
|
|
3887
3931
|
_prepareOptions(t) {
|
|
3888
3932
|
return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches && (t.showHideAnimationType = "none", t.zoomAnimationDuration = 0), {
|
|
3889
|
-
...
|
|
3933
|
+
...ps,
|
|
3890
3934
|
...t
|
|
3891
3935
|
};
|
|
3892
3936
|
}
|
|
3893
3937
|
}
|
|
3894
|
-
function
|
|
3938
|
+
function N(s, t, e) {
|
|
3895
3939
|
const i = document.createElement(t);
|
|
3896
3940
|
return s && (i.className = s), e && e.appendChild(i), i;
|
|
3897
3941
|
}
|
|
3898
|
-
function
|
|
3942
|
+
function fs(s, t, e) {
|
|
3899
3943
|
let i = `translate3d(${s}px,0px,0)`;
|
|
3900
3944
|
return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
|
|
3901
3945
|
}
|
|
3902
|
-
function
|
|
3946
|
+
function ct(s, t, e) {
|
|
3903
3947
|
s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
|
|
3904
3948
|
}
|
|
3905
3949
|
const P = {
|
|
@@ -3908,7 +3952,7 @@ const P = {
|
|
|
3908
3952
|
LOADED: "loaded",
|
|
3909
3953
|
ERROR: "error"
|
|
3910
3954
|
};
|
|
3911
|
-
function
|
|
3955
|
+
function gs(s) {
|
|
3912
3956
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
3913
3957
|
}
|
|
3914
3958
|
function W(s, t, e = document) {
|
|
@@ -3923,13 +3967,13 @@ function W(s, t, e = document) {
|
|
|
3923
3967
|
}
|
|
3924
3968
|
return i;
|
|
3925
3969
|
}
|
|
3926
|
-
function
|
|
3970
|
+
function vs(s) {
|
|
3927
3971
|
return typeof s == "function" && s.prototype && s.prototype.goTo;
|
|
3928
3972
|
}
|
|
3929
|
-
function
|
|
3973
|
+
function zt() {
|
|
3930
3974
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
3931
3975
|
}
|
|
3932
|
-
class
|
|
3976
|
+
class ys {
|
|
3933
3977
|
/**
|
|
3934
3978
|
* @param {T} type
|
|
3935
3979
|
* @param {PhotoSwipeEventsMap[T]} [details]
|
|
@@ -3941,7 +3985,7 @@ class ps {
|
|
|
3941
3985
|
this.defaultPrevented = !0;
|
|
3942
3986
|
}
|
|
3943
3987
|
}
|
|
3944
|
-
class
|
|
3988
|
+
class _s {
|
|
3945
3989
|
constructor() {
|
|
3946
3990
|
this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
|
|
3947
3991
|
}
|
|
@@ -4008,20 +4052,20 @@ class ms {
|
|
|
4008
4052
|
return this.pswp.dispatch(t, e);
|
|
4009
4053
|
const n = (
|
|
4010
4054
|
/** @type {AugmentedEvent<T>} */
|
|
4011
|
-
new
|
|
4055
|
+
new ys(t, e)
|
|
4012
4056
|
);
|
|
4013
4057
|
return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
|
|
4014
4058
|
o.call(this, n);
|
|
4015
4059
|
}), n;
|
|
4016
4060
|
}
|
|
4017
4061
|
}
|
|
4018
|
-
class
|
|
4062
|
+
class ws {
|
|
4019
4063
|
/**
|
|
4020
4064
|
* @param {string | false} imageSrc
|
|
4021
4065
|
* @param {HTMLElement} container
|
|
4022
4066
|
*/
|
|
4023
4067
|
constructor(t, e) {
|
|
4024
|
-
if (this.element =
|
|
4068
|
+
if (this.element = N("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
|
|
4025
4069
|
const i = (
|
|
4026
4070
|
/** @type {HTMLImageElement} */
|
|
4027
4071
|
this.element
|
|
@@ -4035,14 +4079,14 @@ class fs {
|
|
|
4035
4079
|
* @param {number} height
|
|
4036
4080
|
*/
|
|
4037
4081
|
setDisplayedSize(t, e) {
|
|
4038
|
-
this.element && (this.element.tagName === "IMG" ? (
|
|
4082
|
+
this.element && (this.element.tagName === "IMG" ? (ct(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = fs(0, 0, t / 250)) : ct(this.element, t, e));
|
|
4039
4083
|
}
|
|
4040
4084
|
destroy() {
|
|
4041
4085
|
var t;
|
|
4042
4086
|
(t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
|
|
4043
4087
|
}
|
|
4044
4088
|
}
|
|
4045
|
-
class
|
|
4089
|
+
class bs {
|
|
4046
4090
|
/**
|
|
4047
4091
|
* @param {SlideData} itemData Slide data
|
|
4048
4092
|
* @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
|
|
@@ -4077,12 +4121,12 @@ class gs {
|
|
|
4077
4121
|
this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
|
|
4078
4122
|
this
|
|
4079
4123
|
);
|
|
4080
|
-
this.placeholder = new
|
|
4124
|
+
this.placeholder = new ws(i, this.slide.container);
|
|
4081
4125
|
}
|
|
4082
4126
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
4083
4127
|
content: this,
|
|
4084
4128
|
isLazy: t
|
|
4085
|
-
}).defaultPrevented || (this.isImageContent() ? (this.element =
|
|
4129
|
+
}).defaultPrevented || (this.isImageContent() ? (this.element = N("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = N("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), e && this.slide && this.slide.updateContentSize(!0));
|
|
4086
4130
|
}
|
|
4087
4131
|
/**
|
|
4088
4132
|
* Preload image
|
|
@@ -4165,7 +4209,7 @@ class gs {
|
|
|
4165
4209
|
content: this,
|
|
4166
4210
|
width: t,
|
|
4167
4211
|
height: e
|
|
4168
|
-
}).defaultPrevented && (
|
|
4212
|
+
}).defaultPrevented && (ct(this.element, t, e), this.isImageContent() && !this.isError()))) {
|
|
4169
4213
|
const i = !this.displayedImageWidth && t;
|
|
4170
4214
|
this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
|
|
4171
4215
|
slide: this.slide,
|
|
@@ -4227,9 +4271,9 @@ class gs {
|
|
|
4227
4271
|
displayError() {
|
|
4228
4272
|
if (this.slide) {
|
|
4229
4273
|
var t, e;
|
|
4230
|
-
let i =
|
|
4274
|
+
let i = N("pswp__error-msg", "div");
|
|
4231
4275
|
i.innerText = (t = (e = this.instance.options) === null || e === void 0 ? void 0 : e.errorMsg) !== null && t !== void 0 ? t : "", i = /** @type {HTMLDivElement} */
|
|
4232
|
-
this.instance.applyFilters("contentErrorElement", i, this), this.element =
|
|
4276
|
+
this.instance.applyFilters("contentErrorElement", i, this), this.element = N("pswp__content pswp__error-msg-container", "div"), this.element.appendChild(i), this.slide.container.innerText = "", this.slide.container.appendChild(this.element), this.slide.updateContentSize(!0), this.removePlaceholder();
|
|
4233
4277
|
}
|
|
4234
4278
|
}
|
|
4235
4279
|
/**
|
|
@@ -4247,7 +4291,7 @@ class gs {
|
|
|
4247
4291
|
}).defaultPrevented)
|
|
4248
4292
|
return;
|
|
4249
4293
|
const t = "decode" in this.element;
|
|
4250
|
-
this.isImageContent() ? t && this.slide && (!this.slide.isActive ||
|
|
4294
|
+
this.isImageContent() ? t && this.slide && (!this.slide.isActive || zt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
|
|
4251
4295
|
}).finally(() => {
|
|
4252
4296
|
this.isDecoding = !1, this.appendImage();
|
|
4253
4297
|
})) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
|
|
@@ -4260,7 +4304,7 @@ class gs {
|
|
|
4260
4304
|
activate() {
|
|
4261
4305
|
this.instance.dispatch("contentActivate", {
|
|
4262
4306
|
content: this
|
|
4263
|
-
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !
|
|
4307
|
+
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !zt() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
|
|
4264
4308
|
}
|
|
4265
4309
|
/**
|
|
4266
4310
|
* Deactivate the content
|
|
@@ -4287,7 +4331,7 @@ class gs {
|
|
|
4287
4331
|
}).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === P.LOADED || this.state === P.ERROR) && this.removePlaceholder()));
|
|
4288
4332
|
}
|
|
4289
4333
|
}
|
|
4290
|
-
function
|
|
4334
|
+
function Ss(s, t) {
|
|
4291
4335
|
if (s.getViewportSizeFn) {
|
|
4292
4336
|
const e = s.getViewportSizeFn(s, t);
|
|
4293
4337
|
if (e)
|
|
@@ -4314,14 +4358,14 @@ function J(s, t, e, i, n) {
|
|
|
4314
4358
|
}
|
|
4315
4359
|
return Number(o) || 0;
|
|
4316
4360
|
}
|
|
4317
|
-
function
|
|
4361
|
+
function Ls(s, t, e, i) {
|
|
4318
4362
|
return {
|
|
4319
4363
|
x: t.x - J("left", s, t, e, i) - J("right", s, t, e, i),
|
|
4320
4364
|
y: t.y - J("top", s, t, e, i) - J("bottom", s, t, e, i)
|
|
4321
4365
|
};
|
|
4322
4366
|
}
|
|
4323
|
-
const
|
|
4324
|
-
class
|
|
4367
|
+
const Dt = 4e3;
|
|
4368
|
+
class Es {
|
|
4325
4369
|
/**
|
|
4326
4370
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
4327
4371
|
* @param {SlideData} itemData Slide data
|
|
@@ -4378,7 +4422,7 @@ class _s {
|
|
|
4378
4422
|
*/
|
|
4379
4423
|
_getSecondary() {
|
|
4380
4424
|
let t = this._parseZoomLevelOption("secondary");
|
|
4381
|
-
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x >
|
|
4425
|
+
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > Dt && (t = Dt / this.elementSize.x), t);
|
|
4382
4426
|
}
|
|
4383
4427
|
/**
|
|
4384
4428
|
* Get initial image zoom level.
|
|
@@ -4401,30 +4445,30 @@ class _s {
|
|
|
4401
4445
|
return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
|
|
4402
4446
|
}
|
|
4403
4447
|
}
|
|
4404
|
-
function
|
|
4448
|
+
function oe(s, t, e) {
|
|
4405
4449
|
const i = t.createContentFromData(s, e);
|
|
4406
4450
|
let n;
|
|
4407
4451
|
const {
|
|
4408
4452
|
options: o
|
|
4409
4453
|
} = t;
|
|
4410
4454
|
if (o) {
|
|
4411
|
-
n = new
|
|
4455
|
+
n = new Es(o, s, -1);
|
|
4412
4456
|
let r;
|
|
4413
|
-
t.pswp ? r = t.pswp.viewportSize : r =
|
|
4414
|
-
const a =
|
|
4457
|
+
t.pswp ? r = t.pswp.viewportSize : r = Ss(o, t);
|
|
4458
|
+
const a = Ls(o, r, s, e);
|
|
4415
4459
|
n.update(i.width, i.height, a);
|
|
4416
4460
|
}
|
|
4417
4461
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
4418
4462
|
}
|
|
4419
|
-
function
|
|
4463
|
+
function As(s, t) {
|
|
4420
4464
|
const e = t.getItemData(s);
|
|
4421
4465
|
if (!t.dispatch("lazyLoadSlide", {
|
|
4422
4466
|
index: s,
|
|
4423
4467
|
itemData: e
|
|
4424
4468
|
}).defaultPrevented)
|
|
4425
|
-
return
|
|
4469
|
+
return oe(e, t, s);
|
|
4426
4470
|
}
|
|
4427
|
-
class
|
|
4471
|
+
class Cs extends _s {
|
|
4428
4472
|
/**
|
|
4429
4473
|
* Get total number of slides
|
|
4430
4474
|
*
|
|
@@ -4447,7 +4491,7 @@ class bs extends ms {
|
|
|
4447
4491
|
* @returns {Content}
|
|
4448
4492
|
*/
|
|
4449
4493
|
createContentFromData(t, e) {
|
|
4450
|
-
return new
|
|
4494
|
+
return new bs(t, this, e);
|
|
4451
4495
|
}
|
|
4452
4496
|
/**
|
|
4453
4497
|
* Get item data by index.
|
|
@@ -4515,10 +4559,10 @@ class bs extends ms {
|
|
|
4515
4559
|
* @returns {Content} Image that is being decoded or false.
|
|
4516
4560
|
*/
|
|
4517
4561
|
lazyLoadData(t, e) {
|
|
4518
|
-
return
|
|
4562
|
+
return oe(t, this, e);
|
|
4519
4563
|
}
|
|
4520
4564
|
}
|
|
4521
|
-
class
|
|
4565
|
+
class xs extends Cs {
|
|
4522
4566
|
/**
|
|
4523
4567
|
* @param {PhotoSwipeOptions} [options]
|
|
4524
4568
|
*/
|
|
@@ -4538,7 +4582,7 @@ class Ss extends bs {
|
|
|
4538
4582
|
* @param {MouseEvent} e
|
|
4539
4583
|
*/
|
|
4540
4584
|
onThumbnailsClick(t) {
|
|
4541
|
-
if (
|
|
4585
|
+
if (gs(t) || window.pswp)
|
|
4542
4586
|
return;
|
|
4543
4587
|
let e = {
|
|
4544
4588
|
x: t.clientX,
|
|
@@ -4606,7 +4650,7 @@ class Ss extends bs {
|
|
|
4606
4650
|
} = this;
|
|
4607
4651
|
e && (i.dataSource = e);
|
|
4608
4652
|
const n = [], o = typeof i.pswpModule;
|
|
4609
|
-
if (
|
|
4653
|
+
if (vs(i.pswpModule))
|
|
4610
4654
|
n.push(Promise.resolve(
|
|
4611
4655
|
/** @type {Type<PhotoSwipe>} */
|
|
4612
4656
|
i.pswpModule
|
|
@@ -4622,7 +4666,7 @@ class Ss extends bs {
|
|
|
4622
4666
|
else
|
|
4623
4667
|
throw new Error("pswpModule is not valid");
|
|
4624
4668
|
}
|
|
4625
|
-
typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent =
|
|
4669
|
+
typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = As(t, this));
|
|
4626
4670
|
const r = ++this._uid;
|
|
4627
4671
|
Promise.all(n).then((a) => {
|
|
4628
4672
|
if (this.shouldOpen) {
|
|
@@ -4668,12 +4712,12 @@ class Ss extends bs {
|
|
|
4668
4712
|
});
|
|
4669
4713
|
}
|
|
4670
4714
|
}
|
|
4671
|
-
const
|
|
4715
|
+
const Ts = () => {
|
|
4672
4716
|
let s = null;
|
|
4673
|
-
return s = new
|
|
4717
|
+
return s = new xs({
|
|
4674
4718
|
gallery: "#photoswipe-gallery",
|
|
4675
4719
|
children: "a",
|
|
4676
|
-
pswpModule:
|
|
4720
|
+
pswpModule: ms,
|
|
4677
4721
|
zoom: !1,
|
|
4678
4722
|
imageClickAction: "next",
|
|
4679
4723
|
tapAction: "next"
|
|
@@ -4694,12 +4738,12 @@ const Ls = () => {
|
|
|
4694
4738
|
}), s.init(), () => {
|
|
4695
4739
|
s && (s.destroy(), s = null);
|
|
4696
4740
|
};
|
|
4697
|
-
},
|
|
4698
|
-
const s = document.querySelector(
|
|
4741
|
+
}, Ps = "mbrs-game-ranking", Is = ".c-header-page__ranking-button", Ms = () => {
|
|
4742
|
+
const s = document.querySelector(Is), t = s?.querySelector("button");
|
|
4699
4743
|
!s || !t || t.addEventListener("click", () => {
|
|
4700
|
-
document.getElementById(
|
|
4744
|
+
document.getElementById(Ps)?.scrollIntoView({ behavior: "smooth" });
|
|
4701
4745
|
});
|
|
4702
|
-
},
|
|
4746
|
+
}, $t = (s) => Math.min(100, Math.max(0, Math.round(s))), Os = ({
|
|
4703
4747
|
limitElement: s,
|
|
4704
4748
|
progressBar: t,
|
|
4705
4749
|
closeProgress: e,
|
|
@@ -4713,19 +4757,19 @@ const Ls = () => {
|
|
|
4713
4757
|
let a = o.scrollHeight - o.clientHeight;
|
|
4714
4758
|
if (!a)
|
|
4715
4759
|
return;
|
|
4716
|
-
s && (a = s.scrollHeight - o.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top)), t.style.width = `${
|
|
4760
|
+
s && (a = s.scrollHeight - o.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top)), t.style.width = `${$t(r / a * 100)}%`;
|
|
4717
4761
|
}
|
|
4718
4762
|
if (e && i && n) {
|
|
4719
4763
|
const a = window.pageYOffset + i.getBoundingClientRect().bottom, c = window.pageYOffset + n.getBoundingClientRect().bottom - o.clientHeight - a;
|
|
4720
4764
|
if (c > 0) {
|
|
4721
|
-
const d =
|
|
4765
|
+
const d = $t((r - a) / c * 100);
|
|
4722
4766
|
e.style.setProperty("--progress", `${d}`), e.parentElement?.classList.toggle(
|
|
4723
4767
|
"c-btn--close-progress-complete",
|
|
4724
4768
|
d >= 100
|
|
4725
4769
|
);
|
|
4726
4770
|
}
|
|
4727
4771
|
}
|
|
4728
|
-
},
|
|
4772
|
+
}, zs = () => {
|
|
4729
4773
|
const s = {
|
|
4730
4774
|
limitElement: document.querySelector(".js-limit-scroll-progress-bar"),
|
|
4731
4775
|
progressBar: document.querySelector(".c-progress__bar"),
|
|
@@ -4733,8 +4777,8 @@ const Ls = () => {
|
|
|
4733
4777
|
startElement: document.querySelector(".js-content-header"),
|
|
4734
4778
|
endElement: document.querySelector(".js-limit-scroll-close-article-btn")
|
|
4735
4779
|
};
|
|
4736
|
-
(s.progressBar || s.closeProgress) && window.addEventListener("scroll", () =>
|
|
4737
|
-
},
|
|
4780
|
+
(s.progressBar || s.closeProgress) && window.addEventListener("scroll", () => Os(s));
|
|
4781
|
+
}, Ds = (s = {}) => {
|
|
4738
4782
|
const { buttonSelector: t = ".c-scroll-to-top" } = s, e = document.querySelector(t), i = e?.querySelector("button");
|
|
4739
4783
|
if (!e || !i)
|
|
4740
4784
|
return;
|
|
@@ -4756,7 +4800,7 @@ const Ls = () => {
|
|
|
4756
4800
|
});
|
|
4757
4801
|
};
|
|
4758
4802
|
window.addEventListener("scroll", r), i.addEventListener("click", a), r();
|
|
4759
|
-
},
|
|
4803
|
+
}, $s = 500, Bs = () => {
|
|
4760
4804
|
const s = document.getElementById("mbrs-comments-container"), t = document.querySelector(".c-scroll-to-top-comment");
|
|
4761
4805
|
if (!s || !t)
|
|
4762
4806
|
return;
|
|
@@ -4772,7 +4816,7 @@ const Ls = () => {
|
|
|
4772
4816
|
}, o = () => {
|
|
4773
4817
|
e && (e = !1, window.removeEventListener("scroll", i), t.style.display = "none");
|
|
4774
4818
|
}, r = (u) => {
|
|
4775
|
-
u.offsetHeight >
|
|
4819
|
+
u.offsetHeight > $s ? n() : o();
|
|
4776
4820
|
}, a = (u) => {
|
|
4777
4821
|
new ResizeObserver(() => {
|
|
4778
4822
|
r(u);
|
|
@@ -4809,7 +4853,7 @@ const Ls = () => {
|
|
|
4809
4853
|
) && h.disconnect();
|
|
4810
4854
|
});
|
|
4811
4855
|
h.observe(s, { childList: !0, subtree: !0 });
|
|
4812
|
-
},
|
|
4856
|
+
}, Rs = "#page-content", re = "#text-tooltip", Fs = ".mbrs-social-report-container", ae = "c-text-tooltip--show", ks = [
|
|
4813
4857
|
"#page-content .c-content",
|
|
4814
4858
|
"#page-content .c-content p",
|
|
4815
4859
|
"#page-content .c-content h2",
|
|
@@ -4822,16 +4866,16 @@ const Ls = () => {
|
|
|
4822
4866
|
"#page-content header span",
|
|
4823
4867
|
"#page-content header h1",
|
|
4824
4868
|
"#page-content header h2"
|
|
4825
|
-
],
|
|
4826
|
-
const e =
|
|
4827
|
-
return
|
|
4828
|
-
},
|
|
4869
|
+
], Bt = (s) => s instanceof Element ? s : s.parentElement, Rt = (s, t) => s ? t.some((e) => !!s.closest(e)) : !1, Zs = (s, t) => {
|
|
4870
|
+
const e = Bt(s.startContainer), i = Bt(s.endContainer);
|
|
4871
|
+
return Rt(e, t) || Rt(i, t);
|
|
4872
|
+
}, qs = (s) => {
|
|
4829
4873
|
if (!s.focusNode)
|
|
4830
4874
|
return null;
|
|
4831
4875
|
const t = s.anchorNode?.compareDocumentPosition(s.focusNode);
|
|
4832
4876
|
return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
|
|
4833
|
-
},
|
|
4834
|
-
const i = document.querySelector(
|
|
4877
|
+
}, Hs = (s, t, e) => {
|
|
4878
|
+
const i = document.querySelector(re), n = document.querySelector(Rs), o = document.querySelectorAll(Fs);
|
|
4835
4879
|
if (!i || !n) {
|
|
4836
4880
|
console.warn("Text tooltip : Tooltip or page content are not found in the DOM");
|
|
4837
4881
|
return;
|
|
@@ -4849,11 +4893,11 @@ const Ls = () => {
|
|
|
4849
4893
|
i.style.top = `${Math.max(l, c)}px`, i.style.left = `${Math.min(
|
|
4850
4894
|
Math.max(l, d),
|
|
4851
4895
|
window.innerWidth - i.offsetWidth - l
|
|
4852
|
-
)}px`, i.classList.add(
|
|
4896
|
+
)}px`, i.classList.add(ae);
|
|
4853
4897
|
}, it = () => {
|
|
4854
|
-
const s = document.querySelector(`${
|
|
4855
|
-
s && s.classList.remove(
|
|
4856
|
-
},
|
|
4898
|
+
const s = document.querySelector(`${re}`);
|
|
4899
|
+
s && s.classList.remove(ae);
|
|
4900
|
+
}, Ns = () => {
|
|
4857
4901
|
const s = window.getSelection();
|
|
4858
4902
|
if (!s?.rangeCount) {
|
|
4859
4903
|
it();
|
|
@@ -4861,8 +4905,8 @@ const Ls = () => {
|
|
|
4861
4905
|
}
|
|
4862
4906
|
const t = s.getRangeAt(0), e = s.toString().trim();
|
|
4863
4907
|
if (e.length) {
|
|
4864
|
-
const i =
|
|
4865
|
-
i &&
|
|
4908
|
+
const i = Zs(t, ks), n = qs(s) || !1;
|
|
4909
|
+
i && Hs(t, n, e);
|
|
4866
4910
|
return;
|
|
4867
4911
|
}
|
|
4868
4912
|
it();
|
|
@@ -4871,26 +4915,26 @@ const Ls = () => {
|
|
|
4871
4915
|
window.getSelection()?.toString().trim().length || it();
|
|
4872
4916
|
return;
|
|
4873
4917
|
}
|
|
4874
|
-
|
|
4875
|
-
},
|
|
4918
|
+
Ns();
|
|
4919
|
+
}, Ws = () => {
|
|
4876
4920
|
if (!window?.getSelection) {
|
|
4877
4921
|
console.warn("Selection API isn't supported");
|
|
4878
4922
|
return;
|
|
4879
4923
|
}
|
|
4880
4924
|
document.addEventListener("mouseup", Q), document.addEventListener("selectionchange", Q), document.addEventListener("touchend", Q), document.addEventListener("touchcancel", Q);
|
|
4881
|
-
},
|
|
4925
|
+
}, Vs = (s) => {
|
|
4882
4926
|
const { target: t } = s;
|
|
4883
4927
|
if (t instanceof Element) {
|
|
4884
4928
|
const e = t.closest(".c-search-form--button");
|
|
4885
4929
|
e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
|
|
4886
4930
|
}
|
|
4887
|
-
},
|
|
4931
|
+
}, js = (s = document.querySelector(
|
|
4888
4932
|
".c-search-form--button"
|
|
4889
4933
|
)) => {
|
|
4890
4934
|
s && s.addEventListener("click", (t) => {
|
|
4891
|
-
|
|
4935
|
+
Vs(t);
|
|
4892
4936
|
});
|
|
4893
|
-
},
|
|
4937
|
+
}, Gs = ({
|
|
4894
4938
|
tabsContainerElement: s,
|
|
4895
4939
|
event: t
|
|
4896
4940
|
}) => {
|
|
@@ -4906,38 +4950,38 @@ const Ls = () => {
|
|
|
4906
4950
|
}), n.forEach((a) => {
|
|
4907
4951
|
a.setAttribute("aria-hidden", "true");
|
|
4908
4952
|
}), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
|
|
4909
|
-
},
|
|
4953
|
+
}, Ft = (s) => s.code === "ArrowLeft" || s.keyCode === 39, kt = (s) => s.code === "ArrowRight" || s.keyCode === 37, Us = (s = document.querySelectorAll(
|
|
4910
4954
|
".js-tabs"
|
|
4911
4955
|
)) => {
|
|
4912
4956
|
s.length > 0 && s.forEach((t) => {
|
|
4913
4957
|
const e = t.querySelectorAll('[role="tab"]');
|
|
4914
4958
|
e.forEach((n) => {
|
|
4915
4959
|
n.addEventListener("click", (o) => {
|
|
4916
|
-
|
|
4960
|
+
Gs({ tabsContainerElement: t, event: o });
|
|
4917
4961
|
});
|
|
4918
4962
|
});
|
|
4919
4963
|
const i = t.querySelector('[role="tablist"]');
|
|
4920
4964
|
if (i && e.length > 0) {
|
|
4921
4965
|
let n = 0;
|
|
4922
4966
|
i.addEventListener("keydown", (o) => {
|
|
4923
|
-
o instanceof KeyboardEvent && (
|
|
4967
|
+
o instanceof KeyboardEvent && (Ft(o) || kt(o)) && (e[n].setAttribute("tabindex", "-1"), Ft(o) ? (n += 1, n >= e.length && (n = 0)) : kt(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
|
|
4924
4968
|
});
|
|
4925
4969
|
}
|
|
4926
4970
|
});
|
|
4927
4971
|
}, st = (s) => {
|
|
4928
4972
|
const [t, e] = s.split("h").map(Number);
|
|
4929
4973
|
return t * 60 + e;
|
|
4930
|
-
},
|
|
4974
|
+
}, le = () => {
|
|
4931
4975
|
const s = /* @__PURE__ */ new Date(), t = s.getHours(), e = s.getMinutes();
|
|
4932
4976
|
return t * 60 + e;
|
|
4933
|
-
},
|
|
4934
|
-
const e =
|
|
4977
|
+
}, Ks = (s, t) => {
|
|
4978
|
+
const e = le();
|
|
4935
4979
|
if (e < s || e > t)
|
|
4936
4980
|
return 0;
|
|
4937
4981
|
const i = t - s;
|
|
4938
4982
|
return (e - s) / i;
|
|
4939
|
-
},
|
|
4940
|
-
const t =
|
|
4983
|
+
}, Xs = (s) => {
|
|
4984
|
+
const t = le();
|
|
4941
4985
|
let e = null, i = null, n = -1;
|
|
4942
4986
|
return Array.from(s).find((o, r, a) => {
|
|
4943
4987
|
if (r === a.length - 1)
|
|
@@ -4948,14 +4992,14 @@ const Ls = () => {
|
|
|
4948
4992
|
const d = st(l), h = st(c);
|
|
4949
4993
|
return t >= d && t < h ? (e = l, i = c, n = r, !0) : !1;
|
|
4950
4994
|
}), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n };
|
|
4951
|
-
},
|
|
4995
|
+
}, Ys = () => {
|
|
4952
4996
|
const s = document.querySelectorAll(".c-timeline__time");
|
|
4953
4997
|
if (!s || s.length < 2)
|
|
4954
4998
|
return;
|
|
4955
|
-
const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } =
|
|
4999
|
+
const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = Xs(s);
|
|
4956
5000
|
if (!e || !i)
|
|
4957
5001
|
return;
|
|
4958
|
-
const o = st(e), r = st(i), a =
|
|
5002
|
+
const o = st(e), r = st(i), a = Ks(o, r);
|
|
4959
5003
|
if (t instanceof HTMLElement) {
|
|
4960
5004
|
if (t.classList.contains("c-timeline__progress-bar--is-desktop") && s.length >= 5) {
|
|
4961
5005
|
const l = "172px / 2";
|
|
@@ -4994,25 +5038,25 @@ const Ls = () => {
|
|
|
4994
5038
|
}
|
|
4995
5039
|
}
|
|
4996
5040
|
}
|
|
4997
|
-
},
|
|
5041
|
+
}, dt = "c-icon-item__container--is-highlighted", Js = (s) => {
|
|
4998
5042
|
s.find(
|
|
4999
|
-
(e) => e.classList.contains(
|
|
5000
|
-
)?.classList.remove(
|
|
5001
|
-
},
|
|
5043
|
+
(e) => e.classList.contains(dt)
|
|
5044
|
+
)?.classList.remove(dt);
|
|
5045
|
+
}, Qs = () => {
|
|
5002
5046
|
const s = document.querySelector(".c-toolbar");
|
|
5003
5047
|
if (s) {
|
|
5004
5048
|
const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-icon-item__container"));
|
|
5005
|
-
|
|
5049
|
+
Js(e), e.find(
|
|
5006
5050
|
(n) => n.querySelector("a")?.getAttribute("href") === t
|
|
5007
|
-
)?.classList.add(
|
|
5051
|
+
)?.classList.add(dt);
|
|
5008
5052
|
}
|
|
5009
|
-
},
|
|
5053
|
+
}, tn = 12, gt = (s) => {
|
|
5010
5054
|
const t = s || document.querySelector(".c-map-towns");
|
|
5011
5055
|
if (!t) {
|
|
5012
5056
|
new MutationObserver((o, r) => {
|
|
5013
5057
|
if (typeof document < "u") {
|
|
5014
5058
|
const a = document.querySelector(".c-map-towns");
|
|
5015
|
-
a && (r.disconnect(),
|
|
5059
|
+
a && (r.disconnect(), gt(a));
|
|
5016
5060
|
}
|
|
5017
5061
|
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
5018
5062
|
return;
|
|
@@ -5042,7 +5086,7 @@ const Ls = () => {
|
|
|
5042
5086
|
d.setAttribute("y", `${A}`), l.setAttribute("aria-hidden", "false");
|
|
5043
5087
|
} else
|
|
5044
5088
|
a = !1;
|
|
5045
|
-
}), !a && r <
|
|
5089
|
+
}), !a && r < tn && requestAnimationFrame(() => o(r + 1));
|
|
5046
5090
|
};
|
|
5047
5091
|
return requestAnimationFrame(() => o()), !0;
|
|
5048
5092
|
};
|
|
@@ -5054,7 +5098,7 @@ const Ls = () => {
|
|
|
5054
5098
|
childList: !0,
|
|
5055
5099
|
subtree: !0
|
|
5056
5100
|
});
|
|
5057
|
-
},
|
|
5101
|
+
}, en = {
|
|
5058
5102
|
10: [{ id: "10387", name: "Troyes" }, { id: "10323", name: "Romilly-sur-Seine" }, { id: "10033", name: "Bar-sur-Aube" }],
|
|
5059
5103
|
11: [{ id: "11262", name: "Narbonne" }, { id: "11069", name: "Carcassonne" }, { id: "11076", name: "Castelnaudary" }],
|
|
5060
5104
|
12: [{ id: "12202", name: "Rodez" }, { id: "12145", name: "Millau" }, { id: "12300", name: "Villefranche-de-Rouergue" }],
|
|
@@ -5155,14 +5199,14 @@ const Ls = () => {
|
|
|
5155
5199
|
"07": [{ id: "07010", name: "Annonay" }, { id: "07019", name: "Aubenas" }, { id: "07324", name: "Tournon-sur-Rhône" }],
|
|
5156
5200
|
"05": [{ id: "05061", name: "Gap" }, { id: "05023", name: "Briançon" }, { id: "05046", name: "Embrun" }],
|
|
5157
5201
|
"08": [{ id: "08105", name: "Charleville-Mézières" }, { id: "08362", name: "Rethel" }, { id: "08190", name: "Givet" }]
|
|
5158
|
-
},
|
|
5202
|
+
}, sn = /<path\b([^>]*?)\/>/g, nn = /\b([:\w-]+)="([^"]*)"/g, on = (s) => {
|
|
5159
5203
|
const t = [];
|
|
5160
|
-
for (const e of s.matchAll(
|
|
5204
|
+
for (const e of s.matchAll(sn)) {
|
|
5161
5205
|
const i = e[1];
|
|
5162
5206
|
if (!i)
|
|
5163
5207
|
continue;
|
|
5164
5208
|
const n = /* @__PURE__ */ new Map();
|
|
5165
|
-
for (const c of i.matchAll(
|
|
5209
|
+
for (const c of i.matchAll(nn)) {
|
|
5166
5210
|
const [, d, h] = c;
|
|
5167
5211
|
d && n.set(d, h || "");
|
|
5168
5212
|
}
|
|
@@ -5175,9 +5219,9 @@ const Ls = () => {
|
|
|
5175
5219
|
});
|
|
5176
5220
|
}
|
|
5177
5221
|
return t;
|
|
5178
|
-
},
|
|
5222
|
+
}, rn = (s) => new Map(s.map((t) => [t.id, t])), tt = (s) => {
|
|
5179
5223
|
window.location.href = s;
|
|
5180
|
-
},
|
|
5224
|
+
}, an = (s, t, e) => {
|
|
5181
5225
|
const i = e.get(s);
|
|
5182
5226
|
if (i)
|
|
5183
5227
|
return i;
|
|
@@ -5192,7 +5236,7 @@ const Ls = () => {
|
|
|
5192
5236
|
(o) => o.id.startsWith(`town-${s}`)
|
|
5193
5237
|
);
|
|
5194
5238
|
return e.set(s, n), n;
|
|
5195
|
-
},
|
|
5239
|
+
}, ln = (s, t) => t.get(s), cn = (s) => {
|
|
5196
5240
|
if (s.size > 0)
|
|
5197
5241
|
return;
|
|
5198
5242
|
document.querySelectorAll(
|
|
@@ -5204,13 +5248,13 @@ const Ls = () => {
|
|
|
5204
5248
|
Array.from(e.classList).filter((n) => n.startsWith("c-map-towns__path--"))
|
|
5205
5249
|
);
|
|
5206
5250
|
});
|
|
5207
|
-
},
|
|
5251
|
+
}, dn = (s, t) => {
|
|
5208
5252
|
const e = s.id, i = s.url, n = s.name;
|
|
5209
5253
|
if (!e || !i)
|
|
5210
5254
|
return null;
|
|
5211
5255
|
const o = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
5212
5256
|
o.setAttribute("d", s.path), o.setAttribute("class", "c-map-towns__path c-map-towns__zoom-town"), o.setAttribute("data-url", i);
|
|
5213
|
-
const r =
|
|
5257
|
+
const r = ln(e, t);
|
|
5214
5258
|
if (r && r.forEach((a) => {
|
|
5215
5259
|
o.classList.add(a);
|
|
5216
5260
|
}), n) {
|
|
@@ -5218,15 +5262,15 @@ const Ls = () => {
|
|
|
5218
5262
|
a.textContent = n, o.appendChild(a);
|
|
5219
5263
|
}
|
|
5220
5264
|
return o;
|
|
5221
|
-
},
|
|
5265
|
+
}, hn = (s, t) => {
|
|
5222
5266
|
const e = document.createDocumentFragment();
|
|
5223
5267
|
return s.forEach((i) => {
|
|
5224
|
-
const n =
|
|
5268
|
+
const n = dn(i, t);
|
|
5225
5269
|
n && e.appendChild(n);
|
|
5226
5270
|
}), e;
|
|
5227
|
-
},
|
|
5271
|
+
}, un = (s, t) => {
|
|
5228
5272
|
s.replaceChildren(t);
|
|
5229
|
-
},
|
|
5273
|
+
}, pn = (s, t, e) => {
|
|
5230
5274
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
5231
5275
|
i.setAttribute("class", "js-city-marker c-map-towns__city-marker"), i.setAttribute("aria-hidden", "true"), i.setAttribute("data-scale", e.toString());
|
|
5232
5276
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -5237,7 +5281,7 @@ const Ls = () => {
|
|
|
5237
5281
|
r.setAttribute("class", "js-city-bg"), r.setAttribute("fill", "white"), r.setAttribute("rx", "4"), r.setAttribute("ry", "4");
|
|
5238
5282
|
const a = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
5239
5283
|
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;
|
|
5240
|
-
},
|
|
5284
|
+
}, mn = (s, t) => {
|
|
5241
5285
|
const e = t.getBBox(), i = 5, n = e.width + i * 2, o = e.height + i * 2;
|
|
5242
5286
|
s.setAttribute(
|
|
5243
5287
|
"viewBox",
|
|
@@ -5246,17 +5290,17 @@ const Ls = () => {
|
|
|
5246
5290
|
const r = s.clientWidth || 800, a = s.clientHeight || 600;
|
|
5247
5291
|
return Math.max(n / r, o / a);
|
|
5248
5292
|
};
|
|
5249
|
-
let
|
|
5250
|
-
const
|
|
5251
|
-
if (
|
|
5293
|
+
let ot = !1;
|
|
5294
|
+
const ht = () => {
|
|
5295
|
+
if (ot)
|
|
5252
5296
|
return;
|
|
5253
5297
|
if (!document.querySelector(".c-map-towns")) {
|
|
5254
5298
|
new MutationObserver((b, A) => {
|
|
5255
|
-
typeof document < "u" && document.querySelector(".c-map-towns") && (A.disconnect(),
|
|
5299
|
+
typeof document < "u" && document.querySelector(".c-map-towns") && (A.disconnect(), ht());
|
|
5256
5300
|
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
5257
5301
|
return;
|
|
5258
5302
|
}
|
|
5259
|
-
const t = window.layout ===
|
|
5303
|
+
const t = window.layout === ut.MOBILE, e = document.querySelector(".c-map-towns__map"), i = document.querySelector(".c-map-towns__droms"), n = document.querySelector(".c-map-towns__zooms"), o = (L) => {
|
|
5260
5304
|
const { target: b } = L;
|
|
5261
5305
|
if (!(b instanceof Element))
|
|
5262
5306
|
return;
|
|
@@ -5275,26 +5319,26 @@ const dt = () => {
|
|
|
5275
5319
|
O && tt(O);
|
|
5276
5320
|
};
|
|
5277
5321
|
if (t) {
|
|
5278
|
-
e?.addEventListener("click", o), i?.addEventListener("click", o), n?.addEventListener("click", o),
|
|
5322
|
+
e?.addEventListener("click", o), i?.addEventListener("click", o), n?.addEventListener("click", o), ot = !0;
|
|
5279
5323
|
return;
|
|
5280
5324
|
}
|
|
5281
5325
|
const r = document.getElementById("js-zoom-overlay"), a = document.getElementById("js-zoom-svg"), l = document.getElementById("js-zoom-group"), c = document.getElementById("js-zoom-close");
|
|
5282
5326
|
if (!(r instanceof HTMLElement) || !(a instanceof SVGSVGElement) || !(l instanceof SVGGElement) || !(c instanceof HTMLElement)) {
|
|
5283
|
-
requestAnimationFrame(
|
|
5327
|
+
requestAnimationFrame(ht);
|
|
5284
5328
|
return;
|
|
5285
5329
|
}
|
|
5286
|
-
|
|
5330
|
+
ot = !0;
|
|
5287
5331
|
const d = document.getElementById("js-zoom-label"), h = document.getElementById("js-zoom-title"), u = document.getElementById("js-town-sprite-data"), f = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
|
|
5288
5332
|
let p = null;
|
|
5289
5333
|
const y = () => {
|
|
5290
5334
|
if (p)
|
|
5291
5335
|
return p;
|
|
5292
5336
|
const L = u instanceof HTMLScriptElement ? JSON.parse(u.textContent || '""') : "";
|
|
5293
|
-
return p =
|
|
5337
|
+
return p = rn(on(L)), p;
|
|
5294
5338
|
}, w = () => {
|
|
5295
5339
|
r.setAttribute("aria-hidden", "true"), l.replaceChildren();
|
|
5296
5340
|
}, C = (L, b) => L.startsWith("97") ? document.querySelector(`path[id="town-${b}-drom"]`)?.getAttribute("d") || null : y().get(`town-${b}`)?.path || null, g = (L, b) => {
|
|
5297
|
-
const I =
|
|
5341
|
+
const I = en[L] || [];
|
|
5298
5342
|
if (I.length === 0)
|
|
5299
5343
|
return;
|
|
5300
5344
|
const M = document.createDocumentFragment();
|
|
@@ -5302,10 +5346,10 @@ const dt = () => {
|
|
|
5302
5346
|
const O = C(L, k.id);
|
|
5303
5347
|
if (!O)
|
|
5304
5348
|
return;
|
|
5305
|
-
const $ =
|
|
5349
|
+
const $ = pn(k.name, O, b);
|
|
5306
5350
|
M.appendChild($);
|
|
5307
5351
|
}), l.appendChild(M), requestAnimationFrame(() => {
|
|
5308
|
-
|
|
5352
|
+
gt(l);
|
|
5309
5353
|
});
|
|
5310
5354
|
}, _ = (L) => {
|
|
5311
5355
|
const { target: b } = L;
|
|
@@ -5314,13 +5358,13 @@ const dt = () => {
|
|
|
5314
5358
|
const A = b?.closest(".c-map-towns__dept-trigger");
|
|
5315
5359
|
if (!A)
|
|
5316
5360
|
return;
|
|
5317
|
-
const I = A.getAttribute("id")?.replace("out-", "") || "", M = A.getAttribute("data-name"), k =
|
|
5318
|
-
|
|
5319
|
-
const O =
|
|
5361
|
+
const I = A.getAttribute("id")?.replace("out-", "") || "", M = A.getAttribute("data-name"), k = an(I, y, f);
|
|
5362
|
+
cn(m);
|
|
5363
|
+
const O = hn(k, m);
|
|
5320
5364
|
if (d && h && M && (d.textContent = M, h.textContent = `Carte détaillée du département : ${M}`), !(A instanceof SVGGraphicsElement))
|
|
5321
5365
|
return;
|
|
5322
|
-
const $ =
|
|
5323
|
-
r.setAttribute("aria-hidden", "false"),
|
|
5366
|
+
const $ = mn(a, A);
|
|
5367
|
+
r.setAttribute("aria-hidden", "false"), un(l, O), g(I, $);
|
|
5324
5368
|
}, E = (L) => {
|
|
5325
5369
|
const { target: b } = L;
|
|
5326
5370
|
if (!(b instanceof Element))
|
|
@@ -5333,15 +5377,15 @@ const dt = () => {
|
|
|
5333
5377
|
}), r.addEventListener("click", (L) => {
|
|
5334
5378
|
L.target === r && w();
|
|
5335
5379
|
});
|
|
5336
|
-
},
|
|
5337
|
-
|
|
5380
|
+
}, bn = () => {
|
|
5381
|
+
ge(), Ue(), Us(), ze(), Ut(), Ne(), zs(), Ts(), ri(), Me(), js(), Be(), Ws(), Ke(), Xe(), Je(), ke(), ye(
|
|
5338
5382
|
"localisation-input",
|
|
5339
5383
|
"https://www.20minutes.fr/elections/resultats/recherche",
|
|
5340
5384
|
"?searchValue=",
|
|
5341
5385
|
"text",
|
|
5342
5386
|
"text"
|
|
5343
|
-
),
|
|
5387
|
+
), Fe(), gt(), Qs(), ue(), pe(), Qe(), ht(), ui(), pi(), Ye(), he(), Ys(), Ds(), Bs(), Ms();
|
|
5344
5388
|
};
|
|
5345
5389
|
export {
|
|
5346
|
-
|
|
5390
|
+
bn as initScripts
|
|
5347
5391
|
};
|