1class StickyScroll extends window.BAO.CustomElement(){connectedCallback(){super.connectedCallback(),window.BAO.MediaBreakpoints.isMd&&(this.isTicking=!1,this.lastKnownY=window.scrollY,this.currentTop=0,this.requestTick=this.requestTick.bind(this),this.updateEl=this.updateEl.bind(this),this.updateEl())}setupListeners(){super.setupListeners(),window.BAO.MediaBreakpoints.isMd&&(this.onScroll=this.onScroll.bind(this),this.listeners.add(window,"scroll",this.onScroll),window.BAO.eventBus.addEventListener(window.BAO.EVENTS.PRODUCT.OPTION_CHANGED,this.onScroll))}onScroll(){this.requestTick()}requestTick(){this.isTicking||requestAnimationFrame(this.updateEl),this.isTicking=!0}updateEl(){this.isTicking=!1,this.setSticky()}setSticky(){if(!this.els?.content?.exists)return;const contentEl=this.els.content.element,contentHeight=contentEl.offsetHeight,viewportHeight=window.innerHeight,headerHeight=this.getHeaderHeight();if(contentHeight<=viewportHeight-headerHeight){this.classList.add("prd-Detail_Columns-defaultSticky"),contentEl.style.removeProperty("inset-block-start"),this.lastKnownY=window.scrollY;return}this.classList.remove("prd-Detail_Columns-defaultSticky");const currentY=window.scrollY,delta=currentY-this.lastKnownY;this.lastKnownY=currentY,this.currentTop-=delta;const announcementHeight=this.getAnnouncementHeight(),maxTop=headerHeight,minTop=viewportHeight-contentHeight-announcementHeight;this.currentTop=Math.min(maxTop,Math.max(minTop,this.currentTop)),contentEl.style.setProperty("inset-block-start",`${Math.round(this.currentTop)}px`)}getHeaderHeight(){const header=document.querySelector(".hd-Banner");return header?Math.max(0,header.getBoundingClientRect().bottom):0}getAnnouncementHeight(){return parseInt(getComputedStyle(document.body).getPropertyValue("--Announcement_Height_Bottom").trim(),10)||0}}customElements.get("sticky-scroll")||customElements.define("sticky-scroll",StickyScroll); 2//# sourceMappingURL=/cdn/shop/t/83/assets/sticky-scroll.js.map?v=11076575468134328101789049313
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.