PageSourceSearch

https://www.cherrycollectables.com.au/cdn/shop/t/46/assets/section…?v=130716253329974072031786403706

js cherrycollectables.com.au collected 2026-10-05 18:25:27 UTC 4,109 bytes, 1 lines download raw bytes

1!function(){"use strict";const t="is-active",e="is-disabled";var s="750px",i="1100px",n="1350px",r="1650px",o="2000px";const a={XSMALL:parseInt("375px"),SMALL:parseInt(s),MEDIUM:parseInt(i),LARGE:parseInt(n),XLARGE:parseInt(r),XXLARGE:parseInt(o)};class h{currentIndex=0;scrollAmount=0;maxScrollLeft=0;isDragging=!1;startX=0;initialScrollLeft=0;dragThreshold=10;constructor(t){this.container=t,this.prevButton=t.parentElement?.querySelector("[data-carousel-previous]"),this.nextButton=t.parentElement?.querySelector("[data-carousel-next]"),this.items=t.querySelectorAll(".c-featured-collections__item"),this.init()}init(){this.container&&this.prevButton&&this.nextButton&&(this.setupEventListeners(),this.updateScrollState(),this.checkOverflow())}setupEventListeners(){this.prevButton.addEventListener("click",()=>this.scrollLeft()),this.nextButton.addEventListener("click",()=>this.scrollRight()),this.container.addEventListener("scroll",()=>this.updateScrollState()),window.addEventListener("resize",()=>this.handleResize()),this.setupDragListeners()}scrollLeft(){this.currentIndex>0&&(this.currentIndex--,this.scrollToIndex())}scrollRight(){const t=this.getMaxVisibleIndex();this.currentIndex<t&&(this.currentIndex++,this.scrollToIndex())}scrollToIndex(){const t=this.getFirstItemWidth(),e=this.getGap(),s=this.currentIndex*(t+e);this.container.scrollTo({left:s,behavior:"smooth"})}updateScrollState(){const e=this.container.scrollLeft,s=this.container.scrollWidth-this.container.clientWidth,i=e-40;this.prevButton.classList.toggle(t,i>0),this.nextButton.classList.toggle(t,e<s-1);const n=this.getFirstItemWidth(),r=this.getGap();this.currentIndex=Math.round(e/(n+r))}checkOverflow(){this.container.scrollWidth>this.container.clientWidth?(this.prevButton.classList.remove(e),this.nextButton.classList.remove(e),this.prevButton.classList.remove(t),this.nextButton.classList.add(t)):(this.prevButton.classList.add(e),this.nextButton.classList.add(e),this.prevButton.classList.remove(t),this.nextButton.classList.remove(t))}getFirstItemWidth(){const t=this.items[0];return t?t.offsetWidth:0}getGap(){const t=window.getComputedStyle(this.container).gap;return t?parseInt(t):4}getMaxVisibleIndex(){const t=this.container.clientWidth,e=this.getFirstItemWidth(),s=this.getGap(),i=Math.floor(t/(e+s));return Math.max(0,this.items.length-i)}handleResize(){clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.scrollAmount=this.getFirstItemWidth()+this.getGap(),this.maxScrollLeft=this.container.scrollWidth-this.container.clientWidth,this.checkOverflow(),this.updateScrollState()},100)}setupDragListeners(){this.container.addEventListener("mousedown",t=>this.handleDragStart(t)),this.container.addEventListener("mousemove",t=>this.handleDragMove(t)),this.container.addEventListener("mouseup",()=>this.handleDragEnd()),this.container.addEventListener("mouseleave",()=>this.handleDragEnd()),this.container.addEventListener("touchstart",t=>this.handleDragStart(t),{passive:!1}),this.container.addEventListener("touchmove",t=>this.handleDragMove(t),{passive:!1}),this.container.addEventListener("touchend",()=>this.handleDragEnd()),this.container.addEventListener("dragstart",t=>t.preventDefault())}handleDragStart(t){this.isDragging=!0,this.container.style.scrollBehavior="auto",this.container.style.cursor="grabbing";const e="touches"in t?t.touches[0].clientX:t.clientX;this.startX=e-this.container.offsetLeft,this.initialScrollLeft=this.container.scrollLeft}handleDragMove(t){if(!this.isDragging)return;t.preventDefault();const e=2*(("touches"in t?t.touches[0].clientX:t.clientX)-this.container.offsetLeft-this.startX);this.container.scrollLeft=this.initialScrollLeft-e}handleDragEnd(){this.isDragging&&(this.isDragging=!1,this.container.style.scrollBehavior="smooth",this.container.style.cursor="grab",setTimeout(()=>{this.updateScrollState()},100))}}const c=()=>{var t;(t="MEDIUM",window.innerWidth>=a[t])&&document.querySelectorAll("[data-featured-collections-carousel]").forEach(t=>{new h(t)})};let l;c(),window.addEventListener("resize",()=>{clearTimeout(l),l=setTimeout(()=>{c()},100)})}();

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.