PageSourceSearch

https://phoenix-dx.com/hubfs/hub_generated/module_assets/1/3608094…/module_featured-case-studies.min.js

js phoenix-dx.com collected 2026-09-25 18:32:28 UTC 3,735 bytes, 2 lines download raw bytes

1var module_360809498074=void function(){"use strict";function initSlider(el){var track=el.querySelector(".dx-fcs__track"),prevBtn=el.querySelector(".dx-fcs__nav-btn--prev"),nextBtn=el.querySelector(".dx-fcs__nav-btn--next"),dotsWrap=el.querySelector(".dx-fcs__dots"),wrapper=el.querySelector(".dx-fcs__wrapper");if(track){var cards=Array.prototype.slice.call(track.querySelectorAll(".dx-fcs__slide"));if(0!==cards.length){var perView,maxIndex,resizeTimer,autoplay="true"===el.getAttribute("data-autoplay"),autoplaySpeed=parseInt(el.getAttribute("data-autoplay-speed"),10)||4e3,loop="true"===el.getAttribute("data-loop"),currentIndex=0,autoplayTimer=null,touchStartX=0;el.addEventListener("touchstart",function(e){touchStartX=e.changedTouches[0].clientX},{passive:!0}),el.addEventListener("touchend",function(e){var diff=touchStartX-e.changedTouches[0].clientX;Math.abs(diff)>40&&goTo(diff>0?currentIndex+1:currentIndex-1)},{passive:!0}),el.setAttribute("tabindex","0"),el.addEventListener("keydown",function(e){"ArrowLeft"===e.key&&(e.preventDefault(),goTo(currentIndex-1)),"ArrowRight"===e.key&&(e.preventDefault(),goTo(currentIndex+1))}),prevBtn&&prevBtn.addEventListener("click",function(){goTo(currentIndex-1)}),nextBtn&&nextBtn.addEventListener("click",function(){goTo(currentIndex+1)}),autoplay&&(el.addEventListener("mouseenter",stopAutoplay),el.addEventListener("mouseleave",startAutoplay),el.addEventListener("focusin",stopAutoplay),el.addEventListener("focusout",startAutoplay)),window.addEventListener("resize",function(){clearTimeout(resizeTimer),resizeTimer=setTimeout(refresh,150)}),refresh(),autoplay&&startAutoplay()}}function startAutoplay(){autoplay&&(stopAutoplay(),autoplayTimer=setInterval(function(){goTo(currentIndex>=maxIndex?0:currentIndex+1)},autoplaySpeed))}function stopAutoplay(){autoplayTimer&&(clearInterval(autoplayTimer),autoplayTimer=null)}function slide(animate){var raw,cardWidth=cards[0].offsetWidth,gap=(raw=window.getComputedStyle(track).columnGap)?parseFloat(raw):24,offset=currentIndex*(cardWidth+gap);!1===animate?(track.style.transition="none",track.style.transform="translateX(-"+offset+"px)",track.offsetWidth,track.style.transition=""):track.style.transform="translateX(-"+offset+"px)",prevBtn&&(prevBtn.disabled=!loop&&currentIndex<=0),nextBtn&&(nextBtn.disabled=!loop&&currentIndex>=maxIndex),dotsWrap&&dotsWrap.querySelectorAll(".dx-fcs__dot").forEach(function(dot,i){var active=i===currentIndex;dot.classList.toggle("is-active",active),dot.setAttribute("aria-selected",active?"true":"false")})}function goTo(index){loop&&(index<0?index=maxIndex:index>maxIndex&&(index=0)),currentIndex=Math.max(0,Math.min(index,maxIndex)),slide(!0),autoplay&&startAutoplay()}function refresh(){var wrapperWidth=wrapper?wrapper.offsetWidth:window.innerWidth;perView=function(wrapperWidth){return wrapperWidth<=1024?1:2}(wrapperWidth),maxIndex=Math.max(0,cards.length-perView),currentIndex=Math.min(currentIndex,maxIndex),function(){if(dotsWrap){dotsWrap.innerHTML="";var dotCount=maxIndex+1;if(dotCount<=1)dotsWrap.hidden=!0;else{dotsWrap.hidden=!1;for(var i=0;i<dotCount;i++){var dot=document.createElement("button");dot.type="button",dot.className="dx-fcs__dot"+(i===currentIndex?" is-active":""),dot.setAttribute("aria-label","Go to slide "+(i+1)),dot.setAttribute("role","tab"),dot.setAttribute("aria-selected",i===currentIndex?"true":"false"),function(idx){dot.addEventListener("click",function(){goTo(idx)})}(i),dotsWrap.appendChild(dot)}}}}(),slide(!1)}}document.querySelectorAll(".dx-fcs").forEach(function(el){initSlider(el)})}();
2//# sourceURL=https://7803079.fs1.hubspotusercontent-ap1.net/hubfs/7803079/hub_generated/module_assets/1/360809498074/1785696830295/module_featured-case-studies.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.