PageSourceSearch

https://medroots.com/cdn/shop/t/4/assets/product-slider.js?v=139718644975439675191731813104

js medroots.com collected 2026-10-09 18:23:40 UTC 3,090 bytes, 2 lines download raw bytes

1customElements.get("product-slider")||customElements.define("product-slider",class extends HTMLElement{constructor(){super()}connectedCallback(){if(this.selectors={productsWrap:".products-grid-wrap",products:".products-grid"},this.classes={grid:"f-grid",swiper:"swiper",swiperWrapper:"swiper-wrapper"},this.sectionId=this.dataset.sectionId,this.elements=FoxTheme.utils.queryDomNodes(this.selectors,this),this.elements.section=this.closest(`.section-${this.sectionId}`),this.enableSlider=this.dataset.enableSlider==="true",this.items=parseInt(this.dataset.items),this.tabletItems=parseInt(this.dataset.tabletItems),this.sliderInstance=!1,!this.enableSlider||!this.elements.productsWrap||!this.elements.products)return;const mql=window.matchMedia(FoxTheme.config.mediaQueryMobile);mql.onchange=this.init.bind(this),this.init()}init(){FoxTheme.config.mqlMobile?this.destroySlider():this.initSlider()}initSlider(){if(typeof this.sliderInstance=="object")return;this.calcNavButtonsPosition();const columnGap=window.getComputedStyle(this.elements.products).getPropertyValue("--column-gap"),spaceBetween=parseFloat(columnGap.replace("rem",""))*10;this.sliderOptions={slidesPerView:this.tabletItems>3?3:parseInt(this.tabletItems),spaceBetween,navigation:{nextEl:this.elements.section.querySelector(".swiper-button-next"),prevEl:this.elements.section.querySelector(".swiper-button-prev")},breakpoints:{1280:{slidesPerView:parseInt(this.items)}},loop:!0,threshold:2},this.elements.productsWrap.classList.add(this.classes.swiper),this.elements.products.classList.remove(this.classes.grid),this.elements.products.classList.add(this.classes.swiperWrapper),this.sliderInstance=new window.FoxTheme.Carousel(this.elements.productsWrap,this.sliderOptions),this.sliderInstance.init(),this.handleAccessibility(),this.fixQuickviewDuplicate()}handleAccessibility(){FoxTheme.a11y.getFocusableElements(this).forEach(element=>{element.addEventListener("focusin",event=>{if(event.relatedTarget!==null){if(element.closest(".swiper-slide")){const slide=element.closest(".swiper-slide");this.sliderInstance.slider.slideTo(this.sliderInstance.slider.slides.indexOf(slide))}}else element.blur()})})}destroySlider(){this.elements.productsWrap.classList.remove(this.classes.swiper),this.elements.products.classList.remove(this.classes.swiperWrapper),this.elements.products.classList.add(this.classes.grid),typeof this.sliderInstance=="object"&&(this.sliderInstance.slider.destroy(),this.sliderInstance=!1)}calcNavButtonsPosition(){if(!this.dataset.calcButtonPosition==="true")return;const firstMedia=this.querySelector(".product-card__image-wrapper");firstMedia&&firstMedia.clientHeight>0&&this.elements.section.style.setProperty("--swiper-navigation-top-offset",parseInt(firstMedia.clientHeight)/2+"px")}fixQuickviewDuplicate(){let modalIds=[];Array.from(this.querySelectorAll("quick-view-modal")).forEach(modal=>{const modalID=modal.getAttribute("id");modalIds.includes(modalID)?modal.remove():modalIds.push(modalID)})}});
2//# sourceMappingURL=/cdn/shop/t/4/assets/product-slider.js.map?v=139718644975439675191731813104

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.