1!function (_) { "use strict"; var C = 0; function D(t, o) { return _.map(t, function (t) { return t + ".touchspin_" + o }) } _.fn.TouchSpin = function (g) { if ("destroy" !== g) { var w = { min: 0, max: 100, initval: "", replacementval: "", step: 1, decimals: 0, stepinterval: 100, forcestepdivisibility: "round", stepintervaldelay: 500, verticalbuttons: !1, verticalupclass: "glyphicon glyphicon-chevron-up", verticaldownclass: "glyphicon glyphicon-chevron-down", prefix: "", postfix: "", prefix_extraclass: "", postfix_extraclass: "", booster: !0, boostat: 10, maxboostedstep: !1, mousewheel: !0, buttondown_class: "btn btn-default", buttonup_class: "btn btn-default", buttondown_txt: "-", buttonup_txt: "+" }, y = { min: "min", max: "max", initval: "init-val", replacementval: "replacement-val", step: "step", decimals: "decimals", stepinterval: "step-interval", verticalbuttons: "vertical-buttons", verticalupclass: "vertical-up-class", verticaldownclass: "vertical-down-class", forcestepdivisibility: "force-step-divisibility", stepintervaldelay: "step-interval-delay", prefix: "prefix", postfix: "postfix", prefix_extraclass: "prefix-extra-class", postfix_extraclass: "postfix-extra-class", booster: "booster", boostat: "boostat", maxboostedstep: "max-boosted-step", mousewheel: "mouse-wheel", buttondown_class: "button-down-class", buttonup_class: "button-up-class", buttondown_txt: "button-down-txt", buttonup_txt: "button-up-txt" }; return this.each(function () { var p, u, e, n, t, o, s, a, r = _(this), i = r.data(), c = 0, l = !1; function d() { var t, o, n; "" !== (t = r.val()) ? 0 < p.decimals && "." === t || (o = parseFloat(t), isNaN(o) && (o = "" !== p.replacementval ? p.replacementval : 0), (n = o).toString() !== t && (n = o), o < p.min && (n = p.min), o > p.max && (n = p.max), n = function (t) { switch (p.forcestepdivisibility) { case "round": return (Math.round(t / p.step) * p.step).toFixed(p.decimals); case "floor": return (Math.floor(t / p.step) * p.step).toFixed(p.decimals); case "ceil": return (Math.ceil(t / p.step) * p.step).toFixed(p.decimals); default: return t } }(n), Number(t).toString() !== n.toString() && (r.val(n), r.trigger("change"))) : "" !== p.replacementval && (r.val(p.replacementval), r.trigger("change")) } function f() { if (p.booster) { var t = Math.pow(2, Math.floor(c / p.boostat)) * p.step; return p.maxboostedstep && t > p.maxboostedstep && (t = p.maxboostedstep, n = Math.round(n / t) * t), Math.max(p.step, t) } return p.step } function b() { d(), n = parseFloat(e.input.val()), isNaN(n) && (n = 0); var t = n, o = f(); (n += o) > p.max && (n = p.max, r.trigger("touchspin.on.max"), x()), e.input.val(Number(n).toFixed(p.decimals)), t !== n && r.trigger("change") } function h() { d(), n = parseFloat(e.input.val()), isNaN(n) && (n = 0); var t = n, o = f(); (n -= o) < p.min && (n = p.min, r.trigger("touchspin.on.min"), x()), e.input.val(n.toFixed(p.decimals)), t !== n && r.trigger("change") } function v() { x(), c = 0, l = "down", r.trigger("touchspin.on.startspin"), r.trigger("touchspin.on.startdownspin"), s = setTimeout(function () { t = setInterval(function () { c++, h() }, p.stepinterval) }, p.stepintervaldelay) } function m() { x(), c = 0, l = "up", r.trigger("touchspin.on.startspin"), r.trigger("touchspin.on.startupspin"), a = setTimeout(function () { o = setInterval(function () { c++, b() }, p.stepinterval) }, p.stepintervaldelay) } function x() { switch (clearTimeout(s), clearTimeout(a), clearInterval(t), clearInterval(o), l) { case "up": r.trigger("touchspin.on.stopupspin"), r.trigger("touchspin.on.stopspin"); break; case "down": r.trigger("touchspin.on.stopdownspin"), r.trigger("touchspin.on.stopspin") } c = 0, l = !1 } !function () { if (r.data("alreadyinitialized")) return; if (r.data("alreadyinitialized", !0), C += 1, r.data("spinnerid", C), !r.is("input")) return console.log("Must be an input."); p = _.extend({}, w, i, (s = {}, _.each(y, function (t, o) { var n = "bts-" + o; r.is("[data-" + n + "]") && (s[t] = r.data(n)) }), s), g), "" !== p.initval && "" === r.val() && r.val(p.initval), d(), function () { var t = r.val(), o = r.parent(); "" !== t && (t = Number(t).toFixed(p.decimals)); r.data("initvalue", t).val(t), r.addClass("form-control"), o.hasClass("input-group") ? function (t) { t.addClass("bootstrap-touchspin"); var o, n, s = r.prev(), e = r.next(), a = '<span class="input-group-addon bootstrap-touchspin-prefix">' + p.prefix + "</span>", i = '<span class="input-group-addon bootstrap-touchspin-postfix">' + p.postfix + "</span>"; s.hasClass("input-group-btn") ? (o = '<button class="' + p.buttondown_class + ' bootstrap-touchspin-down" type="button">' + p.buttondown_txt + "</button>", s.append(o)) : (o = '<span class="input-group-btn"><button class="' + p.buttondown_class + ' bootstrap-touchspin-down" type="button">' + p.buttondown_txt + "</button></span>", _(o).insertBefore(r)); e.hasClass("input-group-btn") ? (n = '<button class="' + p.buttonup_class + ' bootstrap-touchspin-up" type="button">' + p.buttonup_txt + "</button>", e.prepend(n)) : (n = '<span class="input-group-btn"><button class="' + p.buttonup_class + ' bootstrap-touchspin-up" type="button">' + p.buttonup_txt + "</button></span>", _(n).insertAfter(r)); _(a).insertBefore(r), _(i).insertAfter(r), u = t }(o) : function () { var t; t = p.verticalbuttons ? '<div class="input-group bootstrap-touchspin"><span class="input-group-addon bootstrap-touchspin-prefix">' + p.prefix + '</span><span class="input-group-addon bootstrap-touchspin-postfix">' + p.postfix + '</span><span class="input-group-btn-vertical"><button class="' + p.buttondown_class + ' bootstrap-touchspin-up" type="button"><i class="' + p.verticalupclass + '"></i></button><button class="' + p.buttonup_class + ' bootstrap-touchspin-down" type="button"><i class="' + p.verticaldownclass + '"></i></button></span></div>' : '<div class="input-group bootstrap-touchspin"><span class="input-group-btn"><button class="' + p.buttondown_class + ' bootstrap-touchspin-down" type="button">' + p.buttondown_txt + '</button></span><span class="input-group-addon bootstrap-touchspin-prefix">' + p.prefix + '</span><span class="input-group-addon bootstrap-touchspin-postfix">' + p.postfix + '</span><span class="input-group-btn"><button class="' + p.buttonup_class + ' bootstrap-touchspin-up" type="button">' + p.buttonup_txt + "</button></span></div>"; u = _(t).insertBefore(r), _(".bootstrap-touchspin-prefix", u).after(r), r.hasClass("input-sm") ? u.addClass("input-group-sm") : r.hasClass("input-lg") && u.addClass("input-group-lg") }() }(), e = { down: _(".bootstrap-touchspin-down", u), up: _(".bootstrap-touchspin-up", u), input
1: _("input", u), prefix: _(".bootstrap-touchspin-prefix", u).addClass(p.prefix_extraclass), postfix: _(".bootstrap-touchspin-postfix", u).addClass(p.postfix_extraclass) }, function () { "" === p.prefix && e.prefix.hide(); "" === p.postfix && e.postfix.hide() }(), r.on("keydown", function (t) { var o = t.keyCode || t.which; 38 === o ? ("up" !== l && (b(), m()), t.preventDefault()) : 40 === o && ("down" !== l && (h(), v()), t.preventDefault()) }), r.on("keyup", function (t) { var o = t.keyCode || t.which; 38 === o ? x() : 40 === o && x() }), r.on("blur", function () { d() }), e.down.on("keydown", function (t) { var o = t.keyCode || t.which; 32 !== o && 13 !== o || ("down" !== l && (h(), v()), t.preventDefault()) }), e.down.on("keyup", function (t) { var o = t.keyCode || t.which; 32 !== o && 13 !== o || x() }), e.up.on("keydown", function (t) { var o = t.keyCode || t.which; 32 !== o && 13 !== o || ("up" !== l && (b(), m()), t.preventDefault()) }), e.up.on("keyup", function (t) { var o = t.keyCode || t.which; 32 !== o && 13 !== o || x() }), e.down.on("mousedown.touchspin", function (t) { e.down.off("touchstart.touchspin"), r.is(":disabled") || (h(), v(), t.preventDefault(), t.stopPropagation()) }), e.down.on("touchstart.touchspin", function (t) { e.down.off("mousedown.touchspin"), r.is(":disabled") || (h(), v(), t.preventDefault(), t.stopPropagation()) }), e.up.on("mousedown.touchspin", function (t) { e.up.off("touchstart.touchspin"), r.is(":disabled") || (b(), m(), t.preventDefault(), t.stopPropagation()) }), e.up.on("touchstart.touchspin", function (t) { e.up.off("mousedown.touchspin"), r.is(":disabled") || (b(), m(), t.preventDefault(), t.stopPropagation()) }), e.up.on("mouseout touchleave touchend touchcancel", function (t) { l && (t.stopPropagation(), x()) }), e.down.on("mouseout touchleave touchend touchcancel", function (t) { l && (t.stopPropagation(), x()) }), e.down.on("mousemove touchmove", function (t) { l && (t.stopPropagation(), t.preventDefault()) }), e.up.on("mousemove touchmove", function (t) { l && (t.stopPropagation(), t.preventDefault()) }), _(document).on(D(["mouseup", "touchend", "touchcancel"], C).join(" "), function (t) { l && (t.preventDefault(), x()) }), _(document).on(D(["mousemove", "touchmove", "scroll", "scrollstart"], C).join(" "), function (t) { l && (t.preventDefault(), x()) }), r.on("mousewheel DOMMouseScroll", function (t) { if (p.mousewheel && r.is(":focus")) { var o = t.originalEvent.wheelDelta || -t.originalEvent.deltaY || -t.originalEvent.detail; t.stopPropagation(), t.preventDefault(), o < 0 ? h() : b() } }), r.on("touchspin.uponce", function () { x(), b() }), r.on("touchspin.downonce", function () { x(), h() }), r.on("touchspin.startupspin", function () { m() }), r.on("touchspin.startdownspin", function () { v() }), r.on("touchspin.stopspin", function () { x() }), r.on("touchspin.updatesettings", function (t, o) { !function (t) { var o; o = t, p = _.extend({}, p, o), d(); var n = e.input.val(); "" !== n && (n = Number(e.input.val()), e.input.val(n.toFixed(p.decimals))) }(o) }), e.input.css("display", "block"); var s }() }) } this.each(function () { var t = _(this).data(); _(document).off(D(["mouseup", "touchend", "touchcancel", "mousemove", "touchmove", "scroll", "scrollstart"], t.spinnerid).join(" ")) }) } }(jQuery);
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.