/* perfect-scrollbar v0.6.10 http://noraesae.github.io/perfect-scrollbar/ */ !(function t(e, n, r) { function o(l, s) { if (!n[l]) { if (!e[l]) { var a = 'function' == typeof require && require; if (!s && a) return a(l, !0); if (i) return i(l, !0); var c = new Error("Cannot find module '" + l + "'"); throw ((c.code = 'MODULE_NOT_FOUND'), c); } var u = (n[l] = { exports: {} }); e[l][0].call( u.exports, function (t) { var n = e[l][1][t]; return o(n ? n : t); }, u, u.exports, t, e, n, r ); } return n[l].exports; } for (var i = 'function' == typeof require && require, l = 0; l < r.length; l++) o(r[l]); return o; })( { 1: [ function (t, e, n) { 'use strict'; function r(t) { t.fn.perfectScrollbar = function (e) { return this.each(function () { if ('object' == typeof e || 'undefined' == typeof e) { var n = e; i.get(this) || o.initialize(this, n); } else { var r = e; 'update' === r ? o.update(this) : 'destroy' === r && o.destroy(this); } return t(this); }); }; } var o = t('../main'), i = t('../plugin/instances'); if ('function' == typeof define && define.amd) define(['jquery'], r); else { var l = window.jQuery ? window.jQuery : window.$; 'undefined' != typeof l && r(l); } e.exports = r; }, { '../main': 7, '../plugin/instances': 18 }, ], 2: [ function (t, e, n) { 'use strict'; function r(t, e) { var n = t.className.split(' '); n.indexOf(e) < 0 && n.push(e), (t.className = n.join(' ')); } function o(t, e) { var n = t.className.split(' '), r = n.indexOf(e); r >= 0 && n.splice(r, 1), (t.className = n.join(' ')); } (n.add = function (t, e) { t.classList ? t.classList.add(e) : r(t, e); }), (n.remove = function (t, e) { t.classList ? t.classList.remove(e) : o(t, e); }), (n.list = function (t) { return t.classList ? Array.prototype.slice.apply(t.classList) : t.className.split(' '); }); }, {}, ], 3: [ function (t, e, n) { 'use strict'; function r(t, e) { return window.getComputedStyle(t)[e]; } function o(t, e, n) { return 'number' == typeof n && (n = n.toString() + 'px'), (t.style[e] = n), t; } function i(t, e) { for (var n in e) { var r = e[n]; 'number' == typeof r && (r = r.toString() + 'px'), (t.style[n] = r); } return t; } var l = {}; (l.e = function (t, e) { var n = document.createElement(t); return (n.className = e), n; }), (l.appendTo = function (t, e) { return e.appendChild(t), t; }), (l.css = function (t, e, n) { return 'object' == typeof e ? i(t, e) : 'undefined' == typeof n ? r(t, e) : o(t, e, n); }), (l.matches = function (t, e) { return 'undefined' != typeof t.matches ? t.matches(e) : 'undefined' != typeof t.matchesSelector ? t.matchesSelector(e) : 'undefined' != typeof t.webkitMatchesSelector ? t.webkitMatchesSelector(e) : 'undefined' != typeof t.mozMatchesSelector ? t.mozMatchesSelector(e) : 'undefined' != typeof t.msMatchesSelector ? t.msMatchesSelector(e) : void 0; }), (l.remove = function (t) { 'undefined' != typeof t.remove ? t.remove() : t.parentNode && t.parentNode.removeChild(t); }), (l.queryChildren = function (t, e) { return Array.prototype.filter.call(t.childNodes, function (t) { return l.matches(t, e); }); }), (e.exports = l); }, {}, ], 4: [ function (t, e, n) { 'use strict'; var r = function (t) { (this.element = t), (this.events = {}); }; (r.prototype.bind = function (t, e) { 'undefined' == typeof this.events[t] && (this.events[t] = []), this.events[t].push(e), this.element.addEventListener(t, e, !1); }), (r.prototype.unbind = function (t, e) { var n = 'undefined' != typeof e; this.events[t] = this.events[t].filter(function (r) { return n && r !== e ? !0 : (this.element.removeEventListener(t, r, !1), !1); }, this); }), (r.prototype.unbindAll = function () { for (var t in this.events) this.unbind(t); }); var o = function () { this.eventElements = []; }; (o.prototype.eventElement = function (t) { var e = this.eventElements.filter(function (e) { return e.element === t; })[0]; return 'undefined' == typeof e && ((e = new r(t)), this.eventElements.push(e)), e; }), (o.prototype.bind = function (t, e, n) { this.eventElement(t).bind(e, n); }), (o.prototype.unbind = function (t, e, n) { this.eventElement(t).unbind(e, n); }), (o.prototype.unbindAll = function () { for (var t = 0; t < this.eventElements.length; t++) this.eventElements[t].unbindAll(); }), (o.prototype.once = function (t, e, n) { var r = this.eventElement(t), o = function (t) { r.unbind(e, o), n(t); }; r.bind(e, o); }), (e.exports = o); }, {}, ], 5: [ function (t, e, n) { 'use strict'; e.exports = (function () { function t() { return Math.floor(65536 * (1 + Math.random())) .toString(16) .substring(1); } return function () { return t() + t() + '-' + t() + '-' + t() + '-' + t() + '-' + t() + t() + t(); }; })(); }, {}, ], 6: [ function (t, e, n) { 'use strict'; var r = t('./class'), o = t('./dom'); (n.toInt = function (t) { return parseInt(t, 10) || 0; }), (n.clone = function (t) { if (null === t) return null; if ('object' == typeof t) { var e = {}; for (var n in t) e[n] = this.clone(t[n]); return e; } return t; }), (n.extend = function (t, e) { var n = this.clone(t); for (var r in e) n[r] = this.clone(e[r]); return n; }), (n.isEditable = function (t) { return ( o.matches(t, 'input,[contenteditable]') || o.matches(t, 'select,[contenteditable]') || o.matches(t, 'textarea,[contenteditable]') || o.matches(t, 'button,[contenteditable]') ); }), (n.removePsClasses = function (t) { for (var e = r.list(t), n = 0; n < e.length; n++) { var o = e[n]; 0 === o.indexOf('ps-') && r.remove(t, o); } }), (n.outerWidth = function (t) { return ( this.toInt(o.css(t, 'width')) + this.toInt(o.css(t, 'paddingLeft')) + this.toInt(o.css(t, 'paddingRight')) + this.toInt(o.css(t, 'borderLeftWidth')) + this.toInt(o.css(t, 'borderRightWidth')) ); }), (n.startScrolling = function (t, e) { r.add(t, 'ps-in-scrolling'), 'undefined' != typeof e ? r.add(t, 'ps-' + e) : (r.add(t, 'ps-x'), r.add(t, 'ps-y')); }), (n.stopScrolling = function (t, e) { r.remove(t, 'ps-in-scrolling'), 'undefined' != typeof e ? r.remove(t, 'ps-' + e) : (r.remove(t, 'ps-x'), r.remove(t, 'ps-y')); }), (n.env = { isWebKit: 'WebkitAppearance' in document.documentElement.style, supportsTouch: 'ontouchstart' in window || (window.DocumentTouch && document instanceof window.DocumentTouch), supportsIePointer: null !== window.navigator.msMaxTouchPoints, }); }, { './class': 2, './dom': 3 }, ], 7: [ function (t, e, n) { 'use strict'; var r = t('./plugin/destroy'), o = t('./plugin/initialize'), i = t('./plugin/update'); e.exports = { initialize: o, update: i, destroy: r }; }, { './plugin/destroy': 9, './plugin/initialize': 17, './plugin/update': 21 }, ], 8: [ function (t, e, n) { 'use strict'; e.exports = { maxScrollbarLength: null, minScrollbarLength: null, scrollXMarginOffset: 0, scrollYMarginOffset: 0, stopPropagationOnClick: !0, suppressScrollX: !1, suppressScrollY: !1, swipePropagation: !0, useBothWheelAxes: !1, useKeyboard: !0, useSelectionScroll: !1, wheelPropagation: !1, wheelSpeed: 1, theme: 'default', }; }, {}, ], 9: [ function (t, e, n) { 'use strict'; var r = t('../lib/dom'), o = t('../lib/helper'), i = t('./instances'); e.exports = function (t) { var e = i.get(t); e && (e.event.unbindAll(), r.remove(e.scrollbarX), r.remove(e.scrollbarY), r.remove(e.scrollbarXRail), r.remove(e.scrollbarYRail), o.removePsClasses(t), i.remove(t)); }; }, { '../lib/dom': 3, '../lib/helper': 6, './instances': 18 }, ], 10: [ function (t, e, n) { 'use strict'; function r(t, e) { function n(t) { return t.getBoundingClientRect(); } var r = window.Event.prototype.stopPropagation.bind; e.settings.stopPropagationOnClick && e.event.bind(e.scrollbarY, 'click', r), e.event.bind(e.scrollbarYRail, 'click', function (r) { var i = o.toInt(e.scrollbarYHeight / 2), a = e.railYRatio * (r.pageY - window.pageYOffset - n(e.scrollbarYRail).top - i), c = e.railYRatio * (e.railYHeight - e.scrollbarYHeight), u = a / c; 0 > u ? (u = 0) : u > 1 && (u = 1), s(t, 'top', (e.contentHeight - e.containerHeight) * u), l(t), r.stopPropagation(); }), e.settings.stopPropagationOnClick && e.event.bind(e.scrollbarX, 'click', r), e.event.bind(e.scrollbarXRail, 'click', function (r) { var i = o.toInt(e.scrollbarXWidth / 2), a = e.railXRatio * (r.pageX - window.pageXOffset - n(e.scrollbarXRail).left - i), c = e.railXRatio * (e.railXWidth - e.scrollbarXWidth), u = a / c; 0 > u ? (u = 0) : u > 1 && (u = 1), s(t, 'left', (e.contentWidth - e.containerWidth) * u - e.negativeScrollAdjustment), l(t), r.stopPropagation(); }); } var o = t('../../lib/helper'), i = t('../instances'), l = t('../update-geometry'), s = t('../update-scroll'); e.exports = function (t) { var e = i.get(t); r(t, e); }; }, { '../../lib/helper': 6, '../instances': 18, '../update-geometry': 19, '../update-scroll': 20 }, ], 11: [ function (t, e, n) { 'use strict'; function r(t, e) { function n(n) { var o = r + n * e.railXRatio, i = Math.max(0, e.scrollbarXRail.getBoundingClientRect().left) + e.railXRatio * (e.railXWidth - e.scrollbarXWidth); 0 > o ? (e.scrollbarXLeft = 0) : o > i ? (e.scrollbarXLeft = i) : (e.scrollbarXLeft = o); var s = l.toInt((e.scrollbarXLeft * (e.contentWidth - e.containerWidth)) / (e.containerWidth - e.railXRatio * e.scrollbarXWidth)) - e.negativeScrollAdjustment; c(t, 'left', s); } var r = null, o = null, s = function (e) { n(e.pageX - o), a(t), e.stopPropagation(), e.preventDefault(); }, u = function () { l.stopScrolling(t, 'x'), e.event.unbind(e.ownerDocument, 'mousemove', s); }; e.event.bind(e.scrollbarX, 'mousedown', function (n) { (o = n.pageX), (r = l.toInt(i.css(e.scrollbarX, 'left')) * e.railXRatio), l.startScrolling(t, 'x'), e.event.bind(e.ownerDocument, 'mousemove', s), e.event.once(e.ownerDocument, 'mouseup', u), n.stopPropagation(), n.preventDefault(); }); } function o(t, e) { function n(n) { var o = r + n * e.railYRatio, i = Math.max(0, e.scrollbarYRail.getBoundingClientRect().top) + e.railYRatio * (e.railYHeight - e.scrollbarYHeight); 0 > o ? (e.scrollbarYTop = 0) : o > i ? (e.scrollbarYTop = i) : (e.scrollbarYTop = o); var s = l.toInt( (e.scrollbarYTop * (e.contentHeight - e.containerHeight)) / (e.containerHeight - e.railYRatio * e.scrollbarYHeight) ); c(t, 'top', s); } var r = null, o = null, s = function (e) { n(e.pageY - o), a(t), e.stopPropagation(), e.preventDefault(); }, u = function () { l.stopScrolling(t, 'y'), e.event.unbind(e.ownerDocument, 'mousemove', s); }; e.event.bind(e.scrollbarY, 'mousedown', function (n) { (o = n.pageY), (r = l.toInt(i.css(e.scrollbarY, 'top')) * e.railYRatio), l.startScrolling(t, 'y'), e.event.bind(e.ownerDocument, 'mousemove', s), e.event.once(e.ownerDocument, 'mouseup', u), n.stopPropagation(), n.preventDefault(); }); } var i = t('../../lib/dom'), l = t('../../lib/helper'), s = t('../instances'), a = t('../update-geometry'), c = t('../update-scroll'); e.exports = function (t) { var e = s.get(t); r(t, e), o(t, e); }; }, { '../../lib/dom': 3, '../../lib/helper': 6, '../instances': 18, '../update-geometry': 19, '../update-scroll': 20 }, ], 12: [ function (t, e, n) { 'use strict'; function r(t, e) { function n(n, r) { var o = t.scrollTop; if (0 === n) { if (!e.scrollbarYActive) return !1; if ((0 === o && r > 0) || (o >= e.contentHeight - e.containerHeight && 0 > r)) return !e.settings.wheelPropagation; } var i = t.scrollLeft; if (0 === r) { if (!e.scrollbarXActive) return !1; if ((0 === i && 0 > n) || (i >= e.contentWidth - e.containerWidth && n > 0)) return !e.settings.wheelPropagation; } return !0; } var r = !1; e.event.bind(t, 'mouseenter', function () { r = !0; }), e.event.bind(t, 'mouseleave', function () { r = !1; }); var l = !1; e.event.bind(e.ownerDocument, 'keydown', function (c) { if (!c.isDefaultPrevented || !c.isDefaultPrevented()) { var u = i.matches(e.scrollbarX, ':focus') || i.matches(e.scrollbarY, ':focus'); if (r || u) { var d = document.activeElement ? document.activeElement : e.ownerDocument.activeElement; if (d) { for (; d.shadowRoot; ) d = d.shadowRoot.activeElement; if (o.isEditable(d)) return; } var p = 0, f = 0; switch (c.which) { case 37: p = -30; break; case 38: f = 30; break; case 39: p = 30; break; case 40: f = -30; break; case 33: f = 90; break; case 32: f = c.shiftKey ? 90 : -90; break; case 34: f = -90; break; case 35: f = c.ctrlKey ? -e.contentHeight : -e.containerHeight; break; case 36: f = c.ctrlKey ? t.scrollTop : e.containerHeight; break; default: return; } a(t, 'top', t.scrollTop - f), a(t, 'left', t.scrollLeft + p), s(t), (l = n(p, f)), l && c.preventDefault(); } } }); } var o = t('../../lib/helper'), i = t('../../lib/dom'), l = t('../instances'), s = t('../update-geometry'), a = t('../update-scroll'); e.exports = function (t) { var e = l.get(t); r(t, e); }; }, { '../../lib/dom': 3, '../../lib/helper': 6, '../instances': 18, '../update-geometry': 19, '../update-scroll': 20 }, ], 13: [ function (t, e, n) { 'use strict'; function r(t, e) { function n(n, r) { var o = t.scrollTop; if (0 === n) { if (!e.scrollbarYActive) return !1; if ((0 === o && r > 0) || (o >= e.contentHeight - e.containerHeight && 0 > r)) return !e.settings.wheelPropagation; } var i = t.scrollLeft; if (0 === r) { if (!e.scrollbarXActive) return !1; if ((0 === i && 0 > n) || (i >= e.contentWidth - e.containerWidth && n > 0)) return !e.settings.wheelPropagation; } return !0; } function r(t) { var e = t.deltaX, n = -1 * t.deltaY; return ( ('undefined' == typeof e || 'undefined' == typeof n) && ((e = (-1 * t.wheelDeltaX) / 6), (n = t.wheelDeltaY / 6)), t.deltaMode && 1 === t.deltaMode && ((e *= 10), (n *= 10)), e !== e && n !== n && ((e = 0), (n = t.wheelDelta)), [e, n] ); } function o(e, n) { var r = t.querySelector('textarea:hover'); if (r) { var o = r.scrollHeight - r.clientHeight; if (o > 0 && !((0 === r.scrollTop && n > 0) || (r.scrollTop === o && 0 > n))) return !0; var i = r.scrollLeft - r.clientWidth; if (i > 0 && !((0 === r.scrollLeft && 0 > e) || (r.scrollLeft === i && e > 0))) return !0; } return !1; } function s(s) { var c = r(s), u = c[0], d = c[1]; o(u, d) || ((a = !1), e.settings.useBothWheelAxes ? e.scrollbarYActive && !e.scrollbarXActive ? (d ? l(t, 'top', t.scrollTop - d * e.settings.wheelSpeed) : l(t, 'top', t.scrollTop + u * e.settings.wheelSpeed), (a = !0)) : e.scrollbarXActive && !e.scrollbarYActive && (u ? l(t, 'left', t.scrollLeft + u * e.settings.wheelSpeed) : l(t, 'left', t.scrollLeft - d * e.settings.wheelSpeed), (a = !0)) : (l(t, 'top', t.scrollTop - d * e.settings.wheelSpeed), l(t, 'left', t.scrollLeft + u * e.settings.wheelSpeed)), i(t), (a = a || n(u, d)), a && (s.stopPropagation(), s.preventDefault())); } var a = !1; 'undefined' != typeof window.onwheel ? e.event.bind(t, 'wheel', s) : 'undefined' != typeof window.onmousewheel && e.event.bind(t, 'mousewheel', s); } var o = t('../instances'), i = t('../update-geometry'), l = t('../update-scroll'); e.exports = function (t) { var e = o.get(t); r(t, e); }; }, { '../instances': 18, '../update-geometry': 19, '../update-scroll': 20 }, ], 14: [ function (t, e, n) { 'use strict'; function r(t, e) { e.event.bind(t, 'scroll', function () { i(t); }); } var o = t('../instances'), i = t('../update-geometry'); e.exports = function (t) { var e = o.get(t); r(t, e); }; }, { '../instances': 18, '../update-geometry': 19 }, ], 15: [ function (t, e, n) { 'use strict'; function r(t, e) { function n() { var t = window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : ''; return 0 === t.toString().length ? null : t.getRangeAt(0).commonAncestorContainer; } function r() { c || (c = setInterval(function () { return i.get(t) ? (s(t, 'top', t.scrollTop + u.top), s(t, 'left', t.scrollLeft + u.left), void l(t)) : void clearInterval(c); }, 50)); } function a() { c && (clearInterval(c), (c = null)), o.stopScrolling(t); } var c = null, u = { top: 0, left: 0 }, d = !1; e.event.bind(e.ownerDocument, 'selectionchange', function () { t.contains(n()) ? (d = !0) : ((d = !1), a()); }), e.event.bind(window, 'mouseup', function () { d && ((d = !1), a()); }), e.event.bind(window, 'mousemove', function (e) { if (d) { var n = { x: e.pageX, y: e.pageY }, i = { left: t.offsetLeft, right: t.offsetLeft + t.offsetWidth, top: t.offsetTop, bottom: t.offsetTop + t.offsetHeight }; n.x < i.left + 3 ? ((u.left = -5), o.startScrolling(t, 'x')) : n.x > i.right - 3 ? ((u.left = 5), o.startScrolling(t, 'x')) : (u.left = 0), n.y < i.top + 3 ? (i.top + 3 - n.y < 5 ? (u.top = -5) : (u.top = -20), o.startScrolling(t, 'y')) : n.y > i.bottom - 3 ? (n.y - i.bottom + 3 < 5 ? (u.top = 5) : (u.top = 20), o.startScrolling(t, 'y')) : (u.top = 0), 0 === u.top && 0 === u.left ? a() : r(); } }); } var o = t('../../lib/helper'), i = t('../instances'), l = t('../update-geometry'), s = t('../update-scroll'); e.exports = function (t) { var e = i.get(t); r(t, e); }; }, { '../../lib/helper': 6, '../instances': 18, '../update-geometry': 19, '../update-scroll': 20 }, ], 16: [ function (t, e, n) { 'use strict'; function r(t, e, n, r) { function s(n, r) { var o = t.scrollTop, i = t.scrollLeft, l = Math.abs(n), s = Math.abs(r); if (s > l) { if ((0 > r && o === e.contentHeight - e.containerHeight) || (r > 0 && 0 === o)) return !e.settings.swipePropagation; } else if (l > s && ((0 > n && i === e.contentWidth - e.containerWidth) || (n > 0 && 0 === i))) return !e.settings.swipePropagation; return !0; } function a(e, n) { l(t, 'top', t.scrollTop - n), l(t, 'left', t.scrollLeft - e), i(t); } function c() { Y = !0; } function u() { Y = !1; } function d(t) { return t.targetTouches ? t.targetTouches[0] : t; } function p(t) { return t.targetTouches && 1 === t.targetTouches.length ? !0 : t.pointerType && 'mouse' !== t.pointerType && t.pointerType !== t.MSPOINTER_TYPE_MOUSE ? !0 : !1; } function f(t) { if (p(t)) { w = !0; var e = d(t); (v.pageX = e.pageX), (v.pageY = e.pageY), (g = new Date().getTime()), null !== y && clearInterval(y), t.stopPropagation(); } } function h(t) { if (!Y && w && p(t)) { var e = d(t), n = { pageX: e.pageX, pageY: e.pageY }, r = n.pageX - v.pageX, o = n.pageY - v.pageY; a(r, o), (v = n); var i = new Date().getTime(), l = i - g; l > 0 && ((m.x = r / l), (m.y = o / l), (g = i)), s(r, o) && (t.stopPropagation(), t.preventDefault()); } } function b() { !Y && w && ((w = !1), clearInterval(y), (y = setInterval(function () { return o.get(t) ? Math.abs(m.x) < 0.01 && Math.abs(m.y) < 0.01 ? void clearInterval(y) : (a(30 * m.x, 30 * m.y), (m.x *= 0.8), void (m.y *= 0.8)) : void clearInterval(y); }, 10))); } var v = {}, g = 0, m = {}, y = null, Y = !1, w = !1; n && (e.event.bind(window, 'touchstart', c), e.event.bind(window, 'touchend', u), e.event.bind(t, 'touchstart', f), e.event.bind(t, 'touchmove', h), e.event.bind(t, 'touchend', b)), r && (window.PointerEvent ? (e.event.bind(window, 'pointerdown', c), e.event.bind(window, 'pointerup', u), e.event.bind(t, 'pointerdown', f), e.event.bind(t, 'pointermove', h), e.event.bind(t, 'pointerup', b)) : window.MSPointerEvent && (e.event.bind(window, 'MSPointerDown', c), e.event.bind(window, 'MSPointerUp', u), e.event.bind(t, 'MSPointerDown', f), e.event.bind(t, 'MSPointerMove', h), e.event.bind(t, 'MSPointerUp', b))); } var o = t('../instances'), i = t('../update-geometry'), l = t('../update-scroll'); e.exports = function (t, e, n) { var i = o.get(t); r(t, i, e, n); }; }, { '../instances': 18, '../update-geometry': 19, '../update-scroll': 20 }, ], 17: [ function (t, e, n) { 'use strict'; var r = t('../lib/class'), o = t('../lib/helper'), i = t('./instances'), l = t('./update-geometry'), s = t('./handler/click-rail'), a = t('./handler/drag-scrollbar'), c = t('./handler/keyboard'), u = t('./handler/mouse-wheel'), d = t('./handler/native-scroll'), p = t('./handler/selection'), f = t('./handler/touch'); e.exports = function (t, e) { (e = 'object' == typeof e ? e : {}), r.add(t, 'ps-container'); var n = i.add(t); (n.settings = o.extend(n.settings, e)), r.add(t, 'ps-theme-' + n.settings.theme), s(t), a(t), u(t), d(t), n.settings.useSelectionScroll && p(t), (o.env.supportsTouch || o.env.supportsIePointer) && f(t, o.env.supportsTouch, o.env.supportsIePointer), n.settings.useKeyboard && c(t), l(t); }; }, { '../lib/class': 2, '../lib/helper': 6, './handler/click-rail': 10, './handler/drag-scrollbar': 11, './handler/keyboard': 12, './handler/mouse-wheel': 13, './handler/native-scroll': 14, './handler/selection': 15, './handler/touch': 16, './instances': 18, './update-geometry': 19, }, ], 18: [ function (t, e, n) { 'use strict'; function r(t) { function e() { s.add(t, 'ps-focus'); } function n() { s.remove(t, 'ps-focus'); } var r = this; (r.settings = p.clone(c)), (r.containerWidth = null), (r.containerHeight = null), (r.contentWidth = null), (r.contentHeight = null), (r.isRtl = 'rtl' === a.css(t, 'direction')), (r.isNegativeScroll = (function () { var e = t.scrollLeft, n = null; return (t.scrollLeft = -1), (n = t.scrollLeft < 0), (t.scrollLeft = e), n; })()), (r.negativeScrollAdjustment = r.isNegativeScroll ? t.scrollWidth - t.clientWidth : 0), (r.event = new u()), (r.ownerDocument = t.ownerDocument || document), (r.scrollbarXRail = a.appendTo(a.e('div', 'ps-scrollbar-x-rail'), t)), (r.scrollbarX = a.appendTo(a.e('div', 'ps-scrollbar-x'), r.scrollbarXRail)), r.scrollbarX.setAttribute('tabindex', 0), r.event.bind(r.scrollbarX, 'focus', e), r.event.bind(r.scrollbarX, 'blur', n), (r.scrollbarXActive = null), (r.scrollbarXWidth = null), (r.scrollbarXLeft = null), (r.scrollbarXBottom = p.toInt(a.css(r.scrollbarXRail, 'bottom'))), (r.isScrollbarXUsingBottom = r.scrollbarXBottom === r.scrollbarXBottom), (r.scrollbarXTop = r.isScrollbarXUsingBottom ? null : p.toInt(a.css(r.scrollbarXRail, 'top'))), (r.railBorderXWidth = p.toInt(a.css(r.scrollbarXRail, 'borderLeftWidth')) + p.toInt(a.css(r.scrollbarXRail, 'borderRightWidth'))), a.css(r.scrollbarXRail, 'display', 'block'), (r.railXMarginWidth = p.toInt(a.css(r.scrollbarXRail, 'marginLeft')) + p.toInt(a.css(r.scrollbarXRail, 'marginRight'))), a.css(r.scrollbarXRail, 'display', ''), (r.railXWidth = null), (r.railXRatio = null), (r.scrollbarYRail = a.appendTo(a.e('div', 'ps-scrollbar-y-rail'), t)), (r.scrollbarY = a.appendTo(a.e('div', 'ps-scrollbar-y'), r.scrollbarYRail)), r.scrollbarY.setAttribute('tabindex', 0), r.event.bind(r.scrollbarY, 'focus', e), r.event.bind(r.scrollbarY, 'blur', n), (r.scrollbarYActive = null), (r.scrollbarYHeight = null), (r.scrollbarYTop = null), (r.scrollbarYRight = p.toInt(a.css(r.scrollbarYRail, 'right'))), (r.isScrollbarYUsingRight = r.scrollbarYRight === r.scrollbarYRight), (r.scrollbarYLeft = r.isScrollbarYUsingRight ? null : p.toInt(a.css(r.scrollbarYRail, 'left'))), (r.scrollbarYOuterWidth = r.isRtl ? p.outerWidth(r.scrollbarY) : null), (r.railBorderYWidth = p.toInt(a.css(r.scrollbarYRail, 'borderTopWidth')) + p.toInt(a.css(r.scrollbarYRail, 'borderBottomWidth'))), a.css(r.scrollbarYRail, 'display', 'block'), (r.railYMarginHeight = p.toInt(a.css(r.scrollbarYRail, 'marginTop')) + p.toInt(a.css(r.scrollbarYRail, 'marginBottom'))), a.css(r.scrollbarYRail, 'display', ''), (r.railYHeight = null), (r.railYRatio = null); } function o(t) { return 'undefined' == typeof t.dataset ? t.getAttribute('data-ps-id') : t.dataset.psId; } function i(t, e) { 'undefined' == typeof t.dataset ? t.setAttribute('data-ps-id', e) : (t.dataset.psId = e); } function l(t) { 'undefined' == typeof t.dataset ? t.removeAttribute('data-ps-id') : delete t.dataset.psId; } var s = t('../lib/class'), a = t('../lib/dom'), c = t('./default-setting'), u = t('../lib/event-manager'), d = t('../lib/guid'), p = t('../lib/helper'), f = {}; (n.add = function (t) { var e = d(); return i(t, e), (f[e] = new r(t)), f[e]; }), (n.remove = function (t) { delete f[o(t)], l(t); }), (n.get = function (t) { return f[o(t)]; }); }, { '../lib/class': 2, '../lib/dom': 3, '../lib/event-manager': 4, '../lib/guid': 5, '../lib/helper': 6, './default-setting': 8 }, ], 19: [ function (t, e, n) { 'use strict'; function r(t, e) { return ( t.settings.minScrollbarLength && (e = Math.max(e, t.settings.minScrollbarLength)), t.settings.maxScrollbarLength && (e = Math.min(e, t.settings.maxScrollbarLength)), e ); } function o(t, e) { var n = { width: e.railXWidth }; e.isRtl ? (n.left = e.negativeScrollAdjustment + t.scrollLeft + e.containerWidth - e.contentWidth) : (n.left = t.scrollLeft), e.isScrollbarXUsingBottom ? (n.bottom = e.scrollbarXBottom - t.scrollTop) : (n.top = e.scrollbarXTop + t.scrollTop), l.css(e.scrollbarXRail, n); var r = { top: t.scrollTop, height: e.railYHeight }; e.isScrollbarYUsingRight ? e.isRtl ? (r.right = e.contentWidth - (e.negativeScrollAdjustment + t.scrollLeft) - e.scrollbarYRight - e.scrollbarYOuterWidth) : (r.right = e.scrollbarYRight - t.scrollLeft) : e.isRtl ? (r.left = e.negativeScrollAdjustment + t.scrollLeft + 2 * e.containerWidth - e.contentWidth - e.scrollbarYLeft - e.scrollbarYOuterWidth) : (r.left = e.scrollbarYLeft + t.scrollLeft), l.css(e.scrollbarYRail, r), l.css(e.scrollbarX, { left: e.scrollbarXLeft, width: e.scrollbarXWidth - e.railBorderXWidth }), l.css(e.scrollbarY, { top: e.scrollbarYTop, height: e.scrollbarYHeight - e.railBorderYWidth }); } var i = t('../lib/class'), l = t('../lib/dom'), s = t('../lib/helper'), a = t('./instances'), c = t('./update-scroll'); e.exports = function (t) { var e = a.get(t); (e.containerWidth = t.clientWidth), (e.containerHeight = t.clientHeight), (e.contentWidth = t.scrollWidth), (e.contentHeight = t.scrollHeight); var n; t.contains(e.scrollbarXRail) || ((n = l.queryChildren(t, '.ps-scrollbar-x-rail')), n.length > 0 && n.forEach(function (t) { l.remove(t); }), l.appendTo(e.scrollbarXRail, t)), t.contains(e.scrollbarYRail) || ((n = l.queryChildren(t, '.ps-scrollbar-y-rail')), n.length > 0 && n.forEach(function (t) { l.remove(t); }), l.appendTo(e.scrollbarYRail, t)), !e.settings.suppressScrollX && e.containerWidth + e.settings.scrollXMarginOffset < e.contentWidth ? ((e.scrollbarXActive = !0), (e.railXWidth = e.containerWidth - e.railXMarginWidth), (e.railXRatio = e.containerWidth / e.railXWidth), (e.scrollbarXWidth = r(e, s.toInt((e.railXWidth * e.containerWidth) / e.contentWidth))), (e.scrollbarXLeft = s.toInt( ((e.negativeScrollAdjustment + t.scrollLeft) * (e.railXWidth - e.scrollbarXWidth)) / (e.contentWidth - e.containerWidth) ))) : (e.scrollbarXActive = !1), !e.settings.suppressScrollY && e.containerHeight + e.settings.scrollYMarginOffset < e.contentHeight ? ((e.scrollbarYActive = !0), (e.railYHeight = e.containerHeight - e.railYMarginHeight), (e.railYRatio = e.containerHeight / e.railYHeight), (e.scrollbarYHeight = r(e, s.toInt((e.railYHeight * e.containerHeight) / e.contentHeight))), (e.scrollbarYTop = s.toInt((t.scrollTop * (e.railYHeight - e.scrollbarYHeight)) / (e.contentHeight - e.containerHeight)))) : (e.scrollbarYActive = !1), e.scrollbarXLeft >= e.railXWidth - e.scrollbarXWidth && (e.scrollbarXLeft = e.railXWidth - e.scrollbarXWidth), e.scrollbarYTop >= e.railYHeight - e.scrollbarYHeight && (e.scrollbarYTop = e.railYHeight - e.scrollbarYHeight), o(t, e), e.scrollbarXActive ? i.add(t, 'ps-active-x') : (i.remove(t, 'ps-active-x'), (e.scrollbarXWidth = 0), (e.scrollbarXLeft = 0), c(t, 'left', 0)), e.scrollbarYActive ? i.add(t, 'ps-active-y') : (i.remove(t, 'ps-active-y'), (e.scrollbarYHeight = 0), (e.scrollbarYTop = 0), c(t, 'top', 0)); }; }, { '../lib/class': 2, '../lib/dom': 3, '../lib/helper': 6, './instances': 18, './update-scroll': 20 }, ], 20: [ function (t, e, n) { 'use strict'; var r, o, i = t('./instances'), l = document.createEvent('Event'), s = document.createEvent('Event'), a = document.createEvent('Event'), c = document.createEvent('Event'), u = document.createEvent('Event'), d = document.createEvent('Event'), p = document.createEvent('Event'), f = document.createEvent('Event'), h = document.createEvent('Event'), b = document.createEvent('Event'); l.initEvent('ps-scroll-up', !0, !0), s.initEvent('ps-scroll-down', !0, !0), a.initEvent('ps-scroll-left', !0, !0), c.initEvent('ps-scroll-right', !0, !0), u.initEvent('ps-scroll-y', !0, !0), d.initEvent('ps-scroll-x', !0, !0), p.initEvent('ps-x-reach-start', !0, !0), f.initEvent('ps-x-reach-end', !0, !0), h.initEvent('ps-y-reach-start', !0, !0), b.initEvent('ps-y-reach-end', !0, !0), (e.exports = function (t, e, n) { if ('undefined' == typeof t) throw 'You must provide an element to the update-scroll function'; if ('undefined' == typeof e) throw 'You must provide an axis to the update-scroll function'; if ('undefined' == typeof n) throw 'You must provide a value to the update-scroll function'; 'top' === e && 0 >= n && ((t.scrollTop = n = 0), t.dispatchEvent(h)), 'left' === e && 0 >= n && ((t.scrollLeft = n = 0), t.dispatchEvent(p)); var v = i.get(t); 'top' === e && n >= v.contentHeight - v.containerHeight && ((t.scrollTop = n = v.contentHeight - v.containerHeight), t.dispatchEvent(b)), 'left' === e && n >= v.contentWidth - v.containerWidth && ((t.scrollLeft = n = v.contentWidth - v.containerWidth), t.dispatchEvent(f)), r || (r = t.scrollTop), o || (o = t.scrollLeft), 'top' === e && r > n && t.dispatchEvent(l), 'top' === e && n > r && t.dispatchEvent(s), 'left' === e && o > n && t.dispatchEvent(a), 'left' === e && n > o && t.dispatchEvent(c), 'top' === e && ((t.scrollTop = r = n), t.dispatchEvent(u)), 'left' === e && ((t.scrollLeft = o = n), t.dispatchEvent(d)); }); }, { './instances': 18 }, ], 21: [ function (t, e, n) { 'use strict'; var r = t('../lib/dom'), o = t('../lib/helper'), i = t('./instances'), l = t('./update-geometry'), s = t('./update-scroll'); e.exports = function (t) { var e = i.get(t); e && ((e.negativeScrollAdjustment = e.isNegativeScroll ? t.scrollWidth - t.clientWidth : 0), r.css(e.scrollbarXRail, 'display', 'block'), r.css(e.scrollbarYRail, 'display', 'block'), (e.railXMarginWidth = o.toInt(r.css(e.scrollbarXRail, 'marginLeft')) + o.toInt(r.css(e.scrollbarXRail, 'marginRight'))), (e.railYMarginHeight = o.toInt(r.css(e.scrollbarYRail, 'marginTop')) + o.toInt(r.css(e.scrollbarYRail, 'marginBottom'))), r.css(e.scrollbarXRail, 'display', 'none'), r.css(e.scrollbarYRail, 'display', 'none'), l(t), s(t, 'top', t.scrollTop), s(t, 'left', t.scrollLeft), r.css(e.scrollbarXRail, 'display', ''), r.css(e.scrollbarYRail, 'display', '')); }; }, { '../lib/dom': 3, '../lib/helper': 6, './instances': 18, './update-geometry': 19, './update-scroll': 20 }, ], }, {}, [1] );