!function(){"use strict";window.kadence={initOutlineToggle:function(){document.body.addEventListener("keydown",(function(){document.body.classList.remove("hide-focus-outline")})),document.body.addEventListener("mousedown",(function(){document.body.classList.add("hide-focus-outline")}))},getOffset:function(e){if(e instanceof HTMLElement){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}return{top:null,left:null}},findParents:function(e,t){var n=[];return function e(o){var i=o.parentNode;i instanceof HTMLElement&&(i.matches(t)&&n.push(i),e(i))}(e),n},toggleAttribute:function(e,t,n,o){void 0===n&&(n=!0),void 0===o&&(o=!1),e.getAttribute(t)!==n?e.setAttribute(t,n):e.setAttribute(t,o)},initNavToggleSubmenus:function(){var e=document.querySelectorAll(".nav--toggle-sub");if(e.length)for(let t=0;t li > a, ul.toggle-show > li > .dropdown-nav-special-toggle";t[a].parentNode.classList.contains("kadence-menu-mega-enabled")&&(n='a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable]'),e.shiftKey?window.kadence.isfirstFocusableElement(t[a],document.activeElement,n)&&window.kadence.toggleSubMenu(t[a].parentNode,!1):window.kadence.islastFocusableElement(t[a],document.activeElement,n)&&window.kadence.toggleSubMenu(t[a].parentNode,!1)}27===e.keyCode&&(window.kadence.toggleSubMenu(t[a].parentNode,!1),t[a].parentNode.querySelector(".dropdown-nav-special-toggle").focus())})),t[a].parentNode.classList.add("menu-item--has-toggle")}}},initEachNavToggleSubmenuInside:function(e){var t=e.querySelectorAll(".menu-item-has-children");if(t.length)for(let n=0;nr)var y=Math.floor(Math.floor(d)-Math.floor(c)+Math.floor(p));else y=Math.floor(d-c);else y=Math.floor(d-c);var b=l.querySelectorAll(".custom-logo"),k=l.querySelector(".site-main-header-inner-wrap"),L=parseInt(k.getAttribute("data-start-height"));if(L||(k.setAttribute("data-start-height",k.offsetHeight),L=k.offsetHeight),window.scrollY<=y){if(k.style.height=L+"px",k.style.minHeight=L+"px",k.style.maxHeight=L+"px",b)for(let e=0;ey){var S=Math.max(v,L-(window.scrollY-(d-c)));if(k.style.height=S+"px",k.style.minHeight=S+"px",k.style.maxHeight=S+"px",b)for(let e=0;er;if(x<=A)l.style.transform="translateY(0px)";else if(C)l.classList.add("item-hidden-above"),l.style.transform="translateY("+(Math.abs(M)>E?-E:M)+"px)";else{A=Math.floor(d-c);l.style.transform="translateY("+(M>0?0:M)+"px)",l.classList.remove("item-hidden-above")}r=x}else A=Math.floor(d-c);window.scrollY==A?(l.style.top=c+"px",l.classList.add("item-is-fixed"),l.classList.add("item-at-start"),l.classList.remove("item-is-stuck"),w.classList.add("child-is-fixed"),document.body.classList.add("header-is-fixed")):window.scrollY>A?"true"===m?window.scrollY{u("updateActive")},c={root:document.documentElement},new IntersectionObserver(((e,t)=>{e.forEach((e=>{l(e.intersectionRatio>0)}))}),c).observe(s)}},getTopOffset:function(e="scroll"){if("load"===e)var t=document.querySelector("#main-header .kadence-sticky-header"),n=document.querySelector("#mobile-header .kadence-sticky-header");else t=document.querySelector('#main-header .kadence-sticky-header:not([data-reveal-scroll-up="true"])'),n=document.querySelector('#mobile-header .kadence-sticky-header:not([data-reveal-scroll-up="true"])');var o=0,i=0;if(kadenceConfig.breakPoints.desktop<=window.innerWidth){if(t)o="true"!==t.getAttribute("data-shrink")||t.classList.contains("site-header-inner-wrap")?Math.floor(t.offsetHeight):Math.floor(t.getAttribute("data-shrink-height"));else o=0;document.body.classList.contains("admin-bar")&&(i=32)}else{if(n)o="true"===n.getAttribute("data-shrink")?Math.floor(n.getAttribute("data-shrink-height")):Math.floor(n.offsetHeight);else o=0;document.body.classList.contains("admin-bar")&&(i=46)}return Math.floor(o+i+Math.floor(kadenceConfig.scrollOffset))},scrollToElement:function(e,t,n="scroll"){t=void 0===t||t;var o=window.kadence.getTopOffset(n),i=Math.floor(e.getBoundingClientRect().top)-o;window.scrollBy({top:i,left:0,behavior:"smooth"}),e.tabIndex="-1",e.focus({preventScroll:!0}),e.classList.contains("kt-title-item")&&e.firstElementChild.click(),t&&window.history.pushState("","","#"+e.id)},anchorScrollToCheck:function(e,t){if(t=void 0!==t?t:null,e.target.getAttribute("href"))var n=e.target;else{if(!(n=e.target.closest("a")))return;if(!n.getAttribute("href"))return}if(!n.parentNode||!n.parentNode.hasAttribute("role")||"tab"!==n.parentNode.getAttribute("role")){var o;o=t?t.getAttribute("href").substring(t.getAttribute("href").indexOf("#")):n.getAttribute("href").substring(n.getAttribute("href").indexOf("#"));var i=document.getElementById(o.replace("#",""));i&&(i?.classList?.contains("kt-accordion-pane")||(e.preventDefault(),window.kadence.scrollToElement(i),window.kadence.updateActiveAnchors()))}},initStickySidebarWidget:function(){if(document.body.classList.contains("has-sticky-sidebar-widget")){var e=window.kadence.getTopOffset(),t=document.querySelector("#secondary .sidebar-inner-wrap .widget:last-child");t&&(t.style.top=Math.floor(e+20)+"px",t.style.maxHeight="calc( 100vh - "+Math.floor(e+20)+"px )")}},initStickySidebar:function(){if(document.body.classList.contains("has-sticky-sidebar")){var e=window.kadence.getTopOffset(),t=document.querySelector("#secondary .sidebar-inner-wrap");t&&(t.style.top=Math.floor(e+20)+"px",t.style.maxHeight="calc( 100vh - "+Math.floor(e+20)+"px )")}},initActiveAnchors:function(){""!=window.location.hash&&window.kadence.updateActiveAnchors(),window.onhashchange=function(){window.kadence.updateActiveAnchors()}},updateActiveAnchors:function(){document.querySelectorAll(".menu-item").forEach((function(e){const t=e.querySelector("a");t?.href&&t.href.includes("#")&&(window.location.href==t.href?e.classList.add("current-menu-item"):e.classList.remove("current-menu-item"))}))},initAnchorScrollTo:function(){if(!document.body.classList.contains("no-anchor-scroll")){if(window.onhashchange=function(){""===window.location.hash&&(window.scrollTo({top:0,behavior:"smooth"}),document.activeElement.blur())},""!=window.location.hash){var e,t=location.hash.substring(1);if(!/^[A-z0-9_-]+$/.test(t))return;(e=document.getElementById(t))&&window.setTimeout((function(){window.kadence.scrollToElement(e,!1,"load")}),100)}var n=document.querySelectorAll("a[href*=\\#]:not([href=\\#]):not(.scroll-ignore):not([data-tab]):not([data-toggle])");n.length&&n.forEach((function(e){try{new URL(e.href).pathname===window.location.pathname&&e.addEventListener("click",(function(e){window.kadence.anchorScrollToCheck(e)}))}catch(t){console.log("ClassList: "+e.classList,"Invalid URL")}}))}},initScrollToTop:function(){var e=document.getElementById("kt-scroll-up");if(e){var t=function(){window.scrollY>100?(e.classList.add("scroll-visible"),e.setAttribute("aria-hidden",!1)):(e.classList.remove("scroll-visible"),e.setAttribute("aria-hidden",!0))};window.addEventListener("scroll",t),t(),e.addEventListener("click",(function(e){e.preventDefault(),window.scrollTo({top:0,behavior:"smooth"}),document.querySelector(".skip-link").focus({preventScroll:!0}),document.activeElement.blur()}))}var n=document.getElementById("kt-scroll-up-reader");n&&n.addEventListener("click",(function(e){e.preventDefault(),window.scrollTo({top:0,behavior:"smooth"}),document.querySelector(".skip-link").focus()}))},init:function(){window.kadence.initNavToggleSubmenus(),window.kadence.initToggleDrawer(),window.kadence.initMobileToggleAnchor(),window.kadence.initMobileToggleSub(),window.kadence.initOutlineToggle(),window.kadence.initStickyHeader(),window.kadence.initStickySidebar(),window.kadence.initStickySidebarWidget(),window.kadence.initTransHeaderPadding(),window.kadence.initAnchorScrollTo(),window.kadence.initScrollToTop(),window.kadence.initActiveAnchors()}},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",window.kadence.init):window.kadence.init()}();