astraToggleSetupPro=function(e,t,o){var a,s,n,l=!1;if(0<(a="off-canvas"===e||"full-width"===e?(s=document.querySelectorAll("#ast-mobile-popup, #ast-mobile-header"),(n=t.classList.contains("ast-header-break-point")?document.querySelectorAll("#ast-mobile-header .main-header-menu-toggle"):document.querySelectorAll("#ast-desktop-header .main-header-menu-toggle")).length):t.classList.contains("ast-header-break-point")?(s=document.querySelectorAll("#ast-mobile-header"),(l=!(0<(a=(n=document.querySelectorAll("#ast-mobile-header .main-header-menu-toggle")).length)))?1:a):(s=document.querySelectorAll("#ast-desktop-header"),(n=document.querySelectorAll("#ast-desktop-header .main-header-menu-toggle")).length))||l)for(var r=0;r<a;r++)if(l||(n[r].setAttribute("data-index",r),o[r])||(o[r]=n[r],n[r].removeEventListener("click",astraNavMenuToggle),n[r].addEventListener("click",astraNavMenuToggle,!1)),void 0!==s[r])for(var i,c=0;c<s.length;c++)if(0<(i=document.querySelector("header.site-header").classList.contains("ast-builder-menu-toggle-link")?s[c].querySelectorAll("ul.main-header-menu .menu-item-has-children > .menu-link, ul.main-header-menu .ast-menu-toggle"):s[c].querySelectorAll("ul.main-header-menu .ast-menu-toggle")).length)for(var d=0;d<i.length;d++)i[d].removeEventListener("click",AstraToggleSubMenu),i[d].addEventListener("click",AstraToggleSubMenu,!1)},astraNavMenuTogglePro=function(e,t,o,a){e.preventDefault();var s=e.target.closest("#ast-desktop-header"),n=document.querySelector("#masthead > #ast-desktop-header .ast-desktop-header-content"),l=(s=null!=s&&""!==s?s.querySelector(".main-header-menu-toggle"):document.querySelector("#masthead > #ast-desktop-header .main-header-menu-toggle"),document.querySelector("#masthead > #ast-desktop-header .ast-desktop-header-content .main-header-bar-navigation"));if("desktop"===e.currentTarget.trigger_type)null!==l&&""!==l&&void 0!==l&&(astraToggleClass(l,"toggle-on"),l.classList.contains("toggle-on")?l.style.display="block":l.style.display=""),astraToggleClass(s,"toggled"),s.classList.contains("toggled")?(t.classList.add("ast-main-header-nav-open"),"dropdown"===o&&(n.style.display="block")):(t.classList.remove("ast-main-header-nav-open"),n.style.display="none");else{e=document.querySelectorAll("#masthead > #ast-mobile-header .main-header-bar-navigation"),l=(menu_toggle_all=document.querySelectorAll("#masthead > #ast-mobile-header .main-header-menu-toggle"),"0"),s=!1;if(null!==a.closest("#ast-fixed-header")&&(e=document.querySelectorAll("#ast-fixed-header > #ast-mobile-header .main-header-bar-navigation"),menu_toggle_all=document.querySelectorAll("#ast-fixed-header .main-header-menu-toggle"),l="0",s=!0),void 0===e[l])return!1;for(var r=e[l].querySelectorAll(".menu-item-has-children"),i=0;i<r.length;i++){r[i].classList.remove("ast-submenu-expanded");for(var c=r[i].querySelectorAll(".sub-menu"),d=0;d<c.length;d++)c[d].style.display="none"}-1!==(a.getAttribute("class")||"").indexOf("main-header-menu-toggle")&&(astraToggleClass(e[l],"toggle-on"),astraToggleClass(menu_toggle_all[l],"toggled"),s&&1<menu_toggle_all.length&&astraToggleClass(menu_toggle_all[1],"toggled"),e[l].classList.contains("toggle-on")?(e[l].style.display="block",t.classList.add("ast-main-header-nav-open")):(e[l].style.display="",t.classList.remove("ast-main-header-nav-open")))}};let accountMenuToggle=function(){let n=astraAddon.hf_account_action_type&&"menu"===astraAddon.hf_account_action_type,l=n&&astraAddon.hf_account_show_menu_on&&"click"===astraAddon.hf_account_show_menu_on;var e=document.querySelectorAll(".ast-header-account-wrap");e&&e.forEach(t=>{let o=t.querySelector(".ast-account-nav-menu");function e(e){(l||n&&document.querySelector("body").classList.contains("ast-header-break-point"))&&o&&!t.contains(e.target)&&(o.style.right="",o.style.left="")}t._accountPointerUpHandler||(t._accountPointerUpHandler=e,document.addEventListener("pointerup",e));var a,s=t.querySelector(".ast-header-account-link");s&&(a=function(e){(l||n&&document.querySelector("body").classList.contains("ast-header-break-point"))&&(headerSelectionPosition=e.target.closest(".site-header-section"))&&(headerSelectionPosition.classList.contains("site-header-section-left")?(o.style.left=""===o.style.left?"-100%":"",o.style.right=""===o.style.right?"auto":""):(o.style.right=""===o.style.right?"-100%":"",o.style.left=""===o.style.left?"auto":""))},s._accountClickHandler||(s._accountClickHandler=a,s.addEventListener("click",a)))})},astraColorSwitcher={...astraAddon?.colorSwitcher,init:function(){this?.isInit&&(this.switcherButtons=document.querySelectorAll(".ast-builder-color-switcher .ast-switcher-button"),this.switcherButtons?.length)&&(this.switcherButtons?.forEach(e=>{e?.addEventListener("click",this.toggle)}),this.isDarkPalette&&"system"===this.defaultMode&&this.detectSystemColorScheme(),this.isSwitched)&&this.switchLogo()},detectSystemColorScheme:function(){null===this.getCookie("astraColorSwitcherState")&&window.matchMedia("(prefers-color-scheme: dark)").matches&&!this.isSwitched&&this.toggle()},toggle:function(e){e?.preventDefault();e=astraColorSwitcher;e.isSwitched=!e.isSwitched,e.setCookie("astraColorSwitcherState",e.isSwitched,90),e?.forceReload?window.location.reload():(e.switchPaletteColors(),e.switchIcon(),e.switchLogo(),e.isDarkPalette&&e.handleDarkModeCompatibility())},switchPaletteColors:function(){(this.isSwitched?this?.palettes?.switched:this?.palettes?.default)?.forEach((e,t)=>{document.documentElement.style.setProperty("--ast-global-color-"+t,e),astraAddon?.is_elementor_active&&document.documentElement.style.setProperty("--e-global-color-astglobalcolor"+t,e)})},switchIcon:function(){this.switcherButtons?.forEach(o=>{var[a,s]=o?.querySelectorAll(".ast-switcher-icon");if(a&&s){let[e,t]=this.isSwitched?[s,a]:[a,s];o?.classList.add("ast-animate"),setTimeout(()=>{e?.classList.add("ast-current"),t?.classList.remove("ast-current")},100),setTimeout(()=>o?.classList.remove("ast-animate"),200)}a=this.isSwitched?"defaultText":"switchedText";o?.setAttribute("aria-label",o?.dataset?.[a]||"Switch color palette.")})},switchLogo:function(){this.isDarkPalette&&this?.logos?.switched&&this?.logos?.default&&this.switchColorSwitcherLogo()},switchColorSwitcherLogo:function(){var e,t;let o=[];for(e of[".custom-logo-link:not(.sticky-custom-logo):not(.transparent-custom-logo) .custom-logo",".site-branding .site-logo-img img:not(.ast-sticky-header-logo)",".ast-site-identity .site-logo-img img:not(.ast-sticky-header-logo)"]){var a=document.querySelectorAll(e);if(0<a.length&&0<(o=Array.from(a).filter(e=>!(e.closest(".ast-sticky-header-logo")||e.closest(".sticky-custom-logo")||e.closest(".transparent-custom-logo")||e.classList.contains("ast-sticky-header-logo")))).length)break}o.length&&(t=this.isSwitched?this.logos.switched:this.logos.default)&&this.updateLogoImages(o,t)},updateLogoImages:function(e,o){e.forEach(e=>{var t;e&&e.src!==o&&((t=new Image).onload=function(){e.src=o,e.hasAttribute("srcset")&&e.removeAttribute("srcset"),e.hasAttribute("data-src")&&e.setAttribute("data-src",o)},t.onerror=function(){e.src=o},t.src=o)})},handleDarkModeCompatibility:function(){document.body.classList.toggle("astra-dark-mode-enable")},setCookie:(e,t,o)=>{var a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3),document.cookie=`${e}=${t}; expires=${a.toUTCString()}; path=/`},getCookie:e=>{var t;for(t of document.cookie.split("; ")){var[o,a]=t.split("=");if(o===e)return a}return null}};var accountPopupTrigger=function(){if("undefined"!=typeof astraAddon&&"login"===astraAddon.hf_account_logout_action){var e,o=document.querySelectorAll(".ast-account-action-login");if(o.length){let t=document.querySelector("#ast-hb-account-login-wrap");t&&(e=document.querySelector("#ast-hb-login-close"),o.forEach(function(e){e.addEventListener("click",function(e){e.preventDefault(),t.classList.add("show")})}),e)&&e.addEventListener("click",function(e){e.preventDefault(),t.classList.remove("show")})}}};document.addEventListener("astPartialContentRendered",function(){accountMenuToggle(),accountPopupTrigger()}),window.addEventListener("load",function(){accountMenuToggle(),accountPopupTrigger(),astraColorSwitcher.init()}),document.addEventListener("astLayoutWidthChanged",function(){accountMenuToggle(),accountPopupTrigger()}),document.addEventListener("click",function(e){var e=e.target.closest("a"),t=e&&e.getAttribute("href");t&&-1!==t.indexOf("#")&&(e.closest(".main-header-bar-navigation")||e.closest(".ast-mobile-header-content")||e.closest(".ast-desktop-header-content"))&&setTimeout(function(){var e=document.querySelectorAll(".menu-toggle"),t=document.querySelector(".main-header-bar-navigation");t&&!t.classList.contains("toggle-on")&&e.forEach(function(e){e.classList.remove("toggled"),e.setAttribute("aria-expanded","false")})},10)});((o,r)=>{var s="astHookExtSticky",i=r.document,a=(jQuery(r).outerWidth(),jQuery(r).width()),n={dependent:[],max_width:"",site_layout:"",break_point:920,admin_bar_height_lg:32,admin_bar_height_sm:46,admin_bar_height_xs:0,stick_upto_scroll:0,gutter:0,wrap:"<div></div>",body_padding_support:!0,html_padding_support:!0,active_shrink:!1,shrink:{padding_top:"",padding_bottom:""},sticky_on_device:"desktop",header_style:"none",hide_on_scroll:"no"};function e(t,e){this.element=t,this.options=o.extend({},n,e),this._defaults=n,this._name=s,"1"==this.options.hide_on_scroll&&(this.navbarHeight=o(t).outerHeight()),this.lastScrollTop=0,this.delta=5,this.should_stick=!0,this.hideScrollInterval="",this.init()}e.prototype.stick_me=function(t,e){var o=jQuery(t.element),s=jQuery(r).outerWidth(),i=parseInt(t.options.stick_upto_scroll),a=parseInt(o.parent().attr("data-stick-maxwidth")),n=parseInt(o.parent().attr("data-stick-gutter"));"enabled"==(astraAddon.hook_sticky_header||"")&&(!("desktop"==t.options.sticky_on_device&&astraAddon.hook_custom_header_break_point>s||"mobile"==t.options.sticky_on_device&&astraAddon.hook_custom_header_break_point<=s)&&jQuery(r).scrollTop()>i?"none"==t.options.header_style&&("enabled"==t.options.active_shrink?(t.hasShrink(t,"stick"),i="none",o.hasClass("ast-custom-header")||(i=n),o.parent().css("min-height",o.outerHeight()),o.addClass("ast-header-sticky-active").stop().css({"max-width":a,top:i,"padding-top":t.options.shrink.padding_top,"padding-bottom":t.options.shrink.padding_bottom})):(t.hasShrink(t,"stick"),o.parent().css("min-height",o.outerHeight()),o.addClass("ast-header-sticky-active").stop().css({"max-width":a,top:n,"padding-top":t.options.shrink.padding_top,"padding-bottom":t.options.shrink.padding_bottom})),o.addClass("ast-sticky-shrunk").stop()):t.stickRelease(t)),"enabled"==(astraAddon.hook_sticky_footer||"")&&("desktop"==t.options.sticky_on_device&&astraAddon.hook_custom_footer_break_point>s||"mobile"==t.options.sticky_on_device&&astraAddon.hook_custom_footer_break_point<=s?t.stickRelease(t):(jQuery("body").addClass("ast-footer-sticky-active"),o.parent().css("min-height",o.outerHeight()),o.stop().css({"max-width":a})))},e.prototype.update_attrs=function(){var o,t=this,e=jQuery(t.element),s=parseInt(t.options.gutter),i=t.options.max_width;"none"==t.options.header_style&&(o=e.offset().top||0),"ast-box-layout"!=t.options.site_layout&&(i=jQuery("body").width()),t.options.dependent&&jQuery.each(t.options.dependent,function(t,e){jQuery(e).length&&"on"==jQuery(e).parent().attr("data-stick-support")&&(dependent_height=jQuery(e).outerHeight(),s+=parseInt(dependent_height),o-=parseInt(dependent_height))}),t.options.admin_bar_height_lg&&jQuery("#wpadminbar").length&&782<a&&(s+=parseInt(t.options.admin_bar_height_lg),o-=parseInt(t.options.admin_bar_height_lg)),t.options.admin_bar_height_sm&&jQuery("#wpadminbar").length&&600<=a&&a<=782&&(s+=parseInt(t.options.admin_bar_height_sm),o-=parseInt(t.options.admin_bar_height_sm)),t.options.admin_bar_height_xs&&jQuery("#wpadminbar").length&&(s+=parseInt(t.options.admin_bar_height_xs),o-=parseInt(t.options.admin_bar_height_xs)),t.options.body_padding_support&&(s+=parseInt(jQuery("body").css("padding-top"),10),o-=parseInt(jQuery("body").css("padding-top"),10)),t.options.html_padding_support&&(s+=parseInt(jQuery("html").css("padding-top"),10),o-=parseInt(jQuery("html").css("padding-top"),10)),t.options.stick_upto_scroll=o,"none"==t.options.header_style&&e.parent().css("min-height",e.outerHeight()).attr("data-stick-gutter",parseInt(s)).attr("data-stick-maxwidth",parseInt(i))},e.prototype.hasShrink=function(t,e){o(r).scrollTop()>jQuery(t.element).outerHeight()?jQuery("body").addClass("ast-shrink-custom-header"):jQuery("body").removeClass("ast-shrink-custom-header")},e.prototype.stickRelease=function(t){var e=jQuery(t.element);"enabled"==(astraAddon.hook_sticky_header||"")&&"none"==t.options.header_style&&(e.removeClass("ast-header-sticky-active").stop().css({"max-width":"",top:"",padding:""}),e.parent().css("min-height",""),e.removeClass("ast-sticky-shrunk").stop()),"enabled"==(astraAddon.hook_sticky_footer||"")&&jQuery("body").removeClass("ast-footer-sticky-active")},e.prototype.init=function(){var e,t;jQuery(this.element)&&(e=this,t=jQuery(e.element),parseInt(e.options.gutter),t.position().top,"none"==e.options.header_style&&t.wrap(e.options.wrap).parent().css("min-height",t.outerHeight()).attr("data-stick-support","on").attr("data-stick-maxwidth",parseInt(e.options.max_width)),e.update_attrs(),jQuery(r).on("resize",function(){e.stickRelease(e),e.update_attrs(),e.stick_me(e)}),jQuery(r).on("scroll",function(){e.stick_me(e,"scroll")}),jQuery(i).ready(function(t){e.stick_me(e)}))},o.fn[s]=function(t){return this.each(function(){o.data(this,"plugin_"+s)||o.data(this,"plugin_"+s,new e(this,t))})};var d=jQuery("body").width(),_=astraAddon.site_layout||"",h=astraAddon.hook_sticky_header||"",p=astraAddon.hook_shrink_header||"";sticky_header_on_devices=astraAddon.hook_sticky_header_on_devices||"desktop",site_layout_box_width=astraAddon.site_layout_box_width||1200,hook_sticky_footer=astraAddon.hook_sticky_footer||"",sticky_footer_on_devices=astraAddon.hook_sticky_footer_on_devices||"desktop","ast-box-layout"===_&&(d=parseInt(site_layout_box_width)),jQuery(i).ready(function(t){"enabled"==h&&jQuery(".ast-custom-header").astHookExtSticky({sticky_on_device:sticky_header_on_devices,header_style:"none",site_layout:_,max_width:d,active_shrink:p}),"enabled"==hook_sticky_footer&&jQuery(".ast-custom-footer").astHookExtSticky({sticky_on_device:sticky_footer_on_devices,max_width:d,site_layout:_,header_style:"none"})})})(jQuery,window);function display_mega_menu_on_load(){var e=document.querySelectorAll(".content-width-mega");if(0<e.length)for(var t=0;t<e.length;t++)"hover"===(e[t].getAttribute("data-megamenu-trigger")||"hover")&&e[t].addEventListener("mouseenter",function(e){e=e.target.querySelector(".astra-mega-menu-width-content");null!==e&&e.classList.remove("ast-hidden")});var a=document.querySelectorAll(".menu-container-width-mega");if(0<a.length)for(t=0;t<a.length;t++)"hover"===(a[t].getAttribute("data-megamenu-trigger")||"hover")&&a[t].addEventListener("mouseenter",function(e){e=e.target.querySelector(".astra-mega-menu-width-menu-container");null!==e&&e.classList.remove("ast-hidden")});var s=document.querySelectorAll(".full-width-mega");if(0<s.length)for(t=0;t<s.length;t++)"hover"===(s[t].getAttribute("data-megamenu-trigger")||"hover")&&s[t].addEventListener("mouseenter",function(e){var t=e.target.querySelector(".astra-full-megamenu-wrapper"),e=e.target.querySelector(".astra-mega-menu-width-full");null!==t&&t.classList.remove("ast-hidden"),null!==e&&e.classList.remove("ast-hidden")});var r=document.querySelectorAll(".full-stretched-width-mega");if(0<r.length)for(t=0;t<r.length;t++)"hover"===(r[t].getAttribute("data-megamenu-trigger")||"hover")&&r[t].addEventListener("mouseenter",function(e){var t=e.target.querySelector(".astra-full-megamenu-wrapper"),e=e.target.querySelector(".astra-mega-menu-width-full-stretched");null!==t&&t.classList.remove("ast-hidden"),null!==e&&e.classList.remove("ast-hidden")});var n=document.querySelectorAll(".custom-width-mega");if(0<n.length)for(t=0;t<n.length;t++)"hover"===(n[t].getAttribute("data-megamenu-trigger")||"hover")&&n[t].addEventListener("mouseenter",function(e){e=e.target.querySelector(".astra-mega-menu-width-custom");null!==e&&e.classList.remove("ast-hidden")})}document.addEventListener("DOMContentLoaded",display_mega_menu_on_load),document.addEventListener("astPartialContentRendered",display_mega_menu_on_load);var items=document.getElementsByClassName("astra-megamenu-li");function apply_megamenu_width_styles(){[].slice.call(items).forEach(g=>{function s(){var e,t,a,s,r,n,i,d,u,l=(m=jQuery(g).parents(".ast-container")).children(),m=m.parent(),o=jQuery(g);(o.hasClass("full-width-mega")||o.hasClass("full-stretched-width-mega"))&&(l=jQuery(l).closest(".ast-container")),parseInt(window.innerWidth)>parseInt(astra.break_point)&&"ast-hf-mobile-menu"!==o.parent().attr("id")&&"ast-desktop-toggle-menu"!==o.parent().attr("id")?(e=l.width(),t=l.offset(),l=(a=o.offset()).left-(t.left+parseFloat(l.css("paddingLeft"))),d=e-(a.left+t.left)+130,s=m.width(),r=m.offset(),r=a.left-(r.left+parseFloat(m.css("paddingLeft"))),o.hasClass("custom-width-mega")&&(i=(i=window.getComputedStyle(o.find(".astra-mega-menu-width-custom")[0],"::before").getPropertyValue("content")||1200).replace(/[^0-9]/g,""),(i=parseInt(i))<=e?(u=parseInt(e-i),n=parseInt(l-u),t.left):(u=parseInt(i-e),n=parseInt(l+u),t.left)),o.hasClass("menu-container-width-mega")&&(u=jQuery(g).parents(".main-navigation"),m.hasClass("ast-above-header")?u=jQuery(".ast-above-header-navigation"):m.hasClass("ast-below-header")&&(u=jQuery(".ast-below-header-actual-nav")),e=($target_container=u.length?u:o.parent("ul")).width()+"px",m=jQuery(window).width()-($target_container.offset().left+$target_container.outerWidth()),u=o.offset(),m=jQuery(window).width()-m-u.left,l=parseInt($target_container.width()-m),d=parseInt(e)-o.outerWidth()-parseInt($target_container.width()-m)),o.hasClass("full-width-mega")?(o.find(".astra-full-megamenu-wrapper").css({left:"-"+r+"px",width:s}),o.find(".astra-megamenu").css({width:e})):o.hasClass("full-stretched-width-mega")?o.find(".astra-full-megamenu-wrapper").css({left:"-"+r+"px",width:s}):o.hasClass("custom-width-mega")?astra.isRtl?o.find(".astra-mega-menu-width-custom").css({width:i+"px"}):o.find(".astra-mega-menu-width-custom").css({left:"-"+n+"px",width:i+"px"}):o.hasClass("content-width-mega")?astra.isRtl?(u=t.left+e-(a.left+o.outerWidth()),o.find(".astra-megamenu").css({right:"-"+u+"px",width:e}).data("astra-hover-right",u)):o.find(".astra-megamenu").css({left:"-"+l+"px",width:e}):astra.isRtl?(o.find(".astra-megamenu").css({right:"-"+d+"px",width:e}),o.data("astra-hover-right",d)):o.find(".astra-megamenu").css({left:"-"+l+"px",width:e})):astra.isRtl?(o.find(".astra-megamenu").css({right:"",width:"","background-image":""}),o.find(".astra-full-megamenu-wrapper").css({right:"",width:"","background-image":""})):(o.find(".astra-megamenu").css({left:"",width:"","background-image":""}),o.find(".astra-full-megamenu-wrapper").css({left:"",width:"","background-image":""}))}"click"===(jQuery(g).data("megamenu-trigger")||"hover")?(jQuery(g).find("> a").on("click",function(e){var t=jQuery(g),a=t.hasClass("megamenu-active");jQuery(".astra-megamenu-li.megamenu-active").removeClass("megamenu-active"),a||(e.preventDefault(),t.addClass("megamenu-active"),t.find(".ast-hidden").removeClass("ast-hidden"),s())}),jQuery(document).on("click",function(e){jQuery(e.target).closest(".astra-megamenu-li").length||jQuery(".astra-megamenu-li.megamenu-active").removeClass("megamenu-active")})):(jQuery(g).hover(s),jQuery(g).mouseenter(function(){document.dispatchEvent(new CustomEvent("astra_mega_menu_on_hover",{detail:{}}))}))})}apply_megamenu_width_styles(),document.addEventListener("astMenuHoverStyleChanged",function(){apply_megamenu_width_styles()}),[].slice.call(items).forEach(function(h){var e=jQuery(h).parents(".ast-container"),f=e.children(),c=e.parent(),p=jQuery(h);(p.hasClass("full-width-mega")||p.hasClass("full-stretched-width-mega"))&&(f=jQuery(f).closest(".ast-container"),p.find(".astra-full-megamenu-wrapper").removeClass("ast-hidden")),p.find(".menu-link").focusin(function(e){var t,a,s,r,n,i,d,u,l,m,o,g;astra.is_header_footer_builder_active||(p.find(".sub-menu").addClass("astra-megamenu-focus"),p.find(".astra-full-megamenu-wrapper").addClass("astra-megamenu-wrapper-focus")),p.find(".sub-menu").removeClass("ast-hidden"),parseInt(jQuery(window).width())>parseInt(astra.break_point)&&"ast-hf-mobile-menu"!==p.parent().attr("id")&&"ast-desktop-toggle-menu"!==p.parent().attr("id")?(t=f.width(),a=f.offset(),u=(s=p.offset()).left-(a.left+parseFloat(f.css("paddingLeft"))),l=t-(s.left+a.left)+130,r=c.width(),g=c.offset(),g=s.left-(g.left+parseFloat(c.css("paddingLeft"))),p.hasClass("custom-width-mega")&&(d=(d=window.getComputedStyle(p.find(".astra-mega-menu-width-custom")[0],"::before").getPropertyValue("content")||1200).replace(/[^0-9]/g,""),i=(d=parseInt(d))<=t?(i=parseInt(t-d),n=parseInt(u-i),a.left-n):(i=parseInt(d-t),n=parseInt(u+i),a.left+n)),p.hasClass("menu-container-width-mega")&&(o=jQuery(h).parents(".main-navigation"),c.hasClass("ast-above-header")?o=jQuery(".ast-above-header-navigation"):c.hasClass("ast-below-header")&&(o=jQuery(".ast-below-header-actual-nav")),t=($target_container=o.length?o:p.parent("ul")).width()+"px",o=jQuery(window).width()-($target_container.offset().left+$target_container.outerWidth()),m=p.offset(),o=jQuery(window).width()-o-m.left,u=parseInt($target_container.width()-o),l=parseInt(t)-p.outerWidth()-parseInt($target_container.width()-o)),p.hasClass("full-width-mega")?(p.find(".astra-full-megamenu-wrapper").css({left:"-"+g+"px",width:r}),p.find(".astra-megamenu").css({width:t})):p.hasClass("full-stretched-width-mega")?p.find(".astra-full-megamenu-wrapper").css({left:"-"+g+"px",width:r}):p.hasClass("custom-width-mega")?astra.isRtl?p.find(".astra-mega-menu-width-custom").css({right:"-"+i+"px",width:d+"px"}):p.find(".astra-mega-menu-width-custom").css({left:"-"+n+"px",width:d+"px"}):p.hasClass("content-width-mega")?astra.isRtl?(m=a.left+t-(s.left+p.outerWidth()),p.find(".astra-megamenu").css({right:"-"+m+"px",width:t}).data("astra-hover-right",m)):p.find(".astra-megamenu").css({left:"-"+u+"px",width:t}):(g=void 0!==(o=p.data("astra-hover-right"))?o:l,astra.isRtl?p.find(".astra-megamenu").css({right:"-"+g+"px",width:t}).data("astra-hover-right",g):p.find(".astra-megamenu").css({left:"-"+u+"px",width:t}))):astra.isRtl?(p.find(".astra-megamenu").css({right:"",width:"","background-image":""}),p.find(".astra-full-megamenu-wrapper").css({right:"",width:"","background-image":""})):(p.find(".astra-megamenu").css({left:"",width:"","background-image":""}),p.find(".astra-full-megamenu-wrapper").css({left:"",width:"","background-image":""}))}),astra.is_header_footer_builder_active||(p.find(".menu-link").keydown(function(e){9==e.which&&e.shiftKey&&(p.find(".sub-menu").removeClass("astra-megamenu-focus"),p.find(".astra-full-megamenu-wrapper").removeClass("astra-megamenu-wrapper-focus"))}),jQuery(h).find(".sub-menu .menu-item").last().focusout(function(){p.find(".sub-menu").removeClass("astra-megamenu-focus"),p.find(".astra-full-megamenu-wrapper").removeClass("astra-megamenu-wrapper-focus")}),jQuery(window).click(function(){p.find(".sub-menu").removeClass("astra-megamenu-focus"),p.find(".astra-full-megamenu-wrapper").removeClass("astra-megamenu-wrapper-focus")})),p.click(function(e){jQuery(e.target).hasClass("menu-item")&&e.stopImmediatePropagation()})});(()=>{var e;function o(e){var t=(t=document.body.className).replace(e,"");document.body.className=t}function d(e){e.style.display="block",setTimeout(function(){e.style.opacity=1},1)}function n(e){e.style.opacity="",setTimeout(function(){e.style.display=""},200)}r="iPhone"==navigator.userAgent.match(/iPhone/i)?"iphone":"",e="iPod"==navigator.userAgent.match(/iPod/i)?"ipod":"",document.body.className+=" "+r,document.body.className+=" "+e;for(var t=document.querySelectorAll("a.astra-search-icon:not(.slide-search)"),a=0;t.length>a;a++)t[a].onclick=function(e){var t,a,o,n;if(e.preventDefault(),e=e||window.event,this.classList.contains("header-cover"))for(var s=document.querySelectorAll(".ast-search-box.header-cover"),c=astraAddon.is_header_builder_active||!1,r=0;r<s.length;r++)for(var l=s[r].parentNode.querySelectorAll("a.astra-search-icon"),i=0;i<l.length;i++)l[i]==this&&(d(s[r]),s[r].querySelector("input.search-field").focus(),c?(t=s[r],n=o=a=void 0,document.body.classList.contains("ast-header-break-point")&&(n=document.querySelector(".main-navigation"),a=document.querySelector(".main-header-bar"),o=document.querySelector(".ast-mobile-header-wrap"),null!==a)&&null!==n&&(n=n.offsetHeight,a=a.offsetHeight,o=o.offsetHeight,n=n&&!document.body.classList.contains("ast-no-toggle-menu-enable")?parseFloat(n)-parseFloat(a):parseFloat(a),t.parentNode.classList.contains("ast-mobile-header-wrap")&&(n=parseFloat(o)),t.style.maxHeight=Math.abs(n)+"px")):(a=s[r],t=o=void 0,document.body.classList.contains("ast-header-break-point")&&(t=document.querySelector(".main-navigation"),null!==(o=document.querySelector(".main-header-bar")))&&null!==t&&(t=t.offsetHeight,o=o.offsetHeight,t=t&&!document.body.classList.contains("ast-no-toggle-menu-enable")?parseFloat(t)-parseFloat(o):parseFloat(o),a.style.maxHeight=Math.abs(t)+"px")));else this.classList.contains("full-screen")&&(e=document.getElementById("ast-seach-full-screen-form")).classList.contains("full-screen")&&(d(e),document.body.className+=" full-screen",e.querySelector("input.search-field").focus())};for(var s=document.querySelectorAll(".ast-search-box .close"),a=0,c=s.length;a<c;++a)s[a].onclick=function(e){e=e||window.event;for(var t=this;;){if(t.parentNode.classList.contains("ast-search-box")){n(t.parentNode),o("full-screen");break}if(t.parentNode.classList.contains("site-header"))break;t=t.parentNode}};document.onkeydown=function(e){if(27==e.keyCode)for(var e=document.getElementById("ast-seach-full-screen-form"),t=(null!=e&&(n(e),o("full-screen")),document.querySelectorAll(".ast-search-box.header-cover")),a=0;a<t.length;a++)n(t[a])},window.addEventListener("resize",function(){if("BODY"===document.activeElement.tagName&&"INPUT"!=document.activeElement.tagName){var e=document.querySelectorAll(".ast-search-box.header-cover");if(!document.body.classList.contains("ast-header-break-point"))for(var t=0;t<e.length;t++)e[t].style.maxHeight="",e[t].style.opacity="",e[t].style.display=""}});var r=document.getElementById("close");r&&r.addEventListener("keydown",function(e){"Enter"===e.key?(e.preventDefault(),this.click()):"Tab"===e.key&&e.preventDefault()})})();