1"use strict";(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([[9606],{9606:function(e,t,i){i.r(t),i.d(t,{initSearchBox:function(){return n}});var s=i(7246);const n=e=>({opened:!1,root:e,searchGlass:null,countryDropdownContainer:null,fieldInput:null,searchClose:null,iconButton:null,form:null,getElements(){this.searchGlass=this.root.querySelector(".search-navigation__glass"),this.countryDropdownContainer=this.root.querySelector(".country-dropdown__container"),this.fieldInput=this.root.querySelector(".search-navigation-field-drop__input"),this.searchClose=this.root.querySelector(".search-navigation__button_close"),this.iconButton=this.root.querySelector(".search-navigation__button_icon"),this.form=this.root.querySelector(".search-navigation-field-drop__field")},open(){this.opened||(this.opened=!0,this.root.classList.add("open"),this.searchGlass?.setAttribute("aria-expanded","true"),this.countryDropdownContainer&&(this.countryDropdownContainer.style.height="0"),this.fieldInput?.focus())},close(e){e?.stopPropagation?.();const t=this.root.closest(".mobile-nav__search");this.opened&&!t&&(this.opened=!1,this.root.classList.remove("open"),this.fieldInput?.blur(),this.searchGlass?.setAttribute("aria-expanded","false"),this.fieldInput&&(this.fieldInput.value=""))},getUrl(){const{url:e}=this.root.dataset;return e&&"http"===e.slice(0,4)?e:`${window.location.origin}${e||""}#`},redirect(e){const t=this.getUrl();if(t&&e.length>0){const i=`${t}q=${encodeURIComponent(e)}`;window.location.href=i;const n={event:"GA4_event_c_site_search",search_term:e.replace(/ /g,"").length>0?e:"none",search_location:"top menu",search_filter:void 0,widget_name:"PMI.COM Navigation"};(0,s.i)(n)}},clickHandler(){this.fieldInput?.value.trim()&&this.opened&&this.redirect(this.fieldInput.value.trim())},initEvents(){this.form&&this.form.addEventListener("submit",(e=>{e.preventDefault(),this.clickHandler()})),this.fieldInput&&this.fieldInput.addEventListener("keyup",(e=>{"Enter"===e.code&&this.clickHandler()})),this.searchGlass&&this.searchGlass.addEventListener("click",(e=>{this.opened?this.close(e):this.open()})),this.searchClose&&this.searchClose.addEventListener("click",(e=>this.close(e))),window.addEventListener("resize",(e=>this.close(e))),document.addEventListener("click",(e=>{const{target:t}=e;this.closedOnClickOutside(e,t)}))},closedOnClickOutside(e,t){!t.closest(".search-navigation")&&this.opened&&this.close(e)},init(){this.getElements(),this.initEvents()}});t.default={init:()=>{document.querySelectorAll(".search-navigation").forEach((e=>{n(e).init()}))}}}}]);
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.