1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[72110],{2110(e,t,i){i.r(t),i.d(t,{default:()=>h});var s=i(3701),o=i(4156),l=i.n(o);class h extends s.A{static #e=this.options=l()(s.A.options,{checkboxSelector:".filter-boolean-input",altTextSelector:".filter-boolean-alt-text",activeClass:"is-active",snippets:{disabledFilterText:"Filter not active",altText:"",altTextActive:""}});init(){this.checkbox=this.el.querySelector(this.options.checkboxSelector),this._altText=this.el.querySelector(this.options.altTextSelector),this._registerEvents()}_registerEvents(){this.checkbox.addEventListener("change",this._onChangeCheckbox.bind(this))}reset(e){e===this.options.name&&(this.checkbox.checked=!1)}resetAll(){this.checkbox.checked=!1}getValues(){let e={};return e[this.options.name]=this.checkbox.checked?"1":"",this._updateAltText(),e}_updateAltText(){this._altText&&(this._altText.textContent=this.checkbox.checked?this.options.snippets.altTextActive:this.options.snippets.altText)}getLabels(){let e=[];return this.checkbox.checked?e.push({label:this.options.displayName,id:this.options.name}):e=[],e}setValuesFromUrl(e){let t=!1;return Object.keys(e).forEach(i=>{i===this.options.name&&e[i]&&(this.checkbox.checked=1,t=!0)}),this._updateAltText(),t}refreshDisabledState(e){let t=e[this.options.name];t.max&&t.max>0?this.enableFilter():this.disableFilter()}enableFilter(){this.el.classList.remove("disabled"),this.el.removeAttribute("title"),this.checkbox.removeAttribute("disabled")}disableFilter(){this.el.classList.add("disabled"),this.el.setAttribute("title",this.options.snippets.disabledFilterText),this.checkbox.disabled=!0}_onChangeCheckbox(){this.listing.changeListing()}}},3701(e,t,i){i.d(t,{A:()=>o});var s=i(4335);class o extends s.A{static #e=this.options={parentFilterPanelSelector:".cms-element-product-listing-wrapper",dropdownSelector:".filter-panel-item-dropdown"};_init(){super._init(),this._validateMethods();let e=document.querySelector(this.options.parentFilterPanelSelector);this.listing=window.PluginManager.getPluginInstanceFromElement(e,"Listing"),this.listing.registerFilter(this),this._preventDropdownClose()}_preventDropdownClose(){let e=this.el.querySelector(this.options.dropdownSelector);e&&e.addEventListener("click",e=>{e.stopPropagation()})}_validateMethods(){if("function"!=typeof this.getValues)throw Error(`[${this._pluginName}] Needs the method "getValues"'`);if("function"!=typeof this.getLabels)throw Error(`[${this._pluginName}] Needs the method "getLabels"'`);if("function"!=typeof this.reset)throw Error(`[${this._pluginName}] Needs the method "reset"'`);if("function"!=typeof this.resetAll)throw Error(`[${this._pluginName}] Needs the method "resetAll"'`)}}}}]);
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.