Socket
Socket
Sign inDemoInstall

react-custom-scrollbars-2

Package Overview
Dependencies
16
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.2.2 to 4.2.3

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(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.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 i=r(5),o=n(i);t["default"]=o["default"],t.Scrollbars=o["default"]},function(e,t,r){function n(e,t,r){var n=c[t];if("undefined"==typeof n&&(n=o(t)),n){if(void 0===r)return e.style[n];e.style[n]=s(n,r)}}function i(e,t){for(var r in t)t.hasOwnProperty(r)&&n(e,r,t[r])}function o(e){var t=u(e),r=a(t);return c[t]=c[e]=c[r]=r,r}function l(){2===arguments.length?"string"==typeof arguments[1]?arguments[0].style.cssText=arguments[1]:i(arguments[0],arguments[1]):n(arguments[0],arguments[1],arguments[2])}var a=r(13),u=r(19),c={"float":"cssFloat"},s=r(3);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){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,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(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 o(e){return h["default"].createElement("div",e)}function l(e){var t=e.style,r=i(e,["style"]),n=s({},t,{right:2,bottom:2,left:2,borderRadius:3});return h["default"].createElement("div",s({style:n},r))}function a(e){var t=e.style,r=i(e,["style"]),n=s({},t,{right:2,bottom:2,top:2,borderRadius:3});return h["default"].createElement("div",s({style:n},r))}function u(e){var t=e.style,r=i(e,["style"]),n=s({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return h["default"].createElement("div",s({style:n},r))}function c(e){var t=e.style,r=i(e,["style"]),n=s({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return h["default"].createElement("div",s({style:n},r))}Object.defineProperty(t,"__esModule",{value:!0});var s=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=o,t.renderTrackHorizontalDefault=l,t.renderTrackVerticalDefault=a,t.renderThumbHorizontalDefault=u,t.renderThumbVerticalDefault=c;var d=r(2),h=n(d)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(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 o(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 r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(18),d=n(s),h=r(1),f=n(h),v=r(2),p=r(16),m=n(p),g=r(10),y=n(g),b=r(9),T=n(b),w=r(11),k=n(w),S=r(8),H=n(S),M=r(7),D=n(M),L=r(6),z=r(4),E=function(e){function t(e){var r;o(this,t);for(var n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];var u=l(this,(r=t.__proto__||Object.getPrototypeOf(t)).call.apply(r,[this,e].concat(i)));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?this.view.scrollLeft:0}},{key:"getScrollTop",value:function(){return this.view?this.view.scrollTop:0}},{key:"getScrollWidth",value:function(){return this.view?this.view.scrollWidth:0}},{key:"getScrollHeight",value:function(){return this.view?this.view.scrollHeight:0}},{key:"getClientWidth",value:function(){return this.view?this.view.clientWidth:0}},{key:"getClientHeight",value:function(){return this.view?this.view.clientHeight:0}},{key:"getValues",value:function(){var e=this.view||{},t=e.scrollLeft,r=void 0===t?0:t,n=e.scrollTop,i=void 0===n?0:n,o=e.scrollWidth,l=void 0===o?0:o,a=e.scrollHeight,u=void 0===a?0:a,c=e.clientWidth,s=void 0===c?0:c,d=e.clientHeight,h=void 0===d?0:d;return{left:r/(l-s)||0,top:i/(u-h)||0,scrollLeft:r,scrollTop:i,scrollWidth:l,scrollHeight:u,clientWidth:s,clientHeight:h}}},{key:"getThumbHorizontalWidth",value:function(){var e=this.props,t=e.thumbSize,r=e.thumbMinSize,n=this.view,i=n.scrollWidth,o=n.clientWidth,l=(0,H["default"])(this.trackHorizontal),a=Math.ceil(o/i*l);return l===a?0:t?t:Math.max(a,r)}},{key:"getThumbVerticalHeight",value:function(){var e=this.props,t=e.thumbSize,r=e.thumbMinSize,n=this.view,i=n.scrollHeight,o=n.clientHeight,l=(0,D["default"])(this.trackVertical),a=Math.ceil(o/i*l);return l===a?0:t?t:Math.max(a,r)}},{key:"getScrollLeftForOffset",value:function(e){var t=this.view,r=t.scrollWidth,n=t.clientWidth,i=(0,H["default"])(this.trackHorizontal),o=this.getThumbHorizontalWidth();return e/(i-o)*(r-n)}},{key:"getScrollTopForOffset",value:function(e){var t=this.view,r=t.scrollHeight,n=t.clientHeight,i=(0,D["default"])(this.trackVertical),o=this.getThumbVerticalHeight();return e/(i-o)*(r-n)}},{key:"scrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.view&&(this.view.scrollLeft=e)}},{key:"scrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.view&&(this.view.scrollTop=e)}},{key:"scrollToLeft",value:function(){this.view&&(this.view.scrollLeft=0)}},{key:"scrollToTop",value:function(){this.view&&(this.view.scrollTop=0)}},{key:"scrollToRight",value:function(){this.view&&(this.view.scrollLeft=this.view.scrollWidth)}},{key:"scrollToBottom",value:function(){this.view&&(this.view.scrollTop=this.view.scrollHeight)}},{key:"addListeners",value:function(){if("undefined"!=typeof document&&this.view){var e=this.view,t=this.trackHorizontal,r=this.trackVertical,n=this.thumbHorizontal,i=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),r.addEventListener("mouseenter",this.handleTrackMouseEnter),r.addEventListener("mouseleave",this.handleTrackMouseLeave),r.addEventListener("mousedown",this.handleVerticalTrackMouseDown),n.addEventListener("mousedown",this.handleHorizontalThumbMouseDown),i.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,r=this.trackVertical,n=this.thumbHorizontal,i=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),r.removeEventListener("mouseenter",this.handleTrackMouseEnter),r.removeEventListener("mouseleave",this.handleTrackMouseLeave),r.removeEventListener("mousedown",this.handleVerticalTrackMouseDown),n.removeEventListener("mousedown",this.handleHorizontalThumbMouseDown),i.removeEventListener("mousedown",this.handleVerticalThumbMouseDown),window.removeEventListener("resize",this.handleWindowResize),this.teardownDragging())}}},{key:"handleScroll",value:function(e){var t=this,r=this.props,n=r.onScroll,i=r.onScrollFrame;n&&n(e),this.update(function(e){var r=e.scrollLeft,n=e.scrollTop;t.viewScrollLeft=r,t.viewScrollTop=n,i&&i(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,r=e.clientX,n=t.getBoundingClientRect(),i=n.left,o=this.getThumbHorizontalWidth(),l=Math.abs(i-r)-o/2;this.view.scrollLeft=this.getScrollLeftForOffset(l)}},{key:"handleVerticalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,r=e.clientY,n=t.getBoundingClientRect(),i=n.top,o=this.getThumbVerticalHeight(),l=Math.abs(i-r)-o/2;this.view.scrollTop=this.getScrollTopForOffset(l)}},{key:"handleHorizontalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,r=e.clientX,n=t.offsetWidth,i=t.getBoundingClientRect(),o=i.left;this.prevPageX=n-(r-o)}},{key:"handleVerticalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,r=e.clientY,n=t.offsetHeight,i=t.getBoundingClientRect(),o=i.top;this.prevPageY=n-(r-o)}},{key:"setupDragging",value:function(){(0,f["default"])(document.body,L.disableSelectStyle),document.addEventListener("mousemove",this.handleDrag),document.addEventListener("mouseup",this.handleDragEnd),document.onselectstart=k["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,r=this.trackHorizontal.getBoundingClientRect(),n=r.left,i=this.getThumbHorizontalWidth(),o=i-this.prevPageX,l=-n+t-o;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,r=t.onUpdate,n=t.hideTracksWhenNotNeeded,i=this.getValues();if((0,T["default"])()){var o=i.scrollLeft,l=i.clientWidth,a=i.scrollWidth,u=(0,H["default"])(this.trackHorizontal),c=this.getThumbHorizontalWidth(),s=o/(a-l)*(u-c),d={width:c,transform:"translateX("+s+"px)"},h=i.scrollTop,v=i.clientHeight,p=i.scrollHeight,m=(0,D["default"])(this.trackVertical),g=this.getThumbVerticalHeight(),y=h/(p-v)*(m-g),b={height:g,transform:"translateY("+y+"px)"};if(n){var w={visibility:a>l?"visible":"hidden"},k={visibility:p>v?"visible":"hidden"};(0,f["default"])(this.trackHorizontal,w),(0,f["default"])(this.trackVertical,k)}(0,f["default"])(this.thumbHorizontal,d),(0,f["default"])(this.thumbVertical,b)}r&&r(i),"function"==typeof e&&e(i)}},{key:"render",value:function(){var e=this,t=(0,T["default"])(),r=this.props,n=(r.onScroll,r.onScrollFrame,r.onScrollStart,r.onScrollStop,r.onUpdate,r.renderView),o=r.renderTrackHorizontal,l=r.renderTrackVertical,a=r.renderThumbHorizontal,c=r.renderThumbVertical,s=r.tagName,d=(r.hideTracksWhenNotNeeded,r.autoHide),h=(r.autoHideTimeout,r.autoHideDuration),f=(r.thumbSize,r.thumbMinSize,r.universal),p=r.autoHeight,m=r.autoHeightMin,g=r.autoHeightMax,b=r.style,w=r.children,k=i(r,["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({},k,{style:H,ref:function(t){e.container=t}}),[(0,v.cloneElement)(n({style:M}),{key:"view",ref:function(t){e.view=t}},w),(0,v.cloneElement)(o({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 r(e){var t=e.clientHeight,r=getComputedStyle(e),n=r.paddingTop,i=r.paddingBottom;return t-parseFloat(n)-parseFloat(i)}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,i=r.paddingRight;return t-parseFloat(n)-parseFloat(i)}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 i(){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"]=i;var o=r(1),l=n(o),a=!1},function(e,t){"use strict";function r(e){return"string"==typeof e}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=r},function(e,t){"use strict";function r(){return!1}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=r},function(e,t,r){(function(t){(function(){var r,n,i,o,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(r()-l)/1e6},n=t.hrtime,r=function(){var e;return e=n(),1e9*e[0]+e[1]},o=r(),a=1e9*t.uptime(),l=o-a):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(t,r(14))},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 i=e.charAt(0).toUpperCase()+e.slice(1),o=n.length;o>=0;o--){var l=n[o]+i;if(l in t)return l}return!1}},function(e,t){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(e){if(s===setTimeout)return setTimeout(e,0);if((s===r||!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 o(e){if(d===clearTimeout)return clearTimeout(e);if((d===n||!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=i(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,o(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:r}catch(e){s=r}try{d="function"==typeof clearTimeout?clearTimeout:n}catch(e){d=n}}();var f,v=[],p=!1,m=-1;h.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];v.push(new u(e,t)),1!==v.length||p||i(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,r){"use strict";function n(){}function i(){}var o=r(17);i.resetWarningCache=n,e.exports=function(){function e(e,t,r,n,i,l){if(l!==o){var a=new Error("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");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:n};return r.PropTypes=r,r}},function(e,t,r){e.exports=r(15)()},function(e,t){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=r},function(e,t,r){(function(t){for(var n=r(12),i="undefined"==typeof window?t:window,o=["moz","webkit"],l="AnimationFrame",a=i["request"+l],u=i["cancel"+l]||i["cancelRequest"+l],c=0;!a&&c<o.length;c++)a=i[o[c]+"Request"+l],u=i[o[c]+"Cancel"+l]||i[o[c]+"CancelRequest"+l];if(!a||!u){var s=0,d=0,h=[],f=1e3/60;a=function(e){if(0===h.length){var t=n(),r=Math.max(0,f-(t-s));s=r+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(r))}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(i,e)},e.exports.cancel=function(){u.apply(i,arguments)},e.exports.polyfill=function(e){e||(e=i),e.requestAnimationFrame=a,e.cancelAnimationFrame=u}}).call(t,function(){return this}())},function(e,t,r){function n(e){return i(e).replace(/\s(\w)/g,function(e,t){return t.toUpperCase()})}var i=r(21);e.exports=n},function(e,t){function r(e){return o.test(e)?e.toLowerCase():l.test(e)?(n(e)||e).toLowerCase():a.test(e)?i(e).toLowerCase():e.toLowerCase()}function n(e){return e.replace(u,function(e,t){return t?" "+t:""})}function i(e){return e.replace(c,function(e,t,r){return t+" "+r.toLowerCase().split("").join(" ")})}e.exports=r;var o=/\s/,l=/(_|-|\.|:)/,a=/([a-z][A-Z]|[A-Z][a-z])/,u=/[\W_]+(.|$)/g,c=/(.)([A-Z]+)/g},function(e,t,r){function n(e){return i(e).replace(/[\W_]+(.|$)/g,function(e,t){return t?" "+t:""}).trim()}var i=r(20);e.exports=n}])});
!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 i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.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 i=r(5),o=n(i);t["default"]=o["default"],t.Scrollbars=o["default"]},function(e,t,r){function n(e,t,r){var n=c[t];if("undefined"==typeof n&&(n=o(t)),n){if(void 0===r)return e.style[n];e.style[n]=s(n,r)}}function i(e,t){for(var r in t)t.hasOwnProperty(r)&&n(e,r,t[r])}function o(e){var t=u(e),r=a(t);return c[t]=c[e]=c[r]=r,r}function l(){2===arguments.length?"string"==typeof arguments[1]?arguments[0].style.cssText=arguments[1]:i(arguments[0],arguments[1]):n(arguments[0],arguments[1],arguments[2])}var a=r(13),u=r(19),c={"float":"cssFloat"},s=r(3);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){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,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(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 o(e){return h["default"].createElement("div",e)}function l(e){var t=e.style,r=i(e,["style"]),n=s({},t,{right:2,bottom:2,left:2,borderRadius:3});return h["default"].createElement("div",s({style:n},r))}function a(e){var t=e.style,r=i(e,["style"]),n=s({},t,{right:2,bottom:2,top:2,borderRadius:3});return h["default"].createElement("div",s({style:n},r))}function u(e){var t=e.style,r=i(e,["style"]),n=s({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return h["default"].createElement("div",s({style:n},r))}function c(e){var t=e.style,r=i(e,["style"]),n=s({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return h["default"].createElement("div",s({style:n},r))}Object.defineProperty(t,"__esModule",{value:!0});var s=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=o,t.renderTrackHorizontalDefault=l,t.renderTrackVerticalDefault=a,t.renderThumbHorizontalDefault=u,t.renderThumbVerticalDefault=c;var d=r(2),h=n(d)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(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 o(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 r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(18),d=n(s),h=r(1),f=n(h),v=r(2),p=r(16),m=n(p),g=r(10),y=n(g),b=r(9),T=n(b),w=r(11),k=n(w),S=r(8),H=n(S),M=r(7),D=n(M),L=r(6),z=r(4),E=function(e){function t(e){var r;o(this,t);for(var n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];var u=l(this,(r=t.__proto__||Object.getPrototypeOf(t)).call.apply(r,[this,e].concat(i)));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?this.view.scrollLeft:0}},{key:"getScrollTop",value:function(){return this.view?this.view.scrollTop:0}},{key:"getScrollWidth",value:function(){return this.view?this.view.scrollWidth:0}},{key:"getScrollHeight",value:function(){return this.view?this.view.scrollHeight:0}},{key:"getClientWidth",value:function(){return this.view?this.view.clientWidth:0}},{key:"getClientHeight",value:function(){return this.view?this.view.clientHeight:0}},{key:"getValues",value:function(){var e=this.view||{},t=e.scrollLeft,r=void 0===t?0:t,n=e.scrollTop,i=void 0===n?0:n,o=e.scrollWidth,l=void 0===o?0:o,a=e.scrollHeight,u=void 0===a?0:a,c=e.clientWidth,s=void 0===c?0:c,d=e.clientHeight,h=void 0===d?0:d;return{left:r/(l-s)||0,top:i/(u-h)||0,scrollLeft:r,scrollTop:i,scrollWidth:l,scrollHeight:u,clientWidth:s,clientHeight:h}}},{key:"getThumbHorizontalWidth",value:function(){var e=this.props,t=e.thumbSize,r=e.thumbMinSize,n=this.view,i=n.scrollWidth,o=n.clientWidth,l=(0,H["default"])(this.trackHorizontal),a=Math.ceil(o/i*l);return l===a?0:t?t:Math.max(a,r)}},{key:"getThumbVerticalHeight",value:function(){var e=this.props,t=e.thumbSize,r=e.thumbMinSize,n=this.view,i=n.scrollHeight,o=n.clientHeight,l=(0,D["default"])(this.trackVertical),a=Math.ceil(o/i*l);return l===a?0:t?t:Math.max(a,r)}},{key:"getScrollLeftForOffset",value:function(e){var t=this.view,r=t.scrollWidth,n=t.clientWidth,i=(0,H["default"])(this.trackHorizontal),o=this.getThumbHorizontalWidth();return e/(i-o)*(r-n)}},{key:"getScrollTopForOffset",value:function(e){var t=this.view,r=t.scrollHeight,n=t.clientHeight,i=(0,D["default"])(this.trackVertical),o=this.getThumbVerticalHeight();return e/(i-o)*(r-n)}},{key:"scrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.view&&(this.view.scrollLeft=e)}},{key:"scrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.view&&(this.view.scrollTop=e)}},{key:"scrollToLeft",value:function(){this.view&&(this.view.scrollLeft=0)}},{key:"scrollToTop",value:function(){this.view&&(this.view.scrollTop=0)}},{key:"scrollToRight",value:function(){this.view&&(this.view.scrollLeft=this.view.scrollWidth)}},{key:"scrollToBottom",value:function(){this.view&&(this.view.scrollTop=this.view.scrollHeight)}},{key:"addListeners",value:function(){if("undefined"!=typeof document&&this.view){var e=this.view,t=this.trackHorizontal,r=this.trackVertical,n=this.thumbHorizontal,i=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),r.addEventListener("mouseenter",this.handleTrackMouseEnter),r.addEventListener("mouseleave",this.handleTrackMouseLeave),r.addEventListener("mousedown",this.handleVerticalTrackMouseDown),n.addEventListener("mousedown",this.handleHorizontalThumbMouseDown),i.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,r=this.trackVertical,n=this.thumbHorizontal,i=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),r.removeEventListener("mouseenter",this.handleTrackMouseEnter),r.removeEventListener("mouseleave",this.handleTrackMouseLeave),r.removeEventListener("mousedown",this.handleVerticalTrackMouseDown),n.removeEventListener("mousedown",this.handleHorizontalThumbMouseDown),i.removeEventListener("mousedown",this.handleVerticalThumbMouseDown),window.removeEventListener("resize",this.handleWindowResize),this.teardownDragging())}}},{key:"handleScroll",value:function(e){var t=this,r=this.props,n=r.onScroll,i=r.onScrollFrame;n&&n(e),this.update(function(e){var r=e.scrollLeft,n=e.scrollTop;t.viewScrollLeft=r,t.viewScrollTop=n,i&&i(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(){(0,T["default"])(!1),this.forceUpdate()}},{key:"handleHorizontalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,r=e.clientX,n=t.getBoundingClientRect(),i=n.left,o=this.getThumbHorizontalWidth(),l=Math.abs(i-r)-o/2;this.view.scrollLeft=this.getScrollLeftForOffset(l)}},{key:"handleVerticalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,r=e.clientY,n=t.getBoundingClientRect(),i=n.top,o=this.getThumbVerticalHeight(),l=Math.abs(i-r)-o/2;this.view.scrollTop=this.getScrollTopForOffset(l)}},{key:"handleHorizontalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,r=e.clientX,n=t.offsetWidth,i=t.getBoundingClientRect(),o=i.left;this.prevPageX=n-(r-o)}},{key:"handleVerticalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,r=e.clientY,n=t.offsetHeight,i=t.getBoundingClientRect(),o=i.top;this.prevPageY=n-(r-o)}},{key:"setupDragging",value:function(){(0,f["default"])(document.body,L.disableSelectStyle),document.addEventListener("mousemove",this.handleDrag),document.addEventListener("mouseup",this.handleDragEnd),document.onselectstart=k["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,r=this.trackHorizontal.getBoundingClientRect(),n=r.left,i=this.getThumbHorizontalWidth(),o=i-this.prevPageX,l=-n+t-o;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,r=t.onUpdate,n=t.hideTracksWhenNotNeeded,i=this.getValues();if((0,T["default"])()){var o=i.scrollLeft,l=i.clientWidth,a=i.scrollWidth,u=(0,H["default"])(this.trackHorizontal),c=this.getThumbHorizontalWidth(),s=o/(a-l)*(u-c),d={width:c,transform:"translateX("+s+"px)"},h=i.scrollTop,v=i.clientHeight,p=i.scrollHeight,m=(0,D["default"])(this.trackVertical),g=this.getThumbVerticalHeight(),y=h/(p-v)*(m-g),b={height:g,transform:"translateY("+y+"px)"};if(n){var w={visibility:a>l?"visible":"hidden"},k={visibility:p>v?"visible":"hidden"};(0,f["default"])(this.trackHorizontal,w),(0,f["default"])(this.trackVertical,k)}(0,f["default"])(this.thumbHorizontal,d),(0,f["default"])(this.thumbVertical,b)}r&&r(i),"function"==typeof e&&e(i)}},{key:"render",value:function(){var e=this,t=(0,T["default"])(),r=this.props,n=(r.onScroll,r.onScrollFrame,r.onScrollStart,r.onScrollStop,r.onUpdate,r.renderView),o=r.renderTrackHorizontal,l=r.renderTrackVertical,a=r.renderThumbHorizontal,c=r.renderThumbVertical,s=r.tagName,d=(r.hideTracksWhenNotNeeded,r.autoHide),h=(r.autoHideTimeout,r.autoHideDuration),f=(r.thumbSize,r.thumbMinSize,r.universal),p=r.autoHeight,m=r.autoHeightMin,g=r.autoHeightMax,b=r.style,w=r.children,k=i(r,["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({},k,{style:H,ref:function(t){e.container=t}}),[(0,v.cloneElement)(n({style:M}),{key:"view",ref:function(t){e.view=t}},w),(0,v.cloneElement)(o({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 r(e){var t=e.clientHeight,r=getComputedStyle(e),n=r.paddingTop,i=r.paddingBottom;return t-parseFloat(n)-parseFloat(i)}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,i=r.paddingRight;return t-parseFloat(n)-parseFloat(i)}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 i(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(e&&a!==!1)return a;if("undefined"!=typeof document){var t=document.createElement("div");(0,l["default"])(t,{width:100,height:100,position:"absolute",top:-9999,overflow:"scroll",MsOverflowStyle:"scrollbar"}),document.body.appendChild(t),a=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}else a=0;return a||0}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=i;var o=r(1),l=n(o),a=!1},function(e,t){"use strict";function r(e){return"string"==typeof e}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=r},function(e,t){"use strict";function r(){return!1}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=r},function(e,t,r){(function(t){(function(){var r,n,i,o,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(r()-l)/1e6},n=t.hrtime,r=function(){var e;return e=n(),1e9*e[0]+e[1]},o=r(),a=1e9*t.uptime(),l=o-a):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(t,r(14))},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 i=e.charAt(0).toUpperCase()+e.slice(1),o=n.length;o>=0;o--){var l=n[o]+i;if(l in t)return l}return!1}},function(e,t){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(e){if(s===setTimeout)return setTimeout(e,0);if((s===r||!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 o(e){if(d===clearTimeout)return clearTimeout(e);if((d===n||!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=i(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,o(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:r}catch(e){s=r}try{d="function"==typeof clearTimeout?clearTimeout:n}catch(e){d=n}}();var f,v=[],p=!1,m=-1;h.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];v.push(new u(e,t)),1!==v.length||p||i(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,r){"use strict";function n(){}function i(){}var o=r(17);i.resetWarningCache=n,e.exports=function(){function e(e,t,r,n,i,l){if(l!==o){var a=new Error("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");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:n};return r.PropTypes=r,r}},function(e,t,r){e.exports=r(15)()},function(e,t){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=r},function(e,t,r){(function(t){for(var n=r(12),i="undefined"==typeof window?t:window,o=["moz","webkit"],l="AnimationFrame",a=i["request"+l],u=i["cancel"+l]||i["cancelRequest"+l],c=0;!a&&c<o.length;c++)a=i[o[c]+"Request"+l],u=i[o[c]+"Cancel"+l]||i[o[c]+"CancelRequest"+l];if(!a||!u){var s=0,d=0,h=[],f=1e3/60;a=function(e){if(0===h.length){var t=n(),r=Math.max(0,f-(t-s));s=r+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(r))}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(i,e)},e.exports.cancel=function(){u.apply(i,arguments)},e.exports.polyfill=function(e){e||(e=i),e.requestAnimationFrame=a,e.cancelAnimationFrame=u}}).call(t,function(){return this}())},function(e,t,r){function n(e){return i(e).replace(/\s(\w)/g,function(e,t){return t.toUpperCase()})}var i=r(21);e.exports=n},function(e,t){function r(e){return o.test(e)?e.toLowerCase():l.test(e)?(n(e)||e).toLowerCase():a.test(e)?i(e).toLowerCase():e.toLowerCase()}function n(e){return e.replace(u,function(e,t){return t?" "+t:""})}function i(e){return e.replace(c,function(e,t,r){return t+" "+r.toLowerCase().split("").join(" ")})}e.exports=r;var o=/\s/,l=/(_|-|\.|:)/,a=/([a-z][A-Z]|[A-Z][a-z])/,u=/[\W_]+(.|$)/g,c=/(.)([A-Z]+)/g},function(e,t,r){function n(e){return i(e).replace(/[\W_]+(.|$)/g,function(e,t){return t?" "+t:""}).trim()}var i=r(20);e.exports=n}])});

@@ -399,3 +399,4 @@ 'use strict';

value: function handleWindowResize() {
this.update();
(0, _getScrollbarWidth2["default"])(false);
this.forceUpdate();
}

@@ -402,0 +403,0 @@ }, {

@@ -17,3 +17,5 @@ 'use strict';

function getScrollbarWidth() {
if (scrollbarWidth !== false) return scrollbarWidth;
var cacheEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
if (cacheEnabled && scrollbarWidth !== false) return scrollbarWidth;
/* istanbul ignore else */

@@ -20,0 +22,0 @@ if (typeof document !== 'undefined') {

{
"name": "react-custom-scrollbars-2",
"version": "4.2.2",
"version": "4.2.3",
"description": "React scrollbars component",

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

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

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