(function(){"use strict";u8.Base.Time=function(e,s,t,n){if(!(this instanceof u8.Base.Time)){if(u8.tools.isInstanceOfClass(arguments[0],u8.Base._Time)){return e}if(arguments.length<1){return new u8.Base.Time}if(arguments.length==2){return new u8.Base.Time(arguments[0],arguments[1])}if(arguments.length==3){return new u8.Base.Time(arguments[0],arguments[1],arguments[2])}if(arguments.length>=4){return new u8.Base.Time(arguments[0],arguments[1],arguments[2],arguments[3])}return new u8.Base.Time(arguments[0])}if(arguments.length==1&&typeof e=="object"){var u=e||{};this.hours=u.hours||0;this.minutes=u.minutes||0;this.seconds=u.seconds||0;this.millis=u.millis||0}else{this.hours=e||0;this.minutes=s||0;this.seconds=t||0;this.millis=n||0}};$.extend(u8.Base.Time.prototype,{getHours:function(){return this.hours},getMinutes:function(){return this.minutes},getSeconds:function(){return this.seconds},getMilliseconds:function(){return this.millis},getTotalMilliseconds:function(){return(this.hours||0)*60*60*1e3+(this.minutes||0)*60*1e3+(this.seconds||0)*1e3+(this.millis||0)}});u8.Base._Time=u8.Base.Time;$.extend(u8.Base.Time,{toMinutes:function(e){if(!e){return 0}return(e.hours||0)*60+(e.minutes||0)+(e.seconds||0)/60+(e.millis||0)/6e4},fromMinutes:function(e){return new u8.Base.Time(Math.floor(e/60),e%60)},fromHHMM:function(e){return!e?new u8.Base.Time:new u8.Base.Time(parseInt(e.substr(0,2),10),parseInt(e.substr(2),10))},fromHHMMSS:function(e){return!e?new u8.Base.Time:new u8.Base.Time(parseInt(e.substr(0,2),10),parseInt(e.substr(2,2),10),parseInt(e.substr(4),10))},fromHHMMSSTTT:function(e){return!e?new u8.Base.Time:new u8.Base.Time(parseInt(e.substr(0,2),10),parseInt(e.substr(2,2),10),parseInt(e.substr(4,2),10),parseInt(e.substr(6,3),10))}})})();