1import o from"woody_library_woody_controller";class n extends o{constructor(t){super(t)}init(t){if(super.init(t),this.background=document.querySelector(".mg-background"),this.background.setAttribute("style","display: none;"),!window.globals.rdbk.map)return;this.handleBtn=this.el.querySelector(".mg-button"),this.mainTitle=document.querySelector(".mg-main-title"),this.mapGallery=this.el.querySelector(".map-gallery"),this.cards=this.el.querySelector(".swiper-wrapper").children,this.cards[0].classList.add("swiper-slide--selected");const i=new CustomEvent("mapDataUpdate",{detail:{payload:{}}});[this.handleBtn,this.mainTitle].forEach(e=>{e.addEventListener("click",()=>{this.mapGallery.classList.contains("deployed")?this.undeploy():this.deploy()})}),Array.from(this.cards).forEach((e,s)=>{e.addEventListener("click",()=>{Array.from(this.cards).forEach(d=>d.classList.remove("swiper-slide--selected")),e.classList.add("swiper-slide--selected");const a=window.globals.rdbk.map.data.items[s];i.detail.payload=a,this.mapGallery.dispatchEvent(i),this.undeploy()})}),this.deploy(),console.info("init RoadbookPlaylistsListController - with config : ",this.config)}handleMapGalleryClickOutside=t=>{t.target.closest(".map-gallery")||this.undeploy()};deploy(){this.background.setAttribute("style","display: block;"),setTimeout(()=>{this.mapGallery.classList.add("deployed"),this.background.classList.add("deployed")},0),document.addEventListener("click",this.handleMapGalleryClickOutside)}undeploy(){setTimeout(()=>{this.background.setAttribute("style","display: none;")},300),setTimeout(()=>{this.mapGallery.classList.remove("deployed"),this.background.classList.remove("deployed")},0),document.removeEventListener("click",this.handleMapGalleryClickOutside)}displaySheetTag(){for(let t=0;t<this.cards.length;t++){const i=this.cards[t],l=window.globals.rdbk.map.data.items[t],e=document.createElement("div");e.classList.add("swiper-slide__tag");const s=document.createElement("span"),a=document.createElement("span");l.type==="playlist_leaflet"?(s.classList.add("rdbk-icon","rdbk-icon--13-playlist"),e.appendChild(s)):(s.classList.add("rdbk-icon","rdbk-icon--12-mise_en_avant_sit"),e.appendChild(s),a.innerText=" "+l.sheet_ids.length,e.appendChild(a)),e.setAttribute("style","display: block;"),i.appendChild(e)}}}export{n as default};
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.