Socket
Socket
Sign inDemoInstall

react-custom-scrollbars

Package Overview
Dependencies
2
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.1 to 3.1.0

37

dist/react-custom-scrollbars.js

@@ -285,2 +285,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

onScrollStop: _react.PropTypes.func,
onUpdate: _react.PropTypes.func,
renderView: _react.PropTypes.func,

@@ -656,3 +657,3 @@ renderTrackHorizontal: _react.PropTypes.func,

var _refs8 = this.refs;
var view = _refs8.view;
var _view = _refs8.view;
var trackVertical = _refs8.trackVertical;

@@ -665,5 +666,5 @@

var thumbHeight = this.getThumbVerticalHeight();
var clickPosition = thumbHeight - this.prevPageY;
var offset = -trackTop + clientY - clickPosition;
view.scrollTop = this.getScrollTopForOffset(offset);
var _clickPosition = thumbHeight - this.prevPageY;
var _offset = -trackTop + clientY - _clickPosition;
_view.scrollTop = this.getScrollTopForOffset(_offset);
}

@@ -757,2 +758,4 @@ return false;

this.raf(function () {
var onUpdate = _this4.props.onUpdate;
var values = _this4.getValues();

@@ -790,2 +793,3 @@ if ((0, _getScrollbarWidth2["default"])()) {

}
if (onUpdate) onUpdate(values);
if (typeof callback !== 'function') return;

@@ -1219,13 +1223,13 @@ callback(values);

var now = __webpack_require__(16)
, global = typeof window === 'undefined' ? {} : window
/* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(16)
, root = typeof window === 'undefined' ? global : window
, vendors = ['moz', 'webkit']
, suffix = 'AnimationFrame'
, raf = global['request' + suffix]
, caf = global['cancel' + suffix] || global['cancelRequest' + suffix]
, raf = root['request' + suffix]
, caf = root['cancel' + suffix] || root['cancelRequest' + suffix]
for(var i = 0; i < vendors.length && !raf; i++) {
raf = global[vendors[i] + 'Request' + suffix]
caf = global[vendors[i] + 'Cancel' + suffix]
|| global[vendors[i] + 'CancelRequest' + suffix]
for(var i = 0; !raf && i < vendors.length; i++) {
raf = root[vendors[i] + 'Request' + suffix]
caf = root[vendors[i] + 'Cancel' + suffix]
|| root[vendors[i] + 'CancelRequest' + suffix]
}

@@ -1283,8 +1287,13 @@

// to the native rAF function
return raf.call(global, fn)
return raf.call(root, fn)
}
module.exports.cancel = function() {
caf.apply(global, arguments)
caf.apply(root, arguments)
}
module.exports.polyfill = function() {
root.requestAnimationFrame = raf
root.cancelAnimationFrame = caf
}
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))

@@ -1291,0 +1300,0 @@ /***/ },

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactCustomScrollbars=t(require("react")):e.ReactCustomScrollbars=t(e.React)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Scrollbars=void 0;var o=r(4),i=n(o);t["default"]=i["default"],t.Scrollbars=i["default"]},function(e,t,r){function n(e,t,r){var n=u[t];if("undefined"==typeof n&&(n=i(t)),n){if(void 0===r)return e.style[n];e.style[n]=c(n,r)}}function o(e,t){for(var r in t)t.hasOwnProperty(r)&&n(e,r,t[r])}function i(e){var t=s(e),r=a(t);return u[t]=u[e]=u[r]=r,r}function l(){2===arguments.length?o(arguments[0],arguments[1]):n(arguments[0],arguments[1],arguments[2])}var a=r(11),s=r(12),u={"float":"cssFloat"},c=r(10);e.exports=l,e.exports.set=l,e.exports.get=function(e,t){return Array.isArray(t)?t.reduce(function(t,r){return t[r]=n(e,r||""),t},{}):n(e,t||"")}},function(t,r){t.exports=e},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function i(e){return f["default"].createElement("div",e)}function l(e){var t=e.style,r=o(e,["style"]),n=c({},t,{right:2,bottom:2,left:2,borderRadius:3,cursor:"pointer"});return f["default"].createElement("div",c({style:n},r))}function a(e){var t=e.style,r=o(e,["style"]),n=c({},t,{right:2,bottom:2,top:2,borderRadius:3,cursor:"pointer"});return f["default"].createElement("div",c({style:n},r))}function s(e){var t=e.style,r=o(e,["style"]),n=c({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return f["default"].createElement("div",c({style:n},r))}function u(e){var t=e.style,r=o(e,["style"]),n=c({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return f["default"].createElement("div",c({style:n},r))}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.renderViewDefault=i,t.renderTrackHorizontalDefault=l,t.renderTrackVerticalDefault=a,t.renderThumbHorizontalDefault=s,t.renderThumbVerticalDefault=u;var d=r(2),f=n(d)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l=r(15),a=n(l),s=r(1),u=n(s),c=r(2),d=n(c),f=r(8),h=n(f),p=r(9),v=n(p),m=r(7),g=n(m),T=r(6),b=n(T),w=r(5),y=r(3);t["default"]=(0,c.createClass)({displayName:"Scrollbars",propTypes:{onScroll:c.PropTypes.func,onScrollFrame:c.PropTypes.func,onScrollStart:c.PropTypes.func,onScrollStop:c.PropTypes.func,renderView:c.PropTypes.func,renderTrackHorizontal:c.PropTypes.func,renderTrackVertical:c.PropTypes.func,renderThumbHorizontal:c.PropTypes.func,renderThumbVertical:c.PropTypes.func,autoHide:c.PropTypes.bool,autoHideTimeout:c.PropTypes.number,autoHideDuration:c.PropTypes.number,thumbSize:c.PropTypes.number,thumbMinSize:c.PropTypes.number,universal:c.PropTypes.bool,style:c.PropTypes.object,children:c.PropTypes.node},getDefaultProps:function(){return{renderView:y.renderViewDefault,renderTrackHorizontal:y.renderTrackHorizontalDefault,renderTrackVertical:y.renderTrackVerticalDefault,renderThumbHorizontal:y.renderThumbHorizontalDefault,renderThumbVertical:y.renderThumbVerticalDefault,autoHide:!1,autoHideTimeout:1e3,autoHideDuration:200,thumbMinSize:30,universal:!1}},getInitialState:function(){return{didMountUniversal:!1}},componentDidMount:function(){this.addListeners(),this.update(),this.componentDidMountUniversal()},componentDidMountUniversal:function(){var e=this.props.universal;e&&this.setState({didMountUniversal:!0})},componentDidUpdate:function(){this.update()},componentWillUnmount:function(){this.removeListeners(),(0,l.cancel)(this.requestFrame),clearTimeout(this.hideTracksTimeout),clearInterval(this.detectScrollingInterval)},getScrollLeft:function(){var e=this.refs.view;return e.scrollLeft},getScrollTop:function(){var e=this.refs.view;return e.scrollTop},getScrollWidth:function(){var e=this.refs.view;return e.scrollWidth},getScrollHeight:function(){var e=this.refs.view;return e.scrollHeight},getClientWidth:function(){var e=this.refs.view;return e.clientWidth},getClientHeight:function(){var e=this.refs.view;return e.clientHeight},getValues:function(){var e=this.refs.view,t=e.scrollLeft,r=e.scrollTop,n=e.scrollWidth,o=e.scrollHeight,i=e.clientWidth,l=e.clientHeight;return{left:t/(n-i)||0,top:r/(o-l)||0,scrollLeft:t,scrollTop:r,scrollWidth:n,scrollHeight:o,clientWidth:i,clientHeight:l}},getThumbHorizontalWidth:function(){var e=this.props,t=e.thumbSize,r=e.thumbMinSize,n=this.refs,o=n.view,i=n.trackHorizontal,l=o.scrollWidth,a=o.clientWidth,s=(0,g["default"])(i),u=a/l*s;return s===u?0:t?t:Math.max(u,r)},getThumbVerticalHeight:function(){var e=this.props,t=e.thumbSize,r=e.thumbMinSize,n=this.refs,o=n.view,i=n.trackVertical,l=o.scrollHeight,a=o.clientHeight,s=(0,b["default"])(i),u=a/l*s;return s===u?0:t?t:Math.max(u,r)},getScrollLeftForOffset:function(e){var t=this.refs,r=t.view,n=t.trackHorizontal,o=r.scrollWidth,i=r.clientWidth,l=(0,g["default"])(n),a=this.getThumbHorizontalWidth();return e/(l-a)*(o-i)},getScrollTopForOffset:function(e){var t=this.refs,r=t.view,n=t.trackVertical,o=r.scrollHeight,i=r.clientHeight,l=(0,b["default"])(n),a=this.getThumbVerticalHeight();return e/(l-a)*(o-i)},scrollLeft:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=this.refs.view;t.scrollLeft=e},scrollTop:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=this.refs.view;t.scrollTop=e},scrollToLeft:function(){var e=this.refs.view;e.scrollLeft=0},scrollToTop:function(){var e=this.refs.view;e.scrollTop=0},scrollToRight:function(){var e=this.refs.view;e.scrollLeft=e.scrollWidth},scrollToBottom:function(){var e=this.refs.view;e.scrollTop=e.scrollHeight},addListeners:function(){if("undefined"!=typeof document){var e=this.refs,t=e.view,r=e.trackHorizontal,n=e.trackVertical,o=e.thumbHorizontal,i=e.thumbVertical;t.addEventListener("scroll",this.handleScroll),(0,h["default"])()&&(r.addEventListener("mouseenter",this.handleTrackMouseEnter),r.addEventListener("mouseleave",this.handleTrackMouseLeave),r.addEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.addEventListener("mouseenter",this.handleTrackMouseEnter),n.addEventListener("mouseleave",this.handleTrackMouseLeave),n.addEventListener("mousedown",this.handleVerticalTrackMouseDown),o.addEventListener("mousedown",this.handleHorizontalThumbMouseDown),i.addEventListener("mousedown",this.handleVerticalThumbMouseDown),window.addEventListener("resize",this.handleWindowResize))}},removeListeners:function(){if("undefined"!=typeof document){var e=this.refs,t=e.view,r=e.trackHorizontal,n=e.trackVertical,o=e.thumbHorizontal,i=e.thumbVertical;t.removeEventListener("scroll",this.handleScroll),(0,h["default"])()&&(r.removeEventListener("mouseenter",this.handleTrackMouseEnter),r.removeEventListener("mouseleave",this.handleTrackMouseLeave),r.removeEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.removeEventListener("mouseenter",this.handleTrackMouseEnter),n.removeEventListener("mouseleave",this.handleTrackMouseLeave),n.removeEventListener("mousedown",this.handleVerticalTrackMouseDown),o.removeEventListener("mousedown",this.handleHorizontalThumbMouseDown),i.removeEventListener("mousedown",this.handleVerticalThumbMouseDown),window.removeEventListener("resize",this.handleWindowResize),this.teardownDragging())}},handleScroll:function(e){var t=this,r=this.props,n=r.onScroll,o=r.onScrollFrame;n&&n(e),this.update(function(e){var r=e.scrollLeft,n=e.scrollTop;t.viewScrollLeft=r,t.viewScrollTop=n,o&&o(e)}),this.detectScrolling()},handleScrollStart:function(){var e=this.props.onScrollStart;e&&e(),this.handleScrollStartAutoHide()},handleScrollStartAutoHide:function(){var e=this.props.autoHide;e&&this.showTracks()},handleScrollStop:function(){var e=this.props.onScrollStop;e&&e(),this.handleScrollStopAutoHide()},handleScrollStopAutoHide:function(){var e=this.props.autoHide;e&&this.hideTracks()},handleWindowResize:function(){this.update()},handleHorizontalTrackMouseDown:function(){var e=this.refs.view,t=event,r=t.target,n=t.clientX,o=r.getBoundingClientRect(),i=o.left,l=this.getThumbHorizontalWidth(),a=Math.abs(i-n)-l/2;e.scrollLeft=this.getScrollLeftForOffset(a)},handleVerticalTrackMouseDown:function(e){var t=this.refs.view,r=e.target,n=e.clientY,o=r.getBoundingClientRect(),i=o.top,l=this.getThumbVerticalHeight(),a=Math.abs(i-n)-l/2;t.scrollTop=this.getScrollTopForOffset(a)},handleHorizontalThumbMouseDown:function(e){this.handleDragStart(e);var t=e.target,r=e.clientX,n=t.offsetWidth,o=t.getBoundingClientRect(),i=o.left;this.prevPageX=n-(r-i)},handleVerticalThumbMouseDown:function(e){this.handleDragStart(e);var t=e.target,r=e.clientY,n=t.offsetHeight,o=t.getBoundingClientRect(),i=o.top;this.prevPageY=n-(r-i)},setupDragging:function(){(0,u["default"])(document.body,w.disableSelectStyle),document.addEventListener("mousemove",this.handleDrag),document.addEventListener("mouseup",this.handleDragEnd),document.onselectstart=v["default"]},teardownDragging:function(){(0,u["default"])(document.body,w.disableSelectStyleReset),document.removeEventListener("mousemove",this.handleDrag),document.removeEventListener("mouseup",this.handleDragEnd),document.onselectstart=void 0},handleDragStart:function(e){this.dragging=!0,e.stopImmediatePropagation(),this.setupDragging()},handleDrag:function(e){if(this.prevPageX){var t=e.clientX,r=this.refs,n=r.view,o=r.trackHorizontal,i=o.getBoundingClientRect(),l=i.left,a=this.getThumbHorizontalWidth(),s=a-this.prevPageX,u=-l+t-s;n.scrollLeft=this.getScrollLeftForOffset(u)}if(this.prevPageY){var c=e.clientY,d=this.refs,n=d.view,f=d.trackVertical,h=f.getBoundingClientRect(),p=h.top,v=this.getThumbVerticalHeight(),s=v-this.prevPageY,u=-p+c-s;n.scrollTop=this.getScrollTopForOffset(u)}return!1},handleDragEnd:function(){this.dragging=!1,this.prevPageX=this.prevPageY=0,this.teardownDragging(),this.handleDragEndAutoHide()},handleDragEndAutoHide:function(){var e=this.props.autoHide;e&&this.hideTracks()},handleTrackMouseEnter:function(){this.trackMouseOver=!0,this.handleTrackMouseEnterAutoHide()},handleTrackMouseEnterAutoHide:function(){var e=this.props.autoHide;e&&this.showTracks()},handleTrackMouseLeave:function(){this.trackMouseOver=!1,this.handleTrackMouseLeaveAutoHide()},handleTrackMouseLeaveAutoHide:function(){var e=this.props.autoHide;e&&this.hideTracks()},showTracks:function(){var e=this.refs,t=e.trackHorizontal,r=e.trackVertical;clearTimeout(this.hideTracksTimeout),(0,u["default"])(t,{opacity:1}),(0,u["default"])(r,{opacity:1})},hideTracks:function(){if(!this.dragging&&!this.scrolling&&!this.trackMouseOver){var e=this.props.autoHideTimeout,t=this.refs,r=t.trackHorizontal,n=t.trackVertical;clearTimeout(this.hideTracksTimeout),this.hideTracksTimeout=setTimeout(function(){(0,u["default"])(r,{opacity:0}),(0,u["default"])(n,{opacity:0})},e)}},detectScrolling:function(){var e=this;this.scrolling||(this.scrolling=!0,this.handleScrollStart(),this.detectScrollingInterval=setInterval(function(){e.lastViewScrollLeft===e.viewScrollLeft&&e.lastViewScrollTop===e.viewScrollTop&&(clearInterval(e.detectScrollingInterval),e.scrolling=!1,e.handleScrollStop()),e.lastViewScrollLeft=e.viewScrollLeft,e.lastViewScrollTop=e.viewScrollTop},100))},raf:function(e){var t=this;this.requestFrame&&a["default"].cancel(this.requestFrame),this.requestFrame=(0,a["default"])(function(){t.requestFrame=void 0,e()})},update:function(e){var t=this;this.raf(function(){var r=t.getValues();if((0,h["default"])()){var n=t.refs,o=n.thumbHorizontal,i=n.thumbVertical,l=n.trackHorizontal,a=n.trackVertical,s=r.scrollLeft,c=r.clientWidth,d=r.scrollWidth,f=(0,g["default"])(l),p=t.getThumbHorizontalWidth(),v=s/(d-c)*(f-p),m={width:p,transform:"translateX("+v+"px)"},T=r.scrollTop,w=r.clientHeight,y=r.scrollHeight,S=(0,b["default"])(a),H=t.getThumbVerticalHeight(),k=T/(y-w)*(S-H),D={height:H,transform:"translateY("+k+"px)"};(0,u["default"])(o,m),(0,u["default"])(i,D)}"function"==typeof e&&e(r)})},render:function(){var e=(0,h["default"])(),t=this.props,r=(t.onScroll,t.onScrollFrame,t.onScrollStart,t.onScrollStop,t.renderView),n=t.renderTrackHorizontal,l=t.renderTrackVertical,a=t.renderThumbHorizontal,s=t.renderThumbVertical,u=t.autoHide,f=(t.autoHideTimeout,t.autoHideDuration),p=(t.thumbSize,t.thumbMinSize,t.universal),v=t.style,m=t.children,g=o(t,["onScroll","onScrollFrame","onScrollStart","onScrollStop","renderView","renderTrackHorizontal","renderTrackVertical","renderThumbHorizontal","renderThumbVertical","autoHide","autoHideTimeout","autoHideDuration","thumbSize","thumbMinSize","universal","style","children"]),T=this.state.didMountUniversal,b=i({},w.containerStyleDefault,v),y=i({},w.viewStyleDefault,e?{right:-e,bottom:-e}:{right:0,bottom:0},p&&!T?w.viewStyleUniversalInitial:void 0),S=i({},w.trackHorizontalStyleDefault,u?{transition:"opacity "+f+"ms",opacity:0}:void 0,!e||p&&!T?{display:"none"}:void 0),H=i({},w.trackVerticalStyleDefault,u?{transition:"opacity "+f+"ms",opacity:0}:void 0,!e||p&&!T?{display:"none"}:void 0);return d["default"].createElement("div",i({},g,{style:b,ref:"container"}),(0,c.cloneElement)(r({style:y}),{ref:"view"},m),(0,c.cloneElement)(n({style:S}),{ref:"trackHorizontal"},(0,c.cloneElement)(a({style:w.thumbHorizontalStyleDefault}),{ref:"thumbHorizontal"})),(0,c.cloneElement)(l({style:H}),{ref:"trackVertical"},(0,c.cloneElement)(s({style:w.thumbVerticalStyleDefault}),{ref:"thumbVertical"})))}})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.containerStyleDefault={position:"relative",overflow:"hidden",width:"100%",height:"100%"},t.viewStyleDefault={position:"absolute",top:0,left:0,overflow:"scroll",WebkitOverflowScrolling:"touch"},t.viewStyleUniversalInitial={right:0,bottom:0,overflow:"hidden"},t.trackHorizontalStyleDefault={position:"absolute",height:6},t.trackVerticalStyleDefault={position:"absolute",width:6},t.thumbHorizontalStyleDefault={position:"relative",display:"block",height:"100%"},t.thumbVerticalStyleDefault={position:"relative",display:"block",width:"100%"},t.disableSelectStyle={userSelect:"none"},t.disableSelectStyleReset={userSelect:""}},function(e,t){"use strict";function r(e){var t=e.clientHeight,r=getComputedStyle(e),n=r.paddingTop,o=r.paddingBottom;return t-parseFloat(n)-parseFloat(o)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=r},function(e,t){"use strict";function r(e){var t=e.clientWidth,r=getComputedStyle(e),n=r.paddingLeft,o=r.paddingRight;return t-parseFloat(n)-parseFloat(o)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=r},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(){if(a!==!1)return a;if("undefined"!=typeof document){var e=document.createElement("div");(0,l["default"])(e,{width:100,height:100,position:"absolute",top:-9999,overflow:"scroll",MsOverflowStyle:"scrollbar"}),document.body.appendChild(e),a=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}else a=0;return a}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o;var i=r(1),l=n(i),a=!1},function(e,t){"use strict";function r(){return!1}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=r},function(e,t){var r={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};e.exports=function(e,t){return"number"!=typeof t||r[e]?t:t+"px"}},function(e,t){var r=null,n=["Webkit","Moz","O","ms"];e.exports=function(e){r||(r=document.createElement("div"));var t=r.style;if(e in t)return e;for(var o=e.charAt(0).toUpperCase()+e.slice(1),i=n.length;i>=0;i--){var l=n[i]+o;if(l in t)return l}return!1}},function(e,t,r){function n(e){return o(e).replace(/\s(\w)/g,function(e,t){return t.toUpperCase()})}var o=r(13);e.exports=n},function(e,t,r){function n(e){return o(e).replace(/[\W_]+(.|$)/g,function(e,t){return t?" "+t:""})}var o=r(14);e.exports=n},function(e,t){function r(e){return i.test(e)?e.toLowerCase():(a.test(e)&&(e=n(e)),l.test(e)&&(e=o(e)),e.toLowerCase())}function n(e){return e.replace(s,function(e,t){return t?" "+t:""})}function o(e){return e.replace(u,function(e,t,r){return t+" "+r.toLowerCase().split("").join(" ")})}e.exports=r;var i=/\s/,l=/[a-z][A-Z]/,a=/[\W_]/,s=/[\W_]+(.|$)/g,u=/(.)([A-Z]+)/g},function(e,t,r){for(var n=r(16),o="undefined"==typeof window?{}:window,i=["moz","webkit"],l="AnimationFrame",a=o["request"+l],s=o["cancel"+l]||o["cancelRequest"+l],u=0;u<i.length&&!a;u++)a=o[i[u]+"Request"+l],s=o[i[u]+"Cancel"+l]||o[i[u]+"CancelRequest"+l];if(!a||!s){var c=0,d=0,f=[],h=1e3/60;a=function(e){if(0===f.length){var t=n(),r=Math.max(0,h-(t-c));c=r+t,setTimeout(function(){var e=f.slice(0);f.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(r){setTimeout(function(){throw r},0)}},Math.round(r))}return f.push({handle:++d,callback:e,cancelled:!1}),d},s=function(e){for(var t=0;t<f.length;t++)f[t].handle===e&&(f[t].cancelled=!0)}}e.exports=function(e){return a.call(o,e)},e.exports.cancel=function(){s.apply(o,arguments)}},function(e,t,r){(function(t){(function(){var r,n,o;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(r()-o)/1e6},n=t.hrtime,r=function(){var e;return e=n(),1e9*e[0]+e[1]},o=r()):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(t,r(17))},function(e,t){function r(){u=!1,l.length?s=l.concat(s):c=-1,s.length&&n()}function n(){if(!u){var e=setTimeout(r);u=!0;for(var t=s.length;t;){for(l=s,s=[];++c<t;)l&&l[c].run();c=-1,t=s.length}l=null,u=!1,clearTimeout(e)}}function o(e,t){this.fun=e,this.array=t}function i(){}var l,a=e.exports={},s=[],u=!1,c=-1;a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];s.push(new o(e,t)),1!==s.length||u||setTimeout(n,0)},o.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=i,a.addListener=i,a.once=i,a.off=i,a.removeListener=i,a.removeAllListeners=i,a.emit=i,a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactCustomScrollbars=t(require("react")):e.ReactCustomScrollbars=t(e.React)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Scrollbars=void 0;var o=r(4),i=n(o);t["default"]=i["default"],t.Scrollbars=i["default"]},function(e,t,r){function n(e,t,r){var n=u[t];if("undefined"==typeof n&&(n=i(t)),n){if(void 0===r)return e.style[n];e.style[n]=c(n,r)}}function o(e,t){for(var r in t)t.hasOwnProperty(r)&&n(e,r,t[r])}function i(e){var t=s(e),r=a(t);return u[t]=u[e]=u[r]=r,r}function l(){2===arguments.length?o(arguments[0],arguments[1]):n(arguments[0],arguments[1],arguments[2])}var a=r(11),s=r(12),u={"float":"cssFloat"},c=r(10);e.exports=l,e.exports.set=l,e.exports.get=function(e,t){return Array.isArray(t)?t.reduce(function(t,r){return t[r]=n(e,r||""),t},{}):n(e,t||"")}},function(t,r){t.exports=e},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function i(e){return f["default"].createElement("div",e)}function l(e){var t=e.style,r=o(e,["style"]),n=c({},t,{right:2,bottom:2,left:2,borderRadius:3,cursor:"pointer"});return f["default"].createElement("div",c({style:n},r))}function a(e){var t=e.style,r=o(e,["style"]),n=c({},t,{right:2,bottom:2,top:2,borderRadius:3,cursor:"pointer"});return f["default"].createElement("div",c({style:n},r))}function s(e){var t=e.style,r=o(e,["style"]),n=c({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return f["default"].createElement("div",c({style:n},r))}function u(e){var t=e.style,r=o(e,["style"]),n=c({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return f["default"].createElement("div",c({style:n},r))}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.renderViewDefault=i,t.renderTrackHorizontalDefault=l,t.renderTrackVerticalDefault=a,t.renderThumbHorizontalDefault=s,t.renderThumbVerticalDefault=u;var d=r(2),f=n(d)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l=r(15),a=n(l),s=r(1),u=n(s),c=r(2),d=n(c),f=r(8),h=n(f),p=r(9),v=n(p),m=r(7),g=n(m),T=r(6),y=n(T),b=r(5),w=r(3);t["default"]=(0,c.createClass)({displayName:"Scrollbars",propTypes:{onScroll:c.PropTypes.func,onScrollFrame:c.PropTypes.func,onScrollStart:c.PropTypes.func,onScrollStop:c.PropTypes.func,onUpdate:c.PropTypes.func,renderView:c.PropTypes.func,renderTrackHorizontal:c.PropTypes.func,renderTrackVertical:c.PropTypes.func,renderThumbHorizontal:c.PropTypes.func,renderThumbVertical:c.PropTypes.func,autoHide:c.PropTypes.bool,autoHideTimeout:c.PropTypes.number,autoHideDuration:c.PropTypes.number,thumbSize:c.PropTypes.number,thumbMinSize:c.PropTypes.number,universal:c.PropTypes.bool,style:c.PropTypes.object,children:c.PropTypes.node},getDefaultProps:function(){return{renderView:w.renderViewDefault,renderTrackHorizontal:w.renderTrackHorizontalDefault,renderTrackVertical:w.renderTrackVerticalDefault,renderThumbHorizontal:w.renderThumbHorizontalDefault,renderThumbVertical:w.renderThumbVerticalDefault,autoHide:!1,autoHideTimeout:1e3,autoHideDuration:200,thumbMinSize:30,universal:!1}},getInitialState:function(){return{didMountUniversal:!1}},componentDidMount:function(){this.addListeners(),this.update(),this.componentDidMountUniversal()},componentDidMountUniversal:function(){var e=this.props.universal;e&&this.setState({didMountUniversal:!0})},componentDidUpdate:function(){this.update()},componentWillUnmount:function(){this.removeListeners(),(0,l.cancel)(this.requestFrame),clearTimeout(this.hideTracksTimeout),clearInterval(this.detectScrollingInterval)},getScrollLeft:function(){var e=this.refs.view;return e.scrollLeft},getScrollTop:function(){var e=this.refs.view;return e.scrollTop},getScrollWidth:function(){var e=this.refs.view;return e.scrollWidth},getScrollHeight:function(){var e=this.refs.view;return e.scrollHeight},getClientWidth:function(){var e=this.refs.view;return e.clientWidth},getClientHeight:function(){var e=this.refs.view;return e.clientHeight},getValues:function(){var e=this.refs.view,t=e.scrollLeft,r=e.scrollTop,n=e.scrollWidth,o=e.scrollHeight,i=e.clientWidth,l=e.clientHeight;return{left:t/(n-i)||0,top:r/(o-l)||0,scrollLeft:t,scrollTop:r,scrollWidth:n,scrollHeight:o,clientWidth:i,clientHeight:l}},getThumbHorizontalWidth:function(){var e=this.props,t=e.thumbSize,r=e.thumbMinSize,n=this.refs,o=n.view,i=n.trackHorizontal,l=o.scrollWidth,a=o.clientWidth,s=(0,g["default"])(i),u=a/l*s;return s===u?0:t?t:Math.max(u,r)},getThumbVerticalHeight:function(){var e=this.props,t=e.thumbSize,r=e.thumbMinSize,n=this.refs,o=n.view,i=n.trackVertical,l=o.scrollHeight,a=o.clientHeight,s=(0,y["default"])(i),u=a/l*s;return s===u?0:t?t:Math.max(u,r)},getScrollLeftForOffset:function(e){var t=this.refs,r=t.view,n=t.trackHorizontal,o=r.scrollWidth,i=r.clientWidth,l=(0,g["default"])(n),a=this.getThumbHorizontalWidth();return e/(l-a)*(o-i)},getScrollTopForOffset:function(e){var t=this.refs,r=t.view,n=t.trackVertical,o=r.scrollHeight,i=r.clientHeight,l=(0,y["default"])(n),a=this.getThumbVerticalHeight();return e/(l-a)*(o-i)},scrollLeft:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=this.refs.view;t.scrollLeft=e},scrollTop:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=this.refs.view;t.scrollTop=e},scrollToLeft:function(){var e=this.refs.view;e.scrollLeft=0},scrollToTop:function(){var e=this.refs.view;e.scrollTop=0},scrollToRight:function(){var e=this.refs.view;e.scrollLeft=e.scrollWidth},scrollToBottom:function(){var e=this.refs.view;e.scrollTop=e.scrollHeight},addListeners:function(){if("undefined"!=typeof document){var e=this.refs,t=e.view,r=e.trackHorizontal,n=e.trackVertical,o=e.thumbHorizontal,i=e.thumbVertical;t.addEventListener("scroll",this.handleScroll),(0,h["default"])()&&(r.addEventListener("mouseenter",this.handleTrackMouseEnter),r.addEventListener("mouseleave",this.handleTrackMouseLeave),r.addEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.addEventListener("mouseenter",this.handleTrackMouseEnter),n.addEventListener("mouseleave",this.handleTrackMouseLeave),n.addEventListener("mousedown",this.handleVerticalTrackMouseDown),o.addEventListener("mousedown",this.handleHorizontalThumbMouseDown),i.addEventListener("mousedown",this.handleVerticalThumbMouseDown),window.addEventListener("resize",this.handleWindowResize))}},removeListeners:function(){if("undefined"!=typeof document){var e=this.refs,t=e.view,r=e.trackHorizontal,n=e.trackVertical,o=e.thumbHorizontal,i=e.thumbVertical;t.removeEventListener("scroll",this.handleScroll),(0,h["default"])()&&(r.removeEventListener("mouseenter",this.handleTrackMouseEnter),r.removeEventListener("mouseleave",this.handleTrackMouseLeave),r.removeEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.removeEventListener("mouseenter",this.handleTrackMouseEnter),n.removeEventListener("mouseleave",this.handleTrackMouseLeave),n.removeEventListener("mousedown",this.handleVerticalTrackMouseDown),o.removeEventListener("mousedown",this.handleHorizontalThumbMouseDown),i.removeEventListener("mousedown",this.handleVerticalThumbMouseDown),window.removeEventListener("resize",this.handleWindowResize),this.teardownDragging())}},handleScroll:function(e){var t=this,r=this.props,n=r.onScroll,o=r.onScrollFrame;n&&n(e),this.update(function(e){var r=e.scrollLeft,n=e.scrollTop;t.viewScrollLeft=r,t.viewScrollTop=n,o&&o(e)}),this.detectScrolling()},handleScrollStart:function(){var e=this.props.onScrollStart;e&&e(),this.handleScrollStartAutoHide()},handleScrollStartAutoHide:function(){var e=this.props.autoHide;e&&this.showTracks()},handleScrollStop:function(){var e=this.props.onScrollStop;e&&e(),this.handleScrollStopAutoHide()},handleScrollStopAutoHide:function(){var e=this.props.autoHide;e&&this.hideTracks()},handleWindowResize:function(){this.update()},handleHorizontalTrackMouseDown:function(){var e=this.refs.view,t=event,r=t.target,n=t.clientX,o=r.getBoundingClientRect(),i=o.left,l=this.getThumbHorizontalWidth(),a=Math.abs(i-n)-l/2;e.scrollLeft=this.getScrollLeftForOffset(a)},handleVerticalTrackMouseDown:function(e){var t=this.refs.view,r=e.target,n=e.clientY,o=r.getBoundingClientRect(),i=o.top,l=this.getThumbVerticalHeight(),a=Math.abs(i-n)-l/2;t.scrollTop=this.getScrollTopForOffset(a)},handleHorizontalThumbMouseDown:function(e){this.handleDragStart(e);var t=e.target,r=e.clientX,n=t.offsetWidth,o=t.getBoundingClientRect(),i=o.left;this.prevPageX=n-(r-i)},handleVerticalThumbMouseDown:function(e){this.handleDragStart(e);var t=e.target,r=e.clientY,n=t.offsetHeight,o=t.getBoundingClientRect(),i=o.top;this.prevPageY=n-(r-i)},setupDragging:function(){(0,u["default"])(document.body,b.disableSelectStyle),document.addEventListener("mousemove",this.handleDrag),document.addEventListener("mouseup",this.handleDragEnd),document.onselectstart=v["default"]},teardownDragging:function(){(0,u["default"])(document.body,b.disableSelectStyleReset),document.removeEventListener("mousemove",this.handleDrag),document.removeEventListener("mouseup",this.handleDragEnd),document.onselectstart=void 0},handleDragStart:function(e){this.dragging=!0,e.stopImmediatePropagation(),this.setupDragging()},handleDrag:function(e){if(this.prevPageX){var t=e.clientX,r=this.refs,n=r.view,o=r.trackHorizontal,i=o.getBoundingClientRect(),l=i.left,a=this.getThumbHorizontalWidth(),s=a-this.prevPageX,u=-l+t-s;n.scrollLeft=this.getScrollLeftForOffset(u)}if(this.prevPageY){var c=e.clientY,d=this.refs,f=d.view,h=d.trackVertical,p=h.getBoundingClientRect(),v=p.top,m=this.getThumbVerticalHeight(),g=m-this.prevPageY,T=-v+c-g;f.scrollTop=this.getScrollTopForOffset(T)}return!1},handleDragEnd:function(){this.dragging=!1,this.prevPageX=this.prevPageY=0,this.teardownDragging(),this.handleDragEndAutoHide()},handleDragEndAutoHide:function(){var e=this.props.autoHide;e&&this.hideTracks()},handleTrackMouseEnter:function(){this.trackMouseOver=!0,this.handleTrackMouseEnterAutoHide()},handleTrackMouseEnterAutoHide:function(){var e=this.props.autoHide;e&&this.showTracks()},handleTrackMouseLeave:function(){this.trackMouseOver=!1,this.handleTrackMouseLeaveAutoHide()},handleTrackMouseLeaveAutoHide:function(){var e=this.props.autoHide;e&&this.hideTracks()},showTracks:function(){var e=this.refs,t=e.trackHorizontal,r=e.trackVertical;clearTimeout(this.hideTracksTimeout),(0,u["default"])(t,{opacity:1}),(0,u["default"])(r,{opacity:1})},hideTracks:function(){if(!this.dragging&&!this.scrolling&&!this.trackMouseOver){var e=this.props.autoHideTimeout,t=this.refs,r=t.trackHorizontal,n=t.trackVertical;clearTimeout(this.hideTracksTimeout),this.hideTracksTimeout=setTimeout(function(){(0,u["default"])(r,{opacity:0}),(0,u["default"])(n,{opacity:0})},e)}},detectScrolling:function(){var e=this;this.scrolling||(this.scrolling=!0,this.handleScrollStart(),this.detectScrollingInterval=setInterval(function(){e.lastViewScrollLeft===e.viewScrollLeft&&e.lastViewScrollTop===e.viewScrollTop&&(clearInterval(e.detectScrollingInterval),e.scrolling=!1,e.handleScrollStop()),e.lastViewScrollLeft=e.viewScrollLeft,e.lastViewScrollTop=e.viewScrollTop},100))},raf:function(e){var t=this;this.requestFrame&&a["default"].cancel(this.requestFrame),this.requestFrame=(0,a["default"])(function(){t.requestFrame=void 0,e()})},update:function(e){var t=this;this.raf(function(){var r=t.props.onUpdate,n=t.getValues();if((0,h["default"])()){var o=t.refs,i=o.thumbHorizontal,l=o.thumbVertical,a=o.trackHorizontal,s=o.trackVertical,c=n.scrollLeft,d=n.clientWidth,f=n.scrollWidth,p=(0,g["default"])(a),v=t.getThumbHorizontalWidth(),m=c/(f-d)*(p-v),T={width:v,transform:"translateX("+m+"px)"},b=n.scrollTop,w=n.clientHeight,S=n.scrollHeight,H=(0,y["default"])(s),k=t.getThumbVerticalHeight(),D=b/(S-w)*(H-k),L={height:k,transform:"translateY("+D+"px)"};(0,u["default"])(i,T),(0,u["default"])(l,L)}r&&r(n),"function"==typeof e&&e(n)})},render:function(){var e=(0,h["default"])(),t=this.props,r=(t.onScroll,t.onScrollFrame,t.onScrollStart,t.onScrollStop,t.renderView),n=t.renderTrackHorizontal,l=t.renderTrackVertical,a=t.renderThumbHorizontal,s=t.renderThumbVertical,u=t.autoHide,f=(t.autoHideTimeout,t.autoHideDuration),p=(t.thumbSize,t.thumbMinSize,t.universal),v=t.style,m=t.children,g=o(t,["onScroll","onScrollFrame","onScrollStart","onScrollStop","renderView","renderTrackHorizontal","renderTrackVertical","renderThumbHorizontal","renderThumbVertical","autoHide","autoHideTimeout","autoHideDuration","thumbSize","thumbMinSize","universal","style","children"]),T=this.state.didMountUniversal,y=i({},b.containerStyleDefault,v),w=i({},b.viewStyleDefault,e?{right:-e,bottom:-e}:{right:0,bottom:0},p&&!T?b.viewStyleUniversalInitial:void 0),S=i({},b.trackHorizontalStyleDefault,u?{transition:"opacity "+f+"ms",opacity:0}:void 0,!e||p&&!T?{display:"none"}:void 0),H=i({},b.trackVerticalStyleDefault,u?{transition:"opacity "+f+"ms",opacity:0}:void 0,!e||p&&!T?{display:"none"}:void 0);return d["default"].createElement("div",i({},g,{style:y,ref:"container"}),(0,c.cloneElement)(r({style:w}),{ref:"view"},m),(0,c.cloneElement)(n({style:S}),{ref:"trackHorizontal"},(0,c.cloneElement)(a({style:b.thumbHorizontalStyleDefault}),{ref:"thumbHorizontal"})),(0,c.cloneElement)(l({style:H}),{ref:"trackVertical"},(0,c.cloneElement)(s({style:b.thumbVerticalStyleDefault}),{ref:"thumbVertical"})))}})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.containerStyleDefault={position:"relative",overflow:"hidden",width:"100%",height:"100%"},t.viewStyleDefault={position:"absolute",top:0,left:0,overflow:"scroll",WebkitOverflowScrolling:"touch"},t.viewStyleUniversalInitial={right:0,bottom:0,overflow:"hidden"},t.trackHorizontalStyleDefault={position:"absolute",height:6},t.trackVerticalStyleDefault={position:"absolute",width:6},t.thumbHorizontalStyleDefault={position:"relative",display:"block",height:"100%"},t.thumbVerticalStyleDefault={position:"relative",display:"block",width:"100%"},t.disableSelectStyle={userSelect:"none"},t.disableSelectStyleReset={userSelect:""}},function(e,t){"use strict";function r(e){var t=e.clientHeight,r=getComputedStyle(e),n=r.paddingTop,o=r.paddingBottom;return t-parseFloat(n)-parseFloat(o)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=r},function(e,t){"use strict";function r(e){var t=e.clientWidth,r=getComputedStyle(e),n=r.paddingLeft,o=r.paddingRight;return t-parseFloat(n)-parseFloat(o)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=r},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(){if(a!==!1)return a;if("undefined"!=typeof document){var e=document.createElement("div");(0,l["default"])(e,{width:100,height:100,position:"absolute",top:-9999,overflow:"scroll",MsOverflowStyle:"scrollbar"}),document.body.appendChild(e),a=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}else a=0;return a}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o;var i=r(1),l=n(i),a=!1},function(e,t){"use strict";function r(){return!1}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=r},function(e,t){var r={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};e.exports=function(e,t){return"number"!=typeof t||r[e]?t:t+"px"}},function(e,t){var r=null,n=["Webkit","Moz","O","ms"];e.exports=function(e){r||(r=document.createElement("div"));var t=r.style;if(e in t)return e;for(var o=e.charAt(0).toUpperCase()+e.slice(1),i=n.length;i>=0;i--){var l=n[i]+o;if(l in t)return l}return!1}},function(e,t,r){function n(e){return o(e).replace(/\s(\w)/g,function(e,t){return t.toUpperCase()})}var o=r(13);e.exports=n},function(e,t,r){function n(e){return o(e).replace(/[\W_]+(.|$)/g,function(e,t){return t?" "+t:""})}var o=r(14);e.exports=n},function(e,t){function r(e){return i.test(e)?e.toLowerCase():(a.test(e)&&(e=n(e)),l.test(e)&&(e=o(e)),e.toLowerCase())}function n(e){return e.replace(s,function(e,t){return t?" "+t:""})}function o(e){return e.replace(u,function(e,t,r){return t+" "+r.toLowerCase().split("").join(" ")})}e.exports=r;var i=/\s/,l=/[a-z][A-Z]/,a=/[\W_]/,s=/[\W_]+(.|$)/g,u=/(.)([A-Z]+)/g},function(e,t,r){(function(t){for(var n=r(16),o="undefined"==typeof window?t:window,i=["moz","webkit"],l="AnimationFrame",a=o["request"+l],s=o["cancel"+l]||o["cancelRequest"+l],u=0;!a&&u<i.length;u++)a=o[i[u]+"Request"+l],s=o[i[u]+"Cancel"+l]||o[i[u]+"CancelRequest"+l];if(!a||!s){var c=0,d=0,f=[],h=1e3/60;a=function(e){if(0===f.length){var t=n(),r=Math.max(0,h-(t-c));c=r+t,setTimeout(function(){var e=f.slice(0);f.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(r){setTimeout(function(){throw r},0)}},Math.round(r))}return f.push({handle:++d,callback:e,cancelled:!1}),d},s=function(e){for(var t=0;t<f.length;t++)f[t].handle===e&&(f[t].cancelled=!0)}}e.exports=function(e){return a.call(o,e)},e.exports.cancel=function(){s.apply(o,arguments)},e.exports.polyfill=function(){o.requestAnimationFrame=a,o.cancelAnimationFrame=s}}).call(t,function(){return this}())},function(e,t,r){(function(t){(function(){var r,n,o;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(r()-o)/1e6},n=t.hrtime,r=function(){var e;return e=n(),1e9*e[0]+e[1]},o=r()):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(t,r(17))},function(e,t){function r(){u=!1,l.length?s=l.concat(s):c=-1,s.length&&n()}function n(){if(!u){var e=setTimeout(r);u=!0;for(var t=s.length;t;){for(l=s,s=[];++c<t;)l&&l[c].run();c=-1,t=s.length}l=null,u=!1,clearTimeout(e)}}function o(e,t){this.fun=e,this.array=t}function i(){}var l,a=e.exports={},s=[],u=!1,c=-1;a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];s.push(new o(e,t)),1!==s.length||u||setTimeout(n,0)},o.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=i,a.addListener=i,a.once=i,a.off=i,a.removeListener=i,a.removeAllListeners=i,a.emit=i,a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}}])});

@@ -22,2 +22,4 @@ # API

* `onScrollStop` (Function) Called when scrolling stops
* `onUpdate` (Function) Called when ever the component is updated. Runs inside the animation frame
* Signature: `onUpdate(values)`
* `renderView`: (Function) The element your content will be rendered in

@@ -24,0 +26,0 @@ * `renderTrackHorizontal`: (Function) Horizontal track element

@@ -54,2 +54,3 @@ 'use strict';

onScrollStop: _react.PropTypes.func,
onUpdate: _react.PropTypes.func,
renderView: _react.PropTypes.func,

@@ -425,3 +426,3 @@ renderTrackHorizontal: _react.PropTypes.func,

var _refs8 = this.refs;
var view = _refs8.view;
var _view = _refs8.view;
var trackVertical = _refs8.trackVertical;

@@ -434,5 +435,5 @@

var thumbHeight = this.getThumbVerticalHeight();
var clickPosition = thumbHeight - this.prevPageY;
var offset = -trackTop + clientY - clickPosition;
view.scrollTop = this.getScrollTopForOffset(offset);
var _clickPosition = thumbHeight - this.prevPageY;
var _offset = -trackTop + clientY - _clickPosition;
_view.scrollTop = this.getScrollTopForOffset(_offset);
}

@@ -526,2 +527,4 @@ return false;

this.raf(function () {
var onUpdate = _this4.props.onUpdate;
var values = _this4.getValues();

@@ -559,2 +562,3 @@ if ((0, _getScrollbarWidth2["default"])()) {

}
if (onUpdate) onUpdate(values);
if (typeof callback !== 'function') return;

@@ -561,0 +565,0 @@ callback(values);

{
"name": "react-custom-scrollbars",
"version": "3.0.1",
"version": "3.1.0",
"description": "React scrollbars component",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -24,2 +24,6 @@ react-custom-scrollbars

This assumes that you’re using [npm](http://npmjs.com/) package manager with a module bundler like [Webpack](http://webpack.github.io) or [Browserify](http://browserify.org/) to consume [CommonJS modules](http://webpack.github.io/docs/commonjs.html).
If you don’t yet use [npm](http://npmjs.com/) or a modern module bundler, and would rather prefer a single-file [UMD](https://github.com/umdjs/umd) build that makes `ReactCustomScrollbars` available as a global object, you can grab a pre-built version from [npmcdn](https://npmcdn.com/react-custom-scrollbars@3.0.1/dist/react-custom-scrollbars.js). We *don’t* recommend this approach for any serious application, as most of the libraries complementary to `react-custom-scrollbars` are only available on [npm](http://npmjs.com/).
## Usage

@@ -56,2 +60,3 @@

onScrollStop={this.handleScrollStop}
onUpdate={this.handleUpdate}
renderView={this.renderView}

@@ -58,0 +63,0 @@ renderTrackHorizontal={this.renderTrackHorizontal}

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc