UNPKG

react-scrollbar-possible

Version:
7 lines 52.5 kB
!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.ScrollArea=t(require("react")):e.ScrollArea=t(e.React)}(this,function(e){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),n(35);var r=n(15),i=o(r);t.default=i.default},function(t,n){t.exports=e},function(e,t){"use strict";function n(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]="number"==typeof e[n]?e[n]:e[n].val);return t}t.__esModule=!0,t.default=n,e.exports=t.default},function(e,t,n){"use strict";var o=n(1),r=n(18);if("undefined"==typeof o)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var i=(new o.Component).updater;e.exports=r(o.Component,o.isValidElement,i)},function(e,t,n){(function(t){(function(){var n,o,r;"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()-r)/1e6},o=t.hrtime,n=function(){var e;return e=o(),1e9*e[0]+e[1]},r=n()):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)}).call(t,n(12))},function(e,t,n){e.exports=n(25)()},function(e,t,n){(function(t){for(var o=n(27),r="undefined"==typeof window?t:window,i=["moz","webkit"],a="AnimationFrame",s=r["request"+a],l=r["cancel"+a]||r["cancelRequest"+a],u=0;!s&&u<i.length;u++)s=r[i[u]+"Request"+a],l=r[i[u]+"Cancel"+a]||r[i[u]+"CancelRequest"+a];if(!s||!l){var c=0,f=0,p=[],d=1e3/60;s=function(e){if(0===p.length){var t=o(),n=Math.max(0,d-(t-c));c=n+t,setTimeout(function(){var e=p.slice(0);p.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(e){setTimeout(function(){throw e},0)}},Math.round(n))}return p.push({handle:++f,callback:e,cancelled:!1}),f},l=function(e){for(var t=0;t<p.length;t++)p[t].handle===e&&(p[t].cancelled=!0)}}e.exports=function(e){return s.call(r,e)},e.exports.cancel=function(){l.apply(r,arguments)},e.exports.polyfill=function(e){e||(e=r),e.requestAnimationFrame=s,e.cancelAnimationFrame=l}}).call(t,function(){return this}())},function(e,t){"use strict";function n(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=0);return t}t.__esModule=!0,t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e,t,n){for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){if(0!==n[o])return!1;var r="number"==typeof t[o]?t[o]:t[o].val;if(e[o]!==r)return!1}return!0}t.__esModule=!0,t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e,t,n,r,i,a,s){var l=-i*(t-r),u=-a*n,c=l+u,f=n+c*e,p=t+f*e;return Math.abs(f)<s&&Math.abs(p-r)<s?(o[0]=r,o[1]=0,o):(o[0]=p,o[1]=f,o)}t.__esModule=!0,t.default=n;var o=[0,0];e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){return p?f.default.findDOMNode(e):e}function i(){d||p||(d=!0,console.error("With React 0.14 and later versions, you no longer need to wrap <ScrollArea> child into a function."))}function a(){!d&&p&&(d=!0,console.error("With React 0.13, you need to wrap <ScrollArea> child into a function."))}function s(e){return e<0?0:e}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=t(e[o]));return n}function u(e){var t=e.version;if("string"!=typeof t)return!0;var n=t.split("."),o=parseInt(n[0],10),r=parseInt(n[1],10);return 0===o&&13===r}Object.defineProperty(t,"__esModule",{value:!0}),t.findDOMNode=r,t.warnAboutFunctionChild=i,t.warnAboutElementChild=a,t.positiveOrZero=s,t.modifyObjValues=l,t.isReact13=u;var c=n(1),f=o(c),p=u(f.default),d=!1},function(e,t,n){"use strict";function o(e,t,n,o,i,a,s,l){if(r(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,i,a,s,l],f=0;u=new Error(t.replace(/%s/g,function(){return c[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}var r=function(e){};e.exports=o},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function r(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(e){if(f===clearTimeout)return clearTimeout(e);if((f===o||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){y&&d&&(y=!1,d.length?h=d.concat(h):m=-1,h.length&&s())}function s(){if(!y){var e=r(a);y=!0;for(var t=h.length;t;){for(d=h,h=[];++m<t;)d&&d[m].run();m=-1,t=h.length}d=null,y=!1,i(e)}}function l(e,t){this.fun=e,this.array=t}function u(){}var c,f,p=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(e){c=n}try{f="function"==typeof clearTimeout?clearTimeout:o}catch(e){f=o}}();var d,h=[],y=!1,m=-1;p.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];h.push(new l(e,t)),1!==h.length||y||r(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=u,p.addListener=u,p.once=u,p.off=u,p.removeListener=u,p.removeAllListeners=u,p.emit=u,p.prependListener=u,p.prependOnceListener=u,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t){"use strict";t.__esModule=!0,t.default={noWobble:{stiffness:170,damping:26},gentle:{stiffness:120,damping:14},wobbly:{stiffness:180,damping:12},stiff:{stiffness:210,damping:20}},e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e.default:e}t.__esModule=!0;var r=n(28);t.Motion=o(r);var i=n(29);t.StaggeredMotion=o(i);var a=n(30);t.TransitionMotion=o(a);var s=n(33);t.spring=o(s);var l=n(13);t.presets=o(l);var u=n(2);t.stripStyle=o(u);var c=n(32);t.reorderKeys=o(c)},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),c=n(1),f=o(c),p=n(16),d=o(p),h=n(10),y=n(23),m=o(y),v=n(14),g={wheel:"wheel",api:"api",touch:"touch",touchEnd:"touchEnd",mousemove:"mousemove",keyPress:"keypress"},b=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={topPosition:0,leftPosition:0,realHeight:0,containerHeight:0,realWidth:0,containerWidth:0,swapWheelAxes:!1,dragging:!1,dragX:0,dragY:0},n.scrollArea={refresh:function(){n.setSizesToState()},scrollTop:function(){n.scrollTop()},scrollBottom:function(){n.scrollBottom()},scrollYTo:function(e){n.scrollYTo(e)},scrollLeft:function(){n.scrollLeft()},scrollRight:function(){n.scrollRight()},scrollXTo:function(e){n.scrollXTo(e)},centerTo:function(e,t){n.centerTo(e,t)},getCenterX:function(){n.getCenterX()},getCenterY:function(){n.getCenterY()}},n.evntsPreviousValues={clientX:0,clientY:0,deltaX:0,deltaY:0},n.bindedHandleMouseUp=n.handleMouseUp.bind(n),n.bindedHandleWindowResize=n.handleWindowResize.bind(n),n}return a(t,e),u(t,[{key:"getChildContext",value:function(){return{scrollArea:this.scrollArea}}},{key:"componentDidMount",value:function(){this.props.contentWindow&&this.props.contentWindow.addEventListener("resize",this.bindedHandleWindowResize),window.addEventListener("mouseup",this.bindedHandleMouseUp),this.lineHeightPx=(0,m.default)((0,h.findDOMNode)(this.content)),this.props.focusing?this.setSizesScrollFromFocusToState():this.setSizesToState()}},{key:"componentWillUnmount",value:function(){this.props.contentWindow&&this.props.contentWindow.removeEventListener("resize",this.bindedHandleWindowResize),window.removeEventListener("mouseup",this.bindedHandleMouseUp)}},{key:"componentDidUpdate",value:function(e){this.props.focusing?this.setSizesScrollFromFocusToState(e):this.setSizesToState()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,o=t.className,r=t.contentClassName,i=t.ownerDocument,a=this.props.smoothScrolling&&(this.state.eventType===g.wheel||this.state.eventType===g.api||this.state.eventType===g.touchEnd||this.state.eventType===g.keyPress),s=this.canScrollX()&&this.canScrollY(),u=this.canScrollY()?f.default.createElement(d.default,{ownerDocument:i,realSize:this.state.realHeight-(s?12:0),containerSize:this.state.containerHeight-(s?12:0),position:this.state.topPosition,onMove:this.handleScrollbarMove.bind(this),onPositionChange:this.handleScrollbarYPositionChange.bind(this),containerStyle:this.props.verticalContainerStyle,scrollbarStyle:this.props.verticalScrollbarStyle,smoothScrolling:a,minScrollSize:this.props.minScrollSize,onFocus:this.focusContent.bind(this),type:"vertical",shorten:s}):null,c=this.canScrollX()?f.default.createElement(d.default,{ownerDocument:i,realSize:this.state.realWidth-(s?12:0),containerSize:this.state.containerWidth-(s?12:0),position:this.state.leftPosition,onMove:this.handleScrollbarMove.bind(this),onPositionChange:this.handleScrollbarXPositionChange.bind(this),containerStyle:this.props.horizontalContainerStyle,scrollbarStyle:this.props.horizontalScrollbarStyle,smoothScrolling:a,minScrollSize:this.props.minScrollSize,onFocus:this.focusContent.bind(this),type:"horizontal",shorten:s}):null;"function"==typeof n?((0,h.warnAboutFunctionChild)(),n=n()):(0,h.warnAboutElementChild)();var p="scrollarea "+(o||""),y="scrollarea-content "+(r||""),m={marginTop:-this.state.topPosition,marginLeft:-this.state.leftPosition},b=a?(0,h.modifyObjValues)(m,function(e){return(0,v.spring)(e)}):m;return f.default.createElement(v.Motion,{style:b},function(t){return f.default.createElement("div",{ref:function(t){return e.wrapper=t},className:p,style:e.props.style,onWheel:e.handleWheel.bind(e)},f.default.createElement("div",{ref:function(t){return e.content=t},style:l({},e.props.contentStyle,t),className:y,onTouchStart:e.handleTouchStart.bind(e),onTouchMove:e.handleTouchMove.bind(e),onTouchEnd:e.handleTouchEnd.bind(e),onKeyDown:e.handleKeyDown.bind(e),onKeyUp:e.handleKeyUp.bind(e),onMouseDown:e.handleMouseDown.bind(e),onMouseMove:e.handleMouseMove.bind(e),tabIndex:e.props.focusableTabIndex},n),u,c,s&&f.default.createElement("div",{style:{position:"absolute",width:12,height:12,right:0,bottom:0,background:"#AAC0FF",zIndex:19999}}))})}},{key:"setStateFromEvent",value:function(e,t){this.props.onScroll&&this.props.onScroll(e),this.setState(l({},e,{eventType:t}))}},{key:"handleTouchStart",value:function(e){var t=e.touches;if(1===t.length){var n=t[0],o=n.clientX,r=n.clientY;this.eventPreviousValues=l({},this.eventPreviousValues,{clientY:r,clientX:o,timestamp:Date.now()})}}},{key:"handleTouchMove",value:function(e){e.preventDefault(),e.stopPropagation();var t=e.touches;if(1===t.length){var n=t[0],o=n.clientX,r=n.clientY,i=this.eventPreviousValues.clientY-r,a=this.eventPreviousValues.clientX-o;this.eventPreviousValues=l({},this.eventPreviousValues,{deltaY:i,deltaX:a,clientY:r,clientX:o,timestamp:Date.now()}),this.setStateFromEvent(this.composeNewState(-a,-i))}}},{key:"handleTouchEnd",value:function(e){var t=this.eventPreviousValues,n=t.deltaX,o=t.deltaY,r=t.timestamp;"undefined"==typeof n&&(n=0),"undefined"==typeof o&&(o=0),Date.now()-r<200&&this.setStateFromEvent(this.composeNewState(10*-n,10*-o),g.touchEnd),this.eventPreviousValues=l({},this.eventPreviousValues,{deltaY:0,deltaX:0})}},{key:"handleScrollbarMove",value:function(e,t){this.setStateFromEvent(this.composeNewState(t,e))}},{key:"handleScrollbarXPositionChange",value:function(e){this.scrollXTo(e)}},{key:"handleScrollbarYPositionChange",value:function(e){this.scrollYTo(e)}},{key:"handleWheel",value:function(e){if(!e.ctrlKey){var t=e.deltaY,n=e.deltaX;if(this.swapWheelAxes){var o=[n,t];t=o[0],n=o[1]}1===e.deltaMode&&(t*=this.lineHeightPx,n*=this.lineHeightPx),t*=this.props.speed,n*=this.props.speed;var r=this.composeNewState(-n,-t);(r.topPosition&&this.state.topPosition!==r.topPosition||r.leftPosition&&this.state.leftPosition!==r.leftPosition||this.props.stopScrollPropagation)&&(e.preventDefault(),e.stopPropagation()),this.setStateFromEvent(r,g.wheel),this.focusContent()}}},{key:"handleKeyDown",value:function(e){if("input"!==e.target.tagName.toLowerCase()){var t=0,n=0,o=this.lineHeightPx?this.lineHeightPx:10;switch(e.keyCode){case 16:this.swapWheelAxes=!0;break;case 33:t=this.state.containerHeight-o;break;case 34:t=-this.state.containerHeight+o;break;case 37:n=o;break;case 38:t=o;break;case 39:n=-o;break;case 40:t=-o}if(0!==t||0!==n){var r=this.composeNewState(n,t);this.setStateFromEvent(r,g.keyPress)}}}},{key:"handleKeyUp",value:function(e){"input"!==e.target.tagName.toLowerCase()&&16===e.keyCode&&(this.swapWheelAxes=!1)}},{key:"handleMouseDown",value:function(e){"input"!==e.target.tagName.toLowerCase()&&(this.dragX=e.screenX,this.dragY=e.screenY,this.dragging=this.props.dragging)}},{key:"handleMouseUp",value:function(e){"input"!==e.target.tagName.toLowerCase()&&(this.dragging=!1)}},{key:"handleMouseMove",value:function(e){if(this.dragging){var t=2*(this.dragX-e.screenX),n=2*(this.dragY-e.screenY);if(this.dragX=e.screenX,this.dragY=e.screenY,this.swapWheelAxes){var o=[t,n];n=o[0],t=o[1]}1===e.deltaMode&&(n*=this.lineHeightPx,t*=this.lineHeightPx),n*=this.props.speed,t*=this.props.speed;var r=this.composeNewState(-t,-n);(r.topPosition&&this.state.topPosition!==r.topPosition||r.leftPosition&&this.state.leftPosition!==r.leftPosition||this.props.stopScrollPropagation)&&(e.preventDefault(),e.stopPropagation()),this.setStateFromEvent(r,g.wheel),this.focusContent()}}},{key:"handleWindowResize",value:function(){var e=this.computeSizes();e=this.getModifiedPositionsIfNeeded(e),this.setStateFromEvent(e)}},{key:"composeNewState",value:function(e,t){var n=this.computeSizes();return this.canScrollY(n)?n.topPosition=this.computeTopPosition(t,n):n.topPosition=0,this.canScrollX(n)&&(n.leftPosition=this.computeLeftPosition(e,n)),n}},{key:"computeTopPosition",value:function(e,t){var n=this.state.topPosition-e;return this.normalizeTopPosition(n,t)}},{key:"computeLeftPosition",value:function(e,t){var n=this.state.leftPosition-e;return this.normalizeLeftPosition(n,t)}},{key:"normalizeTopPosition",value:function(e,t){return e>t.realHeight-t.containerHeight&&(e=t.realHeight-t.containerHeight),e<0&&(e=0),e}},{key:"normalizeLeftPosition",value:function(e,t){return e>t.realWidth-t.containerWidth?e=t.realWidth-t.containerWidth:e<0&&(e=0),e}},{key:"computeSizes",value:function(){var e=this.content.offsetHeight,t=this.wrapper.offsetHeight,n=this.content.offsetWidth,o=this.wrapper.offsetWidth;return{realHeight:e,containerHeight:t,realWidth:n,containerWidth:o}}},{key:"setSizesToState",value:function(){var e=this.computeSizes();e.realHeight===this.state.realHeight&&e.realWidth===this.state.realWidth||this.setStateFromEvent(this.getModifiedPositionsIfNeeded(e))}},{key:"setSizesScrollFromFocusToState",value:function(e){var t=this.computeSizes(),n=(e||{}).focusX&&(e||{}).focusY&&(this.props||{}).focusX&&(this.props||{}).focusY&&(e.focusX!==this.props.focusX||e.focusY!==this.props.focusY);(t.realHeight!==this.state.realHeight||t.realWidth!==this.state.realWidth||n)&&this.setStateFromEvent(this.getCenteredPosition(t),g.api)}},{key:"scrollTop",value:function(){this.scrollYTo(0)}},{key:"scrollBottom",value:function(){this.scrollYTo(this.state.realHeight-this.state.containerHeight)}},{key:"scrollLeft",value:function(){this.scrollXTo(0)}},{key:"scrollRight",value:function(){this.scrollXTo(this.state.realWidth-this.state.containerWidth)}},{key:"scrollYTo",value:function(e){if(this.canScrollY()){var t=this.normalizeTopPosition(e,this.computeSizes());this.setStateFromEvent({topPosition:t},g.api)}}},{key:"scrollXTo",value:function(e){if(this.canScrollX()){var t=this.normalizeLeftPosition(e,this.computeSizes());this.setStateFromEvent({leftPosition:t},g.api)}}},{key:"canScrollY",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state,t=e.realHeight>e.containerHeight;return t&&this.props.vertical}},{key:"canScrollX",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state,t=e.realWidth>e.containerWidth;return t&&this.props.horizontal}},{key:"getModifiedPositionsIfNeeded",value:function(e){var t=e.realHeight-e.containerHeight;this.state.topPosition>=t&&(e.topPosition=this.canScrollY(e)?(0,h.positiveOrZero)(t):0);var n=e.realWidth-e.containerWidth;return this.state.leftPosition>=n&&(e.leftPosition=this.canScrollX(e)?(0,h.positiveOrZero)(n):0),e}},{key:"getScrollXFromFocus",value:function(e){var t=e*this.content.offsetWidth-this.wrapper.offsetWidth/2;return isNaN(t)?0:t<0?0:t>this.content.offsetWidth-this.wrapper.offsetWidth?this.content.offsetWidth-this.wrapper.offsetWidth:t}},{key:"getScrollYFromFocus",value:function(e){var t=e*this.content.offsetHeight-this.wrapper.offsetHeight/2;return isNaN(t)?0:t<0?0:t>this.content.offsetHeight-this.wrapper.offsetHeight?this.content.offsetHeight-this.wrapper.offsetHeight:t}},{key:"getCenteredPosition",value:function(e){return e.topPosition=this.getScrollYFromFocus(this.props.focusY),e.leftPosition=this.getScrollXFromFocus(this.props.focusX),e}},{key:"centerTo",value:function(e,t){this.setStateFromEvent({leftPosition:this.getScrollXFromFocus(e),topPosition:this.getScrollYFromFocus(t)},g.api)}},{key:"focusContent",value:function(){this.content&&(0,h.findDOMNode)(this.content).focus()}}]),t}(f.default.Component);t.default=b,b.childContextTypes={scrollArea:f.default.PropTypes.object},b.propTypes={className:f.default.PropTypes.string,style:f.default.PropTypes.object,speed:f.default.PropTypes.number,contentClassName:f.default.PropTypes.string,contentStyle:f.default.PropTypes.object,vertical:f.default.PropTypes.bool,verticalContainerStyle:f.default.PropTypes.object,verticalScrollbarStyle:f.default.PropTypes.object,horizontal:f.default.PropTypes.bool,horizontalContainerStyle:f.default.PropTypes.object,horizontalScrollbarStyle:f.default.PropTypes.object,onScroll:f.default.PropTypes.func,contentWindow:f.default.PropTypes.any,ownerDocument:f.default.PropTypes.any,smoothScrolling:f.default.PropTypes.bool,minScrollSize:f.default.PropTypes.number,swapWheelAxes:f.default.PropTypes.bool,dragging:f.default.PropTypes.bool,dragX:f.default.PropTypes.number,dragY:f.default.PropTypes.number,stopScrollPropagation:f.default.PropTypes.bool,focusableTabIndex:f.default.PropTypes.number,focusing:f.default.PropTypes.bool,focusY:f.default.PropTypes.number,focusX:f.default.PropTypes.number},b.defaultProps={speed:1,vertical:!0,horizontal:!0,smoothScrolling:!1,swapWheelAxes:!1,dragging:!1,dragX:0,dragY:0,contentWindow:"object"===("undefined"==typeof window?"undefined":s(window))?window:void 0,ownerDocument:"object"===("undefined"==typeof document?"undefined":s(document))?document:void 0,focusableTabIndex:1,focusing:!1,focusY:0,focusX:0}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=n(1),c=o(u),f=n(14),p=n(10),d=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=n.calculateState(e);return n.state={position:o.position,scrollSize:o.scrollSize,isDragging:!1,lastClientPosition:0},"vertical"===e.type?n.bindedHandleMouseMove=n.handleMouseMoveForVertical.bind(n):n.bindedHandleMouseMove=n.handleMouseMoveForHorizontal.bind(n),n.bindedHandleMouseUp=n.handleMouseUp.bind(n),n}return a(t,e),l(t,[{key:"componentDidMount",value:function(){this.props.ownerDocument&&(this.props.ownerDocument.addEventListener("mousemove",this.bindedHandleMouseMove),this.props.ownerDocument.addEventListener("mouseup",this.bindedHandleMouseUp))}},{key:"componentWillReceiveProps",value:function(e){this.setState(this.calculateState(e))}},{key:"componentWillUnmount",value:function(){this.props.ownerDocument&&(this.props.ownerDocument.removeEventListener("mousemove",this.bindedHandleMouseMove),this.props.ownerDocument.removeEventListener("mouseup",this.bindedHandleMouseUp))}},{key:"calculateFractionalPosition",value:function(e,t,n){var o=e-t;return 1-(o-n)/o}},{key:"calculateState",value:function(e){var t=this.calculateFractionalPosition(e.realSize,e.containerSize,e.position),n=e.containerSize*e.containerSize/e.realSize,o=n<e.minScrollSize?e.minScrollSize:n,r=(e.containerSize-o)*t;return{scrollSize:o,position:Math.round(r)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.smoothScrolling,o=t.isDragging,r=t.type,i=t.scrollbarStyle,a=t.containerStyle,l=t.shorten,u="horizontal"===r,d="vertical"===r,h=this.createScrollStyles(),y=n?(0,p.modifyObjValues)(h,function(e){return(0,f.spring)(e)}):h,m="scrollbar-container "+(o?"active":"")+" "+(u?"horizontal":"")+" "+(d?"vertical":"")+" "+(l?"shorten":"");return c.default.createElement(f.Motion,{style:y},function(t){return c.default.createElement("div",{className:m,style:a,onMouseDown:e.handleScrollBarContainerClick.bind(e),ref:function(t){return e.scrollbarContainer=t}},c.default.createElement("div",{className:"scrollbar",style:s({},i,t),onMouseDown:e.handleMouseDown.bind(e)}))})}},{key:"handleScrollBarContainerClick",value:function(e){e.preventDefault();var t=this.computeMultiplier(),n=this.isVertical()?e.clientY:e.clientX,o=this.scrollbarContainer.getBoundingClientRect(),r=o.top,i=o.left,a=this.isVertical()?r:i,s=n-a,l=this.props.containerSize*this.props.containerSize/this.props.realSize;this.setState({isDragging:!0,lastClientPosition:n}),this.props.onPositionChange((s-l/2)/t)}},{key:"handleMouseMoveForHorizontal",value:function(e){var t=this.computeMultiplier();if(this.state.isDragging){e.preventDefault();var n=this.state.lastClientPosition-e.clientX;this.setState({lastClientPosition:e.clientX}),this.props.onMove(0,n/t)}}},{key:"handleMouseMoveForVertical",value:function(e){var t=this.computeMultiplier();if(this.state.isDragging){e.preventDefault();var n=this.state.lastClientPosition-e.clientY;this.setState({lastClientPosition:e.clientY}),this.props.onMove(n/t,0)}}},{key:"handleMouseDown",value:function(e){e.preventDefault(),e.stopPropagation();var t=this.isVertical()?e.clientY:e.clientX;this.setState({isDragging:!0,lastClientPosition:t}),this.props.onFocus()}},{key:"handleMouseUp",value:function(e){e.preventDefault(),this.setState({isDragging:!1})}},{key:"createScrollStyles",value:function(){return"vertical"===this.props.type?{height:this.state.scrollSize,marginTop:this.state.position}:{width:this.state.scrollSize,marginLeft:this.state.position}}},{key:"computeMultiplier",value:function(){return this.props.containerSize/this.props.realSize}},{key:"isVertical",value:function(){return"vertical"===this.props.type}}]),t}(c.default.Component);d.propTypes={onMove:c.default.PropTypes.func,onPositionChange:c.default.PropTypes.func,onFocus:c.default.PropTypes.func,realSize:c.default.PropTypes.number,containerSize:c.default.PropTypes.number,position:c.default.PropTypes.number,containerStyle:c.default.PropTypes.object,scrollbarStyle:c.default.PropTypes.object,type:c.default.PropTypes.oneOf(["vertical","horizontal"]),ownerDocument:c.default.PropTypes.any,smoothScrolling:c.default.PropTypes.bool,minScrollSize:c.default.PropTypes.number,shorten:c.default.PropTypes.bool},d.defaultProps={type:"vertical",smoothScrolling:!1,shorten:!1},t.default=d},function(e,t){var n=function(e,t,n){return n=window.getComputedStyle,(n?n(e):e.currentStyle)[t.replace(/-(\w)/gi,function(e,t){return t.toUpperCase()})]};e.exports=n},function(e,t,n){"use strict";function o(e){return e}function r(e,t,n){function r(e,t){var n=g.hasOwnProperty(t)?g[t]:null;w.hasOwnProperty(t)&&l("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&l("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function i(e,n){if(n){l("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),l(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var o=e.prototype,i=o.__reactAutoBindPairs;n.hasOwnProperty(u)&&b.mixins(e,n.mixins);for(var a in n)if(n.hasOwnProperty(a)&&a!==u){var s=n[a],c=o.hasOwnProperty(a);if(r(c,a),b.hasOwnProperty(a))b[a](e,s);else{var f=g.hasOwnProperty(a),h="function"==typeof s,y=h&&!f&&!c&&n.autobind!==!1;if(y)i.push(a,s),o[a]=s;else if(c){var m=g[a];l(f&&("DEFINE_MANY_MERGED"===m||"DEFINE_MANY"===m),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",m,a),"DEFINE_MANY_MERGED"===m?o[a]=p(o[a],s):"DEFINE_MANY"===m&&(o[a]=d(o[a],s))}else o[a]=s}}}else;}function c(e,t){if(t)for(var n in t){var o=t[n];if(t.hasOwnProperty(n)){var r=n in b;l(!r,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var i=n in e;l(!i,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),e[n]=o}}}function f(e,t){l(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in t)t.hasOwnProperty(n)&&(l(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function p(e,t){return function(){var n=e.apply(this,arguments),o=t.apply(this,arguments);if(null==n)return o;if(null==o)return n;var r={};return f(r,n),f(r,o),r}}function d(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function h(e,t){var n=t.bind(e);return n}function y(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var o=t[n],r=t[n+1];e[o]=h(e,r)}}function m(e){var t=o(function(e,o,r){this.__reactAutoBindPairs.length&&y(this),this.props=e,this.context=o,this.refs=s,this.updater=r||n,this.state=null;var i=this.getInitialState?this.getInitialState():null;l("object"==typeof i&&!Array.isArray(i),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=i});t.prototype=new T,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],v.forEach(i.bind(null,t)),i(t,S),i(t,e),i(t,P),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),l(t.prototype.render,"createClass(...): Class specification must implement a `render` method.");for(var r in g)t.prototype[r]||(t.prototype[r]=null);return t}var v=[],g={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},b={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)i(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=a({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=a({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=p(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=a({},e.propTypes,t)},statics:function(e,t){c(e,t)},autobind:function(){}},S={componentDidMount:function(){this.__isMounted=!0}},P={componentWillUnmount:function(){this.__isMounted=!1}},w={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},T=function(){};return a(T.prototype,e.prototype,w),m}var i,a=n(24),s=n(22),l=n(11),u="mixins";i={},e.exports=r},function(e,t,n){t=e.exports=n(20)(),t.push([e.id,".scrollarea-content{margin:0;padding:0;overflow:hidden;position:relative}.scrollarea-content:focus{outline:0}.scrollarea{position:relative;overflow:hidden}.scrollarea .scrollbar-container{position:absolute;background:none;opacity:.1;z-index:9999;transition:all .4s}.scrollarea .scrollbar-container.horizontal{width:100%;height:10px;left:0;bottom:0;margin-right:12px;box-sizing:content-box}.scrollarea .scrollbar-container.horizontal.shorten{width:calc(100% - 12px)}.scrollarea .scrollbar-container.horizontal .scrollbar{width:20px;height:8px;background:#000;margin-top:1px}.scrollarea .scrollbar-container.vertical{width:10px;height:100%;right:0;top:0;margin-bottom:12px;box-sizing:border-box}.scrollarea .scrollbar-container.vertical.shorten{height:calc(100% - 12px)}.scrollarea .scrollbar-container.vertical .scrollbar{width:8px;height:20px;background:#000;margin-left:1px}.scrollarea .scrollbar-container.active,.scrollarea .scrollbar-container:hover{background:gray;opacity:.6!important}.scrollarea:hover .scrollbar-container{opacity:.3}",""]); },function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(o[i]=!0)}for(r=0;r<t.length;r++){var a=t[r];"number"==typeof a[0]&&o[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(e,t){"use strict";function n(e){return function(){return e}}var o=function(){};o.thatReturns=n,o.thatReturnsFalse=n(!1),o.thatReturnsTrue=n(!0),o.thatReturnsNull=n(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";var o={};e.exports=o},function(e,t,n){function o(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(t.indexOf("pt")!==-1?(n*=4,n/=3):t.indexOf("mm")!==-1?(n*=96,n/=25.4):t.indexOf("cm")!==-1?(n*=96,n/=2.54):t.indexOf("in")!==-1?n*=96:t.indexOf("pc")!==-1&&(n*=16),n=Math.round(n),"normal"===t){var i=e.nodeName,a=document.createElement(i);a.innerHTML="&nbsp;";var s=r(e,"font-size");a.style.fontSize=s;var l=document.body;l.appendChild(a);var u=a.offsetHeight;n=u,l.removeChild(a)}return n}var r=n(17);e.exports=o},function(e,t){/* object-assign (c) Sindre Sorhus @license MIT */ "use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var o=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==o.join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=o()?Object.assign:function(e,t){for(var o,s,l=n(e),u=1;u<arguments.length;u++){o=Object(arguments[u]);for(var c in o)i.call(o,c)&&(l[c]=o[c]);if(r){s=r(o);for(var f=0;f<s.length;f++)a.call(o,s[f])&&(l[s[f]]=o[s[f]])}}return l}},function(e,t,n){"use strict";var o=n(21),r=n(11),i=n(26);e.exports=function(){function e(e,t,n,o,a,s){s!==i&&r(!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,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},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){(function(){var n,o,r,i,a,s;"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()-a)/1e6},o=t.hrtime,n=function(){var e;return e=o(),1e9*e[0]+e[1]},i=n(),s=1e9*t.uptime(),a=i-s):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)}).call(t,n(12))},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i=n(7),a=o(i),s=n(2),l=o(s),u=n(9),c=o(u),f=n(4),p=o(f),d=n(6),h=o(d),y=n(8),m=o(y),v=n(1),g=o(v),b=n(5),S=o(b),P=n(3),w=o(P),T=1e3/60,M=w.default({propTypes:{defaultStyle:S.default.objectOf(S.default.number),style:S.default.objectOf(S.default.oneOfType([S.default.number,S.default.object])).isRequired,children:S.default.func.isRequired,onRest:S.default.func},getInitialState:function(){var e=this.props,t=e.defaultStyle,n=e.style,o=t||l.default(n),r=a.default(o);return{currentStyle:o,currentVelocity:r,lastIdealStyle:o,lastIdealVelocity:r}},wasAnimating:!1,animationID:null,prevTime:0,accumulatedTime:0,unreadPropStyle:null,clearUnreadPropStyle:function(e){var t=!1,n=this.state,o=n.currentStyle,i=n.currentVelocity,a=n.lastIdealStyle,s=n.lastIdealVelocity;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var u=e[l];"number"==typeof u&&(t||(t=!0,o=r({},o),i=r({},i),a=r({},a),s=r({},s)),o[l]=u,i[l]=0,a[l]=u,s[l]=0)}t&&this.setState({currentStyle:o,currentVelocity:i,lastIdealStyle:a,lastIdealVelocity:s})},startAnimationIfNecessary:function(){var e=this;this.animationID=h.default(function(t){var n=e.props.style;if(m.default(e.state.currentStyle,n,e.state.currentVelocity))return e.wasAnimating&&e.props.onRest&&e.props.onRest(),e.animationID=null,e.wasAnimating=!1,void(e.accumulatedTime=0);e.wasAnimating=!0;var o=t||p.default(),r=o-e.prevTime;if(e.prevTime=o,e.accumulatedTime=e.accumulatedTime+r,e.accumulatedTime>10*T&&(e.accumulatedTime=0),0===e.accumulatedTime)return e.animationID=null,void e.startAnimationIfNecessary();var i=(e.accumulatedTime-Math.floor(e.accumulatedTime/T)*T)/T,a=Math.floor(e.accumulatedTime/T),s={},l={},u={},f={};for(var d in n)if(Object.prototype.hasOwnProperty.call(n,d)){var h=n[d];if("number"==typeof h)u[d]=h,f[d]=0,s[d]=h,l[d]=0;else{for(var y=e.state.lastIdealStyle[d],v=e.state.lastIdealVelocity[d],g=0;g<a;g++){var b=c.default(T/1e3,y,v,h.val,h.stiffness,h.damping,h.precision);y=b[0],v=b[1]}var S=c.default(T/1e3,y,v,h.val,h.stiffness,h.damping,h.precision),P=S[0],w=S[1];u[d]=y+(P-y)*i,f[d]=v+(w-v)*i,s[d]=y,l[d]=v}}e.animationID=null,e.accumulatedTime-=a*T,e.setState({currentStyle:u,currentVelocity:f,lastIdealStyle:s,lastIdealVelocity:l}),e.unreadPropStyle=null,e.startAnimationIfNecessary()})},componentDidMount:function(){this.prevTime=p.default(),this.startAnimationIfNecessary()},componentWillReceiveProps:function(e){null!=this.unreadPropStyle&&this.clearUnreadPropStyle(this.unreadPropStyle),this.unreadPropStyle=e.style,null==this.animationID&&(this.prevTime=p.default(),this.startAnimationIfNecessary())},componentWillUnmount:function(){null!=this.animationID&&(h.default.cancel(this.animationID),this.animationID=null)},render:function(){var e=this.props.children(this.state.currentStyle);return e&&g.default.Children.only(e)}});t.default=M,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n){for(var o=0;o<e.length;o++)if(!v.default(e[o],t[o],n[o]))return!1;return!0}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},a=n(7),s=o(a),l=n(2),u=o(l),c=n(9),f=o(c),p=n(4),d=o(p),h=n(6),y=o(h),m=n(8),v=o(m),g=n(1),b=o(g),S=n(5),P=o(S),w=n(3),T=o(w),M=1e3/60,E=T.default({propTypes:{defaultStyles:P.default.arrayOf(P.default.objectOf(P.default.number)),styles:P.default.func.isRequired,children:P.default.func.isRequired},getInitialState:function(){var e=this.props,t=e.defaultStyles,n=e.styles,o=t||n().map(u.default),r=o.map(function(e){return s.default(e)});return{currentStyles:o,currentVelocities:r,lastIdealStyles:o,lastIdealVelocities:r}},animationID:null,prevTime:0,accumulatedTime:0,unreadPropStyles:null,clearUnreadPropStyle:function(e){for(var t=this.state,n=t.currentStyles,o=t.currentVelocities,r=t.lastIdealStyles,a=t.lastIdealVelocities,s=!1,l=0;l<e.length;l++){var u=e[l],c=!1;for(var f in u)if(Object.prototype.hasOwnProperty.call(u,f)){var p=u[f];"number"==typeof p&&(c||(c=!0,s=!0,n[l]=i({},n[l]),o[l]=i({},o[l]),r[l]=i({},r[l]),a[l]=i({},a[l])),n[l][f]=p,o[l][f]=0,r[l][f]=p,a[l][f]=0)}}s&&this.setState({currentStyles:n,currentVelocities:o,lastIdealStyles:r,lastIdealVelocities:a})},startAnimationIfNecessary:function(){var e=this;this.animationID=y.default(function(t){var n=e.props.styles(e.state.lastIdealStyles);if(r(e.state.currentStyles,n,e.state.currentVelocities))return e.animationID=null,void(e.accumulatedTime=0);var o=t||d.default(),i=o-e.prevTime;if(e.prevTime=o,e.accumulatedTime=e.accumulatedTime+i,e.accumulatedTime>10*M&&(e.accumulatedTime=0),0===e.accumulatedTime)return e.animationID=null,void e.startAnimationIfNecessary();for(var a=(e.accumulatedTime-Math.floor(e.accumulatedTime/M)*M)/M,s=Math.floor(e.accumulatedTime/M),l=[],u=[],c=[],p=[],h=0;h<n.length;h++){var y=n[h],m={},v={},g={},b={};for(var S in y)if(Object.prototype.hasOwnProperty.call(y,S)){var P=y[S];if("number"==typeof P)m[S]=P,v[S]=0,g[S]=P,b[S]=0;else{for(var w=e.state.lastIdealStyles[h][S],T=e.state.lastIdealVelocities[h][S],E=0;E<s;E++){var O=f.default(M/1e3,w,T,P.val,P.stiffness,P.damping,P.precision);w=O[0],T=O[1]}var k=f.default(M/1e3,w,T,P.val,P.stiffness,P.damping,P.precision),D=k[0],I=k[1];m[S]=w+(D-w)*a,v[S]=T+(I-T)*a,g[S]=w,b[S]=T}}c[h]=m,p[h]=v,l[h]=g,u[h]=b}e.animationID=null,e.accumulatedTime-=s*M,e.setState({currentStyles:c,currentVelocities:p,lastIdealStyles:l,lastIdealVelocities:u}),e.unreadPropStyles=null,e.startAnimationIfNecessary()})},componentDidMount:function(){this.prevTime=d.default(),this.startAnimationIfNecessary()},componentWillReceiveProps:function(e){null!=this.unreadPropStyles&&this.clearUnreadPropStyle(this.unreadPropStyles),this.unreadPropStyles=e.styles(this.state.lastIdealStyles),null==this.animationID&&(this.prevTime=d.default(),this.startAnimationIfNecessary())},componentWillUnmount:function(){null!=this.animationID&&(y.default.cancel(this.animationID),this.animationID=null)},render:function(){var e=this.props.children(this.state.currentStyles);return e&&b.default.Children.only(e)}});t.default=E,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n){var o=t;return null==o?e.map(function(e,t){return{key:e.key,data:e.data,style:n[t]}}):e.map(function(e,t){for(var r=0;r<o.length;r++)if(o[r].key===e.key)return{key:o[r].key,data:o[r].data,style:n[t]};return{key:e.key,data:e.data,style:n[t]}})}function i(e,t,n,o){if(o.length!==t.length)return!1;for(var r=0;r<o.length;r++)if(o[r].key!==t[r].key)return!1;for(var r=0;r<o.length;r++)if(!P.default(e[r],t[r].style,n[r]))return!1;return!0}function a(e,t,n,o,r,i,a,s,l){for(var c=y.default(o,r,function(e,o){var r=t(o);return null==r?(n({key:o.key,data:o.data}),null):P.default(i[e],r,a[e])?(n({key:o.key,data:o.data}),null):{key:o.key,data:o.data,style:r}}),f=[],p=[],d=[],h=[],m=0;m<c.length;m++){for(var v=c[m],g=null,b=0;b<o.length;b++)if(o[b].key===v.key){g=b;break}if(null==g){var S=e(v);f[m]=S,d[m]=S;var w=u.default(v.style);p[m]=w,h[m]=w}else f[m]=i[g],d[m]=s[g],p[m]=a[g],h[m]=l[g]}return[c,f,p,d,h]}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},l=n(7),u=o(l),c=n(2),f=o(c),p=n(9),d=o(p),h=n(31),y=o(h),m=n(4),v=o(m),g=n(6),b=o(g),S=n(8),P=o(S),w=n(1),T=o(w),M=n(5),E=o(M),O=n(3),k=o(O),D=1e3/60,I=k.default({propTypes:{defaultStyles:E.default.arrayOf(E.default.shape({key:E.default.string.isRequired,data:E.default.any,style:E.default.objectOf(E.default.number).isRequired})),styles:E.default.oneOfType([E.default.func,E.default.arrayOf(E.default.shape({key:E.default.string.isRequired,data:E.default.any,style:E.default.objectOf(E.default.oneOfType([E.default.number,E.default.object])).isRequired}))]).isRequired,children:E.default.func.isRequired,willEnter:E.default.func,willLeave:E.default.func,didLeave:E.default.func},getDefaultProps:function(){return{willEnter:function(e){return f.default(e.style)},willLeave:function(){return null},didLeave:function(){}}},getInitialState:function(){var e=this.props,t=e.defaultStyles,n=e.styles,o=e.willEnter,r=e.willLeave,i=e.didLeave,s="function"==typeof n?n(t):n,l=void 0;l=null==t?s:t.map(function(e){for(var t=0;t<s.length;t++)if(s[t].key===e.key)return s[t];return e});var c=null==t?s.map(function(e){return f.default(e.style)}):t.map(function(e){return f.default(e.style)}),p=null==t?s.map(function(e){return u.default(e.style)}):t.map(function(e){return u.default(e.style)}),d=a(o,r,i,l,s,c,p,c,p),h=d[0],y=d[1],m=d[2],v=d[3],g=d[4];return{currentStyles:y,currentVelocities:m,lastIdealStyles:v,lastIdealVelocities:g,mergedPropsStyles:h}},unmounting:!1,animationID:null,prevTime:0,accumulatedTime:0,unreadPropStyles:null,clearUnreadPropStyle:function(e){for(var t=a(this.props.willEnter,this.props.willLeave,this.props.didLeave,this.state.mergedPropsStyles,e,this.state.currentStyles,this.state.currentVelocities,this.state.lastIdealStyles,this.state.lastIdealVelocities),n=t[0],o=t[1],r=t[2],i=t[3],l=t[4],u=0;u<e.length;u++){var c=e[u].style,f=!1;for(var p in c)if(Object.prototype.hasOwnProperty.call(c,p)){var d=c[p];"number"==typeof d&&(f||(f=!0,o[u]=s({},o[u]),r[u]=s({},r[u]),i[u]=s({},i[u]),l[u]=s({},l[u]),n[u]={key:n[u].key,data:n[u].data,style:s({},n[u].style)}),o[u][p]=d,r[u][p]=0,i[u][p]=d,l[u][p]=0,n[u].style[p]=d)}}this.setState({currentStyles:o,currentVelocities:r,mergedPropsStyles:n,lastIdealStyles:i,lastIdealVelocities:l})},startAnimationIfNecessary:function(){var e=this;this.unmounting||(this.animationID=b.default(function(t){if(!e.unmounting){var n=e.props.styles,o="function"==typeof n?n(r(e.state.mergedPropsStyles,e.unreadPropStyles,e.state.lastIdealStyles)):n;if(i(e.state.currentStyles,o,e.state.currentVelocities,e.state.mergedPropsStyles))return e.animationID=null,void(e.accumulatedTime=0);var s=t||v.default(),l=s-e.prevTime;if(e.prevTime=s,e.accumulatedTime=e.accumulatedTime+l,e.accumulatedTime>10*D&&(e.accumulatedTime=0),0===e.accumulatedTime)return e.animationID=null,void e.startAnimationIfNecessary();for(var u=(e.accumulatedTime-Math.floor(e.accumulatedTime/D)*D)/D,c=Math.floor(e.accumulatedTime/D),f=a(e.props.willEnter,e.props.willLeave,e.props.didLeave,e.state.mergedPropsStyles,o,e.state.currentStyles,e.state.currentVelocities,e.state.lastIdealStyles,e.state.lastIdealVelocities),p=f[0],h=f[1],y=f[2],m=f[3],g=f[4],b=0;b<p.length;b++){var S=p[b].style,P={},w={},T={},M={};for(var E in S)if(Object.prototype.hasOwnProperty.call(S,E)){var O=S[E];if("number"==typeof O)P[E]=O,w[E]=0,T[E]=O,M[E]=0;else{for(var k=m[b][E],I=g[b][E],x=0;x<c;x++){var _=d.default(D/1e3,k,I,O.val,O.stiffness,O.damping,O.precision);k=_[0],I=_[1]}var C=d.default(D/1e3,k,I,O.val,O.stiffness,O.damping,O.precision),N=C[0],j=C[1];P[E]=k+(N-k)*u,w[E]=I+(j-I)*u,T[E]=k,M[E]=I}}m[b]=T,g[b]=M,h[b]=P,y[b]=w}e.animationID=null,e.accumulatedTime-=c*D,e.setState({currentStyles:h,currentVelocities:y,lastIdealStyles:m,lastIdealVelocities:g,mergedPropsStyles:p}),e.unreadPropStyles=null,e.startAnimationIfNecessary()}}))},componentDidMount:function(){this.prevTime=v.default(),this.startAnimationIfNecessary()},componentWillReceiveProps:function(e){this.unreadPropStyles&&this.clearUnreadPropStyle(this.unreadPropStyles);var t=e.styles;"function"==typeof t?this.unreadPropStyles=t(r(this.state.mergedPropsStyles,this.unreadPropStyles,this.state.lastIdealStyles)):this.unreadPropStyles=t,null==this.animationID&&(this.prevTime=v.default(),this.startAnimationIfNecessary())},componentWillUnmount:function(){this.unmounting=!0,null!=this.animationID&&(b.default.cancel(this.animationID),this.animationID=null)},render:function(){var e=r(this.state.mergedPropsStyles,this.unreadPropStyles,this.state.currentStyles),t=this.props.children(e);return t&&T.default.Children.only(t)}});t.default=I,e.exports=t.default},function(e,t){"use strict";function n(e,t,n){for(var o={},r=0;r<e.length;r++)o[e[r].key]=r;for(var i={},r=0;r<t.length;r++)i[t[r].key]=r;for(var a=[],r=0;r<t.length;r++)a[r]=t[r];for(var r=0;r<e.length;r++)if(!Object.prototype.hasOwnProperty.call(i,e[r].key)){var s=n(r,e[r]);null!=s&&a.push(s)}return a.sort(function(e,n){var r=i[e.key],a=i[n.key],s=o[e.key],l=o[n.key];if(null!=r&&null!=a)return i[e.key]-i[n.key];if(null!=s&&null!=l)return o[e.key]-o[n.key];if(null!=r){for(var u=0;u<t.length;u++){var c=t[u].key;if(Object.prototype.hasOwnProperty.call(o,c)){if(r<i[c]&&l>o[c])return-1;if(r>i[c]&&l<o[c])return 1}}return 1}for(var u=0;u<t.length;u++){var c=t[u].key;if(Object.prototype.hasOwnProperty.call(o,c)){if(a<i[c]&&s>o[c])return 1;if(a>i[c]&&s<o[c])return-1}}return-1})}t.__esModule=!0,t.default=n,e.exports=t.default},function(e,t,n){"use strict";function o(){}t.__esModule=!0,t.default=o;e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){return i({},l,t,{val:e})}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};t.default=r;var a=n(13),s=o(a),l=i({},s.default.noWobble,{precision:.01});e.exports=t.default},function(e,t,n){function o(e,t){for(var n=0;n<e.length;n++){var o=e[n],r=d[o.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](o.parts[i]);for(;i<o.parts.length;i++)r.parts.push(u(o.parts[i],t))}else{for(var a=[],i=0;i<o.parts.length;i++)a.push(u(o.parts[i],t));d[o.id]={id:o.id,refs:1,parts:a}}}}function r(e){for(var t=[],n={},o=0;o<e.length;o++){var r=e[o],i=r[0],a=r[1],s=r[2],l=r[3],u={css:a,media:s,sourceMap:l};n[i]?n[i].parts.push(u):t.push(n[i]={id:i,parts:[u]})}return t}function i(e,t){var n=m(),o=b[b.length-1];if("top"===e.insertAt)o?o.nextSibling?n.insertBefore(t,o.