PageSourceSearch

https://eyeonballinc.com/cdn/shop/t/22/assets/lite-gallery.js?v=54388531658050298541790983232

js eyeonballinc.com collected 2026-10-08 20:25:33 UTC 4,581 bytes, 2 lines download raw bytes

1customElements.get("lite-gallery")||(function($){var $=jQuery=$;class LiteGallery extends HTMLElement{constructor(){super(),this.sectionId=this.dataset.section,this.dataset.block&&(this.sectionId=`${this.dataset.section}${this.dataset.block}`);let galleryOptions=JSON.parse(this.querySelector('[type="application/json"]').textContent);this.productGallery=this.querySelector(`.product-single__gallery-${this.sectionId}`);const productVariants=document.getElementById(`VariantSelect-${this.sectionId}`);let options,currentVariant,mediaId=null;productVariants&&(options=productVariants.productData?productVariants.productData.options:null,currentVariant=productVariants.currentVariant,currentVariant&&currentVariant.featured_media&&(mediaId=`${this.sectionId}-${currentVariant.featured_media.id}`)),galleryOptions||(galleryOptions={optionsGallery:{slidesToShow:1,slidesToScroll:1,arrows:!1,fade:!0},galleryNav:!1,optionsNav:{slidesToShow:3,slidesToScroll:1,centerMode:!0,centerPadding:"0px",focusOnSelect:!0,arrows:!1,draggable:!1,swipe:!1,vertical:!1}}),this.initBreakpoints(),this.productGallery&&(this.initGallerySlider(galleryOptions),this.setActiveMedia(mediaId,options,currentVariant))}initBreakpoints(){enquire.register("screen and (min-width: 1280px)",{match:()=>{this.bpSmall=!1},unmatch:()=>{this.bpSmall=!0}}),enquire.register("screen and (min-width: 1001px)",{match:()=>{this.blockSlide3DModel=!0}})}camelize(str){return str.replace(/\W+(.)/g,function(match,chr){return chr.toUpperCase()})}setActiveMedia(mediaId,productOptions,currentVariant){const $slickGallery=$(`.product-single__gallery-${this.sectionId}`);let slideIndex=0,colorValue;if(productOptions&&currentVariant){const productSwatchesArray=this.dataset.productSwatches.split(",");productOptions.forEach((option,i)=>{const optionName=option.toLowerCase().trim();productSwatchesArray.find(value=>value.trim()===optionName)&&(colorValue=currentVariant.options[i])})}mediaId&&(slideIndex=this.productGallery.querySelector(`[data-media-id="${mediaId}"]`).dataset.slickIndex),$slickGallery.slick("slickGoTo",slideIndex,!0);const activeMedia=this.productGallery.querySelector(`[data-slick-index="${$slickGallery.slick("slickCurrentSlide")}"]`);this.playActiveMedia(activeMedia)}playActiveMedia(activeItem){if(window.pauseAllMedia(this),activeItem){const video=activeItem.querySelector("video");video&&video.play();const deferredMedia=activeItem.querySelector(".deferred-media:not(product-model)");if(deferredMedia&&deferredMedia.dataset.preventAutoplay)return;deferredMedia&&deferredMedia.loadContent&&deferredMedia.loadContent(!1)}}initGallerySlider(options){const self=this,$productGallery=$(`.product-single__gallery-${this.sectionId}`),optionsGallery=options.optionsGallery;let $galleryNav,optionsNav;if(options.galleryNav&&(optionsNav=options.optionsNav,$galleryNav=$(`.product-single__thumbnails-${this.sectionId}`),$galleryNav.length>0&&(optionsGallery.asNavFor=`.product-single__thumbnails-${this.sectionId}`,optionsNav.asNavFor=`.product-single__gallery-${this.sectionId}`)),$productGallery.on("init",function(event,slick){self.blockSlide3DModel===!0&&$productGallery.find(".slick-current .product-media-modal__model").length&&slick.slickSetOption("swipe",!1)}),$productGallery.slick(optionsGallery),$galleryNav.length>0){$galleryNav.slick(optionsNav);const $thumnailsItem=$galleryNav.find(".product-single__thumbnails-item");$thumnailsItem.length<4&&$galleryNav.addClass("nav-set-translation"),$thumnailsItem.each(function(index,elem){elem.classList.remove("product-single__thumbnails--hide")})}$productGallery.on("afterChange",function(event,slick,currentSlide){const activeMedia=$productGallery.find(".slick-current");activeMedia.length&&self.playActiveMedia(activeMedia[0]),self.blockSlide3DModel===!0&&($productGallery.find(".slick-current .product-media-modal__model").length?slick.slickSetOption("swipe",!1):slick.slickGetOption("swipe")===!1&&slick.slickSetOption("swipe",!0))}),window.addEventListener("keydown",event=>{event.code==="ArrowLeft"?$productGallery.slick("slickPrev"):event.code==="ArrowRight"&&$productGallery.slick("slickNext")}),new ResizeObserver(entries=>{$galleryNav.length>0&&$galleryNav.slick("setPosition")}).observe(this),$(`.product-single__wrapper-${this.sectionId}`).find(".slick-list").removeAttr("aria-live"),$(`.product-single__wrapper-${this.sectionId}`).find(".slick-disabled").removeAttr("aria-disabled")}}customElements.define("lite-gallery",LiteGallery)})(theme.jQuery);
2//# sourceMappingURL=/cdn/shop/t/22/assets/lite-gallery.js.map?v=54388531658050298541790983232

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.