1var module_70553339085=void document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".quotation-slider").forEach(slider=>{const quoteList=slider.querySelector(".quotation-slider__list"),quotes=quoteList.querySelectorAll("li");if(!quotes.length)return;let quoteWidth=quotes[0].offsetWidth;const gap=parseInt(getComputedStyle(quoteList).gap)||0,quoteSliderFooter=slider.nextElementSibling,prevQuoteButton=quoteSliderFooter.querySelector(".--previous"),nextQuoteButton=quoteSliderFooter.querySelector(".quotation-slider__button:not(.--previous)");let isDragging=!1,startX=0,endX=0,scrollLeft=0;function updateButtons(){const maxScrollLeft=quoteList.scrollWidth-quoteList.clientWidth;prevQuoteButton.disabled=quoteList.scrollLeft<=0,nextQuoteButton.disabled=Math.ceil(quoteList.scrollLeft)+1>=maxScrollLeft,prevQuoteButton.classList.toggle("--inactive",quoteList.scrollLeft<=0),nextQuoteButton.classList.toggle("--inactive",Math.ceil(quoteList.scrollLeft)+1>=maxScrollLeft)}function moveSlider(direction){const scrollAmount=quoteWidth+gap,smallScreen=window.innerWidth<1200,paddingLeft=parseInt(getComputedStyle(quoteList).paddingLeft)||0;let newScrollLeft=quoteList.scrollLeft+direction*scrollAmount;newScrollLeft=smallScreen&&direction>0?Math.round((newScrollLeft-paddingLeft)/scrollAmount)*scrollAmount:Math.ceil((newScrollLeft-paddingLeft/10)/scrollAmount)*scrollAmount,newScrollLeft=Math.max(0,Math.min(newScrollLeft,quoteList.scrollWidth-quoteList.clientWidth)),quoteList.scrollTo({left:newScrollLeft,behavior:"smooth"})}quoteList.addEventListener("mousedown",e=>{isDragging=!0,startX=e.pageX,scrollLeft=quoteList.scrollLeft}),quoteList.addEventListener("mousemove",e=>{isDragging&&(e.preventDefault(),endX=e.pageX)}),quoteList.addEventListener("mouseup",()=>{if(!isDragging)return;isDragging=!1,quoteList.style.cursor="pointer";const difference=startX-endX;difference>10?moveSlider(1):difference<-10&&moveSlider(-1)}),quoteList.addEventListener("mouseleave",()=>{isDragging=!1,quoteList.style.cursor="pointer"}),prevQuoteButton.addEventListener("click",()=>moveSlider(-1)),nextQuoteButton.addEventListener("click",()=>moveSlider(1)),quoteList.addEventListener("scroll",updateButtons),window.addEventListener("resize",()=>{const newQuoteWidth=quotes[0].offsetWidth;newQuoteWidth!==quoteWidth&&(quoteWidth=newQuoteWidth,updateButtons())}),updateButtons()})}); 2//# sourceURL=https://26609264.fs1.hubspotusercontent-eu1.net/hubfs/26609264/hub_generated/module_assets/1/70553339085/1788344022534/module_quotation-slider.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.