\") : invariant(false) : void 0;\n return /*#__PURE__*/React.createElement(Component, _extends({}, remainingProps, context, {\n ref: wrappedComponentRef\n }));\n });\n };\n\n C.displayName = displayName;\n C.WrappedComponent = Component;\n\n if (process.env.NODE_ENV !== \"production\") {\n C.propTypes = {\n wrappedComponentRef: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.object])\n };\n }\n\n return hoistStatics(C, Component);\n}\n\nvar useContext = React.useContext;\nfunction useHistory() {\n if (process.env.NODE_ENV !== \"production\") {\n !(typeof useContext === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You must use React >= 16.8 in order to use useHistory()\") : invariant(false) : void 0;\n }\n\n return useContext(historyContext);\n}\nfunction useLocation() {\n if (process.env.NODE_ENV !== \"production\") {\n !(typeof useContext === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You must use React >= 16.8 in order to use useLocation()\") : invariant(false) : void 0;\n }\n\n return useContext(context).location;\n}\nfunction useParams() {\n if (process.env.NODE_ENV !== \"production\") {\n !(typeof useContext === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You must use React >= 16.8 in order to use useParams()\") : invariant(false) : void 0;\n }\n\n var match = useContext(context).match;\n return match ? match.params : {};\n}\nfunction useRouteMatch(path) {\n if (process.env.NODE_ENV !== \"production\") {\n !(typeof useContext === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You must use React >= 16.8 in order to use useRouteMatch()\") : invariant(false) : void 0;\n }\n\n var location = useLocation();\n var match = useContext(context).match;\n return path ? matchPath(location.pathname, path) : match;\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n if (typeof window !== \"undefined\") {\n var global = window;\n var key = \"__react_router_build__\";\n var buildNames = {\n cjs: \"CommonJS\",\n esm: \"ES modules\",\n umd: \"UMD\"\n };\n\n if (global[key] && global[key] !== \"esm\") {\n var initialBuildName = buildNames[global[key]];\n var secondaryBuildName = buildNames[\"esm\"]; // TODO: Add link to article that explains in detail how to avoid\n // loading 2 different builds.\n\n throw new Error(\"You are loading the \" + secondaryBuildName + \" build of React Router \" + (\"on a page that is already running the \" + initialBuildName + \" \") + \"build, so things won't work right.\");\n }\n\n global[key] = \"esm\";\n }\n}\n\nexport { MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, historyContext as __HistoryContext, context as __RouterContext, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter };\n//# sourceMappingURL=react-router.js.map\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _shallowEqual = require('./utils/shallowEqual');\n\nvar _shallowEqual2 = _interopRequireDefault(_shallowEqual);\n\nvar _series = require('./utils/series');\n\nvar _series2 = _interopRequireDefault(_series);\n\nvar _whilst = require('./utils/whilst');\n\nvar _whilst2 = _interopRequireDefault(_whilst);\n\nvar _throttle = require('./utils/throttle');\n\nvar _throttle2 = _interopRequireDefault(_throttle);\n\nvar _uniqueId = require('./utils/uniqueId');\n\nvar _uniqueId2 = _interopRequireDefault(_uniqueId);\n\nvar _innerSize = require('./utils/innerSize');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction assertElementFitsWidth(el, width) {\n // -1: temporary bugfix, will be refactored soon\n return el.scrollWidth - 1 <= width;\n}\n\nfunction assertElementFitsHeight(el, height) {\n // -1: temporary bugfix, will be refactored soon\n return el.scrollHeight - 1 <= height;\n}\n\nfunction noop() {}\n\nvar TextFit = function (_React$Component) {\n _inherits(TextFit, _React$Component);\n\n function TextFit(props) {\n _classCallCheck(this, TextFit);\n\n var _this = _possibleConstructorReturn(this, (TextFit.__proto__ || Object.getPrototypeOf(TextFit)).call(this, props));\n\n _this.state = {\n fontSize: null,\n ready: false\n };\n\n _this.handleWindowResize = function () {\n _this.process();\n };\n\n if ('perfectFit' in props) {\n console.warn('TextFit property perfectFit has been removed.');\n }\n\n _this.handleWindowResize = (0, _throttle2.default)(_this.handleWindowResize, props.throttle);\n return _this;\n }\n\n _createClass(TextFit, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var autoResize = this.props.autoResize;\n\n if (autoResize) {\n window.addEventListener('resize', this.handleWindowResize);\n }\n this.process();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n var ready = this.state.ready;\n\n if (!ready) return;\n if ((0, _shallowEqual2.default)(this.props, prevProps)) return;\n this.process();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n var autoResize = this.props.autoResize;\n\n if (autoResize) {\n window.removeEventListener('resize', this.handleWindowResize);\n }\n // Setting a new pid will cancel all running processes\n this.pid = (0, _uniqueId2.default)();\n }\n }, {\n key: 'process',\n value: function process() {\n var _this2 = this;\n\n var _props = this.props,\n min = _props.min,\n max = _props.max,\n mode = _props.mode,\n forceSingleModeWidth = _props.forceSingleModeWidth,\n onReady = _props.onReady;\n\n var el = this._parent;\n var wrapper = this._child;\n\n // if the el is null which means the TextFit has been removed. No need to process anymore\n if (!(el instanceof Element)) {\n return;\n }\n\n var originalWidth = (0, _innerSize.innerWidth)(el);\n var originalHeight = (0, _innerSize.innerHeight)(el);\n\n if (originalHeight <= 0 || isNaN(originalHeight)) {\n console.warn('Can not process element without height. Make sure the element is displayed and has a static height.');\n return;\n }\n\n if (originalWidth <= 0 || isNaN(originalWidth)) {\n console.warn('Can not process element without width. Make sure the element is displayed and has a static width.');\n return;\n }\n\n var pid = (0, _uniqueId2.default)();\n this.pid = pid;\n\n var shouldCancelProcess = function shouldCancelProcess() {\n return pid !== _this2.pid;\n };\n\n var testPrimary = mode === 'multi' ? function () {\n return assertElementFitsHeight(wrapper, originalHeight);\n } : function () {\n return assertElementFitsWidth(wrapper, originalWidth);\n };\n\n var testSecondary = mode === 'multi' ? function () {\n return assertElementFitsWidth(wrapper, originalWidth);\n } : function () {\n return assertElementFitsHeight(wrapper, originalHeight);\n };\n\n var mid = void 0;\n var low = min;\n var high = max;\n\n this.setState({ ready: false });\n\n (0, _series2.default)([\n // Step 1:\n // Binary search to fit the element's height (multi line) / width (single line)\n function (stepCallback) {\n return (0, _whilst2.default)(function () {\n return low <= high;\n }, function (whilstCallback) {\n if (shouldCancelProcess()) return whilstCallback(true);\n mid = parseInt((low + high) / 2, 10);\n _this2.setState({ fontSize: mid }, function () {\n if (shouldCancelProcess()) return whilstCallback(true);\n if (testPrimary()) low = mid + 1;else high = mid - 1;\n return whilstCallback();\n });\n }, stepCallback);\n },\n // Step 2:\n // Binary search to fit the element's width (multi line) / height (single line)\n // If mode is single and forceSingleModeWidth is true, skip this step\n // in order to not fit the elements height and decrease the width\n function (stepCallback) {\n if (mode === 'single' && forceSingleModeWidth) return stepCallback();\n if (testSecondary()) return stepCallback();\n low = min;\n high = mid;\n return (0, _whilst2.default)(function () {\n return low < high;\n }, function (whilstCallback) {\n if (shouldCancelProcess()) return whilstCallback(true);\n mid = parseInt((low + high) / 2, 10);\n _this2.setState({ fontSize: mid }, function () {\n if (pid !== _this2.pid) return whilstCallback(true);\n if (testSecondary()) low = mid + 1;else high = mid - 1;\n return whilstCallback();\n });\n }, stepCallback);\n },\n // Step 3\n // Limits\n function (stepCallback) {\n // We break the previous loop without updating mid for the final time,\n // so we do it here:\n mid = Math.min(low, high);\n\n // Ensure we hit the user-supplied limits\n mid = Math.max(mid, min);\n mid = Math.min(mid, max);\n\n // Sanity check:\n mid = Math.max(mid, 0);\n\n if (shouldCancelProcess()) return stepCallback(true);\n _this2.setState({ fontSize: mid }, stepCallback);\n }], function (err) {\n // err will be true, if another process was triggered\n if (err || shouldCancelProcess()) return;\n _this2.setState({ ready: true }, function () {\n return onReady(mid);\n });\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var _this3 = this;\n\n var _props2 = this.props,\n children = _props2.children,\n text = _props2.text,\n style = _props2.style,\n min = _props2.min,\n max = _props2.max,\n mode = _props2.mode,\n forceWidth = _props2.forceWidth,\n forceSingleModeWidth = _props2.forceSingleModeWidth,\n throttle = _props2.throttle,\n autoResize = _props2.autoResize,\n onReady = _props2.onReady,\n props = _objectWithoutProperties(_props2, ['children', 'text', 'style', 'min', 'max', 'mode', 'forceWidth', 'forceSingleModeWidth', 'throttle', 'autoResize', 'onReady']);\n\n var _state = this.state,\n fontSize = _state.fontSize,\n ready = _state.ready;\n\n var finalStyle = _extends({}, style, {\n fontSize: fontSize\n });\n\n var wrapperStyle = {\n display: ready ? 'block' : 'inline-block'\n };\n if (mode === 'single') wrapperStyle.whiteSpace = 'nowrap';\n\n return _react2.default.createElement(\n 'div',\n _extends({ ref: function ref(c) {\n return _this3._parent = c;\n }, style: finalStyle }, props),\n _react2.default.createElement(\n 'div',\n { ref: function ref(c) {\n return _this3._child = c;\n }, style: wrapperStyle },\n text && typeof children === 'function' ? ready ? children(text) : text : children\n )\n );\n }\n }]);\n\n return TextFit;\n}(_react2.default.Component);\n\nTextFit.propTypes = {\n children: _propTypes2.default.node,\n text: _propTypes2.default.string,\n min: _propTypes2.default.number,\n max: _propTypes2.default.number,\n mode: _propTypes2.default.oneOf(['single', 'multi']),\n forceSingleModeWidth: _propTypes2.default.bool,\n throttle: _propTypes2.default.number,\n onReady: _propTypes2.default.func\n};\nTextFit.defaultProps = {\n min: 1,\n max: 100,\n mode: 'multi',\n forceSingleModeWidth: true,\n throttle: 50,\n autoResize: true,\n onReady: noop\n};\nexports.default = TextFit;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Textfit = undefined;\n\nvar _Textfit = require('./Textfit');\n\nvar _Textfit2 = _interopRequireDefault(_Textfit);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.Textfit = _Textfit2.default;\nexports.default = _Textfit2.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.innerHeight = innerHeight;\nexports.innerWidth = innerWidth;\n// Calculate height without padding.\nfunction innerHeight(el) {\n var style = window.getComputedStyle(el, null);\n // Hidden iframe in Firefox returns null, https://github.com/malte-wessel/react-textfit/pull/34\n if (!style) return el.clientHeight;\n return el.clientHeight - parseInt(style.getPropertyValue(\"padding-top\"), 10) - parseInt(style.getPropertyValue(\"padding-bottom\"), 10);\n}\n\n// Calculate width without padding.\nfunction innerWidth(el) {\n var style = window.getComputedStyle(el, null);\n // Hidden iframe in Firefox returns null, https://github.com/malte-wessel/react-textfit/pull/34\n if (!style) return el.clientWidth;\n return el.clientWidth - parseInt(style.getPropertyValue(\"padding-left\"), 10) - parseInt(style.getPropertyValue(\"padding-right\"), 10);\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = series;\n\nvar _process = require('process');\n\nvar _process2 = _interopRequireDefault(_process);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction series(tasks, cb) {\n var results = [];\n var current = 0;\n var isSync = true;\n\n function done(err) {\n function end() {\n if (cb) cb(err, results);\n }\n if (isSync) _process2.default.nextTick(end);else end();\n }\n\n function each(err, result) {\n results.push(result);\n if (++current >= tasks.length || err) done(err);else tasks[current](each);\n }\n\n if (tasks.length > 0) tasks[0](each);else done(null);\n\n isSync = false;\n} /**\r\n * Run the functions in the tasks array in series, each one running once the previous function has completed.\r\n * If any functions in the series pass an error to its callback, no more functions are run,\r\n * and callback is immediately called with the value of the error. Otherwise, callback receives an array of results\r\n * when tasks have completed.\r\n * Taken from https://github.com/feross/run-series\r\n *\r\n * @params {Array} tasks An array containing functions to run, each function is passed a callback(err, result) which it must call on completion with an error err (which can be null) and an optional result value.\r\n * @params {Function} callback(err, results) - An optional callback to run once all the functions have completed. This function gets a results array containing all the result arguments passed to the task callbacks.\r\n */","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = shallowEqual;\nfunction shallowEqual(objA, objB) {\n if (objA === objB) {\n return true;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n var hasOwn = Object.prototype.hasOwnProperty;\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {\n return false;\n }\n }\n\n return true;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = throttle;\n/**\r\n * Returns a new function that, when invoked, invokes `func` at most once per `wait` milliseconds.\r\n * Taken from https://github.com/component/throttle v1.0.0\r\n *\r\n * @param {Function} func Function to wrap.\r\n * @param {Number} wait Number of milliseconds that must elapse between `func` invocations.\r\n * @return {Function} A new function that wraps the `func` function passed in.\r\n */\n\nfunction throttle(func, wait) {\n var ctx = void 0;\n var args = void 0;\n var rtn = void 0;\n var timeoutID = void 0;\n var last = 0;\n\n function call() {\n timeoutID = 0;\n last = +new Date();\n rtn = func.apply(ctx, args);\n ctx = null;\n args = null;\n }\n\n return function throttled() {\n ctx = this;\n args = arguments;\n var delta = new Date() - last;\n if (!timeoutID) {\n if (delta >= wait) call();else timeoutID = setTimeout(call, wait - delta);\n }\n return rtn;\n };\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = uniqueId;\nvar uid = 0;\n\nfunction uniqueId() {\n return uid++;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = whilst;\nvar noop = function noop() {};\n\n/**\r\n * Repeatedly call fn, while test returns true. Calls callback when stopped, or an error occurs.\r\n *\r\n * @param {Function} test Synchronous truth test to perform before each execution of fn.\r\n * @param {Function} fn A function which is called each time test passes. The function is passed a callback(err), which must be called once it has completed with an optional err argument.\r\n * @param {Function} callback A callback which is called after the test fails and repeated execution of fn has stopped.\r\n */\n\nfunction whilst(test, iterator) {\n var callback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;\n\n if (test()) {\n iterator(function next(err) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (err) {\n callback(err);\n } else if (test.apply(this, args)) {\n iterator(next);\n } else {\n callback(null);\n }\n });\n } else {\n callback(null);\n }\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = void 0;\n\nvar PropTypes = _interopRequireWildcard(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nvar _reactLifecyclesCompat = require(\"react-lifecycles-compat\");\n\nvar _PropTypes = require(\"./utils/PropTypes\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar UNMOUNTED = 'unmounted';\nexports.UNMOUNTED = UNMOUNTED;\nvar EXITED = 'exited';\nexports.EXITED = EXITED;\nvar ENTERING = 'entering';\nexports.ENTERING = ENTERING;\nvar ENTERED = 'entered';\nexports.ENTERED = ENTERED;\nvar EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 0 },\n * entered: { opacity: 1 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n * \n * I'm a fade Transition!\n *
\n * )}\n * \n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * \n * \n * {state => (\n * // ...\n * )}\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nexports.EXITING = EXITING;\n\nvar Transition =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context.transitionGroup; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n var _proto = Transition.prototype;\n\n _proto.getChildContext = function getChildContext() {\n return {\n transitionGroup: null // allows for nested Transitions\n\n };\n };\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n }; // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n var node = _reactDom.default.findDOMNode(this);\n\n if (nextStatus === ENTERING) {\n this.performEnter(node, mounting);\n } else {\n this.performExit(node);\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(node, mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting;\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(node);\n });\n return;\n }\n\n this.props.onEnter(node, appearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(node, appearing);\n\n _this2.onTransitionEnd(node, enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(node, appearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit(node) {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED\n\n if (!exit) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(node);\n });\n return;\n }\n\n this.props.onExit(node);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(node);\n\n _this3.onTransitionEnd(node, timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(node);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {\n this.setNextCallback(handler);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n this.props.addEndListener(node, this.nextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\"]); // filter props for Transtition\n\n\n delete childProps.in;\n delete childProps.mountOnEnter;\n delete childProps.unmountOnExit;\n delete childProps.appear;\n delete childProps.enter;\n delete childProps.exit;\n delete childProps.timeout;\n delete childProps.addEndListener;\n delete childProps.onEnter;\n delete childProps.onEntering;\n delete childProps.onEntered;\n delete childProps.onExit;\n delete childProps.onExiting;\n delete childProps.onExited;\n\n if (typeof children === 'function') {\n return children(status, childProps);\n }\n\n var child = _react.default.Children.only(children);\n\n return _react.default.cloneElement(child, childProps);\n };\n\n return Transition;\n}(_react.default.Component);\n\nTransition.contextTypes = {\n transitionGroup: PropTypes.object\n};\nTransition.childContextTypes = {\n transitionGroup: function transitionGroup() {}\n};\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`, `'unmounted'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * Normally a component is not transitioned if it is shown when the `` component mounts.\n * If you want to transition on the first mount set `appear` to `true`, and the\n * component will transition in as soon as the `` mounts.\n *\n * > Note: there are no specific \"appear\" states. `appear` only adds an additional `enter` transition.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = _PropTypes.timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. **Note:** Timeouts are still used as a fallback if provided.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func // Name the function so it is clearer in the documentation\n\n} : {};\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = 0;\nTransition.EXITED = 1;\nTransition.ENTERING = 2;\nTransition.ENTERED = 3;\nTransition.EXITING = 4;\n\nvar _default = (0, _reactLifecyclesCompat.polyfill)(Transition);\n\nexports.default = _default;","\"use strict\";\n\nexports.__esModule = true;\nexports.classNamesShape = exports.timeoutsShape = void 0;\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar timeoutsShape = process.env.NODE_ENV !== 'production' ? _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({\n enter: _propTypes.default.number,\n exit: _propTypes.default.number,\n appear: _propTypes.default.number\n}).isRequired]) : null;\nexports.timeoutsShape = timeoutsShape;\nvar classNamesShape = process.env.NODE_ENV !== 'production' ? _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({\n enter: _propTypes.default.string,\n exit: _propTypes.default.string,\n active: _propTypes.default.string\n}), _propTypes.default.shape({\n enter: _propTypes.default.string,\n enterDone: _propTypes.default.string,\n enterActive: _propTypes.default.string,\n exit: _propTypes.default.string,\n exitDone: _propTypes.default.string,\n exitActive: _propTypes.default.string\n})]) : null;\nexports.classNamesShape = classNamesShape;","export default {\n disabled: false\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { forceReflow } from './utils/reflow';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n * \n * I'm a fade Transition!\n *
\n * )}\n * \n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * \n * \n * {state => (\n * // ...\n * )}\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n if (this.props.unmountOnExit || this.props.mountOnEnter) {\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749\n // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.\n // To make the animation happen, we have to separate each rendering and avoid being processed as batched.\n\n if (node) forceReflow(node);\n }\n\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","export var forceReflow = function forceReflow(node) {\n return node.scrollTop;\n};","import React from 'react';\nexport default React.createContext(null);","\n\nexport default function calculateSizeAndPositionDataAndUpdateScrollOffset(_ref) {\n var cellCount = _ref.cellCount,\n cellSize = _ref.cellSize,\n computeMetadataCallback = _ref.computeMetadataCallback,\n computeMetadataCallbackProps = _ref.computeMetadataCallbackProps,\n nextCellsCount = _ref.nextCellsCount,\n nextCellSize = _ref.nextCellSize,\n nextScrollToIndex = _ref.nextScrollToIndex,\n scrollToIndex = _ref.scrollToIndex,\n updateScrollOffsetForScrollToIndex = _ref.updateScrollOffsetForScrollToIndex;\n\n // Don't compare cell sizes if they are functions because inline functions would cause infinite loops.\n // In that event users should use the manual recompute methods to inform of changes.\n if (cellCount !== nextCellsCount || (typeof cellSize === 'number' || typeof nextCellSize === 'number') && cellSize !== nextCellSize) {\n computeMetadataCallback(computeMetadataCallbackProps);\n\n // Updated cell metadata may have hidden the previous scrolled-to item.\n // In this case we should also update the scrollTop to ensure it stays visible.\n if (scrollToIndex >= 0 && scrollToIndex === nextScrollToIndex) {\n updateScrollOffsetForScrollToIndex();\n }\n }\n}\n\n/**\n * Helper method that determines when to recalculate row or column metadata.\n */","import _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\n\n/**\n * Just-in-time calculates and caches size and position information for a collection of cells.\n */\n\nvar CellSizeAndPositionManager = function () {\n\n // Used in deferred mode to track which cells have been queued for measurement.\n\n // Cache of size and position data for cells, mapped by cell index.\n // Note that invalid values may exist in this map so only rely on cells up to this._lastMeasuredIndex\n function CellSizeAndPositionManager(_ref) {\n var cellCount = _ref.cellCount,\n cellSizeGetter = _ref.cellSizeGetter,\n estimatedCellSize = _ref.estimatedCellSize;\n\n _classCallCheck(this, CellSizeAndPositionManager);\n\n this._cellSizeAndPositionData = {};\n this._lastMeasuredIndex = -1;\n this._lastBatchedIndex = -1;\n\n this._cellSizeGetter = cellSizeGetter;\n this._cellCount = cellCount;\n this._estimatedCellSize = estimatedCellSize;\n }\n\n // Measurements for cells up to this index can be trusted; cells afterward should be estimated.\n\n\n _createClass(CellSizeAndPositionManager, [{\n key: 'areOffsetsAdjusted',\n value: function areOffsetsAdjusted() {\n return false;\n }\n }, {\n key: 'configure',\n value: function configure(_ref2) {\n var cellCount = _ref2.cellCount,\n estimatedCellSize = _ref2.estimatedCellSize,\n cellSizeGetter = _ref2.cellSizeGetter;\n\n this._cellCount = cellCount;\n this._estimatedCellSize = estimatedCellSize;\n this._cellSizeGetter = cellSizeGetter;\n }\n }, {\n key: 'getCellCount',\n value: function getCellCount() {\n return this._cellCount;\n }\n }, {\n key: 'getEstimatedCellSize',\n value: function getEstimatedCellSize() {\n return this._estimatedCellSize;\n }\n }, {\n key: 'getLastMeasuredIndex',\n value: function getLastMeasuredIndex() {\n return this._lastMeasuredIndex;\n }\n }, {\n key: 'getOffsetAdjustment',\n value: function getOffsetAdjustment() {\n return 0;\n }\n\n /**\n * This method returns the size and position for the cell at the specified index.\n * It just-in-time calculates (or used cached values) for cells leading up to the index.\n */\n\n }, {\n key: 'getSizeAndPositionOfCell',\n value: function getSizeAndPositionOfCell(index) {\n if (index < 0 || index >= this._cellCount) {\n throw Error('Requested index ' + index + ' is outside of range 0..' + this._cellCount);\n }\n\n if (index > this._lastMeasuredIndex) {\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\n var _offset = lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size;\n\n for (var i = this._lastMeasuredIndex + 1; i <= index; i++) {\n var _size = this._cellSizeGetter({ index: i });\n\n // undefined or NaN probably means a logic error in the size getter.\n // null means we're using CellMeasurer and haven't yet measured a given index.\n if (_size === undefined || isNaN(_size)) {\n throw Error('Invalid size returned for cell ' + i + ' of value ' + _size);\n } else if (_size === null) {\n this._cellSizeAndPositionData[i] = {\n offset: _offset,\n size: 0\n };\n\n this._lastBatchedIndex = index;\n } else {\n this._cellSizeAndPositionData[i] = {\n offset: _offset,\n size: _size\n };\n\n _offset += _size;\n\n this._lastMeasuredIndex = index;\n }\n }\n }\n\n return this._cellSizeAndPositionData[index];\n }\n }, {\n key: 'getSizeAndPositionOfLastMeasuredCell',\n value: function getSizeAndPositionOfLastMeasuredCell() {\n return this._lastMeasuredIndex >= 0 ? this._cellSizeAndPositionData[this._lastMeasuredIndex] : {\n offset: 0,\n size: 0\n };\n }\n\n /**\n * Total size of all cells being measured.\n * This value will be completely estimated initially.\n * As cells are measured, the estimate will be updated.\n */\n\n }, {\n key: 'getTotalSize',\n value: function getTotalSize() {\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\n var totalSizeOfMeasuredCells = lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size;\n var numUnmeasuredCells = this._cellCount - this._lastMeasuredIndex - 1;\n var totalSizeOfUnmeasuredCells = numUnmeasuredCells * this._estimatedCellSize;\n return totalSizeOfMeasuredCells + totalSizeOfUnmeasuredCells;\n }\n\n /**\n * Determines a new offset that ensures a certain cell is visible, given the current offset.\n * If the cell is already visible then the current offset will be returned.\n * If the current offset is too great or small, it will be adjusted just enough to ensure the specified index is visible.\n *\n * @param align Desired alignment within container; one of \"auto\" (default), \"start\", or \"end\"\n * @param containerSize Size (width or height) of the container viewport\n * @param currentOffset Container's current (x or y) offset\n * @param totalSize Total size (width or height) of all cells\n * @return Offset to use to ensure the specified cell is visible\n */\n\n }, {\n key: 'getUpdatedOffsetForIndex',\n value: function getUpdatedOffsetForIndex(_ref3) {\n var _ref3$align = _ref3.align,\n align = _ref3$align === undefined ? 'auto' : _ref3$align,\n containerSize = _ref3.containerSize,\n currentOffset = _ref3.currentOffset,\n targetIndex = _ref3.targetIndex;\n\n if (containerSize <= 0) {\n return 0;\n }\n\n var datum = this.getSizeAndPositionOfCell(targetIndex);\n var maxOffset = datum.offset;\n var minOffset = maxOffset - containerSize + datum.size;\n\n var idealOffset = void 0;\n\n switch (align) {\n case 'start':\n idealOffset = maxOffset;\n break;\n case 'end':\n idealOffset = minOffset;\n break;\n case 'center':\n idealOffset = maxOffset - (containerSize - datum.size) / 2;\n break;\n default:\n idealOffset = Math.max(minOffset, Math.min(maxOffset, currentOffset));\n break;\n }\n\n var totalSize = this.getTotalSize();\n\n return Math.max(0, Math.min(totalSize - containerSize, idealOffset));\n }\n }, {\n key: 'getVisibleCellRange',\n value: function getVisibleCellRange(params) {\n var containerSize = params.containerSize,\n offset = params.offset;\n\n\n var totalSize = this.getTotalSize();\n\n if (totalSize === 0) {\n return {};\n }\n\n var maxOffset = offset + containerSize;\n var start = this._findNearestCell(offset);\n\n var datum = this.getSizeAndPositionOfCell(start);\n offset = datum.offset + datum.size;\n\n var stop = start;\n\n while (offset < maxOffset && stop < this._cellCount - 1) {\n stop++;\n\n offset += this.getSizeAndPositionOfCell(stop).size;\n }\n\n return {\n start: start,\n stop: stop\n };\n }\n\n /**\n * Clear all cached values for cells after the specified index.\n * This method should be called for any cell that has changed its size.\n * It will not immediately perform any calculations; they'll be performed the next time getSizeAndPositionOfCell() is called.\n */\n\n }, {\n key: 'resetCell',\n value: function resetCell(index) {\n this._lastMeasuredIndex = Math.min(this._lastMeasuredIndex, index - 1);\n }\n }, {\n key: '_binarySearch',\n value: function _binarySearch(high, low, offset) {\n while (low <= high) {\n var middle = low + Math.floor((high - low) / 2);\n var _currentOffset = this.getSizeAndPositionOfCell(middle).offset;\n\n if (_currentOffset === offset) {\n return middle;\n } else if (_currentOffset < offset) {\n low = middle + 1;\n } else if (_currentOffset > offset) {\n high = middle - 1;\n }\n }\n\n if (low > 0) {\n return low - 1;\n } else {\n return 0;\n }\n }\n }, {\n key: '_exponentialSearch',\n value: function _exponentialSearch(index, offset) {\n var interval = 1;\n\n while (index < this._cellCount && this.getSizeAndPositionOfCell(index).offset < offset) {\n index += interval;\n interval *= 2;\n }\n\n return this._binarySearch(Math.min(index, this._cellCount - 1), Math.floor(index / 2), offset);\n }\n\n /**\n * Searches for the cell (index) nearest the specified offset.\n *\n * If no exact match is found the next lowest cell index will be returned.\n * This allows partially visible cells (with offsets just before/above the fold) to be visible.\n */\n\n }, {\n key: '_findNearestCell',\n value: function _findNearestCell(offset) {\n if (isNaN(offset)) {\n throw Error('Invalid offset ' + offset + ' specified');\n }\n\n // Our search algorithms find the nearest match at or below the specified offset.\n // So make sure the offset is at least 0 or no match will be found.\n offset = Math.max(0, offset);\n\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\n var lastMeasuredIndex = Math.max(0, this._lastMeasuredIndex);\n\n if (lastMeasuredCellSizeAndPosition.offset >= offset) {\n // If we've already measured cells within this range just use a binary search as it's faster.\n return this._binarySearch(lastMeasuredIndex, 0, offset);\n } else {\n // If we haven't yet measured this high, fallback to an exponential search with an inner binary search.\n // The exponential search avoids pre-computing sizes for the full set of cells as a binary search would.\n // The overall complexity for this approach is O(log n).\n return this._exponentialSearch(lastMeasuredIndex, offset);\n }\n }\n }]);\n\n return CellSizeAndPositionManager;\n}();\n\nexport default CellSizeAndPositionManager;\nimport { bpfrpt_proptype_Alignment } from '../types';\nimport { bpfrpt_proptype_CellSizeGetter } from '../types';\nimport { bpfrpt_proptype_VisibleCellRange } from '../types';","var DEFAULT_MAX_ELEMENT_SIZE = 1500000;\nvar CHROME_MAX_ELEMENT_SIZE = 1.67771e7;\n\nvar isBrowser = function isBrowser() {\n return typeof window !== 'undefined';\n};\n\nvar isChrome = function isChrome() {\n return !!window.chrome && !!window.chrome.webstore;\n};\n\nexport var getMaxElementSize = function getMaxElementSize() {\n if (isBrowser()) {\n if (isChrome()) {\n return CHROME_MAX_ELEMENT_SIZE;\n }\n }\n return DEFAULT_MAX_ELEMENT_SIZE;\n};","import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\n\n\nimport CellSizeAndPositionManager from './CellSizeAndPositionManager';\n\nimport { getMaxElementSize } from './maxElementSize.js';\n\n/**\n * Browsers have scroll offset limitations (eg Chrome stops scrolling at ~33.5M pixels where as Edge tops out at ~1.5M pixels).\n * After a certain position, the browser won't allow the user to scroll further (even via JavaScript scroll offset adjustments).\n * This util picks a lower ceiling for max size and artificially adjusts positions within to make it transparent for users.\n */\n\n/**\n * Extends CellSizeAndPositionManager and adds scaling behavior for lists that are too large to fit within a browser's native limits.\n */\nvar ScalingCellSizeAndPositionManager = function () {\n function ScalingCellSizeAndPositionManager(_ref) {\n var _ref$maxScrollSize = _ref.maxScrollSize,\n maxScrollSize = _ref$maxScrollSize === undefined ? getMaxElementSize() : _ref$maxScrollSize,\n params = _objectWithoutProperties(_ref, ['maxScrollSize']);\n\n _classCallCheck(this, ScalingCellSizeAndPositionManager);\n\n // Favor composition over inheritance to simplify IE10 support\n this._cellSizeAndPositionManager = new CellSizeAndPositionManager(params);\n this._maxScrollSize = maxScrollSize;\n }\n\n _createClass(ScalingCellSizeAndPositionManager, [{\n key: 'areOffsetsAdjusted',\n value: function areOffsetsAdjusted() {\n return this._cellSizeAndPositionManager.getTotalSize() > this._maxScrollSize;\n }\n }, {\n key: 'configure',\n value: function configure(params) {\n this._cellSizeAndPositionManager.configure(params);\n }\n }, {\n key: 'getCellCount',\n value: function getCellCount() {\n return this._cellSizeAndPositionManager.getCellCount();\n }\n }, {\n key: 'getEstimatedCellSize',\n value: function getEstimatedCellSize() {\n return this._cellSizeAndPositionManager.getEstimatedCellSize();\n }\n }, {\n key: 'getLastMeasuredIndex',\n value: function getLastMeasuredIndex() {\n return this._cellSizeAndPositionManager.getLastMeasuredIndex();\n }\n\n /**\n * Number of pixels a cell at the given position (offset) should be shifted in order to fit within the scaled container.\n * The offset passed to this function is scaled (safe) as well.\n */\n\n }, {\n key: 'getOffsetAdjustment',\n value: function getOffsetAdjustment(_ref2) {\n var containerSize = _ref2.containerSize,\n offset = _ref2.offset;\n\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\n var safeTotalSize = this.getTotalSize();\n var offsetPercentage = this._getOffsetPercentage({\n containerSize: containerSize,\n offset: offset,\n totalSize: safeTotalSize\n });\n\n return Math.round(offsetPercentage * (safeTotalSize - totalSize));\n }\n }, {\n key: 'getSizeAndPositionOfCell',\n value: function getSizeAndPositionOfCell(index) {\n return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(index);\n }\n }, {\n key: 'getSizeAndPositionOfLastMeasuredCell',\n value: function getSizeAndPositionOfLastMeasuredCell() {\n return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell();\n }\n\n /** See CellSizeAndPositionManager#getTotalSize */\n\n }, {\n key: 'getTotalSize',\n value: function getTotalSize() {\n return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize());\n }\n\n /** See CellSizeAndPositionManager#getUpdatedOffsetForIndex */\n\n }, {\n key: 'getUpdatedOffsetForIndex',\n value: function getUpdatedOffsetForIndex(_ref3) {\n var _ref3$align = _ref3.align,\n align = _ref3$align === undefined ? 'auto' : _ref3$align,\n containerSize = _ref3.containerSize,\n currentOffset = _ref3.currentOffset,\n targetIndex = _ref3.targetIndex;\n\n currentOffset = this._safeOffsetToOffset({\n containerSize: containerSize,\n offset: currentOffset\n });\n\n var offset = this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({\n align: align,\n containerSize: containerSize,\n currentOffset: currentOffset,\n targetIndex: targetIndex\n });\n\n return this._offsetToSafeOffset({\n containerSize: containerSize,\n offset: offset\n });\n }\n\n /** See CellSizeAndPositionManager#getVisibleCellRange */\n\n }, {\n key: 'getVisibleCellRange',\n value: function getVisibleCellRange(_ref4) {\n var containerSize = _ref4.containerSize,\n offset = _ref4.offset;\n\n offset = this._safeOffsetToOffset({\n containerSize: containerSize,\n offset: offset\n });\n\n return this._cellSizeAndPositionManager.getVisibleCellRange({\n containerSize: containerSize,\n offset: offset\n });\n }\n }, {\n key: 'resetCell',\n value: function resetCell(index) {\n this._cellSizeAndPositionManager.resetCell(index);\n }\n }, {\n key: '_getOffsetPercentage',\n value: function _getOffsetPercentage(_ref5) {\n var containerSize = _ref5.containerSize,\n offset = _ref5.offset,\n totalSize = _ref5.totalSize;\n\n return totalSize <= containerSize ? 0 : offset / (totalSize - containerSize);\n }\n }, {\n key: '_offsetToSafeOffset',\n value: function _offsetToSafeOffset(_ref6) {\n var containerSize = _ref6.containerSize,\n offset = _ref6.offset;\n\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\n var safeTotalSize = this.getTotalSize();\n\n if (totalSize === safeTotalSize) {\n return offset;\n } else {\n var offsetPercentage = this._getOffsetPercentage({\n containerSize: containerSize,\n offset: offset,\n totalSize: totalSize\n });\n\n return Math.round(offsetPercentage * (safeTotalSize - containerSize));\n }\n }\n }, {\n key: '_safeOffsetToOffset',\n value: function _safeOffsetToOffset(_ref7) {\n var containerSize = _ref7.containerSize,\n offset = _ref7.offset;\n\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\n var safeTotalSize = this.getTotalSize();\n\n if (totalSize === safeTotalSize) {\n return offset;\n } else {\n var offsetPercentage = this._getOffsetPercentage({\n containerSize: containerSize,\n offset: offset,\n totalSize: safeTotalSize\n });\n\n return Math.round(offsetPercentage * (totalSize - containerSize));\n }\n }\n }]);\n\n return ScalingCellSizeAndPositionManager;\n}();\n\nexport default ScalingCellSizeAndPositionManager;\nimport { bpfrpt_proptype_Alignment } from '../types';\nimport { bpfrpt_proptype_CellSizeGetter } from '../types';\nimport { bpfrpt_proptype_VisibleCellRange } from '../types';","import _Object$keys from 'babel-runtime/core-js/object/keys';\n/**\n * Helper utility that updates the specified callback whenever any of the specified indices have changed.\n */\nexport default function createCallbackMemoizer() {\n var requireAllKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n var cachedIndices = {};\n\n return function (_ref) {\n var callback = _ref.callback,\n indices = _ref.indices;\n\n var keys = _Object$keys(indices);\n var allInitialized = !requireAllKeys || keys.every(function (key) {\n var value = indices[key];\n return Array.isArray(value) ? value.length > 0 : value >= 0;\n });\n var indexChanged = keys.length !== _Object$keys(cachedIndices).length || keys.some(function (key) {\n var cachedValue = cachedIndices[key];\n var value = indices[key];\n\n return Array.isArray(value) ? cachedValue.join(',') !== value.join(',') : cachedValue !== value;\n });\n\n cachedIndices = indices;\n\n if (allInitialized && indexChanged) {\n callback(indices);\n }\n };\n}","\n\nexport var SCROLL_DIRECTION_BACKWARD = -1;\n\nexport var SCROLL_DIRECTION_FORWARD = 1;\n\nexport var SCROLL_DIRECTION_HORIZONTAL = 'horizontal';\nexport var SCROLL_DIRECTION_VERTICAL = 'vertical';\n\n/**\n * Calculates the number of cells to overscan before and after a specified range.\n * This function ensures that overscanning doesn't exceed the available cells.\n */\n\nexport default function defaultOverscanIndicesGetter(_ref) {\n var cellCount = _ref.cellCount,\n overscanCellsCount = _ref.overscanCellsCount,\n scrollDirection = _ref.scrollDirection,\n startIndex = _ref.startIndex,\n stopIndex = _ref.stopIndex;\n\n if (scrollDirection === SCROLL_DIRECTION_FORWARD) {\n return {\n overscanStartIndex: Math.max(0, startIndex),\n overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount)\n };\n } else {\n return {\n overscanStartIndex: Math.max(0, startIndex - overscanCellsCount),\n overscanStopIndex: Math.min(cellCount - 1, stopIndex)\n };\n }\n}\nimport { bpfrpt_proptype_OverscanIndicesGetterParams } from './types';\nimport { bpfrpt_proptype_OverscanIndices } from './types';","\n\nimport ScalingCellSizeAndPositionManager from './ScalingCellSizeAndPositionManager.js';\n\n/**\n * Helper function that determines when to update scroll offsets to ensure that a scroll-to-index remains visible.\n * This function also ensures that the scroll ofset isn't past the last column/row of cells.\n */\n\nexport default function updateScrollIndexHelper(_ref) {\n var cellSize = _ref.cellSize,\n cellSizeAndPositionManager = _ref.cellSizeAndPositionManager,\n previousCellsCount = _ref.previousCellsCount,\n previousCellSize = _ref.previousCellSize,\n previousScrollToAlignment = _ref.previousScrollToAlignment,\n previousScrollToIndex = _ref.previousScrollToIndex,\n previousSize = _ref.previousSize,\n scrollOffset = _ref.scrollOffset,\n scrollToAlignment = _ref.scrollToAlignment,\n scrollToIndex = _ref.scrollToIndex,\n size = _ref.size,\n sizeJustIncreasedFromZero = _ref.sizeJustIncreasedFromZero,\n updateScrollIndexCallback = _ref.updateScrollIndexCallback;\n\n var cellCount = cellSizeAndPositionManager.getCellCount();\n var hasScrollToIndex = scrollToIndex >= 0 && scrollToIndex < cellCount;\n var sizeHasChanged = size !== previousSize || sizeJustIncreasedFromZero || !previousCellSize || typeof cellSize === 'number' && cellSize !== previousCellSize;\n\n // If we have a new scroll target OR if height/row-height has changed,\n // We should ensure that the scroll target is visible.\n if (hasScrollToIndex && (sizeHasChanged || scrollToAlignment !== previousScrollToAlignment || scrollToIndex !== previousScrollToIndex)) {\n updateScrollIndexCallback(scrollToIndex);\n\n // If we don't have a selected item but list size or number of children have decreased,\n // Make sure we aren't scrolled too far past the current content.\n } else if (!hasScrollToIndex && cellCount > 0 && (size < previousSize || cellCount < previousCellsCount)) {\n // We need to ensure that the current scroll offset is still within the collection's range.\n // To do this, we don't need to measure everything; CellMeasurer would perform poorly.\n // Just check to make sure we're still okay.\n // Only adjust the scroll position if we've scrolled below the last set of rows.\n if (scrollOffset > cellSizeAndPositionManager.getTotalSize() - size) {\n updateScrollIndexCallback(cellCount - 1);\n }\n }\n}\nimport { bpfrpt_proptype_Alignment } from '../types';\nimport { bpfrpt_proptype_CellSize } from '../types';","\n\n/**\n * Default implementation of cellRangeRenderer used by Grid.\n * This renderer supports cell-caching while the user is scrolling.\n */\n\nexport default function defaultCellRangeRenderer(_ref) {\n var cellCache = _ref.cellCache,\n cellRenderer = _ref.cellRenderer,\n columnSizeAndPositionManager = _ref.columnSizeAndPositionManager,\n columnStartIndex = _ref.columnStartIndex,\n columnStopIndex = _ref.columnStopIndex,\n deferredMeasurementCache = _ref.deferredMeasurementCache,\n horizontalOffsetAdjustment = _ref.horizontalOffsetAdjustment,\n isScrolling = _ref.isScrolling,\n isScrollingOptOut = _ref.isScrollingOptOut,\n parent = _ref.parent,\n rowSizeAndPositionManager = _ref.rowSizeAndPositionManager,\n rowStartIndex = _ref.rowStartIndex,\n rowStopIndex = _ref.rowStopIndex,\n styleCache = _ref.styleCache,\n verticalOffsetAdjustment = _ref.verticalOffsetAdjustment,\n visibleColumnIndices = _ref.visibleColumnIndices,\n visibleRowIndices = _ref.visibleRowIndices;\n\n var renderedCells = [];\n\n // Browsers have native size limits for elements (eg Chrome 33M pixels, IE 1.5M pixes).\n // User cannot scroll beyond these size limitations.\n // In order to work around this, ScalingCellSizeAndPositionManager compresses offsets.\n // We should never cache styles for compressed offsets though as this can lead to bugs.\n // See issue #576 for more.\n var areOffsetsAdjusted = columnSizeAndPositionManager.areOffsetsAdjusted() || rowSizeAndPositionManager.areOffsetsAdjusted();\n\n var canCacheStyle = !isScrolling && !areOffsetsAdjusted;\n\n for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {\n var rowDatum = rowSizeAndPositionManager.getSizeAndPositionOfCell(rowIndex);\n\n for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) {\n var columnDatum = columnSizeAndPositionManager.getSizeAndPositionOfCell(columnIndex);\n var isVisible = columnIndex >= visibleColumnIndices.start && columnIndex <= visibleColumnIndices.stop && rowIndex >= visibleRowIndices.start && rowIndex <= visibleRowIndices.stop;\n var key = rowIndex + '-' + columnIndex;\n var style = void 0;\n\n // Cache style objects so shallow-compare doesn't re-render unnecessarily.\n if (canCacheStyle && styleCache[key]) {\n style = styleCache[key];\n } else {\n // In deferred mode, cells will be initially rendered before we know their size.\n // Don't interfere with CellMeasurer's measurements by setting an invalid size.\n if (deferredMeasurementCache && !deferredMeasurementCache.has(rowIndex, columnIndex)) {\n // Position not-yet-measured cells at top/left 0,0,\n // And give them width/height of 'auto' so they can grow larger than the parent Grid if necessary.\n // Positioning them further to the right/bottom influences their measured size.\n style = {\n height: 'auto',\n left: 0,\n position: 'absolute',\n top: 0,\n width: 'auto'\n };\n } else {\n style = {\n height: rowDatum.size,\n left: columnDatum.offset + horizontalOffsetAdjustment,\n position: 'absolute',\n top: rowDatum.offset + verticalOffsetAdjustment,\n width: columnDatum.size\n };\n\n styleCache[key] = style;\n }\n }\n\n var cellRendererParams = {\n columnIndex: columnIndex,\n isScrolling: isScrolling,\n isVisible: isVisible,\n key: key,\n parent: parent,\n rowIndex: rowIndex,\n style: style\n };\n\n var renderedCell = void 0;\n\n // Avoid re-creating cells while scrolling.\n // This can lead to the same cell being created many times and can cause performance issues for \"heavy\" cells.\n // If a scroll is in progress- cache and reuse cells.\n // This cache will be thrown away once scrolling completes.\n // However if we are scaling scroll positions and sizes, we should also avoid caching.\n // This is because the offset changes slightly as scroll position changes and caching leads to stale values.\n // For more info refer to issue #395\n //\n // If isScrollingOptOut is specified, we always cache cells.\n // For more info refer to issue #1028\n if ((isScrollingOptOut || isScrolling) && !horizontalOffsetAdjustment && !verticalOffsetAdjustment) {\n if (!cellCache[key]) {\n cellCache[key] = cellRenderer(cellRendererParams);\n }\n\n renderedCell = cellCache[key];\n\n // If the user is no longer scrolling, don't cache cells.\n // This makes dynamic cell content difficult for users and would also lead to a heavier memory footprint.\n } else {\n renderedCell = cellRenderer(cellRendererParams);\n }\n\n if (renderedCell == null || renderedCell === false) {\n continue;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n warnAboutMissingStyle(parent, renderedCell);\n }\n\n renderedCells.push(renderedCell);\n }\n }\n\n return renderedCells;\n}\n\nfunction warnAboutMissingStyle(parent, renderedCell) {\n if (process.env.NODE_ENV !== 'production') {\n if (renderedCell) {\n // If the direct child is a CellMeasurer, then we should check its child\n // See issue #611\n if (renderedCell.type && renderedCell.type.__internalCellMeasurerFlag) {\n renderedCell = renderedCell.props.children;\n }\n\n if (renderedCell && renderedCell.props && renderedCell.props.style === undefined && parent.__warnedAboutMissingStyle !== true) {\n parent.__warnedAboutMissingStyle = true;\n\n console.warn('Rendered cell should include style property for positioning.');\n }\n }\n }\n}\nimport { bpfrpt_proptype_CellRangeRendererParams } from './types';","\n\n// Properly handle server-side rendering.\nvar win = void 0;\n\nif (typeof window !== 'undefined') {\n win = window;\n} else if (typeof self !== 'undefined') {\n win = self;\n} else {\n win = {};\n}\n\n// requestAnimationFrame() shim by Paul Irish\n// http://paulirish.com/2011/requestanimationframe-for-smart-animating/\nvar request = win.requestAnimationFrame || win.webkitRequestAnimationFrame || win.mozRequestAnimationFrame || win.oRequestAnimationFrame || win.msRequestAnimationFrame || function (callback) {\n return win.setTimeout(callback, 1000 / 60);\n};\n\nvar cancel = win.cancelAnimationFrame || win.webkitCancelAnimationFrame || win.mozCancelAnimationFrame || win.oCancelAnimationFrame || win.msCancelAnimationFrame || function (id) {\n win.clearTimeout(id);\n};\n\nexport var raf = request;\nexport var caf = cancel;","import _Promise from 'babel-runtime/core-js/promise';\nimport { caf, raf } from './animationFrame';\n\nvar bpfrpt_proptype_AnimationTimeoutId = process.env.NODE_ENV === 'production' ? null : {\n id: PropTypes.number.isRequired\n};\n\n\nexport var cancelAnimationTimeout = function cancelAnimationTimeout(frame) {\n return caf(frame.id);\n};\n\n/**\n * Recursively calls requestAnimationFrame until a specified delay has been met or exceeded.\n * When the delay time has been reached the function you're timing out will be called.\n *\n * Credit: Joe Lambert (https://gist.github.com/joelambert/1002116#file-requesttimeout-js)\n */\nexport var requestAnimationTimeout = function requestAnimationTimeout(callback, delay) {\n var start = void 0;\n // wait for end of processing current event handler, because event handler may be long\n _Promise.resolve().then(function () {\n start = Date.now();\n });\n\n var timeout = function timeout() {\n if (Date.now() - start >= delay) {\n callback.call();\n } else {\n frame.id = raf(timeout);\n }\n };\n\n var frame = {\n id: raf(timeout)\n };\n\n return frame;\n};\nimport PropTypes from 'prop-types';\nexport { bpfrpt_proptype_AnimationTimeoutId };","import _Object$assign from 'babel-runtime/core-js/object/assign';\nimport _extends from 'babel-runtime/helpers/extends';\nimport _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport * as React from 'react';\nimport cn from 'classnames';\nimport calculateSizeAndPositionDataAndUpdateScrollOffset from './utils/calculateSizeAndPositionDataAndUpdateScrollOffset';\nimport ScalingCellSizeAndPositionManager from './utils/ScalingCellSizeAndPositionManager';\nimport createCallbackMemoizer from '../utils/createCallbackMemoizer';\nimport defaultOverscanIndicesGetter, { SCROLL_DIRECTION_BACKWARD, SCROLL_DIRECTION_FORWARD } from './defaultOverscanIndicesGetter';\nimport updateScrollIndexHelper from './utils/updateScrollIndexHelper';\nimport defaultCellRangeRenderer from './defaultCellRangeRenderer';\nimport scrollbarSize from 'dom-helpers/util/scrollbarSize';\nimport { polyfill } from 'react-lifecycles-compat';\nimport { requestAnimationTimeout, cancelAnimationTimeout } from '../utils/requestAnimationTimeout';\n\n/**\n * Specifies the number of milliseconds during which to disable pointer events while a scroll is in progress.\n * This improves performance and makes scrolling smoother.\n */\nexport var DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150;\n\n/**\n * Controls whether the Grid updates the DOM element's scrollLeft/scrollTop based on the current state or just observes it.\n * This prevents Grid from interrupting mouse-wheel animations (see issue #2).\n */\nvar SCROLL_POSITION_CHANGE_REASONS = {\n OBSERVED: 'observed',\n REQUESTED: 'requested'\n};\n\nvar renderNull = function renderNull() {\n return null;\n};\n\n/**\n * Renders tabular data with virtualization along the vertical and horizontal axes.\n * Row heights and column widths must be known ahead of time and specified as properties.\n */\nvar Grid = function (_React$PureComponent) {\n _inherits(Grid, _React$PureComponent);\n\n // Invokes onSectionRendered callback only when start/stop row or column indices change\n function Grid(props) {\n _classCallCheck(this, Grid);\n\n var _this = _possibleConstructorReturn(this, (Grid.__proto__ || _Object$getPrototypeOf(Grid)).call(this, props));\n\n _this._onGridRenderedMemoizer = createCallbackMemoizer();\n _this._onScrollMemoizer = createCallbackMemoizer(false);\n _this._deferredInvalidateColumnIndex = null;\n _this._deferredInvalidateRowIndex = null;\n _this._recomputeScrollLeftFlag = false;\n _this._recomputeScrollTopFlag = false;\n _this._horizontalScrollBarSize = 0;\n _this._verticalScrollBarSize = 0;\n _this._scrollbarPresenceChanged = false;\n _this._renderedColumnStartIndex = 0;\n _this._renderedColumnStopIndex = 0;\n _this._renderedRowStartIndex = 0;\n _this._renderedRowStopIndex = 0;\n _this._styleCache = {};\n _this._cellCache = {};\n\n _this._debounceScrollEndedCallback = function () {\n _this._disablePointerEventsTimeoutId = null;\n // isScrolling is used to determine if we reset styleCache\n _this.setState({\n isScrolling: false,\n needToResetStyleCache: false\n });\n };\n\n _this._invokeOnGridRenderedHelper = function () {\n var onSectionRendered = _this.props.onSectionRendered;\n\n\n _this._onGridRenderedMemoizer({\n callback: onSectionRendered,\n indices: {\n columnOverscanStartIndex: _this._columnStartIndex,\n columnOverscanStopIndex: _this._columnStopIndex,\n columnStartIndex: _this._renderedColumnStartIndex,\n columnStopIndex: _this._renderedColumnStopIndex,\n rowOverscanStartIndex: _this._rowStartIndex,\n rowOverscanStopIndex: _this._rowStopIndex,\n rowStartIndex: _this._renderedRowStartIndex,\n rowStopIndex: _this._renderedRowStopIndex\n }\n });\n };\n\n _this._setScrollingContainerRef = function (ref) {\n _this._scrollingContainer = ref;\n };\n\n _this._onScroll = function (event) {\n // In certain edge-cases React dispatches an onScroll event with an invalid target.scrollLeft / target.scrollTop.\n // This invalid event can be detected by comparing event.target to this component's scrollable DOM element.\n // See issue #404 for more information.\n if (event.target === _this._scrollingContainer) {\n _this.handleScrollEvent(event.target);\n }\n };\n\n var columnSizeAndPositionManager = new ScalingCellSizeAndPositionManager({\n cellCount: props.columnCount,\n cellSizeGetter: function cellSizeGetter(params) {\n return Grid._wrapSizeGetter(props.columnWidth)(params);\n },\n estimatedCellSize: Grid._getEstimatedColumnSize(props)\n });\n var rowSizeAndPositionManager = new ScalingCellSizeAndPositionManager({\n cellCount: props.rowCount,\n cellSizeGetter: function cellSizeGetter(params) {\n return Grid._wrapSizeGetter(props.rowHeight)(params);\n },\n estimatedCellSize: Grid._getEstimatedRowSize(props)\n });\n\n _this.state = {\n instanceProps: {\n columnSizeAndPositionManager: columnSizeAndPositionManager,\n rowSizeAndPositionManager: rowSizeAndPositionManager,\n\n prevColumnWidth: props.columnWidth,\n prevRowHeight: props.rowHeight,\n prevColumnCount: props.columnCount,\n prevRowCount: props.rowCount,\n prevIsScrolling: props.isScrolling === true,\n prevScrollToColumn: props.scrollToColumn,\n prevScrollToRow: props.scrollToRow,\n\n scrollbarSize: 0,\n scrollbarSizeMeasured: false\n },\n isScrolling: false,\n scrollDirectionHorizontal: SCROLL_DIRECTION_FORWARD,\n scrollDirectionVertical: SCROLL_DIRECTION_FORWARD,\n scrollLeft: 0,\n scrollTop: 0,\n scrollPositionChangeReason: null,\n\n needToResetStyleCache: false\n };\n\n if (props.scrollToRow > 0) {\n _this._initialScrollTop = _this._getCalculatedScrollTop(props, _this.state);\n }\n if (props.scrollToColumn > 0) {\n _this._initialScrollLeft = _this._getCalculatedScrollLeft(props, _this.state);\n }\n return _this;\n }\n\n /**\n * Gets offsets for a given cell and alignment.\n */\n\n\n _createClass(Grid, [{\n key: 'getOffsetForCell',\n value: function getOffsetForCell() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$alignment = _ref.alignment,\n alignment = _ref$alignment === undefined ? this.props.scrollToAlignment : _ref$alignment,\n _ref$columnIndex = _ref.columnIndex,\n columnIndex = _ref$columnIndex === undefined ? this.props.scrollToColumn : _ref$columnIndex,\n _ref$rowIndex = _ref.rowIndex,\n rowIndex = _ref$rowIndex === undefined ? this.props.scrollToRow : _ref$rowIndex;\n\n var offsetProps = _extends({}, this.props, {\n scrollToAlignment: alignment,\n scrollToColumn: columnIndex,\n scrollToRow: rowIndex\n });\n\n return {\n scrollLeft: this._getCalculatedScrollLeft(offsetProps),\n scrollTop: this._getCalculatedScrollTop(offsetProps)\n };\n }\n\n /**\n * Gets estimated total rows' height.\n */\n\n }, {\n key: 'getTotalRowsHeight',\n value: function getTotalRowsHeight() {\n return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize();\n }\n\n /**\n * Gets estimated total columns' width.\n */\n\n }, {\n key: 'getTotalColumnsWidth',\n value: function getTotalColumnsWidth() {\n return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize();\n }\n\n /**\n * This method handles a scroll event originating from an external scroll control.\n * It's an advanced method and should probably not be used unless you're implementing a custom scroll-bar solution.\n */\n\n }, {\n key: 'handleScrollEvent',\n value: function handleScrollEvent(_ref2) {\n var _ref2$scrollLeft = _ref2.scrollLeft,\n scrollLeftParam = _ref2$scrollLeft === undefined ? 0 : _ref2$scrollLeft,\n _ref2$scrollTop = _ref2.scrollTop,\n scrollTopParam = _ref2$scrollTop === undefined ? 0 : _ref2$scrollTop;\n\n // On iOS, we can arrive at negative offsets by swiping past the start.\n // To prevent flicker here, we make playing in the negative offset zone cause nothing to happen.\n if (scrollTopParam < 0) {\n return;\n }\n\n // Prevent pointer events from interrupting a smooth scroll\n this._debounceScrollEnded();\n\n var _props = this.props,\n autoHeight = _props.autoHeight,\n autoWidth = _props.autoWidth,\n height = _props.height,\n width = _props.width;\n var instanceProps = this.state.instanceProps;\n\n // When this component is shrunk drastically, React dispatches a series of back-to-back scroll events,\n // Gradually converging on a scrollTop that is within the bounds of the new, smaller height.\n // This causes a series of rapid renders that is slow for long lists.\n // We can avoid that by doing some simple bounds checking to ensure that scroll offsets never exceed their bounds.\n\n var scrollbarSize = instanceProps.scrollbarSize;\n var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();\n var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();\n var scrollLeft = Math.min(Math.max(0, totalColumnsWidth - width + scrollbarSize), scrollLeftParam);\n var scrollTop = Math.min(Math.max(0, totalRowsHeight - height + scrollbarSize), scrollTopParam);\n\n // Certain devices (like Apple touchpad) rapid-fire duplicate events.\n // Don't force a re-render if this is the case.\n // The mouse may move faster then the animation frame does.\n // Use requestAnimationFrame to avoid over-updating.\n if (this.state.scrollLeft !== scrollLeft || this.state.scrollTop !== scrollTop) {\n // Track scrolling direction so we can more efficiently overscan rows to reduce empty space around the edges while scrolling.\n // Don't change direction for an axis unless scroll offset has changed.\n var _scrollDirectionHorizontal = scrollLeft !== this.state.scrollLeft ? scrollLeft > this.state.scrollLeft ? SCROLL_DIRECTION_FORWARD : SCROLL_DIRECTION_BACKWARD : this.state.scrollDirectionHorizontal;\n var _scrollDirectionVertical = scrollTop !== this.state.scrollTop ? scrollTop > this.state.scrollTop ? SCROLL_DIRECTION_FORWARD : SCROLL_DIRECTION_BACKWARD : this.state.scrollDirectionVertical;\n\n var newState = {\n isScrolling: true,\n scrollDirectionHorizontal: _scrollDirectionHorizontal,\n scrollDirectionVertical: _scrollDirectionVertical,\n scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.OBSERVED\n };\n\n if (!autoHeight) {\n newState.scrollTop = scrollTop;\n }\n\n if (!autoWidth) {\n newState.scrollLeft = scrollLeft;\n }\n\n newState.needToResetStyleCache = false;\n this.setState(newState);\n }\n\n this._invokeOnScrollMemoizer({\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n totalColumnsWidth: totalColumnsWidth,\n totalRowsHeight: totalRowsHeight\n });\n }\n\n /**\n * Invalidate Grid size and recompute visible cells.\n * This is a deferred wrapper for recomputeGridSize().\n * It sets a flag to be evaluated on cDM/cDU to avoid unnecessary renders.\n * This method is intended for advanced use-cases like CellMeasurer.\n */\n // @TODO (bvaughn) Add automated test coverage for this.\n\n }, {\n key: 'invalidateCellSizeAfterRender',\n value: function invalidateCellSizeAfterRender(_ref3) {\n var columnIndex = _ref3.columnIndex,\n rowIndex = _ref3.rowIndex;\n\n this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex === 'number' ? Math.min(this._deferredInvalidateColumnIndex, columnIndex) : columnIndex;\n this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex === 'number' ? Math.min(this._deferredInvalidateRowIndex, rowIndex) : rowIndex;\n }\n\n /**\n * Pre-measure all columns and rows in a Grid.\n * Typically cells are only measured as needed and estimated sizes are used for cells that have not yet been measured.\n * This method ensures that the next call to getTotalSize() returns an exact size (as opposed to just an estimated one).\n */\n\n }, {\n key: 'measureAllCells',\n value: function measureAllCells() {\n var _props2 = this.props,\n columnCount = _props2.columnCount,\n rowCount = _props2.rowCount;\n var instanceProps = this.state.instanceProps;\n\n instanceProps.columnSizeAndPositionManager.getSizeAndPositionOfCell(columnCount - 1);\n instanceProps.rowSizeAndPositionManager.getSizeAndPositionOfCell(rowCount - 1);\n }\n\n /**\n * Forced recompute of row heights and column widths.\n * This function should be called if dynamic column or row sizes have changed but nothing else has.\n * Since Grid only receives :columnCount and :rowCount it has no way of detecting when the underlying data changes.\n */\n\n }, {\n key: 'recomputeGridSize',\n value: function recomputeGridSize() {\n var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref4$columnIndex = _ref4.columnIndex,\n columnIndex = _ref4$columnIndex === undefined ? 0 : _ref4$columnIndex,\n _ref4$rowIndex = _ref4.rowIndex,\n rowIndex = _ref4$rowIndex === undefined ? 0 : _ref4$rowIndex;\n\n var _props3 = this.props,\n scrollToColumn = _props3.scrollToColumn,\n scrollToRow = _props3.scrollToRow;\n var instanceProps = this.state.instanceProps;\n\n\n instanceProps.columnSizeAndPositionManager.resetCell(columnIndex);\n instanceProps.rowSizeAndPositionManager.resetCell(rowIndex);\n\n // Cell sizes may be determined by a function property.\n // In this case the cDU handler can't know if they changed.\n // Store this flag to let the next cDU pass know it needs to recompute the scroll offset.\n this._recomputeScrollLeftFlag = scrollToColumn >= 0 && (this.state.scrollDirectionHorizontal === SCROLL_DIRECTION_FORWARD ? columnIndex <= scrollToColumn : columnIndex >= scrollToColumn);\n this._recomputeScrollTopFlag = scrollToRow >= 0 && (this.state.scrollDirectionVertical === SCROLL_DIRECTION_FORWARD ? rowIndex <= scrollToRow : rowIndex >= scrollToRow);\n\n // Clear cell cache in case we are scrolling;\n // Invalid row heights likely mean invalid cached content as well.\n this._styleCache = {};\n this._cellCache = {};\n\n this.forceUpdate();\n }\n\n /**\n * Ensure column and row are visible.\n */\n\n }, {\n key: 'scrollToCell',\n value: function scrollToCell(_ref5) {\n var columnIndex = _ref5.columnIndex,\n rowIndex = _ref5.rowIndex;\n var columnCount = this.props.columnCount;\n\n\n var props = this.props;\n\n // Don't adjust scroll offset for single-column grids (eg List, Table).\n // This can cause a funky scroll offset because of the vertical scrollbar width.\n if (columnCount > 1 && columnIndex !== undefined) {\n this._updateScrollLeftForScrollToColumn(_extends({}, props, {\n scrollToColumn: columnIndex\n }));\n }\n\n if (rowIndex !== undefined) {\n this._updateScrollTopForScrollToRow(_extends({}, props, {\n scrollToRow: rowIndex\n }));\n }\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _props4 = this.props,\n getScrollbarSize = _props4.getScrollbarSize,\n height = _props4.height,\n scrollLeft = _props4.scrollLeft,\n scrollToColumn = _props4.scrollToColumn,\n scrollTop = _props4.scrollTop,\n scrollToRow = _props4.scrollToRow,\n width = _props4.width;\n var instanceProps = this.state.instanceProps;\n\n // Reset initial offsets to be ignored in browser\n\n this._initialScrollTop = 0;\n this._initialScrollLeft = 0;\n\n // If cell sizes have been invalidated (eg we are using CellMeasurer) then reset cached positions.\n // We must do this at the start of the method as we may calculate and update scroll position below.\n this._handleInvalidatedGridSize();\n\n // If this component was first rendered server-side, scrollbar size will be undefined.\n // In that event we need to remeasure.\n if (!instanceProps.scrollbarSizeMeasured) {\n this.setState(function (prevState) {\n var stateUpdate = _extends({}, prevState, { needToResetStyleCache: false });\n stateUpdate.instanceProps.scrollbarSize = getScrollbarSize();\n stateUpdate.instanceProps.scrollbarSizeMeasured = true;\n return stateUpdate;\n });\n }\n\n if (typeof scrollLeft === 'number' && scrollLeft >= 0 || typeof scrollTop === 'number' && scrollTop >= 0) {\n var stateUpdate = Grid._getScrollToPositionStateUpdate({\n prevState: this.state,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n });\n if (stateUpdate) {\n stateUpdate.needToResetStyleCache = false;\n this.setState(stateUpdate);\n }\n }\n\n // refs don't work in `react-test-renderer`\n if (this._scrollingContainer) {\n // setting the ref's scrollLeft and scrollTop.\n // Somehow in MultiGrid the main grid doesn't trigger a update on mount.\n if (this._scrollingContainer.scrollLeft !== this.state.scrollLeft) {\n this._scrollingContainer.scrollLeft = this.state.scrollLeft;\n }\n if (this._scrollingContainer.scrollTop !== this.state.scrollTop) {\n this._scrollingContainer.scrollTop = this.state.scrollTop;\n }\n }\n\n // Don't update scroll offset if the size is 0; we don't render any cells in this case.\n // Setting a state may cause us to later thing we've updated the offce when we haven't.\n var sizeIsBiggerThanZero = height > 0 && width > 0;\n if (scrollToColumn >= 0 && sizeIsBiggerThanZero) {\n this._updateScrollLeftForScrollToColumn();\n }\n if (scrollToRow >= 0 && sizeIsBiggerThanZero) {\n this._updateScrollTopForScrollToRow();\n }\n\n // Update onRowsRendered callback\n this._invokeOnGridRenderedHelper();\n\n // Initialize onScroll callback\n this._invokeOnScrollMemoizer({\n scrollLeft: scrollLeft || 0,\n scrollTop: scrollTop || 0,\n totalColumnsWidth: instanceProps.columnSizeAndPositionManager.getTotalSize(),\n totalRowsHeight: instanceProps.rowSizeAndPositionManager.getTotalSize()\n });\n\n this._maybeCallOnScrollbarPresenceChange();\n }\n\n /**\n * @private\n * This method updates scrollLeft/scrollTop in state for the following conditions:\n * 1) New scroll-to-cell props have been set\n */\n\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps, prevState) {\n var _this2 = this;\n\n var _props5 = this.props,\n autoHeight = _props5.autoHeight,\n autoWidth = _props5.autoWidth,\n columnCount = _props5.columnCount,\n height = _props5.height,\n rowCount = _props5.rowCount,\n scrollToAlignment = _props5.scrollToAlignment,\n scrollToColumn = _props5.scrollToColumn,\n scrollToRow = _props5.scrollToRow,\n width = _props5.width;\n var _state = this.state,\n scrollLeft = _state.scrollLeft,\n scrollPositionChangeReason = _state.scrollPositionChangeReason,\n scrollTop = _state.scrollTop,\n instanceProps = _state.instanceProps;\n // If cell sizes have been invalidated (eg we are using CellMeasurer) then reset cached positions.\n // We must do this at the start of the method as we may calculate and update scroll position below.\n\n this._handleInvalidatedGridSize();\n\n // Handle edge case where column or row count has only just increased over 0.\n // In this case we may have to restore a previously-specified scroll offset.\n // For more info see bvaughn/react-virtualized/issues/218\n var columnOrRowCountJustIncreasedFromZero = columnCount > 0 && prevProps.columnCount === 0 || rowCount > 0 && prevProps.rowCount === 0;\n\n // Make sure requested changes to :scrollLeft or :scrollTop get applied.\n // Assigning to scrollLeft/scrollTop tells the browser to interrupt any running scroll animations,\n // And to discard any pending async changes to the scroll position that may have happened in the meantime (e.g. on a separate scrolling thread).\n // So we only set these when we require an adjustment of the scroll position.\n // See issue #2 for more information.\n if (scrollPositionChangeReason === SCROLL_POSITION_CHANGE_REASONS.REQUESTED) {\n // @TRICKY :autoHeight and :autoWidth properties instructs Grid to leave :scrollTop and :scrollLeft management to an external HOC (eg WindowScroller).\n // In this case we should avoid checking scrollingContainer.scrollTop and scrollingContainer.scrollLeft since it forces layout/flow.\n if (!autoWidth && scrollLeft >= 0 && (scrollLeft !== this._scrollingContainer.scrollLeft || columnOrRowCountJustIncreasedFromZero)) {\n this._scrollingContainer.scrollLeft = scrollLeft;\n }\n if (!autoHeight && scrollTop >= 0 && (scrollTop !== this._scrollingContainer.scrollTop || columnOrRowCountJustIncreasedFromZero)) {\n this._scrollingContainer.scrollTop = scrollTop;\n }\n }\n\n // Special case where the previous size was 0:\n // In this case we don't show any windowed cells at all.\n // So we should always recalculate offset afterwards.\n var sizeJustIncreasedFromZero = (prevProps.width === 0 || prevProps.height === 0) && height > 0 && width > 0;\n\n // Update scroll offsets if the current :scrollToColumn or :scrollToRow values requires it\n // @TODO Do we also need this check or can the one in componentWillUpdate() suffice?\n if (this._recomputeScrollLeftFlag) {\n this._recomputeScrollLeftFlag = false;\n this._updateScrollLeftForScrollToColumn(this.props);\n } else {\n updateScrollIndexHelper({\n cellSizeAndPositionManager: instanceProps.columnSizeAndPositionManager,\n previousCellsCount: prevProps.columnCount,\n previousCellSize: prevProps.columnWidth,\n previousScrollToAlignment: prevProps.scrollToAlignment,\n previousScrollToIndex: prevProps.scrollToColumn,\n previousSize: prevProps.width,\n scrollOffset: scrollLeft,\n scrollToAlignment: scrollToAlignment,\n scrollToIndex: scrollToColumn,\n size: width,\n sizeJustIncreasedFromZero: sizeJustIncreasedFromZero,\n updateScrollIndexCallback: function updateScrollIndexCallback() {\n return _this2._updateScrollLeftForScrollToColumn(_this2.props);\n }\n });\n }\n\n if (this._recomputeScrollTopFlag) {\n this._recomputeScrollTopFlag = false;\n this._updateScrollTopForScrollToRow(this.props);\n } else {\n updateScrollIndexHelper({\n cellSizeAndPositionManager: instanceProps.rowSizeAndPositionManager,\n previousCellsCount: prevProps.rowCount,\n previousCellSize: prevProps.rowHeight,\n previousScrollToAlignment: prevProps.scrollToAlignment,\n previousScrollToIndex: prevProps.scrollToRow,\n previousSize: prevProps.height,\n scrollOffset: scrollTop,\n scrollToAlignment: scrollToAlignment,\n scrollToIndex: scrollToRow,\n size: height,\n sizeJustIncreasedFromZero: sizeJustIncreasedFromZero,\n updateScrollIndexCallback: function updateScrollIndexCallback() {\n return _this2._updateScrollTopForScrollToRow(_this2.props);\n }\n });\n }\n\n // Update onRowsRendered callback if start/stop indices have changed\n this._invokeOnGridRenderedHelper();\n\n // Changes to :scrollLeft or :scrollTop should also notify :onScroll listeners\n if (scrollLeft !== prevState.scrollLeft || scrollTop !== prevState.scrollTop) {\n var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();\n var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();\n\n this._invokeOnScrollMemoizer({\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n totalColumnsWidth: totalColumnsWidth,\n totalRowsHeight: totalRowsHeight\n });\n }\n\n this._maybeCallOnScrollbarPresenceChange();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this._disablePointerEventsTimeoutId) {\n cancelAnimationTimeout(this._disablePointerEventsTimeoutId);\n }\n }\n\n /**\n * This method updates scrollLeft/scrollTop in state for the following conditions:\n * 1) Empty content (0 rows or columns)\n * 2) New scroll props overriding the current state\n * 3) Cells-count or cells-size has changed, making previous scroll offsets invalid\n */\n\n }, {\n key: 'render',\n value: function render() {\n var _props6 = this.props,\n autoContainerWidth = _props6.autoContainerWidth,\n autoHeight = _props6.autoHeight,\n autoWidth = _props6.autoWidth,\n className = _props6.className,\n containerProps = _props6.containerProps,\n containerRole = _props6.containerRole,\n containerStyle = _props6.containerStyle,\n height = _props6.height,\n id = _props6.id,\n noContentRenderer = _props6.noContentRenderer,\n role = _props6.role,\n style = _props6.style,\n tabIndex = _props6.tabIndex,\n width = _props6.width;\n var _state2 = this.state,\n instanceProps = _state2.instanceProps,\n needToResetStyleCache = _state2.needToResetStyleCache;\n\n\n var isScrolling = this._isScrolling();\n\n var gridStyle = {\n boxSizing: 'border-box',\n direction: 'ltr',\n height: autoHeight ? 'auto' : height,\n position: 'relative',\n width: autoWidth ? 'auto' : width,\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform'\n };\n\n if (needToResetStyleCache) {\n this._styleCache = {};\n }\n\n // calculate _styleCache here\n // if state.isScrolling (not from _isScrolling) then reset\n if (!this.state.isScrolling) {\n this._resetStyleCache();\n }\n\n // calculate children to render here\n this._calculateChildrenToRender(this.props, this.state);\n\n var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();\n var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();\n\n // Force browser to hide scrollbars when we know they aren't necessary.\n // Otherwise once scrollbars appear they may not disappear again.\n // For more info see issue #116\n var verticalScrollBarSize = totalRowsHeight > height ? instanceProps.scrollbarSize : 0;\n var horizontalScrollBarSize = totalColumnsWidth > width ? instanceProps.scrollbarSize : 0;\n\n if (horizontalScrollBarSize !== this._horizontalScrollBarSize || verticalScrollBarSize !== this._verticalScrollBarSize) {\n this._horizontalScrollBarSize = horizontalScrollBarSize;\n this._verticalScrollBarSize = verticalScrollBarSize;\n this._scrollbarPresenceChanged = true;\n }\n\n // Also explicitly init styles to 'auto' if scrollbars are required.\n // This works around an obscure edge case where external CSS styles have not yet been loaded,\n // But an initial scroll index of offset is set as an external prop.\n // Without this style, Grid would render the correct range of cells but would NOT update its internal offset.\n // This was originally reported via clauderic/react-infinite-calendar/issues/23\n gridStyle.overflowX = totalColumnsWidth + verticalScrollBarSize <= width ? 'hidden' : 'auto';\n gridStyle.overflowY = totalRowsHeight + horizontalScrollBarSize <= height ? 'hidden' : 'auto';\n\n var childrenToDisplay = this._childrenToDisplay;\n\n var showNoContentRenderer = childrenToDisplay.length === 0 && height > 0 && width > 0;\n\n return React.createElement(\n 'div',\n _extends({\n ref: this._setScrollingContainerRef\n }, containerProps, {\n 'aria-label': this.props['aria-label'],\n 'aria-readonly': this.props['aria-readonly'],\n className: cn('ReactVirtualized__Grid', className),\n id: id,\n onScroll: this._onScroll,\n role: role,\n style: _extends({}, gridStyle, style),\n tabIndex: tabIndex }),\n childrenToDisplay.length > 0 && React.createElement(\n 'div',\n {\n className: 'ReactVirtualized__Grid__innerScrollContainer',\n role: containerRole,\n style: _extends({\n width: autoContainerWidth ? 'auto' : totalColumnsWidth,\n height: totalRowsHeight,\n maxWidth: totalColumnsWidth,\n maxHeight: totalRowsHeight,\n overflow: 'hidden',\n pointerEvents: isScrolling ? 'none' : '',\n position: 'relative'\n }, containerStyle) },\n childrenToDisplay\n ),\n showNoContentRenderer && noContentRenderer()\n );\n }\n\n /* ---------------------------- Helper methods ---------------------------- */\n\n }, {\n key: '_calculateChildrenToRender',\n value: function _calculateChildrenToRender() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n var cellRenderer = props.cellRenderer,\n cellRangeRenderer = props.cellRangeRenderer,\n columnCount = props.columnCount,\n deferredMeasurementCache = props.deferredMeasurementCache,\n height = props.height,\n overscanColumnCount = props.overscanColumnCount,\n overscanIndicesGetter = props.overscanIndicesGetter,\n overscanRowCount = props.overscanRowCount,\n rowCount = props.rowCount,\n width = props.width,\n isScrollingOptOut = props.isScrollingOptOut;\n var scrollDirectionHorizontal = state.scrollDirectionHorizontal,\n scrollDirectionVertical = state.scrollDirectionVertical,\n instanceProps = state.instanceProps;\n\n\n var scrollTop = this._initialScrollTop > 0 ? this._initialScrollTop : state.scrollTop;\n var scrollLeft = this._initialScrollLeft > 0 ? this._initialScrollLeft : state.scrollLeft;\n\n var isScrolling = this._isScrolling(props, state);\n\n this._childrenToDisplay = [];\n\n // Render only enough columns and rows to cover the visible area of the grid.\n if (height > 0 && width > 0) {\n var visibleColumnIndices = instanceProps.columnSizeAndPositionManager.getVisibleCellRange({\n containerSize: width,\n offset: scrollLeft\n });\n var visibleRowIndices = instanceProps.rowSizeAndPositionManager.getVisibleCellRange({\n containerSize: height,\n offset: scrollTop\n });\n\n var horizontalOffsetAdjustment = instanceProps.columnSizeAndPositionManager.getOffsetAdjustment({\n containerSize: width,\n offset: scrollLeft\n });\n var verticalOffsetAdjustment = instanceProps.rowSizeAndPositionManager.getOffsetAdjustment({\n containerSize: height,\n offset: scrollTop\n });\n\n // Store for _invokeOnGridRenderedHelper()\n this._renderedColumnStartIndex = visibleColumnIndices.start;\n this._renderedColumnStopIndex = visibleColumnIndices.stop;\n this._renderedRowStartIndex = visibleRowIndices.start;\n this._renderedRowStopIndex = visibleRowIndices.stop;\n\n var overscanColumnIndices = overscanIndicesGetter({\n direction: 'horizontal',\n cellCount: columnCount,\n overscanCellsCount: overscanColumnCount,\n scrollDirection: scrollDirectionHorizontal,\n startIndex: typeof visibleColumnIndices.start === 'number' ? visibleColumnIndices.start : 0,\n stopIndex: typeof visibleColumnIndices.stop === 'number' ? visibleColumnIndices.stop : -1\n });\n\n var overscanRowIndices = overscanIndicesGetter({\n direction: 'vertical',\n cellCount: rowCount,\n overscanCellsCount: overscanRowCount,\n scrollDirection: scrollDirectionVertical,\n startIndex: typeof visibleRowIndices.start === 'number' ? visibleRowIndices.start : 0,\n stopIndex: typeof visibleRowIndices.stop === 'number' ? visibleRowIndices.stop : -1\n });\n\n // Store for _invokeOnGridRenderedHelper()\n var columnStartIndex = overscanColumnIndices.overscanStartIndex;\n var columnStopIndex = overscanColumnIndices.overscanStopIndex;\n var rowStartIndex = overscanRowIndices.overscanStartIndex;\n var rowStopIndex = overscanRowIndices.overscanStopIndex;\n\n // Advanced use-cases (eg CellMeasurer) require batched measurements to determine accurate sizes.\n if (deferredMeasurementCache) {\n // If rows have a dynamic height, scan the rows we are about to render.\n // If any have not yet been measured, then we need to render all columns initially,\n // Because the height of the row is equal to the tallest cell within that row,\n // (And so we can't know the height without measuring all column-cells first).\n if (!deferredMeasurementCache.hasFixedHeight()) {\n for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {\n if (!deferredMeasurementCache.has(rowIndex, 0)) {\n columnStartIndex = 0;\n columnStopIndex = columnCount - 1;\n break;\n }\n }\n }\n\n // If columns have a dynamic width, scan the columns we are about to render.\n // If any have not yet been measured, then we need to render all rows initially,\n // Because the width of the column is equal to the widest cell within that column,\n // (And so we can't know the width without measuring all row-cells first).\n if (!deferredMeasurementCache.hasFixedWidth()) {\n for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) {\n if (!deferredMeasurementCache.has(0, columnIndex)) {\n rowStartIndex = 0;\n rowStopIndex = rowCount - 1;\n break;\n }\n }\n }\n }\n\n this._childrenToDisplay = cellRangeRenderer({\n cellCache: this._cellCache,\n cellRenderer: cellRenderer,\n columnSizeAndPositionManager: instanceProps.columnSizeAndPositionManager,\n columnStartIndex: columnStartIndex,\n columnStopIndex: columnStopIndex,\n deferredMeasurementCache: deferredMeasurementCache,\n horizontalOffsetAdjustment: horizontalOffsetAdjustment,\n isScrolling: isScrolling,\n isScrollingOptOut: isScrollingOptOut,\n parent: this,\n rowSizeAndPositionManager: instanceProps.rowSizeAndPositionManager,\n rowStartIndex: rowStartIndex,\n rowStopIndex: rowStopIndex,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n styleCache: this._styleCache,\n verticalOffsetAdjustment: verticalOffsetAdjustment,\n visibleColumnIndices: visibleColumnIndices,\n visibleRowIndices: visibleRowIndices\n });\n\n // update the indices\n this._columnStartIndex = columnStartIndex;\n this._columnStopIndex = columnStopIndex;\n this._rowStartIndex = rowStartIndex;\n this._rowStopIndex = rowStopIndex;\n }\n }\n\n /**\n * Sets an :isScrolling flag for a small window of time.\n * This flag is used to disable pointer events on the scrollable portion of the Grid.\n * This prevents jerky/stuttery mouse-wheel scrolling.\n */\n\n }, {\n key: '_debounceScrollEnded',\n value: function _debounceScrollEnded() {\n var scrollingResetTimeInterval = this.props.scrollingResetTimeInterval;\n\n\n if (this._disablePointerEventsTimeoutId) {\n cancelAnimationTimeout(this._disablePointerEventsTimeoutId);\n }\n\n this._disablePointerEventsTimeoutId = requestAnimationTimeout(this._debounceScrollEndedCallback, scrollingResetTimeInterval);\n }\n }, {\n key: '_handleInvalidatedGridSize',\n\n\n /**\n * Check for batched CellMeasurer size invalidations.\n * This will occur the first time one or more previously unmeasured cells are rendered.\n */\n value: function _handleInvalidatedGridSize() {\n if (typeof this._deferredInvalidateColumnIndex === 'number' && typeof this._deferredInvalidateRowIndex === 'number') {\n var columnIndex = this._deferredInvalidateColumnIndex;\n var rowIndex = this._deferredInvalidateRowIndex;\n\n this._deferredInvalidateColumnIndex = null;\n this._deferredInvalidateRowIndex = null;\n\n this.recomputeGridSize({ columnIndex: columnIndex, rowIndex: rowIndex });\n }\n }\n }, {\n key: '_invokeOnScrollMemoizer',\n value: function _invokeOnScrollMemoizer(_ref6) {\n var _this3 = this;\n\n var scrollLeft = _ref6.scrollLeft,\n scrollTop = _ref6.scrollTop,\n totalColumnsWidth = _ref6.totalColumnsWidth,\n totalRowsHeight = _ref6.totalRowsHeight;\n\n this._onScrollMemoizer({\n callback: function callback(_ref7) {\n var scrollLeft = _ref7.scrollLeft,\n scrollTop = _ref7.scrollTop;\n var _props7 = _this3.props,\n height = _props7.height,\n onScroll = _props7.onScroll,\n width = _props7.width;\n\n\n onScroll({\n clientHeight: height,\n clientWidth: width,\n scrollHeight: totalRowsHeight,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n scrollWidth: totalColumnsWidth\n });\n },\n indices: {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n }\n });\n }\n }, {\n key: '_isScrolling',\n value: function _isScrolling() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n\n // If isScrolling is defined in props, use it to override the value in state\n // This is a performance optimization for WindowScroller + Grid\n return Object.hasOwnProperty.call(props, 'isScrolling') ? Boolean(props.isScrolling) : Boolean(state.isScrolling);\n }\n }, {\n key: '_maybeCallOnScrollbarPresenceChange',\n value: function _maybeCallOnScrollbarPresenceChange() {\n if (this._scrollbarPresenceChanged) {\n var _onScrollbarPresenceChange = this.props.onScrollbarPresenceChange;\n\n\n this._scrollbarPresenceChanged = false;\n\n _onScrollbarPresenceChange({\n horizontal: this._horizontalScrollBarSize > 0,\n size: this.state.instanceProps.scrollbarSize,\n vertical: this._verticalScrollBarSize > 0\n });\n }\n }\n }, {\n key: 'scrollToPosition',\n\n\n /**\n * Scroll to the specified offset(s).\n * Useful for animating position changes.\n */\n value: function scrollToPosition(_ref8) {\n var scrollLeft = _ref8.scrollLeft,\n scrollTop = _ref8.scrollTop;\n\n var stateUpdate = Grid._getScrollToPositionStateUpdate({\n prevState: this.state,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n });\n\n if (stateUpdate) {\n stateUpdate.needToResetStyleCache = false;\n this.setState(stateUpdate);\n }\n }\n }, {\n key: '_getCalculatedScrollLeft',\n value: function _getCalculatedScrollLeft() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n\n return Grid._getCalculatedScrollLeft(props, state);\n }\n }, {\n key: '_updateScrollLeftForScrollToColumn',\n value: function _updateScrollLeftForScrollToColumn() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n\n var stateUpdate = Grid._getScrollLeftForScrollToColumnStateUpdate(props, state);\n if (stateUpdate) {\n stateUpdate.needToResetStyleCache = false;\n this.setState(stateUpdate);\n }\n }\n }, {\n key: '_getCalculatedScrollTop',\n value: function _getCalculatedScrollTop() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n\n return Grid._getCalculatedScrollTop(props, state);\n }\n }, {\n key: '_resetStyleCache',\n value: function _resetStyleCache() {\n var styleCache = this._styleCache;\n var cellCache = this._cellCache;\n var isScrollingOptOut = this.props.isScrollingOptOut;\n\n // Reset cell and style caches once scrolling stops.\n // This makes Grid simpler to use (since cells commonly change).\n // And it keeps the caches from growing too large.\n // Performance is most sensitive when a user is scrolling.\n // Don't clear visible cells from cellCache if isScrollingOptOut is specified.\n // This keeps the cellCache to a resonable size.\n\n this._cellCache = {};\n this._styleCache = {};\n\n // Copy over the visible cell styles so avoid unnecessary re-render.\n for (var rowIndex = this._rowStartIndex; rowIndex <= this._rowStopIndex; rowIndex++) {\n for (var columnIndex = this._columnStartIndex; columnIndex <= this._columnStopIndex; columnIndex++) {\n var key = rowIndex + '-' + columnIndex;\n this._styleCache[key] = styleCache[key];\n\n if (isScrollingOptOut) {\n this._cellCache[key] = cellCache[key];\n }\n }\n }\n }\n }, {\n key: '_updateScrollTopForScrollToRow',\n value: function _updateScrollTopForScrollToRow() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n\n var stateUpdate = Grid._getScrollTopForScrollToRowStateUpdate(props, state);\n if (stateUpdate) {\n stateUpdate.needToResetStyleCache = false;\n this.setState(stateUpdate);\n }\n }\n }], [{\n key: 'getDerivedStateFromProps',\n value: function getDerivedStateFromProps(nextProps, prevState) {\n var newState = {};\n\n if (nextProps.columnCount === 0 && prevState.scrollLeft !== 0 || nextProps.rowCount === 0 && prevState.scrollTop !== 0) {\n newState.scrollLeft = 0;\n newState.scrollTop = 0;\n\n // only use scroll{Left,Top} from props if scrollTo{Column,Row} isn't specified\n // scrollTo{Column,Row} should override scroll{Left,Top}\n } else if (nextProps.scrollLeft !== prevState.scrollLeft && nextProps.scrollToColumn < 0 || nextProps.scrollTop !== prevState.scrollTop && nextProps.scrollToRow < 0) {\n _Object$assign(newState, Grid._getScrollToPositionStateUpdate({\n prevState: prevState,\n scrollLeft: nextProps.scrollLeft,\n scrollTop: nextProps.scrollTop\n }));\n }\n\n var instanceProps = prevState.instanceProps;\n\n // Initially we should not clearStyleCache\n\n newState.needToResetStyleCache = false;\n if (nextProps.columnWidth !== instanceProps.prevColumnWidth || nextProps.rowHeight !== instanceProps.prevRowHeight) {\n // Reset cache. set it to {} in render\n newState.needToResetStyleCache = true;\n }\n\n instanceProps.columnSizeAndPositionManager.configure({\n cellCount: nextProps.columnCount,\n estimatedCellSize: Grid._getEstimatedColumnSize(nextProps),\n cellSizeGetter: Grid._wrapSizeGetter(nextProps.columnWidth)\n });\n\n instanceProps.rowSizeAndPositionManager.configure({\n cellCount: nextProps.rowCount,\n estimatedCellSize: Grid._getEstimatedRowSize(nextProps),\n cellSizeGetter: Grid._wrapSizeGetter(nextProps.rowHeight)\n });\n\n if (instanceProps.prevColumnCount === 0 || instanceProps.prevRowCount === 0) {\n instanceProps.prevColumnCount = 0;\n instanceProps.prevRowCount = 0;\n }\n\n // If scrolling is controlled outside this component, clear cache when scrolling stops\n if (nextProps.autoHeight && nextProps.isScrolling === false && instanceProps.prevIsScrolling === true) {\n _Object$assign(newState, {\n isScrolling: false\n });\n }\n\n var maybeStateA = void 0;\n var maybeStateB = void 0;\n\n calculateSizeAndPositionDataAndUpdateScrollOffset({\n cellCount: instanceProps.prevColumnCount,\n cellSize: typeof instanceProps.prevColumnWidth === 'number' ? instanceProps.prevColumnWidth : null,\n computeMetadataCallback: function computeMetadataCallback() {\n return instanceProps.columnSizeAndPositionManager.resetCell(0);\n },\n computeMetadataCallbackProps: nextProps,\n nextCellsCount: nextProps.columnCount,\n nextCellSize: typeof nextProps.columnWidth === 'number' ? nextProps.columnWidth : null,\n nextScrollToIndex: nextProps.scrollToColumn,\n scrollToIndex: instanceProps.prevScrollToColumn,\n updateScrollOffsetForScrollToIndex: function updateScrollOffsetForScrollToIndex() {\n maybeStateA = Grid._getScrollLeftForScrollToColumnStateUpdate(nextProps, prevState);\n }\n });\n calculateSizeAndPositionDataAndUpdateScrollOffset({\n cellCount: instanceProps.prevRowCount,\n cellSize: typeof instanceProps.prevRowHeight === 'number' ? instanceProps.prevRowHeight : null,\n computeMetadataCallback: function computeMetadataCallback() {\n return instanceProps.rowSizeAndPositionManager.resetCell(0);\n },\n computeMetadataCallbackProps: nextProps,\n nextCellsCount: nextProps.rowCount,\n nextCellSize: typeof nextProps.rowHeight === 'number' ? nextProps.rowHeight : null,\n nextScrollToIndex: nextProps.scrollToRow,\n scrollToIndex: instanceProps.prevScrollToRow,\n updateScrollOffsetForScrollToIndex: function updateScrollOffsetForScrollToIndex() {\n maybeStateB = Grid._getScrollTopForScrollToRowStateUpdate(nextProps, prevState);\n }\n });\n\n instanceProps.prevColumnCount = nextProps.columnCount;\n instanceProps.prevColumnWidth = nextProps.columnWidth;\n instanceProps.prevIsScrolling = nextProps.isScrolling === true;\n instanceProps.prevRowCount = nextProps.rowCount;\n instanceProps.prevRowHeight = nextProps.rowHeight;\n instanceProps.prevScrollToColumn = nextProps.scrollToColumn;\n instanceProps.prevScrollToRow = nextProps.scrollToRow;\n\n // getting scrollBarSize (moved from componentWillMount)\n instanceProps.scrollbarSize = nextProps.getScrollbarSize();\n if (instanceProps.scrollbarSize === undefined) {\n instanceProps.scrollbarSizeMeasured = false;\n instanceProps.scrollbarSize = 0;\n } else {\n instanceProps.scrollbarSizeMeasured = true;\n }\n\n newState.instanceProps = instanceProps;\n\n return _extends({}, newState, maybeStateA, maybeStateB);\n }\n }, {\n key: '_getEstimatedColumnSize',\n value: function _getEstimatedColumnSize(props) {\n return typeof props.columnWidth === 'number' ? props.columnWidth : props.estimatedColumnSize;\n }\n }, {\n key: '_getEstimatedRowSize',\n value: function _getEstimatedRowSize(props) {\n return typeof props.rowHeight === 'number' ? props.rowHeight : props.estimatedRowSize;\n }\n }, {\n key: '_getScrollToPositionStateUpdate',\n\n\n /**\n * Get the updated state after scrolling to\n * scrollLeft and scrollTop\n */\n value: function _getScrollToPositionStateUpdate(_ref9) {\n var prevState = _ref9.prevState,\n scrollLeft = _ref9.scrollLeft,\n scrollTop = _ref9.scrollTop;\n\n var newState = {\n scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.REQUESTED\n };\n\n if (typeof scrollLeft === 'number' && scrollLeft >= 0) {\n newState.scrollDirectionHorizontal = scrollLeft > prevState.scrollLeft ? SCROLL_DIRECTION_FORWARD : SCROLL_DIRECTION_BACKWARD;\n newState.scrollLeft = scrollLeft;\n }\n\n if (typeof scrollTop === 'number' && scrollTop >= 0) {\n newState.scrollDirectionVertical = scrollTop > prevState.scrollTop ? SCROLL_DIRECTION_FORWARD : SCROLL_DIRECTION_BACKWARD;\n newState.scrollTop = scrollTop;\n }\n\n if (typeof scrollLeft === 'number' && scrollLeft >= 0 && scrollLeft !== prevState.scrollLeft || typeof scrollTop === 'number' && scrollTop >= 0 && scrollTop !== prevState.scrollTop) {\n return newState;\n }\n return null;\n }\n }, {\n key: '_wrapSizeGetter',\n value: function _wrapSizeGetter(value) {\n return typeof value === 'function' ? value : function () {\n return value;\n };\n }\n }, {\n key: '_getCalculatedScrollLeft',\n value: function _getCalculatedScrollLeft(nextProps, prevState) {\n var columnCount = nextProps.columnCount,\n height = nextProps.height,\n scrollToAlignment = nextProps.scrollToAlignment,\n scrollToColumn = nextProps.scrollToColumn,\n width = nextProps.width;\n var scrollLeft = prevState.scrollLeft,\n instanceProps = prevState.instanceProps;\n\n\n if (columnCount > 0) {\n var finalColumn = columnCount - 1;\n var targetIndex = scrollToColumn < 0 ? finalColumn : Math.min(finalColumn, scrollToColumn);\n var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();\n var scrollBarSize = instanceProps.scrollbarSizeMeasured && totalRowsHeight > height ? instanceProps.scrollbarSize : 0;\n\n return instanceProps.columnSizeAndPositionManager.getUpdatedOffsetForIndex({\n align: scrollToAlignment,\n containerSize: width - scrollBarSize,\n currentOffset: scrollLeft,\n targetIndex: targetIndex\n });\n }\n return 0;\n }\n }, {\n key: '_getScrollLeftForScrollToColumnStateUpdate',\n value: function _getScrollLeftForScrollToColumnStateUpdate(nextProps, prevState) {\n var scrollLeft = prevState.scrollLeft;\n\n var calculatedScrollLeft = Grid._getCalculatedScrollLeft(nextProps, prevState);\n\n if (typeof calculatedScrollLeft === 'number' && calculatedScrollLeft >= 0 && scrollLeft !== calculatedScrollLeft) {\n return Grid._getScrollToPositionStateUpdate({\n prevState: prevState,\n scrollLeft: calculatedScrollLeft,\n scrollTop: -1\n });\n }\n return null;\n }\n }, {\n key: '_getCalculatedScrollTop',\n value: function _getCalculatedScrollTop(nextProps, prevState) {\n var height = nextProps.height,\n rowCount = nextProps.rowCount,\n scrollToAlignment = nextProps.scrollToAlignment,\n scrollToRow = nextProps.scrollToRow,\n width = nextProps.width;\n var scrollTop = prevState.scrollTop,\n instanceProps = prevState.instanceProps;\n\n\n if (rowCount > 0) {\n var finalRow = rowCount - 1;\n var targetIndex = scrollToRow < 0 ? finalRow : Math.min(finalRow, scrollToRow);\n var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();\n var scrollBarSize = instanceProps.scrollbarSizeMeasured && totalColumnsWidth > width ? instanceProps.scrollbarSize : 0;\n\n return instanceProps.rowSizeAndPositionManager.getUpdatedOffsetForIndex({\n align: scrollToAlignment,\n containerSize: height - scrollBarSize,\n currentOffset: scrollTop,\n targetIndex: targetIndex\n });\n }\n return 0;\n }\n }, {\n key: '_getScrollTopForScrollToRowStateUpdate',\n value: function _getScrollTopForScrollToRowStateUpdate(nextProps, prevState) {\n var scrollTop = prevState.scrollTop;\n\n var calculatedScrollTop = Grid._getCalculatedScrollTop(nextProps, prevState);\n\n if (typeof calculatedScrollTop === 'number' && calculatedScrollTop >= 0 && scrollTop !== calculatedScrollTop) {\n return Grid._getScrollToPositionStateUpdate({\n prevState: prevState,\n scrollLeft: -1,\n scrollTop: calculatedScrollTop\n });\n }\n return null;\n }\n }]);\n\n return Grid;\n}(React.PureComponent);\n\nGrid.defaultProps = {\n 'aria-label': 'grid',\n 'aria-readonly': true,\n autoContainerWidth: false,\n autoHeight: false,\n autoWidth: false,\n cellRangeRenderer: defaultCellRangeRenderer,\n containerRole: 'rowgroup',\n containerStyle: {},\n estimatedColumnSize: 100,\n estimatedRowSize: 30,\n getScrollbarSize: scrollbarSize,\n noContentRenderer: renderNull,\n onScroll: function onScroll() {},\n onScrollbarPresenceChange: function onScrollbarPresenceChange() {},\n onSectionRendered: function onSectionRendered() {},\n overscanColumnCount: 0,\n overscanIndicesGetter: defaultOverscanIndicesGetter,\n overscanRowCount: 10,\n role: 'grid',\n scrollingResetTimeInterval: DEFAULT_SCROLLING_RESET_TIME_INTERVAL,\n scrollToAlignment: 'auto',\n scrollToColumn: -1,\n scrollToRow: -1,\n style: {},\n tabIndex: 0,\n isScrollingOptOut: false\n};\nGrid.propTypes = process.env.NODE_ENV === 'production' ? null : {\n \"aria-label\": PropTypes.string.isRequired,\n \"aria-readonly\": PropTypes.bool,\n\n\n /**\n * Set the width of the inner scrollable container to 'auto'.\n * This is useful for single-column Grids to ensure that the column doesn't extend below a vertical scrollbar.\n */\n autoContainerWidth: PropTypes.bool.isRequired,\n\n\n /**\n * Removes fixed height from the scrollingContainer so that the total height of rows can stretch the window.\n * Intended for use with WindowScroller\n */\n autoHeight: PropTypes.bool.isRequired,\n\n\n /**\n * Removes fixed width from the scrollingContainer so that the total width of rows can stretch the window.\n * Intended for use with WindowScroller\n */\n autoWidth: PropTypes.bool.isRequired,\n\n\n /** Responsible for rendering a cell given an row and column index. */\n cellRenderer: function cellRenderer() {\n return (typeof bpfrpt_proptype_CellRenderer === 'function' ? bpfrpt_proptype_CellRenderer.isRequired ? bpfrpt_proptype_CellRenderer.isRequired : bpfrpt_proptype_CellRenderer : PropTypes.shape(bpfrpt_proptype_CellRenderer).isRequired).apply(this, arguments);\n },\n\n\n /** Responsible for rendering a group of cells given their index ranges. */\n cellRangeRenderer: function cellRangeRenderer() {\n return (typeof bpfrpt_proptype_CellRangeRenderer === 'function' ? bpfrpt_proptype_CellRangeRenderer.isRequired ? bpfrpt_proptype_CellRangeRenderer.isRequired : bpfrpt_proptype_CellRangeRenderer : PropTypes.shape(bpfrpt_proptype_CellRangeRenderer).isRequired).apply(this, arguments);\n },\n\n\n /** Optional custom CSS class name to attach to root Grid element. */\n className: PropTypes.string,\n\n\n /** Number of columns in grid. */\n columnCount: PropTypes.number.isRequired,\n\n\n /** Either a fixed column width (number) or a function that returns the width of a column given its index. */\n columnWidth: function columnWidth() {\n return (typeof bpfrpt_proptype_CellSize === 'function' ? bpfrpt_proptype_CellSize.isRequired ? bpfrpt_proptype_CellSize.isRequired : bpfrpt_proptype_CellSize : PropTypes.shape(bpfrpt_proptype_CellSize).isRequired).apply(this, arguments);\n },\n\n\n /** Unfiltered props for the Grid container. */\n containerProps: PropTypes.object,\n\n\n /** ARIA role for the cell-container. */\n containerRole: PropTypes.string.isRequired,\n\n\n /** Optional inline style applied to inner cell-container */\n containerStyle: PropTypes.object.isRequired,\n\n\n /**\n * If CellMeasurer is used to measure this Grid's children, this should be a pointer to its CellMeasurerCache.\n * A shared CellMeasurerCache reference enables Grid and CellMeasurer to share measurement data.\n */\n deferredMeasurementCache: PropTypes.object,\n\n\n /**\n * Used to estimate the total width of a Grid before all of its columns have actually been measured.\n * The estimated total width is adjusted as columns are rendered.\n */\n estimatedColumnSize: PropTypes.number.isRequired,\n\n\n /**\n * Used to estimate the total height of a Grid before all of its rows have actually been measured.\n * The estimated total height is adjusted as rows are rendered.\n */\n estimatedRowSize: PropTypes.number.isRequired,\n\n\n /** Exposed for testing purposes only. */\n getScrollbarSize: PropTypes.func.isRequired,\n\n\n /** Height of Grid; this property determines the number of visible (vs virtualized) rows. */\n height: PropTypes.number.isRequired,\n\n\n /** Optional custom id to attach to root Grid element. */\n id: PropTypes.string,\n\n\n /**\n * Override internal is-scrolling state tracking.\n * This property is primarily intended for use with the WindowScroller component.\n */\n isScrolling: PropTypes.bool,\n\n\n /**\n * Opt-out of isScrolling param passed to cellRangeRenderer.\n * To avoid the extra render when scroll stops.\n */\n isScrollingOptOut: PropTypes.bool.isRequired,\n\n\n /** Optional renderer to be used in place of rows when either :rowCount or :columnCount is 0. */\n noContentRenderer: function noContentRenderer() {\n return (typeof bpfrpt_proptype_NoContentRenderer === 'function' ? bpfrpt_proptype_NoContentRenderer.isRequired ? bpfrpt_proptype_NoContentRenderer.isRequired : bpfrpt_proptype_NoContentRenderer : PropTypes.shape(bpfrpt_proptype_NoContentRenderer).isRequired).apply(this, arguments);\n },\n\n\n /**\n * Callback invoked whenever the scroll offset changes within the inner scrollable region.\n * This callback can be used to sync scrolling between lists, tables, or grids.\n */\n onScroll: PropTypes.func.isRequired,\n\n\n /**\n * Called whenever a horizontal or vertical scrollbar is added or removed.\n * This prop is not intended for end-user use;\n * It is used by MultiGrid to support fixed-row/fixed-column scroll syncing.\n */\n onScrollbarPresenceChange: PropTypes.func.isRequired,\n\n\n /** Callback invoked with information about the section of the Grid that was just rendered. */\n onSectionRendered: PropTypes.func.isRequired,\n\n\n /**\n * Number of columns to render before/after the visible section of the grid.\n * These columns can help for smoother scrolling on touch devices or browsers that send scroll events infrequently.\n */\n overscanColumnCount: PropTypes.number.isRequired,\n\n\n /**\n * Calculates the number of cells to overscan before and after a specified range.\n * This function ensures that overscanning doesn't exceed the available cells.\n */\n overscanIndicesGetter: function overscanIndicesGetter() {\n return (typeof bpfrpt_proptype_OverscanIndicesGetter === 'function' ? bpfrpt_proptype_OverscanIndicesGetter.isRequired ? bpfrpt_proptype_OverscanIndicesGetter.isRequired : bpfrpt_proptype_OverscanIndicesGetter : PropTypes.shape(bpfrpt_proptype_OverscanIndicesGetter).isRequired).apply(this, arguments);\n },\n\n\n /**\n * Number of rows to render above/below the visible section of the grid.\n * These rows can help for smoother scrolling on touch devices or browsers that send scroll events infrequently.\n */\n overscanRowCount: PropTypes.number.isRequired,\n\n\n /** ARIA role for the grid element. */\n role: PropTypes.string.isRequired,\n\n\n /**\n * Either a fixed row height (number) or a function that returns the height of a row given its index.\n * Should implement the following interface: ({ index: number }): number\n */\n rowHeight: function rowHeight() {\n return (typeof bpfrpt_proptype_CellSize === 'function' ? bpfrpt_proptype_CellSize.isRequired ? bpfrpt_proptype_CellSize.isRequired : bpfrpt_proptype_CellSize : PropTypes.shape(bpfrpt_proptype_CellSize).isRequired).apply(this, arguments);\n },\n\n\n /** Number of rows in grid. */\n rowCount: PropTypes.number.isRequired,\n\n\n /** Wait this amount of time after the last scroll event before resetting Grid `pointer-events`. */\n scrollingResetTimeInterval: PropTypes.number.isRequired,\n\n\n /** Horizontal offset. */\n scrollLeft: PropTypes.number,\n\n\n /**\n * Controls scroll-to-cell behavior of the Grid.\n * The default (\"auto\") scrolls the least amount possible to ensure that the specified cell is fully visible.\n * Use \"start\" to align cells to the top/left of the Grid and \"end\" to align bottom/right.\n */\n scrollToAlignment: function scrollToAlignment() {\n return (typeof bpfrpt_proptype_Alignment === 'function' ? bpfrpt_proptype_Alignment.isRequired ? bpfrpt_proptype_Alignment.isRequired : bpfrpt_proptype_Alignment : PropTypes.shape(bpfrpt_proptype_Alignment).isRequired).apply(this, arguments);\n },\n\n\n /** Column index to ensure visible (by forcefully scrolling if necessary) */\n scrollToColumn: PropTypes.number.isRequired,\n\n\n /** Vertical offset. */\n scrollTop: PropTypes.number,\n\n\n /** Row index to ensure visible (by forcefully scrolling if necessary) */\n scrollToRow: PropTypes.number.isRequired,\n\n\n /** Optional inline style */\n style: PropTypes.object.isRequired,\n\n\n /** Tab index for focus */\n tabIndex: PropTypes.number,\n\n\n /** Width of Grid; this property determines the number of visible (vs virtualized) columns. */\n width: PropTypes.number.isRequired\n};\n\n\npolyfill(Grid);\nexport default Grid;\nimport { bpfrpt_proptype_CellRenderer } from './types';\nimport { bpfrpt_proptype_CellRangeRenderer } from './types';\nimport { bpfrpt_proptype_CellPosition } from './types';\nimport { bpfrpt_proptype_CellSize } from './types';\nimport { bpfrpt_proptype_CellSizeGetter } from './types';\nimport { bpfrpt_proptype_NoContentRenderer } from './types';\nimport { bpfrpt_proptype_Scroll } from './types';\nimport { bpfrpt_proptype_ScrollbarPresenceChange } from './types';\nimport { bpfrpt_proptype_RenderedSection } from './types';\nimport { bpfrpt_proptype_OverscanIndicesGetter } from './types';\nimport { bpfrpt_proptype_Alignment } from './types';\nimport { bpfrpt_proptype_CellCache } from './types';\nimport { bpfrpt_proptype_StyleCache } from './types';\nimport { bpfrpt_proptype_AnimationTimeoutId } from '../utils/requestAnimationTimeout';\nimport PropTypes from 'prop-types';","\n\nexport var SCROLL_DIRECTION_BACKWARD = -1;\n\nexport var SCROLL_DIRECTION_FORWARD = 1;\n\nexport var SCROLL_DIRECTION_HORIZONTAL = 'horizontal';\nexport var SCROLL_DIRECTION_VERTICAL = 'vertical';\n\n/**\n * Calculates the number of cells to overscan before and after a specified range.\n * This function ensures that overscanning doesn't exceed the available cells.\n */\n\nexport default function defaultOverscanIndicesGetter(_ref) {\n var cellCount = _ref.cellCount,\n overscanCellsCount = _ref.overscanCellsCount,\n scrollDirection = _ref.scrollDirection,\n startIndex = _ref.startIndex,\n stopIndex = _ref.stopIndex;\n\n // Make sure we render at least 1 cell extra before and after (except near boundaries)\n // This is necessary in order to support keyboard navigation (TAB/SHIFT+TAB) in some cases\n // For more info see issues #625\n overscanCellsCount = Math.max(1, overscanCellsCount);\n\n if (scrollDirection === SCROLL_DIRECTION_FORWARD) {\n return {\n overscanStartIndex: Math.max(0, startIndex - 1),\n overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount)\n };\n } else {\n return {\n overscanStartIndex: Math.max(0, startIndex - overscanCellsCount),\n overscanStopIndex: Math.min(cellCount - 1, stopIndex + 1)\n };\n }\n}\nimport { bpfrpt_proptype_OverscanIndicesGetterParams } from './types';\nimport { bpfrpt_proptype_OverscanIndices } from './types';","var bpfrpt_proptype_ScrollIndices = process.env.NODE_ENV === 'production' ? null : {\n scrollToColumn: PropTypes.number.isRequired,\n scrollToRow: PropTypes.number.isRequired\n};\nimport PropTypes from \"prop-types\";\nexport { bpfrpt_proptype_ScrollIndices };","import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport * as React from 'react';\nimport { polyfill } from 'react-lifecycles-compat';\n\n/**\n * This HOC decorates a virtualized component and responds to arrow-key events by scrolling one row or column at a time.\n */\n\nvar ArrowKeyStepper = function (_React$PureComponent) {\n _inherits(ArrowKeyStepper, _React$PureComponent);\n\n function ArrowKeyStepper() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, ArrowKeyStepper);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ArrowKeyStepper.__proto__ || _Object$getPrototypeOf(ArrowKeyStepper)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n scrollToColumn: 0,\n scrollToRow: 0\n }, _this._columnStartIndex = 0, _this._columnStopIndex = 0, _this._rowStartIndex = 0, _this._rowStopIndex = 0, _this._onKeyDown = function (event) {\n var _this$props = _this.props,\n columnCount = _this$props.columnCount,\n disabled = _this$props.disabled,\n mode = _this$props.mode,\n rowCount = _this$props.rowCount;\n\n\n if (disabled) {\n return;\n }\n\n var _this$_getScrollState = _this._getScrollState(),\n scrollToColumnPrevious = _this$_getScrollState.scrollToColumn,\n scrollToRowPrevious = _this$_getScrollState.scrollToRow;\n\n var _this$_getScrollState2 = _this._getScrollState(),\n scrollToColumn = _this$_getScrollState2.scrollToColumn,\n scrollToRow = _this$_getScrollState2.scrollToRow;\n\n // The above cases all prevent default event event behavior.\n // This is to keep the grid from scrolling after the snap-to update.\n\n\n switch (event.key) {\n case 'ArrowDown':\n scrollToRow = mode === 'cells' ? Math.min(scrollToRow + 1, rowCount - 1) : Math.min(_this._rowStopIndex + 1, rowCount - 1);\n break;\n case 'ArrowLeft':\n scrollToColumn = mode === 'cells' ? Math.max(scrollToColumn - 1, 0) : Math.max(_this._columnStartIndex - 1, 0);\n break;\n case 'ArrowRight':\n scrollToColumn = mode === 'cells' ? Math.min(scrollToColumn + 1, columnCount - 1) : Math.min(_this._columnStopIndex + 1, columnCount - 1);\n break;\n case 'ArrowUp':\n scrollToRow = mode === 'cells' ? Math.max(scrollToRow - 1, 0) : Math.max(_this._rowStartIndex - 1, 0);\n break;\n }\n\n if (scrollToColumn !== scrollToColumnPrevious || scrollToRow !== scrollToRowPrevious) {\n event.preventDefault();\n\n _this._updateScrollState({ scrollToColumn: scrollToColumn, scrollToRow: scrollToRow });\n }\n }, _this._onSectionRendered = function (_ref2) {\n var columnStartIndex = _ref2.columnStartIndex,\n columnStopIndex = _ref2.columnStopIndex,\n rowStartIndex = _ref2.rowStartIndex,\n rowStopIndex = _ref2.rowStopIndex;\n\n _this._columnStartIndex = columnStartIndex;\n _this._columnStopIndex = columnStopIndex;\n _this._rowStartIndex = rowStartIndex;\n _this._rowStopIndex = rowStopIndex;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(ArrowKeyStepper, [{\n key: 'setScrollIndexes',\n value: function setScrollIndexes(_ref3) {\n var scrollToColumn = _ref3.scrollToColumn,\n scrollToRow = _ref3.scrollToRow;\n\n this.setState({\n scrollToRow: scrollToRow,\n scrollToColumn: scrollToColumn\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n className = _props.className,\n children = _props.children;\n\n var _getScrollState2 = this._getScrollState(),\n scrollToColumn = _getScrollState2.scrollToColumn,\n scrollToRow = _getScrollState2.scrollToRow;\n\n return React.createElement(\n 'div',\n { className: className, onKeyDown: this._onKeyDown },\n children({\n onSectionRendered: this._onSectionRendered,\n scrollToColumn: scrollToColumn,\n scrollToRow: scrollToRow\n })\n );\n }\n }, {\n key: '_getScrollState',\n value: function _getScrollState() {\n return this.props.isControlled ? this.props : this.state;\n }\n }, {\n key: '_updateScrollState',\n value: function _updateScrollState(_ref4) {\n var scrollToColumn = _ref4.scrollToColumn,\n scrollToRow = _ref4.scrollToRow;\n var _props2 = this.props,\n isControlled = _props2.isControlled,\n onScrollToChange = _props2.onScrollToChange;\n\n\n if (typeof onScrollToChange === 'function') {\n onScrollToChange({ scrollToColumn: scrollToColumn, scrollToRow: scrollToRow });\n }\n\n if (!isControlled) {\n this.setState({ scrollToColumn: scrollToColumn, scrollToRow: scrollToRow });\n }\n }\n }], [{\n key: 'getDerivedStateFromProps',\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.isControlled) {\n return null;\n }\n\n if (nextProps.scrollToColumn !== prevState.scrollToColumn || nextProps.scrollToRow !== prevState.scrollToRow) {\n return {\n scrollToColumn: nextProps.scrollToColumn,\n scrollToRow: nextProps.scrollToRow\n };\n }\n\n return null;\n }\n }]);\n\n return ArrowKeyStepper;\n}(React.PureComponent);\n\nArrowKeyStepper.defaultProps = {\n disabled: false,\n isControlled: false,\n mode: 'edges',\n scrollToColumn: 0,\n scrollToRow: 0\n};\nArrowKeyStepper.propTypes = process.env.NODE_ENV === 'production' ? null : {\n children: PropTypes.func.isRequired,\n className: PropTypes.string,\n columnCount: PropTypes.number.isRequired,\n disabled: PropTypes.bool.isRequired,\n isControlled: PropTypes.bool.isRequired,\n mode: PropTypes.oneOf(['cells', 'edges']).isRequired,\n onScrollToChange: PropTypes.func,\n rowCount: PropTypes.number.isRequired,\n scrollToColumn: PropTypes.number.isRequired,\n scrollToRow: PropTypes.number.isRequired\n};\n\n\npolyfill(ArrowKeyStepper);\n\nexport default ArrowKeyStepper;\nimport { bpfrpt_proptype_RenderedSection } from '../Grid';\nimport { bpfrpt_proptype_ScrollIndices } from './types';\nimport PropTypes from 'prop-types';","/**\n * Detect Element Resize.\n * https://github.com/sdecima/javascript-detect-element-resize\n * Sebastian Decima\n *\n * Forked from version 0.5.3; includes the following modifications:\n * 1) Guard against unsafe 'window' and 'document' references (to support SSR).\n * 2) Defer initialization code via a top-level function wrapper (to support SSR).\n * 3) Avoid unnecessary reflows by not measuring size for scroll events bubbling from children.\n * 4) Add nonce for style element.\n **/\n\nexport default function createDetectElementResize(nonce) {\n // Check `document` and `window` in case of server-side rendering\n var _window;\n if (typeof window !== 'undefined') {\n _window = window;\n } else if (typeof self !== 'undefined') {\n _window = self;\n } else {\n _window = global;\n }\n\n var attachEvent = typeof document !== 'undefined' && document.attachEvent;\n\n if (!attachEvent) {\n var requestFrame = function () {\n var raf = _window.requestAnimationFrame || _window.mozRequestAnimationFrame || _window.webkitRequestAnimationFrame || function (fn) {\n return _window.setTimeout(fn, 20);\n };\n return function (fn) {\n return raf(fn);\n };\n }();\n\n var cancelFrame = function () {\n var cancel = _window.cancelAnimationFrame || _window.mozCancelAnimationFrame || _window.webkitCancelAnimationFrame || _window.clearTimeout;\n return function (id) {\n return cancel(id);\n };\n }();\n\n var resetTriggers = function resetTriggers(element) {\n var triggers = element.__resizeTriggers__,\n expand = triggers.firstElementChild,\n contract = triggers.lastElementChild,\n expandChild = expand.firstElementChild;\n contract.scrollLeft = contract.scrollWidth;\n contract.scrollTop = contract.scrollHeight;\n expandChild.style.width = expand.offsetWidth + 1 + 'px';\n expandChild.style.height = expand.offsetHeight + 1 + 'px';\n expand.scrollLeft = expand.scrollWidth;\n expand.scrollTop = expand.scrollHeight;\n };\n\n var checkTriggers = function checkTriggers(element) {\n return element.offsetWidth != element.__resizeLast__.width || element.offsetHeight != element.__resizeLast__.height;\n };\n\n var scrollListener = function scrollListener(e) {\n // Don't measure (which forces) reflow for scrolls that happen inside of children!\n if (e.target.className.indexOf('contract-trigger') < 0 && e.target.className.indexOf('expand-trigger') < 0) {\n return;\n }\n\n var element = this;\n resetTriggers(this);\n if (this.__resizeRAF__) {\n cancelFrame(this.__resizeRAF__);\n }\n this.__resizeRAF__ = requestFrame(function () {\n if (checkTriggers(element)) {\n element.__resizeLast__.width = element.offsetWidth;\n element.__resizeLast__.height = element.offsetHeight;\n element.__resizeListeners__.forEach(function (fn) {\n fn.call(element, e);\n });\n }\n });\n };\n\n /* Detect CSS Animations support to detect element display/re-attach */\n var animation = false,\n keyframeprefix = '',\n animationstartevent = 'animationstart',\n domPrefixes = 'Webkit Moz O ms'.split(' '),\n startEvents = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' '),\n pfx = '';\n {\n var elm = document.createElement('fakeelement');\n if (elm.style.animationName !== undefined) {\n animation = true;\n }\n\n if (animation === false) {\n for (var i = 0; i < domPrefixes.length; i++) {\n if (elm.style[domPrefixes[i] + 'AnimationName'] !== undefined) {\n pfx = domPrefixes[i];\n keyframeprefix = '-' + pfx.toLowerCase() + '-';\n animationstartevent = startEvents[i];\n animation = true;\n break;\n }\n }\n }\n }\n\n var animationName = 'resizeanim';\n var animationKeyframes = '@' + keyframeprefix + 'keyframes ' + animationName + ' { from { opacity: 0; } to { opacity: 0; } } ';\n var animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; ';\n }\n\n var createStyles = function createStyles(doc) {\n if (!doc.getElementById('detectElementResize')) {\n //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360\n var css = (animationKeyframes ? animationKeyframes : '') + '.resize-triggers { ' + (animationStyle ? animationStyle : '') + 'visibility: hidden; opacity: 0; } ' + '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',\n head = doc.head || doc.getElementsByTagName('head')[0],\n style = doc.createElement('style');\n\n style.id = 'detectElementResize';\n style.type = 'text/css';\n\n if (nonce != null) {\n style.setAttribute('nonce', nonce);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(doc.createTextNode(css));\n }\n\n head.appendChild(style);\n }\n };\n\n var addResizeListener = function addResizeListener(element, fn) {\n if (attachEvent) {\n element.attachEvent('onresize', fn);\n } else {\n if (!element.__resizeTriggers__) {\n var doc = element.ownerDocument;\n var elementStyle = _window.getComputedStyle(element);\n if (elementStyle && elementStyle.position == 'static') {\n element.style.position = 'relative';\n }\n createStyles(doc);\n element.__resizeLast__ = {};\n element.__resizeListeners__ = [];\n (element.__resizeTriggers__ = doc.createElement('div')).className = 'resize-triggers';\n element.__resizeTriggers__.innerHTML = '' + '';\n element.appendChild(element.__resizeTriggers__);\n resetTriggers(element);\n element.addEventListener('scroll', scrollListener, true);\n\n /* Listen for a css animation to detect element display/re-attach */\n if (animationstartevent) {\n element.__resizeTriggers__.__animationListener__ = function animationListener(e) {\n if (e.animationName == animationName) {\n resetTriggers(element);\n }\n };\n element.__resizeTriggers__.addEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__);\n }\n }\n element.__resizeListeners__.push(fn);\n }\n };\n\n var removeResizeListener = function removeResizeListener(element, fn) {\n if (attachEvent) {\n element.detachEvent('onresize', fn);\n } else {\n element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);\n if (!element.__resizeListeners__.length) {\n element.removeEventListener('scroll', scrollListener, true);\n if (element.__resizeTriggers__.__animationListener__) {\n element.__resizeTriggers__.removeEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__);\n element.__resizeTriggers__.__animationListener__ = null;\n }\n try {\n element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);\n } catch (e) {\n // Preact compat; see developit/preact-compat/issues/228\n }\n }\n }\n };\n\n return {\n addResizeListener: addResizeListener,\n removeResizeListener: removeResizeListener\n };\n}","import _extends from 'babel-runtime/helpers/extends';\nimport _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport * as React from 'react';\nimport createDetectElementResize from '../vendor/detectElementResize';\n\nvar AutoSizer = function (_React$PureComponent) {\n _inherits(AutoSizer, _React$PureComponent);\n\n function AutoSizer() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, AutoSizer);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = AutoSizer.__proto__ || _Object$getPrototypeOf(AutoSizer)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n height: _this.props.defaultHeight || 0,\n width: _this.props.defaultWidth || 0\n }, _this._onResize = function () {\n var _this$props = _this.props,\n disableHeight = _this$props.disableHeight,\n disableWidth = _this$props.disableWidth,\n onResize = _this$props.onResize;\n\n\n if (_this._parentNode) {\n // Guard against AutoSizer component being removed from the DOM immediately after being added.\n // This can result in invalid style values which can result in NaN values if we don't handle them.\n // See issue #150 for more context.\n\n var _height = _this._parentNode.offsetHeight || 0;\n var _width = _this._parentNode.offsetWidth || 0;\n\n var _style = window.getComputedStyle(_this._parentNode) || {};\n var paddingLeft = parseInt(_style.paddingLeft, 10) || 0;\n var paddingRight = parseInt(_style.paddingRight, 10) || 0;\n var paddingTop = parseInt(_style.paddingTop, 10) || 0;\n var paddingBottom = parseInt(_style.paddingBottom, 10) || 0;\n\n var newHeight = _height - paddingTop - paddingBottom;\n var newWidth = _width - paddingLeft - paddingRight;\n\n if (!disableHeight && _this.state.height !== newHeight || !disableWidth && _this.state.width !== newWidth) {\n _this.setState({\n height: _height - paddingTop - paddingBottom,\n width: _width - paddingLeft - paddingRight\n });\n\n onResize({ height: _height, width: _width });\n }\n }\n }, _this._setRef = function (autoSizer) {\n _this._autoSizer = autoSizer;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(AutoSizer, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var nonce = this.props.nonce;\n\n if (this._autoSizer && this._autoSizer.parentNode && this._autoSizer.parentNode.ownerDocument && this._autoSizer.parentNode.ownerDocument.defaultView && this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement) {\n // Delay access of parentNode until mount.\n // This handles edge-cases where the component has already been unmounted before its ref has been set,\n // As well as libraries like react-lite which have a slightly different lifecycle.\n this._parentNode = this._autoSizer.parentNode;\n\n // Defer requiring resize handler in order to support server-side rendering.\n // See issue #41\n this._detectElementResize = createDetectElementResize(nonce);\n this._detectElementResize.addResizeListener(this._parentNode, this._onResize);\n\n this._onResize();\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this._detectElementResize && this._parentNode) {\n this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n children = _props.children,\n className = _props.className,\n disableHeight = _props.disableHeight,\n disableWidth = _props.disableWidth,\n style = _props.style;\n var _state = this.state,\n height = _state.height,\n width = _state.width;\n\n // Outer div should not force width/height since that may prevent containers from shrinking.\n // Inner component should overflow and use calculated width/height.\n // See issue #68 for more information.\n\n var outerStyle = { overflow: 'visible' };\n var childParams = {};\n\n if (!disableHeight) {\n outerStyle.height = 0;\n childParams.height = height;\n }\n\n if (!disableWidth) {\n outerStyle.width = 0;\n childParams.width = width;\n }\n\n /**\n * TODO: Avoid rendering children before the initial measurements have been collected.\n * At best this would just be wasting cycles.\n * Add this check into version 10 though as it could break too many ref callbacks in version 9.\n * Note that if default width/height props were provided this would still work with SSR.\n if (\n height !== 0 &&\n width !== 0\n ) {\n child = children({ height, width })\n }\n */\n\n return React.createElement(\n 'div',\n {\n className: className,\n ref: this._setRef,\n style: _extends({}, outerStyle, style) },\n children(childParams)\n );\n }\n }]);\n\n return AutoSizer;\n}(React.PureComponent);\n\nAutoSizer.defaultProps = {\n onResize: function onResize() {},\n disableHeight: false,\n disableWidth: false,\n style: {}\n};\nAutoSizer.propTypes = process.env.NODE_ENV === 'production' ? null : {\n /** Function responsible for rendering children.*/\n children: PropTypes.func.isRequired,\n\n\n /** Optional custom CSS class name to attach to root AutoSizer element. */\n className: PropTypes.string,\n\n\n /** Default height to use for initial render; useful for SSR */\n defaultHeight: PropTypes.number,\n\n\n /** Default width to use for initial render; useful for SSR */\n defaultWidth: PropTypes.number,\n\n\n /** Disable dynamic :height property */\n disableHeight: PropTypes.bool.isRequired,\n\n\n /** Disable dynamic :width property */\n disableWidth: PropTypes.bool.isRequired,\n\n\n /** Nonce of the inlined stylesheet for Content Security Policy */\n nonce: PropTypes.string,\n\n\n /** Callback to be invoked on-resize */\n onResize: PropTypes.func.isRequired,\n\n\n /** Optional inline style */\n style: PropTypes.object\n};\nexport default AutoSizer;\nimport PropTypes from 'prop-types';","import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport * as React from 'react';\nimport { findDOMNode } from 'react-dom';\n\n/**\n * Wraps a cell and measures its rendered content.\n * Measurements are stored in a per-cell cache.\n * Cached-content is not be re-measured.\n */\nvar CellMeasurer = function (_React$PureComponent) {\n _inherits(CellMeasurer, _React$PureComponent);\n\n function CellMeasurer() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, CellMeasurer);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = CellMeasurer.__proto__ || _Object$getPrototypeOf(CellMeasurer)).call.apply(_ref, [this].concat(args))), _this), _this._measure = function () {\n var _this$props = _this.props,\n cache = _this$props.cache,\n _this$props$columnInd = _this$props.columnIndex,\n columnIndex = _this$props$columnInd === undefined ? 0 : _this$props$columnInd,\n parent = _this$props.parent,\n _this$props$rowIndex = _this$props.rowIndex,\n rowIndex = _this$props$rowIndex === undefined ? _this.props.index || 0 : _this$props$rowIndex;\n\n var _this$_getCellMeasure = _this._getCellMeasurements(),\n height = _this$_getCellMeasure.height,\n width = _this$_getCellMeasure.width;\n\n if (height !== cache.getHeight(rowIndex, columnIndex) || width !== cache.getWidth(rowIndex, columnIndex)) {\n cache.set(rowIndex, columnIndex, width, height);\n\n if (parent && typeof parent.recomputeGridSize === 'function') {\n parent.recomputeGridSize({\n columnIndex: columnIndex,\n rowIndex: rowIndex\n });\n }\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(CellMeasurer, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this._maybeMeasureCell();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n this._maybeMeasureCell();\n }\n }, {\n key: 'render',\n value: function render() {\n var children = this.props.children;\n\n\n return typeof children === 'function' ? children({ measure: this._measure }) : children;\n }\n }, {\n key: '_getCellMeasurements',\n value: function _getCellMeasurements() {\n var cache = this.props.cache;\n\n\n var node = findDOMNode(this);\n\n // TODO Check for a bad combination of fixedWidth and missing numeric width or vice versa with height\n\n if (node && node.ownerDocument && node.ownerDocument.defaultView && node instanceof node.ownerDocument.defaultView.HTMLElement) {\n var styleWidth = node.style.width;\n var styleHeight = node.style.height;\n\n // If we are re-measuring a cell that has already been measured,\n // It will have a hard-coded width/height from the previous measurement.\n // The fact that we are measuring indicates this measurement is probably stale,\n // So explicitly clear it out (eg set to \"auto\") so we can recalculate.\n // See issue #593 for more info.\n // Even if we are measuring initially- if we're inside of a MultiGrid component,\n // Explicitly clear width/height before measuring to avoid being tainted by another Grid.\n // eg top/left Grid renders before bottom/right Grid\n // Since the CellMeasurerCache is shared between them this taints derived cell size values.\n if (!cache.hasFixedWidth()) {\n node.style.width = 'auto';\n }\n if (!cache.hasFixedHeight()) {\n node.style.height = 'auto';\n }\n\n var height = Math.ceil(node.offsetHeight);\n var width = Math.ceil(node.offsetWidth);\n\n // Reset after measuring to avoid breaking styles; see #660\n if (styleWidth) {\n node.style.width = styleWidth;\n }\n if (styleHeight) {\n node.style.height = styleHeight;\n }\n\n return { height: height, width: width };\n } else {\n return { height: 0, width: 0 };\n }\n }\n }, {\n key: '_maybeMeasureCell',\n value: function _maybeMeasureCell() {\n var _props = this.props,\n cache = _props.cache,\n _props$columnIndex = _props.columnIndex,\n columnIndex = _props$columnIndex === undefined ? 0 : _props$columnIndex,\n parent = _props.parent,\n _props$rowIndex = _props.rowIndex,\n rowIndex = _props$rowIndex === undefined ? this.props.index || 0 : _props$rowIndex;\n\n\n if (!cache.has(rowIndex, columnIndex)) {\n var _getCellMeasurements2 = this._getCellMeasurements(),\n height = _getCellMeasurements2.height,\n width = _getCellMeasurements2.width;\n\n cache.set(rowIndex, columnIndex, width, height);\n\n // If size has changed, let Grid know to re-render.\n if (parent && typeof parent.invalidateCellSizeAfterRender === 'function') {\n parent.invalidateCellSizeAfterRender({\n columnIndex: columnIndex,\n rowIndex: rowIndex\n });\n }\n }\n }\n }]);\n\n return CellMeasurer;\n}(React.PureComponent);\n\n// Used for DEV mode warning check\n\n\nCellMeasurer.__internalCellMeasurerFlag = false;\nCellMeasurer.propTypes = process.env.NODE_ENV === 'production' ? null : {\n cache: function cache() {\n return (typeof bpfrpt_proptype_CellMeasureCache === 'function' ? bpfrpt_proptype_CellMeasureCache.isRequired ? bpfrpt_proptype_CellMeasureCache.isRequired : bpfrpt_proptype_CellMeasureCache : PropTypes.shape(bpfrpt_proptype_CellMeasureCache).isRequired).apply(this, arguments);\n },\n children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]).isRequired,\n columnIndex: PropTypes.number,\n index: PropTypes.number,\n parent: PropTypes.shape({\n invalidateCellSizeAfterRender: PropTypes.func,\n recomputeGridSize: PropTypes.func\n }).isRequired,\n rowIndex: PropTypes.number\n};\nexport default CellMeasurer;\nif (process.env.NODE_ENV !== 'production') {\n CellMeasurer.__internalCellMeasurerFlag = true;\n}\nimport { bpfrpt_proptype_CellMeasureCache } from './types';\nimport PropTypes from 'prop-types';","import _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\n\n\nexport var DEFAULT_HEIGHT = 30;\n\nexport var DEFAULT_WIDTH = 100;\n\n// Enables more intelligent mapping of a given column and row index to an item ID.\n// This prevents a cell cache from being invalidated when its parent collection is modified.\n\n/**\n * Caches measurements for a given cell.\n */\nvar CellMeasurerCache = function () {\n function CellMeasurerCache() {\n var _this = this;\n\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, CellMeasurerCache);\n\n this._cellHeightCache = {};\n this._cellWidthCache = {};\n this._columnWidthCache = {};\n this._rowHeightCache = {};\n this._columnCount = 0;\n this._rowCount = 0;\n\n this.columnWidth = function (_ref) {\n var index = _ref.index;\n\n var key = _this._keyMapper(0, index);\n\n return _this._columnWidthCache.hasOwnProperty(key) ? _this._columnWidthCache[key] : _this._defaultWidth;\n };\n\n this.rowHeight = function (_ref2) {\n var index = _ref2.index;\n\n var key = _this._keyMapper(index, 0);\n\n return _this._rowHeightCache.hasOwnProperty(key) ? _this._rowHeightCache[key] : _this._defaultHeight;\n };\n\n var defaultHeight = params.defaultHeight,\n defaultWidth = params.defaultWidth,\n fixedHeight = params.fixedHeight,\n fixedWidth = params.fixedWidth,\n keyMapper = params.keyMapper,\n minHeight = params.minHeight,\n minWidth = params.minWidth;\n\n\n this._hasFixedHeight = fixedHeight === true;\n this._hasFixedWidth = fixedWidth === true;\n this._minHeight = minHeight || 0;\n this._minWidth = minWidth || 0;\n this._keyMapper = keyMapper || defaultKeyMapper;\n\n this._defaultHeight = Math.max(this._minHeight, typeof defaultHeight === 'number' ? defaultHeight : DEFAULT_HEIGHT);\n this._defaultWidth = Math.max(this._minWidth, typeof defaultWidth === 'number' ? defaultWidth : DEFAULT_WIDTH);\n\n if (process.env.NODE_ENV !== 'production') {\n if (this._hasFixedHeight === false && this._hasFixedWidth === false) {\n console.warn(\"CellMeasurerCache should only measure a cell's width or height. \" + 'You have configured CellMeasurerCache to measure both. ' + 'This will result in poor performance.');\n }\n\n if (this._hasFixedHeight === false && this._defaultHeight === 0) {\n console.warn('Fixed height CellMeasurerCache should specify a :defaultHeight greater than 0. ' + 'Failing to do so will lead to unnecessary layout and poor performance.');\n }\n\n if (this._hasFixedWidth === false && this._defaultWidth === 0) {\n console.warn('Fixed width CellMeasurerCache should specify a :defaultWidth greater than 0. ' + 'Failing to do so will lead to unnecessary layout and poor performance.');\n }\n }\n }\n\n _createClass(CellMeasurerCache, [{\n key: 'clear',\n value: function clear(rowIndex) {\n var columnIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n var key = this._keyMapper(rowIndex, columnIndex);\n\n delete this._cellHeightCache[key];\n delete this._cellWidthCache[key];\n\n this._updateCachedColumnAndRowSizes(rowIndex, columnIndex);\n }\n }, {\n key: 'clearAll',\n value: function clearAll() {\n this._cellHeightCache = {};\n this._cellWidthCache = {};\n this._columnWidthCache = {};\n this._rowHeightCache = {};\n this._rowCount = 0;\n this._columnCount = 0;\n }\n }, {\n key: 'hasFixedHeight',\n value: function hasFixedHeight() {\n return this._hasFixedHeight;\n }\n }, {\n key: 'hasFixedWidth',\n value: function hasFixedWidth() {\n return this._hasFixedWidth;\n }\n }, {\n key: 'getHeight',\n value: function getHeight(rowIndex) {\n var columnIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n if (this._hasFixedHeight) {\n return this._defaultHeight;\n } else {\n var _key = this._keyMapper(rowIndex, columnIndex);\n\n return this._cellHeightCache.hasOwnProperty(_key) ? Math.max(this._minHeight, this._cellHeightCache[_key]) : this._defaultHeight;\n }\n }\n }, {\n key: 'getWidth',\n value: function getWidth(rowIndex) {\n var columnIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n if (this._hasFixedWidth) {\n return this._defaultWidth;\n } else {\n var _key2 = this._keyMapper(rowIndex, columnIndex);\n\n return this._cellWidthCache.hasOwnProperty(_key2) ? Math.max(this._minWidth, this._cellWidthCache[_key2]) : this._defaultWidth;\n }\n }\n }, {\n key: 'has',\n value: function has(rowIndex) {\n var columnIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n var key = this._keyMapper(rowIndex, columnIndex);\n\n return this._cellHeightCache.hasOwnProperty(key);\n }\n }, {\n key: 'set',\n value: function set(rowIndex, columnIndex, width, height) {\n var key = this._keyMapper(rowIndex, columnIndex);\n\n if (columnIndex >= this._columnCount) {\n this._columnCount = columnIndex + 1;\n }\n if (rowIndex >= this._rowCount) {\n this._rowCount = rowIndex + 1;\n }\n\n // Size is cached per cell so we don't have to re-measure if cells are re-ordered.\n this._cellHeightCache[key] = height;\n this._cellWidthCache[key] = width;\n\n this._updateCachedColumnAndRowSizes(rowIndex, columnIndex);\n }\n }, {\n key: '_updateCachedColumnAndRowSizes',\n value: function _updateCachedColumnAndRowSizes(rowIndex, columnIndex) {\n // :columnWidth and :rowHeight are derived based on all cells in a column/row.\n // Pre-cache these derived values for faster lookup later.\n // Reads are expected to occur more frequently than writes in this case.\n // Only update non-fixed dimensions though to avoid doing unnecessary work.\n if (!this._hasFixedWidth) {\n var columnWidth = 0;\n for (var i = 0; i < this._rowCount; i++) {\n columnWidth = Math.max(columnWidth, this.getWidth(i, columnIndex));\n }\n var columnKey = this._keyMapper(0, columnIndex);\n this._columnWidthCache[columnKey] = columnWidth;\n }\n if (!this._hasFixedHeight) {\n var rowHeight = 0;\n for (var _i = 0; _i < this._columnCount; _i++) {\n rowHeight = Math.max(rowHeight, this.getHeight(rowIndex, _i));\n }\n var rowKey = this._keyMapper(rowIndex, 0);\n this._rowHeightCache[rowKey] = rowHeight;\n }\n }\n }, {\n key: 'defaultHeight',\n get: function get() {\n return this._defaultHeight;\n }\n }, {\n key: 'defaultWidth',\n get: function get() {\n return this._defaultWidth;\n }\n }]);\n\n return CellMeasurerCache;\n}();\n\nexport default CellMeasurerCache;\n\n\nfunction defaultKeyMapper(rowIndex, columnIndex) {\n return rowIndex + '-' + columnIndex;\n}\nimport { bpfrpt_proptype_CellMeasureCache } from './types';","import CellMeasurer from './CellMeasurer';\nimport CellMeasurerCache from './CellMeasurerCache';\n\nexport default CellMeasurer;\nexport { CellMeasurer, CellMeasurerCache };","import _extends from 'babel-runtime/helpers/extends';\nimport _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport cn from 'classnames';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { polyfill } from 'react-lifecycles-compat';\nimport createCallbackMemoizer from '../utils/createCallbackMemoizer';\nimport getScrollbarSize from 'dom-helpers/util/scrollbarSize';\n\n// @TODO Merge Collection and CollectionView\n\n/**\n * Specifies the number of milliseconds during which to disable pointer events while a scroll is in progress.\n * This improves performance and makes scrolling smoother.\n */\nvar IS_SCROLLING_TIMEOUT = 150;\n\n/**\n * Controls whether the Grid updates the DOM element's scrollLeft/scrollTop based on the current state or just observes it.\n * This prevents Grid from interrupting mouse-wheel animations (see issue #2).\n */\nvar SCROLL_POSITION_CHANGE_REASONS = {\n OBSERVED: 'observed',\n REQUESTED: 'requested'\n};\n\n/**\n * Monitors changes in properties (eg. cellCount) and state (eg. scroll offsets) to determine when rendering needs to occur.\n * This component does not render any visible content itself; it defers to the specified :cellLayoutManager.\n */\n\nvar CollectionView = function (_React$PureComponent) {\n _inherits(CollectionView, _React$PureComponent);\n\n // Invokes callbacks only when their values have changed.\n function CollectionView() {\n var _ref;\n\n _classCallCheck(this, CollectionView);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // If this component is being rendered server-side, getScrollbarSize() will return undefined.\n // We handle this case in componentDidMount()\n var _this = _possibleConstructorReturn(this, (_ref = CollectionView.__proto__ || _Object$getPrototypeOf(CollectionView)).call.apply(_ref, [this].concat(args)));\n\n _this.state = {\n isScrolling: false,\n scrollLeft: 0,\n scrollTop: 0\n };\n _this._calculateSizeAndPositionDataOnNextUpdate = false;\n _this._onSectionRenderedMemoizer = createCallbackMemoizer();\n _this._onScrollMemoizer = createCallbackMemoizer(false);\n\n _this._invokeOnSectionRenderedHelper = function () {\n var _this$props = _this.props,\n cellLayoutManager = _this$props.cellLayoutManager,\n onSectionRendered = _this$props.onSectionRendered;\n\n\n _this._onSectionRenderedMemoizer({\n callback: onSectionRendered,\n indices: {\n indices: cellLayoutManager.getLastRenderedIndices()\n }\n });\n };\n\n _this._setScrollingContainerRef = function (ref) {\n _this._scrollingContainer = ref;\n };\n\n _this._updateScrollPositionForScrollToCell = function () {\n var _this$props2 = _this.props,\n cellLayoutManager = _this$props2.cellLayoutManager,\n height = _this$props2.height,\n scrollToAlignment = _this$props2.scrollToAlignment,\n scrollToCell = _this$props2.scrollToCell,\n width = _this$props2.width;\n var _this$state = _this.state,\n scrollLeft = _this$state.scrollLeft,\n scrollTop = _this$state.scrollTop;\n\n\n if (scrollToCell >= 0) {\n var scrollPosition = cellLayoutManager.getScrollPositionForCell({\n align: scrollToAlignment,\n cellIndex: scrollToCell,\n height: height,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n width: width\n });\n\n if (scrollPosition.scrollLeft !== scrollLeft || scrollPosition.scrollTop !== scrollTop) {\n _this._setScrollPosition(scrollPosition);\n }\n }\n };\n\n _this._onScroll = function (event) {\n // In certain edge-cases React dispatches an onScroll event with an invalid target.scrollLeft / target.scrollTop.\n // This invalid event can be detected by comparing event.target to this component's scrollable DOM element.\n // See issue #404 for more information.\n if (event.target !== _this._scrollingContainer) {\n return;\n }\n\n // Prevent pointer events from interrupting a smooth scroll\n _this._enablePointerEventsAfterDelay();\n\n // When this component is shrunk drastically, React dispatches a series of back-to-back scroll events,\n // Gradually converging on a scrollTop that is within the bounds of the new, smaller height.\n // This causes a series of rapid renders that is slow for long lists.\n // We can avoid that by doing some simple bounds checking to ensure that scrollTop never exceeds the total height.\n var _this$props3 = _this.props,\n cellLayoutManager = _this$props3.cellLayoutManager,\n height = _this$props3.height,\n isScrollingChange = _this$props3.isScrollingChange,\n width = _this$props3.width;\n\n var scrollbarSize = _this._scrollbarSize;\n\n var _cellLayoutManager$ge = cellLayoutManager.getTotalSize(),\n totalHeight = _cellLayoutManager$ge.height,\n totalWidth = _cellLayoutManager$ge.width;\n\n var scrollLeft = Math.max(0, Math.min(totalWidth - width + scrollbarSize, event.target.scrollLeft));\n var scrollTop = Math.max(0, Math.min(totalHeight - height + scrollbarSize, event.target.scrollTop));\n\n // Certain devices (like Apple touchpad) rapid-fire duplicate events.\n // Don't force a re-render if this is the case.\n // The mouse may move faster then the animation frame does.\n // Use requestAnimationFrame to avoid over-updating.\n if (_this.state.scrollLeft !== scrollLeft || _this.state.scrollTop !== scrollTop) {\n // Browsers with cancelable scroll events (eg. Firefox) interrupt scrolling animations if scrollTop/scrollLeft is set.\n // Other browsers (eg. Safari) don't scroll as well without the help under certain conditions (DOM or style changes during scrolling).\n // All things considered, this seems to be the best current work around that I'm aware of.\n // For more information see https://github.com/bvaughn/react-virtualized/pull/124\n var scrollPositionChangeReason = event.cancelable ? SCROLL_POSITION_CHANGE_REASONS.OBSERVED : SCROLL_POSITION_CHANGE_REASONS.REQUESTED;\n\n // Synchronously set :isScrolling the first time (since _setNextState will reschedule its animation frame each time it's called)\n if (!_this.state.isScrolling) {\n isScrollingChange(true);\n }\n\n _this.setState({\n isScrolling: true,\n scrollLeft: scrollLeft,\n scrollPositionChangeReason: scrollPositionChangeReason,\n scrollTop: scrollTop\n });\n }\n\n _this._invokeOnScrollMemoizer({\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n totalWidth: totalWidth,\n totalHeight: totalHeight\n });\n };\n\n _this._scrollbarSize = getScrollbarSize();\n if (_this._scrollbarSize === undefined) {\n _this._scrollbarSizeMeasured = false;\n _this._scrollbarSize = 0;\n } else {\n _this._scrollbarSizeMeasured = true;\n }\n return _this;\n }\n\n /**\n * Forced recompute of cell sizes and positions.\n * This function should be called if cell sizes have changed but nothing else has.\n * Since cell positions are calculated by callbacks, the collection view has no way of detecting when the underlying data has changed.\n */\n\n\n _createClass(CollectionView, [{\n key: 'recomputeCellSizesAndPositions',\n value: function recomputeCellSizesAndPositions() {\n this._calculateSizeAndPositionDataOnNextUpdate = true;\n this.forceUpdate();\n }\n\n /* ---------------------------- Component lifecycle methods ---------------------------- */\n\n /**\n * @private\n * This method updates scrollLeft/scrollTop in state for the following conditions:\n * 1) Empty content (0 rows or columns)\n * 2) New scroll props overriding the current state\n * 3) Cells-count or cells-size has changed, making previous scroll offsets invalid\n */\n\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _props = this.props,\n cellLayoutManager = _props.cellLayoutManager,\n scrollLeft = _props.scrollLeft,\n scrollToCell = _props.scrollToCell,\n scrollTop = _props.scrollTop;\n\n // If this component was first rendered server-side, scrollbar size will be undefined.\n // In that event we need to remeasure.\n\n if (!this._scrollbarSizeMeasured) {\n this._scrollbarSize = getScrollbarSize();\n this._scrollbarSizeMeasured = true;\n this.setState({});\n }\n\n if (scrollToCell >= 0) {\n this._updateScrollPositionForScrollToCell();\n } else if (scrollLeft >= 0 || scrollTop >= 0) {\n this._setScrollPosition({ scrollLeft: scrollLeft, scrollTop: scrollTop });\n }\n\n // Update onSectionRendered callback.\n this._invokeOnSectionRenderedHelper();\n\n var _cellLayoutManager$ge2 = cellLayoutManager.getTotalSize(),\n totalHeight = _cellLayoutManager$ge2.height,\n totalWidth = _cellLayoutManager$ge2.width;\n\n // Initialize onScroll callback.\n\n\n this._invokeOnScrollMemoizer({\n scrollLeft: scrollLeft || 0,\n scrollTop: scrollTop || 0,\n totalHeight: totalHeight,\n totalWidth: totalWidth\n });\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps, prevState) {\n var _props2 = this.props,\n height = _props2.height,\n scrollToAlignment = _props2.scrollToAlignment,\n scrollToCell = _props2.scrollToCell,\n width = _props2.width;\n var _state = this.state,\n scrollLeft = _state.scrollLeft,\n scrollPositionChangeReason = _state.scrollPositionChangeReason,\n scrollTop = _state.scrollTop;\n\n // Make sure requested changes to :scrollLeft or :scrollTop get applied.\n // Assigning to scrollLeft/scrollTop tells the browser to interrupt any running scroll animations,\n // And to discard any pending async changes to the scroll position that may have happened in the meantime (e.g. on a separate scrolling thread).\n // So we only set these when we require an adjustment of the scroll position.\n // See issue #2 for more information.\n\n if (scrollPositionChangeReason === SCROLL_POSITION_CHANGE_REASONS.REQUESTED) {\n if (scrollLeft >= 0 && scrollLeft !== prevState.scrollLeft && scrollLeft !== this._scrollingContainer.scrollLeft) {\n this._scrollingContainer.scrollLeft = scrollLeft;\n }\n if (scrollTop >= 0 && scrollTop !== prevState.scrollTop && scrollTop !== this._scrollingContainer.scrollTop) {\n this._scrollingContainer.scrollTop = scrollTop;\n }\n }\n\n // Update scroll offsets if the current :scrollToCell values requires it\n if (height !== prevProps.height || scrollToAlignment !== prevProps.scrollToAlignment || scrollToCell !== prevProps.scrollToCell || width !== prevProps.width) {\n this._updateScrollPositionForScrollToCell();\n }\n\n // Update onRowsRendered callback if start/stop indices have changed\n this._invokeOnSectionRenderedHelper();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this._disablePointerEventsTimeoutId) {\n clearTimeout(this._disablePointerEventsTimeoutId);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props3 = this.props,\n autoHeight = _props3.autoHeight,\n cellCount = _props3.cellCount,\n cellLayoutManager = _props3.cellLayoutManager,\n className = _props3.className,\n height = _props3.height,\n horizontalOverscanSize = _props3.horizontalOverscanSize,\n id = _props3.id,\n noContentRenderer = _props3.noContentRenderer,\n style = _props3.style,\n verticalOverscanSize = _props3.verticalOverscanSize,\n width = _props3.width;\n var _state2 = this.state,\n isScrolling = _state2.isScrolling,\n scrollLeft = _state2.scrollLeft,\n scrollTop = _state2.scrollTop;\n\n // Memoization reset\n\n if (this._lastRenderedCellCount !== cellCount || this._lastRenderedCellLayoutManager !== cellLayoutManager || this._calculateSizeAndPositionDataOnNextUpdate) {\n this._lastRenderedCellCount = cellCount;\n this._lastRenderedCellLayoutManager = cellLayoutManager;\n this._calculateSizeAndPositionDataOnNextUpdate = false;\n\n cellLayoutManager.calculateSizeAndPositionData();\n }\n\n var _cellLayoutManager$ge3 = cellLayoutManager.getTotalSize(),\n totalHeight = _cellLayoutManager$ge3.height,\n totalWidth = _cellLayoutManager$ge3.width;\n\n // Safely expand the rendered area by the specified overscan amount\n\n\n var left = Math.max(0, scrollLeft - horizontalOverscanSize);\n var top = Math.max(0, scrollTop - verticalOverscanSize);\n var right = Math.min(totalWidth, scrollLeft + width + horizontalOverscanSize);\n var bottom = Math.min(totalHeight, scrollTop + height + verticalOverscanSize);\n\n var childrenToDisplay = height > 0 && width > 0 ? cellLayoutManager.cellRenderers({\n height: bottom - top,\n isScrolling: isScrolling,\n width: right - left,\n x: left,\n y: top\n }) : [];\n\n var collectionStyle = {\n boxSizing: 'border-box',\n direction: 'ltr',\n height: autoHeight ? 'auto' : height,\n position: 'relative',\n WebkitOverflowScrolling: 'touch',\n width: width,\n willChange: 'transform'\n };\n\n // Force browser to hide scrollbars when we know they aren't necessary.\n // Otherwise once scrollbars appear they may not disappear again.\n // For more info see issue #116\n var verticalScrollBarSize = totalHeight > height ? this._scrollbarSize : 0;\n var horizontalScrollBarSize = totalWidth > width ? this._scrollbarSize : 0;\n\n // Also explicitly init styles to 'auto' if scrollbars are required.\n // This works around an obscure edge case where external CSS styles have not yet been loaded,\n // But an initial scroll index of offset is set as an external prop.\n // Without this style, Grid would render the correct range of cells but would NOT update its internal offset.\n // This was originally reported via clauderic/react-infinite-calendar/issues/23\n collectionStyle.overflowX = totalWidth + verticalScrollBarSize <= width ? 'hidden' : 'auto';\n collectionStyle.overflowY = totalHeight + horizontalScrollBarSize <= height ? 'hidden' : 'auto';\n\n return React.createElement(\n 'div',\n {\n ref: this._setScrollingContainerRef,\n 'aria-label': this.props['aria-label'],\n className: cn('ReactVirtualized__Collection', className),\n id: id,\n onScroll: this._onScroll,\n role: 'grid',\n style: _extends({}, collectionStyle, style),\n tabIndex: 0 },\n cellCount > 0 && React.createElement(\n 'div',\n {\n className: 'ReactVirtualized__Collection__innerScrollContainer',\n style: {\n height: totalHeight,\n maxHeight: totalHeight,\n maxWidth: totalWidth,\n overflow: 'hidden',\n pointerEvents: isScrolling ? 'none' : '',\n width: totalWidth\n } },\n childrenToDisplay\n ),\n cellCount === 0 && noContentRenderer()\n );\n }\n\n /* ---------------------------- Helper methods ---------------------------- */\n\n /**\n * Sets an :isScrolling flag for a small window of time.\n * This flag is used to disable pointer events on the scrollable portion of the Collection.\n * This prevents jerky/stuttery mouse-wheel scrolling.\n */\n\n }, {\n key: '_enablePointerEventsAfterDelay',\n value: function _enablePointerEventsAfterDelay() {\n var _this2 = this;\n\n if (this._disablePointerEventsTimeoutId) {\n clearTimeout(this._disablePointerEventsTimeoutId);\n }\n\n this._disablePointerEventsTimeoutId = setTimeout(function () {\n var isScrollingChange = _this2.props.isScrollingChange;\n\n\n isScrollingChange(false);\n\n _this2._disablePointerEventsTimeoutId = null;\n _this2.setState({\n isScrolling: false\n });\n }, IS_SCROLLING_TIMEOUT);\n }\n }, {\n key: '_invokeOnScrollMemoizer',\n value: function _invokeOnScrollMemoizer(_ref2) {\n var _this3 = this;\n\n var scrollLeft = _ref2.scrollLeft,\n scrollTop = _ref2.scrollTop,\n totalHeight = _ref2.totalHeight,\n totalWidth = _ref2.totalWidth;\n\n this._onScrollMemoizer({\n callback: function callback(_ref3) {\n var scrollLeft = _ref3.scrollLeft,\n scrollTop = _ref3.scrollTop;\n var _props4 = _this3.props,\n height = _props4.height,\n onScroll = _props4.onScroll,\n width = _props4.width;\n\n\n onScroll({\n clientHeight: height,\n clientWidth: width,\n scrollHeight: totalHeight,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n scrollWidth: totalWidth\n });\n },\n indices: {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n }\n });\n }\n }, {\n key: '_setScrollPosition',\n value: function _setScrollPosition(_ref4) {\n var scrollLeft = _ref4.scrollLeft,\n scrollTop = _ref4.scrollTop;\n\n var newState = {\n scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.REQUESTED\n };\n\n if (scrollLeft >= 0) {\n newState.scrollLeft = scrollLeft;\n }\n\n if (scrollTop >= 0) {\n newState.scrollTop = scrollTop;\n }\n\n if (scrollLeft >= 0 && scrollLeft !== this.state.scrollLeft || scrollTop >= 0 && scrollTop !== this.state.scrollTop) {\n this.setState(newState);\n }\n }\n }], [{\n key: 'getDerivedStateFromProps',\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.cellCount === 0 && (prevState.scrollLeft !== 0 || prevState.scrollTop !== 0)) {\n return {\n scrollLeft: 0,\n scrollTop: 0\n };\n } else if (nextProps.scrollLeft !== prevState.scrollLeft || nextProps.scrollTop !== prevState.scrollTop) {\n return {\n scrollLeft: nextProps.scrollLeft != null ? nextProps.scrollLeft : prevState.scrollLeft,\n scrollTop: nextProps.scrollTop != null ? nextProps.scrollTop : prevState.scrollTop\n };\n }\n\n return null;\n }\n }]);\n\n return CollectionView;\n}(React.PureComponent);\n\nCollectionView.defaultProps = {\n 'aria-label': 'grid',\n horizontalOverscanSize: 0,\n noContentRenderer: function noContentRenderer() {\n return null;\n },\n onScroll: function onScroll() {\n return null;\n },\n onSectionRendered: function onSectionRendered() {\n return null;\n },\n scrollToAlignment: 'auto',\n scrollToCell: -1,\n style: {},\n verticalOverscanSize: 0\n};\nCollectionView.propTypes = process.env.NODE_ENV !== \"production\" ? {\n 'aria-label': PropTypes.string,\n\n /**\n * Removes fixed height from the scrollingContainer so that the total height\n * of rows can stretch the window. Intended for use with WindowScroller\n */\n autoHeight: PropTypes.bool,\n\n /**\n * Number of cells in collection.\n */\n cellCount: PropTypes.number.isRequired,\n\n /**\n * Calculates cell sizes and positions and manages rendering the appropriate cells given a specified window.\n */\n cellLayoutManager: PropTypes.object.isRequired,\n\n /**\n * Optional custom CSS class name to attach to root Collection element.\n */\n className: PropTypes.string,\n\n /**\n * Height of Collection; this property determines the number of visible (vs virtualized) rows.\n */\n height: PropTypes.number.isRequired,\n\n /**\n * Optional custom id to attach to root Collection element.\n */\n id: PropTypes.string,\n\n /**\n * Enables the `Collection` to horiontally \"overscan\" its content similar to how `Grid` does.\n * This can reduce flicker around the edges when a user scrolls quickly.\n */\n horizontalOverscanSize: PropTypes.number.isRequired,\n\n isScrollingChange: PropTypes.func,\n\n /**\n * Optional renderer to be used in place of rows when either :rowCount or :cellCount is 0.\n */\n noContentRenderer: PropTypes.func.isRequired,\n\n /**\n * Callback invoked whenever the scroll offset changes within the inner scrollable region.\n * This callback can be used to sync scrolling between lists, tables, or grids.\n * ({ clientHeight, clientWidth, scrollHeight, scrollLeft, scrollTop, scrollWidth }): void\n */\n onScroll: PropTypes.func.isRequired,\n\n /**\n * Callback invoked with information about the section of the Collection that was just rendered.\n * This callback is passed a named :indices parameter which is an Array of the most recently rendered section indices.\n */\n onSectionRendered: PropTypes.func.isRequired,\n\n /**\n * Horizontal offset.\n */\n scrollLeft: PropTypes.number,\n\n /**\n * Controls scroll-to-cell behavior of the Grid.\n * The default (\"auto\") scrolls the least amount possible to ensure that the specified cell is fully visible.\n * Use \"start\" to align cells to the top/left of the Grid and \"end\" to align bottom/right.\n */\n scrollToAlignment: PropTypes.oneOf(['auto', 'end', 'start', 'center']).isRequired,\n\n /**\n * Cell index to ensure visible (by forcefully scrolling if necessary).\n */\n scrollToCell: PropTypes.number.isRequired,\n\n /**\n * Vertical offset.\n */\n scrollTop: PropTypes.number,\n\n /**\n * Optional custom inline style to attach to root Collection element.\n */\n style: PropTypes.object,\n\n /**\n * Enables the `Collection` to vertically \"overscan\" its content similar to how `Grid` does.\n * This can reduce flicker around the edges when a user scrolls quickly.\n */\n verticalOverscanSize: PropTypes.number.isRequired,\n\n /**\n * Width of Collection; this property determines the number of visible (vs virtualized) columns.\n */\n width: PropTypes.number.isRequired\n} : {};\n\n\npolyfill(CollectionView);\n\nexport default CollectionView;","import _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\n\n/**\n * A section of the Window.\n * Window Sections are used to group nearby cells.\n * This enables us to more quickly determine which cells to display in a given region of the Window.\n * Sections have a fixed size and contain 0 to many cells (tracked by their indices).\n */\nvar Section = function () {\n function Section(_ref) {\n var height = _ref.height,\n width = _ref.width,\n x = _ref.x,\n y = _ref.y;\n\n _classCallCheck(this, Section);\n\n this.height = height;\n this.width = width;\n this.x = x;\n this.y = y;\n\n this._indexMap = {};\n this._indices = [];\n }\n\n /** Add a cell to this section. */\n\n\n _createClass(Section, [{\n key: 'addCellIndex',\n value: function addCellIndex(_ref2) {\n var index = _ref2.index;\n\n if (!this._indexMap[index]) {\n this._indexMap[index] = true;\n this._indices.push(index);\n }\n }\n\n /** Get all cell indices that have been added to this section. */\n\n }, {\n key: 'getCellIndices',\n value: function getCellIndices() {\n return this._indices;\n }\n\n /** Intended for debugger/test purposes only */\n\n }, {\n key: 'toString',\n value: function toString() {\n return this.x + ',' + this.y + ' ' + this.width + 'x' + this.height;\n }\n }]);\n\n return Section;\n}();\n\nexport default Section;\nimport { bpfrpt_proptype_Index } from './types';\nimport { bpfrpt_proptype_SizeAndPositionInfo } from './types';","import _Object$keys from 'babel-runtime/core-js/object/keys';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\n/**\n * Window Sections are used to group nearby cells.\n * This enables us to more quickly determine which cells to display in a given region of the Window.\n * \n */\nimport Section from './Section';\n\n\nvar SECTION_SIZE = 100;\n\n/**\n * Contains 0 to many Sections.\n * Grows (and adds Sections) dynamically as cells are registered.\n * Automatically adds cells to the appropriate Section(s).\n */\nvar SectionManager = function () {\n function SectionManager() {\n var sectionSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : SECTION_SIZE;\n\n _classCallCheck(this, SectionManager);\n\n this._sectionSize = sectionSize;\n\n this._cellMetadata = [];\n this._sections = {};\n }\n\n /**\n * Gets all cell indices contained in the specified region.\n * A region may encompass 1 or more Sections.\n */\n\n\n _createClass(SectionManager, [{\n key: 'getCellIndices',\n value: function getCellIndices(_ref) {\n var height = _ref.height,\n width = _ref.width,\n x = _ref.x,\n y = _ref.y;\n\n var indices = {};\n\n this.getSections({ height: height, width: width, x: x, y: y }).forEach(function (section) {\n return section.getCellIndices().forEach(function (index) {\n indices[index] = index;\n });\n });\n\n // Object keys are strings; this function returns numbers\n return _Object$keys(indices).map(function (index) {\n return indices[index];\n });\n }\n\n /** Get size and position information for the cell specified. */\n\n }, {\n key: 'getCellMetadata',\n value: function getCellMetadata(_ref2) {\n var index = _ref2.index;\n\n return this._cellMetadata[index];\n }\n\n /** Get all Sections overlapping the specified region. */\n\n }, {\n key: 'getSections',\n value: function getSections(_ref3) {\n var height = _ref3.height,\n width = _ref3.width,\n x = _ref3.x,\n y = _ref3.y;\n\n var sectionXStart = Math.floor(x / this._sectionSize);\n var sectionXStop = Math.floor((x + width - 1) / this._sectionSize);\n var sectionYStart = Math.floor(y / this._sectionSize);\n var sectionYStop = Math.floor((y + height - 1) / this._sectionSize);\n\n var sections = [];\n\n for (var sectionX = sectionXStart; sectionX <= sectionXStop; sectionX++) {\n for (var sectionY = sectionYStart; sectionY <= sectionYStop; sectionY++) {\n var key = sectionX + '.' + sectionY;\n\n if (!this._sections[key]) {\n this._sections[key] = new Section({\n height: this._sectionSize,\n width: this._sectionSize,\n x: sectionX * this._sectionSize,\n y: sectionY * this._sectionSize\n });\n }\n\n sections.push(this._sections[key]);\n }\n }\n\n return sections;\n }\n\n /** Total number of Sections based on the currently registered cells. */\n\n }, {\n key: 'getTotalSectionCount',\n value: function getTotalSectionCount() {\n return _Object$keys(this._sections).length;\n }\n\n /** Intended for debugger/test purposes only */\n\n }, {\n key: 'toString',\n value: function toString() {\n var _this = this;\n\n return _Object$keys(this._sections).map(function (index) {\n return _this._sections[index].toString();\n });\n }\n\n /** Adds a cell to the appropriate Sections and registers it metadata for later retrievable. */\n\n }, {\n key: 'registerCell',\n value: function registerCell(_ref4) {\n var cellMetadatum = _ref4.cellMetadatum,\n index = _ref4.index;\n\n this._cellMetadata[index] = cellMetadatum;\n\n this.getSections(cellMetadatum).forEach(function (section) {\n return section.addCellIndex({ index: index });\n });\n }\n }]);\n\n return SectionManager;\n}();\n\nexport default SectionManager;\nimport { bpfrpt_proptype_Index } from './types';\nimport { bpfrpt_proptype_SizeAndPositionInfo } from './types';","/**\n * Determines a new offset that ensures a certain cell is visible, given the current offset.\n * If the cell is already visible then the current offset will be returned.\n * If the current offset is too great or small, it will be adjusted just enough to ensure the specified index is visible.\n *\n * @param align Desired alignment within container; one of \"auto\" (default), \"start\", or \"end\"\n * @param cellOffset Offset (x or y) position for cell\n * @param cellSize Size (width or height) of cell\n * @param containerSize Total size (width or height) of the container\n * @param currentOffset Container's current (x or y) offset\n * @return Offset to use to ensure the specified cell is visible\n */\nexport default function getUpdatedOffsetForIndex(_ref) {\n var _ref$align = _ref.align,\n align = _ref$align === undefined ? 'auto' : _ref$align,\n cellOffset = _ref.cellOffset,\n cellSize = _ref.cellSize,\n containerSize = _ref.containerSize,\n currentOffset = _ref.currentOffset;\n\n var maxOffset = cellOffset;\n var minOffset = maxOffset - containerSize + cellSize;\n\n switch (align) {\n case 'start':\n return maxOffset;\n case 'end':\n return minOffset;\n case 'center':\n return maxOffset - (containerSize - cellSize) / 2;\n default:\n return Math.max(minOffset, Math.min(maxOffset, currentOffset));\n }\n}","import _extends from 'babel-runtime/helpers/extends';\nimport _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';\nimport _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport CollectionView from './CollectionView';\nimport _calculateSizeAndPositionData from './utils/calculateSizeAndPositionData';\nimport getUpdatedOffsetForIndex from '../utils/getUpdatedOffsetForIndex';\n\n/**\n * Renders scattered or non-linear data.\n * Unlike Grid, which renders checkerboard data, Collection can render arbitrarily positioned- even overlapping- data.\n */\nvar Collection = function (_React$PureComponent) {\n _inherits(Collection, _React$PureComponent);\n\n function Collection(props, context) {\n _classCallCheck(this, Collection);\n\n var _this = _possibleConstructorReturn(this, (Collection.__proto__ || _Object$getPrototypeOf(Collection)).call(this, props, context));\n\n _this._cellMetadata = [];\n _this._lastRenderedCellIndices = [];\n\n // Cell cache during scroll (for perforamnce)\n _this._cellCache = [];\n\n _this._isScrollingChange = _this._isScrollingChange.bind(_this);\n _this._setCollectionViewRef = _this._setCollectionViewRef.bind(_this);\n return _this;\n }\n\n _createClass(Collection, [{\n key: 'forceUpdate',\n value: function forceUpdate() {\n if (this._collectionView !== undefined) {\n this._collectionView.forceUpdate();\n }\n }\n\n /** See Collection#recomputeCellSizesAndPositions */\n\n }, {\n key: 'recomputeCellSizesAndPositions',\n value: function recomputeCellSizesAndPositions() {\n this._cellCache = [];\n this._collectionView.recomputeCellSizesAndPositions();\n }\n\n /** React lifecycle methods */\n\n }, {\n key: 'render',\n value: function render() {\n var props = _objectWithoutProperties(this.props, []);\n\n return React.createElement(CollectionView, _extends({\n cellLayoutManager: this,\n isScrollingChange: this._isScrollingChange,\n ref: this._setCollectionViewRef\n }, props));\n }\n\n /** CellLayoutManager interface */\n\n }, {\n key: 'calculateSizeAndPositionData',\n value: function calculateSizeAndPositionData() {\n var _props = this.props,\n cellCount = _props.cellCount,\n cellSizeAndPositionGetter = _props.cellSizeAndPositionGetter,\n sectionSize = _props.sectionSize;\n\n\n var data = _calculateSizeAndPositionData({\n cellCount: cellCount,\n cellSizeAndPositionGetter: cellSizeAndPositionGetter,\n sectionSize: sectionSize\n });\n\n this._cellMetadata = data.cellMetadata;\n this._sectionManager = data.sectionManager;\n this._height = data.height;\n this._width = data.width;\n }\n\n /**\n * Returns the most recently rendered set of cell indices.\n */\n\n }, {\n key: 'getLastRenderedIndices',\n value: function getLastRenderedIndices() {\n return this._lastRenderedCellIndices;\n }\n\n /**\n * Calculates the minimum amount of change from the current scroll position to ensure the specified cell is (fully) visible.\n */\n\n }, {\n key: 'getScrollPositionForCell',\n value: function getScrollPositionForCell(_ref) {\n var align = _ref.align,\n cellIndex = _ref.cellIndex,\n height = _ref.height,\n scrollLeft = _ref.scrollLeft,\n scrollTop = _ref.scrollTop,\n width = _ref.width;\n var cellCount = this.props.cellCount;\n\n\n if (cellIndex >= 0 && cellIndex < cellCount) {\n var cellMetadata = this._cellMetadata[cellIndex];\n\n scrollLeft = getUpdatedOffsetForIndex({\n align: align,\n cellOffset: cellMetadata.x,\n cellSize: cellMetadata.width,\n containerSize: width,\n currentOffset: scrollLeft,\n targetIndex: cellIndex\n });\n\n scrollTop = getUpdatedOffsetForIndex({\n align: align,\n cellOffset: cellMetadata.y,\n cellSize: cellMetadata.height,\n containerSize: height,\n currentOffset: scrollTop,\n targetIndex: cellIndex\n });\n }\n\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n }\n }, {\n key: 'getTotalSize',\n value: function getTotalSize() {\n return {\n height: this._height,\n width: this._width\n };\n }\n }, {\n key: 'cellRenderers',\n value: function cellRenderers(_ref2) {\n var _this2 = this;\n\n var height = _ref2.height,\n isScrolling = _ref2.isScrolling,\n width = _ref2.width,\n x = _ref2.x,\n y = _ref2.y;\n var _props2 = this.props,\n cellGroupRenderer = _props2.cellGroupRenderer,\n cellRenderer = _props2.cellRenderer;\n\n // Store for later calls to getLastRenderedIndices()\n\n this._lastRenderedCellIndices = this._sectionManager.getCellIndices({\n height: height,\n width: width,\n x: x,\n y: y\n });\n\n return cellGroupRenderer({\n cellCache: this._cellCache,\n cellRenderer: cellRenderer,\n cellSizeAndPositionGetter: function cellSizeAndPositionGetter(_ref3) {\n var index = _ref3.index;\n return _this2._sectionManager.getCellMetadata({ index: index });\n },\n indices: this._lastRenderedCellIndices,\n isScrolling: isScrolling\n });\n }\n }, {\n key: '_isScrollingChange',\n value: function _isScrollingChange(isScrolling) {\n if (!isScrolling) {\n this._cellCache = [];\n }\n }\n }, {\n key: '_setCollectionViewRef',\n value: function _setCollectionViewRef(ref) {\n this._collectionView = ref;\n }\n }]);\n\n return Collection;\n}(React.PureComponent);\n\nCollection.defaultProps = {\n 'aria-label': 'grid',\n cellGroupRenderer: defaultCellGroupRenderer\n};\nexport default Collection;\nCollection.propTypes = process.env.NODE_ENV !== \"production\" ? {\n 'aria-label': PropTypes.string,\n\n /**\n * Number of cells in Collection.\n */\n cellCount: PropTypes.number.isRequired,\n\n /**\n * Responsible for rendering a group of cells given their indices.\n * Should implement the following interface: ({\n * cellSizeAndPositionGetter:Function,\n * indices: Array,\n * cellRenderer: Function\n * }): Array\n */\n cellGroupRenderer: PropTypes.func.isRequired,\n\n /**\n * Responsible for rendering a cell given an row and column index.\n * Should implement the following interface: ({ index: number, key: string, style: object }): PropTypes.element\n */\n cellRenderer: PropTypes.func.isRequired,\n\n /**\n * Callback responsible for returning size and offset/position information for a given cell (index).\n * ({ index: number }): { height: number, width: number, x: number, y: number }\n */\n cellSizeAndPositionGetter: PropTypes.func.isRequired,\n\n /**\n * Optionally override the size of the sections a Collection's cells are split into.\n */\n sectionSize: PropTypes.number\n} : {};\n\n\nfunction defaultCellGroupRenderer(_ref4) {\n var cellCache = _ref4.cellCache,\n cellRenderer = _ref4.cellRenderer,\n cellSizeAndPositionGetter = _ref4.cellSizeAndPositionGetter,\n indices = _ref4.indices,\n isScrolling = _ref4.isScrolling;\n\n return indices.map(function (index) {\n var cellMetadata = cellSizeAndPositionGetter({ index: index });\n\n var cellRendererProps = {\n index: index,\n isScrolling: isScrolling,\n key: index,\n style: {\n height: cellMetadata.height,\n left: cellMetadata.x,\n position: 'absolute',\n top: cellMetadata.y,\n width: cellMetadata.width\n }\n };\n\n // Avoid re-creating cells while scrolling.\n // This can lead to the same cell being created many times and can cause performance issues for \"heavy\" cells.\n // If a scroll is in progress- cache and reuse cells.\n // This cache will be thrown away once scrolling complets.\n if (isScrolling) {\n if (!(index in cellCache)) {\n cellCache[index] = cellRenderer(cellRendererProps);\n }\n\n return cellCache[index];\n } else {\n return cellRenderer(cellRendererProps);\n }\n }).filter(function (renderedCell) {\n return !!renderedCell;\n });\n}\nimport { bpfrpt_proptype_ScrollPosition } from './types';\nimport { bpfrpt_proptype_SizeInfo } from './types';","import SectionManager from '../SectionManager';\n\nexport default function calculateSizeAndPositionData(_ref) {\n var cellCount = _ref.cellCount,\n cellSizeAndPositionGetter = _ref.cellSizeAndPositionGetter,\n sectionSize = _ref.sectionSize;\n\n var cellMetadata = [];\n var sectionManager = new SectionManager(sectionSize);\n var height = 0;\n var width = 0;\n\n for (var index = 0; index < cellCount; index++) {\n var cellMetadatum = cellSizeAndPositionGetter({ index: index });\n\n if (cellMetadatum.height == null || isNaN(cellMetadatum.height) || cellMetadatum.width == null || isNaN(cellMetadatum.width) || cellMetadatum.x == null || isNaN(cellMetadatum.x) || cellMetadatum.y == null || isNaN(cellMetadatum.y)) {\n throw Error('Invalid metadata returned for cell ' + index + ':\\n x:' + cellMetadatum.x + ', y:' + cellMetadatum.y + ', width:' + cellMetadatum.width + ', height:' + cellMetadatum.height);\n }\n\n height = Math.max(height, cellMetadatum.y + cellMetadatum.height);\n width = Math.max(width, cellMetadatum.x + cellMetadatum.width);\n\n cellMetadata[index] = cellMetadatum;\n sectionManager.registerCell({\n cellMetadatum: cellMetadatum,\n index: index\n });\n }\n\n return {\n cellMetadata: cellMetadata,\n height: height,\n sectionManager: sectionManager,\n width: width\n };\n}","import Collection from './Collection';\n\nexport default Collection;\nexport { Collection };","import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\n\n/**\n * High-order component that auto-calculates column-widths for `Grid` cells.\n */\n\nvar ColumnSizer = function (_React$PureComponent) {\n _inherits(ColumnSizer, _React$PureComponent);\n\n function ColumnSizer(props, context) {\n _classCallCheck(this, ColumnSizer);\n\n var _this = _possibleConstructorReturn(this, (ColumnSizer.__proto__ || _Object$getPrototypeOf(ColumnSizer)).call(this, props, context));\n\n _this._registerChild = _this._registerChild.bind(_this);\n return _this;\n }\n\n _createClass(ColumnSizer, [{\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n var _props = this.props,\n columnMaxWidth = _props.columnMaxWidth,\n columnMinWidth = _props.columnMinWidth,\n columnCount = _props.columnCount,\n width = _props.width;\n\n\n if (columnMaxWidth !== prevProps.columnMaxWidth || columnMinWidth !== prevProps.columnMinWidth || columnCount !== prevProps.columnCount || width !== prevProps.width) {\n if (this._registeredChild) {\n this._registeredChild.recomputeGridSize();\n }\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props2 = this.props,\n children = _props2.children,\n columnMaxWidth = _props2.columnMaxWidth,\n columnMinWidth = _props2.columnMinWidth,\n columnCount = _props2.columnCount,\n width = _props2.width;\n\n\n var safeColumnMinWidth = columnMinWidth || 1;\n\n var safeColumnMaxWidth = columnMaxWidth ? Math.min(columnMaxWidth, width) : width;\n\n var columnWidth = width / columnCount;\n columnWidth = Math.max(safeColumnMinWidth, columnWidth);\n columnWidth = Math.min(safeColumnMaxWidth, columnWidth);\n columnWidth = Math.floor(columnWidth);\n\n var adjustedWidth = Math.min(width, columnWidth * columnCount);\n\n return children({\n adjustedWidth: adjustedWidth,\n columnWidth: columnWidth,\n getColumnWidth: function getColumnWidth() {\n return columnWidth;\n },\n registerChild: this._registerChild\n });\n }\n }, {\n key: '_registerChild',\n value: function _registerChild(child) {\n if (child && typeof child.recomputeGridSize !== 'function') {\n throw Error('Unexpected child type registered; only Grid/MultiGrid children are supported.');\n }\n\n this._registeredChild = child;\n\n if (this._registeredChild) {\n this._registeredChild.recomputeGridSize();\n }\n }\n }]);\n\n return ColumnSizer;\n}(React.PureComponent);\n\nexport default ColumnSizer;\nColumnSizer.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * Function responsible for rendering a virtualized Grid.\n * This function should implement the following signature:\n * ({ adjustedWidth, getColumnWidth, registerChild }) => PropTypes.element\n *\n * The specified :getColumnWidth function should be passed to the Grid's :columnWidth property.\n * The :registerChild should be passed to the Grid's :ref property.\n * The :adjustedWidth property is optional; it reflects the lesser of the overall width or the width of all columns.\n */\n children: PropTypes.func.isRequired,\n\n /** Optional maximum allowed column width */\n columnMaxWidth: PropTypes.number,\n\n /** Optional minimum allowed column width */\n columnMinWidth: PropTypes.number,\n\n /** Number of columns in Grid or Table child */\n columnCount: PropTypes.number.isRequired,\n\n /** Width of Grid or Table child */\n width: PropTypes.number.isRequired\n} : {};","import ColumnSizer from './ColumnSizer';\n\nexport default ColumnSizer;\nexport { ColumnSizer };","import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport createCallbackMemoizer from '../utils/createCallbackMemoizer';\n\n/**\n * Higher-order component that manages lazy-loading for \"infinite\" data.\n * This component decorates a virtual component and just-in-time prefetches rows as a user scrolls.\n * It is intended as a convenience component; fork it if you'd like finer-grained control over data-loading.\n */\n\nvar InfiniteLoader = function (_React$PureComponent) {\n _inherits(InfiniteLoader, _React$PureComponent);\n\n function InfiniteLoader(props, context) {\n _classCallCheck(this, InfiniteLoader);\n\n var _this = _possibleConstructorReturn(this, (InfiniteLoader.__proto__ || _Object$getPrototypeOf(InfiniteLoader)).call(this, props, context));\n\n _this._loadMoreRowsMemoizer = createCallbackMemoizer();\n\n _this._onRowsRendered = _this._onRowsRendered.bind(_this);\n _this._registerChild = _this._registerChild.bind(_this);\n return _this;\n }\n\n _createClass(InfiniteLoader, [{\n key: 'resetLoadMoreRowsCache',\n value: function resetLoadMoreRowsCache(autoReload) {\n this._loadMoreRowsMemoizer = createCallbackMemoizer();\n\n if (autoReload) {\n this._doStuff(this._lastRenderedStartIndex, this._lastRenderedStopIndex);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var children = this.props.children;\n\n\n return children({\n onRowsRendered: this._onRowsRendered,\n registerChild: this._registerChild\n });\n }\n }, {\n key: '_loadUnloadedRanges',\n value: function _loadUnloadedRanges(unloadedRanges) {\n var _this2 = this;\n\n var loadMoreRows = this.props.loadMoreRows;\n\n\n unloadedRanges.forEach(function (unloadedRange) {\n var promise = loadMoreRows(unloadedRange);\n if (promise) {\n promise.then(function () {\n // Refresh the visible rows if any of them have just been loaded.\n // Otherwise they will remain in their unloaded visual state.\n if (isRangeVisible({\n lastRenderedStartIndex: _this2._lastRenderedStartIndex,\n lastRenderedStopIndex: _this2._lastRenderedStopIndex,\n startIndex: unloadedRange.startIndex,\n stopIndex: unloadedRange.stopIndex\n })) {\n if (_this2._registeredChild) {\n forceUpdateReactVirtualizedComponent(_this2._registeredChild, _this2._lastRenderedStartIndex);\n }\n }\n });\n }\n });\n }\n }, {\n key: '_onRowsRendered',\n value: function _onRowsRendered(_ref) {\n var startIndex = _ref.startIndex,\n stopIndex = _ref.stopIndex;\n\n this._lastRenderedStartIndex = startIndex;\n this._lastRenderedStopIndex = stopIndex;\n\n this._doStuff(startIndex, stopIndex);\n }\n }, {\n key: '_doStuff',\n value: function _doStuff(startIndex, stopIndex) {\n var _this3 = this;\n\n var _props = this.props,\n isRowLoaded = _props.isRowLoaded,\n minimumBatchSize = _props.minimumBatchSize,\n rowCount = _props.rowCount,\n threshold = _props.threshold;\n\n\n var unloadedRanges = scanForUnloadedRanges({\n isRowLoaded: isRowLoaded,\n minimumBatchSize: minimumBatchSize,\n rowCount: rowCount,\n startIndex: Math.max(0, startIndex - threshold),\n stopIndex: Math.min(rowCount - 1, stopIndex + threshold)\n });\n\n // For memoize comparison\n var squashedUnloadedRanges = unloadedRanges.reduce(function (reduced, unloadedRange) {\n return reduced.concat([unloadedRange.startIndex, unloadedRange.stopIndex]);\n }, []);\n\n this._loadMoreRowsMemoizer({\n callback: function callback() {\n _this3._loadUnloadedRanges(unloadedRanges);\n },\n indices: { squashedUnloadedRanges: squashedUnloadedRanges }\n });\n }\n }, {\n key: '_registerChild',\n value: function _registerChild(registeredChild) {\n this._registeredChild = registeredChild;\n }\n }]);\n\n return InfiniteLoader;\n}(React.PureComponent);\n\n/**\n * Determines if the specified start/stop range is visible based on the most recently rendered range.\n */\n\n\nInfiniteLoader.defaultProps = {\n minimumBatchSize: 10,\n rowCount: 0,\n threshold: 15\n};\nexport default InfiniteLoader;\nInfiniteLoader.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * Function responsible for rendering a virtualized component.\n * This function should implement the following signature:\n * ({ onRowsRendered, registerChild }) => PropTypes.element\n *\n * The specified :onRowsRendered function should be passed through to the child's :onRowsRendered property.\n * The :registerChild callback should be set as the virtualized component's :ref.\n */\n children: PropTypes.func.isRequired,\n\n /**\n * Function responsible for tracking the loaded state of each row.\n * It should implement the following signature: ({ index: number }): boolean\n */\n isRowLoaded: PropTypes.func.isRequired,\n\n /**\n * Callback to be invoked when more rows must be loaded.\n * It should implement the following signature: ({ startIndex, stopIndex }): Promise\n * The returned Promise should be resolved once row data has finished loading.\n * It will be used to determine when to refresh the list with the newly-loaded data.\n * This callback may be called multiple times in reaction to a single scroll event.\n */\n loadMoreRows: PropTypes.func.isRequired,\n\n /**\n * Minimum number of rows to be loaded at a time.\n * This property can be used to batch requests to reduce HTTP requests.\n */\n minimumBatchSize: PropTypes.number.isRequired,\n\n /**\n * Number of rows in list; can be arbitrary high number if actual number is unknown.\n */\n rowCount: PropTypes.number.isRequired,\n\n /**\n * Threshold at which to pre-fetch data.\n * A threshold X means that data will start loading when a user scrolls within X rows.\n * This value defaults to 15.\n */\n threshold: PropTypes.number.isRequired\n} : {};\nexport function isRangeVisible(_ref2) {\n var lastRenderedStartIndex = _ref2.lastRenderedStartIndex,\n lastRenderedStopIndex = _ref2.lastRenderedStopIndex,\n startIndex = _ref2.startIndex,\n stopIndex = _ref2.stopIndex;\n\n return !(startIndex > lastRenderedStopIndex || stopIndex < lastRenderedStartIndex);\n}\n\n/**\n * Returns all of the ranges within a larger range that contain unloaded rows.\n */\nexport function scanForUnloadedRanges(_ref3) {\n var isRowLoaded = _ref3.isRowLoaded,\n minimumBatchSize = _ref3.minimumBatchSize,\n rowCount = _ref3.rowCount,\n startIndex = _ref3.startIndex,\n stopIndex = _ref3.stopIndex;\n\n var unloadedRanges = [];\n\n var rangeStartIndex = null;\n var rangeStopIndex = null;\n\n for (var index = startIndex; index <= stopIndex; index++) {\n var loaded = isRowLoaded({ index: index });\n\n if (!loaded) {\n rangeStopIndex = index;\n if (rangeStartIndex === null) {\n rangeStartIndex = index;\n }\n } else if (rangeStopIndex !== null) {\n unloadedRanges.push({\n startIndex: rangeStartIndex,\n stopIndex: rangeStopIndex\n });\n\n rangeStartIndex = rangeStopIndex = null;\n }\n }\n\n // If :rangeStopIndex is not null it means we haven't ran out of unloaded rows.\n // Scan forward to try filling our :minimumBatchSize.\n if (rangeStopIndex !== null) {\n var potentialStopIndex = Math.min(Math.max(rangeStopIndex, rangeStartIndex + minimumBatchSize - 1), rowCount - 1);\n\n for (var _index = rangeStopIndex + 1; _index <= potentialStopIndex; _index++) {\n if (!isRowLoaded({ index: _index })) {\n rangeStopIndex = _index;\n } else {\n break;\n }\n }\n\n unloadedRanges.push({\n startIndex: rangeStartIndex,\n stopIndex: rangeStopIndex\n });\n }\n\n // Check to see if our first range ended prematurely.\n // In this case we should scan backwards to try filling our :minimumBatchSize.\n if (unloadedRanges.length) {\n var firstUnloadedRange = unloadedRanges[0];\n\n while (firstUnloadedRange.stopIndex - firstUnloadedRange.startIndex + 1 < minimumBatchSize && firstUnloadedRange.startIndex > 0) {\n var _index2 = firstUnloadedRange.startIndex - 1;\n\n if (!isRowLoaded({ index: _index2 })) {\n firstUnloadedRange.startIndex = _index2;\n } else {\n break;\n }\n }\n }\n\n return unloadedRanges;\n}\n\n/**\n * Since RV components use shallowCompare we need to force a render (even though props haven't changed).\n * However InfiniteLoader may wrap a Grid or it may wrap a Table or List.\n * In the first case the built-in React forceUpdate() method is sufficient to force a re-render,\n * But in the latter cases we need to use the RV-specific forceUpdateGrid() method.\n * Else the inner Grid will not be re-rendered and visuals may be stale.\n *\n * Additionally, while a Grid is scrolling the cells can be cached,\n * So it's important to invalidate that cache by recalculating sizes\n * before forcing a rerender.\n */\nexport function forceUpdateReactVirtualizedComponent(component) {\n var currentIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n var recomputeSize = typeof component.recomputeGridSize === 'function' ? component.recomputeGridSize : component.recomputeRowHeights;\n\n if (recomputeSize) {\n recomputeSize.call(component, currentIndex);\n } else {\n component.forceUpdate();\n }\n}","import InfiniteLoader from './InfiniteLoader';\n\nexport default InfiniteLoader;\nexport { InfiniteLoader };","import _extends from 'babel-runtime/helpers/extends';\nimport _Object$getOwnPropertyDescriptor from 'babel-runtime/core-js/object/get-own-property-descriptor';\nimport _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport Grid, { accessibilityOverscanIndicesGetter } from '../Grid';\nimport * as React from 'react';\nimport cn from 'classnames';\n\n/**\n * It is inefficient to create and manage a large list of DOM elements within a scrolling container\n * if only a few of those elements are visible. The primary purpose of this component is to improve\n * performance by only rendering the DOM nodes that a user is able to see based on their current\n * scroll position.\n *\n * This component renders a virtualized list of elements with either fixed or dynamic heights.\n */\n\nvar List = function (_React$PureComponent) {\n _inherits(List, _React$PureComponent);\n\n function List() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, List);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = List.__proto__ || _Object$getPrototypeOf(List)).call.apply(_ref, [this].concat(args))), _this), _this._cellRenderer = function (_ref2) {\n var parent = _ref2.parent,\n rowIndex = _ref2.rowIndex,\n style = _ref2.style,\n isScrolling = _ref2.isScrolling,\n isVisible = _ref2.isVisible,\n key = _ref2.key;\n var rowRenderer = _this.props.rowRenderer;\n\n // TRICKY The style object is sometimes cached by Grid.\n // This prevents new style objects from bypassing shallowCompare().\n // However as of React 16, style props are auto-frozen (at least in dev mode)\n // Check to make sure we can still modify the style before proceeding.\n // https://github.com/facebook/react/commit/977357765b44af8ff0cfea327866861073095c12#commitcomment-20648713\n\n var _Object$getOwnPropert = _Object$getOwnPropertyDescriptor(style, 'width'),\n writable = _Object$getOwnPropert.writable;\n\n if (writable) {\n // By default, List cells should be 100% width.\n // This prevents them from flowing under a scrollbar (if present).\n style.width = '100%';\n }\n\n return rowRenderer({\n index: rowIndex,\n style: style,\n isScrolling: isScrolling,\n isVisible: isVisible,\n key: key,\n parent: parent\n });\n }, _this._setRef = function (ref) {\n _this.Grid = ref;\n }, _this._onScroll = function (_ref3) {\n var clientHeight = _ref3.clientHeight,\n scrollHeight = _ref3.scrollHeight,\n scrollTop = _ref3.scrollTop;\n var onScroll = _this.props.onScroll;\n\n\n onScroll({ clientHeight: clientHeight, scrollHeight: scrollHeight, scrollTop: scrollTop });\n }, _this._onSectionRendered = function (_ref4) {\n var rowOverscanStartIndex = _ref4.rowOverscanStartIndex,\n rowOverscanStopIndex = _ref4.rowOverscanStopIndex,\n rowStartIndex = _ref4.rowStartIndex,\n rowStopIndex = _ref4.rowStopIndex;\n var onRowsRendered = _this.props.onRowsRendered;\n\n\n onRowsRendered({\n overscanStartIndex: rowOverscanStartIndex,\n overscanStopIndex: rowOverscanStopIndex,\n startIndex: rowStartIndex,\n stopIndex: rowStopIndex\n });\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(List, [{\n key: 'forceUpdateGrid',\n value: function forceUpdateGrid() {\n if (this.Grid) {\n this.Grid.forceUpdate();\n }\n }\n\n /** See Grid#getOffsetForCell */\n\n }, {\n key: 'getOffsetForRow',\n value: function getOffsetForRow(_ref5) {\n var alignment = _ref5.alignment,\n index = _ref5.index;\n\n if (this.Grid) {\n var _Grid$getOffsetForCel = this.Grid.getOffsetForCell({\n alignment: alignment,\n rowIndex: index,\n columnIndex: 0\n }),\n _scrollTop = _Grid$getOffsetForCel.scrollTop;\n\n return _scrollTop;\n }\n return 0;\n }\n\n /** CellMeasurer compatibility */\n\n }, {\n key: 'invalidateCellSizeAfterRender',\n value: function invalidateCellSizeAfterRender(_ref6) {\n var columnIndex = _ref6.columnIndex,\n rowIndex = _ref6.rowIndex;\n\n if (this.Grid) {\n this.Grid.invalidateCellSizeAfterRender({\n rowIndex: rowIndex,\n columnIndex: columnIndex\n });\n }\n }\n\n /** See Grid#measureAllCells */\n\n }, {\n key: 'measureAllRows',\n value: function measureAllRows() {\n if (this.Grid) {\n this.Grid.measureAllCells();\n }\n }\n\n /** CellMeasurer compatibility */\n\n }, {\n key: 'recomputeGridSize',\n value: function recomputeGridSize() {\n var _ref7 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref7$columnIndex = _ref7.columnIndex,\n columnIndex = _ref7$columnIndex === undefined ? 0 : _ref7$columnIndex,\n _ref7$rowIndex = _ref7.rowIndex,\n rowIndex = _ref7$rowIndex === undefined ? 0 : _ref7$rowIndex;\n\n if (this.Grid) {\n this.Grid.recomputeGridSize({\n rowIndex: rowIndex,\n columnIndex: columnIndex\n });\n }\n }\n\n /** See Grid#recomputeGridSize */\n\n }, {\n key: 'recomputeRowHeights',\n value: function recomputeRowHeights() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n if (this.Grid) {\n this.Grid.recomputeGridSize({\n rowIndex: index,\n columnIndex: 0\n });\n }\n }\n\n /** See Grid#scrollToPosition */\n\n }, {\n key: 'scrollToPosition',\n value: function scrollToPosition() {\n var scrollTop = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n if (this.Grid) {\n this.Grid.scrollToPosition({ scrollTop: scrollTop });\n }\n }\n\n /** See Grid#scrollToCell */\n\n }, {\n key: 'scrollToRow',\n value: function scrollToRow() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n if (this.Grid) {\n this.Grid.scrollToCell({\n columnIndex: 0,\n rowIndex: index\n });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n className = _props.className,\n noRowsRenderer = _props.noRowsRenderer,\n scrollToIndex = _props.scrollToIndex,\n width = _props.width;\n\n\n var classNames = cn('ReactVirtualized__List', className);\n\n return React.createElement(Grid, _extends({}, this.props, {\n autoContainerWidth: true,\n cellRenderer: this._cellRenderer,\n className: classNames,\n columnWidth: width,\n columnCount: 1,\n noContentRenderer: noRowsRenderer,\n onScroll: this._onScroll,\n onSectionRendered: this._onSectionRendered,\n ref: this._setRef,\n scrollToRow: scrollToIndex\n }));\n }\n }]);\n\n return List;\n}(React.PureComponent);\n\nList.defaultProps = {\n autoHeight: false,\n estimatedRowSize: 30,\n onScroll: function onScroll() {},\n noRowsRenderer: function noRowsRenderer() {\n return null;\n },\n onRowsRendered: function onRowsRendered() {},\n overscanIndicesGetter: accessibilityOverscanIndicesGetter,\n overscanRowCount: 10,\n scrollToAlignment: 'auto',\n scrollToIndex: -1,\n style: {}\n};\nList.propTypes = process.env.NODE_ENV === 'production' ? null : {\n \"aria-label\": PropTypes.string,\n\n\n /**\n * Removes fixed height from the scrollingContainer so that the total height\n * of rows can stretch the window. Intended for use with WindowScroller\n */\n autoHeight: PropTypes.bool.isRequired,\n\n\n /** Optional CSS class name */\n className: PropTypes.string,\n\n\n /**\n * Used to estimate the total height of a List before all of its rows have actually been measured.\n * The estimated total height is adjusted as rows are rendered.\n */\n estimatedRowSize: PropTypes.number.isRequired,\n\n\n /** Height constraint for list (determines how many actual rows are rendered) */\n height: PropTypes.number.isRequired,\n\n\n /** Optional renderer to be used in place of rows when rowCount is 0 */\n noRowsRenderer: function noRowsRenderer() {\n return (typeof bpfrpt_proptype_NoContentRenderer === 'function' ? bpfrpt_proptype_NoContentRenderer.isRequired ? bpfrpt_proptype_NoContentRenderer.isRequired : bpfrpt_proptype_NoContentRenderer : PropTypes.shape(bpfrpt_proptype_NoContentRenderer).isRequired).apply(this, arguments);\n },\n\n\n /** Callback invoked with information about the slice of rows that were just rendered. */\n\n onRowsRendered: PropTypes.func.isRequired,\n\n\n /**\n * Callback invoked whenever the scroll offset changes within the inner scrollable region.\n * This callback can be used to sync scrolling between lists, tables, or grids.\n */\n onScroll: PropTypes.func.isRequired,\n\n\n /** See Grid#overscanIndicesGetter */\n overscanIndicesGetter: function overscanIndicesGetter() {\n return (typeof bpfrpt_proptype_OverscanIndicesGetter === 'function' ? bpfrpt_proptype_OverscanIndicesGetter.isRequired ? bpfrpt_proptype_OverscanIndicesGetter.isRequired : bpfrpt_proptype_OverscanIndicesGetter : PropTypes.shape(bpfrpt_proptype_OverscanIndicesGetter).isRequired).apply(this, arguments);\n },\n\n\n /**\n * Number of rows to render above/below the visible bounds of the list.\n * These rows can help for smoother scrolling on touch devices.\n */\n overscanRowCount: PropTypes.number.isRequired,\n\n\n /** Either a fixed row height (number) or a function that returns the height of a row given its index. */\n rowHeight: function rowHeight() {\n return (typeof bpfrpt_proptype_CellSize === 'function' ? bpfrpt_proptype_CellSize.isRequired ? bpfrpt_proptype_CellSize.isRequired : bpfrpt_proptype_CellSize : PropTypes.shape(bpfrpt_proptype_CellSize).isRequired).apply(this, arguments);\n },\n\n\n /** Responsible for rendering a row given an index; ({ index: number }): node */\n rowRenderer: function rowRenderer() {\n return (typeof bpfrpt_proptype_RowRenderer === 'function' ? bpfrpt_proptype_RowRenderer.isRequired ? bpfrpt_proptype_RowRenderer.isRequired : bpfrpt_proptype_RowRenderer : PropTypes.shape(bpfrpt_proptype_RowRenderer).isRequired).apply(this, arguments);\n },\n\n\n /** Number of rows in list. */\n rowCount: PropTypes.number.isRequired,\n\n\n /** See Grid#scrollToAlignment */\n scrollToAlignment: function scrollToAlignment() {\n return (typeof bpfrpt_proptype_Alignment === 'function' ? bpfrpt_proptype_Alignment.isRequired ? bpfrpt_proptype_Alignment.isRequired : bpfrpt_proptype_Alignment : PropTypes.shape(bpfrpt_proptype_Alignment).isRequired).apply(this, arguments);\n },\n\n\n /** Row index to ensure visible (by forcefully scrolling if necessary) */\n scrollToIndex: PropTypes.number.isRequired,\n\n\n /** Vertical offset. */\n scrollTop: PropTypes.number,\n\n\n /** Optional inline style */\n style: PropTypes.object.isRequired,\n\n\n /** Tab index for focus */\n tabIndex: PropTypes.number,\n\n\n /** Width of list */\n width: PropTypes.number.isRequired\n};\nexport default List;\nimport { bpfrpt_proptype_NoContentRenderer } from '../Grid';\nimport { bpfrpt_proptype_Alignment } from '../Grid';\nimport { bpfrpt_proptype_CellSize } from '../Grid';\nimport { bpfrpt_proptype_CellPosition } from '../Grid';\nimport { bpfrpt_proptype_OverscanIndicesGetter } from '../Grid';\nimport { bpfrpt_proptype_RenderedSection } from '../Grid';\nimport { bpfrpt_proptype_CellRendererParams } from '../Grid';\nimport { bpfrpt_proptype_Scroll as bpfrpt_proptype_GridScroll } from '../Grid';\nimport { bpfrpt_proptype_RowRenderer } from './types';\nimport { bpfrpt_proptype_RenderedRows } from './types';\nimport { bpfrpt_proptype_Scroll } from './types';\nimport PropTypes from 'prop-types';","/**\n * Binary Search Bounds\n * https://github.com/mikolalysenko/binary-search-bounds\n * Mikola Lysenko\n *\n * Inlined because of Content Security Policy issue caused by the use of `new Function(...)` syntax.\n * Issue reported here: https://github.com/mikolalysenko/binary-search-bounds/issues/5\n **/\n\nfunction _GEA(a, l, h, y) {\n var i = h + 1;\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n if (x >= y) {\n i = m;\n h = m - 1;\n } else {\n l = m + 1;\n }\n }\n return i;\n}\nfunction _GEP(a, l, h, y, c) {\n var i = h + 1;\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n if (c(x, y) >= 0) {\n i = m;\n h = m - 1;\n } else {\n l = m + 1;\n }\n }\n return i;\n}\nfunction dispatchBsearchGE(a, y, c, l, h) {\n if (typeof c === 'function') {\n return _GEP(a, l === void 0 ? 0 : l | 0, h === void 0 ? a.length - 1 : h | 0, y, c);\n } else {\n return _GEA(a, c === void 0 ? 0 : c | 0, l === void 0 ? a.length - 1 : l | 0, y);\n }\n}\n\nfunction _GTA(a, l, h, y) {\n var i = h + 1;\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n if (x > y) {\n i = m;\n h = m - 1;\n } else {\n l = m + 1;\n }\n }\n return i;\n}\nfunction _GTP(a, l, h, y, c) {\n var i = h + 1;\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n if (c(x, y) > 0) {\n i = m;\n h = m - 1;\n } else {\n l = m + 1;\n }\n }\n return i;\n}\nfunction dispatchBsearchGT(a, y, c, l, h) {\n if (typeof c === 'function') {\n return _GTP(a, l === void 0 ? 0 : l | 0, h === void 0 ? a.length - 1 : h | 0, y, c);\n } else {\n return _GTA(a, c === void 0 ? 0 : c | 0, l === void 0 ? a.length - 1 : l | 0, y);\n }\n}\n\nfunction _LTA(a, l, h, y) {\n var i = l - 1;\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n if (x < y) {\n i = m;\n l = m + 1;\n } else {\n h = m - 1;\n }\n }\n return i;\n}\nfunction _LTP(a, l, h, y, c) {\n var i = l - 1;\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n if (c(x, y) < 0) {\n i = m;\n l = m + 1;\n } else {\n h = m - 1;\n }\n }\n return i;\n}\nfunction dispatchBsearchLT(a, y, c, l, h) {\n if (typeof c === 'function') {\n return _LTP(a, l === void 0 ? 0 : l | 0, h === void 0 ? a.length - 1 : h | 0, y, c);\n } else {\n return _LTA(a, c === void 0 ? 0 : c | 0, l === void 0 ? a.length - 1 : l | 0, y);\n }\n}\n\nfunction _LEA(a, l, h, y) {\n var i = l - 1;\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n if (x <= y) {\n i = m;\n l = m + 1;\n } else {\n h = m - 1;\n }\n }\n return i;\n}\nfunction _LEP(a, l, h, y, c) {\n var i = l - 1;\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n if (c(x, y) <= 0) {\n i = m;\n l = m + 1;\n } else {\n h = m - 1;\n }\n }\n return i;\n}\nfunction dispatchBsearchLE(a, y, c, l, h) {\n if (typeof c === 'function') {\n return _LEP(a, l === void 0 ? 0 : l | 0, h === void 0 ? a.length - 1 : h | 0, y, c);\n } else {\n return _LEA(a, c === void 0 ? 0 : c | 0, l === void 0 ? a.length - 1 : l | 0, y);\n }\n}\n\nfunction _EQA(a, l, h, y) {\n l - 1;\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n if (x === y) {\n return m;\n } else if (x <= y) {\n l = m + 1;\n } else {\n h = m - 1;\n }\n }\n return -1;\n}\nfunction _EQP(a, l, h, y, c) {\n l - 1;\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n var p = c(x, y);\n if (p === 0) {\n return m;\n } else if (p <= 0) {\n l = m + 1;\n } else {\n h = m - 1;\n }\n }\n return -1;\n}\nfunction dispatchBsearchEQ(a, y, c, l, h) {\n if (typeof c === 'function') {\n return _EQP(a, l === void 0 ? 0 : l | 0, h === void 0 ? a.length - 1 : h | 0, y, c);\n } else {\n return _EQA(a, c === void 0 ? 0 : c | 0, l === void 0 ? a.length - 1 : l | 0, y);\n }\n}\n\nexport default {\n ge: dispatchBsearchGE,\n gt: dispatchBsearchGT,\n lt: dispatchBsearchLT,\n le: dispatchBsearchLE,\n eq: dispatchBsearchEQ\n};","/**\n * Binary Search Bounds\n * https://github.com/mikolalysenko/interval-tree-1d\n * Mikola Lysenko\n *\n * Inlined because of Content Security Policy issue caused by the use of `new Function(...)` syntax in an upstream dependency.\n * Issue reported here: https://github.com/mikolalysenko/binary-search-bounds/issues/5\n **/\n\nimport bounds from './binarySearchBounds';\n\nvar NOT_FOUND = 0;\nvar SUCCESS = 1;\nvar EMPTY = 2;\n\nfunction IntervalTreeNode(mid, left, right, leftPoints, rightPoints) {\n this.mid = mid;\n this.left = left;\n this.right = right;\n this.leftPoints = leftPoints;\n this.rightPoints = rightPoints;\n this.count = (left ? left.count : 0) + (right ? right.count : 0) + leftPoints.length;\n}\n\nvar proto = IntervalTreeNode.prototype;\n\nfunction copy(a, b) {\n a.mid = b.mid;\n a.left = b.left;\n a.right = b.right;\n a.leftPoints = b.leftPoints;\n a.rightPoints = b.rightPoints;\n a.count = b.count;\n}\n\nfunction rebuild(node, intervals) {\n var ntree = createIntervalTree(intervals);\n node.mid = ntree.mid;\n node.left = ntree.left;\n node.right = ntree.right;\n node.leftPoints = ntree.leftPoints;\n node.rightPoints = ntree.rightPoints;\n node.count = ntree.count;\n}\n\nfunction rebuildWithInterval(node, interval) {\n var intervals = node.intervals([]);\n intervals.push(interval);\n rebuild(node, intervals);\n}\n\nfunction rebuildWithoutInterval(node, interval) {\n var intervals = node.intervals([]);\n var idx = intervals.indexOf(interval);\n if (idx < 0) {\n return NOT_FOUND;\n }\n intervals.splice(idx, 1);\n rebuild(node, intervals);\n return SUCCESS;\n}\n\nproto.intervals = function (result) {\n result.push.apply(result, this.leftPoints);\n if (this.left) {\n this.left.intervals(result);\n }\n if (this.right) {\n this.right.intervals(result);\n }\n return result;\n};\n\nproto.insert = function (interval) {\n var weight = this.count - this.leftPoints.length;\n this.count += 1;\n if (interval[1] < this.mid) {\n if (this.left) {\n if (4 * (this.left.count + 1) > 3 * (weight + 1)) {\n rebuildWithInterval(this, interval);\n } else {\n this.left.insert(interval);\n }\n } else {\n this.left = createIntervalTree([interval]);\n }\n } else if (interval[0] > this.mid) {\n if (this.right) {\n if (4 * (this.right.count + 1) > 3 * (weight + 1)) {\n rebuildWithInterval(this, interval);\n } else {\n this.right.insert(interval);\n }\n } else {\n this.right = createIntervalTree([interval]);\n }\n } else {\n var l = bounds.ge(this.leftPoints, interval, compareBegin);\n var r = bounds.ge(this.rightPoints, interval, compareEnd);\n this.leftPoints.splice(l, 0, interval);\n this.rightPoints.splice(r, 0, interval);\n }\n};\n\nproto.remove = function (interval) {\n var weight = this.count - this.leftPoints;\n if (interval[1] < this.mid) {\n if (!this.left) {\n return NOT_FOUND;\n }\n var rw = this.right ? this.right.count : 0;\n if (4 * rw > 3 * (weight - 1)) {\n return rebuildWithoutInterval(this, interval);\n }\n var r = this.left.remove(interval);\n if (r === EMPTY) {\n this.left = null;\n this.count -= 1;\n return SUCCESS;\n } else if (r === SUCCESS) {\n this.count -= 1;\n }\n return r;\n } else if (interval[0] > this.mid) {\n if (!this.right) {\n return NOT_FOUND;\n }\n var lw = this.left ? this.left.count : 0;\n if (4 * lw > 3 * (weight - 1)) {\n return rebuildWithoutInterval(this, interval);\n }\n var r = this.right.remove(interval);\n if (r === EMPTY) {\n this.right = null;\n this.count -= 1;\n return SUCCESS;\n } else if (r === SUCCESS) {\n this.count -= 1;\n }\n return r;\n } else {\n if (this.count === 1) {\n if (this.leftPoints[0] === interval) {\n return EMPTY;\n } else {\n return NOT_FOUND;\n }\n }\n if (this.leftPoints.length === 1 && this.leftPoints[0] === interval) {\n if (this.left && this.right) {\n var p = this;\n var n = this.left;\n while (n.right) {\n p = n;\n n = n.right;\n }\n if (p === this) {\n n.right = this.right;\n } else {\n var l = this.left;\n var r = this.right;\n p.count -= n.count;\n p.right = n.left;\n n.left = l;\n n.right = r;\n }\n copy(this, n);\n this.count = (this.left ? this.left.count : 0) + (this.right ? this.right.count : 0) + this.leftPoints.length;\n } else if (this.left) {\n copy(this, this.left);\n } else {\n copy(this, this.right);\n }\n return SUCCESS;\n }\n for (var l = bounds.ge(this.leftPoints, interval, compareBegin); l < this.leftPoints.length; ++l) {\n if (this.leftPoints[l][0] !== interval[0]) {\n break;\n }\n if (this.leftPoints[l] === interval) {\n this.count -= 1;\n this.leftPoints.splice(l, 1);\n for (var r = bounds.ge(this.rightPoints, interval, compareEnd); r < this.rightPoints.length; ++r) {\n if (this.rightPoints[r][1] !== interval[1]) {\n break;\n } else if (this.rightPoints[r] === interval) {\n this.rightPoints.splice(r, 1);\n return SUCCESS;\n }\n }\n }\n }\n return NOT_FOUND;\n }\n};\n\nfunction reportLeftRange(arr, hi, cb) {\n for (var i = 0; i < arr.length && arr[i][0] <= hi; ++i) {\n var r = cb(arr[i]);\n if (r) {\n return r;\n }\n }\n}\n\nfunction reportRightRange(arr, lo, cb) {\n for (var i = arr.length - 1; i >= 0 && arr[i][1] >= lo; --i) {\n var r = cb(arr[i]);\n if (r) {\n return r;\n }\n }\n}\n\nfunction reportRange(arr, cb) {\n for (var i = 0; i < arr.length; ++i) {\n var r = cb(arr[i]);\n if (r) {\n return r;\n }\n }\n}\n\nproto.queryPoint = function (x, cb) {\n if (x < this.mid) {\n if (this.left) {\n var r = this.left.queryPoint(x, cb);\n if (r) {\n return r;\n }\n }\n return reportLeftRange(this.leftPoints, x, cb);\n } else if (x > this.mid) {\n if (this.right) {\n var r = this.right.queryPoint(x, cb);\n if (r) {\n return r;\n }\n }\n return reportRightRange(this.rightPoints, x, cb);\n } else {\n return reportRange(this.leftPoints, cb);\n }\n};\n\nproto.queryInterval = function (lo, hi, cb) {\n if (lo < this.mid && this.left) {\n var r = this.left.queryInterval(lo, hi, cb);\n if (r) {\n return r;\n }\n }\n if (hi > this.mid && this.right) {\n var r = this.right.queryInterval(lo, hi, cb);\n if (r) {\n return r;\n }\n }\n if (hi < this.mid) {\n return reportLeftRange(this.leftPoints, hi, cb);\n } else if (lo > this.mid) {\n return reportRightRange(this.rightPoints, lo, cb);\n } else {\n return reportRange(this.leftPoints, cb);\n }\n};\n\nfunction compareNumbers(a, b) {\n return a - b;\n}\n\nfunction compareBegin(a, b) {\n var d = a[0] - b[0];\n if (d) {\n return d;\n }\n return a[1] - b[1];\n}\n\nfunction compareEnd(a, b) {\n var d = a[1] - b[1];\n if (d) {\n return d;\n }\n return a[0] - b[0];\n}\n\nfunction createIntervalTree(intervals) {\n if (intervals.length === 0) {\n return null;\n }\n var pts = [];\n for (var i = 0; i < intervals.length; ++i) {\n pts.push(intervals[i][0], intervals[i][1]);\n }\n pts.sort(compareNumbers);\n\n var mid = pts[pts.length >> 1];\n\n var leftIntervals = [];\n var rightIntervals = [];\n var centerIntervals = [];\n for (var i = 0; i < intervals.length; ++i) {\n var s = intervals[i];\n if (s[1] < mid) {\n leftIntervals.push(s);\n } else if (mid < s[0]) {\n rightIntervals.push(s);\n } else {\n centerIntervals.push(s);\n }\n }\n\n //Split center intervals\n var leftPoints = centerIntervals;\n var rightPoints = centerIntervals.slice();\n leftPoints.sort(compareBegin);\n rightPoints.sort(compareEnd);\n\n return new IntervalTreeNode(mid, createIntervalTree(leftIntervals), createIntervalTree(rightIntervals), leftPoints, rightPoints);\n}\n\n//User friendly wrapper that makes it possible to support empty trees\nfunction IntervalTree(root) {\n this.root = root;\n}\n\nvar tproto = IntervalTree.prototype;\n\ntproto.insert = function (interval) {\n if (this.root) {\n this.root.insert(interval);\n } else {\n this.root = new IntervalTreeNode(interval[0], null, null, [interval], [interval]);\n }\n};\n\ntproto.remove = function (interval) {\n if (this.root) {\n var r = this.root.remove(interval);\n if (r === EMPTY) {\n this.root = null;\n }\n return r !== NOT_FOUND;\n }\n return false;\n};\n\ntproto.queryPoint = function (p, cb) {\n if (this.root) {\n return this.root.queryPoint(p, cb);\n }\n};\n\ntproto.queryInterval = function (lo, hi, cb) {\n if (lo <= hi && this.root) {\n return this.root.queryInterval(lo, hi, cb);\n }\n};\n\nObject.defineProperty(tproto, 'count', {\n get: function get() {\n if (this.root) {\n return this.root.count;\n }\n return 0;\n }\n});\n\nObject.defineProperty(tproto, 'intervals', {\n get: function get() {\n if (this.root) {\n return this.root.intervals([]);\n }\n return [];\n }\n});\n\nexport default function createWrapper(intervals) {\n if (!intervals || intervals.length === 0) {\n return new IntervalTree(null);\n }\n return new IntervalTree(createIntervalTree(intervals));\n}","import _slicedToArray from 'babel-runtime/helpers/slicedToArray';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport createIntervalTree from '../vendor/intervalTree';\n\n// Position cache requirements:\n// O(log(n)) lookup of cells to render for a given viewport size\n// O(1) lookup of shortest measured column (so we know when to enter phase 1)\nvar PositionCache = function () {\n function PositionCache() {\n _classCallCheck(this, PositionCache);\n\n this._columnSizeMap = {};\n this._intervalTree = createIntervalTree();\n this._leftMap = {};\n }\n // Tracks the height of each column\n\n\n // Store tops and bottoms of each cell for fast intersection lookup.\n\n\n // Maps cell index to x coordinates for quick lookup.\n\n\n _createClass(PositionCache, [{\n key: 'estimateTotalHeight',\n value: function estimateTotalHeight(cellCount, columnCount, defaultCellHeight) {\n var unmeasuredCellCount = cellCount - this.count;\n return this.tallestColumnSize + Math.ceil(unmeasuredCellCount / columnCount) * defaultCellHeight;\n }\n\n // Render all cells visible within the viewport range defined.\n\n }, {\n key: 'range',\n value: function range(scrollTop, clientHeight, renderCallback) {\n var _this = this;\n\n this._intervalTree.queryInterval(scrollTop, scrollTop + clientHeight, function (_ref) {\n var _ref2 = _slicedToArray(_ref, 3),\n top = _ref2[0],\n _ = _ref2[1],\n index = _ref2[2];\n\n return renderCallback(index, _this._leftMap[index], top);\n });\n }\n }, {\n key: 'setPosition',\n value: function setPosition(index, left, top, height) {\n this._intervalTree.insert([top, top + height, index]);\n this._leftMap[index] = left;\n\n var columnSizeMap = this._columnSizeMap;\n var columnHeight = columnSizeMap[left];\n if (columnHeight === undefined) {\n columnSizeMap[left] = top + height;\n } else {\n columnSizeMap[left] = Math.max(columnHeight, top + height);\n }\n }\n }, {\n key: 'count',\n get: function get() {\n return this._intervalTree.count;\n }\n }, {\n key: 'shortestColumnSize',\n get: function get() {\n var columnSizeMap = this._columnSizeMap;\n\n var size = 0;\n\n for (var i in columnSizeMap) {\n var height = columnSizeMap[i];\n size = size === 0 ? height : Math.min(size, height);\n }\n\n return size;\n }\n }, {\n key: 'tallestColumnSize',\n get: function get() {\n var columnSizeMap = this._columnSizeMap;\n\n var size = 0;\n\n for (var i in columnSizeMap) {\n var height = columnSizeMap[i];\n size = Math.max(size, height);\n }\n\n return size;\n }\n }]);\n\n return PositionCache;\n}();\n\nexport default PositionCache;","import _extends from 'babel-runtime/helpers/extends';\nimport _defineProperty from 'babel-runtime/helpers/defineProperty';\nimport _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport cn from 'classnames';\nimport * as React from 'react';\nimport { polyfill } from 'react-lifecycles-compat';\nimport PositionCache from './PositionCache';\nimport { requestAnimationTimeout, cancelAnimationTimeout } from '../utils/requestAnimationTimeout';\n\nvar emptyObject = {};\n\n/**\n * Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress.\n * This improves performance and makes scrolling smoother.\n */\nexport var DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150;\n\n/**\n * This component efficiently displays arbitrarily positioned cells using windowing techniques.\n * Cell position is determined by an injected `cellPositioner` property.\n * Windowing is vertical; this component does not support horizontal scrolling.\n *\n * Rendering occurs in two phases:\n * 1) First pass uses estimated cell sizes (provided by the cache) to determine how many cells to measure in a batch.\n * Batch size is chosen using a fast, naive layout algorithm that stacks images in order until the viewport has been filled.\n * After measurement is complete (componentDidMount or componentDidUpdate) this component evaluates positioned cells\n * in order to determine if another measurement pass is required (eg if actual cell sizes were less than estimated sizes).\n * All measurements are permanently cached (keyed by `keyMapper`) for performance purposes.\n * 2) Second pass uses the external `cellPositioner` to layout cells.\n * At this time the positioner has access to cached size measurements for all cells.\n * The positions it returns are cached by Masonry for fast access later.\n * Phase one is repeated if the user scrolls beyond the current layout's bounds.\n * If the layout is invalidated due to eg a resize, cached positions can be cleared using `recomputeCellPositions()`.\n *\n * Animation constraints:\n * Simple animations are supported (eg translate/slide into place on initial reveal).\n * More complex animations are not (eg flying from one position to another on resize).\n *\n * Layout constraints:\n * This component supports multi-column layout.\n * The height of each item may vary.\n * The width of each item must not exceed the width of the column it is \"in\".\n * The left position of all items within a column must align.\n * (Items may not span multiple columns.)\n */\n\nvar Masonry = function (_React$PureComponent) {\n _inherits(Masonry, _React$PureComponent);\n\n function Masonry() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Masonry);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Masonry.__proto__ || _Object$getPrototypeOf(Masonry)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n isScrolling: false,\n scrollTop: 0\n }, _this._invalidateOnUpdateStartIndex = null, _this._invalidateOnUpdateStopIndex = null, _this._positionCache = new PositionCache(), _this._startIndex = null, _this._startIndexMemoized = null, _this._stopIndex = null, _this._stopIndexMemoized = null, _this._debounceResetIsScrollingCallback = function () {\n _this.setState({\n isScrolling: false\n });\n }, _this._setScrollingContainerRef = function (ref) {\n _this._scrollingContainer = ref;\n }, _this._onScroll = function (event) {\n var height = _this.props.height;\n\n\n var eventScrollTop = event.target.scrollTop;\n\n // When this component is shrunk drastically, React dispatches a series of back-to-back scroll events,\n // Gradually converging on a scrollTop that is within the bounds of the new, smaller height.\n // This causes a series of rapid renders that is slow for long lists.\n // We can avoid that by doing some simple bounds checking to ensure that scroll offsets never exceed their bounds.\n var scrollTop = Math.min(Math.max(0, _this._getEstimatedTotalHeight() - height), eventScrollTop);\n\n // On iOS, we can arrive at negative offsets by swiping past the start or end.\n // Avoid re-rendering in this case as it can cause problems; see #532 for more.\n if (eventScrollTop !== scrollTop) {\n return;\n }\n\n // Prevent pointer events from interrupting a smooth scroll\n _this._debounceResetIsScrolling();\n\n // Certain devices (like Apple touchpad) rapid-fire duplicate events.\n // Don't force a re-render if this is the case.\n // The mouse may move faster then the animation frame does.\n // Use requestAnimationFrame to avoid over-updating.\n if (_this.state.scrollTop !== scrollTop) {\n _this.setState({\n isScrolling: true,\n scrollTop: scrollTop\n });\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Masonry, [{\n key: 'clearCellPositions',\n value: function clearCellPositions() {\n this._positionCache = new PositionCache();\n this.forceUpdate();\n }\n\n // HACK This method signature was intended for Grid\n\n }, {\n key: 'invalidateCellSizeAfterRender',\n value: function invalidateCellSizeAfterRender(_ref2) {\n var index = _ref2.rowIndex;\n\n if (this._invalidateOnUpdateStartIndex === null) {\n this._invalidateOnUpdateStartIndex = index;\n this._invalidateOnUpdateStopIndex = index;\n } else {\n this._invalidateOnUpdateStartIndex = Math.min(this._invalidateOnUpdateStartIndex, index);\n this._invalidateOnUpdateStopIndex = Math.max(this._invalidateOnUpdateStopIndex, index);\n }\n }\n }, {\n key: 'recomputeCellPositions',\n value: function recomputeCellPositions() {\n var stopIndex = this._positionCache.count - 1;\n\n this._positionCache = new PositionCache();\n this._populatePositionCache(0, stopIndex);\n\n this.forceUpdate();\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n this._checkInvalidateOnUpdate();\n this._invokeOnScrollCallback();\n this._invokeOnCellsRenderedCallback();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps, prevState) {\n this._checkInvalidateOnUpdate();\n this._invokeOnScrollCallback();\n this._invokeOnCellsRenderedCallback();\n\n if (this.props.scrollTop !== prevProps.scrollTop) {\n this._debounceResetIsScrolling();\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this._debounceResetIsScrollingId) {\n cancelAnimationTimeout(this._debounceResetIsScrollingId);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var _props = this.props,\n autoHeight = _props.autoHeight,\n cellCount = _props.cellCount,\n cellMeasurerCache = _props.cellMeasurerCache,\n cellRenderer = _props.cellRenderer,\n className = _props.className,\n height = _props.height,\n id = _props.id,\n keyMapper = _props.keyMapper,\n overscanByPixels = _props.overscanByPixels,\n role = _props.role,\n style = _props.style,\n tabIndex = _props.tabIndex,\n width = _props.width,\n rowDirection = _props.rowDirection;\n var _state = this.state,\n isScrolling = _state.isScrolling,\n scrollTop = _state.scrollTop;\n\n\n var children = [];\n\n var estimateTotalHeight = this._getEstimatedTotalHeight();\n\n var shortestColumnSize = this._positionCache.shortestColumnSize;\n var measuredCellCount = this._positionCache.count;\n\n var startIndex = 0;\n var stopIndex = void 0;\n\n this._positionCache.range(Math.max(0, scrollTop - overscanByPixels), height + overscanByPixels * 2, function (index, left, top) {\n var _style;\n\n if (typeof stopIndex === 'undefined') {\n startIndex = index;\n stopIndex = index;\n } else {\n startIndex = Math.min(startIndex, index);\n stopIndex = Math.max(stopIndex, index);\n }\n\n children.push(cellRenderer({\n index: index,\n isScrolling: isScrolling,\n key: keyMapper(index),\n parent: _this2,\n style: (_style = {\n height: cellMeasurerCache.getHeight(index)\n }, _defineProperty(_style, rowDirection === 'ltr' ? 'left' : 'right', left), _defineProperty(_style, 'position', 'absolute'), _defineProperty(_style, 'top', top), _defineProperty(_style, 'width', cellMeasurerCache.getWidth(index)), _style)\n }));\n });\n\n // We need to measure additional cells for this layout\n if (shortestColumnSize < scrollTop + height + overscanByPixels && measuredCellCount < cellCount) {\n var batchSize = Math.min(cellCount - measuredCellCount, Math.ceil((scrollTop + height + overscanByPixels - shortestColumnSize) / cellMeasurerCache.defaultHeight * width / cellMeasurerCache.defaultWidth));\n\n for (var _index = measuredCellCount; _index < measuredCellCount + batchSize; _index++) {\n stopIndex = _index;\n\n children.push(cellRenderer({\n index: _index,\n isScrolling: isScrolling,\n key: keyMapper(_index),\n parent: this,\n style: {\n width: cellMeasurerCache.getWidth(_index)\n }\n }));\n }\n }\n\n this._startIndex = startIndex;\n this._stopIndex = stopIndex;\n\n return React.createElement(\n 'div',\n {\n ref: this._setScrollingContainerRef,\n 'aria-label': this.props['aria-label'],\n className: cn('ReactVirtualized__Masonry', className),\n id: id,\n onScroll: this._onScroll,\n role: role,\n style: _extends({\n boxSizing: 'border-box',\n direction: 'ltr',\n height: autoHeight ? 'auto' : height,\n overflowX: 'hidden',\n overflowY: estimateTotalHeight < height ? 'hidden' : 'auto',\n position: 'relative',\n width: width,\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform'\n }, style),\n tabIndex: tabIndex },\n React.createElement(\n 'div',\n {\n className: 'ReactVirtualized__Masonry__innerScrollContainer',\n style: {\n width: '100%',\n height: estimateTotalHeight,\n maxWidth: '100%',\n maxHeight: estimateTotalHeight,\n overflow: 'hidden',\n pointerEvents: isScrolling ? 'none' : '',\n position: 'relative'\n } },\n children\n )\n );\n }\n }, {\n key: '_checkInvalidateOnUpdate',\n value: function _checkInvalidateOnUpdate() {\n if (typeof this._invalidateOnUpdateStartIndex === 'number') {\n var _startIndex = this._invalidateOnUpdateStartIndex;\n var _stopIndex = this._invalidateOnUpdateStopIndex;\n\n this._invalidateOnUpdateStartIndex = null;\n this._invalidateOnUpdateStopIndex = null;\n\n // Query external layout logic for position of newly-measured cells\n this._populatePositionCache(_startIndex, _stopIndex);\n\n this.forceUpdate();\n }\n }\n }, {\n key: '_debounceResetIsScrolling',\n value: function _debounceResetIsScrolling() {\n var scrollingResetTimeInterval = this.props.scrollingResetTimeInterval;\n\n\n if (this._debounceResetIsScrollingId) {\n cancelAnimationTimeout(this._debounceResetIsScrollingId);\n }\n\n this._debounceResetIsScrollingId = requestAnimationTimeout(this._debounceResetIsScrollingCallback, scrollingResetTimeInterval);\n }\n }, {\n key: '_getEstimatedTotalHeight',\n value: function _getEstimatedTotalHeight() {\n var _props2 = this.props,\n cellCount = _props2.cellCount,\n cellMeasurerCache = _props2.cellMeasurerCache,\n width = _props2.width;\n\n\n var estimatedColumnCount = Math.max(1, Math.floor(width / cellMeasurerCache.defaultWidth));\n\n return this._positionCache.estimateTotalHeight(cellCount, estimatedColumnCount, cellMeasurerCache.defaultHeight);\n }\n }, {\n key: '_invokeOnScrollCallback',\n value: function _invokeOnScrollCallback() {\n var _props3 = this.props,\n height = _props3.height,\n onScroll = _props3.onScroll;\n var scrollTop = this.state.scrollTop;\n\n\n if (this._onScrollMemoized !== scrollTop) {\n onScroll({\n clientHeight: height,\n scrollHeight: this._getEstimatedTotalHeight(),\n scrollTop: scrollTop\n });\n\n this._onScrollMemoized = scrollTop;\n }\n }\n }, {\n key: '_invokeOnCellsRenderedCallback',\n value: function _invokeOnCellsRenderedCallback() {\n if (this._startIndexMemoized !== this._startIndex || this._stopIndexMemoized !== this._stopIndex) {\n var _onCellsRendered = this.props.onCellsRendered;\n\n\n _onCellsRendered({\n startIndex: this._startIndex,\n stopIndex: this._stopIndex\n });\n\n this._startIndexMemoized = this._startIndex;\n this._stopIndexMemoized = this._stopIndex;\n }\n }\n }, {\n key: '_populatePositionCache',\n value: function _populatePositionCache(startIndex, stopIndex) {\n var _props4 = this.props,\n cellMeasurerCache = _props4.cellMeasurerCache,\n cellPositioner = _props4.cellPositioner;\n\n\n for (var _index2 = startIndex; _index2 <= stopIndex; _index2++) {\n var _cellPositioner = cellPositioner(_index2),\n _left = _cellPositioner.left,\n _top = _cellPositioner.top;\n\n this._positionCache.setPosition(_index2, _left, _top, cellMeasurerCache.getHeight(_index2));\n }\n }\n }], [{\n key: 'getDerivedStateFromProps',\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.scrollTop !== undefined && prevState.scrollTop !== nextProps.scrollTop) {\n return {\n isScrolling: true,\n scrollTop: nextProps.scrollTop\n };\n }\n\n return null;\n }\n }]);\n\n return Masonry;\n}(React.PureComponent);\n\nMasonry.defaultProps = {\n autoHeight: false,\n keyMapper: identity,\n onCellsRendered: noop,\n onScroll: noop,\n overscanByPixels: 20,\n role: 'grid',\n scrollingResetTimeInterval: DEFAULT_SCROLLING_RESET_TIME_INTERVAL,\n style: emptyObject,\n tabIndex: 0,\n rowDirection: 'ltr'\n};\nMasonry.propTypes = process.env.NODE_ENV === 'production' ? null : {\n autoHeight: PropTypes.bool.isRequired,\n cellCount: PropTypes.number.isRequired,\n cellMeasurerCache: function cellMeasurerCache() {\n return (typeof CellMeasurerCache === 'function' ? PropTypes.instanceOf(CellMeasurerCache).isRequired : PropTypes.any.isRequired).apply(this, arguments);\n },\n cellPositioner: function cellPositioner() {\n return (typeof Positioner === 'function' ? PropTypes.instanceOf(Positioner).isRequired : PropTypes.any.isRequired).apply(this, arguments);\n },\n cellRenderer: function cellRenderer() {\n return (typeof CellRenderer === 'function' ? PropTypes.instanceOf(CellRenderer).isRequired : PropTypes.any.isRequired).apply(this, arguments);\n },\n className: PropTypes.string,\n height: PropTypes.number.isRequired,\n id: PropTypes.string,\n keyMapper: function keyMapper() {\n return (typeof KeyMapper === 'function' ? PropTypes.instanceOf(KeyMapper).isRequired : PropTypes.any.isRequired).apply(this, arguments);\n },\n onCellsRendered: function onCellsRendered() {\n return (typeof OnCellsRenderedCallback === 'function' ? PropTypes.instanceOf(OnCellsRenderedCallback) : PropTypes.any).apply(this, arguments);\n },\n onScroll: function onScroll() {\n return (typeof OnScrollCallback === 'function' ? PropTypes.instanceOf(OnScrollCallback) : PropTypes.any).apply(this, arguments);\n },\n overscanByPixels: PropTypes.number.isRequired,\n role: PropTypes.string.isRequired,\n scrollingResetTimeInterval: PropTypes.number.isRequired,\n style: function style(props, propName, componentName) {\n if (!Object.prototype.hasOwnProperty.call(props, propName)) {\n throw new Error('Prop `' + propName + '` has type \\'any\\' or \\'mixed\\', but was not provided to `' + componentName + '`. Pass undefined or any other value.');\n }\n },\n tabIndex: PropTypes.number.isRequired,\n width: PropTypes.number.isRequired,\n rowDirection: PropTypes.string.isRequired\n};\n\n\nfunction identity(value) {\n return value;\n}\n\nfunction noop() {}\n\nvar bpfrpt_proptype_CellMeasurerCache = process.env.NODE_ENV === 'production' ? null : {\n defaultHeight: PropTypes.number.isRequired,\n defaultWidth: PropTypes.number.isRequired,\n getHeight: PropTypes.func.isRequired,\n getWidth: PropTypes.func.isRequired\n};\n\n\npolyfill(Masonry);\n\nexport default Masonry;\n\nvar bpfrpt_proptype_Positioner = process.env.NODE_ENV === 'production' ? null : PropTypes.func;\nimport { bpfrpt_proptype_AnimationTimeoutId } from '../utils/requestAnimationTimeout';\nimport PropTypes from 'prop-types';\nexport { bpfrpt_proptype_CellMeasurerCache };\nexport { bpfrpt_proptype_Positioner };","\n\nexport default function createCellPositioner(_ref) {\n var cellMeasurerCache = _ref.cellMeasurerCache,\n columnCount = _ref.columnCount,\n columnWidth = _ref.columnWidth,\n _ref$spacer = _ref.spacer,\n spacer = _ref$spacer === undefined ? 0 : _ref$spacer;\n\n var columnHeights = void 0;\n\n initOrResetDerivedValues();\n\n function cellPositioner(index) {\n // Find the shortest column and use it.\n var columnIndex = 0;\n for (var i = 1; i < columnHeights.length; i++) {\n if (columnHeights[i] < columnHeights[columnIndex]) {\n columnIndex = i;\n }\n }\n\n var left = columnIndex * (columnWidth + spacer);\n var top = columnHeights[columnIndex] || 0;\n\n columnHeights[columnIndex] = top + cellMeasurerCache.getHeight(index) + spacer;\n\n return {\n left: left,\n top: top\n };\n }\n\n function initOrResetDerivedValues() {\n // Track the height of each column.\n // Layout algorithm below always inserts into the shortest column.\n columnHeights = [];\n for (var i = 0; i < columnCount; i++) {\n columnHeights[i] = 0;\n }\n }\n\n function reset(params) {\n columnCount = params.columnCount;\n columnWidth = params.columnWidth;\n spacer = params.spacer;\n\n initOrResetDerivedValues();\n }\n\n cellPositioner.reset = reset;\n\n return cellPositioner;\n}\nimport { bpfrpt_proptype_CellMeasurerCache } from './Masonry';\nimport { bpfrpt_proptype_Positioner } from './Masonry';","import createCellPositioner from './createCellPositioner';\nimport Masonry from './Masonry';\n\nexport default Masonry;\nexport { createCellPositioner, Masonry };","import _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport { CellMeasurerCache } from '../CellMeasurer';\n\n/**\n * Caches measurements for a given cell.\n */\nvar CellMeasurerCacheDecorator = function () {\n function CellMeasurerCacheDecorator() {\n var _this = this;\n\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, CellMeasurerCacheDecorator);\n\n this.columnWidth = function (_ref) {\n var index = _ref.index;\n\n _this._cellMeasurerCache.columnWidth({\n index: index + _this._columnIndexOffset\n });\n };\n\n this.rowHeight = function (_ref2) {\n var index = _ref2.index;\n\n _this._cellMeasurerCache.rowHeight({\n index: index + _this._rowIndexOffset\n });\n };\n\n var cellMeasurerCache = params.cellMeasurerCache,\n _params$columnIndexOf = params.columnIndexOffset,\n columnIndexOffset = _params$columnIndexOf === undefined ? 0 : _params$columnIndexOf,\n _params$rowIndexOffse = params.rowIndexOffset,\n rowIndexOffset = _params$rowIndexOffse === undefined ? 0 : _params$rowIndexOffse;\n\n\n this._cellMeasurerCache = cellMeasurerCache;\n this._columnIndexOffset = columnIndexOffset;\n this._rowIndexOffset = rowIndexOffset;\n }\n\n _createClass(CellMeasurerCacheDecorator, [{\n key: 'clear',\n value: function clear(rowIndex, columnIndex) {\n this._cellMeasurerCache.clear(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset);\n }\n }, {\n key: 'clearAll',\n value: function clearAll() {\n this._cellMeasurerCache.clearAll();\n }\n }, {\n key: 'hasFixedHeight',\n value: function hasFixedHeight() {\n return this._cellMeasurerCache.hasFixedHeight();\n }\n }, {\n key: 'hasFixedWidth',\n value: function hasFixedWidth() {\n return this._cellMeasurerCache.hasFixedWidth();\n }\n }, {\n key: 'getHeight',\n value: function getHeight(rowIndex) {\n var columnIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n return this._cellMeasurerCache.getHeight(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset);\n }\n }, {\n key: 'getWidth',\n value: function getWidth(rowIndex) {\n var columnIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n return this._cellMeasurerCache.getWidth(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset);\n }\n }, {\n key: 'has',\n value: function has(rowIndex) {\n var columnIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n return this._cellMeasurerCache.has(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset);\n }\n }, {\n key: 'set',\n value: function set(rowIndex, columnIndex, width, height) {\n this._cellMeasurerCache.set(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset, width, height);\n }\n }, {\n key: 'defaultHeight',\n get: function get() {\n return this._cellMeasurerCache.defaultHeight;\n }\n }, {\n key: 'defaultWidth',\n get: function get() {\n return this._cellMeasurerCache.defaultWidth;\n }\n }]);\n\n return CellMeasurerCacheDecorator;\n}();\n\nexport default CellMeasurerCacheDecorator;","import _extends from 'babel-runtime/helpers/extends';\nimport _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';\nimport _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { polyfill } from 'react-lifecycles-compat';\nimport CellMeasurerCacheDecorator from './CellMeasurerCacheDecorator';\nimport Grid from '../Grid';\n\nvar SCROLLBAR_SIZE_BUFFER = 20;\n\n/**\n * Renders 1, 2, or 4 Grids depending on configuration.\n * A main (body) Grid will always be rendered.\n * Optionally, 1-2 Grids for sticky header rows will also be rendered.\n * If no sticky columns, only 1 sticky header Grid will be rendered.\n * If sticky columns, 2 sticky header Grids will be rendered.\n */\n\nvar MultiGrid = function (_React$PureComponent) {\n _inherits(MultiGrid, _React$PureComponent);\n\n function MultiGrid(props, context) {\n _classCallCheck(this, MultiGrid);\n\n var _this = _possibleConstructorReturn(this, (MultiGrid.__proto__ || _Object$getPrototypeOf(MultiGrid)).call(this, props, context));\n\n _initialiseProps.call(_this);\n\n var deferredMeasurementCache = props.deferredMeasurementCache,\n fixedColumnCount = props.fixedColumnCount,\n fixedRowCount = props.fixedRowCount;\n\n\n _this._maybeCalculateCachedStyles(true);\n\n if (deferredMeasurementCache) {\n _this._deferredMeasurementCacheBottomLeftGrid = fixedRowCount > 0 ? new CellMeasurerCacheDecorator({\n cellMeasurerCache: deferredMeasurementCache,\n columnIndexOffset: 0,\n rowIndexOffset: fixedRowCount\n }) : deferredMeasurementCache;\n\n _this._deferredMeasurementCacheBottomRightGrid = fixedColumnCount > 0 || fixedRowCount > 0 ? new CellMeasurerCacheDecorator({\n cellMeasurerCache: deferredMeasurementCache,\n columnIndexOffset: fixedColumnCount,\n rowIndexOffset: fixedRowCount\n }) : deferredMeasurementCache;\n\n _this._deferredMeasurementCacheTopRightGrid = fixedColumnCount > 0 ? new CellMeasurerCacheDecorator({\n cellMeasurerCache: deferredMeasurementCache,\n columnIndexOffset: fixedColumnCount,\n rowIndexOffset: 0\n }) : deferredMeasurementCache;\n }\n return _this;\n }\n\n _createClass(MultiGrid, [{\n key: 'forceUpdateGrids',\n value: function forceUpdateGrids() {\n this._bottomLeftGrid && this._bottomLeftGrid.forceUpdate();\n this._bottomRightGrid && this._bottomRightGrid.forceUpdate();\n this._topLeftGrid && this._topLeftGrid.forceUpdate();\n this._topRightGrid && this._topRightGrid.forceUpdate();\n }\n\n /** See Grid#invalidateCellSizeAfterRender */\n\n }, {\n key: 'invalidateCellSizeAfterRender',\n value: function invalidateCellSizeAfterRender() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$columnIndex = _ref.columnIndex,\n columnIndex = _ref$columnIndex === undefined ? 0 : _ref$columnIndex,\n _ref$rowIndex = _ref.rowIndex,\n rowIndex = _ref$rowIndex === undefined ? 0 : _ref$rowIndex;\n\n this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex === 'number' ? Math.min(this._deferredInvalidateColumnIndex, columnIndex) : columnIndex;\n this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex === 'number' ? Math.min(this._deferredInvalidateRowIndex, rowIndex) : rowIndex;\n }\n\n /** See Grid#measureAllCells */\n\n }, {\n key: 'measureAllCells',\n value: function measureAllCells() {\n this._bottomLeftGrid && this._bottomLeftGrid.measureAllCells();\n this._bottomRightGrid && this._bottomRightGrid.measureAllCells();\n this._topLeftGrid && this._topLeftGrid.measureAllCells();\n this._topRightGrid && this._topRightGrid.measureAllCells();\n }\n\n /** See Grid#recomputeGridSize */\n\n }, {\n key: 'recomputeGridSize',\n value: function recomputeGridSize() {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref2$columnIndex = _ref2.columnIndex,\n columnIndex = _ref2$columnIndex === undefined ? 0 : _ref2$columnIndex,\n _ref2$rowIndex = _ref2.rowIndex,\n rowIndex = _ref2$rowIndex === undefined ? 0 : _ref2$rowIndex;\n\n var _props = this.props,\n fixedColumnCount = _props.fixedColumnCount,\n fixedRowCount = _props.fixedRowCount;\n\n\n var adjustedColumnIndex = Math.max(0, columnIndex - fixedColumnCount);\n var adjustedRowIndex = Math.max(0, rowIndex - fixedRowCount);\n\n this._bottomLeftGrid && this._bottomLeftGrid.recomputeGridSize({\n columnIndex: columnIndex,\n rowIndex: adjustedRowIndex\n });\n this._bottomRightGrid && this._bottomRightGrid.recomputeGridSize({\n columnIndex: adjustedColumnIndex,\n rowIndex: adjustedRowIndex\n });\n this._topLeftGrid && this._topLeftGrid.recomputeGridSize({\n columnIndex: columnIndex,\n rowIndex: rowIndex\n });\n this._topRightGrid && this._topRightGrid.recomputeGridSize({\n columnIndex: adjustedColumnIndex,\n rowIndex: rowIndex\n });\n\n this._leftGridWidth = null;\n this._topGridHeight = null;\n this._maybeCalculateCachedStyles(true);\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _props2 = this.props,\n scrollLeft = _props2.scrollLeft,\n scrollTop = _props2.scrollTop;\n\n\n if (scrollLeft > 0 || scrollTop > 0) {\n var newState = {};\n\n if (scrollLeft > 0) {\n newState.scrollLeft = scrollLeft;\n }\n\n if (scrollTop > 0) {\n newState.scrollTop = scrollTop;\n }\n\n this.setState(newState);\n }\n this._handleInvalidatedGridSize();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n this._handleInvalidatedGridSize();\n }\n }, {\n key: 'render',\n value: function render() {\n var _props3 = this.props,\n onScroll = _props3.onScroll,\n onSectionRendered = _props3.onSectionRendered,\n onScrollbarPresenceChange = _props3.onScrollbarPresenceChange,\n scrollLeftProp = _props3.scrollLeft,\n scrollToColumn = _props3.scrollToColumn,\n scrollTopProp = _props3.scrollTop,\n scrollToRow = _props3.scrollToRow,\n rest = _objectWithoutProperties(_props3, ['onScroll', 'onSectionRendered', 'onScrollbarPresenceChange', 'scrollLeft', 'scrollToColumn', 'scrollTop', 'scrollToRow']);\n\n this._prepareForRender();\n\n // Don't render any of our Grids if there are no cells.\n // This mirrors what Grid does,\n // And prevents us from recording inaccurage measurements when used with CellMeasurer.\n if (this.props.width === 0 || this.props.height === 0) {\n return null;\n }\n\n // scrollTop and scrollLeft props are explicitly filtered out and ignored\n\n var _state = this.state,\n scrollLeft = _state.scrollLeft,\n scrollTop = _state.scrollTop;\n\n\n return React.createElement(\n 'div',\n { style: this._containerOuterStyle },\n React.createElement(\n 'div',\n { style: this._containerTopStyle },\n this._renderTopLeftGrid(rest),\n this._renderTopRightGrid(_extends({}, rest, {\n onScroll: onScroll,\n scrollLeft: scrollLeft\n }))\n ),\n React.createElement(\n 'div',\n { style: this._containerBottomStyle },\n this._renderBottomLeftGrid(_extends({}, rest, {\n onScroll: onScroll,\n scrollTop: scrollTop\n })),\n this._renderBottomRightGrid(_extends({}, rest, {\n onScroll: onScroll,\n onSectionRendered: onSectionRendered,\n scrollLeft: scrollLeft,\n scrollToColumn: scrollToColumn,\n scrollToRow: scrollToRow,\n scrollTop: scrollTop\n }))\n )\n );\n }\n }, {\n key: '_getBottomGridHeight',\n value: function _getBottomGridHeight(props) {\n var height = props.height;\n\n\n var topGridHeight = this._getTopGridHeight(props);\n\n return height - topGridHeight;\n }\n }, {\n key: '_getLeftGridWidth',\n value: function _getLeftGridWidth(props) {\n var fixedColumnCount = props.fixedColumnCount,\n columnWidth = props.columnWidth;\n\n\n if (this._leftGridWidth == null) {\n if (typeof columnWidth === 'function') {\n var leftGridWidth = 0;\n\n for (var index = 0; index < fixedColumnCount; index++) {\n leftGridWidth += columnWidth({ index: index });\n }\n\n this._leftGridWidth = leftGridWidth;\n } else {\n this._leftGridWidth = columnWidth * fixedColumnCount;\n }\n }\n\n return this._leftGridWidth;\n }\n }, {\n key: '_getRightGridWidth',\n value: function _getRightGridWidth(props) {\n var width = props.width;\n\n\n var leftGridWidth = this._getLeftGridWidth(props);\n\n return width - leftGridWidth;\n }\n }, {\n key: '_getTopGridHeight',\n value: function _getTopGridHeight(props) {\n var fixedRowCount = props.fixedRowCount,\n rowHeight = props.rowHeight;\n\n\n if (this._topGridHeight == null) {\n if (typeof rowHeight === 'function') {\n var topGridHeight = 0;\n\n for (var index = 0; index < fixedRowCount; index++) {\n topGridHeight += rowHeight({ index: index });\n }\n\n this._topGridHeight = topGridHeight;\n } else {\n this._topGridHeight = rowHeight * fixedRowCount;\n }\n }\n\n return this._topGridHeight;\n }\n }, {\n key: '_handleInvalidatedGridSize',\n value: function _handleInvalidatedGridSize() {\n if (typeof this._deferredInvalidateColumnIndex === 'number') {\n var columnIndex = this._deferredInvalidateColumnIndex;\n var rowIndex = this._deferredInvalidateRowIndex;\n\n this._deferredInvalidateColumnIndex = null;\n this._deferredInvalidateRowIndex = null;\n\n this.recomputeGridSize({\n columnIndex: columnIndex,\n rowIndex: rowIndex\n });\n this.forceUpdate();\n }\n }\n\n /**\n * Avoid recreating inline styles each render; this bypasses Grid's shallowCompare.\n * This method recalculates styles only when specific props change.\n */\n\n }, {\n key: '_maybeCalculateCachedStyles',\n value: function _maybeCalculateCachedStyles(resetAll) {\n var _props4 = this.props,\n columnWidth = _props4.columnWidth,\n enableFixedColumnScroll = _props4.enableFixedColumnScroll,\n enableFixedRowScroll = _props4.enableFixedRowScroll,\n height = _props4.height,\n fixedColumnCount = _props4.fixedColumnCount,\n fixedRowCount = _props4.fixedRowCount,\n rowHeight = _props4.rowHeight,\n style = _props4.style,\n styleBottomLeftGrid = _props4.styleBottomLeftGrid,\n styleBottomRightGrid = _props4.styleBottomRightGrid,\n styleTopLeftGrid = _props4.styleTopLeftGrid,\n styleTopRightGrid = _props4.styleTopRightGrid,\n width = _props4.width;\n\n\n var sizeChange = resetAll || height !== this._lastRenderedHeight || width !== this._lastRenderedWidth;\n var leftSizeChange = resetAll || columnWidth !== this._lastRenderedColumnWidth || fixedColumnCount !== this._lastRenderedFixedColumnCount;\n var topSizeChange = resetAll || fixedRowCount !== this._lastRenderedFixedRowCount || rowHeight !== this._lastRenderedRowHeight;\n\n if (resetAll || sizeChange || style !== this._lastRenderedStyle) {\n this._containerOuterStyle = _extends({\n height: height,\n overflow: 'visible', // Let :focus outline show through\n width: width\n }, style);\n }\n\n if (resetAll || sizeChange || topSizeChange) {\n this._containerTopStyle = {\n height: this._getTopGridHeight(this.props),\n position: 'relative',\n width: width\n };\n\n this._containerBottomStyle = {\n height: height - this._getTopGridHeight(this.props),\n overflow: 'visible', // Let :focus outline show through\n position: 'relative',\n width: width\n };\n }\n\n if (resetAll || styleBottomLeftGrid !== this._lastRenderedStyleBottomLeftGrid) {\n this._bottomLeftGridStyle = _extends({\n left: 0,\n overflowX: 'hidden',\n overflowY: enableFixedColumnScroll ? 'auto' : 'hidden',\n position: 'absolute'\n }, styleBottomLeftGrid);\n }\n\n if (resetAll || leftSizeChange || styleBottomRightGrid !== this._lastRenderedStyleBottomRightGrid) {\n this._bottomRightGridStyle = _extends({\n left: this._getLeftGridWidth(this.props),\n position: 'absolute'\n }, styleBottomRightGrid);\n }\n\n if (resetAll || styleTopLeftGrid !== this._lastRenderedStyleTopLeftGrid) {\n this._topLeftGridStyle = _extends({\n left: 0,\n overflowX: 'hidden',\n overflowY: 'hidden',\n position: 'absolute',\n top: 0\n }, styleTopLeftGrid);\n }\n\n if (resetAll || leftSizeChange || styleTopRightGrid !== this._lastRenderedStyleTopRightGrid) {\n this._topRightGridStyle = _extends({\n left: this._getLeftGridWidth(this.props),\n overflowX: enableFixedRowScroll ? 'auto' : 'hidden',\n overflowY: 'hidden',\n position: 'absolute',\n top: 0\n }, styleTopRightGrid);\n }\n\n this._lastRenderedColumnWidth = columnWidth;\n this._lastRenderedFixedColumnCount = fixedColumnCount;\n this._lastRenderedFixedRowCount = fixedRowCount;\n this._lastRenderedHeight = height;\n this._lastRenderedRowHeight = rowHeight;\n this._lastRenderedStyle = style;\n this._lastRenderedStyleBottomLeftGrid = styleBottomLeftGrid;\n this._lastRenderedStyleBottomRightGrid = styleBottomRightGrid;\n this._lastRenderedStyleTopLeftGrid = styleTopLeftGrid;\n this._lastRenderedStyleTopRightGrid = styleTopRightGrid;\n this._lastRenderedWidth = width;\n }\n }, {\n key: '_prepareForRender',\n value: function _prepareForRender() {\n if (this._lastRenderedColumnWidth !== this.props.columnWidth || this._lastRenderedFixedColumnCount !== this.props.fixedColumnCount) {\n this._leftGridWidth = null;\n }\n\n if (this._lastRenderedFixedRowCount !== this.props.fixedRowCount || this._lastRenderedRowHeight !== this.props.rowHeight) {\n this._topGridHeight = null;\n }\n\n this._maybeCalculateCachedStyles();\n\n this._lastRenderedColumnWidth = this.props.columnWidth;\n this._lastRenderedFixedColumnCount = this.props.fixedColumnCount;\n this._lastRenderedFixedRowCount = this.props.fixedRowCount;\n this._lastRenderedRowHeight = this.props.rowHeight;\n }\n }, {\n key: '_renderBottomLeftGrid',\n value: function _renderBottomLeftGrid(props) {\n var enableFixedColumnScroll = props.enableFixedColumnScroll,\n fixedColumnCount = props.fixedColumnCount,\n fixedRowCount = props.fixedRowCount,\n rowCount = props.rowCount,\n hideBottomLeftGridScrollbar = props.hideBottomLeftGridScrollbar;\n var showVerticalScrollbar = this.state.showVerticalScrollbar;\n\n\n if (!fixedColumnCount) {\n return null;\n }\n\n var additionalRowCount = showVerticalScrollbar ? 1 : 0,\n height = this._getBottomGridHeight(props),\n width = this._getLeftGridWidth(props),\n scrollbarSize = this.state.showVerticalScrollbar ? this.state.scrollbarSize : 0,\n gridWidth = hideBottomLeftGridScrollbar ? width + scrollbarSize : width;\n\n var bottomLeftGrid = React.createElement(Grid, _extends({}, props, {\n cellRenderer: this._cellRendererBottomLeftGrid,\n className: this.props.classNameBottomLeftGrid,\n columnCount: fixedColumnCount,\n deferredMeasurementCache: this._deferredMeasurementCacheBottomLeftGrid,\n height: height,\n onScroll: enableFixedColumnScroll ? this._onScrollTop : undefined,\n ref: this._bottomLeftGridRef,\n rowCount: Math.max(0, rowCount - fixedRowCount) + additionalRowCount,\n rowHeight: this._rowHeightBottomGrid,\n style: this._bottomLeftGridStyle,\n tabIndex: null,\n width: gridWidth\n }));\n\n if (hideBottomLeftGridScrollbar) {\n return React.createElement(\n 'div',\n {\n className: 'BottomLeftGrid_ScrollWrapper',\n style: _extends({}, this._bottomLeftGridStyle, {\n height: height,\n width: width,\n overflowY: 'hidden'\n }) },\n bottomLeftGrid\n );\n }\n return bottomLeftGrid;\n }\n }, {\n key: '_renderBottomRightGrid',\n value: function _renderBottomRightGrid(props) {\n var columnCount = props.columnCount,\n fixedColumnCount = props.fixedColumnCount,\n fixedRowCount = props.fixedRowCount,\n rowCount = props.rowCount,\n scrollToColumn = props.scrollToColumn,\n scrollToRow = props.scrollToRow;\n\n\n return React.createElement(Grid, _extends({}, props, {\n cellRenderer: this._cellRendererBottomRightGrid,\n className: this.props.classNameBottomRightGrid,\n columnCount: Math.max(0, columnCount - fixedColumnCount),\n columnWidth: this._columnWidthRightGrid,\n deferredMeasurementCache: this._deferredMeasurementCacheBottomRightGrid,\n height: this._getBottomGridHeight(props),\n onScroll: this._onScroll,\n onScrollbarPresenceChange: this._onScrollbarPresenceChange,\n ref: this._bottomRightGridRef,\n rowCount: Math.max(0, rowCount - fixedRowCount),\n rowHeight: this._rowHeightBottomGrid,\n scrollToColumn: scrollToColumn - fixedColumnCount,\n scrollToRow: scrollToRow - fixedRowCount,\n style: this._bottomRightGridStyle,\n width: this._getRightGridWidth(props)\n }));\n }\n }, {\n key: '_renderTopLeftGrid',\n value: function _renderTopLeftGrid(props) {\n var fixedColumnCount = props.fixedColumnCount,\n fixedRowCount = props.fixedRowCount;\n\n\n if (!fixedColumnCount || !fixedRowCount) {\n return null;\n }\n\n return React.createElement(Grid, _extends({}, props, {\n className: this.props.classNameTopLeftGrid,\n columnCount: fixedColumnCount,\n height: this._getTopGridHeight(props),\n ref: this._topLeftGridRef,\n rowCount: fixedRowCount,\n style: this._topLeftGridStyle,\n tabIndex: null,\n width: this._getLeftGridWidth(props)\n }));\n }\n }, {\n key: '_renderTopRightGrid',\n value: function _renderTopRightGrid(props) {\n var columnCount = props.columnCount,\n enableFixedRowScroll = props.enableFixedRowScroll,\n fixedColumnCount = props.fixedColumnCount,\n fixedRowCount = props.fixedRowCount,\n scrollLeft = props.scrollLeft,\n hideTopRightGridScrollbar = props.hideTopRightGridScrollbar;\n var _state2 = this.state,\n showHorizontalScrollbar = _state2.showHorizontalScrollbar,\n scrollbarSize = _state2.scrollbarSize;\n\n\n if (!fixedRowCount) {\n return null;\n }\n\n var additionalColumnCount = showHorizontalScrollbar ? 1 : 0,\n height = this._getTopGridHeight(props),\n width = this._getRightGridWidth(props),\n additionalHeight = showHorizontalScrollbar ? scrollbarSize : 0;\n\n var gridHeight = height,\n style = this._topRightGridStyle;\n\n if (hideTopRightGridScrollbar) {\n gridHeight = height + additionalHeight;\n style = _extends({}, this._topRightGridStyle, {\n left: 0\n });\n }\n\n var topRightGrid = React.createElement(Grid, _extends({}, props, {\n cellRenderer: this._cellRendererTopRightGrid,\n className: this.props.classNameTopRightGrid,\n columnCount: Math.max(0, columnCount - fixedColumnCount) + additionalColumnCount,\n columnWidth: this._columnWidthRightGrid,\n deferredMeasurementCache: this._deferredMeasurementCacheTopRightGrid,\n height: gridHeight,\n onScroll: enableFixedRowScroll ? this._onScrollLeft : undefined,\n ref: this._topRightGridRef,\n rowCount: fixedRowCount,\n scrollLeft: scrollLeft,\n style: style,\n tabIndex: null,\n width: width\n }));\n\n if (hideTopRightGridScrollbar) {\n return React.createElement(\n 'div',\n {\n className: 'TopRightGrid_ScrollWrapper',\n style: _extends({}, this._topRightGridStyle, {\n height: height,\n width: width,\n overflowX: 'hidden'\n }) },\n topRightGrid\n );\n }\n return topRightGrid;\n }\n }], [{\n key: 'getDerivedStateFromProps',\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.scrollLeft !== prevState.scrollLeft || nextProps.scrollTop !== prevState.scrollTop) {\n return {\n scrollLeft: nextProps.scrollLeft != null && nextProps.scrollLeft >= 0 ? nextProps.scrollLeft : prevState.scrollLeft,\n scrollTop: nextProps.scrollTop != null && nextProps.scrollTop >= 0 ? nextProps.scrollTop : prevState.scrollTop\n };\n }\n\n return null;\n }\n }]);\n\n return MultiGrid;\n}(React.PureComponent);\n\nMultiGrid.defaultProps = {\n classNameBottomLeftGrid: '',\n classNameBottomRightGrid: '',\n classNameTopLeftGrid: '',\n classNameTopRightGrid: '',\n enableFixedColumnScroll: false,\n enableFixedRowScroll: false,\n fixedColumnCount: 0,\n fixedRowCount: 0,\n scrollToColumn: -1,\n scrollToRow: -1,\n style: {},\n styleBottomLeftGrid: {},\n styleBottomRightGrid: {},\n styleTopLeftGrid: {},\n styleTopRightGrid: {},\n hideTopRightGridScrollbar: false,\n hideBottomLeftGridScrollbar: false\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this2 = this;\n\n this.state = {\n scrollLeft: 0,\n scrollTop: 0,\n scrollbarSize: 0,\n showHorizontalScrollbar: false,\n showVerticalScrollbar: false\n };\n this._deferredInvalidateColumnIndex = null;\n this._deferredInvalidateRowIndex = null;\n\n this._bottomLeftGridRef = function (ref) {\n _this2._bottomLeftGrid = ref;\n };\n\n this._bottomRightGridRef = function (ref) {\n _this2._bottomRightGrid = ref;\n };\n\n this._cellRendererBottomLeftGrid = function (_ref3) {\n var rowIndex = _ref3.rowIndex,\n rest = _objectWithoutProperties(_ref3, ['rowIndex']);\n\n var _props5 = _this2.props,\n cellRenderer = _props5.cellRenderer,\n fixedRowCount = _props5.fixedRowCount,\n rowCount = _props5.rowCount;\n\n\n if (rowIndex === rowCount - fixedRowCount) {\n return React.createElement('div', {\n key: rest.key,\n style: _extends({}, rest.style, {\n height: SCROLLBAR_SIZE_BUFFER\n })\n });\n } else {\n return cellRenderer(_extends({}, rest, {\n parent: _this2,\n rowIndex: rowIndex + fixedRowCount\n }));\n }\n };\n\n this._cellRendererBottomRightGrid = function (_ref4) {\n var columnIndex = _ref4.columnIndex,\n rowIndex = _ref4.rowIndex,\n rest = _objectWithoutProperties(_ref4, ['columnIndex', 'rowIndex']);\n\n var _props6 = _this2.props,\n cellRenderer = _props6.cellRenderer,\n fixedColumnCount = _props6.fixedColumnCount,\n fixedRowCount = _props6.fixedRowCount;\n\n\n return cellRenderer(_extends({}, rest, {\n columnIndex: columnIndex + fixedColumnCount,\n parent: _this2,\n rowIndex: rowIndex + fixedRowCount\n }));\n };\n\n this._cellRendererTopRightGrid = function (_ref5) {\n var columnIndex = _ref5.columnIndex,\n rest = _objectWithoutProperties(_ref5, ['columnIndex']);\n\n var _props7 = _this2.props,\n cellRenderer = _props7.cellRenderer,\n columnCount = _props7.columnCount,\n fixedColumnCount = _props7.fixedColumnCount;\n\n\n if (columnIndex === columnCount - fixedColumnCount) {\n return React.createElement('div', {\n key: rest.key,\n style: _extends({}, rest.style, {\n width: SCROLLBAR_SIZE_BUFFER\n })\n });\n } else {\n return cellRenderer(_extends({}, rest, {\n columnIndex: columnIndex + fixedColumnCount,\n parent: _this2\n }));\n }\n };\n\n this._columnWidthRightGrid = function (_ref6) {\n var index = _ref6.index;\n var _props8 = _this2.props,\n columnCount = _props8.columnCount,\n fixedColumnCount = _props8.fixedColumnCount,\n columnWidth = _props8.columnWidth;\n var _state3 = _this2.state,\n scrollbarSize = _state3.scrollbarSize,\n showHorizontalScrollbar = _state3.showHorizontalScrollbar;\n\n // An extra cell is added to the count\n // This gives the smaller Grid extra room for offset,\n // In case the main (bottom right) Grid has a scrollbar\n // If no scrollbar, the extra space is overflow:hidden anyway\n\n if (showHorizontalScrollbar && index === columnCount - fixedColumnCount) {\n return scrollbarSize;\n }\n\n return typeof columnWidth === 'function' ? columnWidth({ index: index + fixedColumnCount }) : columnWidth;\n };\n\n this._onScroll = function (scrollInfo) {\n var scrollLeft = scrollInfo.scrollLeft,\n scrollTop = scrollInfo.scrollTop;\n\n _this2.setState({\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n });\n var onScroll = _this2.props.onScroll;\n if (onScroll) {\n onScroll(scrollInfo);\n }\n };\n\n this._onScrollbarPresenceChange = function (_ref7) {\n var horizontal = _ref7.horizontal,\n size = _ref7.size,\n vertical = _ref7.vertical;\n var _state4 = _this2.state,\n showHorizontalScrollbar = _state4.showHorizontalScrollbar,\n showVerticalScrollbar = _state4.showVerticalScrollbar;\n\n\n if (horizontal !== showHorizontalScrollbar || vertical !== showVerticalScrollbar) {\n _this2.setState({\n scrollbarSize: size,\n showHorizontalScrollbar: horizontal,\n showVerticalScrollbar: vertical\n });\n\n var onScrollbarPresenceChange = _this2.props.onScrollbarPresenceChange;\n\n if (typeof onScrollbarPresenceChange === 'function') {\n onScrollbarPresenceChange({\n horizontal: horizontal,\n size: size,\n vertical: vertical\n });\n }\n }\n };\n\n this._onScrollLeft = function (scrollInfo) {\n var scrollLeft = scrollInfo.scrollLeft;\n\n _this2._onScroll({\n scrollLeft: scrollLeft,\n scrollTop: _this2.state.scrollTop\n });\n };\n\n this._onScrollTop = function (scrollInfo) {\n var scrollTop = scrollInfo.scrollTop;\n\n _this2._onScroll({\n scrollTop: scrollTop,\n scrollLeft: _this2.state.scrollLeft\n });\n };\n\n this._rowHeightBottomGrid = function (_ref8) {\n var index = _ref8.index;\n var _props9 = _this2.props,\n fixedRowCount = _props9.fixedRowCount,\n rowCount = _props9.rowCount,\n rowHeight = _props9.rowHeight;\n var _state5 = _this2.state,\n scrollbarSize = _state5.scrollbarSize,\n showVerticalScrollbar = _state5.showVerticalScrollbar;\n\n // An extra cell is added to the count\n // This gives the smaller Grid extra room for offset,\n // In case the main (bottom right) Grid has a scrollbar\n // If no scrollbar, the extra space is overflow:hidden anyway\n\n if (showVerticalScrollbar && index === rowCount - fixedRowCount) {\n return scrollbarSize;\n }\n\n return typeof rowHeight === 'function' ? rowHeight({ index: index + fixedRowCount }) : rowHeight;\n };\n\n this._topLeftGridRef = function (ref) {\n _this2._topLeftGrid = ref;\n };\n\n this._topRightGridRef = function (ref) {\n _this2._topRightGrid = ref;\n };\n};\n\nMultiGrid.propTypes = process.env.NODE_ENV !== \"production\" ? {\n classNameBottomLeftGrid: PropTypes.string.isRequired,\n classNameBottomRightGrid: PropTypes.string.isRequired,\n classNameTopLeftGrid: PropTypes.string.isRequired,\n classNameTopRightGrid: PropTypes.string.isRequired,\n enableFixedColumnScroll: PropTypes.bool.isRequired,\n enableFixedRowScroll: PropTypes.bool.isRequired,\n fixedColumnCount: PropTypes.number.isRequired,\n fixedRowCount: PropTypes.number.isRequired,\n onScrollbarPresenceChange: PropTypes.func,\n style: PropTypes.object.isRequired,\n styleBottomLeftGrid: PropTypes.object.isRequired,\n styleBottomRightGrid: PropTypes.object.isRequired,\n styleTopLeftGrid: PropTypes.object.isRequired,\n styleTopRightGrid: PropTypes.object.isRequired,\n hideTopRightGridScrollbar: PropTypes.bool,\n hideBottomLeftGridScrollbar: PropTypes.bool\n} : {};\n\n\npolyfill(MultiGrid);\n\nexport default MultiGrid;","import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\n\n/**\n * HOC that simplifies the process of synchronizing scrolling between two or more virtualized components.\n */\n\nvar ScrollSync = function (_React$PureComponent) {\n _inherits(ScrollSync, _React$PureComponent);\n\n function ScrollSync(props, context) {\n _classCallCheck(this, ScrollSync);\n\n var _this = _possibleConstructorReturn(this, (ScrollSync.__proto__ || _Object$getPrototypeOf(ScrollSync)).call(this, props, context));\n\n _this.state = {\n clientHeight: 0,\n clientWidth: 0,\n scrollHeight: 0,\n scrollLeft: 0,\n scrollTop: 0,\n scrollWidth: 0\n };\n\n _this._onScroll = _this._onScroll.bind(_this);\n return _this;\n }\n\n _createClass(ScrollSync, [{\n key: 'render',\n value: function render() {\n var children = this.props.children;\n var _state = this.state,\n clientHeight = _state.clientHeight,\n clientWidth = _state.clientWidth,\n scrollHeight = _state.scrollHeight,\n scrollLeft = _state.scrollLeft,\n scrollTop = _state.scrollTop,\n scrollWidth = _state.scrollWidth;\n\n\n return children({\n clientHeight: clientHeight,\n clientWidth: clientWidth,\n onScroll: this._onScroll,\n scrollHeight: scrollHeight,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n scrollWidth: scrollWidth\n });\n }\n }, {\n key: '_onScroll',\n value: function _onScroll(_ref) {\n var clientHeight = _ref.clientHeight,\n clientWidth = _ref.clientWidth,\n scrollHeight = _ref.scrollHeight,\n scrollLeft = _ref.scrollLeft,\n scrollTop = _ref.scrollTop,\n scrollWidth = _ref.scrollWidth;\n\n this.setState({\n clientHeight: clientHeight,\n clientWidth: clientWidth,\n scrollHeight: scrollHeight,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n scrollWidth: scrollWidth\n });\n }\n }]);\n\n return ScrollSync;\n}(React.PureComponent);\n\nexport default ScrollSync;\nScrollSync.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * Function responsible for rendering 2 or more virtualized components.\n * This function should implement the following signature:\n * ({ onScroll, scrollLeft, scrollTop }) => PropTypes.element\n */\n children: PropTypes.func.isRequired\n} : {};","\n\nexport default function createMultiSort(sortCallback) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n defaultSortBy = _ref.defaultSortBy,\n _ref$defaultSortDirec = _ref.defaultSortDirection,\n defaultSortDirection = _ref$defaultSortDirec === undefined ? {} : _ref$defaultSortDirec;\n\n if (!sortCallback) {\n throw Error('Required parameter \"sortCallback\" not specified');\n }\n\n var sortBy = defaultSortBy || [];\n var sortDirection = {};\n\n sortBy.forEach(function (dataKey) {\n sortDirection[dataKey] = defaultSortDirection.hasOwnProperty(dataKey) ? defaultSortDirection[dataKey] : 'ASC';\n });\n\n function sort(_ref2) {\n var defaultSortDirection = _ref2.defaultSortDirection,\n event = _ref2.event,\n dataKey = _ref2.sortBy;\n\n if (event.shiftKey) {\n // Shift + click appends a column to existing criteria\n if (sortDirection.hasOwnProperty(dataKey)) {\n sortDirection[dataKey] = sortDirection[dataKey] === 'ASC' ? 'DESC' : 'ASC';\n } else {\n sortDirection[dataKey] = defaultSortDirection;\n sortBy.push(dataKey);\n }\n } else if (event.ctrlKey || event.metaKey) {\n // Control + click removes column from sort (if pressent)\n var index = sortBy.indexOf(dataKey);\n if (index >= 0) {\n sortBy.splice(index, 1);\n delete sortDirection[dataKey];\n }\n } else {\n sortBy.length = 0;\n sortBy.push(dataKey);\n\n if (sortDirection.hasOwnProperty(dataKey)) {\n sortDirection[dataKey] = sortDirection[dataKey] === 'ASC' ? 'DESC' : 'ASC';\n } else {\n sortDirection[dataKey] = defaultSortDirection;\n }\n }\n\n // Notify application code\n sortCallback({\n sortBy: sortBy,\n sortDirection: sortDirection\n });\n }\n\n return {\n sort: sort,\n sortBy: sortBy,\n sortDirection: sortDirection\n };\n}","\n\n/**\n * Default accessor for returning a cell value for a given attribute.\n * This function expects to operate on either a vanilla Object or an Immutable Map.\n * You should override the column's cellDataGetter if your data is some other type of object.\n */\nexport default function defaultCellDataGetter(_ref) {\n var dataKey = _ref.dataKey,\n rowData = _ref.rowData;\n\n if (typeof rowData.get === 'function') {\n return rowData.get(dataKey);\n } else {\n return rowData[dataKey];\n }\n}\nimport { bpfrpt_proptype_CellDataGetterParams } from './types';","\n\n/**\n * Default cell renderer that displays an attribute as a simple string\n * You should override the column's cellRenderer if your data is some other type of object.\n */\nexport default function defaultCellRenderer(_ref) {\n var cellData = _ref.cellData;\n\n if (cellData == null) {\n return '';\n } else {\n return String(cellData);\n }\n}\nimport { bpfrpt_proptype_CellRendererParams } from './types';","import * as React from 'react';\n\n\nexport default function defaultHeaderRowRenderer(_ref) {\n var className = _ref.className,\n columns = _ref.columns,\n style = _ref.style;\n\n return React.createElement(\n 'div',\n { className: className, role: 'row', style: style },\n columns\n );\n}\ndefaultHeaderRowRenderer.propTypes = process.env.NODE_ENV === 'production' ? null : bpfrpt_proptype_HeaderRowRendererParams === PropTypes.any ? {} : bpfrpt_proptype_HeaderRowRendererParams;\nimport { bpfrpt_proptype_HeaderRowRendererParams } from './types';\nimport PropTypes from 'prop-types';","var SortDirection = {\n /**\n * Sort items in ascending order.\n * This means arranging from the lowest value to the highest (e.g. a-z, 0-9).\n */\n ASC: 'ASC',\n\n /**\n * Sort items in descending order.\n * This means arranging from the highest value to the lowest (e.g. z-a, 9-0).\n */\n DESC: 'DESC'\n};\n\nexport default SortDirection;","import cn from 'classnames';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport SortDirection from './SortDirection';\n\n/**\n * Displayed beside a header to indicate that a Table is currently sorted by this column.\n */\nexport default function SortIndicator(_ref) {\n var sortDirection = _ref.sortDirection;\n\n var classNames = cn('ReactVirtualized__Table__sortableHeaderIcon', {\n 'ReactVirtualized__Table__sortableHeaderIcon--ASC': sortDirection === SortDirection.ASC,\n 'ReactVirtualized__Table__sortableHeaderIcon--DESC': sortDirection === SortDirection.DESC\n });\n\n return React.createElement(\n 'svg',\n { className: classNames, width: 18, height: 18, viewBox: '0 0 24 24' },\n sortDirection === SortDirection.ASC ? React.createElement('path', { d: 'M7 14l5-5 5 5z' }) : React.createElement('path', { d: 'M7 10l5 5 5-5z' }),\n React.createElement('path', { d: 'M0 0h24v24H0z', fill: 'none' })\n );\n}\n\nSortIndicator.propTypes = process.env.NODE_ENV !== \"production\" ? {\n sortDirection: PropTypes.oneOf([SortDirection.ASC, SortDirection.DESC])\n} : {};","import * as React from 'react';\nimport SortIndicator from './SortIndicator';\n\n\n/**\n * Default table header renderer.\n */\nexport default function defaultHeaderRenderer(_ref) {\n var dataKey = _ref.dataKey,\n label = _ref.label,\n sortBy = _ref.sortBy,\n sortDirection = _ref.sortDirection;\n\n var showSortIndicator = sortBy === dataKey;\n var children = [React.createElement(\n 'span',\n {\n className: 'ReactVirtualized__Table__headerTruncatedText',\n key: 'label',\n title: label },\n label\n )];\n\n if (showSortIndicator) {\n children.push(React.createElement(SortIndicator, { key: 'SortIndicator', sortDirection: sortDirection }));\n }\n\n return children;\n}\ndefaultHeaderRenderer.propTypes = process.env.NODE_ENV === 'production' ? null : bpfrpt_proptype_HeaderRendererParams === PropTypes.any ? {} : bpfrpt_proptype_HeaderRendererParams;\nimport { bpfrpt_proptype_HeaderRendererParams } from './types';\nimport PropTypes from 'prop-types';","import _extends from 'babel-runtime/helpers/extends';\nimport * as React from 'react';\n\n\n/**\n * Default row renderer for Table.\n */\nexport default function defaultRowRenderer(_ref) {\n var className = _ref.className,\n columns = _ref.columns,\n index = _ref.index,\n key = _ref.key,\n onRowClick = _ref.onRowClick,\n onRowDoubleClick = _ref.onRowDoubleClick,\n onRowMouseOut = _ref.onRowMouseOut,\n onRowMouseOver = _ref.onRowMouseOver,\n onRowRightClick = _ref.onRowRightClick,\n rowData = _ref.rowData,\n style = _ref.style;\n\n var a11yProps = {};\n\n if (onRowClick || onRowDoubleClick || onRowMouseOut || onRowMouseOver || onRowRightClick) {\n a11yProps['aria-label'] = 'row';\n a11yProps.tabIndex = 0;\n\n if (onRowClick) {\n a11yProps.onClick = function (event) {\n return onRowClick({ event: event, index: index, rowData: rowData });\n };\n }\n if (onRowDoubleClick) {\n a11yProps.onDoubleClick = function (event) {\n return onRowDoubleClick({ event: event, index: index, rowData: rowData });\n };\n }\n if (onRowMouseOut) {\n a11yProps.onMouseOut = function (event) {\n return onRowMouseOut({ event: event, index: index, rowData: rowData });\n };\n }\n if (onRowMouseOver) {\n a11yProps.onMouseOver = function (event) {\n return onRowMouseOver({ event: event, index: index, rowData: rowData });\n };\n }\n if (onRowRightClick) {\n a11yProps.onContextMenu = function (event) {\n return onRowRightClick({ event: event, index: index, rowData: rowData });\n };\n }\n }\n\n return React.createElement(\n 'div',\n _extends({}, a11yProps, {\n className: className,\n key: key,\n role: 'row',\n style: style }),\n columns\n );\n}\ndefaultRowRenderer.propTypes = process.env.NODE_ENV === 'production' ? null : bpfrpt_proptype_RowRendererParams === PropTypes.any ? {} : bpfrpt_proptype_RowRendererParams;\nimport { bpfrpt_proptype_RowRendererParams } from './types';\nimport PropTypes from 'prop-types';","import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport defaultHeaderRenderer from './defaultHeaderRenderer';\nimport defaultCellRenderer from './defaultCellRenderer';\nimport defaultCellDataGetter from './defaultCellDataGetter';\nimport SortDirection from './SortDirection';\n\n/**\n * Describes the header and cell contents of a table column.\n */\n\nvar Column = function (_React$Component) {\n _inherits(Column, _React$Component);\n\n function Column() {\n _classCallCheck(this, Column);\n\n return _possibleConstructorReturn(this, (Column.__proto__ || _Object$getPrototypeOf(Column)).apply(this, arguments));\n }\n\n return Column;\n}(React.Component);\n\nColumn.defaultProps = {\n cellDataGetter: defaultCellDataGetter,\n cellRenderer: defaultCellRenderer,\n defaultSortDirection: SortDirection.ASC,\n flexGrow: 0,\n flexShrink: 1,\n headerRenderer: defaultHeaderRenderer,\n style: {}\n};\nexport default Column;\nColumn.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /** Optional aria-label value to set on the column header */\n 'aria-label': PropTypes.string,\n\n /**\n * Callback responsible for returning a cell's data, given its :dataKey\n * ({ columnData: any, dataKey: string, rowData: any }): any\n */\n cellDataGetter: PropTypes.func,\n\n /**\n * Callback responsible for rendering a cell's contents.\n * ({ cellData: any, columnData: any, dataKey: string, rowData: any, rowIndex: number }): node\n */\n cellRenderer: PropTypes.func,\n\n /** Optional CSS class to apply to cell */\n className: PropTypes.string,\n\n /** Optional additional data passed to this column's :cellDataGetter */\n columnData: PropTypes.object,\n\n /** Uniquely identifies the row-data attribute corresponding to this cell */\n dataKey: PropTypes.any.isRequired,\n\n /** Optional direction to be used when clicked the first time */\n defaultSortDirection: PropTypes.oneOf([SortDirection.ASC, SortDirection.DESC]),\n\n /** If sort is enabled for the table at large, disable it for this column */\n disableSort: PropTypes.bool,\n\n /** Flex grow style; defaults to 0 */\n flexGrow: PropTypes.number,\n\n /** Flex shrink style; defaults to 1 */\n flexShrink: PropTypes.number,\n\n /** Optional CSS class to apply to this column's header */\n headerClassName: PropTypes.string,\n\n /**\n * Optional callback responsible for rendering a column header contents.\n * ({ columnData: object, dataKey: string, disableSort: boolean, label: node, sortBy: string, sortDirection: string }): PropTypes.node\n */\n headerRenderer: PropTypes.func.isRequired,\n\n /** Optional inline style to apply to this column's header */\n headerStyle: PropTypes.object,\n\n /** Optional id to set on the column header */\n id: PropTypes.string,\n\n /** Header label for this column */\n label: PropTypes.node,\n\n /** Maximum width of column; this property will only be used if :flexGrow is > 0. */\n maxWidth: PropTypes.number,\n\n /** Minimum width of column. */\n minWidth: PropTypes.number,\n\n /** Optional inline style to apply to cell */\n style: PropTypes.object,\n\n /** Flex basis (width) for this column; This value can grow or shrink based on :flexGrow and :flexShrink properties. */\n width: PropTypes.number.isRequired\n} : {};","import _extends from 'babel-runtime/helpers/extends';\nimport _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\n\n\nimport cn from 'classnames';\n\nimport Column from './Column';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { findDOMNode } from 'react-dom';\nimport Grid, { accessibilityOverscanIndicesGetter } from '../Grid';\n\nimport defaultRowRenderer from './defaultRowRenderer';\nimport defaultHeaderRowRenderer from './defaultHeaderRowRenderer';\nimport SortDirection from './SortDirection';\n\n/**\n * Table component with fixed headers and virtualized rows for improved performance with large data sets.\n * This component expects explicit width, height, and padding parameters.\n */\n\nvar Table = function (_React$PureComponent) {\n _inherits(Table, _React$PureComponent);\n\n function Table(props) {\n _classCallCheck(this, Table);\n\n var _this = _possibleConstructorReturn(this, (Table.__proto__ || _Object$getPrototypeOf(Table)).call(this, props));\n\n _this.state = {\n scrollbarWidth: 0\n };\n\n _this._createColumn = _this._createColumn.bind(_this);\n _this._createRow = _this._createRow.bind(_this);\n _this._onScroll = _this._onScroll.bind(_this);\n _this._onSectionRendered = _this._onSectionRendered.bind(_this);\n _this._setRef = _this._setRef.bind(_this);\n return _this;\n }\n\n _createClass(Table, [{\n key: 'forceUpdateGrid',\n value: function forceUpdateGrid() {\n if (this.Grid) {\n this.Grid.forceUpdate();\n }\n }\n\n /** See Grid#getOffsetForCell */\n\n }, {\n key: 'getOffsetForRow',\n value: function getOffsetForRow(_ref) {\n var alignment = _ref.alignment,\n index = _ref.index;\n\n if (this.Grid) {\n var _Grid$getOffsetForCel = this.Grid.getOffsetForCell({\n alignment: alignment,\n rowIndex: index\n }),\n scrollTop = _Grid$getOffsetForCel.scrollTop;\n\n return scrollTop;\n }\n return 0;\n }\n\n /** CellMeasurer compatibility */\n\n }, {\n key: 'invalidateCellSizeAfterRender',\n value: function invalidateCellSizeAfterRender(_ref2) {\n var columnIndex = _ref2.columnIndex,\n rowIndex = _ref2.rowIndex;\n\n if (this.Grid) {\n this.Grid.invalidateCellSizeAfterRender({\n rowIndex: rowIndex,\n columnIndex: columnIndex\n });\n }\n }\n\n /** See Grid#measureAllCells */\n\n }, {\n key: 'measureAllRows',\n value: function measureAllRows() {\n if (this.Grid) {\n this.Grid.measureAllCells();\n }\n }\n\n /** CellMeasurer compatibility */\n\n }, {\n key: 'recomputeGridSize',\n value: function recomputeGridSize() {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref3$columnIndex = _ref3.columnIndex,\n columnIndex = _ref3$columnIndex === undefined ? 0 : _ref3$columnIndex,\n _ref3$rowIndex = _ref3.rowIndex,\n rowIndex = _ref3$rowIndex === undefined ? 0 : _ref3$rowIndex;\n\n if (this.Grid) {\n this.Grid.recomputeGridSize({\n rowIndex: rowIndex,\n columnIndex: columnIndex\n });\n }\n }\n\n /** See Grid#recomputeGridSize */\n\n }, {\n key: 'recomputeRowHeights',\n value: function recomputeRowHeights() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n if (this.Grid) {\n this.Grid.recomputeGridSize({\n rowIndex: index\n });\n }\n }\n\n /** See Grid#scrollToPosition */\n\n }, {\n key: 'scrollToPosition',\n value: function scrollToPosition() {\n var scrollTop = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n if (this.Grid) {\n this.Grid.scrollToPosition({ scrollTop: scrollTop });\n }\n }\n\n /** See Grid#scrollToCell */\n\n }, {\n key: 'scrollToRow',\n value: function scrollToRow() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n if (this.Grid) {\n this.Grid.scrollToCell({\n columnIndex: 0,\n rowIndex: index\n });\n }\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n this._setScrollbarWidth();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n this._setScrollbarWidth();\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var _props = this.props,\n children = _props.children,\n className = _props.className,\n disableHeader = _props.disableHeader,\n gridClassName = _props.gridClassName,\n gridStyle = _props.gridStyle,\n headerHeight = _props.headerHeight,\n headerRowRenderer = _props.headerRowRenderer,\n height = _props.height,\n id = _props.id,\n noRowsRenderer = _props.noRowsRenderer,\n rowClassName = _props.rowClassName,\n rowStyle = _props.rowStyle,\n scrollToIndex = _props.scrollToIndex,\n style = _props.style,\n width = _props.width;\n var scrollbarWidth = this.state.scrollbarWidth;\n\n\n var availableRowsHeight = disableHeader ? height : height - headerHeight;\n\n var rowClass = typeof rowClassName === 'function' ? rowClassName({ index: -1 }) : rowClassName;\n var rowStyleObject = typeof rowStyle === 'function' ? rowStyle({ index: -1 }) : rowStyle;\n\n // Precompute and cache column styles before rendering rows and columns to speed things up\n this._cachedColumnStyles = [];\n React.Children.toArray(children).forEach(function (column, index) {\n var flexStyles = _this2._getFlexStyleForColumn(column, column.props.style);\n\n _this2._cachedColumnStyles[index] = _extends({}, flexStyles, {\n overflow: 'hidden'\n });\n });\n\n // Note that we specify :rowCount, :scrollbarWidth, :sortBy, and :sortDirection as properties on Grid even though these have nothing to do with Grid.\n // This is done because Grid is a pure component and won't update unless its properties or state has changed.\n // Any property that should trigger a re-render of Grid then is specified here to avoid a stale display.\n return React.createElement(\n 'div',\n {\n className: cn('ReactVirtualized__Table', className),\n id: id,\n role: 'grid',\n style: style },\n !disableHeader && headerRowRenderer({\n className: cn('ReactVirtualized__Table__headerRow', rowClass),\n columns: this._getHeaderColumns(),\n style: _extends({}, rowStyleObject, {\n height: headerHeight,\n overflow: 'hidden',\n paddingRight: scrollbarWidth,\n width: width\n })\n }),\n React.createElement(Grid, _extends({}, this.props, {\n autoContainerWidth: true,\n className: cn('ReactVirtualized__Table__Grid', gridClassName),\n cellRenderer: this._createRow,\n columnWidth: width,\n columnCount: 1,\n height: availableRowsHeight,\n id: undefined,\n noContentRenderer: noRowsRenderer,\n onScroll: this._onScroll,\n onSectionRendered: this._onSectionRendered,\n ref: this._setRef,\n role: 'rowgroup',\n scrollbarWidth: scrollbarWidth,\n scrollToRow: scrollToIndex,\n style: _extends({}, gridStyle, {\n overflowX: 'hidden'\n })\n }))\n );\n }\n }, {\n key: '_createColumn',\n value: function _createColumn(_ref4) {\n var column = _ref4.column,\n columnIndex = _ref4.columnIndex,\n isScrolling = _ref4.isScrolling,\n parent = _ref4.parent,\n rowData = _ref4.rowData,\n rowIndex = _ref4.rowIndex;\n var _column$props = column.props,\n cellDataGetter = _column$props.cellDataGetter,\n cellRenderer = _column$props.cellRenderer,\n className = _column$props.className,\n columnData = _column$props.columnData,\n dataKey = _column$props.dataKey,\n id = _column$props.id;\n\n\n var cellData = cellDataGetter({ columnData: columnData, dataKey: dataKey, rowData: rowData });\n var renderedCell = cellRenderer({\n cellData: cellData,\n columnData: columnData,\n columnIndex: columnIndex,\n dataKey: dataKey,\n isScrolling: isScrolling,\n parent: parent,\n rowData: rowData,\n rowIndex: rowIndex\n });\n\n var style = this._cachedColumnStyles[columnIndex];\n\n var title = typeof renderedCell === 'string' ? renderedCell : null;\n\n // Avoid using object-spread syntax with multiple objects here,\n // Since it results in an extra method call to 'babel-runtime/helpers/extends'\n // See PR https://github.com/bvaughn/react-virtualized/pull/942\n return React.createElement(\n 'div',\n {\n 'aria-describedby': id,\n className: cn('ReactVirtualized__Table__rowColumn', className),\n key: 'Row' + rowIndex + '-' + 'Col' + columnIndex,\n role: 'gridcell',\n style: style,\n title: title },\n renderedCell\n );\n }\n }, {\n key: '_createHeader',\n value: function _createHeader(_ref5) {\n var column = _ref5.column,\n index = _ref5.index;\n var _props2 = this.props,\n headerClassName = _props2.headerClassName,\n headerStyle = _props2.headerStyle,\n onHeaderClick = _props2.onHeaderClick,\n sort = _props2.sort,\n sortBy = _props2.sortBy,\n sortDirection = _props2.sortDirection;\n var _column$props2 = column.props,\n columnData = _column$props2.columnData,\n dataKey = _column$props2.dataKey,\n defaultSortDirection = _column$props2.defaultSortDirection,\n disableSort = _column$props2.disableSort,\n headerRenderer = _column$props2.headerRenderer,\n id = _column$props2.id,\n label = _column$props2.label;\n\n var sortEnabled = !disableSort && sort;\n\n var classNames = cn('ReactVirtualized__Table__headerColumn', headerClassName, column.props.headerClassName, {\n ReactVirtualized__Table__sortableHeaderColumn: sortEnabled\n });\n var style = this._getFlexStyleForColumn(column, _extends({}, headerStyle, column.props.headerStyle));\n\n var renderedHeader = headerRenderer({\n columnData: columnData,\n dataKey: dataKey,\n disableSort: disableSort,\n label: label,\n sortBy: sortBy,\n sortDirection: sortDirection\n });\n\n var headerOnClick = void 0,\n headerOnKeyDown = void 0,\n headerTabIndex = void 0,\n headerAriaSort = void 0,\n headerAriaLabel = void 0;\n\n if (sortEnabled || onHeaderClick) {\n // If this is a sortable header, clicking it should update the table data's sorting.\n var isFirstTimeSort = sortBy !== dataKey;\n\n // If this is the firstTime sort of this column, use the column default sort order.\n // Otherwise, invert the direction of the sort.\n var newSortDirection = isFirstTimeSort ? defaultSortDirection : sortDirection === SortDirection.DESC ? SortDirection.ASC : SortDirection.DESC;\n\n var onClick = function onClick(event) {\n sortEnabled && sort({\n defaultSortDirection: defaultSortDirection,\n event: event,\n sortBy: dataKey,\n sortDirection: newSortDirection\n });\n onHeaderClick && onHeaderClick({ columnData: columnData, dataKey: dataKey, event: event });\n };\n\n var onKeyDown = function onKeyDown(event) {\n if (event.key === 'Enter' || event.key === ' ') {\n onClick(event);\n }\n };\n\n headerAriaLabel = column.props['aria-label'] || label || dataKey;\n headerTabIndex = 0;\n headerOnClick = onClick;\n headerOnKeyDown = onKeyDown;\n }\n\n if (sortBy === dataKey) {\n headerAriaSort = sortDirection === SortDirection.ASC ? 'ascending' : 'descending';\n }\n\n // Avoid using object-spread syntax with multiple objects here,\n // Since it results in an extra method call to 'babel-runtime/helpers/extends'\n // See PR https://github.com/bvaughn/react-virtualized/pull/942\n return React.createElement(\n 'div',\n {\n 'aria-label': headerAriaLabel,\n 'aria-sort': headerAriaSort,\n className: classNames,\n id: id,\n key: 'Header-Col' + index,\n onClick: headerOnClick,\n onKeyDown: headerOnKeyDown,\n role: 'columnheader',\n style: style,\n tabIndex: headerTabIndex },\n renderedHeader\n );\n }\n }, {\n key: '_createRow',\n value: function _createRow(_ref6) {\n var _this3 = this;\n\n var index = _ref6.rowIndex,\n isScrolling = _ref6.isScrolling,\n key = _ref6.key,\n parent = _ref6.parent,\n style = _ref6.style;\n var _props3 = this.props,\n children = _props3.children,\n onRowClick = _props3.onRowClick,\n onRowDoubleClick = _props3.onRowDoubleClick,\n onRowRightClick = _props3.onRowRightClick,\n onRowMouseOver = _props3.onRowMouseOver,\n onRowMouseOut = _props3.onRowMouseOut,\n rowClassName = _props3.rowClassName,\n rowGetter = _props3.rowGetter,\n rowRenderer = _props3.rowRenderer,\n rowStyle = _props3.rowStyle;\n var scrollbarWidth = this.state.scrollbarWidth;\n\n\n var rowClass = typeof rowClassName === 'function' ? rowClassName({ index: index }) : rowClassName;\n var rowStyleObject = typeof rowStyle === 'function' ? rowStyle({ index: index }) : rowStyle;\n var rowData = rowGetter({ index: index });\n\n var columns = React.Children.toArray(children).map(function (column, columnIndex) {\n return _this3._createColumn({\n column: column,\n columnIndex: columnIndex,\n isScrolling: isScrolling,\n parent: parent,\n rowData: rowData,\n rowIndex: index,\n scrollbarWidth: scrollbarWidth\n });\n });\n\n var className = cn('ReactVirtualized__Table__row', rowClass);\n var flattenedStyle = _extends({}, style, rowStyleObject, {\n height: this._getRowHeight(index),\n overflow: 'hidden',\n paddingRight: scrollbarWidth\n });\n\n return rowRenderer({\n className: className,\n columns: columns,\n index: index,\n isScrolling: isScrolling,\n key: key,\n onRowClick: onRowClick,\n onRowDoubleClick: onRowDoubleClick,\n onRowRightClick: onRowRightClick,\n onRowMouseOver: onRowMouseOver,\n onRowMouseOut: onRowMouseOut,\n rowData: rowData,\n style: flattenedStyle\n });\n }\n\n /**\n * Determines the flex-shrink, flex-grow, and width values for a cell (header or column).\n */\n\n }, {\n key: '_getFlexStyleForColumn',\n value: function _getFlexStyleForColumn(column) {\n var customStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var flexValue = column.props.flexGrow + ' ' + column.props.flexShrink + ' ' + column.props.width + 'px';\n\n var style = _extends({}, customStyle, {\n flex: flexValue,\n msFlex: flexValue,\n WebkitFlex: flexValue\n });\n\n if (column.props.maxWidth) {\n style.maxWidth = column.props.maxWidth;\n }\n\n if (column.props.minWidth) {\n style.minWidth = column.props.minWidth;\n }\n\n return style;\n }\n }, {\n key: '_getHeaderColumns',\n value: function _getHeaderColumns() {\n var _this4 = this;\n\n var _props4 = this.props,\n children = _props4.children,\n disableHeader = _props4.disableHeader;\n\n var items = disableHeader ? [] : React.Children.toArray(children);\n\n return items.map(function (column, index) {\n return _this4._createHeader({ column: column, index: index });\n });\n }\n }, {\n key: '_getRowHeight',\n value: function _getRowHeight(rowIndex) {\n var rowHeight = this.props.rowHeight;\n\n\n return typeof rowHeight === 'function' ? rowHeight({ index: rowIndex }) : rowHeight;\n }\n }, {\n key: '_onScroll',\n value: function _onScroll(_ref7) {\n var clientHeight = _ref7.clientHeight,\n scrollHeight = _ref7.scrollHeight,\n scrollTop = _ref7.scrollTop;\n var onScroll = this.props.onScroll;\n\n\n onScroll({ clientHeight: clientHeight, scrollHeight: scrollHeight, scrollTop: scrollTop });\n }\n }, {\n key: '_onSectionRendered',\n value: function _onSectionRendered(_ref8) {\n var rowOverscanStartIndex = _ref8.rowOverscanStartIndex,\n rowOverscanStopIndex = _ref8.rowOverscanStopIndex,\n rowStartIndex = _ref8.rowStartIndex,\n rowStopIndex = _ref8.rowStopIndex;\n var onRowsRendered = this.props.onRowsRendered;\n\n\n onRowsRendered({\n overscanStartIndex: rowOverscanStartIndex,\n overscanStopIndex: rowOverscanStopIndex,\n startIndex: rowStartIndex,\n stopIndex: rowStopIndex\n });\n }\n }, {\n key: '_setRef',\n value: function _setRef(ref) {\n this.Grid = ref;\n }\n }, {\n key: '_setScrollbarWidth',\n value: function _setScrollbarWidth() {\n if (this.Grid) {\n var _Grid = findDOMNode(this.Grid);\n var clientWidth = _Grid.clientWidth || 0;\n var offsetWidth = _Grid.offsetWidth || 0;\n var scrollbarWidth = offsetWidth - clientWidth;\n\n this.setState({ scrollbarWidth: scrollbarWidth });\n }\n }\n }]);\n\n return Table;\n}(React.PureComponent);\n\nTable.defaultProps = {\n disableHeader: false,\n estimatedRowSize: 30,\n headerHeight: 0,\n headerStyle: {},\n noRowsRenderer: function noRowsRenderer() {\n return null;\n },\n onRowsRendered: function onRowsRendered() {\n return null;\n },\n onScroll: function onScroll() {\n return null;\n },\n overscanIndicesGetter: accessibilityOverscanIndicesGetter,\n overscanRowCount: 10,\n rowRenderer: defaultRowRenderer,\n headerRowRenderer: defaultHeaderRowRenderer,\n rowStyle: {},\n scrollToAlignment: 'auto',\n scrollToIndex: -1,\n style: {}\n};\nexport default Table;\nTable.propTypes = process.env.NODE_ENV !== \"production\" ? {\n 'aria-label': PropTypes.string,\n\n /**\n * Removes fixed height from the scrollingContainer so that the total height\n * of rows can stretch the window. Intended for use with WindowScroller\n */\n autoHeight: PropTypes.bool,\n\n /** One or more Columns describing the data displayed in this row */\n children: function children(props) {\n var children = React.Children.toArray(props.children);\n for (var i = 0; i < children.length; i++) {\n var childType = children[i].type;\n if (childType !== Column && !(childType.prototype instanceof Column)) {\n return new Error('Table only accepts children of type Column');\n }\n }\n },\n\n /** Optional CSS class name */\n className: PropTypes.string,\n\n /** Disable rendering the header at all */\n disableHeader: PropTypes.bool,\n\n /**\n * Used to estimate the total height of a Table before all of its rows have actually been measured.\n * The estimated total height is adjusted as rows are rendered.\n */\n estimatedRowSize: PropTypes.number.isRequired,\n\n /** Optional custom CSS class name to attach to inner Grid element. */\n gridClassName: PropTypes.string,\n\n /** Optional inline style to attach to inner Grid element. */\n gridStyle: PropTypes.object,\n\n /** Optional CSS class to apply to all column headers */\n headerClassName: PropTypes.string,\n\n /** Fixed height of header row */\n headerHeight: PropTypes.number.isRequired,\n\n /**\n * Responsible for rendering a table row given an array of columns:\n * Should implement the following interface: ({\n * className: string,\n * columns: any[],\n * style: any\n * }): PropTypes.node\n */\n headerRowRenderer: PropTypes.func,\n\n /** Optional custom inline style to attach to table header columns. */\n headerStyle: PropTypes.object,\n\n /** Fixed/available height for out DOM element */\n height: PropTypes.number.isRequired,\n\n /** Optional id */\n id: PropTypes.string,\n\n /** Optional renderer to be used in place of table body rows when rowCount is 0 */\n noRowsRenderer: PropTypes.func,\n\n /**\n * Optional callback when a column's header is clicked.\n * ({ columnData: any, dataKey: string }): void\n */\n onHeaderClick: PropTypes.func,\n\n /**\n * Callback invoked when a user clicks on a table row.\n * ({ index: number }): void\n */\n onRowClick: PropTypes.func,\n\n /**\n * Callback invoked when a user double-clicks on a table row.\n * ({ index: number }): void\n */\n onRowDoubleClick: PropTypes.func,\n\n /**\n * Callback invoked when the mouse leaves a table row.\n * ({ index: number }): void\n */\n onRowMouseOut: PropTypes.func,\n\n /**\n * Callback invoked when a user moves the mouse over a table row.\n * ({ index: number }): void\n */\n onRowMouseOver: PropTypes.func,\n\n /**\n * Callback invoked when a user right-clicks on a table row.\n * ({ index: number }): void\n */\n onRowRightClick: PropTypes.func,\n\n /**\n * Callback invoked with information about the slice of rows that were just rendered.\n * ({ startIndex, stopIndex }): void\n */\n onRowsRendered: PropTypes.func,\n\n /**\n * Callback invoked whenever the scroll offset changes within the inner scrollable region.\n * This callback can be used to sync scrolling between lists, tables, or grids.\n * ({ clientHeight, scrollHeight, scrollTop }): void\n */\n onScroll: PropTypes.func.isRequired,\n\n /** See Grid#overscanIndicesGetter */\n overscanIndicesGetter: PropTypes.func.isRequired,\n\n /**\n * Number of rows to render above/below the visible bounds of the list.\n * These rows can help for smoother scrolling on touch devices.\n */\n overscanRowCount: PropTypes.number.isRequired,\n\n /**\n * Optional CSS class to apply to all table rows (including the header row).\n * This property can be a CSS class name (string) or a function that returns a class name.\n * If a function is provided its signature should be: ({ index: number }): string\n */\n rowClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n\n /**\n * Callback responsible for returning a data row given an index.\n * ({ index: number }): any\n */\n rowGetter: PropTypes.func.isRequired,\n\n /**\n * Either a fixed row height (number) or a function that returns the height of a row given its index.\n * ({ index: number }): number\n */\n rowHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.func]).isRequired,\n\n /** Number of rows in table. */\n rowCount: PropTypes.number.isRequired,\n\n /**\n * Responsible for rendering a table row given an array of columns:\n * Should implement the following interface: ({\n * className: string,\n * columns: Array,\n * index: number,\n * isScrolling: boolean,\n * onRowClick: ?Function,\n * onRowDoubleClick: ?Function,\n * onRowMouseOver: ?Function,\n * onRowMouseOut: ?Function,\n * rowData: any,\n * style: any\n * }): PropTypes.node\n */\n rowRenderer: PropTypes.func,\n\n /** Optional custom inline style to attach to table rows. */\n rowStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired,\n\n /** See Grid#scrollToAlignment */\n scrollToAlignment: PropTypes.oneOf(['auto', 'end', 'start', 'center']).isRequired,\n\n /** Row index to ensure visible (by forcefully scrolling if necessary) */\n scrollToIndex: PropTypes.number.isRequired,\n\n /** Vertical offset. */\n scrollTop: PropTypes.number,\n\n /**\n * Sort function to be called if a sortable header is clicked.\n * Should implement the following interface: ({\n * defaultSortDirection: 'ASC' | 'DESC',\n * event: MouseEvent,\n * sortBy: string,\n * sortDirection: SortDirection\n * }): void\n */\n sort: PropTypes.func,\n\n /** Table data is currently sorted by this :dataKey (if it is sorted at all) */\n sortBy: PropTypes.string,\n\n /** Table data is currently sorted in this direction (if it is sorted at all) */\n sortDirection: PropTypes.oneOf([SortDirection.ASC, SortDirection.DESC]),\n\n /** Optional inline style */\n style: PropTypes.object,\n\n /** Tab index for focus */\n tabIndex: PropTypes.number,\n\n /** Width of list */\n width: PropTypes.number.isRequired\n} : {};\nimport { bpfrpt_proptype_CellPosition } from '../Grid';","import createMultiSort from './createMultiSort';\nimport defaultCellDataGetter from './defaultCellDataGetter';\nimport defaultCellRenderer from './defaultCellRenderer';\nimport defaultHeaderRowRenderer from './defaultHeaderRowRenderer.js';\nimport defaultHeaderRenderer from './defaultHeaderRenderer';\nimport defaultRowRenderer from './defaultRowRenderer';\nimport Column from './Column';\nimport SortDirection from './SortDirection';\nimport SortIndicator from './SortIndicator';\nimport Table from './Table';\n\nexport default Table;\nexport { createMultiSort, defaultCellDataGetter, defaultCellRenderer, defaultHeaderRowRenderer, defaultHeaderRenderer, defaultRowRenderer, Column, SortDirection, SortIndicator, Table };","import { requestAnimationTimeout, cancelAnimationTimeout } from '../../utils/requestAnimationTimeout';\n\n\nvar mountedInstances = [];\nvar originalBodyPointerEvents = null;\nvar disablePointerEventsTimeoutId = null;\n\nfunction enablePointerEventsIfDisabled() {\n if (disablePointerEventsTimeoutId) {\n disablePointerEventsTimeoutId = null;\n\n if (document.body && originalBodyPointerEvents != null) {\n document.body.style.pointerEvents = originalBodyPointerEvents;\n }\n\n originalBodyPointerEvents = null;\n }\n}\n\nfunction enablePointerEventsAfterDelayCallback() {\n enablePointerEventsIfDisabled();\n mountedInstances.forEach(function (instance) {\n return instance.__resetIsScrolling();\n });\n}\n\nfunction enablePointerEventsAfterDelay() {\n if (disablePointerEventsTimeoutId) {\n cancelAnimationTimeout(disablePointerEventsTimeoutId);\n }\n\n var maximumTimeout = 0;\n mountedInstances.forEach(function (instance) {\n maximumTimeout = Math.max(maximumTimeout, instance.props.scrollingResetTimeInterval);\n });\n\n disablePointerEventsTimeoutId = requestAnimationTimeout(enablePointerEventsAfterDelayCallback, maximumTimeout);\n}\n\nfunction onScrollWindow(event) {\n if (event.currentTarget === window && originalBodyPointerEvents == null && document.body) {\n originalBodyPointerEvents = document.body.style.pointerEvents;\n\n document.body.style.pointerEvents = 'none';\n }\n enablePointerEventsAfterDelay();\n mountedInstances.forEach(function (instance) {\n if (instance.props.scrollElement === event.currentTarget) {\n instance.__handleWindowScrollEvent();\n }\n });\n}\n\nexport function registerScrollListener(component, element) {\n if (!mountedInstances.some(function (instance) {\n return instance.props.scrollElement === element;\n })) {\n element.addEventListener('scroll', onScrollWindow);\n }\n mountedInstances.push(component);\n}\n\nexport function unregisterScrollListener(component, element) {\n mountedInstances = mountedInstances.filter(function (instance) {\n return instance !== component;\n });\n if (!mountedInstances.length) {\n element.removeEventListener('scroll', onScrollWindow);\n if (disablePointerEventsTimeoutId) {\n cancelAnimationTimeout(disablePointerEventsTimeoutId);\n enablePointerEventsIfDisabled();\n }\n }\n}\nimport { bpfrpt_proptype_WindowScroller } from '../WindowScroller.js';","\n\n/**\n * Gets the dimensions of the element, accounting for API differences between\n * `window` and other DOM elements.\n */\n\nvar isWindow = function isWindow(element) {\n return element === window;\n};\n\n// TODO Move this into WindowScroller and import from there\n\n\nvar getBoundingBox = function getBoundingBox(element) {\n return element.getBoundingClientRect();\n};\n\nexport function getDimensions(scrollElement, props) {\n if (!scrollElement) {\n return {\n height: props.serverHeight,\n width: props.serverWidth\n };\n } else if (isWindow(scrollElement)) {\n var _window = window,\n innerHeight = _window.innerHeight,\n innerWidth = _window.innerWidth;\n\n return {\n height: typeof innerHeight === 'number' ? innerHeight : 0,\n width: typeof innerWidth === 'number' ? innerWidth : 0\n };\n } else {\n return getBoundingBox(scrollElement);\n }\n}\n\n/**\n * Gets the vertical and horizontal position of an element within its scroll container.\n * Elements that have been “scrolled past” return negative values.\n * Handles edge-case where a user is navigating back (history) from an already-scrolled page.\n * In this case the body’s top or left position will be a negative number and this element’s top or left will be increased (by that amount).\n */\nexport function getPositionOffset(element, container) {\n if (isWindow(container) && document.documentElement) {\n var containerElement = document.documentElement;\n var elementRect = getBoundingBox(element);\n var containerRect = getBoundingBox(containerElement);\n return {\n top: elementRect.top - containerRect.top,\n left: elementRect.left - containerRect.left\n };\n } else {\n var scrollOffset = getScrollOffset(container);\n var _elementRect = getBoundingBox(element);\n var _containerRect = getBoundingBox(container);\n return {\n top: _elementRect.top + scrollOffset.top - _containerRect.top,\n left: _elementRect.left + scrollOffset.left - _containerRect.left\n };\n }\n}\n\n/**\n * Gets the vertical and horizontal scroll amount of the element, accounting for IE compatibility\n * and API differences between `window` and other DOM elements.\n */\nexport function getScrollOffset(element) {\n if (isWindow(element) && document.documentElement) {\n return {\n top: 'scrollY' in window ? window.scrollY : document.documentElement.scrollTop,\n left: 'scrollX' in window ? window.scrollX : document.documentElement.scrollLeft\n };\n } else {\n return {\n top: element.scrollTop,\n left: element.scrollLeft\n };\n }\n}","import _extends from 'babel-runtime/helpers/extends';\nimport _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { registerScrollListener, unregisterScrollListener } from './utils/onScroll';\nimport { getDimensions, getPositionOffset, getScrollOffset } from './utils/dimensions';\nimport createDetectElementResize from '../vendor/detectElementResize';\n\n/**\n * Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress.\n * This improves performance and makes scrolling smoother.\n */\nexport var IS_SCROLLING_TIMEOUT = 150;\n\nvar getWindow = function getWindow() {\n return typeof window !== 'undefined' ? window : undefined;\n};\n\nvar WindowScroller = function (_React$PureComponent) {\n _inherits(WindowScroller, _React$PureComponent);\n\n function WindowScroller() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, WindowScroller);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = WindowScroller.__proto__ || _Object$getPrototypeOf(WindowScroller)).call.apply(_ref, [this].concat(args))), _this), _this._window = getWindow(), _this._isMounted = false, _this._positionFromTop = 0, _this._positionFromLeft = 0, _this.state = _extends({}, getDimensions(_this.props.scrollElement, _this.props), {\n isScrolling: false,\n scrollLeft: 0,\n scrollTop: 0\n }), _this._registerChild = function (element) {\n if (element && !(element instanceof Element)) {\n console.warn('WindowScroller registerChild expects to be passed Element or null');\n }\n _this._child = element;\n _this.updatePosition();\n }, _this._onChildScroll = function (_ref2) {\n var scrollTop = _ref2.scrollTop;\n\n if (_this.state.scrollTop === scrollTop) {\n return;\n }\n\n var scrollElement = _this.props.scrollElement;\n if (scrollElement) {\n if (typeof scrollElement.scrollTo === 'function') {\n scrollElement.scrollTo(0, scrollTop + _this._positionFromTop);\n } else {\n scrollElement.scrollTop = scrollTop + _this._positionFromTop;\n }\n }\n }, _this._registerResizeListener = function (element) {\n if (element === window) {\n window.addEventListener('resize', _this._onResize, false);\n } else {\n _this._detectElementResize.addResizeListener(element, _this._onResize);\n }\n }, _this._unregisterResizeListener = function (element) {\n if (element === window) {\n window.removeEventListener('resize', _this._onResize, false);\n } else if (element) {\n _this._detectElementResize.removeResizeListener(element, _this._onResize);\n }\n }, _this._onResize = function () {\n _this.updatePosition();\n }, _this.__handleWindowScrollEvent = function () {\n if (!_this._isMounted) {\n return;\n }\n\n var onScroll = _this.props.onScroll;\n\n\n var scrollElement = _this.props.scrollElement;\n if (scrollElement) {\n var scrollOffset = getScrollOffset(scrollElement);\n var _scrollLeft = Math.max(0, scrollOffset.left - _this._positionFromLeft);\n var _scrollTop = Math.max(0, scrollOffset.top - _this._positionFromTop);\n\n _this.setState({\n isScrolling: true,\n scrollLeft: _scrollLeft,\n scrollTop: _scrollTop\n });\n\n onScroll({\n scrollLeft: _scrollLeft,\n scrollTop: _scrollTop\n });\n }\n }, _this.__resetIsScrolling = function () {\n _this.setState({\n isScrolling: false\n });\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(WindowScroller, [{\n key: 'updatePosition',\n value: function updatePosition() {\n var scrollElement = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.scrollElement;\n var onResize = this.props.onResize;\n var _state = this.state,\n height = _state.height,\n width = _state.width;\n\n\n var thisNode = this._child || ReactDOM.findDOMNode(this);\n if (thisNode instanceof Element && scrollElement) {\n var offset = getPositionOffset(thisNode, scrollElement);\n this._positionFromTop = offset.top;\n this._positionFromLeft = offset.left;\n }\n\n var dimensions = getDimensions(scrollElement, this.props);\n if (height !== dimensions.height || width !== dimensions.width) {\n this.setState({\n height: dimensions.height,\n width: dimensions.width\n });\n onResize({\n height: dimensions.height,\n width: dimensions.width\n });\n }\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n var scrollElement = this.props.scrollElement;\n\n this._detectElementResize = createDetectElementResize();\n\n this.updatePosition(scrollElement);\n\n if (scrollElement) {\n registerScrollListener(this, scrollElement);\n this._registerResizeListener(scrollElement);\n }\n\n this._isMounted = true;\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps, prevState) {\n var scrollElement = this.props.scrollElement;\n var prevScrollElement = prevProps.scrollElement;\n\n\n if (prevScrollElement !== scrollElement && prevScrollElement != null && scrollElement != null) {\n this.updatePosition(scrollElement);\n\n unregisterScrollListener(this, prevScrollElement);\n registerScrollListener(this, scrollElement);\n\n this._unregisterResizeListener(prevScrollElement);\n this._registerResizeListener(scrollElement);\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n var scrollElement = this.props.scrollElement;\n if (scrollElement) {\n unregisterScrollListener(this, scrollElement);\n this._unregisterResizeListener(scrollElement);\n }\n\n this._isMounted = false;\n }\n }, {\n key: 'render',\n value: function render() {\n var children = this.props.children;\n var _state2 = this.state,\n isScrolling = _state2.isScrolling,\n scrollTop = _state2.scrollTop,\n scrollLeft = _state2.scrollLeft,\n height = _state2.height,\n width = _state2.width;\n\n\n return children({\n onChildScroll: this._onChildScroll,\n registerChild: this._registerChild,\n height: height,\n isScrolling: isScrolling,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n width: width\n });\n }\n\n // Referenced by utils/onScroll\n\n\n // Referenced by utils/onScroll\n\n }]);\n\n return WindowScroller;\n}(React.PureComponent);\n\nWindowScroller.defaultProps = {\n onResize: function onResize() {},\n onScroll: function onScroll() {},\n scrollingResetTimeInterval: IS_SCROLLING_TIMEOUT,\n scrollElement: getWindow(),\n serverHeight: 0,\n serverWidth: 0\n};\nWindowScroller.propTypes = process.env.NODE_ENV === 'production' ? null : {\n /**\n * Function responsible for rendering children.\n * This function should implement the following signature:\n * ({ height, isScrolling, scrollLeft, scrollTop, width }) => PropTypes.element\n */\n children: PropTypes.func.isRequired,\n\n\n /** Callback to be invoked on-resize: ({ height, width }) */\n onResize: PropTypes.func.isRequired,\n\n\n /** Callback to be invoked on-scroll: ({ scrollLeft, scrollTop }) */\n onScroll: PropTypes.func.isRequired,\n\n\n /** Element to attach scroll event listeners. Defaults to window. */\n scrollElement: PropTypes.oneOfType([PropTypes.any, function () {\n return (typeof Element === 'function' ? PropTypes.instanceOf(Element) : PropTypes.any).apply(this, arguments);\n }]),\n\n /**\n * Wait this amount of time after the last scroll event before resetting child `pointer-events`.\n */\n scrollingResetTimeInterval: PropTypes.number.isRequired,\n\n\n /** Height used for server-side rendering */\n serverHeight: PropTypes.number.isRequired,\n\n\n /** Width used for server-side rendering */\n serverWidth: PropTypes.number.isRequired\n};\nexport default WindowScroller;\nimport PropTypes from 'prop-types';","/** @license React v17.0.1\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';require(\"object-assign\");var f=require(\"react\"),g=60103;exports.Fragment=60107;if(\"function\"===typeof Symbol&&Symbol.for){var h=Symbol.for;g=h(\"react.element\");exports.Fragment=h(\"react.fragment\")}var m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,k){var b,d={},e=null,l=null;void 0!==k&&(e=\"\"+k);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(l=a.ref);for(b in a)n.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:g,type:c,key:e,ref:l,props:d,_owner:m.current}}exports.jsx=q;exports.jsxs=q;\n","/** @license React v17.0.1\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=require(\"object-assign\"),n=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;var u=60115,v=60116;\nif(\"function\"===typeof Symbol&&Symbol.for){var w=Symbol.for;n=w(\"react.element\");p=w(\"react.portal\");exports.Fragment=w(\"react.fragment\");exports.StrictMode=w(\"react.strict_mode\");exports.Profiler=w(\"react.profiler\");q=w(\"react.provider\");r=w(\"react.context\");t=w(\"react.forward_ref\");exports.Suspense=w(\"react.suspense\");u=w(\"react.memo\");v=w(\"react.lazy\")}var x=\"function\"===typeof Symbol&&Symbol.iterator;\nfunction y(a){if(null===a||\"object\"!==typeof a)return null;a=x&&a[x]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}function z(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;c