PageSourceSearch

https://www.wellvation.com/hubfs/hub_generated/template_assets/1/8…/1785256385646/template_swipe-track.min.js

js wellvation.com collected 2026-10-06 00:57:30 UTC 2,537 bytes, 2 lines download raw bytes

1!function(){function swipeTrackNavHandler(e){if(e.target.dataset.swipeTrackNav){const swipeTrackTrack=this.querySelector(".swipe-track__track"),swipeTrackItems=this.querySelectorAll(".swipe-track__item"),direction=parseInt(e.target.dataset.swipeTrackNav),xScroll=swipeTrackItems[0].offsetWidth*direction;swipeTrackTrack.scrollBy({left:xScroll,behavior:"smooth"})}}function buildThresholdList(){let thresholds=[];for(let i=1;i<=20;i++){let ratio=i/20;thresholds.push(ratio)}return thresholds.push(0),thresholds}function handleswipeTrackIntersect(entries,observer){entries.forEach(entry=>{entry.intersectionRatio<.25?entry.target.style.opacity=.25:window.requestAnimationFrame(()=>{entry.target.style.opacity=entry.intersectionRatio}),prevRatio=entry.intersectionRatio})}document.querySelectorAll(".swipe-track").forEach(swipeTrack=>{const swipeTrackTrack=swipeTrack.querySelector(".swipe-track__track"),swipeTrackItems=Array.from(swipeTrackTrack.children),swipeTrackProgress=swipeTrack.querySelector("progress"),swipeTrackNavPrev=swipeTrack.querySelector(['[data-swipe-track-nav="-1"]']),swipeTrackNavNext=swipeTrack.querySelector(['[data-swipe-track-nav="1"]']),totalWidth=swipeTrackTrack.scrollWidth,trackWidth=swipeTrackTrack.clientWidth;swipeTrackTrack.addEventListener("wheel",function(e){if(Math.abs(e.deltaX)<Math.abs(e.deltaY))return;const scrollLeftMax=this.scrollWidth-this.offsetWidth;(this.scrollLeft+e.deltaX<0||this.scrollLeft+e.deltaX>scrollLeftMax)&&e.preventDefault()},!1),swipeTrackItems.forEach(swipeTrackItem=>{!function(root,el){let observer,options={root:root,rootMargin:"0px",threshold:buildThresholdList()};observer=new IntersectionObserver(handleswipeTrackIntersect,options),observer.observe(el)}(swipeTrackTrack,swipeTrackItem)}),(swipeTrackNavPrev||swipeTrackNavPrev)&&swipeTrack.addEventListener("click",swipeTrackNavHandler),(swipeTrackNavNext||swipeTrackNavPrev||swipeTrackProgress)&&swipeTrackTrack.addEventListener("scroll",function(e){window.requestAnimationFrame(()=>{const scrollXPercent=e.target.scrollLeft/(totalWidth-trackWidth)*100;swipeTrackProgress&&(swipeTrackProgress.value=scrollXPercent),0===scrollXPercent?swipeTrackNavPrev.setAttribute("disabled",""):swipeTrackNavPrev.removeAttribute("disabled"),100===scrollXPercent?swipeTrackNavNext.setAttribute("disabled",""):swipeTrackNavNext.removeAttribute("disabled")})},{passive:!0})})}();
2//# sourceURL=https://22025758.fs1.hubspotusercontent-na2.net/hubfs/22025758/hub_generated/template_assets/1/89298640490/1785256385646/template_swipe-track.js

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.