const sectionContainer=document.querySelector("div.carousel-sections");let currentIndex=0;let slides=[];let dots=[];function render(){let offset=0;slides.forEach(((slide,index)=>{if(index{index===currentIndex?dot.classList.add("active"):dot.classList.remove("active")}))}function goto(newIndex){if(newIndex<0||newIndex>slides.length-1)return;currentIndex=newIndex;render()}function init(){slides=document.querySelectorAll("div.carousel-sections > div");const newDots=document.querySelectorAll("div.carousel-dots > div");newDots.forEach(((dot,index)=>{dot.onclick=()=>goto(index)}));dots=newDots;render()}init();function changeDatacenterLocation(event){const{target:target}=event;const{datacenterLocation:datacenterLocation}=target.dataset;if(datacenterLocation){const buttons=document.querySelectorAll("button[data-datacenter-location]");if(buttons.length){buttons.forEach((item=>{if(item){item.classList.remove("current")}}))}target.classList.add("current");ui.populateLocationUI(datacenterLocation)}}