var astraGetParents=function(e,t){for(var a=[];e&&e!==document;e=e.parentNode)(!t||e.matches(t))&&a.push(e);return a},astraToggleClass=function(e,t){e.classList.contains(t)?e.classList.remove(t):e.classList.add(t)},astraTriggerEvent=function(e,t){t=new CustomEvent(t,2e.offsetHeight+100?t.style.display="block":t.style.display="none":300{var r=document.querySelectorAll("#masthead .main-header-menu-toggle"),m=document.getElementById("masthead"),i={},c="",d=document.body,g="";function e(e){c=e.detail.type;e=document.querySelectorAll(".menu-toggle");"dropdown"===c&&(document.getElementById("ast-mobile-popup").classList.remove("active","show"),p("updateHeader")),"off-canvas"===c&&e.forEach(function(e){e&&e.classList.contains("toggled")&&e.click()}),t(c)}function p(e){g=m.querySelector("#ast-mobile-header");if(null==g||"dropdown"!==g.dataset.type||"updateHeader"===e){(void 0!==e&&"updateHeader"!==e?e.closest(".ast-mobile-popup-inner"):document.querySelector("#ast-mobile-popup")).querySelectorAll(".menu-item-has-children").forEach(e=>{e.classList.remove("ast-submenu-expanded"),Array.from(e.querySelectorAll(".sub-menu")).forEach(e=>{e.hasAttribute("data-initial-display")||e.setAttribute("data-initial-display",window.getComputedStyle(e).display),"block"===e.getAttribute("data-initial-display")?e.style.display="block":e.style.display="none"})});var t=document.querySelectorAll(".menu-toggle");document.body.classList.remove("ast-main-header-nav-open","ast-popup-nav-open"),document.documentElement.classList.remove("ast-off-canvas-active");for(var a=0;ae.classList.contains("toggled"));e.forEach(e=>{t?(e.classList.remove("toggled"),e.setAttribute("aria-expanded","false")):(e.classList.add("toggled"),e.setAttribute("aria-expanded","true"))})}}}),popupTriggerClick=function(e){var t=e.currentTarget.trigger_type,a=document.getElementById("ast-mobile-popup");d.classList.contains("ast-popup-nav-open")||d.classList.add("ast-popup-nav-open"),d.classList.contains("ast-main-header-nav-open")||"mobile"===t||d.classList.add("ast-main-header-nav-open"),document.documentElement.classList.contains("ast-off-canvas-active")||document.documentElement.classList.add("ast-off-canvas-active"),"desktop"===t&&(a.querySelector(".ast-mobile-popup-content").style.display="none",a.querySelector(".ast-desktop-popup-content").style.display="block"),"mobile"===t&&(a.querySelector(".ast-desktop-popup-content").style.display="none",a.querySelector(".ast-mobile-popup-content").style.display="block"),e&&e.currentTarget&&e.currentTarget.style&&(e.currentTarget.style.display="none"),a.classList.add("active","show"),document.getElementById("menu-toggle-close")?.focus()},window.addEventListener("load",function(){t()}),document.addEventListener("astLayoutWidthChanged",function(){t()}),document.addEventListener("astPartialContentRendered",function(){r=document.querySelectorAll(".main-header-menu-toggle"),d.classList.remove("ast-main-header-nav-open"),document.addEventListener("astMobileHeaderTypeChange",e,!1),t()});var s=null!==navigator.userAgent.match(/Android/i)&&"Android"===navigator.userAgent.match(/Android/i)[0]?window.visualViewport.width:window.innerWidth;window.addEventListener("resize",function(){var e,t,a,n;"INPUT"!==document.activeElement.tagName&&(e=document.getElementById("menu-toggle-close"),t=document.querySelector(".menu-toggle.toggled"),a=document.querySelector("#masthead > #ast-desktop-header .ast-desktop-header-content"),n=document.querySelector(".elementor-editor-active"),a&&(a.style.display="none"),(null!==navigator.userAgent.match(/Android/i)&&"Android"===navigator.userAgent.match(/Android/i)[0]?window.visualViewport.width:window.innerWidth)!==s&&(t&&null===n&&t.click(),document.body.classList.remove("ast-main-header-nav-open","ast-popup-nav-open"),e)&&null==n&&e.click(),o(),AstraToggleSetup())}),document.addEventListener("DOMContentLoaded",function(){if(AstraToggleSetup(),null!==(e=d.classList.contains("ast-header-break-point")?document.getElementById("ast-mobile-header"):document.getElementById("ast-desktop-header"))){var e,t=e.querySelector(".navigation-accessibility");if(t&&e){var a=e.getElementsByTagName("button")[0]||e.getElementsByTagName("a")[0];if(a&&!a.classList.contains("astra-search-icon")){var n=t.getElementsByTagName("ul")[0];if(n){if(n.className.includes("nav-menu")||(n.className+=" nav-menu"),document.addEventListener("DOMContentLoaded",function(){var e;"off-canvas"===c&&(e=document.getElementById("menu-toggle-close"))&&(e.onclick=function(){var e=t.className.includes("toggled");t.className=e?t.className.replace(" toggled",""):t.className+" toggled",a.setAttribute("aria-expanded",e?"false":"true"),n.setAttribute("aria-expanded",e?"false":"true")})}),a.onclick=function(){var e=t.className.includes("toggled");t.className=e?t.className.replace(" toggled",""):t.className+" toggled",a.setAttribute("aria-expanded",e?"false":"true"),n.setAttribute("aria-expanded",e?"false":"true")},!astra.is_header_footer_builder_active){for(var s=n.getElementsByTagName("a"),o=n.getElementsByTagName("ul"),r=0,l=o.length;r{let t=document.querySelectorAll("nav.site-navigation .menu-item-has-children > a .ast-header-navigation-arrow"),a=document.querySelectorAll("nav.site-navigation .sub-menu"),n=document.querySelectorAll("nav.site-navigation .menu-item-has-children"),s=document.querySelectorAll(".astra-full-megamenu-wrapper");t&&(t.forEach(e=>{e.addEventListener("keydown",function(s){if("Enter"===s.key||" "===s.key){/Mobi|Android|iPad|iPhone/i.test(navigator.userAgent)&&(s.preventDefault(),s.stopPropagation());let t=s.target.closest("li"),a=t.querySelector(".sub-menu"),n=a&&a.classList.contains("astra-megamenu");setTimeout(()=>{n?(e=t.querySelector(".astra-full-megamenu-wrapper"),a&&a.classList.toggle("astra-megamenu-focus"),e&&e.classList.toggle("astra-megamenu-wrapper-focus")):a.classList.toggle("toggled-on"),t.classList.toggle("ast-menu-hover");var e=s.target.getAttribute("aria-expanded");s.target.setAttribute("aria-expanded","false"!==e&&e?"false":"true")},10)}})}),a||n)&&(document.addEventListener("click",function(e){f(a,t,n,s)},!1),document.addEventListener("keydown",function(e){"Escape"===e.key&&f(a,t,n,s)},!1));var e=document.querySelectorAll("nav.site-navigation .ast-nav-menu > .menu-item-has-children > a .ast-header-navigation-arrow");e&&e.forEach(e=>{e.addEventListener("keydown",function(e){e.target.closest("li").classList.contains("ast-menu-hover")||"Enter"!==e.key||f(a,t,n,s)},!1)}),(e=document.querySelectorAll("#ast-desktop-header .ast-builder-layout-element.ast-builder-menu")).forEach(e=>{e.querySelectorAll(".main-header-menu .menu-item > a").forEach(e=>{e.addEventListener("focusout",function(e){var t=e.relatedTarget,a=t?t.closest(".menu-item"):null,t=e.target.closest(".menu-item"),e=t.classList.contains("ast-menu-hover"),n=t.querySelector(".sub-menu"),s=t.closest(".sub-menu"),o=t.closest(".sub-menu")?.closest(".menu-item-has-children"),r=t.querySelector(".menu-item");if(!(t==a||r&&r==a))if(null==a)s&&h(s),n&&h(n);else if(t.nextElementSibling==a||t.previousElementSibling==a)e&&(h(n,!1),t.classList.remove("ast-menu-hover"));else if(o&&o==a)h(childSubMenu=t.querySelector(".sub-menu"),!1);else{let e=o,t=null;for(;null!=e;){if(e.nextElementSibling==a){t=e.querySelector(".sub-menu");break}e=e.closest(".sub-menu")?.closest(".menu-item-has-children")}s&&h(s,!0,t)}})})})})()}else a.classList.contains("custom-logo-link")||(a.style.display="none")}}}});for(var a,n,o=function(){var e=d.style.overflow,t=(d.style.overflow="hidden",document.documentElement.clientWidth);if(d.style.overflow=e,astra.break_point .menu-link, ul.main-header-menu .ast-menu-toggle"):t[r].querySelectorAll("ul.main-header-menu .ast-menu-toggle")).length)for(var l=0;l #ast-mobile-header .main-header-bar-navigation"),t=(r=document.querySelectorAll("#masthead > #ast-mobile-header .main-header-menu-toggle"),"0");if(null!==this.closest("#ast-fixed-header")&&(e=document.querySelectorAll("#ast-fixed-header > #ast-mobile-header .main-header-bar-navigation"),r=document.querySelectorAll("#ast-fixed-header .main-header-menu-toggle"),t="0"),void 0===e[t])return!1;for(var a=e[t].querySelectorAll(".menu-item-has-children"),n=0;n{e.classList.remove("astra-megamenu-focus"),e.classList.remove("toggled-on")}),a&&a.forEach(e=>{e.classList.remove("ast-menu-hover")}),n&&n.forEach(e=>{e.classList.remove("astra-megamenu-wrapper-focus")}),t&&t.forEach(e=>{e.setAttribute("aria-expanded","false")})}function y(){var e=this||"";if(e&&!e.classList.contains("astra-search-icon")&&null===e.closest(".ast-builder-menu")&&-1!==String(e).indexOf("#")){var t=e.parentNode;if(d.classList.contains("ast-header-break-point"))document.querySelector("header.site-header").classList.contains("ast-builder-menu-toggle-link")&&t.classList.contains("menu-item-has-children")||(document.querySelector(".main-header-menu-toggle").classList.remove("toggled"),(t=document.querySelector(".main-header-bar-navigation")).classList.remove("toggle-on"),t.style.display="none",astraTriggerEvent(document.querySelector("body"),"astraMenuHashLinkClicked"));else for(;-1===e.className.indexOf("nav-menu");)"li"===e.tagName.toLowerCase()&&-1!==e.className.indexOf("focus")&&(e.className=e.className.replace(" focus","")),e=e.parentElement}}function b(){for(var e=this;-1===e.className.indexOf("navigation-accessibility");)"li"===e.tagName.toLowerCase()&&e.classList.toggle("focus"),e=e.parentElement}if(document.querySelectorAll(".search-field").forEach(e=>{e.addEventListener("focus",function(e){var t=this.parentNode.parentNode.parentNode.querySelector(".ast-search-menu-icon");t&&astraToggleClass(t,"ast-dropdown-active")}),e.addEventListener("blur",function(e){var t=this.parentNode.parentNode.parentNode.querySelector(".ast-search-menu-icon");t&&(t.classList.remove("ast-dropdown-active"),astraToggleClass(t,"ast-dropdown-active"))})}),d.onclick=function(e){if(void 0!==e.target.classList&&!e.target.classList.contains("ast-search-menu-icon")&&!e.target.closest(".ast-search-menu-icon")&&!e.target.closest(".ast-search-icon"))for(var t=document.getElementsByClassName("ast-search-menu-icon"),a=0;a{let t=0;for(;e;)t+=e.offsetTop,e=e.offsetParent;return t},t=(e,t=null)=>{let a=0;var n=document.querySelector(".site-header");n&&(0<(n=n.querySelectorAll("div[data-stick-support]")).length?n.forEach(e=>a+=e.clientHeight):"undefined"==typeof astraAddon||Number(astraAddon.sticky_hide_on_scroll)&&!document?.querySelector(".ast-header-sticked")||(n=document.querySelector("#ast-fixed-header"))&&(a=n?.clientHeight,Number(astraAddon?.header_main_shrink))&&(n?.querySelectorAll(".ast-above-header-wrap, .ast-below-header-wrap"))?.forEach(()=>a-=10),n=t||e.target?.closest("a").hash)&&(t=document.querySelector(n))&&(t=(n=s(t))-(a="undefined"!=typeof astraAddon&&Number(astraAddon.sticky_hide_on_scroll)&&window?.scrollY{for(var a of o)if(window.location.href.split("#")[0]===a.url){var n=document.querySelector(".site-header");let t=0;n=n.querySelectorAll("div[data-stick-support]"),n=(n&&n.forEach(e=>{t+=e.clientHeight}),document.querySelector(a.hash));n&&(a=s(n)-t)&&astraSmoothScroll(e,a)}location.hash&&setTimeout(()=>t(new Event("click"),location.hash),750)})}astra.is_scroll_to_top&&(a=document.querySelector("#page header"),n=document.getElementById("ast-scroll-top"),astScrollToTopHandler(a,n),window.addEventListener("scroll",function(){astScrollToTopHandler(a,n)}),n.onclick=function(e){astraSmoothScroll(e,0)},n.addEventListener("keydown",function(e){"Enter"===e.key&&astraSmoothScroll(e,0)})),astra?.is_dark_palette?document.documentElement.classList.add("astra-dark-mode-enable"):document.documentElement.classList.remove("astra-dark-mode-enable"),window.addEventListener("DOMContentLoaded",e=>{var t=document.querySelector(".ast-woocommerce-store-notice-hanged");let a=()=>{var e=document.querySelector('.woocommerce-store-notice[data-position="hang-over-top"]');document.body.style.paddingTop=`${e?.clientHeight||0}px`};t&&(window.addEventListener("resize",a),setTimeout(()=>a(),0)),document.querySelector(".woocommerce-store-notice__dismiss-link")?.addEventListener("click",()=>{"undefined"!=typeof wp&&wp?.customize||(document.body.classList.remove("ast-woocommerce-store-notice-hanged"),window.removeEventListener("resize",a),document.body.style.paddingTop=0)})})})(),document.addEventListener("DOMContentLoaded",function(){let t=document.querySelectorAll(".menu-link .dropdown-menu-toggle");function n(e){var e=e.closest(".menu-link"),t=e.nextElementSibling.classList.contains("toggled-on");e.setAttribute("aria-expanded",t?"true":"false")}document.querySelectorAll(".menu-item-has-children > a").forEach(t=>{t.addEventListener("keydown",function(e){"Enter"===e.key&&(e=t.nextElementSibling)&&e.classList.contains("sub-menu")&&(e.classList.toggle("ast-visible"),e="false"===t.getAttribute("aria-expanded")?"true":"false",t.setAttribute("aria-expanded",e))})}),t.forEach(a=>{a.addEventListener("focus",()=>n(a)),a.addEventListener("blur",()=>n(a)),a.addEventListener("keydown",e=>{var t;"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e=(e=a).closest(".menu-link"),t=e.getAttribute("aria-expanded"),e.setAttribute("aria-expanded","true"===t?"false":"true"))})}),document.addEventListener("keydown",e=>{"Escape"===e.key&&t.forEach(e=>n(e))}),window.addEventListener("orientationchange",()=>{setTimeout(()=>window.dispatchEvent(new Event("resize")),50)})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".astra-shop-thumbnail-wrap").forEach(t=>{let a=t.querySelectorAll("a, span");a.forEach(e=>{e.addEventListener("focus",()=>{t.querySelectorAll(".ast-on-card-button, .ast-quick-view-trigger").forEach(e=>{e.style.opacity="1",e.style.visibility="visible",e.style.borderStyle="none"})}),e.addEventListener("blur",()=>{Array.from(a).some(e=>e===document.activeElement)||t.querySelectorAll(".ast-on-card-button, .ast-quick-view-trigger").forEach(e=>{e.style.opacity="",e.style.visibility=""})})})})});