1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[940,825],{4148:(t,e,i)=>{i.d(e,{Z:()=>h});var s=i(1029),a=i(9342),n=i(9647),r=i(7652),o=i(6121);var l=i(5143);new s.Z("Slider");class c extends r.Z{eventEmitter=new o.Z;addLocalizedArticleSlides(t){const e=this.params.slideClass,i=[];this.removeAllSlides();const s=(0,n.sb)("map-articles"),r=s?.dataset?.deeplink??"",o=l.Z.isWebview()&&0!==r.length;for(const[s,n]of t){const t=n.articleId??"",l=n.title??"",c=n.mainImage??"",h=o?`${r}://article/${t}`:n.url??"",d=n.updatedAt?(0,a.Po)(n.updatedAt):"",u=n.tag?`<span class="thema">${n.tag}</span>`:"",m=document.createElement("div");m.className=e,m.dataset.documentId=s,m.innerHTML=`<a href="${h}">\n <div class="container-slide map-card" data-article="${t}">\n <div class="container-img">\n <img alt="${l}" src="${c}" loading="lazy" />\n </div>\n <div class="container-details">\n ${u}\n <h3>${l}</h3>\n <div class="container-details-bottom">\n <span class="date">${d}</span>\n <span class="view">Lire <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.002 7.027a1.027 1.027 0 0 1 1.755-.724l8.037 8.083 7.969-8.08a1.027 1.027 0 1 1 1.462 1.442l-8.7 8.818a1.027 1.027 0 0 1-1.459 0L.302 7.751a1.023 1.023 0 0 1-.3-.724Z"/></svg>\n</span>\n </div>\n </div>\n </div>\n </a>`,i.push(m)}this.appendSlide(i),this.update(),this.slideReset(0)}resolveSlideOffsetByDataProp(t,e){for(const i in this.slides){const s=this.slides[i];if(t in s.dataset&&e===s.dataset[t])return Number(i)}return-1}show(){this.el.parentElement.classList.remove("slider-hidden"),this.eventEmitter.emit("slider.shown")}hide(){this.el.parentElement.classList.add("slider-hidden"),this.eventEmitter.emit("slider.hidden")}isHidden(){return this.el.parentElement.classList.contains("slider-hidden")}onEvent(t,e){return this.eventEmitter.on(t,e),this}}const h=c},2940:(t,e,i)=>{i.r(e);var s=i(5243),a=(i(5732),i(1146));const n='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" class="pin"><circle cx="14" cy="14" r="14" fill="#fff"/><circle cx="14" cy="14" r="11" class="inside-marker"/></svg>\n',r='<svg xmlns="http://www.w3.org/2000/svg" class="pin-active" viewBox="0 0 31.062 37.961"><path d="M15.53 3.122a12.4 12.4 0 0 0-12.4 12.4c-.421 9.036 12.4 19.319 12.4 19.319s12.818-10.283 12.4-19.319a12.4 12.4 0 0 0-12.4-12.4Z" class="inside-marker"/><path fill="#fff" d="M31.05 15.449a15.52 15.52 0 0 0-31.04 0c-.184 4.546 2.1 9.64 6.787 15.144a55.707 55.707 0 0 0 6.78
16.681 3.123 3.123 0 0 0 3.908 0 55.771 55.771 0 0 0 6.78-6.681c4.688-5.5 6.971-10.6 6.787-15.144Zm-27.918.071a12.4 12.4 0 0 1 24.8 0c.42 9.036-12.4 19.319-12.4 19.319S2.712 24.556 3.132 15.52Z"/></svg>\n',o=()=>s.divIcon({html:n,className:"map-pin",iconSize:[20,20]}),l=()=>s.divIcon({html:r,className:"map-pin-active",iconSize:[32,38]}),c=()=>s.divIcon({html:n,className:"map-pin map-pin-highlighted",iconSize:[20,20]}),h=()=>s.divIcon({html:r,className:"map-pin-active map-pin-highlighted",iconSize:[32,38]}),d=t=>s.divIcon({html:n+'<div class="marker-cluster-number">'+t+"</div>",className:"map-pin map-cluster",iconSize:[25,25]}),u=t=>s.divIcon({html:r+'<div class="marker-cluster-number">'+t+"</div>",className:"map-pin map-cluster map-cluster-active",iconSize:[32,38]});class m extends s.Marker{constructor(t,e,i){super(t,i),this.active=e.active??!1,this.highlight=e.highlight??!1,this.article=e.article,this.hidden=e.hidden??!1,this.id=e.id,this.updatedAt=e.updatedAt}isActive(){return this.active}setActive(t){return this.active=t,this}isHighlighted(){return this.highlight}setHighlighted(t){return this.highlight=t,this}isHidden(){return this.hidden}setHidden(t){return this.hidden=t,this}getId(){return this.id}getLocalizedArticle(){return this.article}getUpdatedAt(){return this.updatedAt}}class p extends Map{constructor(t,e){super(),this.map=t,this.clusterGroup=e}countVisible(){let t=0;for(const e of this.values())e.isHidden()||t++;return t}getVisibleMarkers(){const t=new s.MarkerClusterGroup;for(const e of this.values())e.isHidden()||t.addLayer(e);return t}getVisibleValues(){const t=new Map;for(const[e,i]of this.entries())i.isHidden()||t.set(e,i.getLocalizedArticle());return t}removeAll(){for(const t of this.values())this.clusterGroup?.removeLayer(t);this.clear()}refreshUiState(){for(const t of this.values())t.isActive()&&"map-pin"===t.getIcon().options.className?t.setIcon(l()):t.isActive()&&"map-pin map-pin-highlighted"===t.getIcon().options.className?t.setIcon(h()):t.isActive()||"map-pin-active map-pin-highlighted"!==t.getIcon().options.className?t.isActive()||"map-pin-active"!==t.getIcon().options.className||t.setIcon(o()):t.setIcon(c()),t.isHidden()?this.clusterGroup?.removeLayer(t):this.clusterGroup?.addLayer(t);this.clusterGroup?.refreshClusters()}}var g=i(1029),f=i(6121);function v(t){return[t.lat,t.lng]}var w=i(9647);const y=new g.Z("Map.Search");class L{eventEmitter=new f.Z;constructor(){y.log("Constructed")}init(t){this.map=t,null!==this.map?y.log("Initialized"):y.debug("Map doesn't exists")}on(t,e){return this.eventEmitter.on(t,e),this}}const b=new g.Z("Map.SearchInArea");const k=new class extends L{button=(0,w.sb)("map-search-in-area");buttonDisabled=!1;init(t){null!==this.button?(super.init(t),this.previousSearchCenter=this.map.getCenter(),this.updateBoundsCircumRadius(),this.map.on("move",(t=>{const e=this.map.getCenter(),i=this.map.distance(this.previousSearchCenter,e)/1e3;!this.buttonDisabled&&i>.05*this.boundsRadius&&this.button.classList.remove("not-visible")})),this.button.addEventListener("click",(async t=>{t.preventDefault(),this.searchInAreaCallback(this.map.getCenter(),this.map.getZoom())}))):b.warn("Search In Area button doesn't exists")}searchInAreaCallback(t,e){this.eventEmitter.emit("search-in-area",{center:v(t),zoom:e}),this.previousSearchCenter=t,this.updateBoundsCircumRadius(),this.button.classList.add("not-visible")}disableButton(t){this.buttonDisabled=t,t?this.button.classList.add("not-visible"):(this.previousSearchCenter=this.map.getCenter(),this.updateBoundsCircumRadius())}hideButton(){this.button.classList.add("not-visible")}updateBoundsCircumRadius(t){null==t&&(t=this.map.getCenter());let e=this.map.getBounds().getNorthEast();this.boundsRadius=this.map.distance(t,e)/1e3}};var C=i(9567);const A=new g.Z("Map.SearchInput");function S(t){return`${t.nom} (${t.code_postal})`}const D=new class extends L{suggestItemClass="search-map-list-item";suggestions=[];zoomOnSearch=13;init(t){super.init(t),this.searchBar=(0,w.sb)("map-searchbar"),this.inputField=(0,w.sb)("map-searchbar-input"),this.suggestList=(0,w.sb)("suggest-list"),this.searchBar&&this.inputField&&this.suggestList?(A.log("Initialized"),this.initListeners()):A.debug("Missing element for the map search")}initListeners(){this.inputField.addEventListener("keydown",(async t=>{"Enter"===t.key&&await this.search()})),this.inputField.addEventListener("input",(async t=>{t.preventDefault(),await this.changeAutoComplete(t)})),this.suggestList.addEventListener("click",(async t=>{t.preventDefault(),this.selectSuggestItem(t)}))}async search(){if(this.inputField)try{const t=(await C.iX.search(this.inputField.value))[0],e=[t.centre.coordinates[1],t.centre.coordinates[0]];this.searchBar?.classList.remove("search"),this.inputField.value=S(t),this.eventEmitter.emit("search",{center:e,zoom:this.zoomOnSearch})}catch(t){A.error(t)}else A.warn("Missing element for input search")}async changeAutoComplete(t){if(this.suggestList.innerHTML="",1>=this.inputField.value.length&&this.searchBar.classList.remove("search"),!(2>this.inputField.value.length)){try{const t=await C.iX.search(this.inputField.value);this.suggestions=t.map((t=>({id:t.insee,label:S(t),coordinates:new s.LatLng(t.centre.coordinates[1],t.centre.coordinates[0])})))}catch(t){A.error(t)}if(0===this.suggestions.length)this.suggestList.innerHTML=`<li class=${this.suggestItemClass}>Cette zone nâest pas encore couverte</li>`;else{const t=this.suggestions.filter((t=>
1!(0,w.sb)(t.id))).map((t=>`<li\n id="${t.id}"\n class="${this.suggestItemClass}"\n data-gps-lat="${t.coordinates.lat}"\n data-gps-lng="${t.coordinates.lng}"\n >${t.label}</li>`));this.suggestList.innerHTML+=t.join(""),this.searchBar.classList.add("search")}}}selectSuggestItem(t){if(!(t.target instanceof HTMLElement))return;if(!this.inputField||!this.suggestList)return void A.warn("Missing element for select suggest item");this.inputField.value=t.target.outerText,this.inputField.dataset.gpsLat=t.target.dataset.gpsLat,this.inputField.dataset.gpsLng=t.target.dataset.gpsLng,this.searchBar.classList.remove("search"),this.suggestList.innerHTML="";const e=[parseFloat(this.inputField.dataset.gpsLat),parseFloat(this.inputField.dataset.gpsLng)];this.eventEmitter.emit("search-input",{center:e,zoom:this.zoomOnSearch}),this.clearSearchBar()}clearSearchBar(){this.inputField&&this.searchBar?(this.inputField.value="",this.searchBar.classList.remove("search")):A.log("Missing element for clear search bar")}};var M=i(9342);const E=new g.Z("Map.ArticleListActions");const R=new class{uri="";
1async init(){await(0,w.qQ)(),this.element=(0,w.sb)("map-link"),null!==this.element?E.debug("Initialized"):E.warn("Element doesn't exists")}async updateUri(t){let e=await C.iE.getUrl({center:t.slice(0,2)});if(null!==e&&""!==e&&"null"!==e){if(this.setUri(e),null!==this.element){this.element.querySelector("a").setAttribute("href",this.getUri()),E.debug("URI updated",this.getUri())}}else E.warn("Uri not updated because it's empty")}setUri(t){this.uri=t}getUri(){return this.uri}};var I=i(8698),z=i(4106),F=i(5938),x=i(4702),B=i(1488);i(5890);const H={iconCreateFunction:t=>{for(const e of t.getAllChildMarkers())if(e.isActive())return u(t.getChildCount());return d(t.getChildCount())},showCoverageOnHover:!1,maxClusterRadius:50,spiderfyOnMaxZoom:!0,spiderLegPolylineOptions:{weight:0,opacity:0},zoomToBoundsOnClick:!0,animate:!0},N=new g.Z("Map");class Z extends a.wc{currentDepartment=null;configuration={center:[44.832846236573,-.5646143078125],maxZoom:18,minZoom:10,zoom:11,newSearchDistance:10,zoomControlPosition:"topright",lockMap:!1};searchConfiguration={center:null,zoom:11};eventEmitter=new f.Z;constructor(t=null){super(),this.map=t,this.clusterGroup=new s.MarkerClusterGroup(H),N.log("Constructor map")}async initialize(){null!==document.querySelector("#user-city-department-block")&&(this.currentCity=JSON.parse(localStorage.getItem("user-city"))??null,this.currentDepartment=z[(0,B.Ew)(this.currentCity?.url??"")]??z.default,this.configuration={...this.configuration,...this.buildConfigFromDataAttributes()},this.configuration.center=[this.currentDepartment.center.lat,this.currentDepartment.center.lng],this.configuration.zoom=this.currentDepartment.zoom,this.configuration.minZoom=7),this.map||(this.initMap(),N.debug("Init map")),await(0,a.XU)(".locations-tags .snap-carousel-wrapper",(t=>new x.Z(t))),k.init(this.map),D.init(this.map),R.init(),window.addEventListener(I.T.USER_CITY_UPDATED,(t=>{if(null!==document.querySelector("#user-city-department-block")){this.currentCity=t.detail.currentCity;let e=z[(0,B.Ew)(this.currentCity.url)];if(e===this.currentDepartment)return;this.currentDepartment=e,!1===this.configuration.lockMap&&e&&k.searchInAreaCallback(new s.LatLng(e.center.lat,e.center.lng),e.zoom)}else!1===this.configuration.lockMap&&t.detail.currentCity.gps.lat&&t.detail.currentCity.gps.lon&&k.searchInAreaCallback(new s.LatLng(t.detail.currentCity.gps.lat,t.detail.currentCity.gps.lon),this.map.getZoom())}))}cleanLayerMarkers(){this.clusterGroup.clearLayers(),this.markers.removeAll()}async loadArticles(t){await R.updateUri(v(this.map.getCenter()));try{const e=this.map.getBounds().pad(.25),i={area:[e.getNorthEast().lat,e.getNorthEast().lng,e.getSouthWest
1().lat,e.getSouthWest().lng],center:this.searchConfiguration?.center?.slice(0,2),with_tag_articles:!t},s={highlight_id:t,limit:this.configuration?.maximumDisplay,day_range:this.configuration?.dayRange};Object.entries(s).forEach((([t,e])=>{void 0!==e&&(i[t]=e)}));let a=await C.Kz.list(i);0===a.size?this.eventEmitter.emit("articles.empty"):(this.addMarkers(a),this.eventEmitter.emit("articles.loaded",a))}catch(t){N.error("Erreur lors du chargement des articles : ",t)}}initMap(){if(this.container=s.DomUtil.get("map-articles"),!this.container)throw new Error("No map container found");this.configuration={...this.configuration,...this.buildConfigFromDataAttributes()};const t=s.latLngBounds(s.latLng(51.16340936587068,-5.397696600029705),s.latLng(41.299986850864656,9.69751781496057));return this.map=s.map(this.container,{center:new s.LatLng(...this.configuration.center),dragging:!((0,F.nv)("md")&&this.container.classList.contains("embedded")),zoomSnap:.25,zoom:this.configuration.zoom,minZoom:this.configuration.minZoom,maxZoom:this.configuration.maxZoom,maxBounds:t}),s.maplibreGL({style:"https://api.jawg.io/styles/1e14e76c-d9ac-4632-ac26-dc37edeca06b.json?access-token=fjkGUrLczX6Q9ugljf8I6dvXEJsd7m7f5utThA8DTLjApfR5ubBf0wbjGjy5FkTH"}).addTo(this.map),N.debug("Init map",this.map),this.map.zoomControl.setPosition(this.configuration.zoomControlPosition),this.map.addLayer(this.clusterGroup),this.markers=new p(this.map,this.clusterGroup),this.updateSearchConfiguration(),this.loadArticles((0,M.eY)("highlight")),this.container.classList.contains("embedded")&&(0,w.EJ)(this.container,(()=>{(0,F.nv)("md")?this.map.dragging.disable():this.map.dragging.enable()})),this.map}updateSearchConfiguration(t){const e=this.searchConfiguration;null==t&&(t={center:v(this.map.getCenter()),zoom:this.map.getZoom()}),this.searchConfiguration=t,N.debug("Update search configuration",{old:e,new:this.searchConfiguration})}centerMapOn(t){if(!this.markers.has(t))return;const e=this.markers.get(t),i=this.map.latLngToContainerPoint(e.getLatLng());this.eventEmitter.emit("centerView",e,i),this.map.flyTo(e.getLatLng())}async updateView(t=500){this.eventEmitter.emit("view.update",this.map),this.map.flyTo(this.searchConfiguration.center,this.searchConfiguration.zoom,{duration:t/1e3}),this.configuration.center=this.searchConfiguration.center,await new Promise((e=>setTimeout(e,t))),this.eventEmitter.emit("view.updated",this.map)}isOnViewport(t){return this.map.getBounds().contains(this.markers.get(t).getLatLng())}on(t,e){return this.eventEmitter.on(t,e),this}setMarkersInactive(){for(const t of this.markers.values())t.setActive(!1);this.markers.refreshUiState()}setMarkerActiveFor(t){this.markers.has(t)&&this.setMarkerActive(this.markers.get(t))}addMarkers(t){this.markers.removeAll();for(const[e,i]of t){const t=new m(i.gps,{active:!1,highlight:null!==i.order,article:i,hidden:!1,id:e,updatedAt:i.updatedAt},{icon:null!==i.order?c():o()});t.on("click",(()=>{this.setMarkerActive(t),this.eventEmitter.emit("pin.click",t,i)})),this.markers.set(e,t),this.clusterGroup.addLayer(t)}this.eventEmitter.emit("markers.added",this.markers),this.clusterGroup.on("clusterclick",(t=>{const e=t.propagatedFrom.getAllChildMarkers()[0];this.eventEmitter.emit("pin.click",e,e.getLocalizedArticle())}))}setMarkerActive(t){for(const t of this.markers.values())if(t.isActive()){t.setActive(!1);break}t.setActive(!0),this.markers.refreshUiState()}buildConfigFromDataAttributes(){const t={};return void 0===this?.container?.dataset?(N.warn("No data attributes found on map container."),t):("center"in this.container.dataset&&(t.center=JSON.parse(this.container.dataset.center)),"dayRange"in this.container.dataset&&(t.dayRange=parseInt(this.container.dataset.dayRange)),"mapRange"in this.container.dataset&&(t.mapRange=parseInt(this.container.dataset.mapRange)),"zoomMax"in this.container.dataset&&(t.maxZoom=parseInt(this.container.dataset.zoomMax)),"zoomMin"in this.container.dataset&&(t.minZoom=parseInt(this.container.dataset.zoomMin)),"zoom"in this.container.dataset&&(t.zoom=parseInt(this.container.dataset.zoom)),"newSearchDistance"in this.container.dataset&&(t.newSearchDistance=parseInt(this.container.dataset.newSearchDistance)),"maximumDisplay"in this.container.dataset&&(t.maximumDisplay=parseInt(this.container.dataset.maximumDisplay)),"lockMap"in this.container.dataset&&(t.lockMap=Boolean(this.container.dataset.lockMap)),t)}}var q=i(5444),T=i(4148),V=i(8022);const $=new Z,U=new T.Z(".slider.swiper",{modules:[V.bi,V.W_,V.Rv],slidesPerView:"auto",centeredSlides:!0,spaceBetween:5,speed:200,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},freeMode:{enabled:!0,sticky:!0}});U.on("activeIndexChange",(t=>{if(!t.slides.length)return;const e=t.slides[t.activeIndex].dataset.documentId;$.setMarkerActiveFor(e),$.isOnViewport(e)||$.centerMapOn(e)})),U.onEvent("slider.hidden",(()=>{const t=document.querySelector("#map-link");t?.classList.remove("with-slider"),t?.classList.add("with-not-result")})).onEvent("slider.shown",(()=>{const t=document.querySelector("#map-link");t?.classList.add("with-slider"),t?.classList.remove("with-not-result")})),$.on("articles.empty",(async()=>{U.hide();
1const t=(0,w.sb)("map-link");t?.classList.add("with-not-result");null!==(0,w.sb)("map-filters")&&(await q.H.initialize(),q.H.selectMaxFilterDateRange(),q.H.applyFilters(),q.H.showNoResult())})).on("articles.loaded",(async t=>{U.addLocalizedArticleSlides(t),U.show();null!==(0,w.sb)("map-filters")&&(await q.H.initialize(),q.H.hideNoResult(),q.H.applyFilters(),q.H.filterWithMinimumDisplayed())})).on("markers.added",(async t=>{$.setMarkersInactive(),await q.H.initialize(),q.H.setArticleMarkers(t)})).on("pin.click",((t,e)=>{let i=200;const s=U.resolveSlideOffsetByDataProp("documentId",t.getId());U.isHidden()&&(i=0,U.show()),s>-1&&U.slideTo(s,i)})).on("centerView",((t,e)=>{const i=document.querySelector(".slider-container");i&&(e.y+=i.offsetHeight/2)})).on("view.update",(t=>{k.disableButton(!0)})).on("view.updated",(t=>{k.disableButton(!1)})),q.H.on("filter.noResult",(()=>U.hide())).on("filter.hasResults",(t=>{$.setMarkerActiveFor(t.keys().next().value),U.addLocalizedArticleSlides(t),U.show()}));const O=async t=>{$.cleanLayerMarkers(),$.updateSearchConfiguration(t),k.hideButton(),await $.updateView(),await $.loadArticles()};k.on("search-in-area",O),D.on("search-input",O),(0,w.qQ)().then((async()=>{$.initialize()}))},5444:(t,e,i)=>{i.d(e,{H:()=>c});var s=i(1146),a=i(1029),n=i(9647),r=i(6121);const o=new a.Z("MapFilter");class l extends s.wc{activeFilters={};configuration={};eventEmitter=new r.Z;markers=null;minimumDisplay=null;filterDateRange=[];constructor(t={}){super(),this.configuration=t}setArticleMarkers(t){return this.markers=t,this}async initialize(){if(this.initialized)return;const t=document.querySelector(".filter-wrapper");this.mapNotificationWrapper=document.querySelector(".map-notification"),this.modal=document.querySelector(".map-filter-modal"),this.modal&&this.mapNotificationWrapper&&t?(this.minimumDisplay=this.modal.dataset.minimumDisplay?parseInt(this.modal.dataset.minimumDisplay):null,this.clearFilterButton=this.modal.querySelector(".clear-filter"),this.filterButton=t.querySelector(".filter-button"),this.filterCount=t.querySelector(".filter-count"),this.filterDateRange=Array.from(this.modal.querySelectorAll(".range-filter .map-filter-value")),this.filterTags=this.modal.querySelectorAll(".tag-filter .map-filter-value"),this.foundArticles=this.modal.querySelector(".found"),this.mapNotificationClearFilter=this.mapNotificationWrapper.querySelector(".map-notification-reset-filter"),this.selectDateRange=document.querySelector("#simple-map-filter.map-dropdown-filter"),this.showArticlesButton=this.modal.querySelector(".show-article-button"),this.initMapFilter(),this.initCustomDateRangeFilter(),this.filterWithMinimumDisplayed(),this.initialized=!0,null===this.minimumDisplay&&this.filterDateRange[0].dispatchEvent(new Event("click"))):o.warn("No modal, filter wrapper nor notification wrapper found.")}initMapFilter(){for(const t of this.filterDateRange)t.addEventListener("click",(e=>{e.preventDefault(),t.classList.contains("selected")||(this.filterByDateRange(parseInt(t.dataset.range)),this.selectDateRange.classList.remove("opened"))}));const t=t=>{t.preventDefault(),this.activeFilters={};for(const t of this.modal.querySelectorAll(".map-filter-value"))t.classList.remove("selected");this.filterByDateRange(parseInt(this.filterDateRange[0].dataset.range))};this.mapNotificationClearFilter.addEventListener("click",t),this.clearFilterButton.addEventListener("click",t),this.showArticlesButton.addEventListener("click",(()=>{this.eventEmitter.emit("filter.applied"),this.closeModal()}))}filterByDateRange(t=1){const e=new Date((new Date).getTime()-24*t*60*60*1e3);this.activeFilters.dateRange=t=>t.getUpdatedAt()>e;for(const e of this.filterDateRange)Number(e.dataset.range)===t?(this.filterDateRangeValue=t,e.classList.add("selected")):e.classList.remove("selected");const i=this.selectDateRange.querySelector(".filters"),s=this.getChildByDateRangeValue(i,this.filterDateRangeValue.toString()||"2");this.selectFilter(s),this.applyFilters()}filterByTags(t){this.activeFilters.tags=e=>t.includes(e.getLocalizedArticle().tag);for(const e of this.filterTags)t.includes(e.dataset.tag)?e.classList.add("selected"):e.classList.remove("selected");this.applyFilters()}selectMaxFilterDateRange(){this.filterDateRange.reduce(((t,e)=>parseInt(e.dataset.range)>parseInt(t.dataset.range)?e:t)).dispatchEvent(new Event("click"))}filterWithMinimumDisplayed(t){if(t=t||this.minimumDisplay,!(null===this.markers||this.countActiveFilters()>0&&this.markers.countVisible()>=t||null===t)){for(const e of this.filterDateRange)if(this.filterByDateRange(parseInt(e.dataset.range)),this.filterDateRangeValue=parseInt(e.dataset.range),this.markers.countVisible()>=t)break;this.eventEmitter.emit("filter.applied")}}applyFilters(){if(!this.markers)return;const t=this.countActiveFilters();for(const t of this.markers.values()){t.setHidden(!1);for(const e of Object.values(this.activeFilters))if(!this.configuration?.exclusionCallback?.call(this,t,e)&&!e(t)){t.setHidden(!0);break}}0===t?(this.filterCount.innerHTML="",this.filterButton.classList.remove("selected"),this.selectDateRange.classList.remove("selected")):(this.filterCount.innerHTML=t.toString(),this.filterButton.classList.add("selected"),this.selectDateRange.classList.add("selected")),this.markers.refreshUiState();const e=this.markers.countVisible();0===e?(this.showNoResult(),this.eventEmitter.emit("filter.noResult")):(this.hideNoResult(),this.eventEmitter.emit("filter.hasResults",this.markers.getVisibleValues()),this.foundArticles.innerHTML=1===e?"Afficher l'article":`Afficher les ${e} articles`)}closeModal(){const t=this.modal.querySelector(".modal-close-button");t?.click()}initCustomDateRangeFilter(){const t=this.selectDateRange.querySelectorAll(".filters .filter");this.selectDateRange.addEventListener("click",(()=>{this.selectDateRange.classList.toggle("opened")})),t.forEach((t=>{t.addEventListener("click",(()=>{this.filterByDateRange(parseInt(t.dataset.range)),this.selectFilter(t)}))}
1));const e=this.selectDateRange.querySelector(`.filters .filter[data-range="${this.filterDateRangeValue||2}"]`);null!==e&&this.selectFilter(e)}getChildByDateRangeValue(t,e){for(let i=0;i<t.children.length;i++){const s=t.children[i];if(s.hasAttribute("data-range")){if(s.getAttribute("data-range")===e)return s}}return null}selectFilter(t){(0,n.m7)(t).forEach((t=>t.classList.remove("selected"))),t.classList.add("selected");const e=t.textContent||"",i=t.closest(".map-dropdown-filter").querySelector(".filter-selected");i&&(i.textContent=e.replace(/\b jours\b/g,"J")),this.eventEmitter.emit("filter.applied")}showNoResult(){this.mapNotificationWrapper.classList.remove("hidden")}hideNoResult(){this.mapNotificationWrapper.classList.add("hidden")}on(t,e){return this.eventEmitter.on(t,e),this}countActiveFilters(){return this.modal.querySelectorAll(".map-filter-values .map-filter-value.selected:not(.date-range:first-of-type)").length}}const c=new l({exclusionCallback:t=>null!==t.getLocalizedArticle().order})},5938:(t,e,i)=>{i.d(e,{bG:()=>r,nv:()=>l});var s=i(1029);i(9342),i(9647);new s.Z("ScreenVisibility");const a={xs:350,sm:480,md:668,ml:1024,lg:1200,xl:1600};const n=Object.keys(a).sort(((t,e)=>a[t]-a[e]));new Set;function r(t){return o(c(),t)}function o(t,e){const i=n.indexOf(t),s=n.indexOf(e.min),a=n.indexOf(e.max);return i>=s&&i<=a}function l(t,e="max"){const i=a[t].toString();return window.matchMedia(`(${e}-width: ${i}px)`).matches}function c(){for(const t of[...n].reverse()){const e=a[t];if(window.matchMedia(`(min-width: ${e}px)`).matches)return t}return n[0]}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.