1window.TeslaCloud=window.TeslaCloud||{}; 2((p,q)=>{TeslaCloud.DateInterval=function(a,d=!1){this.years=Number((null==a?void 0:a.years)||0);this.months=Number((null==a?void 0:a.months)||0);this.days=Number((null==a?void 0:a.days)||0);this.hours=Number((null==a?void 0:a.hours)||0);this.minutes=Number((null==a?void 0:a.minutes)||0);this.seconds=Number((null==a?void 0:a.seconds)||0);this.invert=!!d;this.isZero=()=>0===this.years+this.months+this.days+this.hours+this.minutes+this.seconds};TeslaCloud.Time={ALL:63,SECONDS:1,MINUTES:2,HOURS:4,DAYS:8, 3MONTHS:16,YEARS:32,NO_ZEROS:2048,NO_FIRST_ZEROS:4096,FORMAT_STR:"{years_phrased} {months_phrased} {days_phrased} {hours_phrased} {minutes_phrased} {seconds_phrased}",timeToObject(a,d=this.ALL){const h=new TeslaCloud.DateInterval({},0>a);a=Math.abs(a);d&this.YEARS&&(h.years=Math.floor(a/31536E3),a%=31536E3);d&this.MONTHS&&(h.months=Math.floor(a/2592E3),a%=2592E3);d&this.DAYS&&(h.days=Math.floor(a/86400),a%=86400);d&this.HOURS&&(h.hours=Math.floor(a/3600),a%=3600);d&this.MINUTES&&(h.minutes=Math.floor(a/ 460),a%=60);d&this.SECONDS&&(h.seconds=Math.floor(a));return h},timeToString(a,d=this.FORMAT_STR,h=this.ALL|this.NO_FIRST_ZEROS){let b=null,e={};b=a instanceof TeslaCloud.DateInterval?a:this.timeToObject(a,h);a=()=>!(h&this.NO_ZEROS)&&!(h&this.NO_FIRST_ZEROS&&!Object.keys(e).length);if(b.years||a())e.years=b.years,e.years_phrased=XF.phrase("tc_clib_time_x_years",{"{years}":b.years},XF.phrase("tc_clib_time_x_years_fallback",{"{years}":b.years}));if(b.months||a())e.months=b.months,e.months_phrased=XF.phrase("tc_clib_time_x_months", 5{"{months}":b.months},XF.phrase("tc_clib_time_x_months_fallback",{"{months}":b.months}));if(b.days||a())e.days=b.days,e.days_phrased=XF.phrase("tc_clib_time_x_days",{"{days}":b.days},XF.phrase("tc_clib_time_x_days_fallback",{"{days}":b.days}));if(b.hours||a())e.hours=b.hours,e.hours_phrased=XF.phrase("tc_clib_time_x_hours",{"{hours}":b.hours},XF.phrase("tc_clib_time_x_hours_fallback",{"{hours}":b.hours}));if(b.minutes||a())e.minutes=b.minutes,e.minutes_phrased=XF.phrase("tc_clib_time_x_minutes",{"{minutes}":b.minutes}, 6XF.phrase("tc_clib_time_x_minutes_fallback",{"{minutes}":b.minutes}));e.seconds=b.seconds;e.seconds_phrased=XF.phrase("tc_clib_time_x_seconds",{"{seconds}":b.seconds},XF.phrase("tc_clib_time_x_seconds_fallback",{"{seconds}":b.seconds}));e=XF.extendObject({},{years:0,years_phrased:"",months:0,months_phrased:"",days:0,days_phrased:"",hours:0,hours_phrased:"",minutes:0,minutes_phrased:"",seconds:0,seconds_phrased:""},e);return d.replaceAll(/\{([a-z0-9_-]+)}/ig,(m,c)=>e.hasOwnProperty(c)?e[c]:m).replaceAll(/\s+/g, 7" ").trim()},diff(a,d,h=!1){const b=(c,f,l,g,k,n)=>{g[k]<c&&(g[n]-=c/l+1,g[k]+=l*c/l,g[k]+=l);g[k]>=f&&(g[n]+=g[k]/l,g[k]-=l*g[k]/l)};a=new Date(a);d=new Date(d);let e=!1;Math.floor(a.getTime()/1E3)>Math.floor(d.getTime()/1E3)&&(e=!0,[a,d]=[d,a]);const m=new TeslaCloud.DateInterval({years:d.getUTCFullYear()-a.getUTCFullYear(),months:d.getUTCMonth()-a.getUTCMonth(),days:d.getUTCDate()-a.getUTCDate(),hours:d.getUTCHours()-a.getUTCHours(),minutes:d.getUTCMinutes()-a.getUTCMinutes(),seconds:d.getUTCSeconds()- 8a.getUTCSeconds()},e);((c,f)=>{b(0,60,60,f,"seconds","minutes");b(0,60,60,f,"minutes","hours");b(0,24,24,f,"hours","days");b(0,12,12,f,"months","years");c={month:c.getUTCMonth()+1,year:c.getUTCFullYear()};b(1,13,12,c,"month","year");if(f.invert)for(;0>f.days;)f.days+=(new Date(c.year,c.month,0)).getDate(),f.months--,c.month++,12<c.month&&(c.month-=12,c.year++);else for(;0>f.days;)c.month--,1>c.month&&(c.month+=12,c.year--),f.days+=(new Date(c.year,c.month,0)).getDate(),f.months--;b(0,12,12,f,"months", 9"years")})(e?a:d,m);h&&(m.invert=!1);return m}};TeslaCloud.Countdown=XF.Element.newHandler({options:{to:null,format:TeslaCloud.Time.FORMAT_STR,formatNegative:null,allowNegative:!0,endText:""},to:null,interval:null,init(){const a=this.options;if(!a.to)throw Error("Countdown time not specified.");/^\d+$/.test(a.to)?this.to=1E3*a.to:this.to=Date.parse(a.to);a.formatNegative||(this.options.formatNegative=XF.phrase("tc_clib_x_ago",{"{time}":TeslaCloud.Time.FORMAT_STR}));a.endText||(this.options.endText= 10this.target.innerHTML);this.interval=setInterval(this.tick.bind(this),1E3)},tick(){const a=TeslaCloud.Time.diff(Date.now(),this.to);this.options.allowNegative||!a.isZero()&&!a.invert?this.target.innerHTML=TeslaCloud.Time.timeToString(a,this.options[a.invert?"formatNegative":"format"],TeslaCloud.Time.NO_FIRST_ZEROS):(clearInterval(this.interval),this.target.innerHTML=this.options.endText);XF.activate(this.target)}});XF.Element.register("tc-countdown","TeslaCloud.Countdown")})(window,document);
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.