PageSourceSearch

https://zinkbakken.dk/theme/89fec0e0143898505c6fffd88afa0419/js/ze…horizon.zen-search-overlay.plugin.c56c66.js

js zinkbakken.dk collected 2026-09-26 07:50:04 UTC 10,296 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[76742],{6742:(e,t,r)=>{r.r(t),r.d(t,{default:()=>v});var o=r(5206),s=r(3266);let i="modal-backdrop",a="modal-backdrop-open",n="no-scroll",l={ON_CLICK:"backdrop/onclick"};class c{create(e){this._removeExistingBackdrops(),document.body.insertAdjacentHTML("beforeend",this._getTemplate());let t=document.body.lastChild;document.documentElement.classList.add(n),setTimeout(function(){t.classList.add(a),"function"==typeof e&&e()},75),this._dispatchEvents()}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350,t=this._getBackdrops();s.Z.iterate(t,e=>e.classList.remove(a)),setTimeout(this._removeExistingBackdrops.bind(this),e),document.documentElement.classList.remove(n)}_dispatchEvents(){let e=o.Z.isTouchDevice()?"touchstart":"click";document.addEventListener(e,function(e){e.target.classList.contains(i)&&document.dispatchEvent(new CustomEvent(l.ON_CLICK))})}_getBackdrops(){return document.querySelectorAll(".".concat(i))}_removeExistingBackdrops(){if(!1===this._exists())return;let e=this._getBackdrops();s.Z.iterate(e,e=>e.remove())}_exists(){return document.querySelectorAll(".".concat(i)).length>0}_getTemplate(){return'<div class="'.concat(i,'"></div>')}constructor(){return c.instance||(c.instance=this),c.instance}}let d=Object.freeze(new c);class h{static create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;d.create(e)}static remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;d.remove(e)}static SELECTOR_CLASS(){return i}}var u=r(4049);class v extends window.PluginBaseClass{init(){let e=this.options;if(this._parentNode=u.Z.querySelector(document,e.parentNodeSelector,!1),this._overlayTarget=u.Z.querySelector(document,e.overlaySearchTargetSelector,!1),this._overlayClose=u.Z.querySelector(document,e.overlaySearchCloseSelector,!1),!this._parentNode){console.error("Called selector '".concat(e.parentNodeSelector,"' not found. Can not create overlay search."));return}if(!this._overlayTarget){console.error("Called selector '".concat(e.overlaySearchTargetSelector,"' for the header search not found. Can not create overlay search."));return}if(!this._overlayClose){console.error("Called selector '".concat(e.overlaySearchCloseSelector,"' for the overlay search close button not found. Can not create overlay search. Another plugin may overwrite the twig block layout_header_search_input_group."));return}this.onBodyClick=this._onBodyClick.bind(this),this.onKeyDown=this._onKeyDown.bind(this),this._registerEvents()}_registerEvents(){this.el.addEventListener("click",this._onClickToggle.bind(this)),this._overlayClose.addEventListener("click",this._closeEvent.bind(this))}_registerActiveEvents(){document.body.addEventListener("click",this.onBodyClick),document.addEventListener("keydown",this.onKeyDown)}_unregisterActiveEvents(){document.body.removeEventListener("click",this.onBodyClick),document.removeEventListener("keydown",this.onKeyDown)}_onBodyClick(e){!this._exists()||[this.options.overlaySearchToggleSelector,this.options.overlaySearchFormSelector,this.options.overlaySearchButtonSelector,this.options.overlaySearchSuggestCloseButtonSelector,this.options.overlaySearchResultSelector].some(t=>e.target.closest(t))||(this._closeEvent(e),this.$emitter.publish("onBodyClick"))}_onKeyDown(e){!1!==this._exists()&&"Escape"===e.key&&(this._closeEvent(e),this.$emitter.publish("onKeyDown"))}_onClickToggle(){let e=this.el.parentNode;bootstrap.Tooltip.getOrCreateInstance(e).update(),h.create(()=>{document.body.lastChild.classList.add(this.options.backdropClass),this._createOverlay()}),this.$emitter.publish("onClickToggle")}_closeEvent(e){this._removeOverlay(),h.remove(),this.$emitter.publish("closeEvent")}_createOverlay(){var e,t;let r=this.options;(t=window.focusHandler)===null||void 0===t||(e=t.saveFocusState)===null||void 0===e||e.call(t,"search-overlay"),this._registerActiveEvents(),document.body.insertAdjacentHTML("beforeend",this._getTemplate());let o=document.body.lastChild;o.appendChild(this._overlayClose),o.appendChild(this._overlayTarget),this._overlayClose.classList.remove(r.hiddenClass),this._setFocus(o),this.el.setAttribute("aria-expanded","true"),this.$emitter.publish("createOverlay")}_removeOverlay(){var e,t;let r=this.options;if(this._unregisterActiveEvents(),!1===this._exists())return;let o=this._getOverlays();s.Z.iterate(o,e=>{u.Z.querySelector(e,r.overlaySearchCloseSelector).classList.add(r.hiddenClass);let t=u.Z.querySelector(e,r.overlaySearchCloseSelector);this._parentNode.appendChild(t);let o=u.Z.querySelector(e,r.overlaySearchTargetSelector);this._parentNode.appendChild(o),e.remove(),this.$emitter.publish("removeOverlay")}),(t=window.focusHandler)===null||void 0===t||(e=t.resumeFocusState)===null||void 0===e||e.call(t,"search-overlay"),this.el.setAttribute("aria-expanded","fal
1se"),this.$emitter.publish("removeOverlayAll")}_exists(){return document.querySelectorAll(this.options.overlaySearchSelector).length>0}_getOverlays(){return document.querySelectorAll(this.options.overlaySearchSelector)}_getTemplate(){return'<div class="'+this.options.overlaySearchSelector.substr(1)+'"></div>'}_setFocus(e){var t,r;let o=u.Z.querySelector(e,"input");(r=window.focusHandler)===null||void 0===r||(t=r.setFocus)===null||void 0===t||t.call(r,o),this.$emitter.publish("focusInput")}}v.options={parentNodeSelector:"#searchCollapse",overlaySearchSelector:".js-overlay",overlaySearchTargetSelector:".header-search",overlaySearchToggleSelector:".js-search-toggle-btn",overlaySearchCloseSelector:".js-overlay-close",overlaySearchFormSelector:".header-search-input",overlaySearchButtonSelector:".header-search-btn",overlaySearchSuggestCloseButtonSelector:".header-close-btn",overlaySearchResultSelector:".js-search-result",backdropClass:"overlay-backdrop",hiddenClass:"d-none"}},5206:(e,t,r)=>{r.d(t,{Z:()=>o});class o{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return o.isIPhoneDevice()||o.isIPadDevice()}static isNativeWindowsBrowser(){return o.isIEBrowser()||o.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":o.isTouchDevice(),"is-ios":o.isIOSDevice(),"is-native-windows":o.isNativeWindowsBrowser(),"is-iphone":o.isIPhoneDevice(),"is-ipad":o.isIPadDevice(),"is-ie":o.isIEBrowser(),"is-edge":o.isEdgeBrowser()}}}},4049:(e,t,r)=>{r.d(t,{Z:()=>s});var o=r(5140);class s{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!s.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!1===s.hasAttribute(e,t))throw Error('The required property "'.concat(t,'" does not exist!'));if("function"!=typeof e.getAttribute){if(r)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=t.replace(/^data(|-)/,""),a=o.Z.toLowerCamelCase(i,"-");if(!s.isNode(e)){if(r)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(r)throw Error("This node doesn't support the dataset attribute!");return}let n=e.dataset[a];if(void 0===n){if(r)throw Error('The required data attribute "'.concat(t,'" does not exist on ').concat(e,"!"));return n}return o.Z.parsePrimitive(n)}static querySelector(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!s.isNode(e))throw Error("The parent node is not a valid HTML Node!");let o=e.querySelector(t)||!1;if(r&&!1===o)throw Error('The required element "'.concat(t,'" does not exist in parent node!'));return o}static querySelectorAll(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!s.isNode(e))throw Error("The parent node is not a valid HTML Node!");let o=e.querySelectorAll(t);if(0===o.length&&(o=!1),r&&!1===o)throw Error('At least one item of "'.concat(t,'" must exist in parent node!'));return o}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return e.querySelectorAll('\n            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),\n            select:not([tabindex^="-"]):not([disabled]),\n            textarea:not([tabindex^="-"]):not([disabled]),\n            button:not([tabindex^="-"]):not([disabled]),\n            a[href]:not([tabindex^="-"]):not([disabled]),\n            [tabindex]:not([tabindex^="-"]):not([disabled])\n        ')}static getFirstFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(e)[0]}static getLastFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=this.getFocusableElements(e);return t[t.length-1]}}},3266:(e,t,r)=>{r.d(t,{Z:()=>o});class o{static iterate(e,t){if(e instanceof Map||Array.isArray(e))return e.forEach(t);if(e instanceof FormData){for(var r of e.entries())t(r[1],r[0]);return}if(e instanceof NodeList)return e.forEach(t);if(e instanceof HTMLCollection)return Array.from(e).forEach(t);if(e instanceof Object)return Object.keys(e).forEach(r=>{t(e[r],r)});throw Error("The element type ".concat(typeof e," is not iterable!"))}}},5140:(e,t,r)=>{r.d(t,{Z:()=>o});class o{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 r=o.toUpperCamelCase(e,t);return o.lcFirst(r)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>o.ucFirst(e.toLowerCase())).join(""):o.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}}}]);

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.