var UtilClass = function () { }; UtilClass.prototype.spliceOne = function (a, b) { var c = a.length; if (c) { for (; c > b;) a[b] = a[b + 1], b++; a.length-- } }, UtilClass.prototype.roundRect = function (a, b, c, d, e, f, g, h) { "undefined" == typeof h && (h = !0), "undefined" == typeof f && (f = 5), a.beginPath(), a.moveTo(b + f, c), a.lineTo(b + d - f, c), a.quadraticCurveTo(b + d, c, b + d, c + f), a.lineTo(b + d, c + e - f), a.quadraticCurveTo(b + d, c + e, b + d - f, c + e), a.lineTo(b + f, c + e), a.quadraticCurveTo(b, c + e, b, c + e - f), a.lineTo(b, c + f), a.quadraticCurveTo(b, c, b + f, c), a.closePath(), h && a.stroke(), g && a.fill() }, UtilClass.prototype.dtWithMillis = function (a, b) { var c = a, d = ""; return c.indexOf("AM") > -1 ? (d = " AM", c = c.slice(0, -3)) : a.indexOf("PM") > -1 && (d = " PM", c = c.slice(0, -3)), c = c + "." + b + d }, UtilClass.prototype.epochTimestamp = function () { var a = new Date; return a.getTime() }, UtilClass.prototype.timestamp = function () { var a = new Date; return a.getSeconds() + 60 * a.getMinutes() + 3600 * a.getHours() }, UtilClass.prototype.timestampMin = function () { var a = new Date; return 60 * a.getHours() + a.getMinutes() }, UtilClass.prototype.timestampMinNext = function () { var a = this.timestampMin() + 1; return a >= 1440 && (a = 0), a }, UtilClass.prototype.nextTimestamp = function () { var a = this.timestamp() + 1; return a >= 86400 && (a = 0), a }, UtilClass.prototype.padMS = function (a, b) { var c = "000" + a; return c.substr(c.length - b) }, UtilClass.prototype.miles2Meters = function (a) { return 1609.344 * a }, UtilClass.prototype.km2Mi = function (a) { return .000621371192 * 1e3 * a }, UtilClass.prototype.mi2Km = function (a) { return this.miles2Meters(a) / 1e3 }, UtilClass.prototype.meters2Miles = function (a) { return .000621371192 * a }, UtilClass.prototype.ms2minutes = function (a) { return a / 6e4 }, UtilClass.prototype.min2millis = function (a) { return 6e4 * a }, UtilClass.prototype.endsWith = function (a, b) { return -1 !== a.indexOf(b, a.length - b.length) };