@20minutes/hela 2.26.4 → 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 +1502 -1455
- package/dist/index.umd.cjs +1 -1
- package/dist/js/scripts.es.js +461 -387
- 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 ne = () => /Android/i.test(navigator.userAgent), oe = 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 ne = () => /Android/i.test(navigator.userAgent), oe = 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 ne = () => /Android/i.test(navigator.userAgent), oe = 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,53 +143,83 @@ const ne = () => /Android/i.test(navigator.userAgent), oe = 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
|
-
|
|
128
|
-
}
|
|
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)`);
|
|
172
|
+
};
|
|
173
|
+
let rt = !1;
|
|
174
|
+
const jt = (s) => {
|
|
175
|
+
const t = s.target;
|
|
176
|
+
if (!(t instanceof Element))
|
|
177
|
+
return null;
|
|
178
|
+
const e = t.closest(we);
|
|
179
|
+
if (!(e instanceof HTMLElement))
|
|
180
|
+
return null;
|
|
181
|
+
const i = e.getAttribute("data-a11y-dialog-show"), n = i ? document.getElementById(i) : null;
|
|
182
|
+
return !(n instanceof HTMLElement) || n.contains(e) ? null : n;
|
|
183
|
+
}, Ce = (s) => {
|
|
184
|
+
rt = !!jt(s)?.matches(Zt);
|
|
185
|
+
}, xe = (s) => {
|
|
186
|
+
if (!rt)
|
|
187
|
+
return;
|
|
188
|
+
rt = !1;
|
|
189
|
+
const t = jt(s);
|
|
190
|
+
if (!(t instanceof HTMLElement))
|
|
191
|
+
return;
|
|
192
|
+
const e = t.querySelector(Ht);
|
|
193
|
+
e instanceof HTMLElement && e.click();
|
|
194
|
+
}, Te = () => {
|
|
129
195
|
if (U) {
|
|
130
|
-
if (K >
|
|
131
|
-
const s = U.querySelector(
|
|
196
|
+
if (K > Se) {
|
|
197
|
+
const s = U.querySelector(Ht);
|
|
132
198
|
s instanceof HTMLElement && s.click();
|
|
133
199
|
}
|
|
134
|
-
|
|
200
|
+
Vt();
|
|
135
201
|
}
|
|
136
|
-
},
|
|
202
|
+
}, Pe = (s, t) => {
|
|
203
|
+
const e = s.id;
|
|
204
|
+
e && document.querySelectorAll(`[data-a11y-dialog-show="${e}"]`).forEach((i) => {
|
|
205
|
+
!(i instanceof HTMLElement) || s.contains(i) || i.setAttribute("aria-expanded", t ? "true" : "false");
|
|
206
|
+
});
|
|
207
|
+
}, Ie = () => {
|
|
137
208
|
new MutationObserver((t) => {
|
|
138
209
|
t.forEach(({ target: e }) => {
|
|
139
|
-
e instanceof HTMLElement
|
|
210
|
+
if (!(e instanceof HTMLElement) || !e.matches(pt))
|
|
211
|
+
return;
|
|
212
|
+
const i = e.getAttribute("aria-hidden") !== "true";
|
|
213
|
+
i && Wt(e), Pe(e, i);
|
|
140
214
|
});
|
|
141
215
|
}).observe(document.body, {
|
|
142
216
|
attributes: !0,
|
|
143
217
|
attributeFilter: ["aria-hidden"],
|
|
144
218
|
subtree: !0
|
|
145
219
|
});
|
|
146
|
-
},
|
|
147
|
-
window.layout ===
|
|
148
|
-
},
|
|
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) => {
|
|
149
223
|
s.stopImmediatePropagation(), s.preventDefault();
|
|
150
224
|
const t = s.currentTarget;
|
|
151
225
|
if (t instanceof HTMLButtonElement) {
|
|
@@ -154,15 +228,15 @@ const Zt = (s) => {
|
|
|
154
228
|
);
|
|
155
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"));
|
|
156
230
|
}
|
|
157
|
-
},
|
|
231
|
+
}, ze = (s = document.querySelector(
|
|
158
232
|
".js-collapse__button"
|
|
159
233
|
)) => {
|
|
160
234
|
s && document.querySelectorAll(".c-collapse__button").forEach((e) => {
|
|
161
235
|
e.addEventListener("click", (i) => {
|
|
162
|
-
|
|
236
|
+
Oe(i);
|
|
163
237
|
});
|
|
164
238
|
});
|
|
165
|
-
},
|
|
239
|
+
}, De = "[data-countdown][data-countdown-end-date]", $e = (s) => {
|
|
166
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");
|
|
167
241
|
return !t || !e || !i || !n ? null : {
|
|
168
242
|
daysElement: t,
|
|
@@ -170,35 +244,35 @@ const Zt = (s) => {
|
|
|
170
244
|
minutesElement: i,
|
|
171
245
|
secondsElement: n
|
|
172
246
|
};
|
|
173
|
-
},
|
|
247
|
+
}, _t = (s, t) => {
|
|
174
248
|
const e = s - Date.now();
|
|
175
249
|
if (e <= 0)
|
|
176
250
|
return !1;
|
|
177
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);
|
|
178
252
|
return t.daysElement.textContent = i.toString(), t.hoursElement.textContent = n.toString(), t.minutesElement.textContent = o.toString(), t.secondsElement.textContent = r.toString(), !0;
|
|
179
|
-
},
|
|
180
|
-
document.querySelectorAll(
|
|
181
|
-
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);
|
|
182
256
|
if (!n)
|
|
183
257
|
return;
|
|
184
258
|
if (Number.isNaN(i)) {
|
|
185
259
|
t.remove();
|
|
186
260
|
return;
|
|
187
261
|
}
|
|
188
|
-
if (!
|
|
262
|
+
if (!_t(i, n)) {
|
|
189
263
|
t.remove();
|
|
190
264
|
return;
|
|
191
265
|
}
|
|
192
266
|
const o = setInterval(() => {
|
|
193
|
-
|
|
267
|
+
_t(i, n) || (clearInterval(o), t.remove());
|
|
194
268
|
}, 1e3);
|
|
195
269
|
});
|
|
196
|
-
},
|
|
270
|
+
}, Re = (s) => {
|
|
197
271
|
const t = s.getBBox(), e = t.width / 20;
|
|
198
272
|
return [t.x - e, t.y - e, t.width + e * 2, t.height + e * 2].join(
|
|
199
273
|
" "
|
|
200
274
|
);
|
|
201
|
-
},
|
|
275
|
+
}, Fe = () => {
|
|
202
276
|
const s = document.querySelector(".c-map-districts-container"), t = document.querySelector(".c-map-districts");
|
|
203
277
|
if (!s || !t)
|
|
204
278
|
return;
|
|
@@ -249,7 +323,7 @@ const Zt = (s) => {
|
|
|
249
323
|
);
|
|
250
324
|
d(
|
|
251
325
|
y || p,
|
|
252
|
-
|
|
326
|
+
Re(y || p)
|
|
253
327
|
);
|
|
254
328
|
}
|
|
255
329
|
}, u = () => {
|
|
@@ -258,7 +332,7 @@ const Zt = (s) => {
|
|
|
258
332
|
t.addEventListener("click", u), n && n.addEventListener("click", u), document.querySelectorAll(".c-map-districts__zoomable").forEach((m) => {
|
|
259
333
|
m.addEventListener("click", (p) => h(p));
|
|
260
334
|
});
|
|
261
|
-
},
|
|
335
|
+
}, ke = () => {
|
|
262
336
|
const s = document.getElementById("elections-form-search"), t = document.querySelector(".c-search-form__autocomplete");
|
|
263
337
|
if (!s || !t)
|
|
264
338
|
return;
|
|
@@ -286,59 +360,59 @@ const Zt = (s) => {
|
|
|
286
360
|
}), s.addEventListener("focusin", () => {
|
|
287
361
|
t.childElementCount > 0 && t.classList.remove("u-hidden");
|
|
288
362
|
});
|
|
289
|
-
},
|
|
363
|
+
}, Ze = (s, t) => {
|
|
290
364
|
s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => {
|
|
291
365
|
n.classList.remove(t);
|
|
292
366
|
});
|
|
293
367
|
const i = s.querySelector(".js-ellipsis-button__label");
|
|
294
368
|
i instanceof HTMLSpanElement && (i.innerHTML = "Voir moins");
|
|
295
|
-
},
|
|
369
|
+
}, qe = (s, t) => {
|
|
296
370
|
s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => {
|
|
297
371
|
n.classList.add(t);
|
|
298
372
|
}), s.setAttribute("aria-expanded", "false");
|
|
299
373
|
const i = s.querySelector(".js-ellipsis-button__label");
|
|
300
374
|
i instanceof HTMLSpanElement && (i.innerHTML = "Voir plus");
|
|
301
|
-
},
|
|
375
|
+
}, He = (s, t) => {
|
|
302
376
|
const e = s.currentTarget;
|
|
303
377
|
if (s.preventDefault(), e instanceof HTMLButtonElement) {
|
|
304
378
|
const i = t ? "u-ellipsis-multiline" : "u-ellipsis";
|
|
305
|
-
return e.getAttribute("aria-expanded") === "true" ?
|
|
379
|
+
return e.getAttribute("aria-expanded") === "true" ? qe(e, i) : Ze(e, i);
|
|
306
380
|
}
|
|
307
381
|
return null;
|
|
308
|
-
},
|
|
382
|
+
}, Ne = (s = document.querySelector(
|
|
309
383
|
".js-ellipsis-button"
|
|
310
384
|
)) => {
|
|
311
385
|
s && document.querySelectorAll(".js-ellipsis-button").forEach((e) => {
|
|
312
386
|
const i = e.getAttribute("data-multiple") === "true";
|
|
313
|
-
e.addEventListener("click", (n) =>
|
|
387
|
+
e.addEventListener("click", (n) => He(n, i));
|
|
314
388
|
});
|
|
315
|
-
},
|
|
389
|
+
}, We = (s) => {
|
|
316
390
|
s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => {
|
|
317
391
|
i.setAttribute("aria-hidden", "false");
|
|
318
392
|
});
|
|
319
393
|
const e = s.querySelector(".js-expand-button__label");
|
|
320
394
|
e instanceof HTMLSpanElement && (e.innerHTML = "Voir moins");
|
|
321
|
-
},
|
|
395
|
+
}, Ve = (s) => {
|
|
322
396
|
s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => {
|
|
323
397
|
i.setAttribute("aria-hidden", "true");
|
|
324
398
|
}), s.setAttribute("aria-expanded", "false");
|
|
325
399
|
const e = s.querySelector(".js-expand-button__label");
|
|
326
400
|
e instanceof HTMLSpanElement && (e.innerHTML = "Voir plus");
|
|
327
|
-
},
|
|
401
|
+
}, je = (s) => {
|
|
328
402
|
const t = s.currentTarget;
|
|
329
|
-
return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ?
|
|
330
|
-
},
|
|
403
|
+
return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? Ve(t) : We(t) : null;
|
|
404
|
+
}, Ge = (s) => {
|
|
331
405
|
const t = s.parentNode?.querySelector(".js-expand-target");
|
|
332
406
|
return !t || t.classList.contains("c-elections-result__members") ? !1 : (t.textContent?.trim().length ?? 0) < 255;
|
|
333
|
-
},
|
|
407
|
+
}, Ue = (s = document.querySelector(
|
|
334
408
|
".js-expand-button"
|
|
335
409
|
)) => {
|
|
336
410
|
s && document.querySelectorAll(".js-expand-button").forEach((e) => {
|
|
337
|
-
|
|
411
|
+
Ge(e) ? (e.style.display = "none", e.parentNode?.querySelectorAll(".js-expand-target")?.forEach((n) => {
|
|
338
412
|
n.setAttribute("aria-hidden", "false");
|
|
339
|
-
})) : e.addEventListener("click",
|
|
413
|
+
})) : e.addEventListener("click", je);
|
|
340
414
|
});
|
|
341
|
-
},
|
|
415
|
+
}, Gt = (s, t) => {
|
|
342
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;
|
|
343
417
|
if (e && i && n) {
|
|
344
418
|
const a = new IntersectionObserver(
|
|
@@ -352,10 +426,10 @@ const Zt = (s) => {
|
|
|
352
426
|
);
|
|
353
427
|
a.observe(e), a.observe(i);
|
|
354
428
|
}
|
|
355
|
-
},
|
|
429
|
+
}, Ke = () => Gt(".js-close-article-btn", ".js-limit-scroll-close-article-btn"), Xe = () => Gt(".js-chatbot-btn", ".js-limit-scroll-chatbot-btn"), Ye = () => {
|
|
356
430
|
const s = document.querySelector(".js-game-alert");
|
|
357
|
-
|
|
358
|
-
},
|
|
431
|
+
de && s && s.classList.remove("u-hidden");
|
|
432
|
+
}, Je = () => {
|
|
359
433
|
const s = document.querySelectorAll(".js-half-donut-result");
|
|
360
434
|
for (const t of Array.from(s)) {
|
|
361
435
|
const e = t.querySelector(".c-half-donut"), i = t.querySelector(".c-legend");
|
|
@@ -374,7 +448,7 @@ const Zt = (s) => {
|
|
|
374
448
|
});
|
|
375
449
|
});
|
|
376
450
|
}
|
|
377
|
-
},
|
|
451
|
+
}, Qe = () => {
|
|
378
452
|
const s = document.querySelector(".c-image-slider__container");
|
|
379
453
|
if (!s)
|
|
380
454
|
return () => {
|
|
@@ -438,18 +512,18 @@ const Zt = (s) => {
|
|
|
438
512
|
}), c(!0), h(), () => {
|
|
439
513
|
u();
|
|
440
514
|
};
|
|
441
|
-
},
|
|
515
|
+
}, ti = (s) => {
|
|
442
516
|
const t = s.currentTarget, e = t instanceof HTMLElement ? t.nextElementSibling : null;
|
|
443
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")));
|
|
444
|
-
},
|
|
518
|
+
}, wt = /* @__PURE__ */ new WeakSet(), Ut = () => {
|
|
445
519
|
if (typeof document > "u")
|
|
446
520
|
return;
|
|
447
521
|
document.querySelectorAll(".js-info-button").forEach((t) => {
|
|
448
|
-
!(t instanceof HTMLButtonElement) ||
|
|
522
|
+
!(t instanceof HTMLButtonElement) || wt.has(t) || (wt.add(t), t.addEventListener("click", ti));
|
|
449
523
|
});
|
|
450
524
|
};
|
|
451
525
|
if (typeof document < "u") {
|
|
452
|
-
const s = () =>
|
|
526
|
+
const s = () => Ut();
|
|
453
527
|
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", s, { once: !0 }) : s();
|
|
454
528
|
}
|
|
455
529
|
const v = {
|
|
@@ -457,7 +531,7 @@ const v = {
|
|
|
457
531
|
negTabIndex: ':not([tabindex^="-"])',
|
|
458
532
|
disabled: ":not(:disabled)"
|
|
459
533
|
};
|
|
460
|
-
var
|
|
534
|
+
var ei = [
|
|
461
535
|
`a[href]${v.inert}${v.negTabIndex}`,
|
|
462
536
|
`area[href]${v.inert}${v.negTabIndex}`,
|
|
463
537
|
`input:not([type="hidden"]):not([type="radio"])${v.inert}${v.negTabIndex}${v.disabled}`,
|
|
@@ -475,24 +549,24 @@ var We = [
|
|
|
475
549
|
`[contenteditable]${v.inert}${v.negTabIndex}`,
|
|
476
550
|
`[tabindex]${v.inert}${v.negTabIndex}`
|
|
477
551
|
];
|
|
478
|
-
function
|
|
552
|
+
function bt(s) {
|
|
479
553
|
(s.querySelector("[autofocus]") || s).focus();
|
|
480
554
|
}
|
|
481
|
-
function
|
|
555
|
+
function ii(s) {
|
|
482
556
|
const t = V(s, !0), e = t ? V(s, !1) || t : null;
|
|
483
557
|
return [t, e];
|
|
484
558
|
}
|
|
485
559
|
function V(s, t) {
|
|
486
|
-
if (t &&
|
|
560
|
+
if (t && Et(s))
|
|
487
561
|
return s;
|
|
488
|
-
if (
|
|
562
|
+
if (ni(s))
|
|
489
563
|
if (s.shadowRoot) {
|
|
490
|
-
let e =
|
|
564
|
+
let e = St(s.shadowRoot, t);
|
|
491
565
|
for (; e; ) {
|
|
492
566
|
const i = V(e, t);
|
|
493
567
|
if (i)
|
|
494
568
|
return i;
|
|
495
|
-
e =
|
|
569
|
+
e = Lt(e, t);
|
|
496
570
|
}
|
|
497
571
|
} else if (s.localName === "slot") {
|
|
498
572
|
const e = s.assignedElements({
|
|
@@ -505,51 +579,51 @@ function V(s, t) {
|
|
|
505
579
|
return n;
|
|
506
580
|
}
|
|
507
581
|
} else {
|
|
508
|
-
let e =
|
|
582
|
+
let e = St(s, t);
|
|
509
583
|
for (; e; ) {
|
|
510
584
|
const i = V(e, t);
|
|
511
585
|
if (i)
|
|
512
586
|
return i;
|
|
513
|
-
e =
|
|
587
|
+
e = Lt(e, t);
|
|
514
588
|
}
|
|
515
589
|
}
|
|
516
|
-
return !t &&
|
|
590
|
+
return !t && Et(s) ? s : null;
|
|
517
591
|
}
|
|
518
|
-
function
|
|
592
|
+
function St(s, t) {
|
|
519
593
|
return t ? s.firstElementChild : s.lastElementChild;
|
|
520
594
|
}
|
|
521
|
-
function
|
|
595
|
+
function Lt(s, t) {
|
|
522
596
|
return t ? s.nextElementSibling : s.previousElementSibling;
|
|
523
597
|
}
|
|
524
|
-
const
|
|
525
|
-
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) {
|
|
526
600
|
return s.shadowRoot && s.getAttribute("tabindex") === "-1" ? !1 : !s.matches(":disabled,[hidden],[inert]");
|
|
527
601
|
}
|
|
528
602
|
function j(s = document) {
|
|
529
603
|
const t = s.activeElement;
|
|
530
604
|
return t ? t.shadowRoot ? j(t.shadowRoot) || document.activeElement : t : null;
|
|
531
605
|
}
|
|
532
|
-
function
|
|
533
|
-
const [e, i] =
|
|
606
|
+
function oi(s, t) {
|
|
607
|
+
const [e, i] = ii(s);
|
|
534
608
|
if (!e)
|
|
535
609
|
return t.preventDefault();
|
|
536
610
|
const n = j();
|
|
537
611
|
t.shiftKey && n === e ? (i.focus(), t.preventDefault()) : !t.shiftKey && n === i && (e.focus(), t.preventDefault());
|
|
538
612
|
}
|
|
539
|
-
function
|
|
613
|
+
function B(s, t) {
|
|
540
614
|
function e(i) {
|
|
541
615
|
if (!i || i === document || i === window)
|
|
542
616
|
return null;
|
|
543
|
-
const n =
|
|
617
|
+
const n = Kt(i);
|
|
544
618
|
return n && (i = n), i.closest(s) || e(i.getRootNode().host);
|
|
545
619
|
}
|
|
546
620
|
return e(t);
|
|
547
621
|
}
|
|
548
|
-
function
|
|
549
|
-
return s.assignedSlot || (s.parentNode ?
|
|
622
|
+
function Kt(s) {
|
|
623
|
+
return s.assignedSlot || (s.parentNode ? Kt(s.parentNode) : null);
|
|
550
624
|
}
|
|
551
625
|
const Z = "data-a11y-dialog";
|
|
552
|
-
class
|
|
626
|
+
class Xt {
|
|
553
627
|
$el;
|
|
554
628
|
id;
|
|
555
629
|
previouslyFocused;
|
|
@@ -598,7 +672,7 @@ class Vt {
|
|
|
598
672
|
* Returns the instance to allow method chaining.
|
|
599
673
|
*/
|
|
600
674
|
show(t) {
|
|
601
|
-
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);
|
|
602
676
|
}
|
|
603
677
|
/**
|
|
604
678
|
* Hide the dialog.
|
|
@@ -646,7 +720,7 @@ class Vt {
|
|
|
646
720
|
* dialog are clicked, and call `show` or `hide`, respectively
|
|
647
721
|
*/
|
|
648
722
|
handleTriggerClicks(t) {
|
|
649
|
-
const e = t.composedPath()[0], i =
|
|
723
|
+
const e = t.composedPath()[0], i = B(`[${Z}-show="${this.id}"]`, e), n = B(`[${Z}-hide="${this.id}"]`, e), o = B(`[${Z}-hide]`, e) && B('[aria-modal="true"]', e) === this.$el;
|
|
650
724
|
i && this.show(t), (n || o) && this.hide(t);
|
|
651
725
|
}
|
|
652
726
|
/**
|
|
@@ -654,14 +728,14 @@ class Vt {
|
|
|
654
728
|
* (namely ESC and TAB)
|
|
655
729
|
*/
|
|
656
730
|
bindKeypress(t) {
|
|
657
|
-
if (
|
|
731
|
+
if (B('[aria-modal="true"]', j()) !== this.$el)
|
|
658
732
|
return;
|
|
659
733
|
let e = !1;
|
|
660
734
|
try {
|
|
661
735
|
e = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
|
|
662
736
|
} catch {
|
|
663
737
|
}
|
|
664
|
-
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);
|
|
665
739
|
}
|
|
666
740
|
/**
|
|
667
741
|
* If the dialog is shown and the focus is not within a dialog element (either
|
|
@@ -671,18 +745,18 @@ class Vt {
|
|
|
671
745
|
*/
|
|
672
746
|
maintainFocus() {
|
|
673
747
|
const t = j();
|
|
674
|
-
|
|
748
|
+
B(`[aria-modal="true"], [${Z}-ignore-focus-trap]`, t) || bt(this.$el);
|
|
675
749
|
}
|
|
676
750
|
}
|
|
677
|
-
function
|
|
751
|
+
function At() {
|
|
678
752
|
for (const s of document.querySelectorAll("[data-a11y-dialog]"))
|
|
679
|
-
new
|
|
753
|
+
new Xt(s);
|
|
680
754
|
}
|
|
681
|
-
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded",
|
|
682
|
-
const
|
|
755
|
+
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", At) : At());
|
|
756
|
+
const ri = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
683
757
|
if (!(s instanceof HTMLElement))
|
|
684
758
|
return;
|
|
685
|
-
const t = new
|
|
759
|
+
const t = new Xt(s);
|
|
686
760
|
if (s.id === "dialog-menu") {
|
|
687
761
|
const e = document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"), i = document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");
|
|
688
762
|
e.length > 0 && i.length > 0 && (t.on("show", () => {
|
|
@@ -704,27 +778,27 @@ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
704
778
|
}).on("hide", () => {
|
|
705
779
|
document.body.classList.remove("noscroll");
|
|
706
780
|
});
|
|
707
|
-
}), et = "50px",
|
|
781
|
+
}), et = "50px", ft = ({
|
|
708
782
|
navigationContainer: s,
|
|
709
783
|
navigatedList: t,
|
|
710
784
|
nextBtn: e,
|
|
711
785
|
prevBtn: i
|
|
712
786
|
}) => {
|
|
713
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 = "");
|
|
714
|
-
},
|
|
788
|
+
}, ai = ({
|
|
715
789
|
navigationContainer: s,
|
|
716
790
|
navigatedList: t,
|
|
717
791
|
nextBtn: e,
|
|
718
792
|
prevBtn: i
|
|
719
793
|
}) => {
|
|
720
794
|
const n = t.scrollLeft > 0, o = t.scrollLeft + (t.clientWidth + 0.5) < t.scrollWidth;
|
|
721
|
-
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({
|
|
722
796
|
navigationContainer: s,
|
|
723
797
|
navigatedList: t,
|
|
724
798
|
nextBtn: e,
|
|
725
799
|
prevBtn: i
|
|
726
800
|
});
|
|
727
|
-
},
|
|
801
|
+
}, li = ({
|
|
728
802
|
navigationContainer: s,
|
|
729
803
|
navigatedList: t,
|
|
730
804
|
nextBtn: e,
|
|
@@ -769,14 +843,14 @@ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
769
843
|
behavior: "smooth"
|
|
770
844
|
}), e.classList.remove("o-nav-button--visible"), i.classList.add("o-nav-button--visible");
|
|
771
845
|
}
|
|
772
|
-
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({
|
|
773
847
|
navigationContainer: s,
|
|
774
848
|
navigatedList: t,
|
|
775
849
|
nextBtn: e,
|
|
776
850
|
prevBtn: i
|
|
777
851
|
});
|
|
778
852
|
}
|
|
779
|
-
},
|
|
853
|
+
}, ci = ({
|
|
780
854
|
navigationContainer: s,
|
|
781
855
|
navigatedList: t,
|
|
782
856
|
nextBtn: e,
|
|
@@ -817,26 +891,26 @@ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
817
891
|
left: 0,
|
|
818
892
|
behavior: "smooth"
|
|
819
893
|
}), i.classList.remove("o-nav-button--visible"), t.clientWidth < t.scrollWidth && e.classList.add("o-nav-button--visible");
|
|
820
|
-
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({
|
|
821
895
|
navigationContainer: s,
|
|
822
896
|
navigatedList: t,
|
|
823
897
|
nextBtn: e,
|
|
824
898
|
prevBtn: i
|
|
825
899
|
});
|
|
826
900
|
}
|
|
827
|
-
},
|
|
901
|
+
}, di = ({
|
|
828
902
|
navigationContainer: s,
|
|
829
903
|
navigatedList: t,
|
|
830
904
|
nextBtn: e,
|
|
831
905
|
prevBtn: i
|
|
832
906
|
}) => {
|
|
833
|
-
|
|
907
|
+
ai({
|
|
834
908
|
navigationContainer: s,
|
|
835
909
|
navigatedList: t,
|
|
836
910
|
nextBtn: e,
|
|
837
911
|
prevBtn: i
|
|
838
912
|
});
|
|
839
|
-
},
|
|
913
|
+
}, hi = (s) => {
|
|
840
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(
|
|
841
915
|
".js-navigation-container__list"
|
|
842
916
|
), c = s.querySelector(".o-nav-button--next-button"), d = s.querySelector(
|
|
@@ -844,7 +918,7 @@ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
844
918
|
);
|
|
845
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(
|
|
846
920
|
"click",
|
|
847
|
-
|
|
921
|
+
li.bind(!1, {
|
|
848
922
|
navigationContainer: s,
|
|
849
923
|
navigatedList: l,
|
|
850
924
|
nextBtn: c,
|
|
@@ -853,7 +927,7 @@ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
853
927
|
})
|
|
854
928
|
), d.addEventListener(
|
|
855
929
|
"click",
|
|
856
|
-
|
|
930
|
+
ci.bind(!1, {
|
|
857
931
|
navigationContainer: s,
|
|
858
932
|
navigatedList: l,
|
|
859
933
|
nextBtn: c,
|
|
@@ -877,7 +951,7 @@ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
877
951
|
}, 0)), d.click());
|
|
878
952
|
}, n);
|
|
879
953
|
}
|
|
880
|
-
},
|
|
954
|
+
}, ui = () => {
|
|
881
955
|
const s = document.querySelectorAll(".js-navigation-container");
|
|
882
956
|
Array.from(s).forEach((t) => {
|
|
883
957
|
const e = t.querySelector(
|
|
@@ -887,13 +961,13 @@ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
887
961
|
const i = new ResizeObserver((n) => {
|
|
888
962
|
n.forEach((o) => {
|
|
889
963
|
const { width: r } = o.contentRect;
|
|
890
|
-
r > 0 && (
|
|
964
|
+
r > 0 && (hi(t), i.disconnect());
|
|
891
965
|
});
|
|
892
966
|
});
|
|
893
967
|
i.observe(e);
|
|
894
968
|
}
|
|
895
969
|
});
|
|
896
|
-
},
|
|
970
|
+
}, pi = () => {
|
|
897
971
|
const s = document.querySelectorAll(".js-navigation-container");
|
|
898
972
|
for (const t of Array.from(s))
|
|
899
973
|
if (t) {
|
|
@@ -906,7 +980,7 @@ const Ke = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
906
980
|
);
|
|
907
981
|
e && i && n && window.addEventListener(
|
|
908
982
|
"resize",
|
|
909
|
-
|
|
983
|
+
di.bind(!1, {
|
|
910
984
|
navigationContainer: t,
|
|
911
985
|
navigatedList: e,
|
|
912
986
|
nextBtn: i,
|
|
@@ -922,10 +996,10 @@ function x(s, t, e) {
|
|
|
922
996
|
function S(s, t) {
|
|
923
997
|
return s.x = t.x, s.y = t.y, t.id !== void 0 && (s.id = t.id), s;
|
|
924
998
|
}
|
|
925
|
-
function
|
|
999
|
+
function Yt(s) {
|
|
926
1000
|
s.x = Math.round(s.x), s.y = Math.round(s.y);
|
|
927
1001
|
}
|
|
928
|
-
function
|
|
1002
|
+
function at(s, t) {
|
|
929
1003
|
const e = Math.abs(s.x - t.x), i = Math.abs(s.y - t.y);
|
|
930
1004
|
return Math.sqrt(e * e + i * i);
|
|
931
1005
|
}
|
|
@@ -942,17 +1016,17 @@ function X(s, t, e) {
|
|
|
942
1016
|
function D(s, t, e, i) {
|
|
943
1017
|
s.style.transform = X(t, e, i);
|
|
944
1018
|
}
|
|
945
|
-
const
|
|
946
|
-
function
|
|
947
|
-
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";
|
|
948
1022
|
}
|
|
949
|
-
function
|
|
1023
|
+
function lt(s, t, e) {
|
|
950
1024
|
s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
|
|
951
1025
|
}
|
|
952
|
-
function
|
|
953
|
-
|
|
1026
|
+
function fi(s) {
|
|
1027
|
+
Jt(s);
|
|
954
1028
|
}
|
|
955
|
-
function
|
|
1029
|
+
function gi(s) {
|
|
956
1030
|
return "decode" in s ? s.decode().catch(() => {
|
|
957
1031
|
}) : s.complete ? Promise.resolve(s) : new Promise((t, e) => {
|
|
958
1032
|
s.onload = () => t(s), s.onerror = e;
|
|
@@ -964,10 +1038,10 @@ const T = {
|
|
|
964
1038
|
LOADED: "loaded",
|
|
965
1039
|
ERROR: "error"
|
|
966
1040
|
};
|
|
967
|
-
function
|
|
1041
|
+
function vi(s) {
|
|
968
1042
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
969
1043
|
}
|
|
970
|
-
function
|
|
1044
|
+
function yi(s, t, e = document) {
|
|
971
1045
|
let i = [];
|
|
972
1046
|
if (s instanceof Element)
|
|
973
1047
|
i = [s];
|
|
@@ -979,19 +1053,19 @@ function ai(s, t, e = document) {
|
|
|
979
1053
|
}
|
|
980
1054
|
return i;
|
|
981
1055
|
}
|
|
982
|
-
function
|
|
1056
|
+
function Ct() {
|
|
983
1057
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
984
1058
|
}
|
|
985
|
-
let
|
|
1059
|
+
let Qt = !1;
|
|
986
1060
|
try {
|
|
987
1061
|
window.addEventListener("test", null, Object.defineProperty({}, "passive", {
|
|
988
1062
|
get: () => {
|
|
989
|
-
|
|
1063
|
+
Qt = !0;
|
|
990
1064
|
}
|
|
991
1065
|
}));
|
|
992
1066
|
} catch {
|
|
993
1067
|
}
|
|
994
|
-
class
|
|
1068
|
+
class _i {
|
|
995
1069
|
constructor() {
|
|
996
1070
|
this._pool = [];
|
|
997
1071
|
}
|
|
@@ -1048,7 +1122,7 @@ class li {
|
|
|
1048
1122
|
listener: i,
|
|
1049
1123
|
passive: n
|
|
1050
1124
|
}));
|
|
1051
|
-
const d =
|
|
1125
|
+
const d = Qt ? {
|
|
1052
1126
|
passive: n || !1
|
|
1053
1127
|
} : !1;
|
|
1054
1128
|
t[a](c, i, d);
|
|
@@ -1056,7 +1130,7 @@ class li {
|
|
|
1056
1130
|
});
|
|
1057
1131
|
}
|
|
1058
1132
|
}
|
|
1059
|
-
function
|
|
1133
|
+
function te(s, t) {
|
|
1060
1134
|
if (s.getViewportSizeFn) {
|
|
1061
1135
|
const e = s.getViewportSizeFn(s, t);
|
|
1062
1136
|
if (e)
|
|
@@ -1071,7 +1145,7 @@ function Kt(s, t) {
|
|
|
1071
1145
|
y: window.innerHeight
|
|
1072
1146
|
};
|
|
1073
1147
|
}
|
|
1074
|
-
function
|
|
1148
|
+
function H(s, t, e, i, n) {
|
|
1075
1149
|
let o = 0;
|
|
1076
1150
|
if (t.paddingFn)
|
|
1077
1151
|
o = t.paddingFn(e, i, n)[s];
|
|
@@ -1083,13 +1157,13 @@ function N(s, t, e, i, n) {
|
|
|
1083
1157
|
}
|
|
1084
1158
|
return Number(o) || 0;
|
|
1085
1159
|
}
|
|
1086
|
-
function
|
|
1160
|
+
function ee(s, t, e, i) {
|
|
1087
1161
|
return {
|
|
1088
|
-
x: t.x -
|
|
1089
|
-
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)
|
|
1090
1164
|
};
|
|
1091
1165
|
}
|
|
1092
|
-
class
|
|
1166
|
+
class wi {
|
|
1093
1167
|
/**
|
|
1094
1168
|
* @param {Slide} slide
|
|
1095
1169
|
*/
|
|
@@ -1126,7 +1200,7 @@ class ci {
|
|
|
1126
1200
|
_updateAxis(t) {
|
|
1127
1201
|
const {
|
|
1128
1202
|
pswp: e
|
|
1129
|
-
} = 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];
|
|
1130
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];
|
|
1131
1205
|
}
|
|
1132
1206
|
// _getZeroBounds
|
|
@@ -1144,8 +1218,8 @@ class ci {
|
|
|
1144
1218
|
return Y(e, this.max[t], this.min[t]);
|
|
1145
1219
|
}
|
|
1146
1220
|
}
|
|
1147
|
-
const
|
|
1148
|
-
let
|
|
1221
|
+
const xt = 4e3;
|
|
1222
|
+
let ie = class {
|
|
1149
1223
|
/**
|
|
1150
1224
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
1151
1225
|
* @param {SlideData} itemData Slide data
|
|
@@ -1202,7 +1276,7 @@ let Yt = class {
|
|
|
1202
1276
|
*/
|
|
1203
1277
|
_getSecondary() {
|
|
1204
1278
|
let t = this._parseZoomLevelOption("secondary");
|
|
1205
|
-
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);
|
|
1206
1280
|
}
|
|
1207
1281
|
/**
|
|
1208
1282
|
* Get initial image zoom level.
|
|
@@ -1225,7 +1299,7 @@ let Yt = class {
|
|
|
1225
1299
|
return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
|
|
1226
1300
|
}
|
|
1227
1301
|
};
|
|
1228
|
-
class
|
|
1302
|
+
class bi {
|
|
1229
1303
|
/**
|
|
1230
1304
|
* @param {SlideData} data
|
|
1231
1305
|
* @param {number} index
|
|
@@ -1238,11 +1312,11 @@ class di {
|
|
|
1238
1312
|
}, this.pan = {
|
|
1239
1313
|
x: 0,
|
|
1240
1314
|
y: 0
|
|
1241
|
-
}, 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", {
|
|
1242
1316
|
slide: this,
|
|
1243
1317
|
data: this.data,
|
|
1244
1318
|
index: e
|
|
1245
|
-
}), 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", {
|
|
1246
1320
|
slide: this
|
|
1247
1321
|
});
|
|
1248
1322
|
}
|
|
@@ -1366,7 +1440,7 @@ class di {
|
|
|
1366
1440
|
transitionDuration: i
|
|
1367
1441
|
}), o.animations.stopAllPan();
|
|
1368
1442
|
const r = this.currZoomLevel;
|
|
1369
|
-
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);
|
|
1370
1444
|
const a = () => {
|
|
1371
1445
|
this._setResolution(t), this.applyCurrentZoomPan();
|
|
1372
1446
|
};
|
|
@@ -1467,7 +1541,7 @@ class di {
|
|
|
1467
1541
|
const {
|
|
1468
1542
|
pswp: t
|
|
1469
1543
|
} = this;
|
|
1470
|
-
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", {
|
|
1471
1545
|
slide: this
|
|
1472
1546
|
});
|
|
1473
1547
|
}
|
|
@@ -1495,11 +1569,11 @@ class di {
|
|
|
1495
1569
|
t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
|
|
1496
1570
|
}
|
|
1497
1571
|
}
|
|
1498
|
-
const
|
|
1499
|
-
function
|
|
1572
|
+
const Si = 0.35, Li = 0.6, Tt = 0.4, Pt = 0.5;
|
|
1573
|
+
function Ei(s, t) {
|
|
1500
1574
|
return s * t / (1 - t);
|
|
1501
1575
|
}
|
|
1502
|
-
class
|
|
1576
|
+
class Ai {
|
|
1503
1577
|
/**
|
|
1504
1578
|
* @param {Gestures} gestures
|
|
1505
1579
|
*/
|
|
@@ -1525,12 +1599,12 @@ class mi {
|
|
|
1525
1599
|
if (!this.pswp.dispatch("verticalDrag", {
|
|
1526
1600
|
panY: o
|
|
1527
1601
|
}).defaultPrevented) {
|
|
1528
|
-
this._setPanWithFriction("y", o,
|
|
1602
|
+
this._setPanWithFriction("y", o, Li);
|
|
1529
1603
|
const r = 1 - Math.abs(this._getVerticalDragRatio(n.pan.y));
|
|
1530
1604
|
this.pswp.applyBgOpacity(r), n.applyCurrentZoomPan();
|
|
1531
1605
|
}
|
|
1532
1606
|
} else
|
|
1533
|
-
this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (
|
|
1607
|
+
this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (Yt(n.pan), n.applyCurrentZoomPan()));
|
|
1534
1608
|
}
|
|
1535
1609
|
end() {
|
|
1536
1610
|
const {
|
|
@@ -1542,7 +1616,7 @@ class mi {
|
|
|
1542
1616
|
let n = 0;
|
|
1543
1617
|
if (this.pswp.animations.stopAll(), e.isShifted()) {
|
|
1544
1618
|
const r = (e.x - e.getCurrSlideX()) / this.pswp.viewportSize.x;
|
|
1545
|
-
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);
|
|
1546
1620
|
}
|
|
1547
1621
|
i && i.currZoomLevel > i.zoomLevels.max || this.gestures.isMultitouch ? this.gestures.zoomLevels.correctZoomPan(!0) : (this._finishPanGestureForAxis("x"), this._finishPanGestureForAxis("y"));
|
|
1548
1622
|
}
|
|
@@ -1561,10 +1635,10 @@ class mi {
|
|
|
1561
1635
|
const {
|
|
1562
1636
|
pan: n,
|
|
1563
1637
|
bounds: o
|
|
1564
|
-
} = 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);
|
|
1565
1639
|
if (a) {
|
|
1566
1640
|
const m = this._getVerticalDragRatio(r), p = this._getVerticalDragRatio(c);
|
|
1567
|
-
if (m < 0 && p < -
|
|
1641
|
+
if (m < 0 && p < -Tt || m > 0 && p > Tt) {
|
|
1568
1642
|
this.pswp.close();
|
|
1569
1643
|
return;
|
|
1570
1644
|
}
|
|
@@ -1676,16 +1750,16 @@ class mi {
|
|
|
1676
1750
|
} = n;
|
|
1677
1751
|
if (r.correctPan(t, e) !== e || i) {
|
|
1678
1752
|
const l = Math.round(e - o[t]);
|
|
1679
|
-
o[t] += l * (i ||
|
|
1753
|
+
o[t] += l * (i || Si);
|
|
1680
1754
|
} else
|
|
1681
1755
|
o[t] = e;
|
|
1682
1756
|
}
|
|
1683
1757
|
}
|
|
1684
|
-
const
|
|
1685
|
-
function
|
|
1758
|
+
const Ci = 0.05, xi = 0.15;
|
|
1759
|
+
function It(s, t, e) {
|
|
1686
1760
|
return s.x = (t.x + e.x) / 2, s.y = (t.y + e.y) / 2, s;
|
|
1687
1761
|
}
|
|
1688
|
-
class
|
|
1762
|
+
class Ti {
|
|
1689
1763
|
/**
|
|
1690
1764
|
* @param {Gestures} gestures
|
|
1691
1765
|
*/
|
|
@@ -1722,8 +1796,8 @@ class vi {
|
|
|
1722
1796
|
const a = r.zoomLevels.min, l = r.zoomLevels.max;
|
|
1723
1797
|
if (!r.isZoomable() || o.mainScroll.isShifted())
|
|
1724
1798
|
return;
|
|
1725
|
-
|
|
1726
|
-
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;
|
|
1727
1801
|
if (c > r.zoomLevels.initial + r.zoomLevels.initial / 15 && (this._wasOverFitZoomLevel = !0), c < a)
|
|
1728
1802
|
if (o.options.pinchToClose && !this._wasOverFitZoomLevel && this._startZoomLevel <= r.zoomLevels.initial) {
|
|
1729
1803
|
const d = 1 - (a - c) / (a / 1.2);
|
|
@@ -1731,8 +1805,8 @@ class vi {
|
|
|
1731
1805
|
bgOpacity: d
|
|
1732
1806
|
}).defaultPrevented || o.applyBgOpacity(d);
|
|
1733
1807
|
} else
|
|
1734
|
-
c = a - (a - c) *
|
|
1735
|
-
else c > l && (c = l + (c - l) *
|
|
1808
|
+
c = a - (a - c) * xi;
|
|
1809
|
+
else c > l && (c = l + (c - l) * Ci);
|
|
1736
1810
|
r.pan.x = this._calculatePanForZoomLevel("x", c), r.pan.y = this._calculatePanForZoomLevel("y", c), r.setZoomLevel(c), r.applyCurrentZoomPan();
|
|
1737
1811
|
}
|
|
1738
1812
|
end() {
|
|
@@ -1816,11 +1890,11 @@ class vi {
|
|
|
1816
1890
|
});
|
|
1817
1891
|
}
|
|
1818
1892
|
}
|
|
1819
|
-
function
|
|
1893
|
+
function Mt(s) {
|
|
1820
1894
|
return !!/** @type {HTMLElement} */
|
|
1821
1895
|
s.target.closest(".pswp__container");
|
|
1822
1896
|
}
|
|
1823
|
-
class
|
|
1897
|
+
class Pi {
|
|
1824
1898
|
/**
|
|
1825
1899
|
* @param {Gestures} gestures
|
|
1826
1900
|
*/
|
|
@@ -1843,14 +1917,14 @@ class yi {
|
|
|
1843
1917
|
* @param {PointerEvent} originalEvent
|
|
1844
1918
|
*/
|
|
1845
1919
|
tap(t, e) {
|
|
1846
|
-
|
|
1920
|
+
Mt(e) && this._doClickOrTapAction("tap", t, e);
|
|
1847
1921
|
}
|
|
1848
1922
|
/**
|
|
1849
1923
|
* @param {Point} point
|
|
1850
1924
|
* @param {PointerEvent} originalEvent
|
|
1851
1925
|
*/
|
|
1852
1926
|
doubleTap(t, e) {
|
|
1853
|
-
|
|
1927
|
+
Mt(e) && this._doClickOrTapAction("doubleTap", t, e);
|
|
1854
1928
|
}
|
|
1855
1929
|
/**
|
|
1856
1930
|
* @private
|
|
@@ -1894,8 +1968,8 @@ class yi {
|
|
|
1894
1968
|
}
|
|
1895
1969
|
}
|
|
1896
1970
|
}
|
|
1897
|
-
const
|
|
1898
|
-
class
|
|
1971
|
+
const Ii = 10, Mi = 300, Oi = 25;
|
|
1972
|
+
class zi {
|
|
1899
1973
|
/**
|
|
1900
1974
|
* @param {PhotoSwipe} pswp
|
|
1901
1975
|
*/
|
|
@@ -1927,7 +2001,7 @@ class Si {
|
|
|
1927
2001
|
}, this._intervalP1 = {
|
|
1928
2002
|
x: 0,
|
|
1929
2003
|
y: 0
|
|
1930
|
-
}, 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", () => {
|
|
1931
2005
|
t.events.add(
|
|
1932
2006
|
t.scrollWrap,
|
|
1933
2007
|
"click",
|
|
@@ -2047,8 +2121,8 @@ class Si {
|
|
|
2047
2121
|
this.tapHandler.click(this.startP1, t);
|
|
2048
2122
|
return;
|
|
2049
2123
|
}
|
|
2050
|
-
const i = this.pswp.options.doubleTapAction ?
|
|
2051
|
-
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(() => {
|
|
2052
2126
|
this.tapHandler.tap(this.startP1, t), this._clearTapTimer();
|
|
2053
2127
|
}, i));
|
|
2054
2128
|
}
|
|
@@ -2134,7 +2208,7 @@ class Si {
|
|
|
2134
2208
|
const t = Math.abs(this.p1.x - this.startP1.x) - Math.abs(this.p1.y - this.startP1.y);
|
|
2135
2209
|
if (t !== 0) {
|
|
2136
2210
|
const e = t > 0 ? "x" : "y";
|
|
2137
|
-
Math.abs(this.p1[e] - this.startP1[e]) >=
|
|
2211
|
+
Math.abs(this.p1[e] - this.startP1[e]) >= Ii && (this.dragAxis = e);
|
|
2138
2212
|
}
|
|
2139
2213
|
}
|
|
2140
2214
|
}
|
|
@@ -2158,8 +2232,8 @@ class Si {
|
|
|
2158
2232
|
this.pswp.mainScroll.isShifted() && (t.preventDefault(), t.stopPropagation());
|
|
2159
2233
|
}
|
|
2160
2234
|
}
|
|
2161
|
-
const
|
|
2162
|
-
class
|
|
2235
|
+
const Di = 0.35;
|
|
2236
|
+
class $i {
|
|
2163
2237
|
/**
|
|
2164
2238
|
* @param {PhotoSwipe} pswp
|
|
2165
2239
|
*/
|
|
@@ -2312,7 +2386,7 @@ class Ei {
|
|
|
2312
2386
|
let i = (this.slideWidth * this._currPositionIndex - t) / this.slideWidth;
|
|
2313
2387
|
i += this.pswp.currIndex;
|
|
2314
2388
|
const n = Math.round(t - this.x);
|
|
2315
|
-
(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);
|
|
2316
2390
|
}
|
|
2317
2391
|
this.x = t, this.pswp.container && D(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
|
|
2318
2392
|
x: t,
|
|
@@ -2320,7 +2394,7 @@ class Ei {
|
|
|
2320
2394
|
});
|
|
2321
2395
|
}
|
|
2322
2396
|
}
|
|
2323
|
-
const
|
|
2397
|
+
const Bi = {
|
|
2324
2398
|
Escape: 27,
|
|
2325
2399
|
z: 90,
|
|
2326
2400
|
ArrowLeft: 37,
|
|
@@ -2328,8 +2402,8 @@ const Ai = {
|
|
|
2328
2402
|
ArrowRight: 39,
|
|
2329
2403
|
ArrowDown: 40,
|
|
2330
2404
|
Tab: 9
|
|
2331
|
-
},
|
|
2332
|
-
class
|
|
2405
|
+
}, z = (s, t) => t ? s : Bi[s];
|
|
2406
|
+
class Ri {
|
|
2333
2407
|
/**
|
|
2334
2408
|
* @param {PhotoSwipe} pswp
|
|
2335
2409
|
*/
|
|
@@ -2369,30 +2443,30 @@ class Ci {
|
|
|
2369
2443
|
} = this;
|
|
2370
2444
|
if (e.dispatch("keydown", {
|
|
2371
2445
|
originalEvent: t
|
|
2372
|
-
}).defaultPrevented ||
|
|
2446
|
+
}).defaultPrevented || vi(t))
|
|
2373
2447
|
return;
|
|
2374
2448
|
let i, n, o = !1;
|
|
2375
2449
|
const r = "key" in t;
|
|
2376
2450
|
switch (r ? t.key : t.keyCode) {
|
|
2377
|
-
case
|
|
2451
|
+
case z("Escape", r):
|
|
2378
2452
|
e.options.escKey && (i = "close");
|
|
2379
2453
|
break;
|
|
2380
|
-
case
|
|
2454
|
+
case z("z", r):
|
|
2381
2455
|
i = "toggleZoom";
|
|
2382
2456
|
break;
|
|
2383
|
-
case
|
|
2457
|
+
case z("ArrowLeft", r):
|
|
2384
2458
|
n = "x";
|
|
2385
2459
|
break;
|
|
2386
|
-
case
|
|
2460
|
+
case z("ArrowUp", r):
|
|
2387
2461
|
n = "y";
|
|
2388
2462
|
break;
|
|
2389
|
-
case
|
|
2463
|
+
case z("ArrowRight", r):
|
|
2390
2464
|
n = "x", o = !0;
|
|
2391
2465
|
break;
|
|
2392
|
-
case
|
|
2466
|
+
case z("ArrowDown", r):
|
|
2393
2467
|
o = !0, n = "y";
|
|
2394
2468
|
break;
|
|
2395
|
-
case
|
|
2469
|
+
case z("Tab", r):
|
|
2396
2470
|
this._focusRoot();
|
|
2397
2471
|
break;
|
|
2398
2472
|
}
|
|
@@ -2421,8 +2495,8 @@ class Ci {
|
|
|
2421
2495
|
) && e.focus();
|
|
2422
2496
|
}
|
|
2423
2497
|
}
|
|
2424
|
-
const
|
|
2425
|
-
class
|
|
2498
|
+
const Fi = "cubic-bezier(.4,0,.22,1)";
|
|
2499
|
+
class ki {
|
|
2426
2500
|
/**
|
|
2427
2501
|
* onComplete can be unpredictable, be careful about current state
|
|
2428
2502
|
*
|
|
@@ -2438,12 +2512,12 @@ class Ti {
|
|
|
2438
2512
|
onFinish: r = () => {
|
|
2439
2513
|
},
|
|
2440
2514
|
duration: a = 333,
|
|
2441
|
-
easing: l =
|
|
2515
|
+
easing: l = Fi
|
|
2442
2516
|
} = t;
|
|
2443
2517
|
this.onFinish = r;
|
|
2444
2518
|
const c = o ? "transform" : "opacity", d = (e = t[c]) !== null && e !== void 0 ? e : "";
|
|
2445
2519
|
this._target = i, this._onComplete = n, this._finished = !1, this._onTransitionEnd = this._onTransitionEnd.bind(this), this._helperTimeout = setTimeout(() => {
|
|
2446
|
-
|
|
2520
|
+
Jt(i, c, a, l), this._helperTimeout = setTimeout(() => {
|
|
2447
2521
|
i.addEventListener("transitionend", this._onTransitionEnd, !1), i.addEventListener("transitioncancel", this._onTransitionEnd, !1), this._helperTimeout = setTimeout(() => {
|
|
2448
2522
|
this._finalizeAnimation();
|
|
2449
2523
|
}, a + 500), i.style[c] = d;
|
|
@@ -2465,11 +2539,11 @@ class Ti {
|
|
|
2465
2539
|
}
|
|
2466
2540
|
// Destroy is called automatically onFinish
|
|
2467
2541
|
destroy() {
|
|
2468
|
-
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();
|
|
2469
2543
|
}
|
|
2470
2544
|
}
|
|
2471
|
-
const
|
|
2472
|
-
class
|
|
2545
|
+
const Zi = 12, qi = 0.75;
|
|
2546
|
+
class Hi {
|
|
2473
2547
|
/**
|
|
2474
2548
|
* @param {number} initialVelocity Initial velocity, px per ms.
|
|
2475
2549
|
*
|
|
@@ -2486,7 +2560,7 @@ class Mi {
|
|
|
2486
2560
|
* Recommended value from 10 to 50
|
|
2487
2561
|
*/
|
|
2488
2562
|
constructor(t, e, i) {
|
|
2489
|
-
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));
|
|
2490
2564
|
}
|
|
2491
2565
|
/**
|
|
2492
2566
|
* @param {number} deltaPosition Difference between current and end position of the animation
|
|
@@ -2508,7 +2582,7 @@ class Mi {
|
|
|
2508
2582
|
return i;
|
|
2509
2583
|
}
|
|
2510
2584
|
}
|
|
2511
|
-
class
|
|
2585
|
+
class Ni {
|
|
2512
2586
|
/**
|
|
2513
2587
|
* @param {SpringAnimationProps} props
|
|
2514
2588
|
*/
|
|
@@ -2526,7 +2600,7 @@ class zi {
|
|
|
2526
2600
|
naturalFrequency: c
|
|
2527
2601
|
} = t;
|
|
2528
2602
|
this.onFinish = a;
|
|
2529
|
-
const d = new
|
|
2603
|
+
const d = new Hi(n, l, c);
|
|
2530
2604
|
let h = Date.now(), u = e - i;
|
|
2531
2605
|
const f = () => {
|
|
2532
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)));
|
|
@@ -2538,7 +2612,7 @@ class zi {
|
|
|
2538
2612
|
this._raf >= 0 && cancelAnimationFrame(this._raf), this._raf = 0;
|
|
2539
2613
|
}
|
|
2540
2614
|
}
|
|
2541
|
-
class
|
|
2615
|
+
class Wi {
|
|
2542
2616
|
constructor() {
|
|
2543
2617
|
this.activeAnimations = [];
|
|
2544
2618
|
}
|
|
@@ -2561,10 +2635,10 @@ class Oi {
|
|
|
2561
2635
|
* @returns {Animation}
|
|
2562
2636
|
*/
|
|
2563
2637
|
_start(t, e) {
|
|
2564
|
-
const i = e ? new
|
|
2638
|
+
const i = e ? new Ni(
|
|
2565
2639
|
/** @type SpringAnimationProps */
|
|
2566
2640
|
t
|
|
2567
|
-
) : new
|
|
2641
|
+
) : new ki(
|
|
2568
2642
|
/** @type CssAnimationProps */
|
|
2569
2643
|
t
|
|
2570
2644
|
);
|
|
@@ -2607,7 +2681,7 @@ class Oi {
|
|
|
2607
2681
|
return this.activeAnimations.some((t) => t.props.isPan);
|
|
2608
2682
|
}
|
|
2609
2683
|
}
|
|
2610
|
-
class
|
|
2684
|
+
class Vi {
|
|
2611
2685
|
/**
|
|
2612
2686
|
* @param {PhotoSwipe} pswp
|
|
2613
2687
|
*/
|
|
@@ -2649,7 +2723,7 @@ class Di {
|
|
|
2649
2723
|
e.isPannable() && (t.deltaMode === 1 && (i *= 18, n *= 18), e.panTo(e.pan.x - i, e.pan.y - n));
|
|
2650
2724
|
}
|
|
2651
2725
|
}
|
|
2652
|
-
function
|
|
2726
|
+
function ji(s) {
|
|
2653
2727
|
if (typeof s == "string")
|
|
2654
2728
|
return s;
|
|
2655
2729
|
if (!s || !s.isCustomSVG)
|
|
@@ -2661,7 +2735,7 @@ function $i(s) {
|
|
|
2661
2735
|
t.size || 32
|
|
2662
2736
|
), t.outlineID && (e += '<use class="pswp__icn-shadow" xlink:href="#' + t.outlineID + '"/>'), e += t.inner, e += "</svg>", e;
|
|
2663
2737
|
}
|
|
2664
|
-
class
|
|
2738
|
+
class Gi {
|
|
2665
2739
|
/**
|
|
2666
2740
|
* @param {PhotoSwipe} pswp
|
|
2667
2741
|
* @param {UIElementData} data
|
|
@@ -2693,7 +2767,7 @@ class Ri {
|
|
|
2693
2767
|
const f = u || h;
|
|
2694
2768
|
f && l.setAttribute("aria-label", f);
|
|
2695
2769
|
}
|
|
2696
|
-
l.innerHTML =
|
|
2770
|
+
l.innerHTML = ji(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (h) => {
|
|
2697
2771
|
typeof e.onClick == "string" ? t[e.onClick]() : typeof e.onClick == "function" && e.onClick(h, l, t);
|
|
2698
2772
|
});
|
|
2699
2773
|
const c = e.appendTo || "bar";
|
|
@@ -2701,12 +2775,12 @@ class Ri {
|
|
|
2701
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));
|
|
2702
2776
|
}
|
|
2703
2777
|
}
|
|
2704
|
-
function
|
|
2778
|
+
function se(s, t, e) {
|
|
2705
2779
|
s.classList.add("pswp__button--arrow"), s.setAttribute("aria-controls", "pswp__items"), t.on("change", () => {
|
|
2706
2780
|
t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
|
|
2707
2781
|
});
|
|
2708
2782
|
}
|
|
2709
|
-
const
|
|
2783
|
+
const Ui = {
|
|
2710
2784
|
name: "arrowPrev",
|
|
2711
2785
|
className: "pswp__button--arrow--prev",
|
|
2712
2786
|
title: "Previous",
|
|
@@ -2720,8 +2794,8 @@ const Bi = {
|
|
|
2720
2794
|
outlineID: "pswp__icn-arrow"
|
|
2721
2795
|
},
|
|
2722
2796
|
onClick: "prev",
|
|
2723
|
-
onInit:
|
|
2724
|
-
},
|
|
2797
|
+
onInit: se
|
|
2798
|
+
}, Ki = {
|
|
2725
2799
|
name: "arrowNext",
|
|
2726
2800
|
className: "pswp__button--arrow--next",
|
|
2727
2801
|
title: "Next",
|
|
@@ -2736,9 +2810,9 @@ const Bi = {
|
|
|
2736
2810
|
},
|
|
2737
2811
|
onClick: "next",
|
|
2738
2812
|
onInit: (s, t) => {
|
|
2739
|
-
|
|
2813
|
+
se(s, t, !0);
|
|
2740
2814
|
}
|
|
2741
|
-
},
|
|
2815
|
+
}, Xi = {
|
|
2742
2816
|
name: "close",
|
|
2743
2817
|
title: "Close",
|
|
2744
2818
|
order: 20,
|
|
@@ -2749,7 +2823,7 @@ const Bi = {
|
|
|
2749
2823
|
outlineID: "pswp__icn-close"
|
|
2750
2824
|
},
|
|
2751
2825
|
onClick: "close"
|
|
2752
|
-
},
|
|
2826
|
+
}, Yi = {
|
|
2753
2827
|
name: "zoom",
|
|
2754
2828
|
title: "Zoom",
|
|
2755
2829
|
order: 10,
|
|
@@ -2761,7 +2835,7 @@ const Bi = {
|
|
|
2761
2835
|
outlineID: "pswp__icn-zoom"
|
|
2762
2836
|
},
|
|
2763
2837
|
onClick: "toggleZoom"
|
|
2764
|
-
},
|
|
2838
|
+
}, Ji = {
|
|
2765
2839
|
name: "preloader",
|
|
2766
2840
|
appendTo: "bar",
|
|
2767
2841
|
order: 7,
|
|
@@ -2792,7 +2866,7 @@ const Bi = {
|
|
|
2792
2866
|
t.currSlide === a.slide && r();
|
|
2793
2867
|
}), t.ui && (t.ui.updatePreloaderVisibility = r);
|
|
2794
2868
|
}
|
|
2795
|
-
},
|
|
2869
|
+
}, Qi = {
|
|
2796
2870
|
name: "counter",
|
|
2797
2871
|
order: 5,
|
|
2798
2872
|
onInit: (s, t) => {
|
|
@@ -2801,10 +2875,10 @@ const Bi = {
|
|
|
2801
2875
|
});
|
|
2802
2876
|
}
|
|
2803
2877
|
};
|
|
2804
|
-
function
|
|
2878
|
+
function Ot(s, t) {
|
|
2805
2879
|
s.classList.toggle("pswp--zoomed-in", t);
|
|
2806
2880
|
}
|
|
2807
|
-
class
|
|
2881
|
+
class ts {
|
|
2808
2882
|
/**
|
|
2809
2883
|
* @param {PhotoSwipe} pswp
|
|
2810
2884
|
*/
|
|
@@ -2816,7 +2890,7 @@ class Hi {
|
|
|
2816
2890
|
const {
|
|
2817
2891
|
pswp: t
|
|
2818
2892
|
} = this;
|
|
2819
|
-
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) => {
|
|
2820
2894
|
this.registerElement(e);
|
|
2821
2895
|
}), t.on("change", () => {
|
|
2822
2896
|
var e;
|
|
@@ -2827,7 +2901,7 @@ class Hi {
|
|
|
2827
2901
|
* @param {UIElementData} elementData
|
|
2828
2902
|
*/
|
|
2829
2903
|
registerElement(t) {
|
|
2830
|
-
this.isRegistered ? this.items.push(new
|
|
2904
|
+
this.isRegistered ? this.items.push(new Gi(this.pswp, t)) : this.uiElementsData.push(t);
|
|
2831
2905
|
}
|
|
2832
2906
|
/**
|
|
2833
2907
|
* Fired each time zoom or pan position is changed.
|
|
@@ -2851,15 +2925,15 @@ class Hi {
|
|
|
2851
2925
|
this._lastUpdatedZoomLevel = n;
|
|
2852
2926
|
const o = e.zoomLevels.initial - e.zoomLevels.secondary;
|
|
2853
2927
|
if (Math.abs(o) < 0.01 || !e.isZoomable()) {
|
|
2854
|
-
|
|
2928
|
+
Ot(t, !1), t.classList.remove("pswp--zoom-allowed");
|
|
2855
2929
|
return;
|
|
2856
2930
|
}
|
|
2857
2931
|
t.classList.add("pswp--zoom-allowed");
|
|
2858
2932
|
const r = n === e.zoomLevels.initial ? e.zoomLevels.secondary : e.zoomLevels.initial;
|
|
2859
|
-
|
|
2933
|
+
Ot(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
|
|
2860
2934
|
}
|
|
2861
2935
|
}
|
|
2862
|
-
function
|
|
2936
|
+
function es(s) {
|
|
2863
2937
|
const t = s.getBoundingClientRect();
|
|
2864
2938
|
return {
|
|
2865
2939
|
x: t.left,
|
|
@@ -2867,7 +2941,7 @@ function Wi(s) {
|
|
|
2867
2941
|
w: t.width
|
|
2868
2942
|
};
|
|
2869
2943
|
}
|
|
2870
|
-
function
|
|
2944
|
+
function is(s, t, e) {
|
|
2871
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 = {
|
|
2872
2946
|
x: i.left + a,
|
|
2873
2947
|
y: i.top + l,
|
|
@@ -2880,7 +2954,7 @@ function Vi(s, t, e) {
|
|
|
2880
2954
|
y: l
|
|
2881
2955
|
}, c;
|
|
2882
2956
|
}
|
|
2883
|
-
function
|
|
2957
|
+
function ss(s, t, e) {
|
|
2884
2958
|
const i = e.dispatch("thumbBounds", {
|
|
2885
2959
|
index: s,
|
|
2886
2960
|
itemData: t,
|
|
@@ -2899,9 +2973,9 @@ function ji(s, t, e) {
|
|
|
2899
2973
|
n.querySelector(a)
|
|
2900
2974
|
);
|
|
2901
2975
|
}
|
|
2902
|
-
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);
|
|
2903
2977
|
}
|
|
2904
|
-
let
|
|
2978
|
+
let ns = class {
|
|
2905
2979
|
/**
|
|
2906
2980
|
* @param {T} type
|
|
2907
2981
|
* @param {PhotoSwipeEventsMap[T]} [details]
|
|
@@ -2912,7 +2986,7 @@ let Gi = class {
|
|
|
2912
2986
|
preventDefault() {
|
|
2913
2987
|
this.defaultPrevented = !0;
|
|
2914
2988
|
}
|
|
2915
|
-
},
|
|
2989
|
+
}, os = class {
|
|
2916
2990
|
constructor() {
|
|
2917
2991
|
this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
|
|
2918
2992
|
}
|
|
@@ -2979,13 +3053,13 @@ let Gi = class {
|
|
|
2979
3053
|
return this.pswp.dispatch(t, e);
|
|
2980
3054
|
const n = (
|
|
2981
3055
|
/** @type {AugmentedEvent<T>} */
|
|
2982
|
-
new
|
|
3056
|
+
new ns(t, e)
|
|
2983
3057
|
);
|
|
2984
3058
|
return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
|
|
2985
3059
|
o.call(this, n);
|
|
2986
3060
|
}), n;
|
|
2987
3061
|
}
|
|
2988
|
-
},
|
|
3062
|
+
}, rs = class {
|
|
2989
3063
|
/**
|
|
2990
3064
|
* @param {string | false} imageSrc
|
|
2991
3065
|
* @param {HTMLElement} container
|
|
@@ -3005,13 +3079,13 @@ let Gi = class {
|
|
|
3005
3079
|
* @param {number} height
|
|
3006
3080
|
*/
|
|
3007
3081
|
setDisplayedSize(t, e) {
|
|
3008
|
-
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));
|
|
3009
3083
|
}
|
|
3010
3084
|
destroy() {
|
|
3011
3085
|
var t;
|
|
3012
3086
|
(t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
|
|
3013
3087
|
}
|
|
3014
|
-
},
|
|
3088
|
+
}, as = class {
|
|
3015
3089
|
/**
|
|
3016
3090
|
* @param {SlideData} itemData Slide data
|
|
3017
3091
|
* @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
|
|
@@ -3046,7 +3120,7 @@ let Gi = class {
|
|
|
3046
3120
|
this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
|
|
3047
3121
|
this
|
|
3048
3122
|
);
|
|
3049
|
-
this.placeholder = new
|
|
3123
|
+
this.placeholder = new rs(i, this.slide.container);
|
|
3050
3124
|
}
|
|
3051
3125
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
3052
3126
|
content: this,
|
|
@@ -3134,7 +3208,7 @@ let Gi = class {
|
|
|
3134
3208
|
content: this,
|
|
3135
3209
|
width: t,
|
|
3136
3210
|
height: e
|
|
3137
|
-
}).defaultPrevented && (
|
|
3211
|
+
}).defaultPrevented && (lt(this.element, t, e), this.isImageContent() && !this.isError()))) {
|
|
3138
3212
|
const i = !this.displayedImageWidth && t;
|
|
3139
3213
|
this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
|
|
3140
3214
|
slide: this.slide,
|
|
@@ -3216,7 +3290,7 @@ let Gi = class {
|
|
|
3216
3290
|
}).defaultPrevented)
|
|
3217
3291
|
return;
|
|
3218
3292
|
const t = "decode" in this.element;
|
|
3219
|
-
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(() => {
|
|
3220
3294
|
}).finally(() => {
|
|
3221
3295
|
this.isDecoding = !1, this.appendImage();
|
|
3222
3296
|
})) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
|
|
@@ -3229,7 +3303,7 @@ let Gi = class {
|
|
|
3229
3303
|
activate() {
|
|
3230
3304
|
this.instance.dispatch("contentActivate", {
|
|
3231
3305
|
content: this
|
|
3232
|
-
}).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"));
|
|
3233
3307
|
}
|
|
3234
3308
|
/**
|
|
3235
3309
|
* Deactivate the content
|
|
@@ -3256,36 +3330,36 @@ let Gi = class {
|
|
|
3256
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()));
|
|
3257
3331
|
}
|
|
3258
3332
|
};
|
|
3259
|
-
const
|
|
3260
|
-
function
|
|
3333
|
+
const ls = 5;
|
|
3334
|
+
function ne(s, t, e) {
|
|
3261
3335
|
const i = t.createContentFromData(s, e);
|
|
3262
3336
|
let n;
|
|
3263
3337
|
const {
|
|
3264
3338
|
options: o
|
|
3265
3339
|
} = t;
|
|
3266
3340
|
if (o) {
|
|
3267
|
-
n = new
|
|
3341
|
+
n = new ie(o, s, -1);
|
|
3268
3342
|
let r;
|
|
3269
|
-
t.pswp ? r = t.pswp.viewportSize : r =
|
|
3270
|
-
const a =
|
|
3343
|
+
t.pswp ? r = t.pswp.viewportSize : r = te(o, t);
|
|
3344
|
+
const a = ee(o, r, s, e);
|
|
3271
3345
|
n.update(i.width, i.height, a);
|
|
3272
3346
|
}
|
|
3273
3347
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
3274
3348
|
}
|
|
3275
|
-
function
|
|
3349
|
+
function cs(s, t) {
|
|
3276
3350
|
const e = t.getItemData(s);
|
|
3277
3351
|
if (!t.dispatch("lazyLoadSlide", {
|
|
3278
3352
|
index: s,
|
|
3279
3353
|
itemData: e
|
|
3280
3354
|
}).defaultPrevented)
|
|
3281
|
-
return
|
|
3355
|
+
return ne(e, t, s);
|
|
3282
3356
|
}
|
|
3283
|
-
class
|
|
3357
|
+
class ds {
|
|
3284
3358
|
/**
|
|
3285
3359
|
* @param {PhotoSwipe} pswp
|
|
3286
3360
|
*/
|
|
3287
3361
|
constructor(t) {
|
|
3288
|
-
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 = [];
|
|
3289
3363
|
}
|
|
3290
3364
|
/**
|
|
3291
3365
|
* Lazy load nearby slides based on `preload` option.
|
|
@@ -3313,7 +3387,7 @@ class Qi {
|
|
|
3313
3387
|
loadSlideByIndex(t) {
|
|
3314
3388
|
const e = this.pswp.getLoopedIndex(t);
|
|
3315
3389
|
let i = this.getContentByIndex(e);
|
|
3316
|
-
i || (i =
|
|
3390
|
+
i || (i = cs(e, this.pswp), i && this.addToCache(i));
|
|
3317
3391
|
}
|
|
3318
3392
|
/**
|
|
3319
3393
|
* @param {Slide} slide
|
|
@@ -3352,7 +3426,7 @@ class Qi {
|
|
|
3352
3426
|
this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
|
|
3353
3427
|
}
|
|
3354
3428
|
}
|
|
3355
|
-
let
|
|
3429
|
+
let hs = class extends os {
|
|
3356
3430
|
/**
|
|
3357
3431
|
* Get total number of slides
|
|
3358
3432
|
*
|
|
@@ -3375,7 +3449,7 @@ let ts = class extends Ui {
|
|
|
3375
3449
|
* @returns {Content}
|
|
3376
3450
|
*/
|
|
3377
3451
|
createContentFromData(t, e) {
|
|
3378
|
-
return new
|
|
3452
|
+
return new as(t, this, e);
|
|
3379
3453
|
}
|
|
3380
3454
|
/**
|
|
3381
3455
|
* Get item data by index.
|
|
@@ -3409,7 +3483,7 @@ let ts = class extends Ui {
|
|
|
3409
3483
|
*/
|
|
3410
3484
|
_getGalleryDOMElements(t) {
|
|
3411
3485
|
var e, i;
|
|
3412
|
-
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];
|
|
3413
3487
|
}
|
|
3414
3488
|
/**
|
|
3415
3489
|
* Converts DOM element to item data object.
|
|
@@ -3443,11 +3517,11 @@ let ts = class extends Ui {
|
|
|
3443
3517
|
* @returns {Content} Image that is being decoded or false.
|
|
3444
3518
|
*/
|
|
3445
3519
|
lazyLoadData(t, e) {
|
|
3446
|
-
return
|
|
3520
|
+
return ne(t, this, e);
|
|
3447
3521
|
}
|
|
3448
3522
|
};
|
|
3449
3523
|
const q = 3e-3;
|
|
3450
|
-
class
|
|
3524
|
+
class us {
|
|
3451
3525
|
/**
|
|
3452
3526
|
* @param {PhotoSwipe} pswp
|
|
3453
3527
|
*/
|
|
@@ -3500,7 +3574,7 @@ class es {
|
|
|
3500
3574
|
_start() {
|
|
3501
3575
|
this.isOpening && this._useAnimation && this._placeholder && this._placeholder.tagName === "IMG" ? new Promise((t) => {
|
|
3502
3576
|
let e = !1, i = !0;
|
|
3503
|
-
|
|
3577
|
+
gi(
|
|
3504
3578
|
/** @type {HTMLImageElement} */
|
|
3505
3579
|
this._placeholder
|
|
3506
3580
|
).finally(() => {
|
|
@@ -3591,7 +3665,7 @@ class es {
|
|
|
3591
3665
|
o[e] = i, n.startTransition(o);
|
|
3592
3666
|
}
|
|
3593
3667
|
}
|
|
3594
|
-
const
|
|
3668
|
+
const ps = {
|
|
3595
3669
|
allowPanToNext: !0,
|
|
3596
3670
|
spacing: 0.1,
|
|
3597
3671
|
loop: !0,
|
|
@@ -3618,7 +3692,7 @@ const is = {
|
|
|
3618
3692
|
preload: [1, 2],
|
|
3619
3693
|
easing: "cubic-bezier(.4,0,.22,1)"
|
|
3620
3694
|
};
|
|
3621
|
-
class
|
|
3695
|
+
class ms extends hs {
|
|
3622
3696
|
/**
|
|
3623
3697
|
* @param {PhotoSwipeOptions} [options]
|
|
3624
3698
|
*/
|
|
@@ -3632,7 +3706,7 @@ class ss extends ts {
|
|
|
3632
3706
|
}, this.viewportSize = {
|
|
3633
3707
|
x: 0,
|
|
3634
3708
|
y: 0
|
|
3635
|
-
}, 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);
|
|
3636
3710
|
}
|
|
3637
3711
|
/** @returns {boolean} */
|
|
3638
3712
|
init() {
|
|
@@ -3640,7 +3714,7 @@ class ss extends ts {
|
|
|
3640
3714
|
return !1;
|
|
3641
3715
|
this.isOpen = !0, this.dispatch("init"), this.dispatch("beforeOpen"), this._createMainStructure();
|
|
3642
3716
|
let t = "pswp--open";
|
|
3643
|
-
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", {
|
|
3644
3718
|
index: this.currIndex,
|
|
3645
3719
|
data: this._initialItemData,
|
|
3646
3720
|
slide: void 0
|
|
@@ -3759,7 +3833,7 @@ class ss extends ts {
|
|
|
3759
3833
|
if (!this.canLoop() && (e < 0 || e >= this.getNumItems()))
|
|
3760
3834
|
return;
|
|
3761
3835
|
const n = this.getItemData(e);
|
|
3762
|
-
t.slide = new
|
|
3836
|
+
t.slide = new bi(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
|
|
3763
3837
|
}
|
|
3764
3838
|
/** @returns {Point} */
|
|
3765
3839
|
getViewportCenterPoint() {
|
|
@@ -3777,7 +3851,7 @@ class ss extends ts {
|
|
|
3777
3851
|
updateSize(t) {
|
|
3778
3852
|
if (this.isDestroying)
|
|
3779
3853
|
return;
|
|
3780
|
-
const e =
|
|
3854
|
+
const e = te(this.options, this);
|
|
3781
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"));
|
|
3782
3856
|
}
|
|
3783
3857
|
/**
|
|
@@ -3829,7 +3903,7 @@ class ss extends ts {
|
|
|
3829
3903
|
* @private
|
|
3830
3904
|
*/
|
|
3831
3905
|
_createMainStructure() {
|
|
3832
|
-
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);
|
|
3833
3907
|
}
|
|
3834
3908
|
/**
|
|
3835
3909
|
* Get position and dimensions of small thumbnail
|
|
@@ -3840,7 +3914,7 @@ class ss extends ts {
|
|
|
3840
3914
|
* @returns {Bounds | undefined}
|
|
3841
3915
|
*/
|
|
3842
3916
|
getThumbBounds() {
|
|
3843
|
-
return
|
|
3917
|
+
return ss(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
|
|
3844
3918
|
}
|
|
3845
3919
|
/**
|
|
3846
3920
|
* If the PhotoSwipe can have continuous loop
|
|
@@ -3856,20 +3930,20 @@ class ss extends ts {
|
|
|
3856
3930
|
*/
|
|
3857
3931
|
_prepareOptions(t) {
|
|
3858
3932
|
return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches && (t.showHideAnimationType = "none", t.zoomAnimationDuration = 0), {
|
|
3859
|
-
...
|
|
3933
|
+
...ps,
|
|
3860
3934
|
...t
|
|
3861
3935
|
};
|
|
3862
3936
|
}
|
|
3863
3937
|
}
|
|
3864
|
-
function
|
|
3938
|
+
function N(s, t, e) {
|
|
3865
3939
|
const i = document.createElement(t);
|
|
3866
3940
|
return s && (i.className = s), e && e.appendChild(i), i;
|
|
3867
3941
|
}
|
|
3868
|
-
function
|
|
3942
|
+
function fs(s, t, e) {
|
|
3869
3943
|
let i = `translate3d(${s}px,0px,0)`;
|
|
3870
3944
|
return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
|
|
3871
3945
|
}
|
|
3872
|
-
function
|
|
3946
|
+
function ct(s, t, e) {
|
|
3873
3947
|
s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
|
|
3874
3948
|
}
|
|
3875
3949
|
const P = {
|
|
@@ -3878,7 +3952,7 @@ const P = {
|
|
|
3878
3952
|
LOADED: "loaded",
|
|
3879
3953
|
ERROR: "error"
|
|
3880
3954
|
};
|
|
3881
|
-
function
|
|
3955
|
+
function gs(s) {
|
|
3882
3956
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
3883
3957
|
}
|
|
3884
3958
|
function W(s, t, e = document) {
|
|
@@ -3893,13 +3967,13 @@ function W(s, t, e = document) {
|
|
|
3893
3967
|
}
|
|
3894
3968
|
return i;
|
|
3895
3969
|
}
|
|
3896
|
-
function
|
|
3970
|
+
function vs(s) {
|
|
3897
3971
|
return typeof s == "function" && s.prototype && s.prototype.goTo;
|
|
3898
3972
|
}
|
|
3899
|
-
function
|
|
3973
|
+
function zt() {
|
|
3900
3974
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
3901
3975
|
}
|
|
3902
|
-
class
|
|
3976
|
+
class ys {
|
|
3903
3977
|
/**
|
|
3904
3978
|
* @param {T} type
|
|
3905
3979
|
* @param {PhotoSwipeEventsMap[T]} [details]
|
|
@@ -3911,7 +3985,7 @@ class as {
|
|
|
3911
3985
|
this.defaultPrevented = !0;
|
|
3912
3986
|
}
|
|
3913
3987
|
}
|
|
3914
|
-
class
|
|
3988
|
+
class _s {
|
|
3915
3989
|
constructor() {
|
|
3916
3990
|
this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
|
|
3917
3991
|
}
|
|
@@ -3978,20 +4052,20 @@ class ls {
|
|
|
3978
4052
|
return this.pswp.dispatch(t, e);
|
|
3979
4053
|
const n = (
|
|
3980
4054
|
/** @type {AugmentedEvent<T>} */
|
|
3981
|
-
new
|
|
4055
|
+
new ys(t, e)
|
|
3982
4056
|
);
|
|
3983
4057
|
return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
|
|
3984
4058
|
o.call(this, n);
|
|
3985
4059
|
}), n;
|
|
3986
4060
|
}
|
|
3987
4061
|
}
|
|
3988
|
-
class
|
|
4062
|
+
class ws {
|
|
3989
4063
|
/**
|
|
3990
4064
|
* @param {string | false} imageSrc
|
|
3991
4065
|
* @param {HTMLElement} container
|
|
3992
4066
|
*/
|
|
3993
4067
|
constructor(t, e) {
|
|
3994
|
-
if (this.element =
|
|
4068
|
+
if (this.element = N("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
|
|
3995
4069
|
const i = (
|
|
3996
4070
|
/** @type {HTMLImageElement} */
|
|
3997
4071
|
this.element
|
|
@@ -4005,14 +4079,14 @@ class cs {
|
|
|
4005
4079
|
* @param {number} height
|
|
4006
4080
|
*/
|
|
4007
4081
|
setDisplayedSize(t, e) {
|
|
4008
|
-
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));
|
|
4009
4083
|
}
|
|
4010
4084
|
destroy() {
|
|
4011
4085
|
var t;
|
|
4012
4086
|
(t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
|
|
4013
4087
|
}
|
|
4014
4088
|
}
|
|
4015
|
-
class
|
|
4089
|
+
class bs {
|
|
4016
4090
|
/**
|
|
4017
4091
|
* @param {SlideData} itemData Slide data
|
|
4018
4092
|
* @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
|
|
@@ -4047,12 +4121,12 @@ class ds {
|
|
|
4047
4121
|
this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
|
|
4048
4122
|
this
|
|
4049
4123
|
);
|
|
4050
|
-
this.placeholder = new
|
|
4124
|
+
this.placeholder = new ws(i, this.slide.container);
|
|
4051
4125
|
}
|
|
4052
4126
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
4053
4127
|
content: this,
|
|
4054
4128
|
isLazy: t
|
|
4055
|
-
}).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));
|
|
4056
4130
|
}
|
|
4057
4131
|
/**
|
|
4058
4132
|
* Preload image
|
|
@@ -4135,7 +4209,7 @@ class ds {
|
|
|
4135
4209
|
content: this,
|
|
4136
4210
|
width: t,
|
|
4137
4211
|
height: e
|
|
4138
|
-
}).defaultPrevented && (
|
|
4212
|
+
}).defaultPrevented && (ct(this.element, t, e), this.isImageContent() && !this.isError()))) {
|
|
4139
4213
|
const i = !this.displayedImageWidth && t;
|
|
4140
4214
|
this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
|
|
4141
4215
|
slide: this.slide,
|
|
@@ -4197,9 +4271,9 @@ class ds {
|
|
|
4197
4271
|
displayError() {
|
|
4198
4272
|
if (this.slide) {
|
|
4199
4273
|
var t, e;
|
|
4200
|
-
let i =
|
|
4274
|
+
let i = N("pswp__error-msg", "div");
|
|
4201
4275
|
i.innerText = (t = (e = this.instance.options) === null || e === void 0 ? void 0 : e.errorMsg) !== null && t !== void 0 ? t : "", i = /** @type {HTMLDivElement} */
|
|
4202
|
-
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();
|
|
4203
4277
|
}
|
|
4204
4278
|
}
|
|
4205
4279
|
/**
|
|
@@ -4217,7 +4291,7 @@ class ds {
|
|
|
4217
4291
|
}).defaultPrevented)
|
|
4218
4292
|
return;
|
|
4219
4293
|
const t = "decode" in this.element;
|
|
4220
|
-
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(() => {
|
|
4221
4295
|
}).finally(() => {
|
|
4222
4296
|
this.isDecoding = !1, this.appendImage();
|
|
4223
4297
|
})) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
|
|
@@ -4230,7 +4304,7 @@ class ds {
|
|
|
4230
4304
|
activate() {
|
|
4231
4305
|
this.instance.dispatch("contentActivate", {
|
|
4232
4306
|
content: this
|
|
4233
|
-
}).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"));
|
|
4234
4308
|
}
|
|
4235
4309
|
/**
|
|
4236
4310
|
* Deactivate the content
|
|
@@ -4257,7 +4331,7 @@ class ds {
|
|
|
4257
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()));
|
|
4258
4332
|
}
|
|
4259
4333
|
}
|
|
4260
|
-
function
|
|
4334
|
+
function Ss(s, t) {
|
|
4261
4335
|
if (s.getViewportSizeFn) {
|
|
4262
4336
|
const e = s.getViewportSizeFn(s, t);
|
|
4263
4337
|
if (e)
|
|
@@ -4284,14 +4358,14 @@ function J(s, t, e, i, n) {
|
|
|
4284
4358
|
}
|
|
4285
4359
|
return Number(o) || 0;
|
|
4286
4360
|
}
|
|
4287
|
-
function
|
|
4361
|
+
function Ls(s, t, e, i) {
|
|
4288
4362
|
return {
|
|
4289
4363
|
x: t.x - J("left", s, t, e, i) - J("right", s, t, e, i),
|
|
4290
4364
|
y: t.y - J("top", s, t, e, i) - J("bottom", s, t, e, i)
|
|
4291
4365
|
};
|
|
4292
4366
|
}
|
|
4293
|
-
const
|
|
4294
|
-
class
|
|
4367
|
+
const Dt = 4e3;
|
|
4368
|
+
class Es {
|
|
4295
4369
|
/**
|
|
4296
4370
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
4297
4371
|
* @param {SlideData} itemData Slide data
|
|
@@ -4348,7 +4422,7 @@ class ps {
|
|
|
4348
4422
|
*/
|
|
4349
4423
|
_getSecondary() {
|
|
4350
4424
|
let t = this._parseZoomLevelOption("secondary");
|
|
4351
|
-
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);
|
|
4352
4426
|
}
|
|
4353
4427
|
/**
|
|
4354
4428
|
* Get initial image zoom level.
|
|
@@ -4371,30 +4445,30 @@ class ps {
|
|
|
4371
4445
|
return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
|
|
4372
4446
|
}
|
|
4373
4447
|
}
|
|
4374
|
-
function
|
|
4448
|
+
function oe(s, t, e) {
|
|
4375
4449
|
const i = t.createContentFromData(s, e);
|
|
4376
4450
|
let n;
|
|
4377
4451
|
const {
|
|
4378
4452
|
options: o
|
|
4379
4453
|
} = t;
|
|
4380
4454
|
if (o) {
|
|
4381
|
-
n = new
|
|
4455
|
+
n = new Es(o, s, -1);
|
|
4382
4456
|
let r;
|
|
4383
|
-
t.pswp ? r = t.pswp.viewportSize : r =
|
|
4384
|
-
const a =
|
|
4457
|
+
t.pswp ? r = t.pswp.viewportSize : r = Ss(o, t);
|
|
4458
|
+
const a = Ls(o, r, s, e);
|
|
4385
4459
|
n.update(i.width, i.height, a);
|
|
4386
4460
|
}
|
|
4387
4461
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
4388
4462
|
}
|
|
4389
|
-
function
|
|
4463
|
+
function As(s, t) {
|
|
4390
4464
|
const e = t.getItemData(s);
|
|
4391
4465
|
if (!t.dispatch("lazyLoadSlide", {
|
|
4392
4466
|
index: s,
|
|
4393
4467
|
itemData: e
|
|
4394
4468
|
}).defaultPrevented)
|
|
4395
|
-
return
|
|
4469
|
+
return oe(e, t, s);
|
|
4396
4470
|
}
|
|
4397
|
-
class
|
|
4471
|
+
class Cs extends _s {
|
|
4398
4472
|
/**
|
|
4399
4473
|
* Get total number of slides
|
|
4400
4474
|
*
|
|
@@ -4417,7 +4491,7 @@ class fs extends ls {
|
|
|
4417
4491
|
* @returns {Content}
|
|
4418
4492
|
*/
|
|
4419
4493
|
createContentFromData(t, e) {
|
|
4420
|
-
return new
|
|
4494
|
+
return new bs(t, this, e);
|
|
4421
4495
|
}
|
|
4422
4496
|
/**
|
|
4423
4497
|
* Get item data by index.
|
|
@@ -4485,10 +4559,10 @@ class fs extends ls {
|
|
|
4485
4559
|
* @returns {Content} Image that is being decoded or false.
|
|
4486
4560
|
*/
|
|
4487
4561
|
lazyLoadData(t, e) {
|
|
4488
|
-
return
|
|
4562
|
+
return oe(t, this, e);
|
|
4489
4563
|
}
|
|
4490
4564
|
}
|
|
4491
|
-
class
|
|
4565
|
+
class xs extends Cs {
|
|
4492
4566
|
/**
|
|
4493
4567
|
* @param {PhotoSwipeOptions} [options]
|
|
4494
4568
|
*/
|
|
@@ -4508,7 +4582,7 @@ class gs extends fs {
|
|
|
4508
4582
|
* @param {MouseEvent} e
|
|
4509
4583
|
*/
|
|
4510
4584
|
onThumbnailsClick(t) {
|
|
4511
|
-
if (
|
|
4585
|
+
if (gs(t) || window.pswp)
|
|
4512
4586
|
return;
|
|
4513
4587
|
let e = {
|
|
4514
4588
|
x: t.clientX,
|
|
@@ -4576,7 +4650,7 @@ class gs extends fs {
|
|
|
4576
4650
|
} = this;
|
|
4577
4651
|
e && (i.dataSource = e);
|
|
4578
4652
|
const n = [], o = typeof i.pswpModule;
|
|
4579
|
-
if (
|
|
4653
|
+
if (vs(i.pswpModule))
|
|
4580
4654
|
n.push(Promise.resolve(
|
|
4581
4655
|
/** @type {Type<PhotoSwipe>} */
|
|
4582
4656
|
i.pswpModule
|
|
@@ -4592,7 +4666,7 @@ class gs extends fs {
|
|
|
4592
4666
|
else
|
|
4593
4667
|
throw new Error("pswpModule is not valid");
|
|
4594
4668
|
}
|
|
4595
|
-
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));
|
|
4596
4670
|
const r = ++this._uid;
|
|
4597
4671
|
Promise.all(n).then((a) => {
|
|
4598
4672
|
if (this.shouldOpen) {
|
|
@@ -4638,12 +4712,12 @@ class gs extends fs {
|
|
|
4638
4712
|
});
|
|
4639
4713
|
}
|
|
4640
4714
|
}
|
|
4641
|
-
const
|
|
4715
|
+
const Ts = () => {
|
|
4642
4716
|
let s = null;
|
|
4643
|
-
return s = new
|
|
4717
|
+
return s = new xs({
|
|
4644
4718
|
gallery: "#photoswipe-gallery",
|
|
4645
4719
|
children: "a",
|
|
4646
|
-
pswpModule:
|
|
4720
|
+
pswpModule: ms,
|
|
4647
4721
|
zoom: !1,
|
|
4648
4722
|
imageClickAction: "next",
|
|
4649
4723
|
tapAction: "next"
|
|
@@ -4664,12 +4738,12 @@ const vs = () => {
|
|
|
4664
4738
|
}), s.init(), () => {
|
|
4665
4739
|
s && (s.destroy(), s = null);
|
|
4666
4740
|
};
|
|
4667
|
-
},
|
|
4668
|
-
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");
|
|
4669
4743
|
!s || !t || t.addEventListener("click", () => {
|
|
4670
|
-
document.getElementById(
|
|
4744
|
+
document.getElementById(Ps)?.scrollIntoView({ behavior: "smooth" });
|
|
4671
4745
|
});
|
|
4672
|
-
},
|
|
4746
|
+
}, $t = (s) => Math.min(100, Math.max(0, Math.round(s))), Os = ({
|
|
4673
4747
|
limitElement: s,
|
|
4674
4748
|
progressBar: t,
|
|
4675
4749
|
closeProgress: e,
|
|
@@ -4683,19 +4757,19 @@ const vs = () => {
|
|
|
4683
4757
|
let a = o.scrollHeight - o.clientHeight;
|
|
4684
4758
|
if (!a)
|
|
4685
4759
|
return;
|
|
4686
|
-
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)}%`;
|
|
4687
4761
|
}
|
|
4688
4762
|
if (e && i && n) {
|
|
4689
4763
|
const a = window.pageYOffset + i.getBoundingClientRect().bottom, c = window.pageYOffset + n.getBoundingClientRect().bottom - o.clientHeight - a;
|
|
4690
4764
|
if (c > 0) {
|
|
4691
|
-
const d =
|
|
4765
|
+
const d = $t((r - a) / c * 100);
|
|
4692
4766
|
e.style.setProperty("--progress", `${d}`), e.parentElement?.classList.toggle(
|
|
4693
4767
|
"c-btn--close-progress-complete",
|
|
4694
4768
|
d >= 100
|
|
4695
4769
|
);
|
|
4696
4770
|
}
|
|
4697
4771
|
}
|
|
4698
|
-
},
|
|
4772
|
+
}, zs = () => {
|
|
4699
4773
|
const s = {
|
|
4700
4774
|
limitElement: document.querySelector(".js-limit-scroll-progress-bar"),
|
|
4701
4775
|
progressBar: document.querySelector(".c-progress__bar"),
|
|
@@ -4703,8 +4777,8 @@ const vs = () => {
|
|
|
4703
4777
|
startElement: document.querySelector(".js-content-header"),
|
|
4704
4778
|
endElement: document.querySelector(".js-limit-scroll-close-article-btn")
|
|
4705
4779
|
};
|
|
4706
|
-
(s.progressBar || s.closeProgress) && window.addEventListener("scroll", () =>
|
|
4707
|
-
},
|
|
4780
|
+
(s.progressBar || s.closeProgress) && window.addEventListener("scroll", () => Os(s));
|
|
4781
|
+
}, Ds = (s = {}) => {
|
|
4708
4782
|
const { buttonSelector: t = ".c-scroll-to-top" } = s, e = document.querySelector(t), i = e?.querySelector("button");
|
|
4709
4783
|
if (!e || !i)
|
|
4710
4784
|
return;
|
|
@@ -4726,7 +4800,7 @@ const vs = () => {
|
|
|
4726
4800
|
});
|
|
4727
4801
|
};
|
|
4728
4802
|
window.addEventListener("scroll", r), i.addEventListener("click", a), r();
|
|
4729
|
-
},
|
|
4803
|
+
}, $s = 500, Bs = () => {
|
|
4730
4804
|
const s = document.getElementById("mbrs-comments-container"), t = document.querySelector(".c-scroll-to-top-comment");
|
|
4731
4805
|
if (!s || !t)
|
|
4732
4806
|
return;
|
|
@@ -4742,7 +4816,7 @@ const vs = () => {
|
|
|
4742
4816
|
}, o = () => {
|
|
4743
4817
|
e && (e = !1, window.removeEventListener("scroll", i), t.style.display = "none");
|
|
4744
4818
|
}, r = (u) => {
|
|
4745
|
-
u.offsetHeight >
|
|
4819
|
+
u.offsetHeight > $s ? n() : o();
|
|
4746
4820
|
}, a = (u) => {
|
|
4747
4821
|
new ResizeObserver(() => {
|
|
4748
4822
|
r(u);
|
|
@@ -4779,7 +4853,7 @@ const vs = () => {
|
|
|
4779
4853
|
) && h.disconnect();
|
|
4780
4854
|
});
|
|
4781
4855
|
h.observe(s, { childList: !0, subtree: !0 });
|
|
4782
|
-
},
|
|
4856
|
+
}, Rs = "#page-content", re = "#text-tooltip", Fs = ".mbrs-social-report-container", ae = "c-text-tooltip--show", ks = [
|
|
4783
4857
|
"#page-content .c-content",
|
|
4784
4858
|
"#page-content .c-content p",
|
|
4785
4859
|
"#page-content .c-content h2",
|
|
@@ -4792,16 +4866,16 @@ const vs = () => {
|
|
|
4792
4866
|
"#page-content header span",
|
|
4793
4867
|
"#page-content header h1",
|
|
4794
4868
|
"#page-content header h2"
|
|
4795
|
-
],
|
|
4796
|
-
const e =
|
|
4797
|
-
return
|
|
4798
|
-
},
|
|
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) => {
|
|
4799
4873
|
if (!s.focusNode)
|
|
4800
4874
|
return null;
|
|
4801
4875
|
const t = s.anchorNode?.compareDocumentPosition(s.focusNode);
|
|
4802
4876
|
return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
|
|
4803
|
-
},
|
|
4804
|
-
const i = document.querySelector(
|
|
4877
|
+
}, Hs = (s, t, e) => {
|
|
4878
|
+
const i = document.querySelector(re), n = document.querySelector(Rs), o = document.querySelectorAll(Fs);
|
|
4805
4879
|
if (!i || !n) {
|
|
4806
4880
|
console.warn("Text tooltip : Tooltip or page content are not found in the DOM");
|
|
4807
4881
|
return;
|
|
@@ -4819,11 +4893,11 @@ const vs = () => {
|
|
|
4819
4893
|
i.style.top = `${Math.max(l, c)}px`, i.style.left = `${Math.min(
|
|
4820
4894
|
Math.max(l, d),
|
|
4821
4895
|
window.innerWidth - i.offsetWidth - l
|
|
4822
|
-
)}px`, i.classList.add(
|
|
4896
|
+
)}px`, i.classList.add(ae);
|
|
4823
4897
|
}, it = () => {
|
|
4824
|
-
const s = document.querySelector(`${
|
|
4825
|
-
s && s.classList.remove(
|
|
4826
|
-
},
|
|
4898
|
+
const s = document.querySelector(`${re}`);
|
|
4899
|
+
s && s.classList.remove(ae);
|
|
4900
|
+
}, Ns = () => {
|
|
4827
4901
|
const s = window.getSelection();
|
|
4828
4902
|
if (!s?.rangeCount) {
|
|
4829
4903
|
it();
|
|
@@ -4831,8 +4905,8 @@ const vs = () => {
|
|
|
4831
4905
|
}
|
|
4832
4906
|
const t = s.getRangeAt(0), e = s.toString().trim();
|
|
4833
4907
|
if (e.length) {
|
|
4834
|
-
const i =
|
|
4835
|
-
i &&
|
|
4908
|
+
const i = Zs(t, ks), n = qs(s) || !1;
|
|
4909
|
+
i && Hs(t, n, e);
|
|
4836
4910
|
return;
|
|
4837
4911
|
}
|
|
4838
4912
|
it();
|
|
@@ -4841,26 +4915,26 @@ const vs = () => {
|
|
|
4841
4915
|
window.getSelection()?.toString().trim().length || it();
|
|
4842
4916
|
return;
|
|
4843
4917
|
}
|
|
4844
|
-
|
|
4845
|
-
},
|
|
4918
|
+
Ns();
|
|
4919
|
+
}, Ws = () => {
|
|
4846
4920
|
if (!window?.getSelection) {
|
|
4847
4921
|
console.warn("Selection API isn't supported");
|
|
4848
4922
|
return;
|
|
4849
4923
|
}
|
|
4850
4924
|
document.addEventListener("mouseup", Q), document.addEventListener("selectionchange", Q), document.addEventListener("touchend", Q), document.addEventListener("touchcancel", Q);
|
|
4851
|
-
},
|
|
4925
|
+
}, Vs = (s) => {
|
|
4852
4926
|
const { target: t } = s;
|
|
4853
4927
|
if (t instanceof Element) {
|
|
4854
4928
|
const e = t.closest(".c-search-form--button");
|
|
4855
4929
|
e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
|
|
4856
4930
|
}
|
|
4857
|
-
},
|
|
4931
|
+
}, js = (s = document.querySelector(
|
|
4858
4932
|
".c-search-form--button"
|
|
4859
4933
|
)) => {
|
|
4860
4934
|
s && s.addEventListener("click", (t) => {
|
|
4861
|
-
|
|
4935
|
+
Vs(t);
|
|
4862
4936
|
});
|
|
4863
|
-
},
|
|
4937
|
+
}, Gs = ({
|
|
4864
4938
|
tabsContainerElement: s,
|
|
4865
4939
|
event: t
|
|
4866
4940
|
}) => {
|
|
@@ -4876,38 +4950,38 @@ const vs = () => {
|
|
|
4876
4950
|
}), n.forEach((a) => {
|
|
4877
4951
|
a.setAttribute("aria-hidden", "true");
|
|
4878
4952
|
}), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
|
|
4879
|
-
},
|
|
4953
|
+
}, Ft = (s) => s.code === "ArrowLeft" || s.keyCode === 39, kt = (s) => s.code === "ArrowRight" || s.keyCode === 37, Us = (s = document.querySelectorAll(
|
|
4880
4954
|
".js-tabs"
|
|
4881
4955
|
)) => {
|
|
4882
4956
|
s.length > 0 && s.forEach((t) => {
|
|
4883
4957
|
const e = t.querySelectorAll('[role="tab"]');
|
|
4884
4958
|
e.forEach((n) => {
|
|
4885
4959
|
n.addEventListener("click", (o) => {
|
|
4886
|
-
|
|
4960
|
+
Gs({ tabsContainerElement: t, event: o });
|
|
4887
4961
|
});
|
|
4888
4962
|
});
|
|
4889
4963
|
const i = t.querySelector('[role="tablist"]');
|
|
4890
4964
|
if (i && e.length > 0) {
|
|
4891
4965
|
let n = 0;
|
|
4892
4966
|
i.addEventListener("keydown", (o) => {
|
|
4893
|
-
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());
|
|
4894
4968
|
});
|
|
4895
4969
|
}
|
|
4896
4970
|
});
|
|
4897
4971
|
}, st = (s) => {
|
|
4898
4972
|
const [t, e] = s.split("h").map(Number);
|
|
4899
4973
|
return t * 60 + e;
|
|
4900
|
-
},
|
|
4974
|
+
}, le = () => {
|
|
4901
4975
|
const s = /* @__PURE__ */ new Date(), t = s.getHours(), e = s.getMinutes();
|
|
4902
4976
|
return t * 60 + e;
|
|
4903
|
-
},
|
|
4904
|
-
const e =
|
|
4977
|
+
}, Ks = (s, t) => {
|
|
4978
|
+
const e = le();
|
|
4905
4979
|
if (e < s || e > t)
|
|
4906
4980
|
return 0;
|
|
4907
4981
|
const i = t - s;
|
|
4908
4982
|
return (e - s) / i;
|
|
4909
|
-
},
|
|
4910
|
-
const t =
|
|
4983
|
+
}, Xs = (s) => {
|
|
4984
|
+
const t = le();
|
|
4911
4985
|
let e = null, i = null, n = -1;
|
|
4912
4986
|
return Array.from(s).find((o, r, a) => {
|
|
4913
4987
|
if (r === a.length - 1)
|
|
@@ -4918,14 +4992,14 @@ const vs = () => {
|
|
|
4918
4992
|
const d = st(l), h = st(c);
|
|
4919
4993
|
return t >= d && t < h ? (e = l, i = c, n = r, !0) : !1;
|
|
4920
4994
|
}), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n };
|
|
4921
|
-
},
|
|
4995
|
+
}, Ys = () => {
|
|
4922
4996
|
const s = document.querySelectorAll(".c-timeline__time");
|
|
4923
4997
|
if (!s || s.length < 2)
|
|
4924
4998
|
return;
|
|
4925
|
-
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);
|
|
4926
5000
|
if (!e || !i)
|
|
4927
5001
|
return;
|
|
4928
|
-
const o = st(e), r = st(i), a =
|
|
5002
|
+
const o = st(e), r = st(i), a = Ks(o, r);
|
|
4929
5003
|
if (t instanceof HTMLElement) {
|
|
4930
5004
|
if (t.classList.contains("c-timeline__progress-bar--is-desktop") && s.length >= 5) {
|
|
4931
5005
|
const l = "172px / 2";
|
|
@@ -4964,25 +5038,25 @@ const vs = () => {
|
|
|
4964
5038
|
}
|
|
4965
5039
|
}
|
|
4966
5040
|
}
|
|
4967
|
-
},
|
|
5041
|
+
}, dt = "c-icon-item__container--is-highlighted", Js = (s) => {
|
|
4968
5042
|
s.find(
|
|
4969
|
-
(e) => e.classList.contains(
|
|
4970
|
-
)?.classList.remove(
|
|
4971
|
-
},
|
|
5043
|
+
(e) => e.classList.contains(dt)
|
|
5044
|
+
)?.classList.remove(dt);
|
|
5045
|
+
}, Qs = () => {
|
|
4972
5046
|
const s = document.querySelector(".c-toolbar");
|
|
4973
5047
|
if (s) {
|
|
4974
5048
|
const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-icon-item__container"));
|
|
4975
|
-
|
|
5049
|
+
Js(e), e.find(
|
|
4976
5050
|
(n) => n.querySelector("a")?.getAttribute("href") === t
|
|
4977
|
-
)?.classList.add(
|
|
5051
|
+
)?.classList.add(dt);
|
|
4978
5052
|
}
|
|
4979
|
-
},
|
|
5053
|
+
}, tn = 12, gt = (s) => {
|
|
4980
5054
|
const t = s || document.querySelector(".c-map-towns");
|
|
4981
5055
|
if (!t) {
|
|
4982
5056
|
new MutationObserver((o, r) => {
|
|
4983
5057
|
if (typeof document < "u") {
|
|
4984
5058
|
const a = document.querySelector(".c-map-towns");
|
|
4985
|
-
a && (r.disconnect(),
|
|
5059
|
+
a && (r.disconnect(), gt(a));
|
|
4986
5060
|
}
|
|
4987
5061
|
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
4988
5062
|
return;
|
|
@@ -5012,7 +5086,7 @@ const vs = () => {
|
|
|
5012
5086
|
d.setAttribute("y", `${A}`), l.setAttribute("aria-hidden", "false");
|
|
5013
5087
|
} else
|
|
5014
5088
|
a = !1;
|
|
5015
|
-
}), !a && r <
|
|
5089
|
+
}), !a && r < tn && requestAnimationFrame(() => o(r + 1));
|
|
5016
5090
|
};
|
|
5017
5091
|
return requestAnimationFrame(() => o()), !0;
|
|
5018
5092
|
};
|
|
@@ -5024,7 +5098,7 @@ const vs = () => {
|
|
|
5024
5098
|
childList: !0,
|
|
5025
5099
|
subtree: !0
|
|
5026
5100
|
});
|
|
5027
|
-
},
|
|
5101
|
+
}, en = {
|
|
5028
5102
|
10: [{ id: "10387", name: "Troyes" }, { id: "10323", name: "Romilly-sur-Seine" }, { id: "10033", name: "Bar-sur-Aube" }],
|
|
5029
5103
|
11: [{ id: "11262", name: "Narbonne" }, { id: "11069", name: "Carcassonne" }, { id: "11076", name: "Castelnaudary" }],
|
|
5030
5104
|
12: [{ id: "12202", name: "Rodez" }, { id: "12145", name: "Millau" }, { id: "12300", name: "Villefranche-de-Rouergue" }],
|
|
@@ -5125,14 +5199,14 @@ const vs = () => {
|
|
|
5125
5199
|
"07": [{ id: "07010", name: "Annonay" }, { id: "07019", name: "Aubenas" }, { id: "07324", name: "Tournon-sur-Rhône" }],
|
|
5126
5200
|
"05": [{ id: "05061", name: "Gap" }, { id: "05023", name: "Briançon" }, { id: "05046", name: "Embrun" }],
|
|
5127
5201
|
"08": [{ id: "08105", name: "Charleville-Mézières" }, { id: "08362", name: "Rethel" }, { id: "08190", name: "Givet" }]
|
|
5128
|
-
},
|
|
5202
|
+
}, sn = /<path\b([^>]*?)\/>/g, nn = /\b([:\w-]+)="([^"]*)"/g, on = (s) => {
|
|
5129
5203
|
const t = [];
|
|
5130
|
-
for (const e of s.matchAll(
|
|
5204
|
+
for (const e of s.matchAll(sn)) {
|
|
5131
5205
|
const i = e[1];
|
|
5132
5206
|
if (!i)
|
|
5133
5207
|
continue;
|
|
5134
5208
|
const n = /* @__PURE__ */ new Map();
|
|
5135
|
-
for (const c of i.matchAll(
|
|
5209
|
+
for (const c of i.matchAll(nn)) {
|
|
5136
5210
|
const [, d, h] = c;
|
|
5137
5211
|
d && n.set(d, h || "");
|
|
5138
5212
|
}
|
|
@@ -5145,9 +5219,9 @@ const vs = () => {
|
|
|
5145
5219
|
});
|
|
5146
5220
|
}
|
|
5147
5221
|
return t;
|
|
5148
|
-
},
|
|
5222
|
+
}, rn = (s) => new Map(s.map((t) => [t.id, t])), tt = (s) => {
|
|
5149
5223
|
window.location.href = s;
|
|
5150
|
-
},
|
|
5224
|
+
}, an = (s, t, e) => {
|
|
5151
5225
|
const i = e.get(s);
|
|
5152
5226
|
if (i)
|
|
5153
5227
|
return i;
|
|
@@ -5162,7 +5236,7 @@ const vs = () => {
|
|
|
5162
5236
|
(o) => o.id.startsWith(`town-${s}`)
|
|
5163
5237
|
);
|
|
5164
5238
|
return e.set(s, n), n;
|
|
5165
|
-
},
|
|
5239
|
+
}, ln = (s, t) => t.get(s), cn = (s) => {
|
|
5166
5240
|
if (s.size > 0)
|
|
5167
5241
|
return;
|
|
5168
5242
|
document.querySelectorAll(
|
|
@@ -5174,13 +5248,13 @@ const vs = () => {
|
|
|
5174
5248
|
Array.from(e.classList).filter((n) => n.startsWith("c-map-towns__path--"))
|
|
5175
5249
|
);
|
|
5176
5250
|
});
|
|
5177
|
-
},
|
|
5251
|
+
}, dn = (s, t) => {
|
|
5178
5252
|
const e = s.id, i = s.url, n = s.name;
|
|
5179
5253
|
if (!e || !i)
|
|
5180
5254
|
return null;
|
|
5181
5255
|
const o = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
5182
5256
|
o.setAttribute("d", s.path), o.setAttribute("class", "c-map-towns__path c-map-towns__zoom-town"), o.setAttribute("data-url", i);
|
|
5183
|
-
const r =
|
|
5257
|
+
const r = ln(e, t);
|
|
5184
5258
|
if (r && r.forEach((a) => {
|
|
5185
5259
|
o.classList.add(a);
|
|
5186
5260
|
}), n) {
|
|
@@ -5188,15 +5262,15 @@ const vs = () => {
|
|
|
5188
5262
|
a.textContent = n, o.appendChild(a);
|
|
5189
5263
|
}
|
|
5190
5264
|
return o;
|
|
5191
|
-
},
|
|
5265
|
+
}, hn = (s, t) => {
|
|
5192
5266
|
const e = document.createDocumentFragment();
|
|
5193
5267
|
return s.forEach((i) => {
|
|
5194
|
-
const n =
|
|
5268
|
+
const n = dn(i, t);
|
|
5195
5269
|
n && e.appendChild(n);
|
|
5196
5270
|
}), e;
|
|
5197
|
-
},
|
|
5271
|
+
}, un = (s, t) => {
|
|
5198
5272
|
s.replaceChildren(t);
|
|
5199
|
-
},
|
|
5273
|
+
}, pn = (s, t, e) => {
|
|
5200
5274
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
5201
5275
|
i.setAttribute("class", "js-city-marker c-map-towns__city-marker"), i.setAttribute("aria-hidden", "true"), i.setAttribute("data-scale", e.toString());
|
|
5202
5276
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -5207,7 +5281,7 @@ const vs = () => {
|
|
|
5207
5281
|
r.setAttribute("class", "js-city-bg"), r.setAttribute("fill", "white"), r.setAttribute("rx", "4"), r.setAttribute("ry", "4");
|
|
5208
5282
|
const a = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
5209
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;
|
|
5210
|
-
},
|
|
5284
|
+
}, mn = (s, t) => {
|
|
5211
5285
|
const e = t.getBBox(), i = 5, n = e.width + i * 2, o = e.height + i * 2;
|
|
5212
5286
|
s.setAttribute(
|
|
5213
5287
|
"viewBox",
|
|
@@ -5216,17 +5290,17 @@ const vs = () => {
|
|
|
5216
5290
|
const r = s.clientWidth || 800, a = s.clientHeight || 600;
|
|
5217
5291
|
return Math.max(n / r, o / a);
|
|
5218
5292
|
};
|
|
5219
|
-
let
|
|
5220
|
-
const
|
|
5221
|
-
if (
|
|
5293
|
+
let ot = !1;
|
|
5294
|
+
const ht = () => {
|
|
5295
|
+
if (ot)
|
|
5222
5296
|
return;
|
|
5223
5297
|
if (!document.querySelector(".c-map-towns")) {
|
|
5224
5298
|
new MutationObserver((b, A) => {
|
|
5225
|
-
typeof document < "u" && document.querySelector(".c-map-towns") && (A.disconnect(),
|
|
5299
|
+
typeof document < "u" && document.querySelector(".c-map-towns") && (A.disconnect(), ht());
|
|
5226
5300
|
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
5227
5301
|
return;
|
|
5228
5302
|
}
|
|
5229
|
-
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) => {
|
|
5230
5304
|
const { target: b } = L;
|
|
5231
5305
|
if (!(b instanceof Element))
|
|
5232
5306
|
return;
|
|
@@ -5241,41 +5315,41 @@ const ct = () => {
|
|
|
5241
5315
|
tt(M);
|
|
5242
5316
|
return;
|
|
5243
5317
|
}
|
|
5244
|
-
const
|
|
5245
|
-
|
|
5318
|
+
const O = b.closest(".c-map-towns__dept-trigger")?.getAttribute("data-url");
|
|
5319
|
+
O && tt(O);
|
|
5246
5320
|
};
|
|
5247
5321
|
if (t) {
|
|
5248
|
-
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;
|
|
5249
5323
|
return;
|
|
5250
5324
|
}
|
|
5251
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");
|
|
5252
5326
|
if (!(r instanceof HTMLElement) || !(a instanceof SVGSVGElement) || !(l instanceof SVGGElement) || !(c instanceof HTMLElement)) {
|
|
5253
|
-
requestAnimationFrame(
|
|
5327
|
+
requestAnimationFrame(ht);
|
|
5254
5328
|
return;
|
|
5255
5329
|
}
|
|
5256
|
-
|
|
5330
|
+
ot = !0;
|
|
5257
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();
|
|
5258
5332
|
let p = null;
|
|
5259
5333
|
const y = () => {
|
|
5260
5334
|
if (p)
|
|
5261
5335
|
return p;
|
|
5262
5336
|
const L = u instanceof HTMLScriptElement ? JSON.parse(u.textContent || '""') : "";
|
|
5263
|
-
return p =
|
|
5337
|
+
return p = rn(on(L)), p;
|
|
5264
5338
|
}, w = () => {
|
|
5265
5339
|
r.setAttribute("aria-hidden", "true"), l.replaceChildren();
|
|
5266
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) => {
|
|
5267
|
-
const I =
|
|
5341
|
+
const I = en[L] || [];
|
|
5268
5342
|
if (I.length === 0)
|
|
5269
5343
|
return;
|
|
5270
5344
|
const M = document.createDocumentFragment();
|
|
5271
5345
|
I.forEach((k) => {
|
|
5272
|
-
const
|
|
5273
|
-
if (!
|
|
5346
|
+
const O = C(L, k.id);
|
|
5347
|
+
if (!O)
|
|
5274
5348
|
return;
|
|
5275
|
-
const $ =
|
|
5349
|
+
const $ = pn(k.name, O, b);
|
|
5276
5350
|
M.appendChild($);
|
|
5277
5351
|
}), l.appendChild(M), requestAnimationFrame(() => {
|
|
5278
|
-
|
|
5352
|
+
gt(l);
|
|
5279
5353
|
});
|
|
5280
5354
|
}, _ = (L) => {
|
|
5281
5355
|
const { target: b } = L;
|
|
@@ -5284,13 +5358,13 @@ const ct = () => {
|
|
|
5284
5358
|
const A = b?.closest(".c-map-towns__dept-trigger");
|
|
5285
5359
|
if (!A)
|
|
5286
5360
|
return;
|
|
5287
|
-
const I = A.getAttribute("id")?.replace("out-", "") || "", M = A.getAttribute("data-name"), k =
|
|
5288
|
-
|
|
5289
|
-
const
|
|
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);
|
|
5290
5364
|
if (d && h && M && (d.textContent = M, h.textContent = `Carte détaillée du département : ${M}`), !(A instanceof SVGGraphicsElement))
|
|
5291
5365
|
return;
|
|
5292
|
-
const $ =
|
|
5293
|
-
r.setAttribute("aria-hidden", "false"),
|
|
5366
|
+
const $ = mn(a, A);
|
|
5367
|
+
r.setAttribute("aria-hidden", "false"), un(l, O), g(I, $);
|
|
5294
5368
|
}, E = (L) => {
|
|
5295
5369
|
const { target: b } = L;
|
|
5296
5370
|
if (!(b instanceof Element))
|
|
@@ -5303,15 +5377,15 @@ const ct = () => {
|
|
|
5303
5377
|
}), r.addEventListener("click", (L) => {
|
|
5304
5378
|
L.target === r && w();
|
|
5305
5379
|
});
|
|
5306
|
-
},
|
|
5307
|
-
|
|
5380
|
+
}, bn = () => {
|
|
5381
|
+
ge(), Ue(), Us(), ze(), Ut(), Ne(), zs(), Ts(), ri(), Me(), js(), Be(), Ws(), Ke(), Xe(), Je(), ke(), ye(
|
|
5308
5382
|
"localisation-input",
|
|
5309
5383
|
"https://www.20minutes.fr/elections/resultats/recherche",
|
|
5310
5384
|
"?searchValue=",
|
|
5311
5385
|
"text",
|
|
5312
5386
|
"text"
|
|
5313
|
-
),
|
|
5387
|
+
), Fe(), gt(), Qs(), ue(), pe(), Qe(), ht(), ui(), pi(), Ye(), he(), Ys(), Ds(), Bs(), Ms();
|
|
5314
5388
|
};
|
|
5315
5389
|
export {
|
|
5316
|
-
|
|
5390
|
+
bn as initScripts
|
|
5317
5391
|
};
|