1class t{constructor(t){this.rootEl=t;const e=t.dataset.date;this.targetDate=new Date(e),this.days=t.querySelector(".countdown__days span"),this.hours=t.querySelector(".countdown__hours span"),this.minutes=t.querySelector(".countdown__minutes span"),this.seconds=t.querySelector(".countdown__seconds span"),isNaN(this.targetDate)||setInterval(this.updateCountdown.bind(this),1e3)}updateCountdown(){const t=new Date,e=this.targetDate-t;if(e<=0)return this.days.innerText="00",this.hours.innerText="00",this.minutes.innerText="00",void(this.seconds.innerText="00");const n=Math.floor(e/864e5),s=Math.floor(e%864e5/36e5),o=Math.floor(e%36e5/6e4),r=Math.floor(e%6e4/1e3);this.days.innerText=String(n).padStart(2,"0"),this.hours.innerText=String(s).padStart(2,"0"),this.minutes.innerText=String(o).padStart(2,"0"),this.seconds.innerText=String(r).padStart(2,"0"),this.rootEl.classList.add("active")}}document.querySelectorAll(".countdown").forEach((e=>new t(e)));export{t as Countdown};
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.