1(()=>{var t={845:t=>{self,t.exports=(()=>{"use strict";var t={};return((t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isArmadaLoaded=void 0,e.isArmadaLoaded=t=>{var e,i;const a=!0===(null===(i=null===(e=window.eight)||void 0===e?void 0:e.armada)||void 0===i?void 0:i.loaded);if(!t)return a;a?t():document.addEventListener("ARMADA:LOADED",t)},e.default=e.isArmadaLoaded})(0,t),t})()}},e={};function i(a){var n=e[a];if(void 0!==n)return n.exports;var r=e[a]={exports:{}};return t[a](r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var a in e)i.o(e,a)&&!i.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=i(845);class e extends HTMLElement{constructor(){super(),this.swatches=this.querySelectorAll('[data-name="swatch-option"] input[type="radio"]'),this.labels=this.querySelectorAll('[data-name="swatch-option"] label');["attachEvents","changeHandler"].forEach((t=>{this[t]=this[t].bind(this)}))}connectedCallback(){!this.swatches||this.swatches.length<1||!this.getAttribute("product-variants")||(0,t.isArmadaLoaded)(this.init.bind(this))}init(){this.attachEvents(),window.eight.armada.elementRegistry.register({key:"color-swatch",assetPath:"/assets/component-color-swatch.min.js"})}attachEvents(){this.swatches.forEach((t=>{t.addEventListener("click",this.changeHandler)})),this.changeOnHover&&this.labels.forEach((t=>{t.addEventListener("mouseenter",this.handleMouseenter)}))}changeHandler(t){const e=t.target.value,i=this.identifyVariant(e);window.eight.eventsEngine&&window.eight.eventsEngine.namedEvents.changeVariant(this.productId,i.id,i)}handleMouseenter(t){t.target.click()}identifyVariant(t){return 1==this.variants.length?this.variants[0]:this.variants.find((e=>0===e.options[this.optionIndex].localeCompare(t,void 0,{sensitivity:"base"})))}get optionIndex(){return!!this.getAttribute("option-index")&&this.getAttribute("option-index")}get productId(){return!!this.getAttribute("product-id")&&Number(this.getAttribute("product-id"))}get variants(){return window.eight.safeJSONParse(this.getAttribute("product-variants"))}get changeOnHover(){return"true"===this.dataset.changeOnHover}}window.customElements.define("color-swatch",e)})()})();
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.