1theme.productImageRotation=(function(){const selectors={productSlideshow:".product-slideshow",productThumbs:".product__thumbs--scroller",productThumbItem:".product__thumb-item",productThumb:".product__thumb"};let rotationTimer=null,currentIndex=0,thumbItems=[],isPlaying=!1,slideCount=0;function changeSlideViaThumb(index){if(thumbItems[index]){const thumbLink=thumbItems[index].querySelector(selectors.productThumb);thumbLink&&thumbLink.click()}}function rotateToNextSlide(){currentIndex=(currentIndex+1)%slideCount,changeSlideViaThumb(currentIndex)}function startRotation(){isPlaying||(isPlaying=!0,rotationTimer=setInterval(rotateToNextSlide,1e3))}function stopRotation(){isPlaying&&(isPlaying=!1,clearInterval(rotationTimer),rotationTimer=null)}function setupEventListeners(){const slideshow=document.querySelector(selectors.productSlideshow),thumbsContainer=document.querySelector(selectors.productThumbs);slideshow&&(slideshow.addEventListener("mouseenter",stopRotation),slideshow.addEventListener("click",stopRotation)),thumbsContainer&&(thumbsContainer.addEventListener("mouseenter",stopRotation),thumbsContainer.addEventListener("click",stopRotation));const productSection=document.querySelector(".product-section");productSection&&productSection.addEventListener("mouseleave",function(event){productSection.contains(event.relatedTarget)||startRotation()}),document.addEventListener("visibilitychange",function(){document.hidden?stopRotation():startRotation()})}function init(){thumbItems=document.querySelectorAll(selectors.productThumbItem),slideCount=thumbItems.length,!(slideCount<=1)&&(setupEventListeners(),setTimeout(function(){startRotation()},1e3))}return{init,start:startRotation,stop:stopRotation}})(),document.addEventListener("DOMContentLoaded",function(){setTimeout(function(){theme.productImageRotation.init()},1e3)}); 2//# sourceMappingURL=/cdn/shop/t/4/assets/product-image-rotation.js.map?v=164500298359089122641768704987
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.