document.addEventListener("DOMContentLoaded",()=>{const productJson=[...document.querySelectorAll("[data-product-json]")];productJson.length>0&&productJson.forEach(product=>{const sectionId="shopify-section-"+product.closest("[data-section-id]").dataset.sectionId,variantSKU=document.querySelector("#"+sectionId+" .variant-sku--custom"),inputSelects=[...document.querySelectorAll("#"+sectionId+" .form__input--select")],productInfo=JSON.parse(product.innerHTML),inputValues=[],optionValues=[];let count=0;inputSelects.forEach(input=>{inputValues.push(input.value),optionValues.push(count),input.addEventListener("change",evt=>{const currentValue=evt.currentTarget.value.toString(),changedIndex=inputSelects.indexOf(evt.target);inputValues[changedIndex]=currentValue,variantSKU.innerText=" ",productInfo.variants.forEach(variant=>{JSON.stringify(variant.options)==JSON.stringify(inputValues)&&(variantSKU.innerText=variant.sku)})}),count+=1})})});
//# sourceMappingURL=/cdn/shop/t/138/assets/variant-sku-handler.js.map?v=91239063692820757781752652418
