(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{459:function(e,o){!function(){function headerMenusMobileMode(){var e=["search-overlay","menu"];function clearStaleBodyMenuState(){var e=document.body,o=!!document.querySelector("#search-overlay.js--shown");if(o||e.classList.remove("search-overlay-active"),"menu"===e.getAttribute("data-active")||e.classList.contains("lock-screen")){var t=document.querySelector(".main-nav.menu--res.js--open"),n=!1;if(t){var i=window.getComputedStyle(t),a=t.getBoundingClientRect(),r=a.bottom>0&&a.top0&&r}n||o||(e.removeAttribute("data-active"),e.classList.remove("lock-screen"),e.style.top="")}}var o=0;function beforeShowFixedPanels(t){e.some((function(e){return t.detail.element.classList.contains(e)}))&&(!function lockBodyScroll(){o=window.scrollY||window.pageYOffset||0,document.body.style.top=-o+"px"}(),document.body.classList.add("lock-screen"),t.detail.element.classList.contains("search-overlay")&&document.body.classList.add("search-overlay-active"),UX.viewToggler.hideAll())}function beforeHideFixedPanels(e){e.detail.element.classList.contains("search-overlay")&&document.body.classList.remove("search-overlay-active"),document.body.classList.remove("lock-screen"),function unlockBodyScroll(){document.body.style.top="",window.scrollTo(0,o)}()}$(document).on("screen-md-on",(function(e){clearStaleBodyMenuState(),document.addEventListener("viewToggler.beforeShow",beforeShowFixedPanels),document.addEventListener("viewToggler.beforeHide",beforeHideFixedPanels)})).on("screen-md-off",(function(e){document.removeEventListener("viewToggler.beforeShow",beforeShowFixedPanels),document.removeEventListener("viewToggler.beforeHide",beforeHideFixedPanels),document.body.classList.remove("search-overlay-active")})),clearStaleBodyMenuState(),window.addEventListener("pageshow",clearStaleBodyMenuState),window.addEventListener("load",clearStaleBodyMenuState)}UX.header={init:function init(){!function provideHeaderSizeGlobally(){var e=document.documentElement,o=document.querySelector("header.header"),t=0,n=function setHeight(){e.style.setProperty("--header-height",o.offsetHeight+"px")};void 0!==e.style.setProperty&&o?(n(),window.addEventListener("resize",(function(e){Math.abs(window.innerWidth-t)>5&&(n(),t=window.innerWidth)}))):console.warn("No values for --header-height will be provided as either css vars not supported or no header is present")}(),headerMenusMobileMode(),function focusControl(){document.addEventListener("viewToggler.afterShow",(function(e){if(e.detail.element.classList.contains("search-overlay")){var o=e.detail.element.querySelector('.active input[type="search"]');o&&e.detail.element.addEventListener("transitionend",(function(){o.focus()}),{once:!0})}}))}()}}}()}}]); //# sourceMappingURL=header-ee7afe4ed8a2a6a339a5.js.map