{"version":3,"sources":["webpack:///./src/framework/model/time-span.ts"],"names":["TimeSpan","totalMilliseconds","_classCallCheck","this","key","get","totalSeconds","totalMinutes","totalHours","Math","floor","totalDays","value","num","label","round"],"mappings":"o5BAAA,IAGqBA,EAAQ,WAU5B,SAAAA,EAAYC,I,4FAA2BC,CAAA,KAAAF,GATvC,KAGAC,uBAAiB,EAOhBE,KAAKF,kBAAoBA,E,UA8FzB,O,EA3FDD,G,EAAA,EAAAI,IAAA,eAAAC,IAGA,WACC,OAAOF,KAAKF,kBAAoB,MAGjC,CAAAG,IAAA,eAAAC,IAGA,WACC,OAAOF,KAAKG,aAAe,KAG5B,CAAAF,IAAA,aAAAC,IAGA,WACC,OAAOF,KAAKI,aAAe,KAG5B,CAAAH,IAAA,YAAAC,IAGA,WACC,OAAOF,KAAKK,WAAa,KAG1B,CAAAJ,IAAA,eAAAC,IAGA,WACC,OAAOI,KAAKC,MAAMP,KAAKF,kBAAoB,OAG5C,CAAAG,IAAA,UAAAC,IAGA,WACC,OAAOI,KAAKC,MAAMP,KAAKG,aAAe,MAGvC,CAAAF,IAAA,UAAAC,IAGA,WACC,OAAOI,KAAKC,MAAMP,KAAKI,aAAe,MAGvC,CAAAH,IAAA,QAAAC,IAGA,WACC,OAAOI,KAAKC,MAAMP,KAAKK,WAAa,MAGrC,CAAAJ,IAAA,OAAAC,IAGA,WACC,OAAOI,KAAKC,MAAMP,KAAKQ,aAGxB,CAAAP,IAAA,UAAAQ,MAGA,WACC,OAAOT,KAAKF,oBAGb,CAAAG,IAAA,WAAAQ,MAGA,WACC,IAAIC,EACAC,EAeJ,OAbIX,KAAKK,WAAa,GACrBK,EAAMJ,KAAKM,MAAMZ,KAAKI,cACtBO,EAAQ,UAEAX,KAAKQ,UAAY,GACzBE,EAAMJ,KAAKM,MAAwB,IAAlBZ,KAAKK,YAAoB,IAC1CM,EAAQ,SAGRD,EAAMJ,KAAKM,MAAuB,IAAjBZ,KAAKQ,WAAmB,IACzCG,EAAQ,OAGM,IAARD,EAAYA,EAAM,IAAMC,EAAQD,EAAM,IAAMC,EAAQ,S,8EAC3Dd,EAzG2B","file":"168.0951d16f31672f2ec72f.js","sourcesContent":["/**\r\n * Represents a time interval.\r\n */\r\nexport default class TimeSpan {\r\n\t/**\r\n\t * The total number of milliseconds that the TimeSpan represents\r\n\t */\r\n\ttotalMilliseconds: number;\r\n\r\n\t/**\r\n\t * Creates a TimeSpan instance that represents a time interval.\r\n\t * @param totalMilliseconds The total number of milliseconds that the TimeSpan represents\r\n\t */\r\n\tconstructor(totalMilliseconds: number) {\r\n\t\tthis.totalMilliseconds = totalMilliseconds;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the value of the TimeSpan expressed in whole and fractional milliseconds.\r\n\t */\r\n\tget totalSeconds(): number {\r\n\t\treturn this.totalMilliseconds / 1000;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the value of the TimeSpan expressed in whole and fractional seconds.\r\n\t */\r\n\tget totalMinutes(): number {\r\n\t\treturn this.totalSeconds / 60;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the value of the TimeSpan expressed in whole and fractional minutes.\r\n\t */\r\n\tget totalHours(): number {\r\n\t\treturn this.totalMinutes / 60;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the time interval in seconds\r\n\t */\r\n\tget totalDays(): number {\r\n\t\treturn this.totalHours / 24;\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the milliseconds component of the time interval represented by the TimeSpan.\r\n\t */\r\n\tget milliseconds(): number {\r\n\t\treturn Math.floor(this.totalMilliseconds % 1000);\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the seconds component of the time interval represented by the TimeSpan.\r\n\t */\r\n\tget seconds(): number {\r\n\t\treturn Math.floor(this.totalSeconds % 60);\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the minutes component of the time interval represented by the TimeSpan.\r\n\t */\r\n\tget minutes(): number {\r\n\t\treturn Math.floor(this.totalMinutes % 60);\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the hours component of the time interval represented by the TimeSpan.\r\n\t */\r\n\tget hours(): number {\r\n\t\treturn Math.floor(this.totalHours % 24);\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the days component of the time interval represented by the TimeSpan.\r\n\t */\r\n\tget days(): number {\r\n\t\treturn Math.floor(this.totalDays);\r\n\t}\r\n\r\n\t/**\r\n\t * Converts the timespan to it's millisecond value\r\n\t */\r\n\tvalueOf() {\r\n\t\treturn this.totalMilliseconds;\r\n\t}\r\n\r\n\t/**\r\n\t * Converts the TimeSpan to a friendly string representation\r\n\t */\r\n\ttoString() {\r\n\t\tlet num: number;\r\n\t\tlet label: string;\r\n\r\n\t\tif (this.totalHours < 1) {\r\n\t\t\tnum = Math.round(this.totalMinutes);\r\n\t\t\tlabel = 'minute';\r\n\t\t}\r\n\t\telse if (this.totalDays < 1) {\r\n\t\t\tnum = Math.round(this.totalHours * 100) / 100;\r\n\t\t\tlabel = 'hour';\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnum = Math.round(this.totalDays * 100) / 100;\r\n\t\t\tlabel = 'day';\r\n\t\t}\r\n\r\n\t\treturn num === 1 ? num + ' ' + label : num + ' ' + label + 's';\r\n\t}\r\n}\r\n"],"sourceRoot":""}