PageSourceSearch

https://www.devolo.be/theme/41633e8e84648bb5f013f9ddfe4aa4dd/js/core-kit/core-kit.js

js devolo.be collected 2026-09-30 14:35:39 UTC 28,111 bytes, 10 lines download raw bytes

1(()=>{"use strict";var e={156(e){var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a(Array.isArray(e)?[]:{},e,t):e}function n(e,t,i){return e.concat(t).map(function(e){return s(e,i)})}function r(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,i,l){(l=l||{}).arrayMerge=l.arrayMerge||n,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=s;var c,h,d=Array.isArray(i);return d!==Array.isArray(e)?s(i,l):d?l.arrayMerge(e,i,l):(h={},(c=l).isMergeableObject(e)&&r(e).forEach(function(t){h[t]=s(e[t],c)}),r(i).forEach(function(t){(!o(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(o(e,t)&&c.isMergeableObject(i[t])?h[t]=(function(e,t){if(!t.customMerge)return a;var i=t.customMerge(e);return"function"==typeof i?i:a})(t,c)(e[t],i[t],c):h[t]=s(i[t],c))}),h)}a.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,i){return a(e,i,t)},{})},e.exports=a}},t={};function i(s){var n=t[s];if(void 0!==n)return n.exports;var r=t[s]={exports:{}};return e[s](r,r.exports,i),r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var s=i(156),n=i.n(s);class r{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let i=r.toUpperCamelCase(e,t);return r.lcFirst(i)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>r.ucFirst(e.toLowerCase())).join(""):r.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}class o{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=new CustomEvent(e,{detail:t,cancelable:i});return this.el.dispatchEvent(s),s}subscribe(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=this,n=e.split("."),r=i.scope?t.bind(i.scope):t;if(i.once&&!0===i.once){let t=r;r=function(i){s.unsubscribe(e),t(i)}}return this.el.addEventListener(n[0],r),this.listeners.push({splitEventName:n,opts:i,cb:r}),!0}unsubscribe(e){arguments.length>1&&"function"==typeof arguments[1]&&console.warn(`[NativeEventEmitter] Unsubscribing by passing the subscriber function as a second argument is not supported. By default, all listeners for the event will be removed. Use a suffix (separated by a dot) on the event name when subscribing/unsubscribing to identify/target your specific listener only, e.g. "${e}.MyCustomPlugin"`);let t=e.split(".");return this.listeners=this.listeners.reduce((e,i)=>([...i.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):e.push(i),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}}class a{constructor(e,t={},i=!1){if(!(e instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${i}".`);return}this.el=e,this.$emitter=new o(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}destroy(){}
1_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=[this.constructor.options,this.options,e];return t.push(this._getConfigFromDataAttribute()),t.push(this._getOptionsFromDataAttribute()),n().all(t.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_getConfigFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=r.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${t}-config`);return i?window.PluginConfigManager.get(this._pluginName,i):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=r.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${t}-options`);if(i)try{return JSON.parse(i)}catch(e){console.error(`The data attribute "data-${t}-options" could not be parsed to json: ${e.message}`)}return e}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}}class l extends a{static #e=this.options={sourceSelector:".cms-page",headingSelector:"h2",offset:0,activeClass:"active",emptyClass:"cms-element-anchor-nav--empty",stuckClass:"cms-element-anchor-nav--stuck",idPrefix:"anchor-"};init(){if(this._readDataOptions(),this.list=this.el.querySelector(".cms-element-anchor-nav__list"),this.source=this._resolveSource(),!this.list||!this.source||(this.headings=this._collectHeadings(),0===this.headings.length)){this.el.classList.add(this.options.emptyClass);return}this._setupPlaceholder(),this._renderLinks(),this._bindClicks(),this._observe()}_readDataOptions(){let e=this.el.getAttribute("data-anchor-nav-options");if(e)try{Object.assign(this.options,JSON.parse(e))}catch(e){}}_resolveSource(){let e=this.el.closest(this.options.sourceSelector)||document.querySelector(this.options.sourceSelector);return e&&e!==this.el?e:document.body}_collectHeadings(){let e=this.source.querySelectorAll(this.options.headingSelector),t=[];return e.forEach((e,i)=>{if(this.el.contains(e))return;let s=(e.textContent||"").trim();s&&(e.id||(e.id=`${this.options.idPrefix}${this._slug(s)}-${i}`),t.push({id:e.id,text:s,node:e}))}),t}_slug(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60)}_renderLinks(){let e=this.headings.map(e=>{let{id:t,text:i}=e;return`
2            <li class="cms-element-anchor-nav__item nav-item" role="presentation">
3                <a class="cms-element-anchor-nav__link nav-link"
4                   href="#${t}"
5                   data-anchor-target="${t}"
6                   role="tab">${this._escape(i)}</a>
7            </li>
8        `}).join("");this.list.innerHTML=e}_escape(e){let t=document.createElement("div");return t.textContent=e,t.innerHTML}_setupPlaceholder(){this.placeholder=document.createElement("div"),this.placeholder.className="cms-element-anchor-nav-placeholder",this.placeholder.setAttribute("aria-hidden","true"),this.el.parentNode.insertBefore(this.placeholder,this.el)}_bindClicks(){this.list.addEventListener("click",e=>{let t=e.target.closest("[data-anchor-target]");if(!t)return;e.preventDefault();let i=t.getAttribute("data-anchor-target"),s=document.getElementById(i);if(!s)return;let n=s.getBoundingClientRect().top+window.pageYOffset-this._scrollOffset();window.scrollTo({top:n,behavior:"smooth"}),history.replaceState(null,"",`#${i}`)})}_headerOffset(){let e=0;return document.querySelectorAll(".sticky-top, .header-main, [data-sticky-top]").forEach(t=>{if(t===this.el||t.contains(this.el)||this.el.contains(t))return;let i=window.getComputedStyle(t).position;if("sticky"!==i&&"fixed"!==i||!(this.placeholder.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING))return;let s=t.getBoundingClientRect();s.bottom>e&&(e=s.bottom)}),Math.max(0,e)}_scrollOffset(){return this._headerOffset()+this.el.offsetHeight+Number(this.options.offset||0)}_observe(){this._onScroll=this._onScroll.bind(this),window.addEventListener("scroll",this._onScroll,{passive:!0}),window.addEventListener("resize",this._onScroll,{passive:!0}),this._onScroll()}_onScroll(){this._scrollFrame||(this._scrollFrame=window.requestAnimationFrame(()=>{this._scrollFrame=null,this._updateStickyState(),this._updateActive()}
8))}_updateStickyState(){let e=this._headerOffset(),t=this.placeholder.getBoundingClientRect().top<=e;if(t&&!this._stuck){let t=this.el.getBoundingClientRect();this.placeholder.style.height=`${t.height}px`,this.placeholder.style.width=`${t.width}px`,this.el.style.position="fixed",this.el.style.top=`${e}px`,this.el.style.left=`${t.left}px`,this.el.style.width=`${t.width}px`,this.el.style.zIndex="1010",this.el.classList.add(this.options.stuckClass),this._stuck=!0}else if(!t&&this._stuck)this.placeholder.style.height="",this.placeholder.style.width="",this.el.style.position="",this.el.style.top="",this.el.style.left="",this.el.style.width="",this.el.style.zIndex="",this.el.classList.remove(this.options.stuckClass),this._stuck=!1;else if(t&&this._stuck){let t=this.placeholder.getBoundingClientRect();this.el.style.left=`${t.left}px`,this.el.style.width=`${t.width}px`,this.el.style.top=`${e}px`}}_updateActive(){let e=this._scrollOffset()+1,t=this.headings[0]?.id;for(let{id:i,node:s}of this.headings)if(s.getBoundingClientRect().top<=e)t=i;else break;t&&t!==this._activeId&&(this._activeId=t,this._setActive(t))}_setActive(e){this.list.querySelectorAll(".cms-element-anchor-nav__link").forEach(t=>{let i=t.getAttribute("data-anchor-target")===e;t.classList.toggle(this.options.activeClass,i)})}}class c{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return c.isIPhoneDevice()||c.isIPadDevice()}static isNativeWindowsBrowser(){return c.isIEBrowser()||c.isEdgeBrowser()}static isIPhoneDevice(){return!!navigator.userAgent.match(/iPhone/i)}static isIPadDevice(){return!!navigator.userAgent.match(/iPad/i)}static isIEBrowser(){return -1!==navigator.userAgent.toLowerCase().indexOf("msie")||!!navigator.userAgent.match(/Trident.*rv:\d+\./)}static isEdgeBrowser(){return!!navigator.userAgent.match(/Edge\/\d+/i)}static getList(){return{"is-touch":c.isTouchDevice(),"is-ios":c.isIOSDevice(),"is-native-windows":c.isNativeWindowsBrowser(),"is-iphone":c.isIPhoneDevice(),"is-ipad":c.isIPadDevice(),"is-ie":c.isIEBrowser(),"is-edge":c.isEdgeBrowser()}}}class h extends a{static #e=this.options={debounceTime:200,navItemSelector:".nav-item",topLevelLinksSelector:".main-navigation-link",ariaCurrentPageSelector:".nav-item-{id}-link",activeClass:"active",pathIdList:[]};init(){this._topLevelLinks=this.el.querySelectorAll(`${this.options.topLevelLinksSelector}`),this._registerEvents(),this._isMouseOver=!1}_registerEvents(){let e=c.isTouchDevice()?"touchstart":"mouseenter",t=c.isTouchDevice()?"touchstart":"mouseleave",i=c.isTouchDevice()?"touchstart":"click";this.el.addEventListener("mouseleave",this._closeAllDropdowns.bind(this)),this.el.addEventListener("focusout",this._restoreFocusAfterBtnClose.bind(this)),this._topLevelLinks.forEach(s=>{s.addEventListener(e,this._toggleNavbar.bind(this,s)),s.addEventListener(t,this._toggleNavbar.bind(this,s)),null!==s.getAttribute("href")&&s.addEventListener(i,this._navigateToLinkOnClick.bind(this,s))}),window.addEventListener("load",()=>{this._setCurrentPage()})}_toggleNavbar(e,t){let i=window.bootstrap.Dropdown.getOrCreateInstance(e);"mouseenter"===t.type?(this._isMouseOver=!0,this._debounce(()=>{this._isMouseOver&&(this._closeAllDropdowns(),i?._menu&&!i._menu.classList.contains("show")&&(i.show(),e.blur()),this.$emitter.publish("showDropdown"))},this.options.debounceTime)):"mouseleave"===t.type&&(this._isMouseOver=!1)}_closeAllDropdowns(){Array.from(this._topLevelLinks).map(e=>window.bootstrap.Dropdown.getInstance(e)).forEach(e=>{e?._menu&&e._menu.classList.contains("show")&&e.hide()}),this.$emitter.publish("closeAllDropdowns")}_navigateToLinkOnClick(e,t){if("click"===t.type&&0!==t.pageX&&e.classList.contains("dropdown-toggle")){if("_blank"===e.target){window.open(e.href,"_blank","noopener, noreferrer");return}this._navigateTo(e.href)}}_debounce(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this._clearDebounce(),this._debouncer=setTimeout(e.bind(this,...i),this.options.debounceTime)}_clearDebounce(){clearTimeout(this._debouncer)}_setCurrentPage(){if(window.activeNavigationId){let e=this.options.ariaCurrentPageSelector.replace("{id}",window.activeNavigationId),t=this.el.querySelector(e);t&&(t.setAttribute("aria-current","page"),t.classList.add(this.options.activeClass))}(window.activeNavigationPathIdList||this.options.pathIdList||[]).forEac
8h(e=>{let t=this.options.ariaCurrentPageSelector.replace("{id}",e),i=this.el.querySelector(t);i&&i.classList.add(this.options.activeClass)})}_navigateTo(e){window.location.href=e}_restoreFocusAfterBtnClose(e){if(e.relatedTarget||e.target.matches(this.options.topLevelLinksSelector))return;let t=e.target.closest(this.options.navItemSelector)?.querySelector(this.options.topLevelLinksSelector);t&&window.focusHandler.setFocus(t)}}class d extends h{init(){super.init(),this._closeTimer=null,this._zone=this.el.closest(".header-main")||this.el,this._bindZoneEvents()}_registerEvents(){this._topLevelLinks.forEach(e=>{e.addEventListener("mouseenter",this._onLinkEnter.bind(this,e)),e.addEventListener("mouseleave",this._toggleNavbar.bind(this,e)),null!==e.getAttribute("href")&&e.addEventListener("click",this._navigateToLinkOnClick.bind(this,e))}),this.el.addEventListener("focusout",this._restoreFocusAfterBtnClose.bind(this)),window.addEventListener("load",()=>{this._setCurrentPage()})}_bindZoneEvents(){this._zone.addEventListener("pointerenter",()=>this._cancelClose()),this._zone.addEventListener("pointermove",()=>this._cancelClose()),this._zone.addEventListener("pointerleave",this._onZoneLeave.bind(this))}_onZoneLeave(e){e.relatedTarget&&this._zone.contains(e.relatedTarget)||this._scheduleClose()}_onLinkEnter(e,t){this._cancelClose(),this._toggleNavbar(e,t)}_scheduleClose(){this._cancelClose(),this._closeTimer=window.setTimeout(()=>this._closeAllDropdowns(),250)}_cancelClose(){this._closeTimer&&(window.clearTimeout(this._closeTimer),this._closeTimer=null)}}let u="js-offcanvas-singleton",p=new WeakMap;class f{constructor(){this.$emitter=new o}open(e,t,i,s,n,r,o){this._removeExistingOffCanvas();let a=this._createOffCanvas(i,r,o,s);this.setContent(e,n),this._openOffcanvas(a,t)}setContent(e,t){let i=this.getOffCanvas();i[0]&&(i[0].innerHTML=e,this._registerEvents(t),this._setAriaAttrs())}setAdditionalClassName(e){this.getOffCanvas()[0].classList.add(e)}getOffCanvas(){return document.querySelectorAll(`.${u}`)}close(e){let t=this.getOffCanvas();t.forEach(e=>{bootstrap.Offcanvas.getInstance(e).hide()}),setTimeout(()=>{this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:t})},e)}goBackInHistory(){window.history.back()}exists(){return this.getOffCanvas().length>0}_openOffcanvas(e,t){window.focusHandler.saveFocusState("offcanvas"),this._disableBackgroundAccessibility(e),window.focusHandler._addFocusTrapGuard(e),f.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof t&&t()}_registerEvents(e){let t=this.getOffCanvas();t.forEach(i=>{let s=()=>{setTimeout(()=>
8{this._restoreBackgroundState(),i.remove(),window.focusHandler._removeFocusTrapGuard(),window.focusHandler.resumeFocusState("offcanvas"),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:t})},e),i.removeEventListener("hide.bs.offcanvas",s)};i.addEventListener("hide.bs.offcanvas",s)}),window.addEventListener("popstate",this.close.bind(this,e),{once:!0}),document.querySelectorAll(".js-offcanvas-close").forEach(t=>{t.addEventListener("click",this.close.bind(this,e))})}_setAriaAttrs(){let e=this.getOffCanvas()[0],t="off-canvas-headline",i=e.querySelector(`[data-id="${t}"]`);i&&!e.hasAttribute("aria-labelledby")&&(i.setAttribute("id",t),e.setAttribute("aria-labelledby",t))}_disableBackgroundAccessibility(e){let t=[...document.body.children].filter(t=>t!==e).map(e=>({element:e,inert:e.inert,ariaHidden:e.getAttribute("aria-hidden")}));p.set(this,t),t.forEach(e=>{let{element:t}=e;t.inert=!0,t.setAttribute("aria-hidden","true")})}_restoreBackgroundState(){let e=p.get(this);e?.forEach(e=>{let{element:t,inert:i,ariaHidden:s}=e;if(t.inert=i,null===s){t.removeAttribute("aria-hidden");return}t.setAttribute("aria-hidden",s)}),p.delete(this)}_removeExistingOffCanvas(){this.getOffCanvas().forEach(e=>{let t=bootstrap.Offcanvas.getInstance(e);t&&"function"==typeof t.dispose&&t.dispose(),e.remove(),window.focusHandler._removeFocusTrapGuard()}
8),this._restoreBackgroundState(),f.bsOffcanvas=null}_getPositionClass(e){return"left"===e?"offcanvas-start":"right"===e?"offcanvas-end":`offcanvas-${e}`}_createOffCanvas(e,t,i,s){let n=document.createElement("div");if(n.classList.add("offcanvas",u),n.classList.add(this._getPositionClass(e)),n.setAttribute("tabindex","-1"),!0===t&&n.classList.add("is-fullwidth"),i){let e=typeof i;if("string"===e)n.classList.add(i);else if(Array.isArray(i))i.forEach(e=>{n.classList.add(e)});else throw Error(`The type "${e}" is not supported. Please pass an array or a string.`)}return document.body.appendChild(n),f.bsOffcanvas=new bootstrap.Offcanvas(n,{backdrop:!1!==s||"static"}),n}}let g=Object.freeze(new f);class v{static open(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",s=!(arguments.length>3)||void 0===arguments[3]||arguments[3],n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";g.open(e,t,i,s,n,r,o)}static setContent(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:350;g.setContent(e,t,i)}static setAdditionalClassName(e){g.setAdditionalClassName(e)}static close(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;g.close(e)}static exists(){return g.exists()}static getOffCanvas(){return g.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}let _="loader",m={BEFORE:"before",INNER:"inner"};class b{constructor(e,t=m.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}create(){if(!this.exists()){if(this.position===m.INNER){this._previousHTML=this.parent.innerHTML,this.parent.innerHTML=b.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),b.getTemplate())}}remove(){if(this.position===m.INNER){this.parent.innerHTML=this._previousHTML;return}this.parent.querySelectorAll(`.${_}`).forEach(e=>e.remove())}exists(){return this.parent.querySelectorAll(`.${_}`).length>0}_getPosition(){return this.position===m.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`<div class="${_}" role="status">
9                    <span class="visually-hidden">Loading...</span>
10                </div>`}static SELECTOR_CLASS(){return _}}class w{constructor(){this._request=null,this._errorHandlingInternal=!1}get(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",s=this._createPreparedRequest("GET",e,i);return this._sendRequest(s,null,t)}post(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let n=this._createPreparedRequest("POST",e,s);return this._sendRequest(n,t,i)}delete(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let n=this._createPreparedRequest("DELETE",e,s);return this._sendRequest(n,t,i)}patch(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let n=this._createPreparedRequest("PATCH",e,s);return this._sendRequest(n,t,i)}abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn(`the request to ${e.responseURL} was aborted`)}),e.addEventListener("error",()=>{console.warn(`the request to ${e.responseURL} failed with status ${e.status}`)}),e.addEventListener("timeout",()=>{console.warn(`the request to ${e.responseURL} timed out`)})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,i){return this._registerOnLoaded(e,i),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,i){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),i&&this._request.setRequestHeader("Content-type",i),this._request}}class y extends a{static #e=this.options={navigationUrl:window.router["frontend.menu.offcanvas"],position:"left",triggerEvent:"click",additionalOffcanvasClass:"navigation-offcanvas",linkSelector:".js-navigation-offcanvas-link",loadingIconSelector:".js-navigation-offcanvas-loading-icon",linkLoadingClass:"is-loading",menuSelector:".navigation-offcanvas-container",initialContentSelector:".js-navigation-offcanvas-initial-content",currentCategorySelector:"a.is-current-category"};init(){this._cache={},this._client=new w,this._content=b.getTemplate(),this._registerEvents()}_registerEvents(){this._boundGetLinkEventHandler||(this._boundGetLinkEventHandler=this._getLinkEventHandler.bind(this)),this.el.removeEventListener(this.options.triggerEvent,this._boundGetLinkEventHandler),this.el.addEventListener(this.options.triggerEvent,this._boundGetLinkEventHandler),v.exists()&&v.getOffCanvas().forEac
10h(e=>{e.querySelectorAll(this.options.linkSelector).forEach(e=>{y._resetLoader(e),e.addEventListener("click",t=>{this._getLinkEventHandler(t,e)})}),window.PluginManager.initializePluginsInParentElement(e)}),this._openMenuViaUrlParameter()}_openMenu(e){y._stopEvent(e),v.open(this._content,this._registerEvents.bind(this),this.options.position),v.setAdditionalClassName(this.options.additionalOffcanvasClass),this.$emitter.publish("openMenu")}_openMenuViaUrlParameter(){let e=new URLSearchParams(window.location.search);if(e.has("offcanvas")&&"menu"===e.get("offcanvas")&&(document.querySelector('[data-off-canvas-menu="true"]')?.click(),window.history.replaceState)){let e=new URL(window.location);e.searchParams.delete("offcanvas"),window.history.replaceState({},document.title,e)}}_getLinkEventHandler(e,t){if(!t){let t=document.querySelector(this.options.initialContentSelector),i=`${this.options.navigationUrl}?navigationId=${window.activeNavigationId}`;return this._fetchMenu(i,i=>(t.querySelector(this.options.menuSelector).innerHTML=i,this._content=t.innerHTML,this._openMenu(e)))}if(y._stopEvent(e),t.classList.contains(this.options.linkLoadingClass))return;y._setLoader(t);let i=t.getAttribute("data-href")||t.getAttribute("href");i&&(this.$emitter.publish("getLinkEventHandler"),this._fetchMenu(i,this._updateContent.bind(this)))}static _setLoader(e){e.classList.add(this.options.linkLoadingClass);let t=e.querySelector(this.options.loadingIconSelector);t&&(t._linkIcon=t.innerHTML,t.innerHTML=b.getTemplate())}static _resetLoader(e){e.classList.remove(this.options.linkLoadingClass);let t=e.querySelector(this.options.loadingIconSelector);t&&t._linkIcon&&(t.innerHTML=t._linkIcon)}_updateContent(e){if(this._content=e,v.exists()){let t=y._getOffcanvasMenu();t.innerHTML=e;let i=t.querySelector(this.options.currentCategorySelector);window.focusHandler.setFocus(i,{focusVisible:!0}),this._registerEvents()}this.$emitter.publish("updateContent")}_fetchMenu(e,t){return!!e&&(this._cache[e]&&"function"==typeof t?t(this._cache[e]):void(this.$emitter.publish("beforeFetchMenu"),fetch(e,{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(e=>e.text()).then(i=>{this._cache[e]=i,"function"==typeof t&&t(i)})))}static _stopEvent(e){e.preventDefault(),e.stopImmediatePropagation()}static _getOffcanvas(){return v.getOffCanvas()[0]}static _getOffcanvasMenu(){return y._getOffcanvas().querySelector(this.options.menuSelector)}}class E extends y{_getLinkEventHandler(e,t){if(t)return super._getLinkEventHandler(e,t);let i=this.el.dataset.mainNavigationId;if(!i)return super._getLinkEventHandler(e,t);let s=window.activeNavigationId;window.activeNavigationId=i;try{return super._getLinkEventHandler(e,t)}finally{window.activeNavigationId=s}}}class L extends a{static #e=this.options={topicInputSelector:'input[name="categoryId"]',groupSelector:"[data-support-form-topic-group]",feedbackSelector:"[data-support-form-topic-feedback]",hiddenClass:"d-none",invalidClass:"is-invalid"};init(){this._topics=Array.from(this.el.querySelectorAll(this.options.topicInputSelector)),0!==this._topics.length&&(this._group=this.el.querySelector(this.options.groupSelector),this._feedback=this.el.querySelector(this.options.feedbackSelector),this.el.addEventListener("submit",this._onSubmit.bind(this),!0),this._topics.forEach(e=>e.addEventListener("change",this._clearError.bind(this))))}_onSubmit(e){if(this._hasSelection()){this._clearError();return}e.preventDefault(),e.stopImmediatePropagation(),this._showError()}_hasSelection(){return this._topics.some(e=>e.checked)}_showError(){this._topics.forEach(e=>e.classList.add(this.options.invalidClass)),this._feedback&&this._feedback.classList.remove(this.options.hiddenClass),this._group&&this._group.scrollIntoView({behavior:"smooth",block:"center"})}_clearError(){this._topics.forEach(e=>e.classList.remove(this.options.invalidClass)),this._feedback&&this._feedback.classList.add(this.options.hiddenClass)}}let C=window.PluginManager;C.register("AnchorNav",l,"[data-anchor-nav]"),C.override("Navbar",()=>Promise.resolve({default:d}),"[data-navbar]"),C.override("OffCanvasMenu",()=>Promise.resolve({default:E}
10),"[data-off-canvas-menu]"),C.register("ProductRegistration",class extends a{init(){this._container=this.el.querySelector("[data-product-registration-items]"),this._template=this.el.querySelector("[data-product-registration-template]"),this._addBtn=this.el.querySelector("[data-product-registration-add]"),this._container&&this._template&&this._addBtn&&(this._addBtn.addEventListener("click",()=>this._addItem()),this._container.addEventListener("click",e=>{let t=e.target.closest("[data-product-registration-remove]");t&&this._removeItem(t.closest("[data-product-registration-item]"))}),this._refresh())}_items(){return this._container.querySelectorAll("[data-product-registration-item]")}_addItem(){let e=this._template.innerHTML.replace(/__INDEX__/g,String(this._items().length)),t=document.createElement("div");t.innerHTML=e.trim();let i=t.firstElementChild;this._container.appendChild(i),this._refresh()}_removeItem(e){e.remove(),this._reindex(),this._refresh()}_reindex(){this._items().forEach((e,t)=>{e.querySelectorAll("input").forEach(e=>{e.name&&(e.name=e.name.replace(/items\[\d+]/,`items[${t}]`))})})}_refresh(){let e=this._items(),t=e.length>1,i=this._container.dataset.itemLabelTemplate||"Produkt __N__";e.forEach((e,s)=>{let n=e.querySelector("[data-product-registration-item-head]"),r=e.querySelector("[data-product-registration-item-num]");n&&(n.hidden=!t),r&&(r.textContent=i.replace("__N__",String(s+1)))})}},"[data-product-registration-form]"),C.register("ProductRegistrationAutoDownload",class extends a{init(){let e=this.el.dataset.downloadUrl,t=this.el.dataset.cleanUrl;if(!e)return;let i=document.createElement("iframe");i.src=e,i.style.display="none",i.setAttribute("aria-hidden","true"),i.setAttribute("tabindex","-1"),document.body.appendChild(i),t&&window.history.replaceState(null,"",t)}},"[data-product-registration-auto-download]"),C.register("SupportFormTopicValidator",L,"[data-support-form-topic-validator]")})();

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.