1"use strict";(self.webpackChunk_text_chatbot=self.webpackChunk_text_chatbot||[]).push([[712],{5712(e,t,s){s.r(t);var a=s(7578);const r=class extends a.xI{static targets=["drawer","toggle","closeLabel","root","trigger"];connect(){this.desktopQuery=window.matchMedia("(min-width: 64rem)"),this.handleLayoutChange=this.reset.bind(this),this.desktopQuery.addEventListener("change",this.handleLayoutChange),this.reset()}disconnect(){this.desktopQuery.removeEventListener("change",this.handleLayoutChange)}reset(){const e=document.activeElement;this.closeAll(),this.setDrawer(!1),!this.desktopQuery.matches&&this.drawerTarget.contains(e)?this.toggleTarget.focus():this.desktopQuery.matches&&e===this.toggleTarget&&this.triggerTargets[0].focus()}setDrawer(e){this.drawerTarget.hidden=!this.desktopQuery.matches&&!e,this.drawerTarget.classList.toggle("v--active",!this.desktopQuery.matches&&e),this.toggleTarget.setAttribute("aria-expanded",String(e)),this.toggleTarget.setAttribute("aria-label",e?"Close navigation":"Open navigation"),this.closeLabelTarget.hidden=!e}toggleDrawer(){const e="true"!==this.toggleTarget.getAttribute("aria-expanded");this.closeAll(),this.setDrawer(e)}toggleSubmenu(e){const t=e.currentTarget.closest("[data-navigation-target='root']");e.detail>0&&this.hoveredRoot===t?this.hoveredRoot=null:t.classList.contains("v--opened")?this.closeAll():this.open(t)}enter(e){this.desktopQuery.matches&&window.matchMedia("(hover: hover)").matches&&(this.open(e.currentTarget),this.hoveredRoot=e.currentTarget)}leave(e){this.desktopQuery.matches&&!e.currentTarget.contains(document.activeElement)&&this.closeAll()}open(e){this.closeAll(),e.classList.add("v--opened"),e.querySelector("[aria-expanded]").setAttribute("aria-expanded","true"),this.drawerTarget.classList.add("v--has-opened"),this.positionSubmenu(e)}closeAll(){this.hoveredRoot=null,this.rootTargets.forEach(e=>{e.classList.remove("v--opened"),e.querySelector("[aria-expanded]").setAttribute("aria-expanded","false"),e.querySelector(".c-menu__sub").style.left=""}),this.drawerTarget.classList.remove("v--has-opened")}positionSubmenu(e){if(!this.desktopQuery.matches)return;const t=e.querySelector(".c-menu__sub");t.style.left="";const s=t.getBoundingClientRect(),a=this.drawerTarget.parentElement.getBoundingClientRect(),r=parseFloat(window.getComputedStyle(document.documentElement).fontSize),i=Math.max(r,a.left+r),o=Math.min(document.documentElement.clientWidth-r,a.right-r),n=Math.max(i-s.left,Math.min(0,o-s.right));n&&(t.style.left=`${s.left-e.getBoundingClientRect().left+n}px`)}resize(){const e=this.rootTargets.find(e=>e.classList.contains("v--opened"));e&&this.positionSubmenu(e)}outside(e){this.element.contains(e.target)||(this.closeAll(),this.setDrawer(!1))}focusOut(e){if(!this.element.contains(e.relatedTarget))return this.closeAll(),void this.setDrawer(!1);const t=e.target.closest("[data-navigation-target='root']");t&&!t.contains(e.relatedTarget)&&this.closeAll()}keydown(e){if(!this.element.contains(e.target))return;const t=e.target.closest("[data-navigation-target='root']");if(t&&this.triggerTargets.includes(e.target)&&"ArrowDown"===e.key)e.preventDefault(),this.open(t),t.querySelector(".c-menu__sub a").focus();else if("Escape"===e.key){e.preventDefault();const t=this.rootTargets.find(e=>e.classList.contains("v--opened"));this.closeAll(),t?t.querySelector("[data-navigation-target='trigger']").focus():this.desktopQuery.matches||(this.setDrawer(!1),this.toggleTarget.focus())}}};s.d(t,["default",0,r])}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.