"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;nn?t:(Array(n+1).join("0")+t).substr(-n)}},{key:"update",value:function(t){return this.options.date="object"!=typeof t?new Date(t):t,this.render(),this}},{key:"stop",value:function(){return this.interval&&(clearInterval(this.interval),this.interval=!1),this}},{key:"render",value:function(){return this.options.render(this.getDiffDate()),this}},{key:"start",value:function(){var t=this;return!this.interval&&(this.render(),this.options.refresh&&(this.interval=setInterval(function(){t.render()},this.options.refresh)),this)}},{key:"updateOffset",value:function(t){return this.options.offset=t,this}},{key:"restart",value:function(t){var e=0