@20minutes/tyr 2.48.4 → 2.48.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -71981,27 +71981,30 @@ var gC = () => {
71981
71981
  }), t.toString();
71982
71982
  }
71983
71983
  }, hD = ({ htmlTemplateProps: e, header: t, headerMini: n, overviewBar: r, menu: i, toolbar: a, footer: o, breadcrumb: s, headerPage: c, articlesListTop: l, newsCarousel: u, articlesListBottom: d, brandPublishingArticleBottom: f }) => {
71984
- let p = fD(e.firstPartyScripts.datalayerInfo?.parentTagSlug || ""), m = new mD({
71984
+ let p = e.firstPartyScripts?.datalayerInfo?.pageUri?.includes("/actu-generale/economie/mondial-de-l-automobile") || e.firstPartyScripts?.datalayerInfo?.pageUri?.includes("/mondial_de_l_automobile") ? {
71985
+ ...e,
71986
+ inlineCss: [e.inlineCss, ":root { --color-primary-ultramarine: #F04924; --color-primary-ultramarine-light: #F04924; }"].filter(Boolean).join("\n")
71987
+ } : e, m = fD(e.firstPartyScripts.datalayerInfo?.parentTagSlug || ""), h = new mD({
71985
71988
  data: {
71986
71989
  articlesListTop: l,
71987
71990
  htmlTemplateProps: e
71988
71991
  },
71989
71992
  layout: e.layout,
71990
- adsPageConfig: p
71991
- }).resolve(), h = new _w({
71993
+ adsPageConfig: m
71994
+ }).resolve(), g = new _w({
71992
71995
  layout: e.layout,
71993
- config: p,
71994
- adsEnabled: m.templateActivators.enableAds
71996
+ config: m,
71997
+ adsEnabled: h.templateActivators.enableAds
71995
71998
  });
71996
71999
  return /* @__PURE__ */ (0, y.jsxs)(yw, {
71997
- adTopPage: e.layout === H.DESKTOP && m.templateActivators.enableAds || m.templateActivators.enableHeaderAd ? h.renderAd("topPage") : null,
72000
+ adTopPage: e.layout === H.DESKTOP && h.templateActivators.enableAds || h.templateActivators.enableHeaderAd ? g.renderAd("topPage") : null,
71998
72001
  header: t,
71999
72002
  headerMini: n,
72000
72003
  overviewBar: r,
72001
72004
  menu: i,
72002
72005
  toolbar: a,
72003
72006
  footer: o,
72004
- htmlTemplateProps: e,
72007
+ htmlTemplateProps: p,
72005
72008
  children: [
72006
72009
  /* @__PURE__ */ (0, y.jsxs)(z, {
72007
72010
  as: "article",
@@ -72009,7 +72012,7 @@ var gC = () => {
72009
72012
  bg: "grey-50",
72010
72013
  children: [s, c]
72011
72014
  }),
72012
- m.content.articlesListTop,
72015
+ h.content.articlesListTop,
72013
72016
  !iE(u) && /* @__PURE__ */ (0, y.jsx)(z, {
72014
72017
  as: "article",
72015
72018
  className: "o-page-wrap u-arch-shadow",
@@ -72017,7 +72020,7 @@ var gC = () => {
72017
72020
  bg: "grey-50",
72018
72021
  children: u
72019
72022
  }),
72020
- m.templateActivators.enableVideoFeed && /* @__PURE__ */ (0, y.jsxs)(z, {
72023
+ h.templateActivators.enableVideoFeed && /* @__PURE__ */ (0, y.jsxs)(z, {
72021
72024
  as: "section",
72022
72025
  ...e.layout === H.DESKTOP ? { className: "o-page-wrap" } : { ml: "m" },
72023
72026
  py: "xxl",
@@ -72050,9 +72053,9 @@ var gC = () => {
72050
72053
  children: d
72051
72054
  }), /* @__PURE__ */ (0, y.jsx)("aside", {
72052
72055
  className: "o-lt-show__aside",
72053
- children: e.layout === H.DESKTOP ? /* @__PURE__ */ (0, y.jsxs)(y.Fragment, { children: [f, h.renderAd("stickyAsideBottom")] }) : h.renderAd("aboveFooter")
72056
+ children: e.layout === H.DESKTOP ? /* @__PURE__ */ (0, y.jsxs)(y.Fragment, { children: [f, g.renderAd("stickyAsideBottom")] }) : g.renderAd("aboveFooter")
72054
72057
  })]
72055
- }), h.renderAd("banBottom")]
72058
+ }), g.renderAd("banBottom")]
72056
72059
  })
72057
72060
  ]
72058
72061
  });
@@ -89,7 +89,7 @@ var t=Qi(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object
89
89
  <path fill="currentColor" d="M3 19.8c-1.7 0-3-1.4-3-3.2V9.9c0-1.7 1.3-3.2 3-3.2s3 1.4 3 3.2v6.7c0 1.7-1.3 3.2-3 3.2M3 8.2c-.9 0-1.5.9-1.5 1.7v6.7c0 .8.6 1.7 1.5 1.7s1.5-.9 1.5-1.7V9.9c0-.8-.6-1.7-1.5-1.7M14.7.5c-.3 0-.6.1-.9.4L8.3 6.4c-.4.3-.5.8-.5 1.2v10c0 1 .8 1.8 1.8 1.8h9c.7 0 1.3-.4 1.6-1.1l3.3-7.6c.4-.9.3-1.8-.2-2.6S21.9 6.9 21 6.9h-6L16 2c.1-.4 0-.8-.3-1.1-.4-.3-.7-.4-1-.4m4 17.4H9.3V7.5l5-5L13 8.4h7.8c.6 0 .9.4 1 .6.2.4.3.8.1 1.2z"></path>
90
90
  </svg>
91
91
  </span>
92
- `}},d=e=>{let t=e.getAttribute(`data-content-id`);if(!t)return;let n=Q(t);if(!n)return;e.setAttribute(`data-user-reaction`,n.type),e.setAttribute(`data-user-reaction-id`,n.id),u(e,n.type);let r=Number.parseInt(e.getAttribute(`data-content-${n.type}`)||`0`,10);e.setAttribute(`data-content-${n.type}`,String(r+1));let i=e.querySelector(`.c-react-button__count`);if(i){let e=Number.parseInt(i.textContent||`0`,10);i.textContent=String(e+1)}let a=e.querySelector(`.c-icon-item__count`);if(a){let e=Number.parseInt(a.textContent||`0`,10);a.textContent=String(e+1)}},f=t=>{let r=t.getBoundingClientRect(),i=t.getAttribute(`data-placement`)||`right`,a=e.getBoundingClientRect();if(i===`top`){let t=r.top-a.height-10,i=r.left+r.width/2,o=t<24,s=i-a.width/2<24,c=i+a.width/2>window.innerWidth-24;o?e.style.top=`24px`:e.style.top=`${t}px`,n?(e.style.left=`50%`,e.style.transform=`translateX(-50%)`):s?(e.style.left=`24px`,e.style.transform=`translateX(0)`):c?(e.style.left=`${window.innerWidth-24}px`,e.style.transform=`translateX(-100%)`):(e.style.left=`${i}px`,e.style.transform=`translateX(-50%)`)}else{let t=r.right+18,i=t+a.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%)`)}},p=e=>{let t=[];Vs.forEach(n=>{let 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})});let n=t.filter(({count:e})=>e>0),r=t.reduce((e,{count:t})=>e+t,0),i=e.querySelector(`.c-react-button__count`);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`)}),n.length!==0&&[...n].sort((e,t)=>t.count-e.count).slice(0,2).forEach(({element:e})=>{e.classList.add(`c-react-button__list-item--show`)})},m=t=>{let n=Object.values(Bs),r=t.getAttribute(`data-user-reaction`);n.forEach(n=>{let i=t.getAttribute(`data-content-${n}`);if(!i)return;let a=e.querySelector(`[data-reaction-id="${n}"]`);if(!a)return;let o=a.querySelector(`.c-emoji-toolbar__count`);o&&(o.textContent=String(i).padStart(2,`0`)),r===n?a.classList.add(`c-emoji-toolbar__button--is-active`):a.classList.remove(`c-emoji-toolbar__button--is-active`)})},h=(e,t,n)=>{let r=Q(t),i=0;ac.forEach(t=>{let a=oc(n[t]);r?.type===t&&(a+=1),e.setAttribute(`data-content-${t}`,String(a)),i+=a});let a=String(i),o=e.querySelector(`.c-react-button__count`);o&&(o.textContent=a);let s=e.querySelector(`.c-icon-item__count`);s&&(s.textContent=a),p(e),m(e)},g=(t,n,a,o)=>{let s=a===-1,c=!s&&o!==null&&o!==n,l=(n,a)=>{if(!i||r!==t)return;let o=e.querySelector(`[data-reaction-id="${n}"]`);if(!o)return;let s=o.querySelector(`.c-emoji-toolbar__count`);if(s){let e=Number.parseInt(s.textContent||`0`,10);s.textContent=String(Math.max(0,e+a)).padStart(2,`0`)}};l(n,a);let d=t.getAttribute(`data-content-${n}`),f=Number.parseInt(d||`0`,10);if(t.setAttribute(`data-content-${n}`,String(Math.max(0,f+a))),c&&o){l(o,-1);let n=t.getAttribute(`data-content-${o}`),a=Number.parseInt(n||`0`,10);t.setAttribute(`data-content-${o}`,String(Math.max(0,a-1))),i&&r===t&&e.querySelector(`[data-reaction-id="${o}"]`)?.classList.remove(`c-emoji-toolbar__button--is-active`)}else if(!c){let e=t.querySelector(`.c-icon-item__count`);if(e){let t=Number.parseInt(e.textContent||`0`,10);e.textContent=String(Math.max(0,t+a))}let n=t.querySelector(`.c-react-button__count`);if(n){let e=Number.parseInt(n.textContent||`0`,10);n.textContent=String(Math.max(0,e+a))}}s?(i&&r===t&&e.querySelector(`[data-reaction-id="${n}"]`)?.classList.remove(`c-emoji-toolbar__button--is-active`),t.removeAttribute(`data-user-reaction`),t.removeAttribute(`data-user-reaction-id`),u(t,null)):(i&&r===t&&(e.querySelectorAll(`[data-reaction-id]`).forEach(e=>{e.classList.remove(`c-emoji-toolbar__button--is-active`)}),e.querySelector(`[data-reaction-id="${n}"]`)?.classList.add(`c-emoji-toolbar__button--is-active`)),t.setAttribute(`data-user-reaction`,n),u(t,n))},_=async(e,t,n,{isRemoving:r,previousUserReaction:i,existingReactionId:a,editorialModel:o})=>{try{if(r){a?await vc(a)?fc(t):console.error(`Failed to delete reaction`):fc(t);return}if(i&&a){let r=await _c(a,n,o);r.id?(dc(t,a,n),r.reactionCounts&&h(e,t,r.reactionCounts)):console.error(`Failed to update reaction`);return}let s=await gc(t,o,n);if(s.id){if(!e.getAttribute(`data-user-reaction`)){await vc(s.id);return}e.setAttribute(`data-user-reaction-id`,s.id),dc(t,s.id,n),s.reactionCounts&&h(e,t,s.reactionCounts)}else console.error(`Failed to create reaction`)}catch(e){console.error(`Error executing reaction mutation:`,e)}},v=(e,t,n)=>{let r=e.getAttribute(`data-content-id`);if(!r){console.error(`Missing editorial content information for reaction`);return}let i=l(e),a=e.getAttribute(`data-user-reaction-id`),o=e.getAttribute(`data-user-reaction`);g(e,t,n?-1:1,o),p(e),_(e,r,t,{isRemoving:n,previousUserReaction:o,existingReactionId:a,editorialModel:i}).catch(e=>{console.error(`Unexpected error in reaction API call:`,e)})},y=e=>{let t=e.getAttribute(`data-user-reaction`);t?v(e,t,!0):v(e,`up`,!1)},b=t=>{if(!(i&&r===t)&&(o(),Z({name:`reaction`,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_engagement:1}}),r=t,e.style.display=`flex`,f(t),m(t),S(r.getAttribute(`data-content-id`)),i=!0,!t.getAttribute(`data-user-reaction`))){let e=t.getAttribute(`data-content-id`);e&&yc(e,`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),m(t))}).catch(e=>{console.error(`Error fetching user reaction:`,e)})}},x=(e,t,n)=>{r&&g(r,e,t,n)},S=t=>{t?(e.querySelectorAll(`[data-reaction-id]`).forEach(e=>{let 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;let n=e.getAttribute(`data-reaction-id`);if(!n)return;let i=l(r),a=r.getAttribute(`data-user-reaction-id`),o=e.classList.contains(`c-emoji-toolbar__button--is-active`),c=r.getAttribute(`data-user-reaction`);Z({name:n,type:`action`,customProps:{cta_context:`toolbar_react`,cta_type:`icon`,cta_engagement:2}}),x(n,o?-1:1,c),p(r);let u=r,d=t;s(),_(u,d,n,{isRemoving:o,previousUserReaction:c,existingReactionId:a,editorialModel:i}).catch(e=>{console.error(`Unexpected error in reaction API call:`,e)})})})):console.error(`Missing editorial content information for reaction`)},C=e=>{if(t.has(e))return;t.add(e),d(e);let a=e.getAttribute(`data-user-reaction`);a&&u(e,a),p(e);let s=e.querySelector(`.c-react-button__icon`);if(!s)return;let l=null,f=null,m=!1,h=()=>{l!==null&&(clearTimeout(l),l=null)},g=()=>{f!==null&&(clearTimeout(f),f=null)},_=()=>{Z({name:`reaction`,type:`action`,customProps:{cta_context:`react_button`,cta_type:`icon`,cta_engagement:1}})},v=()=>{h(),_(),y(e)};n?(s.addEventListener(`touchstart`,()=>{m=!1,g(),f=setTimeout(()=>{m=!0,b(e)},500)},{passive:!0}),s.addEventListener(`touchmove`,g),s.addEventListener(`touchend`,g),s.addEventListener(`touchcancel`,g),s.addEventListener(`click`,e=>{m?(e.preventDefault(),m=!1):v()})):(s.addEventListener(`click`,v),e.addEventListener(`mouseenter`,()=>{i&&o()}),e.addEventListener(`mouseleave`,()=>{i&&r===e&&c()}),s.addEventListener(`mouseenter`,()=>{i&&r===e||(l=setTimeout(()=>{b(e)},300))}),s.addEventListener(`mouseleave`,h))};n||(e.addEventListener(`mouseenter`,o),e.addEventListener(`mouseleave`,()=>{i&&c()})),document.querySelectorAll(`.mbrs-social-react-container`).forEach(C),new MutationObserver(e=>{e.forEach(e=>{Array.from(e.addedNodes).forEach(e=>{e instanceof HTMLElement&&(e.matches(`.mbrs-social-react-container`)&&C(e),e.querySelectorAll(`.mbrs-social-react-container`).forEach(C))})})}).observe(document.body,{childList:!0,subtree:!0}),window.addEventListener(`scroll`,()=>{i&&r&&f(r)}),document.addEventListener(`click`,({target:t})=>{t instanceof HTMLElement&&i&&!e.contains(t)&&!t.closest(`.mbrs-social-react-container`)&&s()})},xc=e=>e instanceof HTMLAnchorElement?e.href:e instanceof Element&&e.closest(`a`)?.href||``,Sc=()=>{window.datalayerInfo?.subType===`guide-achat`&&document.querySelectorAll(`.c-content a.c-btn`).forEach(e=>{e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault(),Z({name:`affiliation`,type:`action`,chapter1:`guide_achat`}),e.target instanceof HTMLAnchorElement&&(window.location.href=e.target.href)})})},Cc=()=>{let e=document.querySelector(`.c-social-bar a[href="#mbrs-comments-container"]`);e&&e.addEventListener(`click`,()=>{Z({name:`content_comments`,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_engagement:3}})});let t=document.getElementById(`mbrs-social-comment-container`);t&&t.addEventListener(`click`,()=>{Z({name:`content_comments`,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_engagement:3}})})},wc=()=>{let e=document.querySelector(`.c-social-bar div.mbrs-social-report-container`);e&&e.addEventListener(`click`,()=>{Z({name:`content_correction`,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_engagement:3}})})},Tc=()=>{let e=document.querySelector(`.c-social-bar div[data-event-name="mbrs-social-save-content"]`);e&&e.addEventListener(`click`,()=>{Z({name:`save_content`,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_engagement:3}})})},Ec=()=>{document.querySelectorAll(`.c-overview-bar__article a`).forEach(e=>{e.addEventListener(`click`,e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),Z({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)})})},Dc=()=>{let e=document.getElementById(`footer-recrutement-link`);e&&e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault(),Z({name:`recrutement`,type:`action`}),e.target instanceof HTMLAnchorElement&&(window.location.href=e.target.href)})},Oc=()=>{let e=(e,t,n)=>{let r=xc(n.target);r&&(n.stopPropagation(),n.preventDefault(),Z({name:t,type:`action`,customProps:{cta_context:`header`,cta_type:`button`,cta_destination:r,cta_engagement:1}}),e.target===`_blank`?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)})}})},kc=()=>{let 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(),Z({name:e,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_destination:e===`home`?window.location.href:n,cta_engagement:1}}),window.location.href=n)};document.querySelectorAll(`.c-toolbar a`).forEach(t=>{let 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)})}});let t=document.querySelector(`.c-toolbar div[aria-label="Voir les articles vidéo"] a`);t&&t.addEventListener(`click`,()=>{Z({name:`video_feed`,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_destination:window.location.href,cta_engagement:1}})})},Ac=()=>{let 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(),Z({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)})}})},jc=()=>{[{name:`games`,id:`#entertainment-item-game`},{name:`horoscope`,id:`#entertainment-item-horoscope`}].forEach(e=>{let t=document.querySelector(e.id);t&&t instanceof HTMLAnchorElement&&t.addEventListener(`click`,n=>{n.stopPropagation(),n.preventDefault(),Z({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})})},Mc=()=>{let e=document.querySelector(`article.c-card-large a`);window.layout===`mobile`&&(e=document.querySelector(`article.c-card-extra-large a`)),e&&e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`headline_content`,type:`action`,customProps:{cta_context:`home`,cta_type:`card`,cta_destination:t,cta_engagement:1}}),window.location.href=t})},Nc=()=>{document.querySelectorAll(`div.c-sub-menu__right a`).forEach(e=>{e.addEventListener(`click`,e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),Z({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)})})},Pc=()=>{let e=document.getElementById(`tab-resume`);e&&e.addEventListener(`click`,()=>{Z({name:`context`,type:`action`,customProps:{cta_context:`content`,cta_type:`link`,cta_destination:window.location.href,cta_engagement:1},chapter1:`live`})});let t=document.getElementById(`tab-temps-forts`);t&&t.addEventListener(`click`,()=>{Z({name:`highlights`,type:`action`,customProps:{cta_context:`content`,cta_type:`link`,cta_destination:window.location.href,cta_engagement:1},chapter1:`live`})})},Fc=()=>{window.datalayerInfo?.pageName===`home`&&document.querySelectorAll(`#tabpanel-le-direct article.c-card-container a`).forEach(e=>{e.addEventListener(`click`,e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),Z({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)})})},Ic=()=>{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();let t=xc(e.target);Z({name:`comment_content`,type:`action`,customProps:{cta_context:window.datalayerInfo?.pageName===`home`?`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`,()=>{Z({name:`save_content`,type:`action`,customProps:{cta_context:window.datalayerInfo?.pageName===`home`?`home`:`tag`,cta_type:`icon`,cta_destination:window.location.href,cta_engagement:3}})})}))},Lc=()=>{document.querySelectorAll(`div.c-read-also-banner a`).forEach(e=>{e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({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})})},Rc=()=>{window.layout===`desktop`&&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(),Z({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)})})},zc=()=>{window.datalayerInfo?.pageName===`home`&&document.querySelectorAll(`div#local-news-container div.c-card-container a`).forEach(e=>{e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`local_news_content`,type:`action`,customProps:{cta_context:`home`,cta_type:`card`,cta_destination:t,cta_engagement:1}}),window.location.href=t})})},Bc=()=>{window.datalayerInfo?.pageName===`home`&&document.querySelectorAll(`.c-carousel__movies--in-long-list a`).forEach(e=>{e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target),n=e.target instanceof Element&&e.target.closest(`section.c-carousel`)?.querySelector(`h2`)?.textContent||``,r=``;switch(n){case`On regarde quoi ce soir ?`:r=`program_tv_content`;break;default:r=`cinema_content`}Z({name:r,type:`action`,customProps:{cta_context:`home`,cta_type:`card`,cta_destination:t,cta_engagement:1}}),window.location.href=t})})},Vc=()=>{window.datalayerInfo?.pageName===`article`&&document.querySelectorAll(`footer article a`).forEach(e=>{e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`read_also`,type:`action`,customProps:{cta_context:`content`,cta_type:`card`,cta_destination:t,cta_engagement:2}}),window.location.href=t})})},Hc=()=>{if(window.datalayerInfo?.pageName&&[`game`,`gamehome`].includes(window.datalayerInfo?.pageName)){let e=document.querySelectorAll(`main#page-wrap div.c-collapse__content a`);window.layout===`desktop`&&(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),Z({name:`view_all_games`,type:`action`,customProps:{cta_context:`home_game`,cta_type:`link`,cta_destination:t,cta_engagement:1}}),window.location.href=t})})}},Uc=()=>{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();let t=xc(e.target);Z({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})})},Wc=()=>{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();let t=xc(e.target);Z({name:`logo`,type:`action`,customProps:{cta_context:`header`,cta_type:`image`,cta_destination:t,cta_engagement:1}}),window.location.href=t})})},Gc=()=>{let e=document.querySelector(`.c-btn--ghost:not(.u-hidden)[data-a11y-dialog-show="dialog-menu"]`);e&&e.addEventListener(`click`,()=>{Z({name:`menu`,type:`action`,customProps:{cta_context:`header`,cta_type:`button`,cta_destination:window.location.href,cta_engagement:1}})})},Kc=()=>{let e=document.querySelector(`ul.c-header__links-container li:first-child a`);e&&e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`house`,type:`action`,customProps:{cta_context:`header`,cta_type:`icon`,cta_destination:`/`,cta_engagement:1}}),window.location.href=t})},qc=()=>{if(window.layout!==`mobile`)return;let e=document.querySelector(`a.js-header-btn-back`);e&&e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`back`,type:`action`,customProps:{cta_context:`header`,cta_type:`icon`,cta_destination:t,cta_engagement:1}}),window.location.href=t})},Jc=()=>{window.datalayerInfo?.pageName===`home`&&document.querySelectorAll(`.c-vertical-timeline a`).forEach(e=>{e.addEventListener(`click`,e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),Z({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)})})},Yc=()=>{let e=document.querySelector(`a.c-tiles--has-advent-bg`);e&&e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`advent-calendar`,type:`action`,customProps:{cta_context:`menu`,cta_type:`button`,cta_destination:t,cta_engagement:2}}),window.location.href=t})},Xc=()=>{if(window.datalayerInfo?.pageName!==`home`)return;let e=document.querySelector(`div.c-scroll-to-top button`);e&&e.addEventListener(`click`,()=>{Z({name:`scroll_to_top`,type:`action`,customProps:{cta_context:`home`,cta_type:`button`,cta_destination:window.location.href,cta_engagement:1}})})},Zc=()=>{if(window.datalayerInfo?.pageName===`rewind`){let e=document.querySelector(`#page-wrap a[href*="/rewind/2025"]`);e&&e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`rewind_2025`,type:`action`,customProps:{cta_context:`my_rewinds`,cta_type:`card`,cta_destination:t,cta_engagement:2}}),window.location.href=t})}let e=document.querySelector(`div.c-header a[href*="/rewind/2025"]`);e&&e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`rewind`,type:`action`,customProps:{cta_context:`header`,cta_type:`icon`,cta_destination:t,cta_engagement:2}}),window.location.href=t});let t=document.querySelector(`#dialog-menu a[href*="/rewind/2025"]`);t&&t.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`rewind`,type:`action`,customProps:{cta_context:`menu`,cta_type:`banner`,cta_destination:t,cta_engagement:2}}),window.location.href=t})},Qc=()=>{let 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`,()=>{Z({name:`ai`,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_engagement:2}})}),t&&t.addEventListener(`click`,()=>{Z({name:`ai`,type:`action`,customProps:{cta_context:`content`,cta_type:`button`,cta_destination:window.location.href,cta_engagement:1}})}),n&&n.addEventListener(`click`,()=>{Z({name:`ai`,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_engagement:2}})})},$c=()=>{if(window.datalayerInfo?.pageName!==`home`)return;let e=(e,t)=>{e?.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let n=xc(e.target);Z({name:t,type:`action`,customProps:{cta_context:`home`,cta_type:`card`,cta_destination:n,cta_engagement:1}}),window.location.href=n})};if(window.layout===`mobile`){let t=document.getElementById(`dfp_nfb_2`)?.previousElementSibling,n=document.getElementById(`dfp_nfb_3`)?.previousElementSibling;e(t?.querySelector(`.card-item-6`)??void 0,`card_6`),e(n?.querySelector(`.card-item-7`)??void 0,`card_17`),e(n?.querySelector(`.card-item-8`)??void 0,`card_18`);return}let t=document.getElementById(`dfp_pave_atf`)?.closest(`.o-lt-show`),n=document.getElementById(`dfp_pave_btf`)?.closest(`.o-lt-show`),r=t?.querySelector(`.o-lt-show__main .card-item-5`),i=n?.querySelectorAll(`.o-lt-show__main .c-card-extra-small`);e(r??void 0,`card_6`),e(i?.[4],`card_17`),e(i?.[5],`card_18`)},el=()=>{document.querySelectorAll(`a.js-google-source, a.js-open-in-app`).forEach(e=>{e.addEventListener(`click`,()=>{let t=e.classList.contains(`js-open-in-app`)?`read_app`:e.dataset.googleSource===`discover`?`follow_google_discover`:`add_favorite`;Z({name:t,type:`action`,customProps:{cta_context:`content`,cta_type:`button`,cta_destination:e.href,cta_engagement:2}})})})};var tl=()=>{Sc(),Vc(),Yc(),qc(),Gc(),Qc(),el(),Hc(),Mc(),Ic(),$c(),Bc(),jc(),Kc(),Fc(),Pc(),Jc(),zc(),Wc(),Oc(),Uc(),Ec(),Lc(),Dc(),Zc(),Rc(),Xc(),Cc(),wc(),Tc(),Nc(),kc(),Ac()};let nl=/* @__PURE__ */ function(e){return e.AD_IFRAME=`adiframe`,e.ANIMAL_QUIZ=`animalquiz`,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.ELECTIONS_AI_ARTICLES=`electionsaiarticles`,e.ELECTIONS_EMBED=`electionsembed`,e.ELECTIONSHOME=`electionshome`,e.ERROR=`error`,e.EXT_TEFAL=`exttefal`,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.QUIZ=`quiz`,e.REWIND=`rewind`,e.SEARCH=`search`,e.SECTION=`section`,e.SERVICE=`service`,e.SHOPPING_GUIDE=`shoppingguide`,e.SITEMAP=`sitemap`,e.SPORT=`sport`,e.STATIC=`static`,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.UTIQ=`utiq`,e.WEATHER=`weather`,e.WHY_CREATE_ACCOUNT=`whycreateaccount`,e}({});new Set(Object.values(nl));let rl=()=>{let e=document.getElementById(`dialog-comment`);if(e&&window.layout===`mobile`){let{datalayerInfo:t={}}=window;e.addEventListener(`show`,()=>{$s({name:`${t?.contentId}_${t?.contentTitle}`,chapter1:`commentaires`})})}},il=()=>{let e=document.getElementById(`dialog-menu`);e&&window.layout===`mobile`&&e.addEventListener(`show`,()=>{$s({name:`menu`,chapter1:`menu`,chapter2:``})})},al=()=>{let e=document.getElementById(`article-list-bottom-container`);if(!e)return;let t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&($s(),t.unobserve(e.target))})}),n=e.querySelector(`.card-item-1`);n&&t.observe(n);let r=e.querySelector(`.card-item-8`);r&&t.observe(r);let i=e.querySelector(`.card-item-16`);i&&t.observe(i)},ol=()=>{let e=document.getElementById(`quiz-container`);if(!e)return;let t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&($s(),t.unobserve(e.target))})}),n=e.querySelector(`.card-item-1`);n&&t.observe(n);let r=e.querySelector(`.card-item-8`);r&&t.observe(r);let i=e.querySelector(`.card-item-16`);i&&t.observe(i)},sl=()=>{let e=document.getElementById(`latest-articles-container`);if(!e)return;let t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&($s(),t.unobserve(e.target))})}),n=e.querySelectorAll(`.c-card-container`)[10];n&&t.observe(n);let r=e.querySelectorAll(`.c-card-container`)[20];r&&t.observe(r)},cl=()=>{if(window.datalayerInfo?.pageName!==`story`||!window.history)return;let e=[],t=new IntersectionObserver(t=>{t.forEach(t=>{if(!t.isIntersecting)return;let n=t.target.getAttribute(`id`);n&&t.intersectionRatio>=0&&(e.includes(n)||(e.push(n),$s({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)})};var ll=()=>{il(),rl(),cl()},ul=()=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({user_status:Ms(`20mnUserInfo`)?`Connecte`:`Pas connecte`,an:document.referrer,referrer:document.referrer,darkmode:document.documentElement.getAttribute(`data-theme`)===`dark`,page_uri:window.datalayerInfo?.pageUri,page_type:window.datalayerInfo?.pageName})};let dl=/* @__PURE__ */ new Set([`tempo`,`conso`,`consommation`,`guide-achat`,`arts-stars`,`sport`,`high-tech`,`planete`,`animaux`,`gaming`,`vie-pro`,`horoscope-quotidien`,`horoscope-quotidien-chinois`,`horoscope-mensuel`,`horoscope-hebdomadaire`]),fl=[`astro`,`astrohome`],pl=()=>{let e=window.datalayerInfo?.pageName,t=window.datalayerInfo?.tagsSlug;return e?fl.includes(e)?!0:e===`article`&&!!t&&t.split(`|`).some(e=>dl.has(e)):!1},ml=()=>{let e=window.envVariables?.lemrockPublisherToken;e&&pl()&&(window.LemrockConfig={publisherToken:e})},hl=e=>{let t=document.createElement(`script`);if(t.type=`text/javascript`,e.load===`async`?t.async=!0:e.load===`defer`&&(t.defer=!0),`src`in e&&e.src){let n=eval;t.src=e.src?.replace(/%(.*?)%/,(e,t)=>n(t))}if(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()}),e.fallBackSrc){let n=e.fallBackSrc;t.onerror=()=>{_l(n)}}`text`in e&&e.text&&(t.innerHTML=e.text),e.id&&(t.id=e.id),e.dataAttributes&&Object.entries(e.dataAttributes).forEach(([e,n])=>{t.setAttribute(`data-${Gs(e)}`,n)}),e.target===`head`&&document.head?document.head.appendChild(t):document.body?document.body.appendChild(t):(window.bodyScripts=window.bodyScripts||[],window.bodyScripts.push(t))},gl=(e,t)=>{let n=(n,r)=>{if(r&&window.__tcfapi&&(n.eventStatus===`tcloaded`||n.eventStatus===`useractioncomplete`))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)})},_l=(e,t)=>{let n=window.thirdPartiesConfig?.conditional?.find(t=>qs(t.name)===e);if(!n)throw Error(`Script with name ${e} not found`);hl({...n,...t})},vl=()=>{gl(`Mediego`,()=>{let e=window.Didomi;e.getCurrentUserStatus().purposes.cookies?.enabled&&e.getCurrentUserStatus().purposes.select_personalized_ads?.enabled&&_l(`mediego`)})},yl=()=>{vl()},bl=()=>/Android/i.test(navigator.userAgent),xl=()=>/iPhone|iPad|iPod/i.test(navigator.userAgent),Sl=`C7B0O-ENPDW-DIJOO-VJO1M`,Cl=()=>{if(bl()){let e=document.createElement(`div`);e.setAttribute(`id`,`bandeau-app-android`),document.body.appendChild(e)}else if(xl()){let e=document.createElement(`div`);e.setAttribute(`id`,`bandeau-app-ios`),document.body.appendChild(e)}},wl=()=>{try{_l(`poool-engage`)}catch(e){e instanceof Error&&console.error(e.message)}let e=Ms(`20mnUserInfo`);Cl();let t=document.querySelector(`[src="https://assets.poool.fr/engage.min.js"]`),n=JSON.parse(decodeURIComponent(e?.replace(/'/g,`"`)||`{}`)).newsletters_registration??[];t?.addEventListener(`load`,()=>{let t=window.Engage.noConflict();window.Engage=t||window.Engage,window.Engage.init(Sl).autoCreate({filters:[e===`{}`?`disconnected`:`connected`,...n]})})},Tl=e=>{try{_l(`poool-access`),_l(`poool-audit`)}catch(e){e instanceof Error&&console.error(e.message)}document.querySelector(`[src="https://static.20mn.fr/apps/poool/access.min.js"]`)?.addEventListener(`load`,()=>{let t=document.querySelector(`.c-content`),n=document.createElement(`div`);n.setAttribute(`id`,`paywall`),t?.parentNode?.insertBefore(n,t.nextSibling),window.Audit.init(Sl).config({cookies_enabled:e.getCurrentUserStatus().vendors[`c:poool-VyhCit7N`]?.enabled}).sendEvent(`page-view`,{type:`premium`});let r=window.Access.init(Sl).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=/* @__PURE__ */ new Date,t=e.getTimezoneOffset();e=/* @__PURE__ */ new Date(e.getTime()-t*60*1e3),localStorage.setItem(`consent_validity_date`,e.toISOString().split(`T`)[0]),window.Didomi.setUserAgreeToAll()});let i=!1,a=document.getElementById(`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),a&&a.setAttribute(`style`,`position: fixed; z-index: 2; left: 0; right: 0; bottom: 0;`),r.createPaywall({target:`#cookie-banner`,pageType:`premium`}))})}}),window.didomiOnReady.push(e=>{e.getCurrentUserStatus().vendors[`c:poool-VyhCit7N`]?.enabled&&(r.config(`cookies_enabled`,!0),a&&a.setAttribute(`style`,`position: fixed; z-index: 3; left: 0; right: 0; bottom: 0;`),r.createPaywall({target:`#cookie-banner`,pageType:`premium`}))}),a&&a.setAttribute(`style`,`position: fixed; z-index: 3; left: 0; right: 0; bottom: 0;`),r.createPaywall({target:`#cookie-banner`,pageType:`premium`})})},El=()=>{gl(`Poool`,()=>{let e=window.Didomi;!e.getCurrentUserStatus().purposes.select_personalized_ads?.enabled&&window.datalayerInfo?.pageName===`article`&&![`production`,`publicommunique`,`magazine`,`guide-achat`].includes(window.datalayerInfo?.subType||``)&&Tl(e),wl()})},Dl=()=>{El()},Ol=e=>(t,n)=>{if(n&&(t.eventStatus===`tcloaded`||t.eventStatus===`useractioncomplete`)&&e.getCurrentUserStatus().purposes[`mesureda-6qyqaZXC`]?.enabled&&e.getCurrentUserStatus().vendors[`20minutes-bfbzKmzq`]?.enabled){let e=document.getElementById(`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)}})}},kl=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>window.__tcfapi(`addEventListener`,2,Ol(e)))},Al=()=>{gl(`Taboola`,()=>{window._taboola=window._taboola||[],window.datalayerInfo?.pageName===`article`?window._taboola.push({article:`auto`}):window._taboola.push({other:`auto`}),_l(`taboola-sdk`,{dataAttributes:{darkMode:document.documentElement.getAttribute(`data-theme`)?.toString()===`dark`?`true`:`false`},fallBackSrc:`taboola-sdk-privacy`}),document.querySelectorAll(`.taboola`).forEach(e=>{let t=e.getAttribute(`data-mode`),n=e.getAttribute(`id`),r=e.getAttribute(`data-placement`),i=e.getAttribute(`data-target-type`);!t||!n||!r||!i?console.warn(`Issue with taboola placement`):window._taboola.push({mode:t,container:n,placement:r,target_type:i})}),window._taboola.push({flush:!0})})},jl=()=>{document.querySelectorAll(`.taboola`).length>0&&Al()},Ml=e=>{try{let t=e.getCurrentUserStatus(),n=Object.values(t.purposes??{}),r=Object.values(t.vendors??{});return n.length===0||r.length===0?!1:n.every(e=>e.enabled)&&r.every(e=>e.enabled)}catch{return!1}},Nl=async()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(async e=>{if(!Ml(e)){localStorage.removeItem(`etx-settings`);return}if(window.datalayerInfo?.pageName!==`article`)return;if(!window.datalayerInfo?.audioId||!window.datalayerInfo?.audioUrl){console.error(`Audio ID or/and Audio URL is missing in datalayerInfo`);return}let t=window.thirdPartiesConfig?.conditional?.find(e=>qs(e.name)===`voxa-player`);if(!t||!(`src`in t)){console.error(`Voxa player script not found in thirdPartiesConfig`);return}let{initETXPlayer:n}=await import(
92
+ `}},d=e=>{let t=e.getAttribute(`data-content-id`);if(!t)return;let n=Q(t);if(!n)return;e.setAttribute(`data-user-reaction`,n.type),e.setAttribute(`data-user-reaction-id`,n.id),u(e,n.type);let r=Number.parseInt(e.getAttribute(`data-content-${n.type}`)||`0`,10);e.setAttribute(`data-content-${n.type}`,String(r+1));let i=e.querySelector(`.c-react-button__count`);if(i){let e=Number.parseInt(i.textContent||`0`,10);i.textContent=String(e+1)}let a=e.querySelector(`.c-icon-item__count`);if(a){let e=Number.parseInt(a.textContent||`0`,10);a.textContent=String(e+1)}},f=t=>{let r=t.getBoundingClientRect(),i=t.getAttribute(`data-placement`)||`right`,a=e.getBoundingClientRect();if(i===`top`){let t=r.top-a.height-10,i=r.left+r.width/2,o=t<24,s=i-a.width/2<24,c=i+a.width/2>window.innerWidth-24;o?e.style.top=`24px`:e.style.top=`${t}px`,n?(e.style.left=`50%`,e.style.transform=`translateX(-50%)`):s?(e.style.left=`24px`,e.style.transform=`translateX(0)`):c?(e.style.left=`${window.innerWidth-24}px`,e.style.transform=`translateX(-100%)`):(e.style.left=`${i}px`,e.style.transform=`translateX(-50%)`)}else{let t=r.right+18,i=t+a.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%)`)}},p=e=>{let t=[];Vs.forEach(n=>{let 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})});let n=t.filter(({count:e})=>e>0),r=t.reduce((e,{count:t})=>e+t,0),i=e.querySelector(`.c-react-button__count`);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`)}),n.length!==0&&[...n].sort((e,t)=>t.count-e.count).slice(0,2).forEach(({element:e})=>{e.classList.add(`c-react-button__list-item--show`)})},m=t=>{let n=Object.values(Bs),r=t.getAttribute(`data-user-reaction`);n.forEach(n=>{let i=t.getAttribute(`data-content-${n}`);if(!i)return;let a=e.querySelector(`[data-reaction-id="${n}"]`);if(!a)return;let o=a.querySelector(`.c-emoji-toolbar__count`);o&&(o.textContent=String(i).padStart(2,`0`)),r===n?a.classList.add(`c-emoji-toolbar__button--is-active`):a.classList.remove(`c-emoji-toolbar__button--is-active`)})},h=(e,t,n)=>{let r=Q(t),i=0;ac.forEach(t=>{let a=oc(n[t]);r?.type===t&&(a+=1),e.setAttribute(`data-content-${t}`,String(a)),i+=a});let a=String(i),o=e.querySelector(`.c-react-button__count`);o&&(o.textContent=a);let s=e.querySelector(`.c-icon-item__count`);s&&(s.textContent=a),p(e),m(e)},g=(t,n,a,o)=>{let s=a===-1,c=!s&&o!==null&&o!==n,l=(n,a)=>{if(!i||r!==t)return;let o=e.querySelector(`[data-reaction-id="${n}"]`);if(!o)return;let s=o.querySelector(`.c-emoji-toolbar__count`);if(s){let e=Number.parseInt(s.textContent||`0`,10);s.textContent=String(Math.max(0,e+a)).padStart(2,`0`)}};l(n,a);let d=t.getAttribute(`data-content-${n}`),f=Number.parseInt(d||`0`,10);if(t.setAttribute(`data-content-${n}`,String(Math.max(0,f+a))),c&&o){l(o,-1);let n=t.getAttribute(`data-content-${o}`),a=Number.parseInt(n||`0`,10);t.setAttribute(`data-content-${o}`,String(Math.max(0,a-1))),i&&r===t&&e.querySelector(`[data-reaction-id="${o}"]`)?.classList.remove(`c-emoji-toolbar__button--is-active`)}else if(!c){let e=t.querySelector(`.c-icon-item__count`);if(e){let t=Number.parseInt(e.textContent||`0`,10);e.textContent=String(Math.max(0,t+a))}let n=t.querySelector(`.c-react-button__count`);if(n){let e=Number.parseInt(n.textContent||`0`,10);n.textContent=String(Math.max(0,e+a))}}s?(i&&r===t&&e.querySelector(`[data-reaction-id="${n}"]`)?.classList.remove(`c-emoji-toolbar__button--is-active`),t.removeAttribute(`data-user-reaction`),t.removeAttribute(`data-user-reaction-id`),u(t,null)):(i&&r===t&&(e.querySelectorAll(`[data-reaction-id]`).forEach(e=>{e.classList.remove(`c-emoji-toolbar__button--is-active`)}),e.querySelector(`[data-reaction-id="${n}"]`)?.classList.add(`c-emoji-toolbar__button--is-active`)),t.setAttribute(`data-user-reaction`,n),u(t,n))},_=async(e,t,n,{isRemoving:r,previousUserReaction:i,existingReactionId:a,editorialModel:o})=>{try{if(r){a?await vc(a)?fc(t):console.error(`Failed to delete reaction`):fc(t);return}if(i&&a){let r=await _c(a,n,o);r.id?(dc(t,a,n),r.reactionCounts&&h(e,t,r.reactionCounts)):console.error(`Failed to update reaction`);return}let s=await gc(t,o,n);if(s.id){if(!e.getAttribute(`data-user-reaction`)){await vc(s.id);return}e.setAttribute(`data-user-reaction-id`,s.id),dc(t,s.id,n),s.reactionCounts&&h(e,t,s.reactionCounts)}else console.error(`Failed to create reaction`)}catch(e){console.error(`Error executing reaction mutation:`,e)}},v=(e,t,n)=>{let r=e.getAttribute(`data-content-id`);if(!r){console.error(`Missing editorial content information for reaction`);return}let i=l(e),a=e.getAttribute(`data-user-reaction-id`),o=e.getAttribute(`data-user-reaction`);g(e,t,n?-1:1,o),p(e),_(e,r,t,{isRemoving:n,previousUserReaction:o,existingReactionId:a,editorialModel:i}).catch(e=>{console.error(`Unexpected error in reaction API call:`,e)})},y=e=>{let t=e.getAttribute(`data-user-reaction`);t?v(e,t,!0):v(e,`up`,!1)},b=t=>{if(!(i&&r===t)&&(o(),Z({name:`reaction`,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_engagement:1}}),r=t,e.style.display=`flex`,f(t),m(t),S(r.getAttribute(`data-content-id`)),i=!0,!t.getAttribute(`data-user-reaction`))){let e=t.getAttribute(`data-content-id`);e&&yc(e,`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),m(t))}).catch(e=>{console.error(`Error fetching user reaction:`,e)})}},x=(e,t,n)=>{r&&g(r,e,t,n)},S=t=>{t?(e.querySelectorAll(`[data-reaction-id]`).forEach(e=>{let 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;let n=e.getAttribute(`data-reaction-id`);if(!n)return;let i=l(r),a=r.getAttribute(`data-user-reaction-id`),o=e.classList.contains(`c-emoji-toolbar__button--is-active`),c=r.getAttribute(`data-user-reaction`);Z({name:n,type:`action`,customProps:{cta_context:`toolbar_react`,cta_type:`icon`,cta_engagement:2}}),x(n,o?-1:1,c),p(r);let u=r,d=t;s(),_(u,d,n,{isRemoving:o,previousUserReaction:c,existingReactionId:a,editorialModel:i}).catch(e=>{console.error(`Unexpected error in reaction API call:`,e)})})})):console.error(`Missing editorial content information for reaction`)},C=e=>{if(t.has(e))return;t.add(e),d(e);let a=e.getAttribute(`data-user-reaction`);a&&u(e,a),p(e);let s=e.querySelector(`.c-react-button__icon`);if(!s)return;let l=null,f=null,m=!1,h=()=>{l!==null&&(clearTimeout(l),l=null)},g=()=>{f!==null&&(clearTimeout(f),f=null)},_=()=>{Z({name:`reaction`,type:`action`,customProps:{cta_context:`react_button`,cta_type:`icon`,cta_engagement:1}})},v=()=>{h(),_(),y(e)};n?(s.addEventListener(`touchstart`,()=>{m=!1,g(),f=setTimeout(()=>{m=!0,b(e)},500)},{passive:!0}),s.addEventListener(`touchmove`,g),s.addEventListener(`touchend`,g),s.addEventListener(`touchcancel`,g),s.addEventListener(`click`,e=>{m?(e.preventDefault(),m=!1):v()})):(s.addEventListener(`click`,v),e.addEventListener(`mouseenter`,()=>{i&&o()}),e.addEventListener(`mouseleave`,()=>{i&&r===e&&c()}),s.addEventListener(`mouseenter`,()=>{i&&r===e||(l=setTimeout(()=>{b(e)},300))}),s.addEventListener(`mouseleave`,h))};n||(e.addEventListener(`mouseenter`,o),e.addEventListener(`mouseleave`,()=>{i&&c()})),document.querySelectorAll(`.mbrs-social-react-container`).forEach(C),new MutationObserver(e=>{e.forEach(e=>{Array.from(e.addedNodes).forEach(e=>{e instanceof HTMLElement&&(e.matches(`.mbrs-social-react-container`)&&C(e),e.querySelectorAll(`.mbrs-social-react-container`).forEach(C))})})}).observe(document.body,{childList:!0,subtree:!0}),window.addEventListener(`scroll`,()=>{i&&r&&f(r)}),document.addEventListener(`click`,({target:t})=>{t instanceof HTMLElement&&i&&!e.contains(t)&&!t.closest(`.mbrs-social-react-container`)&&s()})},xc=e=>e instanceof HTMLAnchorElement?e.href:e instanceof Element&&e.closest(`a`)?.href||``,Sc=()=>{window.datalayerInfo?.subType===`guide-achat`&&document.querySelectorAll(`.c-content a.c-btn`).forEach(e=>{e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault(),Z({name:`affiliation`,type:`action`,chapter1:`guide_achat`}),e.target instanceof HTMLAnchorElement&&(window.location.href=e.target.href)})})},Cc=()=>{let e=document.querySelector(`.c-social-bar a[href="#mbrs-comments-container"]`);e&&e.addEventListener(`click`,()=>{Z({name:`content_comments`,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_engagement:3}})});let t=document.getElementById(`mbrs-social-comment-container`);t&&t.addEventListener(`click`,()=>{Z({name:`content_comments`,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_engagement:3}})})},wc=()=>{let e=document.querySelector(`.c-social-bar div.mbrs-social-report-container`);e&&e.addEventListener(`click`,()=>{Z({name:`content_correction`,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_engagement:3}})})},Tc=()=>{let e=document.querySelector(`.c-social-bar div[data-event-name="mbrs-social-save-content"]`);e&&e.addEventListener(`click`,()=>{Z({name:`save_content`,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_engagement:3}})})},Ec=()=>{document.querySelectorAll(`.c-overview-bar__article a`).forEach(e=>{e.addEventListener(`click`,e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),Z({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)})})},Dc=()=>{let e=document.getElementById(`footer-recrutement-link`);e&&e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault(),Z({name:`recrutement`,type:`action`}),e.target instanceof HTMLAnchorElement&&(window.location.href=e.target.href)})},Oc=()=>{let e=(e,t,n)=>{let r=xc(n.target);r&&(n.stopPropagation(),n.preventDefault(),Z({name:t,type:`action`,customProps:{cta_context:`header`,cta_type:`button`,cta_destination:r,cta_engagement:1}}),e.target===`_blank`?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)})}})},kc=()=>{let 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(),Z({name:e,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_destination:e===`home`?window.location.href:n,cta_engagement:1}}),window.location.href=n)};document.querySelectorAll(`.c-toolbar a`).forEach(t=>{let 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)})}});let t=document.querySelector(`.c-toolbar div[aria-label="Voir les articles vidéo"] a`);t&&t.addEventListener(`click`,()=>{Z({name:`video_feed`,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_destination:window.location.href,cta_engagement:1}})})},Ac=()=>{let 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(),Z({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)})}})},jc=()=>{[{name:`games`,id:`#entertainment-item-game`},{name:`horoscope`,id:`#entertainment-item-horoscope`}].forEach(e=>{let t=document.querySelector(e.id);t&&t instanceof HTMLAnchorElement&&t.addEventListener(`click`,n=>{n.stopPropagation(),n.preventDefault(),Z({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})})},Mc=()=>{let e=document.querySelector(`article.c-card-large a`);window.layout===`mobile`&&(e=document.querySelector(`article.c-card-extra-large a`)),e&&e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`headline_content`,type:`action`,customProps:{cta_context:`home`,cta_type:`card`,cta_destination:t,cta_engagement:1}}),window.location.href=t})},Nc=()=>{document.querySelectorAll(`div.c-sub-menu__right a`).forEach(e=>{e.addEventListener(`click`,e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),Z({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)})})},Pc=()=>{let e=document.getElementById(`tab-resume`);e&&e.addEventListener(`click`,()=>{Z({name:`context`,type:`action`,customProps:{cta_context:`content`,cta_type:`link`,cta_destination:window.location.href,cta_engagement:1},chapter1:`live`})});let t=document.getElementById(`tab-temps-forts`);t&&t.addEventListener(`click`,()=>{Z({name:`highlights`,type:`action`,customProps:{cta_context:`content`,cta_type:`link`,cta_destination:window.location.href,cta_engagement:1},chapter1:`live`})})},Fc=()=>{window.datalayerInfo?.pageName===`home`&&document.querySelectorAll(`#tabpanel-le-direct article.c-card-container a`).forEach(e=>{e.addEventListener(`click`,e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),Z({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)})})},Ic=()=>{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();let t=xc(e.target);Z({name:`comment_content`,type:`action`,customProps:{cta_context:window.datalayerInfo?.pageName===`home`?`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`,()=>{Z({name:`save_content`,type:`action`,customProps:{cta_context:window.datalayerInfo?.pageName===`home`?`home`:`tag`,cta_type:`icon`,cta_destination:window.location.href,cta_engagement:3}})})}))},Lc=()=>{document.querySelectorAll(`div.c-read-also-banner a`).forEach(e=>{e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({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})})},Rc=()=>{window.layout===`desktop`&&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(),Z({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)})})},zc=()=>{window.datalayerInfo?.pageName===`home`&&document.querySelectorAll(`div#local-news-container div.c-card-container a`).forEach(e=>{e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`local_news_content`,type:`action`,customProps:{cta_context:`home`,cta_type:`card`,cta_destination:t,cta_engagement:1}}),window.location.href=t})})},Bc=()=>{window.datalayerInfo?.pageName===`home`&&document.querySelectorAll(`.c-carousel__movies--in-long-list a`).forEach(e=>{e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target),n=e.target instanceof Element&&e.target.closest(`section.c-carousel`)?.querySelector(`h2`)?.textContent||``,r=``;switch(n){case`On regarde quoi ce soir ?`:r=`program_tv_content`;break;default:r=`cinema_content`}Z({name:r,type:`action`,customProps:{cta_context:`home`,cta_type:`card`,cta_destination:t,cta_engagement:1}}),window.location.href=t})})},Vc=()=>{window.datalayerInfo?.pageName===`article`&&document.querySelectorAll(`footer article a`).forEach(e=>{e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`read_also`,type:`action`,customProps:{cta_context:`content`,cta_type:`card`,cta_destination:t,cta_engagement:2}}),window.location.href=t})})},Hc=()=>{if(window.datalayerInfo?.pageName&&[`game`,`gamehome`].includes(window.datalayerInfo?.pageName)){let e=document.querySelectorAll(`main#page-wrap div.c-collapse__content a`);window.layout===`desktop`&&(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),Z({name:`view_all_games`,type:`action`,customProps:{cta_context:`home_game`,cta_type:`link`,cta_destination:t,cta_engagement:1}}),window.location.href=t})})}},Uc=()=>{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();let t=xc(e.target);Z({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})})},Wc=()=>{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();let t=xc(e.target);Z({name:`logo`,type:`action`,customProps:{cta_context:`header`,cta_type:`image`,cta_destination:t,cta_engagement:1}}),window.location.href=t})})},Gc=()=>{let e=document.querySelector(`.c-btn--ghost:not(.u-hidden)[data-a11y-dialog-show="dialog-menu"]`);e&&e.addEventListener(`click`,()=>{Z({name:`menu`,type:`action`,customProps:{cta_context:`header`,cta_type:`button`,cta_destination:window.location.href,cta_engagement:1}})})},Kc=()=>{let e=document.querySelector(`ul.c-header__links-container li:first-child a`);e&&e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`house`,type:`action`,customProps:{cta_context:`header`,cta_type:`icon`,cta_destination:`/`,cta_engagement:1}}),window.location.href=t})},qc=()=>{if(window.layout!==`mobile`)return;let e=document.querySelector(`a.js-header-btn-back`);e&&e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`back`,type:`action`,customProps:{cta_context:`header`,cta_type:`icon`,cta_destination:t,cta_engagement:1}}),window.location.href=t})},Jc=()=>{window.datalayerInfo?.pageName===`home`&&document.querySelectorAll(`.c-vertical-timeline a`).forEach(e=>{e.addEventListener(`click`,e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),Z({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)})})},Yc=()=>{let e=document.querySelector(`a.c-tiles--has-advent-bg`);e&&e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`advent-calendar`,type:`action`,customProps:{cta_context:`menu`,cta_type:`button`,cta_destination:t,cta_engagement:2}}),window.location.href=t})},Xc=()=>{if(window.datalayerInfo?.pageName!==`home`)return;let e=document.querySelector(`div.c-scroll-to-top button`);e&&e.addEventListener(`click`,()=>{Z({name:`scroll_to_top`,type:`action`,customProps:{cta_context:`home`,cta_type:`button`,cta_destination:window.location.href,cta_engagement:1}})})},Zc=()=>{if(window.datalayerInfo?.pageName===`rewind`){let e=document.querySelector(`#page-wrap a[href*="/rewind/2025"]`);e&&e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`rewind_2025`,type:`action`,customProps:{cta_context:`my_rewinds`,cta_type:`card`,cta_destination:t,cta_engagement:2}}),window.location.href=t})}let e=document.querySelector(`div.c-header a[href*="/rewind/2025"]`);e&&e.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`rewind`,type:`action`,customProps:{cta_context:`header`,cta_type:`icon`,cta_destination:t,cta_engagement:2}}),window.location.href=t});let t=document.querySelector(`#dialog-menu a[href*="/rewind/2025"]`);t&&t.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let t=xc(e.target);Z({name:`rewind`,type:`action`,customProps:{cta_context:`menu`,cta_type:`banner`,cta_destination:t,cta_engagement:2}}),window.location.href=t})},Qc=()=>{let 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`,()=>{Z({name:`ai`,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_engagement:2}})}),t&&t.addEventListener(`click`,()=>{Z({name:`ai`,type:`action`,customProps:{cta_context:`content`,cta_type:`button`,cta_destination:window.location.href,cta_engagement:1}})}),n&&n.addEventListener(`click`,()=>{Z({name:`ai`,type:`action`,customProps:{cta_context:`toolbar`,cta_type:`icon`,cta_engagement:2}})})},$c=()=>{if(window.datalayerInfo?.pageName!==`home`)return;let e=(e,t)=>{e?.addEventListener(`click`,e=>{e.stopPropagation(),e.preventDefault();let n=xc(e.target);Z({name:t,type:`action`,customProps:{cta_context:`home`,cta_type:`card`,cta_destination:n,cta_engagement:1}}),window.location.href=n})};if(window.layout===`mobile`){let t=document.getElementById(`dfp_nfb_2`)?.previousElementSibling,n=document.getElementById(`dfp_nfb_3`)?.previousElementSibling;e(t?.querySelector(`.card-item-6`)??void 0,`card_6`),e(n?.querySelector(`.card-item-7`)??void 0,`card_17`),e(n?.querySelector(`.card-item-8`)??void 0,`card_18`);return}let t=document.getElementById(`dfp_pave_atf`)?.closest(`.o-lt-show`),n=document.getElementById(`dfp_pave_btf`)?.closest(`.o-lt-show`),r=t?.querySelector(`.o-lt-show__main .card-item-5`),i=n?.querySelectorAll(`.o-lt-show__main .c-card-extra-small`);e(r??void 0,`card_6`),e(i?.[4],`card_17`),e(i?.[5],`card_18`)},el=()=>{document.querySelectorAll(`a.js-google-source, a.js-open-in-app`).forEach(e=>{e.addEventListener(`click`,()=>{let t=e.classList.contains(`js-open-in-app`)?`read_app`:e.dataset.googleSource===`discover`?`follow_google_discover`:`add_favorite`;Z({name:t,type:`action`,customProps:{cta_context:`content`,cta_type:`button`,cta_destination:e.href,cta_engagement:2}})})})};var tl=()=>{Sc(),Vc(),Yc(),qc(),Gc(),Qc(),el(),Hc(),Mc(),Ic(),$c(),Bc(),jc(),Kc(),Fc(),Pc(),Jc(),zc(),Wc(),Oc(),Uc(),Ec(),Lc(),Dc(),Zc(),Rc(),Xc(),Cc(),wc(),Tc(),Nc(),kc(),Ac()};let nl=/* @__PURE__ */ function(e){return e.AD_IFRAME=`adiframe`,e.ANIMAL_QUIZ=`animalquiz`,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.ELECTIONS_AI_ARTICLES=`electionsaiarticles`,e.ELECTIONS_EMBED=`electionsembed`,e.ELECTIONSHOME=`electionshome`,e.ERROR=`error`,e.EXT_TEFAL=`exttefal`,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.QUIZ=`quiz`,e.REWIND=`rewind`,e.SEARCH=`search`,e.SECTION=`section`,e.SERVICE=`service`,e.SHOPPING_GUIDE=`shoppingguide`,e.SITEMAP=`sitemap`,e.SPORT=`sport`,e.STATIC=`static`,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.UTIQ=`utiq`,e.WEATHER=`weather`,e.WHY_CREATE_ACCOUNT=`whycreateaccount`,e}({});new Set(Object.values(nl));let rl=()=>{let e=document.getElementById(`dialog-comment`);if(e&&window.layout===`mobile`){let{datalayerInfo:t={}}=window;e.addEventListener(`show`,()=>{$s({name:`${t?.contentId}_${t?.contentTitle}`,chapter1:`commentaires`})})}},il=()=>{let e=document.getElementById(`dialog-menu`);e&&window.layout===`mobile`&&e.addEventListener(`show`,()=>{$s({name:`menu`,chapter1:`menu`,chapter2:``})})},al=()=>{let e=document.getElementById(`article-list-bottom-container`);if(!e)return;let t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&($s(),t.unobserve(e.target))})}),n=e.querySelector(`.card-item-1`);n&&t.observe(n);let r=e.querySelector(`.card-item-8`);r&&t.observe(r);let i=e.querySelector(`.card-item-16`);i&&t.observe(i)},ol=()=>{let e=document.getElementById(`quiz-container`);if(!e)return;let t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&($s(),t.unobserve(e.target))})}),n=e.querySelector(`.card-item-1`);n&&t.observe(n);let r=e.querySelector(`.card-item-8`);r&&t.observe(r);let i=e.querySelector(`.card-item-16`);i&&t.observe(i)},sl=()=>{let e=document.getElementById(`latest-articles-container`);if(!e)return;let t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&($s(),t.unobserve(e.target))})}),n=e.querySelectorAll(`.c-card-container`)[10];n&&t.observe(n);let r=e.querySelectorAll(`.c-card-container`)[20];r&&t.observe(r)},cl=()=>{if(window.datalayerInfo?.pageName!==`story`||!window.history)return;let e=[],t=new IntersectionObserver(t=>{t.forEach(t=>{if(!t.isIntersecting)return;let n=t.target.getAttribute(`id`);n&&t.intersectionRatio>=0&&(e.includes(n)||(e.push(n),$s({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)})};var ll=()=>{il(),rl(),cl()},ul=()=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({user_status:Ms(`20mnUserInfo`)?`Connecte`:`Pas connecte`,an:document.referrer,referrer:document.referrer,darkmode:document.documentElement.getAttribute(`data-theme`)===`dark`,page_uri:window.datalayerInfo?.pageUri,page_type:window.datalayerInfo?.pageName})};let dl=/* @__PURE__ */ new Set([`tempo`,`conso`,`consommation`,`guide-achat`,`arts-stars`,`sport`,`high-tech`,`planete`,`animaux`,`gaming`,`vie-pro`,`horoscope-quotidien`,`horoscope-quotidien-chinois`,`horoscope-mensuel`,`horoscope-hebdomadaire`]),fl=[`astro`,`astrohome`],pl=()=>{let e=window.datalayerInfo?.pageName,t=window.datalayerInfo?.tagsSlug;return e?fl.includes(e)?!0:e===`article`&&!!t&&t.split(`|`).some(e=>dl.has(e)):!1},ml=()=>{let e=window.envVariables?.lemrockPublisherToken;e&&pl()&&(window.LemrockConfig={publisherToken:e})},hl=e=>{let t=document.createElement(`script`);if(t.type=`text/javascript`,e.load===`async`?t.async=!0:e.load===`defer`&&(t.defer=!0),`src`in e&&e.src){let n=eval;t.src=e.src?.replace(/%(.*?)%/,(e,t)=>n(t))}if(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()}),e.fallBackSrc){let n=e.fallBackSrc;t.onerror=()=>{_l(n)}}`text`in e&&e.text&&(t.innerHTML=e.text),e.id&&(t.id=e.id),e.dataAttributes&&Object.entries(e.dataAttributes).forEach(([e,n])=>{t.setAttribute(`data-${Gs(e)}`,n)}),e.target===`head`&&document.head?document.head.appendChild(t):document.body?document.body.appendChild(t):(window.bodyScripts=window.bodyScripts||[],window.bodyScripts.push(t))},gl=(e,t)=>{let n=(n,r)=>{if(r&&window.__tcfapi&&(n.eventStatus===`tcloaded`||n.eventStatus===`useractioncomplete`))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)})},_l=(e,t)=>{let n=window.thirdPartiesConfig?.conditional?.find(t=>qs(t.name)===e);if(!n)throw Error(`Script with name ${e} not found`);hl({...n,...t})},vl=()=>{gl(`Mediego`,()=>{let e=window.Didomi;e.getCurrentUserStatus().purposes.cookies?.enabled&&e.getCurrentUserStatus().purposes.select_personalized_ads?.enabled&&_l(`mediego`)})},yl=()=>{vl()},bl=()=>/Android/i.test(navigator.userAgent),xl=()=>/iPhone|iPad|iPod/i.test(navigator.userAgent),Sl=`C7B0O-ENPDW-DIJOO-VJO1M`,Cl=()=>{if(bl()){let e=document.createElement(`div`);e.setAttribute(`id`,`bandeau-app-android`),document.body.appendChild(e)}else if(xl()){let e=document.createElement(`div`);e.setAttribute(`id`,`bandeau-app-ios`),document.body.appendChild(e)}},wl=()=>{try{_l(`poool-engage`)}catch(e){e instanceof Error&&console.error(e.message)}let e=Ms(`20mnUserInfo`);Cl();let t=document.querySelector(`[src="https://assets.poool.fr/engage.min.js"]`),n=JSON.parse(decodeURIComponent(e?.replace(/'/g,`"`)||`{}`)).newsletters_registration??[];t?.addEventListener(`load`,()=>{let t=window.Engage.noConflict();window.Engage=t||window.Engage,window.Engage.init(Sl).autoCreate({filters:[e===void 0?`disconnected`:`connected`,...n]})})},Tl=e=>{try{_l(`poool-access`),_l(`poool-audit`)}catch(e){e instanceof Error&&console.error(e.message)}document.querySelector(`[src="https://static.20mn.fr/apps/poool/access.min.js"]`)?.addEventListener(`load`,()=>{let t=document.querySelector(`.c-content`),n=document.createElement(`div`);n.setAttribute(`id`,`paywall`),t?.parentNode?.insertBefore(n,t.nextSibling),window.Audit.init(Sl).config({cookies_enabled:e.getCurrentUserStatus().vendors[`c:poool-VyhCit7N`]?.enabled}).sendEvent(`page-view`,{type:`premium`});let r=window.Access.init(Sl).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=/* @__PURE__ */ new Date,t=e.getTimezoneOffset();e=/* @__PURE__ */ new Date(e.getTime()-t*60*1e3),localStorage.setItem(`consent_validity_date`,e.toISOString().split(`T`)[0]),window.Didomi.setUserAgreeToAll()});let i=!1,a=document.getElementById(`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),a&&a.setAttribute(`style`,`position: fixed; z-index: 2; left: 0; right: 0; bottom: 0;`),r.createPaywall({target:`#cookie-banner`,pageType:`premium`}))})}}),window.didomiOnReady.push(e=>{e.getCurrentUserStatus().vendors[`c:poool-VyhCit7N`]?.enabled&&(r.config(`cookies_enabled`,!0),a&&a.setAttribute(`style`,`position: fixed; z-index: 3; left: 0; right: 0; bottom: 0;`),r.createPaywall({target:`#cookie-banner`,pageType:`premium`}))}),a&&a.setAttribute(`style`,`position: fixed; z-index: 3; left: 0; right: 0; bottom: 0;`),r.createPaywall({target:`#cookie-banner`,pageType:`premium`})})},El=()=>{gl(`Poool`,()=>{let e=window.Didomi;!e.getCurrentUserStatus().purposes.select_personalized_ads?.enabled&&window.datalayerInfo?.pageName===`article`&&![`production`,`publicommunique`,`magazine`,`guide-achat`].includes(window.datalayerInfo?.subType||``)&&Tl(e),wl()})},Dl=()=>{El()},Ol=e=>(t,n)=>{if(n&&(t.eventStatus===`tcloaded`||t.eventStatus===`useractioncomplete`)&&e.getCurrentUserStatus().purposes[`mesureda-6qyqaZXC`]?.enabled&&e.getCurrentUserStatus().vendors[`20minutes-bfbzKmzq`]?.enabled){let e=document.getElementById(`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)}})}},kl=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(e=>window.__tcfapi(`addEventListener`,2,Ol(e)))},Al=()=>{gl(`Taboola`,()=>{window._taboola=window._taboola||[],window.datalayerInfo?.pageName===`article`?window._taboola.push({article:`auto`}):window._taboola.push({other:`auto`}),_l(`taboola-sdk`,{dataAttributes:{darkMode:document.documentElement.getAttribute(`data-theme`)?.toString()===`dark`?`true`:`false`},fallBackSrc:`taboola-sdk-privacy`}),document.querySelectorAll(`.taboola`).forEach(e=>{let t=e.getAttribute(`data-mode`),n=e.getAttribute(`id`),r=e.getAttribute(`data-placement`),i=e.getAttribute(`data-target-type`);!t||!n||!r||!i?console.warn(`Issue with taboola placement`):window._taboola.push({mode:t,container:n,placement:r,target_type:i})}),window._taboola.push({flush:!0})})},jl=()=>{document.querySelectorAll(`.taboola`).length>0&&Al()},Ml=e=>{try{let t=e.getCurrentUserStatus(),n=Object.values(t.purposes??{}),r=Object.values(t.vendors??{});return n.length===0||r.length===0?!1:n.every(e=>e.enabled)&&r.every(e=>e.enabled)}catch{return!1}},Nl=async()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push(async e=>{if(!Ml(e)){localStorage.removeItem(`etx-settings`);return}if(window.datalayerInfo?.pageName!==`article`)return;if(!window.datalayerInfo?.audioId||!window.datalayerInfo?.audioUrl){console.error(`Audio ID or/and Audio URL is missing in datalayerInfo`);return}let t=window.thirdPartiesConfig?.conditional?.find(e=>qs(e.name)===`voxa-player`);if(!t||!(`src`in t)){console.error(`Voxa player script not found in thirdPartiesConfig`);return}let{initETXPlayer:n}=await import(
93
93
  /* @vite-ignore */
94
94
  t.src);n({audioUrl:window.datalayerInfo.audioUrl,resourceId:window.datalayerInfo.audioId,contentTier:`free`})})},Pl=async e=>{let 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(``)},Fl=(e=document)=>e.querySelectorAll(`iframe[src*="www.ultimedia.com"], iframe[data-src*="www.ultimedia.com"]`),Il=()=>Fl().length,Ll=()=>document.querySelectorAll(`div[class*="c-content"] iframe[data-src*="www.ultimedia.com"], div[class*="c-content"] iframe[src*="www.ultimedia.com"]`),Rl=()=>Il()+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,zl=()=>Rl()>0,Bl=()=>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,Vl=()=>{let e;switch(window.datalayerInfo?.pageName){case`article`:e=document.querySelectorAll(`.c-content`);break;case`live`:e=document.querySelectorAll(`.js-post`)}return e?Array.from(e).some(e=>e.querySelectorAll(`img`).length>0):!1},Hl=()=>{window.wamid=`10069`,window.typ=`1`,window.WfirstParty=!0,window.Wam2gamConf={token:`Gi2z6jGZBNYt`,cookieless:!1,useXdevice:!0},window.WextraIDsConfs=[{name:`firstId`},{name:`utiqId`}]},Ul=()=>{let e=[];return zl()&&e.push(`video`),Vl()&&e.push(`photo`),Bl()&&e.push(`podcast`),e},Wl=()=>{let e=Ms(`20mnUserDataLayer`);return e?JSON.parse(decodeURIComponent(e)):null},Gl=()=>!!Ms(`20mnUserInfo`),Kl=async()=>{let e=Wl();return e?.i?Pl(String(e.i)):``},ql=async()=>{let e=Wl();if(!e?.d)return``;let t=e.d;if(!t||typeof t!=`string`)return``;let n=t;t.length>6&&t.startsWith(`000`)&&t.endsWith(`000`)&&(n=t.slice(3,-3));let 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`:``},Jl=async()=>{let e=Wl()?.g;if(!e)return``;switch(Number(e)){case 1:return`B`;case 2:return`A`;default:return``}},Yl=async()=>{let e=Wl()?.l;return!e||typeof e!=`string`?``:e.length>4&&e.startsWith(`00`)&&e.endsWith(`00`)?e.slice(2,-2):e},Xl=()=>{let e=0;switch(window.datalayerInfo?.pageName){case`article`:e=Zs(`.c-content`);break;case`live`:e=window.datalayerInfo?.livePosts??0}return e.toString()},Zl=()=>window.datalayerInfo?.pageName===`article`?Qs(`.c-content`).toString():`0`,Ql=()=>{let e=window.datalayerInfo;return e?e.pageName&&[`gamehome`,`gameapp`,`game`].includes(e.pageName)?[`categorie-jeux`]:e.tagsSlug?e.tagsSlug.split(`|`).filter(e=>e):[]:[]},$l=()=>{let e=window.datalayerInfo;return e?e.pageName&&[`gamehome`,`gameapp`,`game`].includes(e.pageName)?[`services`,`jeux`]:e.breadcrumb?e.breadcrumb:[]:[]},eu=async()=>{let e=window.datalayerInfo;if(!e)return;let t={URL:e.pageUri||``,title_article:e.contentTitle||``,editor_group:`20minutes`,environnement:`20minutes`,keywords:`[${Ql().join(`,`)}]`,topics:`[${$l().join(`,`)}]`,publication_date:e.publicationDate?zs(e.publicationDate):``,media_enrichment:`[${Ul().join(`,`)}]`,blocked_article:`0`,premium_article:`0`,length_words:Zl(),nb_paragraph:Xl(),reading_time:``,sponsored:[`production`,`publicommunique`,`magazine`,`guide-achat`].includes(window.datalayerInfo?.subType||``)?`1`:`0`,sponsored_by:``,editor_user_id:``,website_user_id:await Kl()||``,inscription_date:``,user_connected:Gl()?`1`:`0`,user_subscriber:`0`,type_subscription:`[]`,navigation:window.layout||``,INSEE_code:e.inseeCode||``,zipcode:``,departement_id:``,departement_label:``,city:``,id_crm:await Kl()||``,email_hashed:``,TRE:await Jl()||``,TGE:await ql()||``,IDP:await Yl()||``,consent_366:`1`};window.Wvar=[];for(let[e,n]of Object.entries(t))window.Wvar.push(e,n)},tu=()=>{gl(`Weborama`,()=>{window.Didomi.getCurrentUserStatus().purposes[`publicite-9qedKJMX`].enabled&&window.Didomi.getCurrentUserStatus().vendors.weborama?.enabled&&window.Didomi.getCurrentUserStatus().vendors[`366sas-U9KhdfCC`]?.enabled&&hl({name:`Weborama SDK`,load:`async`,src:`//cstatic.weborama.fr/js/wam/customers/wamfactory_dpm.wildcard.min.js?rnd=${Date.now()}`})})},nu=async()=>{try{Hl(),await eu()}catch(e){console.error(`Error initializing Weborama data:`,e)}},ru=async()=>{await nu();try{tu()}catch(e){console.error(`Error initializing Weborama:`,e)}},iu=()=>{if(!document.getElementById(`contact-form`))return;let 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;let{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`)},au=()=>{let e=document.querySelector(`.js-close-article-btn`);e&&window?.location&&window?.envVariables?.pageEndpoint&&e.addEventListener(`click`,()=>{Z({name:`close_content`,type:`action`,customProps:{cta_context:`content`,cta_type:`button`,cta_destination:`home`,cta_engagement:1}}),window.location.assign(window.envVariables.pageEndpoint)})};var ou=()=>{au()};let su=()=>{if(!new URLSearchParams(document.location.search).has(`comment_id`))return;let e=document.getElementById(`commentAnchor`);e&&e.scrollIntoView({behavior:`smooth`,block:`start`})};var cu=(/* @__PURE__ */ o(((e,t)=>{t.exports=window.ReactDOMClient})))();let lu=async({url:e,options:t})=>{let n={...t||{}},r=new Headers(n.headers);r.has(`Content-Type`)||r.set(`Content-Type`,`application/json`),n.headers=r;let i=await fetch(e,n).then(e=>{if(e.ok)return e;throw Error(`Fetch error: ${e.statusText}`)}).then(e=>r.get(`Content-Type`)?.toLowerCase()?.includes(`image/svg+xml`)?e.text():e.json());return typeof i==`object`&&i&&`data`in i?i.data:i},uu={BAN_ATF:`[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250], [1600,1200]]`,BAN_BTF:`[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]`,BAN_MTF:`[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]`,INREAD:`[[1,1], [300,250], [300,250], [480,360]]`,INSTREAM_DESKTOP:`[[300,250], [640,380], [640,533]]`,PAVE_ARTICLE:`[[1,1], [300,250]]`,PAVE_ATF:`[[1,1], [300,250], [300,600], [336,280]]`,PAVE_BTF:`[[1,1], [300,250], [300,600], [336,280]]`,PAVE_COM:`[[1,1], [300,250], [336,280], [600,250], [770,250]]`,PAVE_MTF:`[[1,1], [300,250], [300,600], [336,280]]`},du={ARTICLE_ATF:`[[1,1], [300,50], [300,100], [300, 168], [300,250], [320,50], [320,100], [336,280]]`,ARTICLE_BTF:`[[1,1], [300,50], [300,100], [300, 168], [300,250], [320,50], [320,100]]`,ARTICLE_MTF:`[[1,1], [300,50], [300,100], [300, 168], [300,250], [320,50], [320,100], [336,280]]`,HEADER_AD:`[[1,1], [300,50], [300,100], [320,50], [320,100], "fluid"]`,INREAD:`[[1,1], [300,250], [300,250], [336,280], "fluid"]`,INSTREAM_MOBILE:`[[300,250], [640,380]]`,INTRASTITIEL_PROG:`[[1,1], [320,480]]`,PAVE_COM:`[[1,1], [300,168], [300,250], [300,250], [320,50], [320,100], [320,480], [336,280]]`},fu={BAN_ATF:`[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250], [1600,1200]]`,BAN_BTF:`[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]`,BAN_MTF:`[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]`,INREAD:`[[1,1], [300,250], [300,250], [480,360]]`,PAVE_ARTICLE:`[[1,1], [300,250]]`,PAVE_ATF:`[[1,1], [300,250], [300,600], [336,280]]`,PAVE_BTF:`[[1,1], [300,250], [300,600]]`,PAVE_COM:`[[1,1], [300,250]]`,PAVE_HOME:`[[1,1], [300,250]]`},pu={ARTICLE_ATF:`[[1,1], [300,50], [300,100], [300, 168], [300,250], [320,50], [320,100], [336,280]]`,ARTICLE_BTF:`[[1,1], [300,50], [300,100], [300, 168], [300,250], [320,50], [320,100]]`,ARTICLE_MTF:`[[1,1], [300,50], [300,100], [300, 168], [300,250], [320,50], [320,100], [336,280]]`,HEADER_AD:`[[1,1], [320,50], [320,100], "fluid"]`,INREAD:`[[300,250], [300,250], [336,280], "fluid"]`,INTRASTITIEL_GAG:`[[1,1], [320,480]]`,INTRASTITIEL_PROG:`[[1,1], [320,480]]`,NFB_1:`[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280], "fluid"]`,NFB_2:`[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]`,NFB_3:`[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]`,NFB_4:`[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]`},mu={BAN_ATF:`[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250], [1600,1200]]`,BAN_BTF:`[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]`,BAN_MTF:`[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]`,INREAD:`[[1,1], [300,250], [300,250], [480,360]]`,PAVE_ARTICLE:`[[1,1], [300,250]]`,PAVE_ATF:`[[1,1], [300,250], [300,600], [336,280]]`,PAVE_BTF:`[[1,1], [300,250], [300,600]]`,PAVE_COM:`[[1,1], [300,250]]`,PAVE_MTF:`[[1,1], [300,250], [300,600]]`,PAVE_HOME:`[[1,1], [300,250]]`},hu={ARTICLE_ATF:`[[1,1], [300,50], [300,100], [300, 168], [300,250], [320,50], [320,100], [336,280]]`,ARTICLE_BTF:`[[1,1], [300,50], [300,100], [300, 168], [300,250], [320,50], [320,100]]`,ARTICLE_MTF:`[[1,1], [300,50], [300,100], [300, 168], [300,250], [320,50], [320,100], [336,280]]`,HEADER_AD:`[[1,1], [320,50], [320,100], "fluid"]`,INREAD:`[[300,250], [300,250], [336,280], "fluid"]`,INSTREAM_MOBILE:`[[300,250], [640,380]]`,INTRASTITIEL_PROG:`[[1,1], [320,480]]`,NFB_1:`[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280], "fluid"]`,NFB_2:`[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]`,NFB_3:`[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]`,NFB_4:`[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]`,PAVE_COM:`[[1,1], [300,168], [300,250], [300,250], [320,50], [320,100], [320,480], [336,280]]`},gu={BAN_ATF:`[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250], [1600,1200]]`,BAN_BTF:`[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]`,BAN_MTF:`[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]`,BAN_MTF1:`[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]`,BAN_MTF2:`[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]`,INSTREAM_DESKTOP:`[[300,250], [640,380], [640,533]]`,NATIVE_WEB:`[[1,1], [300,250], [336,280], "fluid"]`,PAVE_ARTICLE:`[[1,1], [300,250]]`,PAVE_ATF:`[[1,1], [300,250], [300,600], [336,280]]`,PAVE_BTF:`[[1,1], [300,250], [300,600]]`,PAVE_MTF:`[[1,1], [300,250], [300,600]]`,PAVE_HOME:`[[1,1], [300,250]]`},_u={HEADER_AD:`[[1,1], [300,50], [300,100], [320,50], [320,100], "fluid"]`,INSTREAM_MOBILE:`[[300,250], [640,380], [640,533]]`,INTRASTITIEL_PROG:`[[1,1], [320,480]]`,NFB_1:`[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280], [360,250], "fluid"]`,NFB_2:`[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]`,NFB_3:`[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]`,NFB_4:`[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]`,NFB_5:`[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]`,NFB_6:`[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]`,NFB_7:`[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]`};Object.keys({...uu,...du,...fu,...pu,...gu,..._u,...mu,...hu});let vu=e=>{switch(e){case`page_type`:case`content_type`:if(window.datalayerInfo?.pageName&&Object.values(nl).includes(window.datalayerInfo?.pageName))switch(window.datalayerInfo?.pageName){case`home`:return`homepage`;case`tag`:return`home`;case`jobs`:return`home_metier`;case`jobdetails`:return`fiche_metier`;case`astro`:return`horoscope`;case`astrohome`:return`horoscopehome`;default:return window.datalayerInfo?.pageName}return`divers`;case`content_id`:return window.datalayerInfo?.contentId??window.datalayerInfo?.tagId??window.datalayerInfo?.jobId??void 0;case`tags`:if(window.datalayerInfo?.elections&&(window.datalayerInfo?.pageName===`elections`||window.datalayerInfo?.pageName===`electionshome`)){let{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,`,`):qs(window.datalayerInfo?.tagName??``,`_`)||void 0;case`category`:return window.datalayerInfo?.elections&&(window.datalayerInfo?.pageName===`elections`||window.datalayerInfo?.pageName===`electionshome`)?`elections`:window.datalayerInfo?.breadcrumb?.[0]?window.datalayerInfo?.breadcrumb[0]===`Divertissement`?`arts-stars`:qs(window.datalayerInfo?.breadcrumb[0]):window.datalayerInfo?.pageName===`astro`||window.datalayerInfo?.pageName===`astrohome`?qs(window.datalayerInfo?.pageName===`astro`?`horoscope`:`horoscopehome`):window.datalayerInfo?.sectionLabel?qs(window.datalayerInfo.sectionLabel):void 0;case`subcategory`:if(window.datalayerInfo?.elections&&(window.datalayerInfo?.pageName===`elections`||window.datalayerInfo?.pageName===`electionshome`))return`resultats`;if(window.datalayerInfo?.breadcrumb&&window.datalayerInfo?.breadcrumb.length>1){let e=qs(window.datalayerInfo.breadcrumb[window.datalayerInfo.breadcrumb.length-(window.datalayerInfo?.pageName===`tag`?2:1)]);return e===qs(window.datalayerInfo?.breadcrumb[0])?qs(window.datalayerInfo?.tagName??``)||void 0:e||void 0}return;case`content_slug`:return window.datalayerInfo?.contentTitle?qs(window.datalayerInfo.contentTitle):void 0;case`brand_safety`:return window.datalayerInfo?.sentiment;case`has_video`:return window.partnerFeatures?.enableDisplayOnHeaderAd===void 0?void 0:window.partnerFeatures.enableDisplayOnHeaderAd.toString();case`device`:return window.layout??void 0;default:return}},yu=()=>`category=${vu(`category`)}&sub_category=${vu(`subcategory`)}&tags=${vu(`tags`)}&content_id=${vu(`content_id`)}&brand_safety=${vu(`brand_safety`)}&page_type=${vu(`page_type`)}&pos=instream`,bu=()=>{let e=Fl(),t=window.datalayerInfo||{};Object.keys(t).length!==0&&e.length!==0&&e.forEach(e=>{let t=e.getAttribute(`data-src`);if(!t)return;let{origin:n,pathname:r,searchParams:i}=new URL(t),a=`${n}${r}`,o=yu();i.append(`tagparam`,o),e.setAttribute(`data-src`,`${a}?${i.toString()}`)})},xu=()=>{let e=window.datalayerInfo?.pageName,t=[`tvhome`,`mostread`],n=window.datalayerInfo?.pageKey,r=e&&t.includes(e)||n&&[`guide-achat`].includes(n);if(window.layout===Y.DESKTOP&&!r)return;try{_l(`digiteka-video-feed`)}catch(e){e instanceof Error&&console.error(e.message)}let i=yu(),a=[`MDTK_videofeed_custparams="${i}";`,`MDTK_videofeed_targetings="${i}";`,`MDTK_videofeed = "01100132";`,e===`tag`&&n===`guide-achat`?`MDTK_videofeed_zone_index = 13;`:``,Ll().length>0&&window.layout===Y.DESKTOP?`CARROUSEL_videofeed=true;`:``,`MDTK_videofeed_adunit_path="/31755961/20minutes_webmobile/display_mobile_vertical";`,`MDTK_videofeed_adunit_path_interstitial="/31755961/20minutes_webmobile/intrastitiel_dtk";`];hl({text:a.join(``)})},Su=()=>{let e=Fl();e&&e.forEach(e=>{let t=e.getAttribute(`data-src`);if(!t)return;let{origin:n,pathname:r,search:i}=new URL(t),a=`${n}${r}`.replace(/\/chromeless\/1$/,``).replace(/\/$/,``);e.setAttribute(`data-src`,`${a}/chromeless/1${i}`)})},Cu=()=>{let e=Fl();e.length!==0&&e.forEach(e=>{let t=e.getAttribute(`data-src`);t&&(e.setAttribute(`src`,t),e.removeAttribute(`data-src`))})};var wu=()=>{bu(),window.layout===Y.MOBILE&&Su(),xu(),Cu()};let Tu={favorite:{href:`https://www.google.com/preferences/source?q=20minutes.fr`,label:`Ajouter 20 Minutes en favori`},discover:{href:`https://profile.google.com/cp/Eg4KDDIwbWludXRlcy5mcg`,label:`Suivre 20 Minutes sur Google Discover`}},Eu=()=>{let e=document.querySelector(`a.js-google-source`);if(!e)return;let t=Object.keys(Tu),n=t[Math.floor(Math.random()*t.length)];if(e.dataset.googleSource===n)return;let{href:r,label:i}=Tu[n],a=e.querySelector(`.js-google-source-label`);e.href=r,e.dataset.googleSource=n,a&&(a.textContent=i)},Du=({src:e,timeout:t,loadingText:n,theme:r,...i})=>/* @__PURE__ */ (0,U.jsx)(q,{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}),Ou=({articles:e,linksSize:t,seeMoreButton:n,...r})=>e.length===0?null:/* @__PURE__ */ (0,U.jsxs)(U.Fragment,{children:[/* @__PURE__ */ (0,U.jsx)(to,{colsNumber:{xs:1,md:3},...r,as:`ul`,gapY:`xxl-2`,gapX:`l`,px:{xs:`m`,md:`0`},children:e.map((e,n)=>/* @__PURE__ */ (0,U.jsx)(no,{href:e.url,color:`black`,size:t||`xs`,children:/* @__PURE__ */ (0,U.jsx)(`li`,{children:e.title})},`${e.url}-${n}`))}),n&&/* @__PURE__ */ (0,U.jsx)(J,{justifyContent:`center`,px:{xs:`m`,md:`0`},mt:`l`,children:/* @__PURE__ */ (0,U.jsx)(Oa,{...n})})]});var ku=/* @__PURE__ */ o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.Immutable=r()})(e,function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return o(e)?e:I(e)}t(r,n);function r(e){return s(e)?e:de(e)}t(i,n);function i(e){return c(e)?e:fe(e)}t(a,n);function a(e){return o(e)&&!l(e)?e:pe(e)}function o(e){return!!(e&&e[d])}function s(e){return!!(e&&e[f])}function c(e){return!!(e&&e[p])}function l(e){return s(e)||c(e)}function u(e){return!!(e&&e[m])}n.isIterable=o,n.isKeyed=s,n.isIndexed=c,n.isAssociative=l,n.isOrdered=u,n.Keyed=r,n.Indexed=i,n.Set=a;var d=`@@__IMMUTABLE_ITERABLE__@@`,f=`@@__IMMUTABLE_KEYED__@@`,p=`@@__IMMUTABLE_INDEXED__@@`,m=`@@__IMMUTABLE_ORDERED__@@`,h=`delete`,g=5,_=1<<g,v=_-1,y={},b={value:!1},x={value:!1};function S(e){return e.value=!1,e}function C(e){e&&(e.value=!0)}function w(){}function T(e,t){t||=0;for(var n=Math.max(0,e.length-t),r=Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function E(e){return e.size===void 0&&(e.size=e.__iterate(O)),e.size}function D(e,t){if(typeof t!=`number`){var n=t>>>0;if(``+n!==t||n===4294967295)return NaN;t=n}return t<0?E(e)+t:t}function O(){return!0}function k(e,t,n){return(e===0||n!==void 0&&e<=-n)&&(t===void 0||n!==void 0&&t>=n)}function A(e,t){return te(e,t,0)}function ee(e,t){return te(e,t,t)}function te(e,t,n){return e===void 0?n:e<0?Math.max(0,t+e):t===void 0?e:Math.min(t,e)}var ne=0,j=1,M=2,re=typeof Symbol==`function`&&Symbol.iterator,N=`@@iterator`,ie=re||N;function P(e){this.next=e}P.prototype.toString=function(){return`[Iterator]`},P.KEYS=ne,P.VALUES=j,P.ENTRIES=M,P.prototype.inspect=P.prototype.toSource=function(){return this.toString()},P.prototype[ie]=function(){return this};function F(e,t,n,r){var i=e===0?t:e===1?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function ae(){return{value:void 0,done:!0}}function oe(e){return!!le(e)}function se(e){return e&&typeof e.next==`function`}function ce(e){var t=le(e);return t&&t.call(e)}function le(e){var t=e&&(re&&e[re]||e[N]);if(typeof t==`function`)return t}function ue(e){return e&&typeof e.length==`number`}t(I,n);function I(e){return e==null?xe():o(e)?e.toSeq():we(e)}I.of=function(){return I(arguments)},I.prototype.toSeq=function(){return this},I.prototype.toString=function(){return this.__toString(`Seq {`,`}`)},I.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},I.prototype.__iterate=function(e,t){return Ee(this,e,t,!0)},I.prototype.__iterator=function(e,t){return De(this,e,t,!0)},t(de,I);function de(e){return e==null?xe().toKeyedSeq():o(e)?s(e)?e.toSeq():e.fromEntrySeq():Se(e)}de.prototype.toKeyedSeq=function(){return this},t(fe,I);function fe(e){return e==null?xe():o(e)?s(e)?e.entrySeq():e.toIndexedSeq():Ce(e)}fe.of=function(){return fe(arguments)},fe.prototype.toIndexedSeq=function(){return this},fe.prototype.toString=function(){return this.__toString(`Seq [`,`]`)},fe.prototype.__iterate=function(e,t){return Ee(this,e,t,!1)},fe.prototype.__iterator=function(e,t){return De(this,e,t,!1)},t(pe,I);function pe(e){return(e==null?xe():o(e)?s(e)?e.entrySeq():e:Ce(e)).toSetSeq()}pe.of=function(){return pe(arguments)},pe.prototype.toSetSeq=function(){return this},I.isSeq=ye,I.Keyed=de,I.Set=pe,I.Indexed=fe;var me=`@@__IMMUTABLE_SEQ__@@`;I.prototype[me]=!0,t(he,fe);function he(e){this._array=e,this.size=e.length}he.prototype.get=function(e,t){return this.has(e)?this._array[D(this,e)]:t},he.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,i=0;i<=r;i++)if(e(n[t?r-i:i],i,this)===!1)return i+1;return i},he.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,i=0;return new P(function(){return i>r?ae():F(e,i,n[t?r-i++:i++])})},t(ge,de);function ge(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}ge.prototype.get=function(e,t){return t!==void 0&&!this.has(e)?t:this._object[e]},ge.prototype.has=function(e){return this._object.hasOwnProperty(e)},ge.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,a=0;a<=i;a++){var o=r[t?i-a:a];if(e(n[o],o,this)===!1)return a+1}return a},ge.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,a=0;return new P(function(){var o=r[t?i-a:a];return a++>i?ae():F(e,o,n[o])})},ge.prototype[m]=!0,t(_e,fe);function _e(e){this._iterable=e,this.size=e.length||e.size}_e.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable,r=ce(n),i=0;if(se(r))for(var a;!(a=r.next()).done&&e(a.value,i++,this)!==!1;);return i},_e.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterable,r=ce(n);if(!se(r))return new P(ae);var i=0;return new P(function(){var t=r.next();return t.done?t:F(e,i++,t.value)})},t(ve,fe);function ve(e){this._iterator=e,this._iteratorCache=[]}ve.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,i=0;i<r.length;)if(e(r[i],i++,this)===!1)return i;for(var a;!(a=n.next()).done;){var o=a.value;if(r[i]=o,e(o,i++,this)===!1)break}return i},ve.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,i=0;return new P(function(){if(i>=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return F(e,i,r[i++])})};function ye(e){return!!(e&&e[me])}var be;function xe(){return be||=new he([])}function Se(e){var t=Array.isArray(e)?new he(e).fromEntrySeq():se(e)?new ve(e).fromEntrySeq():oe(e)?new _e(e).fromEntrySeq():typeof e==`object`?new ge(e):void 0;if(!t)throw TypeError(`Expected Array or iterable object of [k, v] entries, or keyed object: `+e);return t}function Ce(e){var t=Te(e);if(!t)throw TypeError(`Expected Array or iterable object of values: `+e);return t}function we(e){var t=Te(e)||typeof e==`object`&&new ge(e);if(!t)throw TypeError(`Expected Array or iterable object of values, or keyed object: `+e);return t}function Te(e){return ue(e)?new he(e):se(e)?new ve(e):oe(e)?new _e(e):void 0}function Ee(e,t,n,r){var i=e._cache;if(i){for(var a=i.length-1,o=0;o<=a;o++){var s=i[n?a-o:o];if(t(s[1],r?s[0]:o,e)===!1)return o+1}return o}return e.__iterateUncached(t,n)}function De(e,t,n,r){var i=e._cache;if(i){var a=i.length-1,o=0;return new P(function(){var e=i[n?a-o:o];return o++>a?ae():F(t,r?e[0]:o-1,e[1])})}return e.__iteratorUncached(t,n)}function Oe(e,t){return t?ke(t,e,``,{"":e}):Ae(e)}function ke(e,t,n,r){return Array.isArray(t)?e.call(r,n,fe(t).map(function(n,r){return ke(e,n,r,t)})):je(t)?e.call(r,n,de(t).map(function(n,r){return ke(e,n,r,t)})):t}function Ae(e){return Array.isArray(e)?fe(e).map(Ae).toList():je(e)?de(e).map(Ae).toMap():e}function je(e){return e&&(e.constructor===Object||e.constructor===void 0)}function Me(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if(typeof e.valueOf==`function`&&typeof t.valueOf==`function`){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!!(typeof e.equals==`function`&&typeof t.equals==`function`&&e.equals(t))}function Ne(e,t){if(e===t)return!0;if(!o(t)||e.size!==void 0&&t.size!==void 0&&e.size!==t.size||e.__hash!==void 0&&t.__hash!==void 0&&e.__hash!==t.__hash||s(e)!==s(t)||c(e)!==c(t)||u(e)!==u(t))return!1;if(e.size===0&&t.size===0)return!0;var n=!l(e);if(u(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&Me(i[1],e)&&(n||Me(i[0],t))})&&r.next().done}var i=!1;if(e.size===void 0){if(t.size===void 0)typeof e.cacheResult==`function`&&e.cacheResult();else{i=!0;var a=e;e=t,t=a}}var d=!0,f=t.__iterate(function(t,r){if(n?!e.has(t):i?!Me(t,e.get(r,y)):!Me(e.get(r,y),t))return d=!1,!1});return d&&e.size===f}t(Pe,fe);function Pe(e,t){if(!(this instanceof Pe))return new Pe(e,t);if(this._value=e,this.size=t===void 0?1/0:Math.max(0,t),this.size===0){if(Fe)return Fe;Fe=this}}Pe.prototype.toString=function(){return this.size===0?`Repeat []`:`Repeat [ `+this._value+` `+this.size+` times ]`},Pe.prototype.get=function(e,t){return this.has(e)?this._value:t},Pe.prototype.includes=function(e){return Me(this._value,e)},Pe.prototype.slice=function(e,t){var n=this.size;return k(e,t,n)?this:new Pe(this._value,ee(t,n)-A(e,n))},Pe.prototype.reverse=function(){return this},Pe.prototype.indexOf=function(e){return Me(this._value,e)?0:-1},Pe.prototype.lastIndexOf=function(e){return Me(this._value,e)?this.size:-1},Pe.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(e(this._value,n,this)===!1)return n+1;return n},Pe.prototype.__iterator=function(e,t){var n=this,r=0;return new P(function(){return r<n.size?F(e,r++,n._value):ae()})},Pe.prototype.equals=function(e){return e instanceof Pe?Me(this._value,e._value):Ne(e)};var Fe;function Ie(e,t){if(!e)throw Error(t)}t(Le,fe);function Le(e,t,n){if(!(this instanceof Le))return new Le(e,t,n);if(Ie(n!==0,`Cannot step a Range by 0`),e||=0,t===void 0&&(t=1/0),n=n===void 0?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),this.size===0){if(L)return L;L=this}}Le.prototype.toString=function(){return this.size===0?`Range []`:`Range [ `+this._start+`...`+this._end+(this._step===1?``:` by `+this._step)+` ]`},Le.prototype.get=function(e,t){return this.has(e)?this._start+D(this,e)*this._step:t},Le.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},Le.prototype.slice=function(e,t){return k(e,t,this.size)?this:(e=A(e,this.size),t=ee(t,this.size),t<=e?new Le(0,0):new Le(this.get(e,this._end),this.get(t,this._end),this._step))},Le.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},Le.prototype.lastIndexOf=function(e){return this.indexOf(e)},Le.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,a=0;a<=n;a++){if(e(i,a,this)===!1)return a+1;i+=t?-r:r}return a},Le.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,a=0;return new P(function(){var o=i;return i+=t?-r:r,a>n?ae():F(e,a++,o)})},Le.prototype.equals=function(e){return e instanceof Le?this._start===e._start&&this._end===e._end&&this._step===e._step:Ne(this,e)};var L;t(Re,n);function Re(){throw TypeError(`Abstract`)}t(ze,Re);function ze(){}t(Be,Re);function Be(){}t(R,Re);function R(){}Re.Keyed=ze,Re.Indexed=Be,Re.Set=R;var Ve=typeof Math.imul==`function`?Math.imul:function(e,t){e|=0,t|=0;var n=e&65535,r=t&65535;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function He(e){return e>>>1&1073741824|e&3221225471}function Ue(e){if(e===!1||e==null||typeof e.valueOf==`function`&&(e=e.valueOf(),e===!1||e==null))return 0;if(e===!0)return 1;var t=typeof e;if(t===`number`){if(e!==e||e===1/0)return 0;var n=e|0;for(n!==e&&(n^=e*4294967295);e>4294967295;)e/=4294967295,n^=e;return He(n)}if(t===`string`)return e.length>nt?We(e):Ge(e);if(typeof e.hashCode==`function`)return e.hashCode();if(t===`object`)return Je(e);if(typeof e.toString==`function`)return Ge(e.toString());throw Error(`Value type `+t+` cannot be hashed.`)}function We(e){var t=at[e];return t===void 0&&(t=Ge(e),it===rt&&(it=0,at={}),it++,at[e]=t),t}function Ge(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return He(t)}var Ke=(Math.random()*1048576|1)%1048576||40503;function qe(e){if(typeof e!=`string`)return Ue(e);for(var t=0,n=0;n<e.length;n++)t=Ke*t+e.charCodeAt(n)|0;return t}function Je(e){var t;if(Qe&&(t=$e.get(e),t!==void 0)||(t=e[tt],t!==void 0)||!Xe&&(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[tt],t!==void 0||(t=Ze(e),t!==void 0)))return t;if(t=++et,et&1073741824&&(et=0),Qe)$e.set(e,t);else if(Ye!==void 0&&Ye(e)===!1)throw Error(`Non-extensible objects are not allowed as keys.`);else if(Xe)Object.defineProperty(e,tt,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(e.propertyIsEnumerable!==void 0&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[tt]=t;else if(e.nodeType!==void 0)e[tt]=t;else throw Error(`Unable to set a non-enumerable property on object.`);return t}var Ye=Object.isExtensible,Xe=function(){try{return Object.defineProperty({},"@",{}),!0}catch{return!1}}();function Ze(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Qe=typeof WeakMap==`function`,$e;Qe&&($e=/* @__PURE__ */ new WeakMap);var et=0,tt=`__immutablehash__`;typeof Symbol==`function`&&(tt=Symbol(tt));var nt=16,rt=255,it=0,at={};function ot(e){Ie(e!==1/0,`Cannot perform this action with an infinite size.`)}t(z,ze);function z(e){return e==null?vt():st(e)&&!u(e)?e:vt().withMutations(function(t){var n=r(e);ot(n.size),n.forEach(function(e,n){return t.set(n,e)})})}z.of=function(){var t=e.call(arguments,0);return vt().withMutations(function(e){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw Error(`Missing value for key: `+t[n]);e.set(t[n],t[n+1])}})},z.prototype.toString=function(){return this.__toString(`Map {`,`}`)},z.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},z.prototype.set=function(e,t){return yt(this,e,t)},z.prototype.setIn=function(e,t){return this.updateIn(e,y,function(){return t})},z.prototype.remove=function(e){return yt(this,e,y)},z.prototype.deleteIn=function(e){return this.updateIn(e,function(){return y})},z.prototype.update=function(e,t,n){return arguments.length===1?e(this):this.updateIn([e],t,n)},z.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=At(this,Bn(e),t,n);return r===y?void 0:r},z.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):vt()},z.prototype.merge=function(){return Et(this,void 0,arguments)},z.prototype.mergeWith=function(t){var n=e.call(arguments,1);return Et(this,t,n)},z.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,vt(),function(e){return typeof e.merge==`function`?e.merge.apply(e,n):n[n.length-1]})},z.prototype.mergeDeep=function(){return Et(this,Dt,arguments)},z.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Et(this,Ot(t),n)},z.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,vt(),function(e){return typeof e.mergeDeep==`function`?e.mergeDeep.apply(e,n):n[n.length-1]})},z.prototype.sort=function(e){return H(kn(this,e))},z.prototype.sortBy=function(e,t){return H(kn(this,t,e))},z.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},z.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new w)},z.prototype.asImmutable=function(){return this.__ensureOwner()},z.prototype.wasAltered=function(){return this.__altered},z.prototype.__iterator=function(e,t){return new pt(this,e,t)},z.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},z.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?gt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)};function st(e){return!!(e&&e[ct])}z.isMap=st;var ct=`@@__IMMUTABLE_MAP__@@`,B=z.prototype;B[ct]=!0,B[h]=B.remove,B.removeIn=B.deleteIn;function lt(e,t){this.ownerID=e,this.entries=t}lt.prototype.get=function(e,t,n,r){for(var i=this.entries,a=0,o=i.length;a<o;a++)if(Me(n,i[a][0]))return i[a][1];return r},lt.prototype.update=function(e,t,n,r,i,a,o){for(var s=i===y,c=this.entries,l=0,u=c.length;l<u&&!Me(r,c[l][0]);l++);var d=l<u;if(d?c[l][1]===i:s)return this;if(C(o),(s||!d)&&C(a),!(s&&c.length===1)){if(!d&&!s&&c.length>=Ft)return Ct(e,c,r,i);var f=e&&e===this.ownerID,p=f?c:T(c);return d?s?l===u-1?p.pop():p[l]=p.pop():p[l]=[r,i]:p.push([r,i]),f?(this.entries=p,this):new lt(e,p)}};function ut(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}ut.prototype.get=function(e,t,n,r){t===void 0&&(t=Ue(n));var i=1<<((e===0?t:t>>>e)&v),a=this.bitmap;return(a&i)===0?r:this.nodes[jt(a&i-1)].get(e+g,t,n,r)},ut.prototype.update=function(e,t,n,r,i,a,o){n===void 0&&(n=Ue(r));var s=(t===0?n:n>>>t)&v,c=1<<s,l=this.bitmap,u=(l&c)!==0;if(!u&&i===y)return this;var d=jt(l&c-1),f=this.nodes,p=u?f[d]:void 0,m=bt(p,e,t+g,n,r,i,a,o);if(m===p)return this;if(!u&&m&&f.length>=It)return Tt(e,f,l,s,m);if(u&&!m&&f.length===2&&xt(f[d^1]))return f[d^1];if(u&&m&&f.length===1&&xt(m))return m;var h=e&&e===this.ownerID,_=u?m?l:l^c:l|c,b=u?m?Mt(f,d,m,h):Pt(f,d,h):Nt(f,d,m,h);return h?(this.bitmap=_,this.nodes=b,this):new ut(e,_,b)};function dt(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}dt.prototype.get=function(e,t,n,r){t===void 0&&(t=Ue(n));var i=(e===0?t:t>>>e)&v,a=this.nodes[i];return a?a.get(e+g,t,n,r):r},dt.prototype.update=function(e,t,n,r,i,a,o){n===void 0&&(n=Ue(r));var s=(t===0?n:n>>>t)&v,c=i===y,l=this.nodes,u=l[s];if(c&&!u)return this;var d=bt(u,e,t+g,n,r,i,a,o);if(d===u)return this;var f=this.count;if(!u)f++;else if(!d&&(f--,f<Lt))return wt(e,l,f,s);var p=e&&e===this.ownerID,m=Mt(l,s,d,p);return p?(this.count=f,this.nodes=m,this):new dt(e,f,m)};function ft(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n,this._index=void 0}ft.prototype._positionOf=function(e,t){var n=this.entries,r=this._index;if(r===void 0&&t&&n.length>=Rt&&(r=this._buildIndex()),r!==void 0){var i=r[qe(e)];if(i!==void 0)for(var a=0;a<i.length;a++){var o=i[a];if(Me(e,n[o][0]))return o}return-1}for(var s=0,c=n.length;s<c;s++)if(Me(e,n[s][0]))return s;return-1},ft.prototype._buildIndex=function(){for(var e=Object.create(null),t=this.entries,n=0,r=t.length;n<r;n++){var i=qe(t[n][0]),a=e[i];a===void 0?e[i]=[n]:a.push(n)}return this._index=e,e},ft.prototype.get=function(e,t,n,r){var i=this._positionOf(n,!0);return i===-1?r:this.entries[i][1]},ft.prototype.update=function(e,t,n,r,i,a,o){n===void 0&&(n=Ue(r));var s=i===y;if(n!==this.keyHash)return s?this:(C(o),C(a),St(this,e,t,n,[r,i]));var c=this.entries,l=c.length,u=e&&e===this.ownerID,d=this._positionOf(r,u),f=d===-1?l:d,p=d!==-1;if(p?c[f][1]===i:s)return this;if(C(o),(s||!p)&&C(a),s&&l===2)return new V(e,this.keyHash,c[f^1]);var m=u?c:T(c);if(p)s?(f===l-1?m.pop():m[f]=m.pop(),u&&(this._index=void 0)):m[f]=[r,i];else if(m.push([r,i]),u&&this._index!==void 0){var h=qe(r),g=this._index[h];g===void 0?this._index[h]=[l]:g.push(l)}return u?(this.entries=m,this):new ft(e,this.keyHash,m)};function V(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}V.prototype.get=function(e,t,n,r){return Me(n,this.entry[0])?this.entry[1]:r},V.prototype.update=function(e,t,n,r,i,a,o){var s=i===y,c=Me(r,this.entry[0]);if(c?i===this.entry[1]:s)return this;if(C(o),s)C(a);else return c?e&&e===this.ownerID?(this.entry[1]=i,this):new V(e,this.keyHash,[r,i]):(C(a),St(this,e,t,Ue(r),[r,i]))},lt.prototype.iterate=ft.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(e(n[t?i-r:r])===!1)return!1},ut.prototype.iterate=dt.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var a=n[t?i-r:r];if(a&&a.iterate(e,t)===!1)return!1}},V.prototype.iterate=function(e,t){return e(this.entry)},t(pt,P);function pt(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&ht(e._root)}pt.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,i;if(n.entry){if(r===0)return mt(e,n.entry)}else if(n.entries){if(i=n.entries.length-1,r<=i)return mt(e,n.entries[this._reverse?i-r:r])}else if(i=n.nodes.length-1,r<=i){var a=n.nodes[this._reverse?i-r:r];if(a){if(a.entry)return mt(e,a.entry);t=this._stack=ht(a,t)}continue}t=this._stack=this._stack.__prev}return ae()};function mt(e,t){return F(e,t[0],t[1])}function ht(e,t){return{node:e,index:0,__prev:t}}function gt(e,t,n,r){var i=Object.create(B);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}var _t;function vt(){return _t||=gt(0)}function yt(e,t,n){var r,i;if(e._root){var a=S(b),o=S(x);if(r=bt(e._root,e.__ownerID,0,void 0,t,n,a,o),!o.value)return e;i=e.size+(a.value?n===y?-1:1:0)}else{if(n===y)return e;i=1,r=new lt(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?gt(i,r):vt()}function bt(e,t,n,r,i,a,o,s){return e?e.update(t,n,r,i,a,o,s):a===y?e:(C(s),C(o),new V(t,r,[i,a]))}function xt(e){return e.constructor===V||e.constructor===ft}function St(e,t,n,r,i){if(e.keyHash===r)return new ft(t,r,[e.entry,i]);var a=(n===0?e.keyHash:e.keyHash>>>n)&v,o=(n===0?r:r>>>n)&v,s,c=a===o?[St(e,t,n+g,r,i)]:(s=new V(t,r,i),a<o?[e,s]:[s,e]);return new ut(t,1<<a|1<<o,c)}function Ct(e,t,n,r){e||=new w;for(var i=new V(e,Ue(n),[n,r]),a=0;a<t.length;a++){var o=t[a];i=i.update(e,0,void 0,o[0],o[1])}return i}function wt(e,t,n,r){for(var i=0,a=0,o=Array(n),s=0,c=1,l=t.length;s<l;s++,c<<=1){var u=t[s];u!==void 0&&s!==r&&(i|=c,o[a++]=u)}return new ut(e,i,o)}function Tt(e,t,n,r,i){for(var a=0,o=Array(_),s=0;n!==0;s++,n>>>=1)o[s]=n&1?t[a++]:void 0;return o[r]=i,new dt(e,a+1,o)}function Et(e,t,n){for(var i=[],a=0;a<n.length;a++){var s=n[a],c=r(s);o(s)||(c=c.map(function(e){return Oe(e)})),i.push(c)}return kt(e,t,i)}function Dt(e,t,n){return e&&e.mergeDeep&&o(t)?e.mergeDeep(t):Me(e,t)?e:t}function Ot(e){return function(t,n,r){if(t&&t.mergeDeepWith&&o(n))return t.mergeDeepWith(e,n);var i=e(t,n,r);return Me(t,i)?t:i}}function kt(e,t,n){return n=n.filter(function(e){return e.size!==0}),n.length===0?e:e.size===0&&!e.__ownerID&&n.length===1?e.constructor(n[0]):e.withMutations(function(e){for(var r=t?function(n,r){e.update(r,y,function(e){return e===y?n:t(e,n,r)})}:function(t,n){e.set(n,t)},i=0;i<n.length;i++)n[i].forEach(r)})}function At(e,t,n,r){var i=e===y,a=t.next();if(a.done){var o=i?n:e,s=r(o);return s===o?e:s}Ie(i||e&&e.set,`invalid keyPath`);var c=a.value,l=i?y:e.get(c,y),u=At(l,t,n,r);return u===l?e:u===y?e.remove(c):(i?vt():e).set(c,u)}function jt(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,e&127}function Mt(e,t,n,r){var i=r?e:T(e);return i[t]=n,i}function Nt(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var a=Array(i),o=0,s=0;s<i;s++)s===t?(a[s]=n,o=-1):a[s]=e[s+o];return a}function Pt(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=Array(r),a=0,o=0;o<r;o++)o===t&&(a=1),i[o]=e[o+a];return i}var Ft=_/4,It=_/2,Lt=_/4,Rt=16;t(zt,Be);function zt(e){var t=Jt();if(e==null)return t;if(Bt(e))return e;var n=i(e),r=n.size;return r===0?t:(ot(r),r>0&&r<_?Kt(0,r,g,null,new Ut(n.toArray())):t.withMutations(function(e){e.setSize(r),n.forEach(function(t,n){return e.set(n,t)})}))}zt.of=function(){return this(arguments)},zt.prototype.toString=function(){return this.__toString(`List [`,`]`)},zt.prototype.get=function(e,t){if(e=D(this,e),e>=0&&e<this.size){e+=this._origin;var n=Qt(this,e);return n&&n.array[e&v]}return t},zt.prototype.set=function(e,t){return Yt(this,e,t)},zt.prototype.remove=function(e){return this.has(e)?e===0?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},zt.prototype.insert=function(e,t){return this.splice(e,0,t)},zt.prototype.clear=function(){return this.size===0?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):Jt()},zt.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){tn(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},zt.prototype.pop=function(){return tn(this,0,-1)},zt.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){tn(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},zt.prototype.shift=function(){return tn(this,1)},zt.prototype.merge=function(){return nn(this,void 0,arguments)},zt.prototype.mergeWith=function(t){var n=e.call(arguments,1);return nn(this,t,n)},zt.prototype.mergeDeep=function(){return nn(this,Dt,arguments)},zt.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return nn(this,Ot(t),n)},zt.prototype.setSize=function(e){return tn(this,0,e)},zt.prototype.slice=function(e,t){var n=this.size;return k(e,t,n)?this:tn(this,A(e,n),ee(t,n))},zt.prototype.__iterator=function(e,t){var n=0,r=Gt(this,t);return new P(function(){var t=r();return t===Wt?ae():F(e,n++,t)})},zt.prototype.__iterate=function(e,t){for(var n=0,r=Gt(this,t),i;(i=r())!==Wt&&e(i,n++,this)!==!1;);return n},zt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Kt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)};function Bt(e){return!!(e&&e[Vt])}zt.isList=Bt;var Vt=`@@__IMMUTABLE_LIST__@@`,Ht=zt.prototype;Ht[Vt]=!0,Ht[h]=Ht.remove,Ht.setIn=B.setIn,Ht.deleteIn=Ht.removeIn=B.removeIn,Ht.update=B.update,Ht.updateIn=B.updateIn,Ht.mergeIn=B.mergeIn,Ht.mergeDeepIn=B.mergeDeepIn,Ht.withMutations=B.withMutations,Ht.asMutable=B.asMutable,Ht.asImmutable=B.asImmutable,Ht.wasAltered=B.wasAltered;function Ut(e,t){this.array=e,this.ownerID=t}Ut.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:this.array.length===0)return this;var r=n>>>t&v;if(r>=this.array.length)return new Ut([],e);var i=r===0,a;if(t>0){var o=this.array[r];if(a=o&&o.removeBefore(e,t-g,n),a===o&&i)return this}if(i&&!a)return this;var s=Zt(this,e);if(!i)for(var c=0;c<r;c++)s.array[c]=void 0;return a&&(s.array[r]=a),s},Ut.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||this.array.length===0)return this;var r=n-1>>>t&v;if(r>=this.array.length)return this;var i;if(t>0){var a=this.array[r];if(i=a&&a.removeAfter(e,t-g,n),i===a&&r===this.array.length-1)return this}var o=Zt(this,e);return o.array.splice(r+1),i&&(o.array[r]=i),o};var Wt={};function Gt(e,t){var n=e._origin,r=e._capacity,i=rn(r),a=e._tail;return o(e._root,e._level,0);function o(e,t,n){return t===0?s(e,n):c(e,t,n)}function s(e,o){var s=o===i?a&&a.array:e&&e.array,c=o>n?0:n-o,l=r-o;return l>_&&(l=_),function(){if(c===l)return Wt;var e=t?--l:c++;return s&&s[e]}}function c(e,i,a){var s,c=e&&e.array,l=a>n?0:n-a>>i,u=(r-a>>i)+1;return u>_&&(u=_),function(){do{if(s){var e=s();if(e!==Wt)return e;s=null}if(l===u)return Wt;var n=t?--u:l++;s=o(c&&c[n],i-g,a+(n<<i))}while(1)}}}function Kt(e,t,n,r,i,a,o){var s=Object.create(Ht);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=i,s.__ownerID=a,s.__hash=o,s.__altered=!1,s}var qt;function Jt(){return qt||=Kt(0,0,g)}function Yt(e,t,n){if(t=D(e,t),t!==t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?tn(e,t).set(0,n):tn(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,a=S(x);return t>=rn(e._capacity)?r=Xt(r,e.__ownerID,0,t,n,a):i=Xt(i,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Kt(e._origin,e._capacity,e._level,i,r):e}function Xt(e,t,n,r,i,a){var o=r>>>n&v,s=e&&o<e.array.length;if(!s&&i===void 0)return e;var c;if(n>0){var l=e&&e.array[o],u=Xt(l,t,n-g,r,i,a);return u===l?e:(c=Zt(e,t),c.array[o]=u,c)}return s&&e.array[o]===i?e:(C(a),c=Zt(e,t),i===void 0&&o===c.array.length-1?c.array.pop():c.array[o]=i,c)}function Zt(e,t){return t&&e&&t===e.ownerID?e:new Ut(e?e.array.slice():[],t)}function Qt(e,t){if(t>=rn(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 $t(e){return typeof e==`number`&&isFinite(e)}function en(e,t,n){var r=e._origin+(t===void 0?0:t),i=n===void 0?e._capacity:n<0?e._capacity+n:e._origin+n;if($t(i)&&i>an||$t(r)&&r<-an||$t(i)&&$t(r)&&i-r>an)throw RangeError(`Invalid List size: a List cannot hold more than `+an+` (2 ** 30) values.`)}function tn(e,t,n){en(e,t,n),t!==void 0&&(t|=0),n!==void 0&&(n|=0);var r=e.__ownerID||new w,i=e._origin,a=e._capacity,o=i+t,s=n===void 0?a:n<0?a+n:i+n;if(o===i&&s===a)return e;if(o>=s)return e.clear();for(var c=e._level,l=e._root,u=0;o+u<0;)l=new Ut(l&&l.array.length?[void 0,l]:[],r),c+=g,u+=on(c);u&&(o+=u,i+=u,s+=u,a+=u);for(var d=rn(a),f=rn(s);f>=on(c+g);)l=new Ut(l&&l.array.length?[l]:[],r),c+=g;var p=e._tail,m=f<d?Qt(e,s-1):f>d?new Ut([],r):p;if(p&&f>d&&o<a&&p.array.length){l=Zt(l,r);for(var h=l,_=c;_>g;_-=g){var y=d>>>_&v;h=h.array[y]=Zt(h.array[y],r)}h.array[d>>>g&v]=p}if(s<a&&(m&&=m.removeAfter(r,0,s)),o>=f)o-=f,s-=f,c=g,l=null,m&&=m.removeBefore(r,0,o);else if(o>i||f<d){for(u=0;l;){var b=o>>>c&v;if(b!==f>>>c&v)break;b&&(u+=(1<<c)*b),c-=g,l=l.array[b]}l&&o>i&&(l=l.removeBefore(r,c,o-u)),l&&f<d&&(l=l.removeAfter(r,c,f-u)),u&&(o-=u,s-=u)}return e.__ownerID?(e.size=s-o,e._origin=o,e._capacity=s,e._level=c,e._root=l,e._tail=m,e.__hash=void 0,e.__altered=!0,e):Kt(o,s,c,l,m)}function nn(e,t,n){for(var r=[],a=0,s=0;s<n.length;s++){var c=n[s],l=i(c);l.size>a&&(a=l.size),o(c)||(l=l.map(function(e){return Oe(e)})),r.push(l)}return a>e.size&&(e=e.setSize(a)),kt(e,t,r)}function rn(e){return e<_?0:e-1>>>g<<g}var an=1073741824;function on(e){return e<31?1<<e:2**e}t(H,z);function H(e){return e==null?un():sn(e)?e:un().withMutations(function(t){var n=r(e);ot(n.size),n.forEach(function(e,n){return t.set(n,e)})})}H.of=function(){return this(arguments)},H.prototype.toString=function(){return this.__toString(`OrderedMap {`,`}`)},H.prototype.get=function(e,t){var n=this._map.get(e);return n===void 0?t:this._list.get(n)[1]},H.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):un()},H.prototype.set=function(e,t){return dn(this,e,t)},H.prototype.remove=function(e){return dn(this,e,y)},H.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},H.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},H.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},H.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?cn(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)};function sn(e){return st(e)&&u(e)}H.isOrderedMap=sn,H.prototype[m]=!0,H.prototype[h]=H.prototype.remove;function cn(e,t,n,r){var i=Object.create(H.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}var ln;function un(){return ln||=cn(vt(),Jt())}function dn(e,t,n){var r=e._map,i=e._list,a=r.get(t),o=a!==void 0,s,c;if(n===y){if(!o)return e;i.size>=_&&i.size>=r.size*2?(c=i.filter(function(e,t){return e!==void 0&&a!==t}),s=c.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(s.__ownerID=c.__ownerID=e.__ownerID)):(s=r.remove(t),c=a===i.size-1?i.pop():i.set(a,void 0))}else if(o){if(n===i.get(a)[1])return e;s=r,c=i.set(a,[t,n])}else s=r.set(t,i.size),c=i.set(i.size,[t,n]);return e.__ownerID?(e.size=s.size,e._map=s,e._list=c,e.__hash=void 0,e):cn(s,c)}t(fn,de);function fn(e,t){this._iter=e,this._useKeys=t,this.size=e.size}fn.prototype.get=function(e,t){return this._iter.get(e,t)},fn.prototype.has=function(e){return this._iter.has(e)},fn.prototype.valueSeq=function(){return this._iter.valueSeq()},fn.prototype.reverse=function(){var e=this,t=vn(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},fn.prototype.map=function(e,t){var n=this,r=_n(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},fn.prototype.__iterate=function(e,t){var n=this,r;return this._iter.__iterate(this._useKeys?function(t,r){return e(t,r,n)}:(r=t?Fn(this):0,function(i){return e(i,t?--r:r++,n)}),t)},fn.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(j,t),r=t?Fn(this):0;return new P(function(){var i=n.next();return i.done?i:F(e,t?--r:r++,i.value,i)})},fn.prototype[m]=!0,t(pn,fe);function pn(e){this._iter=e,this.size=e.size}pn.prototype.includes=function(e){return this._iter.includes(e)},pn.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},pn.prototype.__iterator=function(e,t){var n=this._iter.__iterator(j,t),r=0;return new P(function(){var t=n.next();return t.done?t:F(e,r++,t.value,t)})},t(mn,pe);function mn(e){this._iter=e,this.size=e.size}mn.prototype.has=function(e){return this._iter.includes(e)},mn.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},mn.prototype.__iterator=function(e,t){var n=this._iter.__iterator(j,t);return new P(function(){var t=n.next();return t.done?t:F(e,t.value,t.value,t)})},t(hn,de);function hn(e){this._iter=e,this.size=e.size}hn.prototype.entrySeq=function(){return this._iter.toSeq()},hn.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){Pn(t);var r=o(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},hn.prototype.__iterator=function(e,t){var n=this._iter.__iterator(j,t);return new P(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){Pn(r);var i=o(r);return F(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},pn.prototype.cacheResult=fn.prototype.cacheResult=mn.prototype.cacheResult=hn.prototype.cacheResult=Rn;function gn(e){var t=Ln(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=Rn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return t(n,e,r)!==!1},n)},t.__iteratorUncached=function(t,n){if(t===M){var r=e.__iterator(t,n);return new P(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===j?ne:j,n)},t}function _n(e,t,n){var r=Ln(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var a=e.get(r,y);return a===y?i:t.call(n,a,r,e)},r.__iterateUncached=function(r,i){var a=this;return e.__iterate(function(e,i,o){return r(t.call(n,e,i,o),i,a)!==!1},i)},r.__iteratorUncached=function(r,i){var a=e.__iterator(M,i);return new P(function(){var i=a.next();if(i.done)return i;var o=i.value,s=o[0];return F(r,s,t.call(n,o[1],s,e),i)})},r}function vn(e,t){var n=Ln(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=gn(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=Rn,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 yn(e,t,n,r){var i=Ln(e);return r&&(i.has=function(r){var i=e.get(r,y);return i!==y&&!!t.call(n,i,r,e)},i.get=function(r,i){var a=e.get(r,y);return a!==y&&t.call(n,a,r,e)?a:i}),i.__iterateUncached=function(i,a){var o=this,s=0;return e.__iterate(function(e,a,c){if(t.call(n,e,a,c))return s++,i(e,r?a:s-1,o)},a),s},i.__iteratorUncached=function(i,a){var o=e.__iterator(M,a),s=0;return new P(function(){for(;;){var a=o.next();if(a.done)return a;var c=a.value,l=c[0],u=c[1];if(t.call(n,u,l,e))return F(i,r?l:s++,u,a)}})},i}function bn(e,t,n){var r=z().asMutable();return e.__iterate(function(i,a){r.update(t.call(n,i,a,e),0,function(e){return e+1})}),r.asImmutable()}function xn(e,t,n){var r=s(e),i=(u(e)?H():z()).asMutable();e.__iterate(function(a,o){i.update(t.call(n,a,o,e),function(e){return e||=[],e.push(r?[o,a]:a),e})});var a=In(e);return i.map(function(t){return Nn(e,a(t))})}function Sn(e,t,n,r){var i=e.size;if(t!==void 0&&(t|=0),n!==void 0&&(n===1/0?n=i:n|=0),k(t,n,i))return e;var a=A(t,i),o=ee(n,i);if(a!==a||o!==o)return Sn(e.toSeq().cacheResult(),t,n,r);var s=o-a,c;s===s&&(c=s<0?0:s);var l=Ln(e);return l.size=c===0?c:e.size&&c||void 0,!r&&ye(e)&&c>=0&&(l.get=function(t,n){return t=D(this,t),t>=0&&t<c?e.get(t+a,n):n}),l.__iterateUncached=function(t,n){var i=this;if(c===0)return 0;if(n)return this.cacheResult().__iterate(t,n);var o=0,s=!0,l=0;return e.__iterate(function(e,n){if(!(s&&=o++<a))return l++,t(e,r?n:l-1,i)!==!1&&l!==c}),l},l.__iteratorUncached=function(t,n){if(c!==0&&n)return this.cacheResult().__iterator(t,n);var i=c!==0&&e.__iterator(t,n),o=0,s=0;return new P(function(){for(;o++<a;)i.next();if(++s>c)return ae();var e=i.next();return r||t===j?e:t===ne?F(t,s-1,void 0,e):F(t,s-1,e.value[1],e)})},l}function Cn(e,t,n){var r=Ln(e);return r.__iterateUncached=function(r,i){var a=this;if(i)return this.cacheResult().__iterate(r,i);var o=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++o&&r(e,i,a)}),o},r.__iteratorUncached=function(r,i){var a=this;if(i)return this.cacheResult().__iterator(r,i);var o=e.__iterator(M,i),s=!0;return new P(function(){if(!s)return ae();var e=o.next();if(e.done)return e;var i=e.value,c=i[0],l=i[1];return t.call(n,l,c,a)?r===M?e:F(r,c,l,e):(s=!1,ae())})},r}function wn(e,t,n,r){var i=Ln(e);return i.__iterateUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterate(i,a);var s=!0,c=0;return e.__iterate(function(e,a,l){if(!(s&&=t.call(n,e,a,l)))return c++,i(e,r?a:c-1,o)}),c},i.__iteratorUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterator(i,a);var s=e.__iterator(M,a),c=!0,l=0;return new P(function(){var e,a,u;do{if(e=s.next(),e.done)return r||i===j?e:i===ne?F(i,l++,void 0,e):F(i,l++,e.value[1],e);var d=e.value;a=d[0],u=d[1],c&&=t.call(n,u,a,o)}while(c);return i===M?e:F(i,a,u,e)})},i}function Tn(e,t){var n=s(e),i=[e].concat(t).map(function(e){return o(e)?n&&(e=r(e)):e=n?Se(e):Ce(Array.isArray(e)?e:[e]),e}).filter(function(e){return e.size!==0});if(i.length===0)return e;if(i.length===1){var a=i[0];if(a===e||n&&s(a)||c(e)&&c(a))return a}var l=new he(i);return n?l=l.toKeyedSeq():c(e)||(l=l.toSetSeq()),l=l.flatten(!0),l.size=i.reduce(function(e,t){if(e!==void 0){var n=t.size;if(n!==void 0)return e+n}},0),l}function En(e,t,n){var r=Ln(e);return r.__iterateUncached=function(r,i){var a=0,s=!1;function c(e,l){var u=this;e.__iterate(function(e,i){return(!t||l<t)&&o(e)?c(e,l+1):r(e,n?i:a++,u)===!1&&(s=!0),!s},i)}return c(e,0),a},r.__iteratorUncached=function(r,i){var a=e.__iterator(r,i),s=[],c=0;return new P(function(){for(;a;){var e=a.next();if(e.done!==!1)a=s.pop();else{var l=e.value;if(r===M&&(l=l[1]),(!t||s.length<t)&&o(l))s.push(a),a=l.__iterator(r,i);else return n?e:F(r,c++,l,e)}}return ae()})},r}function Dn(e,t,n){var r=In(e);return e.toSeq().map(function(i,a){return r(t.call(n,i,a,e))}).flatten(!0)}function On(e,t){var n=Ln(e);return n.size=e.size&&e.size*2-1,n.__iterateUncached=function(n,r){var i=this,a=0;return e.__iterate(function(e,r){return(!a||n(t,a++,i)!==!1)&&n(e,a++,i)!==!1},r),a},n.__iteratorUncached=function(n,r){var i=e.__iterator(j,r),a=0,o;return new P(function(){return(!o||a%2)&&(o=i.next(),o.done)?o:a%2?F(n,a++,t):F(n,a++,o.value,o)})},n}function kn(e,t,n){t||=zn;var r=s(e),i=0,a=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).toArray();return a.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){a[t].length=2}:function(e,t){a[t]=e[1]}),r?de(a):c(e)?fe(a):pe(a)}function An(e,t,n){if(t||=zn,n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return jn(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return jn(t,e,n)?n:e})}function jn(e,t,n){var r=e(n,t);return r===0&&n!==t&&(n==null||n!==n)||r>0}function Mn(e,t,r){var i=Ln(e);return i.size=new he(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n=this.__iterator(j,t),r,i=0;!(r=n.next()).done&&e(r.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(e,i){var a=r.map(function(e){return e=n(e),ce(i?e.reverse():e)}),o=0,s=!1;return new P(function(){var n;return s||=(n=a.map(function(e){return e.next()}),n.some(function(e){return e.done})),s?ae():F(e,o++,t.apply(null,n.map(function(e){return e.value})))})},i}function Nn(e,t){return ye(e)?t:e.constructor(t)}function Pn(e){if(e!==Object(e))throw TypeError(`Expected [K, V] tuple: `+e)}function Fn(e){return ot(e.size),E(e)}function In(e){return s(e)?r:c(e)?i:a}function Ln(e){return Object.create((s(e)?de:c(e)?fe:pe).prototype)}function Rn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):I.prototype.cacheResult.call(this)}function zn(e,t){return e>t?1:e<t?-1:0}function Bn(e){var t=ce(e);if(!t){if(!ue(e))throw TypeError(`Expected iterable or array-like: `+e);t=ce(n(e))}return t}t(Vn,ze);function Vn(e,t){var n,r=function(a){if(a instanceof r)return a;if(!(this instanceof r))return new r(a);if(!n){n=!0;var o=Object.keys(e);Gn(i,o),i.size=o.length,i._name=t,i._keys=o,i._defaultValues=e}this._map=z(a)},i=r.prototype=Object.create(Hn);return i.constructor=r,r}Vn.prototype.toString=function(){return this.__toString(Wn(this)+` {`,`}`)},Vn.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Vn.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},Vn.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||=Un(this,vt())},Vn.prototype.set=function(e,t){if(!this.has(e))throw Error(`Cannot set unknown key "`+e+`" on `+Wn(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:Un(this,n)},Vn.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:Un(this,t)},Vn.prototype.wasAltered=function(){return this._map.wasAltered()},Vn.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},Vn.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},Vn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?Un(this,t,e):(this.__ownerID=e,this._map=t,this)};var Hn=Vn.prototype;Hn[h]=Hn.remove,Hn.deleteIn=Hn.removeIn=B.removeIn,Hn.merge=B.merge,Hn.mergeWith=B.mergeWith,Hn.mergeIn=B.mergeIn,Hn.mergeDeep=B.mergeDeep,Hn.mergeDeepWith=B.mergeDeepWith,Hn.mergeDeepIn=B.mergeDeepIn,Hn.setIn=B.setIn,Hn.update=B.update,Hn.updateIn=B.updateIn,Hn.withMutations=B.withMutations,Hn.asMutable=B.asMutable,Hn.asImmutable=B.asImmutable;function Un(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function Wn(e){return e._name||e.constructor.name||`Record`}function Gn(e,t){try{t.forEach(Kn.bind(void 0,e))}catch{}}function Kn(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){Ie(this.__ownerID,`Cannot set on an immutable record.`),this.set(t,e)}})}t(qn,R);function qn(e){return e==null?er():Jn(e)&&!u(e)?e:er().withMutations(function(t){var n=a(e);ot(n.size),n.forEach(function(e){return t.add(e)})})}qn.of=function(){return this(arguments)},qn.fromKeys=function(e){return this(r(e).keySeq())},qn.prototype.toString=function(){return this.__toString(`Set {`,`}`)},qn.prototype.has=function(e){return this._map.has(e)},qn.prototype.add=function(e){return Zn(this,this._map.set(e,!0))},qn.prototype.remove=function(e){return Zn(this,this._map.remove(e))},qn.prototype.clear=function(){return Zn(this,this._map.clear())},qn.prototype.union=function(){var t=e.call(arguments,0);return t=t.filter(function(e){return e.size!==0}),t.length===0?this:this.size===0&&!this.__ownerID&&t.length===1?this.constructor(t[0]):this.withMutations(function(e){for(var n=0;n<t.length;n++)a(t[n]).forEach(function(t){return e.add(t)})})},qn.prototype.intersect=function(){var t=e.call(arguments,0);if(t.length===0)return this;t=t.map(function(e){return a(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.every(function(e){return e.includes(n)})||e.remove(n)})})},qn.prototype.subtract=function(){var t=e.call(arguments,0);if(t.length===0)return this;t=t.map(function(e){return a(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.some(function(e){return e.includes(n)})&&e.remove(n)})})},qn.prototype.merge=function(){return this.union.apply(this,arguments)},qn.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},qn.prototype.sort=function(e){return tr(kn(this,e))},qn.prototype.sortBy=function(e,t){return tr(kn(this,t,e))},qn.prototype.wasAltered=function(){return this._map.wasAltered()},qn.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t,r){return e(r,r,n)},t)},qn.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t}).__iterator(e,t)},qn.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)};function Jn(e){return!!(e&&e[Yn])}qn.isSet=Jn;var Yn=`@@__IMMUTABLE_SET__@@`,Xn=qn.prototype;Xn[Yn]=!0,Xn[h]=Xn.remove,Xn.mergeDeep=Xn.merge,Xn.mergeDeepWith=Xn.mergeWith,Xn.withMutations=B.withMutations,Xn.asMutable=B.asMutable,Xn.asImmutable=B.asImmutable,Xn.__empty=er,Xn.__make=Qn;function Zn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:t.size===0?e.__empty():e.__make(t)}function Qn(e,t){var n=Object.create(Xn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}var $n;function er(){return $n||=Qn(vt())}t(tr,qn);function tr(e){return e==null?or():nr(e)?e:or().withMutations(function(t){var n=a(e);ot(n.size),n.forEach(function(e){return t.add(e)})})}tr.of=function(){return this(arguments)},tr.fromKeys=function(e){return this(r(e).keySeq())},tr.prototype.toString=function(){return this.__toString(`OrderedSet {`,`}`)};function nr(e){return Jn(e)&&u(e)}tr.isOrderedSet=nr;var rr=tr.prototype;rr[m]=!0,rr.__empty=or,rr.__make=ir;function ir(e,t){var n=Object.create(rr);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}var ar;function or(){return ar||=ir(un())}t(sr,Be);function sr(e){return e==null?pr():cr(e)?e:pr().unshiftAll(e)}sr.of=function(){return this(arguments)},sr.prototype.toString=function(){return this.__toString(`Stack [`,`]`)},sr.prototype.get=function(e,t){var n=this._head;for(e=D(this,e);n&&e--;)n=n.next;return n?n.value:t},sr.prototype.peek=function(){return this._head&&this._head.value},sr.prototype.push=function(){if(arguments.length===0)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):dr(e,t)},sr.prototype.pushAll=function(e){if(e=i(e),e.size===0)return this;ot(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):dr(t,n)},sr.prototype.pop=function(){return this.slice(1)},sr.prototype.unshift=function(){return this.push.apply(this,arguments)},sr.prototype.unshiftAll=function(e){return this.pushAll(e)},sr.prototype.shift=function(){return this.pop.apply(this,arguments)},sr.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):pr()},sr.prototype.slice=function(e,t){if(k(e,t,this.size))return this;var n=A(e,this.size);if(ee(t,this.size)!==this.size)return Be.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):dr(r,i)},sr.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?dr(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},sr.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&e(r.value,n++,this)!==!1;)r=r.next;return n},sr.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new P(function(){if(r){var t=r.value;return r=r.next,F(e,n++,t)}return ae()})};function cr(e){return!!(e&&e[lr])}sr.isStack=cr;var lr=`@@__IMMUTABLE_STACK__@@`,ur=sr.prototype;ur[lr]=!0,ur.withMutations=B.withMutations,ur.asMutable=B.asMutable,ur.asImmutable=B.asImmutable,ur.wasAltered=B.wasAltered;function dr(e,t,n,r){var i=Object.create(ur);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}var fr;function pr(){return fr||=dr(0)}function mr(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 hr(e){return typeof e==`string`&&(e===`__proto__`||e===`constructor`)}n.Iterator=P,mr(n,{toArray:function(){ot(this.size);var e=Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new pn(this)},toJS:function(){return this.toSeq().map(function(e){return e&&typeof e.toJS==`function`?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&typeof e.toJSON==`function`?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new fn(this,!0)},toMap:function(){return z(this.toKeyedSeq())},toObject:function(){ot(this.size);var e={};return this.__iterate(function(t,n){hr(n)||(e[n]=t)}),e},toOrderedMap:function(){return H(this.toKeyedSeq())},toOrderedSet:function(){return tr(s(this)?this.valueSeq():this)},toSet:function(){return qn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new mn(this)},toSeq:function(){return c(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return sr(s(this)?this.valueSeq():this)},toList:function(){return zt(s(this)?this.valueSeq():this)},toString:function(){return`[Iterable]`},__toString:function(e,t){return this.size===0?e+t:e+` `+this.toSeq().map(this.__toStringMapper).join(`, `)+` `+t},concat:function(){var t=e.call(arguments,0);return Nn(this,Tn(this,t))},includes:function(e){return this.some(function(t){return Me(t,e)})},entries:function(){return this.__iterator(M)},every:function(e,t){ot(this.size);var n=!0;return this.__iterate(function(r,i,a){if(!e.call(t,r,i,a))return n=!1,!1}),n},filter:function(e,t){return Nn(this,yn(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 ot(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){ot(this.size),e=e===void 0?`,`:``+e;var t=``,n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=r==null?``:r.toString()}),t},keys:function(){return this.__iterator(ne)},map:function(e,t){return Nn(this,_n(this,e,t))},reduce:function(e,t,n){ot(this.size);var r,i;return arguments.length<2?i=!0:r=t,this.__iterate(function(t,a,o){i?(i=!1,r=t):r=e.call(n,r,t,a,o)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Nn(this,vn(this,!0))},slice:function(e,t){return Nn(this,Sn(this,e,t,!0))},some:function(e,t){return!this.every(br(e),t)},sort:function(e){return Nn(this,kn(this,e))},values:function(){return this.__iterator(j)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return this.size===void 0?!this.some(function(){return!0}):this.size===0},count:function(e,t){return E(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return bn(this,e,t)},equals:function(e){return Ne(this,e)},entrySeq:function(){var e=this;if(e._cache)return new he(e._cache);var t=e.toSeq().map(yr).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(br(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,a){if(e.call(t,n,i,a))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(O)},flatMap:function(e,t){return Nn(this,Dn(this,e,t))},flatten:function(e){return Nn(this,En(this,e,!0))},fromEntrySeq:function(){return new hn(this)},get:function(e,t){return this.find(function(t,n){return Me(n,e)},void 0,t)},getIn:function(e,t){for(var n=this,r=Bn(e),i;!(i=r.next()).done;){var a=i.value;if(n=n&&n.get?n.get(a,y):y,n===y)return t}return n},groupBy:function(e,t){return xn(this,e,t)},has:function(e){return this.get(e,y)!==y},hasIn:function(e){return this.getIn(e,y)!==y},isSubset:function(e){return e=typeof e.includes==`function`?e:n(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return e=typeof e.isSubset==`function`?e:n(e),e.isSubset(this)},keyOf:function(e){return this.findKey(function(t){return Me(t,e)})},keySeq:function(){return this.toSeq().map(vr).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return An(this,e)},maxBy:function(e,t){return An(this,t,e)},min:function(e){return An(this,e?xr(e):wr)},minBy:function(e,t){return An(this,t?xr(t):wr,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return Nn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return Nn(this,wn(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(br(e),t)},sortBy:function(e,t){return Nn(this,kn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return Nn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return Nn(this,Cn(this,e,t))},takeUntil:function(e,t){return this.takeWhile(br(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||=Tr(this)}});var gr=n.prototype;gr[d]=!0,gr[ie]=gr.values,gr.__toJS=gr.toArray,gr.__toStringMapper=Sr,gr.inspect=gr.toSource=function(){return this.toString()},gr.chain=gr.flatMap,gr.contains=gr.includes,mr(r,{flip:function(){return Nn(this,gn(this))},mapEntries:function(e,t){var n=this,r=0;return Nn(this,this.toSeq().map(function(i,a){return e.call(t,[a,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return Nn(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var _r=r.prototype;_r[f]=!0,_r[ie]=gr.entries,_r.__toJS=gr.toObject,_r.__toStringMapper=function(e,t){return JSON.stringify(t)+`: `+Sr(e)},mr(i,{toKeyedSeq:function(){return new fn(this,!1)},filter:function(e,t){return Nn(this,yn(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 t===void 0?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return t===void 0?-1:t},reverse:function(){return Nn(this,vn(this,!1))},slice:function(e,t){return Nn(this,Sn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t|0,0),n===0||n===2&&!t)return this;e=A(e,e<0?this.count():this.size);var r=this.slice(0,e);return Nn(this,n===1?r:r.concat(T(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 Nn(this,En(this,e,!1))},get:function(e,t){return e=D(this,e),e<0||this.size===1/0||this.size!==void 0&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return e=D(this,e),e>=0&&(this.size===void 0?this.indexOf(e)!==-1:this.size===1/0||e<this.size)},interpose:function(e){return Nn(this,On(this,e))},interleave:function(){var e=[this].concat(T(arguments)),t=Mn(this.toSeq(),fe.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),Nn(this,n)},keySeq:function(){return Le(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(e,t){return Nn(this,wn(this,e,t,!1))},zip:function(){var e=[this].concat(T(arguments));return Nn(this,Mn(this,Cr,e))},zipWith:function(e){var t=T(arguments);return t[0]=this,Nn(this,Mn(this,e,t))}}),i.prototype[p]=!0,i.prototype[m]=!0,mr(a,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),a.prototype.has=gr.includes,a.prototype.contains=a.prototype.includes,mr(de,r.prototype),mr(fe,i.prototype),mr(pe,a.prototype),mr(ze,r.prototype),mr(Be,i.prototype),mr(R,a.prototype);function vr(e,t){return t}function yr(e,t){return[t,e]}function br(e){return function(){return!e.apply(this,arguments)}}function xr(e){return function(){return-e.apply(this,arguments)}}function Sr(e){return typeof e==`string`?JSON.stringify(e):String(e)}function Cr(){return T(arguments)}function wr(e,t){return e<t?1:e>t?-1:0}function Tr(e){if(e.size===1/0)return 0;var t=u(e),n=s(e),r=+!!t;return Er(e.__iterate(n?t?function(e,t){r=31*r+Dr(Ue(e),Ue(t))|0}:function(e,t){r=r+Dr(Ue(e),Ue(t))|0}:t?function(e){r=31*r+Ue(e)|0}:function(e){r=r+Ue(e)|0}),r)}function Er(e,t){return t=Ve(t,3432918353),t=Ve(t<<15|t>>>-15,461845907),t=Ve(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=Ve(t^t>>>16,2246822507),t=Ve(t^t>>>13,3266489909),t=He(t^t>>>16),t}function Dr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return{Iterable:n,Seq:I,Collection:Re,Map:z,OrderedMap:H,List:zt,Stack:sr,Set:qn,OrderedSet:tr,Record:Vn,Range:Le,Repeat:Pe,is:Me,fromJS:Oe}})})),Au=/* @__PURE__ */ o(((e,t)=>{var n=ku().OrderedMap;t.exports={createFromArray:function(e){return n(e.map(function(e){return[e.getKey(),e]}))}}})),ju=/* @__PURE__ */ o(((e,t)=>{function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var r=ku(),i=r.Map,a=r.OrderedSet,o=r.Record,s=a(),c={style:s,entity:null},l=/*#__PURE__*/ function(e){n(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.getStyle=function(){return this.get(`style`)},r.getEntity=function(){return this.get(`entity`)},r.hasStyle=function(e){return this.getStyle().includes(e)},t.applyStyle=function(e,n){var r=e.set(`style`,e.getStyle().add(n));return t.create(r)},t.removeStyle=function(e,n){var r=e.set(`style`,e.getStyle().remove(n));return t.create(r)},t.applyEntity=function(e,n){var r=e.getEntity()===n?e:e.set(`entity`,n);return t.create(r)},t.create=function(e){if(!e)return u;var n=i({style:s,entity:null}).merge(e),r=d.get(n);if(r)return r;var a=new t(n);return d=d.set(n,a),a},t.fromJS=function(e){var n=e.style,r=e.entity;return new t({style:Array.isArray(n)?a(n):n,entity:Array.isArray(r)?a(r):r})},t}(o(c)),u=new l,d=i([[i(c),u]]);l.EMPTY=u,t.exports=l})),Mu=/* @__PURE__ */ o(((e,t)=>{function n(e,t,n,r){if(e.size){var i=0;e.reduce(function(e,a,o){return t(e,a)||(n(e)&&r(i,o),i=o),a}),n(e.last())&&r(i,e.count())}}t.exports=n})),Nu=/* @__PURE__ */ o(((e,t)=>{function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var r=ju(),i=Mu(),a=ku(),o=a.List,s=a.Map,c=a.OrderedSet,l=a.Record,u=a.Repeat,d=c(),f=l({key:``,type:`unstyled`,text:``,characterList:o(),depth:0,data:s()}),p=function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=o(u(r.EMPTY,n.length))),e},m=/*#__PURE__*/ function(e){n(t,e);function t(t){return e.call(this,p(t))||this}var r=t.prototype;return r.getKey=function(){return this.get(`key`)},r.getType=function(){return this.get(`type`)},r.getText=function(){return this.get(`text`)},r.getCharacterList=function(){return this.get(`characterList`)},r.getLength=function(){return this.getText().length},r.getDepth=function(){return this.get(`depth`)},r.getData=function(){return this.get(`data`)},r.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():d},r.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},r.findStyleRanges=function(e,t){i(this.getCharacterList(),h,e,t)},r.findEntityRanges=function(e,t){i(this.getCharacterList(),g,e,t)},t}(f);function h(e,t){return e.getStyle()===t.getStyle()}function g(e,t){return e.getEntity()===t.getEntity()}t.exports=m})),Pu=/* @__PURE__ */ o(((e,t)=>{function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var r=ju(),i=Mu(),a=ku(),o=a.List,s=a.Map,c=a.OrderedSet,l=a.Record,u=a.Repeat,d=c(),f={parent:null,characterList:o(),data:s(),depth:0,key:``,text:``,type:`unstyled`,children:o(),prevSibling:null,nextSibling:null},p=function(e,t){return e.getStyle()===t.getStyle()},m=function(e,t){return e.getEntity()===t.getEntity()},h=function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=o(u(r.EMPTY,n.length))),e};t.exports=/* @__PURE__ */ function(e){n(t,e);function t(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f;return e.call(this,h(t))||this}var r=t.prototype;return r.getKey=function(){return this.get(`key`)},r.getType=function(){return this.get(`type`)},r.getText=function(){return this.get(`text`)},r.getCharacterList=function(){return this.get(`characterList`)},r.getLength=function(){return this.getText().length},r.getDepth=function(){return this.get(`depth`)},r.getData=function(){return this.get(`data`)},r.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():d},r.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},r.getChildKeys=function(){return this.get(`children`)},r.getParentKey=function(){return this.get(`parent`)},r.getPrevSiblingKey=function(){return this.get(`prevSibling`)},r.getNextSiblingKey=function(){return this.get(`nextSibling`)},r.findStyleRanges=function(e,t){i(this.getCharacterList(),p,e,t)},r.findEntityRanges=function(e,t){i(this.getCharacterList(),m,e,t)},t}(l(f))})),Fu=/* @__PURE__ */ o(((e,t)=>{var n=ju(),r=ku().Map,i={add:function(e,t,n){return a(e,t,n,!0)},remove:function(e,t,n){return a(e,t,n,!1)}};function a(e,t,i,a){var o=e.getBlockMap(),s=t.getStartKey(),c=t.getStartOffset(),l=t.getEndKey(),u=t.getEndOffset(),d=o.skipUntil(function(e,t){return t===s}).takeUntil(function(e,t){return t===l}).concat(r([[l,o.get(l)]])).map(function(e,t){var r,o;s===l?(r=c,o=u):(r=t===s?c:0,o=t===l?u:e.getLength());for(var d=e.getCharacterList(),f;r<o;)f=d.get(r),d=d.set(r,a?n.applyStyle(f,i):n.removeStyle(f,i)),r++;return e.set(`characterList`,d)});return e.merge({blockMap:o.merge(d),selectionBefore:t,selectionAfter:t})}t.exports=i})),Iu=/* @__PURE__ */ o(((e,t)=>{var n=ju();function r(e,t,r,i){for(var a=t,o=e.getCharacterList();a<r;)o=o.set(a,n.applyEntity(o.get(a),i)),a++;return e.set(`characterList`,o)}t.exports=r})),Lu=/* @__PURE__ */ o(((e,t)=>{var n=Iu(),r=ku();function i(e,t,i){var a=e.getBlockMap(),o=t.getStartKey(),s=t.getStartOffset(),c=t.getEndKey(),l=t.getEndOffset(),u=a.skipUntil(function(e,t){return t===o}).takeUntil(function(e,t){return t===c}).toOrderedMap().merge(r.OrderedMap([[c,a.get(c)]])).map(function(e,t){return n(e,t===o?s:0,t===c?l:e.getLength(),i)});return e.merge({blockMap:a.merge(u),selectionBefore:t,selectionAfter:t})}t.exports=i})),Ru=/* @__PURE__ */ o(((e,t)=>{t.exports={getRemovalRange:function(e,t,n,r,i){var a=n.split(` `);a=a.map(function(e,t){if(i===`forward`){if(t>0)return` `+e}else if(t<a.length-1)return e+` `;return e});for(var o=r,s,c,l=null,u=null,d=0;d<a.length;d++){if(c=a[d],s=o+c.length,e<s&&o<t)l===null&&(l=o),u=s;else if(l!==null)break;o=s}var f=r+n.length,p=l===r,m=u===f;return(!p&&m||p&&!m)&&(i===`forward`?u!==f&&u++:l!==r&&l--),{start:l,end:u}}}})),zu=/* @__PURE__ */ o(((e,t)=>{function n(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(!e){var a;if(t===void 0)a=/* @__PURE__ */ Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var o=0;a=Error(t.replace(/%s/g,function(){return String(r[o++])})),a.name=`Invariant Violation`}throw a.framesToPop=1,a}}t.exports=n})),Bu=/* @__PURE__ */ o(((e,t)=>{var n=zu();function r(e,t){var r=[];return e.findEntityRanges(function(e){return e.getEntity()===t},function(e,t){r.push({start:e,end:t})}),!r.length&&n(!1),r}t.exports=r})),Vu=/* @__PURE__ */ o(((e,t)=>{var n=Ru(),r=Bu(),i=zu();function a(e,t,n,r,i){var a=r.getStartOffset(),s=r.getEndOffset(),c=t.getEntityAt(a),l=n.getEntityAt(s-1);if(!c&&!l)return r;var u=r;if(c&&c===l)u=o(e,t,u,i,c,!0,!0);else if(c&&l){var d=o(e,t,u,i,c,!1,!0),f=o(e,n,u,i,l,!1,!1);u=u.merge({anchorOffset:d.getAnchorOffset(),focusOffset:f.getFocusOffset(),isBackward:!1})}else if(c){var p=o(e,t,u,i,c,!1,!0);u=u.merge({anchorOffset:p.getStartOffset(),isBackward:!1})}else if(l){var m=o(e,n,u,i,l,!1,!1);u=u.merge({focusOffset:m.getEndOffset(),isBackward:!1})}return u}function o(e,t,a,o,s,c,l){var u=a.getStartOffset(),d=a.getEndOffset(),f=e.__get(s).getMutability(),p=l?u:d;if(f===`MUTABLE`)return a;var m=r(t,s).filter(function(e){return p<=e.end&&p>=e.start});m.length!=1&&i(!1);var h=m[0];if(f===`IMMUTABLE`)return a.merge({anchorOffset:h.start,focusOffset:h.end,isBackward:!1});c||(l?d=h.end:u=h.start);var g=n.getRemovalRange(u,d,t.getText().slice(h.start,h.end),h.start,o);return a.merge({anchorOffset:g.start,focusOffset:g.end,isBackward:!1})}t.exports=a})),Hu=/* @__PURE__ */ o(((e,t)=>{var n={},r=2**24;function i(){for(var e;e===void 0||n.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*r).toString(32);return n[e]=!0,e}t.exports=i})),Uu=/* @__PURE__ */ o(((e,t)=>{var n=Pu(),r=Hu(),i=ku().OrderedMap,a=function(e){var t={},n;return i(e.withMutations(function(e){e.forEach(function(i,a){var o=i.getKey(),s=i.getNextSiblingKey(),c=i.getPrevSiblingKey(),l=i.getChildKeys(),u=i.getParentKey(),d=r();if(t[o]=d,s&&(e.get(s)?e.setIn([s,`prevSibling`],d):e.setIn([o,`nextSibling`],null)),c&&(e.get(c)?e.setIn([c,`nextSibling`],d):e.setIn([o,`prevSibling`],null)),u&&e.get(u)){var f=e.get(u).getChildKeys();e.setIn([u,`children`],f.set(f.indexOf(i.getKey()),d))}else e.setIn([o,`parent`],null),n&&(e.setIn([n.getKey(),`nextSibling`],d),e.setIn([o,`prevSibling`],t[n.getKey()])),n=e.get(o);l.forEach(function(t){e.get(t)?e.setIn([t,`parent`],d):e.setIn([o,`children`],i.getChildKeys().filter(function(e){return e!==t}))})})}).toArray().map(function(e){return[t[e.getKey()],e.set(`key`,t[e.getKey()])]}))},o=function(e){return i(e.toArray().map(function(e){var t=r();return[t,e.set(`key`,t)]}))};t.exports=function(e){return e.first()instanceof n?a(e):o(e)}})),Wu=/* @__PURE__ */ o(((e,t)=>{var n=ju(),r=Mu(),i=zu();function a(e,t){var n=e.getBlockMap(),r=e.getEntityMap(),i={},a=t.getStartKey(),o=t.getStartOffset(),c=n.get(a),l=s(r,c,o);l!==c&&(i[a]=l);var u=t.getEndKey(),d=t.getEndOffset(),f=n.get(u);a===u&&(f=l);var p=s(r,f,d);return p!==f&&(i[u]=p),Object.keys(i).length?e.merge({blockMap:n.merge(i),selectionAfter:t}):e.set(`selectionAfter`,t)}function o(e,t,n){var a;return r(e,function(e,t){return e.getEntity()===t.getEntity()},function(e){return e.getEntity()===t},function(e,t){e<=n&&t>=n&&(a={start:e,end:t})}),typeof a!=`object`&&i(!1),a}function s(e,t,r){var i=t.getCharacterList(),a=r>0?i.get(r-1):void 0,s=r<i.count()?i.get(r):void 0,c=a?a.getEntity():void 0,l=s?s.getEntity():void 0;if(l&&l===c&&e.__get(l).getMutability()!==`MUTABLE`){for(var u=o(i,l,r),d=u.start,f=u.end,p;d<f;)p=i.get(d),i=i.set(d,n.applyEntity(p,null)),d++;return t.set(`characterList`,i)}return t}t.exports=a})),Gu=/* @__PURE__ */ o(((e,t)=>{var n=Uu(),r=Wu();t.exports=function(e,t){var i=t.getStartKey(),a=t.getStartOffset(),o=t.getEndKey(),s=t.getEndOffset(),c=r(e,t).getBlockMap(),l=c.keySeq(),u=l.indexOf(i),d=l.indexOf(o)+1;return n(c.slice(u,d).map(function(e,t){var n=e.getText(),r=e.getCharacterList();return i===o?e.merge({text:n.slice(a,s),characterList:r.slice(a,s)}):t===i?e.merge({text:n.slice(a),characterList:r.slice(a)}):t===o?e.merge({text:n.slice(0,s),characterList:r.slice(0,s)}):e}))}})),Ku=/* @__PURE__ */ o(((e,t)=>{function n(e,t,n){var r=e;if(n===r.count())t.forEach(function(e){r=r.push(e)});else if(n===0)t.reverse().forEach(function(e){r=r.unshift(e)});else{var i=r.slice(0,n),a=r.slice(n);r=i.concat(t,a).toList()}return r}t.exports=n})),qu=/* @__PURE__ */ o(((e,t)=>{var n=Au(),r=Pu(),i=ku(),a=Ku(),o=zu(),s=Uu(),c=i.List,l=function(e,t,n,r,i,o){var s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:`REPLACE_WITH_NEW_DATA`,c=n.get(i),l=c.getText(),u=c.getCharacterList(),d=i,f=o+r.getText().length,p=null;switch(s){case`MERGE_OLD_DATA_TO_NEW_DATA`:p=r.getData().merge(c.getData());break;case`REPLACE_WITH_NEW_DATA`:p=r.getData()}var m=c.getType();l&&m===`unstyled`&&(m=r.getType());var h=c.merge({text:l.slice(0,o)+r.getText()+l.slice(o),characterList:a(u,r.getCharacterList(),o),type:m,data:p});return e.merge({blockMap:n.set(i,h),selectionBefore:t,selectionAfter:t.merge({anchorKey:d,anchorOffset:f,focusKey:d,focusOffset:f,isBackward:!1})})},u=function(e,t,n){var r=e.getText(),i=e.getCharacterList(),a=r.slice(0,t),o=i.slice(0,t),s=n.first();return e.merge({text:a+s.getText(),characterList:o.concat(s.getCharacterList()),type:a?e.getType():s.getType(),data:s.getData()})},d=function(e,t,n){var r=e.getText(),i=e.getCharacterList(),a=r.length,o=r.slice(t,a),s=i.slice(t,a),c=n.last();return c.merge({text:c.getText()+o,characterList:c.getCharacterList().concat(s),data:c.getData()})},f=function(e,t){var n=e.getKey(),r=e,i=[];for(t.get(n)&&i.push(n);r&&r.getNextSiblingKey();){var a=r.getNextSiblingKey();if(!a)break;i.push(a),r=t.get(a)}return i},p=function(e,t,n,r){return e.withMutations(function(t){var i=n.getKey(),a=r.getKey(),o=n.getNextSiblingKey(),s=n.getParentKey(),l=f(r,e),u=l[l.length-1];if(t.get(a)?(t.setIn([i,`nextSibling`],a),t.setIn([a,`prevSibling`],i)):(t.setIn([i,`nextSibling`],r.getNextSiblingKey()),t.setIn([r.getNextSiblingKey(),`prevSibling`],i)),t.setIn([u,`nextSibling`],o),o&&t.setIn([o,`prevSibling`],u),l.forEach(function(e){return t.setIn([e,`parent`],s)}),s){var d=e.get(s).getChildKeys(),p=d.indexOf(i)+1,m=d.toArray();m.splice.apply(m,[p,0].concat(l)),t.setIn([s,`children`],c(m))}})},m=function(e,t,i,a,o,s){var c=i.first()instanceof r,l=[],f=a.size,m=i.get(o),h=a.first(),g=a.last(),_=g.getLength(),v=g.getKey(),y=c&&(!m.getChildKeys().isEmpty()||!h.getChildKeys().isEmpty());i.forEach(function(e,t){t===o?(y?l.push(e):l.push(u(e,s,a)),a.slice(+!y,f-1).forEach(function(e){return l.push(e)}),l.push(d(e,s,a))):l.push(e)});var b=n.createFromArray(l);return c&&(b=p(b,i,m,h)),e.merge({blockMap:b,selectionBefore:t,selectionAfter:t.merge({anchorKey:v,anchorOffset:_,focusKey:v,focusOffset:_,isBackward:!1})})};t.exports=function(e,t,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`REPLACE_WITH_NEW_DATA`;!t.isCollapsed()&&o(!1);var a=e.getBlockMap(),c=s(n),u=t.getStartKey(),d=t.getStartOffset(),f=a.get(u);return f instanceof r&&!f.getChildKeys().isEmpty()&&o(!1),c.size===1?l(e,t,a,c.first(),u,d,i):m(e,t,a,c,u,d)}})),Ju=/* @__PURE__ */ o(((e,t)=>{var n=ku(),r=Ku(),i=zu(),a=n.Repeat;function o(e,t,n,o){!t.isCollapsed()&&i(!1);var s=null;if(n!=null&&(s=n.length),s==null||s===0)return e;var c=e.getBlockMap(),l=t.getStartKey(),u=t.getStartOffset(),d=c.get(l),f=d.getText(),p=d.merge({text:f.slice(0,u)+n+f.slice(u,d.getLength()),characterList:r(d.getCharacterList(),a(o,s).toList(),u)}),m=u+s;return e.merge({blockMap:c.set(l,p),selectionAfter:t.merge({anchorOffset:m,focusOffset:m})})}t.exports=o})),Yu=/* @__PURE__ */ o(((e,t)=>{var n=ku().Map;function r(e,t,r){var i=t.getStartKey(),a=t.getEndKey(),o=e.getBlockMap(),s=o.toSeq().skipUntil(function(e,t){return t===i}).takeUntil(function(e,t){return t===a}).concat(n([[a,o.get(a)]])).map(r);return e.merge({blockMap:o.merge(s),selectionBefore:t,selectionAfter:t})}t.exports=r})),Xu=/* @__PURE__ */ o(((e,t)=>{var n=Pu();t.exports=function(e,t){if(!(e instanceof n))return null;var r=e.getNextSiblingKey();if(r)return r;var i=e.getParentKey();if(!i)return null;for(var a=t.get(i);a&&!a.getNextSiblingKey();){var o=a.getParentKey();a=o?t.get(o):null}return a?a.getNextSiblingKey():null}})),Zu=/* @__PURE__ */ o(((e,t)=>{var n=Pu(),r=Xu(),i=ku();i.List;var a=i.Map,o=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},s=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},c=function(e,t){var n=[];if(!e)return n;for(var i=r(e,t);i&&t.get(i);){var a=t.get(i);n.push(i),i=a.getParentKey()?r(a,t):null}return n},l=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},u=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},d=function(e,t,n,r){return e.withMutations(function(i){if(o(t.getKey(),i,function(e){return e.merge({nextSibling:l(e,i,r),prevSibling:u(e,i,r)})}),o(n.getKey(),i,function(e){return e.merge({nextSibling:l(e,i,r),prevSibling:u(e,i,r)})}),s(t.getKey(),r).forEach(function(e){return o(e,i,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return i.get(e)}),nextSibling:l(e,i,r),prevSibling:u(e,i,r)})})}),o(t.getNextSiblingKey(),i,function(e){return e.merge({prevSibling:t.getPrevSiblingKey()})}),o(t.getPrevSiblingKey(),i,function(e){return e.merge({nextSibling:l(e,i,r)})}),o(n.getNextSiblingKey(),i,function(e){return e.merge({prevSibling:u(e,i,r)})}),o(n.getPrevSiblingKey(),i,function(e){return e.merge({nextSibling:n.getNextSiblingKey()})}),s(n.getKey(),r).forEach(function(e){o(e,i,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return i.get(e)}),nextSibling:l(e,i,r),prevSibling:u(e,i,r)})})}),c(n,r).forEach(function(e){return o(e,i,function(e){return e.merge({nextSibling:l(e,i,r),prevSibling:u(e,i,r)})})}),e.get(t.getKey())==null&&e.get(n.getKey())!=null&&n.getParentKey()===t.getKey()&&n.getPrevSiblingKey()==null){var a=t.getPrevSiblingKey();o(n.getKey(),i,function(e){return e.merge({prevSibling:a})}),o(a,i,function(e){return e.merge({nextSibling:n.getKey()})});var d=a?e.get(a):null,f=d?d.getParentKey():null;if(t.getChildKeys().forEach(function(e){o(e,i,function(e){return e.merge({parent:f})})}),f!=null){var p=e.get(f);o(f,i,function(e){return e.merge({children:p.getChildKeys().concat(t.getChildKeys())})})}o(t.getChildKeys().find(function(t){return e.get(t).getNextSiblingKey()===null}),i,function(e){return e.merge({nextSibling:t.getNextSiblingKey()})})}})},f=function(e,t){if(t.isCollapsed())return e;var i=e.getBlockMap(),o=t.getStartKey(),c=t.getStartOffset(),l=t.getEndKey(),u=t.getEndOffset(),f=i.get(o),m=i.get(l),h=f instanceof n,g=[];if(h){var _=m.getChildKeys(),v=s(l,i);m.getNextSiblingKey()&&(g=g.concat(v)),_.isEmpty()||(g=g.concat(v.concat([l]))),g=g.concat(s(r(m,i),i))}var y=f===m?p(f.getCharacterList(),c,u):f.getCharacterList().slice(0,c).concat(m.getCharacterList().slice(u)),b=f.merge({text:f.getText().slice(0,c)+m.getText().slice(u),characterList:y}),x=h&&c===0&&u===0&&m.getParentKey()===o&&m.getPrevSiblingKey()==null?a([[o,null]]):i.toSeq().skipUntil(function(e,t){return t===o}).takeUntil(function(e,t){return t===l}).filter(function(e,t){return g.indexOf(t)===-1}).concat(a([[l,null]])).map(function(e,t){return t===o?b:null}),S=i.merge(x).filter(function(e){return!!e});return h&&f!==m&&(S=d(S,f,m,i)),e.merge({blockMap:S,selectionBefore:t,selectionAfter:t.merge({anchorKey:o,anchorOffset:c,focusKey:o,focusOffset:c,isBackward:!1})})},p=function(e,t,n){if(t===0)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};t.exports=f})),Qu=/* @__PURE__ */ o(((e,t)=>{var n=Pu(),r=Hu(),i=ku(),a=zu(),o=Yu(),s=i.List,c=i.Map,l=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},u=function(e,t,n){return e.withMutations(function(e){var r=t.getKey(),i=n.getKey();l(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:s(a)})}),l(t.getNextSiblingKey(),e,function(e){return e.merge({prevSibling:i})}),l(r,e,function(e){return e.merge({nextSibling:i})}),l(i,e,function(e){return e.merge({prevSibling:r})})})};t.exports=function(e,t){!t.isCollapsed()&&a(!1);var i=t.getAnchorKey(),s=e.getBlockMap(),l=s.get(i),d=l.getText();if(!d){var f=l.getType();if(f===`unordered-list-item`||f===`ordered-list-item`)return o(e,t,function(e){return e.merge({type:`unstyled`,depth:0})})}var p=t.getAnchorOffset(),m=l.getCharacterList(),h=r(),g=l instanceof n,_=l.merge({text:d.slice(0,p),characterList:m.slice(0,p)}),v=_.merge({key:h,text:d.slice(p),characterList:m.slice(p),data:c()}),y=s.toSeq().takeUntil(function(e){return e===l}),b=s.toSeq().skipUntil(function(e){return e===l}).rest(),x=y.concat([[i,_],[h,v]],b).toOrderedMap();return g&&(!l.getChildKeys().isEmpty()&&a(!1),x=u(x,_,v)),e.merge({blockMap:x,selectionBefore:t,selectionAfter:t.merge({anchorKey:h,anchorOffset:0,focusKey:h,focusOffset:0,isBackward:!1})})}})),$u=/* @__PURE__ */ o(((e,t)=>{var n=ju(),r=Fu(),i=Lu(),a=Vu(),o=Gu(),s=ku(),c=qu(),l=Ju(),u=zu(),d=Yu(),f=Wu(),p=Zu(),m=Qu(),h=s.OrderedSet,g={replaceText:function(e,t,r,i,a){var o=p(f(e,t),t),s=n.create({style:i||h(),entity:a||null});return l(o,o.getSelectionAfter(),r,s)},insertText:function(e,t,n,r,i){return!t.isCollapsed()&&u(!1),g.replaceText(e,t,n,r,i)},moveText:function(e,t,n){var r=o(e,t),i=g.removeRange(e,t,`backward`);return g.replaceWithFragment(i,n,r)},replaceWithFragment:function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`REPLACE_WITH_NEW_DATA`,i=p(f(e,t),t);return c(i,i.getSelectionAfter(),n,r)},removeRange:function(e,t,n){var r,i,o,s;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),r=t.getAnchorKey(),i=t.getFocusKey(),o=e.getBlockForKey(r),s=e.getBlockForKey(i);var c=t.getStartOffset(),l=t.getEndOffset(),u=o.getEntityAt(c),d=s.getEntityAt(l-1);return r===i&&u&&u===d?p(e,a(e.getEntityMap(),o,s,t,n)):p(f(e,t),t)},splitBlock:function(e,t){var n=p(f(e,t),t);return m(n,n.getSelectionAfter())},applyInlineStyle:function(e,t,n){return r.add(e,t,n)},removeInlineStyle:function(e,t,n){return r.remove(e,t,n)},setBlockType:function(e,t,n){return d(e,t,function(e){return e.merge({type:n,depth:0})})},setBlockData:function(e,t,n){return d(e,t,function(e){return e.merge({data:n})})},mergeBlockData:function(e,t,n){return d(e,t,function(e){return e.merge({data:e.getData().merge(n)})})},applyEntity:function(e,t,n){return i(f(e,t),t,n)}};t.exports=g})),ed=/* @__PURE__ */ o(((e,t)=>{function n(e){return Object.keys(e).map(function(t){return e[t]})}t.exports=n})),td=/* @__PURE__ */ o(((e,t)=>{function n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],i=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var a=Mu(),o=ed(),s=ku(),c=s.List,l=s.Repeat,u=s.Record,d=function(){return!0},f=u({start:null,end:null}),p=u({start:null,end:null,decoratorKey:null,leaves:null}),m={generate:function(e,t,n){var r=t.getLength();if(!r)return c.of(new p({start:0,end:0,decoratorKey:null,leaves:c.of(new f({start:0,end:0}))}));var i=[],o=n?n.getDecorations(t,e):c(l(null,r)),s=t.getCharacterList();return a(o,g,d,function(e,t){i.push(new p({start:e,end:t,decoratorKey:o.get(e),leaves:h(s.slice(e,t).toList(),e)}))}),c(i)},fromJS:function(e){var t=e.leaves;return new p(n({},i(e,[`leaves`]),{leaves:t==null?null:c(Array.isArray(t)?t:o(t)).map(function(e){return f(e)})}))}};function h(e,t){var n=[];return a(e.map(function(e){return e.getStyle()}).toList(),g,d,function(e,r){n.push(new f({start:e+t,end:r+t}))}),c(n)}function g(e,t){return e===t}t.exports=m})),nd=/* @__PURE__ */ o(((e,t)=>{function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var r=ku().Record;t.exports=/* @__PURE__ */ function(e){n(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.getType=function(){return this.get(`type`)},r.getMutability=function(){return this.get(`mutability`)},r.getData=function(){return this.get(`data`)},t}(r({type:`TOKEN`,mutability:`IMMUTABLE`,data:Object}))})),rd=/* @__PURE__ */ o(((e,t)=>{function n(){return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,function(e){var t=Math.random()*16|0;return(e==`x`?t:t&3|8).toString(16)})}t.exports=n})),id=/* @__PURE__ */ o(((e,t)=>{function n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],i=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=nd(),a=ku(),o=zu(),s=rd(),c=a.Map,l=c(),u=s();function d(e,t){console.warn(`WARNING: `+e+` will be deprecated soon!
95
95
  Please use "`+t+`" instead.`)}var f={getLastCreatedEntityKey:function(){return d(`DraftEntity.getLastCreatedEntityKey`,`contentState.getLastCreatedEntityKey`),f.__getLastCreatedEntityKey()},create:function(e,t,n){return d(`DraftEntity.create`,`contentState.createEntity`),f.__create(e,t,n)},add:function(e){return d(`DraftEntity.add`,`contentState.addEntity`),f.__add(e)},get:function(e){return d(`DraftEntity.get`,`contentState.getEntity`),f.__get(e)},__getAll:function(){return l},__loadWithEntities:function(e){l=e,u=s()},mergeData:function(e,t){return d(`DraftEntity.mergeData`,`contentState.mergeEntityData`),f.__mergeData(e,t)},replaceData:function(e,t){return d(`DraftEntity.replaceData`,`contentState.replaceEntityData`),f.__replaceData(e,t)},__getLastCreatedEntityKey:function(){return u},__create:function(e,t,n){return f.__add(new i({type:e,mutability:t,data:n||{}}))},__add:function(e){return u=s(),l=l.set(u,e),u},__get:function(e){var t=l.get(e);return!t&&o(!1),t},__mergeData:function(e,t){var r=f.__get(e),i=n({},r.getData(),t),a=r.set(`data`,i);return l=l.set(e,a),a},__replaceData:function(e,t){var n=f.__get(e).set(`data`,t);return l=l.set(e,n),n}};t.exports=f})),ad=/* @__PURE__ */ o(((e,t)=>{function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var r=ku().Record;t.exports=/* @__PURE__ */ function(e){n(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.serialize=function(){return`Anchor: `+this.getAnchorKey()+`:`+this.getAnchorOffset()+`, Focus: `+this.getFocusKey()+`:`+this.getFocusOffset()+`, Is Backward: `+String(this.getIsBackward())+`, Has Focus: `+String(this.getHasFocus())},r.getAnchorKey=function(){return this.get(`anchorKey`)},r.getAnchorOffset=function(){return this.get(`anchorOffset`)},r.getFocusKey=function(){return this.get(`focusKey`)},r.getFocusOffset=function(){return this.get(`focusOffset`)},r.getIsBackward=function(){return this.get(`isBackward`)},r.getHasFocus=function(){return this.get(`hasFocus`)},r.hasEdgeWithin=function(e,t,n){var r=this.getAnchorKey(),i=this.getFocusKey();if(r===i&&r===e){var a=this.getStartOffset(),o=this.getEndOffset();return t<=a&&a<=n||t<=o&&o<=n}if(e!==r&&e!==i)return!1;var s=e===r?this.getAnchorOffset():this.getFocusOffset();return t<=s&&n>=s},r.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},r.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},r.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},r.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},r.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},t.createEmpty=function(e){return new t({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},t}(r({anchorKey:``,anchorOffset:0,focusKey:``,focusOffset:0,isBackward:!1,hasFocus:!1}))})),od=/* @__PURE__ */ o(((e,t)=>{t.exports=function(e){return typeof window<`u`&&window.__DRAFT_GKX?!!window.__DRAFT_GKX[e]:!1}})),sd=/* @__PURE__ */ o(((e,t)=>{var n=/* @__PURE__ */ RegExp(`\r`,`g`);function r(e){return e.replace(n,``)}t.exports=r})),cd=/* @__PURE__ */ o(((e,t)=>{function n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],i=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var a=Au(),o=ju(),s=Nu(),c=Pu(),l=id(),u=ad(),d=Hu(),f=ed(),p=od(),m=ku(),h=sd(),g=m.List,_=m.Record,v=m.Repeat,y=m.Map,b=m.OrderedMap,x=_({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}),S=p(`draft_tree_data_support`)?c:s;t.exports=/* @__PURE__ */ function(e){i(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.getEntityMap=function(){return l},r.getBlockMap=function(){return this.get(`blockMap`)},r.getSelectionBefore=function(){return this.get(`selectionBefore`)},r.getSelectionAfter=function(){return this.get(`selectionAfter`)},r.getBlockForKey=function(e){return this.getBlockMap().get(e)},r.getKeyBefore=function(e){return this.getBlockMap().reverse().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},r.getKeyAfter=function(e){return this.getBlockMap().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},r.getBlockAfter=function(e){return this.getBlockMap().skipUntil(function(t,n){return n===e}).skip(1).first()},r.getBlockBefore=function(e){return this.getBlockMap().reverse().skipUntil(function(t,n){return n===e}).skip(1).first()},r.getBlocksAsArray=function(){return this.getBlockMap().toArray()},r.getFirstBlock=function(){return this.getBlockMap().first()},r.getLastBlock=function(){return this.getBlockMap().last()},r.getPlainText=function(e){return this.getBlockMap().map(function(e){return e?e.getText():``}).join(e||`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@20minutes/tyr",
3
- "version": "2.48.4",
3
+ "version": "2.48.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@github.com/20minutes/tyr.git"