var body = document.body; body.className += " u-body u-xl-mode"; body.style.cssText += " "; var dataBg = ''; if (dataBg) { body.setAttribute('data-bg', dataBg); } (function () { const DELAY = 250; const start = Date.now(); const checkFilters = setInterval(function () { const filters = document.querySelector("[id^='eapps-events-calendar'] .eapp-events-calendar-filter-modal"); if (filters) { clearInterval(checkFilters); const eventType = window.location.search.match(/event-type=(?[^=&]*?)(?:&|$)/i); const currentFilter = eventType?.groups?.typeValue; if (currentFilter) { const clickElem = Array.from(filters.querySelectorAll(".eapp-events-calendar-filter-item")).find((item) => { return item.textContent.toLowerCase() === currentFilter.toLowerCase(); }); if (clickElem) { clickElem.click(); filters.classList.remove("eapp-events-calendar-filter-show"); } } } else if (Date.now() - start > 15000) { clearInterval(checkFilters); } }, DELAY); })(); 257