PageSourceSearch

https://reme.io/static/marketing/js/jquery.nanoscroller.min.js

js reme.io collected 2026-10-08 00:04:30 UTC 13,742 bytes, 161 lines download raw bytes

vendor: 13,742 bytes, lines 1-161
1/*! nanoScrollerJS - v0.8.7 - (c) 2015 James Florentino; Licensed MIT */
2
3!function (a) {
4    return "function" == typeof define && define.amd ? define(["jquery"], function (b) {
5        return a(b, window, document)
6    }) : "object" == typeof exports ? module.exports = a(require("jquery"), window, document) : a(jQuery, window, document)
7}(function (a, b, c) {
8    "use strict";
9    var d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H;
10    z = {
11        paneClass: "nano-pane",
12        sliderClass: "nano-slider",
13        contentClass: "nano-content",
14        enabledClass: "has-scrollbar",
15        flashedClass: "flashed",
16        activeClass: "active",
17        iOSNativeScrolling: !1,
18        preventPageScrolling: !1,
19        disableResize: !1,
20        alwaysVisible: !1,
21        flashDelay: 1500,
22        sliderMinHeight: 20,
23        sliderMaxHeight: null,
24        documentContext: null,
25        windowContext: null
26    }, u = "scrollbar", t = "scroll", l = "mousedown", m = "mouseenter", n = "mousemove", p = "mousewheel", o = "mouseup", s = "resize", h = "drag", i = "enter", w = "up", r = "panedown", f = "DOMMouseScroll", g = "down", x = "wheel", j = "keydown", k = "keyup", v = "touchmove", d = "Microsoft Internet Explorer" === b.navigator.appName && /msie 7./i.test(b.navigator.appVersion) && b.ActiveXObject, e = null, D = b.requestAnimationFrame, y = b.cancelAnimationFrame, F = c.createElement("div").style, H = function () {
27        var a, b, c, d, e, f;
28        for (d = ["t", "webkitT", "MozT", "msT", "OT"], a = e = 0, f = d.length; f > e; a = ++e)if (c = d[a], b = d[a] + "ransform", b in F)return d[a].substr(0, d[a].length - 1);
29        return !1
30    }(), G = function (a) {
31        return H === !1 ? !1 : "" === H ? a : H + a.charAt(0).toUpperCase() + a.substr(1)
32    }, E = G("transform"), B = E !== !1, A = function () {
33        var a, b, d;
34        return a = c.createElement("div"), b = a.style, b.position = "absolute", b.width = "100px", b.height = "100px", b.overflow = t, b.top = "-9999px", c.body.appendChild(a), d = a.offsetWidth - a.clientWidth, c.body.removeChild(a), d
35    }, C = function () {
36        var a, c, d;
37        return c = b.navigator.userAgent, (a = /(?=.+Mac OS X)(?=.+Firefox)/.test(c)) ? (d = /Firefox\/\d{2}\./.exec(c), d && (d = d[0].replace(/\D+/g, "")), a && +d > 23) : !1
38    }, q = function () {
39        function j(d, f) {
40            this.el = d, this.options = f, e || (e = A()), this.$el = a(this.el), this.doc = a(this.options.documentContext || c), this.win = a(this.options.windowContext || b), this.body = this.doc.find("body"), this.$content = this.$el.children("." + this.options.contentClass), this.$content.attr("tabindex", this.options.tabIndex || 0), this.content = this.$content[0], this.previousPosition = 0, this.options.iOSNativeScrolling && null != this.el.style.WebkitOverflowScrolling ? this.nativeScrolling() : this.generate(), this.createEvents(), this.addEvents(), this.reset()
41        }
42
43        return j.prototype.preventScrolling = function (a, b) {
44            if (this.isActive)if (a.type === f)(b === g && a.originalEvent.detail > 0 || b === w && a.originalEvent.detail < 0) && a.preventDefault(); else if (a.type === p) {
45                if (!a.originalEvent || !a.originalEvent.wheelDelta)return;
46                (b === g && a.originalEvent.wheelDelta < 0 || b === w && a.originalEvent.wheelDelta > 0) && a.preventDefault()
47            }
48        }, j.prototype.nativeScrolling = function () {
49            this.$content.css({WebkitOverflowScrolling: "touch"}), this.iOSNativeScrolling = !0, this.isActive = !0
50        }, j.prototype.updateScrollValues = function () {
51            var a, b;
52            a = this.content, this.maxScrollTop = a.scrollHeight - a.clientHeight, this.prevScrollTop = this.contentScrollTop || 0, this.contentScrollTop = a.scrollTop, b = this.contentScrollTop > this.previousPosition ? "down" : this.contentScrollTop < this.previousPosition ? "up" : "same", this.previousPosition = this.contentScrollTop, "same" !== b && this.$el.trigger("update", {
53                position: this.contentScrollTop,
54                maximum: this.maxScrollTop,
55                direction: b
56            }), this.iOSNativeScrolling || (this.maxSliderTop = this.paneHeight - this.sliderHeight, this.sliderTop = 0 === this.maxScrollTop ? 0 : this.contentScrollTop * this.maxSliderTop / this.maxScrollTop)
57        }, j.prototype.setOnScrollStyles = function () {
58            var a;
59            B ? (a = {}, a[E] = "translate(0, " + this.sliderTop + "px)") : a = {top: this.sliderTop}, D ? (y && this.scrollRAF && y(this.scrollRAF), this.scrollRAF = D(function (b) {
60                return function () {
61                    return b.scrollRAF = null, b.slider.css(a)
62                }
63            }(this))) : this.slider.css(a)
64        }, j.prototype.createEvents = function () {
65            this.events = {
66                down: function (a) {
67                    return function (b) {
68                        return a.isBeingDragged = !0, a.offsetY = b.pageY - a.slider.offset().top, a.slider.is(b.target) || (a.offsetY = 0), a.pane.addClass(a.options.activeClass), a.doc.bind(n, a.events[h]).bind(o, a.events[w]), a.body.bind(m, a.events[i]), !1
69                    }
70                }(this), drag: function (a) {
71                    return function (b) {
72                        return a.sliderY = b.pageY - a.$el.offset().top - a.paneTop - (a.offsetY || .5 * a.sliderHeight), a.scroll(), a.contentScrollTop >= a.maxScrollTop && a.prevScrollTop !== a.maxScrollTop ? a.$el.trigger("scrollend") : 0 === a.contentScrollTop && 0 !== a.prevScrollTop && a.$el.trigger("scrolltop"), !1
73                    }
74                }(this), up: function (a) {
75                    return function (b) {
76                        return a.isBeingDragged = !1, a.pane.removeClass(a.options.activeClass), a.doc.unbind(n, a.events[h]).unbind(o, a.events[w]), a.body.unbind(m, a.events[i]), !1
77                    }
78                }(this), resize: function (a) {
79                    return function (b) {
80                        a.reset()
81                    }
82                }(this), panedown: function (a) {
83                    return function (b) {
84                        return a.sliderY = (b.offsetY || b.originalEvent.layerY) - .5 * a.sliderHeight, a.scroll(), a.events.down(b), !1
85                    }
86                }(this), scroll: function (a) {
87                    return function (b) {
88                        a.updateScrollValues(), a.isBeingDragged || (a.iOSNativeScrolling || (a.sliderY = a.sliderTop, a.setOnScrollStyles()), null != b && (a.contentScrollTop >= a.maxScrollTop ? (a.options.preventPageScrolling && a.preventScrolling(b, g), a.prevScrollTop !== a.maxScrollTop && a.$el.trigger("scrollend")) : 0 === a.contentScrollTop && (a.options.preventPageScrolling && a.preventScrolling(b, w), 0 !== a.prevScrollTop && a.$el.trigger("scrolltop"))))
89                    }
90                }(this), wheel: function (a) {
91                    return function (b) {
92                        var c;
93                        if (null != b)return c = b.delta || b.wheelDelta || b.originalEvent && b.originalEvent.wheelDelta || -b.detail || b.originalEvent && -b.originalEvent.detail, c && (a.sliderY += -c / 3), a.scroll(), !1
94                    }
95                }(this), enter: function (a) {
96                    return function (b) {
97                        var c;
98                        if (a.isBeingDragged)return 1 !== (b.buttons || b.which) ? (c = a.events)[w].apply(c, arguments) : void 0
99                    }
100                }(this)
101            }
102        }, j.prototype.addEvents = function () {
103            var a;
104            this.removeEvents(), a = this.events, this.options.disableResize || this.win.bind(s, a[s]), this.iOSNativeScrolling || (this.slider.bind(l, a[g]), this.pane.bind(l, a[r]).bind("" + p + " " + f, a[x])), this.$content.bind("" + t + " " + p + " " + f + " " + v, a[t])
105        }, j.prototype.removeEvents = function () {
106            var a;
107            a = this.events, this.win.unbind(s, a[s]), this.iOSNativeScrolling || (this.slider.unbind(), this.pane.unbind()), this.$content.unbind("" + t + " " + p + " " + f + " " + v, a[t])
108        }, j.prototype.generate = function () {
109            var a, c, d, f, g, h, i;
110            return f = this.options, h = f.paneClass, i = f.sliderClass, a = f.contentClass, (g = this.$el.children("." + h)).length || g.children("." + i).length || this.$el.append('<div class="' + h + '"><div class="' + i + '" /></div>'), this.pane = this.$el.children("." + h), this.slider = this.pane.find("." + i), 0 === e && C() ? (d = b.getComputedStyle(this.content, null).getPropertyValue("padding-right").replace(/[^0-9.]+/g, ""), c = {
111                right: -14,
112                paddingRight: +d + 14
113            }) : e && (c = {right: -e}, this.$el.addClass(f.enabledClass)), null != c && this.$content.css(c), this
114        }, j.prototype.restore = function () {
115            this.stopped = !1, this.iOSNativeScrolling || this.pane.show(), this.addEvents()
116        }, j.prototype.reset = function () {
117            var a, b, c, f, g, h, i, j, k, l, m, n;
118            return this.iOSNativeScrolling ? void(this.contentHeight = this.content.scrollHeight) : (this.$el.find("." + this.options.paneClass).length || this.generate().stop(), this.stopped && this.restore(), a = this.content, f = a.style, g = f.overflowY, d && this.$content.css({height: this.$content.height()}), b = a.scrollHeight + e, l = parseInt(this.$el.css("max-height"), 10), l > 0 && (this.$el.height(""), this.$el.height(a.scrollHeight > l ? l : a.scrollHeight)), i = this.pane.outerHeight(!1), k = parseInt(this.pane.css("top"), 10), h = parseInt(this.pane.css("bottom"), 10), j = i + k + h, n = Math.round(j / b * i), n < this.options.sliderMinHeight ? n = this.options.sliderMinHeight : null != this.options.sliderMaxHeight && n > this.options.sliderMaxHeight && (n = this.options.sliderMaxHeight), g === t && f.overflowX !== t && (n += e), this.maxSliderTop = j - n, this.contentHeight = b, this.paneHeight = i, this.paneOuterHeight = j, this.sliderHeight = n, this.paneTop = k, this.slider.height(n), this.events.scroll(), this.pane.show(), this.isActive = !0, a.scrollHeight === a.clientHeight || this.pane.outerHeight(!0) >= a.scrollHeight && g !== t ? (this.pane.hide(), this.isActive = !1) : this.el.clientHeight === a.scrollHeight && g === t ? this.slider.hide() : this.slider.show(), this.pane.css({
119                opacity: this.options.alwaysVisible ? 1 : "",
120                visibility: this.options.alwaysVisible ? "visible" : ""
121            }), c = this.$content.css("position"), ("static" === c || "relative" === c) && (m = parseInt(this.$content.css("right"), 10), m && this.$content.css({
122                right: "",
123                marginRight: m
124            })), this)
125        }, j.prototype.scroll = function () {
126            return this.isActive ? (this.sliderY = Math.max(0, this.sliderY), this.sliderY = Math.min(this.maxSliderTop, this.sliderY), this.$content.scrollTop(this.maxScrollTop * this.sliderY / this.maxSliderTop), this.iOSNativeScrolling || (this.updateScrollValues(), this.setOnScrollStyles()), this) : void 0
127        }, j.prototype.scrollBottom = function (a) {
128            return this.isActive ? (this.$content.scrollTop(this.contentHeight - this.$content.height() - a).trigger(p), this.stop().restore(), this) : void 0
129        }, j.prototype.scrollTop = function (a) {
130            return this.isActive ? (this.$content.scrollTop(+a).trigger(p), this.stop().restore(), this) : void 0
131        }, j.prototype.scrollTo = function (a) {
132            return this.isActive ? (this.scrollTop(this.$el.find(a).get(0).offsetTop), this) : void 0
133        }, j.prototype.stop = function () {
134            return y && this.scrollRAF && (y(this.scrollRAF), this.scrollRAF = null), this.stopped = !0, this.removeEvents(), this.iOSNativeScrolling || this.pane.hide(), this
135        }, j.prototype.destroy = function () {
136            return this.stopped || this.stop(), !this.iOSNativeScrolling && this.pane.length && this.pane.remove(), d && this.$content.height(""), this.$content.removeAttr("tabindex"), this.$el.hasClass(this.options.enabledClass) && (this.$el.removeClass(this.options.enabledClass), this.$content.css({right: ""})), this
137        }, j.prototype.flash = function () {
138            return !this.iOSNativeScrolling && this.isActive ? (this.reset(), this.pane.addClass(this.options.flashedClass), setTimeout(function (a) {
139                return function () {
140                    a.pane.removeClass(a.options.flashedClass)
141                }
142            }(this), this.options.flashDelay), this) : void 0
143        }, j
144    }(), a.fn.nanoScroller = function (b) {
145        return this.each(function () {
146            var c, d;
147            if ((d = this.nanoscroller) || (c = a.extend({}, z, b), this.nanoscroller = d = new q(this, c)), b && "object" == typeof b) {
148                if (a.extend(d.options, b), null != b.scrollBottom)return d.scrollBottom(b.scrollBottom);
149                if (null != b.scrollTop)return d.scrollTop(b.scrollTop);
150                if (b.scrollTo)return d.scrollTo(b.scrollTo);
151                if ("bottom" === b.scroll)return d.scrollBottom(0);
152                if ("top" === b.scroll)return d.scrollTop(0);
153                if (b.scroll && b.scroll instanceof a)return d.scrollTo(b.scroll);
154                if (b.stop)return d.stop();
155                if (b.destroy)return d.destroy();
156                if (b.flash)return d.flash()
157            }
158            return d.reset()
159        })
160    }, a.fn.nanoScroller.Constructor = q
161});

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.