PageSourceSearch

https://zinkbakken.dk/theme/89fec0e0143898505c6fffd88afa0419/js/ze…zen-newsletter-additionals.plugin.7883b4.js

js zinkbakken.dk collected 2026-09-26 07:50:03 UTC 5,465 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[75014],{5014:(t,e,i)=>{i.r(e),i.d(e,{default:()=>n});var r=i(3266),s=i(4049),o=i(9610);class n extends window.PluginBaseClass{init(){let t=this.options;this._newsletterfield=s.Z.querySelector(this.el,t.newsletterInputSelector,!1),this._additionals=s.Z.querySelectorAll(this.el,t.newsletterAdditionalsSelector,!1),this._newsletterfield&&this._additionals&&(r.Z.iterate(this._additionals,e=>{e.classList.add(t.hiddenClass)}),this._initAccessibilityTweaks("hide"),this._registerEvents())}_registerEvents(){let t=this.options;this._debounceShowHideContent=o.Z.debounce(this._showHideContent.bind(this),t.scrollDebounceTime),this._newsletterfield.addEventListener("input",this._debounceShowHideContent,!1),this.$emitter.publish("onRegisterEvents")}_showHideContent(t){let e=this.options,i=t.target.value.length;this._additionals&&r.Z.iterate(this._additionals,t=>{t.classList.toggle(e.hiddenClass,i<=0)}),this._initAccessibilityTweaks(i<=0?"hide":"show"),this.$emitter.publish("onShowHideContent")}_initAccessibilityTweaks(t){let e=this.options,i=[];this._additionals&&r.Z.iterate(this._additionals,t=>{let r=s.Z.querySelectorAll(t,e.selectableElementsSelector,!1);r&&r.length&&i.push(...r)}),r.Z.iterate(i,e=>{e.setAttribute("tabindex","hide"===t?"-1":"0")})}}n.options={newsletterInputSelector:"#zen-footer-form-newsletter-email",newsletterAdditionalsSelector:".footer-column-newsletter-additional",selectableElementsSelector:"a, input, button",hiddenClass:"js-hidden",scrollDebounceTime:500}},9610:(t,e,i)=>{i.d(e,{Z:()=>r});class r{static debounce(t,e){let i,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var s=arguments.length,o=Array(s),n=0;n<s;n++)o[n]=arguments[n];r&&!i&&setTimeout(t.bind(t,...o),0),clearTimeout(i),i=setTimeout(t.bind(t,...o),e)}}}},4049:(t,e,i)=>{i.d(e,{Z:()=>s});var r=i(5140);class s{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!s.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!1===s.hasAttribute(t,e))throw Error('The required property "'.concat(e,'" does not exist!'));if("function"!=typeof t.getAttribute){if(i)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],o=e.replace(/^data(|-)/,""),n=r.Z.toLowerCamelCase(o,"-");if(!s.isNode(t)){if(i)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(i)throw Error("This node doesn't support the dataset attribute!");return}let a=t.dataset[n];if(void 0===a){if(i)throw Error('The required data attribute "'.concat(e,'" does not exist on ').concat(t,"!"));return a}return r.Z.parsePrimitive(a)}static querySelector(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!s.isNode(t))throw Error("The parent node is not a valid HTML Node!");let r=t.querySelector(e)||!1;if(i&&!1===r)throw Error('The required element "'.concat(e,'" does not exist in parent node!'));return r}static querySelectorAll(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!s.isNode(t))throw Error("The parent node is not a valid HTML Node!");let r=t.querySelectorAll(e);if(0===r.length&&(r=!1),i&&!1===r)throw Error('At least one item of "'.concat(e,'" must exist in parent node!'));return r}static getFocusableElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return t.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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(t)[0]}static getLastFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=this.getFocusableElements(t);return e[e.length-1]}}},3266:(t,e,i)=>{i.d(e,{Z:()=>r});class r{static iterate(t,e){if(t instanceof Map||Array.isArray(t))return t.forEach(e);if(t instanceof FormData){for(var i of t.entries())e(i[1],i[0]);return}if(t instanceof NodeList)return t.forEach(e);if(t instanceof HTMLCollection)return Array.from(t).forEach(e);if(t instanceof Object)return Object.keys(t).forEach(i=>
1{e(t[i],i)});throw Error("The element type ".concat(typeof t," is not iterable!"))}}},5140:(t,e,i)=>{i.d(e,{Z:()=>r});class r{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let i=r.toUpperCamelCase(t,e);return r.lcFirst(i)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>r.ucFirst(t.toLowerCase())).join(""):r.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.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.