1"use strict";(self.webpackChunk_roots_bud_sage_sage=self.webpackChunk_roots_bud_sage_sage||[]).push([[143],{
1"./styles/app.scss":()=>{},
1"./scripts/app.js":(e,t,o)=>{var s=o("../node_modules/@roots/sage/lib/client/dom-ready.js"),n=o("../node_modules/swiper/swiper.esm.js");n.tq.use([n.tl,n.W_,n.pt,n.Rv]),(0,s.Z)((async()=>{document.querySelectorAll(".menu-button").forEach((function(e){e.addEventListener("click",(function(){this.classList.toggle("active");var e=this.nextElementSibling;e&&e.classList.toggle("active"),console.log("asa")}))}));const e=document.querySelector("#banner-close");if(e){const t=document.querySelector("#banner-advise");e.addEventListener("click",(()=>{t.remove()}))}const t=document.querySelector('button[aria-haspopup="listbox"]');t&&function(){const e=document.querySelector('ul[role="listbox"]'),o=document.querySelectorAll('li[role="option"]');function s(){e.classList.add("opacity-0"),setTimeout((()=>{e.classList.add("hidden"),e.classList.remove("opacity-0"),e.setAttribute("aria-expanded","false"),document.removeEventListener("click",s)}),100)}t.addEventListener("click",(t=>{t.stopPropagation(),e.classList.contains("hidden")?(e.classList.remove("hidden"),e.setAttribute("aria-expanded","true"),document.addEventListener("click",s)):s()})),o.forEach(((e,o)=>{e.setAttribute("tabindex","0"),e.addEventListener("click",(()=>{document.querySelectorAll(".block.truncate").forEach((e=>{e.classList.remove("font-semibold")})),document.querySelectorAll(".checkmark").forEach((e=>{e.classList.add("text-white"),e.classList.remove("text-indigo-600")}));const o=e.querySelector(".block.truncate"),n=o.getAttribute("data-value");document.querySelector('input[name="category"]').value=n;const i=e.querySelector(".checkmark");i.classList.remove("text-white"),i.classList.add("text-indigo-600"),o.classList.add("font-semibold"),t.querySelector(".block.truncate").innerText=o.innerText,s()})),e.addEventListener("keydown",(o=>{if("Enter"===o.key){document.querySelectorAll(".block.truncate").forEach((e=>{e.classList.remove("font-semibold")})),document.querySelectorAll(".checkmark").forEach((e=>{e.classList.add("text-white"),e.classList.remove("text-indigo-600")}));const o=e.querySelector(".block.truncate"),n=e.querySelector(".checkmark");n.classList.remove("text-white"),n.classList.add("text-indigo-600"),o.classList.add("font-semibold"),t.querySelector(".block.truncate").innerText=o.innerText,s()}}))})),t.addEventListener("keydown",(e=>{if("ArrowUp"===e.key&&selectedOptionIndex>0)e.preventDefault(),highlightOption(selectedOptionIndex-1);else if("ArrowDown"===e.key&&selectedOptionIndex<o.length-1)e.preventDefault(),highlightOption(selectedOptionIndex+1);else if("Enter"===e.key&&selectedOptionIndex>=0){const e=o[selectedOptionIndex].querySelector(".block.truncate").innerText;button.querySelector(".block.truncate").innerText=e,s()}}))}();const o=document.getElementById("hours-widget"),s=document.getElementById("hours-widget-mobile");if(o||s){let e="https://biglietteria.mdbr.it/api/explora/ebox/rest/servizirest/day_availability?eventId=1&date="+a(new Date),t="";fetch(e).then((e=>{if(!e.ok)throw new Error("Network response was not ok");return e.json()})).then((e=>{console.log(e);i(e.dayAvailability)})).catch((e=>{console.log(e),console.log("There was a problem with the fetch operation:",e.message),t='{"lastUpdate":"1697726451","dayAvailability":[{"id":37981,"time":"12:00","availability":250},{"id":38025,"time":"15:00","availability":247},{"id":38069,"time":"17:00","availability":243}]}';i(JSON.parse(t).dayAvailability)}))}function i(e){const t=document.getElementById("hours-widget"),o=document.getElementById("hours-widget-mobile");let s=new Date;if(e.length){let n=[];e.forEach((e=>{let t="H "+e.time+", "+e.availability+" "+AppData.available_spot;n.push(t)})),t&&(t.innerHTML='<p class="text-black"><strong>'+AppData.open_message+" "+a(s)+":</strong> "+n.join(" | ")+"</p>"),o&&(o.innerHTML='<p class="text-black text-sm text-center"><strong>'+AppData.open_message+" "+a(s)+":</strong><br>"+n.join(" | ")+"</p>")}else t&&(t.innerHTML='<p class="text-black"><strong>'+AppData.open_message+" "+a(s)+":</strong> "+AppData.closed_message+"</p>"),o&&(o.innerHTML='<p class="text-black text-sm text-center"><strong>'+AppData.open_message+" "+a(s)+":</strong> "+AppData.closed_message+"</p>")}function a(e){return`${("0"+e.getDate()).slice(-2)}/${("0"+(e.getMonth()+1)).slice(-2)}/${e.getFullYear()}`}const l=window.location.hash;if(l){const e=document.querySelector(l);
1if(e){window.scrollTo({top:0,behavior:"auto"});const t=document.getElementById("explora-header").offsetHeight;window.scrollTo({top:e.offsetTop-t,behavior:"smooth"})}}const r=document.querySelector(".hamburger"),c=document.querySelector("#drawer-nav");c.querySelectorAll("a").forEach((e=>{const t=e.getAttribute("href");t&&t.includes("#")&&e.addEventListener("click",(function(e){e.preventDefault(),t.split("/");const o=t.split("#"),s=document.getElementById(o[1]);if(s){const e=document.getElementById("explora-header").offsetHeight;window.scrollTo({top:s.offsetTop-e,behavior:"smooth"}),"false"===c.getAttribute("aria-expanded")?c.setAttribute("aria-expanded","true"):c.setAttribute("aria-expanded","false"),r.classList.toggle("is-active"),c.classList.toggle("active"),document.body.classList.toggle("overflow-hidden")}else window.location.href=t}))})),r.addEventListener("click",(function(e){e.preventDefault(),"false"===c.getAttribute("aria-expanded")?c.setAttribute("aria-expanded","true"):c.setAttribute("aria-expanded","false"),r.classList.toggle("is-active"),c.classList.toggle("active"),document.body.classList.toggle("overflow-hidden")}));new n.tq("#hero_home_swiper .swiper",{spaceBetween:0,slidesPerView:1,threshold:15,speed:1e3,pagination:{el:".swiper-pagination",clickable:!0}}),new n.tq("#event-slider .swiper",{spaceBetween:0,slidesPerView:1,threshold:15,speed:1e3,pagination:{el:".swiper-pagination",clickable:!0}});document.querySelector(".hero_page")&&function(){const e=document.getElementById("explora-header").offsetHeight,t=t=>{window.scrollTo({top:t.offsetTop-e,behavior:"smooth"})};document.querySelectorAll(".hero_page a").forEach((e=>{e.addEventListener("click",(o=>{const s=e.getAttribute("href");if(s.startsWith("#")){o.preventDefault();const e=s.slice(1),n=document.getElementById(e);n&&t(n)}}))}))}()}))}
1},e=>{var t=t=>e(e.s=t);e.O(0,[947],(()=>(t("./scripts/app.js"),t("./styles/app.scss"))));e.O()}]);
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.