@20minutes/hela 2.22.3 → 2.22.5
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/ranking.d.ts +1 -0
- package/dist/components/molecules/Header/HeaderPage/HeaderPage.d.ts +1 -0
- package/dist/components/organisms/Header/HeaderMobile.d.ts +1 -1
- package/dist/index.es.js +930 -966
- package/dist/index.umd.cjs +1 -1
- package/dist/js/scripts.es.js +129 -124
- 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 +14 -14
package/dist/js/scripts.es.js
CHANGED
|
@@ -482,7 +482,7 @@ function Ie(s, t) {
|
|
|
482
482
|
const n = V();
|
|
483
483
|
t.shiftKey && n === e ? (i.focus(), t.preventDefault()) : !t.shiftKey && n === i && (e.focus(), t.preventDefault());
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function $(s, t) {
|
|
486
486
|
function e(i) {
|
|
487
487
|
if (!i || i === document || i === window)
|
|
488
488
|
return null;
|
|
@@ -494,7 +494,7 @@ function R(s, t) {
|
|
|
494
494
|
function zt(s) {
|
|
495
495
|
return s.assignedSlot || (s.parentNode ? zt(s.parentNode) : null);
|
|
496
496
|
}
|
|
497
|
-
const
|
|
497
|
+
const k = "data-a11y-dialog";
|
|
498
498
|
class Ot {
|
|
499
499
|
$el;
|
|
500
500
|
id;
|
|
@@ -518,7 +518,7 @@ class Ot {
|
|
|
518
518
|
* `[data-a11y-dialog-show="<id>"]` and `[data-a11y-dialog-hide="<id>"]`.
|
|
519
519
|
*/
|
|
520
520
|
constructor(t) {
|
|
521
|
-
this.$el = t, this.id = this.$el.getAttribute(
|
|
521
|
+
this.$el = t, this.id = this.$el.getAttribute(k) || this.$el.id, this.previouslyFocused = null, this.shown = !1, this.maintainFocus = this.maintainFocus.bind(this), this.bindKeypress = this.bindKeypress.bind(this), this.handleTriggerClicks = this.handleTriggerClicks.bind(this), this.show = this.show.bind(this), this.hide = this.hide.bind(this), this.$el.setAttribute("aria-hidden", "true"), this.$el.setAttribute("aria-modal", "true"), this.$el.setAttribute("tabindex", "-1"), this.$el.hasAttribute("role") || this.$el.setAttribute("role", "dialog"), document.addEventListener("click", this.handleTriggerClicks, !0);
|
|
522
522
|
}
|
|
523
523
|
/**
|
|
524
524
|
* Destroy the current instance (after making sure the dialog has been hidden)
|
|
@@ -592,7 +592,7 @@ class Ot {
|
|
|
592
592
|
* dialog are clicked, and call `show` or `hide`, respectively
|
|
593
593
|
*/
|
|
594
594
|
handleTriggerClicks(t) {
|
|
595
|
-
const e = t.composedPath()[0], i =
|
|
595
|
+
const e = t.composedPath()[0], i = $(`[${k}-show="${this.id}"]`, e), n = $(`[${k}-hide="${this.id}"]`, e), o = $(`[${k}-hide]`, e) && $('[aria-modal="true"]', e) === this.$el;
|
|
596
596
|
i && this.show(t), (n || o) && this.hide(t);
|
|
597
597
|
}
|
|
598
598
|
/**
|
|
@@ -600,7 +600,7 @@ class Ot {
|
|
|
600
600
|
* (namely ESC and TAB)
|
|
601
601
|
*/
|
|
602
602
|
bindKeypress(t) {
|
|
603
|
-
if (
|
|
603
|
+
if ($('[aria-modal="true"]', V()) !== this.$el)
|
|
604
604
|
return;
|
|
605
605
|
let e = !1;
|
|
606
606
|
try {
|
|
@@ -617,7 +617,7 @@ class Ot {
|
|
|
617
617
|
*/
|
|
618
618
|
maintainFocus() {
|
|
619
619
|
const t = V();
|
|
620
|
-
|
|
620
|
+
$(`[aria-modal="true"], [${k}-ignore-focus-trap]`, t) || ht(this.$el);
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
function ft() {
|
|
@@ -770,7 +770,7 @@ const Me = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
770
770
|
prevBtn: i
|
|
771
771
|
});
|
|
772
772
|
}
|
|
773
|
-
},
|
|
773
|
+
}, Re = ({
|
|
774
774
|
navigationContainer: s,
|
|
775
775
|
navigatedList: t,
|
|
776
776
|
nextBtn: e,
|
|
@@ -782,7 +782,7 @@ const Me = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
782
782
|
nextBtn: e,
|
|
783
783
|
prevBtn: i
|
|
784
784
|
});
|
|
785
|
-
},
|
|
785
|
+
}, $e = (s) => {
|
|
786
786
|
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(
|
|
787
787
|
".js-navigation-container__list"
|
|
788
788
|
), c = s.querySelector(".o-nav-button--next-button"), d = s.querySelector(
|
|
@@ -833,7 +833,7 @@ const Me = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
833
833
|
const i = new ResizeObserver((n) => {
|
|
834
834
|
n.forEach((o) => {
|
|
835
835
|
const { width: r } = o.contentRect;
|
|
836
|
-
r > 0 && (
|
|
836
|
+
r > 0 && ($e(t), i.disconnect());
|
|
837
837
|
});
|
|
838
838
|
});
|
|
839
839
|
i.observe(e);
|
|
@@ -852,7 +852,7 @@ const Me = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
852
852
|
);
|
|
853
853
|
e && i && n && window.addEventListener(
|
|
854
854
|
"resize",
|
|
855
|
-
|
|
855
|
+
Re.bind(!1, {
|
|
856
856
|
navigationContainer: t,
|
|
857
857
|
navigatedList: e,
|
|
858
858
|
nextBtn: i,
|
|
@@ -888,17 +888,17 @@ function G(s, t, e) {
|
|
|
888
888
|
function D(s, t, e, i) {
|
|
889
889
|
s.style.transform = G(t, e, i);
|
|
890
890
|
}
|
|
891
|
-
const
|
|
892
|
-
function
|
|
893
|
-
s.style.transition = t ? `${t} ${e}ms ${i ||
|
|
891
|
+
const ke = "cubic-bezier(.4,0,.22,1)";
|
|
892
|
+
function Rt(s, t, e, i) {
|
|
893
|
+
s.style.transition = t ? `${t} ${e}ms ${i || ke}` : "none";
|
|
894
894
|
}
|
|
895
895
|
function st(s, t, e) {
|
|
896
896
|
s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
|
|
897
897
|
}
|
|
898
|
-
function
|
|
899
|
-
|
|
898
|
+
function Ze(s) {
|
|
899
|
+
Rt(s);
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function Ne(s) {
|
|
902
902
|
return "decode" in s ? s.decode().catch(() => {
|
|
903
903
|
}) : s.complete ? Promise.resolve(s) : new Promise((t, e) => {
|
|
904
904
|
s.onload = () => t(s), s.onerror = e;
|
|
@@ -910,7 +910,7 @@ const P = {
|
|
|
910
910
|
LOADED: "loaded",
|
|
911
911
|
ERROR: "error"
|
|
912
912
|
};
|
|
913
|
-
function
|
|
913
|
+
function qe(s) {
|
|
914
914
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
915
915
|
}
|
|
916
916
|
function He(s, t, e = document) {
|
|
@@ -928,11 +928,11 @@ function He(s, t, e = document) {
|
|
|
928
928
|
function gt() {
|
|
929
929
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
930
930
|
}
|
|
931
|
-
let
|
|
931
|
+
let $t = !1;
|
|
932
932
|
try {
|
|
933
933
|
window.addEventListener("test", null, Object.defineProperty({}, "passive", {
|
|
934
934
|
get: () => {
|
|
935
|
-
|
|
935
|
+
$t = !0;
|
|
936
936
|
}
|
|
937
937
|
}));
|
|
938
938
|
} catch {
|
|
@@ -994,7 +994,7 @@ class We {
|
|
|
994
994
|
listener: i,
|
|
995
995
|
passive: n
|
|
996
996
|
}));
|
|
997
|
-
const d =
|
|
997
|
+
const d = $t ? {
|
|
998
998
|
passive: n || !1
|
|
999
999
|
} : !1;
|
|
1000
1000
|
t[a](c, i, d);
|
|
@@ -1017,7 +1017,7 @@ function Bt(s, t) {
|
|
|
1017
1017
|
y: window.innerHeight
|
|
1018
1018
|
};
|
|
1019
1019
|
}
|
|
1020
|
-
function
|
|
1020
|
+
function N(s, t, e, i, n) {
|
|
1021
1021
|
let o = 0;
|
|
1022
1022
|
if (t.paddingFn)
|
|
1023
1023
|
o = t.paddingFn(e, i, n)[s];
|
|
@@ -1031,8 +1031,8 @@ function q(s, t, e, i, n) {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
function Ft(s, t, e, i) {
|
|
1033
1033
|
return {
|
|
1034
|
-
x: t.x -
|
|
1035
|
-
y: t.y -
|
|
1034
|
+
x: t.x - N("left", s, t, e, i) - N("right", s, t, e, i),
|
|
1035
|
+
y: t.y - N("top", s, t, e, i) - N("bottom", s, t, e, i)
|
|
1036
1036
|
};
|
|
1037
1037
|
}
|
|
1038
1038
|
class Ve {
|
|
@@ -1072,7 +1072,7 @@ class Ve {
|
|
|
1072
1072
|
_updateAxis(t) {
|
|
1073
1073
|
const {
|
|
1074
1074
|
pswp: e
|
|
1075
|
-
} = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o =
|
|
1075
|
+
} = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o = N(t === "x" ? "left" : "top", e.options, e.viewportSize, this.slide.data, this.slide.index), r = this.slide.panAreaSize[t];
|
|
1076
1076
|
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];
|
|
1077
1077
|
}
|
|
1078
1078
|
// _getZeroBounds
|
|
@@ -1091,7 +1091,7 @@ class Ve {
|
|
|
1091
1091
|
}
|
|
1092
1092
|
}
|
|
1093
1093
|
const vt = 4e3;
|
|
1094
|
-
let
|
|
1094
|
+
let kt = class {
|
|
1095
1095
|
/**
|
|
1096
1096
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
1097
1097
|
* @param {SlideData} itemData Slide data
|
|
@@ -1184,7 +1184,7 @@ class je {
|
|
|
1184
1184
|
}, this.pan = {
|
|
1185
1185
|
x: 0,
|
|
1186
1186
|
y: 0
|
|
1187
|
-
}, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new
|
|
1187
|
+
}, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new kt(i.options, t, e, i), this.pswp.dispatch("gettingData", {
|
|
1188
1188
|
slide: this,
|
|
1189
1189
|
data: this.data,
|
|
1190
1190
|
index: e
|
|
@@ -2315,7 +2315,7 @@ class li {
|
|
|
2315
2315
|
} = this;
|
|
2316
2316
|
if (e.dispatch("keydown", {
|
|
2317
2317
|
originalEvent: t
|
|
2318
|
-
}).defaultPrevented ||
|
|
2318
|
+
}).defaultPrevented || qe(t))
|
|
2319
2319
|
return;
|
|
2320
2320
|
let i, n, o = !1;
|
|
2321
2321
|
const r = "key" in t;
|
|
@@ -2389,7 +2389,7 @@ class di {
|
|
|
2389
2389
|
this.onFinish = r;
|
|
2390
2390
|
const c = o ? "transform" : "opacity", d = (e = t[c]) !== null && e !== void 0 ? e : "";
|
|
2391
2391
|
this._target = i, this._onComplete = n, this._finished = !1, this._onTransitionEnd = this._onTransitionEnd.bind(this), this._helperTimeout = setTimeout(() => {
|
|
2392
|
-
|
|
2392
|
+
Rt(i, c, a, l), this._helperTimeout = setTimeout(() => {
|
|
2393
2393
|
i.addEventListener("transitionend", this._onTransitionEnd, !1), i.addEventListener("transitioncancel", this._onTransitionEnd, !1), this._helperTimeout = setTimeout(() => {
|
|
2394
2394
|
this._finalizeAnimation();
|
|
2395
2395
|
}, a + 500), i.style[c] = d;
|
|
@@ -2411,7 +2411,7 @@ class di {
|
|
|
2411
2411
|
}
|
|
2412
2412
|
// Destroy is called automatically onFinish
|
|
2413
2413
|
destroy() {
|
|
2414
|
-
this._helperTimeout && clearTimeout(this._helperTimeout),
|
|
2414
|
+
this._helperTimeout && clearTimeout(this._helperTimeout), Ze(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
|
|
2415
2415
|
}
|
|
2416
2416
|
}
|
|
2417
2417
|
const hi = 12, ui = 0.75;
|
|
@@ -2647,7 +2647,7 @@ class yi {
|
|
|
2647
2647
|
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));
|
|
2648
2648
|
}
|
|
2649
2649
|
}
|
|
2650
|
-
function
|
|
2650
|
+
function Zt(s, t, e) {
|
|
2651
2651
|
s.classList.add("pswp__button--arrow"), s.setAttribute("aria-controls", "pswp__items"), t.on("change", () => {
|
|
2652
2652
|
t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
|
|
2653
2653
|
});
|
|
@@ -2666,7 +2666,7 @@ const _i = {
|
|
|
2666
2666
|
outlineID: "pswp__icn-arrow"
|
|
2667
2667
|
},
|
|
2668
2668
|
onClick: "prev",
|
|
2669
|
-
onInit:
|
|
2669
|
+
onInit: Zt
|
|
2670
2670
|
}, wi = {
|
|
2671
2671
|
name: "arrowNext",
|
|
2672
2672
|
className: "pswp__button--arrow--next",
|
|
@@ -2682,7 +2682,7 @@ const _i = {
|
|
|
2682
2682
|
},
|
|
2683
2683
|
onClick: "next",
|
|
2684
2684
|
onInit: (s, t) => {
|
|
2685
|
-
|
|
2685
|
+
Zt(s, t, !0);
|
|
2686
2686
|
}
|
|
2687
2687
|
}, bi = {
|
|
2688
2688
|
name: "close",
|
|
@@ -3203,14 +3203,14 @@ let Ti = class {
|
|
|
3203
3203
|
}
|
|
3204
3204
|
};
|
|
3205
3205
|
const Oi = 5;
|
|
3206
|
-
function
|
|
3206
|
+
function Nt(s, t, e) {
|
|
3207
3207
|
const i = t.createContentFromData(s, e);
|
|
3208
3208
|
let n;
|
|
3209
3209
|
const {
|
|
3210
3210
|
options: o
|
|
3211
3211
|
} = t;
|
|
3212
3212
|
if (o) {
|
|
3213
|
-
n = new
|
|
3213
|
+
n = new kt(o, s, -1);
|
|
3214
3214
|
let r;
|
|
3215
3215
|
t.pswp ? r = t.pswp.viewportSize : r = Bt(o, t);
|
|
3216
3216
|
const a = Ft(o, r, s, e);
|
|
@@ -3224,9 +3224,9 @@ function Di(s, t) {
|
|
|
3224
3224
|
index: s,
|
|
3225
3225
|
itemData: e
|
|
3226
3226
|
}).defaultPrevented)
|
|
3227
|
-
return
|
|
3227
|
+
return Nt(e, t, s);
|
|
3228
3228
|
}
|
|
3229
|
-
class
|
|
3229
|
+
class Ri {
|
|
3230
3230
|
/**
|
|
3231
3231
|
* @param {PhotoSwipe} pswp
|
|
3232
3232
|
*/
|
|
@@ -3298,7 +3298,7 @@ class $i {
|
|
|
3298
3298
|
this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
|
|
3299
3299
|
}
|
|
3300
3300
|
}
|
|
3301
|
-
let
|
|
3301
|
+
let $i = class extends Ii {
|
|
3302
3302
|
/**
|
|
3303
3303
|
* Get total number of slides
|
|
3304
3304
|
*
|
|
@@ -3389,10 +3389,10 @@ let Ri = class extends Ii {
|
|
|
3389
3389
|
* @returns {Content} Image that is being decoded or false.
|
|
3390
3390
|
*/
|
|
3391
3391
|
lazyLoadData(t, e) {
|
|
3392
|
-
return
|
|
3392
|
+
return Nt(t, this, e);
|
|
3393
3393
|
}
|
|
3394
3394
|
};
|
|
3395
|
-
const
|
|
3395
|
+
const Z = 3e-3;
|
|
3396
3396
|
class Bi {
|
|
3397
3397
|
/**
|
|
3398
3398
|
* @param {PhotoSwipe} pswp
|
|
@@ -3431,8 +3431,8 @@ class Bi {
|
|
|
3431
3431
|
var n;
|
|
3432
3432
|
this._animateRootOpacity = (n = i.showHideOpacity) !== null && n !== void 0 ? n : !1;
|
|
3433
3433
|
}
|
|
3434
|
-
if (this._animateBgOpacity = !this._animateRootOpacity && this.pswp.options.bgOpacity >
|
|
3435
|
-
this._duration = 0, this._animateZoom = !1, this._animateBgOpacity = !1, this._animateRootOpacity = !0, this.isOpening && (t.element && (t.element.style.opacity = String(
|
|
3434
|
+
if (this._animateBgOpacity = !this._animateRootOpacity && this.pswp.options.bgOpacity > Z, this._opacityElement = this._animateRootOpacity ? t.element : t.bg, !this._useAnimation) {
|
|
3435
|
+
this._duration = 0, this._animateZoom = !1, this._animateBgOpacity = !1, this._animateRootOpacity = !0, this.isOpening && (t.element && (t.element.style.opacity = String(Z)), t.applyBgOpacity(1));
|
|
3436
3436
|
return;
|
|
3437
3437
|
}
|
|
3438
3438
|
if (this._animateZoom && this._thumbBounds && this._thumbBounds.innerRect) {
|
|
@@ -3440,13 +3440,13 @@ class Bi {
|
|
|
3440
3440
|
this._croppedZoom = !0, this._cropContainer1 = this.pswp.container, this._cropContainer2 = (o = this.pswp.currSlide) === null || o === void 0 ? void 0 : o.holderElement, t.container && (t.container.style.overflow = "hidden", t.container.style.width = t.viewportSize.x + "px");
|
|
3441
3441
|
} else
|
|
3442
3442
|
this._croppedZoom = !1;
|
|
3443
|
-
this.isOpening ? (this._animateRootOpacity ? (t.element && (t.element.style.opacity = String(
|
|
3443
|
+
this.isOpening ? (this._animateRootOpacity ? (t.element && (t.element.style.opacity = String(Z)), t.applyBgOpacity(1)) : (this._animateBgOpacity && t.bg && (t.bg.style.opacity = String(Z)), t.element && (t.element.style.opacity = "1")), this._animateZoom && (this._setClosedStateZoomPan(), this._placeholder && (this._placeholder.style.willChange = "transform", this._placeholder.style.opacity = String(Z)))) : this.isClosing && (t.mainScroll.itemHolders[0] && (t.mainScroll.itemHolders[0].el.style.display = "none"), t.mainScroll.itemHolders[2] && (t.mainScroll.itemHolders[2].el.style.display = "none"), this._croppedZoom && t.mainScroll.x !== 0 && (t.mainScroll.resetPosition(), t.mainScroll.resize()));
|
|
3444
3444
|
}
|
|
3445
3445
|
/** @private */
|
|
3446
3446
|
_start() {
|
|
3447
3447
|
this.isOpening && this._useAnimation && this._placeholder && this._placeholder.tagName === "IMG" ? new Promise((t) => {
|
|
3448
3448
|
let e = !1, i = !0;
|
|
3449
|
-
|
|
3449
|
+
Ne(
|
|
3450
3450
|
/** @type {HTMLImageElement} */
|
|
3451
3451
|
this._placeholder
|
|
3452
3452
|
).finally(() => {
|
|
@@ -3564,7 +3564,7 @@ const Fi = {
|
|
|
3564
3564
|
preload: [1, 2],
|
|
3565
3565
|
easing: "cubic-bezier(.4,0,.22,1)"
|
|
3566
3566
|
};
|
|
3567
|
-
class
|
|
3567
|
+
class ki extends $i {
|
|
3568
3568
|
/**
|
|
3569
3569
|
* @param {PhotoSwipeOptions} [options]
|
|
3570
3570
|
*/
|
|
@@ -3578,7 +3578,7 @@ class Zi extends Ri {
|
|
|
3578
3578
|
}, this.viewportSize = {
|
|
3579
3579
|
x: 0,
|
|
3580
3580
|
y: 0
|
|
3581
|
-
}, 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 We(), this.animations = new fi(), this.mainScroll = new ri(this), this.gestures = new ni(this), this.opener = new Bi(this), this.keyboard = new li(this), this.contentLoader = new
|
|
3581
|
+
}, 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 We(), this.animations = new fi(), this.mainScroll = new ri(this), this.gestures = new ni(this), this.opener = new Bi(this), this.keyboard = new li(this), this.contentLoader = new Ri(this);
|
|
3582
3582
|
}
|
|
3583
3583
|
/** @returns {boolean} */
|
|
3584
3584
|
init() {
|
|
@@ -3807,11 +3807,11 @@ class Zi extends Ri {
|
|
|
3807
3807
|
};
|
|
3808
3808
|
}
|
|
3809
3809
|
}
|
|
3810
|
-
function
|
|
3810
|
+
function q(s, t, e) {
|
|
3811
3811
|
const i = document.createElement(t);
|
|
3812
3812
|
return s && (i.className = s), e && e.appendChild(i), i;
|
|
3813
3813
|
}
|
|
3814
|
-
function
|
|
3814
|
+
function Zi(s, t, e) {
|
|
3815
3815
|
let i = `translate3d(${s}px,0px,0)`;
|
|
3816
3816
|
return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
|
|
3817
3817
|
}
|
|
@@ -3824,7 +3824,7 @@ const T = {
|
|
|
3824
3824
|
LOADED: "loaded",
|
|
3825
3825
|
ERROR: "error"
|
|
3826
3826
|
};
|
|
3827
|
-
function
|
|
3827
|
+
function Ni(s) {
|
|
3828
3828
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
3829
3829
|
}
|
|
3830
3830
|
function H(s, t, e = document) {
|
|
@@ -3839,7 +3839,7 @@ function H(s, t, e = document) {
|
|
|
3839
3839
|
}
|
|
3840
3840
|
return i;
|
|
3841
3841
|
}
|
|
3842
|
-
function
|
|
3842
|
+
function qi(s) {
|
|
3843
3843
|
return typeof s == "function" && s.prototype && s.prototype.goTo;
|
|
3844
3844
|
}
|
|
3845
3845
|
function Lt() {
|
|
@@ -3937,7 +3937,7 @@ class Vi {
|
|
|
3937
3937
|
* @param {HTMLElement} container
|
|
3938
3938
|
*/
|
|
3939
3939
|
constructor(t, e) {
|
|
3940
|
-
if (this.element =
|
|
3940
|
+
if (this.element = q("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
|
|
3941
3941
|
const i = (
|
|
3942
3942
|
/** @type {HTMLImageElement} */
|
|
3943
3943
|
this.element
|
|
@@ -3951,7 +3951,7 @@ class Vi {
|
|
|
3951
3951
|
* @param {number} height
|
|
3952
3952
|
*/
|
|
3953
3953
|
setDisplayedSize(t, e) {
|
|
3954
|
-
this.element && (this.element.tagName === "IMG" ? (nt(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform =
|
|
3954
|
+
this.element && (this.element.tagName === "IMG" ? (nt(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = Zi(0, 0, t / 250)) : nt(this.element, t, e));
|
|
3955
3955
|
}
|
|
3956
3956
|
destroy() {
|
|
3957
3957
|
var t;
|
|
@@ -3998,7 +3998,7 @@ class ji {
|
|
|
3998
3998
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
3999
3999
|
content: this,
|
|
4000
4000
|
isLazy: t
|
|
4001
|
-
}).defaultPrevented || (this.isImageContent() ? (this.element =
|
|
4001
|
+
}).defaultPrevented || (this.isImageContent() ? (this.element = q("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = q("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), e && this.slide && this.slide.updateContentSize(!0));
|
|
4002
4002
|
}
|
|
4003
4003
|
/**
|
|
4004
4004
|
* Preload image
|
|
@@ -4143,9 +4143,9 @@ class ji {
|
|
|
4143
4143
|
displayError() {
|
|
4144
4144
|
if (this.slide) {
|
|
4145
4145
|
var t, e;
|
|
4146
|
-
let i =
|
|
4146
|
+
let i = q("pswp__error-msg", "div");
|
|
4147
4147
|
i.innerText = (t = (e = this.instance.options) === null || e === void 0 ? void 0 : e.errorMsg) !== null && t !== void 0 ? t : "", i = /** @type {HTMLDivElement} */
|
|
4148
|
-
this.instance.applyFilters("contentErrorElement", i, this), this.element =
|
|
4148
|
+
this.instance.applyFilters("contentErrorElement", i, this), this.element = q("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();
|
|
4149
4149
|
}
|
|
4150
4150
|
}
|
|
4151
4151
|
/**
|
|
@@ -4317,7 +4317,7 @@ class Ki {
|
|
|
4317
4317
|
return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
|
|
4318
4318
|
}
|
|
4319
4319
|
}
|
|
4320
|
-
function
|
|
4320
|
+
function qt(s, t, e) {
|
|
4321
4321
|
const i = t.createContentFromData(s, e);
|
|
4322
4322
|
let n;
|
|
4323
4323
|
const {
|
|
@@ -4338,7 +4338,7 @@ function Xi(s, t) {
|
|
|
4338
4338
|
index: s,
|
|
4339
4339
|
itemData: e
|
|
4340
4340
|
}).defaultPrevented)
|
|
4341
|
-
return
|
|
4341
|
+
return qt(e, t, s);
|
|
4342
4342
|
}
|
|
4343
4343
|
class Yi extends Wi {
|
|
4344
4344
|
/**
|
|
@@ -4431,7 +4431,7 @@ class Yi extends Wi {
|
|
|
4431
4431
|
* @returns {Content} Image that is being decoded or false.
|
|
4432
4432
|
*/
|
|
4433
4433
|
lazyLoadData(t, e) {
|
|
4434
|
-
return
|
|
4434
|
+
return qt(t, this, e);
|
|
4435
4435
|
}
|
|
4436
4436
|
}
|
|
4437
4437
|
class Ji extends Yi {
|
|
@@ -4454,7 +4454,7 @@ class Ji extends Yi {
|
|
|
4454
4454
|
* @param {MouseEvent} e
|
|
4455
4455
|
*/
|
|
4456
4456
|
onThumbnailsClick(t) {
|
|
4457
|
-
if (
|
|
4457
|
+
if (Ni(t) || window.pswp)
|
|
4458
4458
|
return;
|
|
4459
4459
|
let e = {
|
|
4460
4460
|
x: t.clientX,
|
|
@@ -4522,7 +4522,7 @@ class Ji extends Yi {
|
|
|
4522
4522
|
} = this;
|
|
4523
4523
|
e && (i.dataSource = e);
|
|
4524
4524
|
const n = [], o = typeof i.pswpModule;
|
|
4525
|
-
if (
|
|
4525
|
+
if (qi(i.pswpModule))
|
|
4526
4526
|
n.push(Promise.resolve(
|
|
4527
4527
|
/** @type {Type<PhotoSwipe>} */
|
|
4528
4528
|
i.pswpModule
|
|
@@ -4589,7 +4589,7 @@ const Qi = () => {
|
|
|
4589
4589
|
return s = new Ji({
|
|
4590
4590
|
gallery: "#photoswipe-gallery",
|
|
4591
4591
|
children: "a",
|
|
4592
|
-
pswpModule:
|
|
4592
|
+
pswpModule: ki,
|
|
4593
4593
|
zoom: !1,
|
|
4594
4594
|
imageClickAction: "next",
|
|
4595
4595
|
tapAction: "next"
|
|
@@ -4610,7 +4610,12 @@ const Qi = () => {
|
|
|
4610
4610
|
}), s.init(), () => {
|
|
4611
4611
|
s && (s.destroy(), s = null);
|
|
4612
4612
|
};
|
|
4613
|
-
},
|
|
4613
|
+
}, ts = "mbrs-game-ranking", es = ".c-header-page__ranking-button", is = () => {
|
|
4614
|
+
const s = document.querySelector(es), t = s?.querySelector("button");
|
|
4615
|
+
!s || !t || t.addEventListener("click", () => {
|
|
4616
|
+
document.getElementById(ts)?.scrollIntoView({ behavior: "smooth" });
|
|
4617
|
+
});
|
|
4618
|
+
}, At = (s) => Math.min(100, Math.max(0, Math.round(s))), ss = () => {
|
|
4614
4619
|
const s = document.querySelector(".js-limit-scroll-progress-bar"), t = document.querySelector(".c-progress__bar"), e = document.querySelector(".c-btn__close-progress");
|
|
4615
4620
|
if (!t && !e)
|
|
4616
4621
|
return;
|
|
@@ -4634,10 +4639,10 @@ const Qi = () => {
|
|
|
4634
4639
|
}
|
|
4635
4640
|
}
|
|
4636
4641
|
}
|
|
4637
|
-
},
|
|
4642
|
+
}, ns = () => {
|
|
4638
4643
|
const s = document.querySelector(".c-progress"), t = document.querySelector(".c-btn__close-progress");
|
|
4639
|
-
(s || t) && window.addEventListener("scroll",
|
|
4640
|
-
},
|
|
4644
|
+
(s || t) && window.addEventListener("scroll", ss);
|
|
4645
|
+
}, os = (s = {}) => {
|
|
4641
4646
|
const { buttonSelector: t = ".c-scroll-to-top" } = s, e = document.querySelector(t), i = e?.querySelector("button");
|
|
4642
4647
|
if (!e || !i)
|
|
4643
4648
|
return;
|
|
@@ -4659,7 +4664,7 @@ const Qi = () => {
|
|
|
4659
4664
|
});
|
|
4660
4665
|
};
|
|
4661
4666
|
window.addEventListener("scroll", r), i.addEventListener("click", a), r();
|
|
4662
|
-
},
|
|
4667
|
+
}, rs = 500, as = () => {
|
|
4663
4668
|
const s = document.querySelector("#mbrs-comments-container"), t = document.querySelector(".c-scroll-to-top-comment");
|
|
4664
4669
|
if (!s || !t)
|
|
4665
4670
|
return;
|
|
@@ -4675,7 +4680,7 @@ const Qi = () => {
|
|
|
4675
4680
|
}, o = () => {
|
|
4676
4681
|
e && (e = !1, window.removeEventListener("scroll", i), t.style.display = "none");
|
|
4677
4682
|
}, r = (u) => {
|
|
4678
|
-
u.offsetHeight >
|
|
4683
|
+
u.offsetHeight > rs ? n() : o();
|
|
4679
4684
|
}, a = (u) => {
|
|
4680
4685
|
new ResizeObserver(() => {
|
|
4681
4686
|
r(u);
|
|
@@ -4712,7 +4717,7 @@ const Qi = () => {
|
|
|
4712
4717
|
) && h.disconnect();
|
|
4713
4718
|
});
|
|
4714
4719
|
h.observe(s, { childList: !0, subtree: !0 });
|
|
4715
|
-
}, tt = "#page-content", ot = "#text-tooltip",
|
|
4720
|
+
}, tt = "#page-content", ot = "#text-tooltip", ls = ".tooltip-btn", Ht = "c-text-tooltip--show", cs = [
|
|
4716
4721
|
"#page-content .c-content p",
|
|
4717
4722
|
"#page-content .c-content h2",
|
|
4718
4723
|
"#page-content .c-content h3",
|
|
@@ -4724,17 +4729,17 @@ const Qi = () => {
|
|
|
4724
4729
|
"#page-content header span",
|
|
4725
4730
|
"#page-content header h1",
|
|
4726
4731
|
"#page-content header h2"
|
|
4727
|
-
], Ct = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1,
|
|
4732
|
+
], Ct = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, ds = (s, t) => {
|
|
4728
4733
|
const e = s.startContainer.nodeType === Node.ELEMENT_NODE ? s.startContainer : s.startContainer.parentElement, i = s.endContainer.nodeType === Node.ELEMENT_NODE ? s.endContainer : s.endContainer.parentElement;
|
|
4729
4734
|
return !!e && Ct(e, t) || !!i && Ct(i, t);
|
|
4730
|
-
},
|
|
4735
|
+
}, hs = (s) => {
|
|
4731
4736
|
if (!s.focusNode)
|
|
4732
4737
|
return null;
|
|
4733
4738
|
const t = s.anchorNode?.compareDocumentPosition(s.focusNode);
|
|
4734
4739
|
return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
|
|
4735
|
-
},
|
|
4740
|
+
}, us = (s, t, e) => {
|
|
4736
4741
|
const i = document.querySelector(`${tt} ${ot}`), n = document.querySelector(`${tt}`), o = document.querySelectorAll(
|
|
4737
|
-
`${tt} ${ot} ${
|
|
4742
|
+
`${tt} ${ot} ${ls}`
|
|
4738
4743
|
);
|
|
4739
4744
|
if (!i || !n) {
|
|
4740
4745
|
console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");
|
|
@@ -4758,44 +4763,44 @@ const Qi = () => {
|
|
|
4758
4763
|
return;
|
|
4759
4764
|
const e = t.getRangeAt(0), i = t.toString().trim();
|
|
4760
4765
|
if (i.length) {
|
|
4761
|
-
const n =
|
|
4762
|
-
n &&
|
|
4766
|
+
const n = ds(e, cs), o = hs(t) || !1;
|
|
4767
|
+
n && us(e, o, i);
|
|
4763
4768
|
return;
|
|
4764
4769
|
}
|
|
4765
4770
|
xt();
|
|
4766
|
-
},
|
|
4771
|
+
}, ps = () => {
|
|
4767
4772
|
if (!window?.getSelection) {
|
|
4768
4773
|
console.warn("Selection API isn't supported");
|
|
4769
4774
|
return;
|
|
4770
4775
|
}
|
|
4771
4776
|
document.addEventListener("mouseup", X), document.addEventListener("selectionchange", X), document.addEventListener("touchend", X), document.addEventListener("touchcancel", X);
|
|
4772
|
-
},
|
|
4777
|
+
}, ms = "[data-social-bar-action-row]", Wt = "button, a[href], [data-a11y-dialog-show], [data-a11y-dialog-hide]";
|
|
4773
4778
|
let Pt = !1;
|
|
4774
4779
|
const Vt = (s) => {
|
|
4775
4780
|
s.querySelector(Wt)?.click();
|
|
4776
|
-
}, jt = (s) => s instanceof HTMLElement ? s.closest(
|
|
4781
|
+
}, jt = (s) => s instanceof HTMLElement ? s.closest(ms) : null, fs = (s) => {
|
|
4777
4782
|
const t = jt(s.target);
|
|
4778
4783
|
!t || s.target.closest(Wt) || Vt(t);
|
|
4779
|
-
},
|
|
4784
|
+
}, gs = (s) => {
|
|
4780
4785
|
if (s.key !== "Enter" && s.key !== " ")
|
|
4781
4786
|
return;
|
|
4782
4787
|
const t = jt(s.target);
|
|
4783
4788
|
t && (s.preventDefault(), Vt(t));
|
|
4784
|
-
},
|
|
4785
|
-
Pt || (document.addEventListener("click",
|
|
4786
|
-
},
|
|
4789
|
+
}, vs = () => {
|
|
4790
|
+
Pt || (document.addEventListener("click", fs), document.addEventListener("keydown", gs), Pt = !0);
|
|
4791
|
+
}, ys = (s) => {
|
|
4787
4792
|
const { target: t } = s;
|
|
4788
4793
|
if (t instanceof Element) {
|
|
4789
4794
|
const e = t.closest(".c-search-form--button");
|
|
4790
4795
|
e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
|
|
4791
4796
|
}
|
|
4792
|
-
},
|
|
4797
|
+
}, _s = (s = document.querySelector(
|
|
4793
4798
|
".c-search-form--button"
|
|
4794
4799
|
)) => {
|
|
4795
4800
|
s && s.addEventListener("click", (t) => {
|
|
4796
|
-
|
|
4801
|
+
ys(t);
|
|
4797
4802
|
});
|
|
4798
|
-
},
|
|
4803
|
+
}, ws = ({
|
|
4799
4804
|
tabsContainerElement: s,
|
|
4800
4805
|
event: t
|
|
4801
4806
|
}) => {
|
|
@@ -4811,14 +4816,14 @@ const Vt = (s) => {
|
|
|
4811
4816
|
}), n.forEach((a) => {
|
|
4812
4817
|
a.setAttribute("aria-hidden", "true");
|
|
4813
4818
|
}), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
|
|
4814
|
-
}, Tt = (s) => s.code === "ArrowLeft" || s.keyCode === 39, It = (s) => s.code === "ArrowRight" || s.keyCode === 37,
|
|
4819
|
+
}, Tt = (s) => s.code === "ArrowLeft" || s.keyCode === 39, It = (s) => s.code === "ArrowRight" || s.keyCode === 37, bs = (s = document.querySelectorAll(
|
|
4815
4820
|
".js-tabs"
|
|
4816
4821
|
)) => {
|
|
4817
4822
|
s.length > 0 && s.forEach((t) => {
|
|
4818
4823
|
const e = t.querySelectorAll('[role="tab"]');
|
|
4819
4824
|
e.forEach((n) => {
|
|
4820
4825
|
n.addEventListener("click", (o) => {
|
|
4821
|
-
|
|
4826
|
+
ws({ tabsContainerElement: t, event: o });
|
|
4822
4827
|
});
|
|
4823
4828
|
});
|
|
4824
4829
|
const i = t.querySelector('[role="tablist"]');
|
|
@@ -4835,13 +4840,13 @@ const Vt = (s) => {
|
|
|
4835
4840
|
}, Gt = () => {
|
|
4836
4841
|
const s = /* @__PURE__ */ new Date(), t = s.getHours(), e = s.getMinutes();
|
|
4837
4842
|
return t * 60 + e;
|
|
4838
|
-
},
|
|
4843
|
+
}, Ss = (s, t) => {
|
|
4839
4844
|
const e = Gt();
|
|
4840
4845
|
if (e < s || e > t)
|
|
4841
4846
|
return 0;
|
|
4842
4847
|
const i = t - s;
|
|
4843
4848
|
return (e - s) / i;
|
|
4844
|
-
},
|
|
4849
|
+
}, Ls = (s) => {
|
|
4845
4850
|
const t = Gt();
|
|
4846
4851
|
let e = null, i = null, n = -1;
|
|
4847
4852
|
return Array.from(s).find((o, r, a) => {
|
|
@@ -4853,14 +4858,14 @@ const Vt = (s) => {
|
|
|
4853
4858
|
const d = Q(l), h = Q(c);
|
|
4854
4859
|
return t >= d && t < h ? (e = l, i = c, n = r, !0) : !1;
|
|
4855
4860
|
}), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n };
|
|
4856
|
-
},
|
|
4861
|
+
}, Es = () => {
|
|
4857
4862
|
const s = document.querySelectorAll(".c-timeline__time");
|
|
4858
4863
|
if (!s || s.length < 2)
|
|
4859
4864
|
return;
|
|
4860
|
-
const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } =
|
|
4865
|
+
const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = Ls(s);
|
|
4861
4866
|
if (!e || !i)
|
|
4862
4867
|
return;
|
|
4863
|
-
const o = Q(e), r = Q(i), a =
|
|
4868
|
+
const o = Q(e), r = Q(i), a = Ss(o, r);
|
|
4864
4869
|
if (t instanceof HTMLElement) {
|
|
4865
4870
|
if (t.classList.contains("c-timeline__progress-bar--is-desktop") && s.length >= 5) {
|
|
4866
4871
|
const l = "172px / 2";
|
|
@@ -4899,19 +4904,19 @@ const Vt = (s) => {
|
|
|
4899
4904
|
}
|
|
4900
4905
|
}
|
|
4901
4906
|
}
|
|
4902
|
-
}, rt = "c-icon-item__container--is-highlighted",
|
|
4907
|
+
}, rt = "c-icon-item__container--is-highlighted", As = (s) => {
|
|
4903
4908
|
s.find(
|
|
4904
4909
|
(e) => e.classList.contains(rt)
|
|
4905
4910
|
)?.classList.remove(rt);
|
|
4906
|
-
},
|
|
4911
|
+
}, Cs = () => {
|
|
4907
4912
|
const s = document.querySelector(".c-toolbar");
|
|
4908
4913
|
if (s) {
|
|
4909
4914
|
const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-icon-item__container"));
|
|
4910
|
-
|
|
4915
|
+
As(e), e.find(
|
|
4911
4916
|
(n) => n.querySelector("a")?.getAttribute("href") === t
|
|
4912
4917
|
)?.classList.add(rt);
|
|
4913
4918
|
}
|
|
4914
|
-
},
|
|
4919
|
+
}, xs = 12, ct = (s) => {
|
|
4915
4920
|
const t = s || document.querySelector(".c-map-towns");
|
|
4916
4921
|
if (!t) {
|
|
4917
4922
|
new MutationObserver((o, r) => {
|
|
@@ -4947,7 +4952,7 @@ const Vt = (s) => {
|
|
|
4947
4952
|
d.setAttribute("y", `${A}`), l.setAttribute("aria-hidden", "false");
|
|
4948
4953
|
} else
|
|
4949
4954
|
a = !1;
|
|
4950
|
-
}), !a && r <
|
|
4955
|
+
}), !a && r < xs && requestAnimationFrame(() => o(r + 1));
|
|
4951
4956
|
};
|
|
4952
4957
|
return requestAnimationFrame(() => o()), !0;
|
|
4953
4958
|
};
|
|
@@ -4959,7 +4964,7 @@ const Vt = (s) => {
|
|
|
4959
4964
|
childList: !0,
|
|
4960
4965
|
subtree: !0
|
|
4961
4966
|
});
|
|
4962
|
-
},
|
|
4967
|
+
}, Ps = {
|
|
4963
4968
|
10: [{ id: "10387", name: "Troyes" }, { id: "10323", name: "Romilly-sur-Seine" }, { id: "10033", name: "Bar-sur-Aube" }],
|
|
4964
4969
|
11: [{ id: "11262", name: "Narbonne" }, { id: "11069", name: "Carcassonne" }, { id: "11076", name: "Castelnaudary" }],
|
|
4965
4970
|
12: [{ id: "12202", name: "Rodez" }, { id: "12145", name: "Millau" }, { id: "12300", name: "Villefranche-de-Rouergue" }],
|
|
@@ -5060,14 +5065,14 @@ const Vt = (s) => {
|
|
|
5060
5065
|
"07": [{ id: "07010", name: "Annonay" }, { id: "07019", name: "Aubenas" }, { id: "07324", name: "Tournon-sur-Rhône" }],
|
|
5061
5066
|
"05": [{ id: "05061", name: "Gap" }, { id: "05023", name: "Briançon" }, { id: "05046", name: "Embrun" }],
|
|
5062
5067
|
"08": [{ id: "08105", name: "Charleville-Mézières" }, { id: "08362", name: "Rethel" }, { id: "08190", name: "Givet" }]
|
|
5063
|
-
},
|
|
5068
|
+
}, Ts = /<path\b([^>]*?)\/>/g, Is = /\b([:\w-]+)="([^"]*)"/g, Ms = (s) => {
|
|
5064
5069
|
const t = [];
|
|
5065
|
-
for (const e of s.matchAll(
|
|
5070
|
+
for (const e of s.matchAll(Ts)) {
|
|
5066
5071
|
const i = e[1];
|
|
5067
5072
|
if (!i)
|
|
5068
5073
|
continue;
|
|
5069
5074
|
const n = /* @__PURE__ */ new Map();
|
|
5070
|
-
for (const c of i.matchAll(
|
|
5075
|
+
for (const c of i.matchAll(Is)) {
|
|
5071
5076
|
const [, d, h] = c;
|
|
5072
5077
|
d && n.set(d, h || "");
|
|
5073
5078
|
}
|
|
@@ -5080,11 +5085,11 @@ const Vt = (s) => {
|
|
|
5080
5085
|
});
|
|
5081
5086
|
}
|
|
5082
5087
|
return t;
|
|
5083
|
-
},
|
|
5088
|
+
}, zs = (s) => new Map(s.map((t) => [t.id, t]));
|
|
5084
5089
|
var Ut = /* @__PURE__ */ ((s) => (s.MOBILE = "mobile", s.DESKTOP = "desktop", s))(Ut || {});
|
|
5085
5090
|
const Y = (s) => {
|
|
5086
5091
|
window.location.href = s;
|
|
5087
|
-
},
|
|
5092
|
+
}, Os = (s, t, e) => {
|
|
5088
5093
|
const i = e.get(s);
|
|
5089
5094
|
if (i)
|
|
5090
5095
|
return i;
|
|
@@ -5099,7 +5104,7 @@ const Y = (s) => {
|
|
|
5099
5104
|
(o) => o.id.startsWith(`town-${s}`)
|
|
5100
5105
|
);
|
|
5101
5106
|
return e.set(s, n), n;
|
|
5102
|
-
},
|
|
5107
|
+
}, Ds = (s, t) => t.get(s), Rs = (s) => {
|
|
5103
5108
|
if (s.size > 0)
|
|
5104
5109
|
return;
|
|
5105
5110
|
document.querySelectorAll(
|
|
@@ -5111,13 +5116,13 @@ const Y = (s) => {
|
|
|
5111
5116
|
Array.from(e.classList).filter((n) => n.startsWith("c-map-towns__path--"))
|
|
5112
5117
|
);
|
|
5113
5118
|
});
|
|
5114
|
-
},
|
|
5119
|
+
}, $s = (s, t) => {
|
|
5115
5120
|
const e = s.id, i = s.url, n = s.name;
|
|
5116
5121
|
if (!e || !i)
|
|
5117
5122
|
return null;
|
|
5118
5123
|
const o = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
5119
5124
|
o.setAttribute("d", s.path), o.setAttribute("class", "c-map-towns__path c-map-towns__zoom-town"), o.setAttribute("data-url", i);
|
|
5120
|
-
const r =
|
|
5125
|
+
const r = Ds(e, t);
|
|
5121
5126
|
if (r && r.forEach((a) => {
|
|
5122
5127
|
o.classList.add(a);
|
|
5123
5128
|
}), n) {
|
|
@@ -5125,15 +5130,15 @@ const Y = (s) => {
|
|
|
5125
5130
|
a.textContent = n, o.appendChild(a);
|
|
5126
5131
|
}
|
|
5127
5132
|
return o;
|
|
5128
|
-
},
|
|
5133
|
+
}, Bs = (s, t) => {
|
|
5129
5134
|
const e = document.createDocumentFragment();
|
|
5130
5135
|
return s.forEach((i) => {
|
|
5131
|
-
const n =
|
|
5136
|
+
const n = $s(i, t);
|
|
5132
5137
|
n && e.appendChild(n);
|
|
5133
5138
|
}), e;
|
|
5134
|
-
},
|
|
5139
|
+
}, Fs = (s, t) => {
|
|
5135
5140
|
s.replaceChildren(t);
|
|
5136
|
-
},
|
|
5141
|
+
}, ks = (s, t, e) => {
|
|
5137
5142
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
5138
5143
|
i.setAttribute("class", "js-city-marker c-map-towns__city-marker"), i.setAttribute("aria-hidden", "true"), i.setAttribute("data-scale", e.toString());
|
|
5139
5144
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -5144,7 +5149,7 @@ const Y = (s) => {
|
|
|
5144
5149
|
r.setAttribute("class", "js-city-bg"), r.setAttribute("fill", "white"), r.setAttribute("rx", "4"), r.setAttribute("ry", "4");
|
|
5145
5150
|
const a = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
5146
5151
|
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;
|
|
5147
|
-
},
|
|
5152
|
+
}, Zs = (s, t) => {
|
|
5148
5153
|
const e = t.getBBox(), i = 5, n = e.width + i * 2, o = e.height + i * 2;
|
|
5149
5154
|
s.setAttribute(
|
|
5150
5155
|
"viewBox",
|
|
@@ -5169,8 +5174,8 @@ const at = () => {
|
|
|
5169
5174
|
return;
|
|
5170
5175
|
const A = b.closest(".js-city-marker");
|
|
5171
5176
|
if (A) {
|
|
5172
|
-
const
|
|
5173
|
-
|
|
5177
|
+
const R = A.getAttribute("data-url");
|
|
5178
|
+
R && Y(R);
|
|
5174
5179
|
return;
|
|
5175
5180
|
}
|
|
5176
5181
|
const M = b.closest(".c-map-towns__zoom-item")?.getAttribute("data-city-url");
|
|
@@ -5197,11 +5202,11 @@ const at = () => {
|
|
|
5197
5202
|
if (p)
|
|
5198
5203
|
return p;
|
|
5199
5204
|
const L = u instanceof HTMLScriptElement ? JSON.parse(u.textContent || '""') : "";
|
|
5200
|
-
return p =
|
|
5205
|
+
return p = zs(Ms(L)), p;
|
|
5201
5206
|
}, w = () => {
|
|
5202
5207
|
r.setAttribute("aria-hidden", "true"), l.replaceChildren();
|
|
5203
5208
|
}, 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) => {
|
|
5204
|
-
const I =
|
|
5209
|
+
const I = Ps[L] || [];
|
|
5205
5210
|
if (I.length === 0)
|
|
5206
5211
|
return;
|
|
5207
5212
|
const M = document.createDocumentFragment();
|
|
@@ -5209,8 +5214,8 @@ const at = () => {
|
|
|
5209
5214
|
const z = C(L, F.id);
|
|
5210
5215
|
if (!z)
|
|
5211
5216
|
return;
|
|
5212
|
-
const
|
|
5213
|
-
M.appendChild(
|
|
5217
|
+
const R = ks(F.name, z, b);
|
|
5218
|
+
M.appendChild(R);
|
|
5214
5219
|
}), l.appendChild(M), requestAnimationFrame(() => {
|
|
5215
5220
|
ct(l);
|
|
5216
5221
|
});
|
|
@@ -5221,13 +5226,13 @@ const at = () => {
|
|
|
5221
5226
|
const A = b?.closest(".c-map-towns__dept-trigger");
|
|
5222
5227
|
if (!A)
|
|
5223
5228
|
return;
|
|
5224
|
-
const I = A.getAttribute("id")?.replace("out-", "") || "", M = A.getAttribute("data-name"), F =
|
|
5225
|
-
|
|
5226
|
-
const z =
|
|
5229
|
+
const I = A.getAttribute("id")?.replace("out-", "") || "", M = A.getAttribute("data-name"), F = Os(I, y, f);
|
|
5230
|
+
Rs(m);
|
|
5231
|
+
const z = Bs(F, m);
|
|
5227
5232
|
if (d && h && M && (d.textContent = M, h.textContent = `Carte détaillée du département : ${M}`), !(A instanceof SVGGraphicsElement))
|
|
5228
5233
|
return;
|
|
5229
|
-
const
|
|
5230
|
-
r.setAttribute("aria-hidden", "false"),
|
|
5234
|
+
const R = Zs(a, A);
|
|
5235
|
+
r.setAttribute("aria-hidden", "false"), Fs(l, z), g(I, R);
|
|
5231
5236
|
}, E = (L) => {
|
|
5232
5237
|
const { target: b } = L;
|
|
5233
5238
|
if (!(b instanceof Element))
|
|
@@ -5240,15 +5245,15 @@ const at = () => {
|
|
|
5240
5245
|
}), r.addEventListener("click", (L) => {
|
|
5241
5246
|
L.target === r && w();
|
|
5242
5247
|
});
|
|
5243
|
-
},
|
|
5244
|
-
ye(),
|
|
5248
|
+
}, Gs = () => {
|
|
5249
|
+
ye(), bs(), se(), Ae(), pe(), ns(), Qi(), Me(), _s(), vs(), re(), ps(), _e(), we(), Se(), ce(), ee(
|
|
5245
5250
|
"localisation-input",
|
|
5246
5251
|
"https://www.20minutes.fr/elections/resultats/recherche",
|
|
5247
5252
|
"?searchValue=",
|
|
5248
5253
|
"text",
|
|
5249
5254
|
"text"
|
|
5250
|
-
), le(), ct(),
|
|
5255
|
+
), le(), ct(), Cs(), Jt(), Qt(), Le(), at(), Be(), Fe(), be(), Yt(), Es(), os(), as(), is();
|
|
5251
5256
|
};
|
|
5252
5257
|
export {
|
|
5253
|
-
|
|
5258
|
+
Gs as initScripts
|
|
5254
5259
|
};
|