define(["exports","./globalize.js"],function(_exports,_globalize){function getDisplayRunningTime(ticks){var parts=[],hours=ticks/36e9,minutes=((hours=Math.floor(hours))&&parts.push(hours),(ticks-=36e9*hours)/6e8),hours=(ticks-=6e8*(minutes=Math.floor(minutes)),parts.push(minutes=minutes<10&&hours?"0"+minutes:minutes),ticks/1e7),hours=Math.floor(hours);return parts.push(hours=hours<10?"0"+hours:hours),parts.join(":")}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;var toLocaleTimeStringSupportsLocales=function(){try{(new Date).toLocaleTimeString("i")}catch(e){return"RangeError"===e.name}return!1}();function toLocaleTimeString(date,options){if(!date)throw new Error("date cannot be null");if(options=options||{},toLocaleTimeStringSupportsLocales){var currentLocale=_globalize.default.getCurrentDateTimeLocale();if(currentLocale)return date.toLocaleTimeString(currentLocale,options)}return date.toLocaleTimeString()}_exports.default={parseISO8601Date:function(s){return new Date(Date.parse(s))},getDisplayRunningTime:getDisplayRunningTime,toLocaleDateString:function(date,options){if(!date)throw new Error("date cannot be null");if(options=options||{},toLocaleTimeStringSupportsLocales){var currentLocale=_globalize.default.getCurrentDateTimeLocale();if(currentLocale)return date.toLocaleDateString(currentLocale,options)}return 1===(currentLocale=function(options){var i,list=[];for(i in options)list.push({name:i,value:options[i]});return list}(options)).length&&"weekday"===currentLocale[0].name?(options=[],"long"===currentLocale[0].value?(options[0]="Sunday",options[1]="Monday",options[2]="Tuesday",options[3]="Wednesday",options[4]="Thursday",options[5]="Friday",options[6]="Saturday"):(options[0]="Sun",options[1]="Mon",options[2]="Tue",options[3]="Wed",options[4]="Thu",options[5]="Fri",options[6]="Sat"),options[date.getDay()]):date.toLocaleDateString()},toLocaleString:function(date,options){if(!date)throw new Error("date cannot be null");if(options=options||{},toLocaleTimeStringSupportsLocales){var currentLocale=_globalize.default.getCurrentDateTimeLocale();if(currentLocale)return date.toLocaleString(currentLocale,options)}return date.toLocaleString()},getDisplayTime:function(date){if(!date)throw new Error("date cannot be null");if("string"===(typeof date).toString().toLowerCase())try{date=new Date(Date.parse(date))}catch(err){return date}var time,suffix,timeLower;return toLocaleTimeStringSupportsLocales?toLocaleTimeString(date,{hour:"numeric",minute:"2-digit"}):((timeLower=(time=toLocaleTimeString(date)).toLowerCase()).includes("am")||timeLower.includes("pm")?(time=timeLower,timeLower=date.getHours()%12,suffix=11