https://passionforfashion.au/cdn/shop/t/51/assets/component-produc…?v=182276296792213363981756189356
1if(typeof ProductItemVariants!="function"){class ProductItemVariants2 extends HTMLElement{constructor(){super(),this.productItem=this.closest("[data-js-product-item]"),this.productVariantImages=this.querySelector("[data-js-product-variant-images]"),this.zIndex=9,setTimeout(()=>{this.productItem.classList.add("product-item--has-variants"),this.querySelectorAll("[data-js-product-variant]").forEach(elm=>{elm.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation();const variantImg=this.productVariantImages.querySelector(`template[data-media-id="${e.currentTarget.dataset.variantImage}"]`);variantImg&&(variantImg.dataset.init?this.showVariantImage(e.currentTarget.dataset.variantImage):(this.initVariantImage(variantImg),this.showVariantImage(e.currentTarget.dataset.variantImage)))})})},500),setTimeout(()=>{new IntersectionObserver((entries,observer)=>{if(entries[0].isIntersecting)this.productVariantImages.querySelectorAll("template").forEach(elm=>{elm.dataset.init||this.initVariantImage(elm)}),observer.unobserve(this);else return}).observe(this)},5e3)}initVariantImage(template){template.dataset.init=!0;const image=template.content.querySelector("div").cloneNode(!0);image.dataset.mediaId=template.dataset.mediaId,this.productItem.prepend(image)}showVariantImage(id){this.productItem.querySelector(`[data-media-id="${id}"]`).style.zIndex=++this.zIndex,setTimeout(()=>{this.productItem.querySelector(`[data-media-id="${id}"] img`).srcset=this.productItem.querySelector(`[data-media-id="${id}"] img`).srcset},10),typeof document.body.animate=="function"?this.productItem.querySelector(`[data-media-id="${id}"]`).animate([{opacity:0},{opacity:1}],{duration:200,iterations:1,fill:"forwards"}):this.productItem.querySelector(`[data-media-id="${id}"]`).style.opacity=1}}typeof customElements.get("product-item-variants")>"u"&&customElements.define("product-item-variants",ProductItemVariants2)} 2//# sourceMappingURL=/cdn/shop/t/51/assets/component-product-item-variants.js.map?v=182276296792213363981756189356
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.