text: !function(){"use strict";var a=function(a){function b(a,b){var c;b=b||{};for(c in a)b.hasOwnProperty(c)||(b[c]=a[c]);return b}function c(b){var c=this;return+b||s.duration?(b*=1e3,q&&"started"===s.status?this:(s.duration=b=0===s.duration?b:s.duration,q=setTimeout(function(){f.call(c)},b),s.start=+new Date,a.ontick!==p.ontick&&(r=setInterval(function(){o("ontick",c,[h()])},1e3*+a.tick)),s.status="started",o("onstart",this),this)):f.call(c)}function d(){return n(!0),s.status="stopped",o("onstop",this),this}function e(){return s.duration=s.duration-(+new Date-s.start),n(!1),s.status="paused",o("onpause",this),this}function f(){return n(!0),s.status="finished",o("onend",this),this}function g(){return s.status}function h(){return"started"===s.status?Math.round((s.duration-(+new Date-s.start))/1e3):0}function i(b,c){return"string"==typeof b&&"function"==typeof c?(0!==b.indexOf("on")&&(b="on"+b),a.hasOwnProperty(b)&&(a[b]=c),this):void 0}function j(b){return"string"==typeof b?(b=b.toLowerCase(),"all"===b?a=p:(0!==b.indexOf("on")&&(b="on"+b),a.hasOwnProperty(b)&&(a[b]=p[b])),this):void 0}function k(c){return a=b(a,c),this}function l(a){return a?(s.measures[a]=+new Date,this):"No label passed"}function m(a){return a?+new Date-s.measures[a]:"No label passed"}function n(a){clearTimeout(q),clearInterval(r),a&&(s.duration=0)}function o(b,c,d){a[b].apply(c,d)}var p={tick:1,onstart:function(){},onstop:function(){},onpause:function(){},onend:function(){},ontick:function(){}};a=b(p,a);var q,r,s={id:+new Date,duration:0,status:"initialized",start:0,measures:[]};return{start:c,stop:d,pause:e,on:i,off:j,options:k,getStatus:g,getDuration:h,measureStart:l,measureStop:m}},b=this;"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=a),exports.Timer=a):("function"==typeof define&&define.amd&&define("Timer",[],function(){return a}),b.Timer=a)}.call(this);