@20minutes/tyr 2.44.6 → 2.44.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- !function(e,t){"use strict";const n=typeof window<"u"&&navigator.userAgent.toLowerCase().includes("firefox"),r=()=>{const e=document.getElementById("js-download-band");e&&/Android/i.test(navigator.userAgent)&&e.setAttribute("href","https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome")},i=[{text:"Paris",_index:"town_1717424751904",_id:"75056",_score:1,_source:{output:"Paris (75000)",url:"/elections/resultats/paris/paris-75000"}},{text:"Paris 10ème Arrondissement",_index:"town_1717424751904",_id:"75056AR10",_score:1,_source:{output:"Paris 10ème Arrondissement (75010)",url:"/elections/resultats/paris/paris-75010"}},{text:"Paris 11ème Arrondissement",_index:"town_1717424751904",_id:"75056AR11",_score:1,_source:{output:"Paris 11ème Arrondissement (75011)",url:"/elections/resultats/paris/paris-75011"}}],o=(e,t,n,r,o,a)=>{const s=document.getElementById(e);if(!s)return;const l=s.dataset.storybook,c=s.querySelector(`#${e}-search`),u=c?.getAttribute("data-api-url"),d=s.querySelector(".c-autocomplete__menu");if(!c||!d||!u)return;const h=s.querySelector(".c-autocomplete__input-spinner"),p=c.getAttribute("data-trigger-message"),f=()=>{h?.classList.toggle("u-hidden")},m=async e=>{f(),d.classList.remove("u-hidden");const s=await(async e=>{try{const r=l&&t.includes("20minutes.fr")?i:await fetch(`${u}${n}${encodeURIComponent(e)}`).then(e=>e.json()),o=a&&"object"==typeof r&&null!==r?r[a]:r;return Array.isArray(o)?o:[]}catch(e){return console.error("Error fetching autocomplete results:",e),[]}})(e);d.innerHTML="",0===s.length&&d.classList.add("u-hidden"),s.forEach(e=>{((e,t)=>{const n=document.createElement("li");n.id=`/${e}`,n.textContent=t,n.addEventListener("click",()=>{c instanceof HTMLInputElement&&(c.value=t,d.classList.add("u-hidden"))}),d.appendChild(n)})(e[r],e[o])}),f()};c.addEventListener("input",e=>{if(!(e.target instanceof HTMLInputElement))return;const t=e.target.value;d.classList.remove("u-hidden"),t.length>=3?m(t):(d.innerHTML="",(()=>{const e=document.createElement("li");e.textContent=p,d.appendChild(e)})())}),c.addEventListener("focusout",()=>{setTimeout(()=>d.classList.add("u-hidden"),300)}),c.addEventListener("focusin",()=>{d.childElementCount>0&&d.classList.remove("u-hidden")})},a=(e=document.querySelector(".js-collapse__button"))=>{e&&document.querySelectorAll(".c-collapse__button").forEach(e=>{e.addEventListener("click",e=>{(e=>{e.stopImmediatePropagation(),e.preventDefault();const t=e.currentTarget;if(t instanceof HTMLButtonElement){const e=t.parentElement?.querySelector(`#${t.getAttribute("aria-controls")}`);"true"===t.getAttribute("aria-expanded")?(t.setAttribute("aria-expanded","false"),e?.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),e?.setAttribute("aria-hidden","false"))}})(e)})})},s=(e,t)=>{const n=e-Date.now();if(n<=0)return!1;const r=Math.floor(n/864e5),i=Math.floor(n%864e5/36e5),o=Math.floor(n%36e5/6e4),a=Math.floor(n%6e4/1e3);return t.daysElement.textContent=r.toString(),t.hoursElement.textContent=i.toString(),t.minutesElement.textContent=o.toString(),t.secondsElement.textContent=a.toString(),!0},l=()=>{const e=document.querySelector(".c-map-districts-container"),t=document.querySelector(".c-map-districts");if(!e||!t)return;const n=document.querySelector(".c-map-districts-container__description"),r=document.querySelector(".c-map-districts-container__department"),i=document.querySelector(".c-map-districts-container__unzoom-button");let o=t;const a=t.getAttribute("viewBox"),s=(e,t)=>e.matches?.call(e,t),l=(s,l)=>{if(l&&i&&n){e.classList.remove("c-map-districts-container--department-view"),n.classList.remove("u-hidden"),r?.classList.add("u-hidden"),i.classList.add("u-hidden"),l!==a&&(n.classList.add("u-hidden"),i.classList.remove("u-hidden")),o.classList.remove("js-selected-area"),o=s;const c=o.getAttribute("data-info");r&&c&&(e.classList.add("c-map-districts-container--department-view"),r.classList.remove("u-hidden"),r.innerHTML=c),o.classList.add("js-selected-area"),t.setAttribute("viewBox",l)}},c=e=>{e.stopPropagation();const n=e.currentTarget;if(o&&t&&n instanceof SVGGraphicsElement){if(n===o)return;if(e.preventDefault(),o!==t&&!((e,t,n)=>{if(!e)return;let r=e.parentElement;for(;r instanceof SVGGraphicsElement&&r!==n;){if(t===r)return!0;r=r.parentElement}return n===t})(n,o,t))return void l(t,a);const r=((e,t,n=".c-map-districts__zoomable:not(.js-selected-area)")=>{if(!e)return;let r,i=e.parentElement;for(;i instanceof SVGGraphicsElement&&i!==t;)s(i,n)&&(r=i),i=i.parentElement;return r})(n,o);l(r||n,(e=>{const t=e.getBBox(),n=t.width/20;return[t.x-n,t.y-n,t.width+2*n,t.height+2*n].join(" ")})(r||n))}},u=()=>{t&&o!==t&&l(t,a)};t.addEventListener("click",u),i&&i.addEventListener("click",u),document.querySelectorAll(".c-map-districts__zoomable").forEach(e=>{e.addEventListener("click",e=>c(e))})},c=()=>{const e=document.getElementById("elections-form-search"),t=document.querySelector(".c-search-form__autocomplete");if(!e||!t)return;e.addEventListener("input",({target:e})=>{if(!(e instanceof HTMLInputElement))return;const n=e.value;if(t.classList.add("u-hidden"),n.length>=3){const e=(e=>{t.classList.remove("u-hidden");const n=t.querySelectorAll("li"),r=[];return n.forEach(t=>{t.querySelector("a")?.innerHTML.toLowerCase().includes(e.toLowerCase())&&r.push(t.innerHTML)}),r})(n);t.innerHTML="",0===e.length&&t.classList.add("u-hidden"),e.forEach(e=>{(e=>{t.innerHTML+=`<li>${e}</li>`})(e)})}}),e.addEventListener("focusout",()=>{setTimeout(()=>t.classList.add("u-hidden"),300)}),e.addEventListener("focusin",()=>{t.childElementCount>0&&t.classList.remove("u-hidden")})},u=(e,t)=>{const n=e.currentTarget;if(e.preventDefault(),n instanceof HTMLButtonElement){const e=t?"u-ellipsis-multiline":"u-ellipsis";return"true"===n.getAttribute("aria-expanded")?((e,t)=>{e.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach(e=>{e.classList.add(t)}),e.setAttribute("aria-expanded","false");const n=e.querySelector(".js-ellipsis-button__label");n instanceof HTMLSpanElement&&(n.innerHTML="Voir plus")})(n,e):((e,t)=>{e.setAttribute("aria-expanded","true"),e.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach(e=>{e.classList.remove(t)});const n=e.querySelector(".js-ellipsis-button__label");n instanceof HTMLSpanElement&&(n.innerHTML="Voir moins")})(n,e)}return null},d=e=>{const t=e.currentTarget;return e.preventDefault(),t instanceof HTMLButtonElement?"true"===t.getAttribute("aria-expanded")?(e=>{e.parentNode?.querySelectorAll(".js-expand-target")?.forEach(e=>{e.setAttribute("aria-hidden","true")}),e.setAttribute("aria-expanded","false");const t=e.querySelector(".js-expand-button__label");t instanceof HTMLSpanElement&&(t.innerHTML="Voir plus")})(t):(e=>{e.setAttribute("aria-expanded","true"),e.parentNode?.querySelectorAll(".js-expand-target")?.forEach(e=>{e.setAttribute("aria-hidden","false")});const t=e.querySelector(".js-expand-button__label");t instanceof HTMLSpanElement&&(t.innerHTML="Voir moins")})(t):null},h=(e,t)=>{const n=document.querySelector(".js-content-header"),r=document.querySelector(t),i=document.querySelector(e),o=document.querySelector(".c-header-mobile"),a=o instanceof HTMLElement?o.offsetHeight:0;if(n&&r&&i){const e=new IntersectionObserver(()=>{const e=i.classList,t=e.contains("u-hidden"),o=n.getBoundingClientRect().bottom-a,s=r.getBoundingClientRect().bottom-a;t&&o<=0&&s>=0&&e.remove("u-hidden"),!t&&(o>=0||s<=0)&&e.add("u-hidden")},{root:document,rootMargin:`-${a}px 0px 0px 0px`});e.observe(n),e.observe(r)}},p=()=>{const e=document.querySelector(".c-image-slider__container");if(!e)return()=>{};const t=document.querySelectorAll(".c-image-slider__slide"),n=document.querySelector(".c-image-slider__button-container--previous"),r=document.querySelector(".c-image-slider__button-container--next"),i=document.querySelectorAll(".c-image-slider__indicator");let o=0,a=null,s=!1;const l=(t=!0)=>{if(!(e instanceof HTMLElement))return;e.style.transition=t?"transform 0.3s ease":"none";const n=100*-o;e.style.transform=`translateX(${n}%)`,i.forEach((e,t)=>{e.classList.toggle("c-image-slider__indicator--is-active",t===o)})},c=e=>{o=e,l(!0)},u=()=>{a&&clearInterval(a),a=setInterval(()=>{if(!s){const e=(o+1)%t.length;c(e)}},4e3)},d=()=>{a&&(clearInterval(a),a=null)},h=()=>{s=!0,d()},p=()=>{s=!1,u()};n?.addEventListener("click",()=>{h();const e=(o-1+t.length)%t.length;c(e),setTimeout(p,5e3)}),r?.addEventListener("click",()=>{h();const e=(o+1)%t.length;c(e),setTimeout(p,5e3)}),i.forEach((e,t)=>{e.addEventListener("click",()=>{h(),c(t),setTimeout(p,5e3)})});let f=0,m=0,g=!1;return e.addEventListener("touchstart",t=>{e instanceof HTMLElement&&(h(),f=t.touches[0].clientX,m=f,g=!0,e.style.transition="none")}),e.addEventListener("touchmove",t=>{if(!(e instanceof HTMLElement))return;m=t.touches[0].clientX;const n=m-f,r=-o*window.innerWidth+n;e.style.transform=`translateX(${r}px)`}),e.addEventListener("touchend",()=>{if(!g)return;g=!1;const e=m-f;Math.abs(e)>75&&(e<0?o=Math.min(o+1,t.length-1):e>0&&(o=Math.max(o-1,0))),l(!0),setTimeout(p,5e3)}),l(!0),u(),()=>{d()}},f=e=>{e.stopImmediatePropagation(),e.preventDefault();const t=e.currentTarget,n=document.getElementById("info-button-content");!(t instanceof HTMLButtonElement)||!n||("true"===t.getAttribute("aria-expanded")?(t.setAttribute("aria-expanded","false"),n.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),n.setAttribute("aria-hidden","false")))},m=":not([inert]):not([inert] *)",g=':not([tabindex^="-"])',y=":not(:disabled)";var v=[`a[href]${m}${g}`,`area[href]${m}${g}`,`input:not([type="hidden"]):not([type="radio"])${m}${g}${y}`,`input[type="radio"]${m}${g}${y}`,`select${m}${g}${y}`,`textarea${m}${g}${y}`,`button${m}${g}${y}`,`details${m} > summary:first-of-type${g}`,`iframe${m}${g}`,`audio[controls]${m}${g}`,`video[controls]${m}${g}`,`[contenteditable]${m}${g}`,`[tabindex]${m}${g}`];function A(e){(e.querySelector("[autofocus]")||e).focus()}function b(e,t){if(t&&_(e))return e;if(function(e){return(!e.shadowRoot||"-1"!==e.getAttribute("tabindex"))&&!e.matches(":disabled,[hidden],[inert]")}(e))if(e.shadowRoot){let n=w(e.shadowRoot,t);for(;n;){const e=b(n,t);if(e)return e;n=x(n,t)}}else if("slot"===e.localName){const n=e.assignedElements({flatten:!0});t||n.reverse();for(const e of n){const n=b(e,t);if(n)return n}}else{let n=w(e,t);for(;n;){const e=b(n,t);if(e)return e;n=x(n,t)}}return!t&&_(e)?e:null}function w(e,t){return t?e.firstElementChild:e.lastElementChild}function x(e,t){return t?e.nextElementSibling:e.previousElementSibling}const _=e=>!e.shadowRoot?.delegatesFocus&&(e.matches(v.join(","))&&!(e=>!(!e.matches("details:not([open]) *")||e.matches("details>summary:first-of-type"))||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))(e));function S(e=document){const t=e.activeElement;return t?t.shadowRoot?S(t.shadowRoot)||document.activeElement:t:null}function E(e,t){const[n,r]=function(e){const t=b(e,!0);return[t,t?b(e,!1)||t:null]}(e);if(!n)return t.preventDefault();const i=S();t.shiftKey&&i===n?(r.focus(),t.preventDefault()):!t.shiftKey&&i===r&&(n.focus(),t.preventDefault())}function C(e,t){return function t(n){if(!n||n===document||n===window)return null;const r=k(n);return r&&(n=r),n.closest(e)||t(n.getRootNode().host)}(t)}function k(e){return e.assignedSlot||(e.parentNode?k(e.parentNode):null)}const I="data-a11y-dialog";class D{$el;id;previouslyFocused;shown;constructor(e){this.$el=e,this.id=this.$el.getAttribute(I)||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)}destroy(){return this.fire("destroy").defaultPrevented||(this.hide(),document.removeEventListener("click",this.handleTriggerClicks,!0),this.$el.replaceWith(this.$el.cloneNode(!0))),this}show(e){return this.shown||this.fire("show",e).defaultPrevented||(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=S(),"BODY"===this.previouslyFocused?.tagName&&e?.target&&(this.previouslyFocused=e.target),"focus"===e?.type?this.maintainFocus():A(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0)),this}hide(e){return this.shown?(this.fire("hide",e).defaultPrevented||(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),document.body.removeEventListener("focus",this.maintainFocus,!0),this.$el.removeEventListener("keydown",this.bindKeypress,!0),this.previouslyFocused?.focus?.()),this):this}on(e,t,n){return this.$el.addEventListener(e,t,n),this}off(e,t,n){return this.$el.removeEventListener(e,t,n),this}fire(e,t){const n=new CustomEvent(e,{detail:t,cancelable:!0});return this.$el.dispatchEvent(n),n}handleTriggerClicks(e){const t=e.composedPath()[0],n=C(`[${I}-show="${this.id}"]`,t),r=C(`[${I}-hide="${this.id}"]`,t),i=C(`[${I}-hide]`,t)&&C('[aria-modal="true"]',t)===this.$el;n&&this.show(e),(r||i)&&this.hide(e)}bindKeypress(e){if(C('[aria-modal="true"]',S())!==this.$el)return;let t=!1;try{t=!!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open')}catch{}"Escape"===e.key&&"alertdialog"!==this.$el.getAttribute("role")&&!t&&(e.preventDefault(),this.hide(e)),"Tab"===e.key&&E(this.$el,e)}maintainFocus(){const e=S();C(`[aria-modal="true"], [${I}-ignore-focus-trap]`,e)||A(this.$el)}}function T(){for(const e of document.querySelectorAll("[data-a11y-dialog]"))new D(e)}typeof document<"u"&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",T):T());const N="50px",L=({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r})=>{n.classList.contains("o-nav-button--visible")&&!r.classList.contains("o-nav-button--visible")&&(e.style.paddingRight=N,e.style.paddingLeft=""),r.classList.contains("o-nav-button--visible")&&(e.style.paddingLeft=N,n.classList.contains("o-nav-button--visible")&&(e.style.paddingRight=N),n.classList.contains("o-nav-button--visible")||(e.style.paddingRight="")),!n.classList.contains("o-nav-button--visible")&&!r.classList.contains("o-nav-button--visible")&&(t.style.width="",e.style.paddingRight="")},B=({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r,sliderVariant:i})=>{if(t){const o=t.closest(".js-overview-bar-container")?.querySelector(".c-stepper")?.querySelectorAll(".c-stepper__item");if(o){const e=Array.from(o).findIndex(e=>e.classList.contains("c-stepper__item--loading"));if(e<0)o[0].classList.add("c-stepper__item--loading");else{o[e].classList.remove("c-stepper__item--loading"),o[e].classList.add("c-stepper__item--loaded");const t=o[e].querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition="width 0s linear"),e+1<o.length&&o[e+1].classList.add("c-stepper__item--loading")}}if(t.scrollWidth-t.clientWidth>t.clientWidth){let e=t.scrollLeft;switch(i){case"three-columns-articles":e+=t.clientWidth+32;break;case"rubrics":e+=t.clientWidth-36;break;default:e+=Math.ceil(.6*t.clientWidth)}t.scrollTo({left:e,behavior:"smooth"}),r.classList.add("o-nav-button--visible"),e+t.clientWidth>=t.scrollWidth&&n.classList.remove("o-nav-button--visible")}else{const e=t.scrollWidth-t.clientWidth;t.scrollTo({left:e,behavior:"smooth"}),n.classList.remove("o-nav-button--visible"),r.classList.add("o-nav-button--visible")}n.classList.contains("c-slider__button-container--has-space-around")&&r.classList.contains("c-slider__button-container--has-space-around")&&L({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r})}},P=({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r,sliderVariant:i,delay:o})=>{if(t){const a=t.closest(".js-overview-bar-container")?.querySelector(".c-stepper")?.querySelectorAll(".c-stepper__item");if(a){const e=Array.from(a).findIndex(e=>e.classList.contains("c-stepper__item--loading"));e<0?a[0].classList.add("c-stepper__item--loading"):(a[e].classList.remove("c-stepper__item--loading"),a[e].classList.remove("c-stepper__item--loaded"),e-1>0&&(a[e-1].classList.remove("c-stepper__item--loading"),a[e-1].classList.remove("c-stepper__item--loaded"),setTimeout(()=>{const t=a[e-1].querySelector(".c-stepper__loader");a[e-1].classList.add("c-stepper__item--loading"),t&&t instanceof HTMLElement&&(t.style.transition=`width ${o/1e3}s linear`)},0)))}if(t.clientWidth<t.scrollLeft){let e=t.scrollLeft;switch(i){case"three-columns-articles":e-=t.clientWidth+32;break;case"rubrics":e-=t.clientWidth-36;break;default:e-=Math.ceil(.6*t.clientWidth)}t.scrollTo({left:e,behavior:"smooth"}),n.classList.add("o-nav-button--visible"),0===e&&r.classList.remove("o-nav-button--visible")}else t.scrollTo({left:0,behavior:"smooth"}),r.classList.remove("o-nav-button--visible"),t.clientWidth<t.scrollWidth&&n.classList.add("o-nav-button--visible");n.classList.contains("c-slider__button-container--has-space-around")&&r.classList.contains("c-slider__button-container--has-space-around")&&L({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r})}},O=({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r})=>{(({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r})=>{const i=t.scrollLeft>0,o=t.scrollLeft+(t.clientWidth+.5)<t.scrollWidth;i&&o?(n.classList?.add("o-nav-button--visible"),r.classList?.add("o-nav-button--visible")):i?(n.classList?.remove("o-nav-button--visible"),r.classList?.add("o-nav-button--visible")):o?(n.classList?.add("o-nav-button--visible"),r.classList?.remove("o-nav-button--visible")):(n.classList?.remove("o-nav-button--visible"),r.classList?.remove("o-nav-button--visible")),n.classList.contains("c-slider__button-container--has-space-around")&&r.classList.contains("c-slider__button-container--has-space-around")&&L({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r})})({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r})},M=e=>{const{sliderVariant:t}=e.dataset,{sliderAuto:n}=e.dataset,{sliderDelay:r}=e.dataset,i=r?parseInt(r,10):3e3,o=e.closest(".js-overview-bar-container")?.querySelector(".c-stepper"),a=o?.querySelectorAll(".c-stepper__item"),s=e.querySelector(".js-navigation-container__list"),l=e.querySelector(".o-nav-button--next-button"),c=e.querySelector(".o-nav-button--previous-button");if(s&&l&&c&&(s.clientWidth<s.scrollWidth&&(l.classList.add("o-nav-button--visible"),l.classList.contains("c-slider__button-container--has-space-around")&&(e.style.paddingRight=N)),l.addEventListener("click",B.bind(!1,{navigationContainer:e,navigatedList:s,nextBtn:l,prevBtn:c,sliderVariant:t})),c.addEventListener("click",P.bind(!1,{navigationContainer:e,navigatedList:s,nextBtn:l,prevBtn:c,sliderVariant:t,delay:i})),"true"===n)){const e=o?o.querySelector(".c-stepper__item--loading"):null;a&&(a.forEach(e=>{const t=e.querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition=`width ${i/1e3}s linear`)}),e||a[0].classList.add("c-stepper__item--loading")),setInterval(()=>{l.classList.contains("o-nav-button--visible")?l.click():s&&c&&(s.scrollLeft=0,a&&(a.forEach(e=>{const t=e.querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition="width 0s linear"),e.classList.remove("c-stepper__item--loading"),e.classList.remove("c-stepper__item--loaded"),setTimeout(()=>{t&&t instanceof HTMLElement&&(t.style.transition=`width ${i/1e3}s linear`)},0)}),setTimeout(()=>{a[0].classList.add("c-stepper__item--loading")},0)),c.click())},i)}};function j(e,t,n){const r=document.createElement(t);return e&&(r.className=e),n&&n.appendChild(r),r}function F(e,t){return e.x=t.x,e.y=t.y,void 0!==t.id&&(e.id=t.id),e}function R(e){e.x=Math.round(e.x),e.y=Math.round(e.y)}function q(e,t){const n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return Math.sqrt(n*n+r*r)}function z(e,t){return e.x===t.x&&e.y===t.y}function H(e,t,n){return Math.min(Math.max(e,t),n)}function K(e,t,n){let r=`translate3d(${e}px,${t||0}px,0)`;return void 0!==n&&(r+=` scale3d(${n},${n},1)`),r}function U(e,t,n,r){e.style.transform=K(t,n,r)}function V(e,t,n,r){e.style.transition=t?`${t} ${n}ms ${r||"cubic-bezier(.4,0,.22,1)"}`:"none"}function Q(e,t,n){e.style.width="number"==typeof t?`${t}px`:t,e.style.height="number"==typeof n?`${n}px`:n}const W="idle",G="loading",Z="loaded",Y="error";function J(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}let $=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{$=!0}}))}catch{}let X=class{constructor(){this._pool=[]}add(e,t,n,r){this._toggleListener(e,t,n,r)}remove(e,t,n,r){this._toggleListener(e,t,n,r,!0)}removeAll(){this._pool.forEach(e=>{this._toggleListener(e.target,e.type,e.listener,e.passive,!0,!0)}),this._pool=[]}_toggleListener(e,t,n,r,i,o){if(!e)return;const a=i?"removeEventListener":"addEventListener";t.split(" ").forEach(t=>{if(t){o||(i?this._pool=this._pool.filter(r=>r.type!==t||r.listener!==n||r.target!==e):this._pool.push({target:e,type:t,listener:n,passive:r}));const s=!!$&&{passive:r||!1};e[a](t,n,s)}})}};function ee(e,t){if(e.getViewportSizeFn){const n=e.getViewportSizeFn(e,t);if(n)return n}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function te(e,t,n,r,i){let o=0;if(t.paddingFn)o=t.paddingFn(n,r,i)[e];else if(t.padding)o=t.padding[e];else{const n="padding"+e[0].toUpperCase()+e.slice(1);t[n]&&(o=t[n])}return Number(o)||0}function ne(e,t,n,r){return{x:t.x-te("left",e,t,n,r)-te("right",e,t,n,r),y:t.y-te("top",e,t,n,r)-te("bottom",e,t,n,r)}}let re=class{constructor(e){this.slide=e,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(e){this.currZoomLevel=e,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(e){const{pswp:t}=this.slide,n=this.slide["x"===e?"width":"height"]*this.currZoomLevel,r=te("x"===e?"left":"top",t.options,t.viewportSize,this.slide.data,this.slide.index),i=this.slide.panAreaSize[e];this.center[e]=Math.round((i-n)/2)+r,this.max[e]=n>i?Math.round(i-n)+r:this.center[e],this.min[e]=n>i?r:this.center[e]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(e,t){return H(t,this.max[e],this.min[e])}};let ie=class{constructor(e,t,n,r){this.pswp=r,this.options=e,this.itemData=t,this.index=n,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(e,t,n){const r={x:e,y:t};this.elementSize=r,this.panAreaSize=n;const i=n.x/r.x,o=n.y/r.y;this.fit=Math.min(1,i<o?i:o),this.fill=Math.min(1,i>o?i:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(e){const t=e+"ZoomLevel",n=this.options[t];if(n)return"function"==typeof n?n(this):"fill"===n?this.fill:"fit"===n?this.fit:Number(n)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,3*this.fit),this.elementSize&&e*this.elementSize.x>4e3&&(e=4e3/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}},oe=class{constructor(e,t,n){this.data=e,this.index=t,this.pswp=n,this.isActive=t===n.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!n.opener.isOpen,this.zoomLevels=new ie(n.options,e,t,n),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:t}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=j("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 re(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(e){e&&!this.isActive?this.activate():!e&&this.isActive&&this.deactivate()}append(e){this.holderElement=e,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:e}=this;this.heavyAppended||!e.opener.isOpen||e.mainScroll.isShifted()||(this.isActive,0)||this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this}))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel!==this.zoomLevels.initial&&this.isActive?(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y)):(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize())}updateContentSize(e){const t=this.currentResolution||this.zoomLevels.initial;if(!t)return;const n=Math.round(this.width*t)||this.pswp.viewportSize.x,r=Math.round(this.height*t)||this.pswp.viewportSize.y;!this.sizeChanged(n,r)&&!e||this.content.setDisplayedSize(n,r)}sizeChanged(e,t){return(e!==this.prevDisplayedWidth||t!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=e,this.prevDisplayedHeight=t,!0)}getPlaceholderElement(){var e;return null===(e=this.content.placeholder)||void 0===e?void 0:e.element}zoomTo(e,t,n,r){const{pswp:i}=this;if(!this.isZoomable()||i.mainScroll.isShifted())return;i.dispatch("beforeZoomTo",{destZoomLevel:e,centerPoint:t,transitionDuration:n}),i.animations.stopAllPan();const o=this.currZoomLevel;r||(e=H(e,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(e),this.pan.x=this.calculateZoomToPanOffset("x",t,o),this.pan.y=this.calculateZoomToPanOffset("y",t,o),R(this.pan);const a=()=>{this._setResolution(e),this.applyCurrentZoomPan()};n?i.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:n,easing:i.options.easing}):a()}toggleZoom(e){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,e,this.pswp.options.zoomAnimationDuration)}setZoomLevel(e){this.currZoomLevel=e,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(e,t,n){if(this.bounds.max[e]-this.bounds.min[e]===0)return this.bounds.center[e];t||(t=this.pswp.getViewportCenterPoint()),n||(n=this.zoomLevels.initial);const r=this.currZoomLevel/n;return this.bounds.correctPan(e,(this.pan[e]-t[e])*r+t[e])}panTo(e,t){this.pan.x=this.bounds.correctPan("x",e),this.pan.y=this.bounds.correctPan("y",t),this.applyCurrentZoomPan()}isPannable(){return!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!this.width&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),F(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(e,t,n){n/=this.currentResolution||this.zoomLevels.initial,U(this.container,e,t,n)}calculateSize(){const{pswp:e}=this;F(this.panAreaSize,ne(e.options,e.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),e.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const e=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return K(this.pan.x,this.pan.y,e)}_setResolution(e){e!==this.currentResolution&&(this.currentResolution=e,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}};class ae{constructor(e){this.gestures=e,this.pswp=e.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&F(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:e,prevP1:t,dragAxis:n}=this.gestures,{currSlide:r}=this.pswp;if("y"===n&&this.pswp.options.closeOnVerticalDrag&&r&&r.currZoomLevel<=r.zoomLevels.fit&&!this.gestures.isMultitouch){const n=r.pan.y+(e.y-t.y);if(!this.pswp.dispatch("verticalDrag",{panY:n}).defaultPrevented){this._setPanWithFriction("y",n,.6);const e=1-Math.abs(this._getVerticalDragRatio(r.pan.y));this.pswp.applyBgOpacity(e),r.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),r&&(R(r.pan),r.applyCurrentZoomPan()))}end(){const{velocity:e}=this.gestures,{mainScroll:t,currSlide:n}=this.pswp;let r=0;if(this.pswp.animations.stopAll(),t.isShifted()){const n=(t.x-t.getCurrSlideX())/this.pswp.viewportSize.x;e.x<-.5&&n<0||e.x<.1&&n<-.5?(r=1,e.x=Math.min(e.x,0)):(e.x>.5&&n>0||e.x>-.1&&n>.5)&&(r=-1,e.x=Math.max(e.x,0)),t.moveIndexBy(r,!0,e.x)}n&&n.currZoomLevel>n.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(e){const{velocity:t}=this.gestures,{currSlide:n}=this.pswp;if(!n)return;const{pan:r,bounds:i}=n,o=r[e],a=this.pswp.bgOpacity<1&&"y"===e,s=o+function(e,t){return e*t/(1-t)}(t[e],.995);if(a){const e=this._getVerticalDragRatio(o),t=this._getVerticalDragRatio(s);if(e<0&&t<-.4||e>0&&t>.4)return void this.pswp.close()}const l=i.correctPan(e,s);if(o===l)return;const c=l===s?1:.82,u=this.pswp.bgOpacity,d=l-o;this.pswp.animations.startSpring({name:"panGesture"+e,isPan:!0,start:o,end:l,velocity:t[e],dampingRatio:c,onUpdate:t=>{if(a&&this.pswp.bgOpacity<1){const e=1-(l-t)/d;this.pswp.applyBgOpacity(H(u+(1-u)*e,0,1))}r[e]=Math.floor(t),n.applyCurrentZoomPan()}})}_panOrMoveMainScroll(e){const{p1:t,dragAxis:n,prevP1:r,isMultitouch:i}=this.gestures,{currSlide:o,mainScroll:a}=this.pswp,s=t[e]-r[e],l=a.x+s;if(!s||!o)return!1;if("x"===e&&!o.isPannable()&&!i)return a.moveTo(l,!0),!0;const{bounds:c}=o,u=o.pan[e]+s;if(this.pswp.options.allowPanToNext&&"x"===n&&"x"===e&&!i){const t=a.getCurrSlideX(),n=a.x-t,r=s>0,i=!r;if(u>c.min[e]&&r){if(c.min[e]<=this.startPan[e])return a.moveTo(l,!0),!0;this._setPanWithFriction(e,u)}else if(u<c.max[e]&&i){if(this.startPan[e]<=c.max[e])return a.moveTo(l,!0),!0;this._setPanWithFriction(e,u)}else if(0!==n){if(n>0)return a.moveTo(Math.max(l,t),!0),!0;if(n<0)return a.moveTo(Math.min(l,t),!0),!0}else this._setPanWithFriction(e,u)}else"y"===e?!a.isShifted()&&c.min.y!==c.max.y&&this._setPanWithFriction(e,u):this._setPanWithFriction(e,u);return!1}_getVerticalDragRatio(e){var t,n;return(e-(null!==(t=null===(n=this.pswp.currSlide)||void 0===n?void 0:n.bounds.center.y)&&void 0!==t?t:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(e,t,n){const{currSlide:r}=this.pswp;if(!r)return;const{pan:i,bounds:o}=r;if(o.correctPan(e,t)!==t||n){const r=Math.round(t-i[e]);i[e]+=r*(n||.35)}else i[e]=t}}function se(e,t,n){return e.x=(t.x+n.x)/2,e.y=(t.y+n.y)/2,e}let le=class{constructor(e){this.gestures=e,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:e}=this.gestures.pswp;e&&(this._startZoomLevel=e.currZoomLevel,F(this._startPan,e.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:e,startP1:t,p2:n,startP2:r,pswp:i}=this.gestures,{currSlide:o}=i;if(!o)return;const a=o.zoomLevels.min,s=o.zoomLevels.max;if(!o.isZoomable()||i.mainScroll.isShifted())return;se(this._startZoomPoint,t,r),se(this._zoomPoint,e,n);let l=1/q(t,r)*q(e,n)*this._startZoomLevel;if(l>o.zoomLevels.initial+o.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),l<a)if(i.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=o.zoomLevels.initial){const e=1-(a-l)/(a/1.2);i.dispatch("pinchClose",{bgOpacity:e}).defaultPrevented||i.applyBgOpacity(e)}else l=a-.15*(a-l);else l>s&&(l=s+.05*(l-s));o.pan.x=this._calculatePanForZoomLevel("x",l),o.pan.y=this._calculatePanForZoomLevel("y",l),o.setZoomLevel(l),o.applyCurrentZoomPan()}end(){const{pswp:e}=this.gestures,{currSlide:t}=e;(!t||t.currZoomLevel<t.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&e.options.pinchToClose?e.close():this.correctZoomPan()}_calculatePanForZoomLevel(e,t){const n=t/this._startZoomLevel;return this._zoomPoint[e]-(this._startZoomPoint[e]-this._startPan[e])*n}correctZoomPan(e){const{pswp:t}=this.gestures,{currSlide:n}=t;if(null==n||!n.isZoomable())return;0===this._zoomPoint.x&&(e=!0);const r=n.currZoomLevel;let i,o=!0;r<n.zoomLevels.initial?i=n.zoomLevels.initial:r>n.zoomLevels.max?i=n.zoomLevels.max:(o=!1,i=r);const a=t.bgOpacity,s=t.bgOpacity<1,l=F({x:0,y:0},n.pan);let c=F({x:0,y:0},l);e&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=r,F(this._startPan,l)),o&&(c={x:this._calculatePanForZoomLevel("x",i),y:this._calculatePanForZoomLevel("y",i)}),n.setZoomLevel(i),c={x:n.bounds.correctPan("x",c.x),y:n.bounds.correctPan("y",c.y)},n.setZoomLevel(r);const u=!z(c,l);if(!u&&!o&&!s)return n._setResolution(i),void n.applyCurrentZoomPan();t.animations.stopAllPan(),t.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:e=>{if(e/=1e3,u||o){if(u&&(n.pan.x=l.x+(c.x-l.x)*e,n.pan.y=l.y+(c.y-l.y)*e),o){const t=r+(i-r)*e;n.setZoomLevel(t)}n.applyCurrentZoomPan()}s&&t.bgOpacity<1&&t.applyBgOpacity(H(a+(1-a)*e,0,1))},onComplete:()=>{n._setResolution(i),n.applyCurrentZoomPan()}})}};function ce(e){return!!e.target.closest(".pswp__container")}let ue=class{constructor(e){this.gestures=e}click(e,t){const n=t.target.classList,r=n.contains("pswp__img"),i=n.contains("pswp__item")||n.contains("pswp__zoom-wrap");r?this._doClickOrTapAction("imageClick",e,t):i&&this._doClickOrTapAction("bgClick",e,t)}tap(e,t){ce(t)&&this._doClickOrTapAction("tap",e,t)}doubleTap(e,t){ce(t)&&this._doClickOrTapAction("doubleTap",e,t)}_doClickOrTapAction(e,t,n){var r;const{pswp:i}=this.gestures,{currSlide:o}=i,a=e+"Action",s=i.options[a];if(!i.dispatch(a,{point:t,originalEvent:n}).defaultPrevented){if("function"==typeof s)return void s.call(i,t,n);switch(s){case"close":case"next":i[s]();break;case"zoom":o?.toggleZoom(t);break;case"zoom-or-close":null!=o&&o.isZoomable()&&o.zoomLevels.secondary!==o.zoomLevels.initial?o.toggleZoom(t):i.options.clickToCloseNonZoomable&&i.close();break;case"toggle-controls":null===(r=this.gestures.pswp.element)||void 0===r||r.classList.toggle("pswp--ui-visible")}}}};class de{constructor(e){this.pswp=e,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},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||(e.options.allowPanToNext=!1),this.drag=new ae(this),this.zoomLevels=new le(this),this.tapHandler=new ue(this),e.on("bindEvents",()=>{e.events.add(e.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),e.scrollWrap&&(e.scrollWrap.ontouchmove=()=>{},e.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(e,t,n,r){const{pswp:i}=this,{events:o}=i,a=r?e+r:"";o.add(i.scrollWrap,e+t,this.onPointerDown.bind(this)),o.add(window,e+"move",this.onPointerMove.bind(this)),o.add(window,e+n,this.onPointerUp.bind(this)),a&&o.add(i.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(e){const t="mousedown"===e.type||"mouse"===e.pointerType;if(t&&e.button>0)return;const{pswp:n}=this;n.opener.isOpen?n.dispatch("pointerDown",{originalEvent:e}).defaultPrevented||(t&&(n.mouseDetected(),this._preventPointerEventBehaviour(e,"down")),n.animations.stopAll(),this._updatePoints(e,"down"),1===this._numActivePoints&&(this.dragAxis=null,F(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1):e.preventDefault()}onPointerMove(e){this._preventPointerEventBehaviour(e,"move"),this._numActivePoints&&(this._updatePoints(e,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:e}).defaultPrevented&&(1!==this._numActivePoints||this.isDragging?this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop()):(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,F(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop()))))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(e){this._numActivePoints&&(this._updatePoints(e,"up"),!this.pswp.dispatch("pointerUp",{originalEvent:e}).defaultPrevented&&(0===this._numActivePoints&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(e)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),1===this._numActivePoints&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?z(this.p1,this.prevP1)||this.drag.change():(!z(this.p1,this.prevP1)||!z(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(e){const t=Date.now(),n=t-this._intervalTime;n<50&&!e||(this.velocity.x=this._getVelocity("x",n),this.velocity.y=this._getVelocity("y",n),this._intervalTime=t,F(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(e){const{mainScroll:t}=this.pswp;if(t.isShifted())return void t.moveIndexBy(0,!0);if(e.type.indexOf("cancel")>0)return;if("mouseup"===e.type||"mouse"===e.pointerType)return void this.tapHandler.click(this.startP1,e);const n=this.pswp.options.doubleTapAction?300:0;this._tapTimer?(this._clearTapTimer(),q(this._lastStartP1,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,e)):(F(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,e),this._clearTapTimer()},n))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(e,t){const n=this.p1[e]-this._intervalP1[e];return Math.abs(n)>1&&t>5?n/t:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(e,t){this.pswp.applyFilters("preventPointerEvent",!0,e,t)&&e.preventDefault()}_updatePoints(e,t){if(this._pointerEventEnabled){const n=e,r=this._ongoingPointers.findIndex(e=>e.id===n.pointerId);"up"===t&&r>-1?this._ongoingPointers.splice(r,1):"down"===t&&-1===r?this._ongoingPointers.push(this._convertEventPosToPoint(n,{x:0,y:0})):r>-1&&this._convertEventPosToPoint(n,this._ongoingPointers[r]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&F(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&F(this.p2,this._ongoingPointers[1])}else{const n=e;this._numActivePoints=0,n.type.indexOf("touch")>-1?n.touches&&n.touches.length>0&&(this._convertEventPosToPoint(n.touches[0],this.p1),this._numActivePoints++,n.touches.length>1&&(this._convertEventPosToPoint(n.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(e,this.p1),"up"===t?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){F(this.prevP1,this.p1),F(this.prevP2,this.p2)}_updateStartPoints(){F(this.startP1,this.p1),F(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const e=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(0!==e){const t=e>0?"x":"y";Math.abs(this.p1[t]-this.startP1[t])>=10&&(this.dragAxis=t)}}}_convertEventPosToPoint(e,t){return t.x=e.pageX-this.pswp.offset.x,t.y=e.pageY-this.pswp.offset.y,"pointerId"in e?t.id=e.pointerId:void 0!==e.identifier&&(t.id=e.identifier),t}_onClick(e){this.pswp.mainScroll.isShifted()&&(e.preventDefault(),e.stopPropagation())}}class he{constructor(e){this.pswp=e,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(e){const{pswp:t}=this,n=Math.round(t.viewportSize.x+t.viewportSize.x*t.options.spacing),r=n!==this.slideWidth;r&&(this.slideWidth=n,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((t,n)=>{r&&U(t.el,(n+this._containerShiftIndex)*this.slideWidth),e&&t.slide&&t.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let e=0;e<3;e++){const t=j("pswp__item","div",this.pswp.container);t.setAttribute("role","group"),t.setAttribute("aria-roledescription","slide"),t.setAttribute("aria-hidden","true"),t.style.display=1===e?"block":"none",this.itemHolders.push({el:t})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(e,t,n){const{pswp:r}=this;let i=r.potentialIndex+e;const o=r.getNumItems();if(r.canLoop()){i=r.getLoopedIndex(i);const t=(e+o)%o;e=t<=o/2?t:t-o}else i<0?i=0:i>=o&&(i=o-1),e=i-r.potentialIndex;r.potentialIndex=i,this._currPositionIndex-=e,r.animations.stopMainScroll();const a=this.getCurrSlideX();if(t){r.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:n||0,naturalFrequency:30,dampingRatio:1,onUpdate:e=>{this.moveTo(e)},onComplete:()=>{this.updateCurrItem(),r.appendHeavy()}});let e=r.potentialIndex-r.currIndex;if(r.canLoop()){const t=(e+o)%o;e=t<=o/2?t:t-o}Math.abs(e)>1&&this.updateCurrItem()}else this.moveTo(a),this.updateCurrItem();return!!e}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var e;const{pswp:t}=this,n=this._prevPositionIndex-this._currPositionIndex;if(!n)return;this._prevPositionIndex=this._currPositionIndex,t.currIndex=t.potentialIndex;let r,i=Math.abs(n);i>=3&&(this._containerShiftIndex+=n+(n>0?-3:3),i=3,this.itemHolders.forEach(e=>{var t;null===(t=e.slide)||void 0===t||t.destroy(),e.slide=void 0}));for(let e=0;e<i;e++)n>0?(r=this.itemHolders.shift(),r&&(this.itemHolders[2]=r,this._containerShiftIndex++,U(r.el,(this._containerShiftIndex+2)*this.slideWidth),t.setContent(r,t.currIndex-i+e+2))):(r=this.itemHolders.pop(),r&&(this.itemHolders.unshift(r),this._containerShiftIndex--,U(r.el,this._containerShiftIndex*this.slideWidth),t.setContent(r,t.currIndex+i-e-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),t.animations.stopAllPan(),this.itemHolders.forEach((e,t)=>{e.slide&&e.slide.setIsActive(1===t)}),t.currSlide=null===(e=this.itemHolders[1])||void 0===e?void 0:e.slide,t.contentLoader.updateLazy(n),t.currSlide&&t.currSlide.applyCurrentZoomPan(),t.dispatch("change")}moveTo(e,t){if(!this.pswp.canLoop()&&t){let t=(this.slideWidth*this._currPositionIndex-e)/this.slideWidth;t+=this.pswp.currIndex;const n=Math.round(e-this.x);(t<0&&n>0||t>=this.pswp.getNumItems()-1&&n<0)&&(e=this.x+.35*n)}this.x=e,this.pswp.container&&U(this.pswp.container,e),this.pswp.dispatch("moveMainScroll",{x:e,dragging:t??!1})}}const pe={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},fe=(e,t)=>t?e:pe[e];class me{constructor(e){this.pswp=e,this._wasFocused=!1,e.on("bindEvents",()=>{e.options.trapFocus&&(e.options.initialPointerPos||this._focusRoot(),e.events.add(document,"focusin",this._onFocusIn.bind(this))),e.events.add(document,"keydown",this._onKeyDown.bind(this))});const t=document.activeElement;e.on("destroy",()=>{e.options.returnFocus&&t&&this._wasFocused&&t.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(e){const{pswp:t}=this;if(t.dispatch("keydown",{originalEvent:e}).defaultPrevented||("button"in(n=e)&&1===n.button||n.ctrlKey||n.metaKey||n.altKey||n.shiftKey))return;var n;let r,i,o=!1;const a="key"in e;switch(a?e.key:e.keyCode){case fe("Escape",a):t.options.escKey&&(r="close");break;case fe("z",a):r="toggleZoom";break;case fe("ArrowLeft",a):i="x";break;case fe("ArrowUp",a):i="y";break;case fe("ArrowRight",a):i="x",o=!0;break;case fe("ArrowDown",a):o=!0,i="y";break;case fe("Tab",a):this._focusRoot()}if(i){e.preventDefault();const{currSlide:n}=t;t.options.arrowKeys&&"x"===i&&t.getNumItems()>1?r=o?"next":"prev":n&&n.currZoomLevel>n.zoomLevels.fit&&(n.pan[i]+=o?-80:80,n.panTo(n.pan.x,n.pan.y))}r&&(e.preventDefault(),t[r]())}_onFocusIn(e){const{template:t}=this.pswp;t&&document!==e.target&&t!==e.target&&!t.contains(e.target)&&t.focus()}}const ge="cubic-bezier(.4,0,.22,1)";class ye{constructor(e){var t;this.props=e;const{target:n,onComplete:r,transform:i,onFinish:o=()=>{},duration:a=333,easing:s=ge}=e;this.onFinish=o;const l=i?"transform":"opacity",c=null!==(t=e[l])&&void 0!==t?t:"";this._target=n,this._onComplete=r,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{V(n,l,a,s),this._helperTimeout=setTimeout(()=>{n.addEventListener("transitionend",this._onTransitionEnd,!1),n.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},a+500),n.style[l]=c},30)},0)}_onTransitionEnd(e){e.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&clearTimeout(this._helperTimeout),V(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}class ve{constructor(e,t,n){this.velocity=1e3*e,this._dampingRatio=t||.75,this._naturalFrequency=n||12,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(e,t){let n,r=0;t/=1e3;const i=Math.E**(-this._dampingRatio*this._naturalFrequency*t);if(1===this._dampingRatio)n=this.velocity+this._naturalFrequency*e,r=(e+n*t)*i,this.velocity=r*-this._naturalFrequency+n*i;else if(this._dampingRatio<1){n=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*e+this.velocity);const o=Math.cos(this._dampedFrequency*t),a=Math.sin(this._dampedFrequency*t);r=i*(e*o+n*a),this.velocity=r*-this._naturalFrequency*this._dampingRatio+i*(-this._dampedFrequency*e*a+this._dampedFrequency*n*o)}return r}}class Ae{constructor(e){this.props=e,this._raf=0;const{start:t,end:n,velocity:r,onUpdate:i,onComplete:o,onFinish:a=()=>{},dampingRatio:s,naturalFrequency:l}=e;this.onFinish=a;const c=new ve(r,s,l);let u=Date.now(),d=t-n;const h=()=>{this._raf&&(d=c.easeFrame(d,Date.now()-u),Math.abs(d)<1&&Math.abs(c.velocity)<50?(i(n),o&&o(),this.onFinish()):(u=Date.now(),i(d+n),this._raf=requestAnimationFrame(h)))};this._raf=requestAnimationFrame(h)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class be{constructor(){this.activeAnimations=[]}startSpring(e){this._start(e,!0)}startTransition(e){this._start(e)}_start(e,t){const n=t?new Ae(e):new ye(e);return this.activeAnimations.push(n),n.onFinish=()=>this.stop(n),n}stop(e){e.destroy();const t=this.activeAnimations.indexOf(e);t>-1&&this.activeAnimations.splice(t,1)}stopAll(){this.activeAnimations.forEach(e=>{e.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(e=>!e.props.isPan||(e.destroy(),!1))}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(e=>!e.props.isMainScroll||(e.destroy(),!1))}isPanRunning(){return this.activeAnimations.some(e=>e.props.isPan)}}class we{constructor(e){this.pswp=e,e.events.add(e.element,"wheel",this._onWheel.bind(this))}_onWheel(e){e.preventDefault();const{currSlide:t}=this.pswp;let{deltaX:n,deltaY:r}=e;if(t&&!this.pswp.dispatch("wheel",{originalEvent:e}).defaultPrevented)if(e.ctrlKey||this.pswp.options.wheelToZoom){if(t.isZoomable()){let n=-r;1===e.deltaMode?n*=.05:n*=e.deltaMode?1:.002,n=2**n;const i=t.currZoomLevel*n;t.zoomTo(i,{x:e.clientX,y:e.clientY})}}else t.isPannable()&&(1===e.deltaMode&&(n*=18,r*=18),t.panTo(t.pan.x-n,t.pan.y-r))}}class xe{constructor(e,t){var n;const r=t.name||t.className;let i=t.html;if(!1===e.options[r])return;"string"==typeof e.options[r+"SVG"]&&(i=e.options[r+"SVG"]),e.dispatch("uiElementCreate",{data:t});let o="";t.isButton?(o+="pswp__button ",o+=t.className||`pswp__button--${t.name}`):o+=t.className||`pswp__${t.name}`;let a=t.isButton?t.tagName||"button":t.tagName||"div";a=a.toLowerCase();const s=j(o,a);if(t.isButton){"button"===a&&(s.type="button");let{title:n}=t;const{ariaLabel:i}=t;"string"==typeof e.options[r+"Title"]&&(n=e.options[r+"Title"]),n&&(s.title=n);const o=i||n;o&&s.setAttribute("aria-label",o)}s.innerHTML=function(e){if("string"==typeof e)return e;if(!e||!e.isCustomSVG)return"";const t=e;let n='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return n=n.split("%d").join(t.size||32),t.outlineID&&(n+='<use class="pswp__icn-shadow" xlink:href="#'+t.outlineID+'"/>'),n+=t.inner,n+="</svg>",n}(i),t.onInit&&t.onInit(s,e),t.onClick&&(s.onclick=n=>{"string"==typeof t.onClick?e[t.onClick]():"function"==typeof t.onClick&&t.onClick(n,s,e)});const l=t.appendTo||"bar";let c=e.element;"bar"===l?(e.topBar||(e.topBar=j("pswp__top-bar pswp__hide-on-close","div",e.scrollWrap)),c=e.topBar):(s.classList.add("pswp__hide-on-close"),"wrapper"===l&&(c=e.scrollWrap)),null===(n=c)||void 0===n||n.appendChild(e.applyFilters("uiElement",s,t))}}function _e(e,t,n){e.classList.add("pswp__button--arrow"),e.setAttribute("aria-controls","pswp__items"),t.on("change",()=>{t.options.loop||(e.disabled=n?!(t.currIndex<t.getNumItems()-1):!(t.currIndex>0))})}const Se={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:_e},Ee={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(e,t)=>{_e(e,t,!0)}},Ce={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},ke={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},Ie={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(e,t)=>{let n,r=null;const i=t=>{n!==t&&(n=t,((t,n)=>{e.classList.toggle("pswp__preloader--"+t,n)})("active",t))},o=()=>{var e;if(null===(e=t.currSlide)||void 0===e||!e.content.isLoading())return i(!1),void(r&&(clearTimeout(r),r=null));r||(r=setTimeout(()=>{var e;i(!(null===(e=t.currSlide)||void 0===e||!e.content.isLoading())),r=null},t.options.preloaderDelay))};t.on("change",o),t.on("loadComplete",e=>{t.currSlide===e.slide&&o()}),t.ui&&(t.ui.updatePreloaderVisibility=o)}},De={name:"counter",order:5,onInit:(e,t)=>{t.on("change",()=>{e.innerText=t.currIndex+1+t.options.indexIndicatorSep+t.getNumItems()})}};function Te(e,t){e.classList.toggle("pswp--zoomed-in",t)}class Ne{constructor(e){this.pswp=e,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:e}=this;this.isRegistered=!1,this.uiElementsData=[Ce,Se,Ee,ke,Ie,De],e.dispatch("uiRegister"),this.uiElementsData.sort((e,t)=>(e.order||0)-(t.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(e=>{this.registerElement(e)}),e.on("change",()=>{var t;null===(t=e.element)||void 0===t||t.classList.toggle("pswp--one-slide",1===e.getNumItems())}),e.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(e){this.isRegistered?this.items.push(new xe(this.pswp,e)):this.uiElementsData.push(e)}_onZoomPanUpdate(){const{template:e,currSlide:t,options:n}=this.pswp;if(this.pswp.opener.isClosing||!e||!t)return;let{currZoomLevel:r}=t;if(this.pswp.opener.isOpen||(r=t.zoomLevels.initial),r===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=r;const i=t.zoomLevels.initial-t.zoomLevels.secondary;if(Math.abs(i)<.01||!t.isZoomable())return Te(e,!1),void e.classList.remove("pswp--zoom-allowed");e.classList.add("pswp--zoom-allowed");Te(e,(r===t.zoomLevels.initial?t.zoomLevels.secondary:t.zoomLevels.initial)<=r),("zoom"===n.imageClickAction||"zoom-or-close"===n.imageClickAction)&&e.classList.add("pswp--click-to-zoom")}}let Le=class{constructor(e,t){this.type=e,this.defaultPrevented=!1,t&&Object.assign(this,t)}preventDefault(){this.defaultPrevented=!0}},Be=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(e,t,n=100){var r,i,o;this._filters[e]||(this._filters[e]=[]),null===(r=this._filters[e])||void 0===r||r.push({fn:t,priority:n}),null===(i=this._filters[e])||void 0===i||i.sort((e,t)=>e.priority-t.priority),null===(o=this.pswp)||void 0===o||o.addFilter(e,t,n)}removeFilter(e,t){this._filters[e]&&(this._filters[e]=this._filters[e].filter(e=>e.fn!==t)),this.pswp&&this.pswp.removeFilter(e,t)}applyFilters(e,...t){var n;return null===(n=this._filters[e])||void 0===n||n.forEach(e=>{t[0]=e.fn.apply(this,t)}),t[0]}on(e,t){var n,r;this._listeners[e]||(this._listeners[e]=[]),null===(n=this._listeners[e])||void 0===n||n.push(t),null===(r=this.pswp)||void 0===r||r.on(e,t)}off(e,t){var n;this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(e=>t!==e)),null===(n=this.pswp)||void 0===n||n.off(e,t)}dispatch(e,t){var n;if(this.pswp)return this.pswp.dispatch(e,t);const r=new Le(e,t);return null===(n=this._listeners[e])||void 0===n||n.forEach(e=>{e.call(this,r)}),r}},Pe=class{constructor(e,t){if(this.element=j("pswp__img pswp__img--placeholder",e?"img":"div",t),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,t){this.element&&("IMG"===this.element.tagName?(Q(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=K(0,0,e/250)):Q(this.element,e,t))}destroy(){var e;null!==(e=this.element)&&void 0!==e&&e.parentNode&&this.element.remove(),this.element=null}},Oe=class{constructor(e,t,n){this.instance=t,this.data=e,this.index=n,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=W,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(e,t){if(this.slide&&this.usePlaceholder())if(this.placeholder){const e=this.placeholder.element;e&&!e.parentElement&&this.slide.container.prepend(e)}else{const e=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new Pe(e,this.slide.container)}this.element&&!t||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=j("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=j("pswp__content","div"),this.element.innerHTML=this.data.html||""),t&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){var t,n;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;const r=this.element;this.updateSrcsetSizes(),this.data.srcset&&(r.srcset=this.data.srcset),r.src=null!==(t=this.data.src)&&void 0!==t?t:"",r.alt=null!==(n=this.data.alt)&&void 0!==n?n:"",this.state=G,r.complete?this.onLoaded():(r.onload=()=>{this.onLoaded()},r.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=Z,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===Z||this.state===Y)&&this.removePlaceholder())}onError(){this.state=Y,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===G,this)}isError(){return this.state===Y}isImageContent(){return"image"===this.type}setDisplayedSize(e,t){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,t),!this.instance.dispatch("contentResize",{content:this,width:e,height:t}).defaultPrevented&&(Q(this.element,e,t),this.isImageContent()&&!this.isError()))){const n=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=t,n?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:t,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==Y,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const e=this.element,t=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||t>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=t+"px",e.dataset.largestUsedSize=String(t))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var e,t;let n=j("pswp__error-msg","div");n.innerText=null!==(e=null===(t=this.instance.options)||void 0===t?void 0:t.errorMsg)&&void 0!==e?e:"",n=this.instance.applyFilters("contentErrorElement",n,this),this.element=j("pswp__content pswp__error-msg-container","div"),this.element.appendChild(n),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===Y)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const e="decode"in this.element;this.isImageContent()?e&&this.slide&&(!this.slide.isActive||J())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!J()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===Z||this.state===Y)&&this.removePlaceholder()))}};function Me(e,t,n){const r=t.createContentFromData(e,n);let i;const{options:o}=t;if(o){let a;i=new ie(o,e,-1),a=t.pswp?t.pswp.viewportSize:ee(o,t);const s=ne(o,a,e,n);i.update(r.width,r.height,s)}return r.lazyLoad(),i&&r.setDisplayedSize(Math.ceil(r.width*i.initial),Math.ceil(r.height*i.initial)),r}class je{constructor(e){this.pswp=e,this.limit=Math.max(e.options.preload[0]+e.options.preload[1]+1,5),this._cachedItems=[]}updateLazy(e){const{pswp:t}=this;if(t.dispatch("lazyLoad").defaultPrevented)return;const{preload:n}=t.options,r=void 0===e||e>=0;let i;for(i=0;i<=n[1];i++)this.loadSlideByIndex(t.currIndex+(r?i:-i));for(i=1;i<=n[0];i++)this.loadSlideByIndex(t.currIndex+(r?-i:i))}loadSlideByIndex(e){const t=this.pswp.getLoopedIndex(e);let n=this.getContentByIndex(t);n||(n=function(e,t){const n=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:n}).defaultPrevented)return Me(n,t,e)}(t,this.pswp),n&&this.addToCache(n))}getContentBySlide(e){let t=this.getContentByIndex(e.index);return t||(t=this.pswp.createContentFromData(e.data,e.index),this.addToCache(t)),t.setSlide(e),t}addToCache(e){if(this.removeByIndex(e.index),this._cachedItems.push(e),this._cachedItems.length>this.limit){const e=this._cachedItems.findIndex(e=>!e.isAttached&&!e.hasSlide);-1!==e&&this._cachedItems.splice(e,1)[0].destroy()}}removeByIndex(e){const t=this._cachedItems.findIndex(t=>t.index===e);-1!==t&&this._cachedItems.splice(t,1)}getContentByIndex(e){return this._cachedItems.find(t=>t.index===e)}destroy(){this._cachedItems.forEach(e=>e.destroy()),this._cachedItems=[]}}let Fe=class extends Be{getNumItems(){var e;let t=0;const n=null===(e=this.options)||void 0===e?void 0:e.dataSource;n&&"length"in n?t=n.length:n&&"gallery"in n&&(n.items||(n.items=this._getGalleryDOMElements(n.gallery)),n.items&&(t=n.items.length));const r=this.dispatch("numItems",{dataSource:n,numItems:t});return this.applyFilters("numItems",r.numItems,n)}createContentFromData(e,t){return new Oe(e,this,t)}getItemData(e){var t;const n=null===(t=this.options)||void 0===t?void 0:t.dataSource;let r={};Array.isArray(n)?r=n[e]:n&&"gallery"in n&&(n.items||(n.items=this._getGalleryDOMElements(n.gallery)),r=n.items[e]);let i=r;i instanceof Element&&(i=this._domElementToItemData(i));const o=this.dispatch("itemData",{itemData:i||{},index:e});return this.applyFilters("itemData",o.itemData,e)}_getGalleryDOMElements(e){var t,n;return null!==(t=this.options)&&void 0!==t&&t.children||null!==(n=this.options)&&void 0!==n&&n.childSelector?function(e,t,n=document){let r=[];if(e instanceof Element)r=[e];else if(e instanceof NodeList||Array.isArray(e))r=Array.from(e);else{const i="string"==typeof e?e:t;i&&(r=Array.from(n.querySelectorAll(i)))}return r}(this.options.children,this.options.childSelector,e)||[]:[e]}_domElementToItemData(e){const t={element:e},n="A"===e.tagName?e:e.querySelector("a");if(n){t.src=n.dataset.pswpSrc||n.href,n.dataset.pswpSrcset&&(t.srcset=n.dataset.pswpSrcset),t.width=n.dataset.pswpWidth?parseInt(n.dataset.pswpWidth,10):0,t.height=n.dataset.pswpHeight?parseInt(n.dataset.pswpHeight,10):0,t.w=t.width,t.h=t.height,n.dataset.pswpType&&(t.type=n.dataset.pswpType);const i=e.querySelector("img");var r;if(i)t.msrc=i.currentSrc||i.src,t.alt=null!==(r=i.getAttribute("alt"))&&void 0!==r?r:"";(n.dataset.pswpCropped||n.dataset.cropped)&&(t.thumbCropped=!0)}return this.applyFilters("domItemData",t,e,n)}lazyLoadData(e,t){return Me(e,this,t)}};const Re=.003;class qe{constructor(e){this.pswp=e,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),e.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const e=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,e&&e.currZoomLevel*e.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const e=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,e&&e.zoomLevels.initial*e.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:e}=this,t=this.pswp.currSlide,{options:n}=e;var r,i;("fade"===n.showHideAnimationType?(n.showHideOpacity=!0,this._thumbBounds=void 0):"none"===n.showHideAnimationType?(n.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&e._initialThumbBounds?this._thumbBounds=e._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=t?.getPlaceholderElement(),e.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&t?.content.usePlaceholder()&&(!this.isClosing||!e.mainScroll.isShifted()),this._animateZoom)?this._animateRootOpacity=null!==(r=n.showHideOpacity)&&void 0!==r&&r:(this._animateRootOpacity=!0,this.isOpening&&t&&(t.zoomAndPanToInitial(),t.applyCurrentZoomPan()));if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>Re,this._opacityElement=this._animateRootOpacity?e.element:e.bg,!this._useAnimation)return this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,void(this.isOpening&&(e.element&&(e.element.style.opacity=String(Re)),e.applyBgOpacity(1)));this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect?(this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=null===(i=this.pswp.currSlide)||void 0===i?void 0:i.holderElement,e.container&&(e.container.style.overflow="hidden",e.container.style.width=e.viewportSize.x+"px")):this._croppedZoom=!1;this.isOpening?(this._animateRootOpacity?(e.element&&(e.element.style.opacity=String(Re)),e.applyBgOpacity(1)):(this._animateBgOpacity&&e.bg&&(e.bg.style.opacity=String(Re)),e.element&&(e.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(Re)))):this.isClosing&&(e.mainScroll.itemHolders[0]&&(e.mainScroll.itemHolders[0].el.style.display="none"),e.mainScroll.itemHolders[2]&&(e.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&0!==e.mainScroll.x&&(e.mainScroll.resetPosition(),e.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&"IMG"===this._placeholder.tagName?new Promise(e=>{let t=!1,n=!0;var r;(r=this._placeholder,"decode"in r?r.decode().catch(()=>{}):r.complete?Promise.resolve(r):new Promise((e,t)=>{r.onload=()=>e(r),r.onerror=t})).finally(()=>{t=!0,n||e(!0)}),setTimeout(()=>{n=!1,t&&e(!0)},50),setTimeout(e,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){var e,t;null===(e=this.pswp.element)||void 0===e||e.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),null===(t=this.pswp.element)||void 0===t||t.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:e}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,e.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),e.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)e.destroy();else if(this.isOpen){var t;this._animateZoom&&e.container&&(e.container.style.overflow="visible",e.container.style.width="100%"),null===(t=e.currSlide)||void 0===t||t.applyCurrentZoomPan()}}_animateToOpenState(){const{pswp:e}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),e.currSlide&&(e.currSlide.zoomAndPanToInitial(),this._animateTo(e.currSlide.container,"transform",e.currSlide.getCurrentTransform()))),this._animateBgOpacity&&e.bg&&this._animateTo(e.bg,"opacity",String(e.options.bgOpacity)),this._animateRootOpacity&&e.element&&this._animateTo(e.element,"opacity","1")}_animateToClosedState(){const{pswp:e}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&e.bgOpacity>.01&&e.bg&&this._animateTo(e.bg,"opacity","0"),this._animateRootOpacity&&e.element&&this._animateTo(e.element,"opacity","0")}_setClosedStateZoomPan(e){if(!this._thumbBounds)return;const{pswp:t}=this,{innerRect:n}=this._thumbBounds,{currSlide:r,viewportSize:i}=t;if(this._croppedZoom&&n&&this._cropContainer1&&this._cropContainer2){const t=-i.x+(this._thumbBounds.x-n.x)+n.w,r=-i.y+(this._thumbBounds.y-n.y)+n.h,o=i.x-n.w,a=i.y-n.h;e?(this._animateTo(this._cropContainer1,"transform",K(t,r)),this._animateTo(this._cropContainer2,"transform",K(o,a))):(U(this._cropContainer1,t,r),U(this._cropContainer2,o,a))}r&&(F(r.pan,n||this._thumbBounds),r.currZoomLevel=this._thumbBounds.w/r.width,e?this._animateTo(r.container,"transform",r.getCurrentTransform()):r.applyCurrentZoomPan())}_animateTo(e,t,n){if(!this._duration)return void(e.style[t]=n);const{animations:r}=this.pswp,i={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{r.activeAnimations.length||this._onAnimationComplete()},target:e};i[t]=n,r.startTransition(i)}}const ze={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};class He extends Fe{constructor(e){super(),this.options=this._prepareOptions(e||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},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 X,this.animations=new be,this.mainScroll=new he(this),this.gestures=new de(this),this.opener=new qe(this),this.keyboard=new me(this),this.contentLoader=new je(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let e="pswp--open";return this.gestures.supportsTouch&&(e+=" pswp--touch"),this.options.mainClass&&(e+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+e),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new we(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",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:e}=this.mainScroll;e[0]&&(e[0].el.style.display="block",this.setContent(e[0],this.currIndex-1)),e[2]&&(e[2].el.style.display="block",this.setContent(e[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(e){const t=this.getNumItems();return this.options.loop&&(e>t-1&&(e-=t),e<0&&(e+=t)),H(e,0,t-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(e=>{var t;null===(t=e.slide)||void 0===t||t.appendHeavy()})}goTo(e){this.mainScroll.moveIndexBy(this.getLoopedIndex(e)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...e){var t;null===(t=this.currSlide)||void 0===t||t.zoomTo(...e)}toggleZoom(){var e;null===(e=this.currSlide)||void 0===e||e.toggleZoom()}close(){!this.opener.isOpen||this.isDestroying||(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var e;if(!this.isDestroying)return this.options.showHideAnimationType="none",void this.close();this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),null===(e=this.element)||void 0===e||e.remove(),this.mainScroll.itemHolders.forEach(e=>{var t;null===(t=e.slide)||void 0===t||t.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(e){this.contentLoader.removeByIndex(e),this.mainScroll.itemHolders.forEach((t,n)=>{var r,i;let o=(null!==(r=null===(i=this.currSlide)||void 0===i?void 0:i.index)&&void 0!==r?r:0)-1+n;var a;(this.canLoop()&&(o=this.getLoopedIndex(o)),o===e&&(this.setContent(t,e,!0),1===n))&&(this.currSlide=t.slide,null===(a=t.slide)||void 0===a||a.setIsActive(!0))}),this.dispatch("change")}setContent(e,t,n){if(this.canLoop()&&(t=this.getLoopedIndex(t)),e.slide){if(e.slide.index===t&&!n)return;e.slide.destroy(),e.slide=void 0}if(!this.canLoop()&&(t<0||t>=this.getNumItems()))return;const r=this.getItemData(t);e.slide=new oe(r,t,this),t===this.currIndex&&(this.currSlide=e.slide),e.slide.append(e.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(e){if(this.isDestroying)return;const t=ee(this.options,this);!e&&z(t,this._prevViewportSize)||(F(this._prevViewportSize,t),this.dispatch("beforeResize"),F(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"))}applyBgOpacity(e){this.bgOpacity=Math.max(e,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){var e;this.hasMouse||(this.hasMouse=!0,null===(e=this.element)||void 0===e||e.classList.add("pswp--has_mouse"))}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(e,t){this.offset.x=e,this.offset.y=t,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=j("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=j("pswp__bg","div",this.element),this.scrollWrap=j("pswp__scroll-wrap","section",this.element),this.container=j("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 Ne(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(e,t,n){const r=n.dispatch("thumbBounds",{index:e,itemData:t,instance:n});if(r.thumbBounds)return r.thumbBounds;const{element:i}=t;let o,a;if(i&&!1!==n.options.thumbSelector){const e=n.options.thumbSelector||"img";a=i.matches(e)?i:i.querySelector(e)}return a=n.applyFilters("thumbEl",a,t,e),a&&(o=t.thumbCropped?function(e,t,n){const r=e.getBoundingClientRect(),i=r.width/t,o=r.height/n,a=i>o?i:o,s=(r.width-t*a)/2,l=(r.height-n*a)/2,c={x:r.left+s,y:r.top+l,w:t*a};return c.innerRect={w:r.width,h:r.height,x:s,y:l},c}(a,t.width||t.w||0,t.height||t.h||0):function(e){const t=e.getBoundingClientRect();return{x:t.left,y:t.top,w:t.width}}(a)),n.applyFilters("thumbBounds",o,t,e)}(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(e){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(e.showHideAnimationType="none",e.zoomAnimationDuration=0),{...ze,...e}}}function Ke(e,t,n){const r=document.createElement(t);return e&&(r.className=e),n&&n.appendChild(r),r}function Ue(e,t,n){e.style.width="number"==typeof t?`${t}px`:t,e.style.height="number"==typeof n?`${n}px`:n}const Ve="idle",Qe="loading",We="loaded",Ge="error";function Ze(e,t,n=document){let r=[];if(e instanceof Element)r=[e];else if(e instanceof NodeList||Array.isArray(e))r=Array.from(e);else{const i="string"==typeof e?e:t;i&&(r=Array.from(n.querySelectorAll(i)))}return r}function Ye(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}class Je{constructor(e,t){this.type=e,this.defaultPrevented=!1,t&&Object.assign(this,t)}preventDefault(){this.defaultPrevented=!0}}class $e{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(e,t,n=100){var r,i,o;this._filters[e]||(this._filters[e]=[]),null===(r=this._filters[e])||void 0===r||r.push({fn:t,priority:n}),null===(i=this._filters[e])||void 0===i||i.sort((e,t)=>e.priority-t.priority),null===(o=this.pswp)||void 0===o||o.addFilter(e,t,n)}removeFilter(e,t){this._filters[e]&&(this._filters[e]=this._filters[e].filter(e=>e.fn!==t)),this.pswp&&this.pswp.removeFilter(e,t)}applyFilters(e,...t){var n;return null===(n=this._filters[e])||void 0===n||n.forEach(e=>{t[0]=e.fn.apply(this,t)}),t[0]}on(e,t){var n,r;this._listeners[e]||(this._listeners[e]=[]),null===(n=this._listeners[e])||void 0===n||n.push(t),null===(r=this.pswp)||void 0===r||r.on(e,t)}off(e,t){var n;this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(e=>t!==e)),null===(n=this.pswp)||void 0===n||n.off(e,t)}dispatch(e,t){var n;if(this.pswp)return this.pswp.dispatch(e,t);const r=new Je(e,t);return null===(n=this._listeners[e])||void 0===n||n.forEach(e=>{e.call(this,r)}),r}}class Xe{constructor(e,t){if(this.element=Ke("pswp__img pswp__img--placeholder",e?"img":"div",t),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,t){this.element&&("IMG"===this.element.tagName?(Ue(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=function(e,t,n){let r=`translate3d(${e}px,0px,0)`;return void 0!==n&&(r+=` scale3d(${n},${n},1)`),r}(0,0,e/250)):Ue(this.element,e,t))}destroy(){var e;null!==(e=this.element)&&void 0!==e&&e.parentNode&&this.element.remove(),this.element=null}}class et{constructor(e,t,n){this.instance=t,this.data=e,this.index=n,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=Ve,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(e,t){if(this.slide&&this.usePlaceholder())if(this.placeholder){const e=this.placeholder.element;e&&!e.parentElement&&this.slide.container.prepend(e)}else{const e=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new Xe(e,this.slide.container)}this.element&&!t||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=Ke("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=Ke("pswp__content","div"),this.element.innerHTML=this.data.html||""),t&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){var t,n;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;const r=this.element;this.updateSrcsetSizes(),this.data.srcset&&(r.srcset=this.data.srcset),r.src=null!==(t=this.data.src)&&void 0!==t?t:"",r.alt=null!==(n=this.data.alt)&&void 0!==n?n:"",this.state=Qe,r.complete?this.onLoaded():(r.onload=()=>{this.onLoaded()},r.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=We,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===We||this.state===Ge)&&this.removePlaceholder())}onError(){this.state=Ge,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===Qe,this)}isError(){return this.state===Ge}isImageContent(){return"image"===this.type}setDisplayedSize(e,t){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,t),!this.instance.dispatch("contentResize",{content:this,width:e,height:t}).defaultPrevented&&(Ue(this.element,e,t),this.isImageContent()&&!this.isError()))){const n=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=t,n?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:t,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==Ge,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const e=this.element,t=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||t>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=t+"px",e.dataset.largestUsedSize=String(t))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var e,t;let n=Ke("pswp__error-msg","div");n.innerText=null!==(e=null===(t=this.instance.options)||void 0===t?void 0:t.errorMsg)&&void 0!==e?e:"",n=this.instance.applyFilters("contentErrorElement",n,this),this.element=Ke("pswp__content pswp__error-msg-container","div"),this.element.appendChild(n),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===Ge)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const e="decode"in this.element;this.isImageContent()?e&&this.slide&&(!this.slide.isActive||Ye())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!Ye()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===We||this.state===Ge)&&this.removePlaceholder()))}}function tt(e,t,n,r,i){let o=0;if(t.paddingFn)o=t.paddingFn(n,r,i)[e];else if(t.padding)o=t.padding[e];else{const n="padding"+e[0].toUpperCase()+e.slice(1);t[n]&&(o=t[n])}return Number(o)||0}class nt{constructor(e,t,n,r){this.pswp=r,this.options=e,this.itemData=t,this.index=n,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(e,t,n){const r={x:e,y:t};this.elementSize=r,this.panAreaSize=n;const i=n.x/r.x,o=n.y/r.y;this.fit=Math.min(1,i<o?i:o),this.fill=Math.min(1,i>o?i:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(e){const t=e+"ZoomLevel",n=this.options[t];if(n)return"function"==typeof n?n(this):"fill"===n?this.fill:"fit"===n?this.fit:Number(n)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,3*this.fit),this.elementSize&&e*this.elementSize.x>4e3&&(e=4e3/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}}function rt(e,t,n){const r=t.createContentFromData(e,n);let i;const{options:o}=t;if(o){let a;i=new nt(o,e,-1),a=t.pswp?t.pswp.viewportSize:function(e,t){if(e.getViewportSizeFn){const n=e.getViewportSizeFn(e,t);if(n)return n}return{x:document.documentElement.clientWidth,y:window.innerHeight}}(o,t);const s=function(e,t,n,r){return{x:t.x-tt("left",e,t,n,r)-tt("right",e,t,n,r),y:t.y-tt("top",e,t,n,r)-tt("bottom",e,t,n,r)}}(o,a,e,n);i.update(r.width,r.height,s)}return r.lazyLoad(),i&&r.setDisplayedSize(Math.ceil(r.width*i.initial),Math.ceil(r.height*i.initial)),r}class it extends $e{getNumItems(){var e;let t=0;const n=null===(e=this.options)||void 0===e?void 0:e.dataSource;n&&"length"in n?t=n.length:n&&"gallery"in n&&(n.items||(n.items=this._getGalleryDOMElements(n.gallery)),n.items&&(t=n.items.length));const r=this.dispatch("numItems",{dataSource:n,numItems:t});return this.applyFilters("numItems",r.numItems,n)}createContentFromData(e,t){return new et(e,this,t)}getItemData(e){var t;const n=null===(t=this.options)||void 0===t?void 0:t.dataSource;let r={};Array.isArray(n)?r=n[e]:n&&"gallery"in n&&(n.items||(n.items=this._getGalleryDOMElements(n.gallery)),r=n.items[e]);let i=r;i instanceof Element&&(i=this._domElementToItemData(i));const o=this.dispatch("itemData",{itemData:i||{},index:e});return this.applyFilters("itemData",o.itemData,e)}_getGalleryDOMElements(e){var t,n;return null!==(t=this.options)&&void 0!==t&&t.children||null!==(n=this.options)&&void 0!==n&&n.childSelector?Ze(this.options.children,this.options.childSelector,e)||[]:[e]}_domElementToItemData(e){const t={element:e},n="A"===e.tagName?e:e.querySelector("a");if(n){t.src=n.dataset.pswpSrc||n.href,n.dataset.pswpSrcset&&(t.srcset=n.dataset.pswpSrcset),t.width=n.dataset.pswpWidth?parseInt(n.dataset.pswpWidth,10):0,t.height=n.dataset.pswpHeight?parseInt(n.dataset.pswpHeight,10):0,t.w=t.width,t.h=t.height,n.dataset.pswpType&&(t.type=n.dataset.pswpType);const i=e.querySelector("img");var r;if(i)t.msrc=i.currentSrc||i.src,t.alt=null!==(r=i.getAttribute("alt"))&&void 0!==r?r:"";(n.dataset.pswpCropped||n.dataset.cropped)&&(t.thumbCropped=!0)}return this.applyFilters("domItemData",t,e,n)}lazyLoadData(e,t){return rt(e,this,t)}}class ot extends it{constructor(e){super(),this.options=e||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){Ze(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(e){if("button"in(t=e)&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||window.pswp)return;var t;let n={x:e.clientX,y:e.clientY};!n.x&&!n.y&&(n=null);let r=this.getClickedIndex(e);r=this.applyFilters("clickedIndex",r,e,this);const i={gallery:e.currentTarget};r>=0&&(e.preventDefault(),this.loadAndOpen(r,i,n))}getClickedIndex(e){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,e);const t=e.target,n=Ze(this.options.children,this.options.childSelector,e.currentTarget).findIndex(e=>e===t||e.contains(t));return-1!==n?n:this.options.children||this.options.childSelector?-1:0}loadAndOpen(e,t,n){if(window.pswp||!this.options)return!1;if(!t&&this.options.gallery&&this.options.children){const e=Ze(this.options.gallery);e[0]&&(t={gallery:e[0]})}return this.options.index=e,this.options.initialPointerPos=n,this.shouldOpen=!0,this.preload(e,t),!0}preload(e,t){const{options:n}=this;t&&(n.dataSource=t);const r=[],i=typeof n.pswpModule;if("function"==typeof(o=n.pswpModule)&&o.prototype&&o.prototype.goTo)r.push(Promise.resolve(n.pswpModule));else{if("string"===i)throw new Error("pswpModule as string is no longer supported");if("function"!==i)throw new Error("pswpModule is not valid");r.push(n.pswpModule())}var o;"function"==typeof n.openPromise&&r.push(n.openPromise()),!1!==n.preloadFirstSlide&&e>=0&&(this._preloadedContent=function(e,t){const n=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:n}).defaultPrevented)return rt(n,t,e)}(e,this));const a=++this._uid;Promise.all(r).then(e=>{if(this.shouldOpen){const t=e[0];this._openPhotoswipe(t,a)}})}_openPhotoswipe(e,t){if(t!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const n="object"==typeof e?new e.default(this.options):new e(this.options);this.pswp=n,window.pswp=n,Object.keys(this._listeners).forEach(e=>{var t;null===(t=this._listeners[e])||void 0===t||t.forEach(t=>{n.on(e,t)})}),Object.keys(this._filters).forEach(e=>{var t;null===(t=this._filters[e])||void 0===t||t.forEach(t=>{n.addFilter(e,t.fn,t.priority)})}),this._preloadedContent&&(n.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),n.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),n.init()}destroy(){var e;null===(e=this.pswp)||void 0===e||e.destroy(),this.shouldOpen=!1,this._listeners={},Ze(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)})}}const at=e=>Math.min(100,Math.max(0,Math.round(e))),st=()=>{const e=document.querySelector(".js-limit-scroll-progress-bar"),t=document.querySelector(".c-progress__bar"),n=document.querySelector(".c-btn__close-progress");if(!t&&!n)return;const{documentElement:r}=document,i=r.scrollTop;if(t){let n=r.scrollHeight-r.clientHeight;if(!n)return;e&&(n=e.scrollHeight-r.clientHeight+(window.pageYOffset+e.getBoundingClientRect().top)),t.style.width=`${at(i/n*100)}%`}if(n){const e=document.querySelector(".js-content-header"),t=document.querySelector(".js-limit-scroll-close-article-btn");if(e&&t){const o=window.pageYOffset+e.getBoundingClientRect().bottom,a=window.pageYOffset+t.getBoundingClientRect().bottom-r.clientHeight-o;if(a>0){const e=at((i-o)/a*100);n.style.setProperty("--progress",`${e}`),n.parentElement?.classList.toggle("c-btn--close-progress-complete",e>=100)}}}},lt=()=>{const e=document.querySelector("#mbrs-comments-container"),t=document.querySelector(".c-scroll-to-top-comment");if(!e||!t)return;t.style.display="none",t.addEventListener("click",()=>{document.getElementById("graphcomment")?.scrollIntoView({behavior:"smooth"})});let n=!1;const r=()=>{const{top:n,bottom:r}=e.getBoundingClientRect(),i=n<-400,o=r<window.innerHeight/2;t.style.display=i&&!o?"flex":"none"},i=e=>{e.offsetHeight>500?n||(n=!0,window.addEventListener("scroll",r,{passive:!0}),r()):n&&(n=!1,window.removeEventListener("scroll",r),t.style.display="none")},o=e=>{i(e),(e=>{new ResizeObserver(()=>{i(e)}).observe(e)})(e)},a=e=>{try{if("complete"===e.contentDocument?.readyState)return void o(e)}catch{}e.addEventListener("load",()=>o(e),{once:!0})};if((()=>{const t=e.querySelector("iframe");return!!t&&(a(t),!0)})())return;const s=new MutationObserver(e=>{e.some(e=>Array.from(e.addedNodes).some(e=>{if(e instanceof HTMLIFrameElement)return a(e),!0;if(e instanceof HTMLElement){const t=e.querySelector("iframe");if(t)return a(t),!0}return!1}))&&s.disconnect()});s.observe(e,{childList:!0,subtree:!0})},ct="#text-tooltip",ut="c-text-tooltip--show",dt=["#page-content .c-content p","#page-content .c-content h2","#page-content .c-content h3","#page-content .c-content h4","#page-content .c-content h5","#page-content .c-content h6","#page-content .c-content li","#page-content .c-content span","#page-content header span","#page-content header h1","#page-content header h2"],ht=(e,t)=>e instanceof Element&&t.some(t=>e.matches(t)),pt=(e,t,n)=>{const r=document.querySelector(ct),i=document.querySelector("#page-content"),o=document.querySelectorAll(".mbrs-social-report-container");if(!r||!i)return void console.warn("Text tooltip : Tooltip or page content are not found in the DOM");Array.from(o).forEach(e=>{e.setAttribute("data-selected-text",n)});const a=e.getClientRects(),s=a[t?a.length-1:0],l=(e=>e.offsetParent instanceof HTMLElement?e.offsetParent.getBoundingClientRect():{top:-window.scrollY,left:-window.scrollX})(r);r.style.top=s.top-l.top-(r.offsetHeight+10)+"px",s.width<r.offsetWidth?r.style.left=s.left-l.left+s.width/2-r.offsetWidth/2+"px":r.style.left=t?s.left-l.left+s.width-r.offsetWidth+"px":s.left-l.left+"px",r.classList.add(ut)},ft=()=>{const e=document.querySelector(`${ct}`);e&&e.classList.remove(ut)},mt=({type:e})=>{const t=window.getSelection();if("selectionchange"===e)return void ft();if(!t?.rangeCount)return;const n=t.getRangeAt(0),r=t.toString().trim();if(r.length){const e=((e,t)=>{const n=e.startContainer.nodeType===Node.ELEMENT_NODE?e.startContainer:e.startContainer.parentElement,r=e.endContainer.nodeType===Node.ELEMENT_NODE?e.endContainer:e.endContainer.parentElement;return!!n&&ht(n,t)||!!r&&ht(r,t)})(n,dt),i=(e=>{if(!e.focusNode)return null;const t=e.anchorNode?.compareDocumentPosition(e.focusNode);return t?(4&t)>0:e.anchorOffset<e.focusOffset})(t)||!1;return void(e&&pt(n,i,r))}ft()},gt='button, a[href], [role="button"], [data-a11y-dialog-show], [data-a11y-dialog-hide], [data-event-name], .js-mobile-share-button';let yt=!1;const vt=e=>{e.querySelector(gt)?.click()},At=e=>e instanceof HTMLElement?e.closest("[data-social-bar-action-row]"):null,bt=e=>{const t=At(e.target);if(!t)return;const n=e.target.closest(gt);n&&n!==t||vt(t)},wt=e=>{if("Enter"!==e.key&&" "!==e.key)return;const t=e.target,n=At(t);if(!(n&&t instanceof HTMLElement))return;const r=t.closest(gt);r&&r!==n||(" "===e.key&&e.preventDefault(),vt(n))},xt=(e=document.querySelector(".c-search-form--button"))=>{e&&e.addEventListener("click",e=>{(e=>{const{target:t}=e;if(t instanceof Element){const n=t.closest(".c-search-form--button");n&&(e.preventDefault(),n.classList.remove("c-search-form--button"))}})(e)})},_t=e=>"ArrowLeft"===e.code||39===e.keyCode,St=e=>"ArrowRight"===e.code||37===e.keyCode,Et=(e=document.querySelectorAll(".js-tabs"))=>{e.length>0&&e.forEach(e=>{const t=e.querySelectorAll('[role="tab"]');t.forEach(t=>{t.addEventListener("click",t=>{(({tabsContainerElement:e,event:t})=>{t.preventDefault();const n=t.target;if(!(n instanceof HTMLButtonElement))return;const r=e.querySelectorAll('[role="tab"]'),i=e.querySelectorAll('[role="tabpanel"]'),o=n.getAttribute("aria-controls"),a=Object.values(i).find(e=>e.id===o);r.forEach(e=>{e.setAttribute("aria-selected","false")}),i.forEach(e=>{e.setAttribute("aria-hidden","true")}),n.setAttribute("aria-selected","true"),a&&a.removeAttribute("aria-hidden")})({tabsContainerElement:e,event:t})})});const n=e.querySelector('[role="tablist"]');if(n&&t.length>0){let e=0;n.addEventListener("keydown",n=>{n instanceof KeyboardEvent&&(_t(n)||St(n))&&(t[e].setAttribute("tabindex","-1"),_t(n)?(e+=1,e>=t.length&&(e=0)):St(n)&&(e-=1,e<0&&(e=t.length-1)),t[e].setAttribute("tabindex","0"),t[e].focus())})}})},Ct=e=>{const[t,n]=e.split("h").map(Number);return 60*t+n},kt=()=>{const e=new Date;return 60*e.getHours()+e.getMinutes()},It=()=>{const e=document.querySelectorAll(".c-timeline__time");if(!e||e.length<2)return;const t=document.querySelector(".c-timeline__progress-bar"),{currentIntervalStartTime:n,currentIntervalEndTime:r,currentIntervalIndex:i}=(e=>{const t=kt();let n=null,r=null,i=-1;return Array.from(e).find((e,o,a)=>{if(o===a.length-1)return!1;const s=e.textContent,l=a[o+1].textContent;if(!s||!l)return!1;const c=Ct(s),u=Ct(l);return t>=c&&t<u&&(n=s,r=l,i=o,!0)}),{currentIntervalStartTime:n,currentIntervalEndTime:r,currentIntervalIndex:i}})(e);if(!n||!r)return;const o=((e,t)=>{const n=kt();return n<e||n>t?0:(n-e)/(t-e)})(Ct(n),Ct(r));if(t instanceof HTMLElement){if(t.classList.contains("c-timeline__progress-bar--is-desktop")&&e.length>=5){const e="172px / 2";switch(i){case 0:t.style.width=`calc(${e} + (((${e} + 25% - ${e} / 2) - ${e}) * ${o})`;break;case 1:t.style.width=`calc((${e} + 25% - ${e} / 2) + (((50%) - (${e} + 25% - ${e} / 2)) * ${o})`;break;case 2:t.style.width=`calc((50%) + (((75% - ${e} / 2) - (50%)) * ${o})`;break;case 3:t.style.width=`calc((75% - ${e} / 2) + (((100% - ${e}) - (75% - ${e} / 2)) * ${o}`;break;default:t.style.width="0%"}}if(t.classList.contains("c-timeline__progress-bar--is-mobile")){const e="45px / 2",a="20px";switch(i){case 0:case 1:case 2:case 3:t.style.width=`calc((${a} + ${e}) + (((60% + ${e}) - (${a} + ${e})) * ${o})`;break;default:t.style.width="0%"}if(1===i||2===i||3===i){const e=document.querySelectorAll(".c-timeline__time"),t=document.querySelectorAll(".c-timeline__event");e.length>0&&t.length>0&&(e[0].textContent=n,e[1].textContent=r,t[0].textContent=t[i].textContent,t[1].textContent=t[i+1].textContent)}}}},Dt="c-icon-item__container--is-highlighted",Tt=()=>{const e=document.querySelector(".c-toolbar");if(e){const t=window.location.origin+window.location.pathname,n=Array.from(e.querySelectorAll(".c-icon-item__container"));(e=>{e.find(e=>e.classList.contains(Dt))?.classList.remove(Dt)})(n),n.find(e=>e.querySelector("a")?.getAttribute("href")===t)?.classList.add(Dt)}},Nt=e=>{const t=e||document.querySelector(".c-map-towns");if(!t)return void new MutationObserver((e,t)=>{if(typeof document<"u"){const e=document.querySelector(".c-map-towns");e&&(t.disconnect(),Nt(e))}}).observe(document.body,{childList:!0,subtree:!0});const n=()=>{const e=t.querySelectorAll(".js-city-marker");if(0===e.length)return!1;const n=(t=0)=>{let r=!0;e.forEach(e=>{if("false"===e.getAttribute("aria-hidden"))return;const t=e.querySelector(".js-city-anchor"),n=e.querySelector(".js-city-text"),i=e.querySelector(".js-city-bg");if(!(t instanceof SVGGraphicsElement&&n instanceof SVGTextElement&&i instanceof SVGRectElement))return;const o=t.getBBox();if(o.width>0){const{x:t,y:r,width:a,height:s}=o,l=e.getAttribute("data-scale"),c=l?` scale(${l})`:"";e.setAttribute("transform",`translate(${t+a/2}, ${r+s/2})${c}`);const u=n.getBBox(),d=8,h=4,p=8,f=u.width+d,m=u.height+h;i.setAttribute("width",`${f}`),i.setAttribute("height",`${m}`),i.setAttribute("x",""+-f/2),i.setAttribute("y",""+(-m-p));const g=-m/2-p;n.setAttribute("y",`${g}`),e.setAttribute("aria-hidden","false")}else r=!1}),!r&&t<12&&requestAnimationFrame(()=>n(t+1))};return requestAnimationFrame(()=>n()),!0};n()||new MutationObserver((e,t)=>{n()&&t.disconnect()}).observe(t,{childList:!0,subtree:!0})},Lt={10:[{id:"10387",name:"Troyes"},{id:"10323",name:"Romilly-sur-Seine"},{id:"10033",name:"Bar-sur-Aube"}],11:[{id:"11262",name:"Narbonne"},{id:"11069",name:"Carcassonne"},{id:"11076",name:"Castelnaudary"}],12:[{id:"12202",name:"Rodez"},{id:"12145",name:"Millau"},{id:"12300",name:"Villefranche-de-Rouergue"}],13:[{id:"13055",name:"Marseille"},{id:"13001",name:"Aix-en-Provence"},{id:"13004",name:"Arles"}],14:[{id:"14118",name:"Caen"},{id:"14366",name:"Lisieux"},{id:"14762",name:"Vire Normandie"}],15:[{id:"15014",name:"Aurillac"},{id:"15187",name:"Saint-Flour"},{id:"15120",name:"Mauriac"}],16:[{id:"16015",name:"Angoulême"},{id:"16102",name:"Cognac"},{id:"16028",name:"Barbezieux-Saint-Hilaire"}],17:[{id:"17300",name:"La Rochelle"},{id:"17415",name:"Saintes"},{id:"17299",name:"Rochefort"}],18:[{id:"18033",name:"Bourges"},{id:"18279",name:"Vierzon"},{id:"18197",name:"Saint-Amand-Montrond"}],19:[{id:"19031",name:"Brive-la-Gaillarde"},{id:"19272",name:"Tulle"},{id:"19275",name:"Ussel"}],21:[{id:"21231",name:"Dijon"},{id:"21054",name:"Beaune"},{id:"21038",name:"Auxonne"}],22:[{id:"22278",name:"Saint-Brieuc"},{id:"22113",name:"Lannion"},{id:"22093",name:"Lamballe-Armor"}],23:[{id:"23096",name:"Guéret"},{id:"23176",name:"La Souterraine"},{id:"23008",name:"Aubusson"}],24:[{id:"24322",name:"Périgueux"},{id:"24037",name:"Bergerac"},{id:"24520",name:"Sarlat-la-Canéda"}],25:[{id:"25056",name:"Besançon"},{id:"25388",name:"Montbéliard"},{id:"25462",name:"Pontarlier"}],26:[{id:"26362",name:"Valence"},{id:"26198",name:"Montélimar"},{id:"26235",name:"Pierrelatte"}],27:[{id:"27229",name:"Évreux"},{id:"27681",name:"Vernon"},{id:"27375",name:"Louviers"}],28:[{id:"28085",name:"Chartres"},{id:"28134",name:"Dreux"},{id:"28088",name:"Châteaudun"}],29:[{id:"29019",name:"Brest"},{id:"29232",name:"Quimper"},{id:"29039",name:"Concarneau"}],30:[{id:"30189",name:"Nîmes"},{id:"30007",name:"Alès"},{id:"30028",name:"Bagnols-sur-Cèze"}],31:[{id:"31555",name:"Toulouse"},{id:"31483",name:"Saint-Gaudens"},{id:"31033",name:"Auterive"}],32:[{id:"32013",name:"Auch"},{id:"32160",name:"L'Isle-Jourdain"},{id:"32107",name:"Condom"}],33:[{id:"33063",name:"Bordeaux"},{id:"33529",name:"La Teste-de-Buch"},{id:"33243",name:"Libourne"}],34:[{id:"34172",name:"Montpellier"},{id:"34032",name:"Béziers"},{id:"34301",name:"Sète"}],35:[{id:"35238",name:"Rennes"},{id:"35288",name:"Saint-Malo"},{id:"35115",name:"Fougères"}],36:[{id:"36044",name:"Châteauroux"},{id:"36088",name:"Issoudun"},{id:"36018",name:"Le Blanc"}],37:[{id:"37261",name:"Tours"},{id:"37003",name:"Amboise"},{id:"37072",name:"Chinon"}],38:[{id:"38185",name:"Grenoble"},{id:"38544",name:"Vienne"},{id:"38053",name:"Bourgoin-Jallieu"}],39:[{id:"39198",name:"Dole"},{id:"39300",name:"Lons-le-Saunier"},{id:"39478",name:"Saint-Claude"}],40:[{id:"40192",name:"Mont-de-Marsan"},{id:"40088",name:"Dax"},{id:"40046",name:"Biscarrosse"}],41:[{id:"41018",name:"Blois"},{id:"41194",name:"Romorantin-Lanthenay"},{id:"41269",name:"Vendôme"}],42:[{id:"42218",name:"Saint-Étienne"},{id:"42187",name:"Roanne"},{id:"42147",name:"Montbrison"}],43:[{id:"43157",name:"Le Puy-en-Velay"},{id:"43137",name:"Monistrol-sur-Loire"},{id:"43040",name:"Brioude"}],44:[{id:"44109",name:"Nantes"},{id:"44184",name:"Saint-Nazaire"},{id:"44131",name:"Pornic"}],45:[{id:"45234",name:"Orléans"},{id:"45208",name:"Montargis"},{id:"45155",name:"Gien"}],46:[{id:"46042",name:"Cahors"},{id:"46102",name:"Figeac"},{id:"46127",name:"Gourdon"}],47:[{id:"47001",name:"Agen"},{id:"47323",name:"Villeneuve-sur-Lot"},{id:"47157",name:"Marmande"}],48:[{id:"48095",name:"Mende"},{id:"48140",name:"Saint-Chély-d'Apcher"},{id:"48080",name:"Langogne"}],49:[{id:"49007",name:"Angers"},{id:"49099",name:"Cholet"},{id:"49328",name:"Saumur"}],50:[{id:"50129",name:"Cherbourg-en-Cotentin"},{id:"50502",name:"Saint-Lô"},{id:"50218",name:"Granville"}],51:[{id:"51454",name:"Reims"},{id:"51108",name:"Châlons-en-Champagne"},{id:"51230",name:"Épernay"}],52:[{id:"52448",name:"Saint-Dizier"},{id:"52121",name:"Chaumont"},{id:"52269",name:"Langres"}],53:[{id:"53130",name:"Laval"},{id:"53062",name:"Château-Gontier-sur-Mayenne"},{id:"53147",name:"Mayenne"}],54:[{id:"54395",name:"Nancy"},{id:"54329",name:"Lunéville"},{id:"54528",name:"Toul"}],55:[{id:"55545",name:"Verdun"},{id:"55029",name:"Bar-le-Duc"},{id:"55122",name:"Commercy"}],56:[{id:"56121",name:"Lorient"},{id:"56260",name:"Vannes"},{id:"56178",name:"Pontivy"}],57:[{id:"57463",name:"Metz"},{id:"57672",name:"Thionville"},{id:"57227",name:"Forbach"}],58:[{id:"58194",name:"Nevers"},{id:"58086",name:"Cosne-Cours-sur-Loire"},{id:"58095",name:"Decize"}],59:[{id:"59350",name:"Lille"},{id:"59183",name:"Dunkerque"},{id:"59606",name:"Valenciennes"}],60:[{id:"60057",name:"Beauvais"},{id:"60159",name:"Compiègne"},{id:"60175",name:"Creil"}],61:[{id:"61001",name:"Alençon"},{id:"61169",name:"Flers"},{id:"61006",name:"Argentan"}],62:[{id:"62193",name:"Calais"},{id:"62041",name:"Arras"},{id:"62160",name:"Boulogne-sur-Mer"}],63:[{id:"63113",name:"Clermont-Ferrand"},{id:"63178",name:"Issoire"},{id:"63430",name:"Thiers"}],64:[{id:"64445",name:"Pau"},{id:"64102",name:"Bayonne"},{id:"64260",name:"Hendaye"}],65:[{id:"65440",name:"Tarbes"},{id:"65258",name:"Lannemezan"},{id:"65025",name:"Argelès-Gazost"}],66:[{id:"66136",name:"Perpignan"},{id:"66049",name:"Céret"},{id:"66149",name:"Prades"}],67:[{id:"67482",name:"Strasbourg"},{id:"67180",name:"Haguenau"},{id:"67462",name:"Sélestat"}],68:[{id:"68224",name:"Mulhouse"},{id:"68066",name:"Colmar"},{id:"68297",name:"Saint-Louis"}],69:[{id:"69123",name:"Lyon"},{id:"69264",name:"Villefranche-sur-Saône"},{id:"69091",name:"Givors"}],70:[{id:"70550",name:"Vesoul"},{id:"70285",name:"Héricourt"},{id:"70310",name:"Lure"}],71:[{id:"71076",name:"Chalon-sur-Saône"},{id:"71270",name:"Mâcon"},{id:"71153",name:"Le Creusot"}],72:[{id:"72181",name:"Le Mans"},{id:"72154",name:"La Flèche"},{id:"72264",name:"Sablé-sur-Sarthe"}],73:[{id:"73065",name:"Chambéry"},{id:"73011",name:"Albertville"},{id:"73248",name:"Saint-Jean-de-Maurienne"}],74:[{id:"74010",name:"Annecy"},{id:"74281",name:"Thonon-les-Bains"},{id:"74012",name:"Annemasse"}],75:[{id:"75056",name:"Paris"}],76:[{id:"76351",name:"Le Havre"},{id:"76540",name:"Rouen"},{id:"76217",name:"Dieppe"}],77:[{id:"77284",name:"Meaux"},{id:"77108",name:"Chelles"},{id:"77288",name:"Melun"}],78:[{id:"78646",name:"Versailles"},{id:"78361",name:"Mantes-la-Jolie"},{id:"78172",name:"Conflans-Sainte-Honorine"}],79:[{id:"79191",name:"Niort"},{id:"79049",name:"Bressuire"},{id:"79329",name:"Thouars"}],80:[{id:"80021",name:"Amiens"},{id:"80001",name:"Abbeville"},{id:"80016",name:"Albert"}],81:[{id:"81004",name:"Albi"},{id:"81065",name:"Castres"},{id:"81105",name:"Graulhet"}],82:[{id:"82121",name:"Montauban"},{id:"82033",name:"Castelsarrasin"},{id:"82037",name:"Caussade"}],83:[{id:"83137",name:"Toulon"},{id:"83061",name:"Fréjus"},{id:"83050",name:"Draguignan"}],84:[{id:"84007",name:"Avignon"},{id:"84031",name:"Carpentras"},{id:"84087",name:"Orange"}],85:[{id:"85191",name:"La Roche-sur-Yon"},{id:"85194",name:"Les Sables-d'Olonne"},{id:"85047",name:"Challans"}],86:[{id:"86194",name:"Poitiers"},{id:"86066",name:"Châtellerault"},{id:"86070",name:"Chauvigny"}],87:[{id:"87085",name:"Limoges"},{id:"87154",name:"Saint-Junien"},{id:"87187",name:"Saint-Yrieix-la-Perche"}],88:[{id:"88160",name:"Épinal"},{id:"88413",name:"Saint-Dié-des-Vosges"},{id:"88196",name:"Gérardmer"}],89:[{id:"89024",name:"Auxerre"},{id:"89387",name:"Sens"},{id:"89206",name:"Joigny"}],90:[{id:"90010",name:"Belfort"},{id:"90081",name:"Réchésy"}],91:[{id:"91228",name:"Évry-Courcouronnes"},{id:"91223",name:"Étampes"},{id:"91692",name:"Les Ulis"}],92:[{id:"92012",name:"Boulogne-Billancourt"}],93:[{id:"93066",name:"Saint-Denis"}],94:[{id:"94081",name:"Vitry-sur-Seine"}],95:[{id:"95018",name:"Argenteuil"},{id:"95487",name:"Persan"},{id:"95351",name:"Louvres"}],971:[{id:"97101",name:"Les Abymes"},{id:"97128",name:"Sainte-Anne"},{id:"97118",name:"Petit-Bourg"}],972:[{id:"97209",name:"Fort-de-France"},{id:"97224",name:"Saint-Joseph"},{id:"97220",name:"Rivière-Pilote"}],973:[{id:"97311",name:"Saint-Laurent-du-Maroni"},{id:"97304",name:"Kourou"}],974:[{id:"97411",name:"Saint-Denis"},{id:"97416",name:"Saint-Pierre"},{id:"97409",name:"Saint-André"}],"03":[{id:"03185",name:"Montluçon"},{id:"03310",name:"Vichy"},{id:"03190",name:"Moulins"}],"04":[{id:"04112",name:"Manosque"},{id:"04070",name:"Digne-les-Bains"},{id:"04209",name:"Sisteron"}],"09":[{id:"09225",name:"Pamiers"},{id:"09261",name:"Saint-Girons"},{id:"09160",name:"Lavelanet"}],"01":[{id:"01053",name:"Bourg-en-Bresse"},{id:"01283",name:"Oyonnax"},{id:"01033",name:"Valserhône"}],"06":[{id:"06088",name:"Nice"},{id:"06029",name:"Cannes"},{id:"06083",name:"Menton"}],"2B":[{id:"2B033",name:"Bastia"},{id:"2B096",name:"Corte"},{id:"2B050",name:"Calvi"}],"2A":[{id:"2A004",name:"Ajaccio"},{id:"2A247",name:"Porto-Vecchio"},{id:"2A032",name:"Bastelicaccia"}],"02":[{id:"02691",name:"Saint-Quentin"},{id:"02722",name:"Soissons"},{id:"02408",name:"Laon"}],"07":[{id:"07010",name:"Annonay"},{id:"07019",name:"Aubenas"},{id:"07324",name:"Tournon-sur-Rhône"}],"05":[{id:"05061",name:"Gap"},{id:"05023",name:"Briançon"},{id:"05046",name:"Embrun"}],"08":[{id:"08105",name:"Charleville-Mézières"},{id:"08362",name:"Rethel"},{id:"08190",name:"Givet"}]},Bt=/<path\b([^>]*?)\/>/g,Pt=/\b([:\w-]+)="([^"]*)"/g;var Ot=(e=>(e.MOBILE="mobile",e.DESKTOP="desktop",e))(Ot||{});const Mt=e=>{window.location.href=e},jt=(e,t)=>{const n=document.createDocumentFragment();return e.forEach(e=>{const r=((e,t)=>{const n=e.id,r=e.url,i=e.name;if(!n||!r)return null;const o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("d",e.path),o.setAttribute("class","c-map-towns__path c-map-towns__zoom-town"),o.setAttribute("data-url",r);const a=((e,t)=>t.get(e))(n,t);if(a&&a.forEach(e=>{o.classList.add(e)}),i){const e=document.createElementNS("http://www.w3.org/2000/svg","title");e.textContent=i,o.appendChild(e)}return o})(e,t);r&&n.appendChild(r)}),n};let Ft=!1;const Rt=()=>{if(Ft)return;if(!document.querySelector(".c-map-towns"))return void new MutationObserver((e,t)=>{typeof document<"u"&&document.querySelector(".c-map-towns")&&(t.disconnect(),Rt())}).observe(document.body,{childList:!0,subtree:!0});const e=window.layout===Ot.MOBILE,t=document.querySelector(".c-map-towns__map"),n=document.querySelector(".c-map-towns__droms"),r=document.querySelector(".c-map-towns__zooms"),i=e=>{const{target:t}=e;if(!(t instanceof Element))return;const n=t.closest(".js-city-marker");if(n){const e=n.getAttribute("data-url");return void(e&&Mt(e))}const r=t.closest(".c-map-towns__zoom-item")?.getAttribute("data-city-url");if(r)return void Mt(r);const i=t.closest(".c-map-towns__dept-trigger")?.getAttribute("data-url");i&&Mt(i)};if(e)return t?.addEventListener("click",i),n?.addEventListener("click",i),r?.addEventListener("click",i),void(Ft=!0);const o=document.getElementById("js-zoom-overlay"),a=document.getElementById("js-zoom-svg"),s=document.getElementById("js-zoom-group"),l=document.getElementById("js-zoom-close");if(!(o instanceof HTMLElement&&a instanceof SVGSVGElement&&s instanceof SVGGElement&&l instanceof HTMLElement))return void requestAnimationFrame(Rt);Ft=!0;const c=document.getElementById("js-zoom-label"),u=document.getElementById("js-zoom-title"),d=document.getElementById("js-town-sprite-data"),h=new Map,p=new Map;let f=null;const m=()=>{if(f)return f;const e=d instanceof HTMLScriptElement?JSON.parse(d.textContent||'""'):"";return t=(e=>{const t=[];for(const n of e.matchAll(Bt)){const e=n[1];if(!e)continue;const r=new Map;for(const t of e.matchAll(Pt)){const[,e,n]=t;e&&r.set(e,n||"")}const i=r.get("id"),o=r.get("d"),a=r.get("data-name"),s=r.get("data-url");!i||!o||!a||!s||t.push({id:i,path:o,name:a,url:s})}return t})(e),f=new Map(t.map(e=>[e.id,e])),f;var t},g=()=>{o.setAttribute("aria-hidden","true"),s.replaceChildren()},y=(e,t)=>{const n=Lt[e]||[];if(0===n.length)return;const r=document.createDocumentFragment();n.forEach(n=>{const i=((e,t)=>e.startsWith("97")?document.querySelector(`path[id="town-${t}-drom"]`)?.getAttribute("d")||null:m().get(`town-${t}`)?.path||null)(e,n.id);if(!i)return;const o=((e,t,n)=>{const r=document.createElementNS("http://www.w3.org/2000/svg","g");r.setAttribute("class","js-city-marker c-map-towns__city-marker"),r.setAttribute("aria-hidden","true"),r.setAttribute("data-scale",n.toString());const i=document.createElementNS("http://www.w3.org/2000/svg","path");i.setAttribute("d",t),i.setAttribute("class","js-city-anchor c-map-towns__city-anchor");const o=document.createElementNS("http://www.w3.org/2000/svg","circle");o.setAttribute("class","c-map-towns__city-circle"),o.setAttribute("r","5"),o.setAttribute("fill","white"),o.setAttribute("stroke","black"),o.setAttribute("strokeWidth","1");const a=document.createElementNS("http://www.w3.org/2000/svg","rect");a.setAttribute("class","js-city-bg"),a.setAttribute("fill","white"),a.setAttribute("rx","4"),a.setAttribute("ry","4");const s=document.createElementNS("http://www.w3.org/2000/svg","text");return s.setAttribute("class","js-city-text c-map-towns__city-text"),s.textContent=e,r.appendChild(i),r.appendChild(o),r.appendChild(a),r.appendChild(s),r})(n.name,i,t);r.appendChild(o)}),s.appendChild(r),requestAnimationFrame(()=>{Nt(s)})},v=e=>{const{target:t}=e;if(!(t instanceof Element))return;const n=t?.closest(".c-map-towns__dept-trigger");if(!n)return;const r=n.getAttribute("id")?.replace("out-","")||"",i=n.getAttribute("data-name"),l=((e,t,n)=>{const r=n.get(e);if(r)return r;const i=e.startsWith("97")?Array.from(document.querySelectorAll(`path[id^="town-${e}"][id$="-drom"]`)).map(e=>({id:e.getAttribute("id")||"",path:e.getAttribute("d")||"",name:e.getAttribute("data-name")||"",url:e.getAttribute("data-url")||""})):Array.from(t().values()).filter(t=>t.id.startsWith(`town-${e}`));return n.set(e,i),i})(r,m,h);var d;(d=p).size>0||document.querySelectorAll(".c-map-towns__map .c-map-towns__layer-towns path[data-town-id], .c-map-towns__map-drom .c-map-towns__layer-towns path[id]").forEach(e=>{const t=e.getAttribute("data-town-id")||e.getAttribute("id");t&&d.set(t,Array.from(e.classList).filter(e=>e.startsWith("c-map-towns__path--")))});const f=jt(l,p);if(c&&u&&i&&(c.textContent=i,u.textContent=`Carte détaillée du département : ${i}`),!(n instanceof SVGGraphicsElement))return;const g=((e,t)=>{const n=t.getBBox(),r=n.width+10,i=n.height+10;e.setAttribute("viewBox",`${n.x-5} ${n.y-5} ${r} ${i}`);const o=e.clientWidth||800,a=e.clientHeight||600;return Math.max(r/o,i/a)})(a,n);o.setAttribute("aria-hidden","false"),((e,t)=>{e.replaceChildren(t)})(s,f),y(r,g)};t?.addEventListener("click",v),n?.addEventListener("click",v),s.addEventListener("click",e=>{const{target:t}=e;if(!(t instanceof Element))return;const n=t.closest(".c-map-towns__zoom-town")?.getAttribute("data-url");n&&Mt(n)}),l.addEventListener("click",()=>{g()}),o.addEventListener("click",e=>{e.target===o&&g()})},qt=()=>{((e=document.querySelector(".js-expand-button"))=>{e&&document.querySelectorAll(".js-expand-button").forEach(e=>{(e=>{const t=e.parentNode?.querySelector(".js-expand-target");return!(!t||t.classList.contains("c-elections-result__members"))&&(t.textContent?.trim().length??0)<255})(e)?(e.style.display="none",e.parentNode?.querySelectorAll(".js-expand-target")?.forEach(e=>{e.setAttribute("aria-hidden","false")})):e.addEventListener("click",d)})})(),Et(),a(),(()=>{const e=document.querySelector(".js-info-banner__button");e instanceof HTMLButtonElement&&e.addEventListener("click",f)})(),((e=document.querySelector(".js-ellipsis-button"))=>{e&&document.querySelectorAll(".js-ellipsis-button").forEach(e=>{const t="true"===e.getAttribute("data-multiple");e.addEventListener("click",e=>u(e,t))})})(),(()=>{const e=document.querySelector(".c-progress"),t=document.querySelector(".c-btn__close-progress");(e||t)&&window.addEventListener("scroll",st)})(),(()=>{let e=null;e=new ot({gallery:"#photoswipe-gallery",children:"a",pswpModule:He,zoom:!1,imageClickAction:"next",tapAction:"next"}),e.on("uiRegister",()=>{e?.pswp?.ui?.registerElement({name:"custom-caption",appendTo:"root",onInit:t=>{e?.pswp?.on("change",()=>{const n=e?.pswp?.currSlide?.data.element;if(n){const e=n.querySelector(".caption-content");t.innerHTML=e?.innerHTML||""}})}})}),e.init()})(),document.querySelectorAll(".js-modal").forEach(e=>{if(!(e instanceof HTMLElement))return;const t=new D(e);if("dialog-menu"===e.id){const e=document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"),n=document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");e.length>0&&n.length>0&&(t.on("show",()=>{e.forEach(e=>{e.classList.add("u-hidden")}),n.forEach(e=>{e.classList.remove("u-hidden")})}),t.on("hide",()=>{e.forEach(e=>{e.classList.remove("u-hidden")}),n.forEach(e=>{e.classList.add("u-hidden")})}))}t.on("show",()=>{document.body.classList.add("noscroll")}).on("hide",()=>{document.body.classList.remove("noscroll")})}),xt(),yt||(document.addEventListener("click",bt),document.addEventListener("keydown",wt),yt=!0),document.querySelectorAll("[data-countdown][data-countdown-end-date]").forEach(e=>{const t=e.dataset.countdownEndDate,n=t?new Date(t).getTime():Number.NaN,r=(e=>{const t=e.querySelector(".js-countdown-days"),n=e.querySelector(".js-countdown-hours"),r=e.querySelector(".js-countdown-minutes"),i=e.querySelector(".js-countdown-seconds");return t&&n&&r&&i?{daysElement:t,hoursElement:n,minutesElement:r,secondsElement:i}:null})(e);if(!r)return;if(Number.isNaN(n))return void e.remove();if(!s(n,r))return void e.remove();const i=setInterval(()=>{s(n,r)||(clearInterval(i),e.remove())},1e3)}),window?.getSelection?(document.addEventListener("mouseup",mt),document.addEventListener("selectionchange",mt),document.addEventListener("touchend",mt),document.addEventListener("touchcancel",mt)):console.warn("Selection API isn't supported"),h(".js-close-article-btn",".js-limit-scroll-close-article-btn"),h(".js-chatbot-btn",".js-limit-scroll-chatbot-btn"),(()=>{const e=document.querySelectorAll(".js-half-donut-result");for(const t of Array.from(e)){const e=t.querySelector(".c-half-donut"),n=t.querySelector(".c-legend");if(!e||!n)return;n.querySelectorAll("[data-color]").forEach(t=>{const r=t.getAttribute("data-color"),i=e.querySelector(`.c-half-donut__zone--${r}`);i?.addEventListener("mouseenter",()=>{t.classList.add("c-legend__item--is-hovered"),e.classList.add("c-half-donut--is-hovered"),n.classList.add("c-legend--is-hovered")}),i?.addEventListener("mouseleave",()=>{t.classList.remove("c-legend__item--is-hovered"),e.classList.remove("c-half-donut--is-hovered"),n.classList.remove("c-legend--is-hovered")}),t.addEventListener("mouseenter",()=>{i?.classList.add("c-half-donut__zone--is-hovered"),n.classList.add("c-legend--is-hovered"),e.classList.add("c-half-donut--is-hovered")}),t.addEventListener("mouseleave",()=>{i?.classList.remove("c-half-donut__zone--is-hovered"),n.classList.remove("c-legend--is-hovered"),e.classList.remove("c-half-donut--is-hovered")})})}})(),c(),o("localisation-input","https://www.20minutes.fr/elections/resultats/recherche","?searchValue=","text","text"),l(),Nt(),Tt(),(()=>{const e=document.querySelector("#js-election-selector");e&&e.addEventListener("change",e=>{window.location.replace(e.target.value)})})(),(()=>{const e=document.querySelector(".c-search-banner");if(!e)return;const t=document.getElementById("js-search-banner-expand-button");if(t instanceof HTMLButtonElement){if(t.hasAttribute("data-search-banner-listener-attached"))return;const n=e.querySelector("[data-search-banner-expanded-source]"),r=e.querySelector("[data-search-banner-collapse]");if(!n||!r)return;t.setAttribute("data-search-banner-listener-attached","true"),t.addEventListener("click",()=>{"true"===n.getAttribute("aria-expanded")?(n.setAttribute("aria-expanded","false"),r.setAttribute("aria-hidden","true")):(n.setAttribute("aria-expanded","true"),r.setAttribute("aria-hidden","false"))})}})(),p(),Rt(),(()=>{const e=document.querySelectorAll(".js-navigation-container");Array.from(e).forEach(e=>{const t=e.querySelector(".js-navigation-container__list");if(t){const n=new ResizeObserver(t=>{t.forEach(t=>{const{width:r}=t.contentRect;r>0&&(M(e),n.disconnect())})});n.observe(t)}})})(),(()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e))if(t){const e=t.querySelector(".js-navigation-container__list"),n=t.querySelector(".o-nav-button--next-button"),r=t.querySelector(".o-nav-button--previous-button");e&&n&&r&&window.addEventListener("resize",O.bind(!1,{navigationContainer:t,navigatedList:e,nextBtn:n,prevBtn:r}))}})(),(()=>{const e=document.querySelector(".js-game-alert");n&&e&&e.classList.remove("u-hidden")})(),r(),It(),((e={})=>{const{buttonSelector:t=".c-scroll-to-top"}=e,n=document.querySelector(t),r=n?.querySelector("button");if(!n||!r)return;const i=n.dataset.triggerSelector||"[data-scroll-trigger]",o=parseInt(n.dataset.triggerOffset||"0",10);n.style.display="none";const a=()=>{const e=document.querySelector(i);let t=!1;if(e){const n=e.getBoundingClientRect().top;t=window.pageYOffset>=n-o}else t=window.pageYOffset>300;n.style.display=t?"block":"none"};window.addEventListener("scroll",a),r.addEventListener("click",()=>{window.scrollTo({top:0,behavior:"smooth"})}),a()})(),lt(),(()=>{const e=document.querySelector(".c-header-page__ranking-button"),t=e?.querySelector("button");!e||!t||t.addEventListener("click",()=>{document.getElementById("mbrs-game-ranking")?.scrollIntoView({behavior:"smooth"})})})()},zt="forward-disable-audience-measure",Ht="data-preferences-consent",Kt=(e,t)=>{let n=null;if(e.id&&(n=document.querySelector(`label[for="${e.id}"]`)),n||(n=e.closest("label")),!n){const t=e.nextElementSibling;if(t&&"LABEL"===t.tagName&&t instanceof HTMLElement)n=t;else{const t=e.previousElementSibling;t&&"LABEL"===t.tagName&&t instanceof HTMLElement&&(n=t)}}const r=n?.querySelector("span")||n;r&&(r.textContent=t?"Mon droit d'opposition est respecté et aucune donnée personnelle supplémentaire n'est collectée":"Mes données de navigation sont collectées à des fins d'analyse statistique")};function Ut(){if(this?.id)try{const e=document.getElementById(this.id);if(e){const t=e.getAttribute("value");if(t){const e=document.createElement("textarea");document.body.appendChild(e),e.value=t,e.select(),document.execCommand("copy"),document.body.removeChild(e)}}}catch(e){console.error("Oops, unable to copy",e)}}const Vt=(e,t)=>{const n=e.innerHTML.includes("candidats")?"candidats":"résultats";e.innerHTML=t?`Masquer tous les ${n}`:`Voir tous les ${n}`},Qt=e=>{const t=e.currentTarget;if(e.preventDefault(),t instanceof HTMLButtonElement){const e=t.parentNode?.querySelectorAll(".js-toggle-target");"true"===t.getAttribute("aria-expanded")?((e,t)=>{t?.forEach(e=>{e.setAttribute("aria-hidden","true")}),e.setAttribute("aria-expanded","false"),Vt(e,!1)})(t,e):((e,t)=>{e.setAttribute("aria-expanded","true"),Vt(e,!0),t?.forEach(e=>{e.setAttribute("aria-hidden","false")})})(t,e)}};let Wt=!1;const Gt=()=>{if(Wt)return;Wt=!0;const e=document.getElementById("js-top-sentinel");if(!e)return;new IntersectionObserver(([e])=>{(e=>{const t=document.querySelector(".c-search-banner");if(!t)return;const n=t.querySelector("[data-search-banner-expanded-source]"),r=t.querySelector("[data-search-banner-collapse]");r&&n&&(e?(n.setAttribute("aria-expanded","true"),r.setAttribute("aria-hidden","false")):(n.setAttribute("aria-expanded","false"),r.setAttribute("aria-hidden","true")))})(e.isIntersecting)},{root:null,threshold:0}).observe(e)},Zt=e=>{var t;const n=e.querySelector(".c-search-banner");if(!(n instanceof HTMLElement))return;const r="c-search-banner--has-top-border";(t=n.dataset).initialHasTopBorder??(t.initialHasTopBorder=String(n.classList.contains(r))),n.classList.toggle(r,"true"===n.dataset.initialHasTopBorder&&!e.classList.contains("u-sticky--on-top-screen"))},Yt=(e,t,n)=>{"desktop"===n&&(t?(e.classList.remove("u-sticky"),e.classList.remove("u-sticky--under-header-mini")):(e.classList.add("u-sticky"),e.classList.add("u-sticky--under-header-mini"))),"mobile"===n&&(t?(e.classList.remove("u-sticky--under-header"),e.classList.add("u-sticky--on-top-screen")):(e.classList.remove("u-sticky--on-top-screen"),e.classList.add("u-sticky--under-header")),Zt(e))};var Jt=()=>{(()=>{const e=document.getElementById("goto-distribution"),t=document.getElementById("goto-european-map"),n=document.getElementById("goto-map"),r=document.getElementById("goto-statistics"),i=document.getElementById("goto-results");e&&e.addEventListener("click",Ut),t&&t.addEventListener("click",Ut),n&&n.addEventListener("click",Ut),r&&r.addEventListener("click",Ut),i&&i.addEventListener("click",Ut)})(),((e=document.querySelector(".js-toggle-button"))=>{e&&document.querySelectorAll(".js-toggle-button").forEach(e=>{e.addEventListener("click",Qt)})})(),Gt(),(()=>{const e=document.getElementById("elections-form-container"),t=document.querySelector(".c-header-mini"),n=document.querySelector(".c-header-mobile"),r=document.querySelector('body[data-layout="mobile"]');e&&t&&new MutationObserver(t=>{const n=t[0],r=n.target;if(r instanceof HTMLElement&&"attributes"===n.type&&"class"===n.attributeName){const t=r.className.includes("c-header-mini--is-hidden");Yt(e,t,"desktop")}}).observe(t,{attributes:!0});r&&e&&n&&(e.classList.add("u-sticky"),e.classList.add("u-sticky--under-header"),Zt(e),new MutationObserver(t=>{const n=t[0],r=n.target;if(r instanceof HTMLElement&&"attributes"===n.type&&"class"===n.attributeName){const t=r.className.includes("c-header-mobile--is-hidden");Yt(e,t,"mobile")}}).observe(n,{attributes:!0}))})()};const $t=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>window.__tcfapi("addEventListener",2,(e=>(t,n)=>{if(n&&("tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus)&&e.getCurrentUserStatus().purposes["mesureda-6qyqaZXC"]?.enabled&&e.getCurrentUserStatus().vendors["20minutes-bfbzKmzq"]?.enabled){const e=document.getElementById("feedback-button");if(!e)return;e.addEventListener("click",()=>{try{window.$screeb("survey.start","5d850959-8e04-425c-b6fe-df5c7dafd4f9",{distribution_id:"dc76b85e-e248-4ac1-a988-30250b4abb80"})}catch(e){console.error("Error while starting survey",e)}})}})(e)))};var Xt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function en(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tn,nn,rn={exports:{}},on={};var an=(nn||(nn=1,rn.exports=function(){if(tn)return on;tn=1;var t=e,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,l={},c=null,u=null;for(s in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,s)&&!a.hasOwnProperty(s)&&(l[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===l[s]&&(l[s]=t[s]);return{$$typeof:n,type:e,key:c,ref:u,props:l,_owner:o.current}}return on.Fragment=r,on.jsx=s,on.jsxs=s,on}()),rn.exports);function sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ln,cn={exports:{}};var un,dn=(ln||(ln=1,un=cn,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=r(e,n(i)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var o in n)e.call(n,o)&&n[o]&&(i=r(i,o));return i}function r(e,t){return t?e?e+" "+t:e+t:e}un.exports?(t.default=t,un.exports=t):window.classNames=t}()),cn.exports);const hn=sn(dn),pn=({adUnitCompletePath:e,variant:t,isFullscreenMobile:n=!1,hasNoBgColorMobile:r=!1,...i})=>{const o=e.split("/").pop(),a=e.substring(0,e.lastIndexOf("/")),s="string"==typeof o&&o.startsWith("ban_mtf"),l=an.jsx($n,{...s?{}:i,id:`dfp_${o}`,"data-dfp-name":o,"data-dfp-path":a,className:hn("c-4b8m1ese3e",{"c-placeolder--article":"ARTICLE"===t},{"c-placeolder--ban":"BAN"===t||"ATF"===t},{"c-placeolder--ban-atf":"ATF"===t},{"c-placeolder--header-ad":"HEADER"===t},{"c-placeolder--inread":"INREAD"===t},{"c-placeolder--pave":"PAVE"===t},{"c-placeolder--com":"COM"===t},{"c-placeolder--mobile-fullscreen":n},{"c-placeolder--mobile-has-no-bg-color":r},i.className)});return s?an.jsx($n,{className:"c-placeolder--ban",children:l}):l},fn=({img:e,alt:t="",color:n,variant:r="default",streakBadge:i,className:o,...a})=>{const s=!!e,l=hn("c-avatar",{[`c-avatar--${r}`]:"default"!==r,[`c-avatar--${n}`]:n,"c-avatar--has-border":s&&n,"c-avatar--with-placeholder":!s},o),c=e||"data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%3E%3C/svg%3E";return void 0===i?an.jsx($n,{...a,as:"img",className:l,src:c,alt:t}):an.jsxs($n,{...a,className:"c-avatar-container",children:[an.jsx($n,{as:"img",className:l,src:c,alt:t}),an.jsxs(Xn,{className:"c-avatar-container__badge",alignItems:"center",gap:"xxs-3",bg:"grey-50",px:"xxs-2",children:[an.jsx(Pn,{name:"heat",size:10,color:"orange"}),an.jsx(gr,{as:"span",color:"ultramarine",size:"xxs",weight:"bold",children:i})]})]})},mn={primary:{ultramarine:{value:"#4742FF",key:"{color.primary.ultramarine}"},"ultramarine-light":{value:"#6B72FB",key:"{color.primary.ultramarine-light}"}},secondary:{orange:{value:"#FA9917",key:"{color.secondary.orange}"},yellow:{value:"#F2E500",key:"{color.secondary.yellow}"},green:{value:"#6A9F4F",key:"{color.secondary.green}"},purple:{value:"#AE6BA2",key:"{color.secondary.purple}"},red:{value:"#DC0E19",key:"{color.secondary.red}"},scarlet:{value:"#FF3F3F",key:"{color.secondary.scarlet}"},blue:{value:"#0000FF",key:"{color.secondary.blue}"},"blue-grey":{value:"#253548",key:"{color.secondary.blue-grey}"},"blue-dark":{value:"#16202B",key:"{color.secondary.blue-dark}"},pink:{value:"#EF2A82",key:"{color.secondary.pink}"},sponsoring:{value:"#FFF5F1",key:"{color.secondary.sponsoring}"},"blue-light":{value:"#D4ECFB",key:"{color.secondary.blue-light}"},"blue-ice":{value:"#F0F4F8",key:"{color.secondary.blue-ice}"}},greyscale:{black:{value:"#000",key:"{color.greyscale.black}"},white:{value:"#FFF",key:"{color.greyscale.white}"},"grey-50":{value:"#FFFFFE",key:"{color.greyscale.grey-50}"},"grey-100":{value:"#F7F7F7",key:"{color.greyscale.grey-100}"},"grey-200":{value:"#DDD",key:"{color.greyscale.grey-200}"},"grey-300":{value:"#898A8C",key:"{color.greyscale.grey-300}"},"grey-400":{value:"#6A6A6A",key:"{color.greyscale.grey-400}"},"grey-500":{value:"#484848",key:"{color.greyscale.grey-500}"},"grey-600":{value:"#2F3134",key:"{color.greyscale.grey-600}"},"grey-700":{value:"#181A1E",key:"{color.greyscale.grey-700}"},"grey-800":{value:"#101D25",key:"{color.greyscale.grey-800}"},"grey-900":{value:"#0F1115",key:"{color.greyscale.grey-900}"}},status:{warning:{value:"#FA9917",key:"{color.status.warning}"},error:{value:"#DC0E19",key:"{color.status.error}"},success:{value:"#6A9F4F",key:"{color.status.success}"}},theme:{animaux:{value:"#3a840e",key:"{color.theme.animaux}"},conso:{value:"#ff8689",key:"{color.theme.conso}"},default:{value:"#4742ff",key:"{color.theme.default}"},entertainment:{value:"#9d61ff",key:"{color.theme.entertainment}"},hightech:{value:"#8f98a9",key:"{color.theme.hightech}"},media:{value:"#4742ff",key:"{color.theme.media}"},"partenaires-externes":{value:"#4742ff",key:"{color.theme.partenaires-externes}"},partner:{value:"#fd8000",key:"{color.theme.partner}"},planet:{value:"#00b482",key:"{color.theme.planet}"},production:{value:"#c5be00",key:"{color.theme.production}"},publicommunique:{value:"#c5be00",key:"{color.theme.publicommunique}"},publishing:{value:"#c5be00",key:"{color.theme.publishing}"},sport:{value:"#6398ab",key:"{color.theme.sport}"},tempo:{value:"#ecb200",key:"{color.theme.tempo}"},"vie-pro":{value:"#b49b56",key:"{color.theme.vie-pro}"},infolocale:{value:"#4742ff",key:"{color.theme.infolocale}"},gaming:{value:"#fa6ee5",key:"{color.theme.gaming}"},jeux:{value:"#4742ff",key:"{color.theme.jeux}"}}},gn={base:{value:"Arial",key:"{font-family.base}"},obviously:{value:"'Obviously', sans-serif",key:"{font-family.obviously}"},"source-serif-pro":{value:"'Source Serif Pro', serif",key:"{font-family.source-serif-pro}"}};Object.keys(gn).filter(e=>!["base"].includes(e));const yn={sad:"😢",interesting:"😍",laughing:"😂",shock:"😮",solidary:"🤝",angry:"😠",heart:"❤️",down:"👎",up:"👍"},vn=[{name:"Paris",id:"75056"},{name:"Marseille",id:"13055"},{name:"Lyon",id:"69123"},{name:"Toulouse",id:"31555"},{name:"Nice",id:"06088"},{name:"Nantes",id:"44109"},{name:"Montpellier",id:"34172"},{name:"Strasbourg",id:"67482"},{name:"Bordeaux",id:"33063"},{name:"Lille",id:"59350"},{name:"Rennes",id:"35238"},{name:"Reims",id:"51454"},{name:"Le Havre",id:"76351"},{name:"Grenoble",id:"38185"},{name:"Dijon",id:"21231"},{name:"Brest",id:"29019"}],An={PARIS:{label:"Paris",viewBox:"249.8 112.2 10 10",ids:Array.from({length:20},(e,t)=>`75056AR${(t+1).toString().padStart(2,"0")}`)},MARSEILLE:{label:"Marseille",viewBox:"360.4 391.2 12 12",ids:Array.from({length:16},(e,t)=>`13055AR${(t+1).toString().padStart(2,"0")}`)},LYON:{label:"Lyon",viewBox:"338.9 269 6 6",ids:Array.from({length:9},(e,t)=>`69123AR0${t+1}`)}},bn={"01":"Ain","02":"Aisne","03":"Allier","04":"Alpes-de-Haute-Provence","05":"Hautes-Alpes","06":"Alpes-Maritimes","07":"Ardèche","08":"Ardennes","09":"Ariège",10:"Aube",11:"Aude",12:"Aveyron",13:"Bouches-du-Rhône",14:"Calvados",15:"Cantal",16:"Charente",17:"Charente-Maritime",18:"Cher",19:"Corrèze","2A":"Corse-du-Sud","2B":"Haute-Corse",21:"Côte-d'Or",22:"Côtes-d'Armor",23:"Creuse",24:"Dordogne",25:"Doubs",26:"Drôme",27:"Eure",28:"Eure-et-Loir",29:"Finistère",30:"Gard",31:"Haute-Garonne",32:"Gers",33:"Gironde",34:"Hérault",35:"Ille-et-Vilaine",36:"Indre",37:"Indre-et-Loire",38:"Isère",39:"Jura",40:"Landes",41:"Loir-et-Cher",42:"Loire",43:"Haute-Loire",44:"Loire-Atlantique",45:"Loiret",46:"Lot",47:"Lot-et-Garonne",48:"Lozère",49:"Maine-et-Loire",50:"Manche",51:"Marne",52:"Haute-Marne",53:"Mayenne",54:"Meurthe-et-Moselle",55:"Meuse",56:"Morbihan",57:"Moselle",58:"Nièvre",59:"Nord",60:"Oise",61:"Orne",62:"Pas-de-Calais",63:"Puy-de-Dôme",64:"Pyrénées-Atlantiques",65:"Hautes-Pyrénées",66:"Pyrénées-Orientales",67:"Bas-Rhin",68:"Haut-Rhin",69:"Rhône",70:"Haute-Saône",71:"Saône-et-Loire",72:"Sarthe",73:"Savoie",74:"Haute-Savoie",75:"Paris",76:"Seine-Maritime",77:"Seine-et-Marne",78:"Yvelines",79:"Deux-Sèvres",80:"Somme",81:"Tarn",82:"Tarn-et-Garonne",83:"Var",84:"Vaucluse",85:"Vendée",86:"Vienne",87:"Haute-Vienne",88:"Vosges",89:"Yonne",90:"Territoire de Belfort",91:"Essonne",92:"Hauts-de-Seine",93:"Seine-Saint-Denis",94:"Val-de-Marne",95:"Val-d'Oise",971:"Guadeloupe",972:"Martinique",973:"Guyane",974:"La Réunion",976:"Mayotte"},wn=["extreme-gauche","parti-revolutionnaire-communiste","lutte-ouvriere","npa","parti-des-travailleurs","association-nationale-communistes","france-insoumise","divers-extreme-gauche","gauche","parti-communiste-francais","parti-des-citoyens-europeens","nouvelle-donne","parti-socialiste","parti-radical-de-gauche","nouveau-front-populaire","union-gauche","divers-gauche","ecologie","europe-ecologie-les-verts","equinoxe","ecologie-positive","ecologie-au-centre","ecologistes","les-ecologistes","centristes","renaissance","ensemble","modem","horizons","udi","union-centre","divers-centre","droite","les-republicains","droite-souverainiste","union-droite","divers-droite","extreme-droite","rassemblement-national","reconquete","les-patriotes","rester-libre","les-nationalistes","les-republicains-union-extreme-droite","udr","union-extreme-droite","divers-extreme-droite","divers","changement-citoyen","decidons-nous-meme","parti-animaliste","parti-pirate","union-des-democrates-musulmans","ecologie-politique","federation-citoyenne","republique-souveraine","resistons","france-libre","la-ruche-citoyenne","defendre-les-enfants","democratie-representative","europe-democratie-esperanto","union-populaire-republicaine","regionalistes"],xn={alignItems:["align-items"],alignContent:["align-content"],justifyContent:["justify-content"],gap:["gap"],gapX:["row-gap"],gapY:["col-gap"],inline:["inline"],direction:["direction"],wrap:["wrap"],flexGrow:["flex-grow"]},_n={align:["align-self"],basis:["flex-basis"],shrink:["flex-shrink"],grow:["flex-grow"]},Sn={radius:["border-radius"]},En={p:["padding"],pt:["padding-top"],pr:["padding-right"],pl:["padding-left"],pb:["padding-bottom"],px:["padding-left","padding-right"],py:["padding-top","padding-bottom"]},Cn={m:["margin"],mt:["margin-top"],mr:["margin-right"],ml:["margin-left"],mb:["margin-bottom"],mx:["margin-left","margin-right"],my:["margin-top","margin-bottom"],...En},kn={...Cn,borderColor:["border-color"],bg:["background-color"],color:["color"],...Sn},In={textAlign:["text-align"],weight:["font-weight"],italic:["font-style"],textDecoration:["text-decoration"],textTransform:["text-transform"],fontFamily:["font-family"],whiteSpace:["white-space"]},Dn=Object.keys(mn.theme);function Tn(t){return e.forwardRef(t)}Object.keys(mn.primary),Object.keys(mn.secondary),Object.keys(mn.greyscale),Object.keys(mn.status),Object.keys(mn.theme);const Nn=Tn(({as:e="button",variant:t,color:n=("ghost"===t||"link"===t?void 0:"primary"),children:r,iconProps:i,counter:o,isCentered:a=!1,isSquare:s=!1,isFullWidth:l=!1,isLoading:c=!1,size:u,isCloseWithProgress:d,closeProgressColor:h,hasNormalWeight:p=!1,stayOnSingleLine:f=!1,...m},g)=>{const y={...m?.style,...h&&{"--button-close-progress-color":`var(--color-theme-${h})`}};return an.jsxs(Xn,{...m,style:y,as:e,ref:g,alignItems:"center",justifyContent:"center",gap:"xxs",inline:"link"===t||"a"===e,radius:s?"0":void 0,className:hn("c-btn",{[`c-btn--${n}`]:n,[`c-btn--${t}`]:t,[`c-btn--${u}`]:u,"c-btn--is-centered":a,"c-btn--is-loading":c,"c-btn--full-width":l,"c-btn--has-normal-weight":p,"c-btn--stay-on-single-line":f},m?.className),children:[i&&an.jsx(Pn,{...i}),r,(0===o||o)&&an.jsx(Xn,{justifyContent:"center",alignItems:"center",color:"grey-900",bg:"white",px:"xxs",radius:"s",className:"c-btn__counter",children:o}),d&&an.jsx("div",{className:"c-btn__close-progress"})]})});Nn.displayName="Button";const Ln=Tn(({text:e,color:t="black",thickness:n="thin",...r},i)=>{const o=an.jsx(er,{bg:t,align:"center",className:hn("c-divider__line",{[`c-divider__line--${n}`]:"thin"!==n})});return an.jsx(Xn,{...r,ref:i,className:hn("c-divider",{"c-divider--has-text":!!e},r?.className),children:e?an.jsxs(an.Fragment,{children:[o,an.jsx(er,{px:"xxs-2",className:"c-divider__text",children:an.jsx(gr,{size:"xxs",color:t,textTransform:"uppercase",children:e})}),o]}):o})}),Bn=({bg:e="ultramarine",...t})=>an.jsx($n,{...t,className:hn("c-divider-section",t?.className),children:an.jsx($n,{as:"hr",className:hn("c-divider-section__line"),bg:e})});Tn(({color:e="black",thickness:t="thin",...n},r)=>an.jsx($n,{...n,ref:r,bg:e,className:hn("c-divider-vertical",{[`c-divider-vertical--${t}`]:"thin"!==t},n?.className)}));const Pn=Tn(({name:e,size:t=28,isRounded:n=!1,border:r,rotation:i,svgTitle:o,color:a,...s},l)=>{const c=Array.isArray(t)?t?.[0]:t,u=Array.isArray(t)?t?.[1]:t,d=!o,h=(e=>"string"==typeof e&&wn.includes(e))(a);return an.jsx($n,{as:"span",...s,ref:l,color:h?void 0:a,className:hn("c-icon",{[`c-icon--has-border-${r}`]:r,"c-icon--is-rounded":n,[`c-icon--${i}`]:i,[`c-icon--${a}`]:h},s?.className),children:an.jsxs("svg",{width:c,height:u,role:"img","aria-label":o||void 0,"aria-hidden":d?"true":void 0,children:[o&&an.jsx("title",{children:o}),"circle"===e?an.jsx("circle",{}):an.jsx("use",{xlinkHref:`#${e}`})]})})}),On=Tn(({iconProps:e,as:t="button",variant:n,color:r,size:i,hasShadow:o,isLoading:a,isFloating:s,...l},c)=>an.jsx(Xn,{...l,as:t,ref:c,alignItems:"center",justifyContent:"center",className:hn("c-icon-btn",{[`c-icon-btn--${n}`]:n,[`c-icon-btn--${r}`]:r,[`c-icon-btn--${i}`]:i,"c-icon-btn--has-shadow":o,"c-icon-btn--is-loading":a,"c-icon-btn--is-floating":s},l?.className),children:an.jsx(Pn,{...e})}));On.displayName="IconButton";const Mn=({text:e,...t})=>an.jsx(gr,{as:"span",role:"tooltip",className:"c-icon-tooltip",size:"xxs",weight:"bold",color:"grey-600",bg:"grey-100",px:"xxs",py:"xxs-2",mt:"xxs-2",radius:"xxs-2",tabIndex:0,...t,children:e}),jn=({src:e,format:t})=>e.replace(/%format/,t),Fn=({id:e="",src:t="",defaultFormat:n,formats:r,alt:i="",sizes:o,lazyLoad:a=!1,fetchPriority:s,isPortrait:l=!1,enableHD:c=!1,...u})=>{const d=a?"lazy":"eager",h={...u,id:e||void 0,alt:i,className:hn("c-img",u?.className,{"c-img--is-portrait":l}),loading:d,fetchpriority:s};if(!n)return an.jsx($n,{as:"img",src:t,...h});const p=n.split("x"),f=p[0],m=p[1];let g,y=`data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='${f}'%20height='${m}'%3E%3C/svg%3E`;if(t&&(y=jn({src:t,format:n}),g=(({src:e,formats:t})=>{if(void 0!==t&&t.length>0)return t.map(t=>`${e.replace(/%format/,t)} ${t.split("x")[0]}w`).join(", ")})({formats:r,src:t})??""),c){const e=2*Number(f),n=2*Number(m),r=jn({src:t,format:`${e}x${n}`});g=g?`${g}, ${r} 2x`:`${r} 2x`}return h.width=f||void 0,h.height="0"!==m?m:void 0,h.sizes=o||void 0,an.jsx($n,{...h,as:"img",src:y,...g?{srcSet:g}:{}})},Rn=({size:e,...t})=>an.jsx(gr,{as:"span",size:e||"s",...t,children:"•"}),qn=Tn(({id:e,className:t,color:n,required:r,label:i,icon:o,positionIcon:a="right",isIconButton:s=!1,iconButtonProps:l,variant:c,msg:u,containerProps:d,isRounded:h,isTransparent:p,isLarge:f,children:m,hint:g,error:y,...v},A)=>{const b=o&&an.jsx(Nn,{className:hn("c-input-container__icon",`color-${n||"black"}`),iconProps:{name:o,size:18},variant:"ghost",...l}),w=o&&an.jsx(Pn,{className:"c-input-container__icon",name:o,size:18,color:n||"black"});return an.jsxs(Xn,{direction:"column",...d,className:hn("c-input",d?.className,{[`c-input--${c}`]:c}),children:[i&&an.jsxs("label",{htmlFor:e,className:"c-input__label",children:[i,r&&an.jsxs(gr,{as:"span",size:"xxs",weight:"regular",children:[" ","(obligatoire)"]})]}),g&&an.jsx(gr,{as:"span",id:`${e}-hint`,mt:"xxs-2",ml:"xxs-2",className:"u-mask",children:g}),an.jsxs(Xn,{gap:o&&m?"xs":void 0,className:hn("c-input-container",{"c-input-container--rounded":h,"c-input-container--transparent":p,"c-input-container--large":f,[`c-input-container--${a}`]:o||m}),children:[(o||m)&&an.jsxs(Xn,{gap:"s",children:[s?b:w,m]}),an.jsx("input",{id:e,className:hn("c-input-container__input",t),required:r,ref:A,"aria-describedby":[g?`${e}-hint`:null,y?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...v})]}),u?.length&&an.jsx(Xn,{wrap:"wrap",gapY:"s",gapX:"xxs-2",mt:"xxs-2",children:u.map(({iconProps:e,textProps:t,value:n},r)=>an.jsxs(Xn,{alignItems:"center",gap:"xxs",children:[e&&an.jsx(Pn,{...e}),an.jsx(gr,{dangerouslySetInnerHTML:{__html:n},role:"alert",...t})]},r?.toString()))}),y&&an.jsx(gr,{as:"span",id:`${e}-error`,className:"u-mask",color:"red",size:"xxs",mt:"xxs-2",ml:"xxs-2",role:"alert",children:y})]})}),zn=({children:e,bg:t,color:n,hasDot:r=!1,isUppercase:i=!0,size:o,className:a,textProps:s,...l})=>{const c={...l.style,...t?.includes("#")&&{backgroundColor:t},...n?.includes("#")&&{color:n}};return an.jsxs(gr,{...l,...s,as:t?Xn:"span",...t&&{inline:!0,alignItems:"center",radius:"xxs-2",p:"xxs-2"},style:c,...!t?.includes("#")&&{bg:t},...!n?.includes("#")&&{color:n},size:o||"xxs",weight:"bold",...i&&{textTransform:"uppercase"},className:hn("c-label",{"c-label--no-background":!t},a),children:[r&&an.jsx(Pn,{name:"dot",size:4,mr:"xxs-2"}),e]})},Hn=e=>{if(e.propValue&&["boolean","string","number"].includes(typeof e.propValue)||!e.propValue){const t=Kn({className:e.className,defaultModifier:e.defaultModifier||"xs",propValue:e.propValue});return t?[t]:[]}return Object.entries(e.propValue).reduce((t,[n,r])=>{const i=Kn({className:e.className,defaultModifier:n,propValue:r});return i&&t.push(i),t},[])},Kn=e=>{if(void 0!==e.propValue){if("boolean"!=typeof e.propValue){const t=(e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase())("number"==typeof e.propValue?e.propValue.toString():e.propValue);return e.className?`${e.className}-${t}@${e.defaultModifier}`:`${t}@${e.defaultModifier}`}if(!e.className)throw new Error('It is necessary to define the argument "className" !');return`${e.className}@${e.defaultModifier}`}},Un=({basis:e,shrink:t,grow:n,...r})=>hn(...Hn({propValue:e,className:"basis"}),...Hn({propValue:t,className:"shrink"}),...Hn({propValue:n,className:"grow"}),Wn(r)),Vn=({inline:e=!1,direction:t,wrap:n,...r})=>hn(...Hn({propValue:e,className:e?"inline-flex":"flex"}),...Hn({propValue:t,className:"direction"}),...Hn({propValue:n}),Qn(r)),Qn=e=>hn(...Hn({propValue:e.alignItems,className:"items"}),...Hn({propValue:e.alignContent,className:"content"}),...Hn({propValue:e.justifyContent,className:"justify"}),...Hn({propValue:e.gap,className:"gap"}),...Hn({propValue:e.gapX,className:"gap-x"}),...Hn({propValue:e.gapY,className:"gap-y"}),...Hn({propValue:e.flexGrow,className:"grow"})),Wn=e=>hn(...Hn({propValue:e.align,className:"self"})),Gn=e=>"object"==typeof e.props?Object.keys(e.props).reduce((t,n)=>(e.systemPropNames.includes(n)||(t[n]=e.props[n]),t),{}):{},Zn=e=>hn(Object.entries(e).filter(([e])=>Object.keys(Cn).includes(e)).reduce((e,[t,n])=>(e.push(...Hn({className:t,propValue:n})),e),[])),Yn=e=>hn(Zn(e),(e=>hn({[`bg-${e.bg}`]:e.bg,[`color-${e.color}`]:e.color,[`border-color-${e.borderColor}`]:e.borderColor}))(e),(e=>hn(Object.entries(e).filter(([e])=>Object.keys(Sn).includes(e)).reduce((e,[t,n])=>(e.push(...Hn({className:t,propValue:n})),e),[])))(e)),Jn=({textAlign:e,weight:t,textTransform:n,textDecoration:r,italic:i,fontFamily:o,whiteSpace:a})=>hn(Hn({className:"text",propValue:e}),Hn({className:"font-weight",propValue:t}),{[`white-space-${a}`]:!!a,[`text-transform-${n}`]:!!n,[`text-decoration-${r}`]:!!r,"text-italic":!!i,[`font-${o}`]:!!o}),$n=Tn(({as:e="div",children:t,...n},r)=>an.jsx(e,{...Gn({props:n,systemPropNames:Object.keys(kn)}),ref:r,className:hn(Yn(n),n?.className),children:t}));$n.displayName="Box";const Xn=Tn(({as:e="div",children:t,...n},r)=>an.jsx($n,{...Gn({props:n,systemPropNames:Object.keys(xn)}),as:e,ref:r,className:hn(Vn(n),n?.className),children:t})),er=Tn(({as:e="div",children:t,...n},r)=>an.jsx($n,{...Gn({props:n,systemPropNames:Object.keys(_n)}),as:e,ref:r,className:hn(Un(n),n?.className),children:t})),tr=({colsNumber:t,gap:n,gapX:r,gapY:i,children:o,...a})=>e.createElement($n,{...Gn({props:a,systemPropNames:Object.keys(xn)}),className:hn("grid",...Hn({className:"grid-cols-number",propValue:t}),...Hn({className:"grid-gap",propValue:n}),...Hn({className:"grid-gap-row",propValue:r}),...Hn({className:"grid-gap-col",propValue:i}),hn(Qn(a),a?.className)),children:o}),nr=Tn(({as:e="a",children:t,color:n,buttonColor:r,size:i,variant:o,weight:a,whiteSpace:s,tabIsSelected:l,tabVariant:c,tabColor:u,defaultColor:d="ultramarine",isUnderlined:h,...p},f)=>{if((o||r)&&n)throw new Error("You can't use the color prop together with the variant or buttonColor prop");const m=!(!o&&!r),g=c||u?hn("c-tab",{[`c-tab--${c}`]:c,[`c-tab--${u}`]:u,"c-tab--selected":l,"c-tab--unselected":!l},Jn({weight:a,whiteSpace:s}),p?.className):hn("c-link",{"c-btn":m&&!n,[`c-btn--${r}`]:r&&!n,[`c-btn--${o}`]:o&&!n},Jn({weight:a,whiteSpace:s}),Hn({className:"text",propValue:i}),{"c-link--is-underlined":h},p?.className);return an.jsx($n,{...p,as:e,ref:f,color:c||u||m?void 0:n||("inherit"===d?void 0:d),className:g,children:t})}),rr=({dialogId:e,children:t,variant:n="center",contentClassName:r,enableA11yDialog:i=!0,...o})=>{const a={id:e,"aria-hidden":!0},s={"data-a11y-dialog-hide":e};return an.jsxs($n,{...o,className:hn("c-modal",{"js-modal":i},o.className),...a,children:[an.jsx("div",{className:"c-modal__overlay","aria-hidden":!0,...s}),an.jsx("div",{className:hn("c-modal__content",`c-modal__content--${n}`,r),children:t})]})},ir=({isWhite:e})=>an.jsx("div",{className:hn("c-pipe",{"c-pipe--is-white":e})}),or=({rating:e,ratingMax:t=5,iconProps:n,...r})=>{const i=e=>an.jsx(Pn,{name:"star",color:"ultramarine",...n},e),o=e=>an.jsx(Pn,{name:"star",color:"grey-200",...n},e),a=e=>an.jsx(Pn,{name:"halfstar",color:"grey-200",...n},e),s=[];for(let n=0;n<t;n+=1){const t=n+.5===e;n<e&&!t?s.push(i(n)):t?s.push(a(n)):s.push(o(n))}return an.jsx($n,{...r,children:s})},ar=({title:e,link:t,image:n,isTargetBlank:r,isNofollow:i,isSponsored:o,isInArticle:a,...s})=>an.jsxs($n,{...s,className:hn("c-read-also",{"c-read-also--in-article":a},s?.className),children:[an.jsxs("div",{children:[a?an.jsx(gr,{fontFamily:"base",color:"ultramarine",weight:"bold",textTransform:"uppercase",size:"xs",pb:"xxs-2",children:"Lire aussi"}):an.jsx(zn,{color:"grey-400",textProps:{fontFamily:"base"},children:"Lire aussi"}),!a&&an.jsx(ir,{}),an.jsx(nr,{href:t,className:"c-read-also__link",target:r?"_blank":void 0,rel:(i?"isNofollow":o&&"isSponsored")||void 0,...a&&{color:"black"},children:e})]}),n&&an.jsx(Fn,{src:n,defaultFormat:"110x70",formats:["110x70"],sizes:"110px",alt:e,className:"c-read-also__visual"})]});Tn(({variant:e,progressColor:t="ultramarine"},n)=>an.jsx($n,{ref:n,bg:"grey-100",className:hn("c-progress",{[`c-progress--${e}`]:e}),children:an.jsx($n,{className:"c-progress__bar",bg:t,style:{width:"0%"}})}));const sr=Tn(({id:e,className:t,required:n,label:r,defaultValue:i,options:o,placeholder:a,containerProps:s,variant:l="default",icon:c,isLarge:u,hint:d,error:h,...p},f)=>an.jsxs(Xn,{...s,ref:f,direction:"column",className:hn("c-select",s?.className),children:[r&&an.jsxs("label",{htmlFor:e,className:"c-select__label",children:[r,n&&an.jsxs(gr,{as:"span",size:"xxs",weight:"regular",children:[" ","(obligatoire)"]})]}),d&&an.jsx(gr,{as:"span",id:`${e}-hint`,mt:"xxs-2",ml:"xxs-2",className:"u-mask",children:d}),an.jsxs("div",{className:"c-select__container",children:[c&&an.jsx(Pn,{className:"c-select__icon",name:c,size:18}),an.jsx(Pn,{className:`c-select__caret c-select__caret--${l}`,name:"arrow",size:12}),an.jsxs("select",{id:e,className:hn("c-select__select",`c-select__select--${l}`,{"c-select__select--has-icon":!!c},{"c-select__select--large":u},Zn(p),t),required:n,defaultValue:i||o.filter(e=>e.isSelected)?.pop()?.value||"","aria-describedby":[d?`${e}-hint`:null,h?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...Gn({props:p,systemPropNames:Object.keys(En)}),children:[a&&an.jsx("option",{value:"",disabled:!0,hidden:!0,children:a}),o.map(e=>an.jsx("option",{value:e.value,children:e.title},e.value))]})]}),h&&an.jsx(gr,{as:"span",id:`${e}-error`,className:"u-mask",color:"red",size:"xxs",mt:"xxs-2",ml:"xxs-2",role:"alert",children:h})]}));var lr=(e=>(e.MOBILE="mobile",e.DESKTOP="desktop",e))(lr||{}),cr=(e=>(e.embed="embed",e.photo="photo",e.podcast="podcast",e.video="video",e))(cr||{});const ur=Tn(({layout:e,children:t,itemsGap:n,hasSpaceAroundButtons:r=!1,buttonsColor:i,buttonsSize:o,colorVariant:a,sliderVariant:s="default",auto:l=!1,delay:c=3e3,...u},d)=>an.jsxs($n,{...u,ref:d,className:hn("c-slider js-navigation-container",u?.className),"data-slider-variant":s,"data-slider-auto":l,"data-slider-delay":c,children:[an.jsx($n,{className:"c-slider__viewport js-navigation-container__list",children:an.jsx(Xn,{className:"c-slider__list",alignItems:"center",gap:n,children:t})}),e===lr.DESKTOP&&an.jsx($n,{className:"c-slider__buttons-container",children:Array.from(["previous","next"],e=>an.jsx($n,{pr:r&&"previous"===e&&("translucent"===i&&"small"===o?"m":"l")||void 0,pl:r&&"next"===e&&("translucent"===i&&"small"===o?"m":"l")||void 0,className:hn(`c-slider__button-container c-slider__button-container--${e} o-nav-button o-nav-button--${e}-button`,{"c-slider__button-container--has-space-around":r},{[`c-slider__button-container--${s}`]:s}),children:an.jsx(On,{color:i,size:o,..."videos"===s&&{p:"m"},iconProps:{name:"chevron",size:"videos"===s?14:12,rotation:"previous"===e?"half":void 0,svgTitle:"previous"===e?"Précédent":"Suivant"}})},e))})]})),dr=({containerProps:e,labelPosition:t="before",label:n,icon:r,id:i,...o})=>{const a=o.checked??o.defaultChecked??!1,s=an.jsxs(Xn,{as:"label",alignItems:"center",htmlFor:i,children:["before"===t&&r&&an.jsx(Pn,{mr:"xs",...r}),n,"after"===t&&r&&an.jsx(Pn,{ml:"xs",...r})]});return an.jsxs(Xn,{gap:"xs",...e,className:"c-switch",children:["before"===t&&n&&s,an.jsx("input",{...o,role:"switch",type:"checkbox",id:i,"aria-checked":a,className:hn("c-switch__input",o.className)}),"after"===t&&n&&s]})},hr=({variant:e="default",name:t,children:n,tabColor:r="default",isSelected:i=!1,index:o=-1,isNoWrap:a,color:s,...l})=>an.jsx("button",{type:"button",role:"tab",id:`tab-${t}`,className:hn("c-tab",{[`c-tab--${e}`]:e,[`c-tab--${r}`]:r,[`color-${s}`]:s,"c-tab--no-wrap":a}),"aria-controls":`tabpanel-${t}`,"aria-selected":i,tabIndex:o,...l,children:n}),pr=({name:e,children:t,className:n,isHidden:r=!0})=>an.jsx("div",{id:`tabpanel-${e}`,className:hn(n,"c-tabpanel"),role:"tabpanel","aria-hidden":r,"aria-labelledby":`tab-${e}`,children:t}),fr=Tn(({as:e="a",id:t,variant:n="primary",size:r,children:i,...o},a)=>an.jsx($n,{...o,as:"span"===n?"span":e,href:"span"===n?void 0:o?.href,ref:a,className:hn("c-tags",`c-tags--${n}`,{[`c-tags--${r}`]:r},o?.className),"data-id":t,py:o?.py??"0",px:o?.px??"xs",children:i}));Tn(({id:e,required:t,label:n,variant:r,msg:i,rows:o=5,containerProps:a,textareaContainerProps:s,iconButtonProps:l,hint:c,error:u,...d},h)=>an.jsxs(Xn,{direction:"column",ref:h,...a,className:hn("c-textarea",a?.className,{[`c-textarea--${r}`]:r}),children:[n&&an.jsxs("label",{htmlFor:e,className:"c-textarea__label",children:[n,t&&an.jsxs(gr,{as:"span",size:"xxs",weight:"regular",children:[" ","(obligatoire)"]})]}),c&&an.jsx(gr,{as:"span",id:`${e}-hint`,mt:"xxs-2",ml:"xxs-2",className:"u-mask",children:c}),an.jsxs(Xn,{...s,className:hn("c-textarea-container",s?.className),children:[an.jsx("textarea",{rows:o,placeholder:"Votre message...",required:t,...d,id:e,name:e,className:hn("c-textarea-container__textarea",d?.className),"aria-describedby":[c?`${e}-hint`:null,u?`${e}-error`:null].filter(Boolean).join(" ")||void 0}),l&&an.jsx(On,{...l,className:hn("c-textarea-container__icon",l?.className)})]}),i?.length&&an.jsx(Xn,{wrap:"wrap",gapY:"s",gapX:"xxs-2",mt:"xxs-2",children:i.map(({iconProps:e,textProps:t,value:n},r)=>an.jsxs(Xn,{alignItems:"center",gap:"xxs",children:[e&&an.jsx(Pn,{...e}),an.jsx(gr,{dangerouslySetInnerHTML:{__html:n},role:"alert",...t})]},r?.toString()))}),u&&an.jsx(gr,{as:"span",id:`${e}-error`,className:"u-mask",color:"red",size:"xxs",mt:"xxs-2",ml:"xxs-2",role:"alert",children:u})]}));const mr=Tn(({as:e="h1",size:t,children:n,...r},i)=>an.jsx(yr,{...r,as:e,ref:i,className:hn(Hn({className:"heading",propValue:t}),r?.className),children:n})),gr=Tn(({as:e="p",size:t,highlighted:n,children:r,...i},o)=>an.jsx(yr,{as:n?"span":e,bg:n?"sponsoring":i.bg,p:n?"xxs":i.p,color:n?"grey-800":i.color,...i,ref:o,className:hn(Hn({className:"text",propValue:t}),{"text-highlighted":n},i?.className),children:r})),yr=Tn(({as:e="p",children:t,...n},r)=>t&&t.toString().length||n?.dangerouslySetInnerHTML?an.jsx($n,{...Gn({props:n,systemPropNames:Object.keys(In)}),as:e,ref:r,className:hn(Jn(n),n?.className),children:t}):null),vr=({cover:e,description:t,title:n,link:r,closeButton:i,...o})=>an.jsx(Xn,{...o,className:hn("c-info-banner","c-info-banner--alert",o?.className),alignItems:"center",justifyContent:"center",gap:"s",color:"white",bg:"red",p:"s",children:an.jsxs(Xn,{className:"c-info-banner__container",gap:"s",alignItems:"start",children:[e&&an.jsx(Xn,{as:"a",className:"c-info-banner__visual",...r||{},children:an.jsx(Fn,{src:e,defaultFormat:"130x82",formats:["130x82"],sizes:"130px",alt:n,className:"c-info-banner__cover"})}),an.jsxs(Xn,{className:"c-info-banner__content",direction:"column",justifyContent:{xs:"between"},children:[an.jsx(gr,{className:"c-info-banner__title",color:"red",bg:"white",px:"xxs-2",mb:"xxs-2",size:"s",weight:"bold",children:n}),an.jsx(gr,{as:r?"a":void 0,size:"s",color:"white",...r||{},children:t}),i&&an.jsx(Nn,{...i,variant:"ghost",className:"c-info-banner__close",children:an.jsx(Pn,{name:"close",size:12,color:"white"})})]})]})}),Ar=({html:e,caption:t=""})=>an.jsxs("figure",{className:"c-media",children:[an.jsx("div",{className:"c-media__content c-media__content--video",dangerouslySetInnerHTML:{__html:e}}),t&&an.jsx(gr,{as:"figcaption",size:"xs",mt:"s",color:"grey-300",className:"c-media__caption",children:t})]}),br=({html:e})=>an.jsx("div",{dangerouslySetInnerHTML:{__html:e}}),wr={defaultFormat:"1444x920",formats:["1444x920","722x460","640x408","320x204"],sizes:"(min-width: 722px) 722px, 100vw"},xr={defaultFormat:"1444x920",formats:["1444x920","722x460","640x408","320x204"],sizes:"100vw"},_r=({type:e=cr.photo,src:t,caption:n,source:r,credits:i,layout:o=lr.MOBILE,imgProps:a,imagesNumber:s,videoIs16by9:l=!1,isGallery:c=!1,...u})=>{let d=xr;return o===lr.DESKTOP&&(d=wr),an.jsxs($n,{...u,as:"figure",className:"c-media",children:[e===cr.photo&&an.jsxs("div",{className:"c-media__content",children:[an.jsx(Fn,{...a,src:t,defaultFormat:a?.defaultFormat||d.defaultFormat,formats:a?.formats||d.formats,sizes:a?.sizes||d.sizes,alt:n,fetchPriority:a?.fetchPriority||"auto",lazyLoad:a?.lazyLoad||!0}),c&&s&&s>=2&&an.jsx(Nn,{color:"tertiary",size:"large",iconProps:{name:"diaporama-outlined",size:21},isCentered:!0,counter:s,children:an.jsx(gr,{as:"span",size:"m",whiteSpace:"nowrap",children:"Lancer le diaporama"})})]}),[cr.video,cr.podcast,cr.embed].includes(e)&&an.jsx("div",{className:hn("c-media__content",{[`c-media__content--${e}`]:e,"c-media__content--video-is-16-by-9":e===cr.video&&l}),dangerouslySetInnerHTML:{__html:t}}),n&&an.jsxs(gr,{className:hn({"caption-content":c}),as:"figcaption",size:"xs",mt:"s",color:"grey-400",mx:{xs:"m",md:"0"},children:[n,i&&an.jsxs(gr,{as:"span",color:"grey-300",size:"xs",className:"text-italic",children:[" - ",i]}),r&&an.jsxs(gr,{as:"span",color:"grey-300",size:"xs",className:"text-italic",children:[" / ",r]})]})]})};Tn(({icon:e,title:t,content:n,...r},i)=>an.jsxs($n,{...r,ref:i,className:hn("c-astro-topic-card",r?.className),children:[an.jsxs(Xn,{alignItems:"center",mb:"s",children:[an.jsx(Pn,{mr:"xs",name:e,size:21}),an.jsx(mr,{as:"h3",size:"xs",children:t})]}),an.jsx(gr,{size:"m",children:n})]}));const Sr=({avatars:e,maxAvatar:t=4,themeColor:n,...r})=>an.jsx(Xn,{...r,className:"c-avatar-group",children:e.slice(0,t).map(e=>an.jsx(fn,{img:e.path,alt:e.title,color:e.color??(e.path?void 0:n)},e.title))}),Er=Tn(({as:e="article",children:t,className:n,clickable:r=!1,...i},o)=>an.jsx(Xn,{...i,as:e,ref:o,justifyContent:i?.justifyContent||"between",className:hn("c-card-container",{"c-card-container--clickable":r},n),children:t})),Cr=({text:e,avatarAlt:t,avatarUrl:n,secondaryText:r,bg:i,externalLink:o,...a})=>{const s={as:"span",size:"xs",bg:i||void 0,p:i?"xxs":void 0,color:i?"grey-900":void 0},l=an.jsxs(Xn,{className:"u-relative u-relative--z-index-2 opacity-hover",as:"a",href:o,target:"_blank",gap:"xxs",children:[n&&an.jsx(fn,{variant:"xsmall",img:n,alt:t}),an.jsx(gr,{...s,mt:"xxs-2",children:e})]});return an.jsxs(Xn,{...a,justifyContent:"between",alignItems:"center",gap:"s",children:[o?l:an.jsx(gr,{...s,children:e}),r&&an.jsx(gr,{as:"span",size:"xxs-3",color:"grey-300",textTransform:"uppercase",children:r})]})},kr=({headline:e,liveTime:t,rightSubheader:n,location:r,...i})=>{const o=an.jsx(zn,{color:e.color||"grey-400",isUppercase:e.isUppercase,size:"xs",...!r&&!t&&!n&&i,children:e.text}),a=t||n?an.jsxs(Xn,{...!r&&i,alignItems:"center",gap:"xxs-2",color:"grey-400",children:[t&&an.jsxs(an.Fragment,{children:[an.jsx(gr,{as:"span",size:"xs",color:"red",weight:"bold",children:t}),an.jsx(Rn,{size:"xs",color:"red"})]}),o,n&&an.jsxs(an.Fragment,{children:[an.jsx(Rn,{size:"xs",color:e.color||"grey-400"}),an.jsx(gr,{as:"time",size:"xs",color:n.color,children:n.text})]})]}):o;return r?an.jsxs(Xn,{...i,direction:"column",children:[a,an.jsxs(Xn,{color:"ultramarine",mt:"xxs-2",children:[an.jsx(Pn,{name:"local",size:13,mr:"xxs-2"}),an.jsx(gr,{size:"xxs",weight:"bold",textTransform:"uppercase",children:r})]})]}):a},Ir=({iconProps:e,iconSize:t,iconColor:n,iconBackground:r,count:i,countColor:o,countBg:a,countSize:s,countStyle:l="rounded",label:c,ariaLabel:u,anchor:d,link:h,isClickable:p=!0,isHighlighted:f=!1,isInToolbar:m=!1,children:g,variant:y,...v})=>{const A=()=>{if(e?.size)return e.size;if(void 0!==t){if("string"==typeof t)switch(t){case"small":return 10;case"medium":return 15;default:return 20}return t}return y&&"secondary"===y?15:20},b=()=>{const c=an.jsx(Xn,{as:"span",className:hn("c-icon-item__icon",{"c-icon-item__icon--in-toolbar":m,[`c-icon-item__icon--${t}`]:t}),alignItems:"center",justifyContent:"center",bg:void 0!==r?"none"===r?void 0:r:y&&"secondary"===y?"grey-100":void 0,color:n,children:an.jsx(Pn,{size:A(),...e})});return void 0!==i?an.jsxs(Xn,{className:"c-icon-item",alignItems:"center",children:[c,an.jsx(gr,{as:"span",size:"small"===s?"xxs-2":y&&"secondary"===y?"xxs":"xxs-2",color:o||(y&&"secondary"===y?"black":"white"),bg:a||(y&&"secondary"===y?void 0:"default"),ml:"inline"===l&&"none"!==r?"xxs-2":void 0,className:hn("c-icon-item__count",{[`c-icon-item__count--${l}`]:l,[`c-icon-item__count--${s}`]:s}),children:0===i?"0":i})]}):c};return an.jsxs(Xn,{...v,inline:!0,direction:"column",alignItems:"center",className:hn("c-icon-item__container",{"c-icon-item__container--is-clickable":p},{"c-icon-item__container--is-highlighted":f},{"c-icon-item__container--has-children":g},v?.className),"aria-label":u,children:[d||h?an.jsx("a",{href:d?`#${d}`:h,children:b()}):b(),an.jsx(gr,{size:"xxs-2",children:c}),g]})},Dr=e=>{switch(e){case"small":return 20;case"medium":return 28;default:return 40}},Tr=({cover:e,id:t,defaultFormat:n,formats:r,sizes:i,alt:o,caption:a,lazyLoad:s=!1,fetchPriority:l="auto",withShadow:c=!1,isFavorite:u,enableHD:d=!1,dataId:h="",hasFlag:p=!1,title:f,className:m,radius:g,...y})=>{const v=an.jsx(Fn,{...t?{id:t}:{},src:e,defaultFormat:n,formats:r,sizes:i,alt:o,lazyLoad:s,fetchPriority:l,radius:g,enableHD:d});return an.jsx($n,{...y,className:hn("c-card-img",m),children:an.jsxs("div",{className:hn("c-card-img__inner",{"c-card-img__inner--with-shadow":c||!!a||p,"c-card-img__inner--with-interaction":void 0!==u}),children:[a&&an.jsxs(Xn,{color:"white",alignItems:"center",gap:"small"===a.size?"xxs-2":"xxs",className:hn("c-card-img__caption",{[`c-card-img__caption--${a.size||"big"}`]:!0}),children:[an.jsx(Pn,{name:a.iconName,size:Dr(a.size||"big")}),an.jsx(gr,{size:"small"===a.size?"xxs-2":"xxs",weight:"bold",children:a.text})]}),f&&an.jsx(gr,{size:"xxl",weight:"bold",color:"white",className:"c-card-img__title",children:f}),void 0!==u&&an.jsx(Ir,{className:"c-card-img__favorite",variant:"secondary",iconProps:{size:20,name:u?"star":"star-outlined"},color:"grey-500","data-event-name":"mbrs-game-save-favorite",...h?{"data-id":h}:{}}),v,p&&an.jsx("span",{className:hn("c-card-img__flag",{"c-card-img__flag--has-radius":"0"!==g})})]})})},Nr=e=>{switch(e){case"alert":return{label:"alerte info",color:"red"};case"live":return{label:"live",color:"red"};case"info":return{label:"info en série",color:"ultramarine"};case"with-you":return{label:"avec vous",color:"entertainment"};case"magazine":return{label:"magazine",color:"publishing"};default:return{label:"exclusif",color:"ultramarine"}}},Lr=({cartridge:e,cartridgeIsCentered:t,maxRows:n,as:r,href:i,hrefTarget:o,size:a,fontFamily:s,weight:l,children:c,...u})=>an.jsx($n,{pb:"xxs-3",...u,className:hn("c-card-title",{"c-card-title--has-max-rows":n,[`c-card-title--has-${n}-rows`]:n},u?.className),children:an.jsxs(mr,{as:r||"h1",...i&&{as:"a",href:i},...o&&{target:o},size:a||"m",fontFamily:s||"source-serif-pro",weight:l||"semi-bold",children:[e&&an.jsx(zn,{bg:Nr(e).color,color:"white",hasDot:"live"===e||!1,mr:"xxs",textProps:{fontFamily:"base"},className:hn("c-card-title__cartridge-heading",{"c-card-title__cartridge-heading--is-centered":t}),children:Nr(e).label}),c]})}),Br=({link:e,title:t,summaryProps:n,cardHeaderProps:r,cardTitleProps:i,cardImageProps:o,layout:a,signatureProps:s,socialBarProps:l,follows3ColumnsGrid:c=!1,mediaSrc:u,linkProps:d,...h})=>{const{cardFooterProps:p,...f}=h,m=["722x460","640x408","320x204"];return an.jsx(Er,{...f,className:hn("c-card-extra-large",f.className),direction:"column",clickable:!0,children:a===lr.DESKTOP?an.jsxs(Xn,{gap:c?"s":"xl",className:hn({"o-lt-show":!c,"o-columns-by-3":c}),children:[o||u?an.jsx($n,{className:hn({"o-lt-show__main":!c,"o-columns-by-3__first-2-columns":c}),children:o&&an.jsx(Tr,{...o,formats:m,defaultFormat:"722x460",sizes:"(min-width: 1024px) 722px, (min-width: 480px) 640px, 320px",alt:t})||u&&an.jsx(_r,{type:cr.video,src:u,videoIs16by9:!0})}):null,an.jsxs(Xn,{direction:"column",justifyContent:"between",pl:c?"s":"0",className:hn({"o-lt-show__aside":!c,"o-columns-by-3__last-1-column":c}),children:[an.jsxs(Xn,{direction:"column",flexGrow:1,children:[r&&an.jsx(kr,{...r,rightSubheader:void 0,mb:"xxs-2"}),an.jsx(Lr,{as:"h2",size:"l",weight:"bold",cartridgeIsCentered:!0,...i,children:an.jsx("a",{href:e,children:t})}),n&&an.jsx(gr,{...n,size:"xl",fontFamily:"source-serif-pro",color:n.color||"grey-600",mt:"xs",children:n.children})]}),l&&an.jsx(Ei,{...l,variant:"card",mt:"s",className:"u-relative u-relative--z-index-2"})]})]}):an.jsxs(an.Fragment,{children:[an.jsxs("div",{children:[r&&an.jsx(kr,{...r,rightSubheader:void 0,mx:"m",mb:"xxs-2"}),an.jsx(Lr,{as:"h2",weight:"bold",...i,mx:"m",children:an.jsx("a",{href:e,children:t})}),o&&an.jsx(Tr,{...o,formats:m,defaultFormat:"640x408",alt:t,mt:"xs",radius:"0"}),s&&an.jsx(yi,{...s,mx:"m",mt:"xs",className:"u-relative u-relative--z-index-2"}),n&&an.jsx($n,{as:"p",color:n.color||"grey-600",className:"c-card-extra-large__summary",mx:"m",mt:"xs",children:n.children})]}),l&&an.jsx(Ei,{...l,variant:"card",mt:"s",mx:"m",className:"u-relative u-relative--z-index-2"}),d&&!l&&an.jsx(Xn,{mt:"s",justifyContent:"center",children:an.jsx(nr,{buttonColor:"primary",...d})})]})})},Pr=({link:e,title:t,cardHeaderProps:n,cardTitleProps:r,cardImageProps:i,cardFooterProps:o,layout:a,socialBarProps:s,reverseCard:l,...c})=>{const{summaryProps:u,signatureProps:d,...h}=c;return an.jsxs(Er,{...h,p:c?.bg?"s":void 0,direction:"column",className:hn("c-card-extra-small",c?.className),justifyContent:"start",clickable:!0,children:[n&&an.jsx(kr,{...n,mb:"xxs-2"}),an.jsxs(Xn,{justifyContent:l?"end":"between",gap:"xs",direction:l?"row-reverse":"row",children:[an.jsx(Lr,{as:"h4",fontFamily:"source-serif-pro",weight:"semi-bold",maxRows:5,size:"xxs-2",pb:void 0,cartridgeIsCentered:!0,...r,children:an.jsx("a",{href:e,children:t})}),i&&an.jsx(Tr,{...i,...i.caption&&{caption:{size:"small",...i.caption}},defaultFormat:a===lr.DESKTOP?"130x82":"260x164",formats:["260x164","130x82"],sizes:a===lr.DESKTOP?"130px":"260px",alt:t,className:"c-card-extra-small__img"})]}),o&&an.jsx(Cr,{...o,mt:"xs"}),s&&an.jsx(Ei,{...s,variant:"card",mt:"xs",className:"u-relative u-relative--z-index-2"})]})},Or=({link:e,title:t,layout:n,summaryProps:r,cardHeaderProps:i,cardTitleProps:o,cardImageProps:a,socialBarProps:s,mediaSrc:l,...c})=>{const{cardFooterProps:u,signatureProps:d,...h}=c;return an.jsx(Er,{...h,className:"c-card-large",direction:"column",children:n===lr.DESKTOP?an.jsxs("a",{href:e,children:[a&&an.jsx(Tr,{...a,defaultFormat:"722x460",formats:["722x460","320x204"],alt:t}),an.jsxs($n,{className:hn("c-card-large__summary",{"c-card-large__summary--has-flag":a?.hasFlag}),color:"white",children:[i&&an.jsx(zn,{size:"xs",children:i.headline.text}),an.jsx(Lr,{size:"l",weight:"bold",cartridgeIsCentered:!0,...o,children:t}),r&&an.jsx(gr,{...r,as:"span",size:"l",fontFamily:"source-serif-pro",children:r.children})]})]}):an.jsxs(an.Fragment,{children:[an.jsxs("a",{href:e,children:[a&&an.jsx(Tr,{...a,defaultFormat:"722x460",formats:["722x460","320x204"],alt:t,mb:"xs",radius:"0"})||l&&an.jsx(_r,{type:cr.video,src:l,videoIs16by9:!0,mb:"xs"})||null,i&&an.jsx(zn,{color:i.headline.color||"grey-400",size:"xs",mx:"m",mb:"xxs",children:i.headline.text}),an.jsx(Lr,{mx:"m",weight:"bold",...o,children:t}),l&&r&&an.jsx(gr,{...r,size:"m",mx:"m",fontFamily:"source-serif-pro",color:r.color||"grey-600",mt:"xs",children:r.children})]}),s&&an.jsx(Ei,{...s,variant:"card",mx:"m",mt:"s",className:"u-relative u-relative--z-index-2"})]})})},Mr=({link:e,title:t,cardHeaderProps:n,cardTitleProps:r,cardImageProps:i,socialBarProps:o,cardFooterProps:a,bg:s,radius:l,...c})=>{const{summaryProps:u,signatureProps:d,...h}=c;return an.jsxs(Er,{...h,direction:"column",bg:s,radius:s?l||"xxs":void 0,clickable:!0,children:[i&&an.jsx(Tr,{...i,formats:["480x308","346x222"],defaultFormat:"480x308",alt:t,mb:"xs",className:s?"c-card-img--with-bg":void 0}),n&&an.jsx(kr,{...n,...s&&{color:"grey-500",px:"s"},mb:"xxs-2"}),an.jsx(Lr,{as:"h3",maxRows:3,fontFamily:"source-serif-pro",weight:"semi-bold",size:"xs",cartridgeIsCentered:!0,...s&&{color:"grey-900",px:"s"},...r,className:hn("c-card-medium__title",r?.className),children:an.jsx("a",{href:e,children:t})}),a&&an.jsx(Cr,{...a,mt:"l",p:s?"s":void 0,bg:a?.bg||s}),o&&an.jsx(Ei,{mt:"xs",...o,variant:"card",className:"u-relative u-relative--z-index-2"})]})},jr=(e,t="fr-FR")=>Intl.NumberFormat(t).format(e),Fr=({link:e,title:t,cardHeaderProps:n,cardTitleProps:r,cardImageProps:i,cardNumber:o,layout:a,summaryProps:s,commentCount:l,variant:c,shareCount:u,viewCount:d,...h})=>{const{cardFooterProps:p,signatureProps:f,socialBarProps:m,...g}=h;return an.jsxs(Er,{...g,clickable:!0,className:hn("c-card-most",{[`c-card-most--${c}`]:c}),justifyContent:"start",children:[an.jsx(gr,{as:"span",color:"ultramarine",weight:"semi-bold",className:hn("c-card-most__card-number",{[`c-card-most__card-number--${o.size||"default"}-size`]:!0}),mr:"small"===c?"xs":"m",children:o.value}),an.jsxs($n,{className:"c-card-most__content",children:[n&&an.jsx(kr,{mb:"xxs-2",...n}),an.jsx(Lr,{as:"h3",size:{xs:"xxs-2",md:"small"===c?"xxs-3":"xs"},fontFamily:"source-serif-pro",weight:"semi-bold",cartridgeIsCentered:!0,...r,children:an.jsx("a",{href:e,children:t})}),s&&an.jsx(gr,{color:"grey-600",fontFamily:"source-serif-pro",size:"m",mt:"xs",...s,children:s.children}),i?.cover&&a===lr.MOBILE&&an.jsx(Tr,{...i,...i.caption&&{caption:{size:"medium",...i.caption}},defaultFormat:"297x204",enableHD:!0,alt:t,mt:"xs",className:"c-card-most__img"}),!!l&&an.jsxs(Xn,{gap:"xs",alignItems:"center",mt:"xs",children:[an.jsx(Pn,{size:22,name:"comment"}),an.jsx(gr,{size:"m",weight:"bold",children:jr(l)})]}),!!u&&an.jsxs(Xn,{gap:"xs",alignItems:"center",mt:"xs",children:[an.jsx(Pn,{size:22,name:"share"}),an.jsx(gr,{size:"m",weight:"bold",children:jr(u)})]}),!!d&&an.jsxs(Xn,{gap:"xs",alignItems:"center",mt:"xs",children:[an.jsx(Pn,{size:22,name:"view"}),an.jsx(gr,{size:"m",weight:"bold",children:jr(d)})]})]}),i?.cover&&a===lr.DESKTOP&&an.jsx(Tr,{...i,...i.caption&&{caption:{size:"small",...i.caption}},className:"c-card-most__img",defaultFormat:"small"===c?"72x46":"150x95",enableHD:!0,alt:t,ml:"small"===c?"xs":"m"})]})},Rr=({title:e,summary:t,cardTitleProps:n,cardImageProps:r,link:i,layout:o,directedBy:a,castings:s,genres:l,releaseDate:c,seeMoreLink:u,reviewLink:d,rating:h,containerSpacing:p,...f})=>{const m=an.jsxs(an.Fragment,{children:[d&&an.jsx(nr,{buttonColor:"primary",...d}),an.jsx(nr,{buttonColor:"primary",variant:"outlined",...u})]}),g=a||s||h?an.jsx(Xn,{alignContent:"end",mt:"l",children:an.jsxs(Xn,{gap:"xxs-2",direction:"column",flexGrow:1,bg:"grey-100",px:"s",py:"xs",children:[a&&an.jsxs("div",{children:[an.jsxs(gr,{as:"span",weight:"bold",children:["Réalisé par :"," "]}),an.jsx("span",{children:a})]}),(s??[]).length>0&&an.jsxs("div",{children:[an.jsxs(gr,{as:"span",weight:"bold",children:["Avec :"," "]}),an.jsx("span",{children:s?.join(", ")})]}),h&&an.jsxs(Xn,{alignItems:"center",gap:"xxs",children:[an.jsxs(gr,{as:"span",weight:"bold",children:["La note 20 Minutes :"," "]}),an.jsx(or,{rating:h,iconProps:{size:19}})]})]})}):null;return an.jsxs(Er,{...f,className:"c-card-movie",direction:"column",children:[an.jsxs(Xn,{direction:"row",gap:{xs:"m",md:"l"},...p,children:[an.jsxs("div",{className:"c-card-movie__side",children:[r&&an.jsx(Tr,{...r,radius:"xs",alt:e,defaultFormat:"200x271",formats:["200x271","400x542"],sizes:"200px"}),o===lr.DESKTOP&&an.jsx(Xn,{direction:"column",gap:"xs",mt:"xs",children:m})]}),an.jsxs(Xn,{direction:"column",justifyContent:"between",className:"c-card-movie__content",children:[an.jsxs(Xn,{direction:"column",flexGrow:1,children:[an.jsx(Lr,{as:"h2",size:"s",fontFamily:"source-serif-pro",weight:"bold",...n,children:an.jsx("a",{href:i,children:e})}),an.jsxs(gr,{mt:"xxs-2",size:"s",children:[an.jsxs(gr,{as:"span",weight:"bold",children:["Sortie :"," "]}),an.jsx("span",{children:c}),l&&l.length>0&&an.jsxs(an.Fragment,{children:[" ",an.jsx(Rn,{size:"xs"})," ",an.jsxs(gr,{as:"span",weight:"bold",children:["Genre :"," "]}),an.jsx("span",{children:l.join(", ")})]})]}),o===lr.DESKTOP&&t&&an.jsx(gr,{size:"m",mt:"xs",dangerouslySetInnerHTML:{__html:t}})]}),o===lr.DESKTOP&&g]})]}),o===lr.MOBILE&&t&&an.jsx(gr,{...p,size:"m",mt:"xs",dangerouslySetInnerHTML:{__html:t}}),o===lr.MOBILE&&an.jsxs(an.Fragment,{children:[g,an.jsx(Xn,{direction:"column",gap:"xs",mt:"l",mx:"auto",className:"c-card-movie__footer",children:m})]})]})},qr=({link:e,title:t,summaryProps:n,cardHeaderProps:r,cardTitleProps:i,cardImageProps:o,linkProps:a,...s})=>an.jsxs(Er,{...s,direction:"row",clickable:!0,gap:"xl",className:hn("o-lt-show",s.className),children:[an.jsx($n,{className:hn("o-lt-show__main"),children:o&&an.jsx(Tr,{...o,formats:["480x308","346x222"],defaultFormat:"480x308",sizes:"(min-width: 1024px) 480px, (min-width: 480px) 346px",alt:t})}),an.jsxs(Xn,{direction:"column",justifyContent:"between",className:hn("o-lt-show__aside"),children:[an.jsxs(Xn,{direction:"column",children:[r&&an.jsx(kr,{...r,rightSubheader:void 0,mb:"xxs-2"}),an.jsx(Lr,{as:"h2",size:"m",pb:"xxs",weight:"bold",cartridgeIsCentered:!0,...i,children:an.jsx("a",{href:e,children:t})}),an.jsx(gr,{size:"xl",fontFamily:"source-serif-pro",color:n?.color||"grey-600",...n,children:n?.children})]}),an.jsx(Xn,{mt:"s",children:an.jsx(nr,{buttonColor:"primary",...a})})]})]}),zr=({className:e,...t})=>an.jsx($n,{className:hn("c-card-skeleton__block",e),bg:"grey-200",...t}),Hr=e=>an.jsxs(Er,{...e,direction:"column",gap:"xxs",children:[an.jsx(zr,{className:"c-card-skeleton__block--image"}),an.jsx(zr,{className:"c-card-skeleton__block--meta"}),an.jsx(zr,{className:"c-card-skeleton__block--title"}),an.jsx(zr,{className:"c-card-skeleton__block--subtitle"})]}),Kr=e=>an.jsx(Er,{...e,direction:"column",className:hn("c-card-skeleton",e.className),children:an.jsxs(Xn,{gap:"xs",children:[an.jsxs(Xn,{direction:"column",gap:"xxs",flexGrow:1,children:[an.jsx(zr,{className:"c-card-skeleton__block--meta"}),an.jsx(zr,{className:"c-card-skeleton__block--title"}),an.jsx(zr,{className:"c-card-skeleton__block--subtitle"})]}),an.jsx(zr,{className:"c-card-skeleton__block--image"})]})}),Ur=({variant:e,className:t,...n})=>{const r=hn("c-card-skeleton",{[`c-card-skeleton--${e}`]:e},t);return"medium"===e?an.jsx(Hr,{...n,className:r}):an.jsx(Kr,{...n,className:r})},Vr=({link:e,title:t,cardHeaderProps:n,cardTitleProps:r,cardImageProps:i,summaryProps:o,layout:a,variant:s="default",...l})=>{const{cardFooterProps:c,signatureProps:u,socialBarProps:d,...h}=l,p=an.jsxs(an.Fragment,{children:[i&&an.jsx(Tr,{sizes:"(min-width: 480px) 252px, 160px",defaultFormat:a===lr.DESKTOP?"252x162":"160x102",formats:["252x162","160x102"],alt:t,mb:"title-on-image"===s?"0":"xxs",withShadow:"title-on-image"===s,...i,...i.caption&&{caption:{size:a===lr.DESKTOP?"medium":"small",...i.caption}}}),n&&an.jsx(kr,{mb:"xxs-2",...n}),an.jsx(Lr,{as:"h4",className:hn("c-card-small__title",{"c-card-small__title--is-on-image":"title-on-image"===s}),size:"xxs-2",fontFamily:"source-serif-pro",cartridgeIsCentered:!0,...r,children:"title-on-image"===s?t:an.jsx("a",{href:e,children:t})}),o&&an.jsx(gr,{...o,size:{xs:"s",md:"m"},mt:"xxs-3",className:"c-card-small__summary",children:o.children})]});return an.jsx(Er,{...h,direction:"column",clickable:!0,children:"title-on-image"===s?an.jsx("a",{href:e,children:p}):p})},Qr=({link:e,title:t,cardImageProps:n,...r})=>an.jsx($n,{...r,as:"a",href:e,className:hn("c-card-container","c-card-container--with-opacity-hover","c-card-container--clickable"),children:n&&an.jsx(Tr,{...n,defaultFormat:"196x234",formats:["196x234"],radius:"xxs",title:t,alt:t})}),Wr=({link:e,title:t,cardImageProps:n,layout:r,...i})=>an.jsx($n,{...i,as:"a",href:e,className:hn("c-card-container","c-card-container--with-opacity-hover","c-card-container--clickable"),children:n&&an.jsx(Tr,{sizes:"(min-width: 480px) 183px, 223px",...n,defaultFormat:r===lr.DESKTOP?"183x215":"223x262",formats:["183x215","223x262"],alt:t})}),Gr=({title:e,summaryProps:t,cardTitleProps:n,link:r,linkProps:i,location:o,...a})=>an.jsxs(Er,{...a,direction:{xs:"column",md:"row"},gap:"l",alignItems:{xs:"baseline",md:"center"},children:[an.jsxs(er,{grow:1,children:[o&&an.jsxs(Xn,{color:"ultramarine",children:[an.jsx(Pn,{name:"local",size:13,mr:"xxs-2",mb:"xxs-2"}),an.jsx(gr,{size:"xxs",weight:"bold",textTransform:"uppercase",children:o})]}),e&&an.jsx(Lr,{size:"xxs-2",fontFamily:"base",...n,children:e}),t&&an.jsx(gr,{...t,as:"span",color:"grey-400",size:"m",children:t.children})]}),an.jsx(nr,{...i,buttonColor:"primary",href:r,whiteSpace:"nowrap",children:i.children})]}),Zr=({link:e,title:t,summaryProps:n,cardHeaderProps:r,cardTitleProps:i,cardImageProps:o,socialBarProps:a,layout:s,...l})=>{const{cardFooterProps:c,signatureProps:u,...d}=l;return an.jsxs(Er,{...d,direction:"column",className:"c-card-with-summary",clickable:!0,children:[an.jsxs(Xn,{mb:"xs",className:"c-card-with-summary__content",gap:"xs",children:[an.jsxs(er,{grow:1,children:[r&&an.jsx(kr,{...r,mb:"xxs-2"}),an.jsx(Lr,{size:{xs:"xxs-2",md:"xs"},fontFamily:"source-serif-pro",cartridgeIsCentered:!0,...i,children:an.jsx("a",{href:e,children:t})}),s===lr.DESKTOP&&n&&an.jsx(gr,{...n,as:"span",size:"m",fontFamily:"source-serif-pro",children:n.children})]}),an.jsx("div",{children:o&&an.jsx(Tr,{...o,...o.caption&&{caption:{size:"small",...o.caption}},className:"c-card-with-summary__image",defaultFormat:"150x90",alt:t,mb:"xs"})})]}),a&&an.jsx(Ei,{...a,variant:"card",className:hn("u-relative u-relative--z-index-2","c-card-with-summary__social-bar")})]})},Yr=({articles:e,layout:t,label:n,description:r,labelLink:i,iconProps:o,headingProps:a,sliderProps:s,themeColor:l,titleUnderlined:c=!0,isSponsored:u,seeMoreLink:d,...h})=>{const p=e=>{switch(s?.sliderVariant){case"videos":return an.jsx(Wr,{...e});case"vertical-cards":return an.jsx(Qr,{...e});default:return an.jsx(Vr,{...e,layout:t,...e.cardHeaderProps&&{cardHeaderProps:{...u&&{color:"grey-500"},...e.cardHeaderProps}},cardTitleProps:{weight:"semi-bold",maxRows:5,...u&&{color:"grey-900"},...e.cardTitleProps},...e.cardImageProps&&{cardImageProps:{sizes:"(min-width: 1840px) 267px, (min-width: 1440px) calc(4.74vw + 181px), (min-width: 1120px) 235px, (min-width: 780px) 20.94vw, calc(50vw - 25px)",...e.cardImageProps}}})}},f=an.jsx(gi,{label:n||"",mb:(o?"0":(!c||u)&&"m")||"xxl",labelLink:i,themeColor:l,isUnderlined:c,...u&&{color:"grey-900"},...a});return e.length>0?an.jsxs($n,{as:"section",...h,className:hn("c-carousel",h?.className),bg:u?"sponsoring":void 0,py:u?"m":void 0,children:[n&&!o&&f,n&&o&&an.jsxs(Xn,{as:"header",direction:{xs:"column-reverse",md:"row"},justifyContent:"between",alignItems:{xs:"start",md:"end"},mx:{xs:"m",md:"0"},mb:{xs:"l",md:"0"},gap:{xs:"xs",md:"0"},children:[f,an.jsx(Pn,{...o})]}),u&&an.jsx(gr,{as:$n,size:"xs",color:"grey-900",mb:"xs",children:"Articles sponsorisés"}),t===lr.DESKTOP&&r&&an.jsx(gr,{size:"m",color:"grey-400",mb:"xl",...r,className:r.className,children:r.children}),an.jsx(ur,{...s,sliderVariant:s?.sliderVariant||"rubrics",itemsGap:"videos"===s?.sliderVariant?"l":"xs",layout:t,children:e.map(t=>an.jsx(er,{as:"article",grow:0,shrink:0,align:"start",className:hn(`c-carousel__${s?.sliderVariant&&["videos","vertical-cards","sport","movies"].includes(s?.sliderVariant)?s?.sliderVariant:"article"}`,{[`c-carousel__${s?.sliderVariant&&["videos","vertical-cards","movies"].includes(s?.sliderVariant)?s?.sliderVariant:"article"}--in-long-list`]:"sport"!==s?.sliderVariant&&e.length>4,"c-carousel__sport--in-long-list":"sport"===s?.sliderVariant&&e.length>5}),children:p(t)},t.title))}),d&&an.jsx(Xn,{justifyContent:"center",mt:"xl",children:an.jsx(nr,{buttonColor:"primary",variant:"outlined",...d})})]}):null},Jr=({citationText:e,citationAuthor:t,...n})=>an.jsxs($n,{...n,as:"blockquote",color:"ultramarine",className:"c-citation",children:[an.jsxs(gr,{fontFamily:"source-serif-pro",italic:!0,size:"l",weight:"regular",className:"c-citation__content",children:[an.jsx(gr,{as:"span",size:"xxl",weight:"bold",children:"« "}),e,an.jsx(gr,{as:"span",size:"xxl",weight:"bold",children:" »"})]}),t&&an.jsx(gr,{as:"footer",mt:{xs:"m",md:"xl"},size:"m",weight:"bold",className:"c-citation__footer",children:t})]}),$r=Tn(({index:t,textTitleProps:n,headingTitleProps:r,titleIconProps:i,isOpen:o,contentWithBorder:a=!0,contentProps:s,iconProps:l,btnProps:c,children:u,isDropdown:d,...h},p)=>{const f=e.useId().replace(/:/g,""),m=`c-collapse__button-${t}-${f}`,g=`c-collapse__content-${t}-${f}`;return an.jsxs($n,{...h,className:hn("c-collapse js-collapse",{"c-collapse--dropdown":d}),ref:p,children:[an.jsxs($n,{...c,as:"button",type:"button",id:m,pl:c?.pl||"l",py:c?.py||"xxs",className:hn("c-collapse__button js-collapse__button",c?.className),"aria-controls":g,"aria-expanded":o||"false",children:[i?an.jsxs(Xn,{as:"span",alignItems:"center",children:[an.jsx(Pn,{size:34,mr:"xs",...i}),n?.children]}):(()=>{if(r){const{children:e,...t}=r;return an.jsx(gr,{as:"span",size:"m",color:"black",...t,children:e})}const{as:e,children:t,...i}=n??{};return an.jsx(gr,{as:"span",size:"l",color:"black",...i,children:t})})(),an.jsx(Pn,{name:"chevron",size:16,...l,className:hn("c-collapse__icon",l?.className)})]}),an.jsx(Xn,{...s,direction:"column",p:s?.p||"xl",id:g,"aria-hidden":o?!o:"true","aria-labelledby":m,className:hn("c-collapse__content",{"c-collapse__content--with-border":a}),children:u})]})}),Xr=({layout:e,searchFormProps:t,title:n,titleHref:r,breadcrumbProps:i,selectProps:o,variant:a,isOpen:s=!0,hasTopBorder:l=!1})=>{const c=an.jsx(Nn,{variant:"ghost",iconProps:{name:"chevron",color:"white",size:18},id:"js-search-banner-expand-button",className:"c-search-banner__expand-button"}),u=o&&an.jsx(sr,{...o,defaultValue:o?.options.find(e=>e.isSelected)?.value,containerProps:{...o?.containerProps,px:{xs:"m",md:"0"}}}),d=an.jsx(Xn,{mt:{xs:"0",md:"xs"},gap:{xs:"xs",lg:"m"},className:hn("c-search-banner__breadcrumb",{"c-search-banner__breadcrumb--mobile":e===lr.MOBILE}),"data-search-banner-collapse":!0,...e===lr.DESKTOP&&{"aria-hidden":s?!s:"true"},children:i?.map(({label:e,link:t},n)=>an.jsx(fr,{variant:"tertiary",py:"xxs-2",px:"l",ml:0===n?{xs:"m",md:"0"}:void 0,href:t,children:e},t))}),h=!u;return an.jsx($n,{bg:"ultramarine",py:{xs:"xxs",md:"0"},className:hn("c-search-banner",{"c-search-banner--has-top-border":l}),children:e===lr.DESKTOP?an.jsxs(Xn,{px:h?void 0:"m",gap:{xs:"m",lg:"l"},"aria-expanded":s||"false","data-search-banner-expanded-source":!0,className:hn({"o-page-wrap":h,"c-search-banner__large-container":!h}),pt:h?"0":void 0,children:["municipales-2026"===a?an.jsx("div",{className:hn("c-search-banner__name",{"c-search-banner__name--is-hidden-under-xl":u}),children:an.jsxs(gr,{as:r?"a":"span",weight:"bold",className:"u-relative",...r?{href:r}:{},children:["Élections municipales"," ",an.jsx(gr,{as:"span",weight:"regular",children:"2026"}),an.jsx("span",{className:"c-search-banner__flag"})]})}):an.jsx(Pn,{name:"ballot-box",size:55,className:"c-search-banner__default-icon"}),an.jsxs(Xn,{flexGrow:1,direction:"column",py:"m",children:[an.jsxs(Xn,{gap:{xs:"m",lg:"l"},justifyContent:"end",children:[an.jsx(er,{grow:1,children:an.jsx($n,{as:mi,...t})}),!!o?.options.length&&u,!!i?.length&&c]}),!!i?.length&&d]}),"municipales-2026"===a&&u&&an.jsx("span",{className:"c-search-banner__flag c-search-banner__flag--at-the-bottom"})]}):an.jsxs(Xn,{justifyContent:"center",direction:"column","aria-expanded":s||"false","data-search-banner-expanded-source":!0,children:[n&&an.jsx(gr,{as:"span",px:"m",weight:"bold",color:"white",mb:"xxs",children:r?an.jsx("a",{href:r,children:n}):n}),an.jsxs(Xn,{gap:"s",px:{xs:"m",md:"0"},children:[an.jsx(er,{as:mi,grow:1,...t}),!(!i?.length&&!o?.options.length)&&c]}),!(!i?.length&&!o?.options.length)&&an.jsxs(Xn,{direction:"column",gap:"xxs",mt:"xxs","aria-hidden":s?!s:"true","data-search-banner-collapse":!0,children:[!!i?.length&&d,!!o?.options.length&&u]}),"municipales-2026"===a&&an.jsx("span",{className:"c-search-banner__flag c-search-banner__flag--at-the-bottom"})]})})},ei=({label:e,heading:t,source:n,subtitle:r,isExpandable:i=!1,contentProps:o,embedButton:a,...s})=>{const l=an.jsx(gr,{color:"grey-400",size:"xs",mt:a?void 0:"xxs",mx:a?void 0:{xs:"m",md:"0"},children:n});return an.jsxs($n,{as:"header",...s,className:hn("c-nodeheader",{"c-nodeheader--is-expandable":i},s?.className),children:[an.jsx(zn,{color:"grey-400",size:"xs",mx:{xs:"m",md:"0"},children:e}),an.jsx(mr,{...t,size:{xs:"xxs",md:"m"},fontFamily:"obviously",mx:{xs:"m",md:"0"},children:t.children}),n&&(a?an.jsxs(Xn,{alignItems:"center",mt:"xxs",mx:{xs:"m",md:"0"},children:[l,an.jsx(On,{...a,variant:"ghost",iconProps:{name:"embed",size:20,color:"grey-200"},size:"tiny",ml:"xs"})]}):l),r&&an.jsxs(an.Fragment,{children:[an.jsx(gr,{...o,as:"div",size:o?.size||{xs:"m",md:"l"},mx:{xs:"m",md:"0"},mt:"xs",className:"c-nodeheader__subtitle c-content c-content--resume js-expand-target","aria-hidden":i,children:r}),i&&an.jsxs(Nn,{variant:"ghost",className:"c-nodeheader__btn js-expand-button","aria-expanded":"false",mt:"xs",mx:{xs:"m",md:"0"},children:[an.jsx(Pn,{isRounded:!0,name:"chevron",size:12,p:"xs",bg:"grey-100"}),an.jsx(gr,{as:"span",size:"xs",className:"js-expand-button__label",children:"Voir plus"})]})]})]})},ti=({children:e,iconProps:t,isCentered:n,sponsor:r,...i})=>an.jsx(mr,{className:hn("c-header-title",{"c-header-title--has-icon":t||r,"c-header-title--has-icon-and-centered":(t||r)&&n}),fontFamily:"obviously",size:{xs:"l",md:"xxl"},...i,children:t||r?an.jsxs(an.Fragment,{children:[t&&an.jsx(Pn,{className:"c-header-title__icon",mr:"xxs",...t}),r&&an.jsx($n,{as:"img",className:"c-header-title__sponsor",mr:"xxs",src:r.logoUrl,alt:r.name}),an.jsx("span",{className:"c-header-title__text-with-icon",children:e})]}):e}),ni=({items:e,...t})=>{const n=e=>an.jsx(gr,{size:"xs",weight:"bold",mb:"xs",children:e});return an.jsx(tr,{as:"ul",...t,colsNumber:{xs:1,md:3},className:"c-legend",children:e.map((e,t)=>an.jsxs(Xn,{as:"li","data-color":e.color,gap:"s",pr:{xs:void 0,md:t%3!=2?"m":void 0},pt:{xs:t>0?"m":void 0,md:t>2?"m":"0"},className:"c-legend__item",children:[an.jsx(Pn,{name:"dot",size:12,mt:"xxs-3",className:hn("c-legend__dot",{[`c-legend__dot--${e.color}`]:e.color})}),e.subLegend?an.jsxs("div",{children:[n(e.name.toUpperCase()),an.jsx(gr,{color:"grey-400",weight:"bold",children:e.subLegend})]}):n(e.name.toUpperCase())]},e.name))})},ri=({variant:e,isOver:t=!1,updatedAt:n,timeSlot:r,...i})=>"elections"===e&&t?null:an.jsxs(Xn,{...i,alignItems:"center",className:"c-live-indicator",children:[an.jsx(zn,{bg:"red",color:"white",hasDot:"elections"!==e,mr:"s",size:{xs:"xxs",md:"xs"},children:("elections"===e?"estimations":"tv"===e&&"en direct")||"live"}),an.jsx(Pn,{name:"clock",size:15,color:"tv"===e&&(r?.color||"grey-500")||"live"===e&&t&&"grey-300"||"red",mr:"xxs",className:hn("c-live-indicator__icon",{"c-live-indicator__text--over":t})}),an.jsx(gr,{size:"xs",color:r&&(r.color||"grey-500")||t&&"grey-300"||"red",className:hn("c-live-indicator__text",{"c-live-indicator__text--over":t}),children:r?.children||t&&"Terminé"||`Mis à jour ${n}`})]}),ii=({question:e,author:t,response:n,...r})=>an.jsxs($n,{...r,className:"c-live-talk",children:[an.jsxs($n,{bg:"grey-100",p:"s",mb:"xl",radius:"m",className:"c-live-talk__question",children:[an.jsx(gr,{color:"grey-600",mb:"s",fontFamily:"source-serif-pro",size:"l",dangerouslySetInnerHTML:{__html:e}}),an.jsx(gr,{color:"black",weight:"bold",size:"xs",children:t})]}),n&&an.jsx(gr,{color:"grey-600",fontFamily:"source-serif-pro",size:"l",children:n})]}),oi=({status:e,header:t,title:n,img:r,...i})=>an.jsxs($n,{as:"header",...i,children:[an.jsxs(Xn,{gap:"xs",alignItems:"center",mb:"xs",children:[an.jsx(gr,{size:"xl",fontFamily:"source-serif-pro",weight:"semi-bold",children:t}),r&&an.jsx("img",{alt:r.name,src:r.src,width:"32",height:"32"})]}),an.jsx(mr,{as:"h2",color:{crucial:"red",important:"ultramarine",community:"entertainment",faq:"black",default:"black",bold:"black"}[e]||"black",size:"xs",fontFamily:"source-serif-pro",weight:"default"===e?"regular":"semi-bold",className:"break-word",children:n})]}),ai=({electionName:e,electionYear:t,resultsPerDepartment:n,mapDepartmentsData:r,...i})=>{const o=n.reduce((e,t)=>{const{name:n,color:r}=t.politicalParty;return e.some(e=>e.name===n)||e.push({name:n,color:r}),e},[]);return an.jsxs($n,{...i,children:[an.jsxs("svg",{className:"c-map-departments",viewBox:"0 0 525 600",width:"525",children:[an.jsx("title",{children:"Carte des départements français avec DOM"}),an.jsx("desc",{children:"Carte des résultats département par département. Cliquez sur un département pour en voir le détail"}),Object.entries(r??{}).map(([r,i])=>{const o=n.find(e=>e.numDept===r);return an.jsx("g",{children:an.jsxs("a",{className:"c-map-departments__link",href:`/elections/resultats/${i.slug}/?scrutin=${e}&annee=${t}`,target:"_parent",children:[an.jsx("path",{className:hn("c-map-departments__path",{[`c-map-departments__path--${o?.politicalParty.color}`]:o}),d:i.path,children:an.jsx("title",{children:i.title})}),i.path_s&&an.jsx("path",{className:hn("c-map-departments__path",{[`c-map-departments__path--${o?.politicalParty.color}`]:o}),d:i.path_s,children:an.jsx("title",{children:i.title})})]})},r)})]}),o.length>0&&an.jsx(ni,{items:o,mt:"xxl"})]})},si=({electionName:e,electionYear:t,resultsPerDistrict:n,mapDistrictsData:r,...i})=>{const o=["75","77","78","91","92","93","94","95"],a=Object.entries(r??{}).reduce((r,[i,a])=>{const s=an.jsx("g",{className:"c-map-districts__zoomable",type:"button",...a.text&&!a.text.transform&&a.text.label&&{"data-info":`${i} - ${a.text.label}`},children:Object.entries(a).map(([r,i])=>{const o=n.find(e=>e.numDistrict===r);return"text"===r&&i.transform?an.jsx("text",{transform:`matrix(${i.transform})`,className:"c-map-districts__text",children:i.label},r):an.jsx("a",{href:`/elections/resultats${i.url}/?scrutin=${e}&annee=${t}`,target:"_parent",children:an.jsxs("path",{id:r,className:hn("c-map-districts__path",{[`c-map-districts__path--${o?.politicalParty.color}`]:o}),d:i.path,children:[an.jsx("title",{children:i.title}),an.jsx("desc",{children:i.desc})]})},r)})},i);return o.includes(i)?r.idf.push(s):r.others.push(s),r},{idf:[],others:[]}),s=n.reduce((e,t)=>{const{name:n,color:r}=t.politicalParty;return e.some(e=>e.name===n)||e.push({name:n,color:r}),e},[]);return an.jsxs($n,{...i,children:[an.jsxs("div",{className:"c-map-districts-container",children:[an.jsxs(gr,{weight:"bold",textAlign:"center",className:"c-map-districts-container__description",children:["Cliquez sur un département",an.jsx("br",{}),"puis une circonscription pour accéder aux résultats"]}),an.jsx(fr,{variant:"span",color:"ultramarine",className:"c-map-districts-container__department u-hidden"}),an.jsx(Nn,{iconProps:{name:"close",size:15},variant:"close",className:"c-map-districts-container__unzoom-button u-hidden"}),an.jsxs("svg",{className:"c-map-districts js-selected-area",viewBox:"0 0 1400 1400",width:"1400",children:[an.jsx("title",{children:"Carte des circonsciptions"}),an.jsx("g",{type:"button",className:"c-map-districts__zoomable c-map-districts__idf",children:a.idf}),a.others]})]}),s.length>0&&an.jsx(ni,{items:s,mt:"xxl"})]})},li=({electionName:e,electionYear:t,resultsPerCountry:n,mapEuCountriesData:r,mapNonEuCountriesData:i,...o})=>{const a=n.reduce((e,t)=>{const{name:n,color:r}=t.politicalParty;return e.some(e=>e.name===n)||e.push({name:n,color:r}),e},[]);return an.jsxs($n,{...o,children:[an.jsxs("svg",{className:"c-map-europe",width:"460",viewBox:"0 0 460 445",children:[an.jsx("title",{children:`Carte de l'Europe - Élections ${e}`}),an.jsx("desc",{children:`Carte des résultats aux élections ${e} ${t} par pays`}),an.jsx("g",{className:"c-map-europe__eu-countries",children:Object.entries(r??{}).map(([e,t])=>{const r=n.find(t=>t.key===e);return an.jsx("path",{d:t.path,className:hn("c-map-europe__path",{[`c-map-europe__path--${r?.politicalParty.color}`]:r}),children:an.jsx("title",{children:t.title})},e)})}),an.jsx("g",{className:"c-map-europe__non-eu-countries",children:Object.entries(i??{}).map(([e,t])=>an.jsx("path",{d:t.path,className:"c-map-europe__path c-map-europe__path--non-eu-country",children:an.jsx("title",{children:t.title})},e))})]}),a.length>0&&an.jsx(ni,{items:a,mt:"xxl"})]})},ci=/<path\b([^>]*?)\/>/g,ui=/\b([:\w-]+)="([^"]*)"/g,di=e=>`/elections/resultats/${(e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/'/g,"-").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase())(e)}/`,hi=({layout:t,resultsPerTown:n,departmentsPaths:r,dromsConfig:i,townsSprite:o,className:a,...s})=>{if(!r)return an.jsx("output",{"aria-live":"polite",children:"Chargement de la carte…"});const l=t===lr.MOBILE,c=new Map(n.map(e=>[e.id,e])),u=new Map,d=e.useMemo(()=>o?(e=>new Map(e.map(e=>[e.id,e])))((e=>{const t=[];for(const n of e.matchAll(ci)){const e=n[1];if(!e)continue;const r=new Map;for(const t of e.matchAll(ui)){const[,e,n]=t;e&&r.set(e,n||"")}const i=r.get("id"),o=r.get("d"),a=r.get("data-name"),s=r.get("data-url");!i||!o||!a||!s||t.push({id:i,path:o,name:a,url:s})}return t})(o)):new Map,[o]),h=e.useMemo(()=>new Map(vn.map(e=>{const t=d.get(`town-${e.id}`);return t?[e.name,t.url]:null}).filter(e=>null!==e)),[d]);n.forEach(e=>{const{name:t,color:n}=e.politicalParty;u.has(t)||u.set(t,{name:t,color:n})});const p=e=>{const t=h.get(e.label);return an.jsxs("div",{className:"c-map-towns__zoom-item",role:"group","aria-label":`Zoom sur les arrondissements de ${e.label}`,"data-city-url":l?t:void 0,children:[an.jsx(gr,{as:"div",size:"xs",weight:"bold",pb:"xxs",children:e.label}),an.jsxs("svg",{viewBox:e.viewBox,className:"c-map-towns__zoom-map",children:[an.jsxs("title",{children:["Arrondissements de ",e.label]}),an.jsx("g",{children:e.ids.map(e=>{const t=c.get(e),n=d.get(`town-${e}`);return n?an.jsx("g",{role:"button","aria-label":`Arrondissement ${e}`,onClick:()=>{l||(window.location.href=n.url)},children:an.jsx("path",{d:n.path,className:hn("c-map-towns__path c-map-towns__path--borough",{[`c-map-towns__path--${t?.politicalParty.color}`]:t})})},`zoom-${e}`):null})})]})]})},f=Array.from(u.values());return an.jsxs($n,{...s,className:hn("c-map-towns",a,{"c-map-towns--is-mobile":l}),children:[o&&an.jsx("script",{id:"js-town-sprite-data",className:"c-map-towns__sprite",type:"application/json",dangerouslySetInnerHTML:{__html:JSON.stringify(o)}}),an.jsxs("svg",{viewBox:"0 0 525 488",className:"c-map-towns__map",role:"img","aria-label":"Carte des résultats électoraux par commune en France métropolitaine",children:[an.jsx("g",{className:"c-map-towns__layer-bg","aria-hidden":"true",children:Object.entries(r).map(([e,t])=>an.jsx("path",{d:t.path,className:"c-map-towns__dept-bg"},`bg-${e}`))}),an.jsx("g",{className:"c-map-towns__layer-towns",children:n.map(e=>{const t=d.get(`town-${e.id}`);return t?an.jsx("path",{d:t.path,"data-town-id":`town-${e.id}`,"data-url":t.url,"data-name":t.name,className:hn("c-map-towns__path",{[`c-map-towns__path--${e?.politicalParty.color}`]:e})},e.id):null})}),an.jsx("g",{className:"c-map-towns__layer-departments","aria-hidden":"true",children:Object.entries(r).map(([e,t])=>{const n=bn[e];return an.jsx("path",{id:`out-${e}`,d:t.path,"data-name":n,"data-url":l?di(n):void 0,className:"c-map-towns__dept-trigger",children:an.jsx("title",{children:n})},`out-${e}`)})}),an.jsx("g",{className:"c-map-towns__layer-markers",children:vn.map(e=>(()=>{const t=d.get(`town-${e.id}`);return t?an.jsxs("g",{className:"js-city-marker c-map-towns__city-marker","data-url":t.url,"data-name":e.name,"aria-hidden":"true",children:[an.jsx("path",{d:t.path,className:"js-city-anchor c-map-towns__city-anchor"}),an.jsx("circle",{r:"5",fill:"white",stroke:"black",strokeWidth:"1"}),an.jsx("rect",{className:"js-city-bg",fill:"white",rx:"4",ry:"4"}),an.jsx("text",{className:"js-city-text c-map-towns__city-text",fill:"black",children:e.name})]},e.name):null})())})]}),an.jsxs(Xn,{className:"c-map-towns__zooms",direction:{xs:"row",md:"column"},gap:{md:"l"},justifyContent:{xs:"between",md:"start"},children:[p(An.PARIS),p(An.MARSEILLE),p(An.LYON)]}),i&&an.jsxs("div",{className:"c-map-towns__droms",children:[an.jsx(gr,{as:"div",size:"xs",weight:"bold",pb:"xxs",children:"Outre-mer"}),an.jsx(Xn,{gap:{md:"xl"},wrap:"wrap",justifyContent:{xs:"between",md:"start"},children:Object.entries(i).map(([e,t])=>an.jsx("div",{children:an.jsxs("svg",{className:"c-map-towns__map-drom",viewBox:t.viewBox,children:[an.jsx("title",{children:t.name}),an.jsx("path",{d:t.deptPath,className:"c-map-towns__layer-bg c-map-towns__dept-bg"}),an.jsx("g",{className:"c-map-towns__layer-towns",children:t.towns.map(e=>{const t=c.get(e.id.replace(/^town-/,""));return an.jsx("path",{id:`${e.id}-drom`,d:e.path,"data-url":e.url,"data-name":e.name,className:hn("c-map-towns__path c-map-towns__path--drom",{[`c-map-towns__path--${t?.politicalParty.color}`]:t})},e.id)})}),an.jsx("path",{id:`out-${e}`,d:t.deptPath,"data-name":t.name,"data-url":di(t.name),className:"c-map-towns__dept-trigger"})]})},e))})]}),f.length>0&&an.jsx(ni,{items:f,mt:"xxl"}),an.jsxs("div",{id:"js-zoom-overlay",className:"c-map-towns__overlay","aria-hidden":"true",children:[an.jsxs("button",{id:"js-zoom-close",className:"c-map-towns__close-btn",type:"button",children:[an.jsx(Pn,{name:"close",size:20}),"Fermer"]}),an.jsxs(Xn,{id:"js-zoom-content",direction:"column",alignItems:"center",className:"c-map-towns__zoom-content",children:[an.jsx(gr,{as:"div",weight:"bold",size:"l",id:"js-zoom-label",className:"c-map-towns__zoom-label",children:" "}),an.jsxs("svg",{id:"js-zoom-svg",className:"c-map-towns__zoom-svg",viewBox:"0 0 525 488","aria-hidden":"true",role:"img",children:[an.jsx("title",{id:"js-zoom-title",children:"Carte détaillée du département"}),an.jsx("g",{id:"js-zoom-group",className:"c-map-towns__zoom-group"})]})]})]})]})},pi=({totalArticles:e,currentPage:t,pagePath:n,archivesUrl:r,...i})=>e>0?an.jsxs(Xn,{justifyContent:"center",gap:"l",...i,children:[1===Number(t)?1:an.jsx(nr,{color:"grey-300",href:`${n}`,children:"1"}),e>17&&(2===Number(t)?2:an.jsx(nr,{color:"grey-300",href:`${n}?page=2`,children:"2"})),e>25&&1!==Number(t)&&an.jsx(nr,{color:2!==Number(t)?"black":"grey-300",href:r,children:"Archives"})]}):null,fi=({color:e,count:t=0,countColor:n,countBg:r,countStyle:i,iconItemProps:o,placement:a="right",reactListItems:s,reactListItemThemeColor:l,userReaction:c,variant:u,layout:d,contentId:h,contentLegacyId:p,...f})=>{const m=an.jsx(Xn,{as:"ul",direction:"row-reverse",alignItems:"center",className:"c-react-button__list",children:s?.sort((e,t)=>t.count-e.count).map((e,t)=>an.jsx($n,{as:"li",className:hn("c-react-button__list-item",{"c-react-button__list-item--show":e.count>0&&t<=1}),bg:"grey-100","data-reaction-item":e.type,children:an.jsx(gr,{as:"span",size:"xxs",children:yn[e.type]})},e.type))});return an.jsxs(Xn,{...f,gap:"xxs-2",alignItems:"center",role:"button","data-placement":a,className:hn("mbrs-social-react-container","c-react-button",{[`c-react-button--${u}`]:u,[`c-react-button--${l}`]:l},f.className),...s&&s.length>0&&s.reduce((e,t)=>(e[`data-content-${t.type}`]=t.count,e),{}),...c&&{"data-user-reaction":c.type,"data-user-reaction-id":c.id},children:[an.jsx(Ir,{className:"c-react-button__icon",...(()=>{switch(u){case"horizontal":case"vertical":return{color:e,count:t,countColor:n,countBg:r,countStyle:i};default:return{}}})(),...o,ariaLabel:"Reagir au contenu",iconProps:{name:"thumb","aria-hidden":!0,...(()=>{switch(u){case"horizontal":case"vertical":return{size:26};default:return{size:20}}})()},"aria-describedby":d===lr.DESKTOP?`react-tooltip-${p||h}`:void 0,children:d===lr.DESKTOP&&an.jsx(Mn,{id:`react-tooltip-${p||h}`,text:"Réagir"})}),"card"===u&&an.jsxs(an.Fragment,{children:[m,an.jsx(gr,{as:"span",size:"xxs",color:e,className:hn("c-react-button__count",{"c-react-button__count--show":t>0}),children:String(t).padStart(2,"0")})]})]})},mi=({id:e,url:t,inputProps:n,autocompleteResults:r,ariaLabel:i,...o})=>an.jsxs($n,{...o,as:"form",autoComplete:r&&r.length>0?"off":"on",id:e,className:hn("c-search-form",o?.className),action:t,method:"GET",role:"search",children:[an.jsx("label",{htmlFor:`${e}-search`,className:"u-mask",children:i||n?.placeholder||"Recherche"}),an.jsx(qn,{id:`${e}-search`,className:"c-search-form__input",type:"text",placeholder:n?.placeholder||"Rechercher...",name:n?.name||"q",isIconButton:!0,icon:"search",iconButtonProps:{type:"submit",children:an.jsx("span",{className:"u-mask",children:"Ok"})},isRounded:n?.isRounded??!0,...n}),r&&r.length>0&&an.jsx("ul",{className:"c-search-form__autocomplete u-hidden",children:r.slice(0,8).map(e=>an.jsx("li",{children:an.jsx("a",{href:e.url,tabIndex:-1,children:e.value})},e.value))})]}),gi=({label:e,labelLink:t,themeColor:n,isUnderlined:r=!0,...i})=>an.jsxs(mr,{...t&&{as:"a",href:t},size:"xxs",weight:"bold",...i,className:hn("c-section-title",{"c-section-title--is-link":t}),children:[r?an.jsx(gr,{as:"span",role:"presentation",pb:"xxs",className:hn("c-section-title__underline",{"c-section-title__underline--default":!n,[`c-section-title__underline--${n}`]:n}),children:e}):e,t&&an.jsx(Pn,{name:"chevron",size:14,color:"ultramarine",mt:"xxs-2",ml:"xxs"})]}),yi=({avatars:e,authors:t,layout:n,publicationProps:r,publishedAt:i,editedAt:o,userlink:a,authorHighlighted:s=!1,disableAvatar:l=!1,themeColor:c,sponsor:u,...d})=>{const h=an.jsxs(Xn,{...d,as:"address",alignItems:"start",gap:"s",children:[!l&&an.jsx(Sr,{avatars:e,themeColor:c}),an.jsxs(er,{grow:1,align:i?"start":"center",children:[s?an.jsx("div",{children:an.jsx(gr,{as:"span",size:"s",weight:"bold",px:"xxs",bg:"sponsoring",color:"grey-900",children:t})}):an.jsx(gr,{size:"s",weight:"bold",children:t}),i&&an.jsxs(gr,{size:"xxs",color:"grey-400",mt:"xxs-2",...r,children:[an.jsxs("time",{children:["Publié le ",i]}),o&&an.jsxs("time",{children:[" • Mis à jour le ",o]})]})]}),u&&n===lr.MOBILE&&an.jsx(Ci,{sponsor:u,size:"xxs"})]});return a?an.jsx("a",{href:a,children:h}):h},vi=e=>e||null,Ai={role:"button",tabIndex:0,className:"c-social-bar-actions-modal__row","data-social-bar-action-row":"true"},bi=({dialogId:e,className:t,commentItem:n,shareItem:r,bookmarkItem:i,chatbotItem:o,reportItem:a})=>an.jsxs(rr,{variant:"right",dialogId:e,className:hn("c-social-bar-actions-modal",t),children:[an.jsx(On,{variant:"ghost",size:"tiny",iconProps:{name:"close",size:18},"data-a11y-dialog-hide":e,"aria-label":"Fermer la liste des actions",className:"c-social-bar-actions-modal__close-btn"}),an.jsxs(Xn,{as:"ul",direction:"column",mx:"m",mt:"xxl-2",gap:"m",children:[an.jsxs(Xn,{as:"li",gap:"m",alignItems:"center",...Ai,children:[vi(n),an.jsx(gr,{as:"span",size:"m",children:"Laisser un commentaire"})]}),an.jsxs(Xn,{as:"li",gap:"m",alignItems:"center",...Ai,children:[vi(r),an.jsx(gr,{as:"span",size:"m",children:"Partager l’article"})]}),an.jsxs(Xn,{as:"li",gap:"m",alignItems:"center",...Ai,children:[vi(i),an.jsx(gr,{as:"span",size:"m",children:"Sauvegarder l’article"})]}),an.jsxs(Xn,{as:"li",gap:"m",alignItems:"center",...Ai,children:[vi(a),an.jsx(gr,{as:"span",size:"m",children:"Signaler une faute"})]}),an.jsxs(Xn,{as:"li",gap:"m",alignItems:"center",...Ai,children:[vi(o),an.jsx(gr,{as:"span",size:"m",children:"Poser une question sur l’actualité"})]})]})]}),wi=e=>"card"===e?"secondary":"primary",xi=e=>"card"===e?"inline":"rounded",_i=e=>"vertical"===e?"right":"top",Si=(t,n)=>e.isValidElement(t)?e.cloneElement(t,{id:n}):t,Ei=({commentCount:e,shareCount:t,reactionCount:n,variant:r="horizontal",countColor:i,themeColor:o,contentId:a,contentLegacyId:s,contentModel:l,contentLink:c,withReport:u=!0,withChatbotButton:d=!1,commentAnchor:h,disableComment:p,blockVariant:f,reactListItems:m,userReaction:g,layout:y,...v})=>{const A=!p&&an.jsx(Ir,{role:"button",ariaLabel:"Accéder aux commentaires",iconProps:{name:"comment","aria-hidden":!0},..."card"===r&&"blue-grey"===f&&{iconBackground:"blue-grey",iconColor:"white"},variant:wi(r),count:e,countColor:i,countBg:o,countStyle:xi(r),..."horizontal"===r&&{id:"mbrs-social-comment-container"},..."card"!==r&&{anchor:h},..."card"===r&&c&&{link:`${c}#${h}`},color:"blue-grey"===f?"white":"black","aria-describedby":y===lr.DESKTOP?`comment-tooltip-${s||a}`:void 0,children:y===lr.DESKTOP&&an.jsx(Mn,{id:`comment-tooltip-${s||a}`,text:"Commenter"})}),b=an.jsx(Ir,{role:"button",ariaLabel:"Partager le contenu",iconProps:{name:"share","aria-hidden":!0},..."card"===r&&{iconBackground:"none"},..."card"===r&&"blue-grey"===f&&{iconBackground:"blue-grey",iconColor:"white"},variant:wi(r),count:0===t?void 0:t,countColor:i,countBg:o,countStyle:xi(r),isClickable:"card"!==r,className:hn({"js-mobile-share-button":"horizontal"===r}),..."card"!==r&&{id:"mbrs-social-share-container"},color:f&&["dark","blue-grey"].includes(f)?"white":"black","aria-describedby":y===lr.DESKTOP?`share-tooltip-${s||a}`:void 0,children:y===lr.DESKTOP&&an.jsx(Mn,{id:`share-tooltip-${s||a}`,text:"Partager l'article"})}),w=!p&&a&&!!m&&an.jsx(fi,{color:"blue-grey"===f?"white":"black",count:n,countColor:i,countBg:o,countStyle:xi(r),iconItemProps:{variant:wi(r),..."card"===r&&"blue-grey"===f&&{iconBackground:"blue-grey",iconColor:"white"}},userReaction:g,reactListItems:m,reactListItemThemeColor:"card"===r?f:void 0,variant:r,placement:_i(r),layout:y,contentId:a,contentLegacyId:s,"data-content-id":a||s,"data-content-model":l}),x=s&&an.jsx(Ir,{role:"button",ariaLabel:"Mettre le contenu en favori",iconProps:{name:"bookmark","aria-hidden":!0},..."card"===r&&"blue-grey"===f&&{iconBackground:"blue-grey",iconColor:"white"},variant:wi(r),countStyle:xi(r),"data-id":s,"data-delayed":!0,"data-distance-visible":0,"data-event-name":"mbrs-social-save-content",color:"blue-grey"===f?"white":"black","aria-describedby":y===lr.DESKTOP?`bookmark-tooltip-${s||a}`:void 0,children:y===lr.DESKTOP&&an.jsx(Mn,{id:`bookmark-tooltip-${s||a}`,text:"Sauvegarder l'article"})}),_=u&&an.jsx(Ir,{role:"button",ariaLabel:"Signaler une faute dans le contenu",..."card"===r&&"blue-grey"===f&&{iconBackground:"blue-grey",iconColor:"white"},variant:wi(r),iconProps:{name:"report","aria-hidden":!0},className:"mbrs-social-report-container",color:"black","aria-describedby":y===lr.DESKTOP?`report-tooltip-${s||a}`:void 0,children:y===lr.DESKTOP&&an.jsx(Mn,{id:`report-tooltip-${s||a}`,text:"Signaler une faute"})}),S=d&&an.jsx(Ir,{role:"button",ariaLabel:"Poser une question au Chatbot",iconProps:{name:"ia",size:26,"aria-hidden":!0},color:"black",id:"mbrs-social-chatbot-container","data-content-id":a,"aria-describedby":y===lr.DESKTOP?`chatbot-tooltip-${s||a}`:void 0,pl:"xxs-3",children:y===lr.DESKTOP&&an.jsx(Mn,{id:`chatbot-tooltip-${s||a}`,text:"Poser une question"})}),E=an.jsx(Nn,{id:"mbrs-social-chatbot-container-bar","data-content-id":a,color:"quaternary","aria-label":"Poser une question au Chatbot",hasNormalWeight:!0,stayOnSingleLine:!0,className:"c-social-bar__chatbot-cta","data-a11y-dialog-show":"dialog-chatbot",children:"Poser une question"}),C=an.jsx(On,{iconProps:{name:"dots",size:16,color:"black"},size:"small","aria-label":"Ouvrir le menu des actions","data-a11y-dialog-show":"dialog-social-bar"}),k=(u||d||!!s)&&an.jsx(ir,{}),I="horizontal"===r&&d,D=Si(A,"mbrs-social-comment-container-modal"),T=Si(b,"mbrs-social-share-container-modal"),N=Si(S,"mbrs-social-chatbot-container-modal");return an.jsxs(an.Fragment,{children:[an.jsx(Xn,{as:"ul",...v,alignItems:"center",gap:"horizontal"===r&&d?"s":"card"===r?"xxs":"xl",direction:"vertical"===r?"column":"row",justifyContent:"card"===r?"between":void 0,className:hn("c-social-bar",{[`c-social-bar--${r}`]:"card"!==r},v.className),bg:"horizontal"===r?"grey-50":void 0,"data-block-variant":f,children:(()=>{switch(r){case"card":return an.jsxs(an.Fragment,{children:[an.jsx("li",{children:an.jsxs(Xn,{as:"ul",alignItems:"center",gap:"xxs",children:[A&&an.jsx("li",{children:A}),w&&an.jsx("li",{children:w})]})}),x&&an.jsx("li",{children:x})]});case"horizontal":return d?an.jsxs(an.Fragment,{children:[A&&an.jsx("li",{children:A}),w&&an.jsx("li",{children:w}),an.jsx("li",{children:C}),an.jsx("li",{children:E})]}):an.jsxs(an.Fragment,{children:[A&&an.jsx("li",{children:A}),b&&an.jsx("li",{children:b}),x&&an.jsx("li",{children:x}),w&&an.jsx("li",{children:w}),_&&an.jsx("li",{children:_})]});case"vertical":return an.jsxs(an.Fragment,{children:[A&&an.jsx("li",{children:A}),b&&an.jsx("li",{children:b}),w&&an.jsx("li",{children:w}),an.jsx("li",{"aria-hidden":"true",children:k}),S&&an.jsx("li",{children:S}),x&&an.jsx("li",{children:x}),_&&an.jsx("li",{children:_})]});default:return null}})()}),I&&an.jsx(bi,{dialogId:"dialog-social-bar",commentItem:D,shareItem:T,bookmarkItem:x,reportItem:_,chatbotItem:N})]})},Ci=({sponsor:e,size:t,hasText:n=!1,isInline:r=!1,...i})=>an.jsxs(Xn,{...i,as:r?"span":i.as,gap:n?i?.gap||"l":void 0,className:hn("c-sponsor",i?.className),children:[n&&(r?an.jsx(gr,{as:"span",weight:"bold",children:"avec"}):an.jsx(er,{align:"end",children:an.jsx(gr,{as:"span",weight:"bold",children:"avec"})})),an.jsx("img",{alt:e.name,src:e.logoUrl,className:hn("c-sponsor__img",{[`c-sponsor__img--${t}`]:t})})]}),ki=({hasHeader:e,tableProps:t,...n})=>{if(!t?.length)return null;const r=e?t[0]:null,i=e?t.slice(1):t;return an.jsxs($n,{as:"table",...n,children:[e&&r&&an.jsx("thead",{children:an.jsx("tr",{children:r.map((e,t)=>an.jsx($n,{as:"th",p:"s",children:e},t))})}),an.jsx("tbody",{children:i.map((e,t)=>an.jsx("tr",{children:e.map((e,t)=>an.jsx($n,{as:"td",p:"s",children:e},t))},t))})]})},Ii=({tabItems:e,name:t="default",fitContainer:n,tabItemActive:r,tabVariant:i="primary",className:o,tabProps:a,tabTitlesColor:s,...l})=>{const c=e.filter(({content:e})=>Array.isArray(e)?e.length>0:!!e);if(0===c.length)return null;const u=r||c[0].name;return an.jsxs($n,{className:hn(o,"js-tabs",{"c-tabs-fit-container":n}),"data-tabs-name":t,...l,children:[an.jsx(Xn,{className:"c-tablist",role:"tablist",mb:"l",gap:"primary"===i?"l":void 0,...a,children:c.map(e=>an.jsx(hr,{name:e.name,variant:i,isSelected:u===e.name,tabIndex:u===e.name?0:-1,tabColor:e.tabColor,isNoWrap:e.isNoWrap,color:s,children:e.title},e.name))}),c.map(e=>an.jsx(pr,{className:hn({"c-tabs-fit-container__panel":n}),name:e.name,isHidden:u!==e.name,children:e.content},e.name))]})},Di=e.forwardRef(({href:e,children:t,...n},r)=>an.jsx("a",{href:e,className:hn("c-skip-link",Yn(n),n?.className),ref:r,...n,children:t}));Di.displayName="SkipLink";const Ti=({tabItems:t,layout:n,fitContainer:r,tabItemActive:i,isScrollable:o=!1,hasButton:a=!1,seeMoreLinkBoxProps:s,...l})=>{const c=(e,t)=>e.slice(0,t),u=t.map(e=>({...e,body:c(e.body,n===lr.DESKTOP?"le-direct"===e.name?25:10:5)})).filter(e=>e.body&&e.body.length>0).map(t=>{const i="le-direct"===t.name;return{name:t.name,title:t.title,tabColor:t.tabColor,content:an.jsxs(an.Fragment,{children:[an.jsx("div",{className:hn({"c-most-read-articles-is-scrollable":o&&n===lr.DESKTOP,"c-most-read-articles-fit-container":r&&n===lr.DESKTOP}),children:an.jsx("div",{children:t.body.map((r,a)=>an.jsxs(e.Fragment,{children:[i?an.jsx(Pr,{link:r.url,title:r.title,cardHeaderProps:{headline:{text:r.rubricName},liveTime:r.liveTime},cardTitleProps:{size:{xs:"xxs-2",md:"xxs-3"},cartridge:r.cartridge},layout:n,mr:o&&n===lr.DESKTOP&&t.body.length>3?"s":void 0}):an.jsx(Fr,{link:r.url,title:r.title,cardHeaderProps:{headline:{text:r.rubricName}},...n===lr.DESKTOP&&{cardImageProps:r.cardImageProps},cardTitleProps:{size:"xxs-3",cartridge:r.cartridge},cardNumber:{value:a+1,size:"small"},layout:n,mr:o&&n===lr.DESKTOP?"s":void 0,variant:"small"}),a!==t.body.length-1&&an.jsx(Ln,{color:"grey-200",my:"s"})]},r.title))})}),a&&an.jsx(Xn,{mt:"xl",justifyContent:"center",...s,children:an.jsx(nr,{buttonColor:"primary",variant:"outlined",...i?{href:"https://www.20minutes.fr/actus",children:"Suivre l'info en direct"}:{href:"https://www.20minutes.fr/les-plus-lus",children:"Voir les articles les + lus"}})})]})}});return 0===u.length?null:an.jsx(Ii,{tabItemActive:i||u[0].name,tabItems:u,fitContainer:r&&n===lr.DESKTOP,...l})};class Ni extends Error{}Ni.prototype.name="InvalidTokenError";const Li=e=>{const t=document.cookie.split(";").filter(t=>-1!==t.indexOf(e))[0];return t?t.split("=")[1]:"{}"},Bi=e=>{const t=e=>`${e}`.padStart(2,"0");return`${t(Math.floor(e/60))}:${t(e%60)}`},Pi=new Intl.RelativeTimeFormat("fr",{numeric:"auto"}),Oi=new Intl.DateTimeFormat("fr",{year:"numeric",month:"short",day:"numeric",timeZone:"Europe/Paris"}),Mi=e=>{const t=Date.now(),n=new Date(e).getTime(),r=(n-t)/6e4;let i=Pi.format(Math.round(r),"minutes");return r<=-60&&(i=Pi.format(Math.ceil(r/60),"hours"),r<=-1440&&(i=Oi.format(n))),"cette minute-ci"===i?"à l'instant":i};function ji(e,t=!0){const n=String(e.getDate()).padStart(2,"0"),r=String(e.getMonth()+1).padStart(2,"0");let i=e.getFullYear();return t||(i=Number(e.getFullYear().toString().slice(2))),`${n}/${r}/${i}`}function Fi(e){const[t,n,r]=e.split("-");return`${r}/${n}/${t.slice(-2)}`}const Ri=e=>{const t=new Date(e);return`${t.getFullYear()}${String(t.getMonth()+1).padStart(2,"0")}${String(t.getDate()).padStart(2,"0")}`};var qi=(e=>(e.Article="Article",e.ExternalContent="ExternalContent",e.Live="Live",e.Page="Page",e.StaticPage="StaticPage",e.Story="Story",e))(qi||{}),zi=(e=>(e.bold="bold",e.community="community",e.default="default",e.faq="faq",e.important="important",e.summary="summary",e.very_important="very_important",e))(zi||{}),Hi=(e=>(e.closed="closed",e.open="open",e))(Hi||{}),Ki=(e=>(e.embed="embed",e.photo="photo",e.podcast="podcast",e.video="video",e))(Ki||{}),Ui=(e=>(e.CREATED_AT="CREATED_AT",e.EXPECTATION_LEVEL="EXPECTATION_LEVEL",e.RELEASE_DATE="RELEASE_DATE",e.TITLE_FR="TITLE_FR",e))(Ui||{}),Vi=(e=>(e.ASC="ASC",e.DESC="DESC",e))(Vi||{}),Qi=(e=>(e.down="down",e.heart="heart",e.laughing="laughing",e.sad="sad",e.shock="shock",e.up="up",e))(Qi||{});const Wi=[Qi.up,Qi.down,Qi.sad,Qi.heart,Qi.laughing,Qi.shock],Gi=e=>{if(e)return Wi.reduce((t,n)=>t+(e[n]??0),0)},Zi=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):void 0},Yi=(e,t)=>{let n=e.toLowerCase().replace(/[\s-]+/g,t??"-");return n=(e=>{let t=e;const n="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/,:;";for(let e=0;e<30;e+=1)t=t.replace(new RegExp(n.charAt(e),"g"),"aaaaaeeeeeiiiiooooouuuunc-----".charAt(e));return t})(n),n.replace(/[^\w-]+/g,"").replace(/-*$/g,"")},Ji=e=>{const t=JSON.stringify(e).replaceAll("<\/script>","<\\\\/script>");return JSON.parse(t)},$i=e=>{const t=JSON.stringify(e).replaceAll("<\\\\/script>","<\/script>");return JSON.parse(t)},Xi=(e,t=75)=>e.length>75?`${e.substring(0,t)}…`:e,eo=e=>{const t={click:Yi(e.name),click_chapter1:e?.chapter1||null,click_chapter2:e?.chapter2||null,click_chapter3:e?.chapter3||null},n=`click.${e.type}`;if(window.pa?(e.customProps&&Object.keys(e.customProps).length>0&&window.pa.setProperties(e.customProps,{persistent:!1,events:[n]}),window.pa.sendEvent(n,t)):window._paq&&(e.customProps&&Object.keys(e.customProps).length>0&&window._paq.push(["setProperties",e.customProps,{persistent:!1,events:[n]}]),window._paq.push(["sendEvent",n,t])),!window.edgee?.track)return;const r=document.getElementById("__EDGEE_DATA_LAYER__");let i={};if(r)try{const e=JSON.parse(r.textContent||"");e.data_collection.context=e.data_collection.context||{},i=e.data_collection.context.page?.properties||{}}catch{i={}}window.edgee.track({name:n,properties:{...i,click:t.click,click_chapter1:t.click_chapter1,click_chapter2:t.click_chapter2,click_chapter3:t.click_chapter3,click_type:e?.type??"navigation",...e.customProps}},{"edgee/piano-analytics":!0})},to=e=>{window._paq&&window._paq.push(["sendEvent","page.display",{page:e?.name??window.PianoPageInfo?.name,page_chapter1:e?.chapter1??window.PianoPageInfo?.chapter1,page_chapter2:e?.chapter2??window.PianoPageInfo?.chapter2,page_chapter3:e?.chapter3??window.PianoPageInfo?.chapter3,page_chapter4:e?.chapter4??window.PianoPageInfo?.chapter4}]),window.edgee?.page&&!1!==e?.enableEdgee&&window.edgee.page()},no=e=>{if("undefined"==typeof window&&"undefined"!=typeof Buffer){return Buffer.from(e,"utf-8").toString("base64")}return window.btoa(unescape(encodeURIComponent(e)))},ro="20mnReactions",io=e=>e in yn,oo=Object.values(Qi).filter(e=>io(e)),ao=e=>{const t=e?.reaction?.associated_content?.node?.reactions_count;if(!t)return null;return oo.some(e=>"number"==typeof t[e])?t:null},so=()=>{try{const e=localStorage.getItem(ro);return e?JSON.parse(e):[]}catch{return[]}},lo=e=>{try{localStorage.setItem(ro,JSON.stringify(e))}catch{console.error("Error setting stored reactions")}},co=e=>so().find(t=>t.contentId===e)??null,uo=(e,t,n)=>{const r=so().filter(t=>t.contentId!==e);r.push({id:t,contentId:e,type:n,timestamp:Date.now()}),lo(r)},ho=e=>{const t=so().filter(t=>t.contentId!==e);lo(t)},po=()=>{const e=Li("20mnUserDataLayer");if(!e||"{}"===e)return null;try{return JSON.parse(decodeURIComponent(e))}catch{return null}},fo=()=>{let e=localStorage.getItem("20mn_anonymous_id");return e||(e=crypto.randomUUID(),localStorage.setItem("20mn_anonymous_id",e)),e},mo=async(e,t)=>{const n=document.body.getAttribute("data-api-host");if(!n)return console.error("API host not found"),null;try{const r=new Headers;r.append("Content-Type","application/json"),r.append("auth-key",window.envVariables?.apiAuthKey);const i=await fetch(n,{method:"POST",headers:r,credentials:"include",body:JSON.stringify({query:e,variables:t})});if(!i.ok)throw new Error(`HTTP error: ${i.status}`);const o=await i.json();return o.errors&&o.errors.length>0?(console.error("GraphQL errors:",o.errors),null):o.data??null}catch(e){return console.error("Error executing GraphQL mutation:",e),null}},go=async e=>{const t={id:e},n=await mo("\n mutation DeleteReaction($input: GlobalIdInputType!) {\n deleteReaction(input: $input) {\n resolveInfo {\n status\n }\n }\n }\n ",{input:t}),r=n?.deleteReaction?.resolveInfo?.status;return"string"!=typeof r||!r.startsWith("2")},yo=()=>{const e=document.querySelector(".mbrs-social-emoji-toolbar");if(!e)return;const t=new Set;(()=>{const e=Date.now(),t=so(),n=t.filter(t=>e-t.timestamp<6e5);n.length!==t.length&&lo(n)})(),e.style.position="fixed",e.style.display="none",e.style.zIndex="1000";const n=!!document.querySelector('body[data-layout="mobile"]');let r=null,i=!1,o=null;const a=()=>{null!==o&&(clearTimeout(o),o=null)},s=()=>{e.style.display="none",i=!1,r=null,a()},l=()=>{a(),o=setTimeout(()=>{i&&s(),o=null},400)},c=e=>{const t=e.getAttribute("data-content-model")||"";return t.charAt(0).toUpperCase()+t.slice(1)},u=(e,t)=>{const n=e.querySelector(".c-react-button__icon .c-icon-item__icon");if(n)if(t){const e=(e=>io(e)?yn[e]??null:null)(t);e&&(n.innerHTML=`<span style="font-size: 1.25rem; line-height: 1;">${e}</span>`)}else n.innerHTML='\n <div aria-hidden="true" class="c-icon">\n <svg height="20" width="20">\n <use xlink:href="#thumb"></use>\n </svg>\n </div>\n '},d=t=>{const r=t.getBoundingClientRect(),i=t.getAttribute("data-placement")||"right",o=e.getBoundingClientRect();if("top"===i){const t=r.top-o.height-10,i=r.left+r.width/2,a=t<24,s=i-o.width/2<24,l=i+o.width/2>window.innerWidth-24;e.style.top=a?"24px":`${t}px`,n?(e.style.left="50%",e.style.transform="translateX(-50%)"):s?(e.style.left="24px",e.style.transform="translateX(0)"):l?(e.style.left=window.innerWidth-24+"px",e.style.transform="translateX(-100%)"):(e.style.left=`${i}px`,e.style.transform="translateX(-50%)")}else{const t=r.right+18,i=t+o.width>window.innerWidth;e.style.top=`${r.top+r.height/2}px`,n?(e.style.left="50%",e.style.transform="translate(-50%, -50%)"):i?(e.style.left=window.innerWidth-24+"px",e.style.transform="translate(-100%, -50%)"):(e.style.left=`${t}px`,e.style.transform="translateY(-50%)")}},h=e=>{const t=[];Wi.forEach(n=>{const r=Number.parseInt(e.getAttribute(`data-content-${n}`)||"0",10),i=e.querySelector(`[data-reaction-item="${n}"]`);i&&t.push({element:i,type:n,count:r})});const n=t.filter(({count:e})=>e>0),r=t.reduce((e,{count:t})=>e+t,0),i=e.querySelector(".c-react-button__count");if(i&&(r>0?i.classList.add("c-react-button__count--show"):i.classList.remove("c-react-button__count--show")),t.forEach(({element:e})=>{e.classList.remove("c-react-button__list-item--show")}),0===n.length)return;const o=[...n].sort((e,t)=>t.count-e.count);o.slice(0,2).forEach(({element:e})=>{e.classList.add("c-react-button__list-item--show")})},p=t=>{const n=Object.values(Qi),r=t.getAttribute("data-user-reaction");n.forEach(n=>{const i=t.getAttribute(`data-content-${n}`);if(!i)return;const o=e.querySelector(`[data-reaction-id="${n}"]`);if(!o)return;const a=o.querySelector(".c-emoji-toolbar__count");if(a){const e=String(i).padStart(2,"0");a.textContent=e}r===n?o.classList.add("c-emoji-toolbar__button--is-active"):o.classList.remove("c-emoji-toolbar__button--is-active")})},f=(e,t,n)=>{const r=co(t);let i=0;oo.forEach(t=>{let o="number"==typeof(a=n[t])?Math.max(0,Math.trunc(a)):0;var a;r?.type===t&&(o+=1),e.setAttribute(`data-content-${t}`,String(o)),i+=o});const o=String(i),a=e.querySelector(".c-react-button__count");a&&(a.textContent=o);const s=e.querySelector(".c-icon-item__count");s&&(s.textContent=o),h(e),p(e)},m=(t,n,o,a)=>{const s=-1===o,l=!s&&null!==a&&a!==n,c=(n,o)=>{if(!i||r!==t)return;const a=e.querySelector(`[data-reaction-id="${n}"]`);if(!a)return;const s=a.querySelector(".c-emoji-toolbar__count");if(s){const e=Number.parseInt(s.textContent||"0",10);s.textContent=String(Math.max(0,e+o)).padStart(2,"0")}};c(n,o);const d=t.getAttribute(`data-content-${n}`),h=Number.parseInt(d||"0",10);if(t.setAttribute(`data-content-${n}`,String(Math.max(0,h+o))),l&&a){c(a,-1);const n=t.getAttribute(`data-content-${a}`),o=Number.parseInt(n||"0",10);if(t.setAttribute(`data-content-${a}`,String(Math.max(0,o-1))),i&&r===t){const t=e.querySelector(`[data-reaction-id="${a}"]`);t?.classList.remove("c-emoji-toolbar__button--is-active")}}else if(!l){const e=t.querySelector(".c-icon-item__count");if(e){const t=Number.parseInt(e.textContent||"0",10);e.textContent=String(Math.max(0,t+o))}const n=t.querySelector(".c-react-button__count");if(n){const e=Number.parseInt(n.textContent||"0",10);n.textContent=String(Math.max(0,e+o))}}if(s){if(i&&r===t){const t=e.querySelector(`[data-reaction-id="${n}"]`);t?.classList.remove("c-emoji-toolbar__button--is-active")}t.removeAttribute("data-user-reaction"),t.removeAttribute("data-user-reaction-id"),u(t,null)}else{if(i&&r===t){e.querySelectorAll("[data-reaction-id]").forEach(e=>{e.classList.remove("c-emoji-toolbar__button--is-active")});const t=e.querySelector(`[data-reaction-id="${n}"]`);t?.classList.add("c-emoji-toolbar__button--is-active")}t.setAttribute("data-user-reaction",n),u(t,n)}},g=async(e,t,n,{isRemoving:r,previousUserReaction:i,existingReactionId:o,editorialModel:a})=>{try{if(r){if(o){await go(o)?ho(t):console.error("Failed to delete reaction")}else ho(t);return}if(i&&o){const r=await(async(e,t,n)=>{const r=`\n mutation UpdateReaction($input: UpdateReactionType!) {\n updateReaction(input: $input) {\n reaction {\n id\n associated_content: ${n.toLowerCase()} {\n node {\n reactions_count {\n down\n heart\n laughing\n sad\n up\n }\n }\n }\n }\n resolveInfo {\n status\n }\n }\n }\n `,i={id:e,content:t},o=await mo(r,{input:i});return{id:o?.updateReaction?.reaction?.id??null,reactionCounts:ao(o?.updateReaction)}})(o,n,a);return void(r.id?(uo(t,o,n),r.reactionCounts&&f(e,t,r.reactionCounts)):console.error("Failed to update reaction"))}const s=await(async(e,t,n)=>{const r=po(),i=r?.i?String(r.i):null,o=i?null:fo(),a=`\n mutation CreateReaction($input: CreateReactionType!) {\n createReaction(input: $input) {\n reaction {\n id\n associated_content: ${t.toLowerCase()} {\n node {\n reactions_count {\n down\n heart\n laughing\n sad\n up\n }\n }\n }\n }\n resolveInfo {\n status\n }\n }\n }\n `,s={associated_content:{editorial_id:e,editorial_model:t},content:n};i?s.user_front_id=i:o&&(s.anonymous_id=o);const l=await mo(a,{input:s});return{id:l?.createReaction?.reaction?.id??null,reactionCounts:ao(l?.createReaction)}})(t,a,n);if(s.id){if(!e.getAttribute("data-user-reaction"))return void await go(s.id);e.setAttribute("data-user-reaction-id",s.id),uo(t,s.id,n),s.reactionCounts&&f(e,t,s.reactionCounts)}else console.error("Failed to create reaction")}catch(e){console.error("Error executing reaction mutation:",e)}},y=(e,t,n)=>{const r=e.getAttribute("data-content-id");if(!r)return void console.error("Missing editorial content information for reaction");const i=c(e),o=e.getAttribute("data-user-reaction-id"),a=e.getAttribute("data-user-reaction");m(e,t,n?-1:1,a),h(e),g(e,r,t,{isRemoving:n,previousUserReaction:a,existingReactionId:o,editorialModel:i}).catch(e=>{console.error("Unexpected error in reaction API call:",e)})},v=t=>{if(i&&r===t)return;a(),eo({name:"reaction",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:1}}),r=t,e.style.display="flex",d(t),p(t),A(r.getAttribute("data-content-id")),i=!0;if(!t.getAttribute("data-user-reaction")){const e=t.getAttribute("data-content-id");e&&(async(e,t)=>{const n=po(),r=n?.i?String(n.i):null,i=r?null:fo();if(!r&&!i)return null;const o=document.body.getAttribute("data-brand-id");if(!o)return console.error("Brand ID not found"),null;const a=no(`Brand:${o}`),s={};r?s.user_front_id={eq:r}:i&&(s.anonymous_id={eq:i});const l=t.toLowerCase(),c=`${l}_id`,u=`\n query GetUserReaction($brandId: ID!, $${c}: ID!, $reactionFilter: ReactionFilter) {\n brand(id: $brandId) {\n node {\n ${l}(${c}: $${c}) {\n node {\n id\n reactions(first: 1, filter: $reactionFilter, orderBy: { field: CREATED_AT, direction: ASC }) {\n edges {\n node {\n id\n content\n }\n }\n }\n }\n resolveInfo {\n status\n }\n }\n }\n }\n }\n `,d={brandId:a,reactionFilter:s,[c]:e},h=await mo(u,d),p=h?.brand?.node?.[l]?.node?.reactions,f=p?.edges?.[0]?.node;return f?{id:f.id,type:f.content}:null})(e,qi.Article).then(e=>{e&&r===t&&(t.setAttribute("data-user-reaction",e.type),t.setAttribute("data-user-reaction-id",e.id),u(t,e.type),p(t))}).catch(e=>{console.error("Error fetching user reaction:",e)})}},A=t=>{if(!t)return void console.error("Missing editorial content information for reaction");e.querySelectorAll("[data-reaction-id]").forEach(e=>{const t=e.cloneNode(!0);e.parentNode&&t instanceof HTMLElement&&e.parentNode.replaceChild(t,e)});e.querySelectorAll("[data-reaction-id]").forEach(e=>{e.addEventListener("click",()=>{if(!r)return;const n=e.getAttribute("data-reaction-id");if(!n)return;const i=c(r),o=r.getAttribute("data-user-reaction-id"),a=e.classList.contains("c-emoji-toolbar__button--is-active"),l=r.getAttribute("data-user-reaction");eo({name:n,type:"action",customProps:{cta_context:"toolbar_react",cta_type:"icon",cta_engagement:2}});((e,t,n)=>{r&&m(r,e,t,n)})(n,a?-1:1,l),h(r);const u=r,d=t;s(),g(u,d,n,{isRemoving:a,previousUserReaction:l,existingReactionId:o,editorialModel:i}).catch(e=>{console.error("Unexpected error in reaction API call:",e)})})})},b=e=>{if(t.has(e))return;t.add(e),(e=>{const t=e.getAttribute("data-content-id");if(!t)return;const n=co(t);if(!n)return;e.setAttribute("data-user-reaction",n.type),e.setAttribute("data-user-reaction-id",n.id),u(e,n.type);const r=Number.parseInt(e.getAttribute(`data-content-${n.type}`)||"0",10);e.setAttribute(`data-content-${n.type}`,String(r+1));const i=e.querySelector(".c-react-button__count");if(i){const e=Number.parseInt(i.textContent||"0",10);i.textContent=String(e+1)}const o=e.querySelector(".c-icon-item__count");if(o){const e=Number.parseInt(o.textContent||"0",10);o.textContent=String(e+1)}})(e);const o=e.getAttribute("data-user-reaction");o&&u(e,o),h(e);const s=e.querySelector(".c-react-button__icon");if(!s)return;let c=null,d=null,p=!1;const f=()=>{null!==c&&(clearTimeout(c),c=null)},m=()=>{null!==d&&(clearTimeout(d),d=null)},g=()=>{f(),eo({name:"reaction",type:"action",customProps:{cta_context:"react_button",cta_type:"icon",cta_engagement:1}}),(e=>{const t=e.getAttribute("data-user-reaction");t?y(e,t,!0):y(e,Qi.up,!1)})(e)};n?(s.addEventListener("touchstart",()=>{p=!1,m(),d=setTimeout(()=>{p=!0,v(e)},500)},{passive:!0}),s.addEventListener("touchmove",m),s.addEventListener("touchend",m),s.addEventListener("touchcancel",m),s.addEventListener("click",e=>{if(p)return e.preventDefault(),void(p=!1);g()})):(s.addEventListener("click",g),e.addEventListener("mouseenter",()=>{i&&a()}),e.addEventListener("mouseleave",()=>{i&&r===e&&l()}),s.addEventListener("mouseenter",()=>{i&&r===e||(c=setTimeout(()=>{v(e)},300))}),s.addEventListener("mouseleave",f))};n||(e.addEventListener("mouseenter",a),e.addEventListener("mouseleave",()=>{i&&l()}));document.querySelectorAll(".mbrs-social-react-container").forEach(b);new MutationObserver(e=>{e.forEach(e=>{Array.from(e.addedNodes).forEach(e=>{if(!(e instanceof HTMLElement))return;e.matches(".mbrs-social-react-container")&&b(e);e.querySelectorAll(".mbrs-social-react-container").forEach(b)})})}).observe(document.body,{childList:!0,subtree:!0}),window.addEventListener("scroll",()=>{i&&r&&d(r)}),document.addEventListener("click",({target:t})=>{t instanceof HTMLElement&&i&&!e.contains(t)&&!t.closest(".mbrs-social-react-container")&&s()})},vo=e=>e instanceof HTMLAnchorElement?e.href:e instanceof Element&&e.closest("a")?.href||"",Ao=()=>{"home"===window.datalayerInfo?.pageName&&document.querySelectorAll("div#local-news-container div.c-card-container a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"local_news_content",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:t,cta_engagement:1}}),window.location.href=t})})},bo=()=>{window.datalayerInfo?.pageName&&["article","live"].includes(window.datalayerInfo?.pageName)&&document.querySelectorAll("div.c-tabpanel article a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"most_read_content",type:"action",customProps:{cta_context:"content",cta_type:"link",cta_destination:t,cta_engagement:1},chapter1:"widget"}),window.location.href=t})})};var wo=()=>{"guide-achat"===window.datalayerInfo?.subType&&document.querySelectorAll(".c-content a.c-btn").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),eo({name:"affiliation",type:"action",chapter1:"guide_achat"}),e.target instanceof HTMLAnchorElement&&(window.location.href=e.target.href)})}),"article"===window.datalayerInfo?.pageName&&document.querySelectorAll("footer article a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"read_also",type:"action",customProps:{cta_context:"content",cta_type:"card",cta_destination:t,cta_engagement:2}}),window.location.href=t})}),(()=>{const e=document.querySelector("a.c-tiles--has-advent-bg");e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"advent-calendar",type:"action",customProps:{cta_context:"menu",cta_type:"button",cta_destination:t,cta_engagement:2}}),window.location.href=t})})(),(()=>{if("mobile"!==window.layout)return;const e=document.querySelector("a.js-header-btn-back");e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"back",type:"action",customProps:{cta_context:"header",cta_type:"icon",cta_destination:t,cta_engagement:1}}),window.location.href=t})})(),(()=>{const e=document.querySelector('.c-btn--ghost:not(.u-hidden)[data-a11y-dialog-show="dialog-menu"]');e&&e.addEventListener("click",()=>{eo({name:"menu",type:"action",customProps:{cta_context:"header",cta_type:"button",cta_destination:window.location.href,cta_engagement:1}})})})(),(()=>{const e=document.getElementById("mbrs-social-chatbot-container"),t=document.getElementById("mbrs-floating-chatbot-container"),n=document.getElementById("mbrs-social-chatbot-container-bar");e&&e.addEventListener("click",()=>{eo({name:"ai",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:2}})}),t&&t.addEventListener("click",()=>{eo({name:"ai",type:"action",customProps:{cta_context:"content",cta_type:"button",cta_destination:window.location.href,cta_engagement:1}})}),n&&n.addEventListener("click",()=>{eo({name:"ai",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:2}})})})(),(()=>{if(window.datalayerInfo?.pageName&&["game","gamehome"].includes(window.datalayerInfo?.pageName)){let e=document.querySelectorAll("main#page-wrap div.c-collapse__content a");"desktop"===window.layout&&(e=document.querySelectorAll("header.c-header-page div.c-collapse__content a")),e.forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement&&(t=e.target.href),eo({name:"view_all_games",type:"action",customProps:{cta_context:"home_game",cta_type:"link",cta_destination:t,cta_engagement:1}}),window.location.href=t})})}})(),(()=>{let e=document.querySelector("article.c-card-large a");"mobile"===window.layout&&(e=document.querySelector("article.c-card-extra-large a")),e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"headline_content",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:t,cta_engagement:1}}),window.location.href=t})})(),window.datalayerInfo?.pageName&&["home","tag"].includes(window.datalayerInfo?.pageName)&&(document.querySelectorAll('div.c-icon-item__container--is-clickable[aria-label="Accéder aux commentaires"] a').forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"comment_content",type:"action",customProps:{cta_context:"home"===window.datalayerInfo?.pageName?"home":"tag",cta_type:"icon",cta_destination:t,cta_engagement:2}}),window.location.href=t})}),document.querySelectorAll('div.c-icon-item__container--is-clickable[data-event-name="mbrs-social-save-content"]').forEach(e=>{e.addEventListener("click",()=>{eo({name:"save_content",type:"action",customProps:{cta_context:"home"===window.datalayerInfo?.pageName?"home":"tag",cta_type:"icon",cta_destination:window.location.href,cta_engagement:3}})})})),(()=>{if("home"!==window.datalayerInfo?.pageName)return;const e=(e,t)=>{e?.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const n=vo(e.target);eo({name:t,type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:n,cta_engagement:1}}),window.location.href=n})},t=document.querySelector(".o-lt-show__main .card-item-5"),n=document.querySelectorAll(".o-lt-show__main .c-card-extra-small");e(t??void 0,"card_6"),e(n[4],"card_17"),e(n[5],"card_18")})(),"home"===window.datalayerInfo?.pageName&&document.querySelectorAll(".c-carousel__movies--in-long-list a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);let n="";n="On regarde quoi ce soir ?"===(e.target instanceof Element&&e.target.closest("section.c-carousel")?.querySelector("h2")?.textContent||"")?"program_tv_content":"cinema_content",eo({name:n,type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:t,cta_engagement:1}}),window.location.href=t})}),[{name:"games",id:"#entertainment-item-game"},{name:"horoscope",id:"#entertainment-item-horoscope"}].forEach(e=>{const t=document.querySelector(e.id);t&&t instanceof HTMLAnchorElement&&t.addEventListener("click",n=>{n.stopPropagation(),n.preventDefault(),eo({name:e.name,type:"action",customProps:{cta_context:"widget_entertainment",cta_type:"link_with_icon",cta_destination:t.href,cta_engagement:2}}),window.location.href=t.href})}),(()=>{const e=document.querySelector("ul.c-header__links-container li:first-child a");e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"house",type:"action",customProps:{cta_context:"header",cta_type:"icon",cta_destination:"/",cta_engagement:1}}),window.location.href=t})})(),"home"===window.datalayerInfo?.pageName&&document.querySelectorAll("#tabpanel-le-direct article.c-card-container a").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),eo({name:"live",type:"action",customProps:{cta_context:"home",cta_type:"link",cta_destination:window.location.href,cta_engagement:1}}),window.location.href=e.target.href)})}),(()=>{const e=document.querySelector("#tab-resume");e&&e.addEventListener("click",()=>{eo({name:"context",type:"action",customProps:{cta_context:"content",cta_type:"link",cta_destination:window.location.href,cta_engagement:1},chapter1:"live"})});const t=document.querySelector("#tab-temps-forts");t&&t.addEventListener("click",()=>{eo({name:"highlights",type:"action",customProps:{cta_context:"content",cta_type:"link",cta_destination:window.location.href,cta_engagement:1},chapter1:"live"})})})(),"home"===window.datalayerInfo?.pageName&&document.querySelectorAll(".c-vertical-timeline a").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),eo({name:"live_post",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)})}),Ao(),document.querySelectorAll("a.c-header-mobile__logo, a.c-header__logo, .c-header-mobile__logo a.c-link, .c-header__logo a.c-link, .c-header-mini__container > div:not(.c-header-mini__content) a.c-link").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"logo",type:"action",customProps:{cta_context:"header",cta_type:"image",cta_destination:t,cta_engagement:1}}),window.location.href=t})}),(()=>{const e=(e,t,n)=>{const r=vo(n.target);r&&(n.stopPropagation(),n.preventDefault(),eo({name:t,type:"action",customProps:{cta_context:"header",cta_type:"button",cta_destination:r,cta_engagement:1}}),"_blank"===e.target?window.open(r,"_blank")?.focus():window.location.href=r)};document.querySelectorAll(".c-header__container a.c-media-link").forEach(t=>{switch(t.title){case"Consulter la page 20 Minutes TV live":t.addEventListener("click",n=>{e(t,"20mn_tv",n)});break;case"Consulter la page 20 Minutes TV":t.addEventListener("click",n=>{e(t,"videos",n)})}})})(),bo(),document.querySelectorAll(".c-overview-bar__article a").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),eo({name:"summary_banner",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)})}),document.querySelectorAll("div.c-read-also-banner a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"read_also_banner",type:"action",customProps:{cta_context:"content",cta_type:"card",cta_destination:t,cta_engagement:2},chapter1:"banner"}),window.location.href=t})}),(()=>{const e=document.getElementById("footer-recrutement-link");e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),eo({name:"recrutement",type:"action"}),e.target instanceof HTMLAnchorElement&&(window.location.href=e.target.href)})})(),(()=>{if("rewind"===window.datalayerInfo?.pageName){const e=document.querySelector('#page-wrap a[href*="/rewind/2025"]');e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"rewind_2025",type:"action",customProps:{cta_context:"my_rewinds",cta_type:"card",cta_destination:t,cta_engagement:2}}),window.location.href=t})}const e=document.querySelector('div.c-header a[href*="/rewind/2025"]');e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"rewind",type:"action",customProps:{cta_context:"header",cta_type:"icon",cta_destination:t,cta_engagement:2}}),window.location.href=t});const t=document.querySelector('#dialog-menu a[href*="/rewind/2025"]');t&&t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"rewind",type:"action",customProps:{cta_context:"menu",cta_type:"banner",cta_destination:t,cta_engagement:2}}),window.location.href=t})})(),"desktop"===window.layout&&document.querySelectorAll("li.c-header__link-and-submenu-container a.c-header__link").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),eo({name:"section_tag",type:"action",customProps:{cta_context:"header",cta_type:"link",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)})}),(()=>{if("home"!==window.datalayerInfo?.pageName)return;const e=document.querySelector("div.c-scroll-to-top button");e&&e.addEventListener("click",()=>{eo({name:"scroll_to_top",type:"action",customProps:{cta_context:"home",cta_type:"button",cta_destination:window.location.href,cta_engagement:1}})})})(),(()=>{const e=document.querySelector('.c-social-bar a[href="#mbrs-comments-container"]');e&&e.addEventListener("click",()=>{eo({name:"content_comments",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})});const t=document.querySelector("#mbrs-social-comment-container");t&&t.addEventListener("click",()=>{eo({name:"content_comments",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})})})(),(()=>{const e=document.querySelector(".c-social-bar div.mbrs-social-report-container");e&&e.addEventListener("click",()=>{eo({name:"content_correction",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})})})(),(()=>{const e=document.querySelector('.c-social-bar div[data-event-name="mbrs-social-save-content"]');e&&e.addEventListener("click",()=>{eo({name:"save_content",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})})})(),document.querySelectorAll("div.c-sub-menu__right a").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),eo({name:"content",type:"action",customProps:{cta_context:"sub_nav",cta_type:"card",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)})}),(()=>{const e=(e,t)=>{let n="";t.target instanceof HTMLAnchorElement?n=t.target.href:t.target instanceof HTMLElement&&t.target.closest("a")instanceof HTMLAnchorElement&&(n=t.target.closest("a")?.href||""),n&&(t.stopPropagation(),t.preventDefault(),eo({name:e,type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_destination:"home"===e?window.location.href:n,cta_engagement:1}}),window.location.href=n)};document.querySelectorAll(".c-toolbar a").forEach(t=>{const n=t.nextSibling;if(n instanceof HTMLParagraphElement)switch(n.innerText){case"À la Une":t.addEventListener("click",t=>{e("home",t)});break;case"Le Direct":t.addEventListener("click",t=>{e("live_feed",t)});break;case"Jeux":t.addEventListener("click",t=>{e("games",t)})}});const t=document.querySelector('.c-toolbar div[aria-label="Voir les articles vidéo"] a');t&&t.addEventListener("click",()=>{eo({name:"video_feed",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_destination:window.location.href,cta_engagement:1}})})})(),(()=>{const e=(e,t)=>{let n="";t.target instanceof HTMLAnchorElement?n=t.target.href:t.target instanceof HTMLElement&&t.target.closest("a")instanceof HTMLAnchorElement&&(n=t.target.closest("a")?.href||""),n&&(t.stopPropagation(),t.preventDefault(),eo({name:e,type:"action",customProps:{cta_context:"menu",cta_destination:n,cta_engagement:1,cta_type:"button"}}),window.location.href=n)};document.querySelectorAll("a.c-menu__tiles-items").forEach(t=>{switch(t.innerText){case"Jeux":t.addEventListener("click",t=>{e("games",t)});break;case"Horoscope":t.addEventListener("click",t=>{e("horoscope",t)})}})})()},xo=(e=>(e.ARCHIVE_BY_DAY="archivebyday",e.ARCHIVE_BY_YEAR="archivebyyear",e.ARTICLE="article",e.ASTRO="astro",e.ASTRO_HOME="astrohome",e.CONTACT="contact",e.DIRECT="direct",e.ELECTIONS="elections",e.ELECTIONSHOME="electionshome",e.GAME="game",e.GAME_APP="gameapp",e.GAMEHOME="gamehome",e.HOME="home",e.JOB_DETAILS="jobdetails",e.JOBS="jobs",e.JOURNALIST="journalist",e.LA21E="la21e",e.LEGAL="legal",e.LEGALNOTICE="legalnotice",e.LEGALNOTICEHOME="legalnoticehome",e.LEGALNOTICEDEPARTMENT="legalnoticedepartment",e.LIVE="live",e.MOBILE_APPS="mobileapps",e.MOST_COMMENTED="mostcommented",e.MOST_READ="mostread",e.MOST_SHARED="mostshared",e.MOST_VIEWED="mostviewed",e.MOVIES="movies",e.NEWS="news",e.PARTNER="partner",e.PROGRAMME_TV_CHANNEL="programmetvchannel",e.PROGRAMME_TV_HOME="programmetvhome",e.PROGRAMME_TV_NOW="programmetvnow",e.PROGRAMME_TV_PROGRAM="programmetvprogram",e.PROGRAMME_TV_TOMORROW="programmetvtomorrow",e.REWIND="rewind",e.SEARCH="search",e.SECTION="section",e.SERVICE="service",e.SITEMAP="sitemap",e.SPORT="sport",e.STORY="story",e.TAG="tag",e.TRAFFIC="traffic",e.TV_HOME="tvhome",e.TV_LIVE="tvlive",e.TV_MOST_RECENT="tvmostrecent",e.TV_MOST_VIEWED="tvmostviewed",e.TV_SHOW="tvshow",e.TV_SHOWS="tvshows",e.TV_VIDEO="tvvideo",e.WEATHER="weather",e))(xo||{});new Set(Object.values(xo));var _o=(e=>(e.POOOL_ACCESS="poool-access",e.POOOL_ENGAGE="poool-engage",e.GOOGLE_SEARCH="google-search",e.DIGITEKA_VISIBLE_PLAYER="digiteka-visible-player",e.DIGITEKA_VIDEO_FEED="digiteka-video-feed",e.IDALGO="idalgo",e.NONLI="nonli",e.TABOOLA="taboola-sdk",e.MEDIEGO="mediego",e.BATCH="batch-sdk",e.VOXA_PLAYER="voxa-player",e))(_o||{});var So=()=>{(()=>{const e=document.getElementById("dialog-menu");e&&"mobile"===window.layout&&e.addEventListener("show",()=>{to({name:"menu",chapter1:"menu",chapter2:""})})})(),(()=>{const e=document.getElementById("dialog-comment");if(e&&"mobile"===window.layout){const{datalayerInfo:t={}}=window;e.addEventListener("show",()=>{to({name:`${t?.contentId}_${t?.contentTitle}`,chapter1:"commentaires"})})}})(),(()=>{if(window.datalayerInfo?.pageName!==xo.STORY||!window.history)return;const e=[],t=new IntersectionObserver(t=>{t.forEach(t=>{if(!t.isIntersecting)return;const n=t.target.getAttribute("id");n&&t.intersectionRatio>=0&&(e.includes(n)||(e.push(n),to({name:`${window.PianoPageInfo?.name}-${e.length}`})),window.history.pushState({},"",`#${n}`))})},{rootMargin:"-70px 0px -25% 0px"});document.querySelectorAll(".u-story-container").forEach(e=>{t.observe(e)})})()};const Eo=e=>{const t=document.createElement("script");if(t.type="text/javascript","async"===e.load?t.async=!0:"defer"===e.load&&(t.defer=!0),"src"in e&&e.src){const n=eval;t.src=e.src?.replace(/%(.*?)%/,(e,t)=>n(t))}e.name&&(performance.mark(`20mn:${e.name}:Start`),t.onerror=n=>{performance.mark(`20mn:${e.name}:Error`),console.error(`Script failed to load: ${e.name}${t.src?` (${t.src})`:""}`,n)}),(e.name||e.onLoad)&&(t.onload=()=>{e.name&&performance.mark(`20mn:${e.name}:End`),e.onLoad&&e.onLoad()}),"text"in e&&e.text&&(t.innerHTML=e.text),e.id&&(t.id=e.id),e.dataAttributes&&Object.entries(e.dataAttributes).forEach(([e,n])=>{var r;t.setAttribute(`data-${r=e,r.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}`,n)}),"head"===e.target&&document.head?document.head.appendChild(t):document.body?document.body.appendChild(t):(window.bodyScripts=window.bodyScripts||[],window.bodyScripts.push(t))},Co=(e,t)=>{const n=(n,r)=>{if(r&&window.__tcfapi&&("tcloaded"===n.eventStatus||"useractioncomplete"===n.eventStatus))try{t(),window.__tcfapi("removeEventListener",2,null,n.listenerId)}catch(t){t instanceof Error&&console.error(`Failed to initialize ${e}: ${t.message}`)}};window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(()=>{window.__tcfapi("addEventListener",2,n)})},ko=(e,t)=>{const n=window.thirdPartiesConfig?.conditional?.find(t=>Yi(t.name)===e);if(!n)throw new Error(`Script with name ${e} not found`);Eo({...n,...t})},Io=()=>{Co("Mediego",()=>{const e=window.Didomi;e.getCurrentUserStatus().purposes.cookies?.enabled&&e.getCurrentUserStatus().purposes.select_personalized_ads?.enabled&&ko(_o.MEDIEGO)})},Do=()=>{if(/Android/i.test(navigator.userAgent)){const e=document.createElement("div");e.setAttribute("id","bandeau-app-android"),document.body.appendChild(e)}else if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){const e=document.createElement("div");e.setAttribute("id","bandeau-app-ios"),document.body.appendChild(e)}},To=()=>{Co("Poool",()=>{const e=window.Didomi;e.getCurrentUserStatus().purposes.select_personalized_ads?.enabled||"article"!==window.datalayerInfo?.pageName||["production","publicommunique","magazine","guide-achat"].includes(window.datalayerInfo?.subType||"")||(e=>{try{ko(_o.POOOL_ACCESS)}catch(e){e instanceof Error&&console.error(e.message)}const t=document.querySelector('[src="https://static.20mn.fr/apps/poool/access.min.js"]');t?.addEventListener("load",()=>{const t=document.querySelector(".c-content"),n=document.createElement("div");n.setAttribute("id","paywall"),t?.parentNode?.insertBefore(n,t.nextSibling);const r=window.Access.init("C7B0O-ENPDW-DIJOO-VJO1M").config("locale","fr",!0).config({cookies_enabled:e.getCurrentUserStatus().purposes.select_personalized_ads?.enabled,debug:!0,context:"cookie-wall",default_widget:"gift",app_name:"Poool"}).config("ati_auto_tracking_enabled",!0).config("ati_tracking_method","events").config("auto_tracking_spec_v2",!0);r.on("consent",()=>{let e=new Date;const t=e.getTimezoneOffset();e=new Date(e.getTime()-60*t*1e3),localStorage.setItem("consent_validity_date",e.toISOString().split("T")[0]),window.Didomi.setUserAgreeToAll()});let i=!1;const o=document.querySelector("#cookie-banner");window.didomiEventListeners.push({event:"notice.hidden",listener(){window.didomiOnReady.push(e=>{i||(i=!0,r.config("cookies_enabled",e.getCurrentUserStatus().vendors["c:poool-VyhCit7N"]?.enabled),o&&o.setAttribute("style","position: fixed; z-index: 2; left: 0; right: 0; bottom: 0;"),r.createPaywall({target:"#cookie-banner",pageType:"premium"}))})}}),window.didomiOnReady.push(e=>{const t=e.getCurrentUserStatus().vendors["c:poool-VyhCit7N"]?.enabled;t&&(r.config("cookies_enabled",!0),o&&o.setAttribute("style","position: fixed; z-index: 3; left: 0; right: 0; bottom: 0;"),r.createPaywall({target:"#cookie-banner",pageType:"premium"}))}),o&&o.setAttribute("style","position: fixed; z-index: 3; left: 0; right: 0; bottom: 0;"),r.createPaywall({target:"#cookie-banner",pageType:"premium"})})})(e),(()=>{try{ko(_o.POOOL_ENGAGE)}catch(e){e instanceof Error&&console.error(e.message)}const e=Li("20mnUserInfo");Do();const t=document.querySelector('[src="https://assets.poool.fr/engage.min.js"]'),n=JSON.parse(decodeURIComponent(e?.replace(/'/g,'"')||"")).newsletters_registration??[];t?.addEventListener("load",()=>{const t=window.Engage.noConflict();window.Engage=t||window.Engage,window.Engage.init("C7B0O-ENPDW-DIJOO-VJO1M").autoCreate({filters:["{}"!==e?"connected":"disconnected",...n]})})})()})},No=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>window.__tcfapi("addEventListener",2,(e=>(t,n)=>{if(n&&("tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus)&&e.getCurrentUserStatus().purposes["mesureda-6qyqaZXC"]?.enabled&&e.getCurrentUserStatus().vendors["20minutes-bfbzKmzq"]?.enabled){const e=document.querySelector("#game-help-button");e&&e.addEventListener("click",()=>{try{window.$screeb("survey.start","9beafda1-5240-40eb-975f-fa2be61d1a38",{distribution_id:"1f117b33-3bc3-4136-baa6-f0ac2be83ef0"})}catch(e){console.error("Error while starting survey",e)}})}})(e)))},Lo=()=>{document.querySelectorAll(".taboola").length>0&&Co("Taboola",()=>{window._taboola=window._taboola||[],"article"===window.datalayerInfo?.pageName?window._taboola.push({article:"auto"}):window._taboola.push({other:"auto"}),ko(_o.TABOOLA,{dataAttributes:{darkMode:"dark"===document.documentElement.getAttribute("data-theme")?.toString()?"true":"false"}}),document.querySelectorAll(".taboola").forEach(e=>{const t=e.getAttribute("data-mode"),n=e.getAttribute("id"),r=e.getAttribute("data-placement"),i=e.getAttribute("data-target-type");t&&n&&r&&i?window._taboola.push({mode:t,container:n,placement:r,target_type:i}):console.warn("Issue with taboola placement")}),window._taboola.push({flush:!0})})},Bo=async()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(async e=>{if(!(e=>{try{const t=e.getCurrentUserStatus(),n=Object.values(t.purposes??{}),r=Object.values(t.vendors??{});return 0!==n.length&&0!==r.length&&n.every(e=>e.enabled)&&r.every(e=>e.enabled)}catch{return!1}})(e))return void localStorage.removeItem("etx-settings");if("article"!==window.datalayerInfo?.pageName)return;if(!window.datalayerInfo?.audioId||!window.datalayerInfo?.audioUrl)return void console.error("Audio ID or/and Audio URL is missing in datalayerInfo");const t=window.thirdPartiesConfig?.conditional?.find(e=>"voxa-player"===Yi(e.name));if(!t||!("src"in t))return void console.error("Voxa player script not found in thirdPartiesConfig");const{initETXPlayer:n}=await import(t.src);n({audioUrl:window.datalayerInfo.audioUrl,resourceId:window.datalayerInfo.audioId,contentTier:"free"})})},Po=(e=document)=>e.querySelectorAll('iframe[src*="www.ultimedia.com"], iframe[data-src*="www.ultimedia.com"]'),Oo=()=>Po().length+document.querySelectorAll('[src*="www.youtube.com"], [data-src*="www.youtube.com"]').length+document.querySelectorAll('[src*="www.dailymotion.com"], [data-src*="www.dailymotion.com"]').length+document.querySelectorAll('[src*="www.brut.media"], [data-src*="www.brut.media"]').length,Mo=()=>{const e=[];return Oo()>0&&e.push("video"),(()=>{let e;switch(window.datalayerInfo?.pageName){case xo.ARTICLE:e=document.querySelectorAll(".c-content");break;case xo.LIVE:e=document.querySelectorAll(".js-post")}return!!e&&Array.from(e).some(e=>e.querySelectorAll("img").length>0)})()&&e.push("photo"),document.querySelectorAll('.pi-player, a[href*="https://play.acast.com/"], iframe[src*="https://embed.acast.com/"], iframe[data-src*="https://embed.acast.com/"], iframe[src*="https://podcasts.20minutes.fr/"], iframe[data-src*="https://podcasts.20minutes.fr/"]').length>0&&e.push("podcast"),e},jo=()=>Li("20mnUserDataLayer")?JSON.parse(decodeURIComponent(Li("20mnUserDataLayer"))):null,Fo=async()=>{const e=jo();return e?.i?(async e=>{const t=(new TextEncoder).encode(e),n=await window.crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,"0")).join("")})(String(e.i)):""},Ro=async()=>{const e=jo();if(!e?.d)return"";const t=e.d;if(!t||"string"!=typeof t)return"";let n=t;t.length>6&&t.startsWith("000")&&t.endsWith("000")&&(n=t.slice(3,-3));const r=parseInt(n,10);return Number.isNaN(r)?"":r>=18&&r<=24?"1":r>=25&&r<=34?"2":r>=35&&r<=49?"3":r>=50&&r<=64?"4":r>=65?"5":""},qo=async()=>{const e=jo(),t=e?.g;if(!t)return"";switch(Number(t)){case 1:return"B";case 2:return"A";default:return""}},zo=async()=>{const e=jo(),t=e?.l;if(!t||"string"!=typeof t)return"";if(t.length>4&&t.startsWith("00")&&t.endsWith("00")){return t.slice(2,-2)}return t},Ho=()=>{let e=0;switch(window.datalayerInfo?.pageName){case xo.ARTICLE:t=".c-content",e=document.querySelectorAll(`${t} > p`).length;break;case xo.LIVE:e=window.datalayerInfo?.livePosts??0}var t;return e.toString()},Ko=()=>{return window.datalayerInfo?.pageName===xo.ARTICLE?(e=".c-content",[...document.querySelectorAll(`${e} > p`)].reduce((e,t)=>e+t.innerHTML.length,0)).toString():"0";var e},Uo=()=>{const e=window.datalayerInfo;return e?e.pageName&&[xo.GAMEHOME,xo.GAME_APP,xo.GAME].includes(e.pageName)?["categorie-jeux"]:e.tagsSlug?e.tagsSlug.split("|").filter(e=>e):[]:[]},Vo=()=>{const e=window.datalayerInfo;return e?e.pageName&&[xo.GAMEHOME,xo.GAME_APP,xo.GAME].includes(e.pageName)?["services","jeux"]:e.breadcrumb?e.breadcrumb:[]:[]},Qo=async()=>{try{window.wamid="10069",window.typ="1",window.WfirstParty=!0,window.Wam2gamConf={token:"Gi2z6jGZBNYt",cookieless:!1,useXdevice:!0},window.WextraIDsConfs=[{name:"firstId"},{name:"utiqId"}],await(async()=>{const e=window.datalayerInfo;if(!e)return;const t={URL:e.pageUri||"",title_article:e.contentTitle||"",editor_group:"20minutes",environnement:"20minutes",keywords:`[${Uo().join(",")}]`,topics:`[${Vo().join(",")}]`,publication_date:e.publicationDate?Ri(e.publicationDate):"",media_enrichment:`[${Mo().join(",")}]`,blocked_article:"0",premium_article:"0",length_words:Ko(),nb_paragraph:Ho(),reading_time:"",sponsored:["production","publicommunique","magazine","guide-achat"].includes(window.datalayerInfo?.subType||"")?"1":"0",sponsored_by:"",editor_user_id:"",website_user_id:await Fo()||"",inscription_date:"",user_connected:"{}"!==Li("20mnUserInfo")?"1":"0",user_subscriber:"0",type_subscription:"[]",navigation:window.layout||"",INSEE_code:e.inseeCode||"",zipcode:"",departement_id:"",departement_label:"",city:"",id_crm:await Fo()||"",email_hashed:"",TRE:await qo()||"",TGE:await Ro()||"",IDP:await zo()||"",consent_366:"1"};window.Wvar=[];for(const[e,n]of Object.entries(t))window.Wvar.push(e,n)})()}catch(e){console.error("Error initializing Weborama data:",e)}},Wo=async()=>{await Qo();try{Co("Weborama",()=>{window.Didomi.getCurrentUserStatus().purposes["publicite-9qedKJMX"].enabled&&window.Didomi.getCurrentUserStatus().vendors.weborama?.enabled&&window.Didomi.getCurrentUserStatus().vendors["366sas-U9KhdfCC"]?.enabled&&Eo({name:"Weborama SDK",load:"async",src:`//cstatic.weborama.fr/js/wam/customers/wamfactory_dpm.wildcard.min.js?rnd=${Date.now()}`})})}catch(e){console.error("Error initializing Weborama:",e)}};var Go=()=>{(()=>{const e=document.querySelector(".js-close-article-btn");e&&window?.location&&window?.envVariables?.pageEndpoint&&e.addEventListener("click",()=>{eo({name:"close_content",type:"action",customProps:{cta_context:"content",cta_type:"button",cta_destination:"home",cta_engagement:1}}),window.location.assign(window.envVariables.pageEndpoint)})})()};const Zo=async({url:e,options:t})=>{const n={...t||{}},r=new Headers(n.headers);r.has("Content-Type")||r.set("Content-Type","application/json"),n.headers=r;const i=await fetch(e,n).then(e=>{if(e.ok)return e;throw new Error(`Fetch error: ${e.statusText}`)}).then(e=>r.get("Content-Type")?.toLowerCase()?.includes("image/svg+xml")?e.text():e.json());return"object"==typeof i&&null!==i&&"data"in i?i.data:i};var Yo=(e=>(e.UNKNOWN="Non connu",e.SLIDESHOW_COVER="Slideshow cover",e.SLIDESHOW_COVER_LISTING_PAGE="Slideshow listing page",e.SLIDESHOW_PAGE="Slideshow page",e.ARTICLE="article",e.MISC="divers",e.HOME="home",e.LIVE="live",e.SECTION="section",e.TAG="tag",e.JOBS="home_metier",e.JOB_DETAILS="fiche_metier",e.WEATHER="weather",e.TRAFFIC="traffic",e.HOROSCOPE="horoscope",e.HOROSCOPE_HOME="horoscopehome",e.NUMEROLOGY="numerology",e.NUMEROLOGY_HOME="numerologyhome",e))(Yo||{});const Jo=e=>{switch(e){case"page_type":case"content_type":if(window.datalayerInfo?.pageName&&Object.values(xo).includes(window.datalayerInfo?.pageName))switch(window.datalayerInfo?.pageName){case xo.HOME:return"homepage";case xo.TAG:return Yo.HOME;case xo.JOBS:return Yo.JOBS;case xo.JOB_DETAILS:return Yo.JOB_DETAILS;case xo.ASTRO:return Yo.HOROSCOPE;case xo.ASTRO_HOME:return Yo.HOROSCOPE_HOME;default:return window.datalayerInfo?.pageName}return Yo.MISC;case"content_id":return window.datalayerInfo?.contentId??window.datalayerInfo?.tagId??window.datalayerInfo?.jobId??void 0;case"tags":if(window.datalayerInfo?.elections&&(window.datalayerInfo?.pageName===xo.ELECTIONS||window.datalayerInfo?.pageName===xo.ELECTIONSHOME)){const{national:e,region:t,department:n,town:r}=window.datalayerInfo.elections||{};return[e?"national":void 0,t,n,r].filter(Boolean).join(",")}return window.datalayerInfo?.tagsSlug?window.datalayerInfo.tagsSlug.replace(/\|/g,","):Yi(window.datalayerInfo?.tagName??"","_")||void 0;case"category":return!window.datalayerInfo?.elections||window.datalayerInfo?.pageName!==xo.ELECTIONS&&window.datalayerInfo?.pageName!==xo.ELECTIONSHOME?window.datalayerInfo?.breadcrumb?.[0]?"Divertissement"===window.datalayerInfo?.breadcrumb[0]?"arts-stars":Yi(window.datalayerInfo?.breadcrumb[0]):window.datalayerInfo?.pageName===xo.ASTRO||window.datalayerInfo?.pageName===xo.ASTRO_HOME?Yi(window.datalayerInfo?.pageName===xo.ASTRO?"horoscope":"horoscopehome"):window.datalayerInfo?.sectionLabel?Yi(window.datalayerInfo.sectionLabel):void 0:"elections";case"subcategory":if(window.datalayerInfo?.elections&&(window.datalayerInfo?.pageName===xo.ELECTIONS||window.datalayerInfo?.pageName===xo.ELECTIONSHOME))return"resultats";if(window.datalayerInfo?.breadcrumb&&window.datalayerInfo?.breadcrumb.length>1){const e=Yi(window.datalayerInfo.breadcrumb[window.datalayerInfo.breadcrumb.length-(window.datalayerInfo?.pageName===xo.TAG?2:1)]);return e===Yi(window.datalayerInfo?.breadcrumb[0])?Yi(window.datalayerInfo?.tagName??"")||void 0:e||void 0}return;case"content_slug":return window.datalayerInfo?.contentTitle?Yi(window.datalayerInfo.contentTitle):void 0;case"brand_safety":return window.datalayerInfo?.sentiment;case"has_video":return void 0!==window.partnerFeatures?.enableDisplayOnHeaderAd?window.partnerFeatures.enableDisplayOnHeaderAd.toString():void 0;case"device":return window.layout??void 0;default:return}},$o=()=>`category=${Jo("category")}&sub_category=${Jo("subcategory")}&tags=${Jo("tags")}&content_id=${Jo("content_id")}&brand_safety=${Jo("brand_safety")}&page_type=${Jo("page_type")}&pos=instream`;var Xo=()=>{(()=>{const e=Po(),t=window.datalayerInfo||{};0!==Object.keys(t).length&&0!==e.length&&e.forEach(e=>{const t=e.getAttribute("data-src");if(!t)return;const{origin:n,pathname:r,searchParams:i}=new URL(t),o=`${n}${r}`,a=$o();i.append("tagparam",a),e.setAttribute("data-src",`${o}?${i.toString()}`)})})(),window.layout===lr.MOBILE&&(()=>{const e=Po();e&&e.forEach(e=>{const t=e.getAttribute("data-src");if(!t)return;const{origin:n,pathname:r,search:i}=new URL(t),o=`${n}${r}`.replace(/\/chromeless\/1$/,"").replace(/\/$/,"");e.setAttribute("data-src",`${o}/chromeless/1${i}`)})})(),(()=>{const e=window.datalayerInfo?.pageName,t=[xo.TV_HOME,xo.MOST_READ];if(!(window.layout!==lr.DESKTOP||e&&t.includes(e)))return;try{ko(_o.DIGITEKA_VIDEO_FEED)}catch(e){e instanceof Error&&console.error(e.message)}const n=$o(),r=[`MDTK_videofeed_custparams="${n}";`,`MDTK_videofeed_targetings="${n}";`,'MDTK_videofeed = "01100132";',document.querySelectorAll('div[class*="c-content"] iframe[data-src*="www.ultimedia.com"], div[class*="c-content"] iframe[src*="www.ultimedia.com"]').length>0&&window.layout===lr.DESKTOP?"CARROUSEL_videofeed=true;":"",'MDTK_videofeed_adunit_path="/31755961/20minutes_webmobile/display_mobile_vertical";','MDTK_videofeed_adunit_path_interstitial="/31755961/20minutes_webmobile/intrastitiel_dtk";'];Eo({text:r.join("")})})(),(()=>{const e=Po();0!==e.length&&e.forEach(e=>{const t=e.getAttribute("data-src");t&&(e.setAttribute("src",t),e.removeAttribute("data-src"))})})()};const ea=({src:e,timeout:t,loadingText:n,theme:r,...i})=>an.jsx($n,{as:"section","data-theme":r||"light","data-idalgo-loader-src":e,"data-idalgo-timeout":t||"5000","data-idalgo-loader-loading-text":n||"Widget en cours de chargement…",...i}),ta=({articles:e,linksSize:t,seeMoreButton:n,...r})=>0===e.length?null:an.jsxs(an.Fragment,{children:[an.jsx(tr,{colsNumber:{xs:1,md:3},...r,as:"ul",gapY:"xxl-2",gapX:"l",px:{xs:"m",md:"0"},children:e.map((e,n)=>an.jsx(nr,{href:e.url,color:"black",size:t||"xs",children:an.jsx("li",{children:e.title})},`${e.url}-${n}`))}),n&&an.jsx(Xn,{justifyContent:"center",px:{xs:"m",md:"0"},mt:"l",children:an.jsx(Nn,{...n})})]});var na,ra,ia,oa,aa,sa,la,ca,ua,da,ha,pa,fa,ma,ga,ya,va,Aa,ba,wa,xa,_a,Sa,Ea,Ca,ka,Ia,Da,Ta,Na,La,Ba,Pa,Oa,Ma,ja,Fa,Ra,qa,za,Ha,Ka,Ua,Va,Qa,Wa,Ga,Za,Ya,Ja,$a,Xa,es,ts,ns,rs,is,os,as,ss,ls,cs,us,ds,hs,ps,fs,ms,gs,ys,vs,As,bs,ws,xs,_s,Ss,Es,Cs,ks,Is,Ds,Ts,Ns,Ls,Bs,Ps,Os,Ms,js,Fs,Rs,qs,zs={exports:{}};function Hs(){return na||(na=1,zs.exports=function(){var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:W(e)}function r(e){return s(e)?e:G(e)}function i(e){return l(e)?e:Z(e)}function o(e){return a(e)&&!c(e)?e:Y(e)}function a(e){return!(!e||!e[d])}function s(e){return!(!e||!e[h])}function l(e){return!(!e||!e[p])}function c(e){return s(e)||l(e)}function u(e){return!(!e||!e[f])}t(r,n),t(i,n),t(o,n),n.isIterable=a,n.isKeyed=s,n.isIndexed=l,n.isAssociative=c,n.isOrdered=u,n.Keyed=r,n.Indexed=i,n.Set=o;var d="@@__IMMUTABLE_ITERABLE__@@",h="@@__IMMUTABLE_KEYED__@@",p="@@__IMMUTABLE_INDEXED__@@",f="@@__IMMUTABLE_ORDERED__@@",m="delete",g=5,y=1<<g,v=y-1,A={},b={value:!1},w={value:!1};function x(e){return e.value=!1,e}function _(e){e&&(e.value=!0)}function S(){}function E(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function C(e){return void 0===e.size&&(e.size=e.__iterate(I)),e.size}function k(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?C(e)+t:t}function I(){return!0}function D(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function T(e,t){return L(e,t,0)}function N(e,t){return L(e,t,t)}function L(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var B=0,P=1,O=2,M="function"==typeof Symbol&&Symbol.iterator,j="@@iterator",F=M||j;function R(e){this.next=e}function q(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function z(){return{value:void 0,done:!0}}function H(e){return!!V(e)}function K(e){return e&&"function"==typeof e.next}function U(e){var t=V(e);return t&&t.call(e)}function V(e){var t=e&&(M&&e[M]||e[j]);if("function"==typeof t)return t}function Q(e){return e&&"number"==typeof e.length}function W(e){return null==e?ae():a(e)?e.toSeq():ce(e)}function G(e){return null==e?ae().toKeyedSeq():a(e)?s(e)?e.toSeq():e.fromEntrySeq():se(e)}function Z(e){return null==e?ae():a(e)?s(e)?e.entrySeq():e.toIndexedSeq():le(e)}function Y(e){return(null==e?ae():a(e)?s(e)?e.entrySeq():e:le(e)).toSetSeq()}R.prototype.toString=function(){return"[Iterator]"},R.KEYS=B,R.VALUES=P,R.ENTRIES=O,R.prototype.inspect=R.prototype.toSource=function(){return this.toString()},R.prototype[F]=function(){return this},t(W,n),W.of=function(){return W(arguments)},W.prototype.toSeq=function(){return this},W.prototype.toString=function(){return this.__toString("Seq {","}")},W.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},W.prototype.__iterate=function(e,t){return de(this,e,t,!0)},W.prototype.__iterator=function(e,t){return he(this,e,t,!0)},t(G,W),G.prototype.toKeyedSeq=function(){return this},t(Z,W),Z.of=function(){return Z(arguments)},Z.prototype.toIndexedSeq=function(){return this},Z.prototype.toString=function(){return this.__toString("Seq [","]")},Z.prototype.__iterate=function(e,t){return de(this,e,t,!1)},Z.prototype.__iterator=function(e,t){return he(this,e,t,!1)},t(Y,W),Y.of=function(){return Y(arguments)},Y.prototype.toSetSeq=function(){return this},W.isSeq=oe,W.Keyed=G,W.Set=Y,W.Indexed=Z;var J,$,X,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function ie(e){this._iterator=e,this._iteratorCache=[]}function oe(e){return!(!e||!e[ee])}function ae(){return J||(J=new te([]))}function se(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():K(e)?new ie(e).fromEntrySeq():H(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function le(e){var t=ue(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=ue(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function ue(e){return Q(e)?new te(e):K(e)?new ie(e):H(e)?new re(e):void 0}function de(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[n?o-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function he(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new R(function(){var e=i[n?o-a:a];return a++>o?z():q(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function pe(e,t){return t?fe(t,e,"",{"":e}):me(e)}function fe(e,t,n,r){return Array.isArray(t)?e.call(r,n,Z(t).map(function(n,r){return fe(e,n,r,t)})):ge(t)?e.call(r,n,G(t).map(function(n,r){return fe(e,n,r,t)})):t}function me(e){return Array.isArray(e)?Z(e).map(me).toList():ge(e)?G(e).map(me).toMap():e}function ge(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ye(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ve(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||l(e)!==l(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(u(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&ye(i[1],e)&&(n||ye(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var d=!0,h=t.__iterate(function(t,r){if(n?!e.has(t):i?!ye(t,e.get(r,A)):!ye(e.get(r,A),t))return d=!1,!1});return d&&e.size===h}function Ae(e,t){if(!(this instanceof Ae))return new Ae(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if($)return $;$=this}}function be(e,t){if(!e)throw new Error(t)}function we(e,t,n){if(!(this instanceof we))return new we(e,t,n);if(be(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(X)return X;X=this}}function xe(){throw TypeError("Abstract")}function _e(){}function Se(){}function Ee(){}W.prototype[ee]=!0,t(te,Z),te.prototype.get=function(e,t){return this.has(e)?this._array[k(this,e)]:t},te.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,i=0;i<=r;i++)if(!1===e(n[t?r-i:i],i,this))return i+1;return i},te.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,i=0;return new R(function(){return i>r?z():q(e,i,n[t?r-i++:i++])})},t(ne,G),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(!1===e(n[a],a,this))return o+1}return o},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new R(function(){var a=r[t?i-o:o];return o++>i?z():q(e,a,n[a])})},ne.prototype[f]=!0,t(re,Z),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=U(this._iterable),r=0;if(K(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=U(this._iterable);if(!K(n))return new R(z);var r=0;return new R(function(){var t=n.next();return t.done?t:q(e,r++,t.value)})},t(ie,Z),ie.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(!1===e(i[o],o++,this))return o;for(;!(n=r.next()).done;){var a=n.value;if(i[o]=a,!1===e(a,o++,this))break}return o},ie.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,i=0;return new R(function(){if(i>=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return q(e,i,r[i++])})},t(Ae,Z),Ae.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Ae.prototype.get=function(e,t){return this.has(e)?this._value:t},Ae.prototype.includes=function(e){return ye(this._value,e)},Ae.prototype.slice=function(e,t){var n=this.size;return D(e,t,n)?this:new Ae(this._value,N(t,n)-T(e,n))},Ae.prototype.reverse=function(){return this},Ae.prototype.indexOf=function(e){return ye(this._value,e)?0:-1},Ae.prototype.lastIndexOf=function(e){return ye(this._value,e)?this.size:-1},Ae.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},Ae.prototype.__iterator=function(e,t){var n=this,r=0;return new R(function(){return r<n.size?q(e,r++,n._value):z()})},Ae.prototype.equals=function(e){return e instanceof Ae?ye(this._value,e._value):ve(e)},t(we,Z),we.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},we.prototype.get=function(e,t){return this.has(e)?this._start+k(this,e)*this._step:t},we.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},we.prototype.slice=function(e,t){return D(e,t,this.size)?this:(e=T(e,this.size),(t=N(t,this.size))<=e?new we(0,0):new we(this.get(e,this._end),this.get(t,this._end),this._step))},we.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},we.prototype.lastIndexOf=function(e){return this.indexOf(e)},we.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;o<=n;o++){if(!1===e(i,o,this))return o+1;i+=t?-r:r}return o},we.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;return new R(function(){var a=i;return i+=t?-r:r,o>n?z():q(e,o++,a)})},we.prototype.equals=function(e){return e instanceof we?this._start===e._start&&this._end===e._end&&this._step===e._step:ve(this,e)},t(xe,n),t(_e,xe),t(Se,xe),t(Ee,xe),xe.Keyed=_e,xe.Indexed=Se,xe.Set=Ee;var Ce="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ke(e){return e>>>1&1073741824|3221225471&e}function Ie(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return ke(n)}if("string"===t)return e.length>Re?De(e):Te(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Ne(e);if("function"==typeof e.toString)return Te(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function De(e){var t=He[e];return void 0===t&&(t=Te(e),ze===qe&&(ze=0,He={}),ze++,He[e]=t),t}function Te(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return ke(t)}function Ne(e){var t;if(Me&&void 0!==(t=Oe.get(e)))return t;if(void 0!==(t=e[Fe]))return t;if(!Be){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Fe]))return t;if(void 0!==(t=Pe(e)))return t}if(t=++je,1073741824&je&&(je=0),Me)Oe.set(e,t);else{if(void 0!==Le&&!1===Le(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Be)Object.defineProperty(e,Fe,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Fe]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Fe]=t}}return t}var Le=Object.isExtensible,Be=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Pe(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Oe,Me="function"==typeof WeakMap;Me&&(Oe=new WeakMap);var je=0,Fe="__immutablehash__";"function"==typeof Symbol&&(Fe=Symbol(Fe));var Re=16,qe=255,ze=0,He={};function Ke(e){be(e!==1/0,"Cannot perform this action with an infinite size.")}function Ue(e){return null==e?it():Ve(e)&&!u(e)?e:it().withMutations(function(t){var n=r(e);Ke(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function Ve(e){return!(!e||!e[We])}t(Ue,_e),Ue.of=function(){var t=e.call(arguments,0);return it().withMutations(function(e){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}})},Ue.prototype.toString=function(){return this.__toString("Map {","}")},Ue.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ue.prototype.set=function(e,t){return ot(this,e,t)},Ue.prototype.setIn=function(e,t){return this.updateIn(e,A,function(){return t})},Ue.prototype.remove=function(e){return ot(this,e,A)},Ue.prototype.deleteIn=function(e){return this.updateIn(e,function(){return A})},Ue.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Ue.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=gt(this,xn(e),t,n);return r===A?void 0:r},Ue.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):it()},Ue.prototype.merge=function(){return ht(this,void 0,arguments)},Ue.prototype.mergeWith=function(t){return ht(this,t,e.call(arguments,1))},Ue.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,it(),function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]})},Ue.prototype.mergeDeep=function(){return ht(this,pt,arguments)},Ue.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return ht(this,ft(t),n)},Ue.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,it(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]})},Ue.prototype.sort=function(e){return Ht(dn(this,e))},Ue.prototype.sortBy=function(e,t){return Ht(dn(this,t,e))},Ue.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ue.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new S)},Ue.prototype.asImmutable=function(){return this.__ensureOwner()},Ue.prototype.wasAltered=function(){return this.__altered},Ue.prototype.__iterator=function(e,t){return new et(this,e,t)},Ue.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},Ue.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ue.isMap=Ve;var Qe,We="@@__IMMUTABLE_MAP__@@",Ge=Ue.prototype;function Ze(e,t){this.ownerID=e,this.entries=t}function Ye(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Je(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function $e(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Xe(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return q(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var i=Object.create(Ge);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function it(){return Qe||(Qe=rt(0))}function ot(e,t,n){var r,i;if(e._root){var o=x(b),a=x(w);if(r=at(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===A?-1:1:0)}else{if(n===A)return e;i=1,r=new Ze(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(i,r):it()}function at(e,t,n,r,i,o,a,s){return e?e.update(t,n,r,i,o,a,s):o===A?e:(_(s),_(a),new Xe(t,r,[i,o]))}function st(e){return e.constructor===Xe||e.constructor===$e}function lt(e,t,n,r,i){if(e.keyHash===r)return new $e(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&v,s=(0===n?r:r>>>n)&v;return new Ye(t,1<<a|1<<s,a===s?[lt(e,t,n+g,r,i)]:(o=new Xe(t,r,i),a<s?[e,o]:[o,e]))}function ct(e,t,n,r){e||(e=new S);for(var i=new Xe(e,Ie(n),[n,r]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}function ut(e,t,n,r){for(var i=0,o=0,a=new Array(n),s=0,l=1,c=t.length;s<c;s++,l<<=1){var u=t[s];void 0!==u&&s!==r&&(i|=l,a[o++]=u)}return new Ye(e,i,a)}function dt(e,t,n,r,i){for(var o=0,a=new Array(y),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new Je(e,o+1,a)}function ht(e,t,n){for(var i=[],o=0;o<n.length;o++){var s=n[o],l=r(s);a(s)||(l=l.map(function(e){return pe(e)})),i.push(l)}return mt(e,t,i)}function pt(e,t,n){return e&&e.mergeDeep&&a(t)?e.mergeDeep(t):ye(e,t)?e:t}function ft(e){return function(t,n,r){if(t&&t.mergeDeepWith&&a(n))return t.mergeDeepWith(e,n);var i=e(t,n,r);return ye(t,i)?t:i}}function mt(e,t,n){return n=n.filter(function(e){return 0!==e.size}),0===n.length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations(function(e){for(var r=t?function(n,r){e.update(r,A,function(e){return e===A?n:t(e,n,r)})}:function(t,n){e.set(n,t)},i=0;i<n.length;i++)n[i].forEach(r)}):e.constructor(n[0])}function gt(e,t,n,r){var i=e===A,o=t.next();if(o.done){var a=i?n:e,s=r(a);return s===a?e:s}be(i||e&&e.set,"invalid keyPath");var l=o.value,c=i?A:e.get(l,A),u=gt(c,t,n,r);return u===c?e:u===A?e.remove(l):(i?it():e).set(l,u)}function yt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function vt(e,t,n,r){var i=r?e:E(e);return i[t]=n,i}function At(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,s=0;s<i;s++)s===t?(o[s]=n,a=-1):o[s]=e[s+a];return o}function bt(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a<r;a++)a===t&&(o=1),i[a]=e[a+o];return i}Ge[We]=!0,Ge[m]=Ge.remove,Ge.removeIn=Ge.deleteIn,Ze.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ye(n,i[o][0]))return i[o][1];return r},Ze.prototype.update=function(e,t,n,r,i,o,a){for(var s=i===A,l=this.entries,c=0,u=l.length;c<u&&!ye(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===i:s)return this;if(_(a),(s||!d)&&_(o),!s||1!==l.length){if(!d&&!s&&l.length>=wt)return ct(e,l,r,i);var h=e&&e===this.ownerID,p=h?l:E(l);return d?s?c===u-1?p.pop():p[c]=p.pop():p[c]=[r,i]:p.push([r,i]),h?(this.entries=p,this):new Ze(e,p)}},Ye.prototype.get=function(e,t,n,r){void 0===t&&(t=Ie(n));var i=1<<((0===e?t:t>>>e)&v),o=this.bitmap;return 0===(o&i)?r:this.nodes[yt(o&i-1)].get(e+g,t,n,r)},Ye.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=Ie(r));var s=(0===t?n:n>>>t)&v,l=1<<s,c=this.bitmap,u=0!==(c&l);if(!u&&i===A)return this;var d=yt(c&l-1),h=this.nodes,p=u?h[d]:void 0,f=at(p,e,t+g,n,r,i,o,a);if(f===p)return this;if(!u&&f&&h.length>=xt)return dt(e,h,c,s,f);if(u&&!f&&2===h.length&&st(h[1^d]))return h[1^d];if(u&&f&&1===h.length&&st(f))return f;var m=e&&e===this.ownerID,y=u?f?c:c^l:c|l,b=u?f?vt(h,d,f,m):bt(h,d,m):At(h,d,f,m);return m?(this.bitmap=y,this.nodes=b,this):new Ye(e,y,b)},Je.prototype.get=function(e,t,n,r){void 0===t&&(t=Ie(n));var i=(0===e?t:t>>>e)&v,o=this.nodes[i];return o?o.get(e+g,t,n,r):r},Je.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=Ie(r));var s=(0===t?n:n>>>t)&v,l=i===A,c=this.nodes,u=c[s];if(l&&!u)return this;var d=at(u,e,t+g,n,r,i,o,a);if(d===u)return this;var h=this.count;if(u){if(!d&&--h<_t)return ut(e,c,h,s)}else h++;var p=e&&e===this.ownerID,f=vt(c,s,d,p);return p?(this.count=h,this.nodes=f,this):new Je(e,h,f)},$e.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ye(n,i[o][0]))return i[o][1];return r},$e.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=Ie(r));var s=i===A;if(n!==this.keyHash)return s?this:(_(a),_(o),lt(this,e,t,n,[r,i]));for(var l=this.entries,c=0,u=l.length;c<u&&!ye(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===i:s)return this;if(_(a),(s||!d)&&_(o),s&&2===u)return new Xe(e,this.keyHash,l[1^c]);var h=e&&e===this.ownerID,p=h?l:E(l);return d?s?c===u-1?p.pop():p[c]=p.pop():p[c]=[r,i]:p.push([r,i]),h?(this.entries=p,this):new $e(e,this.keyHash,p)},Xe.prototype.get=function(e,t,n,r){return ye(n,this.entry[0])?this.entry[1]:r},Xe.prototype.update=function(e,t,n,r,i,o,a){var s=i===A,l=ye(r,this.entry[0]);return(l?i===this.entry[1]:s)?this:(_(a),s?void _(o):l?e&&e===this.ownerID?(this.entry[1]=i,this):new Xe(e,this.keyHash,[r,i]):(_(o),lt(this,e,t,Ie(r),[r,i])))},Ze.prototype.iterate=$e.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},Ye.prototype.iterate=Je.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[t?i-r:r];if(o&&!1===o.iterate(e,t))return!1}},Xe.prototype.iterate=function(e,t){return e(this.entry)},t(et,R),et.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,i=t.index++;if(r.entry){if(0===i)return tt(e,r.entry)}else if(r.entries){if(i<=(n=r.entries.length-1))return tt(e,r.entries[this._reverse?n-i:i])}else if(i<=(n=r.nodes.length-1)){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return tt(e,o.entry);t=this._stack=nt(o,t)}continue}t=this._stack=this._stack.__prev}return z()};var wt=y/4,xt=y/2,_t=y/4;function St(e){var t=Pt();if(null==e)return t;if(Et(e))return e;var n=i(e),r=n.size;return 0===r?t:(Ke(r),r>0&&r<y?Bt(0,r,g,null,new It(n.toArray())):t.withMutations(function(e){e.setSize(r),n.forEach(function(t,n){return e.set(n,t)})}))}function Et(e){return!(!e||!e[Ct])}t(St,Se),St.of=function(){return this(arguments)},St.prototype.toString=function(){return this.__toString("List [","]")},St.prototype.get=function(e,t){if((e=k(this,e))>=0&&e<this.size){var n=Ft(this,e+=this._origin);return n&&n.array[e&v]}return t},St.prototype.set=function(e,t){return Ot(this,e,t)},St.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},St.prototype.insert=function(e,t){return this.splice(e,0,t)},St.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=g,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Pt()},St.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){Rt(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},St.prototype.pop=function(){return Rt(this,0,-1)},St.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){Rt(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},St.prototype.shift=function(){return Rt(this,1)},St.prototype.merge=function(){return qt(this,void 0,arguments)},St.prototype.mergeWith=function(t){return qt(this,t,e.call(arguments,1))},St.prototype.mergeDeep=function(){return qt(this,pt,arguments)},St.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return qt(this,ft(t),n)},St.prototype.setSize=function(e){return Rt(this,0,e)},St.prototype.slice=function(e,t){var n=this.size;return D(e,t,n)?this:Rt(this,T(e,n),N(t,n))},St.prototype.__iterator=function(e,t){var n=0,r=Lt(this,t);return new R(function(){var t=r();return t===Nt?z():q(e,n++,t)})},St.prototype.__iterate=function(e,t){for(var n,r=0,i=Lt(this,t);(n=i())!==Nt&&!1!==e(n,r++,this););return r},St.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Bt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},St.isList=Et;var Ct="@@__IMMUTABLE_LIST__@@",kt=St.prototype;function It(e,t){this.array=e,this.ownerID=t}kt[Ct]=!0,kt[m]=kt.remove,kt.setIn=Ge.setIn,kt.deleteIn=kt.removeIn=Ge.removeIn,kt.update=Ge.update,kt.updateIn=Ge.updateIn,kt.mergeIn=Ge.mergeIn,kt.mergeDeepIn=Ge.mergeDeepIn,kt.withMutations=Ge.withMutations,kt.asMutable=Ge.asMutable,kt.asImmutable=Ge.asImmutable,kt.wasAltered=Ge.wasAltered,It.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&v;if(r>=this.array.length)return new It([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-g,n))===a&&o)return this}if(o&&!i)return this;var s=jt(this,e);if(!o)for(var l=0;l<r;l++)s.array[l]=void 0;return i&&(s.array[r]=i),s},It.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,i=n-1>>>t&v;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-g,n))===o&&i===this.array.length-1)return this}var a=jt(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var Dt,Tt,Nt={};function Lt(e,t){var n=e._origin,r=e._capacity,i=zt(r),o=e._tail;return a(e._root,e._level,0);function a(e,t,n){return 0===t?s(e,n):l(e,t,n)}function s(e,a){var s=a===i?o&&o.array:e&&e.array,l=a>n?0:n-a,c=r-a;return c>y&&(c=y),function(){if(l===c)return Nt;var e=t?--c:l++;return s&&s[e]}}function l(e,i,o){var s,l=e&&e.array,c=o>n?0:n-o>>i,u=1+(r-o>>i);return u>y&&(u=y),function(){for(;;){if(s){var e=s();if(e!==Nt)return e;s=null}if(c===u)return Nt;var n=t?--u:c++;s=a(l&&l[n],i-g,o+(n<<i))}}}}function Bt(e,t,n,r,i,o,a){var s=Object.create(kt);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=i,s.__ownerID=o,s.__hash=a,s.__altered=!1,s}function Pt(){return Dt||(Dt=Bt(0,0,g))}function Ot(e,t,n){if((t=k(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?Rt(e,t).set(0,n):Rt(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o=x(w);return t>=zt(e._capacity)?r=Mt(r,e.__ownerID,0,t,n,o):i=Mt(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Bt(e._origin,e._capacity,e._level,i,r):e}function Mt(e,t,n,r,i,o){var a,s=r>>>n&v,l=e&&s<e.array.length;if(!l&&void 0===i)return e;if(n>0){var c=e&&e.array[s],u=Mt(c,t,n-g,r,i,o);return u===c?e:((a=jt(e,t)).array[s]=u,a)}return l&&e.array[s]===i?e:(_(o),a=jt(e,t),void 0===i&&s===a.array.length-1?a.array.pop():a.array[s]=i,a)}function jt(e,t){return t&&e&&t===e.ownerID?e:new It(e?e.array.slice():[],t)}function Ft(e,t){if(t>=zt(e._capacity))return e._tail;if(t<1<<e._level+g){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&v],r-=g;return n}}function Rt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new S,i=e._origin,o=e._capacity,a=i+t,s=void 0===n?o:n<0?o+n:i+n;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var l=e._level,c=e._root,u=0;a+u<0;)c=new It(c&&c.array.length?[void 0,c]:[],r),u+=1<<(l+=g);u&&(a+=u,i+=u,s+=u,o+=u);for(var d=zt(o),h=zt(s);h>=1<<l+g;)c=new It(c&&c.array.length?[c]:[],r),l+=g;var p=e._tail,f=h<d?Ft(e,s-1):h>d?new It([],r):p;if(p&&h>d&&a<o&&p.array.length){for(var m=c=jt(c,r),y=l;y>g;y-=g){var A=d>>>y&v;m=m.array[A]=jt(m.array[A],r)}m.array[d>>>g&v]=p}if(s<o&&(f=f&&f.removeAfter(r,0,s)),a>=h)a-=h,s-=h,l=g,c=null,f=f&&f.removeBefore(r,0,a);else if(a>i||h<d){for(u=0;c;){var b=a>>>l&v;if(b!==h>>>l&v)break;b&&(u+=(1<<l)*b),l-=g,c=c.array[b]}c&&a>i&&(c=c.removeBefore(r,l,a-u)),c&&h<d&&(c=c.removeAfter(r,l,h-u)),u&&(a-=u,s-=u)}return e.__ownerID?(e.size=s-a,e._origin=a,e._capacity=s,e._level=l,e._root=c,e._tail=f,e.__hash=void 0,e.__altered=!0,e):Bt(a,s,l,c,f)}function qt(e,t,n){for(var r=[],o=0,s=0;s<n.length;s++){var l=n[s],c=i(l);c.size>o&&(o=c.size),a(l)||(c=c.map(function(e){return pe(e)})),r.push(c)}return o>e.size&&(e=e.setSize(o)),mt(e,t,r)}function zt(e){return e<y?0:e-1>>>g<<g}function Ht(e){return null==e?Vt():Kt(e)?e:Vt().withMutations(function(t){var n=r(e);Ke(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function Kt(e){return Ve(e)&&u(e)}function Ut(e,t,n,r){var i=Object.create(Ht.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function Vt(){return Tt||(Tt=Ut(it(),Pt()))}function Qt(e,t,n){var r,i,o=e._map,a=e._list,s=o.get(t),l=void 0!==s;if(n===A){if(!l)return e;a.size>=y&&a.size>=2*o.size?(r=(i=a.filter(function(e,t){return void 0!==e&&s!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(l){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):Ut(r,i)}function Wt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Gt(e){this._iter=e,this.size=e.size}function Zt(e){this._iter=e,this.size=e.size}function Yt(e){this._iter=e,this.size=e.size}function Jt(e){var t=An(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=bn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===O){var r=e.__iterator(t,n);return new R(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===P?B:P,n)},t}function $t(e,t,n){var r=An(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,A);return o===A?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(O,i);return new R(function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return q(r,s,t.call(n,a[1],s,e),i)})},r}function Xt(e,t){var n=An(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Jt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=bn,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var i=An(e);return r&&(i.has=function(r){var i=e.get(r,A);return i!==A&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,A);return o!==A&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate(function(e,o,l){if(t.call(n,e,o,l))return s++,i(e,r?o:s-1,a)},o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(O,o),s=0;return new R(function(){for(;;){var o=a.next();if(o.done)return o;var l=o.value,c=l[0],u=l[1];if(t.call(n,u,c,e))return q(i,r?c:s++,u,o)}})},i}function tn(e,t,n){var r=Ue().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function nn(e,t,n){var r=s(e),i=(u(e)?Ht():Ue()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return(e=e||[]).push(r?[a,o]:o),e})});var o=vn(e);return i.map(function(t){return mn(e,o(t))})}function rn(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=i:n|=0),D(t,n,i))return e;var o=T(t,i),a=N(n,i);if(o!=o||a!=a)return rn(e.toSeq().cacheResult(),t,n,r);var s,l=a-o;l==l&&(s=l<0?0:l);var c=An(e);return c.size=0===s?s:e.size&&s||void 0,!r&&oe(e)&&s>=0&&(c.get=function(t,n){return(t=k(this,t))>=0&&t<s?e.get(t+o,n):n}),c.__iterateUncached=function(t,n){var i=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var a=0,l=!0,c=0;return e.__iterate(function(e,n){if(!l||!(l=a++<o))return c++,!1!==t(e,r?n:c-1,i)&&c!==s}),c},c.__iteratorUncached=function(t,n){if(0!==s&&n)return this.cacheResult().__iterator(t,n);var i=0!==s&&e.__iterator(t,n),a=0,l=0;return new R(function(){for(;a++<o;)i.next();if(++l>s)return z();var e=i.next();return r||t===P?e:q(t,l-1,t===B?void 0:e.value[1],e)})},c}function on(e,t,n){var r=An(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(O,i),s=!0;return new R(function(){if(!s)return z();var e=a.next();if(e.done)return e;var i=e.value,l=i[0],c=i[1];return t.call(n,c,l,o)?r===O?e:q(r,l,c,e):(s=!1,z())})},r}function an(e,t,n,r){var i=An(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,l=0;return e.__iterate(function(e,o,c){if(!s||!(s=t.call(n,e,o,c)))return l++,i(e,r?o:l-1,a)}),l},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(O,o),l=!0,c=0;return new R(function(){var e,o,u;do{if((e=s.next()).done)return r||i===P?e:q(i,c++,i===B?void 0:e.value[1],e);var d=e.value;o=d[0],u=d[1],l&&(l=t.call(n,u,o,a))}while(l);return i===O?e:q(i,o,u,e)})},i}function sn(e,t){var n=s(e),i=[e].concat(t).map(function(e){return a(e)?n&&(e=r(e)):e=n?se(e):le(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var o=i[0];if(o===e||n&&s(o)||l(e)&&l(o))return o}var c=new te(i);return n?c=c.toKeyedSeq():l(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),c}function ln(e,t,n){var r=An(e);return r.__iterateUncached=function(r,i){var o=0,s=!1;function l(e,c){var u=this;e.__iterate(function(e,i){return(!t||c<t)&&a(e)?l(e,c+1):!1===r(e,n?i:o++,u)&&(s=!0),!s},i)}return l(e,0),o},r.__iteratorUncached=function(r,i){var o=e.__iterator(r,i),s=[],l=0;return new R(function(){for(;o;){var e=o.next();if(!1===e.done){var c=e.value;if(r===O&&(c=c[1]),t&&!(s.length<t)||!a(c))return n?e:q(r,l++,c,e);s.push(o),o=c.__iterator(r,i)}else o=s.pop()}return z()})},r}function cn(e,t,n){var r=vn(e);return e.toSeq().map(function(i,o){return r(t.call(n,i,o,e))}).flatten(!0)}function un(e,t){var n=An(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return e.__iterate(function(e,r){return(!o||!1!==n(t,o++,i))&&!1!==n(e,o++,i)},r),o},n.__iteratorUncached=function(n,r){var i,o=e.__iterator(P,r),a=0;return new R(function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?q(n,a++,t):q(n,a++,i.value,i)})},n}function dn(e,t,n){t||(t=wn);var r=s(e),i=0,o=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).toArray();return o.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),r?G(o):l(e)?Z(o):Y(o)}function hn(e,t,n){if(t||(t=wn),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return pn(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return pn(t,e,n)?n:e})}function pn(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function fn(e,t,r){var i=An(e);return i.size=new te(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(P,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=r.map(function(e){return e=n(e),U(i?e.reverse():e)}),a=0,s=!1;return new R(function(){var n;return s||(n=o.map(function(e){return e.next()}),s=n.some(function(e){return e.done})),s?z():q(e,a++,t.apply(null,n.map(function(e){return e.value})))})},i}function mn(e,t){return oe(e)?t:e.constructor(t)}function gn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function yn(e){return Ke(e.size),C(e)}function vn(e){return s(e)?r:l(e)?i:o}function An(e){return Object.create((s(e)?G:l(e)?Z:Y).prototype)}function bn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):W.prototype.cacheResult.call(this)}function wn(e,t){return e>t?1:e<t?-1:0}function xn(e){var t=U(e);if(!t){if(!Q(e))throw new TypeError("Expected iterable or array-like: "+e);t=U(n(e))}return t}function _n(e,t){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var a=Object.keys(e);kn(i,a),i.size=a.length,i._name=t,i._keys=a,i._defaultValues=e}this._map=Ue(o)},i=r.prototype=Object.create(Sn);return i.constructor=r,r}t(Ht,Ue),Ht.of=function(){return this(arguments)},Ht.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Ht.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Ht.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Vt()},Ht.prototype.set=function(e,t){return Qt(this,e,t)},Ht.prototype.remove=function(e){return Qt(this,e,A)},Ht.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Ht.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Ht.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Ht.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Ut(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Ht.isOrderedMap=Kt,Ht.prototype[f]=!0,Ht.prototype[m]=Ht.prototype.remove,t(Wt,G),Wt.prototype.get=function(e,t){return this._iter.get(e,t)},Wt.prototype.has=function(e){return this._iter.has(e)},Wt.prototype.valueSeq=function(){return this._iter.valueSeq()},Wt.prototype.reverse=function(){var e=this,t=Xt(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Wt.prototype.map=function(e,t){var n=this,r=$t(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Wt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?yn(this):0,function(i){return e(i,t?--n:n++,r)}),t)},Wt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(P,t),r=t?yn(this):0;return new R(function(){var i=n.next();return i.done?i:q(e,t?--r:r++,i.value,i)})},Wt.prototype[f]=!0,t(Gt,Z),Gt.prototype.includes=function(e){return this._iter.includes(e)},Gt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},Gt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(P,t),r=0;return new R(function(){var t=n.next();return t.done?t:q(e,r++,t.value,t)})},t(Zt,Y),Zt.prototype.has=function(e){return this._iter.includes(e)},Zt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},Zt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(P,t);return new R(function(){var t=n.next();return t.done?t:q(e,t.value,t.value,t)})},t(Yt,G),Yt.prototype.entrySeq=function(){return this._iter.toSeq()},Yt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){gn(t);var r=a(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},Yt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(P,t);return new R(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){gn(r);var i=a(r);return q(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},Gt.prototype.cacheResult=Wt.prototype.cacheResult=Zt.prototype.cacheResult=Yt.prototype.cacheResult=bn,t(_n,_e),_n.prototype.toString=function(){return this.__toString(Cn(this)+" {","}")},_n.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},_n.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},_n.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=En(this,it()))},_n.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Cn(this));if(this._map&&!this._map.has(e)&&t===this._defaultValues[e])return this;var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:En(this,n)},_n.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:En(this,t)},_n.prototype.wasAltered=function(){return this._map.wasAltered()},_n.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},_n.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},_n.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?En(this,t,e):(this.__ownerID=e,this._map=t,this)};var Sn=_n.prototype;function En(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function Cn(e){return e._name||e.constructor.name||"Record"}function kn(e,t){try{t.forEach(In.bind(void 0,e))}catch(e){}}function In(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){be(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function Dn(e){return null==e?Mn():Tn(e)&&!u(e)?e:Mn().withMutations(function(t){var n=o(e);Ke(n.size),n.forEach(function(e){return t.add(e)})})}function Tn(e){return!(!e||!e[Ln])}Sn[m]=Sn.remove,Sn.deleteIn=Sn.removeIn=Ge.removeIn,Sn.merge=Ge.merge,Sn.mergeWith=Ge.mergeWith,Sn.mergeIn=Ge.mergeIn,Sn.mergeDeep=Ge.mergeDeep,Sn.mergeDeepWith=Ge.mergeDeepWith,Sn.mergeDeepIn=Ge.mergeDeepIn,Sn.setIn=Ge.setIn,Sn.update=Ge.update,Sn.updateIn=Ge.updateIn,Sn.withMutations=Ge.withMutations,Sn.asMutable=Ge.asMutable,Sn.asImmutable=Ge.asImmutable,t(Dn,Ee),Dn.of=function(){return this(arguments)},Dn.fromKeys=function(e){return this(r(e).keySeq())},Dn.prototype.toString=function(){return this.__toString("Set {","}")},Dn.prototype.has=function(e){return this._map.has(e)},Dn.prototype.add=function(e){return Pn(this,this._map.set(e,!0))},Dn.prototype.remove=function(e){return Pn(this,this._map.remove(e))},Dn.prototype.clear=function(){return Pn(this,this._map.clear())},Dn.prototype.union=function(){var t=e.call(arguments,0);return t=t.filter(function(e){return 0!==e.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n<t.length;n++)o(t[n]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},Dn.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return o(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.every(function(e){return e.includes(n)})||e.remove(n)})})},Dn.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return o(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.some(function(e){return e.includes(n)})&&e.remove(n)})})},Dn.prototype.merge=function(){return this.union.apply(this,arguments)},Dn.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},Dn.prototype.sort=function(e){return jn(dn(this,e))},Dn.prototype.sortBy=function(e,t){return jn(dn(this,t,e))},Dn.prototype.wasAltered=function(){return this._map.wasAltered()},Dn.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t,r){return e(r,r,n)},t)},Dn.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t}).__iterator(e,t)},Dn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},Dn.isSet=Tn;var Nn,Ln="@@__IMMUTABLE_SET__@@",Bn=Dn.prototype;function Pn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function On(e,t){var n=Object.create(Bn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Mn(){return Nn||(Nn=On(it()))}function jn(e){return null==e?Hn():Fn(e)?e:Hn().withMutations(function(t){var n=o(e);Ke(n.size),n.forEach(function(e){return t.add(e)})})}function Fn(e){return Tn(e)&&u(e)}Bn[Ln]=!0,Bn[m]=Bn.remove,Bn.mergeDeep=Bn.merge,Bn.mergeDeepWith=Bn.mergeWith,Bn.withMutations=Ge.withMutations,Bn.asMutable=Ge.asMutable,Bn.asImmutable=Ge.asImmutable,Bn.__empty=Mn,Bn.__make=On,t(jn,Dn),jn.of=function(){return this(arguments)},jn.fromKeys=function(e){return this(r(e).keySeq())},jn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},jn.isOrderedSet=Fn;var Rn,qn=jn.prototype;function zn(e,t){var n=Object.create(qn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Hn(){return Rn||(Rn=zn(Vt()))}function Kn(e){return null==e?Zn():Un(e)?e:Zn().unshiftAll(e)}function Un(e){return!(!e||!e[Qn])}qn[f]=!0,qn.__empty=Hn,qn.__make=zn,t(Kn,Se),Kn.of=function(){return this(arguments)},Kn.prototype.toString=function(){return this.__toString("Stack [","]")},Kn.prototype.get=function(e,t){var n=this._head;for(e=k(this,e);n&&e--;)n=n.next;return n?n.value:t},Kn.prototype.peek=function(){return this._head&&this._head.value},Kn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Gn(e,t)},Kn.prototype.pushAll=function(e){if(0===(e=i(e)).size)return this;Ke(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Gn(t,n)},Kn.prototype.pop=function(){return this.slice(1)},Kn.prototype.unshift=function(){return this.push.apply(this,arguments)},Kn.prototype.unshiftAll=function(e){return this.pushAll(e)},Kn.prototype.shift=function(){return this.pop.apply(this,arguments)},Kn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Zn()},Kn.prototype.slice=function(e,t){if(D(e,t,this.size))return this;var n=T(e,this.size);if(N(t,this.size)!==this.size)return Se.prototype.slice.call(this,e,t);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Gn(r,i)},Kn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Gn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Kn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Kn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new R(function(){if(r){var t=r.value;return r=r.next,q(e,n++,t)}return z()})},Kn.isStack=Un;var Vn,Qn="@@__IMMUTABLE_STACK__@@",Wn=Kn.prototype;function Gn(e,t,n,r){var i=Object.create(Wn);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Zn(){return Vn||(Vn=Gn(0))}function Yn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}function Jn(e){return"string"==typeof e&&("__proto__"===e||"constructor"===e)}Wn[Qn]=!0,Wn.withMutations=Ge.withMutations,Wn.asMutable=Ge.asMutable,Wn.asImmutable=Ge.asImmutable,Wn.wasAltered=Ge.wasAltered,n.Iterator=R,Yn(n,{toArray:function(){Ke(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new Gt(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new Wt(this,!0)},toMap:function(){return Ue(this.toKeyedSeq())},toObject:function(){Ke(this.size);var e={};return this.__iterate(function(t,n){Jn(n)||(e[n]=t)}),e},toOrderedMap:function(){return Ht(this.toKeyedSeq())},toOrderedSet:function(){return jn(s(this)?this.valueSeq():this)},toSet:function(){return Dn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Zt(this)},toSeq:function(){return l(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Kn(s(this)?this.valueSeq():this)},toList:function(){return St(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return mn(this,sn(this,e.call(arguments,0)))},includes:function(e){return this.some(function(t){return ye(t,e)})},entries:function(){return this.__iterator(O)},every:function(e,t){Ke(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return mn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Ke(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Ke(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(B)},map:function(e,t){return mn(this,$t(this,e,t))},reduce:function(e,t,n){var r,i;return Ke(this.size),arguments.length<2?i=!0:r=t,this.__iterate(function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return mn(this,Xt(this,!0))},slice:function(e,t){return mn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(nr(e),t)},sort:function(e){return mn(this,dn(this,e))},values:function(){return this.__iterator(P)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return C(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return ve(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(tr).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(nr(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(I)},flatMap:function(e,t){return mn(this,cn(this,e,t))},flatten:function(e){return mn(this,ln(this,e,!0))},fromEntrySeq:function(){return new Yt(this)},get:function(e,t){return this.find(function(t,n){return ye(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=xn(e);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,A):A)===A)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,A)!==A},hasIn:function(e){return this.getIn(e,A)!==A},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return ye(t,e)})},keySeq:function(){return this.toSeq().map(er).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return hn(this,e)},maxBy:function(e,t){return hn(this,t,e)},min:function(e){return hn(this,e?rr(e):ar)},minBy:function(e,t){return hn(this,t?rr(t):ar,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return mn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return mn(this,an(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(nr(e),t)},sortBy:function(e,t){return mn(this,dn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return mn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return mn(this,on(this,e,t))},takeUntil:function(e,t){return this.takeWhile(nr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=sr(this))}});var $n=n.prototype;$n[d]=!0,$n[F]=$n.values,$n.__toJS=$n.toArray,$n.__toStringMapper=ir,$n.inspect=$n.toSource=function(){return this.toString()},$n.chain=$n.flatMap,$n.contains=$n.includes,Yn(r,{flip:function(){return mn(this,Jt(this))},mapEntries:function(e,t){var n=this,r=0;return mn(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return mn(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var Xn=r.prototype;function er(e,t){return t}function tr(e,t){return[t,e]}function nr(e){return function(){return!e.apply(this,arguments)}}function rr(e){return function(){return-e.apply(this,arguments)}}function ir(e){return"string"==typeof e?JSON.stringify(e):String(e)}function or(){return E(arguments)}function ar(e,t){return e<t?1:e>t?-1:0}function sr(e){if(e.size===1/0)return 0;var t=u(e),n=s(e),r=t?1:0,i=e.__iterate(n?t?function(e,t){r=31*r+cr(Ie(e),Ie(t))|0}:function(e,t){r=r+cr(Ie(e),Ie(t))|0}:t?function(e){r=31*r+Ie(e)|0}:function(e){r=r+Ie(e)|0});return lr(i,r)}function lr(e,t){return t=Ce(t,3432918353),t=Ce(t<<15|t>>>-15,461845907),t=Ce(t<<13|t>>>-13,5),t=Ce((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ke((t=Ce(t^t>>>13,3266489909))^t>>>16)}function cr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}Xn[h]=!0,Xn[F]=$n.entries,Xn.__toJS=$n.toObject,Xn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+ir(e)},Yn(i,{toKeyedSeq:function(){return new Wt(this,!1)},filter:function(e,t){return mn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return mn(this,Xt(this,!1))},slice:function(e,t){return mn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=T(e,e<0?this.count():this.size);var r=this.slice(0,e);return mn(this,1===n?r:r.concat(E(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return mn(this,ln(this,e,!1))},get:function(e,t){return(e=k(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=k(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return mn(this,un(this,e))},interleave:function(){var e=[this].concat(E(arguments)),t=fn(this.toSeq(),Z.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),mn(this,n)},keySeq:function(){return we(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(e,t){return mn(this,an(this,e,t,!1))},zip:function(){return mn(this,fn(this,or,[this].concat(E(arguments))))},zipWith:function(e){var t=E(arguments);return t[0]=this,mn(this,fn(this,e,t))}}),i.prototype[p]=!0,i.prototype[f]=!0,Yn(o,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),o.prototype.has=$n.includes,o.prototype.contains=o.prototype.includes,Yn(G,r.prototype),Yn(Z,i.prototype),Yn(Y,o.prototype),Yn(_e,r.prototype),Yn(Se,i.prototype),Yn(Ee,o.prototype);var ur={Iterable:n,Seq:W,Collection:xe,Map:Ue,OrderedMap:Ht,List:St,Stack:Kn,Set:Dn,OrderedSet:jn,Record:_n,Range:we,Repeat:Ae,is:ye,fromJS:pe};return ur}()),zs.exports}function Ks(){if(ia)return ra;ia=1;var e=Hs().OrderedMap;return ra={createFromArray:function(t){return e(t.map(function(e){return[e.getKey(),e]}))}}}function Us(){if(aa)return oa;aa=1;var e=Hs(),t=e.Map,n=e.OrderedSet,r=e.Record,i=n(),o={style:i,entity:null},a=function(e){var r,o;function a(){return e.apply(this,arguments)||this}o=e,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,r.__proto__=o;var c=a.prototype;return c.getStyle=function(){return this.get("style")},c.getEntity=function(){return this.get("entity")},c.hasStyle=function(e){return this.getStyle().includes(e)},a.applyStyle=function(e,t){var n=e.set("style",e.getStyle().add(t));return a.create(n)},a.removeStyle=function(e,t){var n=e.set("style",e.getStyle().remove(t));return a.create(n)},a.applyEntity=function(e,t){var n=e.getEntity()===t?e:e.set("entity",t);return a.create(n)},a.create=function(e){if(!e)return s;var n=t({style:i,entity:null}).merge(e),r=l.get(n);if(r)return r;var o=new a(n);return l=l.set(n,o),o},a.fromJS=function(e){var t=e.style,r=e.entity;return new a({style:Array.isArray(t)?n(t):t,entity:Array.isArray(r)?n(r):r})},a}(r(o)),s=new a,l=t([[t(o),s]]);return a.EMPTY=s,oa=a}function Vs(){if(la)return sa;return la=1,sa=function(e,t,n,r){if(e.size){var i=0;e.reduce(function(e,o,a){return t(e,o)||(n(e)&&r(i,a),i=a),o}),n(e.last())&&r(i,e.count())}}}function Qs(){if(ua)return ca;ua=1;var e=Us(),t=Vs(),n=Hs(),r=n.List,i=n.Map,o=n.OrderedSet,a=n.Record,s=n.Repeat,l=o(),c=a({key:"",type:"unstyled",text:"",characterList:r(),depth:0,data:i()}),u=function(n){var i,o;function a(t){return n.call(this,function(t){if(!t)return t;var n=t.characterList,i=t.text;return i&&!n&&(t.characterList=r(s(e.EMPTY,i.length))),t}(t))||this}o=n,(i=a).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var c=a.prototype;return c.getKey=function(){return this.get("key")},c.getType=function(){return this.get("type")},c.getText=function(){return this.get("text")},c.getCharacterList=function(){return this.get("characterList")},c.getLength=function(){return this.getText().length},c.getDepth=function(){return this.get("depth")},c.getData=function(){return this.get("data")},c.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():l},c.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},c.findStyleRanges=function(e,n){t(this.getCharacterList(),d,e,n)},c.findEntityRanges=function(e,n){t(this.getCharacterList(),h,e,n)},a}(c);function d(e,t){return e.getStyle()===t.getStyle()}function h(e,t){return e.getEntity()===t.getEntity()}return ca=u}function Ws(){if(ha)return da;ha=1;var e=Us(),t=Vs(),n=Hs(),r=n.List,i=n.Map,o=n.OrderedSet,a=n.Record,s=n.Repeat,l=o(),c={parent:null,characterList:r(),data:i(),depth:0,key:"",text:"",type:"unstyled",children:r(),prevSibling:null,nextSibling:null},u=function(e,t){return e.getStyle()===t.getStyle()},d=function(e,t){return e.getEntity()===t.getEntity()},h=function(n){var i,o;function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c;return n.call(this,function(t){if(!t)return t;var n=t.characterList,i=t.text;return i&&!n&&(t.characterList=r(s(e.EMPTY,i.length))),t}(t))||this}o=n,(i=a).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var h=a.prototype;return h.getKey=function(){return this.get("key")},h.getType=function(){return this.get("type")},h.getText=function(){return this.get("text")},h.getCharacterList=function(){return this.get("characterList")},h.getLength=function(){return this.getText().length},h.getDepth=function(){return this.get("depth")},h.getData=function(){return this.get("data")},h.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():l},h.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},h.getChildKeys=function(){return this.get("children")},h.getParentKey=function(){return this.get("parent")},h.getPrevSiblingKey=function(){return this.get("prevSibling")},h.getNextSiblingKey=function(){return this.get("nextSibling")},h.findStyleRanges=function(e,n){t(this.getCharacterList(),u,e,n)},h.findEntityRanges=function(e,n){t(this.getCharacterList(),d,e,n)},a}(a(c));return da=h}function Gs(){if(va)return ya;va=1;var e=function(){if(ga)return ma;ga=1;var e=Us();return ma=function(t,n,r,i){for(var o=n,a=t.getCharacterList();o<r;)a=a.set(o,e.applyEntity(a.get(o),i)),o++;return t.set("characterList",a)}}(),t=Hs();return ya=function(n,r,i){var o=n.getBlockMap(),a=r.getStartKey(),s=r.getStartOffset(),l=r.getEndKey(),c=r.getEndOffset(),u=o.skipUntil(function(e,t){return t===a}).takeUntil(function(e,t){return t===l}).toOrderedMap().merge(t.OrderedMap([[l,o.get(l)]])).map(function(t,n){var r=n===a?s:0,o=n===l?c:t.getLength();return e(t,r,o,i)});return n.merge({blockMap:o.merge(u),selectionBefore:r,selectionAfter:r})},ya}function Zs(){if(xa)return wa;return xa=1,wa=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(!e){var o;if(void 0===t)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;(o=new Error(t.replace(/%s/g,function(){return String(r[a++])}))).name="Invariant Violation"}throw o.framesToPop=1,o}},wa}function Ys(){if(Ca)return Ea;Ca=1;var e=(ba||(ba=1,Aa={getRemovalRange:function(e,t,n,r,i){var o=n.split(" ");o=o.map(function(e,t){if("forward"===i){if(t>0)return" "+e}else if(t<o.length-1)return e+" ";return e});for(var a,s=r,l=null,c=null,u=0;u<o.length;u++){if(e<(a=s+o[u].length)&&s<t)null!==l||(l=s),c=a;else if(null!==l)break;s=a}var d=r+n.length,h=l===r,p=c===d;return(!h&&p||h&&!p)&&("forward"===i?c!==d&&c++:l!==r&&l--),{start:l,end:c}}}),Aa),t=function(){if(Sa)return _a;Sa=1;var e=Zs();return _a=function(t,n){var r=[];return t.findEntityRanges(function(e){return e.getEntity()===n},function(e,t){r.push({start:e,end:t})}),r.length||e(!1),r}}(),n=Zs();function r(r,i,o,a,s,l,c){var u=o.getStartOffset(),d=o.getEndOffset(),h=r.__get(s).getMutability(),p=c?u:d;if("MUTABLE"===h)return o;var f=t(i,s).filter(function(e){return p<=e.end&&p>=e.start});1!=f.length&&n(!1);var m=f[0];if("IMMUTABLE"===h)return o.merge({anchorOffset:m.start,focusOffset:m.end,isBackward:!1});l||(c?d=m.end:u=m.start);var g=e.getRemovalRange(u,d,i.getText().slice(m.start,m.end),m.start,a);return o.merge({anchorOffset:g.start,focusOffset:g.end,isBackward:!1})}return Ea=function(e,t,n,i,o){var a=i.getStartOffset(),s=i.getEndOffset(),l=t.getEntityAt(a),c=n.getEntityAt(s-1);if(!l&&!c)return i;var u=i;if(l&&l===c)u=r(e,t,u,o,l,!0,!0);else if(l&&c){var d=r(e,t,u,o,l,!1,!0),h=r(e,n,u,o,c,!1,!1);u=u.merge({anchorOffset:d.getAnchorOffset(),focusOffset:h.getFocusOffset(),isBackward:!1})}else if(l){var p=r(e,t,u,o,l,!1,!0);u=u.merge({anchorOffset:p.getStartOffset(),isBackward:!1})}else if(c){var f=r(e,n,u,o,c,!1,!1);u=u.merge({focusOffset:f.getEndOffset(),isBackward:!1})}return u}}function Js(){if(Ia)return ka;Ia=1;var e={},t=Math.pow(2,24);return ka=function(){for(var n;void 0===n||e.hasOwnProperty(n)||!isNaN(+n);)n=Math.floor(Math.random()*t).toString(32);return e[n]=!0,n}}function $s(){if(Ta)return Da;Ta=1;var e=Ws(),t=Js(),n=Hs().OrderedMap;return Da=function(r){return r.first()instanceof e?function(e){var r,i={};return n(e.withMutations(function(e){e.forEach(function(n,o){var a=n.getKey(),s=n.getNextSiblingKey(),l=n.getPrevSiblingKey(),c=n.getChildKeys(),u=n.getParentKey(),d=t();if(i[a]=d,s&&(e.get(s)?e.setIn([s,"prevSibling"],d):e.setIn([a,"nextSibling"],null)),l&&(e.get(l)?e.setIn([l,"nextSibling"],d):e.setIn([a,"prevSibling"],null)),u&&e.get(u)){var h=e.get(u).getChildKeys();e.setIn([u,"children"],h.set(h.indexOf(n.getKey()),d))}else e.setIn([a,"parent"],null),r&&(e.setIn([r.getKey(),"nextSibling"],d),e.setIn([a,"prevSibling"],i[r.getKey()])),r=e.get(a);c.forEach(function(t){e.get(t)?e.setIn([t,"parent"],d):e.setIn([a,"children"],n.getChildKeys().filter(function(e){return e!==t}))})})}).toArray().map(function(e){return[i[e.getKey()],e.set("key",i[e.getKey()])]}))}(r):function(e){return n(e.toArray().map(function(e){var n=t();return[n,e.set("key",n)]}))}(r)}}function Xs(){if(La)return Na;La=1;var e=Us(),t=Vs(),n=Zs();function r(r,i,o){var a=i.getCharacterList(),s=o>0?a.get(o-1):void 0,l=o<a.count()?a.get(o):void 0,c=s?s.getEntity():void 0,u=l?l.getEntity():void 0;if(u&&u===c&&"MUTABLE"!==r.__get(u).getMutability()){for(var d,h=function(e,r,i){var o;return t(e,function(e,t){return e.getEntity()===t.getEntity()},function(e){return e.getEntity()===r},function(e,t){e<=i&&t>=i&&(o={start:e,end:t})}),"object"!=typeof o&&n(!1),o}(a,u,o),p=h.start,f=h.end;p<f;)d=a.get(p),a=a.set(p,e.applyEntity(d,null)),p++;return i.set("characterList",a)}return i}return Na=function(e,t){var n=e.getBlockMap(),i=e.getEntityMap(),o={},a=t.getStartKey(),s=t.getStartOffset(),l=n.get(a),c=r(i,l,s);c!==l&&(o[a]=c);var u=t.getEndKey(),d=t.getEndOffset(),h=n.get(u);a===u&&(h=c);var p=r(i,h,d);return p!==h&&(o[u]=p),Object.keys(o).length?e.merge({blockMap:n.merge(o),selectionAfter:t}):e.set("selectionAfter",t)}}function el(){if(Pa)return Ba;Pa=1;var e=$s(),t=Xs();return Ba=function(n,r){var i=r.getStartKey(),o=r.getStartOffset(),a=r.getEndKey(),s=r.getEndOffset(),l=t(n,r).getBlockMap(),c=l.keySeq(),u=c.indexOf(i),d=c.indexOf(a)+1;return e(l.slice(u,d).map(function(e,t){var n=e.getText(),r=e.getCharacterList();return i===a?e.merge({text:n.slice(o,s),characterList:r.slice(o,s)}):t===i?e.merge({text:n.slice(o),characterList:r.slice(o)}):t===a?e.merge({text:n.slice(0,s),characterList:r.slice(0,s)}):e}))}}function tl(){if(Ma)return Oa;return Ma=1,Oa=function(e,t,n){var r=e;if(n===r.count())t.forEach(function(e){r=r.push(e)});else if(0===n)t.reverse().forEach(function(e){r=r.unshift(e)});else{var i=r.slice(0,n),o=r.slice(n);r=i.concat(t,o).toList()}return r}}function nl(){if(Fa)return ja;Fa=1;var e=Ks(),t=Ws(),n=Hs(),r=tl(),i=Zs(),o=$s(),a=n.List,s=function(n,r,i,o,s,l){var c=i.first()instanceof t,u=[],d=o.size,h=i.get(s),p=o.first(),f=o.last(),m=f.getLength(),g=f.getKey(),y=c&&(!h.getChildKeys().isEmpty()||!p.getChildKeys().isEmpty());i.forEach(function(e,t){t===s?(y?u.push(e):u.push(function(e,t,n){var r=e.getText(),i=e.getCharacterList(),o=r.slice(0,t),a=i.slice(0,t),s=n.first();return e.merge({text:o+s.getText(),characterList:a.concat(s.getCharacterList()),type:o?e.getType():s.getType(),data:s.getData()})}(e,l,o)),o.slice(y?0:1,d-1).forEach(function(e){return u.push(e)}),u.push(function(e,t,n){var r=e.getText(),i=e.getCharacterList(),o=r.length,a=r.slice(t,o),s=i.slice(t,o),l=n.last();return l.merge({text:l.getText()+a,characterList:l.getCharacterList().concat(s),data:l.getData()})}(e,l,o))):u.push(e)});var v=e.createFromArray(u);return c&&(v=function(e,t,n,r){return e.withMutations(function(t){var i=n.getKey(),o=r.getKey(),s=n.getNextSiblingKey(),l=n.getParentKey(),c=function(e,t){var n=e.getKey(),r=e,i=[];for(t.get(n)&&i.push(n);r&&r.getNextSiblingKey();){var o=r.getNextSiblingKey();if(!o)break;i.push(o),r=t.get(o)}return i}(r,e),u=c[c.length-1];if(t.get(o)?(t.setIn([i,"nextSibling"],o),t.setIn([o,"prevSibling"],i)):(t.setIn([i,"nextSibling"],r.getNextSiblingKey()),t.setIn([r.getNextSiblingKey(),"prevSibling"],i)),t.setIn([u,"nextSibling"],s),s&&t.setIn([s,"prevSibling"],u),c.forEach(function(e){return t.setIn([e,"parent"],l)}),l){var d=e.get(l).getChildKeys(),h=d.indexOf(i)+1,p=d.toArray();p.splice.apply(p,[h,0].concat(c)),t.setIn([l,"children"],a(p))}})}(v,0,h,p)),n.merge({blockMap:v,selectionBefore:r,selectionAfter:r.merge({anchorKey:g,anchorOffset:m,focusKey:g,focusOffset:m,isBackward:!1})})};return ja=function(e,n,a){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA";n.isCollapsed()||i(!1);var c=e.getBlockMap(),u=o(a),d=n.getStartKey(),h=n.getStartOffset(),p=c.get(d);return p instanceof t&&(p.getChildKeys().isEmpty()||i(!1)),1===u.size?function(e,t,n,i,o,a){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",l=n.get(o),c=l.getText(),u=l.getCharacterList(),d=o,h=a+i.getText().length,p=null;switch(s){case"MERGE_OLD_DATA_TO_NEW_DATA":p=i.getData().merge(l.getData());break;case"REPLACE_WITH_NEW_DATA":p=i.getData()}var f=l.getType();c&&"unstyled"===f&&(f=i.getType());var m=l.merge({text:c.slice(0,a)+i.getText()+c.slice(a),characterList:r(u,i.getCharacterList(),a),type:f,data:p});return e.merge({blockMap:n.set(o,m),selectionBefore:t,selectionAfter:t.merge({anchorKey:d,anchorOffset:h,focusKey:d,focusOffset:h,isBackward:!1})})}(e,n,c,u.first(),d,h,l):s(e,n,c,u,d,h)},ja}function rl(){if(Ha)return za;Ha=1;var e=Hs().Map;return za=function(t,n,r){var i=n.getStartKey(),o=n.getEndKey(),a=t.getBlockMap(),s=a.toSeq().skipUntil(function(e,t){return t===i}).takeUntil(function(e,t){return t===o}).concat(e([[o,a.get(o)]])).map(r);return t.merge({blockMap:a.merge(s),selectionBefore:n,selectionAfter:n})},za}function il(){if(Ua)return Ka;Ua=1;var e=Ws();return Ka=function(t,n){if(!(t instanceof e))return null;var r=t.getNextSiblingKey();if(r)return r;var i=t.getParentKey();if(!i)return null;for(var o=n.get(i);o&&!o.getNextSiblingKey();){var a=o.getParentKey();o=a?n.get(a):null}return o?o.getNextSiblingKey():null}}function ol(){if(Qa)return Va;Qa=1;var e=Ws(),t=il(),n=Hs();n.List;var r=n.Map,i=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},o=function(e,t){var n=[];if(!e)return n;for(var r=t.get(e);r&&r.getParentKey();){var i=r.getParentKey();i&&n.push(i),r=i?t.get(i):null}return n},a=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getNextSiblingKey();r&&!t.get(r);)r=n.get(r).getNextSiblingKey()||null;return r},s=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getPrevSiblingKey();r&&!t.get(r);)r=n.get(r).getPrevSiblingKey()||null;return r},l=function(e,n,r,l){return e.withMutations(function(c){if(i(n.getKey(),c,function(e){return e.merge({nextSibling:a(e,c,l),prevSibling:s(e,c,l)})}),i(r.getKey(),c,function(e){return e.merge({nextSibling:a(e,c,l),prevSibling:s(e,c,l)})}),o(n.getKey(),l).forEach(function(e){return i(e,c,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return c.get(e)}),nextSibling:a(e,c,l),prevSibling:s(e,c,l)})})}),i(n.getNextSiblingKey(),c,function(e){return e.merge({prevSibling:n.getPrevSiblingKey()})}),i(n.getPrevSiblingKey(),c,function(e){return e.merge({nextSibling:a(e,c,l)})}),i(r.getNextSiblingKey(),c,function(e){return e.merge({prevSibling:s(e,c,l)})}),i(r.getPrevSiblingKey(),c,function(e){return e.merge({nextSibling:r.getNextSiblingKey()})}),o(r.getKey(),l).forEach(function(e){i(e,c,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return c.get(e)}),nextSibling:a(e,c,l),prevSibling:s(e,c,l)})})}),function(e,n){var r=[];if(!e)return r;for(var i=t(e,n);i&&n.get(i);){var o=n.get(i);r.push(i),i=o.getParentKey()?t(o,n):null}return r}(r,l).forEach(function(e){return i(e,c,function(e){return e.merge({nextSibling:a(e,c,l),prevSibling:s(e,c,l)})})}),null==e.get(n.getKey())&&null!=e.get(r.getKey())&&r.getParentKey()===n.getKey()&&null==r.getPrevSiblingKey()){var u=n.getPrevSiblingKey();i(r.getKey(),c,function(e){return e.merge({prevSibling:u})}),i(u,c,function(e){return e.merge({nextSibling:r.getKey()})});var d=u?e.get(u):null,h=d?d.getParentKey():null;if(n.getChildKeys().forEach(function(e){i(e,c,function(e){return e.merge({parent:h})})}),null!=h){var p=e.get(h);i(h,c,function(e){return e.merge({children:p.getChildKeys().concat(n.getChildKeys())})})}i(n.getChildKeys().find(function(t){return null===e.get(t).getNextSiblingKey()}),c,function(e){return e.merge({nextSibling:n.getNextSiblingKey()})})}})},c=function(e,t,n){if(0===t)for(;t<n;)e=e.shift(),t++;else if(n===e.count())for(;n>t;)e=e.pop(),n--;else{var r=e.slice(0,t),i=e.slice(n);e=r.concat(i).toList()}return e};return Va=function(n,i){if(i.isCollapsed())return n;var a,s=n.getBlockMap(),u=i.getStartKey(),d=i.getStartOffset(),h=i.getEndKey(),p=i.getEndOffset(),f=s.get(u),m=s.get(h),g=f instanceof e,y=[];if(g){var v=m.getChildKeys(),A=o(h,s);m.getNextSiblingKey()&&(y=y.concat(A)),v.isEmpty()||(y=y.concat(A.concat([h]))),y=y.concat(o(t(m,s),s))}a=f===m?c(f.getCharacterList(),d,p):f.getCharacterList().slice(0,d).concat(m.getCharacterList().slice(p));var b=f.merge({text:f.getText().slice(0,d)+m.getText().slice(p),characterList:a}),w=g&&0===d&&0===p&&m.getParentKey()===u&&null==m.getPrevSiblingKey()?r([[u,null]]):s.toSeq().skipUntil(function(e,t){return t===u}).takeUntil(function(e,t){return t===h}).filter(function(e,t){return-1===y.indexOf(t)}).concat(r([[h,null]])).map(function(e,t){return t===u?b:null}),x=s.merge(w).filter(function(e){return!!e});return g&&f!==m&&(x=l(x,f,m,s)),n.merge({blockMap:x,selectionBefore:i,selectionAfter:i.merge({anchorKey:u,anchorOffset:d,focusKey:u,focusOffset:d,isBackward:!1})})},Va}function al(){if(Ga)return Wa;Ga=1;var e=Ws(),t=Js(),n=Hs(),r=Zs(),i=rl(),o=n.List,a=n.Map,s=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}};return Wa=function(n,l){l.isCollapsed()||r(!1);var c=l.getAnchorKey(),u=n.getBlockMap(),d=u.get(c),h=d.getText();if(!h){var p=d.getType();if("unordered-list-item"===p||"ordered-list-item"===p)return i(n,l,function(e){return e.merge({type:"unstyled",depth:0})})}var f=l.getAnchorOffset(),m=d.getCharacterList(),g=t(),y=d instanceof e,v=d.merge({text:h.slice(0,f),characterList:m.slice(0,f)}),A=v.merge({key:g,text:h.slice(f),characterList:m.slice(f),data:a()}),b=u.toSeq().takeUntil(function(e){return e===d}),w=u.toSeq().skipUntil(function(e){return e===d}).rest(),x=b.concat([[c,v],[g,A]],w).toOrderedMap();return y&&(d.getChildKeys().isEmpty()||r(!1),x=function(e,t,n){return e.withMutations(function(e){var r=t.getKey(),i=n.getKey();s(t.getParentKey(),e,function(e){var t=e.getChildKeys(),n=t.indexOf(r)+1,a=t.toArray();return a.splice(n,0,i),e.merge({children:o(a)})}),s(t.getNextSiblingKey(),e,function(e){return e.merge({prevSibling:i})}),s(r,e,function(e){return e.merge({nextSibling:i})}),s(i,e,function(e){return e.merge({prevSibling:r})})})}(x,v,A)),n.merge({blockMap:x,selectionBefore:l,selectionAfter:l.merge({anchorKey:g,anchorOffset:0,focusKey:g,focusOffset:0,isBackward:!1})})},Wa}function sl(){if(Ya)return Za;Ya=1;var e=Us(),t=function(){if(fa)return pa;fa=1;var e=Us(),t=Hs().Map;function n(n,r,i,o){var a=n.getBlockMap(),s=r.getStartKey(),l=r.getStartOffset(),c=r.getEndKey(),u=r.getEndOffset(),d=a.skipUntil(function(e,t){return t===s}).takeUntil(function(e,t){return t===c}).concat(t([[c,a.get(c)]])).map(function(t,n){var r,a;s===c?(r=l,a=u):(r=n===s?l:0,a=n===c?u:t.getLength());for(var d,h=t.getCharacterList();r<a;)d=h.get(r),h=h.set(r,o?e.applyStyle(d,i):e.removeStyle(d,i)),r++;return t.set("characterList",h)});return n.merge({blockMap:a.merge(d),selectionBefore:r,selectionAfter:r})}return pa={add:function(e,t,r){return n(e,t,r,!0)},remove:function(e,t,r){return n(e,t,r,!1)}}}(),n=Gs(),r=Ys(),i=el(),o=Hs(),a=nl(),s=function(){if(qa)return Ra;qa=1;var e=Hs(),t=tl(),n=Zs(),r=e.Repeat;return Ra=function(e,i,o,a){i.isCollapsed()||n(!1);var s=null;if(null!=o&&(s=o.length),null==s||0===s)return e;var l=e.getBlockMap(),c=i.getStartKey(),u=i.getStartOffset(),d=l.get(c),h=d.getText(),p=d.merge({text:h.slice(0,u)+o+h.slice(u,d.getLength()),characterList:t(d.getCharacterList(),r(a,s).toList(),u)}),f=u+s;return e.merge({blockMap:l.set(c,p),selectionAfter:i.merge({anchorOffset:f,focusOffset:f})})}}(),l=Zs(),c=rl(),u=Xs(),d=ol(),h=al(),p=o.OrderedSet,f={replaceText:function(t,n,r,i,o){var a=u(t,n),l=d(a,n),c=e.create({style:i||p(),entity:o||null});return s(l,l.getSelectionAfter(),r,c)},insertText:function(e,t,n,r,i){return t.isCollapsed()||l(!1),f.replaceText(e,t,n,r,i)},moveText:function(e,t,n){var r=i(e,t),o=f.removeRange(e,t,"backward");return f.replaceWithFragment(o,n,r)},replaceWithFragment:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",i=u(e,t),o=d(i,t);return a(o,o.getSelectionAfter(),n,r)},removeRange:function(e,t,n){var i,o,a,s;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),i=t.getAnchorKey(),o=t.getFocusKey(),a=e.getBlockForKey(i),s=e.getBlockForKey(o);var l=t.getStartOffset(),c=t.getEndOffset(),h=a.getEntityAt(l),p=s.getEntityAt(c-1);if(i===o&&h&&h===p){var f=r(e.getEntityMap(),a,s,t,n);return d(e,f)}var m=u(e,t);return d(m,t)},splitBlock:function(e,t){var n=u(e,t),r=d(n,t);return h(r,r.getSelectionAfter())},applyInlineStyle:function(e,n,r){return t.add(e,n,r)},removeInlineStyle:function(e,n,r){return t.remove(e,n,r)},setBlockType:function(e,t,n){return c(e,t,function(e){return e.merge({type:n,depth:0})})},setBlockData:function(e,t,n){return c(e,t,function(e){return e.merge({data:n})})},mergeBlockData:function(e,t,n){return c(e,t,function(e){return e.merge({data:e.getData().merge(n)})})},applyEntity:function(e,t,r){var i=u(e,t);return n(i,t,r)}};return Za=f}function ll(){if($a)return Ja;return $a=1,Ja=function(e){return Object.keys(e).map(function(t){return e[t]})}}function cl(){if(es)return Xa;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}es=1;var t=Vs(),n=ll(),r=Hs(),i=r.List,o=r.Repeat,a=r.Record,s=function(){return!0},l=a({start:null,end:null}),c=a({start:null,end:null,decoratorKey:null,leaves:null}),u={generate:function(e,n,r){var a=n.getLength();if(!a)return i.of(new c({start:0,end:0,decoratorKey:null,leaves:i.of(new l({start:0,end:0}))}));var u=[],p=r?r.getDecorations(n,e):i(o(null,a)),f=n.getCharacterList();return t(p,h,s,function(e,t){u.push(new c({start:e,end:t,decoratorKey:p.get(e),leaves:d(f.slice(e,t).toList(),e)}))}),i(u)},fromJS:function(t){var r=t.leaves,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["leaves"]);return new c(function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},o,{leaves:null!=r?i(Array.isArray(r)?r:n(r)).map(function(e){return l(e)}):null}))}};function d(e,n){var r=[],o=e.map(function(e){return e.getStyle()}).toList();return t(o,h,s,function(e,t){r.push(new l({start:e+n,end:t+n}))}),i(r)}function h(e,t){return e===t}return Xa=u}function ul(){if(ns)return ts;ns=1;var e=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getType=function(){return this.get("type")},i.getMutability=function(){return this.get("mutability")},i.getData=function(){return this.get("data")},r}((0,Hs().Record)({type:"TOKEN",mutability:"IMMUTABLE",data:Object}));return ts=e}function dl(){if(as)return os;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}as=1;var t=ul(),n=Hs(),r=Zs(),i=is?rs:(is=1,rs=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}),o=(0,n.Map)(),a=i();function s(e,t){console.warn("WARNING: "+e+' will be deprecated soon!\nPlease use "'+t+'" instead.')}var l={getLastCreatedEntityKey:function(){return s("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),l.__getLastCreatedEntityKey()},create:function(e,t,n){return s("DraftEntity.create","contentState.createEntity"),l.__create(e,t,n)},add:function(e){return s("DraftEntity.add","contentState.addEntity"),l.__add(e)},get:function(e){return s("DraftEntity.get","contentState.getEntity"),l.__get(e)},__getAll:function(){return o},__loadWithEntities:function(e){o=e,a=i()},mergeData:function(e,t){return s("DraftEntity.mergeData","contentState.mergeEntityData"),l.__mergeData(e,t)},replaceData:function(e,t){return s("DraftEntity.replaceData","contentState.replaceEntityData"),l.__replaceData(e,t)},__getLastCreatedEntityKey:function(){return a},__create:function(e,n,r){return l.__add(new t({type:e,mutability:n,data:r||{}}))},__add:function(e){return a=i(),o=o.set(a,e),a},__get:function(e){var t=o.get(e);return t||r(!1),t},__mergeData:function(t,n){var r=l.__get(t),i=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},r.getData(),n),a=r.set("data",i);return o=o.set(t,a),a},__replaceData:function(e,t){var n=l.__get(e).set("data",t);return o=o.set(e,n),n}};return os=l}function hl(){if(ls)return ss;ls=1;var e=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},i.getAnchorKey=function(){return this.get("anchorKey")},i.getAnchorOffset=function(){return this.get("anchorOffset")},i.getFocusKey=function(){return this.get("focusKey")},i.getFocusOffset=function(){return this.get("focusOffset")},i.getIsBackward=function(){return this.get("isBackward")},i.getHasFocus=function(){return this.get("hasFocus")},i.hasEdgeWithin=function(e,t,n){var r=this.getAnchorKey(),i=this.getFocusKey();if(r===i&&r===e){var o=this.getStartOffset(),a=this.getEndOffset();return t<=o&&o<=n||t<=a&&a<=n}if(e!==r&&e!==i)return!1;var s=e===r?this.getAnchorOffset():this.getFocusOffset();return t<=s&&n>=s},i.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},i.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},i.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},i.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},i.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},r.createEmpty=function(e){return new r({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},r}((0,Hs().Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));return ss=e}function pl(){return us?cs:(us=1,cs=function(e){return!("undefined"==typeof window||!window.__DRAFT_GKX)&&!!window.__DRAFT_GKX[e]})}function fl(){if(hs)return ds;hs=1;var e=new RegExp("\r","g");return ds=function(t){return t.replace(e,"")}}function ml(){if(fs)return ps;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}fs=1;var n=Ks(),r=Us(),i=Qs(),o=Ws(),a=dl(),s=hl(),l=Js(),c=ll(),u=pl(),d=Hs(),h=fl(),p=d.List,f=d.Record,m=d.Repeat,g=d.Map,y=d.OrderedMap,v=f({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}),A=u("draft_tree_data_support")?o:i,b=function(t){var i,o;function u(){return t.apply(this,arguments)||this}o=t,(i=u).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var d=u.prototype;return d.getEntityMap=function(){return a},d.getBlockMap=function(){return this.get("blockMap")},d.getSelectionBefore=function(){return this.get("selectionBefore")},d.getSelectionAfter=function(){return this.get("selectionAfter")},d.getBlockForKey=function(e){return this.getBlockMap().get(e)},d.getKeyBefore=function(e){return this.getBlockMap().reverse().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},d.getKeyAfter=function(e){return this.getBlockMap().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},d.getBlockAfter=function(e){return this.getBlockMap().skipUntil(function(t,n){return n===e}).skip(1).first()},d.getBlockBefore=function(e){return this.getBlockMap().reverse().skipUntil(function(t,n){return n===e}).skip(1).first()},d.getBlocksAsArray=function(){return this.getBlockMap().toArray()},d.getFirstBlock=function(){return this.getBlockMap().first()},d.getLastBlock=function(){return this.getBlockMap().last()},d.getPlainText=function(e){return this.getBlockMap().map(function(e){return e?e.getText():""}).join(e||"\n")},d.getLastCreatedEntityKey=function(){return a.__getLastCreatedEntityKey()},d.hasText=function(){var e=this.getBlockMap();return e.size>1||escape(e.first().getText()).replace(/%u200B/g,"").length>0},d.createEntity=function(e,t,n){return a.__create(e,t,n),this},d.mergeEntityData=function(e,t){return a.__mergeData(e,t),this},d.replaceEntityData=function(e,t){return a.__replaceData(e,t),this},d.addEntity=function(e){return a.__add(e),this},d.getEntity=function(e){return a.__get(e)},d.getAllEntities=function(){return a.__getAll()},d.loadWithEntities=function(e){return a.__loadWithEntities(e)},u.createFromBlockArray=function(e,t){var r=Array.isArray(e)?e:e.contentBlocks,i=n.createFromArray(r),o=i.isEmpty()?new s:s.createEmpty(i.first().getKey());return new u({blockMap:i,entityMap:t||a,selectionBefore:o,selectionAfter:o})},u.createFromText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,n=e.split(t).map(function(e){return e=h(e),new A({key:l(),text:e,type:"unstyled",characterList:p(m(r.EMPTY,e.length))})});return u.createFromBlockArray(n)},u.fromJS=function(t){return new u(e({},t,{blockMap:y(t.blockMap).map(u.createContentBlockFromJS),selectionBefore:new s(t.selectionBefore),selectionAfter:new s(t.selectionAfter)}))},u.createContentBlockFromJS=function(t){var n=t.characterList;return new A(e({},t,{data:g(t.data),characterList:null!=n?p((Array.isArray(n)?n:c(n)).map(function(e){return r.fromJS(e)})):void 0}))},u}(v);return ps=b}function gl(){if(gs)return ms;gs=1;var e=Zs(),t="LTR",n=null;function r(e){return e===t||"RTL"===e}function i(n){return r(n)||e(!1),n===t?"ltr":"rtl"}function o(e){n=e}return ms={NEUTRAL:"NEUTRAL",LTR:t,RTL:"RTL",isStrong:r,getHTMLDir:i,getHTMLDirIfDifferent:function(t,n){return r(t)||e(!1),r(n)||e(!1),t===n?null:i(t)},setGlobalDir:o,initGlobalDir:function(){o(t)},getGlobalDir:function(){return n||this.initGlobalDir(),n||e(!1),n}}}function yl(){if(vs)return ys;vs=1;var e=gl(),t=Zs(),n="֐־׀׃׆׈-׏א-ת׫-ׯװ-ײ׳-״׵-׿߀-߉ߊ-ߪߴ-ߵߺ߻-߿ࠀ-ࠕࠚࠤࠨ࠮-࠯࠰-࠾࠿ࡀ-ࡘ࡜-࡝࡞࡟-࢟‏יִײַ-ﬨשׁ-זּ﬷טּ-לּ﬽מּ﬿נּ-סּ﭂ףּ-פּ﭅צּ-ﭏ",r="؈؋؍؛؜؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍܎܏ܐܒ-ܯ݋-݌ݍ-ޥޱ޲-޿ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-﯒ﯓ-ﴽ﵀-﵏ﵐ-ﶏ﶐-﶑ﶒ-ﷇ﷈-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴ﹵ﹶ-ﻼ﻽-﻾",i=new RegExp("["+"A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+n+r+"]"),o=new RegExp("["+n+r+"]");function a(e){var t=i.exec(e);return null==t?null:t[0]}function s(t){var n=a(t);return null==n?e.NEUTRAL:o.exec(n)?e.RTL:e.LTR}function l(t,n){if(n=n||e.NEUTRAL,!t.length)return n;var r=s(t);return r===e.NEUTRAL?n:r}function c(n,r){return r||(r=e.getGlobalDir()),e.isStrong(r)||t(!1),l(n,r)}return ys={firstStrongChar:a,firstStrongCharDir:s,resolveBlockDir:l,getDirection:c,isDirectionLTR:function(t,n){return c(t,n)===e.LTR},isDirectionRTL:function(t,n){return c(t,n)===e.RTL}}}function vl(){if(xs)return ws;xs=1;return ws=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")},ws}function Al(){if(Ss)return _s;Ss=1;var e,t=function(){if(bs)return As;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}bs=1;var t=yl(),n=gl(),r=Zs();return As=function(){function i(t){e(this,"_defaultDir",void 0),e(this,"_lastDir",void 0),t?n.isStrong(t)||r(!1):t=n.getGlobalDir(),this._defaultDir=t,this.reset()}var o=i.prototype;return o.reset=function(){this._lastDir=this._defaultDir},o.getDirection=function(e){return this._lastDir=t.getDirection(e,this._lastDir),this._lastDir},i}()}(),n=Hs(),r=vl(),i=n.OrderedMap;return _s={getDirectionMap:function(o,a){e?e.reset():e=new t;var s=o.getBlockMap(),l=s.valueSeq().map(function(t){return r(e).getDirection(t.getText())}),c=i(s.keySeq().zip(l));return null!=a&&n.is(a,c)?a:c}}}function bl(){if(Cs)return Es;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Cs=1;var n=cl(),r=ml(),i=Al(),o=hl(),a=Hs(),s=a.OrderedSet,l=a.Record,c=a.Stack,u=a.OrderedMap,d=a.List,h=l({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:c(),selection:null,treeMap:null,undoStack:c()}),p=function(){l.createEmpty=function(e){return this.createWithText("",e)},l.createWithText=function(e,t){return l.createWithContent(r.createFromText(e),t)},l.createWithContent=function(e,t){if(0===e.getBlockMap().count())return l.createEmpty(t);var n=e.getBlockMap().first().getKey();return l.create({currentContent:e,undoStack:c(),redoStack:c(),decorator:t||null,selection:o.createEmpty(n)})},l.create=function(t){var n=t.currentContent,r=e({},t,{treeMap:m(n,t.decorator),directionMap:i.getDirectionMap(n)});return new l(new h(r))},l.fromJS=function(t){return new l(new h(e({},t,{directionMap:null!=t.directionMap?u(t.directionMap):t.directionMap,inlineStyleOverride:null!=t.inlineStyleOverride?s(t.inlineStyleOverride):t.inlineStyleOverride,nativelyRenderedContent:null!=t.nativelyRenderedContent?r.fromJS(t.nativelyRenderedContent):t.nativelyRenderedContent,redoStack:null!=t.redoStack?c(t.redoStack.map(function(e){return r.fromJS(e)})):t.redoStack,selection:null!=t.selection?new o(t.selection):t.selection,treeMap:null!=t.treeMap?u(t.treeMap).map(function(e){return d(e).map(function(e){return n.fromJS(e)})}):t.treeMap,undoStack:null!=t.undoStack?c(t.undoStack.map(function(e){return r.fromJS(e)})):t.undoStack,currentContent:r.fromJS(t.currentContent)})))},l.set=function(e,t){return new l(e.getImmutable().withMutations(function(r){var i=r.get("decorator"),o=i;null===t.decorator?o=null:t.decorator&&(o=t.decorator);var a=t.currentContent||e.getCurrentContent();if(o!==i){var s,l=r.get("treeMap");return s=o&&i?function(e,t,r,i,o){return r.merge(t.toSeq().filter(function(t){return i.getDecorations(t,e)!==o.getDecorations(t,e)}).map(function(t){return n.generate(e,t,i)}))}(a,a.getBlockMap(),l,o,i):m(a,o),void r.merge({decorator:o,treeMap:s,nativelyRenderedContent:null})}a!==e.getCurrentContent()&&r.set("treeMap",function(e,t,r,i){var o=e.getCurrentContent().set("entityMap",r),a=o.getBlockMap(),s=e.getImmutable().get("treeMap");return s.merge(t.toSeq().filter(function(e,t){return e!==a.get(t)}).map(function(e){return n.generate(o,e,i)}))}(e,a.getBlockMap(),a.getEntityMap(),o)),r.merge(t)}))};var a=l.prototype;function l(e){t(this,"_immutable",void 0),this._immutable=e}return a.toJS=function(){return this.getImmutable().toJS()},a.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},a.getCurrentContent=function(){return this.getImmutable().get("currentContent")},a.getUndoStack=function(){return this.getImmutable().get("undoStack")},a.getRedoStack=function(){return this.getImmutable().get("redoStack")},a.getSelection=function(){return this.getImmutable().get("selection")},a.getDecorator=function(){return this.getImmutable().get("decorator")},a.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},a.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},a.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},a.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},a.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},l.setInlineStyleOverride=function(e,t){return l.set(e,{inlineStyleOverride:t})},a.getCurrentInlineStyle=function(){var e=this.getInlineStyleOverride();if(null!=e)return e;var t=this.getCurrentContent(),n=this.getSelection();return n.isCollapsed()?function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),i=e.getBlockForKey(n);if(r>0)return i.getInlineStyleAt(r-1);if(i.getLength())return i.getInlineStyleAt(0);return g(e,n)}(t,n):function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),i=e.getBlockForKey(n);if(r<i.getLength())return i.getInlineStyleAt(r);if(r>0)return i.getInlineStyleAt(r-1);return g(e,n)}(t,n)},a.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},a.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},a.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},a.getDirectionMap=function(){return this.getImmutable().get("directionMap")},l.acceptSelection=function(e,t){return f(e,t,!1)},l.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),f(e,t,!0)},l.moveSelectionToEnd=function(e){var t=e.getCurrentContent().getLastBlock(),n=t.getKey(),r=t.getLength();return l.acceptSelection(e,new o({anchorKey:n,anchorOffset:r,focusKey:n,focusOffset:r,isBackward:!1}))},l.moveFocusToEnd=function(e){var t=l.moveSelectionToEnd(e);return l.forceSelection(t,t.getSelection())},l.push=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.getCurrentContent()===t)return e;var o=i.getDirectionMap(t,e.getDirectionMap());if(!e.getAllowUndo())return l.set(e,{currentContent:t,directionMap:o,lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:r,inlineStyleOverride:null});var a=e.getSelection(),s=e.getCurrentContent(),u=e.getUndoStack(),d=t;a!==s.getSelectionAfter()||function(e,t){var n=e.getLastChangeType();return t!==n||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(e,n)?(u=u.push(s),d=d.set("selectionBefore",a)):"insert-characters"!==n&&"backspace-character"!==n&&"delete-character"!==n||(d=d.set("selectionBefore",s.getSelectionBefore()));var h=e.getInlineStyleOverride();-1===["adjust-depth","change-block-type","split-block"].indexOf(n)&&(h=null);var p={currentContent:d,directionMap:o,undoStack:u,redoStack:c(),lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:r,inlineStyleOverride:h};return l.set(e,p)},l.undo=function(e){if(!e.getAllowUndo())return e;var t=e.getUndoStack(),n=t.peek();if(!n)return e;var r=e.getCurrentContent(),o=i.getDirectionMap(n,e.getDirectionMap());return l.set(e,{currentContent:n,directionMap:o,undoStack:t.shift(),redoStack:e.getRedoStack().push(r),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:r.getSelectionBefore()})},l.redo=function(e){if(!e.getAllowUndo())return e;var t=e.getRedoStack(),n=t.peek();if(!n)return e;var r=e.getCurrentContent(),o=i.getDirectionMap(n,e.getDirectionMap());return l.set(e,{currentContent:n,directionMap:o,undoStack:e.getUndoStack().push(r),redoStack:t.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:n.getSelectionAfter()})},a.getImmutable=function(){return this._immutable},l}();function f(e,t,n){return p.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function m(e,t){return e.getBlockMap().map(function(r){return n.generate(e,r,t)}).toOrderedMap()}function g(e,t){var n=e.getBlockMap().reverse().skipUntil(function(e,n){return n===t}).skip(1).skipUntil(function(e,t){return e.getLength()}).first();return n?n.getInlineStyleAt(n.getLength()-1):s()}return Es=p}function wl(){if(Ts)return Ds;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ts=1;var n=Ks(),r=Us(),i=Qs(),o=Ws(),a=sl(),s=bl(),l=Js(),c=pl(),u=Hs(),d=function(){if(Is)return ks;Is=1;var e=Ws(),t=il(),n=Hs(),r=Zs(),i=n.OrderedMap,o=n.List,a=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},s=function(e,t,n,r,i){if(!i)return e;var s="after"===r,l=t.getKey(),c=n.getKey(),u=t.getParentKey(),d=t.getNextSiblingKey(),h=t.getPrevSiblingKey(),p=n.getParentKey(),f=s?n.getNextSiblingKey():c,m=s?c:n.getPrevSiblingKey();return e.withMutations(function(e){a(u,e,function(e){var t=e.getChildKeys();return e.merge({children:t.delete(t.indexOf(l))})}),a(h,e,function(e){return e.merge({nextSibling:d})}),a(d,e,function(e){return e.merge({prevSibling:h})}),a(f,e,function(e){return e.merge({prevSibling:l})}),a(m,e,function(e){return e.merge({nextSibling:l})}),a(p,e,function(e){var t=e.getChildKeys(),n=t.indexOf(c),r=s?n+1:0!==n?n-1:0,i=t.toArray();return i.splice(r,0,l),e.merge({children:o(i)})}),a(l,e,function(e){return e.merge({nextSibling:f,prevSibling:m,parent:p})})})};return ks=function(n,o,a,l){"replace"===l&&r(!1);var c=a.getKey(),u=o.getKey();u===c&&r(!1);var d=n.getBlockMap(),h=o instanceof e,p=[o],f=d.delete(u);h&&(p=[],f=d.withMutations(function(e){var n=o.getNextSiblingKey(),r=t(o,e);e.toSeq().skipUntil(function(e){return e.getKey()===u}).takeWhile(function(e){var t=e.getKey(),i=t===u,o=n&&t!==n,a=!n&&e.getParentKey()&&(!r||t!==r);return!!(i||o||a)}).forEach(function(t){p.push(t),e.delete(t.getKey())})}));var m=f.toSeq().takeUntil(function(e){return e===a}),g=f.toSeq().skipUntil(function(e){return e===a}).skip(1),y=p.map(function(e){return[e.getKey(),e]}),v=i();if("before"===l){var A=n.getBlockBefore(c);A&&A.getKey()===o.getKey()&&r(!1),v=m.concat([].concat(y,[[c,a]]),g).toOrderedMap()}else if("after"===l){var b=n.getBlockAfter(c);b&&b.getKey()===u&&r(!1),v=m.concat([[c,a]].concat(y),g).toOrderedMap()}return n.merge({blockMap:s(v,o,a,l,h),selectionBefore:n.getSelectionAfter(),selectionAfter:n.getSelectionAfter().merge({anchorKey:u,focusKey:u})})},ks}(),h=c("draft_tree_data_support"),p=h?o:i,f=u.List,m=u.Repeat;return Ds={insertAtomicBlock:function(t,i,o){var c=t.getCurrentContent(),u=t.getSelection(),d=a.removeRange(c,u,"backward"),g=d.getSelectionAfter(),y=a.splitBlock(d,g),v=y.getSelectionAfter(),A=a.setBlockType(y,v,"atomic"),b=r.create({entity:i}),w={key:l(),type:"atomic",text:o,characterList:f(m(b,o.length))},x={key:l(),type:"unstyled"};h&&(w=e({},w,{nextSibling:x.key}),x=e({},x,{prevSibling:w.key}));var _=[new p(w),new p(x)],S=n.createFromArray(_),E=a.replaceWithFragment(A,v,S),C=E.merge({selectionBefore:u,selectionAfter:E.getSelectionAfter().set("hasFocus",!0)});return s.push(t,C,"insert-fragment")},moveAtomicBlock:function(e,t,n,r){var i,o=e.getCurrentContent(),l=e.getSelection();if("before"===r||"after"===r){var c=o.getBlockForKey("before"===r?n.getStartKey():n.getEndKey());i=d(o,t,c,r)}else{var u=a.removeRange(o,n,"backward"),h=u.getSelectionAfter(),p=u.getBlockForKey(h.getFocusKey());if(0===h.getStartOffset())i=d(u,t,p,"before");else if(h.getEndOffset()===p.getLength())i=d(u,t,p,"after");else{var f=a.splitBlock(u,h),m=f.getSelectionAfter(),g=f.getBlockForKey(m.getFocusKey());i=d(f,t,g,"before")}}var y=i.merge({selectionBefore:l,selectionAfter:i.getSelectionAfter().set("hasFocus",!0)});return s.push(e,y,"move-block")}}}function xl(){if(Ls)return Ns;Ls=1;var e=Hs().List,t=function(){function t(e){var t,n,r;r=void 0,(n="_decorators")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this._decorators=e.slice()}var n=t.prototype;return n.getDecorations=function(t,n){var r=Array(t.getText().length).fill(null);return this._decorators.forEach(function(e,i){var o=0;(0,e.strategy)(t,function(e,t){(function(e,t,n){for(var r=t;r<n;r++)if(null!=e[r])return!1;return!0})(r,e,t)&&(!function(e,t,n,r){for(var i=t;i<n;i++)e[i]=r}(r,e,t,i+"."+o),o++)},n)}),e(r)},n.getComponentForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].component},n.getPropsForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].props},t}();return Ns=t}function _l(){if(Ps)return Bs;function e(e){return e.replace(/\//g,"-")}return Ps=1,Bs=function(t){return"object"==typeof t?Object.keys(t).filter(function(e){return t[e]}).map(e).join(" "):Array.prototype.map.call(arguments,e).join(" ")},Bs}function Sl(){if(Ms)return Os;Ms=1;var t=e,n=_l(),r=(0,Hs().Map)({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},section:{element:"section"},article:{element:"article"},"unordered-list-item":{element:"li",wrapper:t.createElement("ul",{className:n("public/DraftStyleDefault/ul")})},"ordered-list-item":{element:"li",wrapper:t.createElement("ol",{className:n("public/DraftStyleDefault/ol")})},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:t.createElement("pre",{className:n("public/DraftStyleDefault/pre")})},unstyled:{element:"div",aliasedElements:["p"]}});return Os=r}function El(){return Fs?js:(Fs=1,js={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}})}
1
+ !function(e,t){"use strict";const n=typeof window<"u"&&navigator.userAgent.toLowerCase().includes("firefox"),r=()=>{const e=document.getElementById("js-download-band");e&&/Android/i.test(navigator.userAgent)&&e.setAttribute("href","https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome")},i=[{text:"Paris",_index:"town_1717424751904",_id:"75056",_score:1,_source:{output:"Paris (75000)",url:"/elections/resultats/paris/paris-75000"}},{text:"Paris 10ème Arrondissement",_index:"town_1717424751904",_id:"75056AR10",_score:1,_source:{output:"Paris 10ème Arrondissement (75010)",url:"/elections/resultats/paris/paris-75010"}},{text:"Paris 11ème Arrondissement",_index:"town_1717424751904",_id:"75056AR11",_score:1,_source:{output:"Paris 11ème Arrondissement (75011)",url:"/elections/resultats/paris/paris-75011"}}],o=(e,t,n,r,o,a)=>{const s=document.getElementById(e);if(!s)return;const l=s.dataset.storybook,c=s.querySelector(`#${e}-search`),u=c?.getAttribute("data-api-url"),d=s.querySelector(".c-autocomplete__menu");if(!c||!d||!u)return;const h=s.querySelector(".c-autocomplete__input-spinner"),p=c.getAttribute("data-trigger-message"),f=()=>{h?.classList.toggle("u-hidden")},m=async e=>{f(),d.classList.remove("u-hidden");const s=await(async e=>{try{const r=l&&t.includes("20minutes.fr")?i:await fetch(`${u}${n}${encodeURIComponent(e)}`).then(e=>e.json()),o=a&&"object"==typeof r&&null!==r?r[a]:r;return Array.isArray(o)?o:[]}catch(e){return console.error("Error fetching autocomplete results:",e),[]}})(e);d.innerHTML="",0===s.length&&d.classList.add("u-hidden"),s.forEach(e=>{((e,t)=>{const n=document.createElement("li");n.id=`/${e}`,n.textContent=t,n.addEventListener("click",()=>{c instanceof HTMLInputElement&&(c.value=t,d.classList.add("u-hidden"))}),d.appendChild(n)})(e[r],e[o])}),f()};c.addEventListener("input",e=>{if(!(e.target instanceof HTMLInputElement))return;const t=e.target.value;d.classList.remove("u-hidden"),t.length>=3?m(t):(d.innerHTML="",(()=>{const e=document.createElement("li");e.textContent=p,d.appendChild(e)})())}),c.addEventListener("focusout",()=>{setTimeout(()=>d.classList.add("u-hidden"),300)}),c.addEventListener("focusin",()=>{d.childElementCount>0&&d.classList.remove("u-hidden")})},a=(e=document.querySelector(".js-collapse__button"))=>{e&&document.querySelectorAll(".c-collapse__button").forEach(e=>{e.addEventListener("click",e=>{(e=>{e.stopImmediatePropagation(),e.preventDefault();const t=e.currentTarget;if(t instanceof HTMLButtonElement){const e=t.parentElement?.querySelector(`#${t.getAttribute("aria-controls")}`);"true"===t.getAttribute("aria-expanded")?(t.setAttribute("aria-expanded","false"),e?.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),e?.setAttribute("aria-hidden","false"))}})(e)})})},s=(e,t)=>{const n=e-Date.now();if(n<=0)return!1;const r=Math.floor(n/864e5),i=Math.floor(n%864e5/36e5),o=Math.floor(n%36e5/6e4),a=Math.floor(n%6e4/1e3);return t.daysElement.textContent=r.toString(),t.hoursElement.textContent=i.toString(),t.minutesElement.textContent=o.toString(),t.secondsElement.textContent=a.toString(),!0},l=()=>{const e=document.querySelector(".c-map-districts-container"),t=document.querySelector(".c-map-districts");if(!e||!t)return;const n=document.querySelector(".c-map-districts-container__description"),r=document.querySelector(".c-map-districts-container__department"),i=document.querySelector(".c-map-districts-container__unzoom-button");let o=t;const a=t.getAttribute("viewBox"),s=(e,t)=>e.matches?.call(e,t),l=(s,l)=>{if(l&&i&&n){e.classList.remove("c-map-districts-container--department-view"),n.classList.remove("u-hidden"),r?.classList.add("u-hidden"),i.classList.add("u-hidden"),l!==a&&(n.classList.add("u-hidden"),i.classList.remove("u-hidden")),o.classList.remove("js-selected-area"),o=s;const c=o.getAttribute("data-info");r&&c&&(e.classList.add("c-map-districts-container--department-view"),r.classList.remove("u-hidden"),r.innerHTML=c),o.classList.add("js-selected-area"),t.setAttribute("viewBox",l)}},c=e=>{e.stopPropagation();const n=e.currentTarget;if(o&&t&&n instanceof SVGGraphicsElement){if(n===o)return;if(e.preventDefault(),o!==t&&!((e,t,n)=>{if(!e)return;let r=e.parentElement;for(;r instanceof SVGGraphicsElement&&r!==n;){if(t===r)return!0;r=r.parentElement}return n===t})(n,o,t))return void l(t,a);const r=((e,t,n=".c-map-districts__zoomable:not(.js-selected-area)")=>{if(!e)return;let r,i=e.parentElement;for(;i instanceof SVGGraphicsElement&&i!==t;)s(i,n)&&(r=i),i=i.parentElement;return r})(n,o);l(r||n,(e=>{const t=e.getBBox(),n=t.width/20;return[t.x-n,t.y-n,t.width+2*n,t.height+2*n].join(" ")})(r||n))}},u=()=>{t&&o!==t&&l(t,a)};t.addEventListener("click",u),i&&i.addEventListener("click",u),document.querySelectorAll(".c-map-districts__zoomable").forEach(e=>{e.addEventListener("click",e=>c(e))})},c=()=>{const e=document.getElementById("elections-form-search"),t=document.querySelector(".c-search-form__autocomplete");if(!e||!t)return;e.addEventListener("input",({target:e})=>{if(!(e instanceof HTMLInputElement))return;const n=e.value;if(t.classList.add("u-hidden"),n.length>=3){const e=(e=>{t.classList.remove("u-hidden");const n=t.querySelectorAll("li"),r=[];return n.forEach(t=>{t.querySelector("a")?.innerHTML.toLowerCase().includes(e.toLowerCase())&&r.push(t.innerHTML)}),r})(n);t.innerHTML="",0===e.length&&t.classList.add("u-hidden"),e.forEach(e=>{(e=>{t.innerHTML+=`<li>${e}</li>`})(e)})}}),e.addEventListener("focusout",()=>{setTimeout(()=>t.classList.add("u-hidden"),300)}),e.addEventListener("focusin",()=>{t.childElementCount>0&&t.classList.remove("u-hidden")})},u=(e,t)=>{const n=e.currentTarget;if(e.preventDefault(),n instanceof HTMLButtonElement){const e=t?"u-ellipsis-multiline":"u-ellipsis";return"true"===n.getAttribute("aria-expanded")?((e,t)=>{e.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach(e=>{e.classList.add(t)}),e.setAttribute("aria-expanded","false");const n=e.querySelector(".js-ellipsis-button__label");n instanceof HTMLSpanElement&&(n.innerHTML="Voir plus")})(n,e):((e,t)=>{e.setAttribute("aria-expanded","true"),e.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach(e=>{e.classList.remove(t)});const n=e.querySelector(".js-ellipsis-button__label");n instanceof HTMLSpanElement&&(n.innerHTML="Voir moins")})(n,e)}return null},d=e=>{const t=e.currentTarget;return e.preventDefault(),t instanceof HTMLButtonElement?"true"===t.getAttribute("aria-expanded")?(e=>{e.parentNode?.querySelectorAll(".js-expand-target")?.forEach(e=>{e.setAttribute("aria-hidden","true")}),e.setAttribute("aria-expanded","false");const t=e.querySelector(".js-expand-button__label");t instanceof HTMLSpanElement&&(t.innerHTML="Voir plus")})(t):(e=>{e.setAttribute("aria-expanded","true"),e.parentNode?.querySelectorAll(".js-expand-target")?.forEach(e=>{e.setAttribute("aria-hidden","false")});const t=e.querySelector(".js-expand-button__label");t instanceof HTMLSpanElement&&(t.innerHTML="Voir moins")})(t):null},h=(e,t)=>{const n=document.querySelector(".js-content-header"),r=document.querySelector(t),i=document.querySelector(e),o=document.querySelector(".c-header-mobile"),a=o instanceof HTMLElement?o.offsetHeight:0;if(n&&r&&i){const e=new IntersectionObserver(()=>{const e=i.classList,t=e.contains("u-hidden"),o=n.getBoundingClientRect().bottom-a,s=r.getBoundingClientRect().bottom-a;t&&o<=0&&s>=0&&e.remove("u-hidden"),!t&&(o>=0||s<=0)&&e.add("u-hidden")},{root:document,rootMargin:`-${a}px 0px 0px 0px`});e.observe(n),e.observe(r)}},p=()=>{const e=document.querySelector(".c-image-slider__container");if(!e)return()=>{};const t=document.querySelectorAll(".c-image-slider__slide"),n=document.querySelector(".c-image-slider__button-container--previous"),r=document.querySelector(".c-image-slider__button-container--next"),i=document.querySelectorAll(".c-image-slider__indicator");let o=0,a=null,s=!1;const l=(t=!0)=>{if(!(e instanceof HTMLElement))return;e.style.transition=t?"transform 0.3s ease":"none";const n=100*-o;e.style.transform=`translateX(${n}%)`,i.forEach((e,t)=>{e.classList.toggle("c-image-slider__indicator--is-active",t===o)})},c=e=>{o=e,l(!0)},u=()=>{a&&clearInterval(a),a=setInterval(()=>{if(!s){const e=(o+1)%t.length;c(e)}},4e3)},d=()=>{a&&(clearInterval(a),a=null)},h=()=>{s=!0,d()},p=()=>{s=!1,u()};n?.addEventListener("click",()=>{h();const e=(o-1+t.length)%t.length;c(e),setTimeout(p,5e3)}),r?.addEventListener("click",()=>{h();const e=(o+1)%t.length;c(e),setTimeout(p,5e3)}),i.forEach((e,t)=>{e.addEventListener("click",()=>{h(),c(t),setTimeout(p,5e3)})});let f=0,m=0,g=!1;return e.addEventListener("touchstart",t=>{e instanceof HTMLElement&&(h(),f=t.touches[0].clientX,m=f,g=!0,e.style.transition="none")}),e.addEventListener("touchmove",t=>{if(!(e instanceof HTMLElement))return;m=t.touches[0].clientX;const n=m-f,r=-o*window.innerWidth+n;e.style.transform=`translateX(${r}px)`}),e.addEventListener("touchend",()=>{if(!g)return;g=!1;const e=m-f;Math.abs(e)>75&&(e<0?o=Math.min(o+1,t.length-1):e>0&&(o=Math.max(o-1,0))),l(!0),setTimeout(p,5e3)}),l(!0),u(),()=>{d()}},f=e=>{e.stopImmediatePropagation(),e.preventDefault();const t=e.currentTarget,n=document.getElementById("info-button-content");!(t instanceof HTMLButtonElement)||!n||("true"===t.getAttribute("aria-expanded")?(t.setAttribute("aria-expanded","false"),n.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),n.setAttribute("aria-hidden","false")))},m=":not([inert]):not([inert] *)",g=':not([tabindex^="-"])',y=":not(:disabled)";var v=[`a[href]${m}${g}`,`area[href]${m}${g}`,`input:not([type="hidden"]):not([type="radio"])${m}${g}${y}`,`input[type="radio"]${m}${g}${y}`,`select${m}${g}${y}`,`textarea${m}${g}${y}`,`button${m}${g}${y}`,`details${m} > summary:first-of-type${g}`,`iframe${m}${g}`,`audio[controls]${m}${g}`,`video[controls]${m}${g}`,`[contenteditable]${m}${g}`,`[tabindex]${m}${g}`];function A(e){(e.querySelector("[autofocus]")||e).focus()}function b(e,t){if(t&&_(e))return e;if(function(e){return(!e.shadowRoot||"-1"!==e.getAttribute("tabindex"))&&!e.matches(":disabled,[hidden],[inert]")}(e))if(e.shadowRoot){let n=w(e.shadowRoot,t);for(;n;){const e=b(n,t);if(e)return e;n=x(n,t)}}else if("slot"===e.localName){const n=e.assignedElements({flatten:!0});t||n.reverse();for(const e of n){const n=b(e,t);if(n)return n}}else{let n=w(e,t);for(;n;){const e=b(n,t);if(e)return e;n=x(n,t)}}return!t&&_(e)?e:null}function w(e,t){return t?e.firstElementChild:e.lastElementChild}function x(e,t){return t?e.nextElementSibling:e.previousElementSibling}const _=e=>!e.shadowRoot?.delegatesFocus&&(e.matches(v.join(","))&&!(e=>!(!e.matches("details:not([open]) *")||e.matches("details>summary:first-of-type"))||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))(e));function S(e=document){const t=e.activeElement;return t?t.shadowRoot?S(t.shadowRoot)||document.activeElement:t:null}function E(e,t){const[n,r]=function(e){const t=b(e,!0);return[t,t?b(e,!1)||t:null]}(e);if(!n)return t.preventDefault();const i=S();t.shiftKey&&i===n?(r.focus(),t.preventDefault()):!t.shiftKey&&i===r&&(n.focus(),t.preventDefault())}function C(e,t){return function t(n){if(!n||n===document||n===window)return null;const r=k(n);return r&&(n=r),n.closest(e)||t(n.getRootNode().host)}(t)}function k(e){return e.assignedSlot||(e.parentNode?k(e.parentNode):null)}const I="data-a11y-dialog";class D{$el;id;previouslyFocused;shown;constructor(e){this.$el=e,this.id=this.$el.getAttribute(I)||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)}destroy(){return this.fire("destroy").defaultPrevented||(this.hide(),document.removeEventListener("click",this.handleTriggerClicks,!0),this.$el.replaceWith(this.$el.cloneNode(!0))),this}show(e){return this.shown||this.fire("show",e).defaultPrevented||(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=S(),"BODY"===this.previouslyFocused?.tagName&&e?.target&&(this.previouslyFocused=e.target),"focus"===e?.type?this.maintainFocus():A(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0)),this}hide(e){return this.shown?(this.fire("hide",e).defaultPrevented||(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),document.body.removeEventListener("focus",this.maintainFocus,!0),this.$el.removeEventListener("keydown",this.bindKeypress,!0),this.previouslyFocused?.focus?.()),this):this}on(e,t,n){return this.$el.addEventListener(e,t,n),this}off(e,t,n){return this.$el.removeEventListener(e,t,n),this}fire(e,t){const n=new CustomEvent(e,{detail:t,cancelable:!0});return this.$el.dispatchEvent(n),n}handleTriggerClicks(e){const t=e.composedPath()[0],n=C(`[${I}-show="${this.id}"]`,t),r=C(`[${I}-hide="${this.id}"]`,t),i=C(`[${I}-hide]`,t)&&C('[aria-modal="true"]',t)===this.$el;n&&this.show(e),(r||i)&&this.hide(e)}bindKeypress(e){if(C('[aria-modal="true"]',S())!==this.$el)return;let t=!1;try{t=!!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open')}catch{}"Escape"===e.key&&"alertdialog"!==this.$el.getAttribute("role")&&!t&&(e.preventDefault(),this.hide(e)),"Tab"===e.key&&E(this.$el,e)}maintainFocus(){const e=S();C(`[aria-modal="true"], [${I}-ignore-focus-trap]`,e)||A(this.$el)}}function T(){for(const e of document.querySelectorAll("[data-a11y-dialog]"))new D(e)}typeof document<"u"&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",T):T());const N="50px",L=({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r})=>{n.classList.contains("o-nav-button--visible")&&!r.classList.contains("o-nav-button--visible")&&(e.style.paddingRight=N,e.style.paddingLeft=""),r.classList.contains("o-nav-button--visible")&&(e.style.paddingLeft=N,n.classList.contains("o-nav-button--visible")&&(e.style.paddingRight=N),n.classList.contains("o-nav-button--visible")||(e.style.paddingRight="")),!n.classList.contains("o-nav-button--visible")&&!r.classList.contains("o-nav-button--visible")&&(t.style.width="",e.style.paddingRight="")},B=({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r,sliderVariant:i})=>{if(t){const o=t.closest(".js-overview-bar-container")?.querySelector(".c-stepper")?.querySelectorAll(".c-stepper__item");if(o){const e=Array.from(o).findIndex(e=>e.classList.contains("c-stepper__item--loading"));if(e<0)o[0].classList.add("c-stepper__item--loading");else{o[e].classList.remove("c-stepper__item--loading"),o[e].classList.add("c-stepper__item--loaded");const t=o[e].querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition="width 0s linear"),e+1<o.length&&o[e+1].classList.add("c-stepper__item--loading")}}if(t.scrollWidth-t.clientWidth>t.clientWidth){let e=t.scrollLeft;switch(i){case"three-columns-articles":e+=t.clientWidth+32;break;case"rubrics":e+=t.clientWidth-36;break;default:e+=Math.ceil(.6*t.clientWidth)}t.scrollTo({left:e,behavior:"smooth"}),r.classList.add("o-nav-button--visible"),e+t.clientWidth>=t.scrollWidth&&n.classList.remove("o-nav-button--visible")}else{const e=t.scrollWidth-t.clientWidth;t.scrollTo({left:e,behavior:"smooth"}),n.classList.remove("o-nav-button--visible"),r.classList.add("o-nav-button--visible")}n.classList.contains("c-slider__button-container--has-space-around")&&r.classList.contains("c-slider__button-container--has-space-around")&&L({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r})}},P=({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r,sliderVariant:i,delay:o})=>{if(t){const a=t.closest(".js-overview-bar-container")?.querySelector(".c-stepper")?.querySelectorAll(".c-stepper__item");if(a){const e=Array.from(a).findIndex(e=>e.classList.contains("c-stepper__item--loading"));e<0?a[0].classList.add("c-stepper__item--loading"):(a[e].classList.remove("c-stepper__item--loading"),a[e].classList.remove("c-stepper__item--loaded"),e-1>0&&(a[e-1].classList.remove("c-stepper__item--loading"),a[e-1].classList.remove("c-stepper__item--loaded"),setTimeout(()=>{const t=a[e-1].querySelector(".c-stepper__loader");a[e-1].classList.add("c-stepper__item--loading"),t&&t instanceof HTMLElement&&(t.style.transition=`width ${o/1e3}s linear`)},0)))}if(t.clientWidth<t.scrollLeft){let e=t.scrollLeft;switch(i){case"three-columns-articles":e-=t.clientWidth+32;break;case"rubrics":e-=t.clientWidth-36;break;default:e-=Math.ceil(.6*t.clientWidth)}t.scrollTo({left:e,behavior:"smooth"}),n.classList.add("o-nav-button--visible"),0===e&&r.classList.remove("o-nav-button--visible")}else t.scrollTo({left:0,behavior:"smooth"}),r.classList.remove("o-nav-button--visible"),t.clientWidth<t.scrollWidth&&n.classList.add("o-nav-button--visible");n.classList.contains("c-slider__button-container--has-space-around")&&r.classList.contains("c-slider__button-container--has-space-around")&&L({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r})}},O=({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r})=>{(({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r})=>{const i=t.scrollLeft>0,o=t.scrollLeft+(t.clientWidth+.5)<t.scrollWidth;i&&o?(n.classList?.add("o-nav-button--visible"),r.classList?.add("o-nav-button--visible")):i?(n.classList?.remove("o-nav-button--visible"),r.classList?.add("o-nav-button--visible")):o?(n.classList?.add("o-nav-button--visible"),r.classList?.remove("o-nav-button--visible")):(n.classList?.remove("o-nav-button--visible"),r.classList?.remove("o-nav-button--visible")),n.classList.contains("c-slider__button-container--has-space-around")&&r.classList.contains("c-slider__button-container--has-space-around")&&L({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r})})({navigationContainer:e,navigatedList:t,nextBtn:n,prevBtn:r})},M=e=>{const{sliderVariant:t}=e.dataset,{sliderAuto:n}=e.dataset,{sliderDelay:r}=e.dataset,i=r?parseInt(r,10):3e3,o=e.closest(".js-overview-bar-container")?.querySelector(".c-stepper"),a=o?.querySelectorAll(".c-stepper__item"),s=e.querySelector(".js-navigation-container__list"),l=e.querySelector(".o-nav-button--next-button"),c=e.querySelector(".o-nav-button--previous-button");if(s&&l&&c&&(s.clientWidth<s.scrollWidth&&(l.classList.add("o-nav-button--visible"),l.classList.contains("c-slider__button-container--has-space-around")&&(e.style.paddingRight=N)),l.addEventListener("click",B.bind(!1,{navigationContainer:e,navigatedList:s,nextBtn:l,prevBtn:c,sliderVariant:t})),c.addEventListener("click",P.bind(!1,{navigationContainer:e,navigatedList:s,nextBtn:l,prevBtn:c,sliderVariant:t,delay:i})),"true"===n)){const e=o?o.querySelector(".c-stepper__item--loading"):null;a&&(a.forEach(e=>{const t=e.querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition=`width ${i/1e3}s linear`)}),e||a[0].classList.add("c-stepper__item--loading")),setInterval(()=>{l.classList.contains("o-nav-button--visible")?l.click():s&&c&&(s.scrollLeft=0,a&&(a.forEach(e=>{const t=e.querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition="width 0s linear"),e.classList.remove("c-stepper__item--loading"),e.classList.remove("c-stepper__item--loaded"),setTimeout(()=>{t&&t instanceof HTMLElement&&(t.style.transition=`width ${i/1e3}s linear`)},0)}),setTimeout(()=>{a[0].classList.add("c-stepper__item--loading")},0)),c.click())},i)}};function j(e,t,n){const r=document.createElement(t);return e&&(r.className=e),n&&n.appendChild(r),r}function F(e,t){return e.x=t.x,e.y=t.y,void 0!==t.id&&(e.id=t.id),e}function R(e){e.x=Math.round(e.x),e.y=Math.round(e.y)}function q(e,t){const n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return Math.sqrt(n*n+r*r)}function z(e,t){return e.x===t.x&&e.y===t.y}function H(e,t,n){return Math.min(Math.max(e,t),n)}function K(e,t,n){let r=`translate3d(${e}px,${t||0}px,0)`;return void 0!==n&&(r+=` scale3d(${n},${n},1)`),r}function U(e,t,n,r){e.style.transform=K(t,n,r)}function V(e,t,n,r){e.style.transition=t?`${t} ${n}ms ${r||"cubic-bezier(.4,0,.22,1)"}`:"none"}function Q(e,t,n){e.style.width="number"==typeof t?`${t}px`:t,e.style.height="number"==typeof n?`${n}px`:n}const W="idle",G="loading",Z="loaded",Y="error";function J(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}let $=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{$=!0}}))}catch{}let X=class{constructor(){this._pool=[]}add(e,t,n,r){this._toggleListener(e,t,n,r)}remove(e,t,n,r){this._toggleListener(e,t,n,r,!0)}removeAll(){this._pool.forEach(e=>{this._toggleListener(e.target,e.type,e.listener,e.passive,!0,!0)}),this._pool=[]}_toggleListener(e,t,n,r,i,o){if(!e)return;const a=i?"removeEventListener":"addEventListener";t.split(" ").forEach(t=>{if(t){o||(i?this._pool=this._pool.filter(r=>r.type!==t||r.listener!==n||r.target!==e):this._pool.push({target:e,type:t,listener:n,passive:r}));const s=!!$&&{passive:r||!1};e[a](t,n,s)}})}};function ee(e,t){if(e.getViewportSizeFn){const n=e.getViewportSizeFn(e,t);if(n)return n}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function te(e,t,n,r,i){let o=0;if(t.paddingFn)o=t.paddingFn(n,r,i)[e];else if(t.padding)o=t.padding[e];else{const n="padding"+e[0].toUpperCase()+e.slice(1);t[n]&&(o=t[n])}return Number(o)||0}function ne(e,t,n,r){return{x:t.x-te("left",e,t,n,r)-te("right",e,t,n,r),y:t.y-te("top",e,t,n,r)-te("bottom",e,t,n,r)}}let re=class{constructor(e){this.slide=e,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(e){this.currZoomLevel=e,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(e){const{pswp:t}=this.slide,n=this.slide["x"===e?"width":"height"]*this.currZoomLevel,r=te("x"===e?"left":"top",t.options,t.viewportSize,this.slide.data,this.slide.index),i=this.slide.panAreaSize[e];this.center[e]=Math.round((i-n)/2)+r,this.max[e]=n>i?Math.round(i-n)+r:this.center[e],this.min[e]=n>i?r:this.center[e]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(e,t){return H(t,this.max[e],this.min[e])}};let ie=class{constructor(e,t,n,r){this.pswp=r,this.options=e,this.itemData=t,this.index=n,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(e,t,n){const r={x:e,y:t};this.elementSize=r,this.panAreaSize=n;const i=n.x/r.x,o=n.y/r.y;this.fit=Math.min(1,i<o?i:o),this.fill=Math.min(1,i>o?i:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(e){const t=e+"ZoomLevel",n=this.options[t];if(n)return"function"==typeof n?n(this):"fill"===n?this.fill:"fit"===n?this.fit:Number(n)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,3*this.fit),this.elementSize&&e*this.elementSize.x>4e3&&(e=4e3/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}},oe=class{constructor(e,t,n){this.data=e,this.index=t,this.pswp=n,this.isActive=t===n.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!n.opener.isOpen,this.zoomLevels=new ie(n.options,e,t,n),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:t}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=j("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 re(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(e){e&&!this.isActive?this.activate():!e&&this.isActive&&this.deactivate()}append(e){this.holderElement=e,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:e}=this;this.heavyAppended||!e.opener.isOpen||e.mainScroll.isShifted()||(this.isActive,0)||this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this}))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel!==this.zoomLevels.initial&&this.isActive?(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y)):(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize())}updateContentSize(e){const t=this.currentResolution||this.zoomLevels.initial;if(!t)return;const n=Math.round(this.width*t)||this.pswp.viewportSize.x,r=Math.round(this.height*t)||this.pswp.viewportSize.y;!this.sizeChanged(n,r)&&!e||this.content.setDisplayedSize(n,r)}sizeChanged(e,t){return(e!==this.prevDisplayedWidth||t!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=e,this.prevDisplayedHeight=t,!0)}getPlaceholderElement(){var e;return null===(e=this.content.placeholder)||void 0===e?void 0:e.element}zoomTo(e,t,n,r){const{pswp:i}=this;if(!this.isZoomable()||i.mainScroll.isShifted())return;i.dispatch("beforeZoomTo",{destZoomLevel:e,centerPoint:t,transitionDuration:n}),i.animations.stopAllPan();const o=this.currZoomLevel;r||(e=H(e,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(e),this.pan.x=this.calculateZoomToPanOffset("x",t,o),this.pan.y=this.calculateZoomToPanOffset("y",t,o),R(this.pan);const a=()=>{this._setResolution(e),this.applyCurrentZoomPan()};n?i.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:n,easing:i.options.easing}):a()}toggleZoom(e){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,e,this.pswp.options.zoomAnimationDuration)}setZoomLevel(e){this.currZoomLevel=e,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(e,t,n){if(this.bounds.max[e]-this.bounds.min[e]===0)return this.bounds.center[e];t||(t=this.pswp.getViewportCenterPoint()),n||(n=this.zoomLevels.initial);const r=this.currZoomLevel/n;return this.bounds.correctPan(e,(this.pan[e]-t[e])*r+t[e])}panTo(e,t){this.pan.x=this.bounds.correctPan("x",e),this.pan.y=this.bounds.correctPan("y",t),this.applyCurrentZoomPan()}isPannable(){return!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!this.width&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),F(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(e,t,n){n/=this.currentResolution||this.zoomLevels.initial,U(this.container,e,t,n)}calculateSize(){const{pswp:e}=this;F(this.panAreaSize,ne(e.options,e.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),e.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const e=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return K(this.pan.x,this.pan.y,e)}_setResolution(e){e!==this.currentResolution&&(this.currentResolution=e,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}};class ae{constructor(e){this.gestures=e,this.pswp=e.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&F(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:e,prevP1:t,dragAxis:n}=this.gestures,{currSlide:r}=this.pswp;if("y"===n&&this.pswp.options.closeOnVerticalDrag&&r&&r.currZoomLevel<=r.zoomLevels.fit&&!this.gestures.isMultitouch){const n=r.pan.y+(e.y-t.y);if(!this.pswp.dispatch("verticalDrag",{panY:n}).defaultPrevented){this._setPanWithFriction("y",n,.6);const e=1-Math.abs(this._getVerticalDragRatio(r.pan.y));this.pswp.applyBgOpacity(e),r.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),r&&(R(r.pan),r.applyCurrentZoomPan()))}end(){const{velocity:e}=this.gestures,{mainScroll:t,currSlide:n}=this.pswp;let r=0;if(this.pswp.animations.stopAll(),t.isShifted()){const n=(t.x-t.getCurrSlideX())/this.pswp.viewportSize.x;e.x<-.5&&n<0||e.x<.1&&n<-.5?(r=1,e.x=Math.min(e.x,0)):(e.x>.5&&n>0||e.x>-.1&&n>.5)&&(r=-1,e.x=Math.max(e.x,0)),t.moveIndexBy(r,!0,e.x)}n&&n.currZoomLevel>n.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(e){const{velocity:t}=this.gestures,{currSlide:n}=this.pswp;if(!n)return;const{pan:r,bounds:i}=n,o=r[e],a=this.pswp.bgOpacity<1&&"y"===e,s=o+function(e,t){return e*t/(1-t)}(t[e],.995);if(a){const e=this._getVerticalDragRatio(o),t=this._getVerticalDragRatio(s);if(e<0&&t<-.4||e>0&&t>.4)return void this.pswp.close()}const l=i.correctPan(e,s);if(o===l)return;const c=l===s?1:.82,u=this.pswp.bgOpacity,d=l-o;this.pswp.animations.startSpring({name:"panGesture"+e,isPan:!0,start:o,end:l,velocity:t[e],dampingRatio:c,onUpdate:t=>{if(a&&this.pswp.bgOpacity<1){const e=1-(l-t)/d;this.pswp.applyBgOpacity(H(u+(1-u)*e,0,1))}r[e]=Math.floor(t),n.applyCurrentZoomPan()}})}_panOrMoveMainScroll(e){const{p1:t,dragAxis:n,prevP1:r,isMultitouch:i}=this.gestures,{currSlide:o,mainScroll:a}=this.pswp,s=t[e]-r[e],l=a.x+s;if(!s||!o)return!1;if("x"===e&&!o.isPannable()&&!i)return a.moveTo(l,!0),!0;const{bounds:c}=o,u=o.pan[e]+s;if(this.pswp.options.allowPanToNext&&"x"===n&&"x"===e&&!i){const t=a.getCurrSlideX(),n=a.x-t,r=s>0,i=!r;if(u>c.min[e]&&r){if(c.min[e]<=this.startPan[e])return a.moveTo(l,!0),!0;this._setPanWithFriction(e,u)}else if(u<c.max[e]&&i){if(this.startPan[e]<=c.max[e])return a.moveTo(l,!0),!0;this._setPanWithFriction(e,u)}else if(0!==n){if(n>0)return a.moveTo(Math.max(l,t),!0),!0;if(n<0)return a.moveTo(Math.min(l,t),!0),!0}else this._setPanWithFriction(e,u)}else"y"===e?!a.isShifted()&&c.min.y!==c.max.y&&this._setPanWithFriction(e,u):this._setPanWithFriction(e,u);return!1}_getVerticalDragRatio(e){var t,n;return(e-(null!==(t=null===(n=this.pswp.currSlide)||void 0===n?void 0:n.bounds.center.y)&&void 0!==t?t:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(e,t,n){const{currSlide:r}=this.pswp;if(!r)return;const{pan:i,bounds:o}=r;if(o.correctPan(e,t)!==t||n){const r=Math.round(t-i[e]);i[e]+=r*(n||.35)}else i[e]=t}}function se(e,t,n){return e.x=(t.x+n.x)/2,e.y=(t.y+n.y)/2,e}let le=class{constructor(e){this.gestures=e,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:e}=this.gestures.pswp;e&&(this._startZoomLevel=e.currZoomLevel,F(this._startPan,e.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:e,startP1:t,p2:n,startP2:r,pswp:i}=this.gestures,{currSlide:o}=i;if(!o)return;const a=o.zoomLevels.min,s=o.zoomLevels.max;if(!o.isZoomable()||i.mainScroll.isShifted())return;se(this._startZoomPoint,t,r),se(this._zoomPoint,e,n);let l=1/q(t,r)*q(e,n)*this._startZoomLevel;if(l>o.zoomLevels.initial+o.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),l<a)if(i.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=o.zoomLevels.initial){const e=1-(a-l)/(a/1.2);i.dispatch("pinchClose",{bgOpacity:e}).defaultPrevented||i.applyBgOpacity(e)}else l=a-.15*(a-l);else l>s&&(l=s+.05*(l-s));o.pan.x=this._calculatePanForZoomLevel("x",l),o.pan.y=this._calculatePanForZoomLevel("y",l),o.setZoomLevel(l),o.applyCurrentZoomPan()}end(){const{pswp:e}=this.gestures,{currSlide:t}=e;(!t||t.currZoomLevel<t.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&e.options.pinchToClose?e.close():this.correctZoomPan()}_calculatePanForZoomLevel(e,t){const n=t/this._startZoomLevel;return this._zoomPoint[e]-(this._startZoomPoint[e]-this._startPan[e])*n}correctZoomPan(e){const{pswp:t}=this.gestures,{currSlide:n}=t;if(null==n||!n.isZoomable())return;0===this._zoomPoint.x&&(e=!0);const r=n.currZoomLevel;let i,o=!0;r<n.zoomLevels.initial?i=n.zoomLevels.initial:r>n.zoomLevels.max?i=n.zoomLevels.max:(o=!1,i=r);const a=t.bgOpacity,s=t.bgOpacity<1,l=F({x:0,y:0},n.pan);let c=F({x:0,y:0},l);e&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=r,F(this._startPan,l)),o&&(c={x:this._calculatePanForZoomLevel("x",i),y:this._calculatePanForZoomLevel("y",i)}),n.setZoomLevel(i),c={x:n.bounds.correctPan("x",c.x),y:n.bounds.correctPan("y",c.y)},n.setZoomLevel(r);const u=!z(c,l);if(!u&&!o&&!s)return n._setResolution(i),void n.applyCurrentZoomPan();t.animations.stopAllPan(),t.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:e=>{if(e/=1e3,u||o){if(u&&(n.pan.x=l.x+(c.x-l.x)*e,n.pan.y=l.y+(c.y-l.y)*e),o){const t=r+(i-r)*e;n.setZoomLevel(t)}n.applyCurrentZoomPan()}s&&t.bgOpacity<1&&t.applyBgOpacity(H(a+(1-a)*e,0,1))},onComplete:()=>{n._setResolution(i),n.applyCurrentZoomPan()}})}};function ce(e){return!!e.target.closest(".pswp__container")}let ue=class{constructor(e){this.gestures=e}click(e,t){const n=t.target.classList,r=n.contains("pswp__img"),i=n.contains("pswp__item")||n.contains("pswp__zoom-wrap");r?this._doClickOrTapAction("imageClick",e,t):i&&this._doClickOrTapAction("bgClick",e,t)}tap(e,t){ce(t)&&this._doClickOrTapAction("tap",e,t)}doubleTap(e,t){ce(t)&&this._doClickOrTapAction("doubleTap",e,t)}_doClickOrTapAction(e,t,n){var r;const{pswp:i}=this.gestures,{currSlide:o}=i,a=e+"Action",s=i.options[a];if(!i.dispatch(a,{point:t,originalEvent:n}).defaultPrevented){if("function"==typeof s)return void s.call(i,t,n);switch(s){case"close":case"next":i[s]();break;case"zoom":o?.toggleZoom(t);break;case"zoom-or-close":null!=o&&o.isZoomable()&&o.zoomLevels.secondary!==o.zoomLevels.initial?o.toggleZoom(t):i.options.clickToCloseNonZoomable&&i.close();break;case"toggle-controls":null===(r=this.gestures.pswp.element)||void 0===r||r.classList.toggle("pswp--ui-visible")}}}};class de{constructor(e){this.pswp=e,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},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||(e.options.allowPanToNext=!1),this.drag=new ae(this),this.zoomLevels=new le(this),this.tapHandler=new ue(this),e.on("bindEvents",()=>{e.events.add(e.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),e.scrollWrap&&(e.scrollWrap.ontouchmove=()=>{},e.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(e,t,n,r){const{pswp:i}=this,{events:o}=i,a=r?e+r:"";o.add(i.scrollWrap,e+t,this.onPointerDown.bind(this)),o.add(window,e+"move",this.onPointerMove.bind(this)),o.add(window,e+n,this.onPointerUp.bind(this)),a&&o.add(i.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(e){const t="mousedown"===e.type||"mouse"===e.pointerType;if(t&&e.button>0)return;const{pswp:n}=this;n.opener.isOpen?n.dispatch("pointerDown",{originalEvent:e}).defaultPrevented||(t&&(n.mouseDetected(),this._preventPointerEventBehaviour(e,"down")),n.animations.stopAll(),this._updatePoints(e,"down"),1===this._numActivePoints&&(this.dragAxis=null,F(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1):e.preventDefault()}onPointerMove(e){this._preventPointerEventBehaviour(e,"move"),this._numActivePoints&&(this._updatePoints(e,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:e}).defaultPrevented&&(1!==this._numActivePoints||this.isDragging?this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop()):(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,F(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop()))))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(e){this._numActivePoints&&(this._updatePoints(e,"up"),!this.pswp.dispatch("pointerUp",{originalEvent:e}).defaultPrevented&&(0===this._numActivePoints&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(e)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),1===this._numActivePoints&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?z(this.p1,this.prevP1)||this.drag.change():(!z(this.p1,this.prevP1)||!z(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(e){const t=Date.now(),n=t-this._intervalTime;n<50&&!e||(this.velocity.x=this._getVelocity("x",n),this.velocity.y=this._getVelocity("y",n),this._intervalTime=t,F(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(e){const{mainScroll:t}=this.pswp;if(t.isShifted())return void t.moveIndexBy(0,!0);if(e.type.indexOf("cancel")>0)return;if("mouseup"===e.type||"mouse"===e.pointerType)return void this.tapHandler.click(this.startP1,e);const n=this.pswp.options.doubleTapAction?300:0;this._tapTimer?(this._clearTapTimer(),q(this._lastStartP1,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,e)):(F(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,e),this._clearTapTimer()},n))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(e,t){const n=this.p1[e]-this._intervalP1[e];return Math.abs(n)>1&&t>5?n/t:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(e,t){this.pswp.applyFilters("preventPointerEvent",!0,e,t)&&e.preventDefault()}_updatePoints(e,t){if(this._pointerEventEnabled){const n=e,r=this._ongoingPointers.findIndex(e=>e.id===n.pointerId);"up"===t&&r>-1?this._ongoingPointers.splice(r,1):"down"===t&&-1===r?this._ongoingPointers.push(this._convertEventPosToPoint(n,{x:0,y:0})):r>-1&&this._convertEventPosToPoint(n,this._ongoingPointers[r]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&F(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&F(this.p2,this._ongoingPointers[1])}else{const n=e;this._numActivePoints=0,n.type.indexOf("touch")>-1?n.touches&&n.touches.length>0&&(this._convertEventPosToPoint(n.touches[0],this.p1),this._numActivePoints++,n.touches.length>1&&(this._convertEventPosToPoint(n.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(e,this.p1),"up"===t?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){F(this.prevP1,this.p1),F(this.prevP2,this.p2)}_updateStartPoints(){F(this.startP1,this.p1),F(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const e=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(0!==e){const t=e>0?"x":"y";Math.abs(this.p1[t]-this.startP1[t])>=10&&(this.dragAxis=t)}}}_convertEventPosToPoint(e,t){return t.x=e.pageX-this.pswp.offset.x,t.y=e.pageY-this.pswp.offset.y,"pointerId"in e?t.id=e.pointerId:void 0!==e.identifier&&(t.id=e.identifier),t}_onClick(e){this.pswp.mainScroll.isShifted()&&(e.preventDefault(),e.stopPropagation())}}class he{constructor(e){this.pswp=e,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(e){const{pswp:t}=this,n=Math.round(t.viewportSize.x+t.viewportSize.x*t.options.spacing),r=n!==this.slideWidth;r&&(this.slideWidth=n,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((t,n)=>{r&&U(t.el,(n+this._containerShiftIndex)*this.slideWidth),e&&t.slide&&t.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let e=0;e<3;e++){const t=j("pswp__item","div",this.pswp.container);t.setAttribute("role","group"),t.setAttribute("aria-roledescription","slide"),t.setAttribute("aria-hidden","true"),t.style.display=1===e?"block":"none",this.itemHolders.push({el:t})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(e,t,n){const{pswp:r}=this;let i=r.potentialIndex+e;const o=r.getNumItems();if(r.canLoop()){i=r.getLoopedIndex(i);const t=(e+o)%o;e=t<=o/2?t:t-o}else i<0?i=0:i>=o&&(i=o-1),e=i-r.potentialIndex;r.potentialIndex=i,this._currPositionIndex-=e,r.animations.stopMainScroll();const a=this.getCurrSlideX();if(t){r.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:n||0,naturalFrequency:30,dampingRatio:1,onUpdate:e=>{this.moveTo(e)},onComplete:()=>{this.updateCurrItem(),r.appendHeavy()}});let e=r.potentialIndex-r.currIndex;if(r.canLoop()){const t=(e+o)%o;e=t<=o/2?t:t-o}Math.abs(e)>1&&this.updateCurrItem()}else this.moveTo(a),this.updateCurrItem();return!!e}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var e;const{pswp:t}=this,n=this._prevPositionIndex-this._currPositionIndex;if(!n)return;this._prevPositionIndex=this._currPositionIndex,t.currIndex=t.potentialIndex;let r,i=Math.abs(n);i>=3&&(this._containerShiftIndex+=n+(n>0?-3:3),i=3,this.itemHolders.forEach(e=>{var t;null===(t=e.slide)||void 0===t||t.destroy(),e.slide=void 0}));for(let e=0;e<i;e++)n>0?(r=this.itemHolders.shift(),r&&(this.itemHolders[2]=r,this._containerShiftIndex++,U(r.el,(this._containerShiftIndex+2)*this.slideWidth),t.setContent(r,t.currIndex-i+e+2))):(r=this.itemHolders.pop(),r&&(this.itemHolders.unshift(r),this._containerShiftIndex--,U(r.el,this._containerShiftIndex*this.slideWidth),t.setContent(r,t.currIndex+i-e-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),t.animations.stopAllPan(),this.itemHolders.forEach((e,t)=>{e.slide&&e.slide.setIsActive(1===t)}),t.currSlide=null===(e=this.itemHolders[1])||void 0===e?void 0:e.slide,t.contentLoader.updateLazy(n),t.currSlide&&t.currSlide.applyCurrentZoomPan(),t.dispatch("change")}moveTo(e,t){if(!this.pswp.canLoop()&&t){let t=(this.slideWidth*this._currPositionIndex-e)/this.slideWidth;t+=this.pswp.currIndex;const n=Math.round(e-this.x);(t<0&&n>0||t>=this.pswp.getNumItems()-1&&n<0)&&(e=this.x+.35*n)}this.x=e,this.pswp.container&&U(this.pswp.container,e),this.pswp.dispatch("moveMainScroll",{x:e,dragging:t??!1})}}const pe={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},fe=(e,t)=>t?e:pe[e];class me{constructor(e){this.pswp=e,this._wasFocused=!1,e.on("bindEvents",()=>{e.options.trapFocus&&(e.options.initialPointerPos||this._focusRoot(),e.events.add(document,"focusin",this._onFocusIn.bind(this))),e.events.add(document,"keydown",this._onKeyDown.bind(this))});const t=document.activeElement;e.on("destroy",()=>{e.options.returnFocus&&t&&this._wasFocused&&t.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(e){const{pswp:t}=this;if(t.dispatch("keydown",{originalEvent:e}).defaultPrevented||("button"in(n=e)&&1===n.button||n.ctrlKey||n.metaKey||n.altKey||n.shiftKey))return;var n;let r,i,o=!1;const a="key"in e;switch(a?e.key:e.keyCode){case fe("Escape",a):t.options.escKey&&(r="close");break;case fe("z",a):r="toggleZoom";break;case fe("ArrowLeft",a):i="x";break;case fe("ArrowUp",a):i="y";break;case fe("ArrowRight",a):i="x",o=!0;break;case fe("ArrowDown",a):o=!0,i="y";break;case fe("Tab",a):this._focusRoot()}if(i){e.preventDefault();const{currSlide:n}=t;t.options.arrowKeys&&"x"===i&&t.getNumItems()>1?r=o?"next":"prev":n&&n.currZoomLevel>n.zoomLevels.fit&&(n.pan[i]+=o?-80:80,n.panTo(n.pan.x,n.pan.y))}r&&(e.preventDefault(),t[r]())}_onFocusIn(e){const{template:t}=this.pswp;t&&document!==e.target&&t!==e.target&&!t.contains(e.target)&&t.focus()}}const ge="cubic-bezier(.4,0,.22,1)";class ye{constructor(e){var t;this.props=e;const{target:n,onComplete:r,transform:i,onFinish:o=()=>{},duration:a=333,easing:s=ge}=e;this.onFinish=o;const l=i?"transform":"opacity",c=null!==(t=e[l])&&void 0!==t?t:"";this._target=n,this._onComplete=r,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{V(n,l,a,s),this._helperTimeout=setTimeout(()=>{n.addEventListener("transitionend",this._onTransitionEnd,!1),n.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},a+500),n.style[l]=c},30)},0)}_onTransitionEnd(e){e.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&clearTimeout(this._helperTimeout),V(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}class ve{constructor(e,t,n){this.velocity=1e3*e,this._dampingRatio=t||.75,this._naturalFrequency=n||12,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(e,t){let n,r=0;t/=1e3;const i=Math.E**(-this._dampingRatio*this._naturalFrequency*t);if(1===this._dampingRatio)n=this.velocity+this._naturalFrequency*e,r=(e+n*t)*i,this.velocity=r*-this._naturalFrequency+n*i;else if(this._dampingRatio<1){n=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*e+this.velocity);const o=Math.cos(this._dampedFrequency*t),a=Math.sin(this._dampedFrequency*t);r=i*(e*o+n*a),this.velocity=r*-this._naturalFrequency*this._dampingRatio+i*(-this._dampedFrequency*e*a+this._dampedFrequency*n*o)}return r}}class Ae{constructor(e){this.props=e,this._raf=0;const{start:t,end:n,velocity:r,onUpdate:i,onComplete:o,onFinish:a=()=>{},dampingRatio:s,naturalFrequency:l}=e;this.onFinish=a;const c=new ve(r,s,l);let u=Date.now(),d=t-n;const h=()=>{this._raf&&(d=c.easeFrame(d,Date.now()-u),Math.abs(d)<1&&Math.abs(c.velocity)<50?(i(n),o&&o(),this.onFinish()):(u=Date.now(),i(d+n),this._raf=requestAnimationFrame(h)))};this._raf=requestAnimationFrame(h)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class be{constructor(){this.activeAnimations=[]}startSpring(e){this._start(e,!0)}startTransition(e){this._start(e)}_start(e,t){const n=t?new Ae(e):new ye(e);return this.activeAnimations.push(n),n.onFinish=()=>this.stop(n),n}stop(e){e.destroy();const t=this.activeAnimations.indexOf(e);t>-1&&this.activeAnimations.splice(t,1)}stopAll(){this.activeAnimations.forEach(e=>{e.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(e=>!e.props.isPan||(e.destroy(),!1))}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(e=>!e.props.isMainScroll||(e.destroy(),!1))}isPanRunning(){return this.activeAnimations.some(e=>e.props.isPan)}}class we{constructor(e){this.pswp=e,e.events.add(e.element,"wheel",this._onWheel.bind(this))}_onWheel(e){e.preventDefault();const{currSlide:t}=this.pswp;let{deltaX:n,deltaY:r}=e;if(t&&!this.pswp.dispatch("wheel",{originalEvent:e}).defaultPrevented)if(e.ctrlKey||this.pswp.options.wheelToZoom){if(t.isZoomable()){let n=-r;1===e.deltaMode?n*=.05:n*=e.deltaMode?1:.002,n=2**n;const i=t.currZoomLevel*n;t.zoomTo(i,{x:e.clientX,y:e.clientY})}}else t.isPannable()&&(1===e.deltaMode&&(n*=18,r*=18),t.panTo(t.pan.x-n,t.pan.y-r))}}class xe{constructor(e,t){var n;const r=t.name||t.className;let i=t.html;if(!1===e.options[r])return;"string"==typeof e.options[r+"SVG"]&&(i=e.options[r+"SVG"]),e.dispatch("uiElementCreate",{data:t});let o="";t.isButton?(o+="pswp__button ",o+=t.className||`pswp__button--${t.name}`):o+=t.className||`pswp__${t.name}`;let a=t.isButton?t.tagName||"button":t.tagName||"div";a=a.toLowerCase();const s=j(o,a);if(t.isButton){"button"===a&&(s.type="button");let{title:n}=t;const{ariaLabel:i}=t;"string"==typeof e.options[r+"Title"]&&(n=e.options[r+"Title"]),n&&(s.title=n);const o=i||n;o&&s.setAttribute("aria-label",o)}s.innerHTML=function(e){if("string"==typeof e)return e;if(!e||!e.isCustomSVG)return"";const t=e;let n='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return n=n.split("%d").join(t.size||32),t.outlineID&&(n+='<use class="pswp__icn-shadow" xlink:href="#'+t.outlineID+'"/>'),n+=t.inner,n+="</svg>",n}(i),t.onInit&&t.onInit(s,e),t.onClick&&(s.onclick=n=>{"string"==typeof t.onClick?e[t.onClick]():"function"==typeof t.onClick&&t.onClick(n,s,e)});const l=t.appendTo||"bar";let c=e.element;"bar"===l?(e.topBar||(e.topBar=j("pswp__top-bar pswp__hide-on-close","div",e.scrollWrap)),c=e.topBar):(s.classList.add("pswp__hide-on-close"),"wrapper"===l&&(c=e.scrollWrap)),null===(n=c)||void 0===n||n.appendChild(e.applyFilters("uiElement",s,t))}}function _e(e,t,n){e.classList.add("pswp__button--arrow"),e.setAttribute("aria-controls","pswp__items"),t.on("change",()=>{t.options.loop||(e.disabled=n?!(t.currIndex<t.getNumItems()-1):!(t.currIndex>0))})}const Se={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:_e},Ee={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(e,t)=>{_e(e,t,!0)}},Ce={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},ke={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},Ie={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(e,t)=>{let n,r=null;const i=t=>{n!==t&&(n=t,((t,n)=>{e.classList.toggle("pswp__preloader--"+t,n)})("active",t))},o=()=>{var e;if(null===(e=t.currSlide)||void 0===e||!e.content.isLoading())return i(!1),void(r&&(clearTimeout(r),r=null));r||(r=setTimeout(()=>{var e;i(!(null===(e=t.currSlide)||void 0===e||!e.content.isLoading())),r=null},t.options.preloaderDelay))};t.on("change",o),t.on("loadComplete",e=>{t.currSlide===e.slide&&o()}),t.ui&&(t.ui.updatePreloaderVisibility=o)}},De={name:"counter",order:5,onInit:(e,t)=>{t.on("change",()=>{e.innerText=t.currIndex+1+t.options.indexIndicatorSep+t.getNumItems()})}};function Te(e,t){e.classList.toggle("pswp--zoomed-in",t)}class Ne{constructor(e){this.pswp=e,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:e}=this;this.isRegistered=!1,this.uiElementsData=[Ce,Se,Ee,ke,Ie,De],e.dispatch("uiRegister"),this.uiElementsData.sort((e,t)=>(e.order||0)-(t.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(e=>{this.registerElement(e)}),e.on("change",()=>{var t;null===(t=e.element)||void 0===t||t.classList.toggle("pswp--one-slide",1===e.getNumItems())}),e.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(e){this.isRegistered?this.items.push(new xe(this.pswp,e)):this.uiElementsData.push(e)}_onZoomPanUpdate(){const{template:e,currSlide:t,options:n}=this.pswp;if(this.pswp.opener.isClosing||!e||!t)return;let{currZoomLevel:r}=t;if(this.pswp.opener.isOpen||(r=t.zoomLevels.initial),r===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=r;const i=t.zoomLevels.initial-t.zoomLevels.secondary;if(Math.abs(i)<.01||!t.isZoomable())return Te(e,!1),void e.classList.remove("pswp--zoom-allowed");e.classList.add("pswp--zoom-allowed");Te(e,(r===t.zoomLevels.initial?t.zoomLevels.secondary:t.zoomLevels.initial)<=r),("zoom"===n.imageClickAction||"zoom-or-close"===n.imageClickAction)&&e.classList.add("pswp--click-to-zoom")}}let Le=class{constructor(e,t){this.type=e,this.defaultPrevented=!1,t&&Object.assign(this,t)}preventDefault(){this.defaultPrevented=!0}},Be=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(e,t,n=100){var r,i,o;this._filters[e]||(this._filters[e]=[]),null===(r=this._filters[e])||void 0===r||r.push({fn:t,priority:n}),null===(i=this._filters[e])||void 0===i||i.sort((e,t)=>e.priority-t.priority),null===(o=this.pswp)||void 0===o||o.addFilter(e,t,n)}removeFilter(e,t){this._filters[e]&&(this._filters[e]=this._filters[e].filter(e=>e.fn!==t)),this.pswp&&this.pswp.removeFilter(e,t)}applyFilters(e,...t){var n;return null===(n=this._filters[e])||void 0===n||n.forEach(e=>{t[0]=e.fn.apply(this,t)}),t[0]}on(e,t){var n,r;this._listeners[e]||(this._listeners[e]=[]),null===(n=this._listeners[e])||void 0===n||n.push(t),null===(r=this.pswp)||void 0===r||r.on(e,t)}off(e,t){var n;this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(e=>t!==e)),null===(n=this.pswp)||void 0===n||n.off(e,t)}dispatch(e,t){var n;if(this.pswp)return this.pswp.dispatch(e,t);const r=new Le(e,t);return null===(n=this._listeners[e])||void 0===n||n.forEach(e=>{e.call(this,r)}),r}},Pe=class{constructor(e,t){if(this.element=j("pswp__img pswp__img--placeholder",e?"img":"div",t),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,t){this.element&&("IMG"===this.element.tagName?(Q(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=K(0,0,e/250)):Q(this.element,e,t))}destroy(){var e;null!==(e=this.element)&&void 0!==e&&e.parentNode&&this.element.remove(),this.element=null}},Oe=class{constructor(e,t,n){this.instance=t,this.data=e,this.index=n,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=W,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(e,t){if(this.slide&&this.usePlaceholder())if(this.placeholder){const e=this.placeholder.element;e&&!e.parentElement&&this.slide.container.prepend(e)}else{const e=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new Pe(e,this.slide.container)}this.element&&!t||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=j("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=j("pswp__content","div"),this.element.innerHTML=this.data.html||""),t&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){var t,n;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;const r=this.element;this.updateSrcsetSizes(),this.data.srcset&&(r.srcset=this.data.srcset),r.src=null!==(t=this.data.src)&&void 0!==t?t:"",r.alt=null!==(n=this.data.alt)&&void 0!==n?n:"",this.state=G,r.complete?this.onLoaded():(r.onload=()=>{this.onLoaded()},r.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=Z,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===Z||this.state===Y)&&this.removePlaceholder())}onError(){this.state=Y,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===G,this)}isError(){return this.state===Y}isImageContent(){return"image"===this.type}setDisplayedSize(e,t){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,t),!this.instance.dispatch("contentResize",{content:this,width:e,height:t}).defaultPrevented&&(Q(this.element,e,t),this.isImageContent()&&!this.isError()))){const n=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=t,n?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:t,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==Y,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const e=this.element,t=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||t>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=t+"px",e.dataset.largestUsedSize=String(t))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var e,t;let n=j("pswp__error-msg","div");n.innerText=null!==(e=null===(t=this.instance.options)||void 0===t?void 0:t.errorMsg)&&void 0!==e?e:"",n=this.instance.applyFilters("contentErrorElement",n,this),this.element=j("pswp__content pswp__error-msg-container","div"),this.element.appendChild(n),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===Y)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const e="decode"in this.element;this.isImageContent()?e&&this.slide&&(!this.slide.isActive||J())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!J()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===Z||this.state===Y)&&this.removePlaceholder()))}};function Me(e,t,n){const r=t.createContentFromData(e,n);let i;const{options:o}=t;if(o){let a;i=new ie(o,e,-1),a=t.pswp?t.pswp.viewportSize:ee(o,t);const s=ne(o,a,e,n);i.update(r.width,r.height,s)}return r.lazyLoad(),i&&r.setDisplayedSize(Math.ceil(r.width*i.initial),Math.ceil(r.height*i.initial)),r}class je{constructor(e){this.pswp=e,this.limit=Math.max(e.options.preload[0]+e.options.preload[1]+1,5),this._cachedItems=[]}updateLazy(e){const{pswp:t}=this;if(t.dispatch("lazyLoad").defaultPrevented)return;const{preload:n}=t.options,r=void 0===e||e>=0;let i;for(i=0;i<=n[1];i++)this.loadSlideByIndex(t.currIndex+(r?i:-i));for(i=1;i<=n[0];i++)this.loadSlideByIndex(t.currIndex+(r?-i:i))}loadSlideByIndex(e){const t=this.pswp.getLoopedIndex(e);let n=this.getContentByIndex(t);n||(n=function(e,t){const n=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:n}).defaultPrevented)return Me(n,t,e)}(t,this.pswp),n&&this.addToCache(n))}getContentBySlide(e){let t=this.getContentByIndex(e.index);return t||(t=this.pswp.createContentFromData(e.data,e.index),this.addToCache(t)),t.setSlide(e),t}addToCache(e){if(this.removeByIndex(e.index),this._cachedItems.push(e),this._cachedItems.length>this.limit){const e=this._cachedItems.findIndex(e=>!e.isAttached&&!e.hasSlide);-1!==e&&this._cachedItems.splice(e,1)[0].destroy()}}removeByIndex(e){const t=this._cachedItems.findIndex(t=>t.index===e);-1!==t&&this._cachedItems.splice(t,1)}getContentByIndex(e){return this._cachedItems.find(t=>t.index===e)}destroy(){this._cachedItems.forEach(e=>e.destroy()),this._cachedItems=[]}}let Fe=class extends Be{getNumItems(){var e;let t=0;const n=null===(e=this.options)||void 0===e?void 0:e.dataSource;n&&"length"in n?t=n.length:n&&"gallery"in n&&(n.items||(n.items=this._getGalleryDOMElements(n.gallery)),n.items&&(t=n.items.length));const r=this.dispatch("numItems",{dataSource:n,numItems:t});return this.applyFilters("numItems",r.numItems,n)}createContentFromData(e,t){return new Oe(e,this,t)}getItemData(e){var t;const n=null===(t=this.options)||void 0===t?void 0:t.dataSource;let r={};Array.isArray(n)?r=n[e]:n&&"gallery"in n&&(n.items||(n.items=this._getGalleryDOMElements(n.gallery)),r=n.items[e]);let i=r;i instanceof Element&&(i=this._domElementToItemData(i));const o=this.dispatch("itemData",{itemData:i||{},index:e});return this.applyFilters("itemData",o.itemData,e)}_getGalleryDOMElements(e){var t,n;return null!==(t=this.options)&&void 0!==t&&t.children||null!==(n=this.options)&&void 0!==n&&n.childSelector?function(e,t,n=document){let r=[];if(e instanceof Element)r=[e];else if(e instanceof NodeList||Array.isArray(e))r=Array.from(e);else{const i="string"==typeof e?e:t;i&&(r=Array.from(n.querySelectorAll(i)))}return r}(this.options.children,this.options.childSelector,e)||[]:[e]}_domElementToItemData(e){const t={element:e},n="A"===e.tagName?e:e.querySelector("a");if(n){t.src=n.dataset.pswpSrc||n.href,n.dataset.pswpSrcset&&(t.srcset=n.dataset.pswpSrcset),t.width=n.dataset.pswpWidth?parseInt(n.dataset.pswpWidth,10):0,t.height=n.dataset.pswpHeight?parseInt(n.dataset.pswpHeight,10):0,t.w=t.width,t.h=t.height,n.dataset.pswpType&&(t.type=n.dataset.pswpType);const i=e.querySelector("img");var r;if(i)t.msrc=i.currentSrc||i.src,t.alt=null!==(r=i.getAttribute("alt"))&&void 0!==r?r:"";(n.dataset.pswpCropped||n.dataset.cropped)&&(t.thumbCropped=!0)}return this.applyFilters("domItemData",t,e,n)}lazyLoadData(e,t){return Me(e,this,t)}};const Re=.003;class qe{constructor(e){this.pswp=e,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),e.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const e=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,e&&e.currZoomLevel*e.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const e=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,e&&e.zoomLevels.initial*e.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:e}=this,t=this.pswp.currSlide,{options:n}=e;var r,i;("fade"===n.showHideAnimationType?(n.showHideOpacity=!0,this._thumbBounds=void 0):"none"===n.showHideAnimationType?(n.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&e._initialThumbBounds?this._thumbBounds=e._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=t?.getPlaceholderElement(),e.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&t?.content.usePlaceholder()&&(!this.isClosing||!e.mainScroll.isShifted()),this._animateZoom)?this._animateRootOpacity=null!==(r=n.showHideOpacity)&&void 0!==r&&r:(this._animateRootOpacity=!0,this.isOpening&&t&&(t.zoomAndPanToInitial(),t.applyCurrentZoomPan()));if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>Re,this._opacityElement=this._animateRootOpacity?e.element:e.bg,!this._useAnimation)return this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,void(this.isOpening&&(e.element&&(e.element.style.opacity=String(Re)),e.applyBgOpacity(1)));this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect?(this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=null===(i=this.pswp.currSlide)||void 0===i?void 0:i.holderElement,e.container&&(e.container.style.overflow="hidden",e.container.style.width=e.viewportSize.x+"px")):this._croppedZoom=!1;this.isOpening?(this._animateRootOpacity?(e.element&&(e.element.style.opacity=String(Re)),e.applyBgOpacity(1)):(this._animateBgOpacity&&e.bg&&(e.bg.style.opacity=String(Re)),e.element&&(e.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(Re)))):this.isClosing&&(e.mainScroll.itemHolders[0]&&(e.mainScroll.itemHolders[0].el.style.display="none"),e.mainScroll.itemHolders[2]&&(e.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&0!==e.mainScroll.x&&(e.mainScroll.resetPosition(),e.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&"IMG"===this._placeholder.tagName?new Promise(e=>{let t=!1,n=!0;var r;(r=this._placeholder,"decode"in r?r.decode().catch(()=>{}):r.complete?Promise.resolve(r):new Promise((e,t)=>{r.onload=()=>e(r),r.onerror=t})).finally(()=>{t=!0,n||e(!0)}),setTimeout(()=>{n=!1,t&&e(!0)},50),setTimeout(e,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){var e,t;null===(e=this.pswp.element)||void 0===e||e.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),null===(t=this.pswp.element)||void 0===t||t.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:e}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,e.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),e.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)e.destroy();else if(this.isOpen){var t;this._animateZoom&&e.container&&(e.container.style.overflow="visible",e.container.style.width="100%"),null===(t=e.currSlide)||void 0===t||t.applyCurrentZoomPan()}}_animateToOpenState(){const{pswp:e}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),e.currSlide&&(e.currSlide.zoomAndPanToInitial(),this._animateTo(e.currSlide.container,"transform",e.currSlide.getCurrentTransform()))),this._animateBgOpacity&&e.bg&&this._animateTo(e.bg,"opacity",String(e.options.bgOpacity)),this._animateRootOpacity&&e.element&&this._animateTo(e.element,"opacity","1")}_animateToClosedState(){const{pswp:e}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&e.bgOpacity>.01&&e.bg&&this._animateTo(e.bg,"opacity","0"),this._animateRootOpacity&&e.element&&this._animateTo(e.element,"opacity","0")}_setClosedStateZoomPan(e){if(!this._thumbBounds)return;const{pswp:t}=this,{innerRect:n}=this._thumbBounds,{currSlide:r,viewportSize:i}=t;if(this._croppedZoom&&n&&this._cropContainer1&&this._cropContainer2){const t=-i.x+(this._thumbBounds.x-n.x)+n.w,r=-i.y+(this._thumbBounds.y-n.y)+n.h,o=i.x-n.w,a=i.y-n.h;e?(this._animateTo(this._cropContainer1,"transform",K(t,r)),this._animateTo(this._cropContainer2,"transform",K(o,a))):(U(this._cropContainer1,t,r),U(this._cropContainer2,o,a))}r&&(F(r.pan,n||this._thumbBounds),r.currZoomLevel=this._thumbBounds.w/r.width,e?this._animateTo(r.container,"transform",r.getCurrentTransform()):r.applyCurrentZoomPan())}_animateTo(e,t,n){if(!this._duration)return void(e.style[t]=n);const{animations:r}=this.pswp,i={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{r.activeAnimations.length||this._onAnimationComplete()},target:e};i[t]=n,r.startTransition(i)}}const ze={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};class He extends Fe{constructor(e){super(),this.options=this._prepareOptions(e||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},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 X,this.animations=new be,this.mainScroll=new he(this),this.gestures=new de(this),this.opener=new qe(this),this.keyboard=new me(this),this.contentLoader=new je(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let e="pswp--open";return this.gestures.supportsTouch&&(e+=" pswp--touch"),this.options.mainClass&&(e+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+e),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new we(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",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:e}=this.mainScroll;e[0]&&(e[0].el.style.display="block",this.setContent(e[0],this.currIndex-1)),e[2]&&(e[2].el.style.display="block",this.setContent(e[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(e){const t=this.getNumItems();return this.options.loop&&(e>t-1&&(e-=t),e<0&&(e+=t)),H(e,0,t-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(e=>{var t;null===(t=e.slide)||void 0===t||t.appendHeavy()})}goTo(e){this.mainScroll.moveIndexBy(this.getLoopedIndex(e)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...e){var t;null===(t=this.currSlide)||void 0===t||t.zoomTo(...e)}toggleZoom(){var e;null===(e=this.currSlide)||void 0===e||e.toggleZoom()}close(){!this.opener.isOpen||this.isDestroying||(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var e;if(!this.isDestroying)return this.options.showHideAnimationType="none",void this.close();this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),null===(e=this.element)||void 0===e||e.remove(),this.mainScroll.itemHolders.forEach(e=>{var t;null===(t=e.slide)||void 0===t||t.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(e){this.contentLoader.removeByIndex(e),this.mainScroll.itemHolders.forEach((t,n)=>{var r,i;let o=(null!==(r=null===(i=this.currSlide)||void 0===i?void 0:i.index)&&void 0!==r?r:0)-1+n;var a;(this.canLoop()&&(o=this.getLoopedIndex(o)),o===e&&(this.setContent(t,e,!0),1===n))&&(this.currSlide=t.slide,null===(a=t.slide)||void 0===a||a.setIsActive(!0))}),this.dispatch("change")}setContent(e,t,n){if(this.canLoop()&&(t=this.getLoopedIndex(t)),e.slide){if(e.slide.index===t&&!n)return;e.slide.destroy(),e.slide=void 0}if(!this.canLoop()&&(t<0||t>=this.getNumItems()))return;const r=this.getItemData(t);e.slide=new oe(r,t,this),t===this.currIndex&&(this.currSlide=e.slide),e.slide.append(e.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(e){if(this.isDestroying)return;const t=ee(this.options,this);!e&&z(t,this._prevViewportSize)||(F(this._prevViewportSize,t),this.dispatch("beforeResize"),F(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"))}applyBgOpacity(e){this.bgOpacity=Math.max(e,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){var e;this.hasMouse||(this.hasMouse=!0,null===(e=this.element)||void 0===e||e.classList.add("pswp--has_mouse"))}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(e,t){this.offset.x=e,this.offset.y=t,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=j("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=j("pswp__bg","div",this.element),this.scrollWrap=j("pswp__scroll-wrap","section",this.element),this.container=j("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 Ne(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(e,t,n){const r=n.dispatch("thumbBounds",{index:e,itemData:t,instance:n});if(r.thumbBounds)return r.thumbBounds;const{element:i}=t;let o,a;if(i&&!1!==n.options.thumbSelector){const e=n.options.thumbSelector||"img";a=i.matches(e)?i:i.querySelector(e)}return a=n.applyFilters("thumbEl",a,t,e),a&&(o=t.thumbCropped?function(e,t,n){const r=e.getBoundingClientRect(),i=r.width/t,o=r.height/n,a=i>o?i:o,s=(r.width-t*a)/2,l=(r.height-n*a)/2,c={x:r.left+s,y:r.top+l,w:t*a};return c.innerRect={w:r.width,h:r.height,x:s,y:l},c}(a,t.width||t.w||0,t.height||t.h||0):function(e){const t=e.getBoundingClientRect();return{x:t.left,y:t.top,w:t.width}}(a)),n.applyFilters("thumbBounds",o,t,e)}(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(e){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(e.showHideAnimationType="none",e.zoomAnimationDuration=0),{...ze,...e}}}function Ke(e,t,n){const r=document.createElement(t);return e&&(r.className=e),n&&n.appendChild(r),r}function Ue(e,t,n){e.style.width="number"==typeof t?`${t}px`:t,e.style.height="number"==typeof n?`${n}px`:n}const Ve="idle",Qe="loading",We="loaded",Ge="error";function Ze(e,t,n=document){let r=[];if(e instanceof Element)r=[e];else if(e instanceof NodeList||Array.isArray(e))r=Array.from(e);else{const i="string"==typeof e?e:t;i&&(r=Array.from(n.querySelectorAll(i)))}return r}function Ye(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}class Je{constructor(e,t){this.type=e,this.defaultPrevented=!1,t&&Object.assign(this,t)}preventDefault(){this.defaultPrevented=!0}}class $e{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(e,t,n=100){var r,i,o;this._filters[e]||(this._filters[e]=[]),null===(r=this._filters[e])||void 0===r||r.push({fn:t,priority:n}),null===(i=this._filters[e])||void 0===i||i.sort((e,t)=>e.priority-t.priority),null===(o=this.pswp)||void 0===o||o.addFilter(e,t,n)}removeFilter(e,t){this._filters[e]&&(this._filters[e]=this._filters[e].filter(e=>e.fn!==t)),this.pswp&&this.pswp.removeFilter(e,t)}applyFilters(e,...t){var n;return null===(n=this._filters[e])||void 0===n||n.forEach(e=>{t[0]=e.fn.apply(this,t)}),t[0]}on(e,t){var n,r;this._listeners[e]||(this._listeners[e]=[]),null===(n=this._listeners[e])||void 0===n||n.push(t),null===(r=this.pswp)||void 0===r||r.on(e,t)}off(e,t){var n;this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(e=>t!==e)),null===(n=this.pswp)||void 0===n||n.off(e,t)}dispatch(e,t){var n;if(this.pswp)return this.pswp.dispatch(e,t);const r=new Je(e,t);return null===(n=this._listeners[e])||void 0===n||n.forEach(e=>{e.call(this,r)}),r}}class Xe{constructor(e,t){if(this.element=Ke("pswp__img pswp__img--placeholder",e?"img":"div",t),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,t){this.element&&("IMG"===this.element.tagName?(Ue(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=function(e,t,n){let r=`translate3d(${e}px,0px,0)`;return void 0!==n&&(r+=` scale3d(${n},${n},1)`),r}(0,0,e/250)):Ue(this.element,e,t))}destroy(){var e;null!==(e=this.element)&&void 0!==e&&e.parentNode&&this.element.remove(),this.element=null}}class et{constructor(e,t,n){this.instance=t,this.data=e,this.index=n,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=Ve,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(e,t){if(this.slide&&this.usePlaceholder())if(this.placeholder){const e=this.placeholder.element;e&&!e.parentElement&&this.slide.container.prepend(e)}else{const e=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new Xe(e,this.slide.container)}this.element&&!t||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=Ke("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=Ke("pswp__content","div"),this.element.innerHTML=this.data.html||""),t&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){var t,n;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;const r=this.element;this.updateSrcsetSizes(),this.data.srcset&&(r.srcset=this.data.srcset),r.src=null!==(t=this.data.src)&&void 0!==t?t:"",r.alt=null!==(n=this.data.alt)&&void 0!==n?n:"",this.state=Qe,r.complete?this.onLoaded():(r.onload=()=>{this.onLoaded()},r.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=We,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===We||this.state===Ge)&&this.removePlaceholder())}onError(){this.state=Ge,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===Qe,this)}isError(){return this.state===Ge}isImageContent(){return"image"===this.type}setDisplayedSize(e,t){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,t),!this.instance.dispatch("contentResize",{content:this,width:e,height:t}).defaultPrevented&&(Ue(this.element,e,t),this.isImageContent()&&!this.isError()))){const n=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=t,n?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:t,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==Ge,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const e=this.element,t=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||t>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=t+"px",e.dataset.largestUsedSize=String(t))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var e,t;let n=Ke("pswp__error-msg","div");n.innerText=null!==(e=null===(t=this.instance.options)||void 0===t?void 0:t.errorMsg)&&void 0!==e?e:"",n=this.instance.applyFilters("contentErrorElement",n,this),this.element=Ke("pswp__content pswp__error-msg-container","div"),this.element.appendChild(n),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===Ge)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const e="decode"in this.element;this.isImageContent()?e&&this.slide&&(!this.slide.isActive||Ye())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!Ye()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===We||this.state===Ge)&&this.removePlaceholder()))}}function tt(e,t,n,r,i){let o=0;if(t.paddingFn)o=t.paddingFn(n,r,i)[e];else if(t.padding)o=t.padding[e];else{const n="padding"+e[0].toUpperCase()+e.slice(1);t[n]&&(o=t[n])}return Number(o)||0}class nt{constructor(e,t,n,r){this.pswp=r,this.options=e,this.itemData=t,this.index=n,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(e,t,n){const r={x:e,y:t};this.elementSize=r,this.panAreaSize=n;const i=n.x/r.x,o=n.y/r.y;this.fit=Math.min(1,i<o?i:o),this.fill=Math.min(1,i>o?i:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(e){const t=e+"ZoomLevel",n=this.options[t];if(n)return"function"==typeof n?n(this):"fill"===n?this.fill:"fit"===n?this.fit:Number(n)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,3*this.fit),this.elementSize&&e*this.elementSize.x>4e3&&(e=4e3/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}}function rt(e,t,n){const r=t.createContentFromData(e,n);let i;const{options:o}=t;if(o){let a;i=new nt(o,e,-1),a=t.pswp?t.pswp.viewportSize:function(e,t){if(e.getViewportSizeFn){const n=e.getViewportSizeFn(e,t);if(n)return n}return{x:document.documentElement.clientWidth,y:window.innerHeight}}(o,t);const s=function(e,t,n,r){return{x:t.x-tt("left",e,t,n,r)-tt("right",e,t,n,r),y:t.y-tt("top",e,t,n,r)-tt("bottom",e,t,n,r)}}(o,a,e,n);i.update(r.width,r.height,s)}return r.lazyLoad(),i&&r.setDisplayedSize(Math.ceil(r.width*i.initial),Math.ceil(r.height*i.initial)),r}class it extends $e{getNumItems(){var e;let t=0;const n=null===(e=this.options)||void 0===e?void 0:e.dataSource;n&&"length"in n?t=n.length:n&&"gallery"in n&&(n.items||(n.items=this._getGalleryDOMElements(n.gallery)),n.items&&(t=n.items.length));const r=this.dispatch("numItems",{dataSource:n,numItems:t});return this.applyFilters("numItems",r.numItems,n)}createContentFromData(e,t){return new et(e,this,t)}getItemData(e){var t;const n=null===(t=this.options)||void 0===t?void 0:t.dataSource;let r={};Array.isArray(n)?r=n[e]:n&&"gallery"in n&&(n.items||(n.items=this._getGalleryDOMElements(n.gallery)),r=n.items[e]);let i=r;i instanceof Element&&(i=this._domElementToItemData(i));const o=this.dispatch("itemData",{itemData:i||{},index:e});return this.applyFilters("itemData",o.itemData,e)}_getGalleryDOMElements(e){var t,n;return null!==(t=this.options)&&void 0!==t&&t.children||null!==(n=this.options)&&void 0!==n&&n.childSelector?Ze(this.options.children,this.options.childSelector,e)||[]:[e]}_domElementToItemData(e){const t={element:e},n="A"===e.tagName?e:e.querySelector("a");if(n){t.src=n.dataset.pswpSrc||n.href,n.dataset.pswpSrcset&&(t.srcset=n.dataset.pswpSrcset),t.width=n.dataset.pswpWidth?parseInt(n.dataset.pswpWidth,10):0,t.height=n.dataset.pswpHeight?parseInt(n.dataset.pswpHeight,10):0,t.w=t.width,t.h=t.height,n.dataset.pswpType&&(t.type=n.dataset.pswpType);const i=e.querySelector("img");var r;if(i)t.msrc=i.currentSrc||i.src,t.alt=null!==(r=i.getAttribute("alt"))&&void 0!==r?r:"";(n.dataset.pswpCropped||n.dataset.cropped)&&(t.thumbCropped=!0)}return this.applyFilters("domItemData",t,e,n)}lazyLoadData(e,t){return rt(e,this,t)}}class ot extends it{constructor(e){super(),this.options=e||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){Ze(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(e){if("button"in(t=e)&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||window.pswp)return;var t;let n={x:e.clientX,y:e.clientY};!n.x&&!n.y&&(n=null);let r=this.getClickedIndex(e);r=this.applyFilters("clickedIndex",r,e,this);const i={gallery:e.currentTarget};r>=0&&(e.preventDefault(),this.loadAndOpen(r,i,n))}getClickedIndex(e){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,e);const t=e.target,n=Ze(this.options.children,this.options.childSelector,e.currentTarget).findIndex(e=>e===t||e.contains(t));return-1!==n?n:this.options.children||this.options.childSelector?-1:0}loadAndOpen(e,t,n){if(window.pswp||!this.options)return!1;if(!t&&this.options.gallery&&this.options.children){const e=Ze(this.options.gallery);e[0]&&(t={gallery:e[0]})}return this.options.index=e,this.options.initialPointerPos=n,this.shouldOpen=!0,this.preload(e,t),!0}preload(e,t){const{options:n}=this;t&&(n.dataSource=t);const r=[],i=typeof n.pswpModule;if("function"==typeof(o=n.pswpModule)&&o.prototype&&o.prototype.goTo)r.push(Promise.resolve(n.pswpModule));else{if("string"===i)throw new Error("pswpModule as string is no longer supported");if("function"!==i)throw new Error("pswpModule is not valid");r.push(n.pswpModule())}var o;"function"==typeof n.openPromise&&r.push(n.openPromise()),!1!==n.preloadFirstSlide&&e>=0&&(this._preloadedContent=function(e,t){const n=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:n}).defaultPrevented)return rt(n,t,e)}(e,this));const a=++this._uid;Promise.all(r).then(e=>{if(this.shouldOpen){const t=e[0];this._openPhotoswipe(t,a)}})}_openPhotoswipe(e,t){if(t!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const n="object"==typeof e?new e.default(this.options):new e(this.options);this.pswp=n,window.pswp=n,Object.keys(this._listeners).forEach(e=>{var t;null===(t=this._listeners[e])||void 0===t||t.forEach(t=>{n.on(e,t)})}),Object.keys(this._filters).forEach(e=>{var t;null===(t=this._filters[e])||void 0===t||t.forEach(t=>{n.addFilter(e,t.fn,t.priority)})}),this._preloadedContent&&(n.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),n.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),n.init()}destroy(){var e;null===(e=this.pswp)||void 0===e||e.destroy(),this.shouldOpen=!1,this._listeners={},Ze(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)})}}const at=e=>Math.min(100,Math.max(0,Math.round(e))),st=()=>{const e=document.querySelector(".js-limit-scroll-progress-bar"),t=document.querySelector(".c-progress__bar"),n=document.querySelector(".c-btn__close-progress");if(!t&&!n)return;const{documentElement:r}=document,i=r.scrollTop;if(t){let n=r.scrollHeight-r.clientHeight;if(!n)return;e&&(n=e.scrollHeight-r.clientHeight+(window.pageYOffset+e.getBoundingClientRect().top)),t.style.width=`${at(i/n*100)}%`}if(n){const e=document.querySelector(".js-content-header"),t=document.querySelector(".js-limit-scroll-close-article-btn");if(e&&t){const o=window.pageYOffset+e.getBoundingClientRect().bottom,a=window.pageYOffset+t.getBoundingClientRect().bottom-r.clientHeight-o;if(a>0){const e=at((i-o)/a*100);n.style.setProperty("--progress",`${e}`),n.parentElement?.classList.toggle("c-btn--close-progress-complete",e>=100)}}}},lt=()=>{const e=document.querySelector("#mbrs-comments-container"),t=document.querySelector(".c-scroll-to-top-comment");if(!e||!t)return;t.style.display="none",t.addEventListener("click",()=>{document.getElementById("graphcomment")?.scrollIntoView({behavior:"smooth"})});let n=!1;const r=()=>{const{top:n,bottom:r}=e.getBoundingClientRect(),i=n<-400,o=r<window.innerHeight/2;t.style.display=i&&!o?"flex":"none"},i=e=>{e.offsetHeight>500?n||(n=!0,window.addEventListener("scroll",r,{passive:!0}),r()):n&&(n=!1,window.removeEventListener("scroll",r),t.style.display="none")},o=e=>{i(e),(e=>{new ResizeObserver(()=>{i(e)}).observe(e)})(e)},a=e=>{try{if("complete"===e.contentDocument?.readyState)return void o(e)}catch{}e.addEventListener("load",()=>o(e),{once:!0})};if((()=>{const t=e.querySelector("iframe");return!!t&&(a(t),!0)})())return;const s=new MutationObserver(e=>{e.some(e=>Array.from(e.addedNodes).some(e=>{if(e instanceof HTMLIFrameElement)return a(e),!0;if(e instanceof HTMLElement){const t=e.querySelector("iframe");if(t)return a(t),!0}return!1}))&&s.disconnect()});s.observe(e,{childList:!0,subtree:!0})},ct="#text-tooltip",ut="c-text-tooltip--show",dt=["#page-content .c-content p","#page-content .c-content h2","#page-content .c-content h3","#page-content .c-content h4","#page-content .c-content h5","#page-content .c-content h6","#page-content .c-content li","#page-content .c-content span","#page-content header span","#page-content header h1","#page-content header h2"],ht=(e,t)=>e instanceof Element&&t.some(t=>e.matches(t)),pt=(e,t,n)=>{const r=document.querySelector(ct),i=document.querySelector("#page-content"),o=document.querySelectorAll(".mbrs-social-report-container");if(!r||!i)return void console.warn("Text tooltip : Tooltip or page content are not found in the DOM");Array.from(o).forEach(e=>{e.setAttribute("data-selected-text",n)});const a=e.getClientRects(),s=a[t?a.length-1:0],l=(e=>e.offsetParent instanceof HTMLElement?e.offsetParent.getBoundingClientRect():{top:-window.scrollY,left:-window.scrollX})(r);r.style.top=s.top-l.top-(r.offsetHeight+10)+"px",s.width<r.offsetWidth?r.style.left=s.left-l.left+s.width/2-r.offsetWidth/2+"px":r.style.left=t?s.left-l.left+s.width-r.offsetWidth+"px":s.left-l.left+"px",r.classList.add(ut)},ft=()=>{const e=document.querySelector(`${ct}`);e&&e.classList.remove(ut)},mt=({type:e})=>{const t=window.getSelection();if("selectionchange"===e)return void ft();if(!t?.rangeCount)return;const n=t.getRangeAt(0),r=t.toString().trim();if(r.length){const e=((e,t)=>{const n=e.startContainer.nodeType===Node.ELEMENT_NODE?e.startContainer:e.startContainer.parentElement,r=e.endContainer.nodeType===Node.ELEMENT_NODE?e.endContainer:e.endContainer.parentElement;return!!n&&ht(n,t)||!!r&&ht(r,t)})(n,dt),i=(e=>{if(!e.focusNode)return null;const t=e.anchorNode?.compareDocumentPosition(e.focusNode);return t?(4&t)>0:e.anchorOffset<e.focusOffset})(t)||!1;return void(e&&pt(n,i,r))}ft()},gt='button, a[href], [role="button"], [data-a11y-dialog-show], [data-a11y-dialog-hide], [data-event-name], .js-mobile-share-button';let yt=!1;const vt=e=>{e.querySelector(gt)?.click()},At=e=>e instanceof HTMLElement?e.closest("[data-social-bar-action-row]"):null,bt=e=>{const t=At(e.target);if(!t)return;const n=e.target.closest(gt);n&&n!==t||vt(t)},wt=e=>{if("Enter"!==e.key&&" "!==e.key)return;const t=e.target,n=At(t);if(!(n&&t instanceof HTMLElement))return;const r=t.closest(gt);r&&r!==n||(" "===e.key&&e.preventDefault(),vt(n))},xt=(e=document.querySelector(".c-search-form--button"))=>{e&&e.addEventListener("click",e=>{(e=>{const{target:t}=e;if(t instanceof Element){const n=t.closest(".c-search-form--button");n&&(e.preventDefault(),n.classList.remove("c-search-form--button"))}})(e)})},_t=e=>"ArrowLeft"===e.code||39===e.keyCode,St=e=>"ArrowRight"===e.code||37===e.keyCode,Et=(e=document.querySelectorAll(".js-tabs"))=>{e.length>0&&e.forEach(e=>{const t=e.querySelectorAll('[role="tab"]');t.forEach(t=>{t.addEventListener("click",t=>{(({tabsContainerElement:e,event:t})=>{t.preventDefault();const n=t.target;if(!(n instanceof HTMLButtonElement))return;const r=e.querySelectorAll('[role="tab"]'),i=e.querySelectorAll('[role="tabpanel"]'),o=n.getAttribute("aria-controls"),a=Object.values(i).find(e=>e.id===o);r.forEach(e=>{e.setAttribute("aria-selected","false")}),i.forEach(e=>{e.setAttribute("aria-hidden","true")}),n.setAttribute("aria-selected","true"),a&&a.removeAttribute("aria-hidden")})({tabsContainerElement:e,event:t})})});const n=e.querySelector('[role="tablist"]');if(n&&t.length>0){let e=0;n.addEventListener("keydown",n=>{n instanceof KeyboardEvent&&(_t(n)||St(n))&&(t[e].setAttribute("tabindex","-1"),_t(n)?(e+=1,e>=t.length&&(e=0)):St(n)&&(e-=1,e<0&&(e=t.length-1)),t[e].setAttribute("tabindex","0"),t[e].focus())})}})},Ct=e=>{const[t,n]=e.split("h").map(Number);return 60*t+n},kt=()=>{const e=new Date;return 60*e.getHours()+e.getMinutes()},It=()=>{const e=document.querySelectorAll(".c-timeline__time");if(!e||e.length<2)return;const t=document.querySelector(".c-timeline__progress-bar"),{currentIntervalStartTime:n,currentIntervalEndTime:r,currentIntervalIndex:i}=(e=>{const t=kt();let n=null,r=null,i=-1;return Array.from(e).find((e,o,a)=>{if(o===a.length-1)return!1;const s=e.textContent,l=a[o+1].textContent;if(!s||!l)return!1;const c=Ct(s),u=Ct(l);return t>=c&&t<u&&(n=s,r=l,i=o,!0)}),{currentIntervalStartTime:n,currentIntervalEndTime:r,currentIntervalIndex:i}})(e);if(!n||!r)return;const o=((e,t)=>{const n=kt();return n<e||n>t?0:(n-e)/(t-e)})(Ct(n),Ct(r));if(t instanceof HTMLElement){if(t.classList.contains("c-timeline__progress-bar--is-desktop")&&e.length>=5){const e="172px / 2";switch(i){case 0:t.style.width=`calc(${e} + (((${e} + 25% - ${e} / 2) - ${e}) * ${o})`;break;case 1:t.style.width=`calc((${e} + 25% - ${e} / 2) + (((50%) - (${e} + 25% - ${e} / 2)) * ${o})`;break;case 2:t.style.width=`calc((50%) + (((75% - ${e} / 2) - (50%)) * ${o})`;break;case 3:t.style.width=`calc((75% - ${e} / 2) + (((100% - ${e}) - (75% - ${e} / 2)) * ${o}`;break;default:t.style.width="0%"}}if(t.classList.contains("c-timeline__progress-bar--is-mobile")){const e="45px / 2",a="20px";switch(i){case 0:case 1:case 2:case 3:t.style.width=`calc((${a} + ${e}) + (((60% + ${e}) - (${a} + ${e})) * ${o})`;break;default:t.style.width="0%"}if(1===i||2===i||3===i){const e=document.querySelectorAll(".c-timeline__time"),t=document.querySelectorAll(".c-timeline__event");e.length>0&&t.length>0&&(e[0].textContent=n,e[1].textContent=r,t[0].textContent=t[i].textContent,t[1].textContent=t[i+1].textContent)}}}},Dt="c-icon-item__container--is-highlighted",Tt=()=>{const e=document.querySelector(".c-toolbar");if(e){const t=window.location.origin+window.location.pathname,n=Array.from(e.querySelectorAll(".c-icon-item__container"));(e=>{e.find(e=>e.classList.contains(Dt))?.classList.remove(Dt)})(n),n.find(e=>e.querySelector("a")?.getAttribute("href")===t)?.classList.add(Dt)}},Nt=e=>{const t=e||document.querySelector(".c-map-towns");if(!t)return void new MutationObserver((e,t)=>{if(typeof document<"u"){const e=document.querySelector(".c-map-towns");e&&(t.disconnect(),Nt(e))}}).observe(document.body,{childList:!0,subtree:!0});const n=()=>{const e=t.querySelectorAll(".js-city-marker");if(0===e.length)return!1;const n=(t=0)=>{let r=!0;e.forEach(e=>{if("false"===e.getAttribute("aria-hidden"))return;const t=e.querySelector(".js-city-anchor"),n=e.querySelector(".js-city-text"),i=e.querySelector(".js-city-bg");if(!(t instanceof SVGGraphicsElement&&n instanceof SVGTextElement&&i instanceof SVGRectElement))return;const o=t.getBBox();if(o.width>0){const{x:t,y:r,width:a,height:s}=o,l=e.getAttribute("data-scale"),c=l?` scale(${l})`:"";e.setAttribute("transform",`translate(${t+a/2}, ${r+s/2})${c}`);const u=n.getBBox(),d=8,h=4,p=8,f=u.width+d,m=u.height+h;i.setAttribute("width",`${f}`),i.setAttribute("height",`${m}`),i.setAttribute("x",""+-f/2),i.setAttribute("y",""+(-m-p));const g=-m/2-p;n.setAttribute("y",`${g}`),e.setAttribute("aria-hidden","false")}else r=!1}),!r&&t<12&&requestAnimationFrame(()=>n(t+1))};return requestAnimationFrame(()=>n()),!0};n()||new MutationObserver((e,t)=>{n()&&t.disconnect()}).observe(t,{childList:!0,subtree:!0})},Lt={10:[{id:"10387",name:"Troyes"},{id:"10323",name:"Romilly-sur-Seine"},{id:"10033",name:"Bar-sur-Aube"}],11:[{id:"11262",name:"Narbonne"},{id:"11069",name:"Carcassonne"},{id:"11076",name:"Castelnaudary"}],12:[{id:"12202",name:"Rodez"},{id:"12145",name:"Millau"},{id:"12300",name:"Villefranche-de-Rouergue"}],13:[{id:"13055",name:"Marseille"},{id:"13001",name:"Aix-en-Provence"},{id:"13004",name:"Arles"}],14:[{id:"14118",name:"Caen"},{id:"14366",name:"Lisieux"},{id:"14762",name:"Vire Normandie"}],15:[{id:"15014",name:"Aurillac"},{id:"15187",name:"Saint-Flour"},{id:"15120",name:"Mauriac"}],16:[{id:"16015",name:"Angoulême"},{id:"16102",name:"Cognac"},{id:"16028",name:"Barbezieux-Saint-Hilaire"}],17:[{id:"17300",name:"La Rochelle"},{id:"17415",name:"Saintes"},{id:"17299",name:"Rochefort"}],18:[{id:"18033",name:"Bourges"},{id:"18279",name:"Vierzon"},{id:"18197",name:"Saint-Amand-Montrond"}],19:[{id:"19031",name:"Brive-la-Gaillarde"},{id:"19272",name:"Tulle"},{id:"19275",name:"Ussel"}],21:[{id:"21231",name:"Dijon"},{id:"21054",name:"Beaune"},{id:"21038",name:"Auxonne"}],22:[{id:"22278",name:"Saint-Brieuc"},{id:"22113",name:"Lannion"},{id:"22093",name:"Lamballe-Armor"}],23:[{id:"23096",name:"Guéret"},{id:"23176",name:"La Souterraine"},{id:"23008",name:"Aubusson"}],24:[{id:"24322",name:"Périgueux"},{id:"24037",name:"Bergerac"},{id:"24520",name:"Sarlat-la-Canéda"}],25:[{id:"25056",name:"Besançon"},{id:"25388",name:"Montbéliard"},{id:"25462",name:"Pontarlier"}],26:[{id:"26362",name:"Valence"},{id:"26198",name:"Montélimar"},{id:"26235",name:"Pierrelatte"}],27:[{id:"27229",name:"Évreux"},{id:"27681",name:"Vernon"},{id:"27375",name:"Louviers"}],28:[{id:"28085",name:"Chartres"},{id:"28134",name:"Dreux"},{id:"28088",name:"Châteaudun"}],29:[{id:"29019",name:"Brest"},{id:"29232",name:"Quimper"},{id:"29039",name:"Concarneau"}],30:[{id:"30189",name:"Nîmes"},{id:"30007",name:"Alès"},{id:"30028",name:"Bagnols-sur-Cèze"}],31:[{id:"31555",name:"Toulouse"},{id:"31483",name:"Saint-Gaudens"},{id:"31033",name:"Auterive"}],32:[{id:"32013",name:"Auch"},{id:"32160",name:"L'Isle-Jourdain"},{id:"32107",name:"Condom"}],33:[{id:"33063",name:"Bordeaux"},{id:"33529",name:"La Teste-de-Buch"},{id:"33243",name:"Libourne"}],34:[{id:"34172",name:"Montpellier"},{id:"34032",name:"Béziers"},{id:"34301",name:"Sète"}],35:[{id:"35238",name:"Rennes"},{id:"35288",name:"Saint-Malo"},{id:"35115",name:"Fougères"}],36:[{id:"36044",name:"Châteauroux"},{id:"36088",name:"Issoudun"},{id:"36018",name:"Le Blanc"}],37:[{id:"37261",name:"Tours"},{id:"37003",name:"Amboise"},{id:"37072",name:"Chinon"}],38:[{id:"38185",name:"Grenoble"},{id:"38544",name:"Vienne"},{id:"38053",name:"Bourgoin-Jallieu"}],39:[{id:"39198",name:"Dole"},{id:"39300",name:"Lons-le-Saunier"},{id:"39478",name:"Saint-Claude"}],40:[{id:"40192",name:"Mont-de-Marsan"},{id:"40088",name:"Dax"},{id:"40046",name:"Biscarrosse"}],41:[{id:"41018",name:"Blois"},{id:"41194",name:"Romorantin-Lanthenay"},{id:"41269",name:"Vendôme"}],42:[{id:"42218",name:"Saint-Étienne"},{id:"42187",name:"Roanne"},{id:"42147",name:"Montbrison"}],43:[{id:"43157",name:"Le Puy-en-Velay"},{id:"43137",name:"Monistrol-sur-Loire"},{id:"43040",name:"Brioude"}],44:[{id:"44109",name:"Nantes"},{id:"44184",name:"Saint-Nazaire"},{id:"44131",name:"Pornic"}],45:[{id:"45234",name:"Orléans"},{id:"45208",name:"Montargis"},{id:"45155",name:"Gien"}],46:[{id:"46042",name:"Cahors"},{id:"46102",name:"Figeac"},{id:"46127",name:"Gourdon"}],47:[{id:"47001",name:"Agen"},{id:"47323",name:"Villeneuve-sur-Lot"},{id:"47157",name:"Marmande"}],48:[{id:"48095",name:"Mende"},{id:"48140",name:"Saint-Chély-d'Apcher"},{id:"48080",name:"Langogne"}],49:[{id:"49007",name:"Angers"},{id:"49099",name:"Cholet"},{id:"49328",name:"Saumur"}],50:[{id:"50129",name:"Cherbourg-en-Cotentin"},{id:"50502",name:"Saint-Lô"},{id:"50218",name:"Granville"}],51:[{id:"51454",name:"Reims"},{id:"51108",name:"Châlons-en-Champagne"},{id:"51230",name:"Épernay"}],52:[{id:"52448",name:"Saint-Dizier"},{id:"52121",name:"Chaumont"},{id:"52269",name:"Langres"}],53:[{id:"53130",name:"Laval"},{id:"53062",name:"Château-Gontier-sur-Mayenne"},{id:"53147",name:"Mayenne"}],54:[{id:"54395",name:"Nancy"},{id:"54329",name:"Lunéville"},{id:"54528",name:"Toul"}],55:[{id:"55545",name:"Verdun"},{id:"55029",name:"Bar-le-Duc"},{id:"55122",name:"Commercy"}],56:[{id:"56121",name:"Lorient"},{id:"56260",name:"Vannes"},{id:"56178",name:"Pontivy"}],57:[{id:"57463",name:"Metz"},{id:"57672",name:"Thionville"},{id:"57227",name:"Forbach"}],58:[{id:"58194",name:"Nevers"},{id:"58086",name:"Cosne-Cours-sur-Loire"},{id:"58095",name:"Decize"}],59:[{id:"59350",name:"Lille"},{id:"59183",name:"Dunkerque"},{id:"59606",name:"Valenciennes"}],60:[{id:"60057",name:"Beauvais"},{id:"60159",name:"Compiègne"},{id:"60175",name:"Creil"}],61:[{id:"61001",name:"Alençon"},{id:"61169",name:"Flers"},{id:"61006",name:"Argentan"}],62:[{id:"62193",name:"Calais"},{id:"62041",name:"Arras"},{id:"62160",name:"Boulogne-sur-Mer"}],63:[{id:"63113",name:"Clermont-Ferrand"},{id:"63178",name:"Issoire"},{id:"63430",name:"Thiers"}],64:[{id:"64445",name:"Pau"},{id:"64102",name:"Bayonne"},{id:"64260",name:"Hendaye"}],65:[{id:"65440",name:"Tarbes"},{id:"65258",name:"Lannemezan"},{id:"65025",name:"Argelès-Gazost"}],66:[{id:"66136",name:"Perpignan"},{id:"66049",name:"Céret"},{id:"66149",name:"Prades"}],67:[{id:"67482",name:"Strasbourg"},{id:"67180",name:"Haguenau"},{id:"67462",name:"Sélestat"}],68:[{id:"68224",name:"Mulhouse"},{id:"68066",name:"Colmar"},{id:"68297",name:"Saint-Louis"}],69:[{id:"69123",name:"Lyon"},{id:"69264",name:"Villefranche-sur-Saône"},{id:"69091",name:"Givors"}],70:[{id:"70550",name:"Vesoul"},{id:"70285",name:"Héricourt"},{id:"70310",name:"Lure"}],71:[{id:"71076",name:"Chalon-sur-Saône"},{id:"71270",name:"Mâcon"},{id:"71153",name:"Le Creusot"}],72:[{id:"72181",name:"Le Mans"},{id:"72154",name:"La Flèche"},{id:"72264",name:"Sablé-sur-Sarthe"}],73:[{id:"73065",name:"Chambéry"},{id:"73011",name:"Albertville"},{id:"73248",name:"Saint-Jean-de-Maurienne"}],74:[{id:"74010",name:"Annecy"},{id:"74281",name:"Thonon-les-Bains"},{id:"74012",name:"Annemasse"}],75:[{id:"75056",name:"Paris"}],76:[{id:"76351",name:"Le Havre"},{id:"76540",name:"Rouen"},{id:"76217",name:"Dieppe"}],77:[{id:"77284",name:"Meaux"},{id:"77108",name:"Chelles"},{id:"77288",name:"Melun"}],78:[{id:"78646",name:"Versailles"},{id:"78361",name:"Mantes-la-Jolie"},{id:"78172",name:"Conflans-Sainte-Honorine"}],79:[{id:"79191",name:"Niort"},{id:"79049",name:"Bressuire"},{id:"79329",name:"Thouars"}],80:[{id:"80021",name:"Amiens"},{id:"80001",name:"Abbeville"},{id:"80016",name:"Albert"}],81:[{id:"81004",name:"Albi"},{id:"81065",name:"Castres"},{id:"81105",name:"Graulhet"}],82:[{id:"82121",name:"Montauban"},{id:"82033",name:"Castelsarrasin"},{id:"82037",name:"Caussade"}],83:[{id:"83137",name:"Toulon"},{id:"83061",name:"Fréjus"},{id:"83050",name:"Draguignan"}],84:[{id:"84007",name:"Avignon"},{id:"84031",name:"Carpentras"},{id:"84087",name:"Orange"}],85:[{id:"85191",name:"La Roche-sur-Yon"},{id:"85194",name:"Les Sables-d'Olonne"},{id:"85047",name:"Challans"}],86:[{id:"86194",name:"Poitiers"},{id:"86066",name:"Châtellerault"},{id:"86070",name:"Chauvigny"}],87:[{id:"87085",name:"Limoges"},{id:"87154",name:"Saint-Junien"},{id:"87187",name:"Saint-Yrieix-la-Perche"}],88:[{id:"88160",name:"Épinal"},{id:"88413",name:"Saint-Dié-des-Vosges"},{id:"88196",name:"Gérardmer"}],89:[{id:"89024",name:"Auxerre"},{id:"89387",name:"Sens"},{id:"89206",name:"Joigny"}],90:[{id:"90010",name:"Belfort"},{id:"90081",name:"Réchésy"}],91:[{id:"91228",name:"Évry-Courcouronnes"},{id:"91223",name:"Étampes"},{id:"91692",name:"Les Ulis"}],92:[{id:"92012",name:"Boulogne-Billancourt"}],93:[{id:"93066",name:"Saint-Denis"}],94:[{id:"94081",name:"Vitry-sur-Seine"}],95:[{id:"95018",name:"Argenteuil"},{id:"95487",name:"Persan"},{id:"95351",name:"Louvres"}],971:[{id:"97101",name:"Les Abymes"},{id:"97128",name:"Sainte-Anne"},{id:"97118",name:"Petit-Bourg"}],972:[{id:"97209",name:"Fort-de-France"},{id:"97224",name:"Saint-Joseph"},{id:"97220",name:"Rivière-Pilote"}],973:[{id:"97311",name:"Saint-Laurent-du-Maroni"},{id:"97304",name:"Kourou"}],974:[{id:"97411",name:"Saint-Denis"},{id:"97416",name:"Saint-Pierre"},{id:"97409",name:"Saint-André"}],"03":[{id:"03185",name:"Montluçon"},{id:"03310",name:"Vichy"},{id:"03190",name:"Moulins"}],"04":[{id:"04112",name:"Manosque"},{id:"04070",name:"Digne-les-Bains"},{id:"04209",name:"Sisteron"}],"09":[{id:"09225",name:"Pamiers"},{id:"09261",name:"Saint-Girons"},{id:"09160",name:"Lavelanet"}],"01":[{id:"01053",name:"Bourg-en-Bresse"},{id:"01283",name:"Oyonnax"},{id:"01033",name:"Valserhône"}],"06":[{id:"06088",name:"Nice"},{id:"06029",name:"Cannes"},{id:"06083",name:"Menton"}],"2B":[{id:"2B033",name:"Bastia"},{id:"2B096",name:"Corte"},{id:"2B050",name:"Calvi"}],"2A":[{id:"2A004",name:"Ajaccio"},{id:"2A247",name:"Porto-Vecchio"},{id:"2A032",name:"Bastelicaccia"}],"02":[{id:"02691",name:"Saint-Quentin"},{id:"02722",name:"Soissons"},{id:"02408",name:"Laon"}],"07":[{id:"07010",name:"Annonay"},{id:"07019",name:"Aubenas"},{id:"07324",name:"Tournon-sur-Rhône"}],"05":[{id:"05061",name:"Gap"},{id:"05023",name:"Briançon"},{id:"05046",name:"Embrun"}],"08":[{id:"08105",name:"Charleville-Mézières"},{id:"08362",name:"Rethel"},{id:"08190",name:"Givet"}]},Bt=/<path\b([^>]*?)\/>/g,Pt=/\b([:\w-]+)="([^"]*)"/g;var Ot=(e=>(e.MOBILE="mobile",e.DESKTOP="desktop",e))(Ot||{});const Mt=e=>{window.location.href=e},jt=(e,t)=>{const n=document.createDocumentFragment();return e.forEach(e=>{const r=((e,t)=>{const n=e.id,r=e.url,i=e.name;if(!n||!r)return null;const o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("d",e.path),o.setAttribute("class","c-map-towns__path c-map-towns__zoom-town"),o.setAttribute("data-url",r);const a=((e,t)=>t.get(e))(n,t);if(a&&a.forEach(e=>{o.classList.add(e)}),i){const e=document.createElementNS("http://www.w3.org/2000/svg","title");e.textContent=i,o.appendChild(e)}return o})(e,t);r&&n.appendChild(r)}),n};let Ft=!1;const Rt=()=>{if(Ft)return;if(!document.querySelector(".c-map-towns"))return void new MutationObserver((e,t)=>{typeof document<"u"&&document.querySelector(".c-map-towns")&&(t.disconnect(),Rt())}).observe(document.body,{childList:!0,subtree:!0});const e=window.layout===Ot.MOBILE,t=document.querySelector(".c-map-towns__map"),n=document.querySelector(".c-map-towns__droms"),r=document.querySelector(".c-map-towns__zooms"),i=e=>{const{target:t}=e;if(!(t instanceof Element))return;const n=t.closest(".js-city-marker");if(n){const e=n.getAttribute("data-url");return void(e&&Mt(e))}const r=t.closest(".c-map-towns__zoom-item")?.getAttribute("data-city-url");if(r)return void Mt(r);const i=t.closest(".c-map-towns__dept-trigger")?.getAttribute("data-url");i&&Mt(i)};if(e)return t?.addEventListener("click",i),n?.addEventListener("click",i),r?.addEventListener("click",i),void(Ft=!0);const o=document.getElementById("js-zoom-overlay"),a=document.getElementById("js-zoom-svg"),s=document.getElementById("js-zoom-group"),l=document.getElementById("js-zoom-close");if(!(o instanceof HTMLElement&&a instanceof SVGSVGElement&&s instanceof SVGGElement&&l instanceof HTMLElement))return void requestAnimationFrame(Rt);Ft=!0;const c=document.getElementById("js-zoom-label"),u=document.getElementById("js-zoom-title"),d=document.getElementById("js-town-sprite-data"),h=new Map,p=new Map;let f=null;const m=()=>{if(f)return f;const e=d instanceof HTMLScriptElement?JSON.parse(d.textContent||'""'):"";return t=(e=>{const t=[];for(const n of e.matchAll(Bt)){const e=n[1];if(!e)continue;const r=new Map;for(const t of e.matchAll(Pt)){const[,e,n]=t;e&&r.set(e,n||"")}const i=r.get("id"),o=r.get("d"),a=r.get("data-name"),s=r.get("data-url");!i||!o||!a||!s||t.push({id:i,path:o,name:a,url:s})}return t})(e),f=new Map(t.map(e=>[e.id,e])),f;var t},g=()=>{o.setAttribute("aria-hidden","true"),s.replaceChildren()},y=(e,t)=>{const n=Lt[e]||[];if(0===n.length)return;const r=document.createDocumentFragment();n.forEach(n=>{const i=((e,t)=>e.startsWith("97")?document.querySelector(`path[id="town-${t}-drom"]`)?.getAttribute("d")||null:m().get(`town-${t}`)?.path||null)(e,n.id);if(!i)return;const o=((e,t,n)=>{const r=document.createElementNS("http://www.w3.org/2000/svg","g");r.setAttribute("class","js-city-marker c-map-towns__city-marker"),r.setAttribute("aria-hidden","true"),r.setAttribute("data-scale",n.toString());const i=document.createElementNS("http://www.w3.org/2000/svg","path");i.setAttribute("d",t),i.setAttribute("class","js-city-anchor c-map-towns__city-anchor");const o=document.createElementNS("http://www.w3.org/2000/svg","circle");o.setAttribute("class","c-map-towns__city-circle"),o.setAttribute("r","5"),o.setAttribute("fill","white"),o.setAttribute("stroke","black"),o.setAttribute("strokeWidth","1");const a=document.createElementNS("http://www.w3.org/2000/svg","rect");a.setAttribute("class","js-city-bg"),a.setAttribute("fill","white"),a.setAttribute("rx","4"),a.setAttribute("ry","4");const s=document.createElementNS("http://www.w3.org/2000/svg","text");return s.setAttribute("class","js-city-text c-map-towns__city-text"),s.textContent=e,r.appendChild(i),r.appendChild(o),r.appendChild(a),r.appendChild(s),r})(n.name,i,t);r.appendChild(o)}),s.appendChild(r),requestAnimationFrame(()=>{Nt(s)})},v=e=>{const{target:t}=e;if(!(t instanceof Element))return;const n=t?.closest(".c-map-towns__dept-trigger");if(!n)return;const r=n.getAttribute("id")?.replace("out-","")||"",i=n.getAttribute("data-name"),l=((e,t,n)=>{const r=n.get(e);if(r)return r;const i=e.startsWith("97")?Array.from(document.querySelectorAll(`path[id^="town-${e}"][id$="-drom"]`)).map(e=>({id:e.getAttribute("id")||"",path:e.getAttribute("d")||"",name:e.getAttribute("data-name")||"",url:e.getAttribute("data-url")||""})):Array.from(t().values()).filter(t=>t.id.startsWith(`town-${e}`));return n.set(e,i),i})(r,m,h);var d;(d=p).size>0||document.querySelectorAll(".c-map-towns__map .c-map-towns__layer-towns path[data-town-id], .c-map-towns__map-drom .c-map-towns__layer-towns path[id]").forEach(e=>{const t=e.getAttribute("data-town-id")||e.getAttribute("id");t&&d.set(t,Array.from(e.classList).filter(e=>e.startsWith("c-map-towns__path--")))});const f=jt(l,p);if(c&&u&&i&&(c.textContent=i,u.textContent=`Carte détaillée du département : ${i}`),!(n instanceof SVGGraphicsElement))return;const g=((e,t)=>{const n=t.getBBox(),r=n.width+10,i=n.height+10;e.setAttribute("viewBox",`${n.x-5} ${n.y-5} ${r} ${i}`);const o=e.clientWidth||800,a=e.clientHeight||600;return Math.max(r/o,i/a)})(a,n);o.setAttribute("aria-hidden","false"),((e,t)=>{e.replaceChildren(t)})(s,f),y(r,g)};t?.addEventListener("click",v),n?.addEventListener("click",v),s.addEventListener("click",e=>{const{target:t}=e;if(!(t instanceof Element))return;const n=t.closest(".c-map-towns__zoom-town")?.getAttribute("data-url");n&&Mt(n)}),l.addEventListener("click",()=>{g()}),o.addEventListener("click",e=>{e.target===o&&g()})},qt=()=>{((e=document.querySelector(".js-expand-button"))=>{e&&document.querySelectorAll(".js-expand-button").forEach(e=>{(e=>{const t=e.parentNode?.querySelector(".js-expand-target");return!(!t||t.classList.contains("c-elections-result__members"))&&(t.textContent?.trim().length??0)<255})(e)?(e.style.display="none",e.parentNode?.querySelectorAll(".js-expand-target")?.forEach(e=>{e.setAttribute("aria-hidden","false")})):e.addEventListener("click",d)})})(),Et(),a(),(()=>{const e=document.querySelector(".js-info-banner__button");e instanceof HTMLButtonElement&&e.addEventListener("click",f)})(),((e=document.querySelector(".js-ellipsis-button"))=>{e&&document.querySelectorAll(".js-ellipsis-button").forEach(e=>{const t="true"===e.getAttribute("data-multiple");e.addEventListener("click",e=>u(e,t))})})(),(()=>{const e=document.querySelector(".c-progress"),t=document.querySelector(".c-btn__close-progress");(e||t)&&window.addEventListener("scroll",st)})(),(()=>{let e=null;e=new ot({gallery:"#photoswipe-gallery",children:"a",pswpModule:He,zoom:!1,imageClickAction:"next",tapAction:"next"}),e.on("uiRegister",()=>{e?.pswp?.ui?.registerElement({name:"custom-caption",appendTo:"root",onInit:t=>{e?.pswp?.on("change",()=>{const n=e?.pswp?.currSlide?.data.element;if(n){const e=n.querySelector(".caption-content");t.innerHTML=e?.innerHTML||""}})}})}),e.init()})(),document.querySelectorAll(".js-modal").forEach(e=>{if(!(e instanceof HTMLElement))return;const t=new D(e);if("dialog-menu"===e.id){const e=document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"),n=document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");e.length>0&&n.length>0&&(t.on("show",()=>{e.forEach(e=>{e.classList.add("u-hidden")}),n.forEach(e=>{e.classList.remove("u-hidden")})}),t.on("hide",()=>{e.forEach(e=>{e.classList.remove("u-hidden")}),n.forEach(e=>{e.classList.add("u-hidden")})}))}t.on("show",()=>{document.body.classList.add("noscroll")}).on("hide",()=>{document.body.classList.remove("noscroll")})}),xt(),yt||(document.addEventListener("click",bt),document.addEventListener("keydown",wt),yt=!0),document.querySelectorAll("[data-countdown][data-countdown-end-date]").forEach(e=>{const t=e.dataset.countdownEndDate,n=t?new Date(t).getTime():Number.NaN,r=(e=>{const t=e.querySelector(".js-countdown-days"),n=e.querySelector(".js-countdown-hours"),r=e.querySelector(".js-countdown-minutes"),i=e.querySelector(".js-countdown-seconds");return t&&n&&r&&i?{daysElement:t,hoursElement:n,minutesElement:r,secondsElement:i}:null})(e);if(!r)return;if(Number.isNaN(n))return void e.remove();if(!s(n,r))return void e.remove();const i=setInterval(()=>{s(n,r)||(clearInterval(i),e.remove())},1e3)}),window?.getSelection?(document.addEventListener("mouseup",mt),document.addEventListener("selectionchange",mt),document.addEventListener("touchend",mt),document.addEventListener("touchcancel",mt)):console.warn("Selection API isn't supported"),h(".js-close-article-btn",".js-limit-scroll-close-article-btn"),h(".js-chatbot-btn",".js-limit-scroll-chatbot-btn"),(()=>{const e=document.querySelectorAll(".js-half-donut-result");for(const t of Array.from(e)){const e=t.querySelector(".c-half-donut"),n=t.querySelector(".c-legend");if(!e||!n)return;n.querySelectorAll("[data-color]").forEach(t=>{const r=t.getAttribute("data-color"),i=e.querySelector(`.c-half-donut__zone--${r}`);i?.addEventListener("mouseenter",()=>{t.classList.add("c-legend__item--is-hovered"),e.classList.add("c-half-donut--is-hovered"),n.classList.add("c-legend--is-hovered")}),i?.addEventListener("mouseleave",()=>{t.classList.remove("c-legend__item--is-hovered"),e.classList.remove("c-half-donut--is-hovered"),n.classList.remove("c-legend--is-hovered")}),t.addEventListener("mouseenter",()=>{i?.classList.add("c-half-donut__zone--is-hovered"),n.classList.add("c-legend--is-hovered"),e.classList.add("c-half-donut--is-hovered")}),t.addEventListener("mouseleave",()=>{i?.classList.remove("c-half-donut__zone--is-hovered"),n.classList.remove("c-legend--is-hovered"),e.classList.remove("c-half-donut--is-hovered")})})}})(),c(),o("localisation-input","https://www.20minutes.fr/elections/resultats/recherche","?searchValue=","text","text"),l(),Nt(),Tt(),(()=>{const e=document.querySelector("#js-election-selector");e&&e.addEventListener("change",e=>{window.location.replace(e.target.value)})})(),(()=>{const e=document.querySelector(".c-search-banner");if(!e)return;const t=document.getElementById("js-search-banner-expand-button");if(t instanceof HTMLButtonElement){if(t.hasAttribute("data-search-banner-listener-attached"))return;const n=e.querySelector("[data-search-banner-expanded-source]"),r=e.querySelector("[data-search-banner-collapse]");if(!n||!r)return;t.setAttribute("data-search-banner-listener-attached","true"),t.addEventListener("click",()=>{"true"===n.getAttribute("aria-expanded")?(n.setAttribute("aria-expanded","false"),r.setAttribute("aria-hidden","true")):(n.setAttribute("aria-expanded","true"),r.setAttribute("aria-hidden","false"))})}})(),p(),Rt(),(()=>{const e=document.querySelectorAll(".js-navigation-container");Array.from(e).forEach(e=>{const t=e.querySelector(".js-navigation-container__list");if(t){const n=new ResizeObserver(t=>{t.forEach(t=>{const{width:r}=t.contentRect;r>0&&(M(e),n.disconnect())})});n.observe(t)}})})(),(()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e))if(t){const e=t.querySelector(".js-navigation-container__list"),n=t.querySelector(".o-nav-button--next-button"),r=t.querySelector(".o-nav-button--previous-button");e&&n&&r&&window.addEventListener("resize",O.bind(!1,{navigationContainer:t,navigatedList:e,nextBtn:n,prevBtn:r}))}})(),(()=>{const e=document.querySelector(".js-game-alert");n&&e&&e.classList.remove("u-hidden")})(),r(),It(),((e={})=>{const{buttonSelector:t=".c-scroll-to-top"}=e,n=document.querySelector(t),r=n?.querySelector("button");if(!n||!r)return;const i=n.dataset.triggerSelector||"[data-scroll-trigger]",o=parseInt(n.dataset.triggerOffset||"0",10);n.style.display="none";const a=()=>{const e=document.querySelector(i);let t=!1;if(e){const n=e.getBoundingClientRect().top;t=window.pageYOffset>=n-o}else t=window.pageYOffset>300;n.style.display=t?"block":"none"};window.addEventListener("scroll",a),r.addEventListener("click",()=>{window.scrollTo({top:0,behavior:"smooth"})}),a()})(),lt(),(()=>{const e=document.querySelector(".c-header-page__ranking-button"),t=e?.querySelector("button");!e||!t||t.addEventListener("click",()=>{document.getElementById("mbrs-game-ranking")?.scrollIntoView({behavior:"smooth"})})})()},zt="forward-disable-audience-measure",Ht="data-preferences-consent",Kt=(e,t)=>{let n=null;if(e.id&&(n=document.querySelector(`label[for="${e.id}"]`)),n||(n=e.closest("label")),!n){const t=e.nextElementSibling;if(t&&"LABEL"===t.tagName&&t instanceof HTMLElement)n=t;else{const t=e.previousElementSibling;t&&"LABEL"===t.tagName&&t instanceof HTMLElement&&(n=t)}}const r=n?.querySelector("span")||n;r&&(r.textContent=t?"Mon droit d'opposition est respecté et aucune donnée personnelle supplémentaire n'est collectée":"Mes données de navigation sont collectées à des fins d'analyse statistique")};function Ut(){if(this?.id)try{const e=document.getElementById(this.id);if(e){const t=e.getAttribute("value");if(t){const e=document.createElement("textarea");document.body.appendChild(e),e.value=t,e.select(),document.execCommand("copy"),document.body.removeChild(e)}}}catch(e){console.error("Oops, unable to copy",e)}}const Vt=(e,t)=>{const n=e.innerHTML.includes("candidats")?"candidats":"résultats";e.innerHTML=t?`Masquer tous les ${n}`:`Voir tous les ${n}`},Qt=e=>{const t=e.currentTarget;if(e.preventDefault(),t instanceof HTMLButtonElement){const e=t.parentNode?.querySelectorAll(".js-toggle-target");"true"===t.getAttribute("aria-expanded")?((e,t)=>{t?.forEach(e=>{e.setAttribute("aria-hidden","true")}),e.setAttribute("aria-expanded","false"),Vt(e,!1)})(t,e):((e,t)=>{e.setAttribute("aria-expanded","true"),Vt(e,!0),t?.forEach(e=>{e.setAttribute("aria-hidden","false")})})(t,e)}};let Wt=!1;const Gt=()=>{if(Wt)return;Wt=!0;const e=document.getElementById("js-top-sentinel");if(!e)return;new IntersectionObserver(([e])=>{(e=>{const t=document.querySelector(".c-search-banner");if(!t)return;const n=t.querySelector("[data-search-banner-expanded-source]"),r=t.querySelector("[data-search-banner-collapse]");r&&n&&(e?(n.setAttribute("aria-expanded","true"),r.setAttribute("aria-hidden","false")):(n.setAttribute("aria-expanded","false"),r.setAttribute("aria-hidden","true")))})(e.isIntersecting)},{root:null,threshold:0}).observe(e)},Zt=e=>{var t;const n=e.querySelector(".c-search-banner");if(!(n instanceof HTMLElement))return;const r="c-search-banner--has-top-border";(t=n.dataset).initialHasTopBorder??(t.initialHasTopBorder=String(n.classList.contains(r))),n.classList.toggle(r,"true"===n.dataset.initialHasTopBorder&&!e.classList.contains("u-sticky--on-top-screen"))},Yt=(e,t,n)=>{"desktop"===n&&(t?(e.classList.remove("u-sticky"),e.classList.remove("u-sticky--under-header-mini")):(e.classList.add("u-sticky"),e.classList.add("u-sticky--under-header-mini"))),"mobile"===n&&(t?(e.classList.remove("u-sticky--under-header"),e.classList.add("u-sticky--on-top-screen")):(e.classList.remove("u-sticky--on-top-screen"),e.classList.add("u-sticky--under-header")),Zt(e))};var Jt=()=>{(()=>{const e=document.getElementById("goto-distribution"),t=document.getElementById("goto-european-map"),n=document.getElementById("goto-map"),r=document.getElementById("goto-statistics"),i=document.getElementById("goto-results");e&&e.addEventListener("click",Ut),t&&t.addEventListener("click",Ut),n&&n.addEventListener("click",Ut),r&&r.addEventListener("click",Ut),i&&i.addEventListener("click",Ut)})(),((e=document.querySelector(".js-toggle-button"))=>{e&&document.querySelectorAll(".js-toggle-button").forEach(e=>{e.addEventListener("click",Qt)})})(),Gt(),(()=>{const e=document.getElementById("elections-form-container"),t=document.querySelector(".c-header-mini"),n=document.querySelector(".c-header-mobile"),r=document.querySelector('body[data-layout="mobile"]');e&&t&&new MutationObserver(t=>{const n=t[0],r=n.target;if(r instanceof HTMLElement&&"attributes"===n.type&&"class"===n.attributeName){const t=r.className.includes("c-header-mini--is-hidden");Yt(e,t,"desktop")}}).observe(t,{attributes:!0});r&&e&&n&&(e.classList.add("u-sticky"),e.classList.add("u-sticky--under-header"),Zt(e),new MutationObserver(t=>{const n=t[0],r=n.target;if(r instanceof HTMLElement&&"attributes"===n.type&&"class"===n.attributeName){const t=r.className.includes("c-header-mobile--is-hidden");Yt(e,t,"mobile")}}).observe(n,{attributes:!0}))})()};const $t=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>window.__tcfapi("addEventListener",2,(e=>(t,n)=>{if(n&&("tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus)&&e.getCurrentUserStatus().purposes["mesureda-6qyqaZXC"]?.enabled&&e.getCurrentUserStatus().vendors["20minutes-bfbzKmzq"]?.enabled){const e=document.getElementById("feedback-button");if(!e)return;e.addEventListener("click",()=>{try{window.$screeb("survey.start","5d850959-8e04-425c-b6fe-df5c7dafd4f9",{distribution_id:"dc76b85e-e248-4ac1-a988-30250b4abb80"})}catch(e){console.error("Error while starting survey",e)}})}})(e)))};var Xt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function en(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tn,nn,rn={exports:{}},on={};var an=(nn||(nn=1,rn.exports=function(){if(tn)return on;tn=1;var t=e,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,l={},c=null,u=null;for(s in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,s)&&!a.hasOwnProperty(s)&&(l[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===l[s]&&(l[s]=t[s]);return{$$typeof:n,type:e,key:c,ref:u,props:l,_owner:o.current}}return on.Fragment=r,on.jsx=s,on.jsxs=s,on}()),rn.exports);function sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ln,cn={exports:{}};var un,dn=(ln||(ln=1,un=cn,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=r(e,n(i)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var o in n)e.call(n,o)&&n[o]&&(i=r(i,o));return i}function r(e,t){return t?e?e+" "+t:e+t:e}un.exports?(t.default=t,un.exports=t):window.classNames=t}()),cn.exports);const hn=sn(dn),pn=({adUnitCompletePath:e,variant:t,isFullscreenMobile:n=!1,hasNoBgColorMobile:r=!1,...i})=>{const o=e.split("/").pop(),a=e.substring(0,e.lastIndexOf("/")),s="string"==typeof o&&o.startsWith("ban_mtf"),l=an.jsx($n,{...s?{}:i,id:`dfp_${o}`,"data-dfp-name":o,"data-dfp-path":a,className:hn("c-4b8m1ese3e",{"c-placeolder--article":"ARTICLE"===t},{"c-placeolder--ban":"BAN"===t||"ATF"===t},{"c-placeolder--ban-atf":"ATF"===t},{"c-placeolder--header-ad":"HEADER"===t},{"c-placeolder--inread":"INREAD"===t},{"c-placeolder--pave":"PAVE"===t},{"c-placeolder--com":"COM"===t},{"c-placeolder--mobile-fullscreen":n},{"c-placeolder--mobile-has-no-bg-color":r},i.className)});return s?an.jsx($n,{className:"c-placeolder--ban",children:l}):l},fn=({img:e,alt:t="",color:n,variant:r="default",streakBadge:i,className:o,...a})=>{const s=!!e,l=hn("c-avatar",{[`c-avatar--${r}`]:"default"!==r,[`c-avatar--${n}`]:n,"c-avatar--has-border":s&&n,"c-avatar--with-placeholder":!s},o),c=e||"data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%3E%3C/svg%3E";return void 0===i?an.jsx($n,{...a,as:"img",className:l,src:c,alt:t}):an.jsxs($n,{...a,className:"c-avatar-container",children:[an.jsx($n,{as:"img",className:l,src:c,alt:t}),an.jsxs(Xn,{className:"c-avatar-container__badge",alignItems:"center",gap:"xxs-3",bg:"grey-50",px:"xxs-2",children:[an.jsx(Pn,{name:"heat",size:10,color:"orange"}),an.jsx(gr,{as:"span",color:"ultramarine",size:"xxs",weight:"bold",children:i})]})]})},mn={primary:{ultramarine:{value:"#4742FF",key:"{color.primary.ultramarine}"},"ultramarine-light":{value:"#6B72FB",key:"{color.primary.ultramarine-light}"}},secondary:{orange:{value:"#FA9917",key:"{color.secondary.orange}"},yellow:{value:"#F2E500",key:"{color.secondary.yellow}"},green:{value:"#6A9F4F",key:"{color.secondary.green}"},purple:{value:"#AE6BA2",key:"{color.secondary.purple}"},red:{value:"#DC0E19",key:"{color.secondary.red}"},scarlet:{value:"#FF3F3F",key:"{color.secondary.scarlet}"},blue:{value:"#0000FF",key:"{color.secondary.blue}"},"blue-grey":{value:"#253548",key:"{color.secondary.blue-grey}"},"blue-dark":{value:"#16202B",key:"{color.secondary.blue-dark}"},pink:{value:"#EF2A82",key:"{color.secondary.pink}"},sponsoring:{value:"#FFF5F1",key:"{color.secondary.sponsoring}"},"blue-light":{value:"#D4ECFB",key:"{color.secondary.blue-light}"},"blue-ice":{value:"#F0F4F8",key:"{color.secondary.blue-ice}"}},greyscale:{black:{value:"#000",key:"{color.greyscale.black}"},white:{value:"#FFF",key:"{color.greyscale.white}"},"grey-50":{value:"#FFFFFE",key:"{color.greyscale.grey-50}"},"grey-100":{value:"#F7F7F7",key:"{color.greyscale.grey-100}"},"grey-200":{value:"#DDD",key:"{color.greyscale.grey-200}"},"grey-300":{value:"#898A8C",key:"{color.greyscale.grey-300}"},"grey-400":{value:"#6A6A6A",key:"{color.greyscale.grey-400}"},"grey-500":{value:"#484848",key:"{color.greyscale.grey-500}"},"grey-600":{value:"#2F3134",key:"{color.greyscale.grey-600}"},"grey-700":{value:"#181A1E",key:"{color.greyscale.grey-700}"},"grey-800":{value:"#101D25",key:"{color.greyscale.grey-800}"},"grey-900":{value:"#0F1115",key:"{color.greyscale.grey-900}"}},status:{warning:{value:"#FA9917",key:"{color.status.warning}"},error:{value:"#DC0E19",key:"{color.status.error}"},success:{value:"#6A9F4F",key:"{color.status.success}"}},theme:{animaux:{value:"#3a840e",key:"{color.theme.animaux}"},conso:{value:"#ff8689",key:"{color.theme.conso}"},default:{value:"#4742ff",key:"{color.theme.default}"},entertainment:{value:"#9d61ff",key:"{color.theme.entertainment}"},hightech:{value:"#8f98a9",key:"{color.theme.hightech}"},media:{value:"#4742ff",key:"{color.theme.media}"},"partenaires-externes":{value:"#4742ff",key:"{color.theme.partenaires-externes}"},partner:{value:"#fd8000",key:"{color.theme.partner}"},planet:{value:"#00b482",key:"{color.theme.planet}"},production:{value:"#c5be00",key:"{color.theme.production}"},publicommunique:{value:"#c5be00",key:"{color.theme.publicommunique}"},publishing:{value:"#c5be00",key:"{color.theme.publishing}"},sport:{value:"#6398ab",key:"{color.theme.sport}"},tempo:{value:"#ecb200",key:"{color.theme.tempo}"},"vie-pro":{value:"#b49b56",key:"{color.theme.vie-pro}"},infolocale:{value:"#4742ff",key:"{color.theme.infolocale}"},gaming:{value:"#fa6ee5",key:"{color.theme.gaming}"},jeux:{value:"#4742ff",key:"{color.theme.jeux}"}}},gn={base:{value:"Arial",key:"{font-family.base}"},obviously:{value:"'Obviously', sans-serif",key:"{font-family.obviously}"},"source-serif-pro":{value:"'Source Serif Pro', serif",key:"{font-family.source-serif-pro}"}};Object.keys(gn).filter(e=>!["base"].includes(e));const yn={sad:"😢",interesting:"😍",laughing:"😂",shock:"😮",solidary:"🤝",angry:"😠",heart:"❤️",down:"👎",up:"👍"},vn=[{name:"Paris",id:"75056"},{name:"Marseille",id:"13055"},{name:"Lyon",id:"69123"},{name:"Toulouse",id:"31555"},{name:"Nice",id:"06088"},{name:"Nantes",id:"44109"},{name:"Montpellier",id:"34172"},{name:"Strasbourg",id:"67482"},{name:"Bordeaux",id:"33063"},{name:"Lille",id:"59350"},{name:"Rennes",id:"35238"},{name:"Reims",id:"51454"},{name:"Le Havre",id:"76351"},{name:"Grenoble",id:"38185"},{name:"Dijon",id:"21231"},{name:"Brest",id:"29019"}],An={PARIS:{label:"Paris",viewBox:"249.8 112.2 10 10",ids:Array.from({length:20},(e,t)=>`75056AR${(t+1).toString().padStart(2,"0")}`)},MARSEILLE:{label:"Marseille",viewBox:"360.4 391.2 12 12",ids:Array.from({length:16},(e,t)=>`13055AR${(t+1).toString().padStart(2,"0")}`)},LYON:{label:"Lyon",viewBox:"338.9 269 6 6",ids:Array.from({length:9},(e,t)=>`69123AR0${t+1}`)}},bn={"01":"Ain","02":"Aisne","03":"Allier","04":"Alpes-de-Haute-Provence","05":"Hautes-Alpes","06":"Alpes-Maritimes","07":"Ardèche","08":"Ardennes","09":"Ariège",10:"Aube",11:"Aude",12:"Aveyron",13:"Bouches-du-Rhône",14:"Calvados",15:"Cantal",16:"Charente",17:"Charente-Maritime",18:"Cher",19:"Corrèze","2A":"Corse-du-Sud","2B":"Haute-Corse",21:"Côte-d'Or",22:"Côtes-d'Armor",23:"Creuse",24:"Dordogne",25:"Doubs",26:"Drôme",27:"Eure",28:"Eure-et-Loir",29:"Finistère",30:"Gard",31:"Haute-Garonne",32:"Gers",33:"Gironde",34:"Hérault",35:"Ille-et-Vilaine",36:"Indre",37:"Indre-et-Loire",38:"Isère",39:"Jura",40:"Landes",41:"Loir-et-Cher",42:"Loire",43:"Haute-Loire",44:"Loire-Atlantique",45:"Loiret",46:"Lot",47:"Lot-et-Garonne",48:"Lozère",49:"Maine-et-Loire",50:"Manche",51:"Marne",52:"Haute-Marne",53:"Mayenne",54:"Meurthe-et-Moselle",55:"Meuse",56:"Morbihan",57:"Moselle",58:"Nièvre",59:"Nord",60:"Oise",61:"Orne",62:"Pas-de-Calais",63:"Puy-de-Dôme",64:"Pyrénées-Atlantiques",65:"Hautes-Pyrénées",66:"Pyrénées-Orientales",67:"Bas-Rhin",68:"Haut-Rhin",69:"Rhône",70:"Haute-Saône",71:"Saône-et-Loire",72:"Sarthe",73:"Savoie",74:"Haute-Savoie",75:"Paris",76:"Seine-Maritime",77:"Seine-et-Marne",78:"Yvelines",79:"Deux-Sèvres",80:"Somme",81:"Tarn",82:"Tarn-et-Garonne",83:"Var",84:"Vaucluse",85:"Vendée",86:"Vienne",87:"Haute-Vienne",88:"Vosges",89:"Yonne",90:"Territoire de Belfort",91:"Essonne",92:"Hauts-de-Seine",93:"Seine-Saint-Denis",94:"Val-de-Marne",95:"Val-d'Oise",971:"Guadeloupe",972:"Martinique",973:"Guyane",974:"La Réunion",976:"Mayotte"},wn=["extreme-gauche","parti-revolutionnaire-communiste","lutte-ouvriere","npa","parti-des-travailleurs","association-nationale-communistes","france-insoumise","divers-extreme-gauche","gauche","parti-communiste-francais","parti-des-citoyens-europeens","nouvelle-donne","parti-socialiste","parti-radical-de-gauche","nouveau-front-populaire","union-gauche","divers-gauche","ecologie","europe-ecologie-les-verts","equinoxe","ecologie-positive","ecologie-au-centre","ecologistes","les-ecologistes","centristes","renaissance","ensemble","modem","horizons","udi","union-centre","divers-centre","droite","les-republicains","droite-souverainiste","union-droite","divers-droite","extreme-droite","rassemblement-national","reconquete","les-patriotes","rester-libre","les-nationalistes","les-republicains-union-extreme-droite","udr","union-extreme-droite","divers-extreme-droite","divers","changement-citoyen","decidons-nous-meme","parti-animaliste","parti-pirate","union-des-democrates-musulmans","ecologie-politique","federation-citoyenne","republique-souveraine","resistons","france-libre","la-ruche-citoyenne","defendre-les-enfants","democratie-representative","europe-democratie-esperanto","union-populaire-republicaine","regionalistes"],xn={alignItems:["align-items"],alignContent:["align-content"],justifyContent:["justify-content"],gap:["gap"],gapX:["row-gap"],gapY:["col-gap"],inline:["inline"],direction:["direction"],wrap:["wrap"],flexGrow:["flex-grow"]},_n={align:["align-self"],basis:["flex-basis"],shrink:["flex-shrink"],grow:["flex-grow"]},Sn={radius:["border-radius"]},En={p:["padding"],pt:["padding-top"],pr:["padding-right"],pl:["padding-left"],pb:["padding-bottom"],px:["padding-left","padding-right"],py:["padding-top","padding-bottom"]},Cn={m:["margin"],mt:["margin-top"],mr:["margin-right"],ml:["margin-left"],mb:["margin-bottom"],mx:["margin-left","margin-right"],my:["margin-top","margin-bottom"],...En},kn={...Cn,borderColor:["border-color"],bg:["background-color"],color:["color"],...Sn},In={textAlign:["text-align"],weight:["font-weight"],italic:["font-style"],textDecoration:["text-decoration"],textTransform:["text-transform"],fontFamily:["font-family"],whiteSpace:["white-space"]},Dn=Object.keys(mn.theme);function Tn(t){return e.forwardRef(t)}Object.keys(mn.primary),Object.keys(mn.secondary),Object.keys(mn.greyscale),Object.keys(mn.status),Object.keys(mn.theme);const Nn=Tn(({as:e="button",variant:t,color:n=("ghost"===t||"link"===t?void 0:"primary"),children:r,iconProps:i,counter:o,isCentered:a=!1,isSquare:s=!1,isFullWidth:l=!1,isLoading:c=!1,size:u,isCloseWithProgress:d,closeProgressColor:h,hasNormalWeight:p=!1,stayOnSingleLine:f=!1,...m},g)=>{const y={...m?.style,...h&&{"--button-close-progress-color":`var(--color-theme-${h})`}};return an.jsxs(Xn,{...m,style:y,as:e,ref:g,alignItems:"center",justifyContent:"center",gap:"xxs",inline:"link"===t||"a"===e,radius:s?"0":void 0,className:hn("c-btn",{[`c-btn--${n}`]:n,[`c-btn--${t}`]:t,[`c-btn--${u}`]:u,"c-btn--is-centered":a,"c-btn--is-loading":c,"c-btn--full-width":l,"c-btn--has-normal-weight":p,"c-btn--stay-on-single-line":f},m?.className),children:[i&&an.jsx(Pn,{...i}),r,(0===o||o)&&an.jsx(Xn,{justifyContent:"center",alignItems:"center",color:"grey-900",bg:"white",px:"xxs",radius:"s",className:"c-btn__counter",children:o}),d&&an.jsx("div",{className:"c-btn__close-progress"})]})});Nn.displayName="Button";const Ln=Tn(({text:e,color:t="black",thickness:n="thin",...r},i)=>{const o=an.jsx(er,{bg:t,align:"center",className:hn("c-divider__line",{[`c-divider__line--${n}`]:"thin"!==n})});return an.jsx(Xn,{...r,ref:i,className:hn("c-divider",{"c-divider--has-text":!!e},r?.className),children:e?an.jsxs(an.Fragment,{children:[o,an.jsx(er,{px:"xxs-2",className:"c-divider__text",children:an.jsx(gr,{size:"xxs",color:t,textTransform:"uppercase",children:e})}),o]}):o})}),Bn=({bg:e="ultramarine",...t})=>an.jsx($n,{...t,className:hn("c-divider-section",t?.className),children:an.jsx($n,{as:"hr",className:hn("c-divider-section__line"),bg:e})});Tn(({color:e="black",thickness:t="thin",...n},r)=>an.jsx($n,{...n,ref:r,bg:e,className:hn("c-divider-vertical",{[`c-divider-vertical--${t}`]:"thin"!==t},n?.className)}));const Pn=Tn(({name:e,size:t=28,isRounded:n=!1,border:r,rotation:i,svgTitle:o,color:a,...s},l)=>{const c=Array.isArray(t)?t?.[0]:t,u=Array.isArray(t)?t?.[1]:t,d=!o,h=(e=>"string"==typeof e&&wn.includes(e))(a);return an.jsx($n,{as:"span",...s,ref:l,color:h?void 0:a,className:hn("c-icon",{[`c-icon--has-border-${r}`]:r,"c-icon--is-rounded":n,[`c-icon--${i}`]:i,[`c-icon--${a}`]:h},s?.className),children:an.jsxs("svg",{width:c,height:u,role:"img","aria-label":o||void 0,"aria-hidden":d?"true":void 0,children:[o&&an.jsx("title",{children:o}),"circle"===e?an.jsx("circle",{}):an.jsx("use",{xlinkHref:`#${e}`})]})})}),On=Tn(({iconProps:e,as:t="button",variant:n,color:r,size:i,hasShadow:o,isLoading:a,isFloating:s,...l},c)=>an.jsx(Xn,{...l,as:t,ref:c,alignItems:"center",justifyContent:"center",className:hn("c-icon-btn",{[`c-icon-btn--${n}`]:n,[`c-icon-btn--${r}`]:r,[`c-icon-btn--${i}`]:i,"c-icon-btn--has-shadow":o,"c-icon-btn--is-loading":a,"c-icon-btn--is-floating":s},l?.className),children:an.jsx(Pn,{...e})}));On.displayName="IconButton";const Mn=({text:e,...t})=>an.jsx(gr,{as:"span",role:"tooltip",className:"c-icon-tooltip",size:"xxs",weight:"bold",color:"grey-600",bg:"grey-100",px:"xxs",py:"xxs-2",mt:"xxs-2",radius:"xxs-2",tabIndex:0,...t,children:e}),jn=({src:e,format:t})=>e.replace(/%format/,t),Fn=({id:e="",src:t="",defaultFormat:n,formats:r,alt:i="",sizes:o,lazyLoad:a=!1,fetchPriority:s,isPortrait:l=!1,enableHD:c=!1,...u})=>{const d=a?"lazy":"eager",h={...u,id:e||void 0,alt:i,className:hn("c-img",u?.className,{"c-img--is-portrait":l}),loading:d,fetchpriority:s};if(!n)return an.jsx($n,{as:"img",src:t,...h});const p=n.split("x"),f=p[0],m=p[1];let g,y=`data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='${f}'%20height='${m}'%3E%3C/svg%3E`;if(t&&(y=jn({src:t,format:n}),g=(({src:e,formats:t})=>{if(void 0!==t&&t.length>0)return t.map(t=>`${e.replace(/%format/,t)} ${t.split("x")[0]}w`).join(", ")})({formats:r,src:t})??""),c){const e=2*Number(f),n=2*Number(m),r=jn({src:t,format:`${e}x${n}`});g=g?`${g}, ${r} 2x`:`${r} 2x`}return h.width=f||void 0,h.height="0"!==m?m:void 0,h.sizes=o||void 0,an.jsx($n,{...h,as:"img",src:y,...g?{srcSet:g}:{}})},Rn=({size:e,...t})=>an.jsx(gr,{as:"span",size:e||"s",...t,children:"•"}),qn=Tn(({id:e,className:t,color:n,required:r,label:i,icon:o,positionIcon:a="right",isIconButton:s=!1,iconButtonProps:l,variant:c,msg:u,containerProps:d,isRounded:h,isTransparent:p,isLarge:f,children:m,hint:g,error:y,...v},A)=>{const b=o&&an.jsx(Nn,{className:hn("c-input-container__icon",`color-${n||"black"}`),iconProps:{name:o,size:18},variant:"ghost",...l}),w=o&&an.jsx(Pn,{className:"c-input-container__icon",name:o,size:18,color:n||"black"});return an.jsxs(Xn,{direction:"column",...d,className:hn("c-input",d?.className,{[`c-input--${c}`]:c}),children:[i&&an.jsxs("label",{htmlFor:e,className:"c-input__label",children:[i,r&&an.jsxs(gr,{as:"span",size:"xxs",weight:"regular",children:[" ","(obligatoire)"]})]}),g&&an.jsx(gr,{as:"span",id:`${e}-hint`,mt:"xxs-2",ml:"xxs-2",className:"u-mask",children:g}),an.jsxs(Xn,{gap:o&&m?"xs":void 0,className:hn("c-input-container",{"c-input-container--rounded":h,"c-input-container--transparent":p,"c-input-container--large":f,[`c-input-container--${a}`]:o||m}),children:[(o||m)&&an.jsxs(Xn,{gap:"s",children:[s?b:w,m]}),an.jsx("input",{id:e,className:hn("c-input-container__input",t),required:r,ref:A,"aria-describedby":[g?`${e}-hint`:null,y?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...v})]}),u?.length&&an.jsx(Xn,{wrap:"wrap",gapY:"s",gapX:"xxs-2",mt:"xxs-2",children:u.map(({iconProps:e,textProps:t,value:n},r)=>an.jsxs(Xn,{alignItems:"center",gap:"xxs",children:[e&&an.jsx(Pn,{...e}),an.jsx(gr,{dangerouslySetInnerHTML:{__html:n},role:"alert",...t})]},r?.toString()))}),y&&an.jsx(gr,{as:"span",id:`${e}-error`,className:"u-mask",color:"red",size:"xxs",mt:"xxs-2",ml:"xxs-2",role:"alert",children:y})]})}),zn=({children:e,bg:t,color:n,hasDot:r=!1,isUppercase:i=!0,size:o,className:a,textProps:s,...l})=>{const c={...l.style,...t?.includes("#")&&{backgroundColor:t},...n?.includes("#")&&{color:n}};return an.jsxs(gr,{...l,...s,as:t?Xn:"span",...t&&{inline:!0,alignItems:"center",radius:"xxs-2",p:"xxs-2"},style:c,...!t?.includes("#")&&{bg:t},...!n?.includes("#")&&{color:n},size:o||"xxs",weight:"bold",...i&&{textTransform:"uppercase"},className:hn("c-label",{"c-label--no-background":!t},a),children:[r&&an.jsx(Pn,{name:"dot",size:4,mr:"xxs-2"}),e]})},Hn=e=>{if(e.propValue&&["boolean","string","number"].includes(typeof e.propValue)||!e.propValue){const t=Kn({className:e.className,defaultModifier:e.defaultModifier||"xs",propValue:e.propValue});return t?[t]:[]}return Object.entries(e.propValue).reduce((t,[n,r])=>{const i=Kn({className:e.className,defaultModifier:n,propValue:r});return i&&t.push(i),t},[])},Kn=e=>{if(void 0!==e.propValue){if("boolean"!=typeof e.propValue){const t=(e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase())("number"==typeof e.propValue?e.propValue.toString():e.propValue);return e.className?`${e.className}-${t}@${e.defaultModifier}`:`${t}@${e.defaultModifier}`}if(!e.className)throw new Error('It is necessary to define the argument "className" !');return`${e.className}@${e.defaultModifier}`}},Un=({basis:e,shrink:t,grow:n,...r})=>hn(...Hn({propValue:e,className:"basis"}),...Hn({propValue:t,className:"shrink"}),...Hn({propValue:n,className:"grow"}),Wn(r)),Vn=({inline:e=!1,direction:t,wrap:n,...r})=>hn(...Hn({propValue:e,className:e?"inline-flex":"flex"}),...Hn({propValue:t,className:"direction"}),...Hn({propValue:n}),Qn(r)),Qn=e=>hn(...Hn({propValue:e.alignItems,className:"items"}),...Hn({propValue:e.alignContent,className:"content"}),...Hn({propValue:e.justifyContent,className:"justify"}),...Hn({propValue:e.gap,className:"gap"}),...Hn({propValue:e.gapX,className:"gap-x"}),...Hn({propValue:e.gapY,className:"gap-y"}),...Hn({propValue:e.flexGrow,className:"grow"})),Wn=e=>hn(...Hn({propValue:e.align,className:"self"})),Gn=e=>"object"==typeof e.props?Object.keys(e.props).reduce((t,n)=>(e.systemPropNames.includes(n)||(t[n]=e.props[n]),t),{}):{},Zn=e=>hn(Object.entries(e).filter(([e])=>Object.keys(Cn).includes(e)).reduce((e,[t,n])=>(e.push(...Hn({className:t,propValue:n})),e),[])),Yn=e=>hn(Zn(e),(e=>hn({[`bg-${e.bg}`]:e.bg,[`color-${e.color}`]:e.color,[`border-color-${e.borderColor}`]:e.borderColor}))(e),(e=>hn(Object.entries(e).filter(([e])=>Object.keys(Sn).includes(e)).reduce((e,[t,n])=>(e.push(...Hn({className:t,propValue:n})),e),[])))(e)),Jn=({textAlign:e,weight:t,textTransform:n,textDecoration:r,italic:i,fontFamily:o,whiteSpace:a})=>hn(Hn({className:"text",propValue:e}),Hn({className:"font-weight",propValue:t}),{[`white-space-${a}`]:!!a,[`text-transform-${n}`]:!!n,[`text-decoration-${r}`]:!!r,"text-italic":!!i,[`font-${o}`]:!!o}),$n=Tn(({as:e="div",children:t,...n},r)=>an.jsx(e,{...Gn({props:n,systemPropNames:Object.keys(kn)}),ref:r,className:hn(Yn(n),n?.className),children:t}));$n.displayName="Box";const Xn=Tn(({as:e="div",children:t,...n},r)=>an.jsx($n,{...Gn({props:n,systemPropNames:Object.keys(xn)}),as:e,ref:r,className:hn(Vn(n),n?.className),children:t})),er=Tn(({as:e="div",children:t,...n},r)=>an.jsx($n,{...Gn({props:n,systemPropNames:Object.keys(_n)}),as:e,ref:r,className:hn(Un(n),n?.className),children:t})),tr=({colsNumber:t,gap:n,gapX:r,gapY:i,children:o,...a})=>e.createElement($n,{...Gn({props:a,systemPropNames:Object.keys(xn)}),className:hn("grid",...Hn({className:"grid-cols-number",propValue:t}),...Hn({className:"grid-gap",propValue:n}),...Hn({className:"grid-gap-row",propValue:r}),...Hn({className:"grid-gap-col",propValue:i}),hn(Qn(a),a?.className)),children:o}),nr=Tn(({as:e="a",children:t,color:n,buttonColor:r,size:i,variant:o,weight:a,whiteSpace:s,tabIsSelected:l,tabVariant:c,tabColor:u,defaultColor:d="ultramarine",isUnderlined:h,...p},f)=>{if((o||r)&&n)throw new Error("You can't use the color prop together with the variant or buttonColor prop");const m=!(!o&&!r),g=c||u?hn("c-tab",{[`c-tab--${c}`]:c,[`c-tab--${u}`]:u,"c-tab--selected":l,"c-tab--unselected":!l},Jn({weight:a,whiteSpace:s}),p?.className):hn("c-link",{"c-btn":m&&!n,[`c-btn--${r}`]:r&&!n,[`c-btn--${o}`]:o&&!n},Jn({weight:a,whiteSpace:s}),Hn({className:"text",propValue:i}),{"c-link--is-underlined":h},p?.className);return an.jsx($n,{...p,as:e,ref:f,color:c||u||m?void 0:n||("inherit"===d?void 0:d),className:g,children:t})}),rr=({dialogId:e,children:t,variant:n="center",contentClassName:r,enableA11yDialog:i=!0,...o})=>{const a={id:e,"aria-hidden":!0},s={"data-a11y-dialog-hide":e};return an.jsxs($n,{...o,className:hn("c-modal",{"js-modal":i},o.className),...a,children:[an.jsx("div",{className:"c-modal__overlay","aria-hidden":!0,...s}),an.jsx("div",{className:hn("c-modal__content",`c-modal__content--${n}`,r),children:t})]})},ir=({isWhite:e})=>an.jsx("div",{className:hn("c-pipe",{"c-pipe--is-white":e})}),or=({rating:e,ratingMax:t=5,iconProps:n,...r})=>{const i=e=>an.jsx(Pn,{name:"star",color:"ultramarine",...n},e),o=e=>an.jsx(Pn,{name:"star",color:"grey-200",...n},e),a=e=>an.jsx(Pn,{name:"halfstar",color:"grey-200",...n},e),s=[];for(let n=0;n<t;n+=1){const t=n+.5===e;n<e&&!t?s.push(i(n)):t?s.push(a(n)):s.push(o(n))}return an.jsx($n,{...r,children:s})},ar=({title:e,link:t,image:n,isTargetBlank:r,isNofollow:i,isSponsored:o,isInArticle:a,...s})=>an.jsxs($n,{...s,className:hn("c-read-also",{"c-read-also--in-article":a},s?.className),children:[an.jsxs("div",{children:[a?an.jsx(gr,{fontFamily:"base",color:"ultramarine",weight:"bold",textTransform:"uppercase",size:"xs",pb:"xxs-2",children:"Lire aussi"}):an.jsx(zn,{color:"grey-400",textProps:{fontFamily:"base"},children:"Lire aussi"}),!a&&an.jsx(ir,{}),an.jsx(nr,{href:t,className:"c-read-also__link",target:r?"_blank":void 0,rel:(i?"isNofollow":o&&"isSponsored")||void 0,...a&&{color:"black"},children:e})]}),n&&an.jsx(Fn,{src:n,defaultFormat:"110x70",formats:["110x70"],sizes:"110px",alt:e,className:"c-read-also__visual"})]});Tn(({variant:e,progressColor:t="ultramarine"},n)=>an.jsx($n,{ref:n,bg:"grey-100",className:hn("c-progress",{[`c-progress--${e}`]:e}),children:an.jsx($n,{className:"c-progress__bar",bg:t,style:{width:"0%"}})}));const sr=Tn(({id:e,className:t,required:n,label:r,defaultValue:i,options:o,placeholder:a,containerProps:s,variant:l="default",icon:c,isLarge:u,hint:d,error:h,...p},f)=>an.jsxs(Xn,{...s,ref:f,direction:"column",className:hn("c-select",s?.className),children:[r&&an.jsxs("label",{htmlFor:e,className:"c-select__label",children:[r,n&&an.jsxs(gr,{as:"span",size:"xxs",weight:"regular",children:[" ","(obligatoire)"]})]}),d&&an.jsx(gr,{as:"span",id:`${e}-hint`,mt:"xxs-2",ml:"xxs-2",className:"u-mask",children:d}),an.jsxs("div",{className:"c-select__container",children:[c&&an.jsx(Pn,{className:"c-select__icon",name:c,size:18}),an.jsx(Pn,{className:`c-select__caret c-select__caret--${l}`,name:"arrow",size:12}),an.jsxs("select",{id:e,className:hn("c-select__select",`c-select__select--${l}`,{"c-select__select--has-icon":!!c},{"c-select__select--large":u},Zn(p),t),required:n,defaultValue:i||o.filter(e=>e.isSelected)?.pop()?.value||"","aria-describedby":[d?`${e}-hint`:null,h?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...Gn({props:p,systemPropNames:Object.keys(En)}),children:[a&&an.jsx("option",{value:"",disabled:!0,hidden:!0,children:a}),o.map(e=>an.jsx("option",{value:e.value,children:e.title},e.value))]})]}),h&&an.jsx(gr,{as:"span",id:`${e}-error`,className:"u-mask",color:"red",size:"xxs",mt:"xxs-2",ml:"xxs-2",role:"alert",children:h})]}));var lr=(e=>(e.MOBILE="mobile",e.DESKTOP="desktop",e))(lr||{}),cr=(e=>(e.embed="embed",e.photo="photo",e.podcast="podcast",e.video="video",e))(cr||{});const ur=Tn(({layout:e,children:t,itemsGap:n,hasSpaceAroundButtons:r=!1,buttonsColor:i,buttonsSize:o,colorVariant:a,sliderVariant:s="default",auto:l=!1,delay:c=3e3,...u},d)=>an.jsxs($n,{...u,ref:d,className:hn("c-slider js-navigation-container",u?.className),"data-slider-variant":s,"data-slider-auto":l,"data-slider-delay":c,children:[an.jsx($n,{className:"c-slider__viewport js-navigation-container__list",children:an.jsx(Xn,{className:"c-slider__list",alignItems:"center",gap:n,children:t})}),e===lr.DESKTOP&&an.jsx($n,{className:"c-slider__buttons-container",children:Array.from(["previous","next"],e=>an.jsx($n,{pr:r&&"previous"===e&&("translucent"===i&&"small"===o?"m":"l")||void 0,pl:r&&"next"===e&&("translucent"===i&&"small"===o?"m":"l")||void 0,className:hn(`c-slider__button-container c-slider__button-container--${e} o-nav-button o-nav-button--${e}-button`,{"c-slider__button-container--has-space-around":r},{[`c-slider__button-container--${s}`]:s}),children:an.jsx(On,{color:i,size:o,..."videos"===s&&{p:"m"},iconProps:{name:"chevron",size:"videos"===s?14:12,rotation:"previous"===e?"half":void 0,svgTitle:"previous"===e?"Précédent":"Suivant"}})},e))})]})),dr=({containerProps:e,labelPosition:t="before",label:n,icon:r,id:i,...o})=>{const a=o.checked??o.defaultChecked??!1,s=an.jsxs(Xn,{as:"label",alignItems:"center",htmlFor:i,children:["before"===t&&r&&an.jsx(Pn,{mr:"xs",...r}),n,"after"===t&&r&&an.jsx(Pn,{ml:"xs",...r})]});return an.jsxs(Xn,{gap:"xs",...e,className:"c-switch",children:["before"===t&&n&&s,an.jsx("input",{...o,role:"switch",type:"checkbox",id:i,"aria-checked":a,className:hn("c-switch__input",o.className)}),"after"===t&&n&&s]})},hr=({variant:e="default",name:t,children:n,tabColor:r="default",isSelected:i=!1,index:o=-1,isNoWrap:a,color:s,...l})=>an.jsx("button",{type:"button",role:"tab",id:`tab-${t}`,className:hn("c-tab",{[`c-tab--${e}`]:e,[`c-tab--${r}`]:r,[`color-${s}`]:s,"c-tab--no-wrap":a}),"aria-controls":`tabpanel-${t}`,"aria-selected":i,tabIndex:o,...l,children:n}),pr=({name:e,children:t,className:n,isHidden:r=!0})=>an.jsx("div",{id:`tabpanel-${e}`,className:hn(n,"c-tabpanel"),role:"tabpanel","aria-hidden":r,"aria-labelledby":`tab-${e}`,children:t}),fr=Tn(({as:e="a",id:t,variant:n="primary",size:r,children:i,...o},a)=>an.jsx($n,{...o,as:"span"===n?"span":e,href:"span"===n?void 0:o?.href,ref:a,className:hn("c-tags",`c-tags--${n}`,{[`c-tags--${r}`]:r},o?.className),"data-id":t,py:o?.py??"0",px:o?.px??"xs",children:i}));Tn(({id:e,required:t,label:n,variant:r,msg:i,rows:o=5,containerProps:a,textareaContainerProps:s,iconButtonProps:l,hint:c,error:u,...d},h)=>an.jsxs(Xn,{direction:"column",ref:h,...a,className:hn("c-textarea",a?.className,{[`c-textarea--${r}`]:r}),children:[n&&an.jsxs("label",{htmlFor:e,className:"c-textarea__label",children:[n,t&&an.jsxs(gr,{as:"span",size:"xxs",weight:"regular",children:[" ","(obligatoire)"]})]}),c&&an.jsx(gr,{as:"span",id:`${e}-hint`,mt:"xxs-2",ml:"xxs-2",className:"u-mask",children:c}),an.jsxs(Xn,{...s,className:hn("c-textarea-container",s?.className),children:[an.jsx("textarea",{rows:o,placeholder:"Votre message...",required:t,...d,id:e,name:e,className:hn("c-textarea-container__textarea",d?.className),"aria-describedby":[c?`${e}-hint`:null,u?`${e}-error`:null].filter(Boolean).join(" ")||void 0}),l&&an.jsx(On,{...l,className:hn("c-textarea-container__icon",l?.className)})]}),i?.length&&an.jsx(Xn,{wrap:"wrap",gapY:"s",gapX:"xxs-2",mt:"xxs-2",children:i.map(({iconProps:e,textProps:t,value:n},r)=>an.jsxs(Xn,{alignItems:"center",gap:"xxs",children:[e&&an.jsx(Pn,{...e}),an.jsx(gr,{dangerouslySetInnerHTML:{__html:n},role:"alert",...t})]},r?.toString()))}),u&&an.jsx(gr,{as:"span",id:`${e}-error`,className:"u-mask",color:"red",size:"xxs",mt:"xxs-2",ml:"xxs-2",role:"alert",children:u})]}));const mr=Tn(({as:e="h1",size:t,children:n,...r},i)=>an.jsx(yr,{...r,as:e,ref:i,className:hn(Hn({className:"heading",propValue:t}),r?.className),children:n})),gr=Tn(({as:e="p",size:t,highlighted:n,children:r,...i},o)=>an.jsx(yr,{as:n?"span":e,bg:n?"sponsoring":i.bg,p:n?"xxs":i.p,color:n?"grey-800":i.color,...i,ref:o,className:hn(Hn({className:"text",propValue:t}),{"text-highlighted":n},i?.className),children:r})),yr=Tn(({as:e="p",children:t,...n},r)=>t&&t.toString().length||n?.dangerouslySetInnerHTML?an.jsx($n,{...Gn({props:n,systemPropNames:Object.keys(In)}),as:e,ref:r,className:hn(Jn(n),n?.className),children:t}):null),vr=({cover:e,description:t,title:n,link:r,closeButton:i,...o})=>an.jsx(Xn,{...o,className:hn("c-info-banner","c-info-banner--alert",o?.className),alignItems:"center",justifyContent:"center",gap:"s",color:"white",bg:"red",p:"s",children:an.jsxs(Xn,{className:"c-info-banner__container",gap:"s",alignItems:"start",children:[e&&an.jsx(Xn,{as:"a",className:"c-info-banner__visual",...r||{},children:an.jsx(Fn,{src:e,defaultFormat:"130x82",formats:["130x82"],sizes:"130px",alt:n,className:"c-info-banner__cover"})}),an.jsxs(Xn,{className:"c-info-banner__content",direction:"column",justifyContent:{xs:"between"},children:[an.jsx(gr,{className:"c-info-banner__title",color:"red",bg:"white",px:"xxs-2",mb:"xxs-2",size:"s",weight:"bold",children:n}),an.jsx(gr,{as:r?"a":void 0,size:"s",color:"white",...r||{},children:t}),i&&an.jsx(Nn,{...i,variant:"ghost",className:"c-info-banner__close",children:an.jsx(Pn,{name:"close",size:12,color:"white"})})]})]})}),Ar=({html:e,caption:t=""})=>an.jsxs("figure",{className:"c-media",children:[an.jsx("div",{className:"c-media__content c-media__content--video",dangerouslySetInnerHTML:{__html:e}}),t&&an.jsx(gr,{as:"figcaption",size:"xs",mt:"s",color:"grey-300",className:"c-media__caption",children:t})]}),br=({html:e})=>an.jsx("div",{dangerouslySetInnerHTML:{__html:e}}),wr={defaultFormat:"1444x920",formats:["1444x920","722x460","640x408","320x204"],sizes:"(min-width: 722px) 722px, 100vw"},xr={defaultFormat:"1444x920",formats:["1444x920","722x460","640x408","320x204"],sizes:"100vw"},_r=({type:e=cr.photo,src:t,caption:n,source:r,credits:i,layout:o=lr.MOBILE,imgProps:a,imagesNumber:s,videoIs16by9:l=!1,isGallery:c=!1,...u})=>{let d=xr;return o===lr.DESKTOP&&(d=wr),an.jsxs($n,{...u,as:"figure",className:"c-media",children:[e===cr.photo&&an.jsxs("div",{className:"c-media__content",children:[an.jsx(Fn,{...a,src:t,defaultFormat:a?.defaultFormat||d.defaultFormat,formats:a?.formats||d.formats,sizes:a?.sizes||d.sizes,alt:n,fetchPriority:a?.fetchPriority||"auto",lazyLoad:!1!==a?.lazyLoad}),c&&s&&s>=2&&an.jsx(Nn,{color:"tertiary",size:"large",iconProps:{name:"diaporama-outlined",size:21},isCentered:!0,counter:s,children:an.jsx(gr,{as:"span",size:"m",whiteSpace:"nowrap",children:"Lancer le diaporama"})})]}),[cr.video,cr.podcast,cr.embed].includes(e)&&an.jsx("div",{className:hn("c-media__content",{[`c-media__content--${e}`]:e,"c-media__content--video-is-16-by-9":e===cr.video&&l}),dangerouslySetInnerHTML:{__html:t}}),n&&an.jsxs(gr,{className:hn({"caption-content":c}),as:"figcaption",size:"xs",mt:"s",color:"grey-400",mx:{xs:"m",md:"0"},children:[n,i&&an.jsxs(gr,{as:"span",color:"grey-300",size:"xs",className:"text-italic",children:[" - ",i]}),r&&an.jsxs(gr,{as:"span",color:"grey-300",size:"xs",className:"text-italic",children:[" / ",r]})]})]})};Tn(({icon:e,title:t,content:n,...r},i)=>an.jsxs($n,{...r,ref:i,className:hn("c-astro-topic-card",r?.className),children:[an.jsxs(Xn,{alignItems:"center",mb:"s",children:[an.jsx(Pn,{mr:"xs",name:e,size:21}),an.jsx(mr,{as:"h3",size:"xs",children:t})]}),an.jsx(gr,{size:"m",children:n})]}));const Sr=({avatars:e,maxAvatar:t=4,themeColor:n,...r})=>an.jsx(Xn,{...r,className:"c-avatar-group",children:e.slice(0,t).map(e=>an.jsx(fn,{img:e.path,alt:e.title,color:e.color??(e.path?void 0:n)},e.title))}),Er=Tn(({as:e="article",children:t,className:n,clickable:r=!1,...i},o)=>an.jsx(Xn,{...i,as:e,ref:o,justifyContent:i?.justifyContent||"between",className:hn("c-card-container",{"c-card-container--clickable":r},n),children:t})),Cr=({text:e,avatarAlt:t,avatarUrl:n,secondaryText:r,bg:i,externalLink:o,...a})=>{const s={as:"span",size:"xs",bg:i||void 0,p:i?"xxs":void 0,color:i?"grey-900":void 0},l=an.jsxs(Xn,{className:"u-relative u-relative--z-index-2 opacity-hover",as:"a",href:o,target:"_blank",gap:"xxs",children:[n&&an.jsx(fn,{variant:"xsmall",img:n,alt:t}),an.jsx(gr,{...s,mt:"xxs-2",children:e})]});return an.jsxs(Xn,{...a,justifyContent:"between",alignItems:"center",gap:"s",children:[o?l:an.jsx(gr,{...s,children:e}),r&&an.jsx(gr,{as:"span",size:"xxs-3",color:"grey-300",textTransform:"uppercase",children:r})]})},kr=({headline:e,liveTime:t,rightSubheader:n,location:r,...i})=>{const o=an.jsx(zn,{color:e.color||"grey-400",isUppercase:e.isUppercase,size:"xs",...!r&&!t&&!n&&i,children:e.text}),a=t||n?an.jsxs(Xn,{...!r&&i,alignItems:"center",gap:"xxs-2",color:"grey-400",children:[t&&an.jsxs(an.Fragment,{children:[an.jsx(gr,{as:"span",size:"xs",color:"red",weight:"bold",children:t}),an.jsx(Rn,{size:"xs",color:"red"})]}),o,n&&an.jsxs(an.Fragment,{children:[an.jsx(Rn,{size:"xs",color:e.color||"grey-400"}),an.jsx(gr,{as:"time",size:"xs",color:n.color,children:n.text})]})]}):o;return r?an.jsxs(Xn,{...i,direction:"column",children:[a,an.jsxs(Xn,{color:"ultramarine",mt:"xxs-2",children:[an.jsx(Pn,{name:"local",size:13,mr:"xxs-2"}),an.jsx(gr,{size:"xxs",weight:"bold",textTransform:"uppercase",children:r})]})]}):a},Ir=({iconProps:e,iconSize:t,iconColor:n,iconBackground:r,count:i,countColor:o,countBg:a,countSize:s,countStyle:l="rounded",label:c,ariaLabel:u,anchor:d,link:h,isClickable:p=!0,isHighlighted:f=!1,isInToolbar:m=!1,children:g,variant:y,...v})=>{const A=()=>{if(e?.size)return e.size;if(void 0!==t){if("string"==typeof t)switch(t){case"small":return 10;case"medium":return 15;default:return 20}return t}return y&&"secondary"===y?15:20},b=()=>{const c=an.jsx(Xn,{as:"span",className:hn("c-icon-item__icon",{"c-icon-item__icon--in-toolbar":m,[`c-icon-item__icon--${t}`]:t}),alignItems:"center",justifyContent:"center",bg:void 0!==r?"none"===r?void 0:r:y&&"secondary"===y?"grey-100":void 0,color:n,children:an.jsx(Pn,{size:A(),...e})});return void 0!==i?an.jsxs(Xn,{className:"c-icon-item",alignItems:"center",children:[c,an.jsx(gr,{as:"span",size:"small"===s?"xxs-2":y&&"secondary"===y?"xxs":"xxs-2",color:o||(y&&"secondary"===y?"black":"white"),bg:a||(y&&"secondary"===y?void 0:"default"),ml:"inline"===l&&"none"!==r?"xxs-2":void 0,className:hn("c-icon-item__count",{[`c-icon-item__count--${l}`]:l,[`c-icon-item__count--${s}`]:s}),children:0===i?"0":i})]}):c};return an.jsxs(Xn,{...v,inline:!0,direction:"column",alignItems:"center",className:hn("c-icon-item__container",{"c-icon-item__container--is-clickable":p},{"c-icon-item__container--is-highlighted":f},{"c-icon-item__container--has-children":g},v?.className),"aria-label":u,children:[d||h?an.jsx("a",{href:d?`#${d}`:h,children:b()}):b(),an.jsx(gr,{size:"xxs-2",children:c}),g]})},Dr=e=>{switch(e){case"small":return 20;case"medium":return 28;default:return 40}},Tr=({cover:e,id:t,defaultFormat:n,formats:r,sizes:i,alt:o,caption:a,lazyLoad:s=!1,fetchPriority:l="auto",withShadow:c=!1,isFavorite:u,enableHD:d=!1,dataId:h="",hasFlag:p=!1,title:f,className:m,radius:g,...y})=>{const v=an.jsx(Fn,{...t?{id:t}:{},src:e,defaultFormat:n,formats:r,sizes:i,alt:o,lazyLoad:s,fetchPriority:l,radius:g,enableHD:d});return an.jsx($n,{...y,className:hn("c-card-img",m),children:an.jsxs("div",{className:hn("c-card-img__inner",{"c-card-img__inner--with-shadow":c||!!a||p,"c-card-img__inner--with-interaction":void 0!==u}),children:[a&&an.jsxs(Xn,{color:"white",alignItems:"center",gap:"small"===a.size?"xxs-2":"xxs",className:hn("c-card-img__caption",{[`c-card-img__caption--${a.size||"big"}`]:!0}),children:[an.jsx(Pn,{name:a.iconName,size:Dr(a.size||"big")}),an.jsx(gr,{size:"small"===a.size?"xxs-2":"xxs",weight:"bold",children:a.text})]}),f&&an.jsx(gr,{size:"xxl",weight:"bold",color:"white",className:"c-card-img__title",children:f}),void 0!==u&&an.jsx(Ir,{className:"c-card-img__favorite",variant:"secondary",iconProps:{size:20,name:u?"star":"star-outlined"},color:"grey-500","data-event-name":"mbrs-game-save-favorite",...h?{"data-id":h}:{}}),v,p&&an.jsx("span",{className:hn("c-card-img__flag",{"c-card-img__flag--has-radius":"0"!==g})})]})})},Nr=e=>{switch(e){case"alert":return{label:"alerte info",color:"red"};case"live":return{label:"live",color:"red"};case"info":return{label:"info en série",color:"ultramarine"};case"with-you":return{label:"avec vous",color:"entertainment"};case"magazine":return{label:"magazine",color:"publishing"};default:return{label:"exclusif",color:"ultramarine"}}},Lr=({cartridge:e,cartridgeIsCentered:t,maxRows:n,as:r,href:i,hrefTarget:o,size:a,fontFamily:s,weight:l,children:c,...u})=>an.jsx($n,{pb:"xxs-3",...u,className:hn("c-card-title",{"c-card-title--has-max-rows":n,[`c-card-title--has-${n}-rows`]:n},u?.className),children:an.jsxs(mr,{as:r||"h1",...i&&{as:"a",href:i},...o&&{target:o},size:a||"m",fontFamily:s||"source-serif-pro",weight:l||"semi-bold",children:[e&&an.jsx(zn,{bg:Nr(e).color,color:"white",hasDot:"live"===e||!1,mr:"xxs",textProps:{fontFamily:"base"},className:hn("c-card-title__cartridge-heading",{"c-card-title__cartridge-heading--is-centered":t}),children:Nr(e).label}),c]})}),Br=({link:e,title:t,summaryProps:n,cardHeaderProps:r,cardTitleProps:i,cardImageProps:o,layout:a,signatureProps:s,socialBarProps:l,follows3ColumnsGrid:c=!1,mediaSrc:u,linkProps:d,...h})=>{const{cardFooterProps:p,...f}=h,m=["722x460","640x408","320x204"];return an.jsx(Er,{...f,className:hn("c-card-extra-large",f.className),direction:"column",clickable:!0,children:a===lr.DESKTOP?an.jsxs(Xn,{gap:c?"s":"xl",className:hn({"o-lt-show":!c,"o-columns-by-3":c}),children:[o||u?an.jsx($n,{className:hn({"o-lt-show__main":!c,"o-columns-by-3__first-2-columns":c}),children:o&&an.jsx(Tr,{...o,formats:m,defaultFormat:"722x460",sizes:"(min-width: 1024px) 722px, (min-width: 480px) 640px, 320px",alt:t})||u&&an.jsx(_r,{type:cr.video,src:u,videoIs16by9:!0})}):null,an.jsxs(Xn,{direction:"column",justifyContent:"between",pl:c?"s":"0",className:hn({"o-lt-show__aside":!c,"o-columns-by-3__last-1-column":c}),children:[an.jsxs(Xn,{direction:"column",flexGrow:1,children:[r&&an.jsx(kr,{...r,rightSubheader:void 0,mb:"xxs-2"}),an.jsx(Lr,{as:"h2",size:"l",weight:"bold",cartridgeIsCentered:!0,...i,children:an.jsx("a",{href:e,children:t})}),n&&an.jsx(gr,{...n,size:"xl",fontFamily:"source-serif-pro",color:n.color||"grey-600",mt:"xs",children:n.children})]}),l&&an.jsx(Ei,{...l,variant:"card",mt:"s",className:"u-relative u-relative--z-index-2"}),p&&an.jsx(Cr,{...p,mt:"s"})]})]}):an.jsxs(an.Fragment,{children:[an.jsxs("div",{children:[r&&an.jsx(kr,{...r,rightSubheader:void 0,mx:"m",mb:"xxs-2"}),an.jsx(Lr,{as:"h2",weight:"bold",...i,mx:"m",children:an.jsx("a",{href:e,children:t})}),o&&an.jsx(Tr,{...o,formats:m,defaultFormat:"640x408",alt:t,mt:"xs",radius:"0"}),s&&an.jsx(yi,{...s,mx:"m",mt:"xs",className:"u-relative u-relative--z-index-2"}),n&&an.jsx($n,{as:"p",color:n.color||"grey-600",className:"c-card-extra-large__summary",mx:"m",mt:"xs",children:n.children})]}),p&&an.jsx(Cr,{...p,mt:"l",bg:p?.bg}),l&&an.jsx(Ei,{...l,variant:"card",mt:"s",mx:"m",className:"u-relative u-relative--z-index-2"}),p&&an.jsx(Cr,{...p,mt:"s",mx:"m"}),d&&!l&&an.jsx(Xn,{mt:"s",justifyContent:"center",children:an.jsx(nr,{buttonColor:"primary",...d})})]})})},Pr=({link:e,title:t,cardHeaderProps:n,cardTitleProps:r,cardImageProps:i,cardFooterProps:o,layout:a,socialBarProps:s,reverseCard:l,...c})=>{const{summaryProps:u,signatureProps:d,...h}=c;return an.jsxs(Er,{...h,p:c?.bg?"s":void 0,direction:"column",className:hn("c-card-extra-small",c?.className),justifyContent:"start",clickable:!0,children:[n&&an.jsx(kr,{...n,mb:"xxs-2"}),an.jsxs(Xn,{justifyContent:l?"end":"between",gap:"xs",direction:l?"row-reverse":"row",children:[an.jsx(Lr,{as:"h4",fontFamily:"source-serif-pro",weight:"semi-bold",maxRows:5,size:"xxs-2",pb:void 0,cartridgeIsCentered:!0,...r,children:an.jsx("a",{href:e,children:t})}),i&&an.jsx(Tr,{...i,...i.caption&&{caption:{size:"small",...i.caption}},defaultFormat:a===lr.DESKTOP?"130x82":"260x164",formats:["260x164","130x82"],sizes:a===lr.DESKTOP?"130px":"260px",alt:t,className:"c-card-extra-small__img"})]}),o&&an.jsx(Cr,{...o,mt:"xs"}),s&&an.jsx(Ei,{...s,variant:"card",mt:"xs",className:"u-relative u-relative--z-index-2"})]})},Or=({link:e,title:t,layout:n,summaryProps:r,cardHeaderProps:i,cardTitleProps:o,cardImageProps:a,socialBarProps:s,mediaSrc:l,...c})=>{const{cardFooterProps:u,signatureProps:d,...h}=c;return an.jsx(Er,{...h,className:"c-card-large",direction:"column",children:n===lr.DESKTOP?an.jsxs("a",{href:e,children:[a&&an.jsx(Tr,{...a,defaultFormat:"722x460",formats:["722x460","320x204"],alt:t}),an.jsxs($n,{className:hn("c-card-large__summary",{"c-card-large__summary--has-flag":a?.hasFlag}),color:"white",children:[i&&an.jsx(zn,{size:"xs",children:i.headline.text}),an.jsx(Lr,{size:"l",weight:"bold",cartridgeIsCentered:!0,...o,children:t}),r&&an.jsx(gr,{...r,as:"span",size:"l",fontFamily:"source-serif-pro",children:r.children})]})]}):an.jsxs(an.Fragment,{children:[an.jsxs("a",{href:e,children:[a&&an.jsx(Tr,{...a,defaultFormat:"722x460",formats:["722x460","320x204"],alt:t,mb:"xs",radius:"0"})||l&&an.jsx(_r,{type:cr.video,src:l,videoIs16by9:!0,mb:"xs"})||null,i&&an.jsx(zn,{color:i.headline.color||"grey-400",size:"xs",mx:"m",mb:"xxs",children:i.headline.text}),an.jsx(Lr,{mx:"m",weight:"bold",...o,children:t}),l&&r&&an.jsx(gr,{...r,size:"m",mx:"m",fontFamily:"source-serif-pro",color:r.color||"grey-600",mt:"xs",children:r.children})]}),s&&an.jsx(Ei,{...s,variant:"card",mx:"m",mt:"s",className:"u-relative u-relative--z-index-2"})]})})},Mr=({link:e,title:t,cardHeaderProps:n,cardTitleProps:r,cardImageProps:i,socialBarProps:o,cardFooterProps:a,bg:s,radius:l,...c})=>{const{summaryProps:u,signatureProps:d,...h}=c;return an.jsxs(Er,{...h,direction:"column",bg:s,radius:s?l||"xxs":void 0,clickable:!0,children:[i&&an.jsx(Tr,{...i,formats:["480x308","346x222"],defaultFormat:"480x308",alt:t,mb:"xs",className:s?"c-card-img--with-bg":void 0}),n&&an.jsx(kr,{...n,...s&&{color:"grey-500",px:"s"},mb:"xxs-2"}),an.jsx(Lr,{as:"h3",maxRows:3,fontFamily:"source-serif-pro",weight:"semi-bold",size:"xs",cartridgeIsCentered:!0,...s&&{color:"grey-900",px:"s"},...r,className:hn("c-card-medium__title",r?.className),children:an.jsx("a",{href:e,children:t})}),a&&an.jsx(Cr,{...a,mt:"l",p:s?"s":void 0,bg:a?.bg||s}),o&&an.jsx(Ei,{mt:"xs",...o,variant:"card",className:"u-relative u-relative--z-index-2"})]})},jr=(e,t="fr-FR")=>Intl.NumberFormat(t).format(e),Fr=({link:e,title:t,cardHeaderProps:n,cardTitleProps:r,cardImageProps:i,cardNumber:o,layout:a,summaryProps:s,commentCount:l,variant:c,shareCount:u,viewCount:d,...h})=>{const{cardFooterProps:p,signatureProps:f,socialBarProps:m,...g}=h;return an.jsxs(Er,{...g,clickable:!0,className:hn("c-card-most",{[`c-card-most--${c}`]:c}),justifyContent:"start",children:[an.jsx(gr,{as:"span",color:"ultramarine",weight:"semi-bold",className:hn("c-card-most__card-number",{[`c-card-most__card-number--${o.size||"default"}-size`]:!0}),mr:"small"===c?"xs":"m",children:o.value}),an.jsxs($n,{className:"c-card-most__content",children:[n&&an.jsx(kr,{mb:"xxs-2",...n}),an.jsx(Lr,{as:"h3",size:{xs:"xxs-2",md:"small"===c?"xxs-3":"xs"},fontFamily:"source-serif-pro",weight:"semi-bold",cartridgeIsCentered:!0,...r,children:an.jsx("a",{href:e,children:t})}),s&&an.jsx(gr,{color:"grey-600",fontFamily:"source-serif-pro",size:"m",mt:"xs",...s,children:s.children}),i?.cover&&a===lr.MOBILE&&an.jsx(Tr,{...i,...i.caption&&{caption:{size:"medium",...i.caption}},defaultFormat:"297x204",enableHD:!0,alt:t,mt:"xs",className:"c-card-most__img"}),!!l&&an.jsxs(Xn,{gap:"xs",alignItems:"center",mt:"xs",children:[an.jsx(Pn,{size:22,name:"comment"}),an.jsx(gr,{size:"m",weight:"bold",children:jr(l)})]}),!!u&&an.jsxs(Xn,{gap:"xs",alignItems:"center",mt:"xs",children:[an.jsx(Pn,{size:22,name:"share"}),an.jsx(gr,{size:"m",weight:"bold",children:jr(u)})]}),!!d&&an.jsxs(Xn,{gap:"xs",alignItems:"center",mt:"xs",children:[an.jsx(Pn,{size:22,name:"view"}),an.jsx(gr,{size:"m",weight:"bold",children:jr(d)})]})]}),i?.cover&&a===lr.DESKTOP&&an.jsx(Tr,{...i,...i.caption&&{caption:{size:"small",...i.caption}},className:"c-card-most__img",defaultFormat:"small"===c?"72x46":"150x95",enableHD:!0,alt:t,ml:"small"===c?"xs":"m"})]})},Rr=({title:e,summary:t,cardTitleProps:n,cardImageProps:r,link:i,layout:o,directedBy:a,castings:s,genres:l,releaseDate:c,seeMoreLink:u,reviewLink:d,rating:h,containerSpacing:p,...f})=>{const m=an.jsxs(an.Fragment,{children:[d&&an.jsx(nr,{buttonColor:"primary",...d}),an.jsx(nr,{buttonColor:"primary",variant:"outlined",...u})]}),g=a||s||h?an.jsx(Xn,{alignContent:"end",mt:"l",children:an.jsxs(Xn,{gap:"xxs-2",direction:"column",flexGrow:1,bg:"grey-100",px:"s",py:"xs",children:[a&&an.jsxs("div",{children:[an.jsxs(gr,{as:"span",weight:"bold",children:["Réalisé par :"," "]}),an.jsx("span",{children:a})]}),(s??[]).length>0&&an.jsxs("div",{children:[an.jsxs(gr,{as:"span",weight:"bold",children:["Avec :"," "]}),an.jsx("span",{children:s?.join(", ")})]}),h&&an.jsxs(Xn,{alignItems:"center",gap:"xxs",children:[an.jsxs(gr,{as:"span",weight:"bold",children:["La note 20 Minutes :"," "]}),an.jsx(or,{rating:h,iconProps:{size:19}})]})]})}):null;return an.jsxs(Er,{...f,className:"c-card-movie",direction:"column",children:[an.jsxs(Xn,{direction:"row",gap:{xs:"m",md:"l"},...p,children:[an.jsxs("div",{className:"c-card-movie__side",children:[r&&an.jsx(Tr,{...r,radius:"xs",alt:e,defaultFormat:"200x271",formats:["200x271","400x542"],sizes:"200px"}),o===lr.DESKTOP&&an.jsx(Xn,{direction:"column",gap:"xs",mt:"xs",children:m})]}),an.jsxs(Xn,{direction:"column",justifyContent:"between",className:"c-card-movie__content",children:[an.jsxs(Xn,{direction:"column",flexGrow:1,children:[an.jsx(Lr,{as:"h2",size:"s",fontFamily:"source-serif-pro",weight:"bold",...n,children:an.jsx("a",{href:i,children:e})}),an.jsxs(gr,{mt:"xxs-2",size:"s",children:[an.jsxs(gr,{as:"span",weight:"bold",children:["Sortie :"," "]}),an.jsx("span",{children:c}),l&&l.length>0&&an.jsxs(an.Fragment,{children:[" ",an.jsx(Rn,{size:"xs"})," ",an.jsxs(gr,{as:"span",weight:"bold",children:["Genre :"," "]}),an.jsx("span",{children:l.join(", ")})]})]}),o===lr.DESKTOP&&t&&an.jsx(gr,{size:"m",mt:"xs",dangerouslySetInnerHTML:{__html:t}})]}),o===lr.DESKTOP&&g]})]}),o===lr.MOBILE&&t&&an.jsx(gr,{...p,size:"m",mt:"xs",dangerouslySetInnerHTML:{__html:t}}),o===lr.MOBILE&&an.jsxs(an.Fragment,{children:[g,an.jsx(Xn,{direction:"column",gap:"xs",mt:"l",mx:"auto",className:"c-card-movie__footer",children:m})]})]})},qr=({link:e,title:t,summaryProps:n,cardHeaderProps:r,cardTitleProps:i,cardImageProps:o,linkProps:a,...s})=>an.jsxs(Er,{...s,direction:"row",clickable:!0,gap:"xl",className:hn("o-lt-show",s.className),children:[an.jsx($n,{className:hn("o-lt-show__main"),children:o&&an.jsx(Tr,{...o,formats:["480x308","346x222"],defaultFormat:"480x308",sizes:"(min-width: 1024px) 480px, (min-width: 480px) 346px",alt:t})}),an.jsxs(Xn,{direction:"column",justifyContent:"between",className:hn("o-lt-show__aside"),children:[an.jsxs(Xn,{direction:"column",children:[r&&an.jsx(kr,{...r,rightSubheader:void 0,mb:"xxs-2"}),an.jsx(Lr,{as:"h2",size:"m",pb:"xxs",weight:"bold",cartridgeIsCentered:!0,...i,children:an.jsx("a",{href:e,children:t})}),an.jsx(gr,{size:"xl",fontFamily:"source-serif-pro",color:n?.color||"grey-600",...n,children:n?.children})]}),an.jsx(Xn,{mt:"s",children:an.jsx(nr,{buttonColor:"primary",...a})})]})]}),zr=({className:e,...t})=>an.jsx($n,{className:hn("c-card-skeleton__block",e),bg:"grey-200",...t}),Hr=e=>an.jsxs(Er,{...e,direction:"column",gap:"xxs",children:[an.jsx(zr,{className:"c-card-skeleton__block--image"}),an.jsx(zr,{className:"c-card-skeleton__block--meta"}),an.jsx(zr,{className:"c-card-skeleton__block--title"}),an.jsx(zr,{className:"c-card-skeleton__block--subtitle"})]}),Kr=e=>an.jsx(Er,{...e,direction:"column",className:hn("c-card-skeleton",e.className),children:an.jsxs(Xn,{gap:"xs",children:[an.jsxs(Xn,{direction:"column",gap:"xxs",flexGrow:1,children:[an.jsx(zr,{className:"c-card-skeleton__block--meta"}),an.jsx(zr,{className:"c-card-skeleton__block--title"}),an.jsx(zr,{className:"c-card-skeleton__block--subtitle"})]}),an.jsx(zr,{className:"c-card-skeleton__block--image"})]})}),Ur=({variant:e,className:t,...n})=>{const r=hn("c-card-skeleton",{[`c-card-skeleton--${e}`]:e},t);return"medium"===e?an.jsx(Hr,{...n,className:r}):an.jsx(Kr,{...n,className:r})},Vr=({link:e,title:t,cardHeaderProps:n,cardTitleProps:r,cardImageProps:i,summaryProps:o,layout:a,variant:s="default",...l})=>{const{cardFooterProps:c,signatureProps:u,socialBarProps:d,...h}=l,p=an.jsxs(an.Fragment,{children:[i&&an.jsx(Tr,{sizes:"(min-width: 480px) 252px, 160px",defaultFormat:a===lr.DESKTOP?"252x162":"160x102",formats:["252x162","160x102"],alt:t,mb:"title-on-image"===s?"0":"xxs",withShadow:"title-on-image"===s,...i,...i.caption&&{caption:{size:a===lr.DESKTOP?"medium":"small",...i.caption}}}),n&&an.jsx(kr,{mb:"xxs-2",...n}),an.jsx(Lr,{as:"h4",className:hn("c-card-small__title",{"c-card-small__title--is-on-image":"title-on-image"===s}),size:"xxs-2",fontFamily:"source-serif-pro",cartridgeIsCentered:!0,...r,children:"title-on-image"===s?t:an.jsx("a",{href:e,children:t})}),o&&an.jsx(gr,{...o,size:{xs:"s",md:"m"},mt:"xxs-3",className:"c-card-small__summary",children:o.children})]});return an.jsx(Er,{...h,direction:"column",clickable:!0,children:"title-on-image"===s?an.jsx("a",{href:e,children:p}):p})},Qr=({link:e,title:t,cardImageProps:n,...r})=>an.jsx($n,{...r,as:"a",href:e,className:hn("c-card-container","c-card-container--with-opacity-hover","c-card-container--clickable"),children:n&&an.jsx(Tr,{...n,defaultFormat:"196x234",formats:["196x234"],radius:"xxs",title:t,alt:t})}),Wr=({link:e,title:t,cardImageProps:n,layout:r,...i})=>an.jsx($n,{...i,as:"a",href:e,className:hn("c-card-container","c-card-container--with-opacity-hover","c-card-container--clickable"),children:n&&an.jsx(Tr,{sizes:"(min-width: 480px) 183px, 223px",...n,defaultFormat:r===lr.DESKTOP?"183x215":"223x262",formats:["183x215","223x262"],alt:t})}),Gr=({title:e,summaryProps:t,cardTitleProps:n,link:r,linkProps:i,location:o,...a})=>an.jsxs(Er,{...a,direction:{xs:"column",md:"row"},gap:"l",alignItems:{xs:"baseline",md:"center"},children:[an.jsxs(er,{grow:1,children:[o&&an.jsxs(Xn,{color:"ultramarine",children:[an.jsx(Pn,{name:"local",size:13,mr:"xxs-2",mb:"xxs-2"}),an.jsx(gr,{size:"xxs",weight:"bold",textTransform:"uppercase",children:o})]}),e&&an.jsx(Lr,{size:"xxs-2",fontFamily:"base",...n,children:e}),t&&an.jsx(gr,{...t,as:"span",color:"grey-400",size:"m",children:t.children})]}),an.jsx(nr,{...i,buttonColor:"primary",href:r,whiteSpace:"nowrap",children:i.children})]}),Zr=({link:e,title:t,summaryProps:n,cardHeaderProps:r,cardTitleProps:i,cardImageProps:o,socialBarProps:a,layout:s,...l})=>{const{cardFooterProps:c,signatureProps:u,...d}=l;return an.jsxs(Er,{...d,direction:"column",className:"c-card-with-summary",clickable:!0,children:[an.jsxs(Xn,{mb:"xs",className:"c-card-with-summary__content",gap:"xs",children:[an.jsxs(er,{grow:1,children:[r&&an.jsx(kr,{...r,mb:"xxs-2"}),an.jsx(Lr,{size:{xs:"xxs-2",md:"xs"},fontFamily:"source-serif-pro",cartridgeIsCentered:!0,...i,children:an.jsx("a",{href:e,children:t})}),s===lr.DESKTOP&&n&&an.jsx(gr,{...n,as:"span",size:"m",fontFamily:"source-serif-pro",children:n.children})]}),an.jsx("div",{children:o&&an.jsx(Tr,{...o,...o.caption&&{caption:{size:"small",...o.caption}},className:"c-card-with-summary__image",defaultFormat:"150x90",alt:t,mb:"xs"})})]}),a&&an.jsx(Ei,{...a,variant:"card",className:hn("u-relative u-relative--z-index-2","c-card-with-summary__social-bar")})]})},Yr=({articles:e,layout:t,label:n,description:r,labelLink:i,iconProps:o,headingProps:a,sliderProps:s,themeColor:l,titleUnderlined:c=!0,isSponsored:u,seeMoreLink:d,...h})=>{const p=e=>{switch(s?.sliderVariant){case"videos":return an.jsx(Wr,{...e});case"vertical-cards":return an.jsx(Qr,{...e});default:return an.jsx(Vr,{...e,layout:t,...e.cardHeaderProps&&{cardHeaderProps:{...u&&{color:"grey-500"},...e.cardHeaderProps}},cardTitleProps:{weight:"semi-bold",maxRows:5,...u&&{color:"grey-900"},...e.cardTitleProps},...e.cardImageProps&&{cardImageProps:{sizes:"(min-width: 1840px) 267px, (min-width: 1440px) calc(4.74vw + 181px), (min-width: 1120px) 235px, (min-width: 780px) 20.94vw, calc(50vw - 25px)",...e.cardImageProps}}})}},f=an.jsx(gi,{label:n||"",mb:(o?"0":(!c||u)&&"m")||"xxl",labelLink:i,themeColor:l,isUnderlined:c,...u&&{color:"grey-900"},...a});return e.length>0?an.jsxs($n,{as:"section",...h,className:hn("c-carousel",h?.className),bg:u?"sponsoring":void 0,py:u?"m":void 0,children:[n&&!o&&f,n&&o&&an.jsxs(Xn,{as:"header",direction:{xs:"column-reverse",md:"row"},justifyContent:"between",alignItems:{xs:"start",md:"end"},mx:{xs:"m",md:"0"},mb:{xs:"l",md:"0"},gap:{xs:"xs",md:"0"},children:[f,an.jsx(Pn,{...o})]}),u&&an.jsx(gr,{as:$n,size:"xs",color:"grey-900",mb:"xs",children:"Articles sponsorisés"}),t===lr.DESKTOP&&r&&an.jsx(gr,{size:"m",color:"grey-400",mb:"xl",...r,className:r.className,children:r.children}),an.jsx(ur,{...s,sliderVariant:s?.sliderVariant||"rubrics",itemsGap:"videos"===s?.sliderVariant?"l":"xs",layout:t,children:e.map(t=>an.jsx(er,{as:"article",grow:0,shrink:0,align:"start",className:hn(`c-carousel__${s?.sliderVariant&&["videos","vertical-cards","sport","movies"].includes(s?.sliderVariant)?s?.sliderVariant:"article"}`,{[`c-carousel__${s?.sliderVariant&&["videos","vertical-cards","movies"].includes(s?.sliderVariant)?s?.sliderVariant:"article"}--in-long-list`]:"sport"!==s?.sliderVariant&&e.length>4,"c-carousel__sport--in-long-list":"sport"===s?.sliderVariant&&e.length>5}),children:p(t)},t.title))}),d&&an.jsx(Xn,{justifyContent:"center",mt:"xl",children:an.jsx(nr,{buttonColor:"primary",variant:"outlined",...d})})]}):null},Jr=({citationText:e,citationAuthor:t,...n})=>an.jsxs($n,{...n,as:"blockquote",color:"ultramarine",className:"c-citation",children:[an.jsxs(gr,{fontFamily:"source-serif-pro",italic:!0,size:"l",weight:"regular",className:"c-citation__content",children:[an.jsx(gr,{as:"span",size:"xxl",weight:"bold",children:"« "}),e,an.jsx(gr,{as:"span",size:"xxl",weight:"bold",children:" »"})]}),t&&an.jsx(gr,{as:"footer",mt:{xs:"m",md:"xl"},size:"m",weight:"bold",className:"c-citation__footer",children:t})]}),$r=Tn(({index:t,textTitleProps:n,headingTitleProps:r,titleIconProps:i,isOpen:o,contentWithBorder:a=!0,contentProps:s,iconProps:l,btnProps:c,children:u,isDropdown:d,...h},p)=>{const f=e.useId().replace(/:/g,""),m=`c-collapse__button-${t}-${f}`,g=`c-collapse__content-${t}-${f}`;return an.jsxs($n,{...h,className:hn("c-collapse js-collapse",{"c-collapse--dropdown":d}),ref:p,children:[an.jsxs($n,{...c,as:"button",type:"button",id:m,pl:c?.pl||"l",py:c?.py||"xxs",className:hn("c-collapse__button js-collapse__button",c?.className),"aria-controls":g,"aria-expanded":o||"false",children:[i?an.jsxs(Xn,{as:"span",alignItems:"center",children:[an.jsx(Pn,{size:34,mr:"xs",...i}),n?.children]}):(()=>{if(r){const{children:e,...t}=r;return an.jsx(gr,{as:"span",size:"m",color:"black",...t,children:e})}const{as:e,children:t,...i}=n??{};return an.jsx(gr,{as:"span",size:"l",color:"black",...i,children:t})})(),an.jsx(Pn,{name:"chevron",size:16,...l,className:hn("c-collapse__icon",l?.className)})]}),an.jsx(Xn,{...s,direction:"column",p:s?.p||"xl",id:g,"aria-hidden":o?!o:"true","aria-labelledby":m,className:hn("c-collapse__content",{"c-collapse__content--with-border":a}),children:u})]})}),Xr=({layout:e,searchFormProps:t,title:n,titleHref:r,breadcrumbProps:i,selectProps:o,variant:a,isOpen:s=!0,hasTopBorder:l=!1})=>{const c=an.jsx(Nn,{variant:"ghost",iconProps:{name:"chevron",color:"white",size:18},id:"js-search-banner-expand-button",className:"c-search-banner__expand-button"}),u=o&&an.jsx(sr,{...o,defaultValue:o?.options.find(e=>e.isSelected)?.value,containerProps:{...o?.containerProps,px:{xs:"m",md:"0"}}}),d=an.jsx(Xn,{mt:{xs:"0",md:"xs"},gap:{xs:"xs",lg:"m"},className:hn("c-search-banner__breadcrumb",{"c-search-banner__breadcrumb--mobile":e===lr.MOBILE}),"data-search-banner-collapse":!0,...e===lr.DESKTOP&&{"aria-hidden":s?!s:"true"},children:i?.map(({label:e,link:t},n)=>an.jsx(fr,{variant:"tertiary",py:"xxs-2",px:"l",ml:0===n?{xs:"m",md:"0"}:void 0,href:t,children:e},t))}),h=!u;return an.jsx($n,{bg:"ultramarine",py:{xs:"xxs",md:"0"},className:hn("c-search-banner",{"c-search-banner--has-top-border":l}),children:e===lr.DESKTOP?an.jsxs(Xn,{px:h?void 0:"m",gap:{xs:"m",lg:"l"},"aria-expanded":s||"false","data-search-banner-expanded-source":!0,className:hn({"o-page-wrap":h,"c-search-banner__large-container":!h}),pt:h?"0":void 0,children:["municipales-2026"===a?an.jsx("div",{className:hn("c-search-banner__name",{"c-search-banner__name--is-hidden-under-xl":u}),children:an.jsxs(gr,{as:r?"a":"span",weight:"bold",className:"u-relative",...r?{href:r}:{},children:["Élections municipales"," ",an.jsx(gr,{as:"span",weight:"regular",children:"2026"}),an.jsx("span",{className:"c-search-banner__flag"})]})}):an.jsx(Pn,{name:"ballot-box",size:55,className:"c-search-banner__default-icon"}),an.jsxs(Xn,{flexGrow:1,direction:"column",py:"m",children:[an.jsxs(Xn,{gap:{xs:"m",lg:"l"},justifyContent:"end",children:[an.jsx(er,{grow:1,children:an.jsx($n,{as:mi,...t})}),!!o?.options.length&&u,!!i?.length&&c]}),!!i?.length&&d]}),"municipales-2026"===a&&u&&an.jsx("span",{className:"c-search-banner__flag c-search-banner__flag--at-the-bottom"})]}):an.jsxs(Xn,{justifyContent:"center",direction:"column","aria-expanded":s||"false","data-search-banner-expanded-source":!0,children:[n&&an.jsx(gr,{as:"span",px:"m",weight:"bold",color:"white",mb:"xxs",children:r?an.jsx("a",{href:r,children:n}):n}),an.jsxs(Xn,{gap:"s",px:{xs:"m",md:"0"},children:[an.jsx(er,{as:mi,grow:1,...t}),!(!i?.length&&!o?.options.length)&&c]}),!(!i?.length&&!o?.options.length)&&an.jsxs(Xn,{direction:"column",gap:"xxs",mt:"xxs","aria-hidden":s?!s:"true","data-search-banner-collapse":!0,children:[!!i?.length&&d,!!o?.options.length&&u]}),"municipales-2026"===a&&an.jsx("span",{className:"c-search-banner__flag c-search-banner__flag--at-the-bottom"})]})})},ei=({label:e,heading:t,source:n,subtitle:r,isExpandable:i=!1,contentProps:o,embedButton:a,...s})=>{const l=an.jsx(gr,{color:"grey-400",size:"xs",mt:a?void 0:"xxs",mx:a?void 0:{xs:"m",md:"0"},children:n});return an.jsxs($n,{as:"header",...s,className:hn("c-nodeheader",{"c-nodeheader--is-expandable":i},s?.className),children:[an.jsx(zn,{color:"grey-400",size:"xs",mx:{xs:"m",md:"0"},children:e}),an.jsx(mr,{...t,size:{xs:"xxs",md:"m"},fontFamily:"obviously",mx:{xs:"m",md:"0"},children:t.children}),n&&(a?an.jsxs(Xn,{alignItems:"center",mt:"xxs",mx:{xs:"m",md:"0"},children:[l,an.jsx(On,{...a,variant:"ghost",iconProps:{name:"embed",size:20,color:"grey-200"},size:"tiny",ml:"xs"})]}):l),r&&an.jsxs(an.Fragment,{children:[an.jsx(gr,{...o,as:"div",size:o?.size||{xs:"m",md:"l"},mx:{xs:"m",md:"0"},mt:"xs",className:"c-nodeheader__subtitle c-content c-content--resume js-expand-target","aria-hidden":i,children:r}),i&&an.jsxs(Nn,{variant:"ghost",className:"c-nodeheader__btn js-expand-button","aria-expanded":"false",mt:"xs",mx:{xs:"m",md:"0"},children:[an.jsx(Pn,{isRounded:!0,name:"chevron",size:12,p:"xs",bg:"grey-100"}),an.jsx(gr,{as:"span",size:"xs",className:"js-expand-button__label",children:"Voir plus"})]})]})]})},ti=({children:e,iconProps:t,isCentered:n,sponsor:r,...i})=>an.jsx(mr,{className:hn("c-header-title",{"c-header-title--has-icon":t||r,"c-header-title--has-icon-and-centered":(t||r)&&n}),fontFamily:"obviously",size:{xs:"l",md:"xxl"},...i,children:t||r?an.jsxs(an.Fragment,{children:[t&&an.jsx(Pn,{className:"c-header-title__icon",mr:"xxs",...t}),r&&an.jsx($n,{as:"img",className:"c-header-title__sponsor",mr:"xxs",src:r.logoUrl,alt:r.name}),an.jsx("span",{className:"c-header-title__text-with-icon",children:e})]}):e}),ni=({items:e,...t})=>{const n=e=>an.jsx(gr,{size:"xs",weight:"bold",mb:"xs",children:e});return an.jsx(tr,{as:"ul",...t,colsNumber:{xs:1,md:3},className:"c-legend",children:e.map((e,t)=>an.jsxs(Xn,{as:"li","data-color":e.color,gap:"s",pr:{xs:void 0,md:t%3!=2?"m":void 0},pt:{xs:t>0?"m":void 0,md:t>2?"m":"0"},className:"c-legend__item",children:[an.jsx(Pn,{name:"dot",size:12,mt:"xxs-3",className:hn("c-legend__dot",{[`c-legend__dot--${e.color}`]:e.color})}),e.subLegend?an.jsxs("div",{children:[n(e.name.toUpperCase()),an.jsx(gr,{color:"grey-400",weight:"bold",children:e.subLegend})]}):n(e.name.toUpperCase())]},e.name))})},ri=({variant:e,isOver:t=!1,updatedAt:n,timeSlot:r,...i})=>"elections"===e&&t?null:an.jsxs(Xn,{...i,alignItems:"center",className:"c-live-indicator",children:[an.jsx(zn,{bg:"red",color:"white",hasDot:"elections"!==e,mr:"s",size:{xs:"xxs",md:"xs"},children:("elections"===e?"estimations":"tv"===e&&"en direct")||"live"}),an.jsx(Pn,{name:"clock",size:15,color:"tv"===e&&(r?.color||"grey-500")||"live"===e&&t&&"grey-300"||"red",mr:"xxs",className:hn("c-live-indicator__icon",{"c-live-indicator__text--over":t})}),an.jsx(gr,{size:"xs",color:r&&(r.color||"grey-500")||t&&"grey-300"||"red",className:hn("c-live-indicator__text",{"c-live-indicator__text--over":t}),children:r?.children||t&&"Terminé"||`Mis à jour ${n}`})]}),ii=({question:e,author:t,response:n,...r})=>an.jsxs($n,{...r,className:"c-live-talk",children:[an.jsxs($n,{bg:"grey-100",p:"s",mb:"xl",radius:"m",className:"c-live-talk__question",children:[an.jsx(gr,{color:"grey-600",mb:"s",fontFamily:"source-serif-pro",size:"l",dangerouslySetInnerHTML:{__html:e}}),an.jsx(gr,{color:"black",weight:"bold",size:"xs",children:t})]}),n&&an.jsx(gr,{color:"grey-600",fontFamily:"source-serif-pro",size:"l",children:n})]}),oi=({status:e,header:t,title:n,img:r,...i})=>an.jsxs($n,{as:"header",...i,children:[an.jsxs(Xn,{gap:"xs",alignItems:"center",mb:"xs",children:[an.jsx(gr,{size:"xl",fontFamily:"source-serif-pro",weight:"semi-bold",children:t}),r&&an.jsx("img",{alt:r.name,src:r.src,width:"32",height:"32"})]}),an.jsx(mr,{as:"h2",color:{crucial:"red",important:"ultramarine",community:"entertainment",faq:"black",default:"black",bold:"black"}[e]||"black",size:"xs",fontFamily:"source-serif-pro",weight:"default"===e?"regular":"semi-bold",className:"break-word",children:n})]}),ai=({electionName:e,electionYear:t,resultsPerDepartment:n,mapDepartmentsData:r,...i})=>{const o=n.reduce((e,t)=>{const{name:n,color:r}=t.politicalParty;return e.some(e=>e.name===n)||e.push({name:n,color:r}),e},[]);return an.jsxs($n,{...i,children:[an.jsxs("svg",{className:"c-map-departments",viewBox:"0 0 525 600",width:"525",children:[an.jsx("title",{children:"Carte des départements français avec DOM"}),an.jsx("desc",{children:"Carte des résultats département par département. Cliquez sur un département pour en voir le détail"}),Object.entries(r??{}).map(([r,i])=>{const o=n.find(e=>e.numDept===r);return an.jsx("g",{children:an.jsxs("a",{className:"c-map-departments__link",href:`/elections/resultats/${i.slug}/?scrutin=${e}&annee=${t}`,target:"_parent",children:[an.jsx("path",{className:hn("c-map-departments__path",{[`c-map-departments__path--${o?.politicalParty.color}`]:o}),d:i.path,children:an.jsx("title",{children:i.title})}),i.path_s&&an.jsx("path",{className:hn("c-map-departments__path",{[`c-map-departments__path--${o?.politicalParty.color}`]:o}),d:i.path_s,children:an.jsx("title",{children:i.title})})]})},r)})]}),o.length>0&&an.jsx(ni,{items:o,mt:"xxl"})]})},si=({electionName:e,electionYear:t,resultsPerDistrict:n,mapDistrictsData:r,...i})=>{const o=["75","77","78","91","92","93","94","95"],a=Object.entries(r??{}).reduce((r,[i,a])=>{const s=an.jsx("g",{className:"c-map-districts__zoomable",type:"button",...a.text&&!a.text.transform&&a.text.label&&{"data-info":`${i} - ${a.text.label}`},children:Object.entries(a).map(([r,i])=>{const o=n.find(e=>e.numDistrict===r);return"text"===r&&i.transform?an.jsx("text",{transform:`matrix(${i.transform})`,className:"c-map-districts__text",children:i.label},r):an.jsx("a",{href:`/elections/resultats${i.url}/?scrutin=${e}&annee=${t}`,target:"_parent",children:an.jsxs("path",{id:r,className:hn("c-map-districts__path",{[`c-map-districts__path--${o?.politicalParty.color}`]:o}),d:i.path,children:[an.jsx("title",{children:i.title}),an.jsx("desc",{children:i.desc})]})},r)})},i);return o.includes(i)?r.idf.push(s):r.others.push(s),r},{idf:[],others:[]}),s=n.reduce((e,t)=>{const{name:n,color:r}=t.politicalParty;return e.some(e=>e.name===n)||e.push({name:n,color:r}),e},[]);return an.jsxs($n,{...i,children:[an.jsxs("div",{className:"c-map-districts-container",children:[an.jsxs(gr,{weight:"bold",textAlign:"center",className:"c-map-districts-container__description",children:["Cliquez sur un département",an.jsx("br",{}),"puis une circonscription pour accéder aux résultats"]}),an.jsx(fr,{variant:"span",color:"ultramarine",className:"c-map-districts-container__department u-hidden"}),an.jsx(Nn,{iconProps:{name:"close",size:15},variant:"close",className:"c-map-districts-container__unzoom-button u-hidden"}),an.jsxs("svg",{className:"c-map-districts js-selected-area",viewBox:"0 0 1400 1400",width:"1400",children:[an.jsx("title",{children:"Carte des circonsciptions"}),an.jsx("g",{type:"button",className:"c-map-districts__zoomable c-map-districts__idf",children:a.idf}),a.others]})]}),s.length>0&&an.jsx(ni,{items:s,mt:"xxl"})]})},li=({electionName:e,electionYear:t,resultsPerCountry:n,mapEuCountriesData:r,mapNonEuCountriesData:i,...o})=>{const a=n.reduce((e,t)=>{const{name:n,color:r}=t.politicalParty;return e.some(e=>e.name===n)||e.push({name:n,color:r}),e},[]);return an.jsxs($n,{...o,children:[an.jsxs("svg",{className:"c-map-europe",width:"460",viewBox:"0 0 460 445",children:[an.jsx("title",{children:`Carte de l'Europe - Élections ${e}`}),an.jsx("desc",{children:`Carte des résultats aux élections ${e} ${t} par pays`}),an.jsx("g",{className:"c-map-europe__eu-countries",children:Object.entries(r??{}).map(([e,t])=>{const r=n.find(t=>t.key===e);return an.jsx("path",{d:t.path,className:hn("c-map-europe__path",{[`c-map-europe__path--${r?.politicalParty.color}`]:r}),children:an.jsx("title",{children:t.title})},e)})}),an.jsx("g",{className:"c-map-europe__non-eu-countries",children:Object.entries(i??{}).map(([e,t])=>an.jsx("path",{d:t.path,className:"c-map-europe__path c-map-europe__path--non-eu-country",children:an.jsx("title",{children:t.title})},e))})]}),a.length>0&&an.jsx(ni,{items:a,mt:"xxl"})]})},ci=/<path\b([^>]*?)\/>/g,ui=/\b([:\w-]+)="([^"]*)"/g,di=e=>`/elections/resultats/${(e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/'/g,"-").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase())(e)}/`,hi=({layout:t,resultsPerTown:n,departmentsPaths:r,dromsConfig:i,townsSprite:o,className:a,...s})=>{if(!r)return an.jsx("output",{"aria-live":"polite",children:"Chargement de la carte…"});const l=t===lr.MOBILE,c=new Map(n.map(e=>[e.id,e])),u=new Map,d=e.useMemo(()=>o?(e=>new Map(e.map(e=>[e.id,e])))((e=>{const t=[];for(const n of e.matchAll(ci)){const e=n[1];if(!e)continue;const r=new Map;for(const t of e.matchAll(ui)){const[,e,n]=t;e&&r.set(e,n||"")}const i=r.get("id"),o=r.get("d"),a=r.get("data-name"),s=r.get("data-url");!i||!o||!a||!s||t.push({id:i,path:o,name:a,url:s})}return t})(o)):new Map,[o]),h=e.useMemo(()=>new Map(vn.map(e=>{const t=d.get(`town-${e.id}`);return t?[e.name,t.url]:null}).filter(e=>null!==e)),[d]);n.forEach(e=>{const{name:t,color:n}=e.politicalParty;u.has(t)||u.set(t,{name:t,color:n})});const p=e=>{const t=h.get(e.label);return an.jsxs("div",{className:"c-map-towns__zoom-item",role:"group","aria-label":`Zoom sur les arrondissements de ${e.label}`,"data-city-url":l?t:void 0,children:[an.jsx(gr,{as:"div",size:"xs",weight:"bold",pb:"xxs",children:e.label}),an.jsxs("svg",{viewBox:e.viewBox,className:"c-map-towns__zoom-map",children:[an.jsxs("title",{children:["Arrondissements de ",e.label]}),an.jsx("g",{children:e.ids.map(e=>{const t=c.get(e),n=d.get(`town-${e}`);return n?an.jsx("g",{role:"button","aria-label":`Arrondissement ${e}`,onClick:()=>{l||(window.location.href=n.url)},children:an.jsx("path",{d:n.path,className:hn("c-map-towns__path c-map-towns__path--borough",{[`c-map-towns__path--${t?.politicalParty.color}`]:t})})},`zoom-${e}`):null})})]})]})},f=Array.from(u.values());return an.jsxs($n,{...s,className:hn("c-map-towns",a,{"c-map-towns--is-mobile":l}),children:[o&&an.jsx("script",{id:"js-town-sprite-data",className:"c-map-towns__sprite",type:"application/json",dangerouslySetInnerHTML:{__html:JSON.stringify(o)}}),an.jsxs("svg",{viewBox:"0 0 525 488",className:"c-map-towns__map",role:"img","aria-label":"Carte des résultats électoraux par commune en France métropolitaine",children:[an.jsx("g",{className:"c-map-towns__layer-bg","aria-hidden":"true",children:Object.entries(r).map(([e,t])=>an.jsx("path",{d:t.path,className:"c-map-towns__dept-bg"},`bg-${e}`))}),an.jsx("g",{className:"c-map-towns__layer-towns",children:n.map(e=>{const t=d.get(`town-${e.id}`);return t?an.jsx("path",{d:t.path,"data-town-id":`town-${e.id}`,"data-url":t.url,"data-name":t.name,className:hn("c-map-towns__path",{[`c-map-towns__path--${e?.politicalParty.color}`]:e})},e.id):null})}),an.jsx("g",{className:"c-map-towns__layer-departments","aria-hidden":"true",children:Object.entries(r).map(([e,t])=>{const n=bn[e];return an.jsx("path",{id:`out-${e}`,d:t.path,"data-name":n,"data-url":l?di(n):void 0,className:"c-map-towns__dept-trigger",children:an.jsx("title",{children:n})},`out-${e}`)})}),an.jsx("g",{className:"c-map-towns__layer-markers",children:vn.map(e=>(()=>{const t=d.get(`town-${e.id}`);return t?an.jsxs("g",{className:"js-city-marker c-map-towns__city-marker","data-url":t.url,"data-name":e.name,"aria-hidden":"true",children:[an.jsx("path",{d:t.path,className:"js-city-anchor c-map-towns__city-anchor"}),an.jsx("circle",{r:"5",fill:"white",stroke:"black",strokeWidth:"1"}),an.jsx("rect",{className:"js-city-bg",fill:"white",rx:"4",ry:"4"}),an.jsx("text",{className:"js-city-text c-map-towns__city-text",fill:"black",children:e.name})]},e.name):null})())})]}),an.jsxs(Xn,{className:"c-map-towns__zooms",direction:{xs:"row",md:"column"},gap:{md:"l"},justifyContent:{xs:"between",md:"start"},children:[p(An.PARIS),p(An.MARSEILLE),p(An.LYON)]}),i&&an.jsxs("div",{className:"c-map-towns__droms",children:[an.jsx(gr,{as:"div",size:"xs",weight:"bold",pb:"xxs",children:"Outre-mer"}),an.jsx(Xn,{gap:{md:"xl"},wrap:"wrap",justifyContent:{xs:"between",md:"start"},children:Object.entries(i).map(([e,t])=>an.jsx("div",{children:an.jsxs("svg",{className:"c-map-towns__map-drom",viewBox:t.viewBox,children:[an.jsx("title",{children:t.name}),an.jsx("path",{d:t.deptPath,className:"c-map-towns__layer-bg c-map-towns__dept-bg"}),an.jsx("g",{className:"c-map-towns__layer-towns",children:t.towns.map(e=>{const t=c.get(e.id.replace(/^town-/,""));return an.jsx("path",{id:`${e.id}-drom`,d:e.path,"data-url":e.url,"data-name":e.name,className:hn("c-map-towns__path c-map-towns__path--drom",{[`c-map-towns__path--${t?.politicalParty.color}`]:t})},e.id)})}),an.jsx("path",{id:`out-${e}`,d:t.deptPath,"data-name":t.name,"data-url":di(t.name),className:"c-map-towns__dept-trigger"})]})},e))})]}),f.length>0&&an.jsx(ni,{items:f,mt:"xxl"}),an.jsxs("div",{id:"js-zoom-overlay",className:"c-map-towns__overlay","aria-hidden":"true",children:[an.jsxs("button",{id:"js-zoom-close",className:"c-map-towns__close-btn",type:"button",children:[an.jsx(Pn,{name:"close",size:20}),"Fermer"]}),an.jsxs(Xn,{id:"js-zoom-content",direction:"column",alignItems:"center",className:"c-map-towns__zoom-content",children:[an.jsx(gr,{as:"div",weight:"bold",size:"l",id:"js-zoom-label",className:"c-map-towns__zoom-label",children:" "}),an.jsxs("svg",{id:"js-zoom-svg",className:"c-map-towns__zoom-svg",viewBox:"0 0 525 488","aria-hidden":"true",role:"img",children:[an.jsx("title",{id:"js-zoom-title",children:"Carte détaillée du département"}),an.jsx("g",{id:"js-zoom-group",className:"c-map-towns__zoom-group"})]})]})]})]})},pi=({totalArticles:e,currentPage:t,pagePath:n,archivesUrl:r,...i})=>e>0?an.jsxs(Xn,{justifyContent:"center",gap:"l",...i,children:[1===Number(t)?1:an.jsx(nr,{color:"grey-300",href:`${n}`,children:"1"}),e>17&&(2===Number(t)?2:an.jsx(nr,{color:"grey-300",href:`${n}?page=2`,children:"2"})),e>25&&1!==Number(t)&&an.jsx(nr,{color:2!==Number(t)?"black":"grey-300",href:r,children:"Archives"})]}):null,fi=({color:e,count:t=0,countColor:n,countBg:r,countStyle:i,iconItemProps:o,placement:a="right",reactListItems:s,reactListItemThemeColor:l,userReaction:c,variant:u,layout:d,contentId:h,contentLegacyId:p,...f})=>{const m=an.jsx(Xn,{as:"ul",direction:"row-reverse",alignItems:"center",className:"c-react-button__list",children:s?.sort((e,t)=>t.count-e.count).map((e,t)=>an.jsx($n,{as:"li",className:hn("c-react-button__list-item",{"c-react-button__list-item--show":e.count>0&&t<=1}),bg:"grey-100","data-reaction-item":e.type,children:an.jsx(gr,{as:"span",size:"xxs",children:yn[e.type]})},e.type))});return an.jsxs(Xn,{...f,gap:"xxs-2",alignItems:"center",role:"button","data-placement":a,className:hn("mbrs-social-react-container","c-react-button",{[`c-react-button--${u}`]:u,[`c-react-button--${l}`]:l},f.className),...s&&s.length>0&&s.reduce((e,t)=>(e[`data-content-${t.type}`]=t.count,e),{}),...c&&{"data-user-reaction":c.type,"data-user-reaction-id":c.id},children:[an.jsx(Ir,{className:"c-react-button__icon",...(()=>{switch(u){case"horizontal":case"vertical":return{color:e,count:t,countColor:n,countBg:r,countStyle:i};default:return{}}})(),...o,ariaLabel:"Reagir au contenu",iconProps:{name:"thumb","aria-hidden":!0,...(()=>{switch(u){case"horizontal":case"vertical":return{size:26};default:return{size:20}}})()},"aria-describedby":d===lr.DESKTOP?`react-tooltip-${p||h}`:void 0,children:d===lr.DESKTOP&&an.jsx(Mn,{id:`react-tooltip-${p||h}`,text:"Réagir"})}),"card"===u&&an.jsxs(an.Fragment,{children:[m,an.jsx(gr,{as:"span",size:"xxs",color:e,className:hn("c-react-button__count",{"c-react-button__count--show":t>0}),children:String(t).padStart(2,"0")})]})]})},mi=({id:e,url:t,inputProps:n,autocompleteResults:r,ariaLabel:i,...o})=>an.jsxs($n,{...o,as:"form",autoComplete:r&&r.length>0?"off":"on",id:e,className:hn("c-search-form",o?.className),action:t,method:"GET",role:"search",children:[an.jsx("label",{htmlFor:`${e}-search`,className:"u-mask",children:i||n?.placeholder||"Recherche"}),an.jsx(qn,{id:`${e}-search`,className:"c-search-form__input",type:"text",placeholder:n?.placeholder||"Rechercher...",name:n?.name||"q",isIconButton:!0,icon:"search",iconButtonProps:{type:"submit",children:an.jsx("span",{className:"u-mask",children:"Ok"})},isRounded:n?.isRounded??!0,...n}),r&&r.length>0&&an.jsx("ul",{className:"c-search-form__autocomplete u-hidden",children:r.slice(0,8).map(e=>an.jsx("li",{children:an.jsx("a",{href:e.url,tabIndex:-1,children:e.value})},e.value))})]}),gi=({label:e,labelLink:t,themeColor:n,isUnderlined:r=!0,...i})=>an.jsxs(mr,{...t&&{as:"a",href:t},size:"xxs",weight:"bold",...i,className:hn("c-section-title",{"c-section-title--is-link":t}),children:[r?an.jsx(gr,{as:"span",role:"presentation",pb:"xxs",className:hn("c-section-title__underline",{"c-section-title__underline--default":!n,[`c-section-title__underline--${n}`]:n}),children:e}):e,t&&an.jsx(Pn,{name:"chevron",size:14,color:"ultramarine",mt:"xxs-2",ml:"xxs"})]}),yi=({avatars:e,authors:t,layout:n,publicationProps:r,publishedAt:i,editedAt:o,userlink:a,authorHighlighted:s=!1,disableAvatar:l=!1,themeColor:c,sponsor:u,...d})=>{const h=an.jsxs(Xn,{...d,as:"address",alignItems:"start",gap:"s",children:[!l&&an.jsx(Sr,{avatars:e,themeColor:c}),an.jsxs(er,{grow:1,align:i?"start":"center",children:[s?an.jsx("div",{children:an.jsx(gr,{as:"span",size:"s",weight:"bold",px:"xxs",bg:"sponsoring",color:"grey-900",children:t})}):an.jsx(gr,{size:"s",weight:"bold",children:t}),i&&an.jsxs(gr,{size:"xxs",color:"grey-400",mt:"xxs-2",...r,children:[an.jsxs("time",{children:["Publié le ",i]}),o&&an.jsxs("time",{children:[" • Mis à jour le ",o]})]})]}),u&&n===lr.MOBILE&&an.jsx(Ci,{sponsor:u,size:"xxs"})]});return a?an.jsx("a",{href:a,children:h}):h},vi=e=>e||null,Ai={role:"button",tabIndex:0,className:"c-social-bar-actions-modal__row","data-social-bar-action-row":"true"},bi=({dialogId:e,className:t,commentItem:n,shareItem:r,bookmarkItem:i,chatbotItem:o,reportItem:a})=>an.jsxs(rr,{variant:"right",dialogId:e,className:hn("c-social-bar-actions-modal",t),children:[an.jsx(On,{variant:"ghost",size:"tiny",iconProps:{name:"close",size:18},"data-a11y-dialog-hide":e,"aria-label":"Fermer la liste des actions",className:"c-social-bar-actions-modal__close-btn"}),an.jsxs(Xn,{as:"ul",direction:"column",mx:"m",mt:"xxl-2",gap:"m",children:[an.jsxs(Xn,{as:"li",gap:"m",alignItems:"center",...Ai,children:[vi(n),an.jsx(gr,{as:"span",size:"m",children:"Laisser un commentaire"})]}),an.jsxs(Xn,{as:"li",gap:"m",alignItems:"center",...Ai,children:[vi(r),an.jsx(gr,{as:"span",size:"m",children:"Partager l’article"})]}),an.jsxs(Xn,{as:"li",gap:"m",alignItems:"center",...Ai,children:[vi(i),an.jsx(gr,{as:"span",size:"m",children:"Sauvegarder l’article"})]}),an.jsxs(Xn,{as:"li",gap:"m",alignItems:"center",...Ai,children:[vi(a),an.jsx(gr,{as:"span",size:"m",children:"Signaler une faute"})]}),an.jsxs(Xn,{as:"li",gap:"m",alignItems:"center",...Ai,children:[vi(o),an.jsx(gr,{as:"span",size:"m",children:"Poser une question sur l’actualité"})]})]})]}),wi=e=>"card"===e?"secondary":"primary",xi=e=>"card"===e?"inline":"rounded",_i=e=>"vertical"===e?"right":"top",Si=(t,n)=>e.isValidElement(t)?e.cloneElement(t,{id:n}):t,Ei=({commentCount:e,shareCount:t,reactionCount:n,variant:r="horizontal",countColor:i,themeColor:o,contentId:a,contentLegacyId:s,contentModel:l,contentLink:c,withReport:u=!0,withChatbotButton:d=!1,commentAnchor:h,disableComment:p,blockVariant:f,reactListItems:m,userReaction:g,layout:y,...v})=>{const A=!p&&an.jsx(Ir,{role:"button",ariaLabel:"Accéder aux commentaires",iconProps:{name:"comment","aria-hidden":!0},..."card"===r&&"blue-grey"===f&&{iconBackground:"blue-grey",iconColor:"white"},variant:wi(r),count:e,countColor:i,countBg:o,countStyle:xi(r),..."horizontal"===r&&{id:"mbrs-social-comment-container"},..."card"!==r&&{anchor:h},..."card"===r&&c&&{link:`${c}#${h}`},color:"blue-grey"===f?"white":"black","aria-describedby":y===lr.DESKTOP?`comment-tooltip-${s||a}`:void 0,children:y===lr.DESKTOP&&an.jsx(Mn,{id:`comment-tooltip-${s||a}`,text:"Commenter"})}),b=an.jsx(Ir,{role:"button",ariaLabel:"Partager le contenu",iconProps:{name:"share","aria-hidden":!0},..."card"===r&&{iconBackground:"none"},..."card"===r&&"blue-grey"===f&&{iconBackground:"blue-grey",iconColor:"white"},variant:wi(r),count:0===t?void 0:t,countColor:i,countBg:o,countStyle:xi(r),isClickable:"card"!==r,className:hn({"js-mobile-share-button":"horizontal"===r}),..."card"!==r&&{id:"mbrs-social-share-container"},color:f&&["dark","blue-grey"].includes(f)?"white":"black","aria-describedby":y===lr.DESKTOP?`share-tooltip-${s||a}`:void 0,children:y===lr.DESKTOP&&an.jsx(Mn,{id:`share-tooltip-${s||a}`,text:"Partager l'article"})}),w=!p&&a&&!!m&&an.jsx(fi,{color:"blue-grey"===f?"white":"black",count:n,countColor:i,countBg:o,countStyle:xi(r),iconItemProps:{variant:wi(r),..."card"===r&&"blue-grey"===f&&{iconBackground:"blue-grey",iconColor:"white"}},userReaction:g,reactListItems:m,reactListItemThemeColor:"card"===r?f:void 0,variant:r,placement:_i(r),layout:y,contentId:a,contentLegacyId:s,"data-content-id":a||s,"data-content-model":l}),x=s&&an.jsx(Ir,{role:"button",ariaLabel:"Mettre le contenu en favori",iconProps:{name:"bookmark","aria-hidden":!0},..."card"===r&&"blue-grey"===f&&{iconBackground:"blue-grey",iconColor:"white"},variant:wi(r),countStyle:xi(r),"data-id":s,"data-delayed":!0,"data-distance-visible":0,"data-event-name":"mbrs-social-save-content",color:"blue-grey"===f?"white":"black","aria-describedby":y===lr.DESKTOP?`bookmark-tooltip-${s||a}`:void 0,children:y===lr.DESKTOP&&an.jsx(Mn,{id:`bookmark-tooltip-${s||a}`,text:"Sauvegarder l'article"})}),_=u&&an.jsx(Ir,{role:"button",ariaLabel:"Signaler une faute dans le contenu",..."card"===r&&"blue-grey"===f&&{iconBackground:"blue-grey",iconColor:"white"},variant:wi(r),iconProps:{name:"report","aria-hidden":!0},className:"mbrs-social-report-container",color:"black","aria-describedby":y===lr.DESKTOP?`report-tooltip-${s||a}`:void 0,children:y===lr.DESKTOP&&an.jsx(Mn,{id:`report-tooltip-${s||a}`,text:"Signaler une faute"})}),S=d&&an.jsx(Ir,{role:"button",ariaLabel:"Poser une question au Chatbot",iconProps:{name:"ia",size:26,"aria-hidden":!0},color:"black",id:"mbrs-social-chatbot-container","data-content-id":a,"aria-describedby":y===lr.DESKTOP?`chatbot-tooltip-${s||a}`:void 0,pl:"xxs-3",children:y===lr.DESKTOP&&an.jsx(Mn,{id:`chatbot-tooltip-${s||a}`,text:"Poser une question"})}),E=an.jsx(Nn,{id:"mbrs-social-chatbot-container-bar","data-content-id":a,color:"quaternary","aria-label":"Poser une question au Chatbot",hasNormalWeight:!0,stayOnSingleLine:!0,className:"c-social-bar__chatbot-cta","data-a11y-dialog-show":"dialog-chatbot",children:"Poser une question"}),C=an.jsx(On,{iconProps:{name:"dots",size:16,color:"black"},size:"small","aria-label":"Ouvrir le menu des actions","data-a11y-dialog-show":"dialog-social-bar"}),k=(u||d||!!s)&&an.jsx(ir,{}),I="horizontal"===r&&d,D=Si(A,"mbrs-social-comment-container-modal"),T=Si(b,"mbrs-social-share-container-modal"),N=Si(S,"mbrs-social-chatbot-container-modal");return an.jsxs(an.Fragment,{children:[an.jsx(Xn,{as:"ul",...v,alignItems:"center",gap:"horizontal"===r&&d?"s":"card"===r?"xxs":"xl",direction:"vertical"===r?"column":"row",justifyContent:"card"===r?"between":void 0,className:hn("c-social-bar",{[`c-social-bar--${r}`]:"card"!==r},v.className),bg:"horizontal"===r?"grey-50":void 0,"data-block-variant":f,children:(()=>{switch(r){case"card":return an.jsxs(an.Fragment,{children:[an.jsx("li",{children:an.jsxs(Xn,{as:"ul",alignItems:"center",gap:"xxs",children:[A&&an.jsx("li",{children:A}),w&&an.jsx("li",{children:w})]})}),x&&an.jsx("li",{children:x})]});case"horizontal":return d?an.jsxs(an.Fragment,{children:[A&&an.jsx("li",{children:A}),w&&an.jsx("li",{children:w}),an.jsx("li",{children:C}),an.jsx("li",{children:E})]}):an.jsxs(an.Fragment,{children:[A&&an.jsx("li",{children:A}),b&&an.jsx("li",{children:b}),x&&an.jsx("li",{children:x}),w&&an.jsx("li",{children:w}),_&&an.jsx("li",{children:_})]});case"vertical":return an.jsxs(an.Fragment,{children:[A&&an.jsx("li",{children:A}),b&&an.jsx("li",{children:b}),w&&an.jsx("li",{children:w}),an.jsx("li",{"aria-hidden":"true",children:k}),S&&an.jsx("li",{children:S}),x&&an.jsx("li",{children:x}),_&&an.jsx("li",{children:_})]});default:return null}})()}),I&&an.jsx(bi,{dialogId:"dialog-social-bar",commentItem:D,shareItem:T,bookmarkItem:x,reportItem:_,chatbotItem:N})]})},Ci=({sponsor:e,size:t,hasText:n=!1,isInline:r=!1,...i})=>an.jsxs(Xn,{...i,as:r?"span":i.as,gap:n?i?.gap||"l":void 0,className:hn("c-sponsor",i?.className),children:[n&&(r?an.jsx(gr,{as:"span",weight:"bold",children:"avec"}):an.jsx(er,{align:"end",children:an.jsx(gr,{as:"span",weight:"bold",children:"avec"})})),an.jsx("img",{alt:e.name,src:e.logoUrl,className:hn("c-sponsor__img",{[`c-sponsor__img--${t}`]:t})})]}),ki=({hasHeader:e,tableProps:t,...n})=>{if(!t?.length)return null;const r=e?t[0]:null,i=e?t.slice(1):t;return an.jsxs($n,{as:"table",...n,children:[e&&r&&an.jsx("thead",{children:an.jsx("tr",{children:r.map((e,t)=>an.jsx($n,{as:"th",p:"s",children:e},t))})}),an.jsx("tbody",{children:i.map((e,t)=>an.jsx("tr",{children:e.map((e,t)=>an.jsx($n,{as:"td",p:"s",children:e},t))},t))})]})},Ii=({tabItems:e,name:t="default",fitContainer:n,tabItemActive:r,tabVariant:i="primary",className:o,tabProps:a,tabTitlesColor:s,...l})=>{const c=e.filter(({content:e})=>Array.isArray(e)?e.length>0:!!e);if(0===c.length)return null;const u=r||c[0].name;return an.jsxs($n,{className:hn(o,"js-tabs",{"c-tabs-fit-container":n}),"data-tabs-name":t,...l,children:[an.jsx(Xn,{className:"c-tablist",role:"tablist",mb:"l",gap:"primary"===i?"l":void 0,...a,children:c.map(e=>an.jsx(hr,{name:e.name,variant:i,isSelected:u===e.name,tabIndex:u===e.name?0:-1,tabColor:e.tabColor,isNoWrap:e.isNoWrap,color:s,children:e.title},e.name))}),c.map(e=>an.jsx(pr,{className:hn({"c-tabs-fit-container__panel":n}),name:e.name,isHidden:u!==e.name,children:e.content},e.name))]})},Di=e.forwardRef(({href:e,children:t,...n},r)=>an.jsx("a",{href:e,className:hn("c-skip-link",Yn(n),n?.className),ref:r,...n,children:t}));Di.displayName="SkipLink";const Ti=({tabItems:t,layout:n,fitContainer:r,tabItemActive:i,isScrollable:o=!1,hasButton:a=!1,seeMoreLinkBoxProps:s,...l})=>{const c=(e,t)=>e.slice(0,t),u=t.map(e=>({...e,body:c(e.body,n===lr.DESKTOP?"le-direct"===e.name?25:10:5)})).filter(e=>e.body&&e.body.length>0).map(t=>{const i="le-direct"===t.name;return{name:t.name,title:t.title,tabColor:t.tabColor,content:an.jsxs(an.Fragment,{children:[an.jsx("div",{className:hn({"c-most-read-articles-is-scrollable":o&&n===lr.DESKTOP,"c-most-read-articles-fit-container":r&&n===lr.DESKTOP}),children:an.jsx("div",{children:t.body.map((r,a)=>an.jsxs(e.Fragment,{children:[i?an.jsx(Pr,{link:r.url,title:r.title,cardHeaderProps:{headline:{text:r.rubricName},liveTime:r.liveTime},cardTitleProps:{size:{xs:"xxs-2",md:"xxs-3"},cartridge:r.cartridge},layout:n,mr:o&&n===lr.DESKTOP&&t.body.length>3?"s":void 0}):an.jsx(Fr,{link:r.url,title:r.title,cardHeaderProps:{headline:{text:r.rubricName}},...n===lr.DESKTOP&&{cardImageProps:r.cardImageProps},cardTitleProps:{size:"xxs-3",cartridge:r.cartridge},cardNumber:{value:a+1,size:"small"},layout:n,mr:o&&n===lr.DESKTOP?"s":void 0,variant:"small"}),a!==t.body.length-1&&an.jsx(Ln,{color:"grey-200",my:"s"})]},r.title))})}),a&&an.jsx(Xn,{mt:"xl",justifyContent:"center",...s,children:an.jsx(nr,{buttonColor:"primary",variant:"outlined",...i?{href:"https://www.20minutes.fr/actus",children:"Suivre l'info en direct"}:{href:"https://www.20minutes.fr/les-plus-lus",children:"Voir les articles les + lus"}})})]})}});return 0===u.length?null:an.jsx(Ii,{tabItemActive:i||u[0].name,tabItems:u,fitContainer:r&&n===lr.DESKTOP,...l})};class Ni extends Error{}Ni.prototype.name="InvalidTokenError";const Li=e=>{const t=document.cookie.split(";").filter(t=>-1!==t.indexOf(e))[0];return t?t.split("=")[1]:"{}"},Bi=e=>{const t=e=>`${e}`.padStart(2,"0");return`${t(Math.floor(e/60))}:${t(e%60)}`},Pi=new Intl.RelativeTimeFormat("fr",{numeric:"auto"}),Oi=new Intl.DateTimeFormat("fr",{year:"numeric",month:"short",day:"numeric",timeZone:"Europe/Paris"}),Mi=e=>{const t=Date.now(),n=new Date(e).getTime(),r=(n-t)/6e4;let i=Pi.format(Math.round(r),"minutes");return r<=-60&&(i=Pi.format(Math.ceil(r/60),"hours"),r<=-1440&&(i=Oi.format(n))),"cette minute-ci"===i?"à l'instant":i};function ji(e,t=!0){const n=String(e.getDate()).padStart(2,"0"),r=String(e.getMonth()+1).padStart(2,"0");let i=e.getFullYear();return t||(i=Number(e.getFullYear().toString().slice(2))),`${n}/${r}/${i}`}function Fi(e){const[t,n,r]=e.split("-");return`${r}/${n}/${t.slice(-2)}`}const Ri=e=>{const t=new Date(e);return`${t.getFullYear()}${String(t.getMonth()+1).padStart(2,"0")}${String(t.getDate()).padStart(2,"0")}`};var qi=(e=>(e.Article="Article",e.ExternalContent="ExternalContent",e.Live="Live",e.Page="Page",e.StaticPage="StaticPage",e.Story="Story",e))(qi||{}),zi=(e=>(e.bold="bold",e.community="community",e.default="default",e.faq="faq",e.important="important",e.summary="summary",e.very_important="very_important",e))(zi||{}),Hi=(e=>(e.closed="closed",e.open="open",e))(Hi||{}),Ki=(e=>(e.embed="embed",e.photo="photo",e.podcast="podcast",e.video="video",e))(Ki||{}),Ui=(e=>(e.CREATED_AT="CREATED_AT",e.EXPECTATION_LEVEL="EXPECTATION_LEVEL",e.RELEASE_DATE="RELEASE_DATE",e.TITLE_FR="TITLE_FR",e))(Ui||{}),Vi=(e=>(e.ASC="ASC",e.DESC="DESC",e))(Vi||{}),Qi=(e=>(e.down="down",e.heart="heart",e.laughing="laughing",e.sad="sad",e.shock="shock",e.up="up",e))(Qi||{});const Wi=[Qi.up,Qi.down,Qi.sad,Qi.heart,Qi.laughing,Qi.shock],Gi=e=>{if(e)return Wi.reduce((t,n)=>t+(e[n]??0),0)},Zi=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):void 0},Yi=(e,t)=>{let n=e.toLowerCase().replace(/[\s-]+/g,t??"-");return n=(e=>{let t=e;const n="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/,:;";for(let e=0;e<30;e+=1)t=t.replace(new RegExp(n.charAt(e),"g"),"aaaaaeeeeeiiiiooooouuuunc-----".charAt(e));return t})(n),n.replace(/[^\w-]+/g,"").replace(/-*$/g,"")},Ji=e=>{const t=JSON.stringify(e).replaceAll("<\/script>","<\\\\/script>");return JSON.parse(t)},$i=e=>{const t=JSON.stringify(e).replaceAll("<\\\\/script>","<\/script>");return JSON.parse(t)},Xi=(e,t=75)=>e.length>75?`${e.substring(0,t)}…`:e,eo=e=>{const t={click:Yi(e.name),click_chapter1:e?.chapter1||null,click_chapter2:e?.chapter2||null,click_chapter3:e?.chapter3||null},n=`click.${e.type}`;if(window.pa?(e.customProps&&Object.keys(e.customProps).length>0&&window.pa.setProperties(e.customProps,{persistent:!1,events:[n]}),window.pa.sendEvent(n,t)):window._paq&&(e.customProps&&Object.keys(e.customProps).length>0&&window._paq.push(["setProperties",e.customProps,{persistent:!1,events:[n]}]),window._paq.push(["sendEvent",n,t])),!window.edgee?.track)return;const r=document.getElementById("__EDGEE_DATA_LAYER__");let i={};if(r)try{const e=JSON.parse(r.textContent||"");e.data_collection.context=e.data_collection.context||{},i=e.data_collection.context.page?.properties||{}}catch{i={}}window.edgee.track({name:n,properties:{...i,click:t.click,click_chapter1:t.click_chapter1,click_chapter2:t.click_chapter2,click_chapter3:t.click_chapter3,click_type:e?.type??"navigation",...e.customProps}},{"edgee/piano-analytics":!0})},to=e=>{window._paq&&window._paq.push(["sendEvent","page.display",{page:e?.name??window.PianoPageInfo?.name,page_chapter1:e?.chapter1??window.PianoPageInfo?.chapter1,page_chapter2:e?.chapter2??window.PianoPageInfo?.chapter2,page_chapter3:e?.chapter3??window.PianoPageInfo?.chapter3,page_chapter4:e?.chapter4??window.PianoPageInfo?.chapter4}]),window.edgee?.page&&!1!==e?.enableEdgee&&window.edgee.page()},no=e=>{if("undefined"==typeof window&&"undefined"!=typeof Buffer){return Buffer.from(e,"utf-8").toString("base64")}return window.btoa(unescape(encodeURIComponent(e)))},ro="20mnReactions",io=e=>e in yn,oo=Object.values(Qi).filter(e=>io(e)),ao=e=>{const t=e?.reaction?.associated_content?.node?.reactions_count;if(!t)return null;return oo.some(e=>"number"==typeof t[e])?t:null},so=()=>{try{const e=localStorage.getItem(ro);return e?JSON.parse(e):[]}catch{return[]}},lo=e=>{try{localStorage.setItem(ro,JSON.stringify(e))}catch{console.error("Error setting stored reactions")}},co=e=>so().find(t=>t.contentId===e)??null,uo=(e,t,n)=>{const r=so().filter(t=>t.contentId!==e);r.push({id:t,contentId:e,type:n,timestamp:Date.now()}),lo(r)},ho=e=>{const t=so().filter(t=>t.contentId!==e);lo(t)},po=()=>{const e=Li("20mnUserDataLayer");if(!e||"{}"===e)return null;try{return JSON.parse(decodeURIComponent(e))}catch{return null}},fo=()=>{let e=localStorage.getItem("20mn_anonymous_id");return e||(e=crypto.randomUUID(),localStorage.setItem("20mn_anonymous_id",e)),e},mo=async(e,t)=>{const n=document.body.getAttribute("data-api-host");if(!n)return console.error("API host not found"),null;try{const r=new Headers;r.append("Content-Type","application/json"),r.append("auth-key",window.envVariables?.apiAuthKey);const i=await fetch(n,{method:"POST",headers:r,credentials:"include",body:JSON.stringify({query:e,variables:t})});if(!i.ok)throw new Error(`HTTP error: ${i.status}`);const o=await i.json();return o.errors&&o.errors.length>0?(console.error("GraphQL errors:",o.errors),null):o.data??null}catch(e){return console.error("Error executing GraphQL mutation:",e),null}},go=async e=>{const t={id:e},n=await mo("\n mutation DeleteReaction($input: GlobalIdInputType!) {\n deleteReaction(input: $input) {\n resolveInfo {\n status\n }\n }\n }\n ",{input:t}),r=n?.deleteReaction?.resolveInfo?.status;return"string"!=typeof r||!r.startsWith("2")},yo=()=>{const e=document.querySelector(".mbrs-social-emoji-toolbar");if(!e)return;const t=new Set;(()=>{const e=Date.now(),t=so(),n=t.filter(t=>e-t.timestamp<6e5);n.length!==t.length&&lo(n)})(),e.style.position="fixed",e.style.display="none",e.style.zIndex="1000";const n=!!document.querySelector('body[data-layout="mobile"]');let r=null,i=!1,o=null;const a=()=>{null!==o&&(clearTimeout(o),o=null)},s=()=>{e.style.display="none",i=!1,r=null,a()},l=()=>{a(),o=setTimeout(()=>{i&&s(),o=null},400)},c=e=>{const t=e.getAttribute("data-content-model")||"";return t.charAt(0).toUpperCase()+t.slice(1)},u=(e,t)=>{const n=e.querySelector(".c-react-button__icon .c-icon-item__icon");if(n)if(t){const e=(e=>io(e)?yn[e]??null:null)(t);e&&(n.innerHTML=`<span style="font-size: 1.25rem; line-height: 1;">${e}</span>`)}else n.innerHTML='\n <div aria-hidden="true" class="c-icon">\n <svg height="20" width="20">\n <use xlink:href="#thumb"></use>\n </svg>\n </div>\n '},d=t=>{const r=t.getBoundingClientRect(),i=t.getAttribute("data-placement")||"right",o=e.getBoundingClientRect();if("top"===i){const t=r.top-o.height-10,i=r.left+r.width/2,a=t<24,s=i-o.width/2<24,l=i+o.width/2>window.innerWidth-24;e.style.top=a?"24px":`${t}px`,n?(e.style.left="50%",e.style.transform="translateX(-50%)"):s?(e.style.left="24px",e.style.transform="translateX(0)"):l?(e.style.left=window.innerWidth-24+"px",e.style.transform="translateX(-100%)"):(e.style.left=`${i}px`,e.style.transform="translateX(-50%)")}else{const t=r.right+18,i=t+o.width>window.innerWidth;e.style.top=`${r.top+r.height/2}px`,n?(e.style.left="50%",e.style.transform="translate(-50%, -50%)"):i?(e.style.left=window.innerWidth-24+"px",e.style.transform="translate(-100%, -50%)"):(e.style.left=`${t}px`,e.style.transform="translateY(-50%)")}},h=e=>{const t=[];Wi.forEach(n=>{const r=Number.parseInt(e.getAttribute(`data-content-${n}`)||"0",10),i=e.querySelector(`[data-reaction-item="${n}"]`);i&&t.push({element:i,type:n,count:r})});const n=t.filter(({count:e})=>e>0),r=t.reduce((e,{count:t})=>e+t,0),i=e.querySelector(".c-react-button__count");if(i&&(r>0?i.classList.add("c-react-button__count--show"):i.classList.remove("c-react-button__count--show")),t.forEach(({element:e})=>{e.classList.remove("c-react-button__list-item--show")}),0===n.length)return;const o=[...n].sort((e,t)=>t.count-e.count);o.slice(0,2).forEach(({element:e})=>{e.classList.add("c-react-button__list-item--show")})},p=t=>{const n=Object.values(Qi),r=t.getAttribute("data-user-reaction");n.forEach(n=>{const i=t.getAttribute(`data-content-${n}`);if(!i)return;const o=e.querySelector(`[data-reaction-id="${n}"]`);if(!o)return;const a=o.querySelector(".c-emoji-toolbar__count");if(a){const e=String(i).padStart(2,"0");a.textContent=e}r===n?o.classList.add("c-emoji-toolbar__button--is-active"):o.classList.remove("c-emoji-toolbar__button--is-active")})},f=(e,t,n)=>{const r=co(t);let i=0;oo.forEach(t=>{let o="number"==typeof(a=n[t])?Math.max(0,Math.trunc(a)):0;var a;r?.type===t&&(o+=1),e.setAttribute(`data-content-${t}`,String(o)),i+=o});const o=String(i),a=e.querySelector(".c-react-button__count");a&&(a.textContent=o);const s=e.querySelector(".c-icon-item__count");s&&(s.textContent=o),h(e),p(e)},m=(t,n,o,a)=>{const s=-1===o,l=!s&&null!==a&&a!==n,c=(n,o)=>{if(!i||r!==t)return;const a=e.querySelector(`[data-reaction-id="${n}"]`);if(!a)return;const s=a.querySelector(".c-emoji-toolbar__count");if(s){const e=Number.parseInt(s.textContent||"0",10);s.textContent=String(Math.max(0,e+o)).padStart(2,"0")}};c(n,o);const d=t.getAttribute(`data-content-${n}`),h=Number.parseInt(d||"0",10);if(t.setAttribute(`data-content-${n}`,String(Math.max(0,h+o))),l&&a){c(a,-1);const n=t.getAttribute(`data-content-${a}`),o=Number.parseInt(n||"0",10);if(t.setAttribute(`data-content-${a}`,String(Math.max(0,o-1))),i&&r===t){const t=e.querySelector(`[data-reaction-id="${a}"]`);t?.classList.remove("c-emoji-toolbar__button--is-active")}}else if(!l){const e=t.querySelector(".c-icon-item__count");if(e){const t=Number.parseInt(e.textContent||"0",10);e.textContent=String(Math.max(0,t+o))}const n=t.querySelector(".c-react-button__count");if(n){const e=Number.parseInt(n.textContent||"0",10);n.textContent=String(Math.max(0,e+o))}}if(s){if(i&&r===t){const t=e.querySelector(`[data-reaction-id="${n}"]`);t?.classList.remove("c-emoji-toolbar__button--is-active")}t.removeAttribute("data-user-reaction"),t.removeAttribute("data-user-reaction-id"),u(t,null)}else{if(i&&r===t){e.querySelectorAll("[data-reaction-id]").forEach(e=>{e.classList.remove("c-emoji-toolbar__button--is-active")});const t=e.querySelector(`[data-reaction-id="${n}"]`);t?.classList.add("c-emoji-toolbar__button--is-active")}t.setAttribute("data-user-reaction",n),u(t,n)}},g=async(e,t,n,{isRemoving:r,previousUserReaction:i,existingReactionId:o,editorialModel:a})=>{try{if(r){if(o){await go(o)?ho(t):console.error("Failed to delete reaction")}else ho(t);return}if(i&&o){const r=await(async(e,t,n)=>{const r=`\n mutation UpdateReaction($input: UpdateReactionType!) {\n updateReaction(input: $input) {\n reaction {\n id\n associated_content: ${n.toLowerCase()} {\n node {\n reactions_count {\n down\n heart\n laughing\n sad\n up\n }\n }\n }\n }\n resolveInfo {\n status\n }\n }\n }\n `,i={id:e,content:t},o=await mo(r,{input:i});return{id:o?.updateReaction?.reaction?.id??null,reactionCounts:ao(o?.updateReaction)}})(o,n,a);return void(r.id?(uo(t,o,n),r.reactionCounts&&f(e,t,r.reactionCounts)):console.error("Failed to update reaction"))}const s=await(async(e,t,n)=>{const r=po(),i=r?.i?String(r.i):null,o=i?null:fo(),a=`\n mutation CreateReaction($input: CreateReactionType!) {\n createReaction(input: $input) {\n reaction {\n id\n associated_content: ${t.toLowerCase()} {\n node {\n reactions_count {\n down\n heart\n laughing\n sad\n up\n }\n }\n }\n }\n resolveInfo {\n status\n }\n }\n }\n `,s={associated_content:{editorial_id:e,editorial_model:t},content:n};i?s.user_front_id=i:o&&(s.anonymous_id=o);const l=await mo(a,{input:s});return{id:l?.createReaction?.reaction?.id??null,reactionCounts:ao(l?.createReaction)}})(t,a,n);if(s.id){if(!e.getAttribute("data-user-reaction"))return void await go(s.id);e.setAttribute("data-user-reaction-id",s.id),uo(t,s.id,n),s.reactionCounts&&f(e,t,s.reactionCounts)}else console.error("Failed to create reaction")}catch(e){console.error("Error executing reaction mutation:",e)}},y=(e,t,n)=>{const r=e.getAttribute("data-content-id");if(!r)return void console.error("Missing editorial content information for reaction");const i=c(e),o=e.getAttribute("data-user-reaction-id"),a=e.getAttribute("data-user-reaction");m(e,t,n?-1:1,a),h(e),g(e,r,t,{isRemoving:n,previousUserReaction:a,existingReactionId:o,editorialModel:i}).catch(e=>{console.error("Unexpected error in reaction API call:",e)})},v=t=>{if(i&&r===t)return;a(),eo({name:"reaction",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:1}}),r=t,e.style.display="flex",d(t),p(t),A(r.getAttribute("data-content-id")),i=!0;if(!t.getAttribute("data-user-reaction")){const e=t.getAttribute("data-content-id");e&&(async(e,t)=>{const n=po(),r=n?.i?String(n.i):null,i=r?null:fo();if(!r&&!i)return null;const o=document.body.getAttribute("data-brand-id");if(!o)return console.error("Brand ID not found"),null;const a=no(`Brand:${o}`),s={};r?s.user_front_id={eq:r}:i&&(s.anonymous_id={eq:i});const l=t.toLowerCase(),c=`${l}_id`,u=`\n query GetUserReaction($brandId: ID!, $${c}: ID!, $reactionFilter: ReactionFilter) {\n brand(id: $brandId) {\n node {\n ${l}(${c}: $${c}) {\n node {\n id\n reactions(first: 1, filter: $reactionFilter, orderBy: { field: CREATED_AT, direction: ASC }) {\n edges {\n node {\n id\n content\n }\n }\n }\n }\n resolveInfo {\n status\n }\n }\n }\n }\n }\n `,d={brandId:a,reactionFilter:s,[c]:e},h=await mo(u,d),p=h?.brand?.node?.[l]?.node?.reactions,f=p?.edges?.[0]?.node;return f?{id:f.id,type:f.content}:null})(e,qi.Article).then(e=>{e&&r===t&&(t.setAttribute("data-user-reaction",e.type),t.setAttribute("data-user-reaction-id",e.id),u(t,e.type),p(t))}).catch(e=>{console.error("Error fetching user reaction:",e)})}},A=t=>{if(!t)return void console.error("Missing editorial content information for reaction");e.querySelectorAll("[data-reaction-id]").forEach(e=>{const t=e.cloneNode(!0);e.parentNode&&t instanceof HTMLElement&&e.parentNode.replaceChild(t,e)});e.querySelectorAll("[data-reaction-id]").forEach(e=>{e.addEventListener("click",()=>{if(!r)return;const n=e.getAttribute("data-reaction-id");if(!n)return;const i=c(r),o=r.getAttribute("data-user-reaction-id"),a=e.classList.contains("c-emoji-toolbar__button--is-active"),l=r.getAttribute("data-user-reaction");eo({name:n,type:"action",customProps:{cta_context:"toolbar_react",cta_type:"icon",cta_engagement:2}});((e,t,n)=>{r&&m(r,e,t,n)})(n,a?-1:1,l),h(r);const u=r,d=t;s(),g(u,d,n,{isRemoving:a,previousUserReaction:l,existingReactionId:o,editorialModel:i}).catch(e=>{console.error("Unexpected error in reaction API call:",e)})})})},b=e=>{if(t.has(e))return;t.add(e),(e=>{const t=e.getAttribute("data-content-id");if(!t)return;const n=co(t);if(!n)return;e.setAttribute("data-user-reaction",n.type),e.setAttribute("data-user-reaction-id",n.id),u(e,n.type);const r=Number.parseInt(e.getAttribute(`data-content-${n.type}`)||"0",10);e.setAttribute(`data-content-${n.type}`,String(r+1));const i=e.querySelector(".c-react-button__count");if(i){const e=Number.parseInt(i.textContent||"0",10);i.textContent=String(e+1)}const o=e.querySelector(".c-icon-item__count");if(o){const e=Number.parseInt(o.textContent||"0",10);o.textContent=String(e+1)}})(e);const o=e.getAttribute("data-user-reaction");o&&u(e,o),h(e);const s=e.querySelector(".c-react-button__icon");if(!s)return;let c=null,d=null,p=!1;const f=()=>{null!==c&&(clearTimeout(c),c=null)},m=()=>{null!==d&&(clearTimeout(d),d=null)},g=()=>{f(),eo({name:"reaction",type:"action",customProps:{cta_context:"react_button",cta_type:"icon",cta_engagement:1}}),(e=>{const t=e.getAttribute("data-user-reaction");t?y(e,t,!0):y(e,Qi.up,!1)})(e)};n?(s.addEventListener("touchstart",()=>{p=!1,m(),d=setTimeout(()=>{p=!0,v(e)},500)},{passive:!0}),s.addEventListener("touchmove",m),s.addEventListener("touchend",m),s.addEventListener("touchcancel",m),s.addEventListener("click",e=>{if(p)return e.preventDefault(),void(p=!1);g()})):(s.addEventListener("click",g),e.addEventListener("mouseenter",()=>{i&&a()}),e.addEventListener("mouseleave",()=>{i&&r===e&&l()}),s.addEventListener("mouseenter",()=>{i&&r===e||(c=setTimeout(()=>{v(e)},300))}),s.addEventListener("mouseleave",f))};n||(e.addEventListener("mouseenter",a),e.addEventListener("mouseleave",()=>{i&&l()}));document.querySelectorAll(".mbrs-social-react-container").forEach(b);new MutationObserver(e=>{e.forEach(e=>{Array.from(e.addedNodes).forEach(e=>{if(!(e instanceof HTMLElement))return;e.matches(".mbrs-social-react-container")&&b(e);e.querySelectorAll(".mbrs-social-react-container").forEach(b)})})}).observe(document.body,{childList:!0,subtree:!0}),window.addEventListener("scroll",()=>{i&&r&&d(r)}),document.addEventListener("click",({target:t})=>{t instanceof HTMLElement&&i&&!e.contains(t)&&!t.closest(".mbrs-social-react-container")&&s()})},vo=e=>e instanceof HTMLAnchorElement?e.href:e instanceof Element&&e.closest("a")?.href||"",Ao=()=>{"home"===window.datalayerInfo?.pageName&&document.querySelectorAll("div#local-news-container div.c-card-container a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"local_news_content",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:t,cta_engagement:1}}),window.location.href=t})})},bo=()=>{window.datalayerInfo?.pageName&&["article","live"].includes(window.datalayerInfo?.pageName)&&document.querySelectorAll("div.c-tabpanel article a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"most_read_content",type:"action",customProps:{cta_context:"content",cta_type:"link",cta_destination:t,cta_engagement:1},chapter1:"widget"}),window.location.href=t})})};var wo=()=>{"guide-achat"===window.datalayerInfo?.subType&&document.querySelectorAll(".c-content a.c-btn").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),eo({name:"affiliation",type:"action",chapter1:"guide_achat"}),e.target instanceof HTMLAnchorElement&&(window.location.href=e.target.href)})}),"article"===window.datalayerInfo?.pageName&&document.querySelectorAll("footer article a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"read_also",type:"action",customProps:{cta_context:"content",cta_type:"card",cta_destination:t,cta_engagement:2}}),window.location.href=t})}),(()=>{const e=document.querySelector("a.c-tiles--has-advent-bg");e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"advent-calendar",type:"action",customProps:{cta_context:"menu",cta_type:"button",cta_destination:t,cta_engagement:2}}),window.location.href=t})})(),(()=>{if("mobile"!==window.layout)return;const e=document.querySelector("a.js-header-btn-back");e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"back",type:"action",customProps:{cta_context:"header",cta_type:"icon",cta_destination:t,cta_engagement:1}}),window.location.href=t})})(),(()=>{const e=document.querySelector('.c-btn--ghost:not(.u-hidden)[data-a11y-dialog-show="dialog-menu"]');e&&e.addEventListener("click",()=>{eo({name:"menu",type:"action",customProps:{cta_context:"header",cta_type:"button",cta_destination:window.location.href,cta_engagement:1}})})})(),(()=>{const e=document.getElementById("mbrs-social-chatbot-container"),t=document.getElementById("mbrs-floating-chatbot-container"),n=document.getElementById("mbrs-social-chatbot-container-bar");e&&e.addEventListener("click",()=>{eo({name:"ai",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:2}})}),t&&t.addEventListener("click",()=>{eo({name:"ai",type:"action",customProps:{cta_context:"content",cta_type:"button",cta_destination:window.location.href,cta_engagement:1}})}),n&&n.addEventListener("click",()=>{eo({name:"ai",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:2}})})})(),(()=>{if(window.datalayerInfo?.pageName&&["game","gamehome"].includes(window.datalayerInfo?.pageName)){let e=document.querySelectorAll("main#page-wrap div.c-collapse__content a");"desktop"===window.layout&&(e=document.querySelectorAll("header.c-header-page div.c-collapse__content a")),e.forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement&&(t=e.target.href),eo({name:"view_all_games",type:"action",customProps:{cta_context:"home_game",cta_type:"link",cta_destination:t,cta_engagement:1}}),window.location.href=t})})}})(),(()=>{let e=document.querySelector("article.c-card-large a");"mobile"===window.layout&&(e=document.querySelector("article.c-card-extra-large a")),e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"headline_content",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:t,cta_engagement:1}}),window.location.href=t})})(),window.datalayerInfo?.pageName&&["home","tag"].includes(window.datalayerInfo?.pageName)&&(document.querySelectorAll('div.c-icon-item__container--is-clickable[aria-label="Accéder aux commentaires"] a').forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"comment_content",type:"action",customProps:{cta_context:"home"===window.datalayerInfo?.pageName?"home":"tag",cta_type:"icon",cta_destination:t,cta_engagement:2}}),window.location.href=t})}),document.querySelectorAll('div.c-icon-item__container--is-clickable[data-event-name="mbrs-social-save-content"]').forEach(e=>{e.addEventListener("click",()=>{eo({name:"save_content",type:"action",customProps:{cta_context:"home"===window.datalayerInfo?.pageName?"home":"tag",cta_type:"icon",cta_destination:window.location.href,cta_engagement:3}})})})),(()=>{if("home"!==window.datalayerInfo?.pageName)return;const e=(e,t)=>{e?.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const n=vo(e.target);eo({name:t,type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:n,cta_engagement:1}}),window.location.href=n})},t=document.querySelector(".o-lt-show__main .card-item-5"),n=document.querySelectorAll(".o-lt-show__main .c-card-extra-small");e(t??void 0,"card_6"),e(n[4],"card_17"),e(n[5],"card_18")})(),"home"===window.datalayerInfo?.pageName&&document.querySelectorAll(".c-carousel__movies--in-long-list a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);let n="";n="On regarde quoi ce soir ?"===(e.target instanceof Element&&e.target.closest("section.c-carousel")?.querySelector("h2")?.textContent||"")?"program_tv_content":"cinema_content",eo({name:n,type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:t,cta_engagement:1}}),window.location.href=t})}),[{name:"games",id:"#entertainment-item-game"},{name:"horoscope",id:"#entertainment-item-horoscope"}].forEach(e=>{const t=document.querySelector(e.id);t&&t instanceof HTMLAnchorElement&&t.addEventListener("click",n=>{n.stopPropagation(),n.preventDefault(),eo({name:e.name,type:"action",customProps:{cta_context:"widget_entertainment",cta_type:"link_with_icon",cta_destination:t.href,cta_engagement:2}}),window.location.href=t.href})}),(()=>{const e=document.querySelector("ul.c-header__links-container li:first-child a");e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"house",type:"action",customProps:{cta_context:"header",cta_type:"icon",cta_destination:"/",cta_engagement:1}}),window.location.href=t})})(),"home"===window.datalayerInfo?.pageName&&document.querySelectorAll("#tabpanel-le-direct article.c-card-container a").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),eo({name:"live",type:"action",customProps:{cta_context:"home",cta_type:"link",cta_destination:window.location.href,cta_engagement:1}}),window.location.href=e.target.href)})}),(()=>{const e=document.querySelector("#tab-resume");e&&e.addEventListener("click",()=>{eo({name:"context",type:"action",customProps:{cta_context:"content",cta_type:"link",cta_destination:window.location.href,cta_engagement:1},chapter1:"live"})});const t=document.querySelector("#tab-temps-forts");t&&t.addEventListener("click",()=>{eo({name:"highlights",type:"action",customProps:{cta_context:"content",cta_type:"link",cta_destination:window.location.href,cta_engagement:1},chapter1:"live"})})})(),"home"===window.datalayerInfo?.pageName&&document.querySelectorAll(".c-vertical-timeline a").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),eo({name:"live_post",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)})}),Ao(),document.querySelectorAll("a.c-header-mobile__logo, a.c-header__logo, .c-header-mobile__logo a.c-link, .c-header__logo a.c-link, .c-header-mini__container > div:not(.c-header-mini__content) a.c-link").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"logo",type:"action",customProps:{cta_context:"header",cta_type:"image",cta_destination:t,cta_engagement:1}}),window.location.href=t})}),(()=>{const e=(e,t,n)=>{const r=vo(n.target);r&&(n.stopPropagation(),n.preventDefault(),eo({name:t,type:"action",customProps:{cta_context:"header",cta_type:"button",cta_destination:r,cta_engagement:1}}),"_blank"===e.target?window.open(r,"_blank")?.focus():window.location.href=r)};document.querySelectorAll(".c-header__container a.c-media-link").forEach(t=>{switch(t.title){case"Consulter la page 20 Minutes TV live":t.addEventListener("click",n=>{e(t,"20mn_tv",n)});break;case"Consulter la page 20 Minutes TV":t.addEventListener("click",n=>{e(t,"videos",n)})}})})(),bo(),document.querySelectorAll(".c-overview-bar__article a").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),eo({name:"summary_banner",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)})}),document.querySelectorAll("div.c-read-also-banner a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"read_also_banner",type:"action",customProps:{cta_context:"content",cta_type:"card",cta_destination:t,cta_engagement:2},chapter1:"banner"}),window.location.href=t})}),(()=>{const e=document.getElementById("footer-recrutement-link");e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),eo({name:"recrutement",type:"action"}),e.target instanceof HTMLAnchorElement&&(window.location.href=e.target.href)})})(),(()=>{if("rewind"===window.datalayerInfo?.pageName){const e=document.querySelector('#page-wrap a[href*="/rewind/2025"]');e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"rewind_2025",type:"action",customProps:{cta_context:"my_rewinds",cta_type:"card",cta_destination:t,cta_engagement:2}}),window.location.href=t})}const e=document.querySelector('div.c-header a[href*="/rewind/2025"]');e&&e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"rewind",type:"action",customProps:{cta_context:"header",cta_type:"icon",cta_destination:t,cta_engagement:2}}),window.location.href=t});const t=document.querySelector('#dialog-menu a[href*="/rewind/2025"]');t&&t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();const t=vo(e.target);eo({name:"rewind",type:"action",customProps:{cta_context:"menu",cta_type:"banner",cta_destination:t,cta_engagement:2}}),window.location.href=t})})(),"desktop"===window.layout&&document.querySelectorAll("li.c-header__link-and-submenu-container a.c-header__link").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),eo({name:"section_tag",type:"action",customProps:{cta_context:"header",cta_type:"link",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)})}),(()=>{if("home"!==window.datalayerInfo?.pageName)return;const e=document.querySelector("div.c-scroll-to-top button");e&&e.addEventListener("click",()=>{eo({name:"scroll_to_top",type:"action",customProps:{cta_context:"home",cta_type:"button",cta_destination:window.location.href,cta_engagement:1}})})})(),(()=>{const e=document.querySelector('.c-social-bar a[href="#mbrs-comments-container"]');e&&e.addEventListener("click",()=>{eo({name:"content_comments",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})});const t=document.querySelector("#mbrs-social-comment-container");t&&t.addEventListener("click",()=>{eo({name:"content_comments",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})})})(),(()=>{const e=document.querySelector(".c-social-bar div.mbrs-social-report-container");e&&e.addEventListener("click",()=>{eo({name:"content_correction",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})})})(),(()=>{const e=document.querySelector('.c-social-bar div[data-event-name="mbrs-social-save-content"]');e&&e.addEventListener("click",()=>{eo({name:"save_content",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})})})(),document.querySelectorAll("div.c-sub-menu__right a").forEach(e=>{e.addEventListener("click",e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),eo({name:"content",type:"action",customProps:{cta_context:"sub_nav",cta_type:"card",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)})}),(()=>{const e=(e,t)=>{let n="";t.target instanceof HTMLAnchorElement?n=t.target.href:t.target instanceof HTMLElement&&t.target.closest("a")instanceof HTMLAnchorElement&&(n=t.target.closest("a")?.href||""),n&&(t.stopPropagation(),t.preventDefault(),eo({name:e,type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_destination:"home"===e?window.location.href:n,cta_engagement:1}}),window.location.href=n)};document.querySelectorAll(".c-toolbar a").forEach(t=>{const n=t.nextSibling;if(n instanceof HTMLParagraphElement)switch(n.innerText){case"À la Une":t.addEventListener("click",t=>{e("home",t)});break;case"Le Direct":t.addEventListener("click",t=>{e("live_feed",t)});break;case"Jeux":t.addEventListener("click",t=>{e("games",t)})}});const t=document.querySelector('.c-toolbar div[aria-label="Voir les articles vidéo"] a');t&&t.addEventListener("click",()=>{eo({name:"video_feed",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_destination:window.location.href,cta_engagement:1}})})})(),(()=>{const e=(e,t)=>{let n="";t.target instanceof HTMLAnchorElement?n=t.target.href:t.target instanceof HTMLElement&&t.target.closest("a")instanceof HTMLAnchorElement&&(n=t.target.closest("a")?.href||""),n&&(t.stopPropagation(),t.preventDefault(),eo({name:e,type:"action",customProps:{cta_context:"menu",cta_destination:n,cta_engagement:1,cta_type:"button"}}),window.location.href=n)};document.querySelectorAll("a.c-menu__tiles-items").forEach(t=>{switch(t.innerText){case"Jeux":t.addEventListener("click",t=>{e("games",t)});break;case"Horoscope":t.addEventListener("click",t=>{e("horoscope",t)})}})})()},xo=(e=>(e.ARCHIVE_BY_DAY="archivebyday",e.ARCHIVE_BY_YEAR="archivebyyear",e.ARTICLE="article",e.ASTRO="astro",e.ASTRO_HOME="astrohome",e.CONTACT="contact",e.DIRECT="direct",e.ELECTIONS="elections",e.ELECTIONSHOME="electionshome",e.GAME="game",e.GAME_APP="gameapp",e.GAMEHOME="gamehome",e.HOME="home",e.JOB_DETAILS="jobdetails",e.JOBS="jobs",e.JOURNALIST="journalist",e.LA21E="la21e",e.LEGAL="legal",e.LEGALNOTICE="legalnotice",e.LEGALNOTICEHOME="legalnoticehome",e.LEGALNOTICEDEPARTMENT="legalnoticedepartment",e.LIVE="live",e.MOBILE_APPS="mobileapps",e.MOST_COMMENTED="mostcommented",e.MOST_READ="mostread",e.MOST_SHARED="mostshared",e.MOST_VIEWED="mostviewed",e.MOVIES="movies",e.NEWS="news",e.PARTNER="partner",e.PROGRAMME_TV_CHANNEL="programmetvchannel",e.PROGRAMME_TV_HOME="programmetvhome",e.PROGRAMME_TV_NOW="programmetvnow",e.PROGRAMME_TV_PROGRAM="programmetvprogram",e.PROGRAMME_TV_TOMORROW="programmetvtomorrow",e.REWIND="rewind",e.SEARCH="search",e.SECTION="section",e.SERVICE="service",e.SITEMAP="sitemap",e.SPORT="sport",e.STORY="story",e.TAG="tag",e.TRAFFIC="traffic",e.TV_HOME="tvhome",e.TV_LIVE="tvlive",e.TV_MOST_RECENT="tvmostrecent",e.TV_MOST_VIEWED="tvmostviewed",e.TV_SHOW="tvshow",e.TV_SHOWS="tvshows",e.TV_VIDEO="tvvideo",e.WEATHER="weather",e))(xo||{});new Set(Object.values(xo));var _o=(e=>(e.POOOL_ACCESS="poool-access",e.POOOL_ENGAGE="poool-engage",e.GOOGLE_SEARCH="google-search",e.DIGITEKA_VISIBLE_PLAYER="digiteka-visible-player",e.DIGITEKA_VIDEO_FEED="digiteka-video-feed",e.IDALGO="idalgo",e.NONLI="nonli",e.TABOOLA="taboola-sdk",e.MEDIEGO="mediego",e.BATCH="batch-sdk",e.VOXA_PLAYER="voxa-player",e))(_o||{});var So=()=>{(()=>{const e=document.getElementById("dialog-menu");e&&"mobile"===window.layout&&e.addEventListener("show",()=>{to({name:"menu",chapter1:"menu",chapter2:""})})})(),(()=>{const e=document.getElementById("dialog-comment");if(e&&"mobile"===window.layout){const{datalayerInfo:t={}}=window;e.addEventListener("show",()=>{to({name:`${t?.contentId}_${t?.contentTitle}`,chapter1:"commentaires"})})}})(),(()=>{if(window.datalayerInfo?.pageName!==xo.STORY||!window.history)return;const e=[],t=new IntersectionObserver(t=>{t.forEach(t=>{if(!t.isIntersecting)return;const n=t.target.getAttribute("id");n&&t.intersectionRatio>=0&&(e.includes(n)||(e.push(n),to({name:`${window.PianoPageInfo?.name}-${e.length}`})),window.history.pushState({},"",`#${n}`))})},{rootMargin:"-70px 0px -25% 0px"});document.querySelectorAll(".u-story-container").forEach(e=>{t.observe(e)})})()};const Eo=e=>{const t=document.createElement("script");if(t.type="text/javascript","async"===e.load?t.async=!0:"defer"===e.load&&(t.defer=!0),"src"in e&&e.src){const n=eval;t.src=e.src?.replace(/%(.*?)%/,(e,t)=>n(t))}e.name&&(performance.mark(`20mn:${e.name}:Start`),t.onerror=n=>{performance.mark(`20mn:${e.name}:Error`),console.error(`Script failed to load: ${e.name}${t.src?` (${t.src})`:""}`,n)}),(e.name||e.onLoad)&&(t.onload=()=>{e.name&&performance.mark(`20mn:${e.name}:End`),e.onLoad&&e.onLoad()}),"text"in e&&e.text&&(t.innerHTML=e.text),e.id&&(t.id=e.id),e.dataAttributes&&Object.entries(e.dataAttributes).forEach(([e,n])=>{var r;t.setAttribute(`data-${r=e,r.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}`,n)}),"head"===e.target&&document.head?document.head.appendChild(t):document.body?document.body.appendChild(t):(window.bodyScripts=window.bodyScripts||[],window.bodyScripts.push(t))},Co=(e,t)=>{const n=(n,r)=>{if(r&&window.__tcfapi&&("tcloaded"===n.eventStatus||"useractioncomplete"===n.eventStatus))try{t(),window.__tcfapi("removeEventListener",2,null,n.listenerId)}catch(t){t instanceof Error&&console.error(`Failed to initialize ${e}: ${t.message}`)}};window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(()=>{window.__tcfapi("addEventListener",2,n)})},ko=(e,t)=>{const n=window.thirdPartiesConfig?.conditional?.find(t=>Yi(t.name)===e);if(!n)throw new Error(`Script with name ${e} not found`);Eo({...n,...t})},Io=()=>{Co("Mediego",()=>{const e=window.Didomi;e.getCurrentUserStatus().purposes.cookies?.enabled&&e.getCurrentUserStatus().purposes.select_personalized_ads?.enabled&&ko(_o.MEDIEGO)})},Do=()=>{if(/Android/i.test(navigator.userAgent)){const e=document.createElement("div");e.setAttribute("id","bandeau-app-android"),document.body.appendChild(e)}else if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){const e=document.createElement("div");e.setAttribute("id","bandeau-app-ios"),document.body.appendChild(e)}},To=()=>{Co("Poool",()=>{const e=window.Didomi;e.getCurrentUserStatus().purposes.select_personalized_ads?.enabled||"article"!==window.datalayerInfo?.pageName||["production","publicommunique","magazine","guide-achat"].includes(window.datalayerInfo?.subType||"")||(e=>{try{ko(_o.POOOL_ACCESS)}catch(e){e instanceof Error&&console.error(e.message)}const t=document.querySelector('[src="https://static.20mn.fr/apps/poool/access.min.js"]');t?.addEventListener("load",()=>{const t=document.querySelector(".c-content"),n=document.createElement("div");n.setAttribute("id","paywall"),t?.parentNode?.insertBefore(n,t.nextSibling);const r=window.Access.init("C7B0O-ENPDW-DIJOO-VJO1M").config("locale","fr",!0).config({cookies_enabled:e.getCurrentUserStatus().purposes.select_personalized_ads?.enabled,debug:!0,context:"cookie-wall",default_widget:"gift",app_name:"Poool"}).config("ati_auto_tracking_enabled",!0).config("ati_tracking_method","events").config("auto_tracking_spec_v2",!0);r.on("consent",()=>{let e=new Date;const t=e.getTimezoneOffset();e=new Date(e.getTime()-60*t*1e3),localStorage.setItem("consent_validity_date",e.toISOString().split("T")[0]),window.Didomi.setUserAgreeToAll()});let i=!1;const o=document.querySelector("#cookie-banner");window.didomiEventListeners.push({event:"notice.hidden",listener(){window.didomiOnReady.push(e=>{i||(i=!0,r.config("cookies_enabled",e.getCurrentUserStatus().vendors["c:poool-VyhCit7N"]?.enabled),o&&o.setAttribute("style","position: fixed; z-index: 2; left: 0; right: 0; bottom: 0;"),r.createPaywall({target:"#cookie-banner",pageType:"premium"}))})}}),window.didomiOnReady.push(e=>{const t=e.getCurrentUserStatus().vendors["c:poool-VyhCit7N"]?.enabled;t&&(r.config("cookies_enabled",!0),o&&o.setAttribute("style","position: fixed; z-index: 3; left: 0; right: 0; bottom: 0;"),r.createPaywall({target:"#cookie-banner",pageType:"premium"}))}),o&&o.setAttribute("style","position: fixed; z-index: 3; left: 0; right: 0; bottom: 0;"),r.createPaywall({target:"#cookie-banner",pageType:"premium"})})})(e),(()=>{try{ko(_o.POOOL_ENGAGE)}catch(e){e instanceof Error&&console.error(e.message)}const e=Li("20mnUserInfo");Do();const t=document.querySelector('[src="https://assets.poool.fr/engage.min.js"]'),n=JSON.parse(decodeURIComponent(e?.replace(/'/g,'"')||"")).newsletters_registration??[];t?.addEventListener("load",()=>{const t=window.Engage.noConflict();window.Engage=t||window.Engage,window.Engage.init("C7B0O-ENPDW-DIJOO-VJO1M").autoCreate({filters:["{}"!==e?"connected":"disconnected",...n]})})})()})},No=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>window.__tcfapi("addEventListener",2,(e=>(t,n)=>{if(n&&("tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus)&&e.getCurrentUserStatus().purposes["mesureda-6qyqaZXC"]?.enabled&&e.getCurrentUserStatus().vendors["20minutes-bfbzKmzq"]?.enabled){const e=document.querySelector("#game-help-button");e&&e.addEventListener("click",()=>{try{window.$screeb("survey.start","9beafda1-5240-40eb-975f-fa2be61d1a38",{distribution_id:"1f117b33-3bc3-4136-baa6-f0ac2be83ef0"})}catch(e){console.error("Error while starting survey",e)}})}})(e)))},Lo=()=>{document.querySelectorAll(".taboola").length>0&&Co("Taboola",()=>{window._taboola=window._taboola||[],"article"===window.datalayerInfo?.pageName?window._taboola.push({article:"auto"}):window._taboola.push({other:"auto"}),ko(_o.TABOOLA,{dataAttributes:{darkMode:"dark"===document.documentElement.getAttribute("data-theme")?.toString()?"true":"false"}}),document.querySelectorAll(".taboola").forEach(e=>{const t=e.getAttribute("data-mode"),n=e.getAttribute("id"),r=e.getAttribute("data-placement"),i=e.getAttribute("data-target-type");t&&n&&r&&i?window._taboola.push({mode:t,container:n,placement:r,target_type:i}):console.warn("Issue with taboola placement")}),window._taboola.push({flush:!0})})},Bo=async()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(async e=>{if(!(e=>{try{const t=e.getCurrentUserStatus(),n=Object.values(t.purposes??{}),r=Object.values(t.vendors??{});return 0!==n.length&&0!==r.length&&n.every(e=>e.enabled)&&r.every(e=>e.enabled)}catch{return!1}})(e))return void localStorage.removeItem("etx-settings");if("article"!==window.datalayerInfo?.pageName)return;if(!window.datalayerInfo?.audioId||!window.datalayerInfo?.audioUrl)return void console.error("Audio ID or/and Audio URL is missing in datalayerInfo");const t=window.thirdPartiesConfig?.conditional?.find(e=>"voxa-player"===Yi(e.name));if(!t||!("src"in t))return void console.error("Voxa player script not found in thirdPartiesConfig");const{initETXPlayer:n}=await import(t.src);n({audioUrl:window.datalayerInfo.audioUrl,resourceId:window.datalayerInfo.audioId,contentTier:"free"})})},Po=(e=document)=>e.querySelectorAll('iframe[src*="www.ultimedia.com"], iframe[data-src*="www.ultimedia.com"]'),Oo=()=>Po().length+document.querySelectorAll('[src*="www.youtube.com"], [data-src*="www.youtube.com"]').length+document.querySelectorAll('[src*="www.dailymotion.com"], [data-src*="www.dailymotion.com"]').length+document.querySelectorAll('[src*="www.brut.media"], [data-src*="www.brut.media"]').length,Mo=()=>{const e=[];return Oo()>0&&e.push("video"),(()=>{let e;switch(window.datalayerInfo?.pageName){case xo.ARTICLE:e=document.querySelectorAll(".c-content");break;case xo.LIVE:e=document.querySelectorAll(".js-post")}return!!e&&Array.from(e).some(e=>e.querySelectorAll("img").length>0)})()&&e.push("photo"),document.querySelectorAll('.pi-player, a[href*="https://play.acast.com/"], iframe[src*="https://embed.acast.com/"], iframe[data-src*="https://embed.acast.com/"], iframe[src*="https://podcasts.20minutes.fr/"], iframe[data-src*="https://podcasts.20minutes.fr/"]').length>0&&e.push("podcast"),e},jo=()=>Li("20mnUserDataLayer")?JSON.parse(decodeURIComponent(Li("20mnUserDataLayer"))):null,Fo=async()=>{const e=jo();return e?.i?(async e=>{const t=(new TextEncoder).encode(e),n=await window.crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,"0")).join("")})(String(e.i)):""},Ro=async()=>{const e=jo();if(!e?.d)return"";const t=e.d;if(!t||"string"!=typeof t)return"";let n=t;t.length>6&&t.startsWith("000")&&t.endsWith("000")&&(n=t.slice(3,-3));const r=parseInt(n,10);return Number.isNaN(r)?"":r>=18&&r<=24?"1":r>=25&&r<=34?"2":r>=35&&r<=49?"3":r>=50&&r<=64?"4":r>=65?"5":""},qo=async()=>{const e=jo(),t=e?.g;if(!t)return"";switch(Number(t)){case 1:return"B";case 2:return"A";default:return""}},zo=async()=>{const e=jo(),t=e?.l;if(!t||"string"!=typeof t)return"";if(t.length>4&&t.startsWith("00")&&t.endsWith("00")){return t.slice(2,-2)}return t},Ho=()=>{let e=0;switch(window.datalayerInfo?.pageName){case xo.ARTICLE:t=".c-content",e=document.querySelectorAll(`${t} > p`).length;break;case xo.LIVE:e=window.datalayerInfo?.livePosts??0}var t;return e.toString()},Ko=()=>{return window.datalayerInfo?.pageName===xo.ARTICLE?(e=".c-content",[...document.querySelectorAll(`${e} > p`)].reduce((e,t)=>e+t.innerHTML.length,0)).toString():"0";var e},Uo=()=>{const e=window.datalayerInfo;return e?e.pageName&&[xo.GAMEHOME,xo.GAME_APP,xo.GAME].includes(e.pageName)?["categorie-jeux"]:e.tagsSlug?e.tagsSlug.split("|").filter(e=>e):[]:[]},Vo=()=>{const e=window.datalayerInfo;return e?e.pageName&&[xo.GAMEHOME,xo.GAME_APP,xo.GAME].includes(e.pageName)?["services","jeux"]:e.breadcrumb?e.breadcrumb:[]:[]},Qo=async()=>{try{window.wamid="10069",window.typ="1",window.WfirstParty=!0,window.Wam2gamConf={token:"Gi2z6jGZBNYt",cookieless:!1,useXdevice:!0},window.WextraIDsConfs=[{name:"firstId"},{name:"utiqId"}],await(async()=>{const e=window.datalayerInfo;if(!e)return;const t={URL:e.pageUri||"",title_article:e.contentTitle||"",editor_group:"20minutes",environnement:"20minutes",keywords:`[${Uo().join(",")}]`,topics:`[${Vo().join(",")}]`,publication_date:e.publicationDate?Ri(e.publicationDate):"",media_enrichment:`[${Mo().join(",")}]`,blocked_article:"0",premium_article:"0",length_words:Ko(),nb_paragraph:Ho(),reading_time:"",sponsored:["production","publicommunique","magazine","guide-achat"].includes(window.datalayerInfo?.subType||"")?"1":"0",sponsored_by:"",editor_user_id:"",website_user_id:await Fo()||"",inscription_date:"",user_connected:"{}"!==Li("20mnUserInfo")?"1":"0",user_subscriber:"0",type_subscription:"[]",navigation:window.layout||"",INSEE_code:e.inseeCode||"",zipcode:"",departement_id:"",departement_label:"",city:"",id_crm:await Fo()||"",email_hashed:"",TRE:await qo()||"",TGE:await Ro()||"",IDP:await zo()||"",consent_366:"1"};window.Wvar=[];for(const[e,n]of Object.entries(t))window.Wvar.push(e,n)})()}catch(e){console.error("Error initializing Weborama data:",e)}},Wo=async()=>{await Qo();try{Co("Weborama",()=>{window.Didomi.getCurrentUserStatus().purposes["publicite-9qedKJMX"].enabled&&window.Didomi.getCurrentUserStatus().vendors.weborama?.enabled&&window.Didomi.getCurrentUserStatus().vendors["366sas-U9KhdfCC"]?.enabled&&Eo({name:"Weborama SDK",load:"async",src:`//cstatic.weborama.fr/js/wam/customers/wamfactory_dpm.wildcard.min.js?rnd=${Date.now()}`})})}catch(e){console.error("Error initializing Weborama:",e)}};var Go=()=>{(()=>{const e=document.querySelector(".js-close-article-btn");e&&window?.location&&window?.envVariables?.pageEndpoint&&e.addEventListener("click",()=>{eo({name:"close_content",type:"action",customProps:{cta_context:"content",cta_type:"button",cta_destination:"home",cta_engagement:1}}),window.location.assign(window.envVariables.pageEndpoint)})})()};const Zo=async({url:e,options:t})=>{const n={...t||{}},r=new Headers(n.headers);r.has("Content-Type")||r.set("Content-Type","application/json"),n.headers=r;const i=await fetch(e,n).then(e=>{if(e.ok)return e;throw new Error(`Fetch error: ${e.statusText}`)}).then(e=>r.get("Content-Type")?.toLowerCase()?.includes("image/svg+xml")?e.text():e.json());return"object"==typeof i&&null!==i&&"data"in i?i.data:i};var Yo=(e=>(e.UNKNOWN="Non connu",e.SLIDESHOW_COVER="Slideshow cover",e.SLIDESHOW_COVER_LISTING_PAGE="Slideshow listing page",e.SLIDESHOW_PAGE="Slideshow page",e.ARTICLE="article",e.MISC="divers",e.HOME="home",e.LIVE="live",e.SECTION="section",e.TAG="tag",e.JOBS="home_metier",e.JOB_DETAILS="fiche_metier",e.WEATHER="weather",e.TRAFFIC="traffic",e.HOROSCOPE="horoscope",e.HOROSCOPE_HOME="horoscopehome",e.NUMEROLOGY="numerology",e.NUMEROLOGY_HOME="numerologyhome",e))(Yo||{});const Jo=e=>{switch(e){case"page_type":case"content_type":if(window.datalayerInfo?.pageName&&Object.values(xo).includes(window.datalayerInfo?.pageName))switch(window.datalayerInfo?.pageName){case xo.HOME:return"homepage";case xo.TAG:return Yo.HOME;case xo.JOBS:return Yo.JOBS;case xo.JOB_DETAILS:return Yo.JOB_DETAILS;case xo.ASTRO:return Yo.HOROSCOPE;case xo.ASTRO_HOME:return Yo.HOROSCOPE_HOME;default:return window.datalayerInfo?.pageName}return Yo.MISC;case"content_id":return window.datalayerInfo?.contentId??window.datalayerInfo?.tagId??window.datalayerInfo?.jobId??void 0;case"tags":if(window.datalayerInfo?.elections&&(window.datalayerInfo?.pageName===xo.ELECTIONS||window.datalayerInfo?.pageName===xo.ELECTIONSHOME)){const{national:e,region:t,department:n,town:r}=window.datalayerInfo.elections||{};return[e?"national":void 0,t,n,r].filter(Boolean).join(",")}return window.datalayerInfo?.tagsSlug?window.datalayerInfo.tagsSlug.replace(/\|/g,","):Yi(window.datalayerInfo?.tagName??"","_")||void 0;case"category":return!window.datalayerInfo?.elections||window.datalayerInfo?.pageName!==xo.ELECTIONS&&window.datalayerInfo?.pageName!==xo.ELECTIONSHOME?window.datalayerInfo?.breadcrumb?.[0]?"Divertissement"===window.datalayerInfo?.breadcrumb[0]?"arts-stars":Yi(window.datalayerInfo?.breadcrumb[0]):window.datalayerInfo?.pageName===xo.ASTRO||window.datalayerInfo?.pageName===xo.ASTRO_HOME?Yi(window.datalayerInfo?.pageName===xo.ASTRO?"horoscope":"horoscopehome"):window.datalayerInfo?.sectionLabel?Yi(window.datalayerInfo.sectionLabel):void 0:"elections";case"subcategory":if(window.datalayerInfo?.elections&&(window.datalayerInfo?.pageName===xo.ELECTIONS||window.datalayerInfo?.pageName===xo.ELECTIONSHOME))return"resultats";if(window.datalayerInfo?.breadcrumb&&window.datalayerInfo?.breadcrumb.length>1){const e=Yi(window.datalayerInfo.breadcrumb[window.datalayerInfo.breadcrumb.length-(window.datalayerInfo?.pageName===xo.TAG?2:1)]);return e===Yi(window.datalayerInfo?.breadcrumb[0])?Yi(window.datalayerInfo?.tagName??"")||void 0:e||void 0}return;case"content_slug":return window.datalayerInfo?.contentTitle?Yi(window.datalayerInfo.contentTitle):void 0;case"brand_safety":return window.datalayerInfo?.sentiment;case"has_video":return void 0!==window.partnerFeatures?.enableDisplayOnHeaderAd?window.partnerFeatures.enableDisplayOnHeaderAd.toString():void 0;case"device":return window.layout??void 0;default:return}},$o=()=>`category=${Jo("category")}&sub_category=${Jo("subcategory")}&tags=${Jo("tags")}&content_id=${Jo("content_id")}&brand_safety=${Jo("brand_safety")}&page_type=${Jo("page_type")}&pos=instream`;var Xo=()=>{(()=>{const e=Po(),t=window.datalayerInfo||{};0!==Object.keys(t).length&&0!==e.length&&e.forEach(e=>{const t=e.getAttribute("data-src");if(!t)return;const{origin:n,pathname:r,searchParams:i}=new URL(t),o=`${n}${r}`,a=$o();i.append("tagparam",a),e.setAttribute("data-src",`${o}?${i.toString()}`)})})(),window.layout===lr.MOBILE&&(()=>{const e=Po();e&&e.forEach(e=>{const t=e.getAttribute("data-src");if(!t)return;const{origin:n,pathname:r,search:i}=new URL(t),o=`${n}${r}`.replace(/\/chromeless\/1$/,"").replace(/\/$/,"");e.setAttribute("data-src",`${o}/chromeless/1${i}`)})})(),(()=>{const e=window.datalayerInfo?.pageName,t=[xo.TV_HOME,xo.MOST_READ];if(!(window.layout!==lr.DESKTOP||e&&t.includes(e)))return;try{ko(_o.DIGITEKA_VIDEO_FEED)}catch(e){e instanceof Error&&console.error(e.message)}const n=$o(),r=[`MDTK_videofeed_custparams="${n}";`,`MDTK_videofeed_targetings="${n}";`,'MDTK_videofeed = "01100132";',document.querySelectorAll('div[class*="c-content"] iframe[data-src*="www.ultimedia.com"], div[class*="c-content"] iframe[src*="www.ultimedia.com"]').length>0&&window.layout===lr.DESKTOP?"CARROUSEL_videofeed=true;":"",'MDTK_videofeed_adunit_path="/31755961/20minutes_webmobile/display_mobile_vertical";','MDTK_videofeed_adunit_path_interstitial="/31755961/20minutes_webmobile/intrastitiel_dtk";'];Eo({text:r.join("")})})(),(()=>{const e=Po();0!==e.length&&e.forEach(e=>{const t=e.getAttribute("data-src");t&&(e.setAttribute("src",t),e.removeAttribute("data-src"))})})()};const ea=({src:e,timeout:t,loadingText:n,theme:r,...i})=>an.jsx($n,{as:"section","data-theme":r||"light","data-idalgo-loader-src":e,"data-idalgo-timeout":t||"5000","data-idalgo-loader-loading-text":n||"Widget en cours de chargement…",...i}),ta=({articles:e,linksSize:t,seeMoreButton:n,...r})=>0===e.length?null:an.jsxs(an.Fragment,{children:[an.jsx(tr,{colsNumber:{xs:1,md:3},...r,as:"ul",gapY:"xxl-2",gapX:"l",px:{xs:"m",md:"0"},children:e.map((e,n)=>an.jsx(nr,{href:e.url,color:"black",size:t||"xs",children:an.jsx("li",{children:e.title})},`${e.url}-${n}`))}),n&&an.jsx(Xn,{justifyContent:"center",px:{xs:"m",md:"0"},mt:"l",children:an.jsx(Nn,{...n})})]});var na,ra,ia,oa,aa,sa,la,ca,ua,da,ha,pa,fa,ma,ga,ya,va,Aa,ba,wa,xa,_a,Sa,Ea,Ca,ka,Ia,Da,Ta,Na,La,Ba,Pa,Oa,Ma,ja,Fa,Ra,qa,za,Ha,Ka,Ua,Va,Qa,Wa,Ga,Za,Ya,Ja,$a,Xa,es,ts,ns,rs,is,os,as,ss,ls,cs,us,ds,hs,ps,fs,ms,gs,ys,vs,As,bs,ws,xs,_s,Ss,Es,Cs,ks,Is,Ds,Ts,Ns,Ls,Bs,Ps,Os,Ms,js,Fs,Rs,qs,zs={exports:{}};function Hs(){return na||(na=1,zs.exports=function(){var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:W(e)}function r(e){return s(e)?e:G(e)}function i(e){return l(e)?e:Z(e)}function o(e){return a(e)&&!c(e)?e:Y(e)}function a(e){return!(!e||!e[d])}function s(e){return!(!e||!e[h])}function l(e){return!(!e||!e[p])}function c(e){return s(e)||l(e)}function u(e){return!(!e||!e[f])}t(r,n),t(i,n),t(o,n),n.isIterable=a,n.isKeyed=s,n.isIndexed=l,n.isAssociative=c,n.isOrdered=u,n.Keyed=r,n.Indexed=i,n.Set=o;var d="@@__IMMUTABLE_ITERABLE__@@",h="@@__IMMUTABLE_KEYED__@@",p="@@__IMMUTABLE_INDEXED__@@",f="@@__IMMUTABLE_ORDERED__@@",m="delete",g=5,y=1<<g,v=y-1,A={},b={value:!1},w={value:!1};function x(e){return e.value=!1,e}function _(e){e&&(e.value=!0)}function S(){}function E(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function C(e){return void 0===e.size&&(e.size=e.__iterate(I)),e.size}function k(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?C(e)+t:t}function I(){return!0}function D(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function T(e,t){return L(e,t,0)}function N(e,t){return L(e,t,t)}function L(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var B=0,P=1,O=2,M="function"==typeof Symbol&&Symbol.iterator,j="@@iterator",F=M||j;function R(e){this.next=e}function q(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function z(){return{value:void 0,done:!0}}function H(e){return!!V(e)}function K(e){return e&&"function"==typeof e.next}function U(e){var t=V(e);return t&&t.call(e)}function V(e){var t=e&&(M&&e[M]||e[j]);if("function"==typeof t)return t}function Q(e){return e&&"number"==typeof e.length}function W(e){return null==e?ae():a(e)?e.toSeq():ce(e)}function G(e){return null==e?ae().toKeyedSeq():a(e)?s(e)?e.toSeq():e.fromEntrySeq():se(e)}function Z(e){return null==e?ae():a(e)?s(e)?e.entrySeq():e.toIndexedSeq():le(e)}function Y(e){return(null==e?ae():a(e)?s(e)?e.entrySeq():e:le(e)).toSetSeq()}R.prototype.toString=function(){return"[Iterator]"},R.KEYS=B,R.VALUES=P,R.ENTRIES=O,R.prototype.inspect=R.prototype.toSource=function(){return this.toString()},R.prototype[F]=function(){return this},t(W,n),W.of=function(){return W(arguments)},W.prototype.toSeq=function(){return this},W.prototype.toString=function(){return this.__toString("Seq {","}")},W.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},W.prototype.__iterate=function(e,t){return de(this,e,t,!0)},W.prototype.__iterator=function(e,t){return he(this,e,t,!0)},t(G,W),G.prototype.toKeyedSeq=function(){return this},t(Z,W),Z.of=function(){return Z(arguments)},Z.prototype.toIndexedSeq=function(){return this},Z.prototype.toString=function(){return this.__toString("Seq [","]")},Z.prototype.__iterate=function(e,t){return de(this,e,t,!1)},Z.prototype.__iterator=function(e,t){return he(this,e,t,!1)},t(Y,W),Y.of=function(){return Y(arguments)},Y.prototype.toSetSeq=function(){return this},W.isSeq=oe,W.Keyed=G,W.Set=Y,W.Indexed=Z;var J,$,X,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function ie(e){this._iterator=e,this._iteratorCache=[]}function oe(e){return!(!e||!e[ee])}function ae(){return J||(J=new te([]))}function se(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():K(e)?new ie(e).fromEntrySeq():H(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function le(e){var t=ue(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=ue(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function ue(e){return Q(e)?new te(e):K(e)?new ie(e):H(e)?new re(e):void 0}function de(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[n?o-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function he(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new R(function(){var e=i[n?o-a:a];return a++>o?z():q(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function pe(e,t){return t?fe(t,e,"",{"":e}):me(e)}function fe(e,t,n,r){return Array.isArray(t)?e.call(r,n,Z(t).map(function(n,r){return fe(e,n,r,t)})):ge(t)?e.call(r,n,G(t).map(function(n,r){return fe(e,n,r,t)})):t}function me(e){return Array.isArray(e)?Z(e).map(me).toList():ge(e)?G(e).map(me).toMap():e}function ge(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ye(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ve(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||l(e)!==l(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(u(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&ye(i[1],e)&&(n||ye(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var d=!0,h=t.__iterate(function(t,r){if(n?!e.has(t):i?!ye(t,e.get(r,A)):!ye(e.get(r,A),t))return d=!1,!1});return d&&e.size===h}function Ae(e,t){if(!(this instanceof Ae))return new Ae(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if($)return $;$=this}}function be(e,t){if(!e)throw new Error(t)}function we(e,t,n){if(!(this instanceof we))return new we(e,t,n);if(be(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(X)return X;X=this}}function xe(){throw TypeError("Abstract")}function _e(){}function Se(){}function Ee(){}W.prototype[ee]=!0,t(te,Z),te.prototype.get=function(e,t){return this.has(e)?this._array[k(this,e)]:t},te.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,i=0;i<=r;i++)if(!1===e(n[t?r-i:i],i,this))return i+1;return i},te.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,i=0;return new R(function(){return i>r?z():q(e,i,n[t?r-i++:i++])})},t(ne,G),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(!1===e(n[a],a,this))return o+1}return o},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new R(function(){var a=r[t?i-o:o];return o++>i?z():q(e,a,n[a])})},ne.prototype[f]=!0,t(re,Z),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=U(this._iterable),r=0;if(K(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=U(this._iterable);if(!K(n))return new R(z);var r=0;return new R(function(){var t=n.next();return t.done?t:q(e,r++,t.value)})},t(ie,Z),ie.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(!1===e(i[o],o++,this))return o;for(;!(n=r.next()).done;){var a=n.value;if(i[o]=a,!1===e(a,o++,this))break}return o},ie.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,i=0;return new R(function(){if(i>=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return q(e,i,r[i++])})},t(Ae,Z),Ae.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Ae.prototype.get=function(e,t){return this.has(e)?this._value:t},Ae.prototype.includes=function(e){return ye(this._value,e)},Ae.prototype.slice=function(e,t){var n=this.size;return D(e,t,n)?this:new Ae(this._value,N(t,n)-T(e,n))},Ae.prototype.reverse=function(){return this},Ae.prototype.indexOf=function(e){return ye(this._value,e)?0:-1},Ae.prototype.lastIndexOf=function(e){return ye(this._value,e)?this.size:-1},Ae.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},Ae.prototype.__iterator=function(e,t){var n=this,r=0;return new R(function(){return r<n.size?q(e,r++,n._value):z()})},Ae.prototype.equals=function(e){return e instanceof Ae?ye(this._value,e._value):ve(e)},t(we,Z),we.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},we.prototype.get=function(e,t){return this.has(e)?this._start+k(this,e)*this._step:t},we.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},we.prototype.slice=function(e,t){return D(e,t,this.size)?this:(e=T(e,this.size),(t=N(t,this.size))<=e?new we(0,0):new we(this.get(e,this._end),this.get(t,this._end),this._step))},we.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},we.prototype.lastIndexOf=function(e){return this.indexOf(e)},we.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;o<=n;o++){if(!1===e(i,o,this))return o+1;i+=t?-r:r}return o},we.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;return new R(function(){var a=i;return i+=t?-r:r,o>n?z():q(e,o++,a)})},we.prototype.equals=function(e){return e instanceof we?this._start===e._start&&this._end===e._end&&this._step===e._step:ve(this,e)},t(xe,n),t(_e,xe),t(Se,xe),t(Ee,xe),xe.Keyed=_e,xe.Indexed=Se,xe.Set=Ee;var Ce="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ke(e){return e>>>1&1073741824|3221225471&e}function Ie(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return ke(n)}if("string"===t)return e.length>Re?De(e):Te(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Ne(e);if("function"==typeof e.toString)return Te(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function De(e){var t=He[e];return void 0===t&&(t=Te(e),ze===qe&&(ze=0,He={}),ze++,He[e]=t),t}function Te(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return ke(t)}function Ne(e){var t;if(Me&&void 0!==(t=Oe.get(e)))return t;if(void 0!==(t=e[Fe]))return t;if(!Be){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Fe]))return t;if(void 0!==(t=Pe(e)))return t}if(t=++je,1073741824&je&&(je=0),Me)Oe.set(e,t);else{if(void 0!==Le&&!1===Le(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Be)Object.defineProperty(e,Fe,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Fe]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Fe]=t}}return t}var Le=Object.isExtensible,Be=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Pe(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Oe,Me="function"==typeof WeakMap;Me&&(Oe=new WeakMap);var je=0,Fe="__immutablehash__";"function"==typeof Symbol&&(Fe=Symbol(Fe));var Re=16,qe=255,ze=0,He={};function Ke(e){be(e!==1/0,"Cannot perform this action with an infinite size.")}function Ue(e){return null==e?it():Ve(e)&&!u(e)?e:it().withMutations(function(t){var n=r(e);Ke(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function Ve(e){return!(!e||!e[We])}t(Ue,_e),Ue.of=function(){var t=e.call(arguments,0);return it().withMutations(function(e){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}})},Ue.prototype.toString=function(){return this.__toString("Map {","}")},Ue.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ue.prototype.set=function(e,t){return ot(this,e,t)},Ue.prototype.setIn=function(e,t){return this.updateIn(e,A,function(){return t})},Ue.prototype.remove=function(e){return ot(this,e,A)},Ue.prototype.deleteIn=function(e){return this.updateIn(e,function(){return A})},Ue.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Ue.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=gt(this,xn(e),t,n);return r===A?void 0:r},Ue.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):it()},Ue.prototype.merge=function(){return ht(this,void 0,arguments)},Ue.prototype.mergeWith=function(t){return ht(this,t,e.call(arguments,1))},Ue.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,it(),function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]})},Ue.prototype.mergeDeep=function(){return ht(this,pt,arguments)},Ue.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return ht(this,ft(t),n)},Ue.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,it(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]})},Ue.prototype.sort=function(e){return Ht(dn(this,e))},Ue.prototype.sortBy=function(e,t){return Ht(dn(this,t,e))},Ue.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ue.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new S)},Ue.prototype.asImmutable=function(){return this.__ensureOwner()},Ue.prototype.wasAltered=function(){return this.__altered},Ue.prototype.__iterator=function(e,t){return new et(this,e,t)},Ue.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},Ue.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ue.isMap=Ve;var Qe,We="@@__IMMUTABLE_MAP__@@",Ge=Ue.prototype;function Ze(e,t){this.ownerID=e,this.entries=t}function Ye(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Je(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function $e(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Xe(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return q(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var i=Object.create(Ge);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function it(){return Qe||(Qe=rt(0))}function ot(e,t,n){var r,i;if(e._root){var o=x(b),a=x(w);if(r=at(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===A?-1:1:0)}else{if(n===A)return e;i=1,r=new Ze(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(i,r):it()}function at(e,t,n,r,i,o,a,s){return e?e.update(t,n,r,i,o,a,s):o===A?e:(_(s),_(a),new Xe(t,r,[i,o]))}function st(e){return e.constructor===Xe||e.constructor===$e}function lt(e,t,n,r,i){if(e.keyHash===r)return new $e(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&v,s=(0===n?r:r>>>n)&v;return new Ye(t,1<<a|1<<s,a===s?[lt(e,t,n+g,r,i)]:(o=new Xe(t,r,i),a<s?[e,o]:[o,e]))}function ct(e,t,n,r){e||(e=new S);for(var i=new Xe(e,Ie(n),[n,r]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}function ut(e,t,n,r){for(var i=0,o=0,a=new Array(n),s=0,l=1,c=t.length;s<c;s++,l<<=1){var u=t[s];void 0!==u&&s!==r&&(i|=l,a[o++]=u)}return new Ye(e,i,a)}function dt(e,t,n,r,i){for(var o=0,a=new Array(y),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new Je(e,o+1,a)}function ht(e,t,n){for(var i=[],o=0;o<n.length;o++){var s=n[o],l=r(s);a(s)||(l=l.map(function(e){return pe(e)})),i.push(l)}return mt(e,t,i)}function pt(e,t,n){return e&&e.mergeDeep&&a(t)?e.mergeDeep(t):ye(e,t)?e:t}function ft(e){return function(t,n,r){if(t&&t.mergeDeepWith&&a(n))return t.mergeDeepWith(e,n);var i=e(t,n,r);return ye(t,i)?t:i}}function mt(e,t,n){return n=n.filter(function(e){return 0!==e.size}),0===n.length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations(function(e){for(var r=t?function(n,r){e.update(r,A,function(e){return e===A?n:t(e,n,r)})}:function(t,n){e.set(n,t)},i=0;i<n.length;i++)n[i].forEach(r)}):e.constructor(n[0])}function gt(e,t,n,r){var i=e===A,o=t.next();if(o.done){var a=i?n:e,s=r(a);return s===a?e:s}be(i||e&&e.set,"invalid keyPath");var l=o.value,c=i?A:e.get(l,A),u=gt(c,t,n,r);return u===c?e:u===A?e.remove(l):(i?it():e).set(l,u)}function yt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function vt(e,t,n,r){var i=r?e:E(e);return i[t]=n,i}function At(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,s=0;s<i;s++)s===t?(o[s]=n,a=-1):o[s]=e[s+a];return o}function bt(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a<r;a++)a===t&&(o=1),i[a]=e[a+o];return i}Ge[We]=!0,Ge[m]=Ge.remove,Ge.removeIn=Ge.deleteIn,Ze.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ye(n,i[o][0]))return i[o][1];return r},Ze.prototype.update=function(e,t,n,r,i,o,a){for(var s=i===A,l=this.entries,c=0,u=l.length;c<u&&!ye(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===i:s)return this;if(_(a),(s||!d)&&_(o),!s||1!==l.length){if(!d&&!s&&l.length>=wt)return ct(e,l,r,i);var h=e&&e===this.ownerID,p=h?l:E(l);return d?s?c===u-1?p.pop():p[c]=p.pop():p[c]=[r,i]:p.push([r,i]),h?(this.entries=p,this):new Ze(e,p)}},Ye.prototype.get=function(e,t,n,r){void 0===t&&(t=Ie(n));var i=1<<((0===e?t:t>>>e)&v),o=this.bitmap;return 0===(o&i)?r:this.nodes[yt(o&i-1)].get(e+g,t,n,r)},Ye.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=Ie(r));var s=(0===t?n:n>>>t)&v,l=1<<s,c=this.bitmap,u=0!==(c&l);if(!u&&i===A)return this;var d=yt(c&l-1),h=this.nodes,p=u?h[d]:void 0,f=at(p,e,t+g,n,r,i,o,a);if(f===p)return this;if(!u&&f&&h.length>=xt)return dt(e,h,c,s,f);if(u&&!f&&2===h.length&&st(h[1^d]))return h[1^d];if(u&&f&&1===h.length&&st(f))return f;var m=e&&e===this.ownerID,y=u?f?c:c^l:c|l,b=u?f?vt(h,d,f,m):bt(h,d,m):At(h,d,f,m);return m?(this.bitmap=y,this.nodes=b,this):new Ye(e,y,b)},Je.prototype.get=function(e,t,n,r){void 0===t&&(t=Ie(n));var i=(0===e?t:t>>>e)&v,o=this.nodes[i];return o?o.get(e+g,t,n,r):r},Je.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=Ie(r));var s=(0===t?n:n>>>t)&v,l=i===A,c=this.nodes,u=c[s];if(l&&!u)return this;var d=at(u,e,t+g,n,r,i,o,a);if(d===u)return this;var h=this.count;if(u){if(!d&&--h<_t)return ut(e,c,h,s)}else h++;var p=e&&e===this.ownerID,f=vt(c,s,d,p);return p?(this.count=h,this.nodes=f,this):new Je(e,h,f)},$e.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ye(n,i[o][0]))return i[o][1];return r},$e.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=Ie(r));var s=i===A;if(n!==this.keyHash)return s?this:(_(a),_(o),lt(this,e,t,n,[r,i]));for(var l=this.entries,c=0,u=l.length;c<u&&!ye(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===i:s)return this;if(_(a),(s||!d)&&_(o),s&&2===u)return new Xe(e,this.keyHash,l[1^c]);var h=e&&e===this.ownerID,p=h?l:E(l);return d?s?c===u-1?p.pop():p[c]=p.pop():p[c]=[r,i]:p.push([r,i]),h?(this.entries=p,this):new $e(e,this.keyHash,p)},Xe.prototype.get=function(e,t,n,r){return ye(n,this.entry[0])?this.entry[1]:r},Xe.prototype.update=function(e,t,n,r,i,o,a){var s=i===A,l=ye(r,this.entry[0]);return(l?i===this.entry[1]:s)?this:(_(a),s?void _(o):l?e&&e===this.ownerID?(this.entry[1]=i,this):new Xe(e,this.keyHash,[r,i]):(_(o),lt(this,e,t,Ie(r),[r,i])))},Ze.prototype.iterate=$e.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},Ye.prototype.iterate=Je.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[t?i-r:r];if(o&&!1===o.iterate(e,t))return!1}},Xe.prototype.iterate=function(e,t){return e(this.entry)},t(et,R),et.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,i=t.index++;if(r.entry){if(0===i)return tt(e,r.entry)}else if(r.entries){if(i<=(n=r.entries.length-1))return tt(e,r.entries[this._reverse?n-i:i])}else if(i<=(n=r.nodes.length-1)){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return tt(e,o.entry);t=this._stack=nt(o,t)}continue}t=this._stack=this._stack.__prev}return z()};var wt=y/4,xt=y/2,_t=y/4;function St(e){var t=Pt();if(null==e)return t;if(Et(e))return e;var n=i(e),r=n.size;return 0===r?t:(Ke(r),r>0&&r<y?Bt(0,r,g,null,new It(n.toArray())):t.withMutations(function(e){e.setSize(r),n.forEach(function(t,n){return e.set(n,t)})}))}function Et(e){return!(!e||!e[Ct])}t(St,Se),St.of=function(){return this(arguments)},St.prototype.toString=function(){return this.__toString("List [","]")},St.prototype.get=function(e,t){if((e=k(this,e))>=0&&e<this.size){var n=Ft(this,e+=this._origin);return n&&n.array[e&v]}return t},St.prototype.set=function(e,t){return Ot(this,e,t)},St.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},St.prototype.insert=function(e,t){return this.splice(e,0,t)},St.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=g,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Pt()},St.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){Rt(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},St.prototype.pop=function(){return Rt(this,0,-1)},St.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){Rt(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},St.prototype.shift=function(){return Rt(this,1)},St.prototype.merge=function(){return qt(this,void 0,arguments)},St.prototype.mergeWith=function(t){return qt(this,t,e.call(arguments,1))},St.prototype.mergeDeep=function(){return qt(this,pt,arguments)},St.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return qt(this,ft(t),n)},St.prototype.setSize=function(e){return Rt(this,0,e)},St.prototype.slice=function(e,t){var n=this.size;return D(e,t,n)?this:Rt(this,T(e,n),N(t,n))},St.prototype.__iterator=function(e,t){var n=0,r=Lt(this,t);return new R(function(){var t=r();return t===Nt?z():q(e,n++,t)})},St.prototype.__iterate=function(e,t){for(var n,r=0,i=Lt(this,t);(n=i())!==Nt&&!1!==e(n,r++,this););return r},St.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Bt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},St.isList=Et;var Ct="@@__IMMUTABLE_LIST__@@",kt=St.prototype;function It(e,t){this.array=e,this.ownerID=t}kt[Ct]=!0,kt[m]=kt.remove,kt.setIn=Ge.setIn,kt.deleteIn=kt.removeIn=Ge.removeIn,kt.update=Ge.update,kt.updateIn=Ge.updateIn,kt.mergeIn=Ge.mergeIn,kt.mergeDeepIn=Ge.mergeDeepIn,kt.withMutations=Ge.withMutations,kt.asMutable=Ge.asMutable,kt.asImmutable=Ge.asImmutable,kt.wasAltered=Ge.wasAltered,It.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&v;if(r>=this.array.length)return new It([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-g,n))===a&&o)return this}if(o&&!i)return this;var s=jt(this,e);if(!o)for(var l=0;l<r;l++)s.array[l]=void 0;return i&&(s.array[r]=i),s},It.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,i=n-1>>>t&v;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-g,n))===o&&i===this.array.length-1)return this}var a=jt(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var Dt,Tt,Nt={};function Lt(e,t){var n=e._origin,r=e._capacity,i=zt(r),o=e._tail;return a(e._root,e._level,0);function a(e,t,n){return 0===t?s(e,n):l(e,t,n)}function s(e,a){var s=a===i?o&&o.array:e&&e.array,l=a>n?0:n-a,c=r-a;return c>y&&(c=y),function(){if(l===c)return Nt;var e=t?--c:l++;return s&&s[e]}}function l(e,i,o){var s,l=e&&e.array,c=o>n?0:n-o>>i,u=1+(r-o>>i);return u>y&&(u=y),function(){for(;;){if(s){var e=s();if(e!==Nt)return e;s=null}if(c===u)return Nt;var n=t?--u:c++;s=a(l&&l[n],i-g,o+(n<<i))}}}}function Bt(e,t,n,r,i,o,a){var s=Object.create(kt);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=i,s.__ownerID=o,s.__hash=a,s.__altered=!1,s}function Pt(){return Dt||(Dt=Bt(0,0,g))}function Ot(e,t,n){if((t=k(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?Rt(e,t).set(0,n):Rt(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o=x(w);return t>=zt(e._capacity)?r=Mt(r,e.__ownerID,0,t,n,o):i=Mt(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Bt(e._origin,e._capacity,e._level,i,r):e}function Mt(e,t,n,r,i,o){var a,s=r>>>n&v,l=e&&s<e.array.length;if(!l&&void 0===i)return e;if(n>0){var c=e&&e.array[s],u=Mt(c,t,n-g,r,i,o);return u===c?e:((a=jt(e,t)).array[s]=u,a)}return l&&e.array[s]===i?e:(_(o),a=jt(e,t),void 0===i&&s===a.array.length-1?a.array.pop():a.array[s]=i,a)}function jt(e,t){return t&&e&&t===e.ownerID?e:new It(e?e.array.slice():[],t)}function Ft(e,t){if(t>=zt(e._capacity))return e._tail;if(t<1<<e._level+g){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&v],r-=g;return n}}function Rt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new S,i=e._origin,o=e._capacity,a=i+t,s=void 0===n?o:n<0?o+n:i+n;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var l=e._level,c=e._root,u=0;a+u<0;)c=new It(c&&c.array.length?[void 0,c]:[],r),u+=1<<(l+=g);u&&(a+=u,i+=u,s+=u,o+=u);for(var d=zt(o),h=zt(s);h>=1<<l+g;)c=new It(c&&c.array.length?[c]:[],r),l+=g;var p=e._tail,f=h<d?Ft(e,s-1):h>d?new It([],r):p;if(p&&h>d&&a<o&&p.array.length){for(var m=c=jt(c,r),y=l;y>g;y-=g){var A=d>>>y&v;m=m.array[A]=jt(m.array[A],r)}m.array[d>>>g&v]=p}if(s<o&&(f=f&&f.removeAfter(r,0,s)),a>=h)a-=h,s-=h,l=g,c=null,f=f&&f.removeBefore(r,0,a);else if(a>i||h<d){for(u=0;c;){var b=a>>>l&v;if(b!==h>>>l&v)break;b&&(u+=(1<<l)*b),l-=g,c=c.array[b]}c&&a>i&&(c=c.removeBefore(r,l,a-u)),c&&h<d&&(c=c.removeAfter(r,l,h-u)),u&&(a-=u,s-=u)}return e.__ownerID?(e.size=s-a,e._origin=a,e._capacity=s,e._level=l,e._root=c,e._tail=f,e.__hash=void 0,e.__altered=!0,e):Bt(a,s,l,c,f)}function qt(e,t,n){for(var r=[],o=0,s=0;s<n.length;s++){var l=n[s],c=i(l);c.size>o&&(o=c.size),a(l)||(c=c.map(function(e){return pe(e)})),r.push(c)}return o>e.size&&(e=e.setSize(o)),mt(e,t,r)}function zt(e){return e<y?0:e-1>>>g<<g}function Ht(e){return null==e?Vt():Kt(e)?e:Vt().withMutations(function(t){var n=r(e);Ke(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function Kt(e){return Ve(e)&&u(e)}function Ut(e,t,n,r){var i=Object.create(Ht.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function Vt(){return Tt||(Tt=Ut(it(),Pt()))}function Qt(e,t,n){var r,i,o=e._map,a=e._list,s=o.get(t),l=void 0!==s;if(n===A){if(!l)return e;a.size>=y&&a.size>=2*o.size?(r=(i=a.filter(function(e,t){return void 0!==e&&s!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(l){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):Ut(r,i)}function Wt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Gt(e){this._iter=e,this.size=e.size}function Zt(e){this._iter=e,this.size=e.size}function Yt(e){this._iter=e,this.size=e.size}function Jt(e){var t=An(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=bn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===O){var r=e.__iterator(t,n);return new R(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===P?B:P,n)},t}function $t(e,t,n){var r=An(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,A);return o===A?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(O,i);return new R(function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return q(r,s,t.call(n,a[1],s,e),i)})},r}function Xt(e,t){var n=An(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Jt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=bn,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var i=An(e);return r&&(i.has=function(r){var i=e.get(r,A);return i!==A&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,A);return o!==A&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate(function(e,o,l){if(t.call(n,e,o,l))return s++,i(e,r?o:s-1,a)},o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(O,o),s=0;return new R(function(){for(;;){var o=a.next();if(o.done)return o;var l=o.value,c=l[0],u=l[1];if(t.call(n,u,c,e))return q(i,r?c:s++,u,o)}})},i}function tn(e,t,n){var r=Ue().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function nn(e,t,n){var r=s(e),i=(u(e)?Ht():Ue()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return(e=e||[]).push(r?[a,o]:o),e})});var o=vn(e);return i.map(function(t){return mn(e,o(t))})}function rn(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=i:n|=0),D(t,n,i))return e;var o=T(t,i),a=N(n,i);if(o!=o||a!=a)return rn(e.toSeq().cacheResult(),t,n,r);var s,l=a-o;l==l&&(s=l<0?0:l);var c=An(e);return c.size=0===s?s:e.size&&s||void 0,!r&&oe(e)&&s>=0&&(c.get=function(t,n){return(t=k(this,t))>=0&&t<s?e.get(t+o,n):n}),c.__iterateUncached=function(t,n){var i=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var a=0,l=!0,c=0;return e.__iterate(function(e,n){if(!l||!(l=a++<o))return c++,!1!==t(e,r?n:c-1,i)&&c!==s}),c},c.__iteratorUncached=function(t,n){if(0!==s&&n)return this.cacheResult().__iterator(t,n);var i=0!==s&&e.__iterator(t,n),a=0,l=0;return new R(function(){for(;a++<o;)i.next();if(++l>s)return z();var e=i.next();return r||t===P?e:q(t,l-1,t===B?void 0:e.value[1],e)})},c}function on(e,t,n){var r=An(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(O,i),s=!0;return new R(function(){if(!s)return z();var e=a.next();if(e.done)return e;var i=e.value,l=i[0],c=i[1];return t.call(n,c,l,o)?r===O?e:q(r,l,c,e):(s=!1,z())})},r}function an(e,t,n,r){var i=An(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,l=0;return e.__iterate(function(e,o,c){if(!s||!(s=t.call(n,e,o,c)))return l++,i(e,r?o:l-1,a)}),l},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(O,o),l=!0,c=0;return new R(function(){var e,o,u;do{if((e=s.next()).done)return r||i===P?e:q(i,c++,i===B?void 0:e.value[1],e);var d=e.value;o=d[0],u=d[1],l&&(l=t.call(n,u,o,a))}while(l);return i===O?e:q(i,o,u,e)})},i}function sn(e,t){var n=s(e),i=[e].concat(t).map(function(e){return a(e)?n&&(e=r(e)):e=n?se(e):le(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var o=i[0];if(o===e||n&&s(o)||l(e)&&l(o))return o}var c=new te(i);return n?c=c.toKeyedSeq():l(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),c}function ln(e,t,n){var r=An(e);return r.__iterateUncached=function(r,i){var o=0,s=!1;function l(e,c){var u=this;e.__iterate(function(e,i){return(!t||c<t)&&a(e)?l(e,c+1):!1===r(e,n?i:o++,u)&&(s=!0),!s},i)}return l(e,0),o},r.__iteratorUncached=function(r,i){var o=e.__iterator(r,i),s=[],l=0;return new R(function(){for(;o;){var e=o.next();if(!1===e.done){var c=e.value;if(r===O&&(c=c[1]),t&&!(s.length<t)||!a(c))return n?e:q(r,l++,c,e);s.push(o),o=c.__iterator(r,i)}else o=s.pop()}return z()})},r}function cn(e,t,n){var r=vn(e);return e.toSeq().map(function(i,o){return r(t.call(n,i,o,e))}).flatten(!0)}function un(e,t){var n=An(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return e.__iterate(function(e,r){return(!o||!1!==n(t,o++,i))&&!1!==n(e,o++,i)},r),o},n.__iteratorUncached=function(n,r){var i,o=e.__iterator(P,r),a=0;return new R(function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?q(n,a++,t):q(n,a++,i.value,i)})},n}function dn(e,t,n){t||(t=wn);var r=s(e),i=0,o=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).toArray();return o.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),r?G(o):l(e)?Z(o):Y(o)}function hn(e,t,n){if(t||(t=wn),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return pn(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return pn(t,e,n)?n:e})}function pn(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function fn(e,t,r){var i=An(e);return i.size=new te(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(P,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=r.map(function(e){return e=n(e),U(i?e.reverse():e)}),a=0,s=!1;return new R(function(){var n;return s||(n=o.map(function(e){return e.next()}),s=n.some(function(e){return e.done})),s?z():q(e,a++,t.apply(null,n.map(function(e){return e.value})))})},i}function mn(e,t){return oe(e)?t:e.constructor(t)}function gn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function yn(e){return Ke(e.size),C(e)}function vn(e){return s(e)?r:l(e)?i:o}function An(e){return Object.create((s(e)?G:l(e)?Z:Y).prototype)}function bn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):W.prototype.cacheResult.call(this)}function wn(e,t){return e>t?1:e<t?-1:0}function xn(e){var t=U(e);if(!t){if(!Q(e))throw new TypeError("Expected iterable or array-like: "+e);t=U(n(e))}return t}function _n(e,t){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var a=Object.keys(e);kn(i,a),i.size=a.length,i._name=t,i._keys=a,i._defaultValues=e}this._map=Ue(o)},i=r.prototype=Object.create(Sn);return i.constructor=r,r}t(Ht,Ue),Ht.of=function(){return this(arguments)},Ht.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Ht.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Ht.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Vt()},Ht.prototype.set=function(e,t){return Qt(this,e,t)},Ht.prototype.remove=function(e){return Qt(this,e,A)},Ht.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Ht.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Ht.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Ht.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Ut(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Ht.isOrderedMap=Kt,Ht.prototype[f]=!0,Ht.prototype[m]=Ht.prototype.remove,t(Wt,G),Wt.prototype.get=function(e,t){return this._iter.get(e,t)},Wt.prototype.has=function(e){return this._iter.has(e)},Wt.prototype.valueSeq=function(){return this._iter.valueSeq()},Wt.prototype.reverse=function(){var e=this,t=Xt(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Wt.prototype.map=function(e,t){var n=this,r=$t(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Wt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?yn(this):0,function(i){return e(i,t?--n:n++,r)}),t)},Wt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(P,t),r=t?yn(this):0;return new R(function(){var i=n.next();return i.done?i:q(e,t?--r:r++,i.value,i)})},Wt.prototype[f]=!0,t(Gt,Z),Gt.prototype.includes=function(e){return this._iter.includes(e)},Gt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},Gt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(P,t),r=0;return new R(function(){var t=n.next();return t.done?t:q(e,r++,t.value,t)})},t(Zt,Y),Zt.prototype.has=function(e){return this._iter.includes(e)},Zt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},Zt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(P,t);return new R(function(){var t=n.next();return t.done?t:q(e,t.value,t.value,t)})},t(Yt,G),Yt.prototype.entrySeq=function(){return this._iter.toSeq()},Yt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){gn(t);var r=a(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},Yt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(P,t);return new R(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){gn(r);var i=a(r);return q(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},Gt.prototype.cacheResult=Wt.prototype.cacheResult=Zt.prototype.cacheResult=Yt.prototype.cacheResult=bn,t(_n,_e),_n.prototype.toString=function(){return this.__toString(Cn(this)+" {","}")},_n.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},_n.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},_n.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=En(this,it()))},_n.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Cn(this));if(this._map&&!this._map.has(e)&&t===this._defaultValues[e])return this;var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:En(this,n)},_n.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:En(this,t)},_n.prototype.wasAltered=function(){return this._map.wasAltered()},_n.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},_n.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},_n.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?En(this,t,e):(this.__ownerID=e,this._map=t,this)};var Sn=_n.prototype;function En(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function Cn(e){return e._name||e.constructor.name||"Record"}function kn(e,t){try{t.forEach(In.bind(void 0,e))}catch(e){}}function In(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){be(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function Dn(e){return null==e?Mn():Tn(e)&&!u(e)?e:Mn().withMutations(function(t){var n=o(e);Ke(n.size),n.forEach(function(e){return t.add(e)})})}function Tn(e){return!(!e||!e[Ln])}Sn[m]=Sn.remove,Sn.deleteIn=Sn.removeIn=Ge.removeIn,Sn.merge=Ge.merge,Sn.mergeWith=Ge.mergeWith,Sn.mergeIn=Ge.mergeIn,Sn.mergeDeep=Ge.mergeDeep,Sn.mergeDeepWith=Ge.mergeDeepWith,Sn.mergeDeepIn=Ge.mergeDeepIn,Sn.setIn=Ge.setIn,Sn.update=Ge.update,Sn.updateIn=Ge.updateIn,Sn.withMutations=Ge.withMutations,Sn.asMutable=Ge.asMutable,Sn.asImmutable=Ge.asImmutable,t(Dn,Ee),Dn.of=function(){return this(arguments)},Dn.fromKeys=function(e){return this(r(e).keySeq())},Dn.prototype.toString=function(){return this.__toString("Set {","}")},Dn.prototype.has=function(e){return this._map.has(e)},Dn.prototype.add=function(e){return Pn(this,this._map.set(e,!0))},Dn.prototype.remove=function(e){return Pn(this,this._map.remove(e))},Dn.prototype.clear=function(){return Pn(this,this._map.clear())},Dn.prototype.union=function(){var t=e.call(arguments,0);return t=t.filter(function(e){return 0!==e.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n<t.length;n++)o(t[n]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},Dn.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return o(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.every(function(e){return e.includes(n)})||e.remove(n)})})},Dn.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return o(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.some(function(e){return e.includes(n)})&&e.remove(n)})})},Dn.prototype.merge=function(){return this.union.apply(this,arguments)},Dn.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},Dn.prototype.sort=function(e){return jn(dn(this,e))},Dn.prototype.sortBy=function(e,t){return jn(dn(this,t,e))},Dn.prototype.wasAltered=function(){return this._map.wasAltered()},Dn.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t,r){return e(r,r,n)},t)},Dn.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t}).__iterator(e,t)},Dn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},Dn.isSet=Tn;var Nn,Ln="@@__IMMUTABLE_SET__@@",Bn=Dn.prototype;function Pn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function On(e,t){var n=Object.create(Bn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Mn(){return Nn||(Nn=On(it()))}function jn(e){return null==e?Hn():Fn(e)?e:Hn().withMutations(function(t){var n=o(e);Ke(n.size),n.forEach(function(e){return t.add(e)})})}function Fn(e){return Tn(e)&&u(e)}Bn[Ln]=!0,Bn[m]=Bn.remove,Bn.mergeDeep=Bn.merge,Bn.mergeDeepWith=Bn.mergeWith,Bn.withMutations=Ge.withMutations,Bn.asMutable=Ge.asMutable,Bn.asImmutable=Ge.asImmutable,Bn.__empty=Mn,Bn.__make=On,t(jn,Dn),jn.of=function(){return this(arguments)},jn.fromKeys=function(e){return this(r(e).keySeq())},jn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},jn.isOrderedSet=Fn;var Rn,qn=jn.prototype;function zn(e,t){var n=Object.create(qn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Hn(){return Rn||(Rn=zn(Vt()))}function Kn(e){return null==e?Zn():Un(e)?e:Zn().unshiftAll(e)}function Un(e){return!(!e||!e[Qn])}qn[f]=!0,qn.__empty=Hn,qn.__make=zn,t(Kn,Se),Kn.of=function(){return this(arguments)},Kn.prototype.toString=function(){return this.__toString("Stack [","]")},Kn.prototype.get=function(e,t){var n=this._head;for(e=k(this,e);n&&e--;)n=n.next;return n?n.value:t},Kn.prototype.peek=function(){return this._head&&this._head.value},Kn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Gn(e,t)},Kn.prototype.pushAll=function(e){if(0===(e=i(e)).size)return this;Ke(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Gn(t,n)},Kn.prototype.pop=function(){return this.slice(1)},Kn.prototype.unshift=function(){return this.push.apply(this,arguments)},Kn.prototype.unshiftAll=function(e){return this.pushAll(e)},Kn.prototype.shift=function(){return this.pop.apply(this,arguments)},Kn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Zn()},Kn.prototype.slice=function(e,t){if(D(e,t,this.size))return this;var n=T(e,this.size);if(N(t,this.size)!==this.size)return Se.prototype.slice.call(this,e,t);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Gn(r,i)},Kn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Gn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Kn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Kn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new R(function(){if(r){var t=r.value;return r=r.next,q(e,n++,t)}return z()})},Kn.isStack=Un;var Vn,Qn="@@__IMMUTABLE_STACK__@@",Wn=Kn.prototype;function Gn(e,t,n,r){var i=Object.create(Wn);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Zn(){return Vn||(Vn=Gn(0))}function Yn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}function Jn(e){return"string"==typeof e&&("__proto__"===e||"constructor"===e)}Wn[Qn]=!0,Wn.withMutations=Ge.withMutations,Wn.asMutable=Ge.asMutable,Wn.asImmutable=Ge.asImmutable,Wn.wasAltered=Ge.wasAltered,n.Iterator=R,Yn(n,{toArray:function(){Ke(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new Gt(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new Wt(this,!0)},toMap:function(){return Ue(this.toKeyedSeq())},toObject:function(){Ke(this.size);var e={};return this.__iterate(function(t,n){Jn(n)||(e[n]=t)}),e},toOrderedMap:function(){return Ht(this.toKeyedSeq())},toOrderedSet:function(){return jn(s(this)?this.valueSeq():this)},toSet:function(){return Dn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Zt(this)},toSeq:function(){return l(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Kn(s(this)?this.valueSeq():this)},toList:function(){return St(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return mn(this,sn(this,e.call(arguments,0)))},includes:function(e){return this.some(function(t){return ye(t,e)})},entries:function(){return this.__iterator(O)},every:function(e,t){Ke(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return mn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Ke(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Ke(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(B)},map:function(e,t){return mn(this,$t(this,e,t))},reduce:function(e,t,n){var r,i;return Ke(this.size),arguments.length<2?i=!0:r=t,this.__iterate(function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return mn(this,Xt(this,!0))},slice:function(e,t){return mn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(nr(e),t)},sort:function(e){return mn(this,dn(this,e))},values:function(){return this.__iterator(P)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return C(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return ve(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(tr).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(nr(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(I)},flatMap:function(e,t){return mn(this,cn(this,e,t))},flatten:function(e){return mn(this,ln(this,e,!0))},fromEntrySeq:function(){return new Yt(this)},get:function(e,t){return this.find(function(t,n){return ye(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=xn(e);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,A):A)===A)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,A)!==A},hasIn:function(e){return this.getIn(e,A)!==A},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return ye(t,e)})},keySeq:function(){return this.toSeq().map(er).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return hn(this,e)},maxBy:function(e,t){return hn(this,t,e)},min:function(e){return hn(this,e?rr(e):ar)},minBy:function(e,t){return hn(this,t?rr(t):ar,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return mn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return mn(this,an(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(nr(e),t)},sortBy:function(e,t){return mn(this,dn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return mn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return mn(this,on(this,e,t))},takeUntil:function(e,t){return this.takeWhile(nr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=sr(this))}});var $n=n.prototype;$n[d]=!0,$n[F]=$n.values,$n.__toJS=$n.toArray,$n.__toStringMapper=ir,$n.inspect=$n.toSource=function(){return this.toString()},$n.chain=$n.flatMap,$n.contains=$n.includes,Yn(r,{flip:function(){return mn(this,Jt(this))},mapEntries:function(e,t){var n=this,r=0;return mn(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return mn(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var Xn=r.prototype;function er(e,t){return t}function tr(e,t){return[t,e]}function nr(e){return function(){return!e.apply(this,arguments)}}function rr(e){return function(){return-e.apply(this,arguments)}}function ir(e){return"string"==typeof e?JSON.stringify(e):String(e)}function or(){return E(arguments)}function ar(e,t){return e<t?1:e>t?-1:0}function sr(e){if(e.size===1/0)return 0;var t=u(e),n=s(e),r=t?1:0,i=e.__iterate(n?t?function(e,t){r=31*r+cr(Ie(e),Ie(t))|0}:function(e,t){r=r+cr(Ie(e),Ie(t))|0}:t?function(e){r=31*r+Ie(e)|0}:function(e){r=r+Ie(e)|0});return lr(i,r)}function lr(e,t){return t=Ce(t,3432918353),t=Ce(t<<15|t>>>-15,461845907),t=Ce(t<<13|t>>>-13,5),t=Ce((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ke((t=Ce(t^t>>>13,3266489909))^t>>>16)}function cr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}Xn[h]=!0,Xn[F]=$n.entries,Xn.__toJS=$n.toObject,Xn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+ir(e)},Yn(i,{toKeyedSeq:function(){return new Wt(this,!1)},filter:function(e,t){return mn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return mn(this,Xt(this,!1))},slice:function(e,t){return mn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=T(e,e<0?this.count():this.size);var r=this.slice(0,e);return mn(this,1===n?r:r.concat(E(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return mn(this,ln(this,e,!1))},get:function(e,t){return(e=k(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=k(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return mn(this,un(this,e))},interleave:function(){var e=[this].concat(E(arguments)),t=fn(this.toSeq(),Z.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),mn(this,n)},keySeq:function(){return we(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(e,t){return mn(this,an(this,e,t,!1))},zip:function(){return mn(this,fn(this,or,[this].concat(E(arguments))))},zipWith:function(e){var t=E(arguments);return t[0]=this,mn(this,fn(this,e,t))}}),i.prototype[p]=!0,i.prototype[f]=!0,Yn(o,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),o.prototype.has=$n.includes,o.prototype.contains=o.prototype.includes,Yn(G,r.prototype),Yn(Z,i.prototype),Yn(Y,o.prototype),Yn(_e,r.prototype),Yn(Se,i.prototype),Yn(Ee,o.prototype);var ur={Iterable:n,Seq:W,Collection:xe,Map:Ue,OrderedMap:Ht,List:St,Stack:Kn,Set:Dn,OrderedSet:jn,Record:_n,Range:we,Repeat:Ae,is:ye,fromJS:pe};return ur}()),zs.exports}function Ks(){if(ia)return ra;ia=1;var e=Hs().OrderedMap;return ra={createFromArray:function(t){return e(t.map(function(e){return[e.getKey(),e]}))}}}function Us(){if(aa)return oa;aa=1;var e=Hs(),t=e.Map,n=e.OrderedSet,r=e.Record,i=n(),o={style:i,entity:null},a=function(e){var r,o;function a(){return e.apply(this,arguments)||this}o=e,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,r.__proto__=o;var c=a.prototype;return c.getStyle=function(){return this.get("style")},c.getEntity=function(){return this.get("entity")},c.hasStyle=function(e){return this.getStyle().includes(e)},a.applyStyle=function(e,t){var n=e.set("style",e.getStyle().add(t));return a.create(n)},a.removeStyle=function(e,t){var n=e.set("style",e.getStyle().remove(t));return a.create(n)},a.applyEntity=function(e,t){var n=e.getEntity()===t?e:e.set("entity",t);return a.create(n)},a.create=function(e){if(!e)return s;var n=t({style:i,entity:null}).merge(e),r=l.get(n);if(r)return r;var o=new a(n);return l=l.set(n,o),o},a.fromJS=function(e){var t=e.style,r=e.entity;return new a({style:Array.isArray(t)?n(t):t,entity:Array.isArray(r)?n(r):r})},a}(r(o)),s=new a,l=t([[t(o),s]]);return a.EMPTY=s,oa=a}function Vs(){if(la)return sa;return la=1,sa=function(e,t,n,r){if(e.size){var i=0;e.reduce(function(e,o,a){return t(e,o)||(n(e)&&r(i,a),i=a),o}),n(e.last())&&r(i,e.count())}}}function Qs(){if(ua)return ca;ua=1;var e=Us(),t=Vs(),n=Hs(),r=n.List,i=n.Map,o=n.OrderedSet,a=n.Record,s=n.Repeat,l=o(),c=a({key:"",type:"unstyled",text:"",characterList:r(),depth:0,data:i()}),u=function(n){var i,o;function a(t){return n.call(this,function(t){if(!t)return t;var n=t.characterList,i=t.text;return i&&!n&&(t.characterList=r(s(e.EMPTY,i.length))),t}(t))||this}o=n,(i=a).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var c=a.prototype;return c.getKey=function(){return this.get("key")},c.getType=function(){return this.get("type")},c.getText=function(){return this.get("text")},c.getCharacterList=function(){return this.get("characterList")},c.getLength=function(){return this.getText().length},c.getDepth=function(){return this.get("depth")},c.getData=function(){return this.get("data")},c.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():l},c.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},c.findStyleRanges=function(e,n){t(this.getCharacterList(),d,e,n)},c.findEntityRanges=function(e,n){t(this.getCharacterList(),h,e,n)},a}(c);function d(e,t){return e.getStyle()===t.getStyle()}function h(e,t){return e.getEntity()===t.getEntity()}return ca=u}function Ws(){if(ha)return da;ha=1;var e=Us(),t=Vs(),n=Hs(),r=n.List,i=n.Map,o=n.OrderedSet,a=n.Record,s=n.Repeat,l=o(),c={parent:null,characterList:r(),data:i(),depth:0,key:"",text:"",type:"unstyled",children:r(),prevSibling:null,nextSibling:null},u=function(e,t){return e.getStyle()===t.getStyle()},d=function(e,t){return e.getEntity()===t.getEntity()},h=function(n){var i,o;function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c;return n.call(this,function(t){if(!t)return t;var n=t.characterList,i=t.text;return i&&!n&&(t.characterList=r(s(e.EMPTY,i.length))),t}(t))||this}o=n,(i=a).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var h=a.prototype;return h.getKey=function(){return this.get("key")},h.getType=function(){return this.get("type")},h.getText=function(){return this.get("text")},h.getCharacterList=function(){return this.get("characterList")},h.getLength=function(){return this.getText().length},h.getDepth=function(){return this.get("depth")},h.getData=function(){return this.get("data")},h.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():l},h.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},h.getChildKeys=function(){return this.get("children")},h.getParentKey=function(){return this.get("parent")},h.getPrevSiblingKey=function(){return this.get("prevSibling")},h.getNextSiblingKey=function(){return this.get("nextSibling")},h.findStyleRanges=function(e,n){t(this.getCharacterList(),u,e,n)},h.findEntityRanges=function(e,n){t(this.getCharacterList(),d,e,n)},a}(a(c));return da=h}function Gs(){if(va)return ya;va=1;var e=function(){if(ga)return ma;ga=1;var e=Us();return ma=function(t,n,r,i){for(var o=n,a=t.getCharacterList();o<r;)a=a.set(o,e.applyEntity(a.get(o),i)),o++;return t.set("characterList",a)}}(),t=Hs();return ya=function(n,r,i){var o=n.getBlockMap(),a=r.getStartKey(),s=r.getStartOffset(),l=r.getEndKey(),c=r.getEndOffset(),u=o.skipUntil(function(e,t){return t===a}).takeUntil(function(e,t){return t===l}).toOrderedMap().merge(t.OrderedMap([[l,o.get(l)]])).map(function(t,n){var r=n===a?s:0,o=n===l?c:t.getLength();return e(t,r,o,i)});return n.merge({blockMap:o.merge(u),selectionBefore:r,selectionAfter:r})},ya}function Zs(){if(xa)return wa;return xa=1,wa=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(!e){var o;if(void 0===t)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;(o=new Error(t.replace(/%s/g,function(){return String(r[a++])}))).name="Invariant Violation"}throw o.framesToPop=1,o}},wa}function Ys(){if(Ca)return Ea;Ca=1;var e=(ba||(ba=1,Aa={getRemovalRange:function(e,t,n,r,i){var o=n.split(" ");o=o.map(function(e,t){if("forward"===i){if(t>0)return" "+e}else if(t<o.length-1)return e+" ";return e});for(var a,s=r,l=null,c=null,u=0;u<o.length;u++){if(e<(a=s+o[u].length)&&s<t)null!==l||(l=s),c=a;else if(null!==l)break;s=a}var d=r+n.length,h=l===r,p=c===d;return(!h&&p||h&&!p)&&("forward"===i?c!==d&&c++:l!==r&&l--),{start:l,end:c}}}),Aa),t=function(){if(Sa)return _a;Sa=1;var e=Zs();return _a=function(t,n){var r=[];return t.findEntityRanges(function(e){return e.getEntity()===n},function(e,t){r.push({start:e,end:t})}),r.length||e(!1),r}}(),n=Zs();function r(r,i,o,a,s,l,c){var u=o.getStartOffset(),d=o.getEndOffset(),h=r.__get(s).getMutability(),p=c?u:d;if("MUTABLE"===h)return o;var f=t(i,s).filter(function(e){return p<=e.end&&p>=e.start});1!=f.length&&n(!1);var m=f[0];if("IMMUTABLE"===h)return o.merge({anchorOffset:m.start,focusOffset:m.end,isBackward:!1});l||(c?d=m.end:u=m.start);var g=e.getRemovalRange(u,d,i.getText().slice(m.start,m.end),m.start,a);return o.merge({anchorOffset:g.start,focusOffset:g.end,isBackward:!1})}return Ea=function(e,t,n,i,o){var a=i.getStartOffset(),s=i.getEndOffset(),l=t.getEntityAt(a),c=n.getEntityAt(s-1);if(!l&&!c)return i;var u=i;if(l&&l===c)u=r(e,t,u,o,l,!0,!0);else if(l&&c){var d=r(e,t,u,o,l,!1,!0),h=r(e,n,u,o,c,!1,!1);u=u.merge({anchorOffset:d.getAnchorOffset(),focusOffset:h.getFocusOffset(),isBackward:!1})}else if(l){var p=r(e,t,u,o,l,!1,!0);u=u.merge({anchorOffset:p.getStartOffset(),isBackward:!1})}else if(c){var f=r(e,n,u,o,c,!1,!1);u=u.merge({focusOffset:f.getEndOffset(),isBackward:!1})}return u}}function Js(){if(Ia)return ka;Ia=1;var e={},t=Math.pow(2,24);return ka=function(){for(var n;void 0===n||e.hasOwnProperty(n)||!isNaN(+n);)n=Math.floor(Math.random()*t).toString(32);return e[n]=!0,n}}function $s(){if(Ta)return Da;Ta=1;var e=Ws(),t=Js(),n=Hs().OrderedMap;return Da=function(r){return r.first()instanceof e?function(e){var r,i={};return n(e.withMutations(function(e){e.forEach(function(n,o){var a=n.getKey(),s=n.getNextSiblingKey(),l=n.getPrevSiblingKey(),c=n.getChildKeys(),u=n.getParentKey(),d=t();if(i[a]=d,s&&(e.get(s)?e.setIn([s,"prevSibling"],d):e.setIn([a,"nextSibling"],null)),l&&(e.get(l)?e.setIn([l,"nextSibling"],d):e.setIn([a,"prevSibling"],null)),u&&e.get(u)){var h=e.get(u).getChildKeys();e.setIn([u,"children"],h.set(h.indexOf(n.getKey()),d))}else e.setIn([a,"parent"],null),r&&(e.setIn([r.getKey(),"nextSibling"],d),e.setIn([a,"prevSibling"],i[r.getKey()])),r=e.get(a);c.forEach(function(t){e.get(t)?e.setIn([t,"parent"],d):e.setIn([a,"children"],n.getChildKeys().filter(function(e){return e!==t}))})})}).toArray().map(function(e){return[i[e.getKey()],e.set("key",i[e.getKey()])]}))}(r):function(e){return n(e.toArray().map(function(e){var n=t();return[n,e.set("key",n)]}))}(r)}}function Xs(){if(La)return Na;La=1;var e=Us(),t=Vs(),n=Zs();function r(r,i,o){var a=i.getCharacterList(),s=o>0?a.get(o-1):void 0,l=o<a.count()?a.get(o):void 0,c=s?s.getEntity():void 0,u=l?l.getEntity():void 0;if(u&&u===c&&"MUTABLE"!==r.__get(u).getMutability()){for(var d,h=function(e,r,i){var o;return t(e,function(e,t){return e.getEntity()===t.getEntity()},function(e){return e.getEntity()===r},function(e,t){e<=i&&t>=i&&(o={start:e,end:t})}),"object"!=typeof o&&n(!1),o}(a,u,o),p=h.start,f=h.end;p<f;)d=a.get(p),a=a.set(p,e.applyEntity(d,null)),p++;return i.set("characterList",a)}return i}return Na=function(e,t){var n=e.getBlockMap(),i=e.getEntityMap(),o={},a=t.getStartKey(),s=t.getStartOffset(),l=n.get(a),c=r(i,l,s);c!==l&&(o[a]=c);var u=t.getEndKey(),d=t.getEndOffset(),h=n.get(u);a===u&&(h=c);var p=r(i,h,d);return p!==h&&(o[u]=p),Object.keys(o).length?e.merge({blockMap:n.merge(o),selectionAfter:t}):e.set("selectionAfter",t)}}function el(){if(Pa)return Ba;Pa=1;var e=$s(),t=Xs();return Ba=function(n,r){var i=r.getStartKey(),o=r.getStartOffset(),a=r.getEndKey(),s=r.getEndOffset(),l=t(n,r).getBlockMap(),c=l.keySeq(),u=c.indexOf(i),d=c.indexOf(a)+1;return e(l.slice(u,d).map(function(e,t){var n=e.getText(),r=e.getCharacterList();return i===a?e.merge({text:n.slice(o,s),characterList:r.slice(o,s)}):t===i?e.merge({text:n.slice(o),characterList:r.slice(o)}):t===a?e.merge({text:n.slice(0,s),characterList:r.slice(0,s)}):e}))}}function tl(){if(Ma)return Oa;return Ma=1,Oa=function(e,t,n){var r=e;if(n===r.count())t.forEach(function(e){r=r.push(e)});else if(0===n)t.reverse().forEach(function(e){r=r.unshift(e)});else{var i=r.slice(0,n),o=r.slice(n);r=i.concat(t,o).toList()}return r}}function nl(){if(Fa)return ja;Fa=1;var e=Ks(),t=Ws(),n=Hs(),r=tl(),i=Zs(),o=$s(),a=n.List,s=function(n,r,i,o,s,l){var c=i.first()instanceof t,u=[],d=o.size,h=i.get(s),p=o.first(),f=o.last(),m=f.getLength(),g=f.getKey(),y=c&&(!h.getChildKeys().isEmpty()||!p.getChildKeys().isEmpty());i.forEach(function(e,t){t===s?(y?u.push(e):u.push(function(e,t,n){var r=e.getText(),i=e.getCharacterList(),o=r.slice(0,t),a=i.slice(0,t),s=n.first();return e.merge({text:o+s.getText(),characterList:a.concat(s.getCharacterList()),type:o?e.getType():s.getType(),data:s.getData()})}(e,l,o)),o.slice(y?0:1,d-1).forEach(function(e){return u.push(e)}),u.push(function(e,t,n){var r=e.getText(),i=e.getCharacterList(),o=r.length,a=r.slice(t,o),s=i.slice(t,o),l=n.last();return l.merge({text:l.getText()+a,characterList:l.getCharacterList().concat(s),data:l.getData()})}(e,l,o))):u.push(e)});var v=e.createFromArray(u);return c&&(v=function(e,t,n,r){return e.withMutations(function(t){var i=n.getKey(),o=r.getKey(),s=n.getNextSiblingKey(),l=n.getParentKey(),c=function(e,t){var n=e.getKey(),r=e,i=[];for(t.get(n)&&i.push(n);r&&r.getNextSiblingKey();){var o=r.getNextSiblingKey();if(!o)break;i.push(o),r=t.get(o)}return i}(r,e),u=c[c.length-1];if(t.get(o)?(t.setIn([i,"nextSibling"],o),t.setIn([o,"prevSibling"],i)):(t.setIn([i,"nextSibling"],r.getNextSiblingKey()),t.setIn([r.getNextSiblingKey(),"prevSibling"],i)),t.setIn([u,"nextSibling"],s),s&&t.setIn([s,"prevSibling"],u),c.forEach(function(e){return t.setIn([e,"parent"],l)}),l){var d=e.get(l).getChildKeys(),h=d.indexOf(i)+1,p=d.toArray();p.splice.apply(p,[h,0].concat(c)),t.setIn([l,"children"],a(p))}})}(v,0,h,p)),n.merge({blockMap:v,selectionBefore:r,selectionAfter:r.merge({anchorKey:g,anchorOffset:m,focusKey:g,focusOffset:m,isBackward:!1})})};return ja=function(e,n,a){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA";n.isCollapsed()||i(!1);var c=e.getBlockMap(),u=o(a),d=n.getStartKey(),h=n.getStartOffset(),p=c.get(d);return p instanceof t&&(p.getChildKeys().isEmpty()||i(!1)),1===u.size?function(e,t,n,i,o,a){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",l=n.get(o),c=l.getText(),u=l.getCharacterList(),d=o,h=a+i.getText().length,p=null;switch(s){case"MERGE_OLD_DATA_TO_NEW_DATA":p=i.getData().merge(l.getData());break;case"REPLACE_WITH_NEW_DATA":p=i.getData()}var f=l.getType();c&&"unstyled"===f&&(f=i.getType());var m=l.merge({text:c.slice(0,a)+i.getText()+c.slice(a),characterList:r(u,i.getCharacterList(),a),type:f,data:p});return e.merge({blockMap:n.set(o,m),selectionBefore:t,selectionAfter:t.merge({anchorKey:d,anchorOffset:h,focusKey:d,focusOffset:h,isBackward:!1})})}(e,n,c,u.first(),d,h,l):s(e,n,c,u,d,h)},ja}function rl(){if(Ha)return za;Ha=1;var e=Hs().Map;return za=function(t,n,r){var i=n.getStartKey(),o=n.getEndKey(),a=t.getBlockMap(),s=a.toSeq().skipUntil(function(e,t){return t===i}).takeUntil(function(e,t){return t===o}).concat(e([[o,a.get(o)]])).map(r);return t.merge({blockMap:a.merge(s),selectionBefore:n,selectionAfter:n})},za}function il(){if(Ua)return Ka;Ua=1;var e=Ws();return Ka=function(t,n){if(!(t instanceof e))return null;var r=t.getNextSiblingKey();if(r)return r;var i=t.getParentKey();if(!i)return null;for(var o=n.get(i);o&&!o.getNextSiblingKey();){var a=o.getParentKey();o=a?n.get(a):null}return o?o.getNextSiblingKey():null}}function ol(){if(Qa)return Va;Qa=1;var e=Ws(),t=il(),n=Hs();n.List;var r=n.Map,i=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},o=function(e,t){var n=[];if(!e)return n;for(var r=t.get(e);r&&r.getParentKey();){var i=r.getParentKey();i&&n.push(i),r=i?t.get(i):null}return n},a=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getNextSiblingKey();r&&!t.get(r);)r=n.get(r).getNextSiblingKey()||null;return r},s=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getPrevSiblingKey();r&&!t.get(r);)r=n.get(r).getPrevSiblingKey()||null;return r},l=function(e,n,r,l){return e.withMutations(function(c){if(i(n.getKey(),c,function(e){return e.merge({nextSibling:a(e,c,l),prevSibling:s(e,c,l)})}),i(r.getKey(),c,function(e){return e.merge({nextSibling:a(e,c,l),prevSibling:s(e,c,l)})}),o(n.getKey(),l).forEach(function(e){return i(e,c,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return c.get(e)}),nextSibling:a(e,c,l),prevSibling:s(e,c,l)})})}),i(n.getNextSiblingKey(),c,function(e){return e.merge({prevSibling:n.getPrevSiblingKey()})}),i(n.getPrevSiblingKey(),c,function(e){return e.merge({nextSibling:a(e,c,l)})}),i(r.getNextSiblingKey(),c,function(e){return e.merge({prevSibling:s(e,c,l)})}),i(r.getPrevSiblingKey(),c,function(e){return e.merge({nextSibling:r.getNextSiblingKey()})}),o(r.getKey(),l).forEach(function(e){i(e,c,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return c.get(e)}),nextSibling:a(e,c,l),prevSibling:s(e,c,l)})})}),function(e,n){var r=[];if(!e)return r;for(var i=t(e,n);i&&n.get(i);){var o=n.get(i);r.push(i),i=o.getParentKey()?t(o,n):null}return r}(r,l).forEach(function(e){return i(e,c,function(e){return e.merge({nextSibling:a(e,c,l),prevSibling:s(e,c,l)})})}),null==e.get(n.getKey())&&null!=e.get(r.getKey())&&r.getParentKey()===n.getKey()&&null==r.getPrevSiblingKey()){var u=n.getPrevSiblingKey();i(r.getKey(),c,function(e){return e.merge({prevSibling:u})}),i(u,c,function(e){return e.merge({nextSibling:r.getKey()})});var d=u?e.get(u):null,h=d?d.getParentKey():null;if(n.getChildKeys().forEach(function(e){i(e,c,function(e){return e.merge({parent:h})})}),null!=h){var p=e.get(h);i(h,c,function(e){return e.merge({children:p.getChildKeys().concat(n.getChildKeys())})})}i(n.getChildKeys().find(function(t){return null===e.get(t).getNextSiblingKey()}),c,function(e){return e.merge({nextSibling:n.getNextSiblingKey()})})}})},c=function(e,t,n){if(0===t)for(;t<n;)e=e.shift(),t++;else if(n===e.count())for(;n>t;)e=e.pop(),n--;else{var r=e.slice(0,t),i=e.slice(n);e=r.concat(i).toList()}return e};return Va=function(n,i){if(i.isCollapsed())return n;var a,s=n.getBlockMap(),u=i.getStartKey(),d=i.getStartOffset(),h=i.getEndKey(),p=i.getEndOffset(),f=s.get(u),m=s.get(h),g=f instanceof e,y=[];if(g){var v=m.getChildKeys(),A=o(h,s);m.getNextSiblingKey()&&(y=y.concat(A)),v.isEmpty()||(y=y.concat(A.concat([h]))),y=y.concat(o(t(m,s),s))}a=f===m?c(f.getCharacterList(),d,p):f.getCharacterList().slice(0,d).concat(m.getCharacterList().slice(p));var b=f.merge({text:f.getText().slice(0,d)+m.getText().slice(p),characterList:a}),w=g&&0===d&&0===p&&m.getParentKey()===u&&null==m.getPrevSiblingKey()?r([[u,null]]):s.toSeq().skipUntil(function(e,t){return t===u}).takeUntil(function(e,t){return t===h}).filter(function(e,t){return-1===y.indexOf(t)}).concat(r([[h,null]])).map(function(e,t){return t===u?b:null}),x=s.merge(w).filter(function(e){return!!e});return g&&f!==m&&(x=l(x,f,m,s)),n.merge({blockMap:x,selectionBefore:i,selectionAfter:i.merge({anchorKey:u,anchorOffset:d,focusKey:u,focusOffset:d,isBackward:!1})})},Va}function al(){if(Ga)return Wa;Ga=1;var e=Ws(),t=Js(),n=Hs(),r=Zs(),i=rl(),o=n.List,a=n.Map,s=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}};return Wa=function(n,l){l.isCollapsed()||r(!1);var c=l.getAnchorKey(),u=n.getBlockMap(),d=u.get(c),h=d.getText();if(!h){var p=d.getType();if("unordered-list-item"===p||"ordered-list-item"===p)return i(n,l,function(e){return e.merge({type:"unstyled",depth:0})})}var f=l.getAnchorOffset(),m=d.getCharacterList(),g=t(),y=d instanceof e,v=d.merge({text:h.slice(0,f),characterList:m.slice(0,f)}),A=v.merge({key:g,text:h.slice(f),characterList:m.slice(f),data:a()}),b=u.toSeq().takeUntil(function(e){return e===d}),w=u.toSeq().skipUntil(function(e){return e===d}).rest(),x=b.concat([[c,v],[g,A]],w).toOrderedMap();return y&&(d.getChildKeys().isEmpty()||r(!1),x=function(e,t,n){return e.withMutations(function(e){var r=t.getKey(),i=n.getKey();s(t.getParentKey(),e,function(e){var t=e.getChildKeys(),n=t.indexOf(r)+1,a=t.toArray();return a.splice(n,0,i),e.merge({children:o(a)})}),s(t.getNextSiblingKey(),e,function(e){return e.merge({prevSibling:i})}),s(r,e,function(e){return e.merge({nextSibling:i})}),s(i,e,function(e){return e.merge({prevSibling:r})})})}(x,v,A)),n.merge({blockMap:x,selectionBefore:l,selectionAfter:l.merge({anchorKey:g,anchorOffset:0,focusKey:g,focusOffset:0,isBackward:!1})})},Wa}function sl(){if(Ya)return Za;Ya=1;var e=Us(),t=function(){if(fa)return pa;fa=1;var e=Us(),t=Hs().Map;function n(n,r,i,o){var a=n.getBlockMap(),s=r.getStartKey(),l=r.getStartOffset(),c=r.getEndKey(),u=r.getEndOffset(),d=a.skipUntil(function(e,t){return t===s}).takeUntil(function(e,t){return t===c}).concat(t([[c,a.get(c)]])).map(function(t,n){var r,a;s===c?(r=l,a=u):(r=n===s?l:0,a=n===c?u:t.getLength());for(var d,h=t.getCharacterList();r<a;)d=h.get(r),h=h.set(r,o?e.applyStyle(d,i):e.removeStyle(d,i)),r++;return t.set("characterList",h)});return n.merge({blockMap:a.merge(d),selectionBefore:r,selectionAfter:r})}return pa={add:function(e,t,r){return n(e,t,r,!0)},remove:function(e,t,r){return n(e,t,r,!1)}}}(),n=Gs(),r=Ys(),i=el(),o=Hs(),a=nl(),s=function(){if(qa)return Ra;qa=1;var e=Hs(),t=tl(),n=Zs(),r=e.Repeat;return Ra=function(e,i,o,a){i.isCollapsed()||n(!1);var s=null;if(null!=o&&(s=o.length),null==s||0===s)return e;var l=e.getBlockMap(),c=i.getStartKey(),u=i.getStartOffset(),d=l.get(c),h=d.getText(),p=d.merge({text:h.slice(0,u)+o+h.slice(u,d.getLength()),characterList:t(d.getCharacterList(),r(a,s).toList(),u)}),f=u+s;return e.merge({blockMap:l.set(c,p),selectionAfter:i.merge({anchorOffset:f,focusOffset:f})})}}(),l=Zs(),c=rl(),u=Xs(),d=ol(),h=al(),p=o.OrderedSet,f={replaceText:function(t,n,r,i,o){var a=u(t,n),l=d(a,n),c=e.create({style:i||p(),entity:o||null});return s(l,l.getSelectionAfter(),r,c)},insertText:function(e,t,n,r,i){return t.isCollapsed()||l(!1),f.replaceText(e,t,n,r,i)},moveText:function(e,t,n){var r=i(e,t),o=f.removeRange(e,t,"backward");return f.replaceWithFragment(o,n,r)},replaceWithFragment:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",i=u(e,t),o=d(i,t);return a(o,o.getSelectionAfter(),n,r)},removeRange:function(e,t,n){var i,o,a,s;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),i=t.getAnchorKey(),o=t.getFocusKey(),a=e.getBlockForKey(i),s=e.getBlockForKey(o);var l=t.getStartOffset(),c=t.getEndOffset(),h=a.getEntityAt(l),p=s.getEntityAt(c-1);if(i===o&&h&&h===p){var f=r(e.getEntityMap(),a,s,t,n);return d(e,f)}var m=u(e,t);return d(m,t)},splitBlock:function(e,t){var n=u(e,t),r=d(n,t);return h(r,r.getSelectionAfter())},applyInlineStyle:function(e,n,r){return t.add(e,n,r)},removeInlineStyle:function(e,n,r){return t.remove(e,n,r)},setBlockType:function(e,t,n){return c(e,t,function(e){return e.merge({type:n,depth:0})})},setBlockData:function(e,t,n){return c(e,t,function(e){return e.merge({data:n})})},mergeBlockData:function(e,t,n){return c(e,t,function(e){return e.merge({data:e.getData().merge(n)})})},applyEntity:function(e,t,r){var i=u(e,t);return n(i,t,r)}};return Za=f}function ll(){if($a)return Ja;return $a=1,Ja=function(e){return Object.keys(e).map(function(t){return e[t]})}}function cl(){if(es)return Xa;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}es=1;var t=Vs(),n=ll(),r=Hs(),i=r.List,o=r.Repeat,a=r.Record,s=function(){return!0},l=a({start:null,end:null}),c=a({start:null,end:null,decoratorKey:null,leaves:null}),u={generate:function(e,n,r){var a=n.getLength();if(!a)return i.of(new c({start:0,end:0,decoratorKey:null,leaves:i.of(new l({start:0,end:0}))}));var u=[],p=r?r.getDecorations(n,e):i(o(null,a)),f=n.getCharacterList();return t(p,h,s,function(e,t){u.push(new c({start:e,end:t,decoratorKey:p.get(e),leaves:d(f.slice(e,t).toList(),e)}))}),i(u)},fromJS:function(t){var r=t.leaves,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["leaves"]);return new c(function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},o,{leaves:null!=r?i(Array.isArray(r)?r:n(r)).map(function(e){return l(e)}):null}))}};function d(e,n){var r=[],o=e.map(function(e){return e.getStyle()}).toList();return t(o,h,s,function(e,t){r.push(new l({start:e+n,end:t+n}))}),i(r)}function h(e,t){return e===t}return Xa=u}function ul(){if(ns)return ts;ns=1;var e=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getType=function(){return this.get("type")},i.getMutability=function(){return this.get("mutability")},i.getData=function(){return this.get("data")},r}((0,Hs().Record)({type:"TOKEN",mutability:"IMMUTABLE",data:Object}));return ts=e}function dl(){if(as)return os;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}as=1;var t=ul(),n=Hs(),r=Zs(),i=is?rs:(is=1,rs=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}),o=(0,n.Map)(),a=i();function s(e,t){console.warn("WARNING: "+e+' will be deprecated soon!\nPlease use "'+t+'" instead.')}var l={getLastCreatedEntityKey:function(){return s("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),l.__getLastCreatedEntityKey()},create:function(e,t,n){return s("DraftEntity.create","contentState.createEntity"),l.__create(e,t,n)},add:function(e){return s("DraftEntity.add","contentState.addEntity"),l.__add(e)},get:function(e){return s("DraftEntity.get","contentState.getEntity"),l.__get(e)},__getAll:function(){return o},__loadWithEntities:function(e){o=e,a=i()},mergeData:function(e,t){return s("DraftEntity.mergeData","contentState.mergeEntityData"),l.__mergeData(e,t)},replaceData:function(e,t){return s("DraftEntity.replaceData","contentState.replaceEntityData"),l.__replaceData(e,t)},__getLastCreatedEntityKey:function(){return a},__create:function(e,n,r){return l.__add(new t({type:e,mutability:n,data:r||{}}))},__add:function(e){return a=i(),o=o.set(a,e),a},__get:function(e){var t=o.get(e);return t||r(!1),t},__mergeData:function(t,n){var r=l.__get(t),i=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},r.getData(),n),a=r.set("data",i);return o=o.set(t,a),a},__replaceData:function(e,t){var n=l.__get(e).set("data",t);return o=o.set(e,n),n}};return os=l}function hl(){if(ls)return ss;ls=1;var e=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},i.getAnchorKey=function(){return this.get("anchorKey")},i.getAnchorOffset=function(){return this.get("anchorOffset")},i.getFocusKey=function(){return this.get("focusKey")},i.getFocusOffset=function(){return this.get("focusOffset")},i.getIsBackward=function(){return this.get("isBackward")},i.getHasFocus=function(){return this.get("hasFocus")},i.hasEdgeWithin=function(e,t,n){var r=this.getAnchorKey(),i=this.getFocusKey();if(r===i&&r===e){var o=this.getStartOffset(),a=this.getEndOffset();return t<=o&&o<=n||t<=a&&a<=n}if(e!==r&&e!==i)return!1;var s=e===r?this.getAnchorOffset():this.getFocusOffset();return t<=s&&n>=s},i.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},i.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},i.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},i.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},i.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},r.createEmpty=function(e){return new r({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},r}((0,Hs().Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));return ss=e}function pl(){return us?cs:(us=1,cs=function(e){return!("undefined"==typeof window||!window.__DRAFT_GKX)&&!!window.__DRAFT_GKX[e]})}function fl(){if(hs)return ds;hs=1;var e=new RegExp("\r","g");return ds=function(t){return t.replace(e,"")}}function ml(){if(fs)return ps;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}fs=1;var n=Ks(),r=Us(),i=Qs(),o=Ws(),a=dl(),s=hl(),l=Js(),c=ll(),u=pl(),d=Hs(),h=fl(),p=d.List,f=d.Record,m=d.Repeat,g=d.Map,y=d.OrderedMap,v=f({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}),A=u("draft_tree_data_support")?o:i,b=function(t){var i,o;function u(){return t.apply(this,arguments)||this}o=t,(i=u).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var d=u.prototype;return d.getEntityMap=function(){return a},d.getBlockMap=function(){return this.get("blockMap")},d.getSelectionBefore=function(){return this.get("selectionBefore")},d.getSelectionAfter=function(){return this.get("selectionAfter")},d.getBlockForKey=function(e){return this.getBlockMap().get(e)},d.getKeyBefore=function(e){return this.getBlockMap().reverse().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},d.getKeyAfter=function(e){return this.getBlockMap().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},d.getBlockAfter=function(e){return this.getBlockMap().skipUntil(function(t,n){return n===e}).skip(1).first()},d.getBlockBefore=function(e){return this.getBlockMap().reverse().skipUntil(function(t,n){return n===e}).skip(1).first()},d.getBlocksAsArray=function(){return this.getBlockMap().toArray()},d.getFirstBlock=function(){return this.getBlockMap().first()},d.getLastBlock=function(){return this.getBlockMap().last()},d.getPlainText=function(e){return this.getBlockMap().map(function(e){return e?e.getText():""}).join(e||"\n")},d.getLastCreatedEntityKey=function(){return a.__getLastCreatedEntityKey()},d.hasText=function(){var e=this.getBlockMap();return e.size>1||escape(e.first().getText()).replace(/%u200B/g,"").length>0},d.createEntity=function(e,t,n){return a.__create(e,t,n),this},d.mergeEntityData=function(e,t){return a.__mergeData(e,t),this},d.replaceEntityData=function(e,t){return a.__replaceData(e,t),this},d.addEntity=function(e){return a.__add(e),this},d.getEntity=function(e){return a.__get(e)},d.getAllEntities=function(){return a.__getAll()},d.loadWithEntities=function(e){return a.__loadWithEntities(e)},u.createFromBlockArray=function(e,t){var r=Array.isArray(e)?e:e.contentBlocks,i=n.createFromArray(r),o=i.isEmpty()?new s:s.createEmpty(i.first().getKey());return new u({blockMap:i,entityMap:t||a,selectionBefore:o,selectionAfter:o})},u.createFromText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,n=e.split(t).map(function(e){return e=h(e),new A({key:l(),text:e,type:"unstyled",characterList:p(m(r.EMPTY,e.length))})});return u.createFromBlockArray(n)},u.fromJS=function(t){return new u(e({},t,{blockMap:y(t.blockMap).map(u.createContentBlockFromJS),selectionBefore:new s(t.selectionBefore),selectionAfter:new s(t.selectionAfter)}))},u.createContentBlockFromJS=function(t){var n=t.characterList;return new A(e({},t,{data:g(t.data),characterList:null!=n?p((Array.isArray(n)?n:c(n)).map(function(e){return r.fromJS(e)})):void 0}))},u}(v);return ps=b}function gl(){if(gs)return ms;gs=1;var e=Zs(),t="LTR",n=null;function r(e){return e===t||"RTL"===e}function i(n){return r(n)||e(!1),n===t?"ltr":"rtl"}function o(e){n=e}return ms={NEUTRAL:"NEUTRAL",LTR:t,RTL:"RTL",isStrong:r,getHTMLDir:i,getHTMLDirIfDifferent:function(t,n){return r(t)||e(!1),r(n)||e(!1),t===n?null:i(t)},setGlobalDir:o,initGlobalDir:function(){o(t)},getGlobalDir:function(){return n||this.initGlobalDir(),n||e(!1),n}}}function yl(){if(vs)return ys;vs=1;var e=gl(),t=Zs(),n="֐־׀׃׆׈-׏א-ת׫-ׯװ-ײ׳-״׵-׿߀-߉ߊ-ߪߴ-ߵߺ߻-߿ࠀ-ࠕࠚࠤࠨ࠮-࠯࠰-࠾࠿ࡀ-ࡘ࡜-࡝࡞࡟-࢟‏יִײַ-ﬨשׁ-זּ﬷טּ-לּ﬽מּ﬿נּ-סּ﭂ףּ-פּ﭅צּ-ﭏ",r="؈؋؍؛؜؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍܎܏ܐܒ-ܯ݋-݌ݍ-ޥޱ޲-޿ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-﯒ﯓ-ﴽ﵀-﵏ﵐ-ﶏ﶐-﶑ﶒ-ﷇ﷈-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴ﹵ﹶ-ﻼ﻽-﻾",i=new RegExp("["+"A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+n+r+"]"),o=new RegExp("["+n+r+"]");function a(e){var t=i.exec(e);return null==t?null:t[0]}function s(t){var n=a(t);return null==n?e.NEUTRAL:o.exec(n)?e.RTL:e.LTR}function l(t,n){if(n=n||e.NEUTRAL,!t.length)return n;var r=s(t);return r===e.NEUTRAL?n:r}function c(n,r){return r||(r=e.getGlobalDir()),e.isStrong(r)||t(!1),l(n,r)}return ys={firstStrongChar:a,firstStrongCharDir:s,resolveBlockDir:l,getDirection:c,isDirectionLTR:function(t,n){return c(t,n)===e.LTR},isDirectionRTL:function(t,n){return c(t,n)===e.RTL}}}function vl(){if(xs)return ws;xs=1;return ws=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")},ws}function Al(){if(Ss)return _s;Ss=1;var e,t=function(){if(bs)return As;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}bs=1;var t=yl(),n=gl(),r=Zs();return As=function(){function i(t){e(this,"_defaultDir",void 0),e(this,"_lastDir",void 0),t?n.isStrong(t)||r(!1):t=n.getGlobalDir(),this._defaultDir=t,this.reset()}var o=i.prototype;return o.reset=function(){this._lastDir=this._defaultDir},o.getDirection=function(e){return this._lastDir=t.getDirection(e,this._lastDir),this._lastDir},i}()}(),n=Hs(),r=vl(),i=n.OrderedMap;return _s={getDirectionMap:function(o,a){e?e.reset():e=new t;var s=o.getBlockMap(),l=s.valueSeq().map(function(t){return r(e).getDirection(t.getText())}),c=i(s.keySeq().zip(l));return null!=a&&n.is(a,c)?a:c}}}function bl(){if(Cs)return Es;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Cs=1;var n=cl(),r=ml(),i=Al(),o=hl(),a=Hs(),s=a.OrderedSet,l=a.Record,c=a.Stack,u=a.OrderedMap,d=a.List,h=l({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:c(),selection:null,treeMap:null,undoStack:c()}),p=function(){l.createEmpty=function(e){return this.createWithText("",e)},l.createWithText=function(e,t){return l.createWithContent(r.createFromText(e),t)},l.createWithContent=function(e,t){if(0===e.getBlockMap().count())return l.createEmpty(t);var n=e.getBlockMap().first().getKey();return l.create({currentContent:e,undoStack:c(),redoStack:c(),decorator:t||null,selection:o.createEmpty(n)})},l.create=function(t){var n=t.currentContent,r=e({},t,{treeMap:m(n,t.decorator),directionMap:i.getDirectionMap(n)});return new l(new h(r))},l.fromJS=function(t){return new l(new h(e({},t,{directionMap:null!=t.directionMap?u(t.directionMap):t.directionMap,inlineStyleOverride:null!=t.inlineStyleOverride?s(t.inlineStyleOverride):t.inlineStyleOverride,nativelyRenderedContent:null!=t.nativelyRenderedContent?r.fromJS(t.nativelyRenderedContent):t.nativelyRenderedContent,redoStack:null!=t.redoStack?c(t.redoStack.map(function(e){return r.fromJS(e)})):t.redoStack,selection:null!=t.selection?new o(t.selection):t.selection,treeMap:null!=t.treeMap?u(t.treeMap).map(function(e){return d(e).map(function(e){return n.fromJS(e)})}):t.treeMap,undoStack:null!=t.undoStack?c(t.undoStack.map(function(e){return r.fromJS(e)})):t.undoStack,currentContent:r.fromJS(t.currentContent)})))},l.set=function(e,t){return new l(e.getImmutable().withMutations(function(r){var i=r.get("decorator"),o=i;null===t.decorator?o=null:t.decorator&&(o=t.decorator);var a=t.currentContent||e.getCurrentContent();if(o!==i){var s,l=r.get("treeMap");return s=o&&i?function(e,t,r,i,o){return r.merge(t.toSeq().filter(function(t){return i.getDecorations(t,e)!==o.getDecorations(t,e)}).map(function(t){return n.generate(e,t,i)}))}(a,a.getBlockMap(),l,o,i):m(a,o),void r.merge({decorator:o,treeMap:s,nativelyRenderedContent:null})}a!==e.getCurrentContent()&&r.set("treeMap",function(e,t,r,i){var o=e.getCurrentContent().set("entityMap",r),a=o.getBlockMap(),s=e.getImmutable().get("treeMap");return s.merge(t.toSeq().filter(function(e,t){return e!==a.get(t)}).map(function(e){return n.generate(o,e,i)}))}(e,a.getBlockMap(),a.getEntityMap(),o)),r.merge(t)}))};var a=l.prototype;function l(e){t(this,"_immutable",void 0),this._immutable=e}return a.toJS=function(){return this.getImmutable().toJS()},a.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},a.getCurrentContent=function(){return this.getImmutable().get("currentContent")},a.getUndoStack=function(){return this.getImmutable().get("undoStack")},a.getRedoStack=function(){return this.getImmutable().get("redoStack")},a.getSelection=function(){return this.getImmutable().get("selection")},a.getDecorator=function(){return this.getImmutable().get("decorator")},a.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},a.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},a.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},a.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},a.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},l.setInlineStyleOverride=function(e,t){return l.set(e,{inlineStyleOverride:t})},a.getCurrentInlineStyle=function(){var e=this.getInlineStyleOverride();if(null!=e)return e;var t=this.getCurrentContent(),n=this.getSelection();return n.isCollapsed()?function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),i=e.getBlockForKey(n);if(r>0)return i.getInlineStyleAt(r-1);if(i.getLength())return i.getInlineStyleAt(0);return g(e,n)}(t,n):function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),i=e.getBlockForKey(n);if(r<i.getLength())return i.getInlineStyleAt(r);if(r>0)return i.getInlineStyleAt(r-1);return g(e,n)}(t,n)},a.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},a.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},a.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},a.getDirectionMap=function(){return this.getImmutable().get("directionMap")},l.acceptSelection=function(e,t){return f(e,t,!1)},l.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),f(e,t,!0)},l.moveSelectionToEnd=function(e){var t=e.getCurrentContent().getLastBlock(),n=t.getKey(),r=t.getLength();return l.acceptSelection(e,new o({anchorKey:n,anchorOffset:r,focusKey:n,focusOffset:r,isBackward:!1}))},l.moveFocusToEnd=function(e){var t=l.moveSelectionToEnd(e);return l.forceSelection(t,t.getSelection())},l.push=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.getCurrentContent()===t)return e;var o=i.getDirectionMap(t,e.getDirectionMap());if(!e.getAllowUndo())return l.set(e,{currentContent:t,directionMap:o,lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:r,inlineStyleOverride:null});var a=e.getSelection(),s=e.getCurrentContent(),u=e.getUndoStack(),d=t;a!==s.getSelectionAfter()||function(e,t){var n=e.getLastChangeType();return t!==n||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(e,n)?(u=u.push(s),d=d.set("selectionBefore",a)):"insert-characters"!==n&&"backspace-character"!==n&&"delete-character"!==n||(d=d.set("selectionBefore",s.getSelectionBefore()));var h=e.getInlineStyleOverride();-1===["adjust-depth","change-block-type","split-block"].indexOf(n)&&(h=null);var p={currentContent:d,directionMap:o,undoStack:u,redoStack:c(),lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:r,inlineStyleOverride:h};return l.set(e,p)},l.undo=function(e){if(!e.getAllowUndo())return e;var t=e.getUndoStack(),n=t.peek();if(!n)return e;var r=e.getCurrentContent(),o=i.getDirectionMap(n,e.getDirectionMap());return l.set(e,{currentContent:n,directionMap:o,undoStack:t.shift(),redoStack:e.getRedoStack().push(r),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:r.getSelectionBefore()})},l.redo=function(e){if(!e.getAllowUndo())return e;var t=e.getRedoStack(),n=t.peek();if(!n)return e;var r=e.getCurrentContent(),o=i.getDirectionMap(n,e.getDirectionMap());return l.set(e,{currentContent:n,directionMap:o,undoStack:e.getUndoStack().push(r),redoStack:t.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:n.getSelectionAfter()})},a.getImmutable=function(){return this._immutable},l}();function f(e,t,n){return p.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function m(e,t){return e.getBlockMap().map(function(r){return n.generate(e,r,t)}).toOrderedMap()}function g(e,t){var n=e.getBlockMap().reverse().skipUntil(function(e,n){return n===t}).skip(1).skipUntil(function(e,t){return e.getLength()}).first();return n?n.getInlineStyleAt(n.getLength()-1):s()}return Es=p}function wl(){if(Ts)return Ds;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ts=1;var n=Ks(),r=Us(),i=Qs(),o=Ws(),a=sl(),s=bl(),l=Js(),c=pl(),u=Hs(),d=function(){if(Is)return ks;Is=1;var e=Ws(),t=il(),n=Hs(),r=Zs(),i=n.OrderedMap,o=n.List,a=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},s=function(e,t,n,r,i){if(!i)return e;var s="after"===r,l=t.getKey(),c=n.getKey(),u=t.getParentKey(),d=t.getNextSiblingKey(),h=t.getPrevSiblingKey(),p=n.getParentKey(),f=s?n.getNextSiblingKey():c,m=s?c:n.getPrevSiblingKey();return e.withMutations(function(e){a(u,e,function(e){var t=e.getChildKeys();return e.merge({children:t.delete(t.indexOf(l))})}),a(h,e,function(e){return e.merge({nextSibling:d})}),a(d,e,function(e){return e.merge({prevSibling:h})}),a(f,e,function(e){return e.merge({prevSibling:l})}),a(m,e,function(e){return e.merge({nextSibling:l})}),a(p,e,function(e){var t=e.getChildKeys(),n=t.indexOf(c),r=s?n+1:0!==n?n-1:0,i=t.toArray();return i.splice(r,0,l),e.merge({children:o(i)})}),a(l,e,function(e){return e.merge({nextSibling:f,prevSibling:m,parent:p})})})};return ks=function(n,o,a,l){"replace"===l&&r(!1);var c=a.getKey(),u=o.getKey();u===c&&r(!1);var d=n.getBlockMap(),h=o instanceof e,p=[o],f=d.delete(u);h&&(p=[],f=d.withMutations(function(e){var n=o.getNextSiblingKey(),r=t(o,e);e.toSeq().skipUntil(function(e){return e.getKey()===u}).takeWhile(function(e){var t=e.getKey(),i=t===u,o=n&&t!==n,a=!n&&e.getParentKey()&&(!r||t!==r);return!!(i||o||a)}).forEach(function(t){p.push(t),e.delete(t.getKey())})}));var m=f.toSeq().takeUntil(function(e){return e===a}),g=f.toSeq().skipUntil(function(e){return e===a}).skip(1),y=p.map(function(e){return[e.getKey(),e]}),v=i();if("before"===l){var A=n.getBlockBefore(c);A&&A.getKey()===o.getKey()&&r(!1),v=m.concat([].concat(y,[[c,a]]),g).toOrderedMap()}else if("after"===l){var b=n.getBlockAfter(c);b&&b.getKey()===u&&r(!1),v=m.concat([[c,a]].concat(y),g).toOrderedMap()}return n.merge({blockMap:s(v,o,a,l,h),selectionBefore:n.getSelectionAfter(),selectionAfter:n.getSelectionAfter().merge({anchorKey:u,focusKey:u})})},ks}(),h=c("draft_tree_data_support"),p=h?o:i,f=u.List,m=u.Repeat;return Ds={insertAtomicBlock:function(t,i,o){var c=t.getCurrentContent(),u=t.getSelection(),d=a.removeRange(c,u,"backward"),g=d.getSelectionAfter(),y=a.splitBlock(d,g),v=y.getSelectionAfter(),A=a.setBlockType(y,v,"atomic"),b=r.create({entity:i}),w={key:l(),type:"atomic",text:o,characterList:f(m(b,o.length))},x={key:l(),type:"unstyled"};h&&(w=e({},w,{nextSibling:x.key}),x=e({},x,{prevSibling:w.key}));var _=[new p(w),new p(x)],S=n.createFromArray(_),E=a.replaceWithFragment(A,v,S),C=E.merge({selectionBefore:u,selectionAfter:E.getSelectionAfter().set("hasFocus",!0)});return s.push(t,C,"insert-fragment")},moveAtomicBlock:function(e,t,n,r){var i,o=e.getCurrentContent(),l=e.getSelection();if("before"===r||"after"===r){var c=o.getBlockForKey("before"===r?n.getStartKey():n.getEndKey());i=d(o,t,c,r)}else{var u=a.removeRange(o,n,"backward"),h=u.getSelectionAfter(),p=u.getBlockForKey(h.getFocusKey());if(0===h.getStartOffset())i=d(u,t,p,"before");else if(h.getEndOffset()===p.getLength())i=d(u,t,p,"after");else{var f=a.splitBlock(u,h),m=f.getSelectionAfter(),g=f.getBlockForKey(m.getFocusKey());i=d(f,t,g,"before")}}var y=i.merge({selectionBefore:l,selectionAfter:i.getSelectionAfter().set("hasFocus",!0)});return s.push(e,y,"move-block")}}}function xl(){if(Ls)return Ns;Ls=1;var e=Hs().List,t=function(){function t(e){var t,n,r;r=void 0,(n="_decorators")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this._decorators=e.slice()}var n=t.prototype;return n.getDecorations=function(t,n){var r=Array(t.getText().length).fill(null);return this._decorators.forEach(function(e,i){var o=0;(0,e.strategy)(t,function(e,t){(function(e,t,n){for(var r=t;r<n;r++)if(null!=e[r])return!1;return!0})(r,e,t)&&(!function(e,t,n,r){for(var i=t;i<n;i++)e[i]=r}(r,e,t,i+"."+o),o++)},n)}),e(r)},n.getComponentForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].component},n.getPropsForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].props},t}();return Ns=t}function _l(){if(Ps)return Bs;function e(e){return e.replace(/\//g,"-")}return Ps=1,Bs=function(t){return"object"==typeof t?Object.keys(t).filter(function(e){return t[e]}).map(e).join(" "):Array.prototype.map.call(arguments,e).join(" ")},Bs}function Sl(){if(Ms)return Os;Ms=1;var t=e,n=_l(),r=(0,Hs().Map)({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},section:{element:"section"},article:{element:"article"},"unordered-list-item":{element:"li",wrapper:t.createElement("ul",{className:n("public/DraftStyleDefault/ul")})},"ordered-list-item":{element:"li",wrapper:t.createElement("ol",{className:n("public/DraftStyleDefault/ol")})},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:t.createElement("pre",{className:n("public/DraftStyleDefault/pre")})},unstyled:{element:"div",aliasedElements:["p"]}});return Os=r}function El(){return Fs?js:(Fs=1,js={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}})}
2
2
  /*
3
3
  object-assign
4
4
  (c) Sindre Sorhus
@@ -26,5 +26,5 @@
26
26
  Copyright (c) 2018 Jed Watson.
27
27
  Licensed under the MIT License (MIT), see
28
28
  http://jedwatson.github.io/classnames
29
- */var Yw,Jw=(Gw||(Gw=1,Yw=Zw,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=r(e,n(i)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var o in n)e.call(n,o)&&n[o]&&(i=r(i,o));return i}function r(e,t){return t?e?e+" "+t:e+t:e}Yw.exports?(t.default=t,Yw.exports=t):window.classNames=t}()),Zw.exports),$w=en(Jw);const Xw=({articles:t,seeMoreButton:n,layout:r,...i})=>{const{variablesForQuery:o,...a}=i;return an.jsxs($n,{...a,children:[t.map((n,i)=>{const o=`lastArticleKey${i}`,a=i===t.length-1;return an.jsxs(e.Fragment,{children:[an.jsx(Zr,{...n,px:{xs:"m",md:"0"},cardTitleProps:{weight:"semi-bold",maxRows:r===lr.MOBILE?void 0:3,...n.cardTitleProps}}),!a&&an.jsx(Ln,{color:"grey-200",my:"s"}),10===i&&r===lr.MOBILE&&an.jsx(pn,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),20===i&&r===lr.MOBILE&&an.jsx(pn,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"ARTICLE"}),(10===i||20===i)&&r===lr.MOBILE&&an.jsx(Ln,{color:"grey-200",my:"s"})]},o)}),n&&an.jsx(Nn,{...n,color:"primary",variant:"outlined",mx:"auto",mt:"s"})]})},ex=({legalNotices:t,seeMoreLegalNotices:n,...r})=>0===t.length?null:an.jsxs($n,{...r,children:[t.map((t,n)=>an.jsxs(e.Fragment,{children:[an.jsx(Gr,{...t,linkProps:{children:"Lire l’annonce"}}),an.jsx(Ln,{my:"l",color:"grey-200"})]},`${t.link}-${n}`)),n&&an.jsx(Nn,{color:"primary",variant:"outlined",mx:"auto",mt:"xl",...n})]}),tx=({updatedAt:e,...t})=>an.jsx(ri,{...t,...e&&{updatedAt:Mi(e)}}),nx=({draftContent:t,pageEndpoint:n,imgEndpoint:r,withCmp:i=!0})=>{const o=e.useRef(null);return e.useEffect(()=>{const e=Qw({rawDraftContent:t,pageEndpoint:n,imgEndpoint:r,withCmp:i}),a=document.createRange().createContextualFragment(e);o.current&&(o.current.innerHTML="",o.current.appendChild(a))},[t,r,n,i]),an.jsx($n,{ref:o,mt:"s",className:"c-content",children:Ww({rawDraftContent:t,pageEndpoint:n,imgEndpoint:r,withCmp:i})})},rx=(e,t)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}},ix=".c-search-form__autocomplete",ox=({isSSR:t=!0,layout:n,title:r,titleHref:i,searchFormProps:o,breadcrumbProps:a,selectProps:s,variant:l,hasTopBorder:c})=>{const[u,d]=e.useState([]),h=e.useCallback(()=>{const e=document.querySelector(ix);u&&u.length>0&&e&&e.classList.remove("u-hidden")},[u]),p=e.useCallback(()=>{const e=document.querySelector(ix);u&&u.length>0&&e&&e.classList.remove("u-hidden")},[u]),f=e.useCallback(e=>{e.relatedTarget||document.querySelector(ix)?.classList?.add("u-hidden")},[]),m=e.useCallback(async e=>{if(e.target instanceof HTMLInputElement){const{target:t}=e;if(t.value.length<3)d([]);else try{const e=await Zo({url:`${t.closest("form")?.action??"#"}?searchValue=${t.value}`});d(e.map(e=>{const{_source:t}=e;return{value:t.output,url:t.url}}))}catch(e){console.error("20mn> Error while searching:",e)}}},[]);return e.useEffect(()=>{qt()},[]),e.useEffect(()=>{const e=document.querySelector(ix);u&&e&&(u.length>0?e.classList.remove("u-hidden"):e.classList.add("u-hidden"))},[u]),an.jsxs(an.Fragment,{children:[an.jsx(Xr,{layout:n,title:r,titleHref:i,breadcrumbProps:a,selectProps:s,variant:l,hasTopBorder:c,searchFormProps:{...o,autocompleteResults:u,onSubmit:e=>{e.preventDefault()},inputProps:{placeholder:"Recherchez les résultats de votre ville, votre département ou votre région",name:"elections-search",onClick:h,onFocus:p,onBlur:f,onKeyUp:rx(m,300),autoComplete:"off",required:!0,"aria-required":!0}}}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsSearchBannerContainer:{layout:n,title:r,titleHref:i,searchFormProps:o,breadcrumbProps:a,selectProps:s,variant:l,hasTopBorder:c}})} };`}})]})},ax=({layout:e,title:t,editions:n,selectorsLabel:r,editionSelector:i,monthSelector:o,variant:a="archivesByYear",enabled:s=!0})=>s?an.jsxs(an.Fragment,{children:[an.jsx(Ln,{my:{xs:"xl",md:"xxl-2"},color:"ultramarine"}),an.jsx(mr,{size:"xs",mb:"xxl",children:t}),an.jsxs(Xn,{alignItems:{xs:"start",md:"center"},gap:{xs:"xs",md:"l"},direction:{xs:"column",md:"row"},children:[an.jsx(gr,{size:"s",weight:"bold",...r}),an.jsx(sr,{...i,id:"archivePdfListEditionSelector",containerProps:{style:{width:e===lr.MOBILE?"100%":"163px"}},py:"m",px:"s"}),"archivesByYear"===a&&o&&an.jsx(sr,{...o,id:"archivePdfListMonthSelector",containerProps:{style:{width:e===lr.MOBILE?"100%":"193px"}},py:"m",px:"s"})]}),n&&n.length>0&&an.jsxs(Xn,{direction:"column",gap:"l",mt:"l",children:[n.slice(0,20).map(e=>an.jsxs(Xn,{alignItems:"baseline",children:[an.jsx(Pn,{name:"diode",color:"ultramarine",size:11,mr:"xxs"}),an.jsx(nr,{color:"ultramarine",href:e.href,children:e.name})]},e.name)),n.length>20&&an.jsx("span",{children:"Vous ne trouvez pas le journal numérique recherché ? Sélectionnez une édition et un mois pour une recherche plus précise."})]})]}):null,sx=e=>{const{variablesForQuery:t,...n}=e;return an.jsx(Yr,{...n,headingProps:{...n.headingProps,as:"h2"},mb:"xxl"})},lx=e=>e?e.rightSubheader&&new Date(e.rightSubheader?.text).getTime()?{...e,rightSubheader:{...e.rightSubheader,text:Mi(e.rightSubheader.text)}}:{...e}:e,cx=({articles:e,layout:t,columnsNumber:n=2,hideFirstDivider:r=!1,dividerProps:i,seeMoreButton:o,seeMoreLink:a,tagTotalArticles:s,currentPagePath:l,currentPage:c="1",articlesLimit:u,hasCardLarge:d=!1,hasMarginOnCard:h=!0,heading:p,isLoading:f=!1,skeletonCount:m=8,desktopArticlesListClassName:g,...y})=>{if(0===e.length)return null;const v=e=>an.jsx(Pr,{...e,cardTitleProps:{as:"h2",...e.cardTitleProps},cardHeaderProps:lx(e.cardHeaderProps),mx:h?"m":void 0}),A=f?Array.from({length:m},(e,t)=>t):[];let b=null;b=t===lr.DESKTOP?an.jsxs(tr,{colsNumber:n,gap:"xl",className:g,children:[e.slice(0,u).map((e,t)=>{const{layout:n,...r}=e;return an.jsx(Mr,{...r,className:`card-item-${t+1}`,cardTitleProps:{as:"h2",...e.cardTitleProps},cardHeaderProps:lx(e.cardHeaderProps)},`${e.link}-${t}`)}),A.map(e=>an.jsx(Ur,{variant:"medium"},`skeleton-${e}`))]}):an.jsxs(an.Fragment,{children:[e.slice(0,u).map((e,n)=>an.jsx($n,{className:`card-item-${n+1}`,children:d?an.jsxs(an.Fragment,{children:[0===n&&an.jsx(Or,{...e,layout:t}),n>0&&an.jsxs(an.Fragment,{children:[an.jsx(Ln,{color:"grey-200",my:"s",...i}),v({...e,layout:t})]})]}):an.jsxs(an.Fragment,{children:[an.jsx(Ln,{color:"grey-200",my:"s",...i,className:$w({"u-hidden":0===n&&r},i?.className)}),v({...e,layout:t})]})},`${e.link}-${n}`)),A.map(e=>an.jsxs($n,{children:[an.jsx(Ln,{color:"grey-200",my:"s",...i}),an.jsx(Ur,{variant:"extra-small",mx:h?"m":void 0})]},`skeleton-${e}`))]});const w=an.jsxs(an.Fragment,{children:[p&&an.jsx(mr,{size:"m",mb:"xl",mx:{xs:"m",md:"0"},...p}),b,(a||o)&&an.jsxs(Xn,{justifyContent:"center",mt:"l",children:[o&&an.jsx(Nn,{...o}),a&&an.jsx(nr,{buttonColor:"primary",variant:"outlined",...a}),s&&l&&an.jsx("noscript",{children:an.jsx(pi,{totalArticles:s,currentPage:c,pagePath:l,archivesUrl:"https://www.20minutes.fr/archives"})})]})]});return 0===Object.keys(y).length?w:an.jsx($n,{...y,children:w})},ux=({header:{subtitle:e,...t},sectionId:n,liveIndicator:r,children:i,...o})=>{const a=e&&"string"!=typeof e?Ww({rawDraftContent:e}):e;return an.jsxs($n,{...o,id:n,className:$w(o.className,{"u-anchor-link":Boolean(n)}),children:[r&&an.jsx(tx,{...r,variant:"elections",mx:{xs:"m",md:"0"},mb:"xs"}),t?.heading?.children&&an.jsx(ei,{...t,subtitle:a,mb:{xs:"m",sm:"xl"}}),i]})},dx=({mapConstituenciesProps:e,...t})=>""===e.electionName&&""===e.electionYear&&0===e.resultsPerDistrict.length||0===Object.keys(e.mapDistrictsData||{}).length?null:an.jsx(ux,{...t,header:{...t.header,heading:{...t.header.heading,as:"h2"}},children:an.jsx(si,{...e,mx:{xs:"m",md:"0"}})}),hx=({mapDepartmentsProps:e,...t})=>""===e.electionName&&""===e.electionYear&&0===e.resultsPerDepartment.length?null:an.jsx(ux,{...t,header:{...t.header,heading:{...t.header.heading,as:"h2"}},children:an.jsx(ai,{...e,mx:{xs:"m",md:"0"}})}),px=({mapEuropeProps:e,...t})=>""===e.electionName&&""===e.electionYear&&0===e.resultsPerCountry.length||0===Object.keys(e.mapEuCountriesData||{}).length||0===Object.keys(e.mapNonEuCountriesData||{}).length?null:an.jsx(ux,{...t,header:{...t.header,heading:{...t.header.heading,as:"h2"}},children:an.jsx(li,{...e,mx:{xs:"m",md:"0"}})}),fx=({mapTownsByDepartmentsProps:e,...t})=>{const{electionName:n,electionYear:r,...i}=e;if(""===e.electionName&&""===e.electionYear&&0===e.resultsPerTown.length)return null;const o=0===(e?.resultsPerTown?.length??0);return an.jsx(ux,{...t,className:$w({"u-placeholder-map-towns-empty":o,"u-placeholder-map-towns":!o},t?.className),header:{...t.header,heading:{...t.header.heading,as:"h2"}},children:an.jsx(hi,{...i,mx:{xs:"m",md:"0"}})})},mx=({articles:t,selectProps:n,seeMoreLink:r,layout:i,...o})=>{const{variablesForQuery:a,...s}=o,l=an.jsxs(an.Fragment,{children:[an.jsx(ti,{as:"h2",size:{xs:"s",md:"m"},isCentered:i===lr.MOBILE,mb:{xs:"l",md:"0"},iconProps:{name:"rubric-news",size:40},children:"Actualité locale"}),an.jsx(sr,{...n})]}),c=e=>an.jsx(Mr,{...e,cardTitleProps:{as:"h3",size:"xxs",weight:"semi-bold",fontFamily:"source-serif-pro",maxRows:4,...e.cardTitleProps},socialBarProps:void 0},e.title);return an.jsxs($n,{...s,children:[an.jsx(Bn,{mb:"l"}),i===lr.DESKTOP?an.jsx(Xn,{justifyContent:"between",mb:"xl",alignItems:"center",children:l}):an.jsx($n,{mx:"m",mb:"l",children:l}),i===lr.DESKTOP?an.jsx(tr,{colsNumber:4,gap:"xl",mx:i===lr.DESKTOP?"0":"m",children:t.map(e=>c(e))}):an.jsx(Xn,{direction:"column",mx:"m",children:t.map((n,r)=>an.jsxs(e.Fragment,{children:[c(n),r<t.length-1&&an.jsx(Ln,{color:"grey-200",my:"s"})]},n.title))}),an.jsx(Xn,{justifyContent:"center",mt:"xxl",children:an.jsx(nr,{buttonColor:"primary",variant:"outlined",...r,children:"Voir plus d'articles"})})]})},gx=({post:t,postIndex:n,postsCount:r,pageEndpoint:i,imgEndpoint:o,layout:a,disableAds:s=!1,enableAnchoring:l=!0})=>e.createElement("section",{className:$w("js-post",{"u-anchor-link":l}),...l?{id:`post-${t.id}`}:{},key:t.id},an.jsx(oi,{...t.title}),t.content&&an.jsx(nx,{draftContent:t.content,pageEndpoint:i,imgEndpoint:o}),t.talk&&an.jsx(ii,{...t.talk,mt:"s"}),an.jsx(Ln,{color:"grey-200",my:"l"}),!s&&r>=4&&n%6==3&&an.jsx(pn,{adUnitCompletePath:a===lr.MOBILE?"/49926454/20minutes_webmobile/live/inread":"/49926454/20minutes_desktop/live/inread",variant:"INREAD",mb:"s",isFullscreenMobile:!0}),!s&&r>=8&&n%6==0&&an.jsx(pn,{adUnitCompletePath:a===lr.MOBILE?"/49926454/20minutes_webmobile/live/article_mtf":"/49926454/20minutes_desktop/live/pave_article",variant:"ARTICLE",mb:"s",isFullscreenMobile:!0})),yx=({posts:e,layout:t,pageEndpoint:n,imgEndpoint:r,seeMoreLink:i,disableAds:o,enableAnchoring:a=!0,...s})=>{const{variablesForQuery:l,refreshButton:c,...u}=s;return 0===e.length?null:an.jsxs(an.Fragment,{children:[an.jsx($n,{...u,"data-state":c?.state,"data-latest-post-id":c?.latestPostId,"data-brand-id":l?.brandId,"data-live-id":l?.liveId,children:e.map((i,s)=>an.jsx(gx,{post:i,postIndex:s,postsCount:e.length,layout:t,pageEndpoint:n,imgEndpoint:r,disableAds:o,enableAnchoring:a},`${i.id}-${s}`))}),i&&an.jsx(Xn,{justifyContent:"center",my:"l",children:an.jsx(Nn,{color:"primary",variant:"outlined",...i})})]})},vx=({items:t,seeMoreButton:n,...r})=>t.length<=0?null:an.jsxs(an.Fragment,{children:[an.jsx($n,{...r,children:t.map((n,r)=>{const{summaryProps:i,...o}=n;return an.jsxs(e.Fragment,{children:[an.jsx(Fr,{...o,summaryProps:o.layout!==lr.MOBILE?i:void 0,mb:"m",ml:{xs:"m",md:"0"}}),r!==t.length-1&&an.jsx(Ln,{color:"grey-200",my:"s"}),2===r&&o.layout===lr.MOBILE&&an.jsx(pn,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),7===r&&o.layout===lr.MOBILE&&an.jsx(pn,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"ARTICLE"}),(2===r||7===r)&&o.layout===lr.MOBILE&&an.jsx(Ln,{color:"grey-200",my:"s"})]},`${o.link}-${r}`)})}),n&&an.jsx(Xn,{justifyContent:"center",mb:"m",children:an.jsx(Nn,{...n})})]}),Ax=({...e})=>{const{variablesForQuery:t,...n}=e;return an.jsx(Ti,{...n})},bx=({items:t,layout:n,seeMoreButton:r,...i})=>t.length<=0?null:an.jsxs(an.Fragment,{children:[an.jsx(Xn,{direction:"column",gap:"xxl-2",...i,children:t.map((t,r)=>an.jsxs(e.Fragment,{children:[5===r&&n===lr.MOBILE&&an.jsx(pn,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),an.jsx(Rr,{...t,layout:n,containerSpacing:{px:{xs:"m",lg:"0"}}})]},`${t.link}-${r}`))}),r&&an.jsx(Xn,{justifyContent:"center",mt:"xl",children:an.jsx(Nn,{...r})}),n===lr.DESKTOP&&an.jsx(pn,{adUnitCompletePath:"/49926454/20minutes_desktop/divers/ban_btf",variant:"BAN"}),n===lr.MOBILE&&an.jsx(pn,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"BAN",mt:"xl"})]}),wx=({articles:e,layout:t,totalArticles:n,currentPagePath:r,currentPage:i="1",seeMoreButton:o,...a})=>{if(0===e.length)return null;const s=an.jsx(tr,{colsNumber:1,gap:{xs:"xxl",md:"xxl-2"},children:e.map((e,n)=>t===lr.DESKTOP?an.jsx(qr,{...e,className:$w(`card-item-${n+1}`,e.className),cardTitleProps:{as:"h2",...e.cardTitleProps},cardHeaderProps:lx(e.cardHeaderProps)},e.title):an.jsx(Br,{layout:t,...e,className:$w(`card-item-${n+1}`,e.className),cardTitleProps:{as:"h2",...e.cardTitleProps},cardHeaderProps:lx(e.cardHeaderProps)},e.title))}),l=an.jsxs(an.Fragment,{children:[s,o&&an.jsxs(an.Fragment,{children:[n&&r&&an.jsx("noscript",{children:an.jsx(pi,{totalArticles:n,currentPage:i,pagePath:r,archivesUrl:"https://www.20minutes.fr/archives"})}),an.jsx(Xn,{justifyContent:"center",mt:"xxl",children:an.jsx(Nn,{...o})})]})]});return 0===Object.keys(a).length?l:an.jsx($n,{...a,children:l})},xx=e=>{if(!window.lazyObservers?.defaultObserver&&!window.lazyObservers?.instantObserver)return window.lazyElementsToObserve=window.lazyElementsToObserve||[],void window.lazyElementsToObserve.push(e);const t=e.dataset?.distanceVisible;"700"===t?window.lazyObservers?.defaultObserver?.observe(e):"0"===t&&window.lazyObservers?.instantObserver?.observe(e)},_x=(e,t)=>{e.forEach(e=>{if(e.isIntersecting&&e.target instanceof HTMLElement){const{target:n}=e,r=n.id,i=n.dataset?.eventName;(r||i)&&(n.dataset.lazyLoaded="true",t.unobserve(n),i?(document.dispatchEvent(new CustomEvent(i,{detail:{target:n}})),console.info(`20minLazyCall: element event name %c${i}%c has been lazy loaded`,"color: #0777;font-weight:bold;","color: black")):r&&(n.dispatchEvent(new Event(r)),console.info(`20minLazyCall: element with id %c${r}%c has been lazy loaded`,"color: #0777;font-weight:bold;","color: black")))}})},Sx=()=>{document.querySelectorAll('[data-delayed="true"]:not([data-dfp-name]):not([data-lazy-loaded="true"])').forEach(e=>{xx(e)})},Ex=({medias:e,imgEndpoint:t})=>{const n=e?.find(e=>e&&!0===e.illustration&&e.type===Ki.photo&&e.photo?.node?.id);if(!n?.photo?.node?.id)return"";const r=n.photo?.node?.slug?`%format_${n.photo.node.slug}`:"%format";return`${t}/${jw(n.photo.node.id)}/${r}`},Cx=({photo:e})=>e?.node?[{type:Ki.photo,illustration:!0,legend:e.node.caption??null,photo:{node:{id:e.node.id,brand_id:e.node.brand_id,title:e.node.title??null,caption:e.node.caption??null,credit:e.node.credit??null,slug:e.node.slug??null}},video:null,podcast:null}]:[],kx=({medias:e,picto:t,editorialModel:n})=>{if(n===qi.Story)return{caption:{iconName:"diaporama"}};let r;if(t)switch(t){case"video":if(n!==qi.Page){const t=e?.find(e=>e&&!0===e?.illustration&&e?.type===Ki.video&&e[Ki.video]?.duration)?.video?.duration;return{caption:{iconName:"video",text:t?Bi(Number(t)):""}}}break;case"podcast":return{caption:{iconName:"podcast"}};default:return r}else e?.forEach(e=>{if("podcast"===e?.type&&(r={caption:{iconName:"podcast"}}),"video"===e?.type&&e?.illustration&&n!==qi.Page){const t=e?.video?.duration?Number(e?.video?.duration):null;r={caption:{iconName:"video",text:t?Bi(t):""}}}});return r},Ix=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery?.endCursor||null),[i,o]=e.useState(t.defaultVariablesForQuery?.hasNextPage||!1),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getTvReplaysOrExtracts&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery?.brandId,slug:t.defaultVariablesForQuery?.slug,first:8,after:n,filter:{publication_status:{eq:"published"},...t.defaultVariablesForQuery?.tagId?{tag_ids:{nin:[t.defaultVariablesForQuery.tagId]}}:{}}}))}`,options:{headers:i}}];try{const e=await Zo(...a),n=(({pageEndpoint:e,imgEndpoint:t,layout:n,data:r})=>Array.isArray(r)?[]:(r?.brand?.node?.tag?.node?.publishableContents?.edges||[])?.reduce((r,i)=>i?.node?.short_title&&i?.node?.medias&&i?.node?.url_current?(r.push({title:i.node.short_title,cardImageProps:{cover:Ex({medias:i.node.medias,imgEndpoint:t}),caption:{iconName:"video",text:i?.node?.video?.node?.duration?.toString()?Bi(parseInt(i.node.video.node.duration.toString(),10)):void 0}},link:new URL(i.node.url_current,e).href,layout:n,...n===lr.MOBILE&&{reverseCard:!0}}),r):r,[]))({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,layout:t.layout,data:e});s(e=>[...e,...n]),r(e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.endCursor||null),o(e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.hasNextPage||!1),to()}catch(e){console.error("20mn> Error while loading articles:",e)}},[n,t.defaultVariablesForQuery,t.layout]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{l&&c(!1)},[l]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},Dx=({isSSR:t=!0,name:n,layout:r,articles:i,variablesForQuery:o,seeMoreButton:a,...s})=>{if(0===i.length)return null;const{isLoading:l,articles:c,hasNextPage:u,onLoadMore:d}=Ix({layout:r,defaultArticles:i,defaultVariablesForQuery:o});return e.useEffect(()=>{l||Sx()},[l]),an.jsxs(an.Fragment,{children:[an.jsx(cx,{layout:r,articles:c,seeMoreButton:a&&u?{...a,disabled:l,onClick:d}:void 0,...s}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({[`${n}TvExtractsAndReplaysContainer`]:{layout:r,articles:c,variablesForQuery:o,seeMoreButton:a,...s}})} };`}})]})},Tx=e=>{switch(e){case"FRA":return"Nationale";case"BOR":return"Bordeaux";case"LIL":return"Lille";case"MAR":return"Marseille";case"MON":return"Montpellier";case"NAN":return"Nantes";case"NIC":return"Nice";case"PAR":return"Paris";case"REN":return"Rennes";case"STR":return"Strasbourg";case"TOU":return"Toulouse";default:return""}},Nx=e=>{const t=e.slice(0,4),n=e.slice(4,6),r=e.slice(6,8),i=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"][parseInt(n,10)-1];return`${parseInt(r,10)} ${i} ${t}`},Lx="archivePdfListEditionSelector",Bx="archivePdfListMonthSelector",Px=({isSSR:t=!0,variablesForQuery:n,layout:r,title:i,selectorsLabel:o,editionSelector:a,monthSelector:s,editions:l,enabled:c})=>{const[u,d]=e.useState(l),h=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,t=new Headers;window.envVariables?.apiAuthKey&&t.append("auth-key",window.envVariables.apiAuthKey);const r=document.getElementById(Lx),i=document.getElementById(Bx),o=[{url:`${e}/?id=getPdfsByEditionSlug&variables=${encodeURIComponent(JSON.stringify({brandId:n?.brandId,slug:r?.value,first:100,sort:"ASC",year:n?.year,month:i?.value}))}`,options:{headers:t}}];try{const e=(({data:e})=>{const t=[];return Array.isArray(e)||e?.brand?.node?.edition?.node?.pdfs?.edges?.forEach(e=>{e?.node?.url&&e?.node?.publication_date&&t.push({href:e?.node?.url,name:`Lire le journal du ${Nx(e?.node?.publication_date)} - édition ${Tx(e.node.url.match(/[0-9]{8}_([A-Z]{3})\.pdf/)?.[1]??"")}`})}),t})({data:await Zo(...o)});d(e)}catch(e){console.error("20mn> Error while searching:",e)}},[n?.brandId,n?.year]);return an.jsxs(an.Fragment,{children:[an.jsx(ax,{title:i,selectorsLabel:o,editionSelector:{...a,onChange:h},monthSelector:s&&{...s,onChange:h},editions:u,layout:r,enabled:c}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({archivePdfListContainer:{title:i,layout:r,selectorsLabel:o,editionSelector:a,monthSelector:s,editions:l,variablesForQuery:n,enabled:c}})} };`}})]})},Ox=e=>e?Dn.find(t=>e.includes(t)):void 0,Mx=e=>null!=e,jx=["actu-generale","justice","economie","auto","emploi","faits_divers","france","politique","sante","societe","monde","locales","nantes","toulouse","strasbourg","lyon","bordeaux","lille","marseille","montpellier","nice","paris","rennes","elections-municipales","production","publicommunique","magazine"],Fx=({pageEndpoint:e,imgEndpoint:t,staticEndpoint:n,data:r,hasSummary:i=!1,layout:o})=>Array.isArray(r)?[]:(r?.brand?.node?.tag?.node?.publishableContents?.edges||[])?.reduce((r,a)=>{if(!a?.node?.title||!a?.node?.label||!a?.node?.url||!a?.node?.medias&&!a?.node?.photo?.node)return r;const s=a?.node?.editorial_model===qi.ExternalContent,l=a?.node?.editorial_model===qi.Story;let c=a.node.medias?a.node.medias.filter(Mx):[];l&&a?.node?.photo?.node&&(c=Cx({photo:a.node.photo}));const u=a?.node?.editorial_model===qi.Article&&!jx.includes(a?.node?.rubric?.node?.slug||"");var d;return r.push({layout:o,link:new URL(a.node.url,e).href,title:a.node.short_title||a.node.title,cardImageProps:{cover:Ex({medias:c,imgEndpoint:t}),...kx({medias:c,picto:a?.node?.picto,editorialModel:a?.node.editorial_model})},cardHeaderProps:{headline:{text:a.node.label,color:Ox(a?.node?.rubric?.node?.themeColor?.node?.slug)},rightSubheader:{text:a.node.published_at||""}},cardTitleProps:{cartridge:"Live"===a?.node?.editorial_model?"live":void 0},socialBarProps:{layout:o,disableComment:!l&&!a.node.enable_comments,variant:"card",contentLink:new URL(a.node.url,e).href,commentAnchor:"mbrs-comments-container",commentCount:a.node.comments_count??0,shareCount:a.node.facebook_count??0,contentId:a.node?.id?.toString(),contentLegacyId:s?void 0:a.node?.legacy_id?.toString(),contentModel:a?.node?.editorial_model||void 0,...u&&{reactionCount:Gi(a.node.reactions_count),reactListItems:(d=a.node.reactions_count,d?Wi.map(e=>({count:d[e]??0,type:e})):[])}},...i&&{summaryProps:{children:a.node.lead}},...s&&n&&a?.node?.contentSource?.node?.name&&a?.node?.contentSource?.node?.logo&&a?.node?.contentSource?.node?.url&&{cardFooterProps:{avatarUrl:new URL(a.node.contentSource.node.logo,n).href,text:a.node.contentSource.node.name,externalLink:a.node.contentSource.node.url}}}),r},[]),Rx=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e,staticHost:i}=document.body.dataset,l=new Headers;window.envVariables?.apiAuthKey&&l.append("auth-key",window.envVariables.apiAuthKey);const u=[{url:`${e}/?id=getTagArticlesWithCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,slug:t.defaultVariablesForQuery.slug,first:t.defaultVariablesForQuery.first,after:n}))}`,options:{headers:l}}];try{const e=await Zo(...u),t=Fx({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,staticEndpoint:i||"",data:e,layout:window.layout}),n={articles:[...a,...t],endCursor:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.endCursor??null,hasNextPage:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.hasNextPage??!1};s(e=>[...e,...t]),r(n.endCursor),o(n.hasNextPage),window?.localStorage.setItem("aticles-container-data",JSON.stringify(n)),to()}catch(e){console.error("20mn> Error while loading articles:",e)}finally{c(!1)}},[a,n,t.defaultVariablesForQuery.brandId,t.defaultVariablesForQuery.first,t.defaultVariablesForQuery.slug]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{(()=>{const e=document.getElementById("article-list-bottom-container");if(!e)return;const t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(to(),t.unobserve(e.target))})}),n=e.querySelector(".card-item-1");n&&t.observe(n);const r=e.querySelector(".card-item-8");r&&t.observe(r);const i=e.querySelector(".card-item-16");i&&t.observe(i)})();const e=window?.performance?.getEntriesByType("navigation").map(e=>e.type).includes("back_forward");if(e){const e=Zi("aticles-container-data");e&&Object.hasOwn(e,"articles")&&Object.hasOwn(e,"endCursor")&&Object.hasOwn(e,"hasNextPage")&&(s(e.articles),r(e.endCursor),o(e.hasNextPage),to())}else window?.localStorage.removeItem("aticles-container-data")},[]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},qx=({isSSR:t=!0,layout:n,articles:r,variablesForQuery:i,seeMoreButton:o,currentPagePath:a,tagTotalArticles:s,columnsNumber:l})=>{const{isLoading:c,articles:u,hasNextPage:d,onLoadMore:h}=Rx({defaultArticles:r,defaultVariablesForQuery:i});e.useEffect(()=>{c||Sx()},[c]);const p=u.map(e=>({...e,...e.cardImageProps&&{cardImageProps:{...e.cardImageProps,sizes:"(min-width: 1660px) 384px, (min-width: 1440px) calc(18vw + 89px), (min-width: 1080px) 320px, (min-width: 780px) calc(44.29vw - 149px), calc(50vw - 16px)"}}}));return an.jsxs(an.Fragment,{children:[an.jsx(cx,{layout:n,articles:p,isLoading:c,skeletonCount:i.first,seeMoreButton:d?{...o,disabled:c,onClick:h}:void 0,currentPagePath:a,tagTotalArticles:s,columnsNumber:l}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({articleListBottomContainer:{layout:n,articles:p,variablesForQuery:i,seeMoreButton:o,skeletonCount:i.first}})} };`}})]})},zx="20mnBreakingNews",Hx=18e4,Kx=()=>{const[t,n]=e.useState(!1),[r,i]=e.useState(Zi(zx));e.useEffect(()=>{r&&localStorage.setItem(zx,JSON.stringify(r))},[r]),e.useEffect(()=>{t&&document&&document.querySelectorAll("#c-alert-info a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof HTMLElement&&(t=e.target.closest("a")?.href||""),eo({name:"content",type:"action",customProps:{cta_context:"smartbanner_alert",cta_type:"link",cta_destination:t,cta_engagement:2}}),window.location.href=t})})},[t]),e.useEffect(()=>{if(Object.keys(r??{}).includes("opened")&&i(e=>({open:e?.opened??!1,time:e?.time,data:e?.data})),r?.time&&r.time+Hx>Date.now())return void(r.open&&n(!0));const{apiHost:e,imgHost:t,brandId:o}=document.body.dataset,a=new Headers;window.envVariables?.apiAuthKey&&a.append("auth-key",window.envVariables.apiAuthKey);const s=o?no(`Brand:${o}`):void 0,l=encodeURIComponent(JSON.stringify({brandId:s}));Zo(...[{url:`${e}/?id=getBreakingNews&variables=${l}`,options:{headers:a}}]).then(e=>{const o=e?.brand?.node?.home?.node?.homeBreakingNews?.node;let a;switch(o?.content?.editorial_model){case"Article":a=o?.content?.article?.node;break;case"Live":a=o?.content?.live?.node;break;default:a=void 0}if(!a?.title||!a?.url_current)return void n(!1);const s=o?.custom_title??a.title;let l;const c=a.medias?.[0]?.photo?.node;if(o?.with_photo&&c?.id){const e=atob(c.id).replace("Photo:","");l=`${t}/${e}/147x96_${c.slug??"media"}`}const u=!r||r.data?.description!==s||r.open;i({open:u,time:Date.now(),data:{description:s,url:a.url_current,imageUrl:l}}),n(u)}).catch(e=>{console.error("20mn> Error while loading the breaking news:",e)})},[r]);return t&&r?.data?an.jsx(vr,{title:"ALERTE INFO",description:r.data.description,cover:r.data.imageUrl,link:r?.data?.url?{href:r.data.url}:void 0,closeButton:{onClick:()=>{i(e=>({...e||{},open:!1})),n(!1)}}}):null},Ux=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const l=[{url:`${e}/?id=getTagArticlesWithCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,slug:t.defaultVariablesForQuery.slug,first:t.defaultVariablesForQuery.first,after:n}))}`,options:{headers:i}}];try{const e=await Zo(...l),t=(({pageEndpoint:e,data:t})=>Array.isArray(t)?[]:(t?.brand?.node?.tag?.node?.publishableContents?.edges||[])?.reduce((t,n)=>n?.node?.title&&n?.node?.url?(t.push({title:n.node.title,url:new URL(n.node.url,e).href}),t):t,[]))({pageEndpoint:window.envVariables.pageEndpoint,data:e}),n={articles:[...a,...t],endCursor:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.endCursor??null,hasNextPage:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.hasNextPage??!1};s(e=>[...e,...t]),r(n.endCursor),o(n.hasNextPage),to()}catch(e){console.error("20mn> Error while loading articles:",e)}},[a,n,t.defaultVariablesForQuery.brandId,t.defaultVariablesForQuery.first,t.defaultVariablesForQuery.slug]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{l&&c(!1)},[l]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},Vx=({isSSR:t=!0,articles:n,variablesForQuery:r,seeMoreButton:i,linksSize:o,colsNumber:a})=>{const{isLoading:s,articles:l,hasNextPage:c,onLoadMore:u}=Ux({defaultArticles:n,defaultVariablesForQuery:r});return e.useEffect(()=>{s||Sx()},[s]),an.jsxs(an.Fragment,{children:[an.jsx(ta,{articles:l,seeMoreButton:c?{...i,disabled:s,onClick:u}:void 0,linksSize:o,colsNumber:a}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsAiArticlesContainer:{articles:l,variablesForQuery:r,seeMoreButton:i,linksSize:o,colsNumber:a}})} };`}})]})},Qx=({isSSR:t=!0,mapConstituenciesProps:n,...r})=>{const{mapConstituenciesProps:i}=(t=>{const[n,r]=e.useState(t.defaultMapConstituenciesProps),i=e.useCallback(async()=>{try{const e=await Zo({url:"https://static.20mn.fr/elections/map-districts.json"});r(t=>({...t,mapDistrictsData:e}))}catch(e){console.error("20mn> Error while loading map data:",e)}},[]);return e.useEffect(()=>{i(),qt(),Jt()},[i]),e.useMemo(()=>({mapConstituenciesProps:n}),[n])})({defaultMapConstituenciesProps:n});return an.jsxs(an.Fragment,{children:[an.jsx(dx,{mapConstituenciesProps:t?{electionName:"",electionYear:"",resultsPerDistrict:[],mapDistrictsData:{}}:i,...r}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsConstituenciesMapContainer:{mapConstituenciesProps:n,...r}})} };`}})]})},Wx=({isSSR:t=!0,mapDepartmentsProps:n,...r})=>{const{mapDepartmentsProps:i}=(t=>{const[n,r]=e.useState(t.defaultMapDepartmentsProps),i=e.useCallback(async()=>{try{const e=await Zo({url:"https://static.20mn.fr/elections/map-departments.json"});r(t=>({...t,mapDepartmentsData:e}))}catch(e){console.error("20mn> Error while loading map data:",e)}},[]);return e.useEffect(()=>{i()},[i]),e.useMemo(()=>({mapDepartmentsProps:n}),[n])})({defaultMapDepartmentsProps:n});return an.jsxs(an.Fragment,{children:[an.jsx(hx,{mapDepartmentsProps:t?{electionName:"",electionYear:"",resultsPerDepartment:[],mapDepartmentsData:{}}:i,...r}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsDepartmentsMapContainer:{mapDepartmentsProps:n,...r}})} };`}})]})},Gx=({isSSR:t=!0,mapEuropeProps:n,...r})=>{const{mapEuropeProps:i}=(t=>{const[n,r]=e.useState(t.defaultMapEuropeProps),i=e.useCallback(async()=>{try{const e=await Promise.all([Zo({url:"https://static.20mn.fr/elections/map-eu-countries.json"}),Zo({url:"https://static.20mn.fr/elections/map-non-eu-countries.json"})]);r(t=>({...t,mapEuCountriesData:e[0],mapNonEuCountriesData:e[1]}))}catch(e){console.error("20mn> Error while loading map data:",e)}},[]);return e.useEffect(()=>{i()},[i]),e.useMemo(()=>({mapEuropeProps:n}),[n])})({defaultMapEuropeProps:n});return an.jsxs(an.Fragment,{children:[an.jsx(px,{mapEuropeProps:t?{electionName:"",electionYear:"",resultsPerCountry:[],mapEuCountriesData:{},mapNonEuCountriesData:{}}:i,...r}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsEuropeanMapContainer:{mapEuropeProps:n,...r}})} };`}})]})},Zx=({isSSR:t=!0,mapTownsByDepartmentsProps:n,...r})=>{const{mapTownsByDepartmentsProps:i}=(t=>{const[n,r]=e.useState(t.defaultMapTownsByDepartmentsProps),i=e.useCallback(async()=>{try{const e=await Zo({url:"https://static.20mn.fr/elections/map-departments-paths.json"}),n=await Zo({url:"https://static.20mn.fr/elections/map-towns.svg",options:{headers:{"Content-Type":"image/svg+xml"}}}),i=await Zo({url:"https://static.20mn.fr/elections/map-droms.json"});let o=[];try{o=await Zo({url:`https://static.20mn.fr/elections/mn${t.defaultMapTownsByDepartmentsProps.electionYear}/electeds.json`})}catch(e){console.warn("20mn> Error while loading town results data:",e)}r(t=>({...t,townsSprite:n,departmentsPaths:e,dromsConfig:i,resultsPerTown:o}))}catch(e){console.error("20mn> Error while loading town map data:",e)}},[t.defaultMapTownsByDepartmentsProps.electionYear]);return e.useEffect(()=>{i()},[i]),e.useMemo(()=>({mapTownsByDepartmentsProps:n}),[n])})({defaultMapTownsByDepartmentsProps:n}),o={layout:n.layout,resultsPerTown:[]};return an.jsxs(an.Fragment,{children:[an.jsx(fx,{mapTownsByDepartmentsProps:t?o:i,...r}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsMapTownsByDepartmentsContainer:{mapTownsByDepartmentsProps:n,...r}})} };`}})]})},Yx=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getUserBackArticlesWithCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,userBackId:t.defaultVariablesForQuery.userBackId,first:10,after:n}))}`,options:{headers:i}}];try{const e=await Zo(...a),t=(({pageEndpoint:e,imgEndpoint:t,data:n,layout:r})=>Array.isArray(n)?[]:(n?.brand?.node?.publishableContents?.edges||[])?.reduce((n,i)=>{if(!i?.node?.title||!i?.node?.label||!i?.node?.url||!i?.node?.medias&&!i?.node?.photo?.node)return n;const o=i?.node?.editorial_model===qi.Story;let a=i.node.medias?i.node.medias.filter(Mx):[];return o&&i?.node?.photo?.node&&(a=Cx({photo:i.node.photo})),n.push({link:new URL(i.node.url,e).href,title:i.node.short_title||i.node.title,cardImageProps:{cover:Ex({medias:a,imgEndpoint:t}),...kx({medias:a,picto:i?.node?.picto,editorialModel:i?.node.editorial_model})},cardHeaderProps:{headline:{text:i.node.label,color:Ox(i?.node?.rubric?.node?.themeColor?.node?.slug)},rightSubheader:{text:i.node.published_at||""}},cardTitleProps:{cartridge:"Live"===i?.node?.editorial_model?"live":void 0},socialBarProps:{layout:r,disableComment:!o&&!i.node.enable_comments,variant:"card",contentLink:new URL(i.node.url,e).href,commentAnchor:"mbrs-comments-container",commentCount:i.node.comments_count??0,shareCount:i.node.facebook_count??0,contentLegacyId:i.node?.legacy_id?.toString()}}),n},[]))({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e,layout:window.layout});s(e=>[...e,...t]),r(e?.brand?.node?.publishableContents?.pageInfo?.endCursor||null),o(e?.brand?.node?.publishableContents?.pageInfo?.hasNextPage||!1),to()}catch(e){console.error("20mn> Error while loading articles:",e)}},[n,t.defaultVariablesForQuery.brandId,t.defaultVariablesForQuery.userBackId]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{l&&c(!1)},[l]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},Jx=({isSSR:t=!0,layout:n,articles:r,variablesForQuery:i,seeMoreButton:o,currentPagePath:a,tagTotalArticles:s,columnsNumber:l,heading:c})=>{if(0===r.length)return null;const{isLoading:u,articles:d,hasNextPage:h,onLoadMore:p}=Yx({defaultArticles:r,defaultVariablesForQuery:i});e.useEffect(()=>{u||Sx()},[u]);const f=d.map(e=>({...e,...e.cardImageProps&&{cardImageProps:{...e.cardImageProps,sizes:"(min-width: 1660px) 384px, (min-width: 1440px) calc(18vw + 89px), (min-width: 1080px) 320px, (min-width: 780px) calc(44.29vw - 149px), calc(50vw - 16px)"}}}));return an.jsxs(an.Fragment,{children:[an.jsx(cx,{layout:n,articles:f,seeMoreButton:h?{...o,disabled:u,onClick:p}:void 0,currentPagePath:a,tagTotalArticles:s,columnsNumber:l,heading:c}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({journalistArticleListContainer:{layout:n,articles:f,variablesForQuery:i,seeMoreButton:o,heading:c}})} };`}})]})},$x=new Intl.DateTimeFormat("fr",{timeStyle:"short",timeZone:"Europe/Paris"}),Xx=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getLatestContentsCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,sourceExcluded:t.defaultVariablesForQuery.sourceExcluded,first:t.defaultVariablesForQuery.first,after:n}))}`,options:{headers:i}}];try{const e=await Zo(...a),t=(({layout:e,pageEndpoint:t,imgEndpoint:n,data:r})=>Array.isArray(r)?[]:(r?.brand?.node?.publishableContents?.edges||[])?.reduce((r,i)=>{if(!(i?.node?.title&&i?.node?.label&&i?.node?.url&&i?.node?.published_at&&(i?.node?.medias||i?.node?.photo?.node)))return r;let o=i.node.medias??[];return"Story"===i?.node?.editorial_model&&i?.node?.photo?.node&&(o=Cx({photo:i.node.photo})),r.push({link:new URL(i.node.url,t).href,title:i.node.short_title||i.node.title,cardImageProps:{cover:Ex({medias:o,imgEndpoint:n}),...kx({medias:o,picto:i?.node?.picto,editorialModel:i?.node.editorial_model})},socialBarProps:{layout:e,commentCount:i.node.comments_count??0,shareCount:(i.node.facebook_count??0)+(i.node.pinterest_count??0),contentLegacyId:i.node?.legacy_id?.toString(),contentLink:new URL(i.node.url,t).href,commentAnchor:"mbrs-comments-container"},cardHeaderProps:{headline:{text:i.node.label,color:Ox(i?.node?.rubric?.node?.themeColor?.node?.slug)},liveTime:$x.format(new Date(i.node.published_at).getTime()).replace(":","h")},cardTitleProps:{cartridge:"Live"===i?.node?.editorial_model?"live":void 0},summaryProps:{children:i?.node?.lead??""},layout:e}),r},[]))({layout:window.layout,pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e});s(e=>[...e,...t]),r(e?.brand?.node?.publishableContents?.pageInfo?.endCursor??null),o(e?.brand?.node?.publishableContents?.pageInfo?.hasNextPage??!1),to()}catch(e){console.error("20mn> Error while loading articles:",e)}},[n,t.defaultVariablesForQuery.brandId,t.defaultVariablesForQuery.first,t.defaultVariablesForQuery.sourceExcluded]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{l&&c(!1)},[l]),e.useEffect(()=>{(()=>{const e=document.getElementById("latest-articles-container");if(!e)return;const t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(to(),t.unobserve(e.target))})}),n=e.querySelectorAll(".c-card-container")[10];n&&t.observe(n);const r=e.querySelectorAll(".c-card-container")[20];r&&t.observe(r)})()},[]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},e_=({isSSR:t=!0,layout:n,articles:r,variablesForQuery:i,seeMoreButton:o})=>{const{isLoading:a,articles:s,hasNextPage:l,onLoadMore:c}=Xx({defaultArticles:r,defaultVariablesForQuery:i});return e.useEffect(()=>{a||Sx()},[a]),an.jsxs(an.Fragment,{children:[an.jsx(Xw,{layout:n,articles:s,seeMoreButton:l?{...o,disabled:a,onClick:c}:void 0}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({latestArticlesContainer:{layout:n,articles:s,variablesForQuery:i,seeMoreButton:o}})} };`}})]})},t_=t=>{const[n,r]=e.useState(t.defaultArticles),i=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,n=new Headers;window.envVariables?.apiAuthKey&&n.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getLatestContentsCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.variablesForQuery.brandId,sourceExcluded:t.variablesForQuery.sourceExcluded,first:t.variablesForQuery.first}))}`,options:{headers:n}}];try{const e=await Zo(...i),t=(({layout:e,pageEndpoint:t,imgEndpoint:n,data:r})=>Array.isArray(r)?[]:(r?.brand?.node?.publishableContents?.edges||[])?.reduce((r,i)=>{if(!(i?.node?.title&&i?.node?.url&&i?.node?.medias&&i?.node?.rubric?.node?.label))return r;if(!i?.node?.medias.length&&!i?.node?.photo?.node)return r;let o=i.node.medias??[];return"Story"===i?.node?.editorial_model&&i?.node?.photo?.node&&(o=Cx({photo:i.node.photo})),r.push({link:new URL(i.node.url,t).href,title:i.node.short_title||i.node.title,cardImageProps:{cover:Ex({medias:o,imgEndpoint:n}),...kx({medias:o,picto:i?.node?.picto,editorialModel:i?.node.editorial_model}),lazyLoad:!0},cardHeaderProps:{headline:{text:i?.node?.label||i.node.rubric.node.label,color:Ox(i?.node?.rubric?.node?.themeColor?.node?.slug)}},cardTitleProps:{cartridge:"Live"===i?.node?.editorial_model?"live":void 0,as:"h3"},layout:e}),r},[]))({layout:window.layout,data:e,pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint});r(t)}catch(e){console.error("20mn> Error while loading articles:",e)}},[t.variablesForQuery.brandId,t.variablesForQuery.first,t.variablesForQuery.sourceExcluded]);return e.useEffect(()=>{i()},[i]),e.useMemo(()=>({articles:n}),[n])},n_=({isSSR:e=!0,articles:t,variablesForQuery:n,...r})=>{const{articles:i}=t_({defaultArticles:t,variablesForQuery:n});return an.jsxs(an.Fragment,{children:[an.jsx(sx,{...r,articles:i,variablesForQuery:n}),e&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({latestContentsCarouselContainer:{articles:t,variablesForQuery:n,...r}})} };`}})]})},r_=e=>{const t=[];return e.legalNotices.forEach(n=>{const r=n?.node;t.push({link:r?.external_id?new URL(`/al/${r?.external_id}`,e.legalNoticeEndpoint).href:"",title:r?.title??void 0,location:r?.legalNoticeDepartment?.node?.name||"",summaryProps:{children:r?.publishing_date?`Publié le ${ji(new Date(r.publishing_date),!1)}`:Fi(new Date(Date.now()).toLocaleString())},cardTitleProps:{...r?.external_id?{as:"a",href:new URL(`/al/${r?.external_id}`,e.legalNoticeEndpoint).href,className:"opacity-hover"}:{}}})}),t},i_=e=>null!=e,o_=({isSSR:t=!0,variablesForQuery:n,legalNotices:r})=>{const{isLoading:i,legalNotices:o,hasNextPage:a,onLoadMore:s}=(t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.legalNotices),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getLegalNoticesFromDept&variables=${encodeURIComponent(JSON.stringify({slug:t.defaultVariablesForQuery.slug,first:10,after:n}))}`,options:{headers:i}}];try{const e=await Zo(...a),t=e?.legalNotices?.edges?.filter(i_)??[],n=r_({legalNotices:t,legalNoticeEndpoint:window.location.origin});s(e=>[...e,...n]),r(e?.legalNotices?.pageInfo?.endCursor||null),o(e?.legalNotices?.pageInfo?.hasNextPage||!1),to()}catch(e){console.error("20mn> Error while loading annnouncements:",e)}},[n,t.defaultVariablesForQuery.slug]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{l&&c(!1)},[l]),e.useMemo(()=>({isLoading:l,legalNotices:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])})({legalNotices:r,defaultVariablesForQuery:n});return e.useEffect(()=>{i||Sx()},[i]),an.jsxs(an.Fragment,{children:[an.jsx(ex,{legalNotices:o,seeMoreLegalNotices:a?{disabled:i,onClick:s,children:"Voir plus d’annonces légales"}:void 0,mx:{xs:"m",md:"0"}}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({legalNoticeDepartmentContainer:{legalNotices:o,variablesForQuery:n}})} };`}})]})},a_=({isSSR:t=!0,variablesForQuery:n,legalNotices:r})=>{const{isLoading:i,legalNotices:o,hasNextPage:a,onLoadMore:s}=(t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.legalNotices),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,t=new Headers;window.envVariables?.apiAuthKey&&t.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getLegalNotices&variables=${encodeURIComponent(JSON.stringify({first:10,after:n}))}`,options:{headers:t}}];try{const e=await Zo(...i),t=e?.legalNotices?.edges?.filter(i_)??[],n=r_({legalNotices:t,legalNoticeEndpoint:window.location.origin});s(e=>[...e,...n]),r(e?.legalNotices?.pageInfo?.endCursor||null),o(e?.legalNotices?.pageInfo?.hasNextPage||!1),to()}catch(e){console.error("20mn> Error while loading annnouncements:",e)}},[n]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{l&&c(!1)},[l]),e.useMemo(()=>({isLoading:l,legalNotices:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])})({legalNotices:r,defaultVariablesForQuery:n});return e.useEffect(()=>{i||Sx()},[i]),an.jsxs(an.Fragment,{children:[an.jsx(ex,{legalNotices:o,seeMoreLegalNotices:a?{disabled:i,onClick:s,children:"Voir plus d’annonces légales"}:void 0,mx:{xs:"m",md:"0"}}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({legalNoticeHomeContainer:{legalNotices:o,variablesForQuery:n}})} };`}})]})},s_=e=>{const t=new Intl.DateTimeFormat("fr",{timeStyle:"short",timeZone:"Europe/Paris"});return{name:e.name,title:e.title,tabColor:e.tabColor,body:e.articleEdges.reduce((n,r)=>{if(r?.node?.title&&r?.node?.url&&r?.node?.rubric?.node?.slug&&r?.node?.rubric?.node?.label){let i;if(e.imgEndpoint){let t=r.node.medias??[];"Story"===r?.node?.editorial_model&&r?.node?.photo?.node&&(t=Cx({photo:r.node.photo})),i={cover:Ex({medias:t,imgEndpoint:e.imgEndpoint})}}const o={themeColor:r.node.rubric.node.themeColor?.node?.lightmode_color||void 0,rubricName:r?.node?.label||r.node.rubric.node.label,title:r?.node?.short_title||r.node.title,url:new URL(r.node.url,e.pageEndpoint).href,cartridge:r.node?.editorial_model===qi.Live&&r.node?.state===Hi.open?"live":void 0,...i?{cardImageProps:i}:{}};"le-direct"===e.name&&r?.node?.published_at&&(o.liveTime=t.format(new Date(r.node.published_at).getTime()).replace(":","h")),n.push(o)}return n},[]).slice(0,e.limit)}},l_=t=>{const[n,r]=e.useState(t.defaultTabItems),i=e.useCallback(async()=>{if(t.variablesForQuery.liveLimit&&t.variablesForQuery.mostReadLimit){const{apiHost:e}=document.body.dataset,n=new Headers;window.envVariables?.apiAuthKey&&n.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getLiveAndMostRead&variables=${encodeURIComponent(JSON.stringify({brandId:t.variablesForQuery.brandId,sourceExcluded:t.variablesForQuery.sourceExcluded,liveLimit:t.variablesForQuery.liveLimit,mostReadLimit:t.variablesForQuery.mostReadLimit}))}`,options:{headers:n}}];try{const e=(({data:e,pageEndpoint:t,liveLimit:n,mostReadLimit:r})=>{if(Array.isArray(e))return[];const i=e?.brand?.node,o=i?.mostReadArticles?.edges,a=i?.liveArticles?.edges,s=[];if(a?.length){const e=s_({name:"le-direct",title:"Le direct",pageEndpoint:t,articleEdges:a,limit:n,tabColor:"red"});s.push(e)}if(o?.length){const e=s_({name:"plus-lus",title:"Les + lus",pageEndpoint:t,articleEdges:o,limit:r});s.push(e)}return s})({data:await Zo(...i),pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,liveLimit:t.variablesForQuery.liveLimit,mostReadLimit:t.variablesForQuery.mostReadLimit});r(e),qt()}catch(e){console.error("20mn> Error while loading tabItems:",e)}}},[t.variablesForQuery.brandId,t.variablesForQuery.liveLimit,t.variablesForQuery.mostReadLimit,t.variablesForQuery.sourceExcluded]);return e.useEffect(()=>{i()},[i]),e.useMemo(()=>({tabItems:n}),[n])},c_=({isSSR:e=!0,layout:t,tabItems:n,variablesForQuery:r,...i})=>{const{tabItems:o}=l_({defaultTabItems:n,variablesForQuery:r});return an.jsxs(an.Fragment,{children:[an.jsx(Ax,{...i,layout:t,tabItems:o,variablesForQuery:r,hasButton:!0}),e&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({liveAndMostReadContainer:{layout:t,tabItems:n,variablesForQuery:r}})} };`}})]})},u_=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>{const t=Array.from(document.getElementsByClassName("embed-placeholder")),n=e.getCurrentUserStatus(),r=n?.purposes?.["activation-gGierZpp"]?.enabled;t.forEach(e=>{const t=e.querySelector(".cmp-placeholder"),i=e.querySelector(".embed-wrapper");if(t instanceof Element&&i instanceof Element){if(!r||!(n?.vendors[e.getAttribute("data-vendor")||""]?.enabled??1))return t.classList.remove("u-hidden"),void i.classList.add("u-hidden");t.classList.add("u-hidden"),i.classList.remove("u-hidden"),i.querySelectorAll("[data-src]").forEach(e=>{const t=e.getAttribute("data-src");t&&(e.setAttribute("src",t),e.removeAttribute("data-src"))})}})})},d_=["nfb_1","nfb_2","article_btf","pave_com","pave_home","inread","pave_article","article_mtf","native_web"],h_=()=>{d_.forEach(e=>{const t=`#dfp_${e}`,n=[...document.querySelectorAll(t)].filter(e=>e instanceof HTMLElement);for(let t=0;t<=20;t+=1){const r=document.getElementById(`dfp_${e}_${t}`);r&&n.push(r)}let r=0;n.forEach(t=>{t.id=0===r?`dfp_${e}`:`dfp_${e}_${r}`,r+=1})})},p_=e=>{switch(e){case zi.default:case zi.important:case zi.community:case zi.faq:case zi.bold:return e;case zi.very_important:return"crucial";default:return"default"}},f_=(e,t)=>Array.isArray(e)?[]:(e?.brand?.node?.live?.node?.livePosts?.edges||[])?.reduce((e,n)=>{if(!n)return e;let r,i=n?.node?.content_md?.blocks;if(i){const e=[...i],t=e?.slice(-1);""===t?.[0]?.text&&"unstyled"===t?.[0]?.type&&(e.pop(),i=e)}n?.node?.comment?.node&&(r={question:n.node.comment.node.content||"",author:n.node.comment.node.userFront?.node?.username||"",response:i?.[0]?.text});const o=n.node?.legacy_id;return o?(e.push({cursor:n?.cursor||null,id:o,title:{status:p_(n?.node?.type),header:n?.node?.printed_hour||"",title:n?.node?.title||"",img:n?.node?.livePostLabel?.node&&t?{name:n.node.livePostLabel.node.slug||"",src:n.node.livePostLabel.node.logo?`${t}/${n.node.livePostLabel.node.logo}`:""}:void 0},content:r?void 0:{entityMap:{},...n?.node?.content_md,blocks:i??[]},talk:r}),e):e},[]),m_=e=>{const t=e.filter(({content:e})=>Object.values(e?.entityMap||{}).some(({type:e,data:t})=>"iframely"===e&&(t?.embedProps?.js||t?.embedProps?.css)));t.length&&t.forEach(({content:e})=>{Object.values(e?.entityMap||{}).forEach(({type:e,data:t})=>{if("iframely"===e&&(t?.embedProps?.js||t?.embedProps?.css)){const{js:e=[],css:n=[]}=t?.embedProps||{};e.length&&e.forEach((e,t)=>{Eo({name:`embed_live-posts-${t}`,src:e,load:"async"})}),n.length&&n.forEach(e=>{const t=document.createElement("link");t.type="text/css",t.rel="stylesheet",t.href=e,document.head.appendChild(t)})}})})},g_=()=>{const{hash:e}=new URL(window.location.href),t=e.match(/#post-(\d+)/);return t?Number(t[1]):null},y_=async({first:e,after:t,filter:n,brandId:r,liveId:i})=>{const{apiHost:o}=document.body.dataset,a=new Headers;window.envVariables?.apiAuthKey&&a.append("auth-key",window.envVariables.apiAuthKey);const s=[{url:`${o}/?id=getLivePosts&variables=${encodeURIComponent(JSON.stringify({brandId:r,liveId:i,first:e,after:t,filter:n}))}`,options:{headers:a}}],l=await Zo(...s);return{nextPosts:f_(l,document.body.dataset.staticHost),pageInfo:l?.brand?.node?.live?.node?.livePosts?.pageInfo??null}},v_=async({batchSize:e,after:t,filter:n,brandId:r,liveId:i,accumulatedPosts:o,anchorPostId:a})=>{const{nextPosts:s,pageInfo:l}=await y_({first:100,after:t,filter:n,brandId:r,liveId:i}),c=[...o,...s],u=l?.endCursor??null,d=l?.hasNextPage??!1,h=c.findIndex(e=>e.id===a);if(-1!==h){const t=Math.ceil((h+1)/e)*e,n=t>c.length?c[c.length-1].cursor:c[t-1].cursor,r=c.length>t||d;return{nextPosts:c.slice(0,t),pageInfo:{endCursor:n,hasNextPage:r}}}return d&&u?v_({batchSize:e,after:t,filter:n,brandId:r,liveId:i,accumulatedPosts:c,anchorPostId:a}):{nextPosts:[],pageInfo:l}},A_=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultPosts),[l,c]=e.useState(!1),[u,d]=e.useState(!1),h=e.useCallback(()=>{c(!0)},[]),p=e.useCallback(async()=>{const e=g_(),i=t.defaultVariablesForQuery.first,{filter:a,brandId:l,liveId:c}=t.defaultVariablesForQuery;try{if(e&&!u&&a?.type?.eq!==zi.very_important){const{nextPosts:t}=await v_({batchSize:i,after:n,filter:a,brandId:l,liveId:c,accumulatedPosts:[],anchorPostId:e});s(e=>[...e,...t]),d(Boolean(e)),m_(t)}else{const{nextPosts:e,pageInfo:t}=await y_({first:i,after:n,filter:a,brandId:l,liveId:c});r(t?.endCursor??null),o(t?.hasNextPage??!1),s(t=>[...t,...e]),m_(e)}to()}catch(e){console.error("20mn> Error while loading posts:",e)}},[n,u,t.defaultVariablesForQuery]);return e.useEffect(()=>{g_()&&!document.getElementById(`post-${g_()}`)&&c(!0)},[]),e.useEffect(()=>{document.querySelector(`#tabpanel-le-direct #post-${g_()}`)?.scrollIntoView({behavior:"smooth",block:"start"})},[]),e.useEffect(()=>{l&&p(),(e=>{e.some(({content:e})=>Object.values(e?.entityMap||{}).some(({type:e,data:t})=>"iframely"===e&&"idalgo"===t?.embedProps?.meta?.site&&"widget"===t?.embedProps?.meta?.type))&&(window?.iDalgoLoader?window.iDalgoLoader.init():Eo({name:"widget_live-posts",src:"https://20minutes.idalgo-hosting.com/partners/i/cache/datasport/cache/page/r_js_jlu_url.php",load:"async"}))})(a),h_(),u_()},[l,p,a]),e.useEffect(()=>{l&&c(!1)},[l]),e.useEffect(()=>{h_()},[]),e.useMemo(()=>({isLoading:l,posts:a,hasNextPage:i,onLoadMore:h}),[l,a,i,h])},b_=({isSSR:e=!0,posts:t,variablesForQuery:n,seeMoreLink:r,staticHydrationDataName:i="livePostsContainer",disableAds:o,...a})=>{const{isLoading:s,posts:l,hasNextPage:c,onLoadMore:u}=A_({defaultPosts:t,defaultVariablesForQuery:n});return an.jsxs(an.Fragment,{children:[an.jsx(yx,{...a,posts:l,variablesForQuery:n,disableAds:o,seeMoreLink:c?{...r,disabled:s,onClick:u}:void 0}),e&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({[i]:{posts:Ji(l),variablesForQuery:n,seeMoreLink:r,disableAds:o,...a}})} };`}})]})},w_=()=>{const[t,n]=e.useState(null),[r,i]=e.useState(0),o=document.getElementById("tabpanel-le-direct"),a=document.getElementById("tabpanel-temps-forts");let s=o?.querySelector("div[data-state]")?.dataset?.latestPostId;const{state:l,brandId:c,liveId:u}=o?.querySelector("div[data-state]")?.dataset??{},d=e.useCallback(()=>{const{apiHost:e}=document.body.dataset,t=new Headers;return window.envVariables?.apiAuthKey&&t.append("auth-key",window.envVariables.apiAuthKey),[{url:`${e}/?id=getLivePosts&variables=${encodeURIComponent(JSON.stringify({brandId:c,liveId:u,first:20,filter:{status:{eq:"published"}}}))}`,options:{headers:t}}]},[c,u]),h=e.useCallback(async()=>{const e=d();try{const t=await Zo(...e);let n=0;t?.brand?.node?.live?.node?.livePosts?.edges?.every(e=>e?.node?.legacy_id!==Number(s)&&(n+=1,!0)),i(n)}catch(e){console.error("20mn> Error while refreshing refresh button counter:",e)}},[d,s]),p=e.useCallback(()=>{const e=document.querySelector('[data-tabs-name="live-tabs"]'),t=document.getElementById("tab-le-direct"),n=document.getElementById("tabpanel-le-direct");if(e){const r=e.querySelectorAll(".c-tab"),i=e.querySelectorAll(".c-tabpanel");r.forEach(e=>{e.setAttribute("aria-selected","false"),e.setAttribute("tabindex","-1")}),i.forEach(e=>{e.setAttribute("aria-hidden","true")}),t&&(t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0")),n&&n.setAttribute("aria-hidden","false")}},[]),f=e.useCallback(async()=>{p();const e=d();try{const t=[],n=[],r=await Zo(...e);let i=f_(r,document.querySelector("body")?.dataset.staticHost),l=0;if(i?.every(e=>e.id.toString()!==s&&(l+=1,!0)),0===l)return void window.location.reload();p();const c=document.getElementById("tabpanel-le-direct")?.querySelectorAll(".js-post").length||0,u=c+l;i=i.slice(0,l),i.reverse(),i?.every((e,r)=>{const i=r+c,o=fm.renderToStaticMarkup(an.jsx(gx,{post:e,postIndex:i,postsCount:u,layout:window.layout,pageEndpoint:window.envVariables.pageEndpoint},e.id));return t.push(o),"crucial"===e.title.status&&n.push(o),!0});const d=a?.firstChild;if(d instanceof HTMLElement&&d.firstChild instanceof HTMLElement){const e=document.createElement("div");for(e.innerHTML=n.reverse().join("");e.lastChild;)d.prepend(e.lastChild)}const h=o?.firstChild;if(h instanceof HTMLElement&&h.firstChild instanceof HTMLElement){const e=document.createElement("div");for(e.innerHTML=t.reverse().join("");e.lastChild;)h.prepend(e.lastChild);const n=i.reverse()[0];if(n){const e=n.id.toString();s=e,o?.querySelector("div[data-state]")?.setAttribute("data-latest-post-id",e)}h_(),to()}}catch(e){console.error("20mn> Error while loading more live posts:",e)}},[d,a,o,s,p]);e.useEffect(()=>{l===Hi.open&&c&&s&&u?setInterval(h,6e4):console.info("Do not check for new post, live is either closed or miss information.")},[h,c,s,u,l]),e.useEffect(()=>{if(n(r>0?`Actualiser (${r})`:"Actualiser"),window.layout!==lr.MOBILE){const e=document.title.replace(/^\(\+?[0-9]+\) /,"");document.title=r>9?`(+${r}) ${e}`:r>0?`(${r}) ${e}`:e}},[r]);const m=e.useCallback(()=>{eo({name:"refresh_content",type:"action",customProps:{cta_context:"content",cta_type:"button",cta_destination:window.location.href,cta_engagement:1},chapter1:"live"}),f().then(()=>{i(0);const e=document.getElementById("live-posts-container")?.getBoundingClientRect();e&&window.scrollBy(0,e.top-100)})},[f]);return t?an.jsx(Xn,{justifyContent:"center",mb:"xxl",children:an.jsx(Nn,{color:"primary",variant:"outlined",iconProps:{name:"refresh",size:22},onClick:m,children:t})}):null},x_=e=>{let t;return e?.forEach(e=>{const n=[{title:"Ain",value:"ain"},{title:"Aisne",value:"aisne"},{title:"Allier",value:"allier"},{title:"Alpes-de-Haute-Provence",value:"alpes_de_haute_provence"},{title:"Alpes-Maritimes",value:"alpes-maritimes"},{title:"Ardèche",value:"ardeche"},{title:"Ardennes",value:"ardennes"},{title:"Ariège",value:"ariege"},{title:"Aube",value:"aube"},{title:"Aude",value:"aude"},{title:"Aveyron",value:"aveyron"},{title:"Bas-Rhin",value:"bas_rhin"},{title:"Bouches-du-Rhône",value:"bouches-rhone"},{title:"Calvados",value:"calvados"},{title:"Cantal",value:"cantal"},{title:"Charente",value:"charente"},{title:"Charente-Maritime",value:"charente-maritime"},{title:"Cher",value:"cher"},{title:"Correze",value:"correze"},{title:"Corse-du-Sud",value:"corse-sud"},{title:"Côte-d'Or",value:"cote_d_or"},{title:"Côtes-d'Armor",value:"cotes_d_armor"},{title:"Creuse",value:"creuse"},{title:"Deux-Sèvres",value:"deux-sevres"},{title:"Dordogne",value:"dordogne"},{title:"Doubs",value:"doubs"},{title:"Drôme",value:"drome"},{title:"Essonne",value:"essonne"},{title:"Eure",value:"eure"},{title:"Eure-et-Loir",value:"eure_et_loire"},{title:"Finistère",value:"finistere"},{title:"Gard",value:"gard"},{title:"Gers",value:"gers"},{title:"Gironde",value:"gironde"},{title:"Guadeloupe",value:"guadeloupe"},{title:"Guyane",value:"guyane"},{title:"Haut-Rhin",value:"haut-rhin"},{title:"Haute-Corse",value:"haute-corse"},{title:"Haute-Garonne",value:"haute-garonne"},{title:"Haute-Loire",value:"haute-loire"},{title:"Haute-Marne",value:"haute-marne"},{title:"Haute-Saône",value:"haute-saone"},{title:"Haute-Vienne",value:"haute-vienne"},{title:"Hautes-Alpes",value:"hautes-alpes"},{title:"Hautes-Pyrénées",value:"hautes_pyrenees"},{title:"Hauts-de-Seine",value:"hauts-de-seine"},{title:"Hérault",value:"herault"},{title:"Ille-et-Vilaine",value:"ille_et_vilaine"},{title:"Indre",value:"indre"},{title:"Indre-et-Loire",value:"indre-loire"},{title:"Isère",value:"isere"},{title:"Jura",value:"jura"},{title:"Landes",value:"landes"},{title:"Loir-et-Cher",value:"loir-cher"},{title:"Loire",value:"loire"},{title:"Loire-Atlantique",value:"loire-atlantique"},{title:"Loiret",value:"loiret"},{title:"Lot",value:"lot"},{title:"Lot-et-Garonne",value:"lot_et_garonne"},{title:"Lozère",value:"lozere"},{title:"Maine-et-Loire",value:"maine-et-loire"},{title:"Manche",value:"manche"},{title:"Marne",value:"marne"},{title:"Martinique",value:"martinique"},{title:"Mayenne",value:"mayenne"},{title:"Mayotte",value:"mayotte"},{title:"Meurthe-et-Moselle",value:"meurthe-et-moselle"},{title:"Meuse",value:"meuse"},{title:"Morbihan",value:"morbihan"},{title:"Moselle",value:"moselle"},{title:"Nièvre",value:"nievre"},{title:"Nord",value:"nord"},{title:"Oise",value:"oise"},{title:"Orne",value:"orne"},{title:"Paris",value:"paris"},{title:"Pas-de-Calais",value:"pas-de-calais"},{title:"Puy de Dôme",value:"puy-dome"},{title:"Pyrénées-Atlantiques",value:"pyrenees-atlantiques"},{title:"Pyrénées-Orientales",value:"pyrenees_orientales"},{title:"Rhône",value:"rhone"},{title:"Saône-et-Loire",value:"saone_et_loire"},{title:"Sarthe",value:"sarthe"},{title:"Savoie",value:"savoie"},{title:"Seine-et-Marne",value:"seine-et-marne"},{title:"Seine-Maritime",value:"seine_maritime-1"},{title:"Seine-Saint-Denis",value:"seine-saint-denis"},{title:"Somme",value:"somme"},{title:"Tarn",value:"tarn"},{title:"Tarn-et-Garonne",value:"tarn_et_garonne"},{title:"Territoire de Belfort",value:"territoire-belfort"},{title:"Val-d'Oise",value:"val_d_oise"},{title:"Val-de-Marne",value:"val-de-marne"},{title:"Var",value:"var"},{title:"Vaucluse",value:"vaucluse"},{title:"Vendée",value:"vendee"},{title:"Vienne",value:"vienne-france"},{title:"Vosges",value:"vosges"},{title:"Yonne",value:"yonne"},{title:"Yvelines",value:"yvelines"}].find(t=>t.value===e?.node?.slug);n&&(t=n)}),t?t.title:""},__=t=>{const[n,r]=e.useState(t.defaultArticles),[i,o]=e.useState(!1),[a,s]=e.useState("locales"),[l,c]=e.useState(t.defaultSeeMoreLink.href),u=e.useCallback(e=>{s(e.target.value),o(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,n=new Headers;window.envVariables?.apiAuthKey&&n.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getHomeLocalNews&variables=${encodeURIComponent(JSON.stringify({...t.variablesForQuery,slug:a}))}`,options:{headers:n}}];try{const e=await Zo(...i),t=(({data:e,pageEndpoint:t,layout:n})=>(e?.brand?.node?.tag?.node?.publishableContents?.edges||[])?.reduce((e,r)=>{if(r?.node?.rubric?.node?.label&&r?.node?.title&&r?.node?.url&&r?.node?.tags?.edges){const i=r.node.tags.edges.filter(Mx);e.push({link:new URL(r.node.url,t).href,title:Xi(r?.node?.short_title||r.node.title),cardHeaderProps:{headline:{text:r?.node?.label||r.node.rubric.node.label},location:x_(i)},socialBarProps:{layout:n,commentCount:r.node?.comments_count??0,shareCount:(r.node?.facebook_count??0)+(r.node?.pinterest_count??0),contentLegacyId:r.node?.legacy_id?.toString()}})}return e},[]))({data:e,pageEndpoint:window.envVariables.pageEndpoint,layout:window.layout});c(new URL(e?.brand?.node?.tag?.node?.url_current??"",window.envVariables.pageEndpoint).href),r(t)}catch(e){console.error("20mn> Error while loading articles:",e)}},[t.variablesForQuery,a]);return e.useEffect(()=>{i&&d()},[i,d]),e.useEffect(()=>{i&&o(!1),Ao()},[i]),e.useMemo(()=>({isLoading:i,articles:n,tagUrl:l,onDepartmentChange:u}),[n,i,l,u])},S_=({isSSR:e=!0,articles:t,variablesForQuery:n,seeMoreLink:r,selectProps:i,...o})=>{const{isLoading:a,articles:s,tagUrl:l,onDepartmentChange:c}=__({defaultArticles:t,defaultSeeMoreLink:r,variablesForQuery:n});return an.jsxs(an.Fragment,{children:[an.jsx(mx,{...o,articles:s,variablesForQuery:n,seeMoreLink:{href:l},selectProps:{...i,disabled:a,onChange:c}}),e&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({localNewsContainer:{articles:s,variablesForQuery:n,selectProps:i,seeMoreLink:r,...o}})} };`}})]})},E_=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.hasNextPage),[i,o]=e.useState(t.defaultItems),[a,s]=e.useState(!1),l=e.useCallback(()=>{s(!0)},[]),c=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,n=new Headers;window.envVariables?.apiAuthKey&&n.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getMostReadContents&variables=${encodeURIComponent(JSON.stringify({first:t.defaultVariablesForQuery.first,brandId:t.defaultVariablesForQuery.brandId,excludeModel:t.defaultVariablesForQuery.excludeModel,after:t.defaultVariablesForQuery.endCursor}))}`,options:{headers:n}}];try{const e=await Zo(...i),n=(({layout:e,pageEndpoint:t,imgEndpoint:n,data:r,lastNumber:i=0})=>Array.isArray(r)?[]:(r?.brand?.node?.publishableContents?.edges||[])?.reduce((r,o,a)=>{if(!(o?.node?.title&&o?.node?.label&&o?.node?.url&&o?.node?.published_at&&(o?.node?.medias||o?.node?.photo?.node)))return r;let s=o.node.medias??[];return"Story"===o?.node?.editorial_model&&o?.node?.photo?.node&&(s=Cx({photo:o.node.photo})),r.push({link:new URL(o.node.url,t).href,title:o.node.title,cardImageProps:{cover:Ex({medias:s,imgEndpoint:n})},cardHeaderProps:{headline:{text:o.node.label}},cardTitleProps:{cartridge:"Live"===o?.node?.editorial_model?"live":void 0},summaryProps:{children:o?.node?.lead??""},layout:e,cardNumber:{value:i+a+1,size:"medium"},viewCount:o?.node?.total_current_visits||0}),r},[]))({layout:window.layout,pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e,lastNumber:t.defaultVariablesForQuery.first});o(e=>[...e,...n||[]]),r(!1),to()}catch(e){console.error("20mn> Error while loading contents:",e)}},[t.defaultVariablesForQuery.brandId,t.defaultVariablesForQuery.endCursor,t.defaultVariablesForQuery.excludeModel,t.defaultVariablesForQuery.first]);return e.useEffect(()=>{a&&c()},[a,c]),e.useEffect(()=>{a&&s(!1)},[a]),e.useMemo(()=>({isLoading:a,items:i,hasNextPage:n,onLoadMore:l}),[a,i,n,l])},C_=({isSSR:t=!0,items:n,variablesForQuery:r,seeMoreButton:i})=>{const{isLoading:o,items:a,hasNextPage:s,onLoadMore:l}=E_({defaultItems:n,defaultVariablesForQuery:r});return e.useEffect(()=>{o||Sx()},[o]),an.jsxs(an.Fragment,{children:[an.jsx(vx,{items:a,seeMoreButton:s?{...i,disabled:o,onClick:l}:void 0}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({mainMostReadContainer:{items:a,variablesForQuery:r,seeMoreButton:i}})} };`}})]})},k_=t=>{const[n,r]=e.useState(t.defaultTabItems),i=e.useCallback(async()=>{if(t.variablesForQuery.rubric){const{apiHost:e}=document.body.dataset,n=new Headers;window.envVariables?.apiAuthKey&&n.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getMostRead&variables=${encodeURIComponent(JSON.stringify({brandId:t.variablesForQuery.brandId,sourceExcluded:t.variablesForQuery.sourceExcluded,rubricId:t.variablesForQuery.rubric.id}))}`,options:{headers:n}}];try{const e=(({data:e,pageEndpoint:t,imgEndpoint:n,rubricSlug:r,rubricLabel:i})=>{if(Array.isArray(e))return[];const o=[],a=e?.brand?.node,s=a?.commonArticles?.edges,l=a?.rubricArticles?.edges;if(s?.length){const e=s_({name:"plus-lus",title:"Les + lus",pageEndpoint:t,imgEndpoint:n,articleEdges:s,limit:5});o.push(e)}if(l?.length){const e=s_({name:`plus-lus-${r}`,title:`Les + lus ${i}`,pageEndpoint:t,imgEndpoint:n,articleEdges:l,limit:5});o.push(e)}return o})({data:await Zo(...i),pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,rubricSlug:t.variablesForQuery.rubric.slug,rubricLabel:t.variablesForQuery.rubric.label});r(e),qt()}catch(e){console.error("20mn> Error while loading tabItems:",e)}}},[t.variablesForQuery.brandId,t.variablesForQuery.rubric,t.variablesForQuery.sourceExcluded]);return e.useEffect(()=>{i(),bo()},[i]),e.useMemo(()=>({tabItems:n}),[n])},I_=({isSSR:e=!0,layout:t,tabItems:n,variablesForQuery:r,...i})=>{const{tabItems:o}=k_({defaultTabItems:n,variablesForQuery:r});return an.jsxs(an.Fragment,{children:[an.jsx(Ax,{layout:t,tabItems:o,variablesForQuery:r,...i}),e&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({mostReadContainer:{layout:t,tabItems:n,variablesForQuery:r,...i}})} };`}})]})},D_=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultMovies),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getMoviesData&variables=${encodeURIComponent(JSON.stringify({status:t.defaultVariablesForQuery.status,cursor:n,orderField:Ui.EXPECTATION_LEVEL,orderDirection:Vi.DESC}))}`,options:{headers:i}}];try{const e=await Zo(...a),{staticHost:t}=document.body.dataset,n=((e,t)=>Array.isArray(e)?[]:e?.movies?.edges?.map(e=>{const n=e?.node,r=n?.movieCastings?.edges?.find(e=>"Réalisateur"===e?.node?.position);return{link:n?.article_url||"#",title:n?.title_fr||"",cardImageProps:{cover:(n?.movieMedias?.edges?.length??0)>0?`${t}/movies/posters/${n?.movieMedias?.edges?.[0]?.node?.src?.replace("-%format","")??""}`:""},summary:n?.summary_short||"",castings:n?.movieCastings?.edges?.filter(e=>"cast"===e?.node?.type).map(e=>`${e?.node?.firstname} ${e?.node?.lastname}`)??[],genres:n?.genres?.filter(e=>null!==e)||[],directedBy:r?`${r?.node?.firstname} ${r?.node?.lastname}`:void 0,releaseDate:n?.release_date?ji(new Date(n.release_date)):"",seeMoreLink:{children:"Voir la fiche du film",href:n?.article_url||"#"}}})||[])(e,t);s(e=>[...e,...n||[]]),r(e?.movies?.pageInfo?.endCursor??null),o(e?.movies?.pageInfo?.hasNextPage??!1),to()}catch(e){console.error("20mn> Error while loading posts:",e)}},[n,t.defaultVariablesForQuery.status]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{l&&c(!1)},[l]),e.useMemo(()=>({isLoading:l,items:a,hasNextPage:i,onLoadMore:u}),[l,a,i,u])},T_=({isSSR:t=!0,layout:n,items:r,variablesForQuery:i,seeMoreButton:o})=>{const{isLoading:a,items:s,hasNextPage:l,onLoadMore:c}=D_({defaultMovies:r,defaultVariablesForQuery:i});return e.useEffect(()=>{a||Sx()},[a]),an.jsxs(an.Fragment,{children:[an.jsx(bx,{layout:n,items:s,seeMoreButton:l?{...o,disabled:a,onClick:c}:void 0}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({moviesListContainer:{layout:n,items:s,variablesForQuery:i,seeMoreButton:o}})} };`}})]})},N_=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e,staticHost:i}=document.body.dataset,l=new Headers;window.envVariables?.apiAuthKey&&l.append("auth-key",window.envVariables.apiAuthKey);const c=[{url:`${e}/?id=getTagArticlesWithCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,slug:t.defaultVariablesForQuery.slug,first:t.defaultVariablesForQuery.first,after:n}))}`,options:{headers:l}}];try{const e=await Zo(...c),t=(({pageEndpoint:e,imgEndpoint:t,staticEndpoint:n,data:r,layout:i})=>Fx({pageEndpoint:e,imgEndpoint:t,staticEndpoint:n,data:r,hasSummary:!0,layout:i}).map(e=>(delete e.socialBarProps,{...e,linkProps:{children:"Je participe","aria-label":"Je participe au quiz",href:e.link}})))({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,staticEndpoint:i||"",data:e,layout:window.layout}),n={articles:[...a,...t],endCursor:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.endCursor??null,hasNextPage:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.hasNextPage??!1};s(e=>[...e,...t]),r(n.endCursor),o(n.hasNextPage),to()}catch(e){console.error("20mn> Error while loading articles:",e)}},[a,n,t.defaultVariablesForQuery.brandId,t.defaultVariablesForQuery.first,t.defaultVariablesForQuery.slug]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{l&&c(!1)},[l]),e.useEffect(()=>{(()=>{const e=document.getElementById("quiz-container");if(!e)return;const t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(to(),t.unobserve(e.target))})}),n=e.querySelector(".card-item-1");n&&t.observe(n);const r=e.querySelector(".card-item-8");r&&t.observe(r);const i=e.querySelector(".card-item-16");i&&t.observe(i)})()},[]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},L_=({isSSR:t=!0,layout:n,articles:r,variablesForQuery:i,seeMoreButton:o,currentPagePath:a,totalArticles:s})=>{const{isLoading:l,articles:c,hasNextPage:u,onLoadMore:d}=N_({defaultArticles:r,defaultVariablesForQuery:i});e.useEffect(()=>{l||Sx()},[l]);const h=c.map(e=>({...e,...e.cardImageProps&&{cardImageProps:{...e.cardImageProps,sizes:"(min-width: 1660px) 384px, (min-width: 1440px) calc(18vw + 89px), (min-width: 1080px) 320px, (min-width: 780px) calc(44.29vw - 149px), calc(50vw - 16px)"}}}));return an.jsxs(an.Fragment,{children:[an.jsx(wx,{layout:n,articles:h,seeMoreButton:u?{...o,disabled:l,onClick:d}:void 0,currentPagePath:a,totalArticles:s}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({quizContainer:{layout:n,articles:h,variablesForQuery:i,seeMoreButton:o}})} };`}})]})},B_=(e,n)=>{const r=document.getElementById(e),i=n?window?.__staticHydrationData?.liveImportantPostsContainer:window?.__staticHydrationData?.livePostsContainer,o=n?"liveImportantPostsContainer":"livePostsContainer";if(r&&i){const e=t.createRoot(r);e&&e.render(an.jsx(b_,{isSSR:!1,staticHydrationDataName:o,...i,posts:$i(i?.posts),variablesForQuery:i.variablesForQuery}))}},P_=(e,t,n,r)=>{n?e.setAttribute(t,"true"):e.setAttribute(t,"false")},O_=(e,t,n)=>{t?e.classList.add(n):e.classList.remove(n)},M_={"probleme-ordinateur":"Votre message. Veuillez préciser votre navigateur.","probleme-mobile":"Votre message. Veuillez préciser votre navigateur et l’appareil que vous utilisez.","probleme-app":"Votre message. Veuillez préciser l’appareil que vous utilisez."},j_={"suppression-anonymisation":"Dans votre message, merci d'indiquer votre objet, nom / prénom, adresse mail et adresse URL vers l'article concerné si besoin.",jeux:"Ecrivez votre message en précisant votre appareil, le navigateur utilisé ainsi que les jeux concernés.",newsletter:"Ecrivez votre message en précisant la date et/ou le nom de la newsletter concernée.",accessibility:"Ecrivez votre message en précisant si nécessaire la/les page(s) ou le/es composant(s) concernés."};function F_(e){return{serviceSelect:e.querySelector("select#service"),subServiceSelect:e.querySelector("select#subservice"),subService:e.querySelector("select#subservice")?.parentElement?.parentElement,commonObjectSelect:e.querySelector("select#common-object"),commonObject:e.querySelector("select#common-object")?.parentElement?.parentElement,techObjectSelect:e.querySelector("select#tech-object"),techObject:e.querySelector("select#tech-object")?.parentElement?.parentElement,contentInput:e.querySelector("textarea#message"),sourceSelect:e.querySelector("select#source"),source:e.querySelector("select#source")?.parentElement?.parentElement,gamesObjectSelect:e.querySelector("select#games-object"),gamesObject:e.querySelector("select#games-object")?.parentElement?.parentElement,subscriptionObjectSelect:e.querySelector("select#subscription-object"),subscriptionObject:e.querySelector("select#subscription-object")?.parentElement?.parentElement,emailInput:e.querySelector("input[type=email]"),messageInput:e.querySelector("textarea#message")}}const R_=(e,t,n)=>{const{subService:r,commonObject:i,techObject:o,gamesObject:a,subscriptionObject:s,source:l}=e,c="redaction"===t,u="service-technique"===t,d="jeux"===t,h="service-abonnement"===t;r&&(O_(r,n||!c,"u-mask"),P_(r,"aria-hidden",n||!c)),i&&(O_(i,n||!c,"u-mask"),P_(i,"aria-hidden",n||!c)),o&&(O_(o,n||!u,"u-mask"),P_(o,"aria-hidden",!u)),a&&(O_(a,n||!d,"u-mask"),P_(a,"aria-hidden",n||!d)),l&&(O_(l,n||!d,"u-mask"),P_(l,"aria-hidden",n||!d)),s&&(O_(s,n||!h,"u-mask"),P_(s,"aria-hidden",n||!h))},q_=(e,t)=>{e&&(P_(e,"required",t),P_(e,"aria-required",t))},z_=()=>{const e=document.querySelector("form#contact-form");if(!e)return;const t=F_(e),{serviceSelect:n,subServiceSelect:r,commonObjectSelect:i,techObjectSelect:o,gamesObjectSelect:a,subscriptionObjectSelect:s,sourceSelect:l,contentInput:c}=t,u=Boolean(n?.selectedOptions?.[0]?.hidden);R_(t,n?.selectedOptions?.[0]?.value??"",u),(()=>{const e=document.querySelector("form#contact-form");if(!e)return;const t=F_(e),{emailInput:n,messageInput:r,serviceSelect:i}=t;n?.addEventListener("blur",()=>{const e=document.querySelector("#email-error");e&&(n.checkValidity()?O_(e,!0,"u-mask"):O_(e,!1,"u-mask"))}),r?.addEventListener("blur",()=>{const e=document.querySelector("#message-error");e&&(""!==r.value?O_(e,!0,"u-mask"):O_(e,!1,"u-mask"))}),i?.addEventListener("blur",()=>{const e=document.querySelector("#service-error");e&&(i.checkValidity()?O_(e,!0,"u-mask"):O_(e,!1,"u-mask"))})})(),n?.addEventListener("change",e=>{const{target:n}=e;if(!(n instanceof HTMLSelectElement))return;const u=n.value,d="service-technique"===u,h="jeux"===u,p="redaction"===u,f="service-abonnement"===u;q_(r,p),q_(i,p),q_(o,d),q_(a,h),q_(s,f),q_(l,h),R_(t,u,Boolean(n.selectedOptions[0]?.hidden)),c&&c.setAttribute("placeholder",j_[u]??"Votre message.")}),o?.addEventListener("change",e=>{const{target:t}=e;t instanceof HTMLSelectElement&&c&&c.setAttribute("placeholder",M_[t.value]??"Votre message.")})};var H_=()=>{z_(),(()=>{const e=document.querySelector("form#contact-form");e&&e.addEventListener("submit",t=>{t.preventDefault();const n=new FormData(e),r=n.get("message")?.toString().trim(),i=n.get("email")?.toString().trim();let o=n.get("service")?.toString().trim();const a=n.get("subservice")?.toString().trim(),s=n.get("common-object")?.toString().trim(),l=n.get("tech-object")?.toString().trim(),c=n.get("games-object")?.toString().trim(),u=n.get("subscription-object")?.toString().trim(),d=n.get("source")?.toString().trim();if([!!i,!!o,!!r,!!("redaction"!==o||a&&s),!("service-technique"===o&&!l),!("jeux"===o&&!c&&!d),!("service-abonnement"===o&&!u)].includes(!1))return void alert("Tous les champs obligatoires doivent être remplis.");let h,p=null;const f=e=>{if(!e)return"";const t=document.querySelector(`option[value="${e}"]`);return t&&t instanceof HTMLOptionElement?t.text:""};switch(o){case"redaction":h=s,p=f(h),a&&(o=a);break;case"jeux":{h=c;const e=f(h);p=d?`${e} (source: ${d})`:e;break}case"service-technique":h=l,p=f(h);break;case"service-abonnement":h=u,p=f(h)}const m=document.querySelector("#li-antibot-token");if(!(m&&m instanceof HTMLInputElement))return void alert("Vous devez valider le captcha.");const g={antibotToken:m.value,service:o,email:i,message:r,object:p,objectId:h||null,accessSource:d?.includes("app-")?"apps":"site"},y=document.body.getAttribute("data-http-taskrunner-api-host");fetch(`${y}/contact`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}).then(e=>e.json()).then(e=>{e.success?(alert("Votre message a bien été envoyé à nos services."),window.location.reload()):alert("Merci de valider le captcha afin d'envoyer votre message.")}).catch(e=>{console.error("Error:",e)})})})()};var K_=()=>{(()=>{if(document.querySelector(".gcse-search")&&window.envVariables?.googleSearchCode)try{ko(_o.GOOGLE_SEARCH)}catch(e){e instanceof Error&&console.error(e.message)}})()};let U_,V_;const Q_=e=>{U_&&("show"===e?(U_.classList.remove("c-header-mini--is-hidden"),V_?.forEach(e=>{e.classList.add("c-menu--with-header-mini")}),document.body.setAttribute("header","mini")):(U_.classList.add("c-header-mini--is-hidden"),V_?.forEach(e=>{e.classList.remove("c-menu--with-header-mini")}),document.body.removeAttribute("header")))},W_=e=>{const t=e[0];U_&&(t.isIntersecting?Q_("hidden"):Q_("show"))};let G_,Z_,Y_;let J_=0;const $_=e=>{if(!G_)return;const t=document.querySelector("button.c-btn--close:not(.u-hidden)"),n=document.getElementById("live-refresh-button");if("show"===e)return G_.classList.remove("c-header-mobile--is-hidden"),t&&t.classList.add("c-btn--close-is-below-header"),void(n&&(n.classList.remove("u-sticky--spaced-top-screen"),n.classList.add("u-sticky--spaced-header-mobile")));G_.classList.add("c-header-mobile--is-hidden"),t&&t.classList.remove("c-btn--close-is-below-header"),n&&(n.classList.add("u-sticky--spaced-top-screen"),n.classList.remove("u-sticky--spaced-header-mobile"))},X_=e=>{Z_&&Y_&&("show"===e?(Z_.classList.remove("u-hidden"),Y_.classList.add("u-hidden")):(Z_.classList.add("u-hidden"),Y_.classList.remove("u-hidden")))},eS=()=>{G_=document.querySelector(".c-header-mobile"),Z_=document.querySelector(".js-header-btn-menu"),Y_=document.querySelector(".js-header-btn-back"),G_&&window.addEventListener("scroll",()=>{window.scrollY<780?($_("show"),Z_&&Y_&&X_("show")):(()=>{const e=window.scrollY;e>J_?($_("hidden"),J_=e):J_-e>100&&($_("show"),X_("hidden"),J_=e)})()})};let tS;const nS=document.querySelector("button.c-btn--close"),rS=document.querySelectorAll('div[id^="taboola-below-article"]'),iS="20px",oS="211px";let aS=0,sS=0;const lS=()=>{tS?.classList.remove("c-read-also-banner--is-hidden"),document.body.setAttribute("readalsobanner","show")},cS=()=>{tS?.classList.add("c-read-also-banner--is-hidden"),document.body.setAttribute("readalsobanner","hidden")},uS=e=>{const t=[];return rS.forEach((n,r)=>{const i=n.getBoundingClientRect(),{top:o,bottom:a}=i;"top"===e&&o<=180||"bottom"===e&&o<document.documentElement.clientHeight&&a>0?t[r]=!0:t[r]=!1}),!!t.find(e=>!0===e)},dS=(e,t)=>{const n=uS("bottom");"down"===t&&(n?(lS(),tS?.classList.remove("c-read-also-banner--is-fixed-below-header"),nS&&(nS.style.top="140px")):nS&&(nS.style.top=iS),sS=e),"up"===t&&sS-e>100&&(tS?.classList.add("c-read-also-banner--is-fixed-below-header"),n?(lS(),nS&&(nS.style.top=oS)):(cS(),nS&&(nS.style.top=e>780?"90px":"")),sS=e)},hS=(e=document.querySelector("div.c-read-also-banner"))=>{e&&(tS=e,cS(),setTimeout(()=>{tS?.classList.remove("u-hidden")},500),window.addEventListener("scroll",()=>{if(uS("top"))return void cS();const e=!!document.querySelector('body[data-layout="mobile"]'),t=(()=>{let e=null;return e=document.body.getBoundingClientRect().top>aS?"up":"down",aS=document.body.getBoundingClientRect().top,e})();e?dS(window.scrollY,t):((e,t)=>{const n=tS?.dataset.bannerLimitTop||"0";"up"===t&&-document.body.getBoundingClientRect().top>=parseInt(n,10)&&(lS(),nS&&(nS.style.top=oS)),("down"===t||-document.body.getBoundingClientRect().top<=parseInt(n,10))&&(cS(),nS&&(nS.style.top=e>780?iS:""))})(window.scrollY,t)}))},pS=()=>{const{refreshInterval:e}=document.body.dataset;Number(e)>0&&((e,t)=>{let n;const r=1e3*t,i=()=>{clearTimeout(n),n=setTimeout(e,r)};document.addEventListener("click",i),document.addEventListener("keypress",i),document.addEventListener("scroll",i),i()})(()=>{window.location.reload()},Number(e))};var fS=()=>{(()=>{const e=document.getElementById("js-refresh-button");e&&window?.location&&e.addEventListener("click",e=>{e.preventDefault(),window.location.reload()})})()};const mS=()=>{document.querySelectorAll(".c-skip-link").forEach(e=>{e.addEventListener("click",e=>{if(!(e.currentTarget instanceof HTMLAnchorElement))return;const t=e.currentTarget.getAttribute("href")?.substring(1),n=t?document.getElementById(t):null;n&&(n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),setTimeout(()=>{n.focus()},0))})})};qt(),Go(),window.lazyObservers={},window.lazyObservers.defaultObserver=new IntersectionObserver(_x,{rootMargin:"700px",threshold:0}),window.lazyObservers.instantObserver=new IntersectionObserver(_x,{rootMargin:"0px",threshold:0}),(window.lazyElementsToObserve||[]).forEach(e=>{xx(e)}),Sx(),(()=>{const e=Array.from(document.querySelectorAll('[data-script-loading="lazy"]'));e.length>0&&(e.forEach(e=>{const t=document.createElement("script");t.type="text/javascript",t.innerHTML=e.innerHTML.replace(/&quot;|&amp;/g,e=>"&quot;"===e?'"':"&"),t.innerHTML=t.innerHTML.replace(/&#x27;/g,"'"),e.after(t),e.remove()}),u_())})(),(()=>{const e=document.querySelector("div#dfp_header_ad"),t=document.querySelector("div#taboola-below-article-thumbnails");e&&t&&new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting?e.style.visibility="hidden":e.style.visibility="visible"})}).observe(t)})(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",mS):mS(),(()=>{const e=document.getElementById("data-preferences-switch");if(!(e&&e instanceof HTMLInputElement))return;const t=localStorage.getItem(Ht);if(null!==t){const n="true"===t;e.checked=n,Kt(e,n)}e.addEventListener("change",({target:e})=>{if(!(e instanceof HTMLInputElement))return;const{checked:t}=e;Kt(e,t),localStorage.setItem(Ht,t.toString()),localStorage.setItem(zt,"false"),t&&localStorage.setItem(zt,"true")})})(),fS(),wo(),So(),Jt(),(()=>{const e=document.getElementById("c-alert-info");if(e){const n=t.createRoot(e);n&&n.render(an.jsx(Kx,{}))}})(),(()=>{if(U_=document.querySelector(".c-header-mini"),U_){const e=document.documentElement.scrollTop,t=document.querySelector(".c-header");V_=document.querySelectorAll(".c-menu"),t&&(e>t.offsetHeight?Q_("show"):Q_("hidden"),new IntersectionObserver(W_,{threshold:[0],rootMargin:"0px 0px -100%"}).observe(t))}})(),(()=>{const e=document.getElementById("tabpanel-le-direct"),n=document.getElementById("live-refresh-button");if(e&&n){const e=t.createRoot(n);e&&e.render(an.jsx(w_,{}))}})(),pS(),K_(),Xo(),(()=>{try{"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{e.forEach(e=>{e.active?.scriptURL?.endsWith("/sw.js")&&e.unregister()})})}catch(e){console.error("Error while unregistering service worker:",e)}})(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({user_status:"{}"!==Li("20mnUserInfo")?"Connecte":"Pas connecte",an:document.referrer,referrer:document.referrer,darkmode:"dark"===document.documentElement.getAttribute("data-theme"),page_uri:window.datalayerInfo?.pageUri,page_type:window.datalayerInfo?.pageName}),eS(),hS(),(()=>{const e=document.querySelector(".c-header-page__print-button");e&&(window.addEventListener("beforeprint",e=>{e.preventDefault();const t=document.querySelector('div[data-test-id="modal-is-paused"]');t&&(t.style.display="none",window.addEventListener("afterprint",()=>{t.style.display="flex"}))}),e.addEventListener("click",()=>{window.print()}))})(),$t(),yo(),(()=>{const e=document.getElementById("archive-pdf-list-container"),n=window?.__staticHydrationData?.archivePdfListContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(Px,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("article-list-bottom-container"),n=window?.__staticHydrationData?.articleListBottomContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(qx,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("journalist-article-list-container"),n=window?.__staticHydrationData?.journalistArticleListContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(Jx,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("home-legal-notice-list-container"),n=window?.__staticHydrationData?.legalNoticeHomeContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(a_,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("department-legal-notice-list-container"),n=window?.__staticHydrationData?.legalNoticeDepartmentContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(o_,{isSSR:!1,...n}))}})(),B_("tabpanel-le-direct"),B_("tabpanel-temps-forts",!0),(()=>{const e=document.getElementById("local-news-container"),n=window?.__staticHydrationData?.localNewsContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(S_,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("latest-articles-container"),n=window?.__staticHydrationData?.latestArticlesContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(e_,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("live-and-most-read-container"),n=window?.__staticHydrationData?.liveAndMostReadContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(c_,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("most-read-container"),n=window?.__staticHydrationData?.mostReadContainer;if(e&&n&&n.variablesForQuery?.builtAt&&n.variablesForQuery.builtAt+36e5<Date.now()){const r=t.createRoot(e);r&&r.render(an.jsx(I_,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("latest-contents-carousel-container"),n=window?.__staticHydrationData?.latestContentsCarouselContainer;if(e&&n&&n.variablesForQuery?.builtAt&&n.variablesForQuery.builtAt+36e5<Date.now()){const r=t.createRoot(e);r&&r.render(an.jsx(n_,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("elections-form-container"),n=window?.__staticHydrationData?.electionsSearchBannerContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(ox,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("elections-departments-map-container"),n=window?.__staticHydrationData?.electionsDepartmentsMapContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(Wx,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("elections-european-map-container"),n=window?.__staticHydrationData?.electionsEuropeanMapContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(Gx,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("elections-towns-by-departments-map-container"),n=window?.__staticHydrationData?.electionsMapTownsByDepartmentsContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(Zx,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("elections-constituencies-map-container"),n=window?.__staticHydrationData?.electionsConstituenciesMapContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(Qx,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("movies-container"),n=window?.__staticHydrationData?.moviesListContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(T_,{...n,isSSR:!1}))}})(),(()=>{const e=document.getElementById("main-most-read-container"),n=window?.__staticHydrationData?.mainMostReadContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(C_,{...n,isSSR:!1}))}})(),(()=>{const e=document.getElementById("quiz-container"),n=window?.__staticHydrationData?.quizContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(L_,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("tv-tab-replays"),n=window?.__staticHydrationData?.replaysTvExtractsAndReplaysContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(Dx,{name:"replays",isSSR:!1,...n}))}const r=document.getElementById("tv-tab-extraits"),i=window?.__staticHydrationData?.extraitsTvExtractsAndReplaysContainer;if(r&&i){const e=t.createRoot(r);e&&e.render(an.jsx(Dx,{name:"extraits",isSSR:!1,...i}))}})(),(()=>{const e=document.getElementById("elections-ia-articles-container"),n=window?.__staticHydrationData?.electionsAiArticlesContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(Vx,{isSSR:!1,...n}))}})(),(()=>{if(!document.querySelector("#contact-form"))return;const e=document.body.getAttribute("data-http-taskrunner-api-host"),t=window.sessionStorage.getItem("antibotId")||"";e?fetch(`${e}/captcha`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({antibotId:t})}).then(e=>e.json()).then(e=>{if(!e)return;const{captchaServerAntibotId:t,requestId:n}=e.body||{};t&&n&&(window.LI_ANTIBOT.loadAntibot(["IMAGE","QUESTION","FR","abuUFfA+tOvM","https://captcha.liveidentity.com/captcha",null,"https://static.20mn.fr/apps/20minutes/styles/captcha-override.css",t,n,!0]),window.sessionStorage.setItem("antibotId",t))}).catch(e=>{console.error("Error:",e)}):console.error("Error: goomUri is not defined")})(),H_(),(()=>{if(!new URLSearchParams(document.location.search).has("comment_id"))return;const e=document.getElementById("commentAnchor");e&&e.scrollIntoView({behavior:"smooth",block:"start"})})(),To(),No(),Io(),Lo(),Wo(),Bo()}(React,ReactDOMClient);
29
+ */var Yw,Jw=(Gw||(Gw=1,Yw=Zw,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=r(e,n(i)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var o in n)e.call(n,o)&&n[o]&&(i=r(i,o));return i}function r(e,t){return t?e?e+" "+t:e+t:e}Yw.exports?(t.default=t,Yw.exports=t):window.classNames=t}()),Zw.exports),$w=en(Jw);const Xw=({articles:t,seeMoreButton:n,layout:r,...i})=>{const{variablesForQuery:o,...a}=i;return an.jsxs($n,{...a,children:[t.map((n,i)=>{const o=`lastArticleKey${i}`,a=i===t.length-1;return an.jsxs(e.Fragment,{children:[an.jsx(Zr,{...n,px:{xs:"m",md:"0"},cardTitleProps:{weight:"semi-bold",maxRows:r===lr.MOBILE?void 0:3,...n.cardTitleProps}}),!a&&an.jsx(Ln,{color:"grey-200",my:"s"}),10===i&&r===lr.MOBILE&&an.jsx(pn,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),20===i&&r===lr.MOBILE&&an.jsx(pn,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"ARTICLE"}),(10===i||20===i)&&r===lr.MOBILE&&an.jsx(Ln,{color:"grey-200",my:"s"})]},o)}),n&&an.jsx(Nn,{...n,color:"primary",variant:"outlined",mx:"auto",mt:"s"})]})},ex=({legalNotices:t,seeMoreLegalNotices:n,...r})=>0===t.length?null:an.jsxs($n,{...r,children:[t.map((t,n)=>an.jsxs(e.Fragment,{children:[an.jsx(Gr,{...t,linkProps:{children:"Lire l’annonce"}}),an.jsx(Ln,{my:"l",color:"grey-200"})]},`${t.link}-${n}`)),n&&an.jsx(Nn,{color:"primary",variant:"outlined",mx:"auto",mt:"xl",...n})]}),tx=({updatedAt:e,...t})=>an.jsx(ri,{...t,...e&&{updatedAt:Mi(e)}}),nx=({draftContent:t,pageEndpoint:n,imgEndpoint:r,withCmp:i=!0})=>{const o=e.useRef(null);return e.useEffect(()=>{const e=Qw({rawDraftContent:t,pageEndpoint:n,imgEndpoint:r,withCmp:i}),a=document.createRange().createContextualFragment(e);o.current&&(o.current.innerHTML="",o.current.appendChild(a))},[t,r,n,i]),an.jsx($n,{ref:o,mt:"s",className:"c-content",children:Ww({rawDraftContent:t,pageEndpoint:n,imgEndpoint:r,withCmp:i})})},rx=(e,t)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}},ix=".c-search-form__autocomplete",ox=({isSSR:t=!0,layout:n,title:r,titleHref:i,searchFormProps:o,breadcrumbProps:a,selectProps:s,variant:l,hasTopBorder:c})=>{const[u,d]=e.useState([]),h=e.useCallback(()=>{const e=document.querySelector(ix);u&&u.length>0&&e&&e.classList.remove("u-hidden")},[u]),p=e.useCallback(()=>{const e=document.querySelector(ix);u&&u.length>0&&e&&e.classList.remove("u-hidden")},[u]),f=e.useCallback(e=>{e.relatedTarget||document.querySelector(ix)?.classList?.add("u-hidden")},[]),m=e.useCallback(async e=>{if(e.target instanceof HTMLInputElement){const{target:t}=e;if(t.value.length<3)d([]);else try{const e=await Zo({url:`${t.closest("form")?.action??"#"}?searchValue=${t.value}`});d(e.map(e=>{const{_source:t}=e;return{value:t.output,url:t.url}}))}catch(e){console.error("20mn> Error while searching:",e)}}},[]);return e.useEffect(()=>{qt()},[]),e.useEffect(()=>{const e=document.querySelector(ix);u&&e&&(u.length>0?e.classList.remove("u-hidden"):e.classList.add("u-hidden"))},[u]),an.jsxs(an.Fragment,{children:[an.jsx(Xr,{layout:n,title:r,titleHref:i,breadcrumbProps:a,selectProps:s,variant:l,hasTopBorder:c,searchFormProps:{...o,autocompleteResults:u,onSubmit:e=>{e.preventDefault()},inputProps:{placeholder:"Recherchez les résultats de votre ville, votre département ou votre région",name:"elections-search",onClick:h,onFocus:p,onBlur:f,onKeyUp:rx(m,300),autoComplete:"off",required:!0,"aria-required":!0}}}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsSearchBannerContainer:{layout:n,title:r,titleHref:i,searchFormProps:o,breadcrumbProps:a,selectProps:s,variant:l,hasTopBorder:c}})} };`}})]})},ax=({layout:e,title:t,editions:n,selectorsLabel:r,editionSelector:i,monthSelector:o,variant:a="archivesByYear",enabled:s=!0})=>s?an.jsxs(an.Fragment,{children:[an.jsx(Ln,{my:{xs:"xl",md:"xxl-2"},color:"ultramarine"}),an.jsx(mr,{size:"xs",mb:"xxl",children:t}),an.jsxs(Xn,{alignItems:{xs:"start",md:"center"},gap:{xs:"xs",md:"l"},direction:{xs:"column",md:"row"},children:[an.jsx(gr,{size:"s",weight:"bold",...r}),an.jsx(sr,{...i,id:"archivePdfListEditionSelector",containerProps:{style:{width:e===lr.MOBILE?"100%":"163px"}},py:"m",px:"s"}),"archivesByYear"===a&&o&&an.jsx(sr,{...o,id:"archivePdfListMonthSelector",containerProps:{style:{width:e===lr.MOBILE?"100%":"193px"}},py:"m",px:"s"})]}),n&&n.length>0&&an.jsxs(Xn,{direction:"column",gap:"l",mt:"l",children:[n.slice(0,20).map(e=>an.jsxs(Xn,{alignItems:"baseline",children:[an.jsx(Pn,{name:"diode",color:"ultramarine",size:11,mr:"xxs"}),an.jsx(nr,{color:"ultramarine",href:e.href,children:e.name})]},e.name)),n.length>20&&an.jsx("span",{children:"Vous ne trouvez pas le journal numérique recherché ? Sélectionnez une édition et un mois pour une recherche plus précise."})]})]}):null,sx=e=>{const{variablesForQuery:t,...n}=e;return an.jsx(Yr,{...n,headingProps:{...n.headingProps,as:"h2"},mb:"xxl"})},lx=e=>e?e.rightSubheader&&new Date(e.rightSubheader?.text).getTime()?{...e,rightSubheader:{...e.rightSubheader,text:Mi(e.rightSubheader.text)}}:{...e}:e,cx=({articles:e,layout:t,columnsNumber:n=2,hideFirstDivider:r=!1,dividerProps:i,seeMoreButton:o,seeMoreLink:a,tagTotalArticles:s,currentPagePath:l,currentPage:c="1",articlesLimit:u,hasCardLarge:d=!1,hasMarginOnCard:h=!0,heading:p,isLoading:f=!1,skeletonCount:m=8,desktopArticlesListClassName:g,...y})=>{if(0===e.length)return null;const v=e=>an.jsx(Pr,{...e,cardTitleProps:{as:"h2",...e.cardTitleProps},cardHeaderProps:lx(e.cardHeaderProps),mx:h?"m":void 0}),A=f?Array.from({length:m},(e,t)=>t):[];let b=null;b=t===lr.DESKTOP?an.jsxs(tr,{colsNumber:n,gap:"xl",className:g,children:[e.slice(0,u).map((e,t)=>{const{layout:n,...r}=e;return an.jsx(Mr,{...r,className:`card-item-${t+1}`,cardTitleProps:{as:"h2",...e.cardTitleProps},cardHeaderProps:lx(e.cardHeaderProps)},`${e.link}-${t}`)}),A.map(e=>an.jsx(Ur,{variant:"medium"},`skeleton-${e}`))]}):an.jsxs(an.Fragment,{children:[e.slice(0,u).map((e,n)=>an.jsx($n,{className:`card-item-${n+1}`,children:d?an.jsxs(an.Fragment,{children:[0===n&&an.jsx(Or,{...e,layout:t}),n>0&&an.jsxs(an.Fragment,{children:[an.jsx(Ln,{color:"grey-200",my:"s",...i}),v({...e,layout:t})]})]}):an.jsxs(an.Fragment,{children:[an.jsx(Ln,{color:"grey-200",my:"s",...i,className:$w({"u-hidden":0===n&&r},i?.className)}),v({...e,layout:t})]})},`${e.link}-${n}`)),A.map(e=>an.jsxs($n,{children:[an.jsx(Ln,{color:"grey-200",my:"s",...i}),an.jsx(Ur,{variant:"extra-small",mx:h?"m":void 0})]},`skeleton-${e}`))]});const w=an.jsxs(an.Fragment,{children:[p&&an.jsx(mr,{size:"m",mb:"xl",mx:{xs:"m",md:"0"},...p}),b,(a||o)&&an.jsxs(Xn,{justifyContent:"center",mt:"l",children:[o&&an.jsx(Nn,{...o}),a&&an.jsx(nr,{buttonColor:"primary",variant:"outlined",...a}),s&&l&&an.jsx("noscript",{children:an.jsx(pi,{totalArticles:s,currentPage:c,pagePath:l,archivesUrl:"https://www.20minutes.fr/archives"})})]})]});return 0===Object.keys(y).length?w:an.jsx($n,{...y,children:w})},ux=({header:{subtitle:e,...t},sectionId:n,liveIndicator:r,children:i,...o})=>{const a=e&&"string"!=typeof e?Ww({rawDraftContent:e}):e;return an.jsxs($n,{...o,id:n,className:$w(o.className,{"u-anchor-link":Boolean(n)}),children:[r&&an.jsx(tx,{...r,variant:"elections",mx:{xs:"m",md:"0"},mb:"xs"}),t?.heading?.children&&an.jsx(ei,{...t,subtitle:a,mb:{xs:"m",sm:"xl"}}),i]})},dx=({mapConstituenciesProps:e,...t})=>""===e.electionName&&""===e.electionYear&&0===e.resultsPerDistrict.length||0===Object.keys(e.mapDistrictsData||{}).length?null:an.jsx(ux,{...t,header:{...t.header,heading:{...t.header.heading,as:"h2"}},children:an.jsx(si,{...e,mx:{xs:"m",md:"0"}})}),hx=({mapDepartmentsProps:e,...t})=>""===e.electionName&&""===e.electionYear&&0===e.resultsPerDepartment.length?null:an.jsx(ux,{...t,header:{...t.header,heading:{...t.header.heading,as:"h2"}},children:an.jsx(ai,{...e,mx:{xs:"m",md:"0"}})}),px=({mapEuropeProps:e,...t})=>""===e.electionName&&""===e.electionYear&&0===e.resultsPerCountry.length||0===Object.keys(e.mapEuCountriesData||{}).length||0===Object.keys(e.mapNonEuCountriesData||{}).length?null:an.jsx(ux,{...t,header:{...t.header,heading:{...t.header.heading,as:"h2"}},children:an.jsx(li,{...e,mx:{xs:"m",md:"0"}})}),fx=({mapTownsByDepartmentsProps:e,...t})=>{const{electionName:n,electionYear:r,...i}=e;if(""===e.electionName&&""===e.electionYear&&0===e.resultsPerTown.length)return null;const o=0===(e?.resultsPerTown?.length??0);return an.jsx(ux,{...t,className:$w({"u-placeholder-map-towns-empty":o,"u-placeholder-map-towns":!o},t?.className),header:{...t.header,heading:{...t.header.heading,as:"h2"}},children:an.jsx(hi,{...i,mx:{xs:"m",md:"0"}})})},mx=({articles:t,selectProps:n,seeMoreLink:r,layout:i,...o})=>{const{variablesForQuery:a,...s}=o,l=an.jsxs(an.Fragment,{children:[an.jsx(ti,{as:"h2",size:{xs:"s",md:"m"},isCentered:i===lr.MOBILE,mb:{xs:"l",md:"0"},iconProps:{name:"rubric-news",size:40},children:"Actualité locale"}),an.jsx(sr,{...n})]}),c=e=>an.jsx(Mr,{...e,cardTitleProps:{as:"h3",size:"xxs",weight:"semi-bold",fontFamily:"source-serif-pro",maxRows:4,...e.cardTitleProps},socialBarProps:void 0},e.title);return an.jsxs($n,{...s,children:[an.jsx(Bn,{mb:"l"}),i===lr.DESKTOP?an.jsx(Xn,{justifyContent:"between",mb:"xl",alignItems:"center",children:l}):an.jsx($n,{mx:"m",mb:"l",children:l}),i===lr.DESKTOP?an.jsx(tr,{colsNumber:4,gap:"xl",mx:i===lr.DESKTOP?"0":"m",children:t.map(e=>c(e))}):an.jsx(Xn,{direction:"column",mx:"m",children:t.map((n,r)=>an.jsxs(e.Fragment,{children:[c(n),r<t.length-1&&an.jsx(Ln,{color:"grey-200",my:"s"})]},n.title))}),an.jsx(Xn,{justifyContent:"center",mt:"xxl",children:an.jsx(nr,{buttonColor:"primary",variant:"outlined",...r,children:"Voir plus d'articles"})})]})},gx=({post:t,postIndex:n,postsCount:r,pageEndpoint:i,imgEndpoint:o,layout:a,disableAds:s=!1,enableAnchoring:l=!0})=>e.createElement("section",{className:$w("js-post",{"u-anchor-link":l}),...l?{id:`post-${t.id}`}:{},key:t.id},an.jsx(oi,{...t.title}),t.content&&an.jsx(nx,{draftContent:t.content,pageEndpoint:i,imgEndpoint:o}),t.talk&&an.jsx(ii,{...t.talk,mt:"s"}),an.jsx(Ln,{color:"grey-200",my:"l"}),!s&&r>=4&&n%6==3&&an.jsx(pn,{adUnitCompletePath:a===lr.MOBILE?"/49926454/20minutes_webmobile/live/inread":"/49926454/20minutes_desktop/live/inread",variant:"INREAD",mb:"s",isFullscreenMobile:!0}),!s&&r>=8&&n%6==0&&an.jsx(pn,{adUnitCompletePath:a===lr.MOBILE?"/49926454/20minutes_webmobile/live/article_mtf":"/49926454/20minutes_desktop/live/pave_article",variant:"ARTICLE",mb:"s",isFullscreenMobile:!0})),yx=({posts:e,layout:t,pageEndpoint:n,imgEndpoint:r,seeMoreLink:i,disableAds:o,enableAnchoring:a=!0,...s})=>{const{variablesForQuery:l,refreshButton:c,...u}=s;return 0===e.length?null:an.jsxs(an.Fragment,{children:[an.jsx($n,{...u,"data-state":c?.state,"data-latest-post-id":c?.latestPostId,"data-brand-id":l?.brandId,"data-live-id":l?.liveId,children:e.map((i,s)=>an.jsx(gx,{post:i,postIndex:s,postsCount:e.length,layout:t,pageEndpoint:n,imgEndpoint:r,disableAds:o,enableAnchoring:a},`${i.id}-${s}`))}),i&&an.jsx(Xn,{justifyContent:"center",my:"l",children:an.jsx(Nn,{color:"primary",variant:"outlined",...i})})]})},vx=({items:t,seeMoreButton:n,...r})=>t.length<=0?null:an.jsxs(an.Fragment,{children:[an.jsx($n,{...r,children:t.map((n,r)=>{const{summaryProps:i,...o}=n;return an.jsxs(e.Fragment,{children:[an.jsx(Fr,{...o,summaryProps:o.layout!==lr.MOBILE?i:void 0,mb:"m",ml:{xs:"m",md:"0"}}),r!==t.length-1&&an.jsx(Ln,{color:"grey-200",my:"s"}),2===r&&o.layout===lr.MOBILE&&an.jsx(pn,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),7===r&&o.layout===lr.MOBILE&&an.jsx(pn,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"ARTICLE"}),(2===r||7===r)&&o.layout===lr.MOBILE&&an.jsx(Ln,{color:"grey-200",my:"s"})]},`${o.link}-${r}`)})}),n&&an.jsx(Xn,{justifyContent:"center",mb:"m",children:an.jsx(Nn,{...n})})]}),Ax=({...e})=>{const{variablesForQuery:t,...n}=e;return an.jsx(Ti,{...n})},bx=({items:t,layout:n,seeMoreButton:r,...i})=>t.length<=0?null:an.jsxs(an.Fragment,{children:[an.jsx(Xn,{direction:"column",gap:"xxl-2",...i,children:t.map((t,r)=>an.jsxs(e.Fragment,{children:[5===r&&n===lr.MOBILE&&an.jsx(pn,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),an.jsx(Rr,{...t,layout:n,containerSpacing:{px:{xs:"m",lg:"0"}}})]},`${t.link}-${r}`))}),r&&an.jsx(Xn,{justifyContent:"center",mt:"xl",children:an.jsx(Nn,{...r})}),n===lr.DESKTOP&&an.jsx(pn,{adUnitCompletePath:"/49926454/20minutes_desktop/divers/ban_btf",variant:"BAN"}),n===lr.MOBILE&&an.jsx(pn,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"BAN",mt:"xl"})]}),wx=({articles:e,layout:t,totalArticles:n,currentPagePath:r,currentPage:i="1",seeMoreButton:o,...a})=>{if(0===e.length)return null;const s=an.jsx(tr,{colsNumber:1,gap:{xs:"xxl",md:"xxl-2"},children:e.map((e,n)=>t===lr.DESKTOP?an.jsx(qr,{...e,className:$w(`card-item-${n+1}`,e.className),cardTitleProps:{as:"h2",...e.cardTitleProps},cardHeaderProps:lx(e.cardHeaderProps)},e.title):an.jsx(Br,{layout:t,...e,className:$w(`card-item-${n+1}`,e.className),cardTitleProps:{as:"h2",...e.cardTitleProps},cardHeaderProps:lx(e.cardHeaderProps)},e.title))}),l=an.jsxs(an.Fragment,{children:[s,o&&an.jsxs(an.Fragment,{children:[n&&r&&an.jsx("noscript",{children:an.jsx(pi,{totalArticles:n,currentPage:i,pagePath:r,archivesUrl:"https://www.20minutes.fr/archives"})}),an.jsx(Xn,{justifyContent:"center",mt:"xxl",children:an.jsx(Nn,{...o})})]})]});return 0===Object.keys(a).length?l:an.jsx($n,{...a,children:l})},xx=e=>{if(!window.lazyObservers?.defaultObserver&&!window.lazyObservers?.instantObserver)return window.lazyElementsToObserve=window.lazyElementsToObserve||[],void window.lazyElementsToObserve.push(e);const t=e.dataset?.distanceVisible;"700"===t?window.lazyObservers?.defaultObserver?.observe(e):"0"===t&&window.lazyObservers?.instantObserver?.observe(e)},_x=(e,t)=>{e.forEach(e=>{if(e.isIntersecting&&e.target instanceof HTMLElement){const{target:n}=e,r=n.id,i=n.dataset?.eventName;(r||i)&&(n.dataset.lazyLoaded="true",t.unobserve(n),i?(document.dispatchEvent(new CustomEvent(i,{detail:{target:n}})),console.info(`20minLazyCall: element event name %c${i}%c has been lazy loaded`,"color: #0777;font-weight:bold;","color: black")):r&&(n.dispatchEvent(new Event(r)),console.info(`20minLazyCall: element with id %c${r}%c has been lazy loaded`,"color: #0777;font-weight:bold;","color: black")))}})},Sx=()=>{document.querySelectorAll('[data-delayed="true"]:not([data-dfp-name]):not([data-lazy-loaded="true"])').forEach(e=>{xx(e)})},Ex=({medias:e,imgEndpoint:t})=>{const n=e?.find(e=>e&&!0===e.illustration&&e.type===Ki.photo&&e.photo?.node?.id);if(!n?.photo?.node?.id)return"";const r=n.photo?.node?.slug?`%format_${n.photo.node.slug}`:"%format";return`${t}/${jw(n.photo.node.id)}/${r}`},Cx=({photo:e})=>e?.node?[{type:Ki.photo,illustration:!0,legend:e.node.caption??null,photo:{node:{id:e.node.id,brand_id:e.node.brand_id,title:e.node.title??null,caption:e.node.caption??null,credit:e.node.credit??null,slug:e.node.slug??null}},video:null,podcast:null}]:[],kx=({medias:e,picto:t,editorialModel:n})=>{if(n===qi.Story)return{caption:{iconName:"diaporama"}};let r;if(t)switch(t){case"video":if(n!==qi.Page){const t=e?.find(e=>e&&!0===e?.illustration&&e?.type===Ki.video&&e[Ki.video]?.duration)?.video?.duration;return{caption:{iconName:"video",text:t?Bi(Number(t)):""}}}break;case"podcast":return{caption:{iconName:"podcast"}};default:return r}else e?.forEach(e=>{if("podcast"===e?.type&&(r={caption:{iconName:"podcast"}}),"video"===e?.type&&e?.illustration&&n!==qi.Page){const t=e?.video?.duration?Number(e?.video?.duration):null;r={caption:{iconName:"video",text:t?Bi(t):""}}}});return r},Ix=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery?.endCursor||null),[i,o]=e.useState(t.defaultVariablesForQuery?.hasNextPage||!1),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getTvReplaysOrExtracts&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery?.brandId,slug:t.defaultVariablesForQuery?.slug,first:8,after:n,filter:{publication_status:{eq:"published"},...t.defaultVariablesForQuery?.tagId?{tag_ids:{nin:[t.defaultVariablesForQuery.tagId]}}:{}}}))}`,options:{headers:i}}];try{const e=await Zo(...a),n=(({pageEndpoint:e,imgEndpoint:t,layout:n,data:r})=>Array.isArray(r)?[]:(r?.brand?.node?.tag?.node?.publishableContents?.edges||[])?.reduce((r,i)=>i?.node?.short_title&&i?.node?.medias&&i?.node?.url_current?(r.push({title:i.node.short_title,cardImageProps:{cover:Ex({medias:i.node.medias,imgEndpoint:t}),caption:{iconName:"video",text:i?.node?.video?.node?.duration?.toString()?Bi(parseInt(i.node.video.node.duration.toString(),10)):void 0}},link:new URL(i.node.url_current,e).href,layout:n,...n===lr.MOBILE&&{reverseCard:!0}}),r):r,[]))({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,layout:t.layout,data:e});s(e=>[...e,...n]),r(e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.endCursor||null),o(e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.hasNextPage||!1),to()}catch(e){console.error("20mn> Error while loading articles:",e)}},[n,t.defaultVariablesForQuery,t.layout]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{l&&c(!1)},[l]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},Dx=({isSSR:t=!0,name:n,layout:r,articles:i,variablesForQuery:o,seeMoreButton:a,...s})=>{if(0===i.length)return null;const{isLoading:l,articles:c,hasNextPage:u,onLoadMore:d}=Ix({layout:r,defaultArticles:i,defaultVariablesForQuery:o});return e.useEffect(()=>{l||Sx()},[l]),an.jsxs(an.Fragment,{children:[an.jsx(cx,{layout:r,articles:c,seeMoreButton:a&&u?{...a,disabled:l,onClick:d}:void 0,...s}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({[`${n}TvExtractsAndReplaysContainer`]:{layout:r,articles:c,variablesForQuery:o,seeMoreButton:a,...s}})} };`}})]})},Tx=e=>{switch(e){case"FRA":return"Nationale";case"BOR":return"Bordeaux";case"LIL":return"Lille";case"MAR":return"Marseille";case"MON":return"Montpellier";case"NAN":return"Nantes";case"NIC":return"Nice";case"PAR":return"Paris";case"REN":return"Rennes";case"STR":return"Strasbourg";case"TOU":return"Toulouse";default:return""}},Nx=e=>{const t=e.slice(0,4),n=e.slice(4,6),r=e.slice(6,8),i=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"][parseInt(n,10)-1];return`${parseInt(r,10)} ${i} ${t}`},Lx="archivePdfListEditionSelector",Bx="archivePdfListMonthSelector",Px=({isSSR:t=!0,variablesForQuery:n,layout:r,title:i,selectorsLabel:o,editionSelector:a,monthSelector:s,editions:l,enabled:c})=>{const[u,d]=e.useState(l),h=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,t=new Headers;window.envVariables?.apiAuthKey&&t.append("auth-key",window.envVariables.apiAuthKey);const r=document.getElementById(Lx),i=document.getElementById(Bx),o=[{url:`${e}/?id=getPdfsByEditionSlug&variables=${encodeURIComponent(JSON.stringify({brandId:n?.brandId,slug:r?.value,first:100,sort:"ASC",year:n?.year,month:i?.value}))}`,options:{headers:t}}];try{const e=(({data:e})=>{const t=[];return Array.isArray(e)||e?.brand?.node?.edition?.node?.pdfs?.edges?.forEach(e=>{e?.node?.url&&e?.node?.publication_date&&t.push({href:e?.node?.url,name:`Lire le journal du ${Nx(e?.node?.publication_date)} - édition ${Tx(e.node.url.match(/[0-9]{8}_([A-Z]{3})\.pdf/)?.[1]??"")}`})}),t})({data:await Zo(...o)});d(e)}catch(e){console.error("20mn> Error while searching:",e)}},[n?.brandId,n?.year]);return an.jsxs(an.Fragment,{children:[an.jsx(ax,{title:i,selectorsLabel:o,editionSelector:{...a,onChange:h},monthSelector:s&&{...s,onChange:h},editions:u,layout:r,enabled:c}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({archivePdfListContainer:{title:i,layout:r,selectorsLabel:o,editionSelector:a,monthSelector:s,editions:l,variablesForQuery:n,enabled:c}})} };`}})]})},Ox=e=>e?Dn.find(t=>e.includes(t)):void 0,Mx=e=>null!=e,jx=["actu-generale","justice","economie","auto","emploi","faits_divers","france","politique","sante","societe","monde","locales","nantes","toulouse","strasbourg","lyon","bordeaux","lille","marseille","montpellier","nice","paris","rennes","elections-municipales","production","publicommunique","magazine"],Fx=({pageEndpoint:e,imgEndpoint:t,staticEndpoint:n,data:r,hasSummary:i=!1,layout:o})=>Array.isArray(r)?[]:(r?.brand?.node?.tag?.node?.publishableContents?.edges||[])?.reduce((r,a)=>{if(!a?.node?.title||!a?.node?.label||!a?.node?.url||!a?.node?.medias&&!a?.node?.photo?.node)return r;const s=a?.node?.editorial_model===qi.ExternalContent,l=a?.node?.editorial_model===qi.Story;let c=a.node.medias?a.node.medias.filter(Mx):[];l&&a?.node?.photo?.node&&(c=Cx({photo:a.node.photo}));const u=a?.node?.editorial_model===qi.Article&&!jx.includes(a?.node?.rubric?.node?.slug||"");var d;return r.push({layout:o,link:new URL(a.node.url,e).href,title:a.node.short_title||a.node.title,cardImageProps:{cover:Ex({medias:c,imgEndpoint:t}),...kx({medias:c,picto:a?.node?.picto,editorialModel:a?.node.editorial_model})},cardHeaderProps:{headline:{text:a.node.label,color:Ox(a?.node?.rubric?.node?.themeColor?.node?.slug)},rightSubheader:{text:a.node.published_at||""}},cardTitleProps:{cartridge:"Live"===a?.node?.editorial_model?"live":void 0},socialBarProps:{layout:o,disableComment:!l&&!a.node.enable_comments,variant:"card",contentLink:new URL(a.node.url,e).href,commentAnchor:"mbrs-comments-container",commentCount:a.node.comments_count??0,shareCount:a.node.facebook_count??0,contentId:a.node?.id?.toString(),contentLegacyId:s?void 0:a.node?.legacy_id?.toString(),contentModel:a?.node?.editorial_model||void 0,...u&&{reactionCount:Gi(a.node.reactions_count),reactListItems:(d=a.node.reactions_count,d?Wi.map(e=>({count:d[e]??0,type:e})):[])}},...i&&{summaryProps:{children:a.node.lead}},...s&&n&&a?.node?.contentSource?.node?.name&&a?.node?.contentSource?.node?.logo&&a?.node?.contentSource?.node?.url&&{cardFooterProps:{avatarUrl:new URL(a.node.contentSource.node.logo,n).href,text:a.node.contentSource.node.name,externalLink:a.node.contentSource.node.url}}}),r},[]),Rx=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e,staticHost:i}=document.body.dataset,l=new Headers;window.envVariables?.apiAuthKey&&l.append("auth-key",window.envVariables.apiAuthKey);const u=[{url:`${e}/?id=getTagArticlesWithCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,slug:t.defaultVariablesForQuery.slug,first:t.defaultVariablesForQuery.first,after:n}))}`,options:{headers:l}}];try{const e=await Zo(...u),t=Fx({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,staticEndpoint:i||"",data:e,layout:window.layout}),n={articles:[...a,...t],endCursor:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.endCursor??null,hasNextPage:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.hasNextPage??!1};s(e=>[...e,...t]),r(n.endCursor),o(n.hasNextPage),window?.localStorage.setItem("aticles-container-data",JSON.stringify(n)),to()}catch(e){console.error("20mn> Error while loading articles:",e)}finally{c(!1)}},[a,n,t.defaultVariablesForQuery.brandId,t.defaultVariablesForQuery.first,t.defaultVariablesForQuery.slug]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{(()=>{const e=document.getElementById("article-list-bottom-container");if(!e)return;const t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(to(),t.unobserve(e.target))})}),n=e.querySelector(".card-item-1");n&&t.observe(n);const r=e.querySelector(".card-item-8");r&&t.observe(r);const i=e.querySelector(".card-item-16");i&&t.observe(i)})();const e=window?.performance?.getEntriesByType("navigation").map(e=>e.type).includes("back_forward");if(e){const e=Zi("aticles-container-data");e&&Object.hasOwn(e,"articles")&&Object.hasOwn(e,"endCursor")&&Object.hasOwn(e,"hasNextPage")&&(s(e.articles),r(e.endCursor),o(e.hasNextPage),to())}else window?.localStorage.removeItem("aticles-container-data")},[]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},qx=({isSSR:t=!0,layout:n,articles:r,variablesForQuery:i,seeMoreButton:o,currentPagePath:a,tagTotalArticles:s,columnsNumber:l})=>{const{isLoading:c,articles:u,hasNextPage:d,onLoadMore:h}=Rx({defaultArticles:r,defaultVariablesForQuery:i});e.useEffect(()=>{c||Sx()},[c]);const p=u.map(e=>({...e,...e.cardImageProps&&{cardImageProps:{...e.cardImageProps,sizes:"(min-width: 1660px) 384px, (min-width: 1440px) calc(18vw + 89px), (min-width: 1080px) 320px, (min-width: 780px) calc(44.29vw - 149px), calc(50vw - 16px)"}}}));return an.jsxs(an.Fragment,{children:[an.jsx(cx,{layout:n,articles:p,isLoading:c,skeletonCount:i.first,seeMoreButton:d?{...o,disabled:c,onClick:h}:void 0,currentPagePath:a,tagTotalArticles:s,columnsNumber:l}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({articleListBottomContainer:{layout:n,articles:p,variablesForQuery:i,seeMoreButton:o,skeletonCount:i.first}})} };`}})]})},zx="20mnBreakingNews",Hx=18e4,Kx=()=>{const[t,n]=e.useState(!1),[r,i]=e.useState(Zi(zx));e.useEffect(()=>{r&&localStorage.setItem(zx,JSON.stringify(r))},[r]),e.useEffect(()=>{t&&document&&document.querySelectorAll("#c-alert-info a").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof HTMLElement&&(t=e.target.closest("a")?.href||""),eo({name:"content",type:"action",customProps:{cta_context:"smartbanner_alert",cta_type:"link",cta_destination:t,cta_engagement:2}}),window.location.href=t})})},[t]),e.useEffect(()=>{if(Object.keys(r??{}).includes("opened")&&i(e=>({open:e?.opened??!1,time:e?.time,data:e?.data})),r?.time&&r.time+Hx>Date.now())return void(r.open&&n(!0));const{apiHost:e,imgHost:t,brandId:o}=document.body.dataset,a=new Headers;window.envVariables?.apiAuthKey&&a.append("auth-key",window.envVariables.apiAuthKey);const s=o?no(`Brand:${o}`):void 0,l=encodeURIComponent(JSON.stringify({brandId:s}));Zo(...[{url:`${e}/?id=getBreakingNews&variables=${l}`,options:{headers:a}}]).then(e=>{const o=e?.brand?.node?.home?.node?.homeBreakingNews?.node;let a;switch(o?.content?.editorial_model){case"Article":a=o?.content?.article?.node;break;case"Live":a=o?.content?.live?.node;break;default:a=void 0}if(!a?.title||!a?.url_current)return void n(!1);const s=o?.custom_title??a.title;let l;const c=a.medias?.[0]?.photo?.node;if(o?.with_photo&&c?.id){const e=atob(c.id).replace("Photo:","");l=`${t}/${e}/147x96_${c.slug??"media"}`}const u=!r||r.data?.description!==s||r.open;i({open:u,time:Date.now(),data:{description:s,url:a.url_current,imageUrl:l}}),n(u)}).catch(e=>{console.error("20mn> Error while loading the breaking news:",e)})},[r]);return t&&r?.data?an.jsx(vr,{title:"ALERTE INFO",description:r.data.description,cover:r.data.imageUrl,link:r?.data?.url?{href:r.data.url}:void 0,closeButton:{onClick:()=>{i(e=>({...e||{},open:!1})),n(!1)}}}):null},Ux=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const l=[{url:`${e}/?id=getTagArticlesWithCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,slug:t.defaultVariablesForQuery.slug,first:t.defaultVariablesForQuery.first,after:n}))}`,options:{headers:i}}];try{const e=await Zo(...l),t=(({pageEndpoint:e,data:t})=>Array.isArray(t)?[]:(t?.brand?.node?.tag?.node?.publishableContents?.edges||[])?.reduce((t,n)=>n?.node?.title&&n?.node?.url?(t.push({title:n.node.title,url:new URL(n.node.url,e).href}),t):t,[]))({pageEndpoint:window.envVariables.pageEndpoint,data:e}),n={articles:[...a,...t],endCursor:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.endCursor??null,hasNextPage:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.hasNextPage??!1};s(e=>[...e,...t]),r(n.endCursor),o(n.hasNextPage),to()}catch(e){console.error("20mn> Error while loading articles:",e)}},[a,n,t.defaultVariablesForQuery.brandId,t.defaultVariablesForQuery.first,t.defaultVariablesForQuery.slug]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{l&&c(!1)},[l]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},Vx=({isSSR:t=!0,articles:n,variablesForQuery:r,seeMoreButton:i,linksSize:o,colsNumber:a})=>{const{isLoading:s,articles:l,hasNextPage:c,onLoadMore:u}=Ux({defaultArticles:n,defaultVariablesForQuery:r});return e.useEffect(()=>{s||Sx()},[s]),an.jsxs(an.Fragment,{children:[an.jsx(ta,{articles:l,seeMoreButton:c?{...i,disabled:s,onClick:u}:void 0,linksSize:o,colsNumber:a}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsAiArticlesContainer:{articles:l,variablesForQuery:r,seeMoreButton:i,linksSize:o,colsNumber:a}})} };`}})]})},Qx=({isSSR:t=!0,mapConstituenciesProps:n,...r})=>{const{mapConstituenciesProps:i}=(t=>{const[n,r]=e.useState(t.defaultMapConstituenciesProps),i=e.useCallback(async()=>{try{const e=await Zo({url:"https://static.20mn.fr/elections/map-districts.json"});r(t=>({...t,mapDistrictsData:e}))}catch(e){console.error("20mn> Error while loading map data:",e)}},[]);return e.useEffect(()=>{i(),qt(),Jt()},[i]),e.useMemo(()=>({mapConstituenciesProps:n}),[n])})({defaultMapConstituenciesProps:n});return an.jsxs(an.Fragment,{children:[an.jsx(dx,{mapConstituenciesProps:t?{electionName:"",electionYear:"",resultsPerDistrict:[],mapDistrictsData:{}}:i,...r}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsConstituenciesMapContainer:{mapConstituenciesProps:n,...r}})} };`}})]})},Wx=({isSSR:t=!0,mapDepartmentsProps:n,...r})=>{const{mapDepartmentsProps:i}=(t=>{const[n,r]=e.useState(t.defaultMapDepartmentsProps),i=e.useCallback(async()=>{try{const e=await Zo({url:"https://static.20mn.fr/elections/map-departments.json"});r(t=>({...t,mapDepartmentsData:e}))}catch(e){console.error("20mn> Error while loading map data:",e)}},[]);return e.useEffect(()=>{i()},[i]),e.useMemo(()=>({mapDepartmentsProps:n}),[n])})({defaultMapDepartmentsProps:n});return an.jsxs(an.Fragment,{children:[an.jsx(hx,{mapDepartmentsProps:t?{electionName:"",electionYear:"",resultsPerDepartment:[],mapDepartmentsData:{}}:i,...r}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsDepartmentsMapContainer:{mapDepartmentsProps:n,...r}})} };`}})]})},Gx=({isSSR:t=!0,mapEuropeProps:n,...r})=>{const{mapEuropeProps:i}=(t=>{const[n,r]=e.useState(t.defaultMapEuropeProps),i=e.useCallback(async()=>{try{const e=await Promise.all([Zo({url:"https://static.20mn.fr/elections/map-eu-countries.json"}),Zo({url:"https://static.20mn.fr/elections/map-non-eu-countries.json"})]);r(t=>({...t,mapEuCountriesData:e[0],mapNonEuCountriesData:e[1]}))}catch(e){console.error("20mn> Error while loading map data:",e)}},[]);return e.useEffect(()=>{i()},[i]),e.useMemo(()=>({mapEuropeProps:n}),[n])})({defaultMapEuropeProps:n});return an.jsxs(an.Fragment,{children:[an.jsx(px,{mapEuropeProps:t?{electionName:"",electionYear:"",resultsPerCountry:[],mapEuCountriesData:{},mapNonEuCountriesData:{}}:i,...r}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsEuropeanMapContainer:{mapEuropeProps:n,...r}})} };`}})]})},Zx=({isSSR:t=!0,mapTownsByDepartmentsProps:n,...r})=>{const{mapTownsByDepartmentsProps:i}=(t=>{const[n,r]=e.useState(t.defaultMapTownsByDepartmentsProps),i=e.useCallback(async()=>{try{const e=await Zo({url:"https://static.20mn.fr/elections/map-departments-paths.json"}),n=await Zo({url:"https://static.20mn.fr/elections/map-towns.svg",options:{headers:{"Content-Type":"image/svg+xml"}}}),i=await Zo({url:"https://static.20mn.fr/elections/map-droms.json"});let o=[];try{o=await Zo({url:`https://static.20mn.fr/elections/mn${t.defaultMapTownsByDepartmentsProps.electionYear}/electeds.json`})}catch(e){console.warn("20mn> Error while loading town results data:",e)}r(t=>({...t,townsSprite:n,departmentsPaths:e,dromsConfig:i,resultsPerTown:o}))}catch(e){console.error("20mn> Error while loading town map data:",e)}},[t.defaultMapTownsByDepartmentsProps.electionYear]);return e.useEffect(()=>{i()},[i]),e.useMemo(()=>({mapTownsByDepartmentsProps:n}),[n])})({defaultMapTownsByDepartmentsProps:n}),o={layout:n.layout,resultsPerTown:[]};return an.jsxs(an.Fragment,{children:[an.jsx(fx,{mapTownsByDepartmentsProps:t?o:i,...r}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsMapTownsByDepartmentsContainer:{mapTownsByDepartmentsProps:n,...r}})} };`}})]})},Yx=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getUserBackArticlesWithCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,userBackId:t.defaultVariablesForQuery.userBackId,first:10,after:n}))}`,options:{headers:i}}];try{const e=await Zo(...a),t=(({pageEndpoint:e,imgEndpoint:t,data:n,layout:r})=>Array.isArray(n)?[]:(n?.brand?.node?.publishableContents?.edges||[])?.reduce((n,i)=>{if(!i?.node?.title||!i?.node?.label||!i?.node?.url||!i?.node?.medias&&!i?.node?.photo?.node)return n;const o=i?.node?.editorial_model===qi.Story;let a=i.node.medias?i.node.medias.filter(Mx):[];return o&&i?.node?.photo?.node&&(a=Cx({photo:i.node.photo})),n.push({link:new URL(i.node.url,e).href,title:i.node.short_title||i.node.title,cardImageProps:{cover:Ex({medias:a,imgEndpoint:t}),...kx({medias:a,picto:i?.node?.picto,editorialModel:i?.node.editorial_model})},cardHeaderProps:{headline:{text:i.node.label,color:Ox(i?.node?.rubric?.node?.themeColor?.node?.slug)},rightSubheader:{text:i.node.published_at||""}},cardTitleProps:{cartridge:"Live"===i?.node?.editorial_model?"live":void 0},socialBarProps:{layout:r,disableComment:!o&&!i.node.enable_comments,variant:"card",contentLink:new URL(i.node.url,e).href,commentAnchor:"mbrs-comments-container",commentCount:i.node.comments_count??0,shareCount:i.node.facebook_count??0,contentLegacyId:i.node?.legacy_id?.toString()}}),n},[]))({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e,layout:window.layout});s(e=>[...e,...t]),r(e?.brand?.node?.publishableContents?.pageInfo?.endCursor||null),o(e?.brand?.node?.publishableContents?.pageInfo?.hasNextPage||!1),to()}catch(e){console.error("20mn> Error while loading articles:",e)}},[n,t.defaultVariablesForQuery.brandId,t.defaultVariablesForQuery.userBackId]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{l&&c(!1)},[l]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},Jx=({isSSR:t=!0,layout:n,articles:r,variablesForQuery:i,seeMoreButton:o,currentPagePath:a,tagTotalArticles:s,columnsNumber:l,heading:c})=>{if(0===r.length)return null;const{isLoading:u,articles:d,hasNextPage:h,onLoadMore:p}=Yx({defaultArticles:r,defaultVariablesForQuery:i});e.useEffect(()=>{u||Sx()},[u]);const f=d.map(e=>({...e,...e.cardImageProps&&{cardImageProps:{...e.cardImageProps,sizes:"(min-width: 1660px) 384px, (min-width: 1440px) calc(18vw + 89px), (min-width: 1080px) 320px, (min-width: 780px) calc(44.29vw - 149px), calc(50vw - 16px)"}}}));return an.jsxs(an.Fragment,{children:[an.jsx(cx,{layout:n,articles:f,seeMoreButton:h?{...o,disabled:u,onClick:p}:void 0,currentPagePath:a,tagTotalArticles:s,columnsNumber:l,heading:c}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({journalistArticleListContainer:{layout:n,articles:f,variablesForQuery:i,seeMoreButton:o,heading:c}})} };`}})]})},$x=new Intl.DateTimeFormat("fr",{timeStyle:"short",timeZone:"Europe/Paris"}),Xx=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getLatestContentsCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,sourceExcluded:t.defaultVariablesForQuery.sourceExcluded,first:t.defaultVariablesForQuery.first,after:n}))}`,options:{headers:i}}];try{const e=await Zo(...a),t=(({layout:e,pageEndpoint:t,imgEndpoint:n,data:r})=>Array.isArray(r)?[]:(r?.brand?.node?.publishableContents?.edges||[])?.reduce((r,i)=>{if(!(i?.node?.title&&i?.node?.label&&i?.node?.url&&i?.node?.published_at&&(i?.node?.medias||i?.node?.photo?.node)))return r;let o=i.node.medias??[];return"Story"===i?.node?.editorial_model&&i?.node?.photo?.node&&(o=Cx({photo:i.node.photo})),r.push({link:new URL(i.node.url,t).href,title:i.node.short_title||i.node.title,cardImageProps:{cover:Ex({medias:o,imgEndpoint:n}),...kx({medias:o,picto:i?.node?.picto,editorialModel:i?.node.editorial_model})},socialBarProps:{layout:e,commentCount:i.node.comments_count??0,shareCount:(i.node.facebook_count??0)+(i.node.pinterest_count??0),contentLegacyId:i.node?.legacy_id?.toString(),contentLink:new URL(i.node.url,t).href,commentAnchor:"mbrs-comments-container"},cardHeaderProps:{headline:{text:i.node.label,color:Ox(i?.node?.rubric?.node?.themeColor?.node?.slug)},liveTime:$x.format(new Date(i.node.published_at).getTime()).replace(":","h")},cardTitleProps:{cartridge:"Live"===i?.node?.editorial_model?"live":void 0},summaryProps:{children:i?.node?.lead??""},layout:e}),r},[]))({layout:window.layout,pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e});s(e=>[...e,...t]),r(e?.brand?.node?.publishableContents?.pageInfo?.endCursor??null),o(e?.brand?.node?.publishableContents?.pageInfo?.hasNextPage??!1),to()}catch(e){console.error("20mn> Error while loading articles:",e)}},[n,t.defaultVariablesForQuery.brandId,t.defaultVariablesForQuery.first,t.defaultVariablesForQuery.sourceExcluded]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{l&&c(!1)},[l]),e.useEffect(()=>{(()=>{const e=document.getElementById("latest-articles-container");if(!e)return;const t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(to(),t.unobserve(e.target))})}),n=e.querySelectorAll(".c-card-container")[10];n&&t.observe(n);const r=e.querySelectorAll(".c-card-container")[20];r&&t.observe(r)})()},[]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},e_=({isSSR:t=!0,layout:n,articles:r,variablesForQuery:i,seeMoreButton:o})=>{const{isLoading:a,articles:s,hasNextPage:l,onLoadMore:c}=Xx({defaultArticles:r,defaultVariablesForQuery:i});return e.useEffect(()=>{a||Sx()},[a]),an.jsxs(an.Fragment,{children:[an.jsx(Xw,{layout:n,articles:s,seeMoreButton:l?{...o,disabled:a,onClick:c}:void 0}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({latestArticlesContainer:{layout:n,articles:s,variablesForQuery:i,seeMoreButton:o}})} };`}})]})},t_=t=>{const[n,r]=e.useState(t.defaultArticles),i=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,n=new Headers;window.envVariables?.apiAuthKey&&n.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getLatestContentsCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.variablesForQuery.brandId,sourceExcluded:t.variablesForQuery.sourceExcluded,first:t.variablesForQuery.first}))}`,options:{headers:n}}];try{const e=await Zo(...i),t=(({layout:e,pageEndpoint:t,imgEndpoint:n,data:r})=>Array.isArray(r)?[]:(r?.brand?.node?.publishableContents?.edges||[])?.reduce((r,i)=>{if(!(i?.node?.title&&i?.node?.url&&i?.node?.medias&&i?.node?.rubric?.node?.label))return r;if(!i?.node?.medias.length&&!i?.node?.photo?.node)return r;let o=i.node.medias??[];return"Story"===i?.node?.editorial_model&&i?.node?.photo?.node&&(o=Cx({photo:i.node.photo})),r.push({link:new URL(i.node.url,t).href,title:i.node.short_title||i.node.title,cardImageProps:{cover:Ex({medias:o,imgEndpoint:n}),...kx({medias:o,picto:i?.node?.picto,editorialModel:i?.node.editorial_model}),lazyLoad:!0},cardHeaderProps:{headline:{text:i?.node?.label||i.node.rubric.node.label,color:Ox(i?.node?.rubric?.node?.themeColor?.node?.slug)}},cardTitleProps:{cartridge:"Live"===i?.node?.editorial_model?"live":void 0,as:"h3"},layout:e}),r},[]))({layout:window.layout,data:e,pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint});r(t)}catch(e){console.error("20mn> Error while loading articles:",e)}},[t.variablesForQuery.brandId,t.variablesForQuery.first,t.variablesForQuery.sourceExcluded]);return e.useEffect(()=>{i()},[i]),e.useMemo(()=>({articles:n}),[n])},n_=({isSSR:e=!0,articles:t,variablesForQuery:n,...r})=>{const{articles:i}=t_({defaultArticles:t,variablesForQuery:n});return an.jsxs(an.Fragment,{children:[an.jsx(sx,{...r,articles:i,variablesForQuery:n}),e&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({latestContentsCarouselContainer:{articles:t,variablesForQuery:n,...r}})} };`}})]})},r_=e=>{const t=[];return e.legalNotices.forEach(n=>{const r=n?.node;t.push({link:r?.external_id?new URL(`/al/${r?.external_id}`,e.legalNoticeEndpoint).href:"",title:r?.title??void 0,location:r?.legalNoticeDepartment?.node?.name||"",summaryProps:{children:r?.publishing_date?`Publié le ${ji(new Date(r.publishing_date),!1)}`:Fi(new Date(Date.now()).toLocaleString())},cardTitleProps:{...r?.external_id?{as:"a",href:new URL(`/al/${r?.external_id}`,e.legalNoticeEndpoint).href,className:"opacity-hover"}:{}}})}),t},i_=e=>null!=e,o_=({isSSR:t=!0,variablesForQuery:n,legalNotices:r})=>{const{isLoading:i,legalNotices:o,hasNextPage:a,onLoadMore:s}=(t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.legalNotices),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getLegalNoticesFromDept&variables=${encodeURIComponent(JSON.stringify({slug:t.defaultVariablesForQuery.slug,first:10,after:n}))}`,options:{headers:i}}];try{const e=await Zo(...a),t=e?.legalNotices?.edges?.filter(i_)??[],n=r_({legalNotices:t,legalNoticeEndpoint:window.location.origin});s(e=>[...e,...n]),r(e?.legalNotices?.pageInfo?.endCursor||null),o(e?.legalNotices?.pageInfo?.hasNextPage||!1),to()}catch(e){console.error("20mn> Error while loading annnouncements:",e)}},[n,t.defaultVariablesForQuery.slug]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{l&&c(!1)},[l]),e.useMemo(()=>({isLoading:l,legalNotices:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])})({legalNotices:r,defaultVariablesForQuery:n});return e.useEffect(()=>{i||Sx()},[i]),an.jsxs(an.Fragment,{children:[an.jsx(ex,{legalNotices:o,seeMoreLegalNotices:a?{disabled:i,onClick:s,children:"Voir plus d’annonces légales"}:void 0,mx:{xs:"m",md:"0"}}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({legalNoticeDepartmentContainer:{legalNotices:o,variablesForQuery:n}})} };`}})]})},a_=({isSSR:t=!0,variablesForQuery:n,legalNotices:r})=>{const{isLoading:i,legalNotices:o,hasNextPage:a,onLoadMore:s}=(t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.legalNotices),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,t=new Headers;window.envVariables?.apiAuthKey&&t.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getLegalNotices&variables=${encodeURIComponent(JSON.stringify({first:10,after:n}))}`,options:{headers:t}}];try{const e=await Zo(...i),t=e?.legalNotices?.edges?.filter(i_)??[],n=r_({legalNotices:t,legalNoticeEndpoint:window.location.origin});s(e=>[...e,...n]),r(e?.legalNotices?.pageInfo?.endCursor||null),o(e?.legalNotices?.pageInfo?.hasNextPage||!1),to()}catch(e){console.error("20mn> Error while loading annnouncements:",e)}},[n]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{l&&c(!1)},[l]),e.useMemo(()=>({isLoading:l,legalNotices:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])})({legalNotices:r,defaultVariablesForQuery:n});return e.useEffect(()=>{i||Sx()},[i]),an.jsxs(an.Fragment,{children:[an.jsx(ex,{legalNotices:o,seeMoreLegalNotices:a?{disabled:i,onClick:s,children:"Voir plus d’annonces légales"}:void 0,mx:{xs:"m",md:"0"}}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({legalNoticeHomeContainer:{legalNotices:o,variablesForQuery:n}})} };`}})]})},s_=e=>{const t=new Intl.DateTimeFormat("fr",{timeStyle:"short",timeZone:"Europe/Paris"});return{name:e.name,title:e.title,tabColor:e.tabColor,body:e.articleEdges.reduce((n,r)=>{if(r?.node?.title&&r?.node?.url&&r?.node?.rubric?.node?.slug&&r?.node?.rubric?.node?.label){let i;if(e.imgEndpoint){let t=r.node.medias??[];"Story"===r?.node?.editorial_model&&r?.node?.photo?.node&&(t=Cx({photo:r.node.photo})),i={cover:Ex({medias:t,imgEndpoint:e.imgEndpoint})}}const o={themeColor:r.node.rubric.node.themeColor?.node?.lightmode_color||void 0,rubricName:r?.node?.label||r.node.rubric.node.label,title:r?.node?.short_title||r.node.title,url:new URL(r.node.url,e.pageEndpoint).href,cartridge:r.node?.editorial_model===qi.Live&&r.node?.state===Hi.open?"live":void 0,...i?{cardImageProps:i}:{}};"le-direct"===e.name&&r?.node?.published_at&&(o.liveTime=t.format(new Date(r.node.published_at).getTime()).replace(":","h")),n.push(o)}return n},[]).slice(0,e.limit)}},l_=t=>{const[n,r]=e.useState(t.defaultTabItems),i=e.useCallback(async()=>{if(t.variablesForQuery.liveLimit&&t.variablesForQuery.mostReadLimit){const{apiHost:e}=document.body.dataset,n=new Headers;window.envVariables?.apiAuthKey&&n.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getLiveAndMostRead&variables=${encodeURIComponent(JSON.stringify({brandId:t.variablesForQuery.brandId,sourceExcluded:t.variablesForQuery.sourceExcluded,liveLimit:t.variablesForQuery.liveLimit,mostReadLimit:t.variablesForQuery.mostReadLimit}))}`,options:{headers:n}}];try{const e=(({data:e,pageEndpoint:t,liveLimit:n,mostReadLimit:r})=>{if(Array.isArray(e))return[];const i=e?.brand?.node,o=i?.mostReadArticles?.edges,a=i?.liveArticles?.edges,s=[];if(a?.length){const e=s_({name:"le-direct",title:"Le direct",pageEndpoint:t,articleEdges:a,limit:n,tabColor:"red"});s.push(e)}if(o?.length){const e=s_({name:"plus-lus",title:"Les + lus",pageEndpoint:t,articleEdges:o,limit:r});s.push(e)}return s})({data:await Zo(...i),pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,liveLimit:t.variablesForQuery.liveLimit,mostReadLimit:t.variablesForQuery.mostReadLimit});r(e),qt()}catch(e){console.error("20mn> Error while loading tabItems:",e)}}},[t.variablesForQuery.brandId,t.variablesForQuery.liveLimit,t.variablesForQuery.mostReadLimit,t.variablesForQuery.sourceExcluded]);return e.useEffect(()=>{i()},[i]),e.useMemo(()=>({tabItems:n}),[n])},c_=({isSSR:e=!0,layout:t,tabItems:n,variablesForQuery:r,...i})=>{const{tabItems:o}=l_({defaultTabItems:n,variablesForQuery:r});return an.jsxs(an.Fragment,{children:[an.jsx(Ax,{...i,layout:t,tabItems:o,variablesForQuery:r,hasButton:!0}),e&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({liveAndMostReadContainer:{layout:t,tabItems:n,variablesForQuery:r}})} };`}})]})},u_=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>{const t=Array.from(document.getElementsByClassName("embed-placeholder")),n=e.getCurrentUserStatus(),r=n?.purposes?.["activation-gGierZpp"]?.enabled;t.forEach(e=>{const t=e.querySelector(".cmp-placeholder"),i=e.querySelector(".embed-wrapper");if(t instanceof Element&&i instanceof Element){if(!r||!(n?.vendors[e.getAttribute("data-vendor")||""]?.enabled??1))return t.classList.remove("u-hidden"),void i.classList.add("u-hidden");t.classList.add("u-hidden"),i.classList.remove("u-hidden"),i.querySelectorAll("[data-src]").forEach(e=>{const t=e.getAttribute("data-src");t&&(e.setAttribute("src",t),e.removeAttribute("data-src"))})}})})},d_=["nfb_1","nfb_2","article_btf","pave_com","pave_home","inread","pave_article","article_mtf","native_web"],h_=()=>{d_.forEach(e=>{const t=`#dfp_${e}`,n=[...document.querySelectorAll(t)].filter(e=>e instanceof HTMLElement);for(let t=0;t<=20;t+=1){const r=document.getElementById(`dfp_${e}_${t}`);r&&n.push(r)}let r=0;n.forEach(t=>{t.id=0===r?`dfp_${e}`:`dfp_${e}_${r}`,r+=1})})},p_=e=>{switch(e){case zi.default:case zi.important:case zi.community:case zi.faq:case zi.bold:return e;case zi.very_important:return"crucial";default:return"default"}},f_=(e,t)=>Array.isArray(e)?[]:(e?.brand?.node?.live?.node?.livePosts?.edges||[])?.reduce((e,n)=>{if(!n)return e;let r,i=n?.node?.content_md?.blocks;if(i){const e=[...i],t=e?.slice(-1);""===t?.[0]?.text&&"unstyled"===t?.[0]?.type&&(e.pop(),i=e)}n?.node?.comment?.node&&(r={question:n.node.comment.node.content||"",author:n.node.comment.node.userFront?.node?.username||"",response:i?.[0]?.text});const o=n.node?.legacy_id;return o?(e.push({cursor:n?.cursor||null,id:o,title:{status:p_(n?.node?.type),header:n?.node?.printed_hour||"",title:n?.node?.title||"",img:n?.node?.livePostLabel?.node&&t?{name:n.node.livePostLabel.node.slug||"",src:n.node.livePostLabel.node.logo?`${t}/${n.node.livePostLabel.node.logo}`:""}:void 0},content:r?void 0:{entityMap:{},...n?.node?.content_md,blocks:i??[]},talk:r}),e):e},[]),m_=e=>{const t=e.filter(({content:e})=>Object.values(e?.entityMap||{}).some(({type:e,data:t})=>"iframely"===e&&(t?.embedProps?.js||t?.embedProps?.css)));t.length&&t.forEach(({content:e})=>{Object.values(e?.entityMap||{}).forEach(({type:e,data:t})=>{if("iframely"===e&&(t?.embedProps?.js||t?.embedProps?.css)){const{js:e=[],css:n=[]}=t?.embedProps||{};e.length&&e.forEach((e,t)=>{Eo({name:`embed_live-posts-${t}`,src:e,load:"async"})}),n.length&&n.forEach(e=>{const t=document.createElement("link");t.type="text/css",t.rel="stylesheet",t.href=e,document.head.appendChild(t)})}})})},g_=()=>{const{hash:e}=new URL(window.location.href),t=e.match(/#post-(\d+)/);return t?Number(t[1]):null},y_=async({first:e,after:t,filter:n,brandId:r,liveId:i})=>{const{apiHost:o}=document.body.dataset,a=new Headers;window.envVariables?.apiAuthKey&&a.append("auth-key",window.envVariables.apiAuthKey);const s=[{url:`${o}/?id=getLivePosts&variables=${encodeURIComponent(JSON.stringify({brandId:r,liveId:i,first:e,after:t,filter:n}))}`,options:{headers:a}}],l=await Zo(...s);return{nextPosts:f_(l,document.body.dataset.staticHost),pageInfo:l?.brand?.node?.live?.node?.livePosts?.pageInfo??null}},v_=async({batchSize:e,after:t,filter:n,brandId:r,liveId:i,accumulatedPosts:o,anchorPostId:a})=>{const{nextPosts:s,pageInfo:l}=await y_({first:100,after:t,filter:n,brandId:r,liveId:i}),c=[...o,...s],u=l?.endCursor??null,d=l?.hasNextPage??!1,h=c.findIndex(e=>e.id===a);if(-1!==h){const t=Math.ceil((h+1)/e)*e,n=t>c.length?c[c.length-1].cursor:c[t-1].cursor,r=c.length>t||d;return{nextPosts:c.slice(0,t),pageInfo:{endCursor:n,hasNextPage:r}}}return d&&u?v_({batchSize:e,after:t,filter:n,brandId:r,liveId:i,accumulatedPosts:c,anchorPostId:a}):{nextPosts:[],pageInfo:l}},A_=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultPosts),[l,c]=e.useState(!1),[u,d]=e.useState(!1),h=e.useCallback(()=>{c(!0)},[]),p=e.useCallback(async()=>{const e=g_(),i=t.defaultVariablesForQuery.first,{filter:a,brandId:l,liveId:c}=t.defaultVariablesForQuery;try{if(e&&!u&&a?.type?.eq!==zi.very_important){const{nextPosts:t}=await v_({batchSize:i,after:n,filter:a,brandId:l,liveId:c,accumulatedPosts:[],anchorPostId:e});s(e=>[...e,...t]),d(Boolean(e)),m_(t)}else{const{nextPosts:e,pageInfo:t}=await y_({first:i,after:n,filter:a,brandId:l,liveId:c});r(t?.endCursor??null),o(t?.hasNextPage??!1),s(t=>[...t,...e]),m_(e)}to()}catch(e){console.error("20mn> Error while loading posts:",e)}},[n,u,t.defaultVariablesForQuery]);return e.useEffect(()=>{g_()&&!document.getElementById(`post-${g_()}`)&&c(!0)},[]),e.useEffect(()=>{document.querySelector(`#tabpanel-le-direct #post-${g_()}`)?.scrollIntoView({behavior:"smooth",block:"start"})},[]),e.useEffect(()=>{l&&p(),(e=>{e.some(({content:e})=>Object.values(e?.entityMap||{}).some(({type:e,data:t})=>"iframely"===e&&"idalgo"===t?.embedProps?.meta?.site&&"widget"===t?.embedProps?.meta?.type))&&(window?.iDalgoLoader?window.iDalgoLoader.init():Eo({name:"widget_live-posts",src:"https://20minutes.idalgo-hosting.com/partners/i/cache/datasport/cache/page/r_js_jlu_url.php",load:"async"}))})(a),h_(),u_()},[l,p,a]),e.useEffect(()=>{l&&c(!1)},[l]),e.useEffect(()=>{h_()},[]),e.useMemo(()=>({isLoading:l,posts:a,hasNextPage:i,onLoadMore:h}),[l,a,i,h])},b_=({isSSR:e=!0,posts:t,variablesForQuery:n,seeMoreLink:r,staticHydrationDataName:i="livePostsContainer",disableAds:o,...a})=>{const{isLoading:s,posts:l,hasNextPage:c,onLoadMore:u}=A_({defaultPosts:t,defaultVariablesForQuery:n});return an.jsxs(an.Fragment,{children:[an.jsx(yx,{...a,posts:l,variablesForQuery:n,disableAds:o,seeMoreLink:c?{...r,disabled:s,onClick:u}:void 0}),e&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({[i]:{posts:Ji(l),variablesForQuery:n,seeMoreLink:r,disableAds:o,...a}})} };`}})]})},w_=()=>{const[t,n]=e.useState(null),[r,i]=e.useState(0),o=document.getElementById("tabpanel-le-direct"),a=document.getElementById("tabpanel-temps-forts");let s=o?.querySelector("div[data-state]")?.dataset?.latestPostId;const{state:l,brandId:c,liveId:u}=o?.querySelector("div[data-state]")?.dataset??{},d=e.useCallback(()=>{const{apiHost:e}=document.body.dataset,t=new Headers;return window.envVariables?.apiAuthKey&&t.append("auth-key",window.envVariables.apiAuthKey),[{url:`${e}/?id=getLivePosts&variables=${encodeURIComponent(JSON.stringify({brandId:c,liveId:u,first:20,filter:{status:{eq:"published"}}}))}`,options:{headers:t}}]},[c,u]),h=e.useCallback(async()=>{const e=d();try{const t=await Zo(...e);let n=0;t?.brand?.node?.live?.node?.livePosts?.edges?.every(e=>e?.node?.legacy_id!==Number(s)&&(n+=1,!0)),i(n)}catch(e){console.error("20mn> Error while refreshing refresh button counter:",e)}},[d,s]),p=e.useCallback(()=>{const e=document.querySelector('[data-tabs-name="live-tabs"]'),t=document.getElementById("tab-le-direct"),n=document.getElementById("tabpanel-le-direct");if(e){const r=e.querySelectorAll(".c-tab"),i=e.querySelectorAll(".c-tabpanel");r.forEach(e=>{e.setAttribute("aria-selected","false"),e.setAttribute("tabindex","-1")}),i.forEach(e=>{e.setAttribute("aria-hidden","true")}),t&&(t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0")),n&&n.setAttribute("aria-hidden","false")}},[]),f=e.useCallback(async()=>{p();const e=d();try{const t=[],n=[],r=await Zo(...e);let i=f_(r,document.querySelector("body")?.dataset.staticHost),l=0;if(i?.every(e=>e.id.toString()!==s&&(l+=1,!0)),0===l)return void window.location.reload();p();const c=document.getElementById("tabpanel-le-direct")?.querySelectorAll(".js-post").length||0,u=c+l;i=i.slice(0,l),i.reverse(),i?.every((e,r)=>{const i=r+c,o=fm.renderToStaticMarkup(an.jsx(gx,{post:e,postIndex:i,postsCount:u,layout:window.layout,pageEndpoint:window.envVariables.pageEndpoint},e.id));return t.push(o),"crucial"===e.title.status&&n.push(o),!0});const d=a?.firstChild;if(d instanceof HTMLElement&&d.firstChild instanceof HTMLElement){const e=document.createElement("div");for(e.innerHTML=n.reverse().join("");e.lastChild;)d.prepend(e.lastChild)}const h=o?.firstChild;if(h instanceof HTMLElement&&h.firstChild instanceof HTMLElement){const e=document.createElement("div");for(e.innerHTML=t.reverse().join("");e.lastChild;)h.prepend(e.lastChild);const n=i.reverse()[0];if(n){const e=n.id.toString();s=e,o?.querySelector("div[data-state]")?.setAttribute("data-latest-post-id",e)}h_(),to()}}catch(e){console.error("20mn> Error while loading more live posts:",e)}},[d,a,o,s,p]);e.useEffect(()=>{l===Hi.open&&c&&s&&u?setInterval(h,6e4):console.info("Do not check for new post, live is either closed or miss information.")},[h,c,s,u,l]),e.useEffect(()=>{if(n(r>0?`Actualiser (${r})`:"Actualiser"),window.layout!==lr.MOBILE){const e=document.title.replace(/^\(\+?[0-9]+\) /,"");document.title=r>9?`(+${r}) ${e}`:r>0?`(${r}) ${e}`:e}},[r]);const m=e.useCallback(()=>{eo({name:"refresh_content",type:"action",customProps:{cta_context:"content",cta_type:"button",cta_destination:window.location.href,cta_engagement:1},chapter1:"live"}),f().then(()=>{i(0);const e=document.getElementById("live-posts-container")?.getBoundingClientRect();e&&window.scrollBy(0,e.top-100)})},[f]);return t?an.jsx(Xn,{justifyContent:"center",mb:"xxl",children:an.jsx(Nn,{color:"primary",variant:"outlined",iconProps:{name:"refresh",size:22},onClick:m,children:t})}):null},x_=e=>{let t;return e?.forEach(e=>{const n=[{title:"Ain",value:"ain"},{title:"Aisne",value:"aisne"},{title:"Allier",value:"allier"},{title:"Alpes-de-Haute-Provence",value:"alpes_de_haute_provence"},{title:"Alpes-Maritimes",value:"alpes-maritimes"},{title:"Ardèche",value:"ardeche"},{title:"Ardennes",value:"ardennes"},{title:"Ariège",value:"ariege"},{title:"Aube",value:"aube"},{title:"Aude",value:"aude"},{title:"Aveyron",value:"aveyron"},{title:"Bas-Rhin",value:"bas_rhin"},{title:"Bouches-du-Rhône",value:"bouches-rhone"},{title:"Calvados",value:"calvados"},{title:"Cantal",value:"cantal"},{title:"Charente",value:"charente"},{title:"Charente-Maritime",value:"charente-maritime"},{title:"Cher",value:"cher"},{title:"Correze",value:"correze"},{title:"Corse-du-Sud",value:"corse-sud"},{title:"Côte-d'Or",value:"cote_d_or"},{title:"Côtes-d'Armor",value:"cotes_d_armor"},{title:"Creuse",value:"creuse"},{title:"Deux-Sèvres",value:"deux-sevres"},{title:"Dordogne",value:"dordogne"},{title:"Doubs",value:"doubs"},{title:"Drôme",value:"drome"},{title:"Essonne",value:"essonne"},{title:"Eure",value:"eure"},{title:"Eure-et-Loir",value:"eure_et_loire"},{title:"Finistère",value:"finistere"},{title:"Gard",value:"gard"},{title:"Gers",value:"gers"},{title:"Gironde",value:"gironde"},{title:"Guadeloupe",value:"guadeloupe"},{title:"Guyane",value:"guyane"},{title:"Haut-Rhin",value:"haut-rhin"},{title:"Haute-Corse",value:"haute-corse"},{title:"Haute-Garonne",value:"haute-garonne"},{title:"Haute-Loire",value:"haute-loire"},{title:"Haute-Marne",value:"haute-marne"},{title:"Haute-Saône",value:"haute-saone"},{title:"Haute-Vienne",value:"haute-vienne"},{title:"Hautes-Alpes",value:"hautes-alpes"},{title:"Hautes-Pyrénées",value:"hautes_pyrenees"},{title:"Hauts-de-Seine",value:"hauts-de-seine"},{title:"Hérault",value:"herault"},{title:"Ille-et-Vilaine",value:"ille_et_vilaine"},{title:"Indre",value:"indre"},{title:"Indre-et-Loire",value:"indre-loire"},{title:"Isère",value:"isere"},{title:"Jura",value:"jura"},{title:"Landes",value:"landes"},{title:"Loir-et-Cher",value:"loir-cher"},{title:"Loire",value:"loire"},{title:"Loire-Atlantique",value:"loire-atlantique"},{title:"Loiret",value:"loiret"},{title:"Lot",value:"lot"},{title:"Lot-et-Garonne",value:"lot_et_garonne"},{title:"Lozère",value:"lozere"},{title:"Maine-et-Loire",value:"maine-et-loire"},{title:"Manche",value:"manche"},{title:"Marne",value:"marne"},{title:"Martinique",value:"martinique"},{title:"Mayenne",value:"mayenne"},{title:"Mayotte",value:"mayotte"},{title:"Meurthe-et-Moselle",value:"meurthe-et-moselle"},{title:"Meuse",value:"meuse"},{title:"Morbihan",value:"morbihan"},{title:"Moselle",value:"moselle"},{title:"Nièvre",value:"nievre"},{title:"Nord",value:"nord"},{title:"Oise",value:"oise"},{title:"Orne",value:"orne"},{title:"Paris",value:"paris"},{title:"Pas-de-Calais",value:"pas-de-calais"},{title:"Puy de Dôme",value:"puy-dome"},{title:"Pyrénées-Atlantiques",value:"pyrenees-atlantiques"},{title:"Pyrénées-Orientales",value:"pyrenees_orientales"},{title:"Rhône",value:"rhone"},{title:"Saône-et-Loire",value:"saone_et_loire"},{title:"Sarthe",value:"sarthe"},{title:"Savoie",value:"savoie"},{title:"Seine-et-Marne",value:"seine-et-marne"},{title:"Seine-Maritime",value:"seine_maritime-1"},{title:"Seine-Saint-Denis",value:"seine-saint-denis"},{title:"Somme",value:"somme"},{title:"Tarn",value:"tarn"},{title:"Tarn-et-Garonne",value:"tarn_et_garonne"},{title:"Territoire de Belfort",value:"territoire-belfort"},{title:"Val-d'Oise",value:"val_d_oise"},{title:"Val-de-Marne",value:"val-de-marne"},{title:"Var",value:"var"},{title:"Vaucluse",value:"vaucluse"},{title:"Vendée",value:"vendee"},{title:"Vienne",value:"vienne-france"},{title:"Vosges",value:"vosges"},{title:"Yonne",value:"yonne"},{title:"Yvelines",value:"yvelines"}].find(t=>t.value===e?.node?.slug);n&&(t=n)}),t?t.title:""},__=t=>{const[n,r]=e.useState(t.defaultArticles),[i,o]=e.useState(!1),[a,s]=e.useState("locales"),[l,c]=e.useState(t.defaultSeeMoreLink.href),u=e.useCallback(e=>{s(e.target.value),o(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,n=new Headers;window.envVariables?.apiAuthKey&&n.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getHomeLocalNews&variables=${encodeURIComponent(JSON.stringify({...t.variablesForQuery,slug:a}))}`,options:{headers:n}}];try{const e=await Zo(...i),t=(({data:e,pageEndpoint:t,layout:n})=>(e?.brand?.node?.tag?.node?.publishableContents?.edges||[])?.reduce((e,r)=>{if(r?.node?.rubric?.node?.label&&r?.node?.title&&r?.node?.url&&r?.node?.tags?.edges){const i=r.node.tags.edges.filter(Mx);e.push({link:new URL(r.node.url,t).href,title:Xi(r?.node?.short_title||r.node.title),cardHeaderProps:{headline:{text:r?.node?.label||r.node.rubric.node.label},location:x_(i)},socialBarProps:{layout:n,commentCount:r.node?.comments_count??0,shareCount:(r.node?.facebook_count??0)+(r.node?.pinterest_count??0),contentLegacyId:r.node?.legacy_id?.toString()}})}return e},[]))({data:e,pageEndpoint:window.envVariables.pageEndpoint,layout:window.layout});c(new URL(e?.brand?.node?.tag?.node?.url_current??"",window.envVariables.pageEndpoint).href),r(t)}catch(e){console.error("20mn> Error while loading articles:",e)}},[t.variablesForQuery,a]);return e.useEffect(()=>{i&&d()},[i,d]),e.useEffect(()=>{i&&o(!1),Ao()},[i]),e.useMemo(()=>({isLoading:i,articles:n,tagUrl:l,onDepartmentChange:u}),[n,i,l,u])},S_=({isSSR:e=!0,articles:t,variablesForQuery:n,seeMoreLink:r,selectProps:i,...o})=>{const{isLoading:a,articles:s,tagUrl:l,onDepartmentChange:c}=__({defaultArticles:t,defaultSeeMoreLink:r,variablesForQuery:n});return an.jsxs(an.Fragment,{children:[an.jsx(mx,{...o,articles:s,variablesForQuery:n,seeMoreLink:{href:l},selectProps:{...i,disabled:a,onChange:c}}),e&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({localNewsContainer:{articles:s,variablesForQuery:n,selectProps:i,seeMoreLink:r,...o}})} };`}})]})},E_=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.hasNextPage),[i,o]=e.useState(t.defaultItems),[a,s]=e.useState(!1),l=e.useCallback(()=>{s(!0)},[]),c=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,n=new Headers;window.envVariables?.apiAuthKey&&n.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getMostReadContents&variables=${encodeURIComponent(JSON.stringify({first:t.defaultVariablesForQuery.first,brandId:t.defaultVariablesForQuery.brandId,excludeModel:t.defaultVariablesForQuery.excludeModel,after:t.defaultVariablesForQuery.endCursor}))}`,options:{headers:n}}];try{const e=await Zo(...i),n=(({layout:e,pageEndpoint:t,imgEndpoint:n,data:r,lastNumber:i=0})=>Array.isArray(r)?[]:(r?.brand?.node?.publishableContents?.edges||[])?.reduce((r,o,a)=>{if(!(o?.node?.title&&o?.node?.label&&o?.node?.url&&o?.node?.published_at&&(o?.node?.medias||o?.node?.photo?.node)))return r;let s=o.node.medias??[];return"Story"===o?.node?.editorial_model&&o?.node?.photo?.node&&(s=Cx({photo:o.node.photo})),r.push({link:new URL(o.node.url,t).href,title:o.node.title,cardImageProps:{cover:Ex({medias:s,imgEndpoint:n})},cardHeaderProps:{headline:{text:o.node.label}},cardTitleProps:{cartridge:"Live"===o?.node?.editorial_model?"live":void 0},summaryProps:{children:o?.node?.lead??""},layout:e,cardNumber:{value:i+a+1,size:"medium"},viewCount:o?.node?.total_current_visits||0}),r},[]))({layout:window.layout,pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e,lastNumber:t.defaultVariablesForQuery.first});o(e=>[...e,...n||[]]),r(!1),to()}catch(e){console.error("20mn> Error while loading contents:",e)}},[t.defaultVariablesForQuery.brandId,t.defaultVariablesForQuery.endCursor,t.defaultVariablesForQuery.excludeModel,t.defaultVariablesForQuery.first]);return e.useEffect(()=>{a&&c()},[a,c]),e.useEffect(()=>{a&&s(!1)},[a]),e.useMemo(()=>({isLoading:a,items:i,hasNextPage:n,onLoadMore:l}),[a,i,n,l])},C_=({isSSR:t=!0,items:n,variablesForQuery:r,seeMoreButton:i})=>{const{isLoading:o,items:a,hasNextPage:s,onLoadMore:l}=E_({defaultItems:n,defaultVariablesForQuery:r});return e.useEffect(()=>{o||Sx()},[o]),an.jsxs(an.Fragment,{children:[an.jsx(vx,{items:a,seeMoreButton:s?{...i,disabled:o,onClick:l}:void 0}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({mainMostReadContainer:{items:a,variablesForQuery:r,seeMoreButton:i}})} };`}})]})},k_=t=>{const[n,r]=e.useState(t.defaultTabItems),i=e.useCallback(async()=>{if(t.variablesForQuery.rubric){const{apiHost:e}=document.body.dataset,n=new Headers;window.envVariables?.apiAuthKey&&n.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getMostRead&variables=${encodeURIComponent(JSON.stringify({brandId:t.variablesForQuery.brandId,sourceExcluded:t.variablesForQuery.sourceExcluded,rubricId:t.variablesForQuery.rubric.id}))}`,options:{headers:n}}];try{const e=(({data:e,pageEndpoint:t,imgEndpoint:n,rubricSlug:r,rubricLabel:i})=>{if(Array.isArray(e))return[];const o=[],a=e?.brand?.node,s=a?.commonArticles?.edges,l=a?.rubricArticles?.edges;if(s?.length){const e=s_({name:"plus-lus",title:"Les + lus",pageEndpoint:t,imgEndpoint:n,articleEdges:s,limit:5});o.push(e)}if(l?.length){const e=s_({name:`plus-lus-${r}`,title:`Les + lus ${i}`,pageEndpoint:t,imgEndpoint:n,articleEdges:l,limit:5});o.push(e)}return o})({data:await Zo(...i),pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,rubricSlug:t.variablesForQuery.rubric.slug,rubricLabel:t.variablesForQuery.rubric.label});r(e),qt()}catch(e){console.error("20mn> Error while loading tabItems:",e)}}},[t.variablesForQuery.brandId,t.variablesForQuery.rubric,t.variablesForQuery.sourceExcluded]);return e.useEffect(()=>{i(),bo()},[i]),e.useMemo(()=>({tabItems:n}),[n])},I_=({isSSR:e=!0,layout:t,tabItems:n,variablesForQuery:r,...i})=>{const{tabItems:o}=k_({defaultTabItems:n,variablesForQuery:r});return an.jsxs(an.Fragment,{children:[an.jsx(Ax,{layout:t,tabItems:o,variablesForQuery:r,...i}),e&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({mostReadContainer:{layout:t,tabItems:n,variablesForQuery:r,...i}})} };`}})]})},D_=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultMovies),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getMoviesData&variables=${encodeURIComponent(JSON.stringify({status:t.defaultVariablesForQuery.status,cursor:n,orderField:Ui.EXPECTATION_LEVEL,orderDirection:Vi.DESC}))}`,options:{headers:i}}];try{const e=await Zo(...a),{staticHost:t}=document.body.dataset,n=((e,t)=>Array.isArray(e)?[]:e?.movies?.edges?.map(e=>{const n=e?.node,r=n?.movieCastings?.edges?.find(e=>"Réalisateur"===e?.node?.position);return{link:n?.article_url||"#",title:n?.title_fr||"",cardImageProps:{cover:(n?.movieMedias?.edges?.length??0)>0?`${t}/movies/posters/${n?.movieMedias?.edges?.[0]?.node?.src?.replace("-%format","")??""}`:""},summary:n?.summary_short||"",castings:n?.movieCastings?.edges?.filter(e=>"cast"===e?.node?.type).map(e=>`${e?.node?.firstname} ${e?.node?.lastname}`)??[],genres:n?.genres?.filter(e=>null!==e)||[],directedBy:r?`${r?.node?.firstname} ${r?.node?.lastname}`:void 0,releaseDate:n?.release_date?ji(new Date(n.release_date)):"",seeMoreLink:{children:"Voir la fiche du film",href:n?.article_url||"#"}}})||[])(e,t);s(e=>[...e,...n||[]]),r(e?.movies?.pageInfo?.endCursor??null),o(e?.movies?.pageInfo?.hasNextPage??!1),to()}catch(e){console.error("20mn> Error while loading posts:",e)}},[n,t.defaultVariablesForQuery.status]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{l&&c(!1)},[l]),e.useMemo(()=>({isLoading:l,items:a,hasNextPage:i,onLoadMore:u}),[l,a,i,u])},T_=({isSSR:t=!0,layout:n,items:r,variablesForQuery:i,seeMoreButton:o})=>{const{isLoading:a,items:s,hasNextPage:l,onLoadMore:c}=D_({defaultMovies:r,defaultVariablesForQuery:i});return e.useEffect(()=>{a||Sx()},[a]),an.jsxs(an.Fragment,{children:[an.jsx(bx,{layout:n,items:s,seeMoreButton:l?{...o,disabled:a,onClick:c}:void 0}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({moviesListContainer:{layout:n,items:s,variablesForQuery:i,seeMoreButton:o}})} };`}})]})},N_=t=>{const[n,r]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback(()=>{c(!0)},[]),d=e.useCallback(async()=>{const{apiHost:e,staticHost:i}=document.body.dataset,l=new Headers;window.envVariables?.apiAuthKey&&l.append("auth-key",window.envVariables.apiAuthKey);const c=[{url:`${e}/?id=getTagArticlesWithCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,slug:t.defaultVariablesForQuery.slug,first:t.defaultVariablesForQuery.first,after:n}))}`,options:{headers:l}}];try{const e=await Zo(...c),t=(({pageEndpoint:e,imgEndpoint:t,staticEndpoint:n,data:r,layout:i})=>Fx({pageEndpoint:e,imgEndpoint:t,staticEndpoint:n,data:r,hasSummary:!0,layout:i}).map(e=>(delete e.socialBarProps,{...e,linkProps:{children:"Je participe","aria-label":"Je participe au quiz",href:e.link}})))({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,staticEndpoint:i||"",data:e,layout:window.layout}),n={articles:[...a,...t],endCursor:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.endCursor??null,hasNextPage:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.hasNextPage??!1};s(e=>[...e,...t]),r(n.endCursor),o(n.hasNextPage),to()}catch(e){console.error("20mn> Error while loading articles:",e)}},[a,n,t.defaultVariablesForQuery.brandId,t.defaultVariablesForQuery.first,t.defaultVariablesForQuery.slug]);return e.useEffect(()=>{l&&d()},[l,d]),e.useEffect(()=>{l&&c(!1)},[l]),e.useEffect(()=>{(()=>{const e=document.getElementById("quiz-container");if(!e)return;const t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(to(),t.unobserve(e.target))})}),n=e.querySelector(".card-item-1");n&&t.observe(n);const r=e.querySelector(".card-item-8");r&&t.observe(r);const i=e.querySelector(".card-item-16");i&&t.observe(i)})()},[]),e.useMemo(()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u}),[a,l,i,u])},L_=({isSSR:t=!0,layout:n,articles:r,variablesForQuery:i,seeMoreButton:o,currentPagePath:a,totalArticles:s})=>{const{isLoading:l,articles:c,hasNextPage:u,onLoadMore:d}=N_({defaultArticles:r,defaultVariablesForQuery:i});e.useEffect(()=>{l||Sx()},[l]);const h=c.map(e=>({...e,...e.cardImageProps&&{cardImageProps:{...e.cardImageProps,sizes:"(min-width: 1660px) 384px, (min-width: 1440px) calc(18vw + 89px), (min-width: 1080px) 320px, (min-width: 780px) calc(44.29vw - 149px), calc(50vw - 16px)"}}}));return an.jsxs(an.Fragment,{children:[an.jsx(wx,{layout:n,articles:h,seeMoreButton:u?{...o,disabled:l,onClick:d}:void 0,currentPagePath:a,totalArticles:s}),t&&an.jsx("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({quizContainer:{layout:n,articles:h,variablesForQuery:i,seeMoreButton:o}})} };`}})]})},B_=(e,n)=>{const r=document.getElementById(e),i=n?window?.__staticHydrationData?.liveImportantPostsContainer:window?.__staticHydrationData?.livePostsContainer,o=n?"liveImportantPostsContainer":"livePostsContainer";if(r&&i){const e=t.createRoot(r);e&&e.render(an.jsx(b_,{isSSR:!1,staticHydrationDataName:o,...i,posts:$i(i?.posts),variablesForQuery:i.variablesForQuery}))}},P_=(e,t,n,r)=>{n?e.setAttribute(t,"true"):e.setAttribute(t,"false")},O_=(e,t,n)=>{t?e.classList.add(n):e.classList.remove(n)},M_={"probleme-ordinateur":"Votre message. Veuillez préciser votre navigateur.","probleme-mobile":"Votre message. Veuillez préciser votre navigateur et l’appareil que vous utilisez.","probleme-app":"Votre message. Veuillez préciser l’appareil que vous utilisez."},j_={"suppression-anonymisation":"Dans votre message, merci d'indiquer votre objet, nom / prénom, adresse mail et adresse URL vers l'article concerné si besoin.",jeux:"Ecrivez votre message en précisant votre appareil, le navigateur utilisé ainsi que les jeux concernés.",newsletter:"Ecrivez votre message en précisant la date et/ou le nom de la newsletter concernée.",accessibility:"Ecrivez votre message en précisant si nécessaire la/les page(s) ou le/es composant(s) concernés."};function F_(e){return{serviceSelect:e.querySelector("select#service"),subServiceSelect:e.querySelector("select#subservice"),subService:e.querySelector("select#subservice")?.parentElement?.parentElement,commonObjectSelect:e.querySelector("select#common-object"),commonObject:e.querySelector("select#common-object")?.parentElement?.parentElement,techObjectSelect:e.querySelector("select#tech-object"),techObject:e.querySelector("select#tech-object")?.parentElement?.parentElement,contentInput:e.querySelector("textarea#message"),sourceSelect:e.querySelector("select#source"),source:e.querySelector("select#source")?.parentElement?.parentElement,gamesObjectSelect:e.querySelector("select#games-object"),gamesObject:e.querySelector("select#games-object")?.parentElement?.parentElement,subscriptionObjectSelect:e.querySelector("select#subscription-object"),subscriptionObject:e.querySelector("select#subscription-object")?.parentElement?.parentElement,emailInput:e.querySelector("input[type=email]"),messageInput:e.querySelector("textarea#message")}}const R_=(e,t,n)=>{const{subService:r,commonObject:i,techObject:o,gamesObject:a,subscriptionObject:s,source:l}=e,c="redaction"===t,u="service-technique"===t,d="jeux"===t,h="service-abonnement"===t;r&&(O_(r,n||!c,"u-mask"),P_(r,"aria-hidden",n||!c)),i&&(O_(i,n||!c,"u-mask"),P_(i,"aria-hidden",n||!c)),o&&(O_(o,n||!u,"u-mask"),P_(o,"aria-hidden",!u)),a&&(O_(a,n||!d,"u-mask"),P_(a,"aria-hidden",n||!d)),l&&(O_(l,n||!d,"u-mask"),P_(l,"aria-hidden",n||!d)),s&&(O_(s,n||!h,"u-mask"),P_(s,"aria-hidden",n||!h))},q_=(e,t)=>{e&&(P_(e,"required",t),P_(e,"aria-required",t))},z_=()=>{const e=document.querySelector("form#contact-form");if(!e)return;const t=F_(e),{serviceSelect:n,subServiceSelect:r,commonObjectSelect:i,techObjectSelect:o,gamesObjectSelect:a,subscriptionObjectSelect:s,sourceSelect:l,contentInput:c}=t,u=Boolean(n?.selectedOptions?.[0]?.hidden);R_(t,n?.selectedOptions?.[0]?.value??"",u),(()=>{const e=document.querySelector("form#contact-form");if(!e)return;const t=F_(e),{emailInput:n,messageInput:r,serviceSelect:i}=t;n?.addEventListener("blur",()=>{const e=document.querySelector("#email-error");e&&(n.checkValidity()?O_(e,!0,"u-mask"):O_(e,!1,"u-mask"))}),r?.addEventListener("blur",()=>{const e=document.querySelector("#message-error");e&&(""!==r.value?O_(e,!0,"u-mask"):O_(e,!1,"u-mask"))}),i?.addEventListener("blur",()=>{const e=document.querySelector("#service-error");e&&(i.checkValidity()?O_(e,!0,"u-mask"):O_(e,!1,"u-mask"))})})(),n?.addEventListener("change",e=>{const{target:n}=e;if(!(n instanceof HTMLSelectElement))return;const u=n.value,d="service-technique"===u,h="jeux"===u,p="redaction"===u,f="service-abonnement"===u;q_(r,p),q_(i,p),q_(o,d),q_(a,h),q_(s,f),q_(l,h),R_(t,u,Boolean(n.selectedOptions[0]?.hidden)),c&&c.setAttribute("placeholder",j_[u]??"Votre message.")}),o?.addEventListener("change",e=>{const{target:t}=e;t instanceof HTMLSelectElement&&c&&c.setAttribute("placeholder",M_[t.value]??"Votre message.")})};var H_=()=>{z_(),(()=>{const e=document.querySelector("form#contact-form");e&&e.addEventListener("submit",t=>{t.preventDefault();const n=new FormData(e),r=n.get("message")?.toString().trim(),i=n.get("email")?.toString().trim();let o=n.get("service")?.toString().trim();const a=n.get("subservice")?.toString().trim(),s=n.get("common-object")?.toString().trim(),l=n.get("tech-object")?.toString().trim(),c=n.get("games-object")?.toString().trim(),u=n.get("subscription-object")?.toString().trim(),d=n.get("source")?.toString().trim();if([!!i,!!o,!!r,!!("redaction"!==o||a&&s),!("service-technique"===o&&!l),!("jeux"===o&&!c&&!d),!("service-abonnement"===o&&!u)].includes(!1))return void alert("Tous les champs obligatoires doivent être remplis.");let h,p=null;const f=e=>{if(!e)return"";const t=document.querySelector(`option[value="${e}"]`);return t&&t instanceof HTMLOptionElement?t.text:""};switch(o){case"redaction":h=s,p=f(h),a&&(o=a);break;case"jeux":{h=c;const e=f(h);p=d?`${e} (source: ${d})`:e;break}case"service-technique":h=l,p=f(h);break;case"service-abonnement":h=u,p=f(h)}const m=document.querySelector("#li-antibot-token");if(!(m&&m instanceof HTMLInputElement))return void alert("Vous devez valider le captcha.");const g={antibotToken:m.value,service:o,email:i,message:r,object:p,objectId:h||null,accessSource:d?.includes("app-")?"apps":"site"},y=document.body.getAttribute("data-http-taskrunner-api-host");fetch(`${y}/contact`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}).then(e=>e.json()).then(e=>{e.success?(alert("Votre message a bien été envoyé à nos services."),window.location.reload()):alert("Merci de valider le captcha afin d'envoyer votre message.")}).catch(e=>{console.error("Error:",e)})})})()};var K_=()=>{(()=>{if(document.querySelector(".gcse-search")&&window.envVariables?.googleSearchCode)try{ko(_o.GOOGLE_SEARCH)}catch(e){e instanceof Error&&console.error(e.message)}})()};let U_,V_;const Q_=e=>{U_&&("show"===e?(U_.classList.remove("c-header-mini--is-hidden"),V_?.forEach(e=>{e.classList.add("c-menu--with-header-mini")}),document.body.setAttribute("header","mini")):(U_.classList.add("c-header-mini--is-hidden"),V_?.forEach(e=>{e.classList.remove("c-menu--with-header-mini")}),document.body.removeAttribute("header")))},W_=e=>{const t=e[0];U_&&(t.isIntersecting?Q_("hidden"):Q_("show"))};let G_,Z_,Y_;let J_=0;const $_=e=>{if(!G_)return;const t=document.querySelector("button.c-btn--close:not(.u-hidden)"),n=document.getElementById("live-refresh-button");if("show"===e)return G_.classList.remove("c-header-mobile--is-hidden"),t&&t.classList.add("c-btn--close-is-below-header"),void(n&&(n.classList.remove("u-sticky--spaced-top-screen"),n.classList.add("u-sticky--spaced-header-mobile")));G_.classList.add("c-header-mobile--is-hidden"),t&&t.classList.remove("c-btn--close-is-below-header"),n&&(n.classList.add("u-sticky--spaced-top-screen"),n.classList.remove("u-sticky--spaced-header-mobile"))},X_=e=>{Z_&&Y_&&("show"===e?(Z_.classList.remove("u-hidden"),Y_.classList.add("u-hidden")):(Z_.classList.add("u-hidden"),Y_.classList.remove("u-hidden")))},eS=()=>{G_=document.querySelector(".c-header-mobile"),Z_=document.querySelector(".js-header-btn-menu"),Y_=document.querySelector(".js-header-btn-back"),G_&&window.addEventListener("scroll",()=>{window.scrollY<780?($_("show"),Z_&&Y_&&X_("show")):(()=>{const e=window.scrollY;e>J_?($_("hidden"),J_=e):J_-e>100&&($_("show"),X_("hidden"),J_=e)})()})};let tS;const nS=document.querySelector("button.c-btn--close"),rS=document.querySelectorAll('div[id^="taboola-below-article"]'),iS="20px",oS="211px";let aS=0,sS=0;const lS=()=>{tS?.classList.remove("c-read-also-banner--is-hidden"),document.body.setAttribute("readalsobanner","show")},cS=()=>{tS?.classList.add("c-read-also-banner--is-hidden"),document.body.setAttribute("readalsobanner","hidden")},uS=e=>{const t=[];return rS.forEach((n,r)=>{const i=n.getBoundingClientRect(),{top:o,bottom:a}=i;"top"===e&&o<=180||"bottom"===e&&o<document.documentElement.clientHeight&&a>0?t[r]=!0:t[r]=!1}),!!t.find(e=>!0===e)},dS=(e,t)=>{const n=uS("bottom");"down"===t&&(n?(lS(),tS?.classList.remove("c-read-also-banner--is-fixed-below-header"),nS&&(nS.style.top="140px")):nS&&(nS.style.top=iS),sS=e),"up"===t&&sS-e>100&&(tS?.classList.add("c-read-also-banner--is-fixed-below-header"),n?(lS(),nS&&(nS.style.top=oS)):(cS(),nS&&(nS.style.top=e>780?"90px":"")),sS=e)},hS=(e=document.querySelector("div.c-read-also-banner"))=>{e&&(tS=e,cS(),setTimeout(()=>{tS?.classList.remove("u-hidden")},500),window.addEventListener("scroll",()=>{if(uS("top"))return void cS();const e=!!document.querySelector('body[data-layout="mobile"]'),t=(()=>{let e=null;return e=document.body.getBoundingClientRect().top>aS?"up":"down",aS=document.body.getBoundingClientRect().top,e})();e?dS(window.scrollY,t):((e,t)=>{const n=tS?.dataset.bannerLimitTop||"0";"up"===t&&-document.body.getBoundingClientRect().top>=parseInt(n,10)&&(lS(),nS&&(nS.style.top=oS)),("down"===t||-document.body.getBoundingClientRect().top<=parseInt(n,10))&&(cS(),nS&&(nS.style.top=e>780?iS:""))})(window.scrollY,t)}))},pS=()=>{const{refreshInterval:e}=document.body.dataset;Number(e)>0&&((e,t)=>{let n;const r=1e3*t,i=()=>{clearTimeout(n),n=setTimeout(e,r)};document.addEventListener("click",i),document.addEventListener("keypress",i),document.addEventListener("scroll",i),i()})(()=>{window.location.reload()},Number(e))};var fS=()=>{(()=>{const e=document.getElementById("js-refresh-button");e&&window?.location&&e.addEventListener("click",e=>{e.preventDefault(),window.location.reload()})})()};const mS=()=>{document.querySelectorAll(".c-skip-link").forEach(e=>{e.addEventListener("click",e=>{if(!(e.currentTarget instanceof HTMLAnchorElement))return;const t=e.currentTarget.getAttribute("href")?.substring(1),n=t?document.getElementById(t):null;n&&(n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),setTimeout(()=>{n.focus()},0))})})};qt(),Go(),window.lazyObservers={},window.lazyObservers.defaultObserver=new IntersectionObserver(_x,{rootMargin:"700px",threshold:0}),window.lazyObservers.instantObserver=new IntersectionObserver(_x,{rootMargin:"0px",threshold:0}),(window.lazyElementsToObserve||[]).forEach(e=>{xx(e)}),Sx(),(()=>{const e=Array.from(document.querySelectorAll('[data-script-loading="lazy"]'));e.length>0&&(e.forEach(e=>{const t=document.createElement("script");t.type="text/javascript",t.innerHTML=e.innerHTML.replace(/&quot;|&amp;/g,e=>"&quot;"===e?'"':"&"),t.innerHTML=t.innerHTML.replace(/&#x27;/g,"'"),e.after(t),e.remove()}),u_())})(),(()=>{const e=document.querySelector("div#dfp_header_ad"),t=document.querySelector("div#taboola-below-article-thumbnails");e&&t&&new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting?e.style.visibility="hidden":e.style.visibility="visible"})}).observe(t)})(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",mS):mS(),(()=>{const e=document.getElementById("data-preferences-switch");if(!(e&&e instanceof HTMLInputElement))return;const t=localStorage.getItem(Ht);if(null!==t){const n="true"===t;e.checked=n,Kt(e,n)}e.addEventListener("change",({target:e})=>{if(!(e instanceof HTMLInputElement))return;const{checked:t}=e;Kt(e,t),localStorage.setItem(Ht,t.toString()),localStorage.setItem(zt,"false"),t&&localStorage.setItem(zt,"true")})})(),fS(),wo(),So(),Jt(),(()=>{const e=document.getElementById("c-alert-info");if(e){const n=t.createRoot(e);n&&n.render(an.jsx(Kx,{}))}})(),(()=>{if(U_=document.querySelector(".c-header-mini"),U_){const e=document.documentElement.scrollTop,t=document.querySelector(".c-header");V_=document.querySelectorAll(".c-menu"),t&&(e>t.offsetHeight?Q_("show"):Q_("hidden"),new IntersectionObserver(W_,{threshold:[0],rootMargin:"0px 0px -100%"}).observe(t))}})(),(()=>{const e=document.getElementById("tabpanel-le-direct"),n=document.getElementById("live-refresh-button");if(e&&n){const e=t.createRoot(n);e&&e.render(an.jsx(w_,{}))}})(),pS(),K_(),Xo(),(()=>{try{"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{e.forEach(e=>{e.active?.scriptURL?.endsWith("/sw.js")&&e.unregister()})})}catch(e){console.error("Error while unregistering service worker:",e)}})(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({user_status:"{}"!==Li("20mnUserInfo")?"Connecte":"Pas connecte",an:document.referrer,referrer:document.referrer,darkmode:"dark"===document.documentElement.getAttribute("data-theme"),page_uri:window.datalayerInfo?.pageUri,page_type:window.datalayerInfo?.pageName}),eS(),hS(),(()=>{const e=document.querySelector(".c-header-page__print-button");e&&(window.addEventListener("beforeprint",e=>{e.preventDefault();const t=document.querySelector('div[data-test-id="modal-is-paused"]');t&&(t.style.display="none",window.addEventListener("afterprint",()=>{t.style.display="flex"}))}),e.addEventListener("click",()=>{window.print()}))})(),$t(),yo(),(()=>{const e=document.getElementById("archive-pdf-list-container"),n=window?.__staticHydrationData?.archivePdfListContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(Px,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("article-list-bottom-container"),n=window?.__staticHydrationData?.articleListBottomContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(qx,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("journalist-article-list-container"),n=window?.__staticHydrationData?.journalistArticleListContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(Jx,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("home-legal-notice-list-container"),n=window?.__staticHydrationData?.legalNoticeHomeContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(a_,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("department-legal-notice-list-container"),n=window?.__staticHydrationData?.legalNoticeDepartmentContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(o_,{isSSR:!1,...n}))}})(),B_("tabpanel-le-direct"),B_("tabpanel-temps-forts",!0),(()=>{const e=document.getElementById("local-news-container"),n=window?.__staticHydrationData?.localNewsContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(S_,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("latest-articles-container"),n=window?.__staticHydrationData?.latestArticlesContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(e_,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("live-and-most-read-container"),n=window?.__staticHydrationData?.liveAndMostReadContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(c_,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("most-read-container"),n=window?.__staticHydrationData?.mostReadContainer;if(e&&n&&n.variablesForQuery?.builtAt&&n.variablesForQuery.builtAt+36e5<Date.now()){const r=t.createRoot(e);r&&r.render(an.jsx(I_,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("latest-contents-carousel-container"),n=window?.__staticHydrationData?.latestContentsCarouselContainer;if(e&&n&&n.variablesForQuery?.builtAt&&n.variablesForQuery.builtAt+36e5<Date.now()){const r=t.createRoot(e);r&&r.render(an.jsx(n_,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("elections-form-container"),n=window?.__staticHydrationData?.electionsSearchBannerContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(ox,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("elections-departments-map-container"),n=window?.__staticHydrationData?.electionsDepartmentsMapContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(Wx,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("elections-european-map-container"),n=window?.__staticHydrationData?.electionsEuropeanMapContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(Gx,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("elections-towns-by-departments-map-container"),n=window?.__staticHydrationData?.electionsMapTownsByDepartmentsContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(Zx,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("elections-constituencies-map-container"),n=window?.__staticHydrationData?.electionsConstituenciesMapContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(Qx,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("movies-container"),n=window?.__staticHydrationData?.moviesListContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(T_,{...n,isSSR:!1}))}})(),(()=>{const e=document.getElementById("main-most-read-container"),n=window?.__staticHydrationData?.mainMostReadContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(C_,{...n,isSSR:!1}))}})(),(()=>{const e=document.getElementById("quiz-container"),n=window?.__staticHydrationData?.quizContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(L_,{isSSR:!1,...n}))}})(),(()=>{const e=document.getElementById("tv-tab-replays"),n=window?.__staticHydrationData?.replaysTvExtractsAndReplaysContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(Dx,{name:"replays",isSSR:!1,...n}))}const r=document.getElementById("tv-tab-extraits"),i=window?.__staticHydrationData?.extraitsTvExtractsAndReplaysContainer;if(r&&i){const e=t.createRoot(r);e&&e.render(an.jsx(Dx,{name:"extraits",isSSR:!1,...i}))}})(),(()=>{const e=document.getElementById("elections-ia-articles-container"),n=window?.__staticHydrationData?.electionsAiArticlesContainer;if(e&&n){const r=t.createRoot(e);r&&r.render(an.jsx(Vx,{isSSR:!1,...n}))}})(),(()=>{if(!document.querySelector("#contact-form"))return;const e=document.body.getAttribute("data-http-taskrunner-api-host"),t=window.sessionStorage.getItem("antibotId")||"";e?fetch(`${e}/captcha`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({antibotId:t})}).then(e=>e.json()).then(e=>{if(!e)return;const{captchaServerAntibotId:t,requestId:n}=e.body||{};t&&n&&(window.LI_ANTIBOT.loadAntibot(["IMAGE","QUESTION","FR","abuUFfA+tOvM","https://captcha.liveidentity.com/captcha",null,"https://static.20mn.fr/apps/20minutes/styles/captcha-override.css",t,n,!0]),window.sessionStorage.setItem("antibotId",t))}).catch(e=>{console.error("Error:",e)}):console.error("Error: goomUri is not defined")})(),H_(),(()=>{if(!new URLSearchParams(document.location.search).has("comment_id"))return;const e=document.getElementById("commentAnchor");e&&e.scrollIntoView({behavior:"smooth",block:"start"})})(),To(),No(),Io(),Lo(),Wo(),Bo(),(()=>{const e=new Set(["tempo","consommation","guide-achat"]);(window?.datalayerInfo?.pageKey&&["tempo","consommation","guide-achat"].includes(window.datalayerInfo.pageKey)||window?.datalayerInfo?.tagsSlug&&window.datalayerInfo.tagsSlug.split("|").some(t=>e.has(t)))&&(window.LemrockConfig={publisherToken:"pub_zdOhXg0Dx235QqM4-32IaKgsDxfV5dGrob1j6vCKneTSde1dOPyYP80LxR1MNUinqSH1lffsGpsWUFEmxHuz6A"})})()}(React,ReactDOMClient);
30
30
  //# sourceMappingURL=main.min.js.map