1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[912],{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!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(t,e){return!1!==e.clone&&e.isMergeableObject(t)?l(Array.isArray(t)?[]:{},t,e):t}function s(t,e,i){return t.concat(e).map(function(t){return r(t,i)})}function n(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 l(t,i,a){(a=a||{}).arrayMerge=a.arrayMerge||s,a.isMergeableObject=a.isMergeableObject||e,a.cloneUnlessOtherwiseSpecified=r;var c,h,u=Array.isArray(i);return u!==Array.isArray(t)?r(i,a):u?a.arrayMerge(t,i,a):(h={},(c=a).isMergeableObject(t)&&n(t).forEach(function(e){h[e]=r(t[e],c)}),n(i).forEach(function(e){(!o(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(o(t,e)&&c.isMergeableObject(i[e])?h[e]=(function(t,e){if(!e.customMerge)return l;var i=e.customMerge(t);return"function"==typeof i?i:l})(e,c)(t[e],i[e],c):h[e]=r(i[e],c))}),h)}l.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,i){return l(t,i,e)},{})},t.exports=l},49:(t,e,i)=>{i.d(e,{Z:()=>s});var r=i(140);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],n=e.replace(/^data(|-)/,""),o=r.Z.toLowerCamelCase(n,"-");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 l=t.dataset[o];if(void 0===l){if(i)throw Error('The required data attribute "'.concat(e,'" does not exist on ').concat(t,"!"));return l}return r.Z.parsePrimitive(l)}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]}}},830:(t,e,i)=>{i.d(e,{Z:()=>r});class r{publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new CustomEvent(t,{detail:e,cancelable:i});return this.el.dispatchEvent(r),r}subscribe(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this,s=t.split("."),n=i.scope?e.bind(i.scope):e;if(i.once&&!0===i.once){let e=n;n=function(i){r.unsubscribe(t),e(i)}}return this.el.addEventListener(s[0],n),this.listeners.push({splitEventName:s,opts:i,cb:n}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,i)=>([...i.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):t.push(i),t),[]),!0}
1reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}}},266:(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=>{e(t[i],i)});throw Error("The element type ".concat(typeof t," is not iterable!"))}}},140:(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()}}}},568:(t,e,i)=>{i.d(e,{Z:()=>a});var r=i(857),s=i.n(r),n=i(49),o=i(140),l=i(830);class a{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=o.Z.toDashCase(this._pluginName),i=n.Z.getDataAttribute(this.el,"data-".concat(e,"-config"),!1),r=n.Z.getAttribute(this.el,"data-".concat(e,"-options"),!1),l=[this.constructor.options,this.options,t];i&&l.push(window.PluginConfigManager.get(this._pluginName,i));try{r&&l.push(JSON.parse(r))}catch(t){throw console.error(this.el),Error('The data attribute "data-'.concat(e,'-options" could not be parsed to json: ').concat(t.message))}return s().all(l.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}constructor(t,e={},i=!1){if(!n.Z.isNode(t))throw Error("There is no valid element given.");this.el=t,this.$emitter=new l.Z(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}}},304:(t,e,i)=>{i.d(e,{Z:()=>n});var r=i(568),s=i(49);class n extends r.Z{_init(){super._init(),this._validateMethods();let t=s.Z.querySelector(document,this.options.parentFilterPanelSelector);this.listing=window.PluginManager.getPluginInstanceFromElement(t,"Listing"),this.listing.registerFilter(this),this._preventDropdownClose()}_preventDropdownClose(){let t=s.Z.querySelector(this.el,this.options.dropdownSelector,!1);t&&t.addEventListener("click",t=>{t.stopPropagation()})}_validateMethods(){if("function"!=typeof this.getValues)throw Error("[".concat(this._pluginName,'] Needs the method "getValues"\''));if("function"!=typeof this.getLabels)throw Error("[".concat(this._pluginName,'] Needs the method "getLabels"\''));if("function"!=typeof this.reset)throw Error("[".concat(this._pluginName,'] Needs the method "reset"\''));if("function"!=typeof this.resetAll)throw Error("[".concat(this._pluginName,'] Needs the method "resetAll"\''))}}n.options={parentFilterPanelSelector:".cms-element-product-listing-wrapper",dropdownSelector:".filter-panel-item-dropdown"}},400:(t,e,i)=>{i.d(e,{Z:()=>a});var r=i(49),s=i(266),n=i(304),o=i(857),l=i.n(o);class a extends n.Z{init(){this.selection=[],this.counter=r.Z.querySelector(this.el,this.options.countSelector),this.mainFilterButton=r.Z.querySelector(this.el,this.options.mainFilterButtonSelector,!1),this._registerEvents()}_registerEvents(){let t=r.Z.querySelectorAll(this.el,this.options.checkboxSelector);s.Z.iterate(t,t=>{t.addEventListener("change",this._onChangeFilter.bind(this))})}getValues(){let t=r.Z.querySelectorAll(this.el,"".concat(this.options.checkboxSelector,":checked"),!1),e=[];t?s.Z.iterate(t,t=>{e.push(t.id)}):e=[],this.selection=e,this._updateCount();let i={};return i[this.options.name]=e,i}getLabels(){let t=r.Z.querySelectorAll(this.el,"".concat(this.options.checkboxSelector,":checked"),!1),e=[];return t?s.Z.iterate(t,t=>{e.push({label:t.dataset.label,id:t.id})}):e=[],e}setValuesFromUrl(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=!1,i=t[this.options.name],s=i?i.split("|"):[],n=this.selection.filter(t=>!s.includes(t)),o=s.filter(t=>!this.selection.includes(t));return(n.length>0||o.length>0)&&(e=!0),o.forEach(t=>{let e=r.Z.querySelector(this.el,'[id="'.concat(t,'"]'),!1);e&&(e.checked=!0,this.selection.push(e.id))}
1),n.forEach(t=>{this.reset(t),this.selection=this.selection.filter(e=>e!==t)}),this._updateCount(),e}_onChangeFilter(){this.listing.changeListing(!0,{p:1})}reset(t){let e=r.Z.querySelector(this.el,'[id="'.concat(t,'"]'),!1);e&&(e.checked=!1)}resetAll(){this.selection.filter=[];let t=r.Z.querySelectorAll(this.el,"".concat(this.options.checkboxSelector,":checked"),!1);t&&s.Z.iterate(t,t=>{t.checked=!1})}refreshDisabledState(t){let e=t[this.options.name];if(!e.entities||e.entities.length<1){this.disableFilter();return}this.enableFilter(),this._disableInactiveFilterOptions(e.entities.map(t=>t.id))}_disableInactiveFilterOptions(t){let e=r.Z.querySelectorAll(this.el,this.options.checkboxSelector);s.Z.iterate(e,e=>{!0!==e.checked&&(t.includes(e.id)?this.enableOption(e):this.disableOption(e))})}disableOption(t){let e=t.closest(this.options.listItemSelector);e.classList.add("disabled"),e.setAttribute("title",this.options.snippets.disabledFilterText),t.disabled=!0}enableOption(t){let e=t.closest(this.options.listItemSelector);e.removeAttribute("title"),e.classList.remove("disabled"),t.disabled=!1}enableAllOptions(){let t=r.Z.querySelectorAll(this.el,this.options.checkboxSelector);s.Z.iterate(t,t=>{this.enableOption(t)})}disableFilter(){let t=r.Z.querySelector(this.el,this.options.mainFilterButtonSelector);t.classList.add("disabled"),t.setAttribute("disabled","disabled"),t.setAttribute("title",this.options.snippets.disabledFilterText)}enableFilter(){let t=r.Z.querySelector(this.el,this.options.mainFilterButtonSelector);t.classList.remove("disabled"),t.removeAttribute("disabled"),t.removeAttribute("title")}_updateCount(){this.counter.textContent=this.selection.length?"(".concat(this.selection.length,")"):"",this._updateAriaLabel()}_updateAriaLabel(){if(this.options.snippets.ariaLabel){if(0===this.selection.length){this.mainFilterButton.setAttribute("aria-label",this.options.snippets.ariaLabel);return}this.mainFilterButton.setAttribute("aria-label","".concat(this.options.snippets.ariaLabel," (").concat(this.options.snippets.ariaLabelCount.replace("%count%",this.selection.length.toString()),")"))}}}a.options=l()(n.Z.options,{checkboxSelector:".filter-multi-select-checkbox",countSelector:".filter-multi-select-count",listItemSelector:".filter-multi-select-list-item",snippets:{disabledFilterText:"Filter not active",ariaLabel:"",ariaLabelCount:""},mainFilterButtonSelector:".filter-panel-item-toggle"})},739:(t,e,i)=>{i.d(e,{Z:()=>a});var r=i(304),s=i(568),n=i(49),o=i(857),l=i.n(o);class a extends r.Z{_init(){s.Z.prototype._init.call(this),this._validateMethods();let t=this.el.closest(this.options.tableContainerSelector);t||(t=n.Z.querySelector(document,this.options.tableContainerSelector));let e=t.querySelector(this.options.parentFilterPanelSelector);this.listing=window.PluginManager.getPluginInstanceFromElement(e,"MaxiaVariantsTable"),this.listing.registerFilter(this),this._preventDropdownClose()}}a.options=l()(r.Z.options,{tableContainerSelector:".maxia-variants-table-container",parentFilterPanelSelector:".maxia-variants-table",dropdownSelector:".filter-panel-item-dropdown"})},912:(t,e,i)=>{i.r(e),i.d(e,{default:()=>h});var r=i(400),s=i(266),n=i(49),o=i(857),l=i.n(o);class a extends r.Z{getLabels(){let t=n.Z.querySelectorAll(this.el,"".concat(this.options.checkboxSelector,":checked"),!1),e=[];return t?s.Z.iterate(t,t=>{e.push({label:t.dataset.label,id:t.id,previewHex:t.dataset.previewHex,previewImageUrl:t.dataset.previewImageUrl})}):e=[],e}refreshDisabledState(t){if(""===this.options.propertyName)return;let e=[],i=t[this.options.name].entities;if(!i){this.disableFilter();return}let r=i.find(t=>t.translated.name===this.options.propertyName);if(r)e.push(...r.options);else{this.disableFilter();return}let s=this.getValues();if(e.length<1&&0===s.properties.length){this.disableFilter();return}this.enableFilter(),s.properties.length>0||this._disableInactiveFilterOptions(e.map(t=>t.id))}}a.options=l()(r.Z.options,{propertyName:""});var c=i(739);class h extends a{_init(){c.Z.prototype._init.call(this)}}h.options=l()(a.options,c.Z.options)}}]);
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.