1customElements.get("variant-selects")||customElements.define("variant-selects",class extends HTMLElement{constructor(){super()}get selectedOptionValues(){return Array.from(this.querySelectorAll("select option[selected], fieldset input:checked")).map(({dataset})=>dataset.optionValueId)}getInputForEventTarget(target){return target.tagName==="SELECT"?target.selectedOptions[0]:target}connectedCallback(){this.addEventListener("change",event=>{const target=this.getInputForEventTarget(event.target);this.updateSelectedSwatchValue(event),FoxTheme.pubsub.publish(FoxTheme.pubsub.PUB_SUB_EVENTS.optionValueSelectionChange,{data:{event,target,selectedOptionValues:this.selectedOptionValues}})})}updateSelectedSwatchValue({target}){const{value,tagName}=target;if(tagName==="SELECT"&&target.selectedOptions.length){Array.from(target.options).find(option=>option.getAttribute("selected")).removeAttribute("selected"),target.selectedOptions[0].setAttribute("selected","selected");const swatchValue=target.selectedOptions[0].dataset.optionSwatchValue,selectedDropdownSwatchValue=target.closest(".product-form__input").querySelector("[data-selected-value] > .swatch");if(!selectedDropdownSwatchValue)return;swatchValue?(selectedDropdownSwatchValue.style.setProperty("--swatch--background",swatchValue),selectedDropdownSwatchValue.classList.remove("swatch--unavailable")):(selectedDropdownSwatchValue.style.setProperty("--swatch--background","unset"),selectedDropdownSwatchValue.classList.add("swatch--unavailable")),selectedDropdownSwatchValue.style.setProperty("--swatch-focal-point",target.selectedOptions[0].dataset.optionSwatchFocalPoint||"unset")}else if(tagName==="INPUT"&&target.type==="radio"){const selectedSwatchValue=target.closest(".product-form__input").querySelector("[data-selected-value]");selectedSwatchValue&&(selectedSwatchValue.innerHTML=value)}}}); 2//# sourceMappingURL=/cdn/shop/t/722/assets/variant-selects.js.map?v=158734623530860397441789995314
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.