1(function(){const countdownTimers=new WeakMap;function initCountDownForElement(countdown){if(!countdown||countdownTimers.has(countdown))return;const countdownAttr=countdown.dataset.countdown;if(!countdownAttr)return;const countDownDate=new Date(countdownAttr).getTime();if(isNaN(countDownDate))return;const day=window.countdown&&window.countdown.day?window.countdown.day:"d";function updateCountdown(){const now=Date.now(),distance=countDownDate-now;if(distance<0){clearInterval(timer),countdownTimers.delete(countdown),countdown.parentNode&&countdown.remove();return}const d=Math.floor(distance/(1e3*60*60*24)),h=Math.floor(distance%(1e3*60*60*24)/(1e3*60*60)),m=Math.floor(distance%(1e3*60*60)/(1e3*60)),s=Math.floor(distance%(1e3*60)/1e3);if(countdown.classList.contains("product-countdown")){const bar=countdown.querySelector(".product-countdown-bar");bar&&(bar.innerHTML=` 2 <span class="product-countdown-num"><span>${d}</span></span> 3 <span class="divider">:</span> 4 <span class="product-countdown-num"><span>${h}</span></span> 5 <span class="divider">:</span> 6 <span class="product-countdown-num"><span>${m}</span></span> 7 <span class="divider">:</span> 8 <span class="product-countdown-num"><span>${s}</span></span> 9 `)}else countdown.innerHTML=` 10 <span class="num">${d}<span>${day}</span></span> 11 <span class="num">${h}<span class="icon">:</span></span> 12 <span class="num">${m}<span class="icon">:</span></span> 13 <span class="num">${s}</span> 14 `;countdown.classList.add("is_show")}updateCountdown();const timer=setInterval(updateCountdown,1e3);countdownTimers.set(countdown,timer)}function destroyCountDownForElement(countdown){const timer=countdownTimers.get(countdown);timer&&(clearInterval(timer),countdownTimers.delete(countdown))}function initializeCountdownsInScope(scope){const countdowns=(scope||document).querySelectorAll(".card__countdown [data-countdown-id]");countdowns.length>0&&countdowns.forEach(initCountDownForElement)}document.addEventListener("DOMContentLoaded",()=>{initializeCountdownsInScope(document),new MutationObserver(mutationsList=>{mutationsList.forEach(mutation=>{mutation.addedNodes&&mutation.addedNodes.forEach(node=>{if(node.nodeType===1){node.matches&&node.matches(".card__countdown [data-countdown-id]")&&initCountDownForElement(node);const foundCountdowns=node.querySelectorAll&&node.querySelectorAll(".card__countdown [data-countdown-id]");foundCountdowns&&foundCountdowns.length>0&&foundCountdowns.forEach(initCountDownForElement)}}),mutation.removedNodes&&mutation.removedNodes.forEach(node=>{if(node.nodeType===1){node.matches&&node.matches(".card__countdown [data-countdown-id]")&&destroyCountDownForElement(node);const foundCountdowns=node.querySelectorAll&&node.querySelectorAll(".card__countdown [data-countdown-id]");foundCountdowns&&foundCountdowns.length>0&&foundCountdowns.forEach(destroyCountDownForElement)}})})}).observe(document.body,{childList:!0,subtree:!0})})})(); 15//# sourceMappingURL=/cdn/shop/t/41/assets/countdown.js.map?v=50308607292380154501785495674
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.