1"use strict";(self.NiveaXwebpackJsonp=self.NiveaXwebpackJsonp||[]).push([[1229,6890,7797],{12857:(e,t,s)=>{s.r(t),s.d(t,{default:()=>r});var i=s(21464);const n='[data-module="SearchInput"]';class r{static setup(e=n){Array.from(document.querySelectorAll(e)).filter(e=>!e.dataset.moduleInitialized).forEach(e=>{new r(e),e.dataset.moduleInitialized="true"})}constructor(e){this.element=e,this.searchClearIcon=this.element.querySelector(".nx-search-input-clear__icon"),this.searchInput=this.element.querySelector(".nx-search-input__text"),this.init()}init(){this.searchInput.addEventListener("input",e=>{this.checkEmpty()}),this.searchClearIcon.addEventListener("click",e=>{this.clearInput()}),this.setValueToInput(),this.searchInput.value&&this.searchClearIcon.classList.add("nx-search-input-clear__icon--show"),this.element.closest(".nx-layer")&&setTimeout(()=>(0,i.T5)(this.searchInput),0)}checkEmpty(){this.searchInput.value?this.searchClearIcon.classList.add("nx-search-input-clear__icon--show"):(this.searchClearIcon.classList.remove("nx-search-input-clear__icon--show"),(0,i.T5)(this.searchInput))}clearInput(){this.searchInput.value="",this.checkEmpty()}setValueToInput(){var e=window.location.href,t=this.searchInput.getAttribute("name");this.searchInput.value=this.getParameterByName(t,e)}getParameterByName(e,t){e=e.replace(/[\[\]]/g,"\\$&");var s=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null}}r.setup(n)},22489:(e,t,s)=>{s.r(t),s.d(t,{default:()=>l});var i=s(21464),n=s(12857),r=s(43234);const o='[data-module="SearchContentPart"]';class l{static setup(e=o){Array.from(document.querySelectorAll(e)).filter(e=>!e.dataset.moduleInitialized).forEach(e=>{new l(e),e.dataset.moduleInitialized="true"})}constructor(e,t={}){this.element=e,this.options=t,this.options=(0,i.$E)(this.element,Object.assign(this.getDefaultOptions(),this.options)),this.init()}init(){return this.content=this.content||this.getContent(),this}getContent(){const e=document.querySelector(".nx-header-search-form");return new n.default(e),new r.default(e),e}getDefaultOptions(){return{inputSelector:".nx-search__input"}}}l.setup(o)},43234:(e,t,s)=>{s.r(t),s.d(t,{default:()=>S});var i=s(19446),n=s(42194),r=s(84817),o=s(61269),l=s(60778),a=s(45204),u=s(92752),h=s(41445),c=s(21464);const p='[data-module="SearchAutoSuggestion"]',d=38,g=40,m=(e,t)=>e.pipe((0,o.E)("target"),(0,l.T)(e=>e.closest(t)),(0,a.p)(e=>!!e));class S{static setup(e=p){Array.from(document.querySelectorAll(e)).filter(e=>!e.dataset.moduleInitialized).forEach(e=>{new S(e),e.dataset.moduleInitialized="true"})}constructor(e,t={}){this.element=e,this.options=t,this.ajaxResponseCache={},this.options=(0,c.$E)(this.element,Object.assign(this.getDefaultOptions(),this.options)),this.inputField=this.element.querySelector(this.options.inputWrapperSelector),this.inputFieldText=this.inputField.querySelector(this.options.inputSelector),this.suggestionField=this.element.querySelector(this.options.suggestionListSelector),this.form=this.element.querySelector(this.options.formSelector)||e,this.deleteButton=this.element.querySelector(this.options.deleteBtnSelector),this.setInputEventHandler()}setInputEventHandler(){const e=(0,i.R)(this.inputFieldText,"input").pipe((0,o.E)("target"),(0,u.B)(500),(0,a.p)(e=>e.value.length>=3||this.hideDialog()),(0,o.E)("value"),(0,l.T)(c.HI)),t=(0,i.R)(this.inputFieldText,"keydown").pipe((0,a.p)(({target:e})=>null!=e.value)),s=t.pipe((0,a.p)(e=>13===e.which),(0,o.E)("target","value")),r=t.pipe((0,l.T)(({target:e,which:t})=>({inputValue:(0,c.HI)(e.value),which:t})),(0,a.p)(({inputValue:e})=>e.length>=3),(0,a.p)(({which:e})=>[d,g].includes(e)),(0,h.M)(({inputValue:e})=>!this.isDialogVisible()&&this.initSuggestion(e))),p=(0,i.R)(this.inputField,"click").pipe((0,l.T)(()=>this.inputFieldText.value),(0,a.p)(e=>e.length>=3),(0,l.T)(c.HI)),S=(0,i.R)(this.deleteButton,"click"),v=(0,i.R)(document.body,"click").pipe((0,o.E)("target"),(0,a.p)(e=>null===e.closest(this.options.inputWrapperSelector))),f=(0,i.R)(this.suggestionField,"click"),x=(0,i.R)(this.suggestionField,"mouseover");return e.subscribe(e=>this.initSuggestion(e)),s.subscribe(e=>{let t=this.getSelectedElement(this.suggestionField),s=t?t.textContent:e;this.setToInputText((0,c.HI)(s))}),r.subscribe(({which:e})=>{switch(e){case g:this.moveSelection(!0);break;case d:this.moveSelection(!1)}}),p.subscribe(e=>this.initSuggestion(e)),(0,n.h)(S,v).subscribe(()=>this.hideDialog()),m(f,"li").subscribe(e=>
1{this.setToInputText((0,c.HI)(e.textContent)).submitForm()}),m(x,"li").subscribe(e=>this.removeSelection(Array.from(this.suggestionField.children)).setSelection(e)),this}initSuggestion(e){return this.clearSuggestion().setLoader(),this.isInCache(e)?this.updateSuggestion(this.getResultsFromCache(e)):this.fetchSuggestions(e),this}isInCache(e){return e in this.ajaxResponseCache}setResultsToCache(e,t){return this.ajaxResponseCache[e]=t,this}getResultsFromCache(e){return this.ajaxResponseCache[e]}updateSuggestion(e){return this.insertNodes(e).showDialog(),this}clearSuggestion(){return this.suggestionField.innerHTML="",this}fetchSuggestions(e){let t=window.location.protocol+"//"+window.location.host+"/xajax/searchSuggestion?q="+e,s=fetch(t,{credentials:"include"}).then(t=>{if(200===t.status)return t.json();throw new Error(`AutoSuggestion for "${e}" was not loaded. Response status: ${t.status}`)});return(0,r.H)(s).pipe((0,l.T)(e=>JSON.parse(e)||{Results:[]}),(0,o.E)("Results"),(0,l.T)(e=>e.map(e=>e.Name)),(0,h.M)(e=>0===e.length&&this.hideDialog()),(0,a.p)(e=>e.length>0)).subscribe(t=>{let s=this.createSuggestionHTML(t,e);this.setResultsToCache(e,s).updateSuggestion(s)},e=>{console.warn("Fetch Error",e),this.hideDialog()}),this}createSuggestionHTML(e,t){return e.map(e=>`<li class="nx-search-result">${e.replace(new RegExp(t,"i"),"<strong>$&</strong>")}</li>`).join("")}insertNodes(e){return this.suggestionField.innerHTML=e,this}showDialog(){return this.suggestionField.classList.add("active"),this}hideDialog(){return this.suggestionField.classList.remove("active"),!1}isDialogVisible(){return this.suggestionField.classList.contains("active")}setToInputText(e){return this.inputFieldText.value=e,this}setLoader(){return this.suggestionField.innerHTML='<div class="nx-spinner nx-spinner__loading nx-spinner--medium">\n <div class="nx-spinner__container ">\n <div class="nx-spinner__wheel"></div>\n </div>\n </div>',this}moveSelection(e){const t=this.suggestionField,s=Array.from(t.children),i=this.getSelectedElement(t),n=t.firstChild,r=t.lastElementChild;let o;return this.removeSelection(s),e?(o=i?i.nextElementSibling:n,this.setSelection(o||n)):(o=i?i.previousElementSibling:r,this.setSelection(o||r)),this}setSelection(e){return e.classList.add("selected"),this}removeSelection(e){return e.forEach(e=>e.classList.remove("selected")),this}getSelectedElement(e){return e.querySelector(".selected")}submitForm(){return this.form.submit(),this}getDefaultOptions(){return{inputWrapperSelector:".nx-search-input__inner",inputSelector:".nx-search-input__text",suggestionListSelector:".nx-search__autosuggest",formSelector:".nx-header-search-form",deleteBtnSelector:".nx-search-input-clear__icon"}}}S.setup(p)},61269:(e,t,s)=>{s.d(t,{E:()=>n});var i=s(60778);function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var s=e.length;if(0===s)throw new Error("list of properties cannot be empty.");return function(t){return(0,i.T)(function(e,t){var s=function(s){for(var i=s,n=0;n<t;n++){var r=i[e[n]];if(void 0===r)return;i=r}return i};return s}(e,s))(t)}}}}]); 2//# sourceMappingURL=/dist/NiveaX/./modules/SearchContentPart.1f1e2bdc.js.c21e1171.map
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.