(()=>{"use strict";var t,n;t=jQuery,window.RTSB&&window.RTSB._initialized&&(null===(n=window.RTSB.modules.registerAfterElementor("generalCountdown",function(){var n=(window.RTSB||{}).helpers;return{name:"generalCountdown",version:"1.0.0",init:function(){return this.run(),this},refresh:function(){this.run()},run:function(){n.rAF(function(){return function(t){var n=t(".rtsbcd1"),r=t(".rtsbcd2");(n.length||r.length)&&(n.length&&n.each(function(n,r){var e=parseInt(t(r).data("deadline-date-time")),s={textContent:"00"},o={textContent:"00",r:{baseVal:{value:95}}},a=t(r).find(".rtsb-day .rtsb-countdown-count").get(0)||s,i=t(r).find(".rtsb-hr .rtsb-countdown-count").get(0)||s,d=t(r).find(".rtsb-min .rtsb-countdown-count").get(0)||s,b=t(r).find(".rtsb-sec .rtsb-countdown-count").get(0)||s,l=t(r).find(".rtsb-day .rtsbCircleTrackUp").get(0)||o,u=t(r).find(".rtsb-hr .rtsbCircleTrackUp").get(0)||o,c=t(r).find(".rtsb-min .rtsbCircleTrackUp").get(0)||o,f=t(r).find(".rtsb-sec .rtsbCircleTrackUp").get(0)||o,h=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,s=Date.now(),o=Math.round((e-s)/1e3);if(o<0)return clearInterval(n),void[a,i,d,b].forEach(function(t){return t.textContent="00"});var h=Math.floor(o/86400),w=Math.floor(o%86400/3600),g=Math.floor(o%3600/60),m=o%60;if(a.textContent=h.toString().padStart(2,"0"),i.textContent=w.toString().padStart(2,"0"),d.textContent=g.toString().padStart(2,"0"),b.textContent=m.toString().padStart(2,"0"),t(r).hasClass("rtsb-countdown-circle")){var v=h,x=w,y=g,S=m,p=[l.r.baseVal.value,u.r.baseVal.value,c.r.baseVal.value,f.r.baseVal.value],C=p[0],M=p[1],k=p[2],I=p[3],D=function(t,n,r){return 2*r*Math.PI-t/n*(2*r*Math.PI)};l.style.strokeDasharray=2*C*Math.PI,l.style.strokeDashoffset=D(v,365,C),u.style.strokeDasharray=2*M*Math.PI,u.style.strokeDashoffset=D(x,24,M),c.style.strokeDasharray=2*k*Math.PI,c.style.strokeDashoffset=D(y,60,k),f.style.strokeDasharray=2*I*Math.PI,f.style.strokeDashoffset=D(S,60,I)}};h();var w=setInterval(function(){return h(w)},1e3)}),r.length&&r.each(function(){var n=t(this),r=parseInt(n.attr("data-deadline-date-time")),e=t("<span>").text("0"),s=n.find(".rtsb-countdown-item.rtsb-day .rtsb-d1").length?n.find(".rtsb-countdown-item.rtsb-day .rtsb-d1"):e,o=n.find(".rtsb-countdown-item.rtsb-day .rtsb-d2").length?n.find(".rtsb-countdown-item.rtsb-day .rtsb-d2"):e,a=n.find(".rtsb-countdown-item.rtsb-day .rtsb-d3").length?n.find(".rtsb-countdown-item.rtsb-day .rtsb-d3"):e,i=n.find(".rtsb-countdown-item.rtsb-hr .rtsb-h1").length?n.find(".rtsb-countdown-item.rtsb-hr .rtsb-h1"):e,d=n.find(".rtsb-countdown-item.rtsb-hr .rtsb-h2").length?n.find(".rtsb-countdown-item.rtsb-hr .rtsb-h2"):e,b=n.find(".rtsb-countdown-item.rtsb-min .rtsb-m1").length?n.find(".rtsb-countdown-item.rtsb-min .rtsb-m1"):e,l=n.find(".rtsb-countdown-item.rtsb-min .rtsb-m2").length?n.find(".rtsb-countdown-item.rtsb-min .rtsb-m2"):e,u=n.find(".rtsb-countdown-item.rtsb-sec .rtsb-s1").length?n.find(".rtsb-countdown-item.rtsb-sec .rtsb-s1"):e,c=n.find(".rtsb-countdown-item.rtsb-sec .rtsb-s2").length?n.find(".rtsb-countdown-item.rtsb-sec .rtsb-s2"):e,f=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=Date.now(),e=Math.round((t-r)/1e3);if(e<0)return clearInterval(n),s.text("0"),o.text("0"),a.text("0"),i.text("0"),d.text("0"),b.text("0"),l.text("0"),u.text("0"),void c.text("0");var f=(e%60).toString().padStart(2,"0").split(""),h=(Math.floor(e/60)%60).toString().padStart(2,"0").split(""),w=(Math.floor(e/3600)%24).toString().padStart(2,"0").split(""),g=Math.floor(e/86400).toString();s.text(g[0]),o.text(g[1]),a.text(g[2]),i.text(w[0]),d.text(w[1]),b.text(h[0]),l.text(h[1]),u.text(f[0]),c.text(f[1])};f(r||0);var h=setInterval(function(){f(r||0,h)},1e3)}))}(t)})}}}))||void 0===n||n.init())})();