Socket
Socket
Sign inDemoInstall

react-custom-scrollbars

Package Overview
Dependencies
16
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.2 to 4.2.0

2

dist/react-custom-scrollbars.min.js

@@ -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(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Scrollbars=void 0;var o=n(5),i=r(o);t["default"]=i["default"],t.Scrollbars=i["default"]},function(e,t,n){function r(e,t,n){var r=c[t];if("undefined"==typeof r&&(r=i(t)),r){if(void 0===n)return e.style[r];e.style[r]=s(r,n)}}function o(e,t){for(var n in t)t.hasOwnProperty(n)&&r(e,n,t[n])}function i(e){var t=u(e),n=a(t);return c[t]=c[e]=c[n]=n,n}function l(){2===arguments.length?"string"==typeof arguments[1]?arguments[0].style.cssText=arguments[1]:o(arguments[0],arguments[1]):r(arguments[0],arguments[1],arguments[2])}var a=n(15),u=n(21),c={"float":"cssFloat"},s=n(3);e.exports=l,e.exports.set=l,e.exports.get=function(e,t){return Array.isArray(t)?t.reduce(function(t,n){return t[n]=r(e,n||""),t},{}):r(e,t||"")}},function(t,n){t.exports=e},function(e,t){var n={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||n[e]?t:t+"px"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){return h["default"].createElement("div",e)}function l(e){var t=e.style,n=o(e,["style"]),r=s({},t,{right:2,bottom:2,left:2,borderRadius:3});return h["default"].createElement("div",s({style:r},n))}function a(e){var t=e.style,n=o(e,["style"]),r=s({},t,{right:2,bottom:2,top:2,borderRadius:3});return h["default"].createElement("div",s({style:r},n))}function u(e){var t=e.style,n=o(e,["style"]),r=s({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return h["default"].createElement("div",s({style:r},n))}function c(e){var t=e.style,n=o(e,["style"]),r=s({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return h["default"].createElement("div",s({style:r},n))}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.renderViewDefault=i,t.renderTrackHorizontalDefault=l,t.renderTrackVerticalDefault=a,t.renderThumbHorizontalDefault=u,t.renderThumbVerticalDefault=c;var d=n(2),h=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(20),d=r(s),h=n(1),f=r(h),v=n(2),p=n(18),m=r(p),g=n(10),y=r(g),b=n(9),T=r(b),k=n(11),w=r(k),S=n(8),H=r(S),M=n(7),D=r(M),L=n(6),z=n(4),E=function(e){function t(e){var n;i(this,t);for(var r=arguments.length,o=Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];var u=l(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this,e].concat(o)));return u.getScrollLeft=u.getScrollLeft.bind(u),u.getScrollTop=u.getScrollTop.bind(u),u.getScrollWidth=u.getScrollWidth.bind(u),u.getScrollHeight=u.getScrollHeight.bind(u),u.getClientWidth=u.getClientWidth.bind(u),u.getClientHeight=u.getClientHeight.bind(u),u.getValues=u.getValues.bind(u),u.getThumbHorizontalWidth=u.getThumbHorizontalWidth.bind(u),u.getThumbVerticalHeight=u.getThumbVerticalHeight.bind(u),u.getScrollLeftForOffset=u.getScrollLeftForOffset.bind(u),u.getScrollTopForOffset=u.getScrollTopForOffset.bind(u),u.scrollLeft=u.scrollLeft.bind(u),u.scrollTop=u.scrollTop.bind(u),u.scrollToLeft=u.scrollToLeft.bind(u),u.scrollToTop=u.scrollToTop.bind(u),u.scrollToRight=u.scrollToRight.bind(u),u.scrollToBottom=u.scrollToBottom.bind(u),u.handleTrackMouseEnter=u.handleTrackMouseEnter.bind(u),u.handleTrackMouseLeave=u.handleTrackMouseLeave.bind(u),u.handleHorizontalTrackMouseDown=u.handleHorizontalTrackMouseDown.bind(u),u.handleVerticalTrackMouseDown=u.handleVerticalTrackMouseDown.bind(u),u.handleHorizontalThumbMouseDown=u.handleHorizontalThumbMouseDown.bind(u),u.handleVerticalThumbMouseDown=u.handleVerticalThumbMouseDown.bind(u),u.handleWindowResize=u.handleWindowResize.bind(u),u.handleScroll=u.handleScroll.bind(u),u.handleDrag=u.handleDrag.bind(u),u.handleDragEnd=u.handleDragEnd.bind(u),u.state={didMountUniversal:!1},u}return a(t,e),c(t,[{key:"componentDidMount",value:function(){this.addListeners(),this.update(),this.componentDidMountUniversal()}},{key:"componentDidMountUniversal",value:function(){var e=this.props.universal;e&&this.setState({didMountUniversal:!0})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"componentWillUnmount",value:function(){this.removeListeners(),(0,s.cancel)(this.requestFrame),clearTimeout(this.hideTracksTimeout),clearInterval(this.detectScrollingInterval)}},{key:"getScrollLeft",value:function(){return this.view.scrollLeft}},{key:"getScrollTop",value:function(){return this.view.scrollTop}},{key:"getScrollWidth",value:function(){return this.view.scrollWidth}},{key:"getScrollHeight",value:function(){return this.view.scrollHeight}},{key:"getClientWidth",value:function(){return this.view.clientWidth}},{key:"getClientHeight",value:function(){return this.view.clientHeight}},{key:"getValues",value:function(){var e=this.view,t=e.scrollLeft,n=e.scrollTop,r=e.scrollWidth,o=e.scrollHeight,i=e.clientWidth,l=e.clientHeight;return{left:t/(r-i)||0,top:n/(o-l)||0,scrollLeft:t,scrollTop:n,scrollWidth:r,scrollHeight:o,clientWidth:i,clientHeight:l}}},{key:"getThumbHorizontalWidth",value:function(){var e=this.props,t=e.thumbSize,n=e.thumbMinSize,r=this.view,o=r.scrollWidth,i=r.clientWidth,l=(0,H["default"])(this.trackHorizontal),a=Math.ceil(i/o*l);return l===a?0:t?t:Math.max(a,n)}},{key:"getThumbVerticalHeight",value:function(){var e=this.props,t=e.thumbSize,n=e.thumbMinSize,r=this.view,o=r.scrollHeight,i=r.clientHeight,l=(0,D["default"])(this.trackVertical),a=Math.ceil(i/o*l);return l===a?0:t?t:Math.max(a,n)}},{key:"getScrollLeftForOffset",value:function(e){var t=this.view,n=t.scrollWidth,r=t.clientWidth,o=(0,H["default"])(this.trackHorizontal),i=this.getThumbHorizontalWidth();return e/(o-i)*(n-r)}},{key:"getScrollTopForOffset",value:function(e){var t=this.view,n=t.scrollHeight,r=t.clientHeight,o=(0,D["default"])(this.trackVertical),i=this.getThumbVerticalHeight();return e/(o-i)*(n-r)}},{key:"scrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.view.scrollLeft=e}},{key:"scrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.view.scrollTop=e}},{key:"scrollToLeft",value:function(){this.view.scrollLeft=0}},{key:"scrollToTop",value:function(){this.view.scrollTop=0}},{key:"scrollToRight",value:function(){this.view.scrollLeft=this.view.scrollWidth}},{key:"scrollToBottom",value:function(){this.view.scrollTop=this.view.scrollHeight}},{key:"addListeners",value:function(){if("undefined"!=typeof document){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,r=this.thumbHorizontal,o=this.thumbVertical;e.addEventListener("scroll",this.handleScroll),(0,T["default"])()&&(t.addEventListener("mouseenter",this.handleTrackMouseEnter),t.addEventListener("mouseleave",this.handleTrackMouseLeave),t.addEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.addEventListener("mouseenter",this.handleTrackMouseEnter),n.addEventListener("mouseleave",this.handleTrackMouseLeave),n.addEventListener("mousedown",this.handleVerticalTrackMouseDown),r.addEventListener("mousedown",this.handleHorizontalThumbMouseDown),o.addEventListener("mousedown",this.handleVerticalThumbMouseDown),window.addEventListener("resize",this.handleWindowResize))}}},{key:"removeListeners",value:function(){if("undefined"!=typeof document){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,r=this.thumbHorizontal,o=this.thumbVertical;e.removeEventListener("scroll",this.handleScroll),(0,T["default"])()&&(t.removeEventListener("mouseenter",this.handleTrackMouseEnter),t.removeEventListener("mouseleave",this.handleTrackMouseLeave),t.removeEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.removeEventListener("mouseenter",this.handleTrackMouseEnter),n.removeEventListener("mouseleave",this.handleTrackMouseLeave),n.removeEventListener("mousedown",this.handleVerticalTrackMouseDown),r.removeEventListener("mousedown",this.handleHorizontalThumbMouseDown),o.removeEventListener("mousedown",this.handleVerticalThumbMouseDown),window.removeEventListener("resize",this.handleWindowResize),this.teardownDragging())}}},{key:"handleScroll",value:function(e){var t=this,n=this.props,r=n.onScroll,o=n.onScrollFrame;r&&r(e),this.update(function(e){var n=e.scrollLeft,r=e.scrollTop;t.viewScrollLeft=n,t.viewScrollTop=r,o&&o(e)}),this.detectScrolling()}},{key:"handleScrollStart",value:function(){var e=this.props.onScrollStart;e&&e(),this.handleScrollStartAutoHide()}},{key:"handleScrollStartAutoHide",value:function(){var e=this.props.autoHide;e&&this.showTracks()}},{key:"handleScrollStop",value:function(){var e=this.props.onScrollStop;e&&e(),this.handleScrollStopAutoHide()}},{key:"handleScrollStopAutoHide",value:function(){var e=this.props.autoHide;e&&this.hideTracks()}},{key:"handleWindowResize",value:function(){this.update()}},{key:"handleHorizontalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,n=e.clientX,r=t.getBoundingClientRect(),o=r.left,i=this.getThumbHorizontalWidth(),l=Math.abs(o-n)-i/2;this.view.scrollLeft=this.getScrollLeftForOffset(l)}},{key:"handleVerticalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,n=e.clientY,r=t.getBoundingClientRect(),o=r.top,i=this.getThumbVerticalHeight(),l=Math.abs(o-n)-i/2;this.view.scrollTop=this.getScrollTopForOffset(l)}},{key:"handleHorizontalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientX,r=t.offsetWidth,o=t.getBoundingClientRect(),i=o.left;this.prevPageX=r-(n-i)}},{key:"handleVerticalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientY,r=t.offsetHeight,o=t.getBoundingClientRect(),i=o.top;this.prevPageY=r-(n-i)}},{key:"setupDragging",value:function(){(0,f["default"])(document.body,L.disableSelectStyle),document.addEventListener("mousemove",this.handleDrag),document.addEventListener("mouseup",this.handleDragEnd),document.onselectstart=w["default"]}},{key:"teardownDragging",value:function(){(0,f["default"])(document.body,L.disableSelectStyleReset),document.removeEventListener("mousemove",this.handleDrag),document.removeEventListener("mouseup",this.handleDragEnd),document.onselectstart=void 0}},{key:"handleDragStart",value:function(e){this.dragging=!0,e.stopImmediatePropagation(),this.setupDragging()}},{key:"handleDrag",value:function(e){if(this.prevPageX){var t=e.clientX,n=this.trackHorizontal.getBoundingClientRect(),r=n.left,o=this.getThumbHorizontalWidth(),i=o-this.prevPageX,l=-r+t-i;this.view.scrollLeft=this.getScrollLeftForOffset(l)}if(this.prevPageY){var a=e.clientY,u=this.trackVertical.getBoundingClientRect(),c=u.top,s=this.getThumbVerticalHeight(),d=s-this.prevPageY,h=-c+a-d;this.view.scrollTop=this.getScrollTopForOffset(h)}return!1}},{key:"handleDragEnd",value:function(){this.dragging=!1,this.prevPageX=this.prevPageY=0,this.teardownDragging(),this.handleDragEndAutoHide()}},{key:"handleDragEndAutoHide",value:function(){var e=this.props.autoHide;e&&this.hideTracks()}},{key:"handleTrackMouseEnter",value:function(){this.trackMouseOver=!0,this.handleTrackMouseEnterAutoHide()}},{key:"handleTrackMouseEnterAutoHide",value:function(){var e=this.props.autoHide;e&&this.showTracks()}},{key:"handleTrackMouseLeave",value:function(){this.trackMouseOver=!1,this.handleTrackMouseLeaveAutoHide()}},{key:"handleTrackMouseLeaveAutoHide",value:function(){var e=this.props.autoHide;e&&this.hideTracks()}},{key:"showTracks",value:function(){clearTimeout(this.hideTracksTimeout),(0,f["default"])(this.trackHorizontal,{opacity:1}),(0,f["default"])(this.trackVertical,{opacity:1})}},{key:"hideTracks",value:function(){var e=this;if(!this.dragging&&!this.scrolling&&!this.trackMouseOver){var t=this.props.autoHideTimeout;clearTimeout(this.hideTracksTimeout),this.hideTracksTimeout=setTimeout(function(){(0,f["default"])(e.trackHorizontal,{opacity:0}),(0,f["default"])(e.trackVertical,{opacity:0})},t)}}},{key:"detectScrolling",value: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))}},{key:"raf",value:function(e){var t=this;this.requestFrame&&d["default"].cancel(this.requestFrame),this.requestFrame=(0,d["default"])(function(){t.requestFrame=void 0,e()})}},{key:"update",value:function(e){var t=this;this.raf(function(){return t._update(e)})}},{key:"_update",value:function(e){var t=this.props,n=t.onUpdate,r=t.hideTracksWhenNotNeeded,o=this.getValues();if((0,T["default"])()){var i=o.scrollLeft,l=o.clientWidth,a=o.scrollWidth,u=(0,H["default"])(this.trackHorizontal),c=this.getThumbHorizontalWidth(),s=i/(a-l)*(u-c),d={width:c,transform:"translateX("+s+"px)"},h=o.scrollTop,v=o.clientHeight,p=o.scrollHeight,m=(0,D["default"])(this.trackVertical),g=this.getThumbVerticalHeight(),y=h/(p-v)*(m-g),b={height:g,transform:"translateY("+y+"px)"};if(r){var k={visibility:a>l?"visible":"hidden"},w={visibility:p>v?"visible":"hidden"};(0,f["default"])(this.trackHorizontal,k),(0,f["default"])(this.trackVertical,w)}(0,f["default"])(this.thumbHorizontal,d),(0,f["default"])(this.thumbVertical,b)}n&&n(o),"function"==typeof e&&e(o)}},{key:"render",value:function(){var e=this,t=(0,T["default"])(),n=this.props,r=(n.onScroll,n.onScrollFrame,n.onScrollStart,n.onScrollStop,n.onUpdate,n.renderView),i=n.renderTrackHorizontal,l=n.renderTrackVertical,a=n.renderThumbHorizontal,c=n.renderThumbVertical,s=n.tagName,d=(n.hideTracksWhenNotNeeded,n.autoHide),h=(n.autoHideTimeout,n.autoHideDuration),f=(n.thumbSize,n.thumbMinSize,n.universal),p=n.autoHeight,m=n.autoHeightMin,g=n.autoHeightMax,b=n.style,k=n.children,w=o(n,["onScroll","onScrollFrame","onScrollStart","onScrollStop","onUpdate","renderView","renderTrackHorizontal","renderTrackVertical","renderThumbHorizontal","renderThumbVertical","tagName","hideTracksWhenNotNeeded","autoHide","autoHideTimeout","autoHideDuration","thumbSize","thumbMinSize","universal","autoHeight","autoHeightMin","autoHeightMax","style","children"]),S=this.state.didMountUniversal,H=u({},L.containerStyleDefault,p&&u({},L.containerStyleAutoHeight,{minHeight:m,maxHeight:g}),b),M=u({},L.viewStyleDefault,{marginRight:t?-t:0,marginBottom:t?-t:0},p&&u({},L.viewStyleAutoHeight,{minHeight:(0,y["default"])(m)?"calc("+m+" + "+t+"px)":m+t,maxHeight:(0,y["default"])(g)?"calc("+g+" + "+t+"px)":g+t}),p&&f&&!S&&{minHeight:m,maxHeight:g},f&&!S&&L.viewStyleUniversalInitial),D={transition:"opacity "+h+"ms",opacity:0},z=u({},L.trackHorizontalStyleDefault,d&&D,(!t||f&&!S)&&{display:"none"}),E=u({},L.trackVerticalStyleDefault,d&&D,(!t||f&&!S)&&{display:"none"});return(0,v.createElement)(s,u({},w,{style:H,ref:function(t){e.container=t}}),[(0,v.cloneElement)(r({style:M}),{key:"view",ref:function(t){e.view=t}},k),(0,v.cloneElement)(i({style:z}),{key:"trackHorizontal",ref:function(t){e.trackHorizontal=t}},(0,v.cloneElement)(a({style:L.thumbHorizontalStyleDefault}),{ref:function(t){e.thumbHorizontal=t}})),(0,v.cloneElement)(l({style:E}),{key:"trackVertical",ref:function(t){e.trackVertical=t}},(0,v.cloneElement)(c({style:L.thumbVerticalStyleDefault}),{ref:function(t){e.thumbVertical=t}}))])}}]),t}(v.Component);t["default"]=E,E.propTypes={onScroll:m["default"].func,onScrollFrame:m["default"].func,onScrollStart:m["default"].func,onScrollStop:m["default"].func,onUpdate:m["default"].func,renderView:m["default"].func,renderTrackHorizontal:m["default"].func,renderTrackVertical:m["default"].func,renderThumbHorizontal:m["default"].func,renderThumbVertical:m["default"].func,tagName:m["default"].string,thumbSize:m["default"].number,thumbMinSize:m["default"].number,hideTracksWhenNotNeeded:m["default"].bool,autoHide:m["default"].bool,autoHideTimeout:m["default"].number,autoHideDuration:m["default"].number,autoHeight:m["default"].bool,autoHeightMin:m["default"].oneOfType([m["default"].number,m["default"].string]),autoHeightMax:m["default"].oneOfType([m["default"].number,m["default"].string]),universal:m["default"].bool,style:m["default"].object,children:m["default"].node},E.defaultProps={renderView:z.renderViewDefault,renderTrackHorizontal:z.renderTrackHorizontalDefault,renderTrackVertical:z.renderTrackVerticalDefault,renderThumbHorizontal:z.renderThumbHorizontalDefault,renderThumbVertical:z.renderThumbVerticalDefault,tagName:"div",thumbMinSize:30,hideTracksWhenNotNeeded:!1,autoHide:!1,autoHideTimeout:1e3,autoHideDuration:200,autoHeight:!1,autoHeightMin:0,autoHeightMax:200,universal:!1}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.containerStyleDefault={position:"relative",overflow:"hidden",width:"100%",height:"100%"},t.containerStyleAutoHeight={height:"auto"},t.viewStyleDefault={position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"scroll",WebkitOverflowScrolling:"touch"},t.viewStyleAutoHeight={position:"relative",top:void 0,left:void 0,right:void 0,bottom:void 0},t.viewStyleUniversalInitial={overflow:"hidden",marginRight:0,marginBottom:0},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 n(e){var t=e.clientHeight,n=getComputedStyle(e),r=n.paddingTop,o=n.paddingBottom;return t-parseFloat(r)-parseFloat(o)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t){"use strict";function n(e){var t=e.clientWidth,n=getComputedStyle(e),r=n.paddingLeft,o=n.paddingRight;return t-parseFloat(r)-parseFloat(o)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t,n){"use strict";function r(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||0}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o;var i=n(1),l=r(i),a=!1},function(e,t){"use strict";function n(e){return"string"==typeof e}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t){"use strict";function n(){return!1}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,i,l,a,u){if(o(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,i,l,a,u],d=0;c=new Error(t.replace(/%s/g,function(){return s[d++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(e){};e.exports=r},function(e,t,n){(function(t){(function(){var n,r,o,i,l,a;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-l)/1e6},r=t.hrtime,n=function(){var e;return e=r(),1e9*e[0]+e[1]},i=n(),a=1e9*t.uptime(),l=i-a):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,n(16))},function(e,t){var n=null,r=["Webkit","Moz","O","ms"];e.exports=function(e){n||(n=document.createElement("div"));var t=n.style;if(e in t)return e;for(var o=e.charAt(0).toUpperCase()+e.slice(1),i=r.length;i>=0;i--){var l=r[i]+o;if(l in t)return l}return!1}},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(s===setTimeout)return setTimeout(e,0);if((s===n||!s)&&setTimeout)return s=setTimeout,setTimeout(e,0);try{return s(e,0)}catch(t){try{return s.call(null,e,0)}catch(t){return s.call(this,e,0)}}}function i(e){if(d===clearTimeout)return clearTimeout(e);if((d===r||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function l(){p&&f&&(p=!1,f.length?v=f.concat(v):m=-1,v.length&&a())}function a(){if(!p){var e=o(l);p=!0;for(var t=v.length;t;){for(f=v,v=[];++m<t;)f&&f[m].run();m=-1,t=v.length}f=null,p=!1,i(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var s,d,h=e.exports={};!function(){try{s="function"==typeof setTimeout?setTimeout:n}catch(e){s=n}try{d="function"==typeof clearTimeout?clearTimeout:r}catch(e){d=r}}();var f,v=[],p=!1,m=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];v.push(new u(e,t)),1!==v.length||p||o(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(12),o=n(13),i=n(19);e.exports=function(){function e(e,t,n,r,l,a){a!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){e.exports=n(17)()},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t,n){(function(t){for(var r=n(14),o="undefined"==typeof window?t:window,i=["moz","webkit"],l="AnimationFrame",a=o["request"+l],u=o["cancel"+l]||o["cancelRequest"+l],c=0;!a&&c<i.length;c++)a=o[i[c]+"Request"+l],u=o[i[c]+"Cancel"+l]||o[i[c]+"CancelRequest"+l];if(!a||!u){var s=0,d=0,h=[],f=1e3/60;a=function(e){if(0===h.length){var t=r(),n=Math.max(0,f-(t-s));s=n+t,setTimeout(function(){var e=h.slice(0);h.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(s)}catch(e){setTimeout(function(){throw e},0)}},Math.round(n))}return h.push({handle:++d,callback:e,cancelled:!1}),d},u=function(e){for(var t=0;t<h.length;t++)h[t].handle===e&&(h[t].cancelled=!0)}}e.exports=function(e){return a.call(o,e)},e.exports.cancel=function(){u.apply(o,arguments)},e.exports.polyfill=function(){o.requestAnimationFrame=a,o.cancelAnimationFrame=u}}).call(t,function(){return this}())},function(e,t,n){function r(e){return o(e).replace(/\s(\w)/g,function(e,t){return t.toUpperCase()})}var o=n(23);e.exports=r},function(e,t){function n(e){return i.test(e)?e.toLowerCase():l.test(e)?(r(e)||e).toLowerCase():a.test(e)?o(e).toLowerCase():e.toLowerCase()}function r(e){return e.replace(u,function(e,t){return t?" "+t:""})}function o(e){return e.replace(c,function(e,t,n){return t+" "+n.toLowerCase().split("").join(" ")})}e.exports=n;var i=/\s/,l=/(_|-|\.|:)/,a=/([a-z][A-Z]|[A-Z][a-z])/,u=/[\W_]+(.|$)/g,c=/(.)([A-Z]+)/g},function(e,t,n){function r(e){return o(e).replace(/[\W_]+(.|$)/g,function(e,t){return t?" "+t:""}).trim()}var o=n(22);e.exports=r}])});
!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(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Scrollbars=void 0;var o=n(5),i=r(o);t["default"]=i["default"],t.Scrollbars=i["default"]},function(e,t,n){function r(e,t,n){var r=c[t];if("undefined"==typeof r&&(r=i(t)),r){if(void 0===n)return e.style[r];e.style[r]=s(r,n)}}function o(e,t){for(var n in t)t.hasOwnProperty(n)&&r(e,n,t[n])}function i(e){var t=u(e),n=a(t);return c[t]=c[e]=c[n]=n,n}function l(){2===arguments.length?"string"==typeof arguments[1]?arguments[0].style.cssText=arguments[1]:o(arguments[0],arguments[1]):r(arguments[0],arguments[1],arguments[2])}var a=n(13),u=n(21),c={"float":"cssFloat"},s=n(3);e.exports=l,e.exports.set=l,e.exports.get=function(e,t){return Array.isArray(t)?t.reduce(function(t,n){return t[n]=r(e,n||""),t},{}):r(e,t||"")}},function(t,n){t.exports=e},function(e,t){var n={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||n[e]?t:t+"px"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){return h["default"].createElement("div",e)}function l(e){var t=e.style,n=o(e,["style"]),r=s({},t,{right:2,bottom:2,left:2,borderRadius:3});return h["default"].createElement("div",s({style:r},n))}function a(e){var t=e.style,n=o(e,["style"]),r=s({},t,{right:2,bottom:2,top:2,borderRadius:3});return h["default"].createElement("div",s({style:r},n))}function u(e){var t=e.style,n=o(e,["style"]),r=s({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return h["default"].createElement("div",s({style:r},n))}function c(e){var t=e.style,n=o(e,["style"]),r=s({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return h["default"].createElement("div",s({style:r},n))}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.renderViewDefault=i,t.renderTrackHorizontalDefault=l,t.renderTrackVerticalDefault=a,t.renderThumbHorizontalDefault=u,t.renderThumbVerticalDefault=c;var d=n(2),h=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(20),d=r(s),h=n(1),f=r(h),v=n(2),p=n(16),m=r(p),g=n(10),y=r(g),b=n(9),T=r(b),k=n(11),w=r(k),S=n(8),H=r(S),M=n(7),D=r(M),L=n(6),z=n(4),E=function(e){function t(e){var n;i(this,t);for(var r=arguments.length,o=Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];var u=l(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this,e].concat(o)));return u.getScrollLeft=u.getScrollLeft.bind(u),u.getScrollTop=u.getScrollTop.bind(u),u.getScrollWidth=u.getScrollWidth.bind(u),u.getScrollHeight=u.getScrollHeight.bind(u),u.getClientWidth=u.getClientWidth.bind(u),u.getClientHeight=u.getClientHeight.bind(u),u.getValues=u.getValues.bind(u),u.getThumbHorizontalWidth=u.getThumbHorizontalWidth.bind(u),u.getThumbVerticalHeight=u.getThumbVerticalHeight.bind(u),u.getScrollLeftForOffset=u.getScrollLeftForOffset.bind(u),u.getScrollTopForOffset=u.getScrollTopForOffset.bind(u),u.scrollLeft=u.scrollLeft.bind(u),u.scrollTop=u.scrollTop.bind(u),u.scrollToLeft=u.scrollToLeft.bind(u),u.scrollToTop=u.scrollToTop.bind(u),u.scrollToRight=u.scrollToRight.bind(u),u.scrollToBottom=u.scrollToBottom.bind(u),u.handleTrackMouseEnter=u.handleTrackMouseEnter.bind(u),u.handleTrackMouseLeave=u.handleTrackMouseLeave.bind(u),u.handleHorizontalTrackMouseDown=u.handleHorizontalTrackMouseDown.bind(u),u.handleVerticalTrackMouseDown=u.handleVerticalTrackMouseDown.bind(u),u.handleHorizontalThumbMouseDown=u.handleHorizontalThumbMouseDown.bind(u),u.handleVerticalThumbMouseDown=u.handleVerticalThumbMouseDown.bind(u),u.handleWindowResize=u.handleWindowResize.bind(u),u.handleScroll=u.handleScroll.bind(u),u.handleDrag=u.handleDrag.bind(u),u.handleDragEnd=u.handleDragEnd.bind(u),u.state={didMountUniversal:!1},u}return a(t,e),c(t,[{key:"componentDidMount",value:function(){this.addListeners(),this.update(),this.componentDidMountUniversal()}},{key:"componentDidMountUniversal",value:function(){var e=this.props.universal;e&&this.setState({didMountUniversal:!0})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"componentWillUnmount",value:function(){this.removeListeners(),(0,s.cancel)(this.requestFrame),clearTimeout(this.hideTracksTimeout),clearInterval(this.detectScrollingInterval)}},{key:"getScrollLeft",value:function(){return this.view.scrollLeft}},{key:"getScrollTop",value:function(){return this.view.scrollTop}},{key:"getScrollWidth",value:function(){return this.view.scrollWidth}},{key:"getScrollHeight",value:function(){return this.view.scrollHeight}},{key:"getClientWidth",value:function(){return this.view.clientWidth}},{key:"getClientHeight",value:function(){return this.view.clientHeight}},{key:"getValues",value:function(){var e=this.view,t=e.scrollLeft,n=e.scrollTop,r=e.scrollWidth,o=e.scrollHeight,i=e.clientWidth,l=e.clientHeight;return{left:t/(r-i)||0,top:n/(o-l)||0,scrollLeft:t,scrollTop:n,scrollWidth:r,scrollHeight:o,clientWidth:i,clientHeight:l}}},{key:"getThumbHorizontalWidth",value:function(){var e=this.props,t=e.thumbSize,n=e.thumbMinSize,r=this.view,o=r.scrollWidth,i=r.clientWidth,l=(0,H["default"])(this.trackHorizontal),a=Math.ceil(i/o*l);return l===a?0:t?t:Math.max(a,n)}},{key:"getThumbVerticalHeight",value:function(){var e=this.props,t=e.thumbSize,n=e.thumbMinSize,r=this.view,o=r.scrollHeight,i=r.clientHeight,l=(0,D["default"])(this.trackVertical),a=Math.ceil(i/o*l);return l===a?0:t?t:Math.max(a,n)}},{key:"getScrollLeftForOffset",value:function(e){var t=this.view,n=t.scrollWidth,r=t.clientWidth,o=(0,H["default"])(this.trackHorizontal),i=this.getThumbHorizontalWidth();return e/(o-i)*(n-r)}},{key:"getScrollTopForOffset",value:function(e){var t=this.view,n=t.scrollHeight,r=t.clientHeight,o=(0,D["default"])(this.trackVertical),i=this.getThumbVerticalHeight();return e/(o-i)*(n-r)}},{key:"scrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.view.scrollLeft=e}},{key:"scrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.view.scrollTop=e}},{key:"scrollToLeft",value:function(){this.view.scrollLeft=0}},{key:"scrollToTop",value:function(){this.view.scrollTop=0}},{key:"scrollToRight",value:function(){this.view.scrollLeft=this.view.scrollWidth}},{key:"scrollToBottom",value:function(){this.view.scrollTop=this.view.scrollHeight}},{key:"addListeners",value:function(){if("undefined"!=typeof document&&this.view){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,r=this.thumbHorizontal,o=this.thumbVertical;e.addEventListener("scroll",this.handleScroll),(0,T["default"])()&&(t.addEventListener("mouseenter",this.handleTrackMouseEnter),t.addEventListener("mouseleave",this.handleTrackMouseLeave),t.addEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.addEventListener("mouseenter",this.handleTrackMouseEnter),n.addEventListener("mouseleave",this.handleTrackMouseLeave),n.addEventListener("mousedown",this.handleVerticalTrackMouseDown),r.addEventListener("mousedown",this.handleHorizontalThumbMouseDown),o.addEventListener("mousedown",this.handleVerticalThumbMouseDown),window.addEventListener("resize",this.handleWindowResize))}}},{key:"removeListeners",value:function(){if("undefined"!=typeof document&&this.view){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,r=this.thumbHorizontal,o=this.thumbVertical;e.removeEventListener("scroll",this.handleScroll),(0,T["default"])()&&(t.removeEventListener("mouseenter",this.handleTrackMouseEnter),t.removeEventListener("mouseleave",this.handleTrackMouseLeave),t.removeEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.removeEventListener("mouseenter",this.handleTrackMouseEnter),n.removeEventListener("mouseleave",this.handleTrackMouseLeave),n.removeEventListener("mousedown",this.handleVerticalTrackMouseDown),r.removeEventListener("mousedown",this.handleHorizontalThumbMouseDown),o.removeEventListener("mousedown",this.handleVerticalThumbMouseDown),window.removeEventListener("resize",this.handleWindowResize),this.teardownDragging())}}},{key:"handleScroll",value:function(e){var t=this,n=this.props,r=n.onScroll,o=n.onScrollFrame;r&&r(e),this.update(function(e){var n=e.scrollLeft,r=e.scrollTop;t.viewScrollLeft=n,t.viewScrollTop=r,o&&o(e)}),this.detectScrolling()}},{key:"handleScrollStart",value:function(){var e=this.props.onScrollStart;e&&e(),this.handleScrollStartAutoHide()}},{key:"handleScrollStartAutoHide",value:function(){var e=this.props.autoHide;e&&this.showTracks()}},{key:"handleScrollStop",value:function(){var e=this.props.onScrollStop;e&&e(),this.handleScrollStopAutoHide()}},{key:"handleScrollStopAutoHide",value:function(){var e=this.props.autoHide;e&&this.hideTracks()}},{key:"handleWindowResize",value:function(){this.update()}},{key:"handleHorizontalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,n=e.clientX,r=t.getBoundingClientRect(),o=r.left,i=this.getThumbHorizontalWidth(),l=Math.abs(o-n)-i/2;this.view.scrollLeft=this.getScrollLeftForOffset(l)}},{key:"handleVerticalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,n=e.clientY,r=t.getBoundingClientRect(),o=r.top,i=this.getThumbVerticalHeight(),l=Math.abs(o-n)-i/2;this.view.scrollTop=this.getScrollTopForOffset(l)}},{key:"handleHorizontalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientX,r=t.offsetWidth,o=t.getBoundingClientRect(),i=o.left;this.prevPageX=r-(n-i)}},{key:"handleVerticalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientY,r=t.offsetHeight,o=t.getBoundingClientRect(),i=o.top;this.prevPageY=r-(n-i)}},{key:"setupDragging",value:function(){(0,f["default"])(document.body,L.disableSelectStyle),document.addEventListener("mousemove",this.handleDrag),document.addEventListener("mouseup",this.handleDragEnd),document.onselectstart=w["default"]}},{key:"teardownDragging",value:function(){(0,f["default"])(document.body,L.disableSelectStyleReset),document.removeEventListener("mousemove",this.handleDrag),document.removeEventListener("mouseup",this.handleDragEnd),document.onselectstart=void 0}},{key:"handleDragStart",value:function(e){this.dragging=!0,e.stopImmediatePropagation(),this.setupDragging()}},{key:"handleDrag",value:function(e){if(this.prevPageX){var t=e.clientX,n=this.trackHorizontal.getBoundingClientRect(),r=n.left,o=this.getThumbHorizontalWidth(),i=o-this.prevPageX,l=-r+t-i;this.view.scrollLeft=this.getScrollLeftForOffset(l)}if(this.prevPageY){var a=e.clientY,u=this.trackVertical.getBoundingClientRect(),c=u.top,s=this.getThumbVerticalHeight(),d=s-this.prevPageY,h=-c+a-d;this.view.scrollTop=this.getScrollTopForOffset(h)}return!1}},{key:"handleDragEnd",value:function(){this.dragging=!1,this.prevPageX=this.prevPageY=0,this.teardownDragging(),this.handleDragEndAutoHide()}},{key:"handleDragEndAutoHide",value:function(){var e=this.props.autoHide;e&&this.hideTracks()}},{key:"handleTrackMouseEnter",value:function(){this.trackMouseOver=!0,this.handleTrackMouseEnterAutoHide()}},{key:"handleTrackMouseEnterAutoHide",value:function(){var e=this.props.autoHide;e&&this.showTracks()}},{key:"handleTrackMouseLeave",value:function(){this.trackMouseOver=!1,this.handleTrackMouseLeaveAutoHide()}},{key:"handleTrackMouseLeaveAutoHide",value:function(){var e=this.props.autoHide;e&&this.hideTracks()}},{key:"showTracks",value:function(){clearTimeout(this.hideTracksTimeout),(0,f["default"])(this.trackHorizontal,{opacity:1}),(0,f["default"])(this.trackVertical,{opacity:1})}},{key:"hideTracks",value:function(){var e=this;if(!this.dragging&&!this.scrolling&&!this.trackMouseOver){var t=this.props.autoHideTimeout;clearTimeout(this.hideTracksTimeout),this.hideTracksTimeout=setTimeout(function(){(0,f["default"])(e.trackHorizontal,{opacity:0}),(0,f["default"])(e.trackVertical,{opacity:0})},t)}}},{key:"detectScrolling",value: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))}},{key:"raf",value:function(e){var t=this;this.requestFrame&&d["default"].cancel(this.requestFrame),this.requestFrame=(0,d["default"])(function(){t.requestFrame=void 0,e()})}},{key:"update",value:function(e){var t=this;this.raf(function(){return t._update(e)})}},{key:"_update",value:function(e){var t=this.props,n=t.onUpdate,r=t.hideTracksWhenNotNeeded,o=this.getValues();if((0,T["default"])()){var i=o.scrollLeft,l=o.clientWidth,a=o.scrollWidth,u=(0,H["default"])(this.trackHorizontal),c=this.getThumbHorizontalWidth(),s=i/(a-l)*(u-c),d={width:c,transform:"translateX("+s+"px)"},h=o.scrollTop,v=o.clientHeight,p=o.scrollHeight,m=(0,D["default"])(this.trackVertical),g=this.getThumbVerticalHeight(),y=h/(p-v)*(m-g),b={height:g,transform:"translateY("+y+"px)"};if(r){var k={visibility:a>l?"visible":"hidden"},w={visibility:p>v?"visible":"hidden"};(0,f["default"])(this.trackHorizontal,k),(0,f["default"])(this.trackVertical,w)}(0,f["default"])(this.thumbHorizontal,d),(0,f["default"])(this.thumbVertical,b)}n&&n(o),"function"==typeof e&&e(o)}},{key:"render",value:function(){var e=this,t=(0,T["default"])(),n=this.props,r=(n.onScroll,n.onScrollFrame,n.onScrollStart,n.onScrollStop,n.onUpdate,n.renderView),i=n.renderTrackHorizontal,l=n.renderTrackVertical,a=n.renderThumbHorizontal,c=n.renderThumbVertical,s=n.tagName,d=(n.hideTracksWhenNotNeeded,n.autoHide),h=(n.autoHideTimeout,n.autoHideDuration),f=(n.thumbSize,n.thumbMinSize,n.universal),p=n.autoHeight,m=n.autoHeightMin,g=n.autoHeightMax,b=n.style,k=n.children,w=o(n,["onScroll","onScrollFrame","onScrollStart","onScrollStop","onUpdate","renderView","renderTrackHorizontal","renderTrackVertical","renderThumbHorizontal","renderThumbVertical","tagName","hideTracksWhenNotNeeded","autoHide","autoHideTimeout","autoHideDuration","thumbSize","thumbMinSize","universal","autoHeight","autoHeightMin","autoHeightMax","style","children"]),S=this.state.didMountUniversal,H=u({},L.containerStyleDefault,p&&u({},L.containerStyleAutoHeight,{minHeight:m,maxHeight:g}),b),M=u({},L.viewStyleDefault,{marginRight:t?-t:0,marginBottom:t?-t:0},p&&u({},L.viewStyleAutoHeight,{minHeight:(0,y["default"])(m)?"calc("+m+" + "+t+"px)":m+t,maxHeight:(0,y["default"])(g)?"calc("+g+" + "+t+"px)":g+t}),p&&f&&!S&&{minHeight:m,maxHeight:g},f&&!S&&L.viewStyleUniversalInitial),D={transition:"opacity "+h+"ms",opacity:0},z=u({},L.trackHorizontalStyleDefault,d&&D,(!t||f&&!S)&&{display:"none"}),E=u({},L.trackVerticalStyleDefault,d&&D,(!t||f&&!S)&&{display:"none"});return(0,v.createElement)(s,u({},w,{style:H,ref:function(t){e.container=t}}),[(0,v.cloneElement)(r({style:M}),{key:"view",ref:function(t){e.view=t}},k),(0,v.cloneElement)(i({style:z}),{key:"trackHorizontal",ref:function(t){e.trackHorizontal=t}},(0,v.cloneElement)(a({style:L.thumbHorizontalStyleDefault}),{ref:function(t){e.thumbHorizontal=t}})),(0,v.cloneElement)(l({style:E}),{key:"trackVertical",ref:function(t){e.trackVertical=t}},(0,v.cloneElement)(c({style:L.thumbVerticalStyleDefault}),{ref:function(t){e.thumbVertical=t}}))])}}]),t}(v.Component);t["default"]=E,E.propTypes={onScroll:m["default"].func,onScrollFrame:m["default"].func,onScrollStart:m["default"].func,onScrollStop:m["default"].func,onUpdate:m["default"].func,renderView:m["default"].func,renderTrackHorizontal:m["default"].func,renderTrackVertical:m["default"].func,renderThumbHorizontal:m["default"].func,renderThumbVertical:m["default"].func,tagName:m["default"].string,thumbSize:m["default"].number,thumbMinSize:m["default"].number,hideTracksWhenNotNeeded:m["default"].bool,autoHide:m["default"].bool,autoHideTimeout:m["default"].number,autoHideDuration:m["default"].number,autoHeight:m["default"].bool,autoHeightMin:m["default"].oneOfType([m["default"].number,m["default"].string]),autoHeightMax:m["default"].oneOfType([m["default"].number,m["default"].string]),universal:m["default"].bool,style:m["default"].object,children:m["default"].node},E.defaultProps={renderView:z.renderViewDefault,renderTrackHorizontal:z.renderTrackHorizontalDefault,renderTrackVertical:z.renderTrackVerticalDefault,renderThumbHorizontal:z.renderThumbHorizontalDefault,renderThumbVertical:z.renderThumbVerticalDefault,tagName:"div",thumbMinSize:30,hideTracksWhenNotNeeded:!1,autoHide:!1,autoHideTimeout:1e3,autoHideDuration:200,autoHeight:!1,autoHeightMin:0,autoHeightMax:200,universal:!1}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.containerStyleDefault={position:"relative",overflow:"hidden",width:"100%",height:"100%"},t.containerStyleAutoHeight={height:"auto"},t.viewStyleDefault={position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"scroll",WebkitOverflowScrolling:"touch"},t.viewStyleAutoHeight={position:"relative",top:void 0,left:void 0,right:void 0,bottom:void 0},t.viewStyleUniversalInitial={overflow:"hidden",marginRight:0,marginBottom:0},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 n(e){var t=e.clientHeight,n=getComputedStyle(e),r=n.paddingTop,o=n.paddingBottom;return t-parseFloat(r)-parseFloat(o)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t){"use strict";function n(e){var t=e.clientWidth,n=getComputedStyle(e),r=n.paddingLeft,o=n.paddingRight;return t-parseFloat(r)-parseFloat(o)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t,n){"use strict";function r(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||0}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o;var i=n(1),l=r(i),a=!1},function(e,t){"use strict";function n(e){return"string"==typeof e}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t){"use strict";function n(){return!1}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t,n){(function(t){(function(){var n,r,o,i,l,a;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-l)/1e6},r=t.hrtime,n=function(){var e;return e=r(),1e9*e[0]+e[1]},i=n(),a=1e9*t.uptime(),l=i-a):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,n(14))},function(e,t){var n=null,r=["Webkit","Moz","O","ms"];e.exports=function(e){n||(n=document.createElement("div"));var t=n.style;if(e in t)return e;for(var o=e.charAt(0).toUpperCase()+e.slice(1),i=r.length;i>=0;i--){var l=r[i]+o;if(l in t)return l}return!1}},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(s===setTimeout)return setTimeout(e,0);if((s===n||!s)&&setTimeout)return s=setTimeout,setTimeout(e,0);try{return s(e,0)}catch(t){try{return s.call(null,e,0)}catch(t){return s.call(this,e,0)}}}function i(e){if(d===clearTimeout)return clearTimeout(e);if((d===r||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function l(){p&&f&&(p=!1,f.length?v=f.concat(v):m=-1,v.length&&a())}function a(){if(!p){var e=o(l);p=!0;for(var t=v.length;t;){for(f=v,v=[];++m<t;)f&&f[m].run();m=-1,t=v.length}f=null,p=!1,i(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var s,d,h=e.exports={};!function(){try{s="function"==typeof setTimeout?setTimeout:n}catch(e){s=n}try{d="function"==typeof clearTimeout?clearTimeout:r}catch(e){d=r}}();var f,v=[],p=!1,m=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];v.push(new u(e,t)),1!==v.length||p||o(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(18),o=n(19),i=n(17);e.exports=function(){function e(e,t,n,r,l,a){a!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){e.exports=n(15)()},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,i,l,a,u){if(o(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,i,l,a,u],d=0;c=new Error(t.replace(/%s/g,function(){return s[d++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(e){};e.exports=r},function(e,t,n){(function(t){for(var r=n(12),o="undefined"==typeof window?t:window,i=["moz","webkit"],l="AnimationFrame",a=o["request"+l],u=o["cancel"+l]||o["cancelRequest"+l],c=0;!a&&c<i.length;c++)a=o[i[c]+"Request"+l],u=o[i[c]+"Cancel"+l]||o[i[c]+"CancelRequest"+l];if(!a||!u){var s=0,d=0,h=[],f=1e3/60;a=function(e){if(0===h.length){var t=r(),n=Math.max(0,f-(t-s));s=n+t,setTimeout(function(){var e=h.slice(0);h.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(s)}catch(e){setTimeout(function(){throw e},0)}},Math.round(n))}return h.push({handle:++d,callback:e,cancelled:!1}),d},u=function(e){for(var t=0;t<h.length;t++)h[t].handle===e&&(h[t].cancelled=!0)}}e.exports=function(e){return a.call(o,e)},e.exports.cancel=function(){u.apply(o,arguments)},e.exports.polyfill=function(){o.requestAnimationFrame=a,o.cancelAnimationFrame=u}}).call(t,function(){return this}())},function(e,t,n){function r(e){return o(e).replace(/\s(\w)/g,function(e,t){return t.toUpperCase()})}var o=n(23);e.exports=r},function(e,t){function n(e){return i.test(e)?e.toLowerCase():l.test(e)?(r(e)||e).toLowerCase():a.test(e)?o(e).toLowerCase():e.toLowerCase()}function r(e){return e.replace(u,function(e,t){return t?" "+t:""})}function o(e){return e.replace(c,function(e,t,n){return t+" "+n.toLowerCase().split("").join(" ")})}e.exports=n;var i=/\s/,l=/(_|-|\.|:)/,a=/([a-z][A-Z]|[A-Z][a-z])/,u=/[\W_]+(.|$)/g,c=/(.)([A-Z]+)/g},function(e,t,n){function r(e){return o(e).replace(/[\W_]+(.|$)/g,function(e,t){return t?" "+t:""}).trim()}var o=n(22);e.exports=r}])});

@@ -283,3 +283,3 @@ 'use strict';

/* istanbul ignore if */
if (typeof document === 'undefined') return;
if (typeof document === 'undefined' || !this.view) return;
var view = this.view,

@@ -307,3 +307,3 @@ trackHorizontal = this.trackHorizontal,

/* istanbul ignore if */
if (typeof document === 'undefined') return;
if (typeof document === 'undefined' || !this.view) return;
var view = this.view,

@@ -310,0 +310,0 @@ trackHorizontal = this.trackHorizontal,

{
"name": "react-custom-scrollbars",
"version": "4.1.2",
"version": "4.2.0",
"description": "React scrollbars component",

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

"mocha": "^2.2.5",
"react": "^0.14.0 || ^15.0.0",
"react-addons-test-utils": "^0.14.0 || ^15.0.0",
"react-dom": "^0.14.0 || ^15.0.0",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"rimraf": "^2.3.4",

@@ -74,4 +73,4 @@ "simulant": "^0.2.2",

"peerDependencies": {
"react": "^0.14.0 || ^15.0.0",
"react-dom": "^0.14.0 || ^15.0.0"
"react": "^0.14.0 || ^15.0.0 || ^16.0.0",
"react-dom": "^0.14.0 || ^15.0.0 || ^16.0.0"
},

@@ -78,0 +77,0 @@ "dependencies": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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