1class ProductCardSwatches{constructor(){this.init()}init(){this.initializeSwatchCounters(),window.addEventListener("resize",this.initializeSwatchCounters.bind(this))}initializeSwatchCounters(){document.querySelectorAll(".product-form-swatch__variants").forEach(container=>{const swatches=container.querySelectorAll(".swatch"),counter=container.querySelector(".swatch-counter");if(!swatches.length||!counter)return;const containerWidth=container.offsetWidth,swatchWidth=swatches[0].offsetWidth,gap=5,swatchesPerRow=Math.floor((containerWidth+gap)/(swatchWidth+gap));if(swatches.length>swatchesPerRow){const visibleSwatches=swatchesPerRow-1,hiddenCount=swatches.length-visibleSwatches;counter.style.display="flex",counter.querySelector(".counter-number").textContent=hiddenCount,swatches.forEach((swatch,index)=>{index>=visibleSwatches?swatch.style.display="none":swatch.style.display="block"})}else counter.style.display="none",swatches.forEach(swatch=>{swatch.style.display="block"})})}}document.addEventListener("DOMContentLoaded",()=>{new ProductCardSwatches}),document.addEventListener("shopify:section:load",()=>{new ProductCardSwatches}); 2//# sourceMappingURL=/cdn/shop/t/40/assets/component-product-card-swatches.js.map?v=67880589270793641201784082715
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.