(function(){const stopVideo=section=>{const videos=section.querySelectorAll("video");videos&&videos.forEach(video=>{video.pause()})},playVideo=(section,width)=>{const videos=section.querySelectorAll("video"),cards=section.querySelectorAll(".gallery-with-text__card");videos&&cards&&cards.forEach(card=>{card.querySelector("video")&&(card.classList.contains("active")||width<990?card.querySelector("video").play():card.querySelector("video").pause())})},galleryTextSlide=()=>{$(".gallery-with-text__card").hover(function(){let $this=$(this);$this.addClass("active"),$this.siblings(".gallery-with-text__card").removeClass("active"),setTimeout(function(){$this.children(".gallery-with-text__info").children(".link--overlay").addClass("active"),$this.siblings(".gallery-with-text__card").children(".gallery-with-text__info").children(".link--overlay").removeClass("active")},100),playVideo($this.closest(".gallery-with-text-section")[0],document.documentElement.clientWidth)})},initSection=()=>{const sections=document.querySelectorAll(".gallery-with-text-section"),sectionObserver=new IntersectionObserver(entries=>{entries.forEach(entry=>{entry.isIntersecting?playVideo(entry.target,entry.boundingClientRect.width):stopVideo(entry.target)})}),sectionResizeObserver=new ResizeObserver(entries=>{const[entry]=entries;playVideo(entry.target,entry.contentRect.width)});sections.forEach(section=>{sectionObserver.observe(section),sectionResizeObserver.observe(section)}),galleryTextSlide()};document.addEventListener("shopify:section:load",function(){initSection()}),initSection()})(); //# sourceMappingURL=/cdn/shop/t/3/assets/gallery-with-text.js.map?v=10144198859762918671714460219