PageSourceSearch

https://isto.pt/cdn/shop/t/11/assets/z_scx-swiper.js?v=135832906251994278211782122275

js isto.pt collected 2026-09-26 01:54:38 UTC 5,655 bytes, 2 lines download raw bytes

1class ScxSwiper extends HTMLElement{constructor(){super(),this.swiperId=this.id,this.dataSelector=this.getAttribute("data-selector"),this.total=this.getAttribute("data-total");const loadingElem=this.getAttribute("data-loading-elem");this.dataTargetSelector=loadingElem,this.loadingDiv=document.querySelector(`.${loadingElem}`),this.swiperDiv=document.querySelector(`.${this.dataSelector}`),this.ignoreLazyLoading=this.shouldIgnoreLazyLoad(),this.layoutConstraint=this.getAttribute("data-layout")==="true",this.swiperInstance}shouldIgnoreLazyLoad(){let dLazy=this.getAttribute("data-lazy");return dLazy==null||dLazy===""?!0:!dLazy}connectedCallback(){this.ignoreLazyLoading?document.readyState==="complete"?this.swiperInstance=new Swiper(`.${this.dataSelector}`,this.getSwiperOptions()):window.addEventListener("load",()=>{this.swiperInstance=new Swiper(`.${this.dataSelector}`,this.getSwiperOptions())}):this.initSwiper()}initSwiper(){const initSwiperInstance=selector=>{document.querySelector(selector)&&(this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.swiperInstance=new Swiper(selector,this.getSwiperOptions()))},createObserverInstance=(targetSelector,selector)=>{const observer=new IntersectionObserver(entries=>{entries.forEach(entry=>{entry.isIntersecting&&(console.debug("Creating instance for swiper..."),initSwiperInstance(`.${selector}`),observer.unobserve(entry.target))},{rootMargin:"100px 0px 0px 0px",threshold:0})}),targetElement=document.querySelector([`.${targetSelector}`]);targetElement&&observer.observe(targetElement)};document.readyState==="complete"?createObserverInstance(this.dataTargetSelector,this.dataSelector):window.addEventListener("load",()=>{createObserverInstance(this.dataTargetSelector,this.dataSelector)}),document.addEventListener("shopify:section:load",event=>{event.detail.sectionId===this.id&&createObserverInstance(this.dataTargetSelector,this.selector)}),document.addEventListener("shopify:section:unload",event=>{event.detail.sectionId===this.id&&this.swiperInstance&&(this.swiperInstance.destroy(!0,!0),this.swiperInstance=null)})}getSwiperOptions=()=>{const slidesPerView=this.getSlidesPerView(),spaceBetween=this.getSpaceBetween(),slidesBeforeAndAfter=this.getSlidesBeforeAndAfter();return{slidesPerView:slidesPerView.mobile,spaceBetween:spaceBetween.mobile,...this.getMousewheelOptions(),...this.getNavigationOptions(),...this.getScrollbar(),...this.getPaginationOptions(),...this.getFreeModeOptions(),...this.getLoopOptions(),...this.getKeyboardOptions(),slidesOffsetAfter:slidesBeforeAndAfter.mobile.slidesOffsetAfter,slidesOffsetBefore:slidesBeforeAndAfter.mobile.slidesOffsetBefore,grabCursor:!0,breakpoints:{750:{slidesPerView:slidesPerView.tablet,spaceBetween:spaceBetween.tablet,slidesOffsetAfter:slidesBeforeAndAfter.tablet.slidesOffsetAfter,slidesOffsetBefore:slidesBeforeAndAfter.tablet.slidesOffsetBefore},990:{slidesPerView:slidesPerView.desktop,spaceBetween:spaceBetween.desktop,slidesOffsetAfter:slidesBeforeAndAfter.desktop.slidesOffsetAfter,slidesOffsetBefore:slidesBeforeAndAfter.desktop.slidesOffsetBefore}},on:{init:()=>{console.debug("Swiper Initialized."),this.loadingDiv.setAttribute("data-loaded","true"),this.swiperDiv.setAttribute("data-loading","false")}}}};getScrollbar=()=>{const elem=this.getAttribute("data-scrollbar-elem");return elem?{scrollbar:{el:elem,dragClass:"swiper-scrollbar-drag-s",hide:!1,draggable:!0}}:{}};getSpaceBetween=()=>{const mobileSpaceBetween=this.getAttribute("data-mobile-space-between")??"20px",tabletSpaceBetween=this.getAttribute("data-tablet-space-between")??"20px",desktopSpaceBetween=this.getAttribute("data-space-between")??"8px";return{mobile:mobileSpaceBetween,tablet:tabletSpaceBetween,desktop:desktopSpaceBetween}};getSlidesPerView=()=>{const mobileSlidesPerView=this.getAttribute("data-mobile-slides-per-view")??2.3,tabletSlidesPerView=this.getAttribute("data-tablet-slides-per-view")??3.7,desktopSlidesPerView=this.getAttribute("data-slides-per-view")??4.2;return{mobile:mobileSlidesPerView,tablet:tabletSlidesPerView,desktop:desktopSlidesPerView}};getNavigationOptions=()=>{const nextElem=this.getAttribute("data-navigation-btn-next"),prevElem=this.getAttribute("data-navigation-btn-prev");return nextElem&&prevElem?{navigation:{nextEl:nextElem,prevEl:prevElem}}:{}};getPaginationOptions=()=>{const mwElem=this.getAttribute("data-pagination-elem");return mwElem?{pagination:{el:mwElem,dynamicBullets:this.getAttribute("data-dynamic-bullets")=="true"}}:{}};getFreeModeOptions=()=>this.getAttribute("data-free-mode")==="true"?{freeMode:!0}:{};getLoopOptions=()=>this.getAttribute("data-loop")==="true"?{loop:!0}:{};getKeyboardOptions=()=>this.getAttribute("data-keyboard-control")==="true"?{keyboard:{enabled:!0}}:{};getMousewheelOptions=()=>this.getAttribute("data-mousewheel")==="true"?{mousewheel:{forceToAxis:!0}}:{};getSlidesBeforeAndAfter(){const breakpoints=["mobile","tablet","desktop"];
1if(this.layoutConstraint)return breakpoints.reduce((acc,bp)=>(acc[bp]={slidesOffsetBefore:0,slidesOffsetAfter:0},acc),{});const slidesPerView=this.getSlidesPerView(),defaultOffsetMob=this.remToPx(1.5),defaultOffset=this.remToPx(2);return breakpoints.reduce((acc,bp)=>{const offset=bp==="mobile"?defaultOffsetMob:defaultOffset;return acc[bp]={slidesOffsetBefore:this.total===slidesPerView[bp]?0:offset,slidesOffsetAfter:this.total===slidesPerView[bp]?0:offset},acc},{})}remToPx(rem){const rootFontSize=parseFloat(getComputedStyle(document.documentElement).fontSize);return rem*rootFontSize}}customElements.define("scx-swiper",ScxSwiper);
2//# sourceMappingURL=/cdn/shop/t/11/assets/z_scx-swiper.js.map?v=135832906251994278211782122275

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.