vendor: 5,783 bytes, lines 1-105
1/*! 2 * The Final Countdown for jQuery v2.0.4 (http://hilios.github.io/jQuery.countdown/) 3 * Copyright (c) 2014 Edson Hilios 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a copy of 6 * this software and associated documentation files (the "Software"), to deal in 7 * the Software without restriction, including without limitation the rights to 8 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 * the Software, and to permit persons to whom the Software is furnished to do so, 10 * subject to the following conditions: 11 * 12 * The above copyright notice and this permission notice shall be included in all 13 * copies or substantial portions of the Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 */ 22!function (a) { 23 "use strict"; 24 "function" == typeof define && define.amd ? define(["jquery-1.12.3.min"], a) : a(jQuery) 25}(function (a) { 26 "use strict"; 27 function b(a) { 28 if (a instanceof Date)return a; 29 if (String(a).match(g))return String(a).match(/^[0-9]*$/) && (a = Number(a)), String(a).match(/\-/) && (a = String(a).replace(/\-/g, "/")), new Date(a); 30 throw new Error("Couldn't cast `" + a + "` to a date object.") 31 } 32 33 function c(a) { 34 return function (b) { 35 var c = b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi); 36 if (c)for (var e = 0, f = c.length; f > e; ++e) { 37 var g = c[e].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/), i = new RegExp(g[0]), j = g[1] || "", k = g[3] || "", l = null; 38 g = g[2], h.hasOwnProperty(g) && (l = h[g], l = Number(a[l])), null !== l && ("!" === j && (l = d(k, l)), "" === j && 10 > l && (l = "0" + l.toString()), b = b.replace(i, l.toString())) 39 } 40 return b = b.replace(/%%/, "%") 41 } 42 } 43 44 function d(a, b) { 45 var c = "s", d = ""; 46 return a && (a = a.replace(/(:|;|\s)/gi, "").split(/\,/), 1 === a.length ? c = a[0] : (d = a[0], c = a[1])), 1 === Math.abs(b) ? d : c 47 } 48 49 var e = 100, f = [], g = []; 50 g.push(/^[0-9]*$/.source), g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source), g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source), g = new RegExp(g.join("|")); 51 var h = { 52 Y: "years", 53 m: "months", 54 w: "weeks", 55 d: "days", 56 D: "totalDays", 57 H: "hours", 58 M: "minutes", 59 S: "seconds" 60 }, i = function (b, c, d) { 61 this.el = b, this.$el = a(b), this.interval = null, this.offset = {}, this.instanceNumber = f.length, f.push(this), this.$el.data("countdown-instance", this.instanceNumber), d && (this.$el.on("update.countdown", d), this.$el.on("stoped.countdown", d), this.$el.on("finish.countdown", d)), this.setFinalDate(c), this.start() 62 }; 63 a.extend(i.prototype, { 64 start: function () { 65 null !== this.interval && clearInterval(this.interval); 66 var a = this; 67 this.update(), this.interval = setInterval(function () { 68 a.update.call(a) 69 }, e) 70 }, stop: function () { 71 clearInterval(this.interval), this.interval = null, this.dispatchEvent("stoped") 72 }, pause: function () { 73 this.stop.call(this) 74 }, resume: function () { 75 this.start.call(this) 76 }, remove: function () { 77 this.stop(), f[this.instanceNumber] = null, delete this.$el.data().countdownInstance 78 }, setFinalDate: function (a) { 79 this.finalDate = b(a) 80 }, update: function () { 81 return 0 === this.$el.closest("html").length ? void this.remove() : (this.totalSecsLeft = this.finalDate.getTime() - (new Date).getTime(), this.totalSecsLeft = Math.ceil(this.totalSecsLeft / 1e3), this.totalSecsLeft = this.totalSecsLeft < 0 ? 0 : this.totalSecsLeft, this.offset = { 82 seconds: this.totalSecsLeft % 60, 83 minutes: Math.floor(this.totalSecsLeft / 60) % 60, 84 hours: Math.floor(this.totalSecsLeft / 60 / 60) % 24, 85 days: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7, 86 totalDays: Math.floor(this.totalSecsLeft / 60 / 60 / 24), 87 weeks: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7), 88 months: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 30), 89 years: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 365) 90 }, void(0 === this.totalSecsLeft ? (this.stop(), this.dispatchEvent("finish")) : this.dispatchEvent("update"))) 91 }, dispatchEvent: function (b) { 92 var d = a.Event(b + ".countdown"); 93 d.finalDate = this.finalDate, d.offset = a.extend({}, this.offset), d.strftime = c(this.offset), this.$el.trigger(d) 94 } 95 }), a.fn.countdown = function () { 96 var b = Array.prototype.slice.call(arguments, 0); 97 return this.each(function () { 98 var c = a(this).data("countdown-instance"); 99 if (void 0 !== c) { 100 var d = f[c], e = b[0]; 101 i.prototype.hasOwnProperty(e) ? d[e].apply(d, b.slice(1)) : null === String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i) ? (d.setFinalDate.call(d, e), d.start()) : a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi, e)) 102 } else new i(this, b[0], b[1]) 103 }) 104 } 105});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.