PageSourceSearch

https://www.jala-helsekost.dk/theme/dbbc5e6514acac3ed5245d8f35349b…-sale.brand-listing-filter.plugin.056906.js

js jala-helsekost.dk collected 2026-10-08 02:30:27 UTC 11,926 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[28390,82562,92291,91540],{857:t=>{var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?a(Array.isArray(t)?[]:{},t,e):t}function n(t,e,r){return t.concat(e).map(function(t){return i(t,r)})}function s(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function o(t,e){try{return e in t}catch(t){return!1}}function a(t,r,l){(l=l||{}).arrayMerge=l.arrayMerge||n,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=i;var c,d,h=Array.isArray(r);return h!==Array.isArray(t)?i(r,l):h?l.arrayMerge(t,r,l):(d={},(c=l).isMergeableObject(t)&&s(t).forEach(function(e){d[e]=i(t[e],c)}),s(r).forEach(function(e){(!o(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(o(t,e)&&c.isMergeableObject(r[e])?d[e]=(function(t,e){if(!e.customMerge)return a;var r=e.customMerge(t);return"function"==typeof r?r:a})(e,c)(t[e],r[e],c):d[e]=i(r[e],c))}),d)}a.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,r){return a(t,r,e)},{})},t.exports=a},562:(t,e,r)=>{r.r(e),r.d(e,{ANCHOR_SELECTOR:()=>n,default:()=>o});var i=r(709);let n="[data-anchor-scroll]",{PluginBaseClass:s}=window;class o extends s{init(){this._registerEvents()}_registerEvents(){this.el.addEventListener("click",this._scrollToAnchor.bind(this))}_scrollToAnchor(t){t.preventDefault();let e=t.currentTarget;try{let t=this.options.anchorToSelector||e.getAttribute("href"),r=i.Z.querySelector(document,t).getBoundingClientRect().top+window.scrollY-this.options.scrollOffset;window.scrollTo({top:r,behavior:this.options.scrollBehaviour})}catch(t){console.error(t)}this.$emitter.publish("afterScrollToAnchor")}}o.options={scrollBehaviour:"smooth",scrollOffset:0,anchorToSelector:null}},99:(t,e,r)=>{r.d(e,{Z:()=>o});var i=r(709),n=r(291);let{PluginBaseClass:s}=window;class o extends s{init(){if(this._brandListing=this._getBrandListing(),!this._brandListing)throw Error("Brand listing not found")}emitEvent(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._brandListing.$emitter.publish(t,e)}subscribeEvent(t,e){this._brandListing.$emitter.subscribe(t,t=>{e(t)})}getBrandListingType(){return this._brandListing.options.brandListingType}getBrandNameSelector(){return this._brandListing.options.brandNameSelector}_getBrandListing(){try{let t=i.Z.querySelector(document,this.options.brandListingSelector);return window.PluginManager.getPluginInstanceFromElement(t,"BrandListing")}catch(t){return!1}}addFilter(t,e){return this._brandListing.addFilter(t,e)}removeFilter(t){return this._brandListing.removeFilter(t)}existsFilter(t){return this._brandListing.existsFilter(t)}}o.options={brandListingSelector:n.BRAND_LISTING_SELECTOR}},390:(t,e,r)=>{r.r(e),r.d(e,{default:()=>c});var i=r(99),n=r(709),s=r(857),o=r.n(s),a=r(562),l=r(291);class c extends i.Z{init(){super.init(),this._registerEvents(),n.Z.querySelectorAll(this.el,this.options.brandFilterCharSelector).forEach(t=>{this.options.filterSections&&t.addEventListener("click",this._filterSections.bind(this));let e=t.getAttribute(this.options.brandFilterCharAttribute);if(this.getBrandListingType()===l.BRAND_LISTING_TYPE_LOGO){let r=window.PluginManager.getPluginInstanceFromElement(t,"AnchorScroll");r&&(r.options.anchorToSelector="[".concat(this._brandListing.options.brandSectionCharAttribute,"='").concat(e,"'].show"))}this._brandListing.getBrandSection(e)||this._toggleCharNavItem(e,"hide")})}_registerEvents(){this.subscribeEvent(l.BRAND_LISTING_SECTION_TOGGLE_EVENT,t=>{this._toggleCharNavItem(t.detail.char,t.detail.type)}),this._onViewportChange(),document.$emitter.subscribe("Viewport/hasChanged",this._onViewportChange.bind(this))}_onViewportChange(){try{let t=n.Z.querySelectorAll(this.el,a.ANCHOR_SELECTOR),e=0;e=document.querySelector(this.options.brandFilterCharNavSelector).clientHeight,t.forEach(t=>{let r=window.PluginManager.getPluginInstanceFromElement(t,"AnchorScroll"),i=r.oldScrollOffset||0;r.options.scrollOffset=r.options.scrollOffset+(e-i),r.oldScrollOffset=e})}catch(t){}}_filterSections(t){t.preventDefault();let e=t.currentTarget,r=e.getAttribute(this.options.brandFilterCharAttribute),i="sections-filter-".concat(r),n=this.existsFilter(i);n?(this.removeFilter(i),e.classList.remove("selected")):this.addFilter(i,(t,e)=>{let r=[];for(let[t,e]of this._brandListing._filters)new RegExp(/sections-filter-/gm).test(t)&&r.push(t.replace("sections-filter-",""));let i=t.closest(this._brandListing.options.brandSectionSelector).getAttribute(this._brandListing.options.brandSectionCharAttribute);return r.indexOf(i)>-1}),this._removeSelectedFilter(),n||e.classList.add("selected")}_removeSelectedFilter(){document.querySelectorAll("".concat(this.options.brandFilterCharSelector,":not(.active)")).forEac
1h(t=>{t.classList.remove("selected")})}_toggleCharNavItem(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"show",r=this._getCharNavItem(t);"show"===e?r.classList.add("active"):r.classList.remove("active")}_getCharNavItem(t){return n.Z.querySelector(this.el,"[".concat(this.options.brandFilterCharAttribute,'="').concat(t,'"]'))}}c.options=o()(i.Z.options,{brandFilterCharNavSelector:"[data-brand-listing-filter-char-nav]",brandFilterCharSelector:"[data-brand-listing-filter-char]",brandFilterCharAttribute:"data-brand-listing-filter-char-letter",filterSections:!1})},540:(t,e,r)=>{r.r(e),r.d(e,{BRAND_LISTING_ITEM_SELECTOR:()=>i,default:()=>s});let i="[data-brand-listing-item]",{PluginBaseClass:n}=window;class s extends n{init(){}isLuxury(){return this.options.isLuxury}}s.options={isLuxury:!1}},291:(t,e,r)=>{r.r(e),r.d(e,{AFTER_FILTERS_CHANGED_EVENT:()=>l,AFTER_HANDLE_SECTIONS_EVENT:()=>o,BRAND_LISTING_SECTION_TOGGLE_EVENT:()=>s,BRAND_LISTING_SELECTOR:()=>h,BRAND_LISTING_TYPE_BRANDS:()=>c,BRAND_LISTING_TYPE_LOGO:()=>d,FILTER_BRANDS_AFTER_EVENT:()=>a,default:()=>b});var i=r(709),n=r(540);let s="onBrandListingSectionToggle",o="afterHandleSections",a="onFilterBrandsAfter",l="afterFiltersChanged",c="brands",d="logo",h="[data-brand-listing]",{PluginBaseClass:u}=window;class b extends u{init(){this.brandNameAttribute=this.options.brandNameSelector.substring(1,this.options.brandNameSelector.length-1),this.brandItemAttribute=this.options.brandItemSelector.substring(1,this.options.brandItemSelector.length-1),this._registerEvents(),this.getBrandSections().forEach(t=>{t.classList.add("cms-element-brand-listing__section")})}_registerEvents(){this.$emitter.subscribe(l,this._filterBrands.bind(this)),this.$emitter.subscribe(a,this._handleSections.bind(this))}getBrandNameAttribute(t){let e=this.options.brandNameSelector;return t.getAttribute(e.substring(1,e.length-1))}getBrandItems(){return i.Z.querySelectorAll(this.el,this.options.brandItemSelector,!1)}getBrandNames(){return i.Z.querySelectorAll(this.el,this.options.brandNameSelector,!1)}getBrandSection(t){return this.options.brandListingType===d?i.Z.querySelector(this.el,"[".concat(this.options.brandSectionCharAttribute,"^='").concat(t,"']"),!1):i.Z.querySelector(this.el,"[".concat(this.options.brandSectionCharAttribute,'="').concat(t,'"]'),!1)}getBrandSections(){return i.Z.querySelectorAll(this.el,this.options.brandSectionSelector,!1)}_filterBrands(){let t=this.getBrandItems();t&&(t.forEach(t=>{let e=i.Z.querySelector(t,this.options.brandNameSelector),r=!0;for(let[i,n]of this._filters){if(!1===r)break;r=!!n(t,e)}r?(e.classList.add("active"),t.classList.add("show")):(e.classList.remove("active"),t.classList.remove("show"))}),this.$emitter.publish(a))}_handleSections(){let t=this.getBrandSections();if(!t)return;let e={};for(let[r,n]of(t.forEach(t=>{let r=t.getAttribute(this.options.brandSectionCharAttribute);try{i.Z.querySelectorAll(t,".active"),t.classList.add("show"),e[r]="show"}catch(i){t.classList.remove("show"),e[r]||(e[r]="hide")}}),Object.entries(e)))this.$emitter.publish(s,{char:r,type:n});this.$emitter.publish(o)}addFilter(t,e){this._filters.set(t,e),this.$emitter.publish(l,{filter:this._filters.get(t),added:!0})}removeFilter(t){let e=this._filters.get(t);this._filters.delete(t),this.$emitter.publish(l,{filter:e,removed:!0})}existsFilter(t){return this._filters.has(t)}constructor(...t){super(...t),this._filters=new Map}}b.options={brandSectionSelector:"[data-brand-section]",brandSectionCharAttribute:"data-brand-section-char",brandNameSelector:"[data-brand-name]",brandItemSelector:n.BRAND_LISTING_ITEM_SELECTOR,brandListingType:c}},709:(t,e,r)=>{r.d(e,{Z:()=>n});class i{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 r=i.toUpperCamelCase(t,e);return i.lcFirst(r)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>i.ucFirst(t.toLowerCase())).join(""):i.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}class n{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!n.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 r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!1===n.hasAttribute(t,e))throw Error('The required property "'.concat(e,'" does not exist!'));if("function"!=typeof t.getAttribute){if(r)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=e.replace(/^data(|-)/,""),o=i.toLowerCamelCase(s,"-");if(!n.isNode(t)){if(r)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(r)throw Error("This node doesn't support the dataset attribute!");return}let a=t.dataset[o];if(void 0===a){if(r)throw Error('The required data attribute "'.concat(e,'" does not exist on ').concat(t,"!"));return a}return i.parsePrimitive(a)}static querySelector(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!n.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelector(e)||!1;if(r&&!1===i)throw Error('The required element "'.concat(e,'" does not exist in parent node!'));return i}static querySelectorAll(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!n.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelectorAll(e);if(0===i.length&&(i=!1),r&&!1===i)throw Error('At least one item of "'.concat(e,'" must exist in parent node!'));return i}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
1([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]}}}}]);

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.