No Results");for(const s of e)n=buildSearchItem(s),t.append(n)}function isSearchPage(){var t=window.location,e=t.pathname.split("/"),e=e.filter(e=>e=="search");return e.length>0}function displaySearchResult(){if(!isSearchPage())return;var e=new URLSearchParams(window.location.search),n=e.get("q"),s=e.get("pf"),t=e.get("sdk");SDKS.includes(t)||(t=""),getSearchResults(n,s,t)}window.onReady(()=>{document.querySelector(".td-search-input").addEventListener("keypress",function(e){if(e.keyCode!==13)return;var t,n,s,o=e.target.value;const i=e.target.getAttribute("data-index");return searchPage=`${i}/search/`,n=window.location,s=n.pathname.split("/")[1],t=n.pathname.split("/")[2],SDKS.includes(t)||(t=""),window.location.replace(buildQuery(searchPage,o,s,t)),!1}),displaySearchResult()});const elementToScrollTo=document.querySelector(".active.td-sidebar-link");if(elementToScrollTo?.clientHeight!=null){elementHeight=elementToScrollTo.clientHeight,k=3,elementHeight>60?k=1:elementHeight>40&&(k=1.5);const e=document.getElementById("td-sidebar-menu");e.scrollTop=elementToScrollTo.offsetTop-elementHeight*k}window.onReady(()=>{const e=document.getElementById("subscribe_submit");if(!e)return;e.onclick=function(){const e=document.getElementById("subscribe_form");return!!e&&(e[0].checkValidity()?(SubmitEmail(),!0):(e[0].reportValidity(),!1))}});function SubmitEmail(){let t="https://menu.containerize.com/api/newsletter/subscribe",e=new XMLHttpRequest;e.open("POST",t,!0),e.setRequestHeader("Content-Type","application/json"),e.onreadystatechange=function(){if(e.readyState===4&&e.status===200){document.getElementById("subscribe_message").style.display="block",document.getElementById("subscribe_fields").style.display="none";var t=JSON.parse(JSON.parse(this.responseText));console.log(t.status),t.status==200?document.getElementById("subscribe_message").innerHTML=document.getElementById("subscribe_submit").getAttribute("data-success"):t.status==201&&(document.getElementById("subscribe_message").innerHTML=document.getElementById("subscribe_submit").getAttribute("data-exists")),setTimeout(function(){document.getElementById("subscribe_message").style.display="none",document.getElementById("subscribe_fields").style.display="block"},3e3)}};var n=document.getElementById("subscribe_email").value,s=document.getElementById("subscribe_submit").getAttribute("data-list"),o=document.getElementById("subscribe_submit").getAttribute("data-endpoint"),i=JSON.stringify({email:n,referral:window.location.href,endpoint:o,list:s});e.send(i)}window.onReady(async()=>{listenLangSelectorClick(),setLoggedInState(),setUserMenuSwitcher()});function setUserMenuSwitcher(){document.querySelectorAll(".aew-user .user-menu-btn").forEach(e=>{e.addEventListener("click",()=>{e.querySelectorAll(".user-sub-menu").forEach(e=>{e.classList.toggle("active")})})})}function listenLangSelectorClick(){document.querySelectorAll(".aew-right-items .lang-selector").forEach(e=>{e.addEventListener("click",()=>{const e=document.getElementById("langModal");e.setAttribute("style","visibility: visible"),e.classList.add("show")})})}function setLoggedInState(){const e=getCookie("UserInfo");if(e){const t=decodeBase64(e);document.querySelectorAll(".aew-user .logged-in").forEach(e=>e.classList.add("active"));const n=parseQueryString(t);document.getElementById("UserNameLink").innerHTML=n.FullName;return}document.querySelectorAll(".aew-user .logged-out").forEach(e=>e.classList.add("active"))}function getCookie(e){const n=`; ${document.cookie}`,t=n.split(`; ${e}=`);if(t.length===2)return t.pop().split(";").shift()}function decodeBase64(e){const t=decodeURIComponent(e);return decodeURIComponent(atob(t).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))}function parseQueryString(e){return e.split("&").reduce((e,t)=>{const[n,s]=t.split("=");return e[decodeURIComponent(n)]=decodeURIComponent(s),e},{})}