`) + ("`" + (` by default. You can change this\n * behavior by providing a ` + "`"))) + ((`component` + ("`" + ` prop.\n * If you use React v16+ and would like to avoid a wrapping `)) + ("`" + (`
` + "`")))) + (((` element\n * you can pass in ` + "`") + (`component={null}` + ("`" + `. This is useful if the wrapping div\n * borks your css styles.\n */\n component: _propTypes.default.any,\n\n /**\n * A set of `))) + (("`" + (`
` + "`")) + (` components, that are toggled ` + ("`" + `in`)))))) + ((((("`" + ` and out as they\n * leave. the `) + ("`" + (`` + "`"))) + ((` will inject specific transition props, so\n * remember to spread them through if you are wrapping the ` + ("`" + ``)) + ("`" + (` as\n * with our ` + "`")))) + (((`` + "`") + (` example.\n *\n * While this component is meant to make it easier to animate multiple\n * ` + ("`" + `Transition`))) + (("`" + (` or ` + "`")) + (`CSSTransition` + ("`" + ` children, sometimes you want to transition a\n * single child by changing its content, e.g. routes, slides, images in a\n * carousel etc. In that case you can change the `))))) + (((("`" + `key`) + ("`" + (` prop of the child\n * component along with its content, that way ` + "`"))) + ((`TransitionGroup` + ("`" + ` will know that\n * it should transition the child.\n */\n children: _propTypes.default.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: _propTypes.default.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: _propTypes.default.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: _propTypes.default.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `)) + ("`" + (`cloneElement` + "`")))) + (((` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a ` + ("`" + `childFactory`)) + ("`" + (`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: _propTypes.default.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\n\nvar _default = (0, _reactLifecyclesCompat.polyfill)(TransitionGroup);\n\nexports.default = _default;\nmodule.exports = exports[\"default\"];",
"\"use strict\";\n\nvar _CSSTransition = _interopRequireDefault(require(\"./CSSTransition\"));\n\nvar _ReplaceTransition = _interopRequireDefault(require(\"./ReplaceTransition\"));\n\nvar _TransitionGroup = _interopRequireDefault(require(\"./TransitionGroup\"));\n\nvar _Transition = _interopRequireDefault(require(\"./Transition\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nmodule.exports = {\n Transition: _Transition.default,\n TransitionGroup: _TransitionGroup.default,\n ReplaceTransition: _ReplaceTransition.default,\n CSSTransition: _CSSTransition.default\n};",
"\"use strict\";\n\nexports.__esModule = true;\nexports.getChildMapping = getChildMapping;\nexports.mergeChildMappings = mergeChildMappings;\nexports.getInitialChildMapping = getInitialChildMapping;\nexports.getNextChildMapping = getNextChildMapping;\n\nvar _react = require(\"react\");\n\n/**\n * Given ` + "`"))) + ((`this.props.children` + ("`" + `, return an object mapping key to child.\n *\n * @param {*} children `)) + ("`" + (`this.props.children` + "`"))))))) + ((((((`\n * @return {object} Mapping of key to child\n */\nfunction getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && (0, _react.isValidElement)(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) _react.Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * ` + "`") + (`ReactTransitionChildMapping.getChildMapping()` + ("`" + `.\n * @param {object} next next children as returned from\n * `))) + (("`" + (`ReactTransitionChildMapping.getChildMapping()` + "`")) + (`.\n * @return {object} a key set that contains all keys in ` + ("`" + `prev`)))) + ((("`" + ` and all keys\n * in `) + ("`" + (`next` + "`"))) + ((` in a reasonable order.\n */\n\n\nfunction mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of ` + ("`" + `next`)) + ("`" + (`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in ` + "`"))))) + ((((`next` + "`") + (`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nfunction getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return (0, _react.cloneElement)(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\n\nfunction getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!(0, _react.isValidElement)(child)) return;\n var hasPrev = key in prevChildMapping;\n var hasNext = key in nextChildMapping;\n var prevChild = prevChildMapping[key];\n var isLeaving = (0, _react.isValidElement)(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = (0, _react.cloneElement)(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = (0, _react.cloneElement)(child, {\n in: false\n });\n } else if (hasNext && hasPrev && (0, _react.isValidElement)(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = (0, _react.cloneElement)(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}",
"\"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;",
"/** @license React v16.8.4\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\n'use strict';var k=require(\"object-assign\"),n=\"function\"===typeof Symbol&&Symbol.for,p=n?Symbol.for(\"react.element\"):60103,q=n?Symbol.for(\"react.portal\"):60106,r=n?Symbol.for(\"react.fragment\"):60107,t=n?Symbol.for(\"react.strict_mode\"):60108,u=n?Symbol.for(\"react.profiler\"):60114,v=n?Symbol.for(\"react.provider\"):60109,w=n?Symbol.for(\"react.context\"):60110,x=n?Symbol.for(\"react.concurrent_mode\"):60111,y=n?Symbol.for(\"react.forward_ref\"):60112,z=n?Symbol.for(\"react.suspense\"):60113,aa=n?Symbol.for(\"react.memo\"):\n60115,ba=n?Symbol.for(\"react.lazy\"):60116,A=\"function\"===typeof Symbol&&Symbol.iterator;function ca(a,b,d,c,e,g,h,f){if(!a){a=void 0;if(void 0===b)a=Error(\"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.\");else{var l=[d,c,e,g,h,f],m=0;a=Error(b.replace(/%s/g,function(){return l[m++]}));a.name=\"Invariant Violation\"}a.framesToPop=1;throw a;}}\nfunction B(a){for(var b=arguments.length-1,d=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=0;cP.length&&P.push(a)}\nfunction S(a,b,d,c){var e=typeof a;if(\"undefined\"===e||\"boolean\"===e)a=null;var g=!1;if(null===a)g=!0;else switch(e){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case p:case q:g=!0}}if(g)return d(c,a,\"\"===b?\".\"+T(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var h=0;h max) {\n validMin = max;\n validMax = min;\n }\n\n return [validMin, validMax];\n}\n/**\n * Calculate the step which is easy to understand between ticks, like 10, 20, 25\n *\n * @param {Decimal} roughStep The rough step calculated by deviding the\n * difference by the tickCount\n * @param {Boolean} allowDecimals Allow the ticks to be decimals or not\n * @param {Integer} correctionFactor A correction factor\n * @return {Decimal} The step which is easy to understand between two ticks\n */\n\n\nfunction getFormatStep(roughStep, allowDecimals, correctionFactor) {\n if (roughStep.lte(0)) {\n return new _decimal.default(0);\n }\n\n var digitCount = _arithmetic.default.getDigitCount(roughStep.toNumber()); // The ratio between the rough step and the smallest number which has a bigger\n // order of magnitudes than the rough step\n\n\n var digitCountValue = new _decimal.default(10).pow(digitCount);\n var stepRatio = roughStep.div(digitCountValue); // When an integer and a float multiplied, the accuracy of result may be wrong\n\n var stepRatioScale = digitCount !== 1 ? 0.05 : 0.1;\n var amendStepRatio = new _decimal.default(Math.ceil(stepRatio.div(stepRatioScale).toNumber())).add(correctionFactor).mul(stepRatioScale);\n var formatStep = amendStepRatio.mul(digitCountValue);\n return allowDecimals ? formatStep : new _decimal.default(Math.ceil(formatStep));\n}\n/**\n * calculate the ticks when the minimum value equals to the maximum value\n *\n * @param {Number} value The minimum valuue which is also the maximum value\n * @param {Integer} tickCount The count of ticks\n * @param {Boolean} allowDecimals Allow the ticks to be decimals or not\n * @return {Array} ticks\n */\n\n\nfunction getTickOfSingleValue(value, tickCount, allowDecimals) {\n var step = 1; // calculate the middle value of ticks\n\n var middle = new _decimal.default(value);\n\n if (!middle.isint() && allowDecimals) {\n var absVal = Math.abs(value);\n\n if (absVal < 1) {\n // The step should be a float number when the difference is smaller than 1\n step = new _decimal.default(10).pow(_arithmetic.default.getDigitCount(value) - 1);\n middle = new _decimal.default(Math.floor(middle.div(step).toNumber())).mul(step);\n } else if (absVal > 1) {\n // Return the maximum integer which is smaller than 'value' when 'value' is greater than 1\n middle = new _decimal.default(Math.floor(value));\n }\n } else if (value === 0) {\n middle = new _decimal.default(Math.floor((tickCount - 1) / 2));\n } else if (!allowDecimals) {\n middle = new _decimal.default(Math.floor(value));\n }\n\n var middleIndex = Math.floor((tickCount - 1) / 2);\n var fn = (0, _utils.compose)((0, _utils.map)(function (n) {\n return middle.add(new _decimal.default(n - middleIndex).mul(step)).toNumber();\n }), _utils.range);\n return fn(0, tickCount);\n}\n/**\n * Calculate the step\n *\n * @param {Number} min The minimum value of an interval\n * @param {Number} max The maximum value of an interval\n * @param {Integer} tickCount The count of ticks\n * @param {Boolean} allowDecimals Allow the ticks to be decimals or not\n * @param {Number} correctionFactor A correction factor\n * @return {Object} The step, minimum value of ticks, maximum value of ticks\n */\n\n\nfunction calculateStep(min, max, tickCount, allowDecimals) {\n var correctionFactor = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n\n // dirty hack (for recharts' test)\n if (!Number.isFinite((max - min) / (tickCount - 1))) {\n return {\n step: new _decimal.default(0),\n tickMin: new _decimal.default(0),\n tickMax: new _decimal.default(0)\n };\n } // The step which is easy to understand between two ticks\n\n\n var step = getFormatStep(new _decimal.default(max).sub(min).div(tickCount - 1), allowDecimals, correctionFactor); // A medial value of ticks\n\n var middle; // When 0 is inside the interval, 0 should be a tick\n\n if (min <= 0 && max >= 0) {\n middle = new _decimal.default(0);\n } else {\n // calculate the middle value\n middle = new _decimal.default(min).add(max).div(2); // minus modulo value\n\n middle = middle.sub(new _decimal.default(middle).mod(step));\n }\n\n var belowCount = Math.ceil(middle.sub(min).div(step).toNumber());\n var upCount = Math.ceil(new _decimal.default(max).sub(middle).div(step).toNumber());\n var scaleCount = belowCount + upCount + 1;\n\n if (scaleCount > tickCount) {\n // When more ticks need to cover the interval, step should be bigger.\n return calculateStep(min, max, tickCount, allowDecimals, correctionFactor + 1);\n }\n\n if (scaleCount < tickCount) {\n // When less ticks can cover the interval, we should add some additional ticks\n upCount = max > 0 ? upCount + (tickCount - scaleCount) : upCount;\n belowCount = max > 0 ? belowCount : belowCount + (tickCount - scaleCount);\n }\n\n return {\n step: step,\n tickMin: middle.sub(new _decimal.default(belowCount).mul(step)),\n tickMax: middle.add(new _decimal.default(upCount).mul(step))\n };\n}\n/**\n * Calculate the ticks of an interval, the count of ticks will be guraranteed\n *\n * @param {Number} min, max min: The minimum value, max: The maximum value\n * @param {Integer} tickCount The count of ticks\n * @param {Boolean} allowDecimals Allow the ticks to be decimals or not\n * @return {Array} ticks\n */\n\n\nfunction getNiceTickValuesFn(_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n min = _ref4[0],\n max = _ref4[1];\n\n var tickCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;\n var allowDecimals = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n // More than two ticks should be return\n var count = Math.max(tickCount, 2);\n\n var _getValidInterval = getValidInterval([min, max]),\n _getValidInterval2 = _slicedToArray(_getValidInterval, 2),\n cormin = _getValidInterval2[0],\n cormax = _getValidInterval2[1];\n\n if (cormin === -Infinity || cormax === Infinity) {\n var _values = cormax === Infinity ? [cormin].concat(_toConsumableArray((0, _utils.range)(0, tickCount - 1).map(function () {\n return Infinity;\n }))) : _toConsumableArray((0, _utils.range)(0, tickCount - 1).map(function () {\n return -Infinity;\n })).concat([cormax]);\n\n return min > max ? (0, _utils.reverse)(_values) : _values;\n }\n\n if (cormin === cormax) {\n return getTickOfSingleValue(cormin, tickCount, allowDecimals);\n } // Get the step between two ticks\n\n\n var _calculateStep = calculateStep(cormin, cormax, count, allowDecimals),\n step = _calculateStep.step,\n tickMin = _calculateStep.tickMin,\n tickMax = _calculateStep.tickMax;\n\n var values = _arithmetic.default.rangeStep(tickMin, tickMax.add(new _decimal.default(0.1).mul(step)), step);\n\n return min > max ? (0, _utils.reverse)(values) : values;\n}\n/**\n * Calculate the ticks of an interval, the count of ticks won't be guraranteed\n *\n * @param {Number} min, max min: The minimum value, max: The maximum value\n * @param {Integer} tickCount The count of ticks\n * @param {Boolean} allowDecimals Allow the ticks to be decimals or not\n * @return {Array} ticks\n */\n\n\nfunction getTickValuesFn(_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n min = _ref6[0],\n max = _ref6[1];\n\n var tickCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;\n var allowDecimals = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n // More than two ticks should be return\n var count = Math.max(tickCount, 2);\n\n var _getValidInterval3 = getValidInterval([min, max]),\n _getValidInterval4 = _slicedToArray(_getValidInterval3, 2),\n cormin = _getValidInterval4[0],\n cormax = _getValidInterval4[1];\n\n if (cormin === -Infinity || cormax === Infinity) {\n return [min, max];\n }\n\n if (cormin === cormax) {\n return getTickOfSingleValue(cormin, tickCount, allowDecimals);\n }\n\n var step = getFormatStep(new _decimal.default(cormax).sub(cormin).div(count - 1), allowDecimals, 0);\n var fn = (0, _utils.compose)((0, _utils.map)(function (n) {\n return new _decimal.default(cormin).add(new _decimal.default(n).mul(step)).toNumber();\n }), _utils.range);\n var values = fn(0, count).filter(function (entry) {\n return entry >= cormin && entry <= cormax;\n });\n return min > max ? (0, _utils.reverse)(values) : values;\n}\n/**\n * Calculate the ticks of an interval, the count of ticks won't be guraranteed,\n * but the domain will be guaranteed\n *\n * @param {Number} min, max min: The minimum value, max: The maximum value\n * @param {Integer} tickCount The count of ticks\n * @param {Boolean} allowDecimals Allow the ticks to be decimals or not\n * @return {Array} ticks\n */\n\n\nfunction getTickValuesFixedDomainFn(_ref7, tickCount) {\n var _ref8 = _slicedToArray(_ref7, 2),\n min = _ref8[0],\n max = _ref8[1];\n\n var allowDecimals = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n // More than two ticks should be return\n var _getValidInterval5 = getValidInterval([min, max]),\n _getValidInterval6 = _slicedToArray(_getValidInterval5, 2),\n cormin = _getValidInterval6[0],\n cormax = _getValidInterval6[1];\n\n if (cormin === -Infinity || cormax === Infinity) {\n return [min, max];\n }\n\n if (cormin === cormax) {\n return [cormin];\n }\n\n var count = Math.max(tickCount, 2);\n var step = getFormatStep(new _decimal.default(cormax).sub(cormin).div(count - 1), allowDecimals, 0);\n\n var values = _toConsumableArray(_arithmetic.default.rangeStep(new _decimal.default(cormin), new _decimal.default(cormax).sub(new _decimal.default(0.99).mul(step)), step)).concat([cormax]);\n\n return min > max ? (0, _utils.reverse)(values) : values;\n}\n\nvar getNiceTickValues = (0, _utils.memoize)(getNiceTickValuesFn);\nexports.getNiceTickValues = getNiceTickValues;\nvar getTickValues = (0, _utils.memoize)(getTickValuesFn);\nexports.getTickValues = getTickValues;\nvar getTickValuesFixedDomain = (0, _utils.memoize)(getTickValuesFixedDomainFn);\nexports.getTickValuesFixedDomain = getTickValuesFixedDomain;",
"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"getTickValues\", {\n enumerable: true,\n get: function get() {\n return _getNiceTickValues.getTickValues;\n }\n});\nObject.defineProperty(exports, \"getNiceTickValues\", {\n enumerable: true,\n get: function get() {\n return _getNiceTickValues.getNiceTickValues;\n }\n});\nObject.defineProperty(exports, \"getTickValuesFixedDomain\", {\n enumerable: true,\n get: function get() {\n return _getNiceTickValues.getTickValuesFixedDomain;\n }\n});\n\nvar _getNiceTickValues = require(\"./getNiceTickValues\");",
"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _decimal = _interopRequireDefault(require(\"decimal.js-light\"));\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @fileOverview 一些公用的运算方法\n * @author xile611\n * @date 2015-09-17\n */\n\n/**\n * 获取数值的位数\n * 其中绝对值属于区间[0.1, 1), 得到的值为0\n * 绝对值属于区间[0.01, 0.1),得到的位数为 -1\n * 绝对值属于区间[0.001, 0.01),得到的位数为 -2\n *\n * @param {Number} value 数值\n * @return {Integer} 位数\n */\nfunction getDigitCount(value) {\n var result;\n\n if (value === 0) {\n result = 1;\n } else {\n result = Math.floor(new _decimal.default(value).abs().log(10).toNumber()) + 1;\n }\n\n return result;\n}\n/**\n * 按照固定的步长获取[start, end)这个区间的数据\n * 并且需要处理js计算精度的问题\n *\n * @param {Decimal} start 起点\n * @param {Decimal} end 终点,不包含该值\n * @param {Decimal} step 步长\n * @return {Array} 若干数值\n */\n\n\nfunction rangeStep(start, end, step) {\n var num = new _decimal.default(start);\n var result = [];\n\n while (num.lt(end)) {\n result.push(num.toNumber());\n num = num.add(step);\n }\n\n return result;\n}\n/**\n * 对数值进行线性插值\n *\n * @param {Number} a 定义域的极点\n * @param {Number} b 定义域的极点\n * @param {Number} t [0, 1]内的某个值\n * @return {Number} 定义域内的某个值\n */\n\n\nvar interpolateNumber = (0, _utils.curry)(function (a, b, t) {\n var newA = +a;\n var newB = +b;\n return newA + t * (newB - newA);\n});\n/**\n * 线性插值的逆运算\n *\n * @param {Number} a 定义域的极点\n * @param {Number} b 定义域的极点\n * @param {Number} x 可以认为是插值后的一个输出值\n * @return {Number} 当x在 a ~ b这个范围内时,返回值属于[0, 1]\n */\n\nvar uninterpolateNumber = (0, _utils.curry)(function (a, b, x) {\n var diff = b - +a;\n diff = diff || Infinity;\n return (x - a) / diff;\n});\n/**\n * 线性插值的逆运算,并且有截断的操作\n *\n * @param {Number} a 定义域的极点\n * @param {Number} b 定义域的极点\n * @param {Number} x 可以认为是插值后的一个输出值\n * @return {Number} 当x在 a ~ b这个区间内时,返回值属于[0, 1],\n * 当x不在 a ~ b这个区间时,会截断到 a ~ b 这个区间\n */\n\nvar uninterpolateTruncation = (0, _utils.curry)(function (a, b, x) {\n var diff = b - +a;\n diff = diff || Infinity;\n return Math.max(0, Math.min(1, (x - a) / diff));\n});\nvar _default = {\n rangeStep: rangeStep,\n getDigitCount: getDigitCount,\n interpolateNumber: interpolateNumber,\n uninterpolateNumber: uninterpolateNumber,\n uninterpolateTruncation: uninterpolateTruncation\n};\nexports.default = _default;",
"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.memoize = exports.reverse = exports.compose = exports.map = exports.range = exports.curry = exports.PLACE_HOLDER = void 0;\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nvar identity = function identity(i) {\n return i;\n};\n\nvar PLACE_HOLDER = {\n '@@functional/placeholder': true\n};\nexports.PLACE_HOLDER = PLACE_HOLDER;\n\nvar isPlaceHolder = function isPlaceHolder(val) {\n return val === PLACE_HOLDER;\n};\n\nvar curry0 = function curry0(fn) {\n return function _curried() {\n if (arguments.length === 0 || arguments.length === 1 && isPlaceHolder(arguments.length <= 0 ? undefined : arguments[0])) {\n return _curried;\n }\n\n return fn.apply(void 0, arguments);\n };\n};\n\nvar curryN = function curryN(n, fn) {\n if (n === 1) {\n return fn;\n }\n\n return curry0(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var argsLength = args.filter(function (arg) {\n return arg !== PLACE_HOLDER;\n }).length;\n\n if (argsLength >= n) {\n return fn.apply(void 0, args);\n }\n\n return curryN(n - argsLength, curry0(function () {\n for (var _len2 = arguments.length, restArgs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n restArgs[_key2] = arguments[_key2];\n }\n\n var newArgs = args.map(function (arg) {\n return isPlaceHolder(arg) ? restArgs.shift() : arg;\n });\n return fn.apply(void 0, _toConsumableArray(newArgs).concat(restArgs));\n }));\n });\n};\n\nvar curry = function curry(fn) {\n return curryN(fn.length, fn);\n};\n\nexports.curry = curry;\n\nvar range = function range(begin, end) {\n var arr = [];\n\n for (var i = begin; i < end; ++i) {\n arr[i - begin] = i;\n }\n\n return arr;\n};\n\nexports.range = range;\nvar map = curry(function (fn, arr) {\n if (Array.isArray(arr)) {\n return arr.map(fn);\n }\n\n return Object.keys(arr).map(function (key) {\n return arr[key];\n }).map(fn);\n});\nexports.map = map;\n\nvar compose = function compose() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n if (!args.length) {\n return identity;\n }\n\n var fns = args.reverse(); // first function can receive multiply arguments\n\n var firstFn = fns[0];\n var tailsFn = fns.slice(1);\n return function () {\n return tailsFn.reduce(function (res, fn) {\n return fn(res);\n }, firstFn.apply(void 0, arguments));\n };\n};\n\nexports.compose = compose;\n\nvar reverse = function reverse(arr) {\n if (Array.isArray(arr)) {\n return arr.reverse();\n } // can be string\n\n\n return arr.split('').reverse.join('');\n};\n\nexports.reverse = reverse;\n\nvar memoize = function memoize(fn) {\n var lastArgs = null;\n var lastResult = null;\n return function () {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n if (lastArgs && args.every(function (val, i) {\n return val === lastArgs[i];\n })) {\n return lastResult;\n }\n\n lastArgs = args;\n lastResult = fn.apply(void 0, args);\n return lastResult;\n };\n};\n\nexports.memoize = memoize;",
"import _isEqual from \"lodash/isEqual\";\nimport _isNaN from \"lodash/isNaN\";\nimport _isFunction from \"lodash/isFunction\";\nimport _get from \"lodash/get\";\nimport _isNil from \"lodash/isNil\";\nimport _isArray from \"lodash/isArray\";\n\nvar _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview Area\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Animate from 'react-smooth';\nimport Curve from '../shape/Curve';\nimport Dot from '../shape/Dot';\nimport Layer from '../container/Layer';\nimport LabelList from '../component/LabelList';\nimport pureRender from '../util/PureRender';\nimport { PRESENTATION_ATTRIBUTES, EVENT_ATTRIBUTES, LEGEND_TYPES, getPresentationAttributes, isSsr, filterEventAttributes } from '../util/ReactUtils';\nimport { isNumber, uniqueId, interpolateNumber } from '../util/DataUtils';\nimport { getCateCoordinateOfLine, getValueByDataKey } from '../util/ChartUtils';\n\nvar Area = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(Area, _Component);\n\n function Area() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, Area);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Area)).call.apply(_getPrototypeOf2, [this].concat(args)));\n _this.state = {\n isAnimationFinished: true\n };\n _this.id = uniqueId('recharts-area-');\n\n _this.cachePrevData = function (points, baseLine) {\n _this.setState({\n prevPoints: points,\n prevBaseLine: baseLine\n });\n };\n\n _this.handleAnimationEnd = function () {\n var onAnimationEnd = _this.props.onAnimationEnd;\n\n _this.setState({\n isAnimationFinished: true\n });\n\n if (_isFunction(onAnimationEnd)) {\n onAnimationEnd();\n }\n };\n\n _this.handleAnimationStart = function () {\n var onAnimationStart = _this.props.onAnimationStart;\n\n _this.setState({\n isAnimationFinished: false\n });\n\n if (_isFunction(onAnimationStart)) {\n onAnimationStart();\n }\n };\n\n return _this;\n }\n\n _createClass(Area, [{\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n var _this$props = this.props,\n animationId = _this$props.animationId,\n points = _this$props.points,\n baseLine = _this$props.baseLine;\n\n if (nextProps.animationId !== animationId) {\n this.cachePrevData(points, baseLine);\n }\n }\n }, {\n key: \"renderDots\",\n value: function renderDots(needClip, clipPathId) {\n var _this2 = this;\n\n var isAnimationActive = this.props.isAnimationActive;\n var isAnimationFinished = this.state.isAnimationFinished;\n\n if (isAnimationActive && !isAnimationFinished) {\n return null;\n }\n\n var _this$props2 = this.props,\n dot = _this$props2.dot,\n points = _this$props2.points,\n dataKey = _this$props2.dataKey;\n var areaProps = getPresentationAttributes(this.props);\n var customDotProps = getPresentationAttributes(dot);\n var dotEvents = filterEventAttributes(dot);\n var dots = points.map(function (entry, i) {\n var dotProps = _objectSpread({\n key: \"dot-\".concat(i),\n r: 3\n }, areaProps, customDotProps, dotEvents, {\n dataKey: dataKey,\n cx: entry.x,\n cy: entry.y,\n index: i,\n value: entry.value,\n payload: entry.payload\n });\n\n return _this2.constructor.renderDotItem(dot, dotProps);\n });\n var dotsProps = {\n clipPath: needClip ? \"url(#clipPath-\".concat(clipPathId, \")\") : null\n };\n return React.createElement(Layer, _extends({\n className: \"recharts-area-dots\"\n }, dotsProps), dots);\n }\n }, {\n key: \"renderHorizontalRect\",\n value: function renderHorizontalRect(alpha) {\n var _this$props3 = this.props,\n baseLine = _this$props3.baseLine,\n points = _this$props3.points,\n strokeWidth = _this$props3.strokeWidth;\n var startX = points[0].x;\n var endX = points[points.length - 1].x;\n var width = alpha * Math.abs(startX - endX);\n var maxY = Math.max.apply(null, points.map(function (entry) {\n return entry.y || 0;\n }));\n\n if (isNumber(baseLine)) {\n maxY = Math.max(baseLine, maxY);\n } else if (baseLine && _isArray(baseLine) && baseLine.length) {\n maxY = Math.max(Math.max.apply(null, baseLine.map(function (entry) {\n return entry.y || 0;\n })), maxY);\n }\n\n if (isNumber(maxY)) {\n return React.createElement(\"rect\", {\n x: startX < endX ? startX : startX - width,\n y: 0,\n width: width,\n height: parseInt(maxY + (strokeWidth || 1), 10)\n });\n }\n\n return null;\n }\n }, {\n key: \"renderVerticalRect\",\n value: function renderVerticalRect(alpha) {\n var _this$props4 = this.props,\n baseLine = _this$props4.baseLine,\n points = _this$props4.points,\n strokeWidth = _this$props4.strokeWidth;\n var startY = points[0].y;\n var endY = points[points.length - 1].y;\n var height = alpha * Math.abs(startY - endY);\n var maxX = Math.max.apply(null, points.map(function (entry) {\n return entry.x || 0;\n }));\n\n if (isNumber(baseLine)) {\n maxX = Math.max(baseLine, maxX);\n } else if (baseLine && _isArray(baseLine) && baseLine.length) {\n maxX = Math.max(Math.max.apply(null, baseLine.map(function (entry) {\n return entry.x || 0;\n })), maxX);\n }\n\n if (isNumber(maxX)) {\n return React.createElement(\"rect\", {\n x: 0,\n y: startY < endY ? startY : startY - height,\n width: maxX + (strokeWidth || 1),\n height: parseInt(height, 10)\n });\n }\n\n return null;\n }\n }, {\n key: \"renderClipRect\",\n value: function renderClipRect(alpha) {\n var layout = this.props.layout;\n\n if (layout === 'vertical') {\n return this.renderVerticalRect(alpha);\n }\n\n return this.renderHorizontalRect(alpha);\n }\n }, {\n key: \"renderAreaStatically\",\n value: function renderAreaStatically(points, baseLine, needClip, clipPathId) {\n var _this$props5 = this.props,\n layout = _this$props5.layout,\n type = _this$props5.type,\n stroke = _this$props5.stroke,\n connectNulls = _this$props5.connectNulls,\n isRange = _this$props5.isRange;\n return React.createElement(Layer, {\n clipPath: needClip ? \"url(#clipPath-\".concat(clipPathId, \")\") : null\n }, React.createElement(Curve, _extends({}, this.props, {\n points: points,\n baseLine: baseLine,\n stroke: \"none\",\n className: \"recharts-area-area\"\n })), stroke !== 'none' && React.createElement(Curve, _extends({}, getPresentationAttributes(this.props), {\n className: \"recharts-area-curve\",\n layout: layout,\n type: type,\n connectNulls: connectNulls,\n fill: \"none\",\n points: points\n })), stroke !== 'none' && isRange && React.createElement(Curve, _extends({}, getPresentationAttributes(this.props), {\n className: \"recharts-area-curve\",\n layout: layout,\n type: type,\n connectNulls: connectNulls,\n fill: \"none\",\n points: baseLine\n })));\n }\n }, {\n key: \"renderAreaWithAnimation\",\n value: function renderAreaWithAnimation(needClip, clipPathId) {\n var _this3 = this;\n\n var _this$props6 = this.props,\n points = _this$props6.points,\n baseLine = _this$props6.baseLine,\n isAnimationActive = _this$props6.isAnimationActive,\n animationBegin = _this$props6.animationBegin,\n animationDuration = _this$props6.animationDuration,\n animationEasing = _this$props6.animationEasing,\n animationId = _this$props6.animationId;\n var _this$state = this.state,\n prevPoints = _this$state.prevPoints,\n prevBaseLine = _this$state.prevBaseLine; // const clipPathId = _.isNil(id) ? this.id : id;\n\n return React.createElement(Animate, {\n begin: animationBegin,\n duration: animationDuration,\n isActive: isAnimationActive,\n easing: animationEasing,\n from: {\n t: 0\n },\n to: {\n t: 1\n },\n key: \"area-\".concat(animationId),\n onAnimationEnd: this.handleAnimationEnd,\n onAnimationStart: this.handleAnimationStart\n }, function (_ref) {\n var t = _ref.t;\n\n if (prevPoints) {\n var prevPointsDiffFactor = prevPoints.length / points.length; // update animtaion\n\n var stepPoints = points.map(function (entry, index) {\n var prevPointIndex = Math.floor(index * prevPointsDiffFactor);\n\n if (prevPoints[prevPointIndex]) {\n var prev = prevPoints[prevPointIndex];\n var interpolatorX = interpolateNumber(prev.x, entry.x);\n var interpolatorY = interpolateNumber(prev.y, entry.y);\n return _objectSpread({}, entry, {\n x: interpolatorX(t),\n y: interpolatorY(t)\n });\n }\n\n return entry;\n });\n var stepBaseLine;\n\n if (isNumber(baseLine)) {\n var interpolator = interpolateNumber(prevBaseLine, baseLine);\n stepBaseLine = interpolator(t);\n } else if (_isNil(baseLine) || _isNaN(baseLine)) {\n var _interpolator = interpolateNumber(prevBaseLine, 0);\n\n stepBaseLine = _interpolator(t);\n } else {\n stepBaseLine = baseLine.map(function (entry, index) {\n var prevPointIndex = Math.floor(index * prevPointsDiffFactor);\n\n if (prevBaseLine[prevPointIndex]) {\n var prev = prevBaseLine[prevPointIndex];\n var interpolatorX = interpolateNumber(prev.x, entry.x);\n var interpolatorY = interpolateNumber(prev.y, entry.y);\n return _objectSpread({}, entry, {\n x: interpolatorX(t),\n y: interpolatorY(t)\n });\n }\n\n return entry;\n });\n }\n\n return _this3.renderAreaStatically(stepPoints, stepBaseLine, needClip, clipPathId);\n }\n\n return React.createElement(Layer, null, React.createElement(\"defs\", null, React.createElement(\"clipPath\", {\n id: \"animationClipPath-\".concat(clipPathId)\n }, _this3.renderClipRect(t))), React.createElement(Layer, {\n clipPath: \"url(#animationClipPath-\".concat(clipPathId, \")\")\n }, _this3.renderAreaStatically(points, baseLine, needClip, clipPathId)));\n });\n }\n }, {\n key: \"renderArea\",\n value: function renderArea(needClip, clipPathId) {\n var _this$props7 = this.props,\n points = _this$props7.points,\n baseLine = _this$props7.baseLine,\n isAnimationActive = _this$props7.isAnimationActive;\n var _this$state2 = this.state,\n prevPoints = _this$state2.prevPoints,\n prevBaseLine = _this$state2.prevBaseLine,\n totalLength = _this$state2.totalLength;\n\n if (isAnimationActive && points && points.length && (!prevPoints && totalLength > 0 || !_isEqual(prevPoints, points) || !_isEqual(prevBaseLine, baseLine))) {\n return this.renderAreaWithAnimation(needClip, clipPathId);\n }\n\n return this.renderAreaStatically(points, baseLine, needClip, clipPathId);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props8 = this.props,\n hide = _this$props8.hide,\n dot = _this$props8.dot,\n points = _this$props8.points,\n className = _this$props8.className,\n top = _this$props8.top,\n left = _this$props8.left,\n xAxis = _this$props8.xAxis,\n yAxis = _this$props8.yAxis,\n width = _this$props8.width,\n height = _this$props8.height,\n isAnimationActive = _this$props8.isAnimationActive,\n id = _this$props8.id;\n\n if (hide || !points || !points.length) {\n return null;\n }\n\n var isAnimationFinished = this.state.isAnimationFinished;\n var hasSinglePoint = points.length === 1;\n var layerClass = classNames('recharts-area', className);\n var needClip = xAxis && xAxis.allowDataOverflow || yAxis && yAxis.allowDataOverflow;\n var clipPathId = _isNil(id) ? this.id : id;\n return React.createElement(Layer, {\n className: layerClass\n }, needClip ? React.createElement(\"defs\", null, React.createElement(\"clipPath\", {\n id: \"clipPath-\".concat(clipPathId)\n }, React.createElement(\"rect\", {\n x: left,\n y: top,\n width: width,\n height: parseInt(height, 10)\n }))) : null, !hasSinglePoint ? this.renderArea(needClip, clipPathId) : null, (dot || hasSinglePoint) && this.renderDots(needClip, clipPathId), (!isAnimationActive || isAnimationFinished) && LabelList.renderCallByParent(this.props, points));\n }\n }]);\n\n return Area;\n}(Component), _class2.displayName = 'Area', _class2.propTypes = _objectSpread({}, PRESENTATION_ATTRIBUTES, EVENT_ATTRIBUTES, {\n className: PropTypes.string,\n dataKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.func]).isRequired,\n type: PropTypes.oneOfType([PropTypes.oneOf(['basis', 'basisClosed', 'basisOpen', 'linear', 'linearClosed', 'natural', 'monotoneX', 'monotoneY', 'monotone', 'step', 'stepBefore', 'stepAfter']), PropTypes.func]),\n unit: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n name: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n yAxisId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n xAxisId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n yAxis: PropTypes.object,\n xAxis: PropTypes.object,\n stackId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n legendType: PropTypes.oneOf(LEGEND_TYPES),\n connectNulls: PropTypes.bool,\n activeDot: PropTypes.oneOfType([PropTypes.object, PropTypes.element, PropTypes.func, PropTypes.bool]),\n // dot configuration\n dot: PropTypes.oneOfType([PropTypes.func, PropTypes.element, PropTypes.object, PropTypes.bool]),\n label: PropTypes.oneOfType([PropTypes.func, PropTypes.element, PropTypes.object, PropTypes.bool]),\n hide: PropTypes.bool,\n // have curve configuration\n layout: PropTypes.oneOf(['horizontal', 'vertical']),\n baseLine: PropTypes.oneOfType([PropTypes.number, PropTypes.array]),\n isRange: PropTypes.bool,\n points: PropTypes.arrayOf(PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number,\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.array])\n })),\n onAnimationStart: PropTypes.func,\n onAnimationEnd: PropTypes.func,\n animationId: PropTypes.number,\n isAnimationActive: PropTypes.bool,\n animationBegin: PropTypes.number,\n animationDuration: PropTypes.number,\n animationEasing: PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear']),\n id: PropTypes.string\n}), _class2.defaultProps = {\n stroke: '#3182bd',\n fill: '#3182bd',\n fillOpacity: 0.6,\n xAxisId: 0,\n yAxisId: 0,\n legendType: 'line',\n connectNulls: false,\n // points of area\n points: [],\n dot: false,\n activeDot: true,\n hide: false,\n isAnimationActive: !isSsr(),\n animationBegin: 0,\n animationDuration: 1500,\n animationEasing: 'ease'\n}, _class2.getBaseValue = function (props, xAxis, yAxis) {\n var layout = props.layout,\n baseValue = props.baseValue;\n\n if (isNumber(baseValue)) {\n return baseValue;\n }\n\n var numericAxis = layout === 'horizontal' ? yAxis : xAxis;\n var domain = numericAxis.scale.domain();\n\n if (numericAxis.type === 'number') {\n var max = Math.max(domain[0], domain[1]);\n var min = Math.min(domain[0], domain[1]);\n\n if (baseValue === 'dataMin') {\n return min;\n }\n\n if (baseValue === 'dataMax') {\n return max;\n }\n\n return max < 0 ? max : Math.max(Math.min(domain[0], domain[1]), 0);\n }\n\n if (baseValue === 'dataMin') {\n return domain[0];\n }\n\n if (baseValue === 'dataMax') {\n return domain[1];\n }\n\n return domain[0];\n}, _class2.getComposedData = function (_ref2) {\n var props = _ref2.props,\n xAxis = _ref2.xAxis,\n yAxis = _ref2.yAxis,\n xAxisTicks = _ref2.xAxisTicks,\n yAxisTicks = _ref2.yAxisTicks,\n bandSize = _ref2.bandSize,\n dataKey = _ref2.dataKey,\n stackedData = _ref2.stackedData,\n dataStartIndex = _ref2.dataStartIndex,\n displayedData = _ref2.displayedData,\n offset = _ref2.offset;\n var layout = props.layout;\n var hasStack = stackedData && stackedData.length;\n var baseValue = Area.getBaseValue(props, xAxis, yAxis);\n var isRange = false;\n var points = displayedData.map(function (entry, index) {\n var value;\n\n if (hasStack) {\n value = stackedData[dataStartIndex + index];\n } else {\n value = getValueByDataKey(entry, dataKey);\n\n if (!_isArray(value)) {\n value = [baseValue, value];\n } else {\n isRange = true;\n }\n }\n\n if (layout === 'horizontal') {\n return {\n x: getCateCoordinateOfLine({\n axis: xAxis,\n ticks: xAxisTicks,\n bandSize: bandSize,\n entry: entry,\n index: index\n }),\n y: _isNil(value[1]) ? null : yAxis.scale(value[1]),\n value: value,\n payload: entry\n };\n }\n\n return {\n x: _isNil(value[1]) ? null : xAxis.scale(value[1]),\n y: getCateCoordinateOfLine({\n axis: yAxis,\n ticks: yAxisTicks,\n bandSize: bandSize,\n entry: entry,\n index: index\n }),\n value: value,\n payload: entry\n };\n });\n var baseLine;\n\n if (hasStack || isRange) {\n baseLine = points.map(function (entry) {\n if (layout === 'horizontal') {\n return {\n x: entry.x,\n y: !_isNil(_get(entry, 'value[0]')) ? yAxis.scale(_get(entry, 'value[0]')) : null\n };\n }\n\n return {\n x: !_isNil(_get(entry, 'value[0]')) ? xAxis.scale(_get(entry, 'value[0]')) : null,\n y: entry.y\n };\n });\n } else if (layout === 'horizontal') {\n baseLine = yAxis.scale(baseValue);\n } else {\n baseLine = xAxis.scale(baseValue);\n }\n\n return _objectSpread({\n points: points,\n baseLine: baseLine,\n layout: layout,\n isRange: isRange\n }, offset);\n}, _class2.renderDotItem = function (option, props) {\n var dotItem;\n\n if (React.isValidElement(option)) {\n dotItem = React.cloneElement(option, props);\n } else if (_isFunction(option)) {\n dotItem = option(props);\n } else {\n dotItem = React.createElement(Dot, _extends({}, props, {\n className: \"recharts-area-dot\"\n }));\n }\n\n return dotItem;\n}, _temp)) || _class;\n\nexport default Area;",
"function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar PREFIX_LIST = ['Webkit', 'Moz', 'O', 'ms'];\nexport var generatePrefixStyle = function generatePrefixStyle(name, value) {\n if (!name) {\n return null;\n }\n\n var camelName = name.replace(/(\\w)/, function (v) {\n return v.toUpperCase();\n });\n var result = PREFIX_LIST.reduce(function (res, entry) {\n return _objectSpread({}, res, _defineProperty({}, entry + camelName, value));\n }, {});\n result[name] = value;\n return result;\n};",
"import _range from \"lodash/range\";\nimport _isFunction from \"lodash/isFunction\";\n\nvar _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\n/**\n * @fileOverview Brush\n */\nimport React, { Component, Children } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { scalePoint } from 'd3-scale';\nimport { getValueByDataKey } from '../util/ChartUtils';\nimport pureRender from '../util/PureRender';\nimport Layer from '../container/Layer';\nimport Text from '../component/Text';\nimport { isNumber } from '../util/DataUtils';\nimport { generatePrefixStyle } from '../util/CssPrefixUtils';\n\nvar Brush = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(Brush, _Component);\n\n function Brush(props) {\n var _this;\n\n _classCallCheck(this, Brush);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Brush).call(this, props));\n\n _this.handleDrag = function (e) {\n if (_this.leaveTimer) {\n clearTimeout(_this.leaveTimer);\n _this.leaveTimer = null;\n }\n\n if (_this.state.isTravellerMoving) {\n _this.handleTravellerMove(e);\n } else if (_this.state.isSlideMoving) {\n _this.handleSlideDrag(e);\n }\n };\n\n _this.handleTouchMove = function (e) {\n if (e.changedTouches != null && e.changedTouches.length > 0) {\n _this.handleDrag(e.changedTouches[0]);\n }\n };\n\n _this.handleDragEnd = function () {\n _this.setState({\n isTravellerMoving: false,\n isSlideMoving: false\n });\n };\n\n _this.handleLeaveWrapper = function () {\n if (_this.state.isTravellerMoving || _this.state.isSlideMoving) {\n _this.leaveTimer = setTimeout(_this.handleDragEnd, _this.props.leaveTimeOut);\n }\n };\n\n _this.handleEnterSlideOrTraveller = function () {\n _this.setState({\n isTextActive: true\n });\n };\n\n _this.handleLeaveSlideOrTraveller = function () {\n _this.setState({\n isTextActive: false\n });\n };\n\n _this.handleSlideDragStart = function (e) {\n var event = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e;\n\n _this.setState({\n isTravellerMoving: false,\n isSlideMoving: true,\n slideMoveStartX: event.pageX\n });\n };\n\n _this.travellerDragStartHandlers = {\n startX: _this.handleTravellerDragStart.bind(_assertThisInitialized(_assertThisInitialized(_this)), 'startX'),\n endX: _this.handleTravellerDragStart.bind(_assertThisInitialized(_assertThisInitialized(_this)), 'endX')\n };\n _this.state = props.data && props.data.length ? _this.updateScale(props) : {};\n return _this;\n }\n\n _createClass(Brush, [{\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n var _this2 = this;\n\n var _this$props = this.props,\n data = _this$props.data,\n width = _this$props.width,\n x = _this$props.x,\n travellerWidth = _this$props.travellerWidth,\n updateId = _this$props.updateId;\n\n if ((nextProps.data !== data || nextProps.updateId !== updateId) && nextProps.data && nextProps.data.length) {\n this.setState(this.updateScale(nextProps));\n } else if (nextProps.width !== width || nextProps.x !== x || nextProps.travellerWidth !== travellerWidth) {\n this.scale.range([nextProps.x, nextProps.x + nextProps.width - nextProps.travellerWidth]);\n this.scaleValues = this.scale.domain().map(function (entry) {\n return _this2.scale(entry);\n });\n this.setState({\n startX: this.scale(nextProps.startIndex),\n endX: this.scale(nextProps.endIndex)\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.scale = null;\n this.scaleValues = null;\n\n if (this.leaveTimer) {\n clearTimeout(this.leaveTimer);\n this.leaveTimer = null;\n }\n }\n }, {\n key: \"getIndex\",\n value: function getIndex(_ref) {\n var startX = _ref.startX,\n endX = _ref.endX;\n var _this$props2 = this.props,\n gap = _this$props2.gap,\n data = _this$props2.data;\n var lastIndex = data.length - 1;\n var min = Math.min(startX, endX);\n var max = Math.max(startX, endX);\n var minIndex = this.constructor.getIndexInRange(this.scaleValues, min);\n var maxIndex = this.constructor.getIndexInRange(this.scaleValues, max);\n return {\n startIndex: minIndex - minIndex % gap,\n endIndex: maxIndex === lastIndex ? lastIndex : maxIndex - maxIndex % gap\n };\n }\n }, {\n key: \"getTextOfTick\",\n value: function getTextOfTick(index) {\n var _this$props3 = this.props,\n data = _this$props3.data,\n tickFormatter = _this$props3.tickFormatter,\n dataKey = _this$props3.dataKey;\n var text = getValueByDataKey(data[index], dataKey, index);\n return _isFunction(tickFormatter) ? tickFormatter(text) : text;\n }\n }, {\n key: \"handleSlideDrag\",\n value: function handleSlideDrag(e) {\n var _this$state = this.state,\n slideMoveStartX = _this$state.slideMoveStartX,\n startX = _this$state.startX,\n endX = _this$state.endX;\n var _this$props4 = this.props,\n x = _this$props4.x,\n width = _this$props4.width,\n travellerWidth = _this$props4.travellerWidth,\n startIndex = _this$props4.startIndex,\n endIndex = _this$props4.endIndex,\n onChange = _this$props4.onChange;\n var delta = e.pageX - slideMoveStartX;\n\n if (delta > 0) {\n delta = Math.min(delta, x + width - travellerWidth - endX, x + width - travellerWidth - startX);\n } else if (delta < 0) {\n delta = Math.max(delta, x - startX, x - endX);\n }\n\n var newIndex = this.getIndex({\n startX: startX + delta,\n endX: endX + delta\n });\n\n if ((newIndex.startIndex !== startIndex || newIndex.endIndex !== endIndex) && onChange) {\n onChange(newIndex);\n }\n\n this.setState({\n startX: startX + delta,\n endX: endX + delta,\n slideMoveStartX: e.pageX\n });\n }\n }, {\n key: \"handleTravellerDragStart\",\n value: function handleTravellerDragStart(id, e) {\n var event = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e;\n this.setState({\n isSlideMoving: false,\n isTravellerMoving: true,\n movingTravellerId: id,\n brushMoveStartX: event.pageX\n });\n }\n }, {\n key: \"handleTravellerMove\",\n value: function handleTravellerMove(e) {\n var _this$setState;\n\n var _this$state2 = this.state,\n brushMoveStartX = _this$state2.brushMoveStartX,\n movingTravellerId = _this$state2.movingTravellerId,\n endX = _this$state2.endX,\n startX = _this$state2.startX;\n var prevValue = this.state[movingTravellerId];\n var _this$props5 = this.props,\n x = _this$props5.x,\n width = _this$props5.width,\n travellerWidth = _this$props5.travellerWidth,\n onChange = _this$props5.onChange,\n gap = _this$props5.gap,\n data = _this$props5.data;\n var params = {\n startX: this.state.startX,\n endX: this.state.endX\n };\n var delta = e.pageX - brushMoveStartX;\n\n if (delta > 0) {\n delta = Math.min(delta, x + width - travellerWidth - prevValue);\n } else if (delta < 0) {\n delta = Math.max(delta, x - prevValue);\n }\n\n params[movingTravellerId] = prevValue + delta;\n var newIndex = this.getIndex(params);\n var startIndex = newIndex.startIndex,\n endIndex = newIndex.endIndex;\n\n var isFullGap = function isFullGap() {\n var lastIndex = data.length - 1;\n\n if (movingTravellerId === 'startX' && (endX > startX ? startIndex % gap === 0 : endIndex % gap === 0) || endX < startX && endIndex === lastIndex || movingTravellerId === 'endX' && (endX > startX ? endIndex % gap === 0 : startIndex % gap === 0) || endX > startX && endIndex === lastIndex) {\n return true;\n }\n\n return false;\n };\n\n this.setState((_this$setState = {}, _defineProperty(_this$setState, movingTravellerId, prevValue + delta), _defineProperty(_this$setState, \"brushMoveStartX\", e.pageX), _this$setState), function () {\n if (onChange) {\n if (isFullGap()) {\n onChange(newIndex);\n }\n }\n });\n }\n }, {\n key: \"updateScale\",\n value: function updateScale(props) {\n var _this3 = this;\n\n var data = props.data,\n startIndex = props.startIndex,\n endIndex = props.endIndex,\n x = props.x,\n width = props.width,\n travellerWidth = props.travellerWidth;\n var len = data.length;\n this.scale = scalePoint().domain(_range(0, len)).range([x, x + width - travellerWidth]);\n this.scaleValues = this.scale.domain().map(function (entry) {\n return _this3.scale(entry);\n });\n return {\n isTextActive: false,\n isSlideMoving: false,\n isTravellerMoving: false,\n startX: this.scale(startIndex),\n endX: this.scale(endIndex)\n };\n }\n }, {\n key: \"renderBackground\",\n value: function renderBackground() {\n var _this$props6 = this.props,\n x = _this$props6.x,\n y = _this$props6.y,\n width = _this$props6.width,\n height = _this$props6.height,\n fill = _this$props6.fill,\n stroke = _this$props6.stroke;\n return React.createElement(\"rect\", {\n stroke: stroke,\n fill: fill,\n x: x,\n y: y,\n width: width,\n height: height\n });\n }\n }, {\n key: \"renderPanorama\",\n value: function renderPanorama() {\n var _this$props7 = this.props,\n x = _this$props7.x,\n y = _this$props7.y,\n width = _this$props7.width,\n height = _this$props7.height,\n data = _this$props7.data,\n children = _this$props7.children,\n padding = _this$props7.padding;\n var chartElement = Children.only(children);\n\n if (!chartElement) {\n return null;\n }\n\n return React.cloneElement(chartElement, {\n x: x,\n y: y,\n width: width,\n height: height,\n margin: padding,\n compact: true,\n data: data\n });\n }\n }, {\n key: \"renderTraveller\",\n value: function renderTraveller(travellerX, id) {\n var _this$props8 = this.props,\n y = _this$props8.y,\n travellerWidth = _this$props8.travellerWidth,\n height = _this$props8.height,\n stroke = _this$props8.stroke;\n var lineY = Math.floor(y + height / 2) - 1;\n var x = Math.max(travellerX, this.props.x);\n return React.createElement(Layer, {\n className: \"recharts-brush-traveller\",\n onMouseEnter: this.handleEnterSlideOrTraveller,\n onMouseLeave: this.handleLeaveSlideOrTraveller,\n onMouseDown: this.travellerDragStartHandlers[id],\n onTouchStart: this.travellerDragStartHandlers[id],\n style: {\n cursor: 'col-resize'\n }\n }, React.createElement(\"rect\", {\n x: x,\n y: y,\n width: travellerWidth,\n height: height,\n fill: stroke,\n stroke: \"none\"\n }), React.createElement(\"line\", {\n x1: x + 1,\n y1: lineY,\n x2: x + travellerWidth - 1,\n y2: lineY,\n fill: \"none\",\n stroke: \"#fff\"\n }), React.createElement(\"line\", {\n x1: x + 1,\n y1: lineY + 2,\n x2: x + travellerWidth - 1,\n y2: lineY + 2,\n fill: \"none\",\n stroke: \"#fff\"\n }));\n }\n }, {\n key: \"renderSlide\",\n value: function renderSlide(startX, endX) {\n var _this$props9 = this.props,\n y = _this$props9.y,\n height = _this$props9.height,\n stroke = _this$props9.stroke;\n return React.createElement(\"rect\", {\n className: \"recharts-brush-slide\",\n onMouseEnter: this.handleEnterSlideOrTraveller,\n onMouseLeave: this.handleLeaveSlideOrTraveller,\n onMouseDown: this.handleSlideDragStart,\n onTouchStart: this.handleSlideDragStart,\n style: {\n cursor: 'move'\n },\n stroke: \"none\",\n fill: stroke,\n fillOpacity: 0.2,\n x: Math.min(startX, endX),\n y: y,\n width: Math.abs(endX - startX),\n height: height\n });\n }\n }, {\n key: \"renderText\",\n value: function renderText() {\n var _this$props10 = this.props,\n startIndex = _this$props10.startIndex,\n endIndex = _this$props10.endIndex,\n y = _this$props10.y,\n height = _this$props10.height,\n travellerWidth = _this$props10.travellerWidth,\n stroke = _this$props10.stroke;\n var _this$state3 = this.state,\n startX = _this$state3.startX,\n endX = _this$state3.endX;\n var offset = 5;\n var attrs = {\n pointerEvents: 'none',\n fill: stroke\n };\n return React.createElement(Layer, {\n className: \"recharts-brush-texts\"\n }, React.createElement(Text, _extends({\n textAnchor: \"end\",\n verticalAnchor: \"middle\",\n x: Math.min(startX, endX) - offset,\n y: y + height / 2\n }, attrs), this.getTextOfTick(startIndex)), React.createElement(Text, _extends({\n textAnchor: \"start\",\n verticalAnchor: \"middle\",\n x: Math.max(startX, endX) + travellerWidth + offset,\n y: y + height / 2\n }, attrs), this.getTextOfTick(endIndex)));\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props11 = this.props,\n data = _this$props11.data,\n className = _this$props11.className,\n children = _this$props11.children,\n x = _this$props11.x,\n y = _this$props11.y,\n width = _this$props11.width,\n height = _this$props11.height;\n var _this$state4 = this.state,\n startX = _this$state4.startX,\n endX = _this$state4.endX,\n isTextActive = _this$state4.isTextActive,\n isSlideMoving = _this$state4.isSlideMoving,\n isTravellerMoving = _this$state4.isTravellerMoving;\n\n if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {\n return null;\n }\n\n var layerClass = classNames('recharts-brush', className);\n var isPanoramic = React.Children.count(children) === 1;\n var style = generatePrefixStyle('userSelect', 'none');\n return React.createElement(Layer, {\n className: layerClass,\n onMouseMove: this.handleDrag,\n onMouseLeave: this.handleLeaveWrapper,\n onMouseUp: this.handleDragEnd,\n onTouchEnd: this.handleDragEnd,\n onTouchMove: this.handleTouchMove,\n style: style\n }, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTraveller(startX, 'startX'), this.renderTraveller(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving) && this.renderText());\n }\n }], [{\n key: \"getIndexInRange\",\n value: function getIndexInRange(range, x) {\n var len = range.length;\n var start = 0;\n var end = len - 1;\n\n while (end - start > 1) {\n var middle = Math.floor((start + end) / 2);\n\n if (range[middle] > x) {\n end = middle;\n } else {\n start = middle;\n }\n }\n\n return x >= range[end] ? end : start;\n }\n }]);\n\n return Brush;\n}(Component), _class2.displayName = 'Brush', _class2.propTypes = {\n className: PropTypes.string,\n fill: PropTypes.string,\n stroke: PropTypes.string,\n x: PropTypes.number,\n y: PropTypes.number,\n width: PropTypes.number,\n height: PropTypes.number.isRequired,\n travellerWidth: PropTypes.number,\n gap: PropTypes.number,\n padding: PropTypes.shape({\n top: PropTypes.number,\n right: PropTypes.number,\n bottom: PropTypes.number,\n left: PropTypes.number\n }),\n dataKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.func]),\n data: PropTypes.array,\n startIndex: PropTypes.number,\n endIndex: PropTypes.number,\n tickFormatter: PropTypes.func,\n children: PropTypes.node,\n onChange: PropTypes.func,\n updateId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n leaveTimeOut: PropTypes.number\n}, _class2.defaultProps = {\n height: 40,\n travellerWidth: 5,\n gap: 1,\n fill: '#fff',\n stroke: '#666',\n padding: {\n top: 1,\n right: 1,\n bottom: 1,\n left: 1\n },\n leaveTimeOut: 1000\n}, _temp)) || _class;\n\nexport default Brush;",
"import _isFunction from \"lodash/isFunction\";\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview Cartesian Axis\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { shallowEqual } from '../util/PureRender';\nimport { getStringSize } from '../util/DOMUtils';\nimport Layer from '../container/Layer';\nimport Text from '../component/Text';\nimport Label from '../component/Label';\nimport { isSsr, PRESENTATION_ATTRIBUTES, EVENT_ATTRIBUTES, getPresentationAttributes, filterEventsOfChild } from '../util/ReactUtils';\nimport { isNumber, mathSign } from '../util/DataUtils';\n\nvar CartesianAxis =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(CartesianAxis, _Component);\n\n function CartesianAxis() {\n _classCallCheck(this, CartesianAxis);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(CartesianAxis).apply(this, arguments));\n }\n\n _createClass(CartesianAxis, [{\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(_ref, state) {\n var viewBox = _ref.viewBox,\n restProps = _objectWithoutProperties(_ref, [\"viewBox\"]);\n\n // props.viewBox is sometimes generated every time -\n // check that specially as object equality is likely to fail\n var _this$props = this.props,\n viewBoxOld = _this$props.viewBox,\n restPropsOld = _objectWithoutProperties(_this$props, [\"viewBox\"]);\n\n return !shallowEqual(viewBox, viewBoxOld) || !shallowEqual(restProps, restPropsOld) || !shallowEqual(state, this.state);\n }\n /**\n * Calculate the coordinates of endpoints in ticks\n * @param {Object} data The data of a simple tick\n * @return {Object} (x1, y1): The coordinate of endpoint close to tick text\n * (x2, y2): The coordinate of endpoint close to axis\n */\n\n }, {\n key: \"getTickLineCoord\",\n value: function getTickLineCoord(data) {\n var _this$props2 = this.props,\n x = _this$props2.x,\n y = _this$props2.y,\n width = _this$props2.width,\n height = _this$props2.height,\n orientation = _this$props2.orientation,\n tickSize = _this$props2.tickSize,\n mirror = _this$props2.mirror,\n tickMargin = _this$props2.tickMargin;\n var x1, x2, y1, y2, tx, ty;\n var sign = mirror ? -1 : 1;\n var finalTickSize = data.tickSize || tickSize;\n var tickCoord = isNumber(data.tickCoord) ? data.tickCoord : data.coordinate;\n\n switch (orientation) {\n case 'top':\n x1 = x2 = data.coordinate;\n y2 = y + !mirror * height;\n y1 = y2 - sign * finalTickSize;\n ty = y1 - sign * tickMargin;\n tx = tickCoord;\n break;\n\n case 'left':\n y1 = y2 = data.coordinate;\n x2 = x + !mirror * width;\n x1 = x2 - sign * finalTickSize;\n tx = x1 - sign * tickMargin;\n ty = tickCoord;\n break;\n\n case 'right':\n y1 = y2 = data.coordinate;\n x2 = x + mirror * width;\n x1 = x2 + sign * finalTickSize;\n tx = x1 + sign * tickMargin;\n ty = tickCoord;\n break;\n\n default:\n x1 = x2 = data.coordinate;\n y2 = y + mirror * height;\n y1 = y2 + sign * finalTickSize;\n ty = y1 + sign * tickMargin;\n tx = tickCoord;\n break;\n }\n\n return {\n line: {\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2\n },\n tick: {\n x: tx,\n y: ty\n }\n };\n }\n }, {\n key: \"getTickTextAnchor\",\n value: function getTickTextAnchor() {\n var _this$props3 = this.props,\n orientation = _this$props3.orientation,\n mirror = _this$props3.mirror;\n var textAnchor;\n\n switch (orientation) {\n case 'left':\n textAnchor = mirror ? 'start' : 'end';\n break;\n\n case 'right':\n textAnchor = mirror ? 'end' : 'start';\n break;\n\n default:\n textAnchor = 'middle';\n break;\n }\n\n return textAnchor;\n }\n }, {\n key: \"getTickVerticalAnchor\",\n value: function getTickVerticalAnchor() {\n var _this$props4 = this.props,\n orientation = _this$props4.orientation,\n mirror = _this$props4.mirror;\n var verticalAnchor = 'end';\n\n switch (orientation) {\n case 'left':\n case 'right':\n verticalAnchor = 'middle';\n break;\n\n case 'top':\n verticalAnchor = mirror ? 'start' : 'end';\n break;\n\n default:\n verticalAnchor = mirror ? 'end' : 'start';\n break;\n }\n\n return verticalAnchor;\n }\n }, {\n key: \"renderAxisLine\",\n value: function renderAxisLine() {\n var _this$props5 = this.props,\n x = _this$props5.x,\n y = _this$props5.y,\n width = _this$props5.width,\n height = _this$props5.height,\n orientation = _this$props5.orientation,\n axisLine = _this$props5.axisLine,\n mirror = _this$props5.mirror;\n\n var props = _objectSpread({}, getPresentationAttributes(this.props), {\n fill: 'none'\n }, getPresentationAttributes(axisLine));\n\n if (orientation === 'top' || orientation === 'bottom') {\n var needHeight = orientation === 'top' && !mirror || orientation === 'bottom' && mirror;\n props = _objectSpread({}, props, {\n x1: x,\n y1: y + needHeight * height,\n x2: x + width,\n y2: y + needHeight * height\n });\n } else {\n var needWidth = orientation === 'left' && !mirror || orientation === 'right' && mirror;\n props = _objectSpread({}, props, {\n x1: x + needWidth * width,\n y1: y,\n x2: x + needWidth * width,\n y2: y + height\n });\n }\n\n return React.createElement(\"line\", _extends({\n className: \"recharts-cartesian-axis-line\"\n }, props));\n }\n }, {\n key: \"renderTicks\",\n\n /**\n * render the ticks\n * @param {Array} ticks The ticks to actually render (overrides what was passed in props)\n * @return {ReactComponent} renderedTicks\n */\n value: function renderTicks(ticks) {\n var _this = this;\n\n var _this$props6 = this.props,\n tickLine = _this$props6.tickLine,\n stroke = _this$props6.stroke,\n tick = _this$props6.tick,\n tickFormatter = _this$props6.tickFormatter,\n unit = _this$props6.unit;\n var finalTicks = CartesianAxis.getTicks(_objectSpread({}, this.props, {\n ticks: ticks\n }));\n var textAnchor = this.getTickTextAnchor();\n var verticalAnchor = this.getTickVerticalAnchor();\n var axisProps = getPresentationAttributes(this.props);\n var customTickProps = getPresentationAttributes(tick);\n\n var tickLineProps = _objectSpread({}, axisProps, {\n fill: 'none'\n }, getPresentationAttributes(tickLine));\n\n var items = finalTicks.map(function (entry, i) {\n var _this$getTickLineCoor = _this.getTickLineCoord(entry),\n lineCoord = _this$getTickLineCoor.line,\n tickCoord = _this$getTickLineCoor.tick;\n\n var tickProps = _objectSpread({\n textAnchor: textAnchor,\n verticalAnchor: verticalAnchor\n }, axisProps, {\n stroke: 'none',\n fill: stroke\n }, customTickProps, tickCoord, {\n index: i,\n payload: entry,\n visibleTicksCount: finalTicks.length\n });\n\n return React.createElement(Layer, _extends({\n className: \"recharts-cartesian-axis-tick\",\n key: \"tick-\".concat(i)\n }, filterEventsOfChild(_this.props, entry, i)), tickLine && React.createElement(\"line\", _extends({\n className: \"recharts-cartesian-axis-tick-line\"\n }, tickLineProps, lineCoord)), tick && _this.constructor.renderTickItem(tick, tickProps, \"\".concat(_isFunction(tickFormatter) ? tickFormatter(entry.value) : entry.value).concat(unit || '')));\n });\n return React.createElement(\"g\", {\n className: \"recharts-cartesian-axis-ticks\"\n }, items);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props7 = this.props,\n axisLine = _this$props7.axisLine,\n width = _this$props7.width,\n height = _this$props7.height,\n ticksGenerator = _this$props7.ticksGenerator,\n className = _this$props7.className,\n hide = _this$props7.hide;\n\n if (hide) {\n return null;\n }\n\n var _this$props8 = this.props,\n ticks = _this$props8.ticks,\n noTicksProps = _objectWithoutProperties(_this$props8, [\"ticks\"]);\n\n var finalTicks = ticks;\n\n if (_isFunction(ticksGenerator)) {\n finalTicks = ticks && ticks.length > 0 ? ticksGenerator(this.props) : ticksGenerator(noTicksProps);\n }\n\n if (width <= 0 || height <= 0 || !finalTicks || !finalTicks.length) {\n return null;\n }\n\n return React.createElement(Layer, {\n className: classNames('recharts-cartesian-axis', className)\n }, axisLine && this.renderAxisLine(), this.renderTicks(finalTicks), Label.renderCallByParent(this.props));\n }\n }], [{\n key: \"getTicks\",\n value: function getTicks(props) {\n var tick = props.tick,\n ticks = props.ticks,\n viewBox = props.viewBox,\n minTickGap = props.minTickGap,\n orientation = props.orientation,\n interval = props.interval,\n tickFormatter = props.tickFormatter,\n unit = props.unit;\n\n if (!ticks || !ticks.length || !tick) {\n return [];\n }\n\n if (isNumber(interval) || isSsr()) {\n return CartesianAxis.getNumberIntervalTicks(ticks, isNumber(interval) ? interval : 0);\n }\n\n if (interval === 'preserveStartEnd') {\n return CartesianAxis.getTicksStart({\n ticks: ticks,\n tickFormatter: tickFormatter,\n viewBox: viewBox,\n orientation: orientation,\n minTickGap: minTickGap,\n unit: unit\n }, true);\n }\n\n if (interval === 'preserveStart') {\n return CartesianAxis.getTicksStart({\n ticks: ticks,\n tickFormatter: tickFormatter,\n viewBox: viewBox,\n orientation: orientation,\n minTickGap: minTickGap,\n unit: unit\n });\n }\n\n return CartesianAxis.getTicksEnd({\n ticks: ticks,\n tickFormatter: tickFormatter,\n viewBox: viewBox,\n orientation: orientation,\n minTickGap: minTickGap,\n unit: unit\n });\n }\n }, {\n key: \"getNumberIntervalTicks\",\n value: function getNumberIntervalTicks(ticks, interval) {\n return ticks.filter(function (entry, i) {\n return i % (interval + 1) === 0;\n });\n }\n }, {\n key: \"getTicksStart\",\n value: function getTicksStart(_ref2, preserveEnd) {\n var ticks = _ref2.ticks,\n tickFormatter = _ref2.tickFormatter,\n viewBox = _ref2.viewBox,\n orientation = _ref2.orientation,\n minTickGap = _ref2.minTickGap,\n unit = _ref2.unit;\n var x = viewBox.x,\n y = viewBox.y,\n width = viewBox.width,\n height = viewBox.height;\n var sizeKey = orientation === 'top' || orientation === 'bottom' ? 'width' : 'height';\n var result = (ticks || []).slice(); // we need add the width of 'unit' only when sizeKey === 'width'\n\n var unitSize = unit && sizeKey === 'width' ? getStringSize(unit)[sizeKey] : 0;\n var len = result.length;\n var sign = len >= 2 ? mathSign(result[1].coordinate - result[0].coordinate) : 1;\n var start, end;\n\n if (sign === 1) {\n start = sizeKey === 'width' ? x : y;\n end = sizeKey === 'width' ? x + width : y + height;\n } else {\n start = sizeKey === 'width' ? x + width : y + height;\n end = sizeKey === 'width' ? x : y;\n }\n\n if (preserveEnd) {\n // Try to guarantee the tail to be displayed\n var tail = ticks[len - 1];\n var tailContent = _isFunction(tickFormatter) ? tickFormatter(tail.value) : tail.value;\n var tailSize = getStringSize(tailContent)[sizeKey] + unitSize;\n var tailGap = sign * (tail.coordinate + sign * tailSize / 2 - end);\n result[len - 1] = tail = _objectSpread({}, tail, {\n tickCoord: tailGap > 0 ? tail.coordinate - tailGap * sign : tail.coordinate\n });\n var isTailShow = sign * (tail.tickCoord - sign * tailSize / 2 - start) >= 0 && sign * (tail.tickCoord + sign * tailSize / 2 - end) <= 0;\n\n if (isTailShow) {\n end = tail.tickCoord - sign * (tailSize / 2 + minTickGap);\n result[len - 1] = _objectSpread({}, tail, {\n isShow: true\n });\n }\n }\n\n var count = preserveEnd ? len - 1 : len;\n\n for (var i = 0; i < count; i++) {\n var entry = result[i];\n var content = _isFunction(tickFormatter) ? tickFormatter(entry.value) : entry.value;\n var size = getStringSize(content)[sizeKey] + unitSize;\n\n if (i === 0) {\n var gap = sign * (entry.coordinate - sign * size / 2 - start);\n result[i] = entry = _objectSpread({}, entry, {\n tickCoord: gap < 0 ? entry.coordinate - gap * sign : entry.coordinate\n });\n } else {\n result[i] = entry = _objectSpread({}, entry, {\n tickCoord: entry.coordinate\n });\n }\n\n var isShow = sign * (entry.tickCoord - sign * size / 2 - start) >= 0 && sign * (entry.tickCoord + sign * size / 2 - end) <= 0;\n\n if (isShow) {\n start = entry.tickCoord + sign * (size / 2 + minTickGap);\n result[i] = _objectSpread({}, entry, {\n isShow: true\n });\n }\n }\n\n return result.filter(function (entry) {\n return entry.isShow;\n });\n }\n }, {\n key: \"getTicksEnd\",\n value: function getTicksEnd(_ref3) {\n var ticks = _ref3.ticks,\n tickFormatter = _ref3.tickFormatter,\n viewBox = _ref3.viewBox,\n orientation = _ref3.orientation,\n minTickGap = _ref3.minTickGap,\n unit = _ref3.unit;\n var x = viewBox.x,\n y = viewBox.y,\n width = viewBox.width,\n height = viewBox.height;\n var sizeKey = orientation === 'top' || orientation === 'bottom' ? 'width' : 'height'; // we need add the width of 'unit' only when sizeKey === 'width'\n\n var unitSize = unit && sizeKey === 'width' ? getStringSize(unit)[sizeKey] : 0;\n var result = (ticks || []).slice();\n var len = result.length;\n var sign = len >= 2 ? mathSign(result[1].coordinate - result[0].coordinate) : 1;\n var start, end;\n\n if (sign === 1) {\n start = sizeKey === 'width' ? x : y;\n end = sizeKey === 'width' ? x + width : y + height;\n } else {\n start = sizeKey === 'width' ? x + width : y + height;\n end = sizeKey === 'width' ? x : y;\n }\n\n for (var i = len - 1; i >= 0; i--) {\n var entry = result[i];\n var content = _isFunction(tickFormatter) ? tickFormatter(entry.value) : entry.value;\n var size = getStringSize(content)[sizeKey] + unitSize;\n\n if (i === len - 1) {\n var gap = sign * (entry.coordinate + sign * size / 2 - end);\n result[i] = entry = _objectSpread({}, entry, {\n tickCoord: gap > 0 ? entry.coordinate - gap * sign : entry.coordinate\n });\n } else {\n result[i] = entry = _objectSpread({}, entry, {\n tickCoord: entry.coordinate\n });\n }\n\n var isShow = sign * (entry.tickCoord - sign * size / 2 - start) >= 0 && sign * (entry.tickCoord + sign * size / 2 - end) <= 0;\n\n if (isShow) {\n end = entry.tickCoord - sign * (size / 2 + minTickGap);\n result[i] = _objectSpread({}, entry, {\n isShow: true\n });\n }\n }\n\n return result.filter(function (entry) {\n return entry.isShow;\n });\n }\n }, {\n key: \"renderTickItem\",\n value: function renderTickItem(option, props, value) {\n var tickItem;\n\n if (React.isValidElement(option)) {\n tickItem = React.cloneElement(option, props);\n } else if (_isFunction(option)) {\n tickItem = option(props);\n } else {\n tickItem = React.createElement(Text, _extends({}, props, {\n className: \"recharts-cartesian-axis-tick-value\"\n }), value);\n }\n\n return tickItem;\n }\n }]);\n\n return CartesianAxis;\n}(Component);\n\nCartesianAxis.displayName = 'CartesianAxis';\nCartesianAxis.propTypes = _objectSpread({}, PRESENTATION_ATTRIBUTES, EVENT_ATTRIBUTES, {\n className: PropTypes.string,\n x: PropTypes.number,\n y: PropTypes.number,\n width: PropTypes.number,\n height: PropTypes.number,\n orientation: PropTypes.oneOf(['top', 'bottom', 'left', 'right']),\n // The viewBox of svg\n viewBox: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number,\n width: PropTypes.number,\n height: PropTypes.number\n }),\n tick: PropTypes.oneOfType([PropTypes.bool, PropTypes.func, PropTypes.object, PropTypes.element]),\n axisLine: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n tickLine: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n mirror: PropTypes.bool,\n tickMargin: PropTypes.number.isRequired,\n minTickGap: PropTypes.number,\n ticks: PropTypes.array,\n tickSize: PropTypes.number,\n stroke: PropTypes.string,\n tickFormatter: PropTypes.func,\n ticksGenerator: PropTypes.func,\n interval: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['preserveStart', 'preserveEnd', 'preserveStartEnd'])])\n});\nCartesianAxis.defaultProps = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n viewBox: {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n },\n // The orientation of axis\n orientation: 'bottom',\n // The ticks\n ticks: [],\n stroke: '#666',\n tickLine: true,\n axisLine: true,\n tick: true,\n mirror: false,\n minTickGap: 5,\n // The width or height of tick\n tickSize: 6,\n tickMargin: 2,\n interval: 'preserveEnd'\n};\nexport default CartesianAxis;",
"function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview Render a group of error bar\n*/\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Layer from '../container/Layer';\nimport { getPresentationAttributes } from '../util/ReactUtils';\n\nvar ErrorBar =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(ErrorBar, _Component);\n\n function ErrorBar() {\n _classCallCheck(this, ErrorBar);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(ErrorBar).apply(this, arguments));\n }\n\n _createClass(ErrorBar, [{\n key: \"renderErrorBars\",\n value: function renderErrorBars() {\n var _this$props = this.props,\n offset = _this$props.offset,\n layout = _this$props.layout,\n width = _this$props.width,\n dataKey = _this$props.dataKey,\n data = _this$props.data,\n dataPointFormatter = _this$props.dataPointFormatter,\n xAxis = _this$props.xAxis,\n yAxis = _this$props.yAxis,\n others = _objectWithoutProperties(_this$props, [\"offset\", \"layout\", \"width\", \"dataKey\", \"data\", \"dataPointFormatter\", \"xAxis\", \"yAxis\"]);\n\n var props = getPresentationAttributes(others);\n return data.map(function (entry, i) {\n var _dataPointFormatter = dataPointFormatter(entry, dataKey),\n x = _dataPointFormatter.x,\n y = _dataPointFormatter.y,\n value = _dataPointFormatter.value,\n errorVal = _dataPointFormatter.errorVal;\n\n if (!errorVal) {\n return null;\n }\n\n var xMid, yMid, xMin, yMin, xMax, yMax, scale, coordsTop, coordsMid, coordsBot, lowBound, highBound;\n\n if (Array.isArray(errorVal)) {\n var _errorVal = _slicedToArray(errorVal, 2);\n\n lowBound = _errorVal[0];\n highBound = _errorVal[1];\n } else {\n lowBound = highBound = errorVal;\n }\n\n if (layout === 'vertical') {\n scale = xAxis.scale;\n xMid = value;\n yMid = y + offset;\n xMin = scale(xMid - lowBound);\n yMin = yMid + width;\n xMax = scale(xMid + highBound);\n yMax = yMid - width;\n coordsTop = {\n x1: xMax,\n y1: yMin,\n x2: xMax,\n y2: yMax\n };\n coordsMid = {\n x1: xMin,\n y1: yMid,\n x2: xMax,\n y2: yMid\n };\n coordsBot = {\n x1: xMin,\n y1: yMin,\n x2: xMin,\n y2: yMax\n };\n } else if (layout === 'horizontal') {\n scale = yAxis.scale;\n xMid = x + offset;\n yMid = value;\n xMin = xMid - width;\n xMax = xMid + width;\n yMin = scale(yMid - lowBound);\n yMax = scale(yMid + highBound);\n coordsTop = {\n x1: xMin,\n y1: yMax,\n x2: xMax,\n y2: yMax\n };\n coordsMid = {\n x1: xMid,\n y1: yMin,\n x2: xMid,\n y2: yMax\n };\n coordsBot = {\n x1: xMin,\n y1: yMin,\n x2: xMax,\n y2: yMin\n };\n }\n\n return React.createElement(Layer, _extends({\n className: \"recharts-errorBar\",\n key: \"bar-\".concat(i)\n }, props), React.createElement(\"line\", coordsTop), React.createElement(\"line\", coordsMid), React.createElement(\"line\", coordsBot));\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return React.createElement(Layer, {\n className: \"recharts-errorBars\"\n }, this.renderErrorBars());\n }\n }]);\n\n return ErrorBar;\n}(Component);\n\nErrorBar.propTypes = {\n dataKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.func]).isRequired,\n data: PropTypes.array,\n xAxis: PropTypes.object,\n yAxis: PropTypes.object,\n layout: PropTypes.string,\n dataPointFormatter: PropTypes.func,\n stroke: PropTypes.string,\n strokeWidth: PropTypes.number,\n width: PropTypes.number,\n offset: PropTypes.number\n};\nErrorBar.defaultProps = {\n stroke: 'black',\n strokeWidth: 1.5,\n width: 5,\n offset: 0,\n layout: 'horizontal'\n};\nexport default ErrorBar;",
"import _isFunction from \"lodash/isFunction\";\n\nvar _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview Reference Line\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport pureRender from '../util/PureRender';\nimport Layer from '../container/Layer';\nimport Label from '../component/Label';\nimport { LabeledScaleHelper, rectWithPoints } from '../util/CartesianUtils';\nimport { ifOverflowMatches } from '../util/ChartUtils';\nimport { isNumOrStr } from '../util/DataUtils';\nimport { warn } from '../util/LogUtils';\nimport { PRESENTATION_ATTRIBUTES } from '../util/ReactUtils';\nimport Rectangle from '../shape/Rectangle';\n\nvar ReferenceArea = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(ReferenceArea, _Component);\n\n function ReferenceArea() {\n _classCallCheck(this, ReferenceArea);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(ReferenceArea).apply(this, arguments));\n }\n\n _createClass(ReferenceArea, [{\n key: \"getRect\",\n value: function getRect(hasX1, hasX2, hasY1, hasY2) {\n var _this$props = this.props,\n xValue1 = _this$props.x1,\n xValue2 = _this$props.x2,\n yValue1 = _this$props.y1,\n yValue2 = _this$props.y2,\n xAxis = _this$props.xAxis,\n yAxis = _this$props.yAxis;\n var scale = LabeledScaleHelper.create({\n x: xAxis.scale,\n y: yAxis.scale\n });\n var p1 = {\n x: hasX1 ? scale.x.apply(xValue1) : scale.x.rangeMin,\n y: hasY1 ? scale.y.apply(yValue1) : scale.y.rangeMin\n };\n var p2 = {\n x: hasX2 ? scale.x.apply(xValue2) : scale.x.rangeMax,\n y: hasY2 ? scale.y.apply(yValue2) : scale.y.rangeMax\n };\n\n if (ifOverflowMatches(this.props, 'discard') && (!scale.isInRange(p1) || !scale.isInRange(p2))) {\n return null;\n }\n\n return rectWithPoints(p1, p2);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n x1 = _this$props2.x1,\n x2 = _this$props2.x2,\n y1 = _this$props2.y1,\n y2 = _this$props2.y2,\n className = _this$props2.className,\n alwaysShow = _this$props2.alwaysShow,\n clipPathId = _this$props2.clipPathId;\n warn(alwaysShow === undefined, 'The alwaysShow prop is deprecated. Please use ifOverflow=\"extendDomain\" instead.');\n var hasX1 = isNumOrStr(x1);\n var hasX2 = isNumOrStr(x2);\n var hasY1 = isNumOrStr(y1);\n var hasY2 = isNumOrStr(y2);\n\n if (!hasX1 && !hasX2 && !hasY1 && !hasY2) {\n return null;\n }\n\n var rect = this.getRect(hasX1, hasX2, hasY1, hasY2);\n\n if (!rect) {\n return null;\n }\n\n var shape = this.props.shape;\n var clipPath = ifOverflowMatches(this.props, 'hidden') ? \"url(#\".concat(clipPathId, \")\") : undefined;\n return React.createElement(Layer, {\n className: classNames('recharts-reference-area', className)\n }, this.constructor.renderRect(shape, _objectSpread({\n clipPath: clipPath\n }, this.props, rect)), Label.renderCallByParent(this.props, rect));\n }\n }], [{\n key: \"renderRect\",\n value: function renderRect(option, props) {\n var rect;\n\n if (React.isValidElement(option)) {\n rect = React.cloneElement(option, props);\n } else if (_isFunction(option)) {\n rect = option(props);\n } else {\n rect = React.createElement(Rectangle, _extends({}, props, {\n className: \"recharts-reference-area-rect\"\n }));\n }\n\n return rect;\n }\n }]);\n\n return ReferenceArea;\n}(Component), _class2.displayName = 'ReferenceArea', _class2.propTypes = _objectSpread({}, PRESENTATION_ATTRIBUTES, {\n viewBox: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number,\n width: PropTypes.number,\n height: PropTypes.number\n }),\n xAxis: PropTypes.object,\n yAxis: PropTypes.object,\n isFront: PropTypes.bool,\n alwaysShow: PropTypes.bool,\n ifOverflow: PropTypes.oneOf(['hidden', 'visible', 'discard', 'extendDomain']),\n x1: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n x2: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n y1: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n y2: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n yAxisId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n xAxisId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n shape: PropTypes.oneOfType([PropTypes.func, PropTypes.element])\n}), _class2.defaultProps = {\n isFront: false,\n ifOverflow: 'discard',\n xAxisId: 0,\n yAxisId: 0,\n r: 10,\n fill: '#ccc',\n fillOpacity: 0.5,\n stroke: 'none',\n strokeWidth: 1\n}, _temp)) || _class;\n\nexport default ReferenceArea;",
"import _isFunction from \"lodash/isFunction\";\n\nvar _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview Reference Dot\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport pureRender from '../util/PureRender';\nimport Layer from '../container/Layer';\nimport Dot from '../shape/Dot';\nimport { PRESENTATION_ATTRIBUTES, EVENT_ATTRIBUTES, getPresentationAttributes, filterEventAttributes } from '../util/ReactUtils';\nimport Label from '../component/Label';\nimport { isNumOrStr } from '../util/DataUtils';\nimport { ifOverflowMatches } from '../util/ChartUtils';\nimport { LabeledScaleHelper } from '../util/CartesianUtils';\nimport { warn } from '../util/LogUtils';\n\nvar ReferenceDot = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(ReferenceDot, _Component);\n\n function ReferenceDot() {\n _classCallCheck(this, ReferenceDot);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(ReferenceDot).apply(this, arguments));\n }\n\n _createClass(ReferenceDot, [{\n key: \"getCoordinate\",\n value: function getCoordinate() {\n var _this$props = this.props,\n x = _this$props.x,\n y = _this$props.y,\n xAxis = _this$props.xAxis,\n yAxis = _this$props.yAxis;\n var scales = LabeledScaleHelper.create({\n x: xAxis.scale,\n y: yAxis.scale\n });\n var result = scales.apply({\n x: x,\n y: y\n }, {\n bandAware: true\n });\n\n if (ifOverflowMatches(this.props, 'discard') && !scales.isInRange(result)) {\n return null;\n }\n\n return result;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n x = _this$props2.x,\n y = _this$props2.y,\n r = _this$props2.r,\n alwaysShow = _this$props2.alwaysShow,\n clipPathId = _this$props2.clipPathId;\n var isX = isNumOrStr(x);\n var isY = isNumOrStr(y);\n warn(alwaysShow === undefined, 'The alwaysShow prop is deprecated. Please use ifOverflow=\"extendDomain\" instead.');\n\n if (!isX || !isY) {\n return null;\n }\n\n var coordinate = this.getCoordinate();\n\n if (!coordinate) {\n return null;\n }\n\n var cx = coordinate.x,\n cy = coordinate.y;\n var _this$props3 = this.props,\n shape = _this$props3.shape,\n className = _this$props3.className;\n var clipPath = ifOverflowMatches(this.props, 'hidden') ? \"url(#\".concat(clipPathId, \")\") : undefined;\n\n var dotProps = _objectSpread({\n clipPath: clipPath\n }, getPresentationAttributes(this.props), filterEventAttributes(this.props), {\n cx: cx,\n cy: cy\n });\n\n return React.createElement(Layer, {\n className: classNames('recharts-reference-dot', className)\n }, this.constructor.renderDot(shape, dotProps), Label.renderCallByParent(this.props, {\n x: cx - r,\n y: cy - r,\n width: 2 * r,\n height: 2 * r\n }));\n }\n }], [{\n key: \"renderDot\",\n value: function renderDot(option, props) {\n var dot;\n\n if (React.isValidElement(option)) {\n dot = React.cloneElement(option, props);\n } else if (_isFunction(option)) {\n dot = option(props);\n } else {\n dot = React.createElement(Dot, _extends({}, props, {\n cx: props.cx,\n cy: props.cy,\n className: \"recharts-reference-dot-dot\"\n }));\n }\n\n return dot;\n }\n }]);\n\n return ReferenceDot;\n}(Component), _class2.displayName = 'ReferenceDot', _class2.propTypes = _objectSpread({}, PRESENTATION_ATTRIBUTES, EVENT_ATTRIBUTES, {\n r: PropTypes.number,\n xAxis: PropTypes.shape({\n scale: PropTypes.func\n }),\n yAxis: PropTypes.shape({\n scale: PropTypes.func\n }),\n isFront: PropTypes.bool,\n alwaysShow: PropTypes.bool,\n ifOverflow: PropTypes.oneOf(['hidden', 'visible', 'discard', 'extendDomain']),\n x: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n y: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n yAxisId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n xAxisId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n shape: PropTypes.oneOfType([PropTypes.func, PropTypes.element]),\n clipPathId: PropTypes.string\n}), _class2.defaultProps = {\n isFront: false,\n ifOverflow: 'discard',\n xAxisId: 0,\n yAxisId: 0,\n r: 10,\n fill: '#fff',\n stroke: '#ccc',\n fillOpacity: 1,\n strokeWidth: 1\n}, _temp)) || _class;\n\nexport default ReferenceDot;",
"import _some from \"lodash/some\";\nimport _isFunction from \"lodash/isFunction\";\n\nvar _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\n/**\n * @fileOverview Reference Line\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport pureRender from '../util/PureRender';\nimport Layer from '../container/Layer';\nimport { PRESENTATION_ATTRIBUTES, getPresentationAttributes, filterEventAttributes } from '../util/ReactUtils';\nimport Label from '../component/Label';\nimport { ifOverflowMatches } from '../util/ChartUtils';\nimport { isNumOrStr } from '../util/DataUtils';\nimport { LabeledScaleHelper, rectWithCoords } from '../util/CartesianUtils';\nimport { warn } from '../util/LogUtils';\n\nvar renderLine = function renderLine(option, props) {\n var line;\n\n if (React.isValidElement(option)) {\n line = React.cloneElement(option, props);\n } else if (_isFunction(option)) {\n line = option(props);\n } else {\n line = React.createElement(\"line\", _extends({}, props, {\n className: \"recharts-reference-line-line\"\n }));\n }\n\n return line;\n};\n\nvar ReferenceLine = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(ReferenceLine, _Component);\n\n function ReferenceLine() {\n _classCallCheck(this, ReferenceLine);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(ReferenceLine).apply(this, arguments));\n }\n\n _createClass(ReferenceLine, [{\n key: \"getEndPoints\",\n value: function getEndPoints(scales, isFixedX, isFixedY, isSegment) {\n var _this$props$viewBox = this.props.viewBox,\n x = _this$props$viewBox.x,\n y = _this$props$viewBox.y,\n width = _this$props$viewBox.width,\n height = _this$props$viewBox.height;\n\n if (isFixedY) {\n var _this$props = this.props,\n yCoord = _this$props.y,\n orientation = _this$props.yAxis.orientation;\n var coord = scales.y.apply(yCoord, {\n bandAware: true\n });\n\n if (ifOverflowMatches(this.props, 'discard') && !scales.y.isInRange(coord)) {\n return null;\n }\n\n var points = [{\n x: x + width,\n y: coord\n }, {\n x: x,\n y: coord\n }];\n return orientation === 'left' ? points.reverse() : points;\n }\n\n if (isFixedX) {\n var _this$props2 = this.props,\n xCoord = _this$props2.x,\n _orientation = _this$props2.xAxis.orientation;\n\n var _coord = scales.x.apply(xCoord, {\n bandAware: true\n });\n\n if (ifOverflowMatches(this.props, 'discard') && !scales.x.isInRange(_coord)) {\n return null;\n }\n\n var _points = [{\n x: _coord,\n y: y + height\n }, {\n x: _coord,\n y: y\n }];\n return _orientation === 'top' ? _points.reverse() : _points;\n }\n\n if (isSegment) {\n var segment = this.props.segment;\n\n var _points2 = segment.map(function (p) {\n return scales.apply(p, {\n bandAware: true\n });\n });\n\n if (ifOverflowMatches(this.props, 'discard') && _some(_points2, function (p) {\n return !scales.isInRange(p);\n })) {\n return null;\n }\n\n return _points2;\n }\n\n return null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props3 = this.props,\n fixedX = _this$props3.x,\n fixedY = _this$props3.y,\n segment = _this$props3.segment,\n xAxis = _this$props3.xAxis,\n yAxis = _this$props3.yAxis,\n shape = _this$props3.shape,\n className = _this$props3.className,\n alwaysShow = _this$props3.alwaysShow,\n clipPathId = _this$props3.clipPathId;\n warn(alwaysShow === undefined, 'The alwaysShow prop is deprecated. Please use ifOverflow=\"extendDomain\" instead.');\n var scales = LabeledScaleHelper.create({\n x: xAxis.scale,\n y: yAxis.scale\n });\n var isX = isNumOrStr(fixedX);\n var isY = isNumOrStr(fixedY);\n var isSegment = segment && segment.length === 2;\n var endPoints = this.getEndPoints(scales, isX, isY, isSegment);\n\n if (!endPoints) {\n return null;\n }\n\n var _endPoints = _slicedToArray(endPoints, 2),\n _endPoints$ = _endPoints[0],\n x1 = _endPoints$.x,\n y1 = _endPoints$.y,\n _endPoints$2 = _endPoints[1],\n x2 = _endPoints$2.x,\n y2 = _endPoints$2.y;\n\n var clipPath = ifOverflowMatches(this.props, 'hidden') ? \"url(#\".concat(clipPathId, \")\") : undefined;\n\n var props = _objectSpread({\n clipPath: clipPath\n }, getPresentationAttributes(this.props), filterEventAttributes(this.props), {\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2\n });\n\n return React.createElement(Layer, {\n className: classNames('recharts-reference-line', className)\n }, renderLine(shape, props), Label.renderCallByParent(this.props, rectWithCoords({\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2\n })));\n }\n }]);\n\n return ReferenceLine;\n}(Component), _class2.displayName = 'ReferenceLine', _class2.propTypes = _objectSpread({}, PRESENTATION_ATTRIBUTES, {\n viewBox: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number,\n width: PropTypes.number,\n height: PropTypes.number\n }),\n xAxis: PropTypes.object,\n yAxis: PropTypes.object,\n isFront: PropTypes.bool,\n alwaysShow: PropTypes.bool,\n ifOverflow: PropTypes.oneOf(['hidden', 'visible', 'discard', 'extendDomain']),\n x: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n y: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n segment: PropTypes.arrayOf(PropTypes.shape({\n x: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n y: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n })),\n className: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n yAxisId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n xAxisId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n shape: PropTypes.func\n}), _class2.defaultProps = {\n isFront: false,\n ifOverflow: 'discard',\n xAxisId: 0,\n yAxisId: 0,\n fill: 'none',\n stroke: '#ccc',\n fillOpacity: 1,\n strokeWidth: 1\n}, _temp)) || _class;\n\nexport default ReferenceLine;",
"var _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview X Axis\n */\nimport { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport pureRender from '../util/PureRender';\nimport { SCALE_TYPES } from '../util/ReactUtils';\n\nvar XAxis = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(XAxis, _Component);\n\n function XAxis() {\n _classCallCheck(this, XAxis);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(XAxis).apply(this, arguments));\n }\n\n _createClass(XAxis, [{\n key: \"render\",\n value: function render() {\n return null;\n }\n }]);\n\n return XAxis;\n}(Component), _class2.displayName = 'XAxis', _class2.propTypes = {\n allowDecimals: PropTypes.bool,\n allowDuplicatedCategory: PropTypes.bool,\n hide: PropTypes.bool,\n // The name of data displayed in the axis\n name: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n // The unit of data displayed in the axis\n unit: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n // The unique id of x-axis\n xAxisId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n domain: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.func, PropTypes.oneOf(['auto', 'dataMin', 'dataMax'])])),\n // The key of data displayed in the axis\n dataKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.func]),\n // The width of axis which is usually calculated internally\n width: PropTypes.number,\n // The height of axis, which need to be setted by user\n height: PropTypes.number,\n mirror: PropTypes.bool,\n // The orientation of axis\n orientation: PropTypes.oneOf(['top', 'bottom']),\n type: PropTypes.oneOf(['number', 'category']),\n // Ticks can be any type when the axis is the type of category\n // Ticks must be numbers when the axis is the type of number\n ticks: PropTypes.array,\n // The count of ticks\n tickCount: PropTypes.number,\n // The formatter function of tick\n tickFormatter: PropTypes.func,\n padding: PropTypes.shape({\n left: PropTypes.number,\n right: PropTypes.number\n }),\n allowDataOverflow: PropTypes.bool,\n scale: PropTypes.oneOfType([PropTypes.oneOf(SCALE_TYPES), PropTypes.func]),\n tick: PropTypes.oneOfType([PropTypes.bool, PropTypes.func, PropTypes.object, PropTypes.element]),\n axisLine: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n tickLine: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n minTickGap: PropTypes.number,\n tickSize: PropTypes.number,\n interval: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['preserveStart', 'preserveEnd', 'preserveStartEnd'])]),\n reversed: PropTypes.bool\n}, _class2.defaultProps = {\n allowDecimals: true,\n hide: false,\n orientation: 'bottom',\n width: 0,\n height: 30,\n mirror: false,\n xAxisId: 0,\n tickCount: 5,\n type: 'category',\n domain: [0, 'auto'],\n padding: {\n left: 0,\n right: 0\n },\n allowDataOverflow: false,\n scale: 'auto',\n reversed: false,\n allowDuplicatedCategory: true\n}, _temp)) || _class;\n\nexport default XAxis;",
"var _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview Y Axis\n */\nimport { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport pureRender from '../util/PureRender';\n\nvar YAxis = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(YAxis, _Component);\n\n function YAxis() {\n _classCallCheck(this, YAxis);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(YAxis).apply(this, arguments));\n }\n\n _createClass(YAxis, [{\n key: \"render\",\n value: function render() {\n return null;\n }\n }]);\n\n return YAxis;\n}(Component), _class2.displayName = 'YAxis', _class2.propTypes = {\n allowDecimals: PropTypes.bool,\n allowDuplicatedCategory: PropTypes.bool,\n hide: PropTypes.bool,\n // The name of data displayed in the axis\n name: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n // The unit of data displayed in the axis\n unit: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n // The unique id of y-axis\n yAxisId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n domain: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.func, PropTypes.oneOf(['auto', 'dataMin', 'dataMax'])])),\n // The key of data displayed in the axis\n dataKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.func]),\n // Ticks can be any type when the axis is the type of category\n // Ticks must be numbers when the axis is the type of number\n ticks: PropTypes.array,\n // The count of ticks\n tickCount: PropTypes.number,\n // The formatter function of tick\n tickFormatter: PropTypes.func,\n // The width of axis, which need to be setted by user\n width: PropTypes.number,\n // The height of axis which is usually calculated in Chart\n height: PropTypes.number,\n mirror: PropTypes.bool,\n // The orientation of axis\n orientation: PropTypes.oneOf(['left', 'right']),\n type: PropTypes.oneOf(['number', 'category']),\n padding: PropTypes.shape({\n top: PropTypes.number,\n bottom: PropTypes.number\n }),\n allowDataOverflow: PropTypes.bool,\n scale: PropTypes.oneOfType([PropTypes.oneOf(['auto', 'linear', 'pow', 'sqrt', 'log', 'identity', 'time', 'band', 'point', 'ordinal', 'quantile', 'quantize', 'utc', 'sequential', 'threshold']), PropTypes.func]),\n tick: PropTypes.oneOfType([PropTypes.bool, PropTypes.func, PropTypes.object, PropTypes.element]),\n axisLine: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n tickLine: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n minTickGap: PropTypes.number,\n tickSize: PropTypes.number,\n interval: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['preserveStart', 'preserveEnd', 'preserveStartEnd'])]),\n reversed: PropTypes.bool\n}, _class2.defaultProps = {\n allowDuplicatedCategory: true,\n allowDecimals: true,\n hide: false,\n orientation: 'left',\n width: 60,\n height: 0,\n mirror: false,\n yAxisId: 0,\n tickCount: 5,\n type: 'number',\n domain: [0, 'auto'],\n padding: {\n top: 0,\n bottom: 0\n },\n allowDataOverflow: false,\n scale: 'auto',\n reversed: false\n}, _temp)) || _class;\n\nexport default YAxis;",
"import EventEmitter from 'events';\nvar eventCenter = new EventEmitter();\n\nif (eventCenter.setMaxListeners) {\n eventCenter.setMaxListeners(10);\n}\n\nexport { eventCenter };\nexport var SYNC_EVENT = 'recharts.syncMouseEvents';",
"import _every from \"lodash/every\";\nimport _find from \"lodash/find\";\nimport _sortBy from \"lodash/sortBy\";\nimport _isFunction from \"lodash/isFunction\";\nimport _range from \"lodash/range\";\nimport _throttle from \"lodash/throttle\";\nimport _isNil from \"lodash/isNil\";\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\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 _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nimport React, { Component, cloneElement, isValidElement, createElement } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Surface from '../container/Surface';\nimport Layer from '../container/Layer';\nimport Tooltip from '../component/Tooltip';\nimport Legend from '../component/Legend';\nimport Curve from '../shape/Curve';\nimport Cross from '../shape/Cross';\nimport Sector from '../shape/Sector';\nimport Dot from '../shape/Dot';\nimport Rectangle from '../shape/Rectangle';\nimport { findAllByType, findChildByType, getDisplayName, parseChildIndex, getPresentationAttributes, validateWidthHeight, isChildrenEqual, renderByOrder, getReactEventByType, filterEventAttributes } from '../util/ReactUtils';\nimport CartesianAxis from '../cartesian/CartesianAxis';\nimport Brush from '../cartesian/Brush';\nimport { getOffset, calculateChartCoordinate } from '../util/DOMUtils';\nimport { getAnyElementOfObject, hasDuplicate, uniqueId, isNumber, findEntryInArray } from '../util/DataUtils';\nimport { calculateActiveTickIndex, getMainColorOfGraphicItem, getBarSizeList, getBarPosition, appendOffsetOfLegend, getLegendProps, combineEventHandlers, getTicksOfAxis, getCoordinatesOfGrid, getStackedDataOfItem, parseErrorBarsOfAxis, getBandSizeOfAxis, getStackGroupsByAxisId, getValueByDataKey, isCategorialAxis, getDomainOfItemsWithSameAxis, getDomainOfStackGroups, getDomainOfDataByKey, detectReferenceElementsDomain, parseSpecifiedDomain, parseDomainOfCategoryAxis } from '../util/ChartUtils';\nimport { inRangeOfSector, polarToCartesian } from '../util/PolarUtils';\nimport { shallowEqual } from '../util/PureRender';\nimport { eventCenter, SYNC_EVENT } from '../util/Events';\nvar ORIENT_MAP = {\n xAxis: ['bottom', 'top'],\n yAxis: ['left', 'right']\n};\nvar originCoordinate = {\n x: 0,\n y: 0\n};\n\nvar generateCategoricalChart = function generateCategoricalChart(_ref) {\n var chartName = _ref.chartName,\n GraphicalChild = _ref.GraphicalChild,\n _ref$eventType = _ref.eventType,\n eventType = _ref$eventType === void 0 ? 'axis' : _ref$eventType,\n axisComponents = _ref.axisComponents,\n legendContent = _ref.legendContent,\n formatAxisMap = _ref.formatAxisMap,\n defaultProps = _ref.defaultProps,\n propTypes = _ref.propTypes;\n\n var CategoricalChartWrapper =\n /*#__PURE__*/\n function (_Component) {\n _inherits(CategoricalChartWrapper, _Component);\n\n /**\n * Returns default, reset state for the categorical chart.\n * @param {Object} props Props object to use when creating the default state\n * @return {Object} Whole new state\n */\n function CategoricalChartWrapper(_props) {\n var _this;\n\n _classCallCheck(this, CategoricalChartWrapper);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(CategoricalChartWrapper).call(this, _props));\n\n _this.handleLegendBBoxUpdate = function (box) {\n if (box && _this.legendInstance) {\n var _this$state = _this.state,\n dataStartIndex = _this$state.dataStartIndex,\n dataEndIndex = _this$state.dataEndIndex,\n updateId = _this$state.updateId;\n\n _this.setState(_this.updateStateOfAxisMapsOffsetAndStackGroups({\n props: _this.props,\n dataStartIndex: dataStartIndex,\n dataEndIndex: dataEndIndex,\n updateId: updateId\n }));\n }\n };\n\n _this.handleReceiveSyncEvent = function (cId, chartId, data) {\n var _this$props = _this.props,\n syncId = _this$props.syncId,\n layout = _this$props.layout;\n var updateId = _this.state.updateId;\n\n if (syncId === cId && chartId !== _this.uniqueChartId) {\n var dataStartIndex = data.dataStartIndex,\n dataEndIndex = data.dataEndIndex;\n\n if (!_isNil(data.dataStartIndex) || !_isNil(data.dataEndIndex)) {\n _this.setState(_objectSpread({\n dataStartIndex: dataStartIndex,\n dataEndIndex: dataEndIndex\n }, _this.updateStateOfAxisMapsOffsetAndStackGroups({\n props: _this.props,\n dataStartIndex: dataStartIndex,\n dataEndIndex: dataEndIndex,\n updateId: updateId\n })));\n } else if (!_isNil(data.activeTooltipIndex)) {\n var chartX = data.chartX,\n chartY = data.chartY,\n activeTooltipIndex = data.activeTooltipIndex;\n var _this$state2 = _this.state,\n offset = _this$state2.offset,\n tooltipTicks = _this$state2.tooltipTicks;\n\n if (!offset) {\n return;\n }\n\n var viewBox = _objectSpread({}, offset, {\n x: offset.left,\n y: offset.top\n }); // When a categotical chart is combined with another chart, the value of chartX\n // and chartY may beyond the boundaries.\n\n\n var validateChartX = Math.min(chartX, viewBox.x + viewBox.width);\n var validateChartY = Math.min(chartY, viewBox.y + viewBox.height);\n var activeLabel = tooltipTicks[activeTooltipIndex] && tooltipTicks[activeTooltipIndex].value;\n\n var activePayload = _this.getTooltipContent(activeTooltipIndex);\n\n var activeCoordinate = tooltipTicks[activeTooltipIndex] ? {\n x: layout === 'horizontal' ? tooltipTicks[activeTooltipIndex].coordinate : validateChartX,\n y: layout === 'horizontal' ? validateChartY : tooltipTicks[activeTooltipIndex].coordinate\n } : originCoordinate;\n\n _this.setState(_objectSpread({}, data, {\n activeLabel: activeLabel,\n activeCoordinate: activeCoordinate,\n activePayload: activePayload\n }));\n } else {\n _this.setState(data);\n }\n }\n };\n\n _this.handleBrushChange = function (_ref2) {\n var startIndex = _ref2.startIndex,\n endIndex = _ref2.endIndex;\n\n // Only trigger changes if the extents of the brush have actually changed\n if (startIndex !== _this.state.dataStartIndex || endIndex !== _this.state.dataEndIndex) {\n var updateId = _this.state.updateId;\n\n _this.setState(function () {\n return _objectSpread({\n dataStartIndex: startIndex,\n dataEndIndex: endIndex\n }, _this.updateStateOfAxisMapsOffsetAndStackGroups({\n props: _this.props,\n dataStartIndex: startIndex,\n dataEndIndex: endIndex,\n updateId: updateId\n }));\n });\n\n _this.triggerSyncEvent({\n dataStartIndex: startIndex,\n dataEndIndex: endIndex\n });\n }\n };\n\n _this.handleMouseEnter = function (e) {\n var onMouseEnter = _this.props.onMouseEnter;\n\n var mouse = _this.getMouseInfo(e);\n\n if (mouse) {\n var nextState = _objectSpread({}, mouse, {\n isTooltipActive: true\n });\n\n _this.setState(nextState);\n\n _this.triggerSyncEvent(nextState);\n\n if (_isFunction(onMouseEnter)) {\n onMouseEnter(nextState, e);\n }\n }\n };\n\n _this.triggeredAfterMouseMove = function (e) {\n var onMouseMove = _this.props.onMouseMove;\n\n var mouse = _this.getMouseInfo(e);\n\n var nextState = mouse ? _objectSpread({}, mouse, {\n isTooltipActive: true\n }) : {\n isTooltipActive: false\n };\n\n _this.setState(nextState);\n\n _this.triggerSyncEvent(nextState);\n\n if (_isFunction(onMouseMove)) {\n onMouseMove(nextState, e);\n }\n };\n\n _this.handleItemMouseEnter = function (el) {\n _this.setState(function () {\n return {\n isTooltipActive: true,\n activeItem: el,\n activePayload: el.tooltipPayload,\n activeCoordinate: el.tooltipPosition || {\n x: el.cx,\n y: el.cy\n }\n };\n });\n };\n\n _this.handleItemMouseLeave = function () {\n _this.setState(function () {\n return {\n isTooltipActive: false\n };\n });\n };\n\n _this.handleMouseMove = function (e) {\n if (e && _isFunction(e.persist)) {\n e.persist();\n }\n\n _this.triggeredAfterMouseMove(e);\n };\n\n _this.handleMouseLeave = function (e) {\n var onMouseLeave = _this.props.onMouseLeave;\n var nextState = {\n isTooltipActive: false\n };\n\n _this.setState(nextState);\n\n _this.triggerSyncEvent(nextState);\n\n if (_isFunction(onMouseLeave)) {\n onMouseLeave(nextState, e);\n }\n };\n\n _this.handleOuterEvent = function (e) {\n var eventName = getReactEventByType(e);\n\n if (eventName && _isFunction(_this.props[eventName])) {\n var mouse = _this.getMouseInfo(e);\n\n var handler = _this.props[eventName];\n handler(mouse, e);\n }\n };\n\n _this.handleClick = function (e) {\n var onClick = _this.props.onClick;\n\n if (_isFunction(onClick)) {\n var mouse = _this.getMouseInfo(e);\n\n onClick(mouse, e);\n }\n };\n\n _this.handleMouseDown = function (e) {\n var onMouseDown = _this.props.onMouseDown;\n\n if (_isFunction(onMouseDown)) {\n var mouse = _this.getMouseInfo(e);\n\n onMouseDown(mouse, e);\n }\n };\n\n _this.handleMouseUp = function (e) {\n var onMouseUp = _this.props.onMouseUp;\n\n if (_isFunction(onMouseUp)) {\n var mouse = _this.getMouseInfo(e);\n\n onMouseUp(mouse, e);\n }\n };\n\n _this.handleTouchMove = function (e) {\n if (e.changedTouches != null && e.changedTouches.length > 0) {\n _this.handleMouseMove(e.changedTouches[0]);\n }\n };\n\n _this.handleTouchStart = function (e) {\n if (e.changedTouches != null && e.changedTouches.length > 0) {\n _this.handleMouseDown(e.changedTouches[0]);\n }\n };\n\n _this.handleTouchEnd = function (e) {\n if (e.changedTouches != null && e.changedTouches.length > 0) {\n _this.handleMouseUp(e.changedTouches[0]);\n }\n };\n\n _this.verticalCoordinatesGenerator = function (_ref3) {\n var xAxis = _ref3.xAxis,\n width = _ref3.width,\n height = _ref3.height,\n offset = _ref3.offset;\n return getCoordinatesOfGrid(CartesianAxis.getTicks(_objectSpread({}, CartesianAxis.defaultProps, xAxis, {\n ticks: getTicksOfAxis(xAxis, true),\n viewBox: {\n x: 0,\n y: 0,\n width: width,\n height: height\n }\n })), offset.left, offset.left + offset.width);\n };\n\n _this.horizontalCoordinatesGenerator = function (_ref4) {\n var yAxis = _ref4.yAxis,\n width = _ref4.width,\n height = _ref4.height,\n offset = _ref4.offset;\n return getCoordinatesOfGrid(CartesianAxis.getTicks(_objectSpread({}, CartesianAxis.defaultProps, yAxis, {\n ticks: getTicksOfAxis(yAxis, true),\n viewBox: {\n x: 0,\n y: 0,\n width: width,\n height: height\n }\n })), offset.top, offset.top + offset.height);\n };\n\n _this.axesTicksGenerator = function (axis) {\n return getTicksOfAxis(axis, true);\n };\n\n _this.tooltipTicksGenerator = function (axisMap) {\n var axis = getAnyElementOfObject(axisMap);\n var tooltipTicks = getTicksOfAxis(axis, false, true);\n return {\n tooltipTicks: tooltipTicks,\n orderedTooltipTicks: _sortBy(tooltipTicks, function (o) {\n return o.coordinate;\n }),\n tooltipAxis: axis,\n tooltipAxisBandSize: getBandSizeOfAxis(axis)\n };\n };\n\n _this.renderCursor = function (element) {\n var _this$state3 = _this.state,\n isTooltipActive = _this$state3.isTooltipActive,\n activeCoordinate = _this$state3.activeCoordinate,\n activePayload = _this$state3.activePayload,\n offset = _this$state3.offset;\n\n if (!element || !element.props.cursor || !isTooltipActive || !activeCoordinate) {\n return null;\n }\n\n var layout = _this.props.layout;\n var restProps;\n var cursorComp = Curve;\n\n if (chartName === 'ScatterChart') {\n restProps = activeCoordinate;\n cursorComp = Cross;\n } else if (chartName === 'BarChart') {\n restProps = _this.getCursorRectangle();\n cursorComp = Rectangle;\n } else if (layout === 'radial') {\n var _this$getCursorPoints = _this.getCursorPoints(),\n cx = _this$getCursorPoints.cx,\n cy = _this$getCursorPoints.cy,\n radius = _this$getCursorPoints.radius,\n startAngle = _this$getCursorPoints.startAngle,\n endAngle = _this$getCursorPoints.endAngle;\n\n restProps = {\n cx: cx,\n cy: cy,\n startAngle: startAngle,\n endAngle: endAngle,\n innerRadius: radius,\n outerRadius: radius\n };\n cursorComp = Sector;\n } else {\n restProps = {\n points: _this.getCursorPoints()\n };\n cursorComp = Curve;\n }\n\n var key = element.key || '_recharts-cursor';\n\n var cursorProps = _objectSpread({\n stroke: '#ccc',\n pointerEvents: 'none'\n }, offset, restProps, getPresentationAttributes(element.props.cursor), {\n payload: activePayload,\n key: key,\n className: 'recharts-tooltip-cursor'\n });\n\n return isValidElement(element.props.cursor) ? cloneElement(element.props.cursor, cursorProps) : createElement(cursorComp, cursorProps);\n };\n\n _this.renderPolarAxis = function (element, displayName, index) {\n var axisType = element.type.axisType;\n\n var axisMap = _this.state[\"\".concat(axisType, \"Map\")];\n\n var axisOption = axisMap[element.props[\"\".concat(axisType, \"Id\")]];\n return cloneElement(element, _objectSpread({}, axisOption, {\n className: axisType,\n key: element.key || \"\".concat(displayName, \"-\").concat(index),\n ticks: getTicksOfAxis(axisOption, true)\n }));\n };\n\n _this.renderXAxis = function (element, displayName, index) {\n var xAxisMap = _this.state.xAxisMap;\n var axisObj = xAxisMap[element.props.xAxisId];\n return _this.renderAxis(axisObj, element, displayName, index);\n };\n\n _this.renderYAxis = function (element, displayName, index) {\n var yAxisMap = _this.state.yAxisMap;\n var axisObj = yAxisMap[element.props.yAxisId];\n return _this.renderAxis(axisObj, element, displayName, index);\n };\n\n _this.renderGrid = function (element) {\n var _this$state4 = _this.state,\n xAxisMap = _this$state4.xAxisMap,\n yAxisMap = _this$state4.yAxisMap,\n offset = _this$state4.offset;\n var _this$props2 = _this.props,\n width = _this$props2.width,\n height = _this$props2.height;\n var xAxis = getAnyElementOfObject(xAxisMap);\n\n var yAxisWithFiniteDomain = _find(yAxisMap, function (axis) {\n return _every(axis.domain, Number.isFinite);\n });\n\n var yAxis = yAxisWithFiniteDomain || getAnyElementOfObject(yAxisMap);\n var props = element.props || {};\n return cloneElement(element, {\n key: element.key || 'grid',\n x: isNumber(props.x) ? props.x : offset.left,\n y: isNumber(props.y) ? props.y : offset.top,\n width: isNumber(props.width) ? props.width : offset.width,\n height: isNumber(props.height) ? props.height : offset.height,\n xAxis: xAxis,\n yAxis: yAxis,\n offset: offset,\n chartWidth: width,\n chartHeight: height,\n verticalCoordinatesGenerator: props.verticalCoordinatesGenerator || _this.verticalCoordinatesGenerator,\n horizontalCoordinatesGenerator: props.horizontalCoordinatesGenerator || _this.horizontalCoordinatesGenerator\n });\n };\n\n _this.renderPolarGrid = function (element) {\n var _this$state5 = _this.state,\n radiusAxisMap = _this$state5.radiusAxisMap,\n angleAxisMap = _this$state5.angleAxisMap;\n var radiusAxis = getAnyElementOfObject(radiusAxisMap);\n var angleAxis = getAnyElementOfObject(angleAxisMap);\n var cx = angleAxis.cx,\n cy = angleAxis.cy,\n innerRadius = angleAxis.innerRadius,\n outerRadius = angleAxis.outerRadius;\n return cloneElement(element, {\n polarAngles: getTicksOfAxis(angleAxis, true).map(function (entry) {\n return entry.coordinate;\n }),\n polarRadius: getTicksOfAxis(radiusAxis, true).map(function (entry) {\n return entry.coordinate;\n }),\n cx: cx,\n cy: cy,\n innerRadius: innerRadius,\n outerRadius: outerRadius,\n key: element.key || 'polar-grid'\n });\n };\n\n _this.renderBrush = function (element) {\n var _this$props3 = _this.props,\n margin = _this$props3.margin,\n data = _this$props3.data;\n var _this$state6 = _this.state,\n offset = _this$state6.offset,\n dataStartIndex = _this$state6.dataStartIndex,\n dataEndIndex = _this$state6.dataEndIndex,\n updateId = _this$state6.updateId; // TODO: update brush when children update\n\n return cloneElement(element, {\n key: element.key || '_recharts-brush',\n onChange: combineEventHandlers(_this.handleBrushChange, null, element.props.onChange),\n data: data,\n x: isNumber(element.props.x) ? element.props.x : offset.left,\n y: isNumber(element.props.y) ? element.props.y : offset.top + offset.height + offset.brushBottom - (margin.bottom || 0),\n width: isNumber(element.props.width) ? element.props.width : offset.width,\n startIndex: dataStartIndex,\n endIndex: dataEndIndex,\n updateId: \"brush-\".concat(updateId)\n });\n };\n\n _this.renderReferenceElement = function (element, displayName, index) {\n if (!element) {\n return null;\n }\n\n var _assertThisInitialize = _assertThisInitialized(_assertThisInitialized(_this)),\n clipPathId = _assertThisInitialize.clipPathId;\n\n var _this$state7 = _this.state,\n xAxisMap = _this$state7.xAxisMap,\n yAxisMap = _this$state7.yAxisMap,\n offset = _this$state7.offset;\n var _element$props = element.props,\n xAxisId = _element$props.xAxisId,\n yAxisId = _element$props.yAxisId;\n return cloneElement(element, {\n key: element.key || \"\".concat(displayName, \"-\").concat(index),\n xAxis: xAxisMap[xAxisId],\n yAxis: yAxisMap[yAxisId],\n viewBox: {\n x: offset.left,\n y: offset.top,\n width: offset.width,\n height: offset.height\n },\n clipPathId: clipPathId\n });\n };\n\n _this.renderGraphicChild = function (element, displayName, index) {\n var item = _this.filterFormatItem(element, displayName, index);\n\n if (!item) {\n return null;\n }\n\n var graphicalItem = cloneElement(element, item.props);\n var _this$state8 = _this.state,\n isTooltipActive = _this$state8.isTooltipActive,\n tooltipAxis = _this$state8.tooltipAxis,\n activeTooltipIndex = _this$state8.activeTooltipIndex,\n activeLabel = _this$state8.activeLabel;\n var children = _this.props.children;\n var tooltipItem = findChildByType(children, Tooltip);\n var _item$props = item.props,\n points = _item$props.points,\n isRange = _item$props.isRange,\n baseLine = _item$props.baseLine;\n var _item$item$props = item.item.props,\n activeDot = _item$item$props.activeDot,\n hide = _item$item$props.hide;\n var hasActive = !hide && isTooltipActive && tooltipItem && activeDot && activeTooltipIndex >= 0;\n\n if (hasActive) {\n var activePoint, basePoint;\n\n if (tooltipAxis.dataKey && !tooltipAxis.allowDuplicatedCategory) {\n activePoint = findEntryInArray(points, \"payload.\".concat(tooltipAxis.dataKey), activeLabel);\n basePoint = isRange && baseLine && findEntryInArray(baseLine, \"payload.\".concat(tooltipAxis.dataKey), activeLabel);\n } else {\n activePoint = points[activeTooltipIndex];\n basePoint = isRange && baseLine && baseLine[activeTooltipIndex];\n }\n\n if (!_isNil(activePoint)) {\n return [graphicalItem].concat(_toConsumableArray(_this.renderActivePoints({\n item: item,\n activePoint: activePoint,\n basePoint: basePoint,\n childIndex: activeTooltipIndex,\n isRange: isRange\n })));\n }\n }\n\n if (isRange) {\n return [graphicalItem, null, null];\n }\n\n return [graphicalItem, null];\n };\n\n var defaultState = _this.constructor.createDefaultState(_props);\n\n var _updateId = 0;\n _this.state = _objectSpread({}, defaultState, {\n updateId: 0\n }, _this.updateStateOfAxisMapsOffsetAndStackGroups(_objectSpread({\n props: _props\n }, defaultState, {\n updateId: _updateId\n })));\n _this.uniqueChartId = _isNil(_props.id) ? uniqueId('recharts') : _props.id;\n _this.clipPathId = \"\".concat(_this.uniqueChartId, \"-clip\");\n\n if (_props.throttleDelay) {\n _this.triggeredAfterMouseMove = _throttle(_this.triggeredAfterMouseMove, _props.throttleDelay);\n }\n\n return _this;\n }\n /* eslint-disable react/no-did-mount-set-state */\n\n\n _createClass(CategoricalChartWrapper, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (!_isNil(this.props.syncId)) {\n this.addListener();\n }\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n var _this2 = this;\n\n var _this$props4 = this.props,\n data = _this$props4.data,\n children = _this$props4.children,\n width = _this$props4.width,\n height = _this$props4.height,\n layout = _this$props4.layout,\n stackOffset = _this$props4.stackOffset,\n margin = _this$props4.margin;\n var updateId = this.state.updateId;\n\n if (nextProps.data !== data || nextProps.width !== width || nextProps.height !== height || nextProps.layout !== layout || nextProps.stackOffset !== stackOffset || !shallowEqual(nextProps.margin, margin)) {\n var defaultState = this.constructor.createDefaultState(nextProps);\n this.setState(_objectSpread({}, defaultState, {\n updateId: updateId + 1\n }, this.updateStateOfAxisMapsOffsetAndStackGroups(_objectSpread({\n props: nextProps\n }, defaultState, {\n updateId: updateId + 1\n }))));\n } else if (!isChildrenEqual(nextProps.children, children)) {\n // update configuration in chilren\n var hasGlobalData = !_isNil(nextProps.data);\n var newUpdateId = hasGlobalData ? updateId : updateId + 1;\n this.setState(function (prevState) {\n return _objectSpread({\n updateId: newUpdateId\n }, _this2.updateStateOfAxisMapsOffsetAndStackGroups(_objectSpread({\n props: nextProps\n }, prevState, {\n updateId: newUpdateId\n })));\n });\n } // add syncId\n\n\n if (_isNil(this.props.syncId) && !_isNil(nextProps.syncId)) {\n this.addListener();\n } // remove syncId\n\n\n if (!_isNil(this.props.syncId) && _isNil(nextProps.syncId)) {\n this.removeListener();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (!_isNil(this.props.syncId)) {\n this.removeListener();\n }\n\n if (typeof this.triggeredAfterMouseMove.cancel === 'function') {\n this.triggeredAfterMouseMove.cancel();\n }\n }\n /**\n * Get the configuration of all x-axis or y-axis\n * @param {Object} props Latest props\n * @param {String} axisType The type of axis\n * @param {Array} graphicalItems The instances of item\n * @param {Object} stackGroups The items grouped by axisId and stackId\n * @param {Number} dataStartIndex The start index of the data series when a brush is applied\n * @param {Number} dataEndIndex The end index of the data series when a brush is applied\n * @return {Object} Configuration\n */\n\n }, {\n key: \"getAxisMap\",\n value: function getAxisMap(props, _ref5) {\n var _ref5$axisType = _ref5.axisType,\n axisType = _ref5$axisType === void 0 ? 'xAxis' : _ref5$axisType,\n AxisComp = _ref5.AxisComp,\n graphicalItems = _ref5.graphicalItems,\n stackGroups = _ref5.stackGroups,\n dataStartIndex = _ref5.dataStartIndex,\n dataEndIndex = _ref5.dataEndIndex;\n var children = props.children;\n var axisIdKey = \"\".concat(axisType, \"Id\"); // Get all the instance of Axis\n\n var axes = findAllByType(children, AxisComp);\n var axisMap = {};\n\n if (axes && axes.length) {\n axisMap = this.getAxisMapByAxes(props, {\n axes: axes,\n graphicalItems: graphicalItems,\n axisType: axisType,\n axisIdKey: axisIdKey,\n stackGroups: stackGroups,\n dataStartIndex: dataStartIndex,\n dataEndIndex: dataEndIndex\n });\n } else if (graphicalItems && graphicalItems.length) {\n axisMap = this.getAxisMapByItems(props, {\n Axis: AxisComp,\n graphicalItems: graphicalItems,\n axisType: axisType,\n axisIdKey: axisIdKey,\n stackGroups: stackGroups,\n dataStartIndex: dataStartIndex,\n dataEndIndex: dataEndIndex\n });\n }\n\n return axisMap;\n }\n /**\n * Get the configuration of axis by the options of axis instance\n * @param {Object} props Latest props\n * @param {Array} axes The instance of axes\n * @param {Array} graphicalItems The instances of item\n * @param {String} axisType The type of axis, xAxis - x-axis, yAxis - y-axis\n * @param {String} axisIdKey The unique id of an axis\n * @param {Object} stackGroups The items grouped by axisId and stackId\n * @param {Number} dataStartIndex The start index of the data series when a brush is applied\n * @param {Number} dataEndIndex The end index of the data series when a brush is applied\n * @return {Object} Configuration\n */\n\n }, {\n key: \"getAxisMapByAxes\",\n value: function getAxisMapByAxes(props, _ref6) {\n var _this3 = this;\n\n var axes = _ref6.axes,\n graphicalItems = _ref6.graphicalItems,\n axisType = _ref6.axisType,\n axisIdKey = _ref6.axisIdKey,\n stackGroups = _ref6.stackGroups,\n dataStartIndex = _ref6.dataStartIndex,\n dataEndIndex = _ref6.dataEndIndex;\n var layout = props.layout,\n children = props.children,\n stackOffset = props.stackOffset;\n var isCategorial = isCategorialAxis(layout, axisType); // Eliminate duplicated axes\n\n var axisMap = axes.reduce(function (result, child) {\n var _child$props = child.props,\n type = _child$props.type,\n dataKey = _child$props.dataKey,\n allowDataOverflow = _child$props.allowDataOverflow,\n allowDuplicatedCategory = _child$props.allowDuplicatedCategory,\n scale = _child$props.scale,\n ticks = _child$props.ticks;\n var axisId = child.props[axisIdKey];\n\n var displayedData = _this3.constructor.getDisplayedData(props, {\n graphicalItems: graphicalItems.filter(function (item) {\n return item.props[axisIdKey] === axisId;\n }),\n dataStartIndex: dataStartIndex,\n dataEndIndex: dataEndIndex\n });\n\n var len = displayedData.length;\n\n if (!result[axisId]) {\n var domain, duplicateDomain, categoricalDomain;\n\n if (dataKey) {\n domain = getDomainOfDataByKey(displayedData, dataKey, type);\n\n if (type === 'category' && isCategorial) {\n var duplicate = hasDuplicate(domain);\n\n if (allowDuplicatedCategory && duplicate) {\n duplicateDomain = domain; // When category axis has duplicated text, serial numbers are used to generate scale\n\n domain = _range(0, len);\n } else if (!allowDuplicatedCategory) {\n // remove duplicated category\n domain = parseDomainOfCategoryAxis(child.props.domain, domain, child).reduce(function (finalDomain, entry) {\n return finalDomain.indexOf(entry) >= 0 ? finalDomain : _toConsumableArray(finalDomain).concat([entry]);\n }, []);\n }\n } else if (type === 'category') {\n if (!allowDuplicatedCategory) {\n domain = parseDomainOfCategoryAxis(child.props.domain, domain, child).reduce(function (finalDomain, entry) {\n return finalDomain.indexOf(entry) >= 0 || entry === '' || _isNil(entry) ? finalDomain : _toConsumableArray(finalDomain).concat([entry]);\n }, []);\n } else {\n // eliminate undefined or null or empty string\n domain = domain.filter(function (entry) {\n return entry !== '' && !_isNil(entry);\n });\n }\n } else if (type === 'number') {\n var errorBarsDomain = parseErrorBarsOfAxis(displayedData, graphicalItems.filter(function (item) {\n return item.props[axisIdKey] === axisId && !item.props.hide;\n }), dataKey, axisType);\n\n if (errorBarsDomain) {\n domain = errorBarsDomain;\n }\n }\n\n if (isCategorial && (type === 'number' || scale !== 'auto')) {\n categoricalDomain = getDomainOfDataByKey(displayedData, dataKey, 'category');\n }\n } else if (isCategorial) {\n domain = _range(0, len);\n } else if (stackGroups && stackGroups[axisId] && stackGroups[axisId].hasStack && type === 'number') {\n // when stackOffset is 'expand', the domain may be calculated as [0, 1.000000000002]\n domain = stackOffset === 'expand' ? [0, 1] : getDomainOfStackGroups(stackGroups[axisId].stackGroups, dataStartIndex, dataEndIndex);\n } else {\n domain = getDomainOfItemsWithSameAxis(displayedData, graphicalItems.filter(function (item) {\n return item.props[axisIdKey] === axisId && !item.props.hide;\n }), type, true);\n }\n\n if (type === 'number') {\n // To detect wether there is any reference lines whose props alwaysShow is true\n domain = detectReferenceElementsDomain(children, domain, axisId, axisType, ticks);\n\n if (child.props.domain) {\n domain = parseSpecifiedDomain(child.props.domain, domain, allowDataOverflow);\n }\n }\n\n return _objectSpread({}, result, _defineProperty({}, axisId, _objectSpread({}, child.props, {\n axisType: axisType,\n domain: domain,\n categoricalDomain: categoricalDomain,\n duplicateDomain: duplicateDomain,\n originalDomain: child.props.domain,\n isCategorial: isCategorial,\n layout: layout\n })));\n }\n\n return result;\n }, {});\n return axisMap;\n }\n /**\n * Get the configuration of axis by the options of item,\n * this kind of axis does not display in chart\n * @param {Object} props Latest props\n * @param {Array} graphicalItems The instances of item\n * @param {ReactElement} Axis Axis Component\n * @param {String} axisType The type of axis, xAxis - x-axis, yAxis - y-axis\n * @param {String} axisIdKey The unique id of an axis\n * @param {Object} stackGroups The items grouped by axisId and stackId\n * @param {Number} dataStartIndex The start index of the data series when a brush is applied\n * @param {Number} dataEndIndex The end index of the data series when a brush is applied\n * @return {Object} Configuration\n */\n\n }, {\n key: \"getAxisMapByItems\",\n value: function getAxisMapByItems(props, _ref7) {\n var graphicalItems = _ref7.graphicalItems,\n Axis = _ref7.Axis,\n axisType = _ref7.axisType,\n axisIdKey = _ref7.axisIdKey,\n stackGroups = _ref7.stackGroups,\n dataStartIndex = _ref7.dataStartIndex,\n dataEndIndex = _ref7.dataEndIndex;\n var layout = props.layout,\n children = props.children;\n var displayedData = this.constructor.getDisplayedData(props, {\n graphicalItems: graphicalItems,\n dataStartIndex: dataStartIndex,\n dataEndIndex: dataEndIndex\n });\n var len = displayedData.length;\n var isCategorial = isCategorialAxis(layout, axisType);\n var index = -1; // The default type of x-axis is category axis,\n // The default contents of x-axis is the serial numbers of data\n // The default type of y-axis is number axis\n // The default contents of y-axis is the domain of data\n\n var axisMap = graphicalItems.reduce(function (result, child) {\n var axisId = child.props[axisIdKey];\n\n if (!result[axisId]) {\n index++;\n var domain;\n\n if (isCategorial) {\n domain = _range(0, len);\n } else if (stackGroups && stackGroups[axisId] && stackGroups[axisId].hasStack) {\n domain = getDomainOfStackGroups(stackGroups[axisId].stackGroups, dataStartIndex, dataEndIndex);\n domain = detectReferenceElementsDomain(children, domain, axisId, axisType);\n } else {\n domain = parseSpecifiedDomain(Axis.defaultProps.domain, getDomainOfItemsWithSameAxis(displayedData, graphicalItems.filter(function (item) {\n return item.props[axisIdKey] === axisId && !item.props.hide;\n }), 'number'), Axis.defaultProps.allowDataOverflow);\n domain = detectReferenceElementsDomain(children, domain, axisId, axisType);\n }\n\n return _objectSpread({}, result, _defineProperty({}, axisId, _objectSpread({\n axisType: axisType\n }, Axis.defaultProps, {\n hide: true,\n orientation: ORIENT_MAP[axisType] && ORIENT_MAP[axisType][index % 2],\n domain: domain,\n originalDomain: Axis.defaultProps.domain,\n isCategorial: isCategorial,\n layout: layout // specify scale when no Axis\n // scale: isCategorial ? 'band' : 'linear',\n\n })));\n }\n\n return result;\n }, {});\n return axisMap;\n }\n }, {\n key: \"getActiveCoordinate\",\n value: function getActiveCoordinate(tooltipTicks, activeIndex, rangeObj) {\n var layout = this.props.layout;\n var entry = tooltipTicks.find(function (tick) {\n return tick && tick.index === activeIndex;\n });\n\n if (entry) {\n if (layout === 'horizontal') {\n return {\n x: entry.coordinate,\n y: rangeObj.y\n };\n }\n\n if (layout === 'vertical') {\n return {\n x: rangeObj.x,\n y: entry.coordinate\n };\n }\n\n if (layout === 'centric') {\n var _angle = entry.coordinate;\n var _radius = rangeObj.radius;\n return _objectSpread({}, rangeObj, polarToCartesian(rangeObj.cx, rangeObj.cy, _radius, _angle), {\n angle: _angle,\n radius: _radius\n });\n }\n\n var radius = entry.coordinate;\n var angle = rangeObj.angle;\n return _objectSpread({}, rangeObj, polarToCartesian(rangeObj.cx, rangeObj.cy, radius, angle), {\n angle: angle,\n radius: radius\n });\n }\n\n return originCoordinate;\n }\n /**\n * Get the information of mouse in chart, return null when the mouse is not in the chart\n * @param {Object} event The event object\n * @return {Object} Mouse data\n */\n\n }, {\n key: \"getMouseInfo\",\n value: function getMouseInfo(event) {\n if (!this.container) {\n return null;\n }\n\n var containerOffset = getOffset(this.container);\n var e = calculateChartCoordinate(event, containerOffset);\n var rangeObj = this.inRange(e.chartX, e.chartY);\n\n if (!rangeObj) {\n return null;\n }\n\n var _this$state9 = this.state,\n xAxisMap = _this$state9.xAxisMap,\n yAxisMap = _this$state9.yAxisMap;\n\n if (eventType !== 'axis' && xAxisMap && yAxisMap) {\n var xScale = getAnyElementOfObject(xAxisMap).scale;\n var yScale = getAnyElementOfObject(yAxisMap).scale;\n var xValue = xScale && xScale.invert ? xScale.invert(e.chartX) : null;\n var yValue = yScale && yScale.invert ? yScale.invert(e.chartY) : null;\n return _objectSpread({}, e, {\n xValue: xValue,\n yValue: yValue\n });\n }\n\n var _this$state10 = this.state,\n ticks = _this$state10.orderedTooltipTicks,\n axis = _this$state10.tooltipAxis,\n tooltipTicks = _this$state10.tooltipTicks;\n var pos = this.calculateTooltipPos(rangeObj);\n var activeIndex = calculateActiveTickIndex(pos, ticks, tooltipTicks, axis);\n\n if (activeIndex >= 0 && tooltipTicks) {\n var activeLabel = tooltipTicks[activeIndex] && tooltipTicks[activeIndex].value;\n var activePayload = this.getTooltipContent(activeIndex, activeLabel);\n var activeCoordinate = this.getActiveCoordinate(ticks, activeIndex, rangeObj);\n return _objectSpread({}, e, {\n activeTooltipIndex: activeIndex,\n activeLabel: activeLabel,\n activePayload: activePayload,\n activeCoordinate: activeCoordinate\n });\n }\n\n return null;\n }\n /**\n * Get the content to be displayed in the tooltip\n * @param {Number} activeIndex Active index of data\n * @param {String} activeLabel Active label of data\n * @return {Array} The content of tooltip\n */\n\n }, {\n key: \"getTooltipContent\",\n value: function getTooltipContent(activeIndex, activeLabel) {\n var _this$state11 = this.state,\n graphicalItems = _this$state11.graphicalItems,\n tooltipAxis = _this$state11.tooltipAxis;\n var displayedData = this.constructor.getDisplayedData(this.props, this.state);\n\n if (activeIndex < 0 || !graphicalItems || !graphicalItems.length || activeIndex >= displayedData.length) {\n return null;\n } // get data by activeIndex when the axis don't allow duplicated category\n\n\n return graphicalItems.reduce(function (result, child) {\n var hide = child.props.hide;\n\n if (hide) {\n return result;\n }\n\n var _child$props2 = child.props,\n dataKey = _child$props2.dataKey,\n name = _child$props2.name,\n unit = _child$props2.unit,\n formatter = _child$props2.formatter,\n data = _child$props2.data;\n var payload;\n\n if (tooltipAxis.dataKey && !tooltipAxis.allowDuplicatedCategory) {\n // graphic child has data props\n payload = findEntryInArray(data || displayedData, tooltipAxis.dataKey, activeLabel);\n } else {\n payload = displayedData[activeIndex];\n }\n\n if (!payload) {\n return result;\n }\n\n return _toConsumableArray(result).concat([_objectSpread({}, getPresentationAttributes(child), {\n dataKey: dataKey,\n unit: unit,\n formatter: formatter,\n name: name || dataKey,\n color: getMainColorOfGraphicItem(child),\n value: getValueByDataKey(payload, dataKey),\n payload: payload\n })]);\n }, []);\n }\n }, {\n key: \"getFormatItems\",\n value: function getFormatItems(props, currentState) {\n var _this4 = this;\n\n var graphicalItems = currentState.graphicalItems,\n stackGroups = currentState.stackGroups,\n offset = currentState.offset,\n updateId = currentState.updateId,\n dataStartIndex = currentState.dataStartIndex,\n dataEndIndex = currentState.dataEndIndex;\n var barSize = props.barSize,\n layout = props.layout,\n barGap = props.barGap,\n barCategoryGap = props.barCategoryGap,\n globalMaxBarSize = props.maxBarSize;\n\n var _this$constructor$get = this.constructor.getAxisNameByLayout(layout),\n numericAxisName = _this$constructor$get.numericAxisName,\n cateAxisName = _this$constructor$get.cateAxisName;\n\n var hasBar = this.constructor.hasBar(graphicalItems);\n var sizeList = hasBar && getBarSizeList({\n barSize: barSize,\n stackGroups: stackGroups\n });\n var formatedItems = [];\n graphicalItems.forEach(function (item, index) {\n var displayedData = _this4.constructor.getDisplayedData(props, {\n dataStartIndex: dataStartIndex,\n dataEndIndex: dataEndIndex\n }, item);\n\n var _item$props2 = item.props,\n dataKey = _item$props2.dataKey,\n childMaxBarSize = _item$props2.maxBarSize;\n var numericAxisId = item.props[\"\".concat(numericAxisName, \"Id\")];\n var cateAxisId = item.props[\"\".concat(cateAxisName, \"Id\")];\n var axisObj = axisComponents.reduce(function (result, entry) {\n var _objectSpread4;\n\n var axisMap = currentState[\"\".concat(entry.axisType, \"Map\")];\n var id = item.props[\"\".concat(entry.axisType, \"Id\")];\n var axis = axisMap && axisMap[id];\n return _objectSpread({}, result, (_objectSpread4 = {}, _defineProperty(_objectSpread4, entry.axisType, axis), _defineProperty(_objectSpread4, \"\".concat(entry.axisType, \"Ticks\"), getTicksOfAxis(axis)), _objectSpread4));\n }, {});\n var cateAxis = axisObj[cateAxisName];\n var cateTicks = axisObj[\"\".concat(cateAxisName, \"Ticks\")];\n var stackedData = stackGroups && stackGroups[numericAxisId] && stackGroups[numericAxisId].hasStack && getStackedDataOfItem(item, stackGroups[numericAxisId].stackGroups);\n var bandSize = getBandSizeOfAxis(cateAxis, cateTicks);\n var maxBarSize = _isNil(childMaxBarSize) ? globalMaxBarSize : childMaxBarSize;\n var barPosition = hasBar && getBarPosition({\n barGap: barGap,\n barCategoryGap: barCategoryGap,\n bandSize: bandSize,\n sizeList: sizeList[cateAxisId],\n maxBarSize: maxBarSize\n });\n var componsedFn = item && item.type && item.type.getComposedData;\n\n if (componsedFn) {\n var _objectSpread5;\n\n formatedItems.push({\n props: _objectSpread({}, componsedFn(_objectSpread({}, axisObj, {\n displayedData: displayedData,\n props: props,\n dataKey: dataKey,\n item: item,\n bandSize: bandSize,\n barPosition: barPosition,\n offset: offset,\n stackedData: stackedData,\n layout: layout,\n dataStartIndex: dataStartIndex,\n dataEndIndex: dataEndIndex,\n onItemMouseLeave: combineEventHandlers(_this4.handleItemMouseLeave, null, item.props.onMouseLeave),\n onItemMouseEnter: combineEventHandlers(_this4.handleItemMouseEnter, null, item.props.onMouseEnter)\n })), (_objectSpread5 = {\n key: item.key || \"item-\".concat(index)\n }, _defineProperty(_objectSpread5, numericAxisName, axisObj[numericAxisName]), _defineProperty(_objectSpread5, cateAxisName, axisObj[cateAxisName]), _defineProperty(_objectSpread5, \"animationId\", updateId), _objectSpread5)),\n childIndex: parseChildIndex(item, props.children),\n item: item\n });\n }\n });\n return formatedItems;\n }\n }, {\n key: \"getCursorRectangle\",\n value: function getCursorRectangle() {\n var layout = this.props.layout;\n var _this$state12 = this.state,\n activeCoordinate = _this$state12.activeCoordinate,\n offset = _this$state12.offset,\n tooltipAxisBandSize = _this$state12.tooltipAxisBandSize;\n var halfSize = tooltipAxisBandSize / 2;\n return {\n stroke: 'none',\n fill: '#ccc',\n x: layout === 'horizontal' ? activeCoordinate.x - halfSize : offset.left + 0.5,\n y: layout === 'horizontal' ? offset.top + 0.5 : activeCoordinate.y - halfSize,\n width: layout === 'horizontal' ? tooltipAxisBandSize : offset.width - 1,\n height: layout === 'horizontal' ? offset.height - 1 : tooltipAxisBandSize\n };\n }\n }, {\n key: \"getCursorPoints\",\n value: function getCursorPoints() {\n var layout = this.props.layout;\n var _this$state13 = this.state,\n activeCoordinate = _this$state13.activeCoordinate,\n offset = _this$state13.offset;\n var x1, y1, x2, y2;\n\n if (layout === 'horizontal') {\n x1 = activeCoordinate.x;\n x2 = x1;\n y1 = offset.top;\n y2 = offset.top + offset.height;\n } else if (layout === 'vertical') {\n y1 = activeCoordinate.y;\n y2 = y1;\n x1 = offset.left;\n x2 = offset.left + offset.width;\n } else if (!_isNil(activeCoordinate.cx) || !_isNil(activeCoordinate.cy)) {\n if (layout === 'centric') {\n var cx = activeCoordinate.cx,\n cy = activeCoordinate.cy,\n innerRadius = activeCoordinate.innerRadius,\n outerRadius = activeCoordinate.outerRadius,\n angle = activeCoordinate.angle;\n var innerPoint = polarToCartesian(cx, cy, innerRadius, angle);\n var outerPoint = polarToCartesian(cx, cy, outerRadius, angle);\n x1 = innerPoint.x;\n y1 = innerPoint.y;\n x2 = outerPoint.x;\n y2 = outerPoint.y;\n } else {\n var _cx = activeCoordinate.cx,\n _cy = activeCoordinate.cy,\n radius = activeCoordinate.radius,\n startAngle = activeCoordinate.startAngle,\n endAngle = activeCoordinate.endAngle;\n var startPoint = polarToCartesian(_cx, _cy, radius, startAngle);\n var endPoint = polarToCartesian(_cx, _cy, radius, endAngle);\n return {\n points: [startPoint, endPoint],\n cx: _cx,\n cy: _cy,\n radius: radius,\n startAngle: startAngle,\n endAngle: endAngle\n };\n }\n }\n\n return [{\n x: x1,\n y: y1\n }, {\n x: x2,\n y: y2\n }];\n }\n }, {\n key: \"calculateTooltipPos\",\n value: function calculateTooltipPos(rangeObj) {\n var layout = this.props.layout;\n\n if (layout === 'horizontal') {\n return rangeObj.x;\n }\n\n if (layout === 'vertical') {\n return rangeObj.y;\n }\n\n if (layout === 'centric') {\n return rangeObj.angle;\n }\n\n return rangeObj.radius;\n }\n }, {\n key: \"inRange\",\n value: function inRange(x, y) {\n var layout = this.props.layout;\n\n if (layout === 'horizontal' || layout === 'vertical') {\n var offset = this.state.offset;\n var isInRange = x >= offset.left && x <= offset.left + offset.width && y >= offset.top && y <= offset.top + offset.height;\n return isInRange ? {\n x: x,\n y: y\n } : null;\n }\n\n var _this$state14 = this.state,\n angleAxisMap = _this$state14.angleAxisMap,\n radiusAxisMap = _this$state14.radiusAxisMap;\n\n if (angleAxisMap && radiusAxisMap) {\n var angleAxis = getAnyElementOfObject(angleAxisMap);\n return inRangeOfSector({\n x: x,\n y: y\n }, angleAxis);\n }\n\n return null;\n }\n }, {\n key: \"parseEventsOfWrapper\",\n value: function parseEventsOfWrapper() {\n var children = this.props.children;\n var tooltipItem = findChildByType(children, Tooltip);\n var tooltipEvents = tooltipItem && eventType === 'axis' ? {\n onMouseEnter: this.handleMouseEnter,\n onMouseMove: this.handleMouseMove,\n onMouseLeave: this.handleMouseLeave,\n onTouchMove: this.handleTouchMove,\n onTouchStart: this.handleTouchStart,\n onTouchEnd: this.handleTouchEnd\n } : {};\n var outerEvents = filterEventAttributes(this.props, this.handleOuterEvent);\n return _objectSpread({}, outerEvents, tooltipEvents);\n }\n /**\n * The AxisMaps are expensive to render on large data sets\n * so provide the ability to store them in state and only update them when necessary\n * they are dependent upon the start and end index of\n * the brush so it's important that this method is called _after_\n * the state is updated with any new start/end indices\n *\n * @param {Object} props The props object to be used for updating the axismaps\n * @param {Number} dataStartIndex The start index of the data series when a brush is applied\n * @param {Number} dataEndIndex The end index of the data series when a brush is applied\n * @param {Number} updateId The update id\n * @return {Object} state New state to set\n */\n\n }, {\n key: \"updateStateOfAxisMapsOffsetAndStackGroups\",\n value: function updateStateOfAxisMapsOffsetAndStackGroups(_ref8) {\n var _this5 = this;\n\n var props = _ref8.props,\n dataStartIndex = _ref8.dataStartIndex,\n dataEndIndex = _ref8.dataEndIndex,\n updateId = _ref8.updateId;\n\n if (!validateWidthHeight({\n props: props\n })) {\n return null;\n }\n\n var children = props.children,\n layout = props.layout,\n stackOffset = props.stackOffset,\n data = props.data,\n reverseStackOrder = props.reverseStackOrder;\n\n var _this$constructor$get2 = this.constructor.getAxisNameByLayout(layout),\n numericAxisName = _this$constructor$get2.numericAxisName,\n cateAxisName = _this$constructor$get2.cateAxisName;\n\n var graphicalItems = findAllByType(children, GraphicalChild);\n var stackGroups = getStackGroupsByAxisId(data, graphicalItems, \"\".concat(numericAxisName, \"Id\"), \"\".concat(cateAxisName, \"Id\"), stackOffset, reverseStackOrder);\n var axisObj = axisComponents.reduce(function (result, entry) {\n var name = \"\".concat(entry.axisType, \"Map\");\n return _objectSpread({}, result, _defineProperty({}, name, _this5.getAxisMap(props, _objectSpread({}, entry, {\n graphicalItems: graphicalItems,\n stackGroups: entry.axisType === numericAxisName && stackGroups,\n dataStartIndex: dataStartIndex,\n dataEndIndex: dataEndIndex\n }))));\n }, {});\n var offset = this.calculateOffset(_objectSpread({}, axisObj, {\n props: props,\n graphicalItems: graphicalItems\n }));\n Object.keys(axisObj).forEach(function (key) {\n axisObj[key] = formatAxisMap(props, axisObj[key], offset, key.replace('Map', ''), chartName);\n });\n var cateAxisMap = axisObj[\"\".concat(cateAxisName, \"Map\")];\n var ticksObj = this.tooltipTicksGenerator(cateAxisMap);\n var formatedGraphicalItems = this.getFormatItems(props, _objectSpread({}, axisObj, {\n dataStartIndex: dataStartIndex,\n dataEndIndex: dataEndIndex,\n updateId: updateId,\n graphicalItems: graphicalItems,\n stackGroups: stackGroups,\n offset: offset\n }));\n return _objectSpread({\n formatedGraphicalItems: formatedGraphicalItems,\n graphicalItems: graphicalItems,\n offset: offset,\n stackGroups: stackGroups\n }, ticksObj, axisObj);\n }\n /* eslint-disable no-underscore-dangle */\n\n }, {\n key: \"addListener\",\n value: function addListener() {\n eventCenter.on(SYNC_EVENT, this.handleReceiveSyncEvent);\n\n if (eventCenter.setMaxListeners && eventCenter._maxListeners) {\n eventCenter.setMaxListeners(eventCenter._maxListeners + 1);\n }\n }\n }, {\n key: \"removeListener\",\n value: function removeListener() {\n eventCenter.removeListener(SYNC_EVENT, this.handleReceiveSyncEvent);\n\n if (eventCenter.setMaxListeners && eventCenter._maxListeners) {\n eventCenter.setMaxListeners(eventCenter._maxListeners - 1);\n }\n }\n /**\n * Calculate the offset of main part in the svg element\n * @param {Object} props Latest props\n * @param {Array} graphicalItems The instances of item\n * @param {Object} xAxisMap The configuration of x-axis\n * @param {Object} yAxisMap The configuration of y-axis\n * @return {Object} The offset of main part in the svg element\n */\n\n }, {\n key: \"calculateOffset\",\n value: function calculateOffset(_ref9) {\n var props = _ref9.props,\n graphicalItems = _ref9.graphicalItems,\n _ref9$xAxisMap = _ref9.xAxisMap,\n xAxisMap = _ref9$xAxisMap === void 0 ? {} : _ref9$xAxisMap,\n _ref9$yAxisMap = _ref9.yAxisMap,\n yAxisMap = _ref9$yAxisMap === void 0 ? {} : _ref9$yAxisMap;\n var width = props.width,\n height = props.height,\n children = props.children;\n var margin = props.margin || {};\n var brushItem = findChildByType(children, Brush);\n var legendItem = findChildByType(children, Legend);\n var offsetH = Object.keys(yAxisMap).reduce(function (result, id) {\n var entry = yAxisMap[id];\n var orientation = entry.orientation;\n\n if (!entry.mirror && !entry.hide) {\n return _objectSpread({}, result, _defineProperty({}, orientation, result[orientation] + entry.width));\n }\n\n return result;\n }, {\n left: margin.left || 0,\n right: margin.right || 0\n });\n var offsetV = Object.keys(xAxisMap).reduce(function (result, id) {\n var entry = xAxisMap[id];\n var orientation = entry.orientation;\n\n if (!entry.mirror && !entry.hide) {\n return _objectSpread({}, result, _defineProperty({}, orientation, result[orientation] + entry.height));\n }\n\n return result;\n }, {\n top: margin.top || 0,\n bottom: margin.bottom || 0\n });\n\n var offset = _objectSpread({}, offsetV, offsetH);\n\n var brushBottom = offset.bottom;\n\n if (brushItem) {\n offset.bottom += brushItem.props.height || Brush.defaultProps.height;\n }\n\n if (legendItem && this.legendInstance) {\n var legendBox = this.legendInstance.getBBox();\n offset = appendOffsetOfLegend(offset, graphicalItems, props, legendBox);\n }\n\n return _objectSpread({\n brushBottom: brushBottom\n }, offset, {\n width: width - offset.left - offset.right,\n height: height - offset.top - offset.bottom\n });\n }\n }, {\n key: \"triggerSyncEvent\",\n value: function triggerSyncEvent(data) {\n var syncId = this.props.syncId;\n\n if (!_isNil(syncId)) {\n eventCenter.emit(SYNC_EVENT, syncId, this.uniqueChartId, data);\n }\n }\n }, {\n key: \"filterFormatItem\",\n value: function filterFormatItem(item, displayName, childIndex) {\n var formatedGraphicalItems = this.state.formatedGraphicalItems;\n\n for (var i = 0, len = formatedGraphicalItems.length; i < len; i++) {\n var entry = formatedGraphicalItems[i];\n\n if (entry.item === item || entry.props.key === item.key || displayName === getDisplayName(entry.item.type) && childIndex === entry.childIndex) {\n return entry;\n }\n }\n\n return null;\n }\n }, {\n key: \"renderAxis\",\n\n /**\n * Draw axis\n * @param {Object} axisOptions The options of axis\n * @param {Object} element The axis element\n * @param {String} displayName The display name of axis\n * @param {Number} index The index of element\n * @return {ReactElement} The instance of x-axes\n */\n value: function renderAxis(axisOptions, element, displayName, index) {\n var _this$props5 = this.props,\n width = _this$props5.width,\n height = _this$props5.height;\n return React.createElement(CartesianAxis, _extends({}, axisOptions, {\n className: \"recharts-\".concat(axisOptions.axisType, \" \").concat(axisOptions.axisType),\n key: element.key || \"\".concat(displayName, \"-\").concat(index),\n viewBox: {\n x: 0,\n y: 0,\n width: width,\n height: height\n },\n ticksGenerator: this.axesTicksGenerator\n }));\n }\n /**\n * Draw grid\n * @param {ReactElement} element the grid item\n * @return {ReactElement} The instance of grid\n */\n\n }, {\n key: \"renderLegend\",\n\n /**\n * Draw legend\n * @return {ReactElement} The instance of Legend\n */\n value: function renderLegend() {\n var _this6 = this;\n\n var formatedGraphicalItems = this.state.formatedGraphicalItems;\n var _this$props6 = this.props,\n children = _this$props6.children,\n width = _this$props6.width,\n height = _this$props6.height;\n var margin = this.props.margin || {};\n var legendWidth = width - (margin.left || 0) - (margin.right || 0);\n var legendHeight = height - (margin.top || 0) - (margin.bottom || 0);\n var props = getLegendProps({\n children: children,\n formatedGraphicalItems: formatedGraphicalItems,\n legendWidth: legendWidth,\n legendHeight: legendHeight,\n legendContent: legendContent\n });\n\n if (!props) {\n return null;\n }\n\n var item = props.item,\n otherProps = _objectWithoutProperties(props, [\"item\"]);\n\n return cloneElement(item, _objectSpread({}, otherProps, {\n chartWidth: width,\n chartHeight: height,\n margin: margin,\n ref: function ref(legend) {\n _this6.legendInstance = legend;\n },\n onBBoxUpdate: this.handleLegendBBoxUpdate\n }));\n }\n /**\n * Draw Tooltip\n * @return {ReactElement} The instance of Tooltip\n */\n\n }, {\n key: \"renderTooltip\",\n value: function renderTooltip() {\n var children = this.props.children;\n var tooltipItem = findChildByType(children, Tooltip);\n\n if (!tooltipItem) {\n return null;\n }\n\n var _this$state15 = this.state,\n isTooltipActive = _this$state15.isTooltipActive,\n activeCoordinate = _this$state15.activeCoordinate,\n activePayload = _this$state15.activePayload,\n activeLabel = _this$state15.activeLabel,\n offset = _this$state15.offset;\n return cloneElement(tooltipItem, {\n viewBox: _objectSpread({}, offset, {\n x: offset.left,\n y: offset.top\n }),\n active: isTooltipActive,\n label: activeLabel,\n payload: isTooltipActive ? activePayload : [],\n coordinate: activeCoordinate\n });\n }\n }, {\n key: \"renderActivePoints\",\n value: function renderActivePoints(_ref10) {\n var item = _ref10.item,\n activePoint = _ref10.activePoint,\n basePoint = _ref10.basePoint,\n childIndex = _ref10.childIndex,\n isRange = _ref10.isRange;\n var result = [];\n var key = item.props.key;\n var _item$item$props2 = item.item.props,\n activeDot = _item$item$props2.activeDot,\n dataKey = _item$item$props2.dataKey;\n\n var dotProps = _objectSpread({\n index: childIndex,\n dataKey: dataKey,\n cx: activePoint.x,\n cy: activePoint.y,\n r: 4,\n fill: getMainColorOfGraphicItem(item.item),\n strokeWidth: 2,\n stroke: '#fff',\n payload: activePoint.payload,\n value: activePoint.value,\n key: \"\".concat(key, \"-activePoint-\").concat(childIndex)\n }, getPresentationAttributes(activeDot), filterEventAttributes(activeDot));\n\n result.push(this.constructor.renderActiveDot(activeDot, dotProps, childIndex));\n\n if (basePoint) {\n result.push(this.constructor.renderActiveDot(activeDot, _objectSpread({}, dotProps, {\n cx: basePoint.x,\n cy: basePoint.y,\n key: \"\".concat(key, \"-basePoint-\").concat(childIndex)\n }), childIndex));\n } else if (isRange) {\n result.push(null);\n }\n\n return result;\n }\n }, {\n key: \"renderClipPath\",\n value: function renderClipPath() {\n var clipPathId = this.clipPathId;\n var _this$state$offset = this.state.offset,\n left = _this$state$offset.left,\n top = _this$state$offset.top,\n height = _this$state$offset.height,\n width = _this$state$offset.width;\n return React.createElement(\"defs\", null, React.createElement(\"clipPath\", {\n id: clipPathId\n }, React.createElement(\"rect\", {\n x: left,\n y: top,\n height: height,\n width: width\n })));\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this7 = this;\n\n if (!validateWidthHeight(this)) {\n return null;\n }\n\n var _this$props7 = this.props,\n children = _this$props7.children,\n className = _this$props7.className,\n width = _this$props7.width,\n height = _this$props7.height,\n style = _this$props7.style,\n compact = _this$props7.compact,\n others = _objectWithoutProperties(_this$props7, [\"children\", \"className\", \"width\", \"height\", \"style\", \"compact\"]);\n\n var attrs = getPresentationAttributes(others);\n var map = {\n CartesianGrid: {\n handler: this.renderGrid,\n once: true\n },\n ReferenceArea: {\n handler: this.renderReferenceElement\n },\n ReferenceLine: {\n handler: this.renderReferenceElement\n },\n ReferenceDot: {\n handler: this.renderReferenceElement\n },\n XAxis: {\n handler: this.renderXAxis\n },\n YAxis: {\n handler: this.renderYAxis\n },\n Brush: {\n handler: this.renderBrush,\n once: true\n },\n Bar: {\n handler: this.renderGraphicChild\n },\n Line: {\n handler: this.renderGraphicChild\n },\n Area: {\n handler: this.renderGraphicChild\n },\n Radar: {\n handler: this.renderGraphicChild\n },\n RadialBar: {\n handler: this.renderGraphicChild\n },\n Scatter: {\n handler: this.renderGraphicChild\n },\n Pie: {\n handler: this.renderGraphicChild\n },\n Funnel: {\n handler: this.renderGraphicChild\n },\n Tooltip: {\n handler: this.renderCursor,\n once: true\n },\n PolarGrid: {\n handler: this.renderPolarGrid,\n once: true\n },\n PolarAngleAxis: {\n handler: this.renderPolarAxis\n },\n PolarRadiusAxis: {\n handler: this.renderPolarAxis\n }\n }; // The \"compact\" mode is mainly used as the panorama within Brush\n\n if (compact) {\n return React.createElement(Surface, _extends({}, attrs, {\n width: width,\n height: height\n }), this.renderClipPath(), renderByOrder(children, map));\n }\n\n var events = this.parseEventsOfWrapper();\n return React.createElement(\"div\", _extends({\n className: classNames('recharts-wrapper', className),\n style: _objectSpread({\n position: 'relative',\n cursor: 'default',\n width: width,\n height: height\n }, style)\n }, events, {\n ref: function ref(node) {\n _this7.container = node;\n }\n }), React.createElement(Surface, _extends({}, attrs, {\n width: width,\n height: height\n }), this.renderClipPath(), renderByOrder(children, map)), this.renderLegend(), this.renderTooltip());\n }\n }], [{\n key: \"getAxisNameByLayout\",\n value: function getAxisNameByLayout(layout) {\n if (layout === 'horizontal') {\n return {\n numericAxisName: 'yAxis',\n cateAxisName: 'xAxis'\n };\n }\n\n if (layout === 'vertical') {\n return {\n numericAxisName: 'xAxis',\n cateAxisName: 'yAxis'\n };\n }\n\n if (layout === 'centric') {\n return {\n numericAxisName: 'radiusAxis',\n cateAxisName: 'angleAxis'\n };\n }\n\n return {\n numericAxisName: 'angleAxis',\n cateAxisName: 'radiusAxis'\n };\n }\n }, {\n key: \"renderActiveDot\",\n value: function renderActiveDot(option, props) {\n var dot;\n\n if (isValidElement(option)) {\n dot = cloneElement(option, props);\n } else if (_isFunction(option)) {\n dot = option(props);\n } else {\n dot = React.createElement(Dot, props);\n }\n\n return React.createElement(Layer, {\n className: \"recharts-active-dot\",\n key: props.key\n }, dot);\n }\n }]);\n\n return CategoricalChartWrapper;\n }(Component);\n\n CategoricalChartWrapper.displayName = chartName;\n CategoricalChartWrapper.propTypes = _objectSpread({\n syncId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n compact: PropTypes.bool,\n width: PropTypes.number,\n height: PropTypes.number,\n data: PropTypes.arrayOf(PropTypes.object),\n layout: PropTypes.oneOf(['horizontal', 'vertical']),\n stackOffset: PropTypes.oneOf(['sign', 'expand', 'none', 'wiggle', 'silhouette']),\n throttleDelay: PropTypes.number,\n margin: PropTypes.shape({\n top: PropTypes.number,\n right: PropTypes.number,\n bottom: PropTypes.number,\n left: PropTypes.number\n }),\n barCategoryGap: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n barGap: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n barSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n maxBarSize: PropTypes.number,\n style: PropTypes.object,\n className: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n defaultShowTooltip: PropTypes.bool,\n onClick: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseMove: PropTypes.func,\n onMouseDown: PropTypes.func,\n onMouseUp: PropTypes.func,\n reverseStackOrder: PropTypes.bool,\n id: PropTypes.string\n }, propTypes);\n CategoricalChartWrapper.defaultProps = _objectSpread({\n layout: 'horizontal',\n stackOffset: 'none',\n barCategoryGap: '10%',\n barGap: 4,\n margin: {\n top: 5,\n right: 5,\n bottom: 5,\n left: 5\n },\n reverseStackOrder: false\n }, defaultProps);\n\n CategoricalChartWrapper.createDefaultState = function (props) {\n var children = props.children,\n defaultShowTooltip = props.defaultShowTooltip;\n var brushItem = findChildByType(children, Brush);\n var startIndex = brushItem && brushItem.props && brushItem.props.startIndex || 0;\n var endIndex = brushItem && brushItem.props && brushItem.props.endIndex || props.data && props.data.length - 1 || 0;\n return {\n chartX: 0,\n chartY: 0,\n dataStartIndex: startIndex,\n dataEndIndex: endIndex,\n activeTooltipIndex: -1,\n isTooltipActive: !_isNil(defaultShowTooltip) ? defaultShowTooltip : false\n };\n };\n\n CategoricalChartWrapper.hasBar = function (graphicalItems) {\n if (!graphicalItems || !graphicalItems.length) {\n return false;\n }\n\n return graphicalItems.some(function (item) {\n var name = getDisplayName(item && item.type);\n return name && name.indexOf('Bar') >= 0;\n });\n };\n\n CategoricalChartWrapper.getDisplayedData = function (props, _ref11, item) {\n var graphicalItems = _ref11.graphicalItems,\n dataStartIndex = _ref11.dataStartIndex,\n dataEndIndex = _ref11.dataEndIndex;\n var itemsData = (graphicalItems || []).reduce(function (result, child) {\n var itemData = child.props.data;\n\n if (itemData && itemData.length) {\n return _toConsumableArray(result).concat(_toConsumableArray(itemData));\n }\n\n return result;\n }, []);\n\n if (itemsData && itemsData.length > 0) {\n return itemsData;\n }\n\n if (item && item.props && item.props.data && item.props.data.length > 0) {\n return item.props.data;\n }\n\n var data = props.data;\n\n if (data && data.length && isNumber(dataStartIndex) && isNumber(dataEndIndex)) {\n return data.slice(dataStartIndex, dataEndIndex + 1);\n }\n\n return [];\n };\n\n return CategoricalChartWrapper;\n};\n\nexport default generateCategoricalChart;",
"/**\n * @fileOverview Area Chart\n */\nimport generateCategoricalChart from './generateCategoricalChart';\nimport Area from '../cartesian/Area';\nimport XAxis from '../cartesian/XAxis';\nimport YAxis from '../cartesian/YAxis';\nimport { formatAxisMap } from '../util/CartesianUtils';\nexport default generateCategoricalChart({\n chartName: 'AreaChart',\n GraphicalChild: Area,\n axisComponents: [{\n axisType: 'xAxis',\n AxisComp: XAxis\n }, {\n axisType: 'yAxis',\n AxisComp: YAxis\n }],\n formatAxisMap: formatAxisMap\n});",
"import _isObject from \"lodash/isObject\";\nimport _isFunction from \"lodash/isFunction\";\nimport _isNil from \"lodash/isNil\";\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport React, { cloneElement, isValidElement } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Text from './Text';\nimport { PRESENTATION_ATTRIBUTES, getPresentationAttributes, findAllByType } from '../util/ReactUtils';\nimport { isNumOrStr, isNumber, isPercent, getPercentValue, uniqueId, mathSign } from '../util/DataUtils';\nimport { polarToCartesian } from '../util/PolarUtils';\nvar cartesianViewBoxShape = PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number,\n width: PropTypes.number,\n height: PropTypes.number\n});\nvar polarViewBoxShape = PropTypes.shape({\n cx: PropTypes.number,\n cy: PropTypes.number,\n innerRadius: PropTypes.number,\n outerRadius: PropTypes.number,\n startAngle: PropTypes.number,\n endAngle: PropTypes.number\n});\n\nvar propTypes = _objectSpread({}, PRESENTATION_ATTRIBUTES, {\n viewBox: PropTypes.oneOfType([cartesianViewBoxShape, polarViewBoxShape]),\n formatter: PropTypes.func,\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n offset: PropTypes.number,\n position: PropTypes.oneOf(['top', 'left', 'right', 'bottom', 'inside', 'outside', 'insideLeft', 'insideRight', 'insideTop', 'insideBottom', 'insideTopLeft', 'insideBottomLeft', 'insideTopRight', 'insideBottomRight', 'insideStart', 'insideEnd', 'end', 'center', 'centerTop', 'centerBottom']),\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n className: PropTypes.string,\n content: PropTypes.oneOfType([PropTypes.element, PropTypes.func])\n});\n\nvar defaultProps = {\n offset: 5\n};\n\nvar getLabel = function getLabel(props) {\n var value = props.value,\n formatter = props.formatter;\n var label = _isNil(props.children) ? value : props.children;\n\n if (_isFunction(formatter)) {\n return formatter(label);\n }\n\n return label;\n};\n\nvar getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {\n var sign = mathSign(endAngle - startAngle);\n var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 360);\n return sign * deltaAngle;\n};\n\nvar renderRadialLabel = function renderRadialLabel(labelProps, label, attrs) {\n var position = labelProps.position,\n viewBox = labelProps.viewBox,\n offset = labelProps.offset,\n className = labelProps.className;\n var cx = viewBox.cx,\n cy = viewBox.cy,\n innerRadius = viewBox.innerRadius,\n outerRadius = viewBox.outerRadius,\n startAngle = viewBox.startAngle,\n endAngle = viewBox.endAngle,\n clockWise = viewBox.clockWise;\n var radius = (innerRadius + outerRadius) / 2;\n var deltaAngle = getDeltaAngle(startAngle, endAngle);\n var sign = deltaAngle >= 0 ? 1 : -1;\n var labelAngle, direction;\n\n if (position === 'insideStart') {\n labelAngle = startAngle + sign * offset;\n direction = clockWise;\n } else if (position === 'insideEnd') {\n labelAngle = endAngle - sign * offset;\n direction = !clockWise;\n } else if (position === 'end') {\n labelAngle = endAngle + sign * offset;\n direction = clockWise;\n }\n\n direction = deltaAngle <= 0 ? direction : !direction;\n var startPoint = polarToCartesian(cx, cy, radius, labelAngle);\n var endPoint = polarToCartesian(cx, cy, radius, labelAngle + (direction ? 1 : -1) * 359);\n var path = \"M\".concat(startPoint.x, \",\").concat(startPoint.y, \"\\n A\").concat(radius, \",\").concat(radius, \",0,1,\").concat(direction ? 0 : 1, \",\\n \").concat(endPoint.x, \",\").concat(endPoint.y);\n var id = _isNil(labelProps.id) ? uniqueId('recharts-radial-line-') : labelProps.id;\n return React.createElement(\"text\", _extends({}, attrs, {\n dominantBaseline: \"central\",\n className: classNames('recharts-radial-bar-label', className)\n }), React.createElement(\"defs\", null, React.createElement(\"path\", {\n id: id,\n d: path\n })), React.createElement(\"textPath\", {\n xlinkHref: \"#\".concat(id)\n }, label));\n};\n\nvar getAttrsOfPolarLabel = function getAttrsOfPolarLabel(props) {\n var viewBox = props.viewBox,\n offset = props.offset,\n position = props.position;\n var cx = viewBox.cx,\n cy = viewBox.cy,\n innerRadius = viewBox.innerRadius,\n outerRadius = viewBox.outerRadius,\n startAngle = viewBox.startAngle,\n endAngle = viewBox.endAngle;\n var midAngle = (startAngle + endAngle) / 2;\n\n if (position === 'outside') {\n var _polarToCartesian = polarToCartesian(cx, cy, outerRadius + offset, midAngle),\n _x = _polarToCartesian.x,\n _y = _polarToCartesian.y;\n\n return {\n x: _x,\n y: _y,\n textAnchor: _x >= cx ? 'start' : 'end',\n verticalAnchor: 'middle'\n };\n }\n\n if (position === 'center') {\n return {\n x: cx,\n y: cy,\n textAnchor: 'middle',\n verticalAnchor: 'middle'\n };\n }\n\n if (position === 'centerTop') {\n return {\n x: cx,\n y: cy,\n textAnchor: 'middle',\n verticalAnchor: 'start'\n };\n }\n\n if (position === 'centerBottom') {\n return {\n x: cx,\n y: cy,\n textAnchor: 'middle',\n verticalAnchor: 'end'\n };\n }\n\n var r = (innerRadius + outerRadius) / 2;\n\n var _polarToCartesian2 = polarToCartesian(cx, cy, r, midAngle),\n x = _polarToCartesian2.x,\n y = _polarToCartesian2.y;\n\n return {\n x: x,\n y: y,\n textAnchor: 'middle',\n verticalAnchor: 'middle'\n };\n};\n\nvar getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {\n var viewBox = props.viewBox,\n offset = props.offset,\n position = props.position;\n var x = viewBox.x,\n y = viewBox.y,\n width = viewBox.width,\n height = viewBox.height;\n var sign = height >= 0 ? 1 : -1;\n\n if (position === 'top') {\n return {\n x: x + width / 2,\n y: y - sign * offset,\n textAnchor: 'middle',\n verticalAnchor: sign > 0 ? 'end' : 'start'\n };\n }\n\n if (position === 'bottom') {\n return {\n x: x + width / 2,\n y: y + height + sign * offset,\n textAnchor: 'middle',\n verticalAnchor: 'start'\n };\n }\n\n if (position === 'left') {\n return {\n x: x - offset,\n y: y + height / 2,\n textAnchor: 'end',\n verticalAnchor: 'middle'\n };\n }\n\n if (position === 'right') {\n return {\n x: x + width + offset,\n y: y + height / 2,\n textAnchor: 'start',\n verticalAnchor: 'middle'\n };\n }\n\n if (position === 'insideLeft') {\n return {\n x: x + offset,\n y: y + height / 2,\n textAnchor: 'start',\n verticalAnchor: 'middle'\n };\n }\n\n if (position === 'insideRight') {\n return {\n x: x + width - offset,\n y: y + height / 2,\n textAnchor: 'end',\n verticalAnchor: 'middle'\n };\n }\n\n if (position === 'insideTop') {\n return {\n x: x + width / 2,\n y: y + sign * offset,\n textAnchor: 'middle',\n verticalAnchor: 'start'\n };\n }\n\n if (position === 'insideBottom') {\n return {\n x: x + width / 2,\n y: y + height - sign * offset,\n textAnchor: 'middle',\n verticalAnchor: 'end'\n };\n }\n\n if (position === 'insideTopLeft') {\n return {\n x: x + offset,\n y: y + sign * offset,\n textAnchor: 'start',\n verticalAnchor: 'start'\n };\n }\n\n if (position === 'insideTopRight') {\n return {\n x: x + width - offset,\n y: y + sign * offset,\n textAnchor: 'end',\n verticalAnchor: 'start'\n };\n }\n\n if (position === 'insideBottomLeft') {\n return {\n x: x + offset,\n y: y + height - sign * offset,\n textAnchor: 'start',\n verticalAnchor: 'end'\n };\n }\n\n if (position === 'insideBottomRight') {\n return {\n x: x + width - offset,\n y: y + height - sign * offset,\n textAnchor: 'end',\n verticalAnchor: 'end'\n };\n }\n\n if (_isObject(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {\n return {\n x: x + getPercentValue(position.x, width),\n y: y + getPercentValue(position.y, height),\n textAnchor: 'end',\n verticalAnchor: 'end'\n };\n }\n\n return {\n x: x + width / 2,\n y: y + height / 2,\n textAnchor: 'middle',\n verticalAnchor: 'middle'\n };\n};\n\nvar isPolar = function isPolar(viewBox) {\n return isNumber(viewBox.cx);\n};\n\nfunction Label(props) {\n var viewBox = props.viewBox,\n position = props.position,\n value = props.value,\n children = props.children,\n content = props.content,\n _props$className = props.className,\n className = _props$className === void 0 ? '' : _props$className;\n\n if (!viewBox || _isNil(value) && _isNil(children) && !isValidElement(content) && !_isFunction(content)) {\n return null;\n }\n\n if (isValidElement(content)) {\n return cloneElement(content, props);\n }\n\n var label;\n\n if (_isFunction(content)) {\n label = content(props);\n\n if (isValidElement(label)) {\n return label;\n }\n } else {\n label = getLabel(props);\n }\n\n var isPolarLabel = isPolar(viewBox);\n var attrs = getPresentationAttributes(props);\n\n if (isPolarLabel && (position === 'insideStart' || position === 'insideEnd' || position === 'end')) {\n return renderRadialLabel(props, label, attrs);\n }\n\n var positionAttrs = isPolarLabel ? getAttrsOfPolarLabel(props) : getAttrsOfCartesianLabel(props);\n return React.createElement(Text, _extends({\n className: classNames('recharts-label', className)\n }, attrs, positionAttrs), label);\n}\n\nLabel.displayName = 'Label';\nLabel.defaultProps = defaultProps;\nLabel.propTypes = propTypes;\n\nvar parseViewBox = function parseViewBox(props) {\n var cx = props.cx,\n cy = props.cy,\n angle = props.angle,\n startAngle = props.startAngle,\n endAngle = props.endAngle,\n r = props.r,\n radius = props.radius,\n innerRadius = props.innerRadius,\n outerRadius = props.outerRadius,\n x = props.x,\n y = props.y,\n top = props.top,\n left = props.left,\n width = props.width,\n height = props.height,\n clockWise = props.clockWise;\n\n if (isNumber(width) && isNumber(height)) {\n if (isNumber(x) && isNumber(y)) {\n return {\n x: x,\n y: y,\n width: width,\n height: height\n };\n }\n\n if (isNumber(top) && isNumber(left)) {\n return {\n x: top,\n y: left,\n width: width,\n height: height\n };\n }\n }\n\n if (isNumber(x) && isNumber(y)) {\n return {\n x: x,\n y: y,\n width: 0,\n height: 0\n };\n }\n\n if (isNumber(cx) && isNumber(cy)) {\n return {\n cx: cx,\n cy: cy,\n startAngle: startAngle || angle || 0,\n endAngle: endAngle || angle || 0,\n innerRadius: innerRadius || 0,\n outerRadius: outerRadius || radius || r || 0,\n clockWise: clockWise\n };\n }\n\n if (props.viewBox) {\n return props.viewBox;\n }\n\n return {};\n};\n\nvar parseLabel = function parseLabel(label, viewBox) {\n if (!label) {\n return null;\n }\n\n if (label === true) {\n return React.createElement(Label, {\n key: \"label-implicit\",\n viewBox: viewBox\n });\n }\n\n if (isNumOrStr(label)) {\n return React.createElement(Label, {\n key: \"label-implicit\",\n viewBox: viewBox,\n value: label\n });\n }\n\n if (isValidElement(label) || _isFunction(label)) {\n return React.createElement(Label, {\n key: \"label-implicit\",\n content: label,\n viewBox: viewBox\n });\n }\n\n if (_isObject(label)) {\n return React.createElement(Label, _extends({\n viewBox: viewBox\n }, label, {\n key: \"label-implicit\"\n }));\n }\n\n return null;\n};\n\nvar renderCallByParent = function renderCallByParent(parentProps, viewBox) {\n var ckeckPropsLabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (!parentProps || !parentProps.children && ckeckPropsLabel && !parentProps.label) {\n return null;\n }\n\n var children = parentProps.children;\n var parentViewBox = parseViewBox(parentProps);\n var explicitChilren = findAllByType(children, Label).map(function (child, index) {\n return cloneElement(child, {\n viewBox: viewBox || parentViewBox,\n key: \"label-\".concat(index)\n });\n });\n\n if (!ckeckPropsLabel) {\n return explicitChilren;\n }\n\n var implicitLabel = parseLabel(parentProps.label, viewBox || parentViewBox);\n return [implicitLabel].concat(_toConsumableArray(explicitChilren));\n};\n\nLabel.parseViewBox = parseViewBox;\nLabel.renderCallByParent = renderCallByParent;\nexport default Label;",
"import _isObject from \"lodash/isObject\";\nimport _isFunction from \"lodash/isFunction\";\nimport _isNil from \"lodash/isNil\";\nimport _last from \"lodash/last\";\nimport _isArray from \"lodash/isArray\";\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\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\nimport React, { cloneElement } from 'react';\nimport PropTypes from 'prop-types';\nimport Label from './Label';\nimport Layer from '../container/Layer';\nimport { getPresentationAttributes, findAllByType } from '../util/ReactUtils';\nimport { getValueByDataKey } from '../util/ChartUtils';\nvar propTypes = {\n id: PropTypes.string,\n data: PropTypes.arrayOf(PropTypes.object),\n valueAccessor: PropTypes.func,\n clockWise: PropTypes.bool,\n dataKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.func])\n};\nvar defaultProps = {\n valueAccessor: function valueAccessor(entry) {\n return _isArray(entry.value) ? _last(entry.value) : entry.value;\n }\n};\n\nfunction LabelList(props) {\n var data = props.data,\n valueAccessor = props.valueAccessor,\n dataKey = props.dataKey,\n clockWise = props.clockWise,\n id = props.id,\n others = _objectWithoutProperties(props, [\"data\", \"valueAccessor\", \"dataKey\", \"clockWise\", \"id\"]);\n\n if (!data || !data.length) {\n return null;\n }\n\n return React.createElement(Layer, {\n className: \"recharts-label-list\"\n }, data.map(function (entry, index) {\n var value = _isNil(dataKey) ? valueAccessor(entry, index) : getValueByDataKey(entry && entry.payload, dataKey);\n var idProps = _isNil(id) ? {} : {\n id: \"\".concat(id, \"-\").concat(index)\n };\n return React.createElement(Label, _extends({}, getPresentationAttributes(entry), others, idProps, {\n index: index,\n value: value,\n viewBox: Label.parseViewBox(_isNil(clockWise) ? entry : _objectSpread({}, entry, {\n clockWise: clockWise\n })),\n key: \"label-\".concat(index)\n }));\n }));\n}\n\nLabelList.propTypes = propTypes;\nLabelList.displayName = 'LabelList';\n\nvar parseLabelList = function parseLabelList(label, data) {\n if (!label) {\n return null;\n }\n\n if (label === true) {\n return React.createElement(LabelList, {\n key: \"labelList-implicit\",\n data: data\n });\n }\n\n if (React.isValidElement(label) || _isFunction(label)) {\n return React.createElement(LabelList, {\n key: \"labelList-implicit\",\n data: data,\n content: label\n });\n }\n\n if (_isObject(label)) {\n return React.createElement(LabelList, _extends({\n data: data\n }, label, {\n key: \"labelList-implicit\"\n }));\n }\n\n return null;\n};\n\nvar renderCallByParent = function renderCallByParent(parentProps, data) {\n var ckeckPropsLabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (!parentProps || !parentProps.children && ckeckPropsLabel && !parentProps.label) {\n return null;\n }\n\n var children = parentProps.children;\n var explicitChilren = findAllByType(children, LabelList).map(function (child, index) {\n return cloneElement(child, {\n data: data,\n key: \"labelList-\".concat(index)\n });\n });\n\n if (!ckeckPropsLabel) {\n return explicitChilren;\n }\n\n var implicitLabelList = parseLabelList(parentProps.label, data);\n return [implicitLabelList].concat(_toConsumableArray(explicitChilren));\n};\n\nLabelList.renderCallByParent = renderCallByParent;\nLabelList.defaultProps = defaultProps;\nexport default LabelList;",
"var _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview Default Legend Content\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport pureRender from '../util/PureRender';\nimport Surface from '../container/Surface';\nimport Symbols from '../shape/Symbols';\nimport { filterEventsOfChild, LEGEND_TYPES } from '../util/ReactUtils';\nvar SIZE = 32;\nvar ICON_TYPES = LEGEND_TYPES.filter(function (type) {\n return type !== 'none';\n});\n\nvar DefaultLegendContent = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(DefaultLegendContent, _Component);\n\n function DefaultLegendContent() {\n _classCallCheck(this, DefaultLegendContent);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(DefaultLegendContent).apply(this, arguments));\n }\n\n _createClass(DefaultLegendContent, [{\n key: \"renderIcon\",\n\n /**\n * Render the path of icon\n * @param {Object} data Data of each legend item\n * @return {String} Path element\n */\n value: function renderIcon(data) {\n var inactiveColor = this.props.inactiveColor;\n var halfSize = SIZE / 2;\n var sixthSize = SIZE / 6;\n var thirdSize = SIZE / 3;\n var color = data.inactive ? inactiveColor : data.color;\n\n if (data.type === 'plainline') {\n return React.createElement(\"line\", {\n strokeWidth: 4,\n fill: \"none\",\n stroke: color,\n strokeDasharray: data.payload.strokeDasharray,\n x1: 0,\n y1: halfSize,\n x2: SIZE,\n y2: halfSize,\n className: \"recharts-legend-icon\"\n });\n }\n\n if (data.type === 'line') {\n return React.createElement(\"path\", {\n strokeWidth: 4,\n fill: \"none\",\n stroke: color,\n d: \"M0,\".concat(halfSize, \"h\").concat(thirdSize, \"\\n A\").concat(sixthSize, \",\").concat(sixthSize, \",0,1,1,\").concat(2 * thirdSize, \",\").concat(halfSize, \"\\n H\").concat(SIZE, \"M\").concat(2 * thirdSize, \",\").concat(halfSize, \"\\n A\").concat(sixthSize, \",\").concat(sixthSize, \",0,1,1,\").concat(thirdSize, \",\").concat(halfSize),\n className: \"recharts-legend-icon\"\n });\n }\n\n if (data.type === 'rect') {\n return React.createElement(\"path\", {\n stroke: \"none\",\n fill: color,\n d: \"M0,\".concat(SIZE / 8, \"h\").concat(SIZE, \"v\").concat(SIZE * 3 / 4, \"h\").concat(-SIZE, \"z\"),\n className: \"recharts-legend-icon\"\n });\n }\n\n return React.createElement(Symbols, {\n fill: color,\n cx: halfSize,\n cy: halfSize,\n size: SIZE,\n sizeType: \"diameter\",\n type: data.type\n });\n }\n /**\n * Draw items of legend\n * @return {ReactElement} Items\n */\n\n }, {\n key: \"renderItems\",\n value: function renderItems() {\n var _this = this;\n\n var _this$props = this.props,\n payload = _this$props.payload,\n iconSize = _this$props.iconSize,\n layout = _this$props.layout,\n formatter = _this$props.formatter;\n var viewBox = {\n x: 0,\n y: 0,\n width: SIZE,\n height: SIZE\n };\n var itemStyle = {\n display: layout === 'horizontal' ? 'inline-block' : 'block',\n marginRight: 10\n };\n var svgStyle = {\n display: 'inline-block',\n verticalAlign: 'middle',\n marginRight: 4\n };\n return payload.map(function (entry, i) {\n var _classNames;\n\n var finalFormatter = entry.formatter || formatter;\n var className = classNames((_classNames = {\n 'recharts-legend-item': true\n }, _defineProperty(_classNames, \"legend-item-\".concat(i), true), _defineProperty(_classNames, \"inactive\", entry.inactive), _classNames));\n\n if (entry.type === 'none') {\n return null;\n }\n\n return React.createElement(\"li\", _extends({\n className: className,\n style: itemStyle,\n key: \"legend-item-\".concat(i)\n }, filterEventsOfChild(_this.props, entry, i)), React.createElement(Surface, {\n width: iconSize,\n height: iconSize,\n viewBox: viewBox,\n style: svgStyle\n }, _this.renderIcon(entry)), React.createElement(\"span\", {\n className: \"recharts-legend-item-text\"\n }, finalFormatter ? finalFormatter(entry.value, entry, i) : entry.value));\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n payload = _this$props2.payload,\n layout = _this$props2.layout,\n align = _this$props2.align;\n\n if (!payload || !payload.length) {\n return null;\n }\n\n var finalStyle = {\n padding: 0,\n margin: 0,\n textAlign: layout === 'horizontal' ? align : 'left'\n };\n return React.createElement(\"ul\", {\n className: \"recharts-default-legend\",\n style: finalStyle\n }, this.renderItems());\n }\n }]);\n\n return DefaultLegendContent;\n}(Component), _class2.displayName = 'Legend', _class2.propTypes = {\n content: PropTypes.element,\n iconSize: PropTypes.number,\n iconType: PropTypes.oneOf(ICON_TYPES),\n layout: PropTypes.oneOf(['horizontal', 'vertical']),\n align: PropTypes.oneOf(['center', 'left', 'right']),\n verticalAlign: PropTypes.oneOf(['top', 'bottom', 'middle']),\n payload: PropTypes.arrayOf(PropTypes.shape({\n value: PropTypes.any,\n id: PropTypes.any,\n type: PropTypes.oneOf(LEGEND_TYPES)\n })),\n inactiveColor: PropTypes.string,\n formatter: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onClick: PropTypes.func\n}, _class2.defaultProps = {\n iconSize: 14,\n layout: 'horizontal',\n align: 'center',\n verticalAlign: 'middle',\n inactiveColor: '#ccc'\n}, _temp)) || _class;\n\nexport default DefaultLegendContent;",
"import _isFunction from \"lodash/isFunction\";\nimport _uniqBy from \"lodash/uniqBy\";\n\nvar _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview Legend\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport pureRender from '../util/PureRender';\nimport DefaultLegendContent from './DefaultLegendContent';\nimport { isNumber } from '../util/DataUtils';\nimport { LEGEND_TYPES } from '../util/ReactUtils';\n\nvar defaultUniqBy = function defaultUniqBy(entry) {\n return entry.value;\n};\n\nvar getUniqPaylod = function getUniqPaylod(option, payload) {\n if (option === true) {\n return _uniqBy(payload, defaultUniqBy);\n }\n\n if (_isFunction(option)) {\n return _uniqBy(payload, option);\n }\n\n return payload;\n};\n\nvar renderContent = function renderContent(content, props) {\n if (React.isValidElement(content)) {\n return React.cloneElement(content, props);\n }\n\n if (_isFunction(content)) {\n return content(props);\n }\n\n return React.createElement(DefaultLegendContent, props);\n};\n\nvar EPS = 1;\nvar ICON_TYPES = LEGEND_TYPES.filter(function (type) {\n return type !== 'none';\n});\n\nvar Legend = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(Legend, _Component);\n\n function Legend() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, Legend);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Legend)).call.apply(_getPrototypeOf2, [this].concat(args)));\n _this.state = {\n boxWidth: -1,\n boxHeight: -1\n };\n return _this;\n }\n\n _createClass(Legend, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.updateBBox();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.updateBBox();\n }\n }, {\n key: \"getBBox\",\n value: function getBBox() {\n var _this$state = this.state,\n boxWidth = _this$state.boxWidth,\n boxHeight = _this$state.boxHeight;\n\n if (boxWidth >= 0 && boxHeight >= 0) {\n return {\n width: boxWidth,\n height: boxHeight\n };\n }\n\n return null;\n }\n }, {\n key: \"getDefaultPosition\",\n value: function getDefaultPosition(style) {\n var _this$props = this.props,\n layout = _this$props.layout,\n align = _this$props.align,\n verticalAlign = _this$props.verticalAlign,\n margin = _this$props.margin,\n chartWidth = _this$props.chartWidth,\n chartHeight = _this$props.chartHeight;\n var hPos, vPos;\n\n if (!style || (style.left === undefined || style.left === null) && (style.right === undefined || style.right === null)) {\n if (align === 'center' && layout === 'vertical') {\n var box = this.getBBox() || {\n width: 0\n };\n hPos = {\n left: ((chartWidth || 0) - box.width) / 2\n };\n } else {\n hPos = align === 'right' ? {\n right: margin && margin.right || 0\n } : {\n left: margin && margin.left || 0\n };\n }\n }\n\n if (!style || (style.top === undefined || style.top === null) && (style.bottom === undefined || style.bottom === null)) {\n if (verticalAlign === 'middle') {\n var _box = this.getBBox() || {\n height: 0\n };\n\n vPos = {\n top: ((chartHeight || 0) - _box.height) / 2\n };\n } else {\n vPos = verticalAlign === 'bottom' ? {\n bottom: margin && margin.bottom || 0\n } : {\n top: margin && margin.top || 0\n };\n }\n }\n\n return _objectSpread({}, hPos, vPos);\n }\n }, {\n key: \"updateBBox\",\n value: function updateBBox() {\n var _this$state2 = this.state,\n boxWidth = _this$state2.boxWidth,\n boxHeight = _this$state2.boxHeight;\n var onBBoxUpdate = this.props.onBBoxUpdate;\n\n if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {\n var box = this.wrapperNode.getBoundingClientRect();\n\n if (Math.abs(box.width - boxWidth) > EPS || Math.abs(box.height - boxHeight) > EPS) {\n this.setState({\n boxWidth: box.width,\n boxHeight: box.height\n }, function () {\n if (onBBoxUpdate) {\n onBBoxUpdate(box);\n }\n });\n }\n } else if (boxWidth !== -1 || boxHeight !== -1) {\n this.setState({\n boxWidth: -1,\n boxHeight: -1\n }, function () {\n if (onBBoxUpdate) {\n onBBoxUpdate(null);\n }\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$props2 = this.props,\n content = _this$props2.content,\n width = _this$props2.width,\n height = _this$props2.height,\n wrapperStyle = _this$props2.wrapperStyle,\n paylodUniqBy = _this$props2.paylodUniqBy,\n payload = _this$props2.payload;\n\n var outerStyle = _objectSpread({\n position: 'absolute',\n width: width || 'auto',\n height: height || 'auto'\n }, this.getDefaultPosition(wrapperStyle), wrapperStyle);\n\n return React.createElement(\"div\", {\n className: \"recharts-legend-wrapper\",\n style: outerStyle,\n ref: function ref(node) {\n _this2.wrapperNode = node;\n }\n }, renderContent(content, _objectSpread({}, this.props, {\n payload: getUniqPaylod(paylodUniqBy, payload)\n })));\n }\n }], [{\n key: \"getWithHeight\",\n value: function getWithHeight(item, chartWidth) {\n var layout = item.props.layout;\n\n if (layout === 'vertical' && isNumber(item.props.height)) {\n return {\n height: item.props.height\n };\n }\n\n if (layout === 'horizontal') {\n return {\n width: item.props.width || chartWidth\n };\n }\n\n return null;\n }\n }]);\n\n return Legend;\n}(Component), _class2.displayName = 'Legend', _class2.propTypes = {\n content: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n wrapperStyle: PropTypes.object,\n chartWidth: PropTypes.number,\n chartHeight: PropTypes.number,\n width: PropTypes.number,\n height: PropTypes.number,\n iconSize: PropTypes.number,\n iconType: PropTypes.oneOf(ICON_TYPES),\n layout: PropTypes.oneOf(['horizontal', 'vertical']),\n align: PropTypes.oneOf(['center', 'left', 'right']),\n verticalAlign: PropTypes.oneOf(['top', 'bottom', 'middle']),\n margin: PropTypes.shape({\n top: PropTypes.number,\n left: PropTypes.number,\n bottom: PropTypes.number,\n right: PropTypes.number\n }),\n payload: PropTypes.arrayOf(PropTypes.shape({\n value: PropTypes.any,\n id: PropTypes.any,\n type: PropTypes.oneOf(LEGEND_TYPES)\n })),\n paylodUniqBy: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),\n formatter: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onClick: PropTypes.func,\n onBBoxUpdate: PropTypes.func\n}, _class2.defaultProps = {\n iconSize: 14,\n layout: 'horizontal',\n align: 'center',\n verticalAlign: 'bottom'\n}, _temp)) || _class;\n\nexport default Legend;",
"import _debounce from \"lodash/debounce\";\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview Wrapper component to make charts adapt to the size of parent * DOM\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport ReactResizeDetector from 'react-resize-detector';\nimport { isPercent } from '../util/DataUtils';\nimport { warn } from '../util/LogUtils';\n\nvar ResponsiveContainer =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(ResponsiveContainer, _Component);\n\n function ResponsiveContainer(props) {\n var _this;\n\n _classCallCheck(this, ResponsiveContainer);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(ResponsiveContainer).call(this, props));\n\n _this.updateDimensionsImmediate = function () {\n if (!_this.mounted) {\n return;\n }\n\n var newSize = _this.getContainerSize();\n\n if (newSize) {\n var _this$state = _this.state,\n oldWidth = _this$state.containerWidth,\n oldHeight = _this$state.containerHeight;\n var containerWidth = newSize.containerWidth,\n containerHeight = newSize.containerHeight;\n\n if (containerWidth !== oldWidth || containerHeight !== oldHeight) {\n _this.setState({\n containerWidth: containerWidth,\n containerHeight: containerHeight\n });\n }\n }\n };\n\n _this.state = {\n containerWidth: -1,\n containerHeight: -1\n };\n _this.handleResize = props.debounce > 0 ? _debounce(_this.updateDimensionsImmediate, props.debounce) : _this.updateDimensionsImmediate;\n return _this;\n }\n /* eslint-disable react/no-did-mount-set-state */\n\n\n _createClass(ResponsiveContainer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.mounted = true;\n var size = this.getContainerSize();\n\n if (size) {\n this.setState(size);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.mounted = false;\n }\n }, {\n key: \"getContainerSize\",\n value: function getContainerSize() {\n if (!this.container) {\n return null;\n }\n\n return {\n containerWidth: this.container.clientWidth,\n containerHeight: this.container.clientHeight\n };\n }\n }, {\n key: \"renderChart\",\n value: function renderChart() {\n var _this$state2 = this.state,\n containerWidth = _this$state2.containerWidth,\n containerHeight = _this$state2.containerHeight;\n\n if (containerWidth < 0 || containerHeight < 0) {\n return null;\n }\n\n var _this$props = this.props,\n aspect = _this$props.aspect,\n width = _this$props.width,\n height = _this$props.height,\n minWidth = _this$props.minWidth,\n minHeight = _this$props.minHeight,\n maxHeight = _this$props.maxHeight,\n children = _this$props.children;\n warn(isPercent(width) || isPercent(height), \"The width(%s) and height(%s) are both fixed numbers,\\n maybe you don't need to use a ResponsiveContainer.\", width, height);\n warn(!aspect || aspect > 0, 'The aspect(%s) must be greater than zero.', aspect);\n var calculatedWidth = isPercent(width) ? containerWidth : width;\n var calculatedHeight = isPercent(height) ? containerHeight : height;\n\n if (aspect && aspect > 0) {\n // Preserve the desired aspect ratio\n calculatedHeight = calculatedWidth / aspect; // if maxHeight is set, overwrite if calculatedHeight is greater than maxHeight\n\n if (maxHeight && calculatedHeight > maxHeight) {\n calculatedHeight = maxHeight;\n }\n }\n\n warn(calculatedWidth > 0 || calculatedHeight > 0, \"The width(%s) and height(%s) of chart should be greater than 0,\\n please check the style of container, or the props width(%s) and height(%s),\\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\\n height and width.\", calculatedWidth, calculatedHeight, width, height, minWidth, minHeight, aspect);\n return React.cloneElement(children, {\n width: calculatedWidth,\n height: calculatedHeight\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$props2 = this.props,\n minWidth = _this$props2.minWidth,\n minHeight = _this$props2.minHeight,\n width = _this$props2.width,\n height = _this$props2.height,\n maxHeight = _this$props2.maxHeight,\n id = _this$props2.id,\n className = _this$props2.className;\n var style = {\n width: width,\n height: height,\n minWidth: minWidth,\n minHeight: minHeight,\n maxHeight: maxHeight\n };\n return React.createElement(\"div\", {\n id: id,\n className: classNames('recharts-responsive-container', className),\n style: style,\n ref: function ref(node) {\n _this2.container = node;\n }\n }, this.renderChart(), React.createElement(ReactResizeDetector, {\n handleWidth: true,\n handleHeight: true,\n onResize: this.handleResize\n }));\n }\n }]);\n\n return ResponsiveContainer;\n}(Component);\n\nResponsiveContainer.displayName = 'ResponsiveContainer';\nResponsiveContainer.propTypes = {\n aspect: PropTypes.number,\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n minHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n minWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n maxHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n children: PropTypes.node.isRequired,\n debounce: PropTypes.number,\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n};\nResponsiveContainer.defaultProps = {\n width: '100%',\n height: '100%',\n debounce: 0\n};\nexport default ResponsiveContainer;",
"import _isNil from \"lodash/isNil\";\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport reduceCSSCalc from 'reduce-css-calc';\nimport classNames from 'classnames';\nimport { isNumber, isNumOrStr } from '../util/DataUtils';\nimport { PRESENTATION_ATTRIBUTES, getPresentationAttributes, isSsr } from '../util/ReactUtils';\nimport { getStringSize } from '../util/DOMUtils';\nvar BREAKING_SPACES = /[ \\f\\n\\r\\t\\v\\u2028\\u2029]+/;\n\nvar calculateWordWidths = function calculateWordWidths(props) {\n try {\n var words = !_isNil(props.children) ? props.children.toString().split(BREAKING_SPACES) : [];\n var wordsWithComputedWidth = words.map(function (word) {\n return {\n word: word,\n width: getStringSize(word, props.style).width\n };\n });\n var spaceWidth = getStringSize(\"\\xA0\", props.style).width;\n return {\n wordsWithComputedWidth: wordsWithComputedWidth,\n spaceWidth: spaceWidth\n };\n } catch (e) {\n return null;\n }\n};\n\nvar Text =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(Text, _Component);\n\n function Text() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, Text);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Text)).call.apply(_getPrototypeOf2, [this].concat(args)));\n _this.state = {\n wordsByLines: []\n };\n return _this;\n }\n\n _createClass(Text, [{\n key: \"componentWillMount\",\n value: function componentWillMount() {\n this.updateWordsByLines(this.props, true);\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n var needCalculate = this.props.children !== nextProps.children || this.props.style !== nextProps.style;\n this.updateWordsByLines(nextProps, needCalculate);\n }\n }, {\n key: \"updateWordsByLines\",\n value: function updateWordsByLines(props, needCalculate) {\n // Only perform calculations if using features that require them (multiline, scaleToFit)\n if ((props.width || props.scaleToFit) && !isSsr()) {\n if (needCalculate) {\n var wordWidths = calculateWordWidths(props);\n\n if (wordWidths) {\n var wordsWithComputedWidth = wordWidths.wordsWithComputedWidth,\n spaceWidth = wordWidths.spaceWidth;\n this.wordsWithComputedWidth = wordsWithComputedWidth;\n this.spaceWidth = spaceWidth;\n } else {\n this.updateWordsWithoutCalculate(props);\n return;\n }\n }\n\n var wordsByLines = this.calculateWordsByLines(this.wordsWithComputedWidth, this.spaceWidth, props.width);\n this.setState({\n wordsByLines: wordsByLines\n });\n } else {\n this.updateWordsWithoutCalculate(props);\n }\n }\n }, {\n key: \"updateWordsWithoutCalculate\",\n value: function updateWordsWithoutCalculate(props) {\n var words = !_isNil(props.children) ? props.children.toString().split(BREAKING_SPACES) : [];\n this.setState({\n wordsByLines: [{\n words: words\n }]\n });\n }\n }, {\n key: \"calculateWordsByLines\",\n value: function calculateWordsByLines(wordsWithComputedWidth, spaceWidth, lineWidth) {\n var scaleToFit = this.props.scaleToFit;\n return wordsWithComputedWidth.reduce(function (result, _ref) {\n var word = _ref.word,\n width = _ref.width;\n var currentLine = result[result.length - 1];\n\n if (currentLine && (lineWidth == null || scaleToFit || currentLine.width + width + spaceWidth < lineWidth)) {\n // Word can be added to an existing line\n currentLine.words.push(word);\n currentLine.width += width + spaceWidth;\n } else {\n // Add first word to line or word is too long to scaleToFit on existing line\n var newLine = {\n words: [word],\n width: width\n };\n result.push(newLine);\n }\n\n return result;\n }, []);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n dx = _this$props.dx,\n dy = _this$props.dy,\n textAnchor = _this$props.textAnchor,\n verticalAnchor = _this$props.verticalAnchor,\n scaleToFit = _this$props.scaleToFit,\n angle = _this$props.angle,\n lineHeight = _this$props.lineHeight,\n capHeight = _this$props.capHeight,\n className = _this$props.className,\n textProps = _objectWithoutProperties(_this$props, [\"dx\", \"dy\", \"textAnchor\", \"verticalAnchor\", \"scaleToFit\", \"angle\", \"lineHeight\", \"capHeight\", \"className\"]);\n\n var wordsByLines = this.state.wordsByLines;\n\n if (!isNumOrStr(textProps.x) || !isNumOrStr(textProps.y)) {\n return null;\n }\n\n var x = textProps.x + (isNumber(dx) ? dx : 0);\n var y = textProps.y + (isNumber(dy) ? dy : 0);\n var startDy;\n\n switch (verticalAnchor) {\n case 'start':\n startDy = reduceCSSCalc(\"calc(\".concat(capHeight, \")\"));\n break;\n\n case 'middle':\n startDy = reduceCSSCalc(\"calc(\".concat((wordsByLines.length - 1) / 2, \" * -\").concat(lineHeight, \" + (\").concat(capHeight, \" / 2))\"));\n break;\n\n default:\n startDy = reduceCSSCalc(\"calc(\".concat(wordsByLines.length - 1, \" * -\").concat(lineHeight, \")\"));\n break;\n }\n\n var transforms = [];\n\n if (scaleToFit) {\n var lineWidth = wordsByLines[0].width;\n transforms.push(\"scale(\".concat(this.props.width / lineWidth, \")\"));\n }\n\n if (angle) {\n transforms.push(\"rotate(\".concat(angle, \", \").concat(x, \", \").concat(y, \")\"));\n }\n\n if (transforms.length) {\n textProps.transform = transforms.join(' ');\n }\n\n return React.createElement(\"text\", _extends({}, getPresentationAttributes(textProps), {\n x: x,\n y: y,\n className: classNames('recharts-text', className),\n textAnchor: textAnchor\n }), wordsByLines.map(function (line, index) {\n return React.createElement(\"tspan\", {\n x: x,\n dy: index === 0 ? startDy : lineHeight,\n key: index\n }, line.words.join(' '));\n }));\n }\n }]);\n\n return Text;\n}(Component);\n\nText.propTypes = _objectSpread({}, PRESENTATION_ATTRIBUTES, {\n scaleToFit: PropTypes.bool,\n angle: PropTypes.number,\n textAnchor: PropTypes.oneOf(['start', 'middle', 'end', 'inherit']),\n verticalAnchor: PropTypes.oneOf(['start', 'middle', 'end']),\n style: PropTypes.object\n});\nText.defaultProps = {\n x: 0,\n y: 0,\n lineHeight: '1em',\n capHeight: '0.71em',\n // Magic number from d3\n scaleToFit: false,\n textAnchor: 'start',\n verticalAnchor: 'end' // Maintain compat with existing charts / default SVG behavior\n\n};\nexport default Text;",
"import _isArray from \"lodash/isArray\";\n\nvar _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport pureRender from '../util/PureRender';\nimport { isNumOrStr } from '../util/DataUtils';\n\nvar defaultFormatter = function defaultFormatter(value) {\n return _isArray(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;\n};\n\nvar DefaultTooltipContent = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(DefaultTooltipContent, _Component);\n\n function DefaultTooltipContent() {\n _classCallCheck(this, DefaultTooltipContent);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(DefaultTooltipContent).apply(this, arguments));\n }\n\n _createClass(DefaultTooltipContent, [{\n key: \"renderContent\",\n value: function renderContent() {\n var _this$props = this.props,\n payload = _this$props.payload,\n separator = _this$props.separator,\n formatter = _this$props.formatter,\n itemStyle = _this$props.itemStyle,\n itemSorter = _this$props.itemSorter;\n\n if (payload && payload.length) {\n var listStyle = {\n padding: 0,\n margin: 0\n };\n var items = payload.sort(itemSorter).map(function (entry, i) {\n var finalItemStyle = _objectSpread({\n display: 'block',\n paddingTop: 4,\n paddingBottom: 4,\n color: entry.color || '#000'\n }, itemStyle);\n\n var finalFormatter = entry.formatter || formatter || defaultFormatter;\n var name = entry.name,\n value = entry.value;\n\n if (finalFormatter) {\n var formatted = finalFormatter(value, name, entry, i);\n\n if (Array.isArray(formatted)) {\n var _formatted = _slicedToArray(formatted, 2);\n\n value = _formatted[0];\n name = _formatted[1];\n } else {\n value = formatted;\n }\n }\n\n return React.createElement(\"li\", {\n className: \"recharts-tooltip-item\",\n key: \"tooltip-item-\".concat(i),\n style: finalItemStyle\n }, isNumOrStr(name) ? React.createElement(\"span\", {\n className: \"recharts-tooltip-item-name\"\n }, name) : null, isNumOrStr(name) ? React.createElement(\"span\", {\n className: \"recharts-tooltip-item-separator\"\n }, separator) : null, React.createElement(\"span\", {\n className: \"recharts-tooltip-item-value\"\n }, value), React.createElement(\"span\", {\n className: \"recharts-tooltip-item-unit\"\n }, entry.unit || ''));\n });\n return React.createElement(\"ul\", {\n className: \"recharts-tooltip-item-list\",\n style: listStyle\n }, items);\n }\n\n return null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n wrapperClassName = _this$props2.wrapperClassName,\n contentStyle = _this$props2.contentStyle,\n labelClassName = _this$props2.labelClassName,\n labelStyle = _this$props2.labelStyle,\n label = _this$props2.label,\n labelFormatter = _this$props2.labelFormatter;\n\n var finalStyle = _objectSpread({\n margin: 0,\n padding: 10,\n backgroundColor: '#fff',\n border: '1px solid #ccc',\n whiteSpace: 'nowrap'\n }, contentStyle);\n\n var finalLabelStyle = _objectSpread({\n margin: 0\n }, labelStyle);\n\n var hasLabel = isNumOrStr(label);\n var finalLabel = hasLabel ? label : '';\n var wrapperCN = classNames('recharts-default-tooltip', wrapperClassName);\n var labelCN = classNames('recharts-tooltip-label', labelClassName);\n\n if (hasLabel && labelFormatter) {\n finalLabel = labelFormatter(label);\n }\n\n return React.createElement(\"div\", {\n className: wrapperCN,\n style: finalStyle\n }, React.createElement(\"p\", {\n className: labelCN,\n style: finalLabelStyle\n }, finalLabel), this.renderContent());\n }\n }]);\n\n return DefaultTooltipContent;\n}(Component), _class2.displayName = 'DefaultTooltipContent', _class2.propTypes = {\n separator: PropTypes.string,\n wrapperClassName: PropTypes.string,\n labelClassName: PropTypes.string,\n formatter: PropTypes.func,\n contentStyle: PropTypes.object,\n itemStyle: PropTypes.object,\n labelStyle: PropTypes.object,\n labelFormatter: PropTypes.func,\n label: PropTypes.any,\n payload: PropTypes.arrayOf(PropTypes.shape({\n name: PropTypes.any,\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.array]),\n unit: PropTypes.any\n })),\n itemSorter: PropTypes.func\n}, _class2.defaultProps = {\n separator: ' : ',\n contentStyle: {},\n itemStyle: {},\n labelStyle: {}\n}, _temp)) || _class;\n\nexport default DefaultTooltipContent;",
"import _isNil from \"lodash/isNil\";\nimport _isFunction from \"lodash/isFunction\";\nimport _uniqBy from \"lodash/uniqBy\";\n\nvar _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview Tooltip\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { translateStyle } from 'react-smooth';\nimport classNames from 'classnames';\nimport DefaultTooltipContent from './DefaultTooltipContent';\nimport { isSsr } from '../util/ReactUtils';\nimport { isNumber } from '../util/DataUtils';\nimport pureRender from '../util/PureRender';\nvar CLS_PREFIX = 'recharts-tooltip-wrapper';\nvar EPS = 1;\n\nvar defaultUniqBy = function defaultUniqBy(entry) {\n return entry.dataKey;\n};\n\nvar getUniqPaylod = function getUniqPaylod(option, payload) {\n if (option === true) {\n return _uniqBy(payload, defaultUniqBy);\n }\n\n if (_isFunction(option)) {\n return _uniqBy(payload, option);\n }\n\n return payload;\n};\n\nvar propTypes = {\n content: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n viewBox: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number,\n width: PropTypes.number,\n height: PropTypes.number\n }),\n active: PropTypes.bool,\n separator: PropTypes.string,\n formatter: PropTypes.func,\n offset: PropTypes.number,\n itemStyle: PropTypes.object,\n labelStyle: PropTypes.object,\n wrapperStyle: PropTypes.object,\n contentStyle: PropTypes.object,\n cursor: PropTypes.oneOfType([PropTypes.bool, PropTypes.element, PropTypes.object]),\n coordinate: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n position: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n label: PropTypes.any,\n payload: PropTypes.arrayOf(PropTypes.shape({\n name: PropTypes.any,\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.array]),\n unit: PropTypes.any\n })),\n paylodUniqBy: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),\n isAnimationActive: PropTypes.bool,\n animationDuration: PropTypes.number,\n animationEasing: PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear']),\n itemSorter: PropTypes.func,\n filterNull: PropTypes.bool,\n useTranslate3d: PropTypes.bool\n};\nvar defaultProps = {\n active: false,\n offset: 10,\n viewBox: {\n x1: 0,\n x2: 0,\n y1: 0,\n y2: 0\n },\n coordinate: {\n x: 0,\n y: 0\n },\n cursorStyle: {},\n separator: ' : ',\n wrapperStyle: {},\n contentStyle: {},\n itemStyle: {},\n labelStyle: {},\n cursor: true,\n isAnimationActive: !isSsr(),\n animationEasing: 'ease',\n animationDuration: 400,\n itemSorter: function itemSorter() {\n return -1;\n },\n filterNull: true,\n useTranslate3d: false\n};\n\nvar renderContent = function renderContent(content, props) {\n if (React.isValidElement(content)) {\n return React.cloneElement(content, props);\n }\n\n if (_isFunction(content)) {\n return content(props);\n }\n\n return React.createElement(DefaultTooltipContent, props);\n};\n\nvar Tooltip = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(Tooltip, _Component);\n\n function Tooltip() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, Tooltip);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Tooltip)).call.apply(_getPrototypeOf2, [this].concat(args)));\n _this.state = {\n boxWidth: -1,\n boxHeight: -1\n };\n return _this;\n }\n\n _createClass(Tooltip, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.updateBBox();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.updateBBox();\n }\n }, {\n key: \"updateBBox\",\n value: function updateBBox() {\n var _this$state = this.state,\n boxWidth = _this$state.boxWidth,\n boxHeight = _this$state.boxHeight;\n\n if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {\n var box = this.wrapperNode.getBoundingClientRect();\n\n if (Math.abs(box.width - boxWidth) > EPS || Math.abs(box.height - boxHeight) > EPS) {\n this.setState({\n boxWidth: box.width,\n boxHeight: box.height\n });\n }\n } else if (boxWidth !== -1 || boxHeight !== -1) {\n this.setState({\n boxWidth: -1,\n boxHeight: -1\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _classNames,\n _this2 = this;\n\n var _this$props = this.props,\n payload = _this$props.payload,\n isAnimationActive = _this$props.isAnimationActive,\n animationDuration = _this$props.animationDuration,\n animationEasing = _this$props.animationEasing,\n filterNull = _this$props.filterNull,\n paylodUniqBy = _this$props.paylodUniqBy;\n var finalPayload = getUniqPaylod(paylodUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {\n return !_isNil(entry.value);\n }) : payload);\n var hasPayload = finalPayload && finalPayload.length;\n var _this$props2 = this.props,\n content = _this$props2.content,\n viewBox = _this$props2.viewBox,\n coordinate = _this$props2.coordinate,\n position = _this$props2.position,\n active = _this$props2.active,\n offset = _this$props2.offset,\n wrapperStyle = _this$props2.wrapperStyle;\n\n var outerStyle = _objectSpread({\n pointerEvents: 'none',\n visibility: active && hasPayload ? 'visible' : 'hidden',\n position: 'absolute',\n top: 0\n }, wrapperStyle);\n\n var translateX, translateY;\n\n if (position && isNumber(position.x) && isNumber(position.y)) {\n translateX = position.x;\n translateY = position.y;\n } else {\n var _this$state2 = this.state,\n boxWidth = _this$state2.boxWidth,\n boxHeight = _this$state2.boxHeight;\n\n if (boxWidth > 0 && boxHeight > 0 && coordinate) {\n translateX = position && isNumber(position.x) ? position.x : Math.max(coordinate.x + boxWidth + offset > viewBox.x + viewBox.width ? coordinate.x - boxWidth - offset : coordinate.x + offset, viewBox.x);\n translateY = position && isNumber(position.y) ? position.y : Math.max(coordinate.y + boxHeight + offset > viewBox.y + viewBox.height ? coordinate.y - boxHeight - offset : coordinate.y + offset, viewBox.y);\n } else {\n outerStyle.visibility = 'hidden';\n }\n }\n\n outerStyle = _objectSpread({}, outerStyle, translateStyle({\n transform: this.props.useTranslate3d ? \"translate3d(\".concat(translateX, \"px, \").concat(translateY, \"px, 0)\") : \"translate(\".concat(translateX, \"px, \").concat(translateY, \"px)\")\n }));\n\n if (isAnimationActive && active) {\n outerStyle = _objectSpread({}, outerStyle, translateStyle({\n transition: \"transform \".concat(animationDuration, \"ms \").concat(animationEasing)\n }));\n }\n\n var cls = classNames(CLS_PREFIX, (_classNames = {}, _defineProperty(_classNames, \"\".concat(CLS_PREFIX, \"-right\"), isNumber(translateX) && coordinate && isNumber(coordinate.x) && translateX >= coordinate.x), _defineProperty(_classNames, \"\".concat(CLS_PREFIX, \"-left\"), isNumber(translateX) && coordinate && isNumber(coordinate.x) && translateX < coordinate.x), _defineProperty(_classNames, \"\".concat(CLS_PREFIX, \"-bottom\"), isNumber(translateY) && coordinate && isNumber(coordinate.y) && translateY >= coordinate.y), _defineProperty(_classNames, \"\".concat(CLS_PREFIX, \"-top\"), isNumber(translateY) && coordinate && isNumber(coordinate.y) && translateY < coordinate.y), _classNames));\n return React.createElement(\"div\", {\n className: cls,\n style: outerStyle,\n ref: function ref(node) {\n _this2.wrapperNode = node;\n }\n }, renderContent(content, _objectSpread({}, this.props, {\n payload: finalPayload\n })));\n }\n }]);\n\n return Tooltip;\n}(Component), _class2.displayName = 'Tooltip', _class2.propTypes = propTypes, _class2.defaultProps = defaultProps, _temp)) || _class;\n\nexport default Tooltip;",
"function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\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\n/**\n * @fileOverview Layer\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nvar propTypes = {\n className: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])\n};\n\nfunction Layer(props) {\n var children = props.children,\n className = props.className,\n others = _objectWithoutProperties(props, [\"children\", \"className\"]);\n\n var layerClass = classNames('recharts-layer', className);\n return React.createElement(\"g\", _extends({\n className: layerClass\n }, others), children);\n}\n\nLayer.propTypes = propTypes;\nexport default Layer;",
"function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\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\n/**\n * @fileOverview Surface\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { getPresentationAttributes } from '../util/ReactUtils';\nvar propTypes = {\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n viewBox: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number,\n width: PropTypes.number,\n height: PropTypes.number\n }),\n className: PropTypes.string,\n style: PropTypes.object,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])\n};\n\nfunction Surface(props) {\n var children = props.children,\n width = props.width,\n height = props.height,\n viewBox = props.viewBox,\n className = props.className,\n style = props.style,\n others = _objectWithoutProperties(props, [\"children\", \"width\", \"height\", \"viewBox\", \"className\", \"style\"]);\n\n var svgView = viewBox || {\n width: width,\n height: height,\n x: 0,\n y: 0\n };\n var layerClass = classNames('recharts-surface', className);\n var attrs = getPresentationAttributes(others);\n return React.createElement(\"svg\", _extends({}, attrs, {\n className: layerClass,\n width: width,\n height: height,\n style: style,\n viewBox: \"\".concat(svgView.x, \" \").concat(svgView.y, \" \").concat(svgView.width, \" \").concat(svgView.height),\n version: \"1.1\"\n }), children);\n}\n\nSurface.propTypes = propTypes;\nexport default Surface;",
"import 'core-js/es6/math';\nimport 'core-js/es6/number';\n/* eslint no-proto: 0 */\n\nvar testObject = {};\n\nif (!(Object.setPrototypeOf || testObject.__proto__)) {\n var nativeGetPrototypeOf = Object.getPrototypeOf;\n\n Object.getPrototypeOf = function (object) {\n if (object.__proto__) {\n return object.__proto__;\n }\n\n return nativeGetPrototypeOf.call(Object, object);\n };\n}",
"import './polyfill';\nimport _Surface from './container/Surface';\nexport { _Surface as Surface };\nimport _Layer from './container/Layer';\nexport { _Layer as Layer };\nimport _Legend from './component/Legend';\nexport { _Legend as Legend };\nimport _Tooltip from './component/Tooltip';\nexport { _Tooltip as Tooltip };\nimport _ResponsiveContainer from './component/ResponsiveContainer';\nexport { _ResponsiveContainer as ResponsiveContainer };\nimport _Cell from './component/Cell';\nexport { _Cell as Cell };\nimport _Text from './component/Text';\nexport { _Text as Text };\nimport _Label from './component/Label';\nexport { _Label as Label };\nimport _LabelList from './component/LabelList';\nexport { _LabelList as LabelList };\nimport _Sector from './shape/Sector';\nexport { _Sector as Sector };\nimport _Curve from './shape/Curve';\nexport { _Curve as Curve };\nimport _Rectangle from './shape/Rectangle';\nexport { _Rectangle as Rectangle };\nimport _Polygon from './shape/Polygon';\nexport { _Polygon as Polygon };\nimport _Dot from './shape/Dot';\nexport { _Dot as Dot };\nimport _Cross from './shape/Cross';\nexport { _Cross as Cross };\nimport _Symbols from './shape/Symbols';\nexport { _Symbols as Symbols };\nimport _PolarGrid from './polar/PolarGrid';\nexport { _PolarGrid as PolarGrid };\nimport _PolarRadiusAxis from './polar/PolarRadiusAxis';\nexport { _PolarRadiusAxis as PolarRadiusAxis };\nimport _PolarAngleAxis from './polar/PolarAngleAxis';\nexport { _PolarAngleAxis as PolarAngleAxis };\nimport _Pie from './polar/Pie';\nexport { _Pie as Pie };\nimport _Radar from './polar/Radar';\nexport { _Radar as Radar };\nimport _RadialBar from './polar/RadialBar';\nexport { _RadialBar as RadialBar };\nimport _Brush from './cartesian/Brush';\nexport { _Brush as Brush };\nimport _ReferenceLine from './cartesian/ReferenceLine';\nexport { _ReferenceLine as ReferenceLine };\nimport _ReferenceDot from './cartesian/ReferenceDot';\nexport { _ReferenceDot as ReferenceDot };\nimport _ReferenceArea from './cartesian/ReferenceArea';\nexport { _ReferenceArea as ReferenceArea };\nimport _CartesianAxis from './cartesian/CartesianAxis';\nexport { _CartesianAxis as CartesianAxis };\nimport _CartesianGrid from './cartesian/CartesianGrid';\nexport { _CartesianGrid as CartesianGrid };\nimport _Line from './cartesian/Line';\nexport { _Line as Line };\nimport _Area from './cartesian/Area';\nexport { _Area as Area };\nimport _Bar from './cartesian/Bar';\nexport { _Bar as Bar };\nimport _Scatter from './cartesian/Scatter';\nexport { _Scatter as Scatter };\nimport _XAxis from './cartesian/XAxis';\nexport { _XAxis as XAxis };\nimport _YAxis from './cartesian/YAxis';\nexport { _YAxis as YAxis };\nimport _ZAxis from './cartesian/ZAxis';\nexport { _ZAxis as ZAxis };\nimport _ErrorBar from './cartesian/ErrorBar';\nexport { _ErrorBar as ErrorBar };\nimport _LineChart from './chart/LineChart';\nexport { _LineChart as LineChart };\nimport _BarChart from './chart/BarChart';\nexport { _BarChart as BarChart };\nimport _PieChart from './chart/PieChart';\nexport { _PieChart as PieChart };\nimport _Treemap from './chart/Treemap';\nexport { _Treemap as Treemap };\nimport _Sankey from './chart/Sankey';\nexport { _Sankey as Sankey };\nimport _RadarChart from './chart/RadarChart';\nexport { _RadarChart as RadarChart };\nimport _ScatterChart from './chart/ScatterChart';\nexport { _ScatterChart as ScatterChart };\nimport _AreaChart from './chart/AreaChart';\nexport { _AreaChart as AreaChart };\nimport _RadialBarChart from './chart/RadialBarChart';\nexport { _RadialBarChart as RadialBarChart };\nimport _ComposedChart from './chart/ComposedChart';\nexport { _ComposedChart as ComposedChart };\nimport _Funnel from './numberAxis/Funnel';\nexport { _Funnel as Funnel };\nimport _FunnelChart from './chart/FunnelChart';\nexport { _FunnelChart as FunnelChart };\nimport _Trapezoid from './shape/Trapezoid';\nexport { _Trapezoid as Trapezoid };",
"var _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview Cross\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport pureRender from '../util/PureRender';\nimport { isNumber } from '../util/DataUtils';\nimport { PRESENTATION_ATTRIBUTES, getPresentationAttributes } from '../util/ReactUtils';\n\nvar Cross = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(Cross, _Component);\n\n function Cross() {\n _classCallCheck(this, Cross);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(Cross).apply(this, arguments));\n }\n\n _createClass(Cross, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n x = _this$props.x,\n y = _this$props.y,\n width = _this$props.width,\n height = _this$props.height,\n top = _this$props.top,\n left = _this$props.left,\n className = _this$props.className;\n\n if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {\n return null;\n }\n\n return React.createElement(\"path\", _extends({}, getPresentationAttributes(this.props), {\n className: classNames('recharts-cross', className),\n d: this.constructor.getPath(x, y, width, height, top, left)\n }));\n }\n }], [{\n key: \"getPath\",\n value: function getPath(x, y, width, height, top, left) {\n return \"M\".concat(x, \",\").concat(top, \"v\").concat(height, \"M\").concat(left, \",\").concat(y, \"h\").concat(width);\n }\n }]);\n\n return Cross;\n}(Component), _class2.displayName = 'Cross', _class2.propTypes = _objectSpread({}, PRESENTATION_ATTRIBUTES, {\n x: PropTypes.number,\n y: PropTypes.number,\n width: PropTypes.number,\n height: PropTypes.number,\n top: PropTypes.number,\n left: PropTypes.number,\n className: PropTypes.string\n}), _class2.defaultProps = {\n x: 0,\n y: 0,\n top: 0,\n left: 0,\n width: 0,\n height: 0\n}, _temp)) || _class;\n\nexport default Cross;",
"import _isArray from \"lodash/isArray\";\nimport _isFunction from \"lodash/isFunction\";\n\nvar _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview Curve\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { line as shapeLine, area as shapeArea, curveBasisClosed, curveBasisOpen, curveBasis, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore } from 'd3-shape';\nimport classNames from 'classnames';\nimport pureRender from '../util/PureRender';\nimport { PRESENTATION_ATTRIBUTES, getPresentationAttributes, filterEventAttributes } from '../util/ReactUtils';\nimport { isNumber } from '../util/DataUtils';\nvar CURVE_FACTORIES = {\n curveBasisClosed: curveBasisClosed,\n curveBasisOpen: curveBasisOpen,\n curveBasis: curveBasis,\n curveLinearClosed: curveLinearClosed,\n curveLinear: curveLinear,\n curveMonotoneX: curveMonotoneX,\n curveMonotoneY: curveMonotoneY,\n curveNatural: curveNatural,\n curveStep: curveStep,\n curveStepAfter: curveStepAfter,\n curveStepBefore: curveStepBefore\n};\n\nvar defined = function defined(p) {\n return p.x === +p.x && p.y === +p.y;\n};\n\nvar getX = function getX(p) {\n return p.x;\n};\n\nvar getY = function getY(p) {\n return p.y;\n};\n\nvar getCurveFactory = function getCurveFactory(type, layout) {\n if (_isFunction(type)) {\n return type;\n }\n\n var name = \"curve\".concat(type.slice(0, 1).toUpperCase()).concat(type.slice(1));\n\n if (name === 'curveMonotone' && layout) {\n return CURVE_FACTORIES[\"\".concat(name).concat(layout === 'vertical' ? 'Y' : 'X')];\n }\n\n return CURVE_FACTORIES[name] || curveLinear;\n};\n\nvar Curve = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(Curve, _Component);\n\n function Curve() {\n _classCallCheck(this, Curve);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(Curve).apply(this, arguments));\n }\n\n _createClass(Curve, [{\n key: \"getPath\",\n\n /**\n * Calculate the path of curve\n * @return {String} path\n */\n value: function getPath() {\n var _this$props = this.props,\n type = _this$props.type,\n points = _this$props.points,\n baseLine = _this$props.baseLine,\n layout = _this$props.layout,\n connectNulls = _this$props.connectNulls;\n var curveFactory = getCurveFactory(type, layout);\n var formatPoints = connectNulls ? points.filter(function (entry) {\n return defined(entry);\n }) : points;\n var lineFunction;\n\n if (_isArray(baseLine)) {\n var formatBaseLine = connectNulls ? baseLine.filter(function (base) {\n return defined(base);\n }) : baseLine;\n var areaPoints = formatPoints.map(function (entry, index) {\n return _objectSpread({}, entry, {\n base: formatBaseLine[index]\n });\n });\n\n if (layout === 'vertical') {\n lineFunction = shapeArea().y(getY).x1(getX).x0(function (d) {\n return d.base.x;\n });\n } else {\n lineFunction = shapeArea().x(getX).y1(getY).y0(function (d) {\n return d.base.y;\n });\n }\n\n lineFunction.defined(defined).curve(curveFactory);\n return lineFunction(areaPoints);\n }\n\n if (layout === 'vertical' && isNumber(baseLine)) {\n lineFunction = shapeArea().y(getY).x1(getX).x0(baseLine);\n } else if (isNumber(baseLine)) {\n lineFunction = shapeArea().x(getX).y1(getY).y0(baseLine);\n } else {\n lineFunction = shapeLine().x(getX).y(getY);\n }\n\n lineFunction.defined(defined).curve(curveFactory);\n return lineFunction(formatPoints);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n className = _this$props2.className,\n points = _this$props2.points,\n path = _this$props2.path,\n pathRef = _this$props2.pathRef;\n\n if ((!points || !points.length) && !path) {\n return null;\n }\n\n var realPath = points && points.length ? this.getPath() : path;\n return React.createElement(\"path\", _extends({}, getPresentationAttributes(this.props), filterEventAttributes(this.props, null, true), {\n className: classNames('recharts-curve', className),\n d: realPath,\n ref: pathRef\n }));\n }\n }]);\n\n return Curve;\n}(Component), _class2.displayName = 'Curve', _class2.propTypes = _objectSpread({}, PRESENTATION_ATTRIBUTES, {\n className: PropTypes.string,\n type: PropTypes.oneOfType([PropTypes.oneOf(['basis', 'basisClosed', 'basisOpen', 'linear', 'linearClosed', 'natural', 'monotoneX', 'monotoneY', 'monotone', 'step', 'stepBefore', 'stepAfter']), PropTypes.func]),\n layout: PropTypes.oneOf(['horizontal', 'vertical']),\n baseLine: PropTypes.oneOfType([PropTypes.number, PropTypes.array]),\n points: PropTypes.arrayOf(PropTypes.object),\n connectNulls: PropTypes.bool,\n path: PropTypes.string,\n pathRef: PropTypes.func\n}), _class2.defaultProps = {\n type: 'linear',\n points: [],\n connectNulls: false\n}, _temp)) || _class;\n\nexport default Curve;",
"var _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview Dot\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport pureRender from '../util/PureRender';\nimport { getPresentationAttributes, filterEventAttributes } from '../util/ReactUtils';\n\nvar Dot = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(Dot, _Component);\n\n function Dot() {\n _classCallCheck(this, Dot);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(Dot).apply(this, arguments));\n }\n\n _createClass(Dot, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n cx = _this$props.cx,\n cy = _this$props.cy,\n r = _this$props.r,\n className = _this$props.className;\n var layerClass = classNames('recharts-dot', className);\n\n if (cx === +cx && cy === +cy && r === +r) {\n return React.createElement(\"circle\", _extends({}, getPresentationAttributes(this.props), filterEventAttributes(this.props, null, true), {\n className: layerClass,\n cx: cx,\n cy: cy,\n r: r\n }));\n }\n\n return null;\n }\n }]);\n\n return Dot;\n}(Component), _class2.displayName = 'Dot', _class2.propTypes = {\n className: PropTypes.string,\n cx: PropTypes.number,\n cy: PropTypes.number,\n r: PropTypes.number\n}, _temp)) || _class;\n\nexport default Dot;",
"var _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview Rectangle\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Animate from 'react-smooth';\nimport pureRender from '../util/PureRender';\nimport { PRESENTATION_ATTRIBUTES, EVENT_ATTRIBUTES, getPresentationAttributes, filterEventAttributes } from '../util/ReactUtils';\n\nvar getRectangePath = function getRectangePath(x, y, width, height, radius) {\n var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);\n var ySign = height >= 0 ? 1 : -1;\n var xSign = width >= 0 ? 1 : -1;\n var clockWise = height >= 0 && width >= 0 || height < 0 && width < 0 ? 1 : 0;\n var path;\n\n if (maxRadius > 0 && radius instanceof Array) {\n var newRadius = [];\n\n for (var i = 0, len = 4; i < len; i++) {\n newRadius[i] = radius[i] > maxRadius ? maxRadius : radius[i];\n }\n\n path = \"M\".concat(x, \",\").concat(y + ySign * newRadius[0]);\n\n if (newRadius[0] > 0) {\n path += \"A \".concat(newRadius[0], \",\").concat(newRadius[0], \",0,0,\").concat(clockWise, \",\").concat(x + xSign * newRadius[0], \",\").concat(y);\n }\n\n path += \"L \".concat(x + width - xSign * newRadius[1], \",\").concat(y);\n\n if (newRadius[1] > 0) {\n path += \"A \".concat(newRadius[1], \",\").concat(newRadius[1], \",0,0,\").concat(clockWise, \",\\n \").concat(x + width, \",\").concat(y + ySign * newRadius[1]);\n }\n\n path += \"L \".concat(x + width, \",\").concat(y + height - ySign * newRadius[2]);\n\n if (newRadius[2] > 0) {\n path += \"A \".concat(newRadius[2], \",\").concat(newRadius[2], \",0,0,\").concat(clockWise, \",\\n \").concat(x + width - xSign * newRadius[2], \",\").concat(y + height);\n }\n\n path += \"L \".concat(x + xSign * newRadius[3], \",\").concat(y + height);\n\n if (newRadius[3] > 0) {\n path += \"A \".concat(newRadius[3], \",\").concat(newRadius[3], \",0,0,\").concat(clockWise, \",\\n \").concat(x, \",\").concat(y + height - ySign * newRadius[3]);\n }\n\n path += 'Z';\n } else if (maxRadius > 0 && radius === +radius && radius > 0) {\n var _newRadius = Math.min(maxRadius, radius);\n\n path = \"M \".concat(x, \",\").concat(y + ySign * _newRadius, \"\\n A \").concat(_newRadius, \",\").concat(_newRadius, \",0,0,\").concat(clockWise, \",\").concat(x + xSign * _newRadius, \",\").concat(y, \"\\n L \").concat(x + width - xSign * _newRadius, \",\").concat(y, \"\\n A \").concat(_newRadius, \",\").concat(_newRadius, \",0,0,\").concat(clockWise, \",\").concat(x + width, \",\").concat(y + ySign * _newRadius, \"\\n L \").concat(x + width, \",\").concat(y + height - ySign * _newRadius, \"\\n A \").concat(_newRadius, \",\").concat(_newRadius, \",0,0,\").concat(clockWise, \",\").concat(x + width - xSign * _newRadius, \",\").concat(y + height, \"\\n L \").concat(x + xSign * _newRadius, \",\").concat(y + height, \"\\n A \").concat(_newRadius, \",\").concat(_newRadius, \",0,0,\").concat(clockWise, \",\").concat(x, \",\").concat(y + height - ySign * _newRadius, \" Z\");\n } else {\n path = \"M \".concat(x, \",\").concat(y, \" h \").concat(width, \" v \").concat(height, \" h \").concat(-width, \" Z\");\n }\n\n return path;\n};\n\nvar Rectangle = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(Rectangle, _Component);\n\n function Rectangle() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, Rectangle);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Rectangle)).call.apply(_getPrototypeOf2, [this].concat(args)));\n _this.state = {\n totalLength: -1\n };\n return _this;\n }\n\n _createClass(Rectangle, [{\n key: \"componentDidMount\",\n\n /* eslint-disable react/no-did-mount-set-state */\n value: function componentDidMount() {\n if (this.node && this.node.getTotalLength) {\n try {\n var totalLength = this.node.getTotalLength();\n\n if (totalLength) {\n this.setState({\n totalLength: totalLength\n });\n }\n } catch (err) {// calculate total length error\n }\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$props = this.props,\n x = _this$props.x,\n y = _this$props.y,\n width = _this$props.width,\n height = _this$props.height,\n radius = _this$props.radius,\n className = _this$props.className;\n var totalLength = this.state.totalLength;\n var _this$props2 = this.props,\n animationEasing = _this$props2.animationEasing,\n animationDuration = _this$props2.animationDuration,\n animationBegin = _this$props2.animationBegin,\n isAnimationActive = _this$props2.isAnimationActive,\n isUpdateAnimationActive = _this$props2.isUpdateAnimationActive;\n\n if (x !== +x || y !== +y || width !== +width || height !== +height || width === 0 || height === 0) {\n return null;\n }\n\n var layerClass = classNames('recharts-rectangle', className);\n\n if (!isUpdateAnimationActive) {\n return React.createElement(\"path\", _extends({}, getPresentationAttributes(this.props), filterEventAttributes(this.props), {\n className: layerClass,\n d: getRectangePath(x, y, width, height, radius)\n }));\n }\n\n return React.createElement(Animate, {\n canBegin: totalLength > 0,\n from: {\n width: width,\n height: height,\n x: x,\n y: y\n },\n to: {\n width: width,\n height: height,\n x: x,\n y: y\n },\n duration: animationDuration,\n animationEasing: animationEasing,\n isActive: isUpdateAnimationActive\n }, function (_ref) {\n var currWidth = _ref.width,\n currHeight = _ref.height,\n currX = _ref.x,\n currY = _ref.y;\n return React.createElement(Animate, {\n canBegin: totalLength > 0,\n from: \"0px \".concat(totalLength === -1 ? 1 : totalLength, \"px\"),\n to: \"\".concat(totalLength, \"px 0px\"),\n attributeName: \"strokeDasharray\",\n begin: animationBegin,\n duration: animationDuration,\n isActive: isAnimationActive,\n easing: animationEasing\n }, React.createElement(\"path\", _extends({}, getPresentationAttributes(_this2.props), filterEventAttributes(_this2.props), {\n className: layerClass,\n d: getRectangePath(currX, currY, currWidth, currHeight, radius),\n ref: function ref(node) {\n _this2.node = node;\n }\n })));\n });\n }\n }]);\n\n return Rectangle;\n}(Component), _class2.displayName = 'Rectangle', _class2.propTypes = _objectSpread({}, PRESENTATION_ATTRIBUTES, EVENT_ATTRIBUTES, {\n className: PropTypes.string,\n x: PropTypes.number,\n y: PropTypes.number,\n width: PropTypes.number,\n height: PropTypes.number,\n radius: PropTypes.oneOfType([PropTypes.number, PropTypes.array]),\n isAnimationActive: PropTypes.bool,\n isUpdateAnimationActive: PropTypes.bool,\n animationBegin: PropTypes.number,\n animationDuration: PropTypes.number,\n animationEasing: PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear'])\n}), _class2.defaultProps = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n // The radius of border\n // The radius of four corners when radius is a number\n // The radius of left-top, right-top, right-bottom, left-bottom when radius is an array\n radius: 0,\n isAnimationActive: false,\n isUpdateAnimationActive: false,\n animationBegin: 0,\n animationDuration: 1500,\n animationEasing: 'ease'\n}, _temp)) || _class;\n\nexport default Rectangle;",
"var _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview Sector\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport pureRender from '../util/PureRender';\nimport { PRESENTATION_ATTRIBUTES, getPresentationAttributes, filterEventAttributes } from '../util/ReactUtils';\nimport { polarToCartesian, RADIAN } from '../util/PolarUtils';\nimport { getPercentValue, mathSign } from '../util/DataUtils';\n\nvar getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {\n var sign = mathSign(endAngle - startAngle);\n var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);\n return sign * deltaAngle;\n};\n\nvar getTangentCircle = function getTangentCircle(_ref) {\n var cx = _ref.cx,\n cy = _ref.cy,\n radius = _ref.radius,\n angle = _ref.angle,\n sign = _ref.sign,\n isExternal = _ref.isExternal,\n cornerRadius = _ref.cornerRadius;\n var centerRadius = cornerRadius * (isExternal ? 1 : -1) + radius;\n var theta = Math.asin(cornerRadius / centerRadius) / RADIAN;\n var centerAngle = angle + sign * theta;\n var center = polarToCartesian(cx, cy, centerRadius, centerAngle); // The coordinate of point which is tangent to the circle\n\n var circleTangency = polarToCartesian(cx, cy, radius, centerAngle); // The coordinate of point which is tangent to the radius line\n\n var lineTangency = polarToCartesian(cx, cy, centerRadius * Math.cos(theta * RADIAN), angle);\n return {\n center: center,\n circleTangency: circleTangency,\n lineTangency: lineTangency,\n theta: theta\n };\n};\n\nvar getSectorPath = function getSectorPath(_ref2) {\n var cx = _ref2.cx,\n cy = _ref2.cy,\n innerRadius = _ref2.innerRadius,\n outerRadius = _ref2.outerRadius,\n startAngle = _ref2.startAngle,\n endAngle = _ref2.endAngle;\n var angle = getDeltaAngle(startAngle, endAngle); // When the angle of sector equals to 360, star point and end point coincide\n\n var tempEndAngle = startAngle + angle;\n var outerStartPoint = polarToCartesian(cx, cy, outerRadius, startAngle);\n var outerEndPoint = polarToCartesian(cx, cy, outerRadius, tempEndAngle);\n var path = \"M \".concat(outerStartPoint.x, \",\").concat(outerStartPoint.y, \"\\n A \").concat(outerRadius, \",\").concat(outerRadius, \",0,\\n \").concat(+(Math.abs(angle) > 180), \",\").concat(+(startAngle > tempEndAngle), \",\\n \").concat(outerEndPoint.x, \",\").concat(outerEndPoint.y, \"\\n \");\n\n if (innerRadius > 0) {\n var innerStartPoint = polarToCartesian(cx, cy, innerRadius, startAngle);\n var innerEndPoint = polarToCartesian(cx, cy, innerRadius, tempEndAngle);\n path += \"L \".concat(innerEndPoint.x, \",\").concat(innerEndPoint.y, \"\\n A \").concat(innerRadius, \",\").concat(innerRadius, \",0,\\n \").concat(+(Math.abs(angle) > 180), \",\").concat(+(startAngle <= tempEndAngle), \",\\n \").concat(innerStartPoint.x, \",\").concat(innerStartPoint.y, \" Z\");\n } else {\n path += \"L \".concat(cx, \",\").concat(cy, \" Z\");\n }\n\n return path;\n};\n\nvar getSectorWithCorner = function getSectorWithCorner(_ref3) {\n var cx = _ref3.cx,\n cy = _ref3.cy,\n innerRadius = _ref3.innerRadius,\n outerRadius = _ref3.outerRadius,\n cornerRadius = _ref3.cornerRadius,\n startAngle = _ref3.startAngle,\n endAngle = _ref3.endAngle;\n var sign = mathSign(endAngle - startAngle);\n\n var _getTangentCircle = getTangentCircle({\n cx: cx,\n cy: cy,\n radius: outerRadius,\n angle: startAngle,\n sign: sign,\n cornerRadius: cornerRadius\n }),\n soct = _getTangentCircle.circleTangency,\n solt = _getTangentCircle.lineTangency,\n sot = _getTangentCircle.theta;\n\n var _getTangentCircle2 = getTangentCircle({\n cx: cx,\n cy: cy,\n radius: outerRadius,\n angle: endAngle,\n sign: -sign,\n cornerRadius: cornerRadius\n }),\n eoct = _getTangentCircle2.circleTangency,\n eolt = _getTangentCircle2.lineTangency,\n eot = _getTangentCircle2.theta;\n\n var outerArcAngle = Math.abs(startAngle - endAngle) - sot - eot;\n\n if (outerArcAngle < 0) {\n return getSectorPath({\n cx: cx,\n cy: cy,\n innerRadius: innerRadius,\n outerRadius: outerRadius,\n startAngle: startAngle,\n endAngle: endAngle\n });\n }\n\n var path = \"M \".concat(solt.x, \",\").concat(solt.y, \"\\n A\").concat(cornerRadius, \",\").concat(cornerRadius, \",0,0,\").concat(+(sign < 0), \",\").concat(soct.x, \",\").concat(soct.y, \"\\n A\").concat(outerRadius, \",\").concat(outerRadius, \",0,\").concat(+(outerArcAngle > 180), \",\").concat(+(sign < 0), \",\").concat(eoct.x, \",\").concat(eoct.y, \"\\n A\").concat(cornerRadius, \",\").concat(cornerRadius, \",0,0,\").concat(+(sign < 0), \",\").concat(eolt.x, \",\").concat(eolt.y, \"\\n \");\n\n if (innerRadius > 0) {\n var _getTangentCircle3 = getTangentCircle({\n cx: cx,\n cy: cy,\n radius: innerRadius,\n angle: startAngle,\n sign: sign,\n isExternal: true,\n cornerRadius: cornerRadius\n }),\n sict = _getTangentCircle3.circleTangency,\n silt = _getTangentCircle3.lineTangency,\n sit = _getTangentCircle3.theta;\n\n var _getTangentCircle4 = getTangentCircle({\n cx: cx,\n cy: cy,\n radius: innerRadius,\n angle: endAngle,\n sign: -sign,\n isExternal: true,\n cornerRadius: cornerRadius\n }),\n eict = _getTangentCircle4.circleTangency,\n eilt = _getTangentCircle4.lineTangency,\n eit = _getTangentCircle4.theta;\n\n var innerArcAngle = Math.abs(startAngle - endAngle) - sit - eit;\n\n if (innerArcAngle < 0) {\n return \"\".concat(path, \"L\").concat(cx, \",\").concat(cy, \"Z\");\n }\n\n path += \"L\".concat(eilt.x, \",\").concat(eilt.y, \"\\n A\").concat(cornerRadius, \",\").concat(cornerRadius, \",0,0,\").concat(+(sign < 0), \",\").concat(eict.x, \",\").concat(eict.y, \"\\n A\").concat(innerRadius, \",\").concat(innerRadius, \",0,\").concat(+(innerArcAngle > 180), \",\").concat(+(sign > 0), \",\").concat(sict.x, \",\").concat(sict.y, \"\\n A\").concat(cornerRadius, \",\").concat(cornerRadius, \",0,0,\").concat(+(sign < 0), \",\").concat(silt.x, \",\").concat(silt.y, \"Z\");\n } else {\n path += \"L\".concat(cx, \",\").concat(cy, \"Z\");\n }\n\n return path;\n};\n\nvar Sector = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(Sector, _Component);\n\n function Sector() {\n _classCallCheck(this, Sector);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(Sector).apply(this, arguments));\n }\n\n _createClass(Sector, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n cx = _this$props.cx,\n cy = _this$props.cy,\n innerRadius = _this$props.innerRadius,\n outerRadius = _this$props.outerRadius,\n cornerRadius = _this$props.cornerRadius,\n startAngle = _this$props.startAngle,\n endAngle = _this$props.endAngle,\n className = _this$props.className;\n\n if (outerRadius < innerRadius || startAngle === endAngle) {\n return null;\n }\n\n var layerClass = classNames('recharts-sector', className);\n var deltaRadius = outerRadius - innerRadius;\n var cr = getPercentValue(cornerRadius, deltaRadius, 0, true);\n var path;\n\n if (cr > 0 && Math.abs(startAngle - endAngle) < 360) {\n path = getSectorWithCorner({\n cx: cx,\n cy: cy,\n innerRadius: innerRadius,\n outerRadius: outerRadius,\n cornerRadius: Math.min(cr, deltaRadius / 2),\n startAngle: startAngle,\n endAngle: endAngle\n });\n } else {\n path = getSectorPath({\n cx: cx,\n cy: cy,\n innerRadius: innerRadius,\n outerRadius: outerRadius,\n startAngle: startAngle,\n endAngle: endAngle\n });\n }\n\n return React.createElement(\"path\", _extends({}, getPresentationAttributes(this.props), filterEventAttributes(this.props), {\n className: layerClass,\n d: path\n }));\n }\n }]);\n\n return Sector;\n}(Component), _class2.displayName = 'Sector', _class2.propTypes = _objectSpread({}, PRESENTATION_ATTRIBUTES, {\n className: PropTypes.string,\n cx: PropTypes.number,\n cy: PropTypes.number,\n innerRadius: PropTypes.number,\n outerRadius: PropTypes.number,\n startAngle: PropTypes.number,\n endAngle: PropTypes.number,\n cornerRadius: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n}), _class2.defaultProps = {\n cx: 0,\n cy: 0,\n innerRadius: 0,\n outerRadius: 0,\n startAngle: 0,\n endAngle: 0,\n cornerRadius: 0\n}, _temp)) || _class;\n\nexport default Sector;",
"var _class, _class2, _temp;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview Curve\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { symbol as shapeSymbol, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye } from 'd3-shape';\nimport classNames from 'classnames';\nimport pureRender from '../util/PureRender';\nimport { PRESENTATION_ATTRIBUTES, getPresentationAttributes, filterEventAttributes } from '../util/ReactUtils';\nvar SYMBOL_FACTORIES = {\n symbolCircle: symbolCircle,\n symbolCross: symbolCross,\n symbolDiamond: symbolDiamond,\n symbolSquare: symbolSquare,\n symbolStar: symbolStar,\n symbolTriangle: symbolTriangle,\n symbolWye: symbolWye\n};\nvar RADIAN = Math.PI / 180;\n\nvar getSymbolFactory = function getSymbolFactory(type) {\n var name = \"symbol\".concat(type.slice(0, 1).toUpperCase()).concat(type.slice(1));\n return SYMBOL_FACTORIES[name] || symbolCircle;\n};\n\nvar calculateAreaSize = function calculateAreaSize(size, sizeType, type) {\n if (sizeType === 'area') {\n return size;\n }\n\n switch (type) {\n case 'cross':\n return 5 * size * size / 9;\n\n case 'diamond':\n return 0.5 * size * size / Math.sqrt(3);\n\n case 'square':\n return size * size;\n\n case 'star':\n {\n var angle = 18 * RADIAN;\n return 1.25 * size * size * (Math.tan(angle) - Math.tan(angle * 2) * Math.pow(Math.tan(angle), 2));\n }\n\n case 'triangle':\n return Math.sqrt(3) * size * size / 4;\n\n case 'wye':\n return (21 - 10 * Math.sqrt(3)) * size * size / 8;\n\n default:\n return Math.PI * size * size / 4;\n }\n};\n\nvar Symbols = pureRender(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(Symbols, _Component);\n\n function Symbols() {\n _classCallCheck(this, Symbols);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(Symbols).apply(this, arguments));\n }\n\n _createClass(Symbols, [{\n key: \"getPath\",\n\n /**\n * Calculate the path of curve\n * @return {String} path\n */\n value: function getPath() {\n var _this$props = this.props,\n size = _this$props.size,\n sizeType = _this$props.sizeType,\n type = _this$props.type;\n var symbolFactory = getSymbolFactory(type);\n var symbol = shapeSymbol().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));\n return symbol();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n className = _this$props2.className,\n cx = _this$props2.cx,\n cy = _this$props2.cy,\n size = _this$props2.size;\n\n if (cx === +cx && cy === +cy && size === +size) {\n return React.createElement(\"path\", _extends({}, getPresentationAttributes(this.props), filterEventAttributes(this.props), {\n className: classNames('recharts-symbols', className),\n transform: \"translate(\".concat(cx, \", \").concat(cy, \")\"),\n d: this.getPath()\n }));\n }\n\n return null;\n }\n }]);\n\n return Symbols;\n}(Component), _class2.displayName = 'Symbols', _class2.propTypes = _objectSpread({}, PRESENTATION_ATTRIBUTES, {\n className: PropTypes.string,\n type: PropTypes.oneOf(['circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye']),\n cx: PropTypes.number,\n cy: PropTypes.number,\n size: PropTypes.number,\n sizeType: PropTypes.oneOf(['area', 'diameter'])\n}), _class2.defaultProps = {\n type: 'circle',\n size: 64,\n sizeType: 'area'\n}, _temp)) || _class;\n\nexport default Symbols;",
"import _every from \"lodash/every\";\nimport _mapValues from \"lodash/mapValues\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { getTicksOfScale, parseScale, checkDomainOfScale, getBandSizeOfAxis } from './ChartUtils';\n/**\n * Calculate the scale function, position, width, height of axes\n * @param {Object} props Latest props\n * @param {Object} axisMap The configuration of axes\n * @param {Object} offset The offset of main part in the svg element\n * @param {String} axisType The type of axes, x-axis or y-axis\n * @param {String} chartName The name of chart\n * @return {Object} Configuration\n */\n\nexport var formatAxisMap = function formatAxisMap(props, axisMap, offset, axisType, chartName) {\n var width = props.width,\n height = props.height,\n layout = props.layout;\n var ids = Object.keys(axisMap);\n var steps = {\n left: offset.left,\n leftMirror: offset.left,\n right: width - offset.right,\n rightMirror: width - offset.right,\n top: offset.top,\n topMirror: offset.top,\n bottom: height - offset.bottom,\n bottomMirror: height - offset.bottom\n };\n return ids.reduce(function (result, id) {\n var axis = axisMap[id];\n var orientation = axis.orientation,\n domain = axis.domain,\n _axis$padding = axis.padding,\n padding = _axis$padding === void 0 ? {} : _axis$padding,\n mirror = axis.mirror,\n reversed = axis.reversed;\n var offsetKey = \"\".concat(orientation).concat(mirror ? 'Mirror' : '');\n var range, x, y, needSpace;\n\n if (axisType === 'xAxis') {\n range = [offset.left + (padding.left || 0), offset.left + offset.width - (padding.right || 0)];\n } else if (axisType === 'yAxis') {\n range = layout === 'horizontal' ? [offset.top + offset.height - (padding.bottom || 0), offset.top + (padding.top || 0)] : [offset.top + (padding.top || 0), offset.top + offset.height - (padding.bottom || 0)];\n } else {\n range = axis.range;\n }\n\n if (reversed) {\n range = [range[1], range[0]];\n }\n\n var _parseScale = parseScale(axis, chartName),\n scale = _parseScale.scale,\n realScaleType = _parseScale.realScaleType;\n\n scale.domain(domain).range(range);\n checkDomainOfScale(scale);\n var ticks = getTicksOfScale(scale, _objectSpread({}, axis, {\n realScaleType: realScaleType\n }));\n\n if (axisType === 'xAxis') {\n needSpace = orientation === 'top' && !mirror || orientation === 'bottom' && mirror;\n x = offset.left;\n y = steps[offsetKey] - needSpace * axis.height;\n } else if (axisType === 'yAxis') {\n needSpace = orientation === 'left' && !mirror || orientation === 'right' && mirror;\n x = steps[offsetKey] - needSpace * axis.width;\n y = offset.top;\n }\n\n var finalAxis = _objectSpread({}, axis, ticks, {\n realScaleType: realScaleType,\n x: x,\n y: y,\n scale: scale,\n width: axisType === 'xAxis' ? offset.width : axis.width,\n height: axisType === 'yAxis' ? offset.height : axis.height\n });\n\n finalAxis.bandSize = getBandSizeOfAxis(finalAxis, ticks);\n\n if (!axis.hide && axisType === 'xAxis') {\n steps[offsetKey] += (needSpace ? -1 : 1) * finalAxis.height;\n } else if (!axis.hide) {\n steps[offsetKey] += (needSpace ? -1 : 1) * finalAxis.width;\n }\n\n return _objectSpread({}, result, _defineProperty({}, id, finalAxis));\n }, {});\n};\nexport var rectWithPoints = function rectWithPoints(_ref, _ref2) {\n var x1 = _ref.x,\n y1 = _ref.y;\n var x2 = _ref2.x,\n y2 = _ref2.y;\n return {\n x: Math.min(x1, x2),\n y: Math.min(y1, y2),\n width: Math.abs(x2 - x1),\n height: Math.abs(y2 - y1)\n };\n};\n/**\n * Compute the x, y, width, and height of a box from two reference points.\n * @param {Object} coords x1, x2, y1, and y2\n * @return {Object} object\n */\n\nexport var rectWithCoords = function rectWithCoords(_ref3) {\n var x1 = _ref3.x1,\n y1 = _ref3.y1,\n x2 = _ref3.x2,\n y2 = _ref3.y2;\n return rectWithPoints({\n x: x1,\n y: y1\n }, {\n x: x2,\n y: y2\n });\n};\nexport var ScaleHelper =\n/*#__PURE__*/\nfunction () {\n _createClass(ScaleHelper, null, [{\n key: \"create\",\n value: function create(obj) {\n return new ScaleHelper(obj);\n }\n }]);\n\n function ScaleHelper(scale) {\n _classCallCheck(this, ScaleHelper);\n\n this.scale = scale;\n }\n\n _createClass(ScaleHelper, [{\n key: \"apply\",\n value: function apply(value) {\n var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n bandAware = _ref4.bandAware;\n\n if (value === undefined) {\n return undefined;\n }\n\n if (bandAware) {\n var offset = this.bandwidth ? this.bandwidth() / 2 : 0;\n return this.scale(value) + offset;\n }\n\n return this.scale(value);\n }\n }, {\n key: \"isInRange\",\n value: function isInRange(value) {\n var range = this.range();\n var first = range[0];\n var last = range[range.length - 1];\n return first <= last ? value >= first && value <= last : value >= last && value <= first;\n }\n }, {\n key: \"domain\",\n get: function get() {\n return this.scale.domain;\n }\n }, {\n key: \"range\",\n get: function get() {\n return this.scale.range;\n }\n }, {\n key: \"rangeMin\",\n get: function get() {\n return this.range()[0];\n }\n }, {\n key: \"rangeMax\",\n get: function get() {\n return this.range()[1];\n }\n }, {\n key: \"bandwidth\",\n get: function get() {\n return this.scale.bandwidth;\n }\n }]);\n\n return ScaleHelper;\n}();\nScaleHelper.EPS = 1e-4;\nexport var LabeledScaleHelper =\n/*#__PURE__*/\nfunction () {\n _createClass(LabeledScaleHelper, null, [{\n key: \"create\",\n value: function create(obj) {\n return new this(obj);\n }\n }]);\n\n function LabeledScaleHelper(scales) {\n _classCallCheck(this, LabeledScaleHelper);\n\n this.scales = _mapValues(scales, ScaleHelper.create);\n Object.assign(this, this.scales);\n }\n\n _createClass(LabeledScaleHelper, [{\n key: \"apply\",\n value: function apply(coords) {\n var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n bandAware = _ref5.bandAware;\n\n var scales = this.scales;\n return _mapValues(coords, function (value, label) {\n return scales[label].apply(value, {\n bandAware: bandAware\n });\n });\n }\n }, {\n key: \"isInRange\",\n value: function isInRange(coords) {\n var scales = this.scales;\n return _every(coords, function (value, label) {\n return scales[label].isInRange(value);\n });\n }\n }]);\n\n return LabeledScaleHelper;\n}();",
"import _isEqual from \"lodash/isEqual\";\nimport _sortBy from \"lodash/sortBy\";\nimport _isNaN from \"lodash/isNaN\";\nimport _isString from \"lodash/isString\";\nimport _max from \"lodash/max\";\nimport _min from \"lodash/min\";\nimport _isArray from \"lodash/isArray\";\nimport _flatMap from \"lodash/flatMap\";\nimport _isFunction from \"lodash/isFunction\";\nimport _get from \"lodash/get\";\nimport _isNil from \"lodash/isNil\";\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { getNiceTickValues, getTickValuesFixedDomain } from 'recharts-scale';\nimport * as d3Scales from 'd3-scale';\nimport { stack as shapeStack, stackOrderNone, stackOffsetExpand, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle } from 'd3-shape';\nimport { isNumOrStr, uniqueId, isNumber, getPercentValue, mathSign, findEntryInArray } from './DataUtils';\nimport ReferenceDot from '../cartesian/ReferenceDot';\nimport ReferenceLine from '../cartesian/ReferenceLine';\nimport ReferenceArea from '../cartesian/ReferenceArea';\nimport ErrorBar from '../cartesian/ErrorBar';\nimport Legend from '../component/Legend';\nimport { findAllByType, findChildByType, getDisplayName } from './ReactUtils';\nexport var getValueByDataKey = function getValueByDataKey(obj, dataKey, defaultValue) {\n if (_isNil(obj) || _isNil(dataKey)) {\n return defaultValue;\n }\n\n if (isNumOrStr(dataKey)) {\n return _get(obj, dataKey, defaultValue);\n }\n\n if (_isFunction(dataKey)) {\n return dataKey(obj);\n }\n\n return defaultValue;\n};\n/**\n * Get domain of data by key\n * @param {Array} data The data displayed in the chart\n * @param {String} key The unique key of a group of data\n * @param {String} type The type of axis\n * @param {Boolean} filterNil Whether or not filter nil values\n * @return {Array} Domain of data\n */\n\nexport var getDomainOfDataByKey = function getDomainOfDataByKey(data, key, type, filterNil) {\n var flattenData = _flatMap(data, function (entry) {\n return getValueByDataKey(entry, key);\n });\n\n if (type === 'number') {\n var domain = flattenData.filter(function (entry) {\n return isNumber(entry) || parseFloat(entry, 10);\n });\n return [Math.min.apply(null, domain), Math.max.apply(null, domain)];\n }\n\n var validateData = filterNil ? flattenData.filter(function (entry) {\n return !_isNil(entry);\n }) : flattenData;\n return validateData.map(function (entry) {\n return isNumOrStr(entry) ? entry : '';\n });\n};\nexport var calculateActiveTickIndex = function calculateActiveTickIndex(coordinate, ticks, unsortedTicks, axis) {\n var index = -1;\n var len = ticks.length;\n\n if (len > 1) {\n if (axis && axis.axisType === 'angleAxis' && Math.abs(Math.abs(axis.range[1] - axis.range[0]) - 360) <= 1e-6) {\n var range = axis.range; // ticks are distributed in a circle\n\n for (var i = 0; i < len; i++) {\n var before = i > 0 ? unsortedTicks[i - 1].coordinate : unsortedTicks[len - 1].coordinate;\n var cur = unsortedTicks[i].coordinate;\n var after = i >= len - 1 ? unsortedTicks[0].coordinate : unsortedTicks[i + 1].coordinate;\n var sameDirectionCoord = void 0;\n\n if (mathSign(cur - before) !== mathSign(after - cur)) {\n var diffInterval = [];\n\n if (mathSign(after - cur) === mathSign(range[1] - range[0])) {\n sameDirectionCoord = after;\n var curInRange = cur + range[1] - range[0];\n diffInterval[0] = Math.min(curInRange, (curInRange + before) / 2);\n diffInterval[1] = Math.max(curInRange, (curInRange + before) / 2);\n } else {\n sameDirectionCoord = before;\n var afterInRange = after + range[1] - range[0];\n diffInterval[0] = Math.min(cur, (afterInRange + cur) / 2);\n diffInterval[1] = Math.max(cur, (afterInRange + cur) / 2);\n }\n\n var sameInterval = [Math.min(cur, (sameDirectionCoord + cur) / 2), Math.max(cur, (sameDirectionCoord + cur) / 2)];\n\n if (coordinate > sameInterval[0] && coordinate <= sameInterval[1] || coordinate >= diffInterval[0] && coordinate <= diffInterval[1]) {\n index = unsortedTicks[i].index;\n break;\n }\n } else {\n var min = Math.min(before, after);\n var max = Math.max(before, after);\n\n if (coordinate > (min + cur) / 2 && coordinate <= (max + cur) / 2) {\n index = unsortedTicks[i].index;\n break;\n }\n }\n }\n } else {\n // ticks are distributed in a single direction\n for (var _i = 0; _i < len; _i++) {\n if (_i === 0 && coordinate <= (ticks[_i].coordinate + ticks[_i + 1].coordinate) / 2 || _i > 0 && _i < len - 1 && coordinate > (ticks[_i].coordinate + ticks[_i - 1].coordinate) / 2 && coordinate <= (ticks[_i].coordinate + ticks[_i + 1].coordinate) / 2 || _i === len - 1 && coordinate > (ticks[_i].coordinate + ticks[_i - 1].coordinate) / 2) {\n index = ticks[_i].index;\n break;\n }\n }\n }\n } else {\n index = 0;\n }\n\n return index;\n};\n/**\n * Get the main color of each graphic item\n * @param {ReactElement} item A graphic item\n * @return {String} Color\n */\n\nexport var getMainColorOfGraphicItem = function getMainColorOfGraphicItem(item) {\n var displayName = item.type.displayName;\n var result;\n\n switch (displayName) {\n case 'Line':\n case 'Area':\n case 'Radar':\n result = item.props.stroke;\n break;\n\n default:\n result = item.props.fill;\n break;\n }\n\n return result;\n};\nexport var getLegendProps = function getLegendProps(_ref) {\n var children = _ref.children,\n formatedGraphicalItems = _ref.formatedGraphicalItems,\n legendWidth = _ref.legendWidth,\n legendContent = _ref.legendContent;\n var legendItem = findChildByType(children, Legend);\n\n if (!legendItem) {\n return null;\n }\n\n var legendData;\n\n if (legendItem.props && legendItem.props.payload) {\n legendData = legendItem.props && legendItem.props.payload;\n } else if (legendContent === 'children') {\n legendData = (formatedGraphicalItems || []).reduce(function (result, _ref2) {\n var item = _ref2.item,\n props = _ref2.props;\n var data = props.sectors || props.data || [];\n return result.concat(data.map(function (entry) {\n return {\n type: legendItem.props.iconType || item.props.legendType,\n value: entry.name,\n color: entry.fill,\n payload: entry\n };\n }));\n }, []);\n } else {\n legendData = (formatedGraphicalItems || []).map(function (_ref3) {\n var item = _ref3.item;\n var _item$props = item.props,\n dataKey = _item$props.dataKey,\n name = _item$props.name,\n legendType = _item$props.legendType,\n hide = _item$props.hide;\n return {\n inactive: hide,\n dataKey: dataKey,\n type: legendItem.props.iconType || legendType || 'square',\n color: getMainColorOfGraphicItem(item),\n value: name || dataKey,\n payload: item.props\n };\n });\n }\n\n return _objectSpread({}, legendItem.props, Legend.getWithHeight(legendItem, legendWidth), {\n payload: legendData,\n item: legendItem\n });\n};\n/**\n * Calculate the size of all groups for stacked bar graph\n * @param {Object} stackGroups The items grouped by axisId and stackId\n * @return {Object} The size of all groups\n */\n\nexport var getBarSizeList = function getBarSizeList(_ref4) {\n var globalSize = _ref4.barSize,\n _ref4$stackGroups = _ref4.stackGroups,\n stackGroups = _ref4$stackGroups === void 0 ? {} : _ref4$stackGroups;\n\n if (!stackGroups) {\n return {};\n }\n\n var result = {};\n var numericAxisIds = Object.keys(stackGroups);\n\n for (var i = 0, len = numericAxisIds.length; i < len; i++) {\n var sgs = stackGroups[numericAxisIds[i]].stackGroups;\n var stackIds = Object.keys(sgs);\n\n for (var j = 0, sLen = stackIds.length; j < sLen; j++) {\n var _sgs$stackIds$j = sgs[stackIds[j]],\n items = _sgs$stackIds$j.items,\n cateAxisId = _sgs$stackIds$j.cateAxisId;\n var barItems = items.filter(function (item) {\n return getDisplayName(item.type).indexOf('Bar') >= 0;\n });\n\n if (barItems && barItems.length) {\n var selfSize = barItems[0].props.barSize;\n var cateId = barItems[0].props[cateAxisId];\n\n if (!result[cateId]) {\n result[cateId] = [];\n }\n\n result[cateId].push({\n item: barItems[0],\n stackList: barItems.slice(1),\n barSize: _isNil(selfSize) ? globalSize : selfSize\n });\n }\n }\n }\n\n return result;\n};\n/**\n * Calculate the size of each bar and the gap between two bars\n * @param {Number} bandSize The size of each category\n * @param {sizeList} sizeList The size of all groups\n * @param {maxBarSize} maxBarSize The maximum size of bar\n * @return {Number} The size of each bar and the gap between two bars\n */\n\nexport var getBarPosition = function getBarPosition(_ref5) {\n var barGap = _ref5.barGap,\n barCategoryGap = _ref5.barCategoryGap,\n bandSize = _ref5.bandSize,\n _ref5$sizeList = _ref5.sizeList,\n sizeList = _ref5$sizeList === void 0 ? [] : _ref5$sizeList,\n maxBarSize = _ref5.maxBarSize;\n var len = sizeList.length;\n if (len < 1) return null;\n var realBarGap = getPercentValue(barGap, bandSize, 0, true);\n var result; // whether or not is barSize setted by user\n\n if (sizeList[0].barSize === +sizeList[0].barSize) {\n var useFull = false;\n var fullBarSize = bandSize / len;\n var sum = sizeList.reduce(function (res, entry) {\n return res + entry.barSize || 0;\n }, 0);\n sum += (len - 1) * realBarGap;\n\n if (sum >= bandSize) {\n sum -= (len - 1) * realBarGap;\n realBarGap = 0;\n }\n\n if (sum >= bandSize && fullBarSize > 0) {\n useFull = true;\n fullBarSize *= 0.9;\n sum = len * fullBarSize;\n }\n\n var offset = (bandSize - sum) / 2 >> 0;\n var prev = {\n offset: offset - realBarGap,\n size: 0\n };\n result = sizeList.reduce(function (res, entry) {\n var newRes = _toConsumableArray(res).concat([{\n item: entry.item,\n position: {\n offset: prev.offset + prev.size + realBarGap,\n size: useFull ? fullBarSize : entry.barSize\n }\n }]);\n\n prev = newRes[newRes.length - 1].position;\n\n if (entry.stackList && entry.stackList.length) {\n entry.stackList.forEach(function (item) {\n newRes.push({\n item: item,\n position: prev\n });\n });\n }\n\n return newRes;\n }, []);\n } else {\n var _offset = getPercentValue(barCategoryGap, bandSize, 0, true);\n\n if (bandSize - 2 * _offset - (len - 1) * realBarGap <= 0) {\n realBarGap = 0;\n }\n\n var originalSize = (bandSize - 2 * _offset - (len - 1) * realBarGap) / len;\n\n if (originalSize > 1) {\n originalSize >>= 0;\n }\n\n var size = maxBarSize === +maxBarSize ? Math.min(originalSize, maxBarSize) : originalSize;\n result = sizeList.reduce(function (res, entry, i) {\n var newRes = _toConsumableArray(res).concat([{\n item: entry.item,\n position: {\n offset: _offset + (originalSize + realBarGap) * i + (originalSize - size) / 2,\n size: size\n }\n }]);\n\n if (entry.stackList && entry.stackList.length) {\n entry.stackList.forEach(function (item) {\n newRes.push({\n item: item,\n position: newRes[newRes.length - 1].position\n });\n });\n }\n\n return newRes;\n }, []);\n }\n\n return result;\n};\nexport var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, legendBox) {\n var children = props.children,\n width = props.width,\n height = props.height,\n margin = props.margin;\n var legendWidth = width - (margin.left || 0) - (margin.right || 0);\n var legendHeight = height - (margin.top || 0) - (margin.bottom || 0);\n var legendProps = getLegendProps({\n children: children,\n items: items,\n legendWidth: legendWidth,\n legendHeight: legendHeight\n });\n var newOffset = offset;\n\n if (legendProps) {\n var box = legendBox || {};\n var align = legendProps.align,\n verticalAlign = legendProps.verticalAlign,\n layout = legendProps.layout;\n\n if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'center') && isNumber(offset[align])) {\n newOffset = _objectSpread({}, offset, _defineProperty({}, align, newOffset[align] + (box.width || 0)));\n }\n\n if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {\n newOffset = _objectSpread({}, offset, _defineProperty({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));\n }\n }\n\n return newOffset;\n};\nexport var getDomainOfErrorBars = function getDomainOfErrorBars(data, item, dataKey, axisType) {\n var children = item.props.children;\n var errorBars = findAllByType(children, ErrorBar).filter(function (errorBarChild) {\n var direction = errorBarChild.props.direction;\n return _isNil(direction) || _isNil(axisType) ? true : axisType.indexOf(direction) >= 0;\n });\n\n if (errorBars && errorBars.length) {\n var keys = errorBars.map(function (errorBarChild) {\n return errorBarChild.props.dataKey;\n });\n return data.reduce(function (result, entry) {\n var entryValue = getValueByDataKey(entry, dataKey, 0);\n var mainValue = _isArray(entryValue) ? [_min(entryValue), _max(entryValue)] : [entryValue, entryValue];\n var errorDomain = keys.reduce(function (prevErrorArr, k) {\n var errorValue = getValueByDataKey(entry, k, 0);\n var lowerValue = mainValue[0] - Math.abs(_isArray(errorValue) ? errorValue[0] : errorValue);\n var upperValue = mainValue[1] + Math.abs(_isArray(errorValue) ? errorValue[1] : errorValue);\n return [Math.min(lowerValue, prevErrorArr[0]), Math.max(upperValue, prevErrorArr[1])];\n }, [Infinity, -Infinity]);\n return [Math.min(errorDomain[0], result[0]), Math.max(errorDomain[1], result[1])];\n }, [Infinity, -Infinity]);\n }\n\n return null;\n};\nexport var parseErrorBarsOfAxis = function parseErrorBarsOfAxis(data, items, dataKey, axisType) {\n var domains = items.map(function (item) {\n return getDomainOfErrorBars(data, item, dataKey, axisType);\n }).filter(function (entry) {\n return !_isNil(entry);\n });\n\n if (domains && domains.length) {\n return domains.reduce(function (result, entry) {\n return [Math.min(result[0], entry[0]), Math.max(result[1], entry[1])];\n }, [Infinity, -Infinity]);\n }\n\n return null;\n};\n/**\n * Get domain of data by the configuration of item element\n * @param {Array} data The data displayed in the chart\n * @param {Array} items The instances of item\n * @param {String} type The type of axis, number - Number Axis, category - Category Axis\n * @param {Boolean} filterNil Whether or not filter nil values\n * @return {Array} Domain\n */\n\nexport var getDomainOfItemsWithSameAxis = function getDomainOfItemsWithSameAxis(data, items, type, filterNil) {\n var domains = items.map(function (item) {\n var dataKey = item.props.dataKey;\n\n if (type === 'number' && dataKey) {\n return getDomainOfErrorBars(data, item, dataKey) || getDomainOfDataByKey(data, dataKey, type, filterNil);\n }\n\n return getDomainOfDataByKey(data, dataKey, type, filterNil);\n });\n\n if (type === 'number') {\n // Calculate the domain of number axis\n return domains.reduce(function (result, entry) {\n return [Math.min(result[0], entry[0]), Math.max(result[1], entry[1])];\n }, [Infinity, -Infinity]);\n }\n\n var tag = {}; // Get the union set of category axis\n\n return domains.reduce(function (result, entry) {\n for (var i = 0, len = entry.length; i < len; i++) {\n if (!tag[entry[i]]) {\n tag[entry[i]] = true;\n result.push(entry[i]);\n }\n }\n\n return result;\n }, []);\n};\nexport var isCategorialAxis = function isCategorialAxis(layout, axisType) {\n return layout === 'horizontal' && axisType === 'xAxis' || layout === 'vertical' && axisType === 'yAxis' || layout === 'centric' && axisType === 'angleAxis' || layout === 'radial' && axisType === 'radiusAxis';\n};\n/**\n * Calculate the Coordinates of grid\n * @param {Array} ticks The ticks in axis\n * @param {Number} min The minimun value of axis\n * @param {Number} max The maximun value of axis\n * @return {Array} Coordinates\n */\n\nexport var getCoordinatesOfGrid = function getCoordinatesOfGrid(ticks, min, max) {\n var hasMin, hasMax;\n var values = ticks.map(function (entry) {\n if (entry.coordinate === min) {\n hasMin = true;\n }\n\n if (entry.coordinate === max) {\n hasMax = true;\n }\n\n return entry.coordinate;\n });\n\n if (!hasMin) {\n values.push(min);\n }\n\n if (!hasMax) {\n values.push(max);\n }\n\n return values;\n};\n/**\n * Get the ticks of an axis\n * @param {Object} axis The configuration of an axis\n * @param {Boolean} isGrid Whether or not are the ticks in grid\n * @param {Boolean} isAll Return the ticks of all the points or not\n * @return {Array} Ticks\n */\n\nexport var getTicksOfAxis = function getTicksOfAxis(axis, isGrid, isAll) {\n if (!axis) return null;\n var scale = axis.scale;\n var duplicateDomain = axis.duplicateDomain,\n type = axis.type,\n range = axis.range;\n var offset = (isGrid || isAll) && type === 'category' && scale.bandwidth ? scale.bandwidth() / 2 : 0;\n offset = axis.axisType === 'angleAxis' ? mathSign(range[0] - range[1]) * 2 * offset : offset; // The ticks setted by user should only affect the ticks adjacent to axis line\n\n if (isGrid && (axis.ticks || axis.niceTicks)) {\n return (axis.ticks || axis.niceTicks).map(function (entry) {\n var scaleContent = duplicateDomain ? duplicateDomain.indexOf(entry) : entry;\n return {\n coordinate: scale(scaleContent) + offset,\n value: entry,\n offset: offset\n };\n });\n }\n\n if (axis.isCategorial && axis.categoricalDomain) {\n return axis.categoricalDomain.map(function (entry, index) {\n return {\n coordinate: scale(entry),\n value: entry,\n index: index,\n offset: offset\n };\n });\n }\n\n if (scale.ticks && !isAll) {\n return scale.ticks(axis.tickCount).map(function (entry) {\n return {\n coordinate: scale(entry) + offset,\n value: entry,\n offset: offset\n };\n });\n } // When axis has duplicated text, serial numbers are used to generate scale\n\n\n return scale.domain().map(function (entry, index) {\n return {\n coordinate: scale(entry) + offset,\n value: duplicateDomain ? duplicateDomain[entry] : entry,\n index: index,\n offset: offset\n };\n });\n};\n/**\n * combine the handlers\n * @param {Function} defaultHandler Internal private handler\n * @param {Function} parentHandler Handler function specified in parent component\n * @param {Function} childHandler Handler function specified in child component\n * @return {Function} The combined handler\n */\n\nexport var combineEventHandlers = function combineEventHandlers(defaultHandler, parentHandler, childHandler) {\n var customizedHandler;\n\n if (_isFunction(childHandler)) {\n customizedHandler = childHandler;\n } else if (_isFunction(parentHandler)) {\n customizedHandler = parentHandler;\n }\n\n if (_isFunction(defaultHandler) || customizedHandler) {\n return function (arg1, arg2, arg3, arg4) {\n if (_isFunction(defaultHandler)) {\n defaultHandler(arg1, arg2, arg3, arg4);\n }\n\n if (_isFunction(customizedHandler)) {\n customizedHandler(arg1, arg2, arg3, arg4);\n }\n };\n }\n\n return null;\n};\n/**\n * Parse the scale function of axis\n * @param {Object} axis The option of axis\n * @param {String} chartType The displayName of chart\n * @return {Function} The scale funcion\n */\n\nexport var parseScale = function parseScale(axis, chartType) {\n var scale = axis.scale,\n type = axis.type,\n layout = axis.layout,\n axisType = axis.axisType;\n\n if (scale === 'auto') {\n if (layout === 'radial' && axisType === 'radiusAxis') {\n return {\n scale: d3Scales.scaleBand(),\n realScaleType: 'band'\n };\n }\n\n if (layout === 'radial' && axisType === 'angleAxis') {\n return {\n scale: d3Scales.scaleLinear(),\n realScaleType: 'linear'\n };\n }\n\n if (type === 'category' && chartType && (chartType.indexOf('LineChart') >= 0 || chartType.indexOf('AreaChart') >= 0)) {\n return {\n scale: d3Scales.scalePoint(),\n realScaleType: 'point'\n };\n }\n\n if (type === 'category') {\n return {\n scale: d3Scales.scaleBand(),\n realScaleType: 'band'\n };\n }\n\n return {\n scale: d3Scales.scaleLinear(),\n realScaleType: 'linear'\n };\n }\n\n if (_isString(scale)) {\n var name = \"scale\".concat(scale.slice(0, 1).toUpperCase()).concat(scale.slice(1));\n return {\n scale: (d3Scales[name] || d3Scales.scalePoint)(),\n realScaleType: d3Scales[name] ? name : 'point'\n };\n }\n\n return _isFunction(scale) ? {\n scale: scale\n } : {\n scale: d3Scales.scalePoint(),\n realScaleType: 'point'\n };\n};\nvar EPS = 1e-4;\nexport var checkDomainOfScale = function checkDomainOfScale(scale) {\n var domain = scale.domain();\n\n if (!domain || domain.length <= 2) {\n return;\n }\n\n var len = domain.length;\n var range = scale.range();\n var min = Math.min(range[0], range[1]) - EPS;\n var max = Math.max(range[0], range[1]) + EPS;\n var first = scale(domain[0]);\n var last = scale(domain[len - 1]);\n\n if (first < min || first > max || last < min || last > max) {\n scale.domain([domain[0], domain[len - 1]]);\n }\n};\nexport var findPositionOfBar = function findPositionOfBar(barPosition, child) {\n if (!barPosition) {\n return null;\n }\n\n for (var i = 0, len = barPosition.length; i < len; i++) {\n if (barPosition[i].item === child) {\n return barPosition[i].position;\n }\n }\n\n return null;\n};\nexport var truncateByDomain = function truncateByDomain(value, domain) {\n if (!domain || domain.length !== 2 || !isNumber(domain[0]) || !isNumber(domain[1])) {\n return value;\n }\n\n var min = Math.min(domain[0], domain[1]);\n var max = Math.max(domain[0], domain[1]);\n var result = [value[0], value[1]];\n\n if (!isNumber(value[0]) || value[0] < min) {\n result[0] = min;\n }\n\n if (!isNumber(value[1]) || value[1] > max) {\n result[1] = max;\n }\n\n if (result[0] > max) {\n result[0] = max;\n }\n\n if (result[1] < min) {\n result[1] = min;\n }\n\n return result;\n};\n/* eslint no-param-reassign: 0 */\n\nexport var offsetSign = function offsetSign(series) {\n var n = series.length;\n\n if (n <= 0) {\n return;\n }\n\n for (var j = 0, m = series[0].length; j < m; ++j) {\n var positive = 0;\n var negative = 0;\n\n for (var i = 0; i < n; ++i) {\n var value = _isNaN(series[i][j][1]) ? series[i][j][0] : series[i][j][1];\n /* eslint-disable prefer-destructuring */\n\n if (value >= 0) {\n series[i][j][0] = positive;\n series[i][j][1] = positive + value;\n positive = series[i][j][1];\n } else {\n series[i][j][0] = negative;\n series[i][j][1] = negative + value;\n negative = series[i][j][1];\n }\n /* eslint-enable prefer-destructuring */\n\n }\n }\n};\nvar STACK_OFFSET_MAP = {\n sign: offsetSign,\n expand: stackOffsetExpand,\n none: stackOffsetNone,\n silhouette: stackOffsetSilhouette,\n wiggle: stackOffsetWiggle\n};\nexport var getStackedData = function getStackedData(data, stackItems, offsetType) {\n var dataKeys = stackItems.map(function (item) {\n return item.props.dataKey;\n });\n var stack = shapeStack().keys(dataKeys).value(function (d, key) {\n return +getValueByDataKey(d, key, 0);\n }).order(stackOrderNone).offset(STACK_OFFSET_MAP[offsetType]);\n return stack(data);\n};\nexport var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numericAxisId, cateAxisId, offsetType, reverseStackOrder) {\n if (!data) {\n return null;\n } // reversing items to affect render order (for layering)\n\n\n var items = reverseStackOrder ? _items.reverse() : _items;\n var stackGroups = items.reduce(function (result, item) {\n var _item$props2 = item.props,\n stackId = _item$props2.stackId,\n hide = _item$props2.hide;\n\n if (hide) {\n return result;\n }\n\n var axisId = item.props[numericAxisId];\n var parentGroup = result[axisId] || {\n hasStack: false,\n stackGroups: {}\n };\n\n if (isNumOrStr(stackId)) {\n var childGroup = parentGroup.stackGroups[stackId] || {\n numericAxisId: numericAxisId,\n cateAxisId: cateAxisId,\n items: []\n };\n childGroup.items.push(item);\n parentGroup.hasStack = true;\n parentGroup.stackGroups[stackId] = childGroup;\n } else {\n parentGroup.stackGroups[uniqueId('_stackId_')] = {\n numericAxisId: numericAxisId,\n cateAxisId: cateAxisId,\n items: [item]\n };\n }\n\n return _objectSpread({}, result, _defineProperty({}, axisId, parentGroup));\n }, {});\n return Object.keys(stackGroups).reduce(function (result, axisId) {\n var group = stackGroups[axisId];\n\n if (group.hasStack) {\n group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {\n var g = group.stackGroups[stackId];\n return _objectSpread({}, res, _defineProperty({}, stackId, {\n numericAxisId: numericAxisId,\n cateAxisId: cateAxisId,\n items: g.items,\n stackedData: getStackedData(data, g.items, offsetType)\n }));\n }, {});\n }\n\n return _objectSpread({}, result, _defineProperty({}, axisId, group));\n }, {});\n};\n/**\n * get domain of ticks\n * @param {Array} ticks Ticks of axis\n * @param {String} type The type of axis\n * @return {Array} domain\n */\n\nexport var calculateDomainOfTicks = function calculateDomainOfTicks(ticks, type) {\n if (type === 'number') {\n return [Math.min.apply(null, ticks), Math.max.apply(null, ticks)];\n }\n\n return ticks;\n};\n/**\n * Configure the scale function of axis\n * @param {Object} scale The scale function\n * @param {Object} opts The configuration of axis\n * @return {Object} null\n */\n\nexport var getTicksOfScale = function getTicksOfScale(scale, opts) {\n var realScaleType = opts.realScaleType,\n type = opts.type,\n tickCount = opts.tickCount,\n originalDomain = opts.originalDomain,\n allowDecimals = opts.allowDecimals;\n var scaleType = realScaleType || opts.scale;\n\n if (scaleType !== 'auto' && scaleType !== 'linear') {\n return null;\n }\n\n if (tickCount && type === 'number' && originalDomain && (originalDomain[0] === 'auto' || originalDomain[1] === 'auto')) {\n // Calculate the ticks by the number of grid when the axis is a number axis\n var domain = scale.domain();\n var tickValues = getNiceTickValues(domain, tickCount, allowDecimals);\n scale.domain(calculateDomainOfTicks(tickValues, type));\n return {\n niceTicks: tickValues\n };\n }\n\n if (tickCount && type === 'number') {\n var _domain = scale.domain();\n\n var _tickValues = getTickValuesFixedDomain(_domain, tickCount, allowDecimals);\n\n return {\n niceTicks: _tickValues\n };\n }\n\n return null;\n};\nexport var getCateCoordinateOfLine = function getCateCoordinateOfLine(_ref6) {\n var axis = _ref6.axis,\n ticks = _ref6.ticks,\n bandSize = _ref6.bandSize,\n entry = _ref6.entry,\n index = _ref6.index,\n dataKey = _ref6.dataKey;\n\n if (axis.type === 'category') {\n // find coordinate of category axis by the value of category\n if (!axis.allowDuplicatedCategory && axis.dataKey && !_isNil(entry[axis.dataKey])) {\n var matchedTick = findEntryInArray(ticks, 'value', entry[axis.dataKey]);\n\n if (matchedTick) {\n return matchedTick.coordinate + bandSize / 2;\n }\n }\n\n return ticks[index] ? ticks[index].coordinate + bandSize / 2 : null;\n }\n\n var value = getValueByDataKey(entry, !_isNil(dataKey) ? dataKey : axis.dataKey);\n return !_isNil(value) ? axis.scale(value) : null;\n};\nexport var getCateCoordinateOfBar = function getCateCoordinateOfBar(_ref7) {\n var axis = _ref7.axis,\n ticks = _ref7.ticks,\n offset = _ref7.offset,\n bandSize = _ref7.bandSize,\n entry = _ref7.entry,\n index = _ref7.index;\n\n if (axis.type === 'category') {\n return ticks[index] ? ticks[index].coordinate + offset : null;\n }\n\n var value = getValueByDataKey(entry, axis.dataKey, axis.domain[index]);\n return !_isNil(value) ? axis.scale(value) - bandSize / 2 + offset : null;\n};\nexport var getBaseValueOfBar = function getBaseValueOfBar(_ref8) {\n var numericAxis = _ref8.numericAxis;\n var domain = numericAxis.scale.domain();\n\n if (numericAxis.type === 'number') {\n var min = Math.min(domain[0], domain[1]);\n var max = Math.max(domain[0], domain[1]);\n\n if (min <= 0 && max >= 0) {\n return 0;\n }\n\n if (max < 0) {\n return max;\n }\n\n return min;\n }\n\n return domain[0];\n};\nexport var ifOverflowMatches = function ifOverflowMatches(props, value) {\n var alwaysShow = props.alwaysShow;\n var ifOverflow = props.ifOverflow;\n\n if (alwaysShow) {\n ifOverflow = 'extendDomain';\n }\n\n return ifOverflow === value;\n};\nexport var detectReferenceElementsDomain = function detectReferenceElementsDomain(children, domain, axisId, axisType, specifiedTicks) {\n var lines = findAllByType(children, ReferenceLine);\n var dots = findAllByType(children, ReferenceDot);\n var elements = lines.concat(dots);\n var areas = findAllByType(children, ReferenceArea);\n var idKey = \"\".concat(axisType, \"Id\");\n var valueKey = axisType[0];\n var finalDomain = domain;\n\n if (elements.length) {\n finalDomain = elements.reduce(function (result, el) {\n if (el.props[idKey] === axisId && ifOverflowMatches(el.props, 'extendDomain') && isNumber(el.props[valueKey])) {\n var value = el.props[valueKey];\n return [Math.min(result[0], value), Math.max(result[1], value)];\n }\n\n return result;\n }, finalDomain);\n }\n\n if (areas.length) {\n var key1 = \"\".concat(valueKey, \"1\");\n var key2 = \"\".concat(valueKey, \"2\");\n finalDomain = areas.reduce(function (result, el) {\n if (el.props[idKey] === axisId && ifOverflowMatches(el.props, 'extendDomain') && isNumber(el.props[key1]) && isNumber(el.props[key2])) {\n var value1 = el.props[key1];\n var value2 = el.props[key2];\n return [Math.min(result[0], value1, value2), Math.max(result[1], value1, value2)];\n }\n\n return result;\n }, finalDomain);\n }\n\n if (specifiedTicks && specifiedTicks.length) {\n finalDomain = specifiedTicks.reduce(function (result, tick) {\n if (isNumber(tick)) {\n return [Math.min(result[0], tick), Math.max(result[1], tick)];\n }\n\n return result;\n }, finalDomain);\n }\n\n return finalDomain;\n};\nexport var getStackedDataOfItem = function getStackedDataOfItem(item, stackGroups) {\n var stackId = item.props.stackId;\n\n if (isNumOrStr(stackId)) {\n var group = stackGroups[stackId];\n\n if (group && group.items.length) {\n var itemIndex = -1;\n\n for (var i = 0, len = group.items.length; i < len; i++) {\n if (group.items[i] === item) {\n itemIndex = i;\n break;\n }\n }\n\n return itemIndex >= 0 ? group.stackedData[itemIndex] : null;\n }\n }\n\n return null;\n};\n\nvar getDomainOfSingle = function getDomainOfSingle(data) {\n return data.reduce(function (result, entry) {\n return [Math.min.apply(null, entry.concat([result[0]]).filter(isNumber)), Math.max.apply(null, entry.concat([result[1]]).filter(isNumber))];\n }, [Infinity, -Infinity]);\n};\n\nexport var getDomainOfStackGroups = function getDomainOfStackGroups(stackGroups, startIndex, endIndex) {\n return Object.keys(stackGroups).reduce(function (result, stackId) {\n var group = stackGroups[stackId];\n var stackedData = group.stackedData;\n var domain = stackedData.reduce(function (res, entry) {\n var s = getDomainOfSingle(entry.slice(startIndex, endIndex + 1));\n return [Math.min(res[0], s[0]), Math.max(res[1], s[1])];\n }, [Infinity, -Infinity]);\n return [Math.min(domain[0], result[0]), Math.max(domain[1], result[1])];\n }, [Infinity, -Infinity]).map(function (result) {\n return result === Infinity || result === -Infinity ? 0 : result;\n });\n};\nexport var MIN_VALUE_REG = /^dataMin[\\s]*-[\\s]*([0-9]+([.]{1}[0-9]+){0,1})$/;\nexport var MAX_VALUE_REG = /^dataMax[\\s]*\\+[\\s]*([0-9]+([.]{1}[0-9]+){0,1})$/;\nexport var parseSpecifiedDomain = function parseSpecifiedDomain(specifiedDomain, dataDomain, allowDataOverflow) {\n if (!_isArray(specifiedDomain)) {\n return dataDomain;\n }\n\n var domain = [];\n /* eslint-disable prefer-destructuring */\n\n if (isNumber(specifiedDomain[0])) {\n domain[0] = allowDataOverflow ? specifiedDomain[0] : Math.min(specifiedDomain[0], dataDomain[0]);\n } else if (MIN_VALUE_REG.test(specifiedDomain[0])) {\n var value = +MIN_VALUE_REG.exec(specifiedDomain[0])[1];\n domain[0] = dataDomain[0] - value;\n } else if (_isFunction(specifiedDomain[0])) {\n domain[0] = specifiedDomain[0](dataDomain[0]);\n } else {\n domain[0] = dataDomain[0];\n }\n\n if (isNumber(specifiedDomain[1])) {\n domain[1] = allowDataOverflow ? specifiedDomain[1] : Math.max(specifiedDomain[1], dataDomain[1]);\n } else if (MAX_VALUE_REG.test(specifiedDomain[1])) {\n var _value = +MAX_VALUE_REG.exec(specifiedDomain[1])[1];\n\n domain[1] = dataDomain[1] + _value;\n } else if (_isFunction(specifiedDomain[1])) {\n domain[1] = specifiedDomain[1](dataDomain[1]);\n } else {\n domain[1] = dataDomain[1];\n }\n /* eslint-enable prefer-destructuring */\n\n\n return domain;\n};\n/**\n * Calculate the size between two category\n * @param {Object} axis The options of axis\n * @param {Array} ticks The ticks of axis\n * @return {Number} Size\n */\n\nexport var getBandSizeOfAxis = function getBandSizeOfAxis(axis, ticks) {\n if (axis && axis.scale && axis.scale.bandwidth) {\n return axis.scale.bandwidth();\n }\n\n if (axis && ticks && ticks.length >= 2) {\n var orderedTicks = _sortBy(ticks, function (o) {\n return o.coordinate;\n });\n\n var bandSize = Infinity;\n\n for (var i = 1, len = orderedTicks.length; i < len; i++) {\n var cur = orderedTicks[i];\n var prev = orderedTicks[i - 1];\n bandSize = Math.min((cur.coordinate || 0) - (prev.coordinate || 0), bandSize);\n }\n\n return bandSize === Infinity ? 0 : bandSize;\n }\n\n return 0;\n};\n/**\n * parse the domain of a category axis when a domain is specified\n * @param {Array} specifiedDomain The domain specified by users\n * @param {Array} calculatedDomain The domain calculated by dateKey\n * @param {ReactElement} axisChild The axis element\n * @returns {Array} domains\n */\n\nexport var parseDomainOfCategoryAxis = function parseDomainOfCategoryAxis(specifiedDomain, calculatedDomain, axisChild) {\n if (!specifiedDomain || !specifiedDomain.length) {\n return calculatedDomain;\n }\n\n if (_isEqual(specifiedDomain, _get(axisChild, 'type.defaultProps.domain'))) {\n return calculatedDomain;\n }\n\n return specifiedDomain;\n};",
"function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nimport { isSsr } from './ReactUtils';\nvar stringCache = {\n widthCache: {},\n cacheCount: 0\n};\nvar MAX_CACHE_NUM = 2000;\nvar SPAN_STYLE = {\n position: 'absolute',\n top: '-20000px',\n left: 0,\n padding: 0,\n margin: 0,\n border: 'none',\n whiteSpace: 'pre'\n};\nvar STYLE_LIST = ['minWidth', 'maxWidth', 'width', 'minHeight', 'maxHeight', 'height', 'top', 'left', 'fontSize', 'lineHeight', 'padding', 'margin', 'paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom', 'marginLeft', 'marginRight', 'marginTop', 'marginBottom'];\nvar MEASUREMENT_SPAN_ID = 'recharts_measurement_span';\n\nfunction autoCompleteStyle(name, value) {\n if (STYLE_LIST.indexOf(name) >= 0 && value === +value) {\n return \"\".concat(value, \"px\");\n }\n\n return value;\n}\n\nfunction camelToMiddleLine(text) {\n var strs = text.split('');\n var formatStrs = strs.reduce(function (result, entry) {\n if (entry === entry.toUpperCase()) {\n return _toConsumableArray(result).concat(['-', entry.toLowerCase()]);\n }\n\n return _toConsumableArray(result).concat([entry]);\n }, []);\n return formatStrs.join('');\n}\n\nexport var getStyleString = function getStyleString(style) {\n return Object.keys(style).reduce(function (result, s) {\n return \"\".concat(result).concat(camelToMiddleLine(s), \":\").concat(autoCompleteStyle(s, style[s]), \";\");\n }, '');\n};\nexport var getStringSize = function getStringSize(text) {\n var style = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (text === undefined || text === null || isSsr()) {\n return {\n width: 0,\n height: 0\n };\n }\n\n var str = \"\".concat(text);\n var styleString = getStyleString(style);\n var cacheKey = \"\".concat(str, \"-\").concat(styleString);\n\n if (stringCache.widthCache[cacheKey]) {\n return stringCache.widthCache[cacheKey];\n }\n\n try {\n var measurementSpan = document.getElementById(MEASUREMENT_SPAN_ID);\n\n if (!measurementSpan) {\n measurementSpan = document.createElement('span');\n measurementSpan.setAttribute('id', MEASUREMENT_SPAN_ID);\n document.body.appendChild(measurementSpan);\n } // Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)\n // https://en.wikipedia.org/wiki/Content_Security_Policy\n\n\n var measurementSpanStyle = _objectSpread({}, SPAN_STYLE, style);\n\n Object.keys(measurementSpanStyle).map(function (styleKey) {\n measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];\n return styleKey;\n });\n measurementSpan.textContent = str;\n var rect = measurementSpan.getBoundingClientRect();\n var result = {\n width: rect.width,\n height: rect.height\n };\n stringCache.widthCache[cacheKey] = result;\n\n if (++stringCache.cacheCount > MAX_CACHE_NUM) {\n stringCache.cacheCount = 0;\n stringCache.widthCache = {};\n }\n\n return result;\n } catch (e) {\n return {\n width: 0,\n height: 0\n };\n }\n};\nexport var getOffset = function getOffset(el) {\n var html = el.ownerDocument.documentElement;\n var box = {\n top: 0,\n left: 0\n }; // If we don't have gBCR, just use 0,0 rather than error\n // BlackBerry 5, iOS 3 (original iPhone)\n\n if (typeof el.getBoundingClientRect !== 'undefined') {\n box = el.getBoundingClientRect();\n }\n\n return {\n top: box.top + window.pageYOffset - html.clientTop,\n left: box.left + window.pageXOffset - html.clientLeft\n };\n};\n/**\n * Calculate coordinate of cursor in chart\n * @param {Object} event Event object\n * @param {Object} offset The offset of main part in the svg element\n * @return {Object} {chartX, chartY}\n */\n\nexport var calculateChartCoordinate = function calculateChartCoordinate(event, offset) {\n return {\n chartX: Math.round(event.pageX - offset.left),\n chartY: Math.round(event.pageY - offset.top)\n };\n};",
"import _get from \"lodash/get\";\nimport _isArray from \"lodash/isArray\";\nimport _isNaN from \"lodash/isNaN\";\nimport _isNumber from \"lodash/isNumber\";\nimport _isString from \"lodash/isString\";\nexport var mathSign = function mathSign(value) {\n if (value === 0) {\n return 0;\n }\n\n if (value > 0) {\n return 1;\n }\n\n return -1;\n};\nexport var isPercent = function isPercent(value) {\n return _isString(value) && value.indexOf('%') === value.length - 1;\n};\nexport var isNumber = function isNumber(value) {\n return _isNumber(value) && !_isNaN(value);\n};\nexport var isNumOrStr = function isNumOrStr(value) {\n return isNumber(value) || _isString(value);\n};\nvar idCounter = 0;\nexport var uniqueId = function uniqueId(prefix) {\n var id = ++idCounter;\n return \"\".concat(prefix || '').concat(id);\n};\n/**\n * Get percent value of a total value\n * @param {Number|String} percent A percent\n * @param {Number} totalValue Total value\n * @param {NUmber} defaultValue The value returned when percent is undefined or invalid\n * @param {Boolean} validate If set to be true, the result will be validated\n * @return {Number} value\n */\n\nexport var getPercentValue = function getPercentValue(percent, totalValue) {\n var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var validate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n if (!isNumber(percent) && !_isString(percent)) {\n return defaultValue;\n }\n\n var value;\n\n if (isPercent(percent)) {\n var index = percent.indexOf('%');\n value = totalValue * parseFloat(percent.slice(0, index)) / 100;\n } else {\n value = +percent;\n }\n\n if (_isNaN(value)) {\n value = defaultValue;\n }\n\n if (validate && value > totalValue) {\n value = totalValue;\n }\n\n return value;\n};\nexport var getAnyElementOfObject = function getAnyElementOfObject(obj) {\n if (!obj) {\n return null;\n }\n\n var keys = Object.keys(obj);\n\n if (keys && keys.length) {\n return obj[keys[0]];\n }\n\n return null;\n};\nexport var hasDuplicate = function hasDuplicate(ary) {\n if (!_isArray(ary)) {\n return false;\n }\n\n var len = ary.length;\n var cache = {};\n\n for (var i = 0; i < len; i++) {\n if (!cache[ary[i]]) {\n cache[ary[i]] = true;\n } else {\n return true;\n }\n }\n\n return false;\n};\nexport var interpolateNumber = function interpolateNumber(numberA, numberB) {\n if (isNumber(numberA) && isNumber(numberB)) {\n return function (t) {\n return numberA + t * (numberB - numberA);\n };\n }\n\n return function () {\n return numberB;\n };\n};\nexport var findEntryInArray = function findEntryInArray(ary, specifiedKey, specifiedValue) {\n if (!ary || !ary.length) {\n return null;\n }\n\n return ary.find(function (entry) {\n return entry && _get(entry, specifiedKey) === specifiedValue;\n });\n};\n/**\n * The least square linear regression\n * @param {Array} data The array of points\n * @returns {Object} The domain of x, and the parameter of linear function\n */\n\nexport var getLinearRegression = function getLinearRegression(data) {\n if (!data || !data.length) {\n return null;\n }\n\n var len = data.length;\n var xsum = 0;\n var ysum = 0;\n var xysum = 0;\n var xxsum = 0;\n var xmin = Infinity;\n var xmax = -Infinity;\n\n for (var i = 0; i < len; i++) {\n xsum += data[i].cx;\n ysum += data[i].cy;\n xysum += data[i].cx * data[i].cy;\n xxsum += data[i].cx * data[i].cx;\n xmin = Math.min(xmin, data[i].cx);\n xmax = Math.max(xmax, data[i].cx);\n }\n\n var a = len * xxsum !== xsum * xsum ? (len * xysum - xsum * ysum) / (len * xxsum - xsum * xsum) : 0;\n return {\n xmin: xmin,\n xmax: xmax,\n a: a,\n b: (ysum - a * xsum) / len\n };\n};",
"/* eslint no-console: 0 */\nvar isDev = process.env.NODE_ENV !== 'production';\nexport var warn = function warn(condition, format, a, b, c, d, e, f) {\n if (isDev && typeof console !== 'undefined' && console.warn) {\n if (format === undefined) {\n console.warn('LogUtils requires an error message argument');\n }\n\n if (!condition) {\n if (format === undefined) {\n console.warn('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n console.warn(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n }\n }\n }\n};",
"import _isNil from \"lodash/isNil\";\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { getPercentValue } from './DataUtils';\nimport { parseScale, checkDomainOfScale, getTicksOfScale } from './ChartUtils';\nexport var RADIAN = Math.PI / 180;\nexport var degreeToRadian = function degreeToRadian(angle) {\n return angle * Math.PI / 180;\n};\nexport var radianToDegree = function radianToDegree(angleInRadian) {\n return angleInRadian * 180 / Math.PI;\n};\nexport var polarToCartesian = function polarToCartesian(cx, cy, radius, angle) {\n return {\n x: cx + Math.cos(-RADIAN * angle) * radius,\n y: cy + Math.sin(-RADIAN * angle) * radius\n };\n};\nexport var getMaxRadius = function getMaxRadius(width, height) {\n var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n return Math.min(Math.abs(width - (offset.left || 0) - (offset.right || 0)), Math.abs(height - (offset.top || 0) - (offset.bottom || 0))) / 2;\n};\n/**\n * Calculate the scale function, position, width, height of axes\n * @param {Object} props Latest props\n * @param {Object} axisMap The configuration of axes\n * @param {Object} offset The offset of main part in the svg element\n * @param {Object} axisType The type of axes, radius-axis or angle-axis\n * @param {String} chartName The name of chart\n * @return {Object} Configuration\n */\n\nexport var formatAxisMap = function formatAxisMap(props, axisMap, offset, axisType, chartName) {\n var width = props.width,\n height = props.height;\n var startAngle = props.startAngle,\n endAngle = props.endAngle;\n var cx = getPercentValue(props.cx, width, width / 2);\n var cy = getPercentValue(props.cy, height, height / 2);\n var maxRadius = getMaxRadius(width, height, offset);\n var innerRadius = getPercentValue(props.innerRadius, maxRadius, 0);\n var outerRadius = getPercentValue(props.outerRadius, maxRadius, maxRadius * 0.8);\n var ids = Object.keys(axisMap);\n return ids.reduce(function (result, id) {\n var axis = axisMap[id];\n var domain = axis.domain,\n reversed = axis.reversed;\n var range;\n\n if (_isNil(axis.range)) {\n if (axisType === 'angleAxis') {\n range = [startAngle, endAngle];\n } else if (axisType === 'radiusAxis') {\n range = [innerRadius, outerRadius];\n }\n\n if (reversed) {\n range = [range[1], range[0]];\n }\n } else {\n range = axis.range;\n var _range = range;\n\n var _range2 = _slicedToArray(_range, 2);\n\n startAngle = _range2[0];\n endAngle = _range2[1];\n }\n\n var _parseScale = parseScale(axis, chartName),\n realScaleType = _parseScale.realScaleType,\n scale = _parseScale.scale;\n\n scale.domain(domain).range(range);\n checkDomainOfScale(scale);\n var ticks = getTicksOfScale(scale, _objectSpread({}, axis, {\n realScaleType: realScaleType\n }));\n\n var finalAxis = _objectSpread({}, axis, ticks, {\n range: range,\n radius: outerRadius,\n realScaleType: realScaleType,\n scale: scale,\n cx: cx,\n cy: cy,\n innerRadius: innerRadius,\n outerRadius: outerRadius,\n startAngle: startAngle,\n endAngle: endAngle\n });\n\n return _objectSpread({}, result, _defineProperty({}, id, finalAxis));\n }, {});\n};\nexport var distanceBetweenPoints = function distanceBetweenPoints(point, anotherPoint) {\n var x1 = point.x,\n y1 = point.y;\n var x2 = anotherPoint.x,\n y2 = anotherPoint.y;\n return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));\n};\nexport var getAngleOfPoint = function getAngleOfPoint(_ref, _ref2) {\n var x = _ref.x,\n y = _ref.y;\n var cx = _ref2.cx,\n cy = _ref2.cy;\n var radius = distanceBetweenPoints({\n x: x,\n y: y\n }, {\n x: cx,\n y: cy\n });\n\n if (radius <= 0) {\n return {\n radius: radius\n };\n }\n\n var cos = (x - cx) / radius;\n var angleInRadian = Math.acos(cos);\n\n if (y > cy) {\n angleInRadian = 2 * Math.PI - angleInRadian;\n }\n\n return {\n radius: radius,\n angle: radianToDegree(angleInRadian),\n angleInRadian: angleInRadian\n };\n};\nexport var formatAngleOfSector = function formatAngleOfSector(_ref3) {\n var startAngle = _ref3.startAngle,\n endAngle = _ref3.endAngle;\n var startCnt = Math.floor(startAngle / 360);\n var endCnt = Math.floor(endAngle / 360);\n var min = Math.min(startCnt, endCnt);\n return {\n startAngle: startAngle - min * 360,\n endAngle: endAngle - min * 360\n };\n};\n\nvar reverseFormatAngleOfSetor = function reverseFormatAngleOfSetor(angle, _ref4) {\n var startAngle = _ref4.startAngle,\n endAngle = _ref4.endAngle;\n var startCnt = Math.floor(startAngle / 360);\n var endCnt = Math.floor(endAngle / 360);\n var min = Math.min(startCnt, endCnt);\n return angle + min * 360;\n};\n\nexport var inRangeOfSector = function inRangeOfSector(_ref5, sector) {\n var x = _ref5.x,\n y = _ref5.y;\n\n var _getAngleOfPoint = getAngleOfPoint({\n x: x,\n y: y\n }, sector),\n radius = _getAngleOfPoint.radius,\n angle = _getAngleOfPoint.angle;\n\n var innerRadius = sector.innerRadius,\n outerRadius = sector.outerRadius;\n\n if (radius < innerRadius || radius > outerRadius) {\n return false;\n }\n\n if (radius === 0) {\n return true;\n }\n\n var _formatAngleOfSector = formatAngleOfSector(sector),\n startAngle = _formatAngleOfSector.startAngle,\n endAngle = _formatAngleOfSector.endAngle;\n\n var formatAngle = angle;\n var inRange;\n\n if (startAngle <= endAngle) {\n while (formatAngle > endAngle) {\n formatAngle -= 360;\n }\n\n while (formatAngle < startAngle) {\n formatAngle += 360;\n }\n\n inRange = formatAngle >= startAngle && formatAngle <= endAngle;\n } else {\n while (formatAngle > startAngle) {\n formatAngle -= 360;\n }\n\n while (formatAngle < endAngle) {\n formatAngle += 360;\n }\n\n inRange = formatAngle >= endAngle && formatAngle <= startAngle;\n }\n\n if (inRange) {\n return _objectSpread({}, sector, {\n radius: radius,\n angle: reverseFormatAngleOfSetor(formatAngle, sector)\n });\n }\n\n return null;\n};",
"export function shallowEqual(a, b) {\n /* eslint-disable no-restricted-syntax */\n for (var key in a) {\n if ({}.hasOwnProperty.call(a, key) && (!{}.hasOwnProperty.call(b, key) || a[key] !== b[key])) {\n return false;\n }\n }\n\n for (var _key in b) {\n if ({}.hasOwnProperty.call(b, _key) && !{}.hasOwnProperty.call(a, _key)) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction shouldComponentUpdate(props, state) {\n return !shallowEqual(props, this.props) || !shallowEqual(state, this.state);\n}\n\nexport default function pureRenderDecorator(component) {\n // eslint-disable-next-line no-param-reassign\n component.prototype.shouldComponentUpdate = shouldComponentUpdate;\n}",
"import _isNil from \"lodash/isNil\";\nimport _isString from \"lodash/isString\";\nimport _isObject from \"lodash/isObject\";\nimport _isFunction from \"lodash/isFunction\";\nimport _isArray from \"lodash/isArray\";\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\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\nimport React, { Children } from 'react';\nimport PropTypes from 'prop-types';\nimport { isNumber } from './DataUtils';\nimport { shallowEqual } from './PureRender';\nexport var PRESENTATION_ATTRIBUTES = {\n 'aria-current': PropTypes.string,\n // state\n 'aria-details': PropTypes.any,\n 'aria-disabled': PropTypes.any,\n // state\n 'aria-hidden': PropTypes.any,\n // state\n 'aria-invalid': PropTypes.any,\n // state\n 'aria-keyshortcuts': PropTypes.any,\n 'aria-label': PropTypes.any,\n 'aria-roledescription': PropTypes.any,\n // Widget Attributes\n 'aria-autocomplete': PropTypes.any,\n 'aria-checked': PropTypes.any,\n 'aria-expanded': PropTypes.any,\n 'aria-haspopup': PropTypes.any,\n 'aria-level': PropTypes.any,\n 'aria-modal': PropTypes.any,\n 'aria-multiline': PropTypes.any,\n 'aria-multiselectable': PropTypes.any,\n 'aria-orientation': PropTypes.any,\n 'aria-placeholder': PropTypes.any,\n 'aria-pressed': PropTypes.any,\n 'aria-readonly': PropTypes.any,\n 'aria-required': PropTypes.any,\n 'aria-selected': PropTypes.any,\n 'aria-sort': PropTypes.any,\n 'aria-valuemax': PropTypes.any,\n 'aria-valuemin': PropTypes.any,\n 'aria-valuenow': PropTypes.any,\n 'aria-valuetext': PropTypes.any,\n // Live Region Attributes\n 'aria-atomic': PropTypes.any,\n 'aria-busy': PropTypes.any,\n 'aria-live': PropTypes.any,\n 'aria-relevant': PropTypes.any,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': PropTypes.any,\n 'aria-grabbed': PropTypes.any,\n // Relationship Attributes\n 'aria-activedescendant': PropTypes.any,\n 'aria-colcount': PropTypes.any,\n 'aria-colindex': PropTypes.any,\n 'aria-colspan': PropTypes.any,\n 'aria-controls': PropTypes.any,\n 'aria-describedby': PropTypes.any,\n 'aria-errormessage': PropTypes.any,\n 'aria-flowto': PropTypes.any,\n 'aria-labelledby': PropTypes.any,\n 'aria-owns': PropTypes.any,\n 'aria-posinset': PropTypes.any,\n 'aria-rowcount': PropTypes.any,\n 'aria-rowindex': PropTypes.any,\n 'aria-rowspan': PropTypes.any,\n 'aria-setsize': PropTypes.any,\n alignmentBaseline: PropTypes.string,\n angle: PropTypes.number,\n baselineShift: PropTypes.string,\n clip: PropTypes.string,\n clipPath: PropTypes.string,\n clipRule: PropTypes.string,\n color: PropTypes.string,\n colorInterpolation: PropTypes.string,\n colorInterpolationFilters: PropTypes.string,\n colorProfile: PropTypes.string,\n colorRendering: PropTypes.string,\n cursor: PropTypes.string,\n direction: PropTypes.oneOf(['ltr', 'rtl', 'inherit']),\n display: PropTypes.string,\n dominantBaseline: PropTypes.string,\n enableBackground: PropTypes.string,\n fill: PropTypes.string,\n fillOpacity: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n fillRule: PropTypes.oneOf(['nonzero', 'evenodd', 'inherit']),\n filter: PropTypes.string,\n floodColor: PropTypes.string,\n floodOpacity: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n font: PropTypes.string,\n fontFamily: PropTypes.string,\n fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n fontSizeAdjust: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n fontStretch: PropTypes.oneOf(['normal', 'wider', 'narrower', 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded', 'inherit']),\n fontStyle: PropTypes.oneOf(['normal', 'italic', 'oblique', 'inherit']),\n fontVariant: PropTypes.oneOf(['normal', 'small-caps', 'inherit']),\n fontWeight: PropTypes.oneOf(['normal', 'bold', 'bolder', 'lighter', 100, 200, 300, 400, 500, 600, 700, 800, 900, 'inherit']),\n glyphOrientationHorizontal: PropTypes.string,\n glyphOrientationVertical: PropTypes.string,\n imageRendering: PropTypes.oneOf(['auto', 'optimizeSpeed', 'optimizeQuality', 'inherit']),\n kerning: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n letterSpacing: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n lightingColor: PropTypes.string,\n lineHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n markerEnd: PropTypes.string,\n markerMid: PropTypes.string,\n markerStart: PropTypes.string,\n mask: PropTypes.string,\n opacity: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n overflow: PropTypes.oneOf(['visible', 'hidden', 'scroll', 'auto', 'inherit']),\n pointerEvents: PropTypes.oneOf(['visiblePainted', 'visibleFill', 'visibleStroke', 'visible', 'painted', 'fill', 'stroke', 'all', 'none', 'inherit']),\n shapeRendering: PropTypes.oneOf(['auto', 'optimizeSpeed', 'crispEdges', 'geometricPrecision', 'inherit']),\n stopColor: PropTypes.string,\n stopOpacity: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n stroke: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n strokeDasharray: PropTypes.string,\n strokeDashoffset: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n strokeLinecap: PropTypes.oneOf(['butt', 'round', 'square', 'inherit']),\n strokeLinejoin: PropTypes.oneOf(['miter', 'round', 'bevel', 'inherit']),\n strokeMiterlimit: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n strokeOpacity: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n strokeWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n textAnchor: PropTypes.oneOf(['start', 'middle', 'end', 'inherit']),\n textDecoration: PropTypes.oneOf(['none', 'underline', 'overline', 'line-through', 'blink', 'inherit']),\n textRendering: PropTypes.oneOf(['auto', 'optimizeSpeed', 'optimizeLegibility', 'geometricPrecision', 'inherit']),\n unicodeBidi: PropTypes.oneOf(['normal', 'embed', 'bidi-override', 'inherit']),\n visibility: PropTypes.oneOf(['visible', 'hidden', 'collapse', 'inherit']),\n wordSpacing: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n writingMode: PropTypes.oneOf(['lr-tb', 'rl-tb', 'tb-rl', 'lr', 'rl', 'tb', 'inherit']),\n transform: PropTypes.string,\n role: PropTypes.string,\n focusable: PropTypes.string,\n tabIndex: PropTypes.string,\n style: PropTypes.object,\n width: PropTypes.number,\n height: PropTypes.number,\n dx: PropTypes.number,\n dy: PropTypes.number,\n x: PropTypes.number,\n y: PropTypes.number,\n r: PropTypes.number,\n // The radius of Rectangle\n radius: PropTypes.oneOfType([PropTypes.number, PropTypes.array])\n};\nexport var EVENT_ATTRIBUTES = {\n onClick: PropTypes.func,\n onMouseDown: PropTypes.func,\n onMouseUp: PropTypes.func,\n onMouseOver: PropTypes.func,\n onMouseMove: PropTypes.func,\n onMouseOut: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onTouchEnd: PropTypes.func,\n onTouchMove: PropTypes.func,\n onTouchStart: PropTypes.func,\n onTouchCancel: PropTypes.func\n};\nvar REACT_BROWSER_EVENT_MAP = {\n click: 'onClick',\n mousedown: 'onMouseDown',\n mouseup: 'onMouseUp',\n mouseover: 'onMouseOver',\n mousemove: 'onMouseMove',\n mouseout: 'onMouseOut',\n mouseenter: 'onMouseEnter',\n mouseleave: 'onMouseLeave',\n touchcancel: 'onTouchCancel',\n touchend: 'onTouchEnd',\n touchmove: 'onTouchMove',\n touchstart: 'onTouchStart'\n};\nexport var SCALE_TYPES = ['auto', 'linear', 'pow', 'sqrt', 'log', 'identity', 'time', 'band', 'point', 'ordinal', 'quantile', 'quantize', 'utc', 'sequential', 'threshold'];\nexport var LEGEND_TYPES = ['plainline', 'line', 'square', 'rect', 'circle', 'cross', 'diamond', 'star', 'triangle', 'wye', 'none'];\n/**\n * Get the display name of a component\n * @param {Object} Comp Specified Component\n * @return {String} Display name of Component\n */\n\nexport var getDisplayName = function getDisplayName(Comp) {\n if (typeof Comp === 'string') {\n return Comp;\n }\n\n if (!Comp) {\n return '';\n }\n\n return Comp.displayName || Comp.name || 'Component';\n};\n/*\n * Find and return all matched children by type. ` + ("`" + `type`))) + (("`" + (` can be a React element class or\n * string\n */\n\nexport var findAllByType = function findAllByType(children, type) {\n var result = [];\n var types = [];\n\n if (_isArray(type)) {\n types = type.map(function (t) {\n return getDisplayName(t);\n });\n } else {\n types = [getDisplayName(type)];\n }\n\n React.Children.forEach(children, function (child) {\n var childType = child && child.type && (child.type.displayName || child.type.name);\n\n if (types.indexOf(childType) !== -1) {\n result.push(child);\n }\n });\n return result;\n};\n/*\n * Return the first matched child by type, return null otherwise.\n * ` + "`")) + (`type` + ("`" + ` can be a React element class or string.\n */\n\nexport var findChildByType = function findChildByType(children, type) {\n var result = findAllByType(children, type);\n return result && result[0];\n};\n/*\n * Create a new array of children excluding the ones matched the type\n */\n\nexport var withoutType = function withoutType(children, type) {\n var newChildren = [];\n var types;\n\n if (_isArray(type)) {\n types = type.map(function (t) {\n return getDisplayName(t);\n });\n } else {\n types = [getDisplayName(type)];\n }\n\n React.Children.forEach(children, function (child) {\n if (child && child.type && child.type.displayName && types.indexOf(child.type.displayName) !== -1) {\n return;\n }\n\n newChildren.push(child);\n });\n return newChildren;\n};\n/**\n * get all the presentation attribute of svg element\n * @param {Object} el A react element or the props of a react element\n * @return {Object} attributes or null\n */\n\nexport var getPresentationAttributes = function getPresentationAttributes(el) {\n if (!el || _isFunction(el)) {\n return null;\n }\n\n var props = React.isValidElement(el) ? el.props : el;\n\n if (!_isObject(props)) {\n return null;\n }\n\n var out = null; // eslint-disable-next-line no-restricted-syntax\n\n for (var i in props) {\n if ({}.hasOwnProperty.call(props, i) && PRESENTATION_ATTRIBUTES[i]) {\n if (!out) out = {};\n out[i] = props[i];\n }\n }\n\n return out;\n};\n\nvar getEventHandlerOfElement = function getEventHandlerOfElement(originalHandler, props) {\n return function (e) {\n originalHandler(props, e);\n return null;\n };\n};\n/**\n * get all the event attribute of svg element\n * @param {Object} el A react element or the props of a react element\n * @param {Function} newHandler New handler of event\n * @param {Boolean} wrapCallback Wrap callback and return more parameters or not\n * @return {Object} attributes or null\n */\n\n\nexport var filterEventAttributes = function filterEventAttributes(el, newHandler) {\n var wrapCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n if (!el || _isFunction(el)) {\n return null;\n }\n\n var props = React.isValidElement(el) ? el.props : el;\n\n if (!_isObject(props)) {\n return null;\n }\n\n var out = null; // eslint-disable-next-line no-restricted-syntax\n\n for (var i in props) {\n if ({}.hasOwnProperty.call(props, i) && EVENT_ATTRIBUTES[i]) {\n if (!out) out = {};\n out[i] = newHandler || (wrapCallback ? getEventHandlerOfElement(props[i], props) : props[i]);\n }\n }\n\n return out;\n};\n\nvar getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, data, index) {\n return function (e) {\n originalHandler(data, index, e);\n return null;\n };\n};\n\nexport var filterEventsOfChild = function filterEventsOfChild(props, data, index) {\n if (!_isObject(props)) {\n return null;\n }\n\n var out = null; // eslint-disable-next-line no-restricted-syntax\n\n for (var i in props) {\n if ({}.hasOwnProperty.call(props, i) && EVENT_ATTRIBUTES[i] && _isFunction(props[i])) {\n if (!out) out = {};\n out[i] = getEventHandlerOfChild(props[i], data, index);\n }\n }\n\n return out;\n};\n/**\n * validate the width and height props of a chart element\n * @param {Object} el A chart element\n * @return {Boolean} true If the props width and height are number, and greater than 0\n */\n\nexport var validateWidthHeight = function validateWidthHeight(el) {\n if (!el || !el.props) {\n return false;\n }\n\n var _el$props = el.props,\n width = _el$props.width,\n height = _el$props.height;\n\n if (!isNumber(width) || width <= 0 || !isNumber(height) || height <= 0) {\n return false;\n }\n\n return true;\n};\nexport var isSsr = function isSsr() {\n return !(typeof window !== 'undefined' && window.document && window.document.createElement && window.setTimeout);\n};\nvar SVG_TAGS = ['a', 'altGlyph', 'altGlyphDef', 'altGlyphItem', 'animate', 'animateColor', 'animateMotion', 'animateTransform', 'circle', 'clipPath', 'color-profile', 'cursor', 'defs', 'desc', 'ellipse', 'feBlend', 'feColormatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence', 'filter', 'font', 'font-face', 'font-face-format', 'font-face-name', 'font-face-url', 'foreignObject', 'g', 'glyph', 'glyphRef', 'hkern', 'image', 'line', 'lineGradient', 'marker', 'mask', 'metadata', 'missing-glyph', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'script', 'set', 'stop', 'style', 'svg', 'switch', 'symbol', 'text', 'textPath', 'title', 'tref', 'tspan', 'use', 'view', 'vkern'];\n\nvar isSvgElement = function isSvgElement(child) {\n return child && child.type && _isString(child.type) && SVG_TAGS.indexOf(child.type) >= 0;\n};\n/**\n * Filter all the svg elements of children\n * @param {Array} children The children of a react element\n * @return {Array} All the svg elements\n */\n\n\nexport var filterSvgElements = function filterSvgElements(children) {\n var svgElements = [];\n React.Children.forEach(children, function (entry) {\n if (entry && entry.type && _isString(entry.type) && SVG_TAGS.indexOf(entry.type) >= 0) {\n svgElements.push(entry);\n }\n });\n return svgElements;\n};\nexport var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {\n if (_isNil(nextChild) && _isNil(prevChild)) {\n return true;\n }\n\n if (!_isNil(nextChild) && !_isNil(prevChild)) {\n var _ref = nextChild.props || {},\n nextChildren = _ref.children,\n nextProps = _objectWithoutProperties(_ref, [\"children\"]);\n\n var _ref2 = prevChild.props || {},\n prevChildren = _ref2.children,\n prevProps = _objectWithoutProperties(_ref2, [\"children\"]);\n\n if (nextChildren && prevChildren) {\n // eslint-disable-next-line no-use-before-define\n return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);\n }\n\n if (!nextChildren && !prevChildren) {\n return shallowEqual(nextProps, prevProps);\n }\n\n return false;\n }\n\n return false;\n};\n/**\n * Wether props of children changed\n * @param {Object} nextChildren The latest children\n * @param {Object} prevChildren The prev children\n * @return {Boolean} equal or not\n */\n\nexport var isChildrenEqual = function isChildrenEqual(nextChildren, prevChildren) {\n if (nextChildren === prevChildren) {\n return true;\n }\n\n if (Children.count(nextChildren) !== Children.count(prevChildren)) {\n return false;\n }\n\n var count = Children.count(nextChildren);\n\n if (count === 0) {\n return true;\n }\n\n if (count === 1) {\n return isSingleChildEqual(_isArray(nextChildren) ? nextChildren[0] : nextChildren, _isArray(prevChildren) ? prevChildren[0] : prevChildren);\n }\n\n for (var i = 0; i < count; i++) {\n var nextChild = nextChildren[i];\n var prevChild = prevChildren[i];\n\n if (_isArray(nextChild) || _isArray(prevChild)) {\n if (!isChildrenEqual(nextChild, prevChild)) {\n return false;\n }\n } else if (!isSingleChildEqual(nextChild, prevChild)) {\n return false;\n }\n }\n\n return true;\n};\nexport var renderByOrder = function renderByOrder(children, renderMap) {\n var elements = [];\n var record = {};\n Children.forEach(children, function (child, index) {\n if (child && isSvgElement(child)) {\n elements.push(child);\n } else if (child && renderMap[getDisplayName(child.type)]) {\n var displayName = getDisplayName(child.type);\n var _renderMap$displayNam = renderMap[displayName],\n handler = _renderMap$displayNam.handler,\n once = _renderMap$displayNam.once;\n\n if (once && !record[displayName] || !once) {\n var results = handler(child, displayName, index);\n\n if (_isArray(results)) {\n elements = [elements].concat(_toConsumableArray(results));\n } else {\n elements.push(results);\n }\n\n record[displayName] = true;\n }\n }\n });\n return elements;\n};\nexport var getReactEventByType = function getReactEventByType(e) {\n var type = e && e.type;\n\n if (type && REACT_BROWSER_EVENT_MAP[type]) {\n return REACT_BROWSER_EVENT_MAP[type];\n }\n\n return null;\n};\nexport var parseChildIndex = function parseChildIndex(child, children) {\n var result = -1;\n Children.forEach(children, function (entry, index) {\n if (entry === child) {\n result = index;\n }\n });\n return result;\n};",
"require('../modules/es6.math.acosh');\nrequire('../modules/es6.math.asinh');\nrequire('../modules/es6.math.atanh');\nrequire('../modules/es6.math.cbrt');\nrequire('../modules/es6.math.clz32');\nrequire('../modules/es6.math.cosh');\nrequire('../modules/es6.math.expm1');\nrequire('../modules/es6.math.fround');\nrequire('../modules/es6.math.hypot');\nrequire('../modules/es6.math.imul');\nrequire('../modules/es6.math.log10');\nrequire('../modules/es6.math.log1p');\nrequire('../modules/es6.math.log2');\nrequire('../modules/es6.math.sign');\nrequire('../modules/es6.math.sinh');\nrequire('../modules/es6.math.tanh');\nrequire('../modules/es6.math.trunc');\nmodule.exports = require('../modules/_core').Math;\n",
"require('../modules/es6.number.constructor');\nrequire('../modules/es6.number.to-fixed');\nrequire('../modules/es6.number.to-precision');\nrequire('../modules/es6.number.epsilon');\nrequire('../modules/es6.number.is-finite');\nrequire('../modules/es6.number.is-integer');\nrequire('../modules/es6.number.is-nan');\nrequire('../modules/es6.number.is-safe-integer');\nrequire('../modules/es6.number.max-safe-integer');\nrequire('../modules/es6.number.min-safe-integer');\nrequire('../modules/es6.number.parse-float');\nrequire('../modules/es6.number.parse-int');\nmodule.exports = require('../modules/_core').Number;\n",
"module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n",
"var cof = require('./_cof');\nmodule.exports = function (it, msg) {\n if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg);\n return +it;\n};\n",
"var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n",
"// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n",
"var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n",
"var core = module.exports = { version: '2.5.7' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n",
"// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n",
"// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n",
"// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n",
"var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n",
"// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n",
"var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `)))) + ((("`" + `library`) + ("`" + (`\nmodule.exports = $export;\n",
"module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n",
"// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n",
"var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n",
"var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n",
"var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n",
"module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n",
"var isObject = require('./_is-object');\nvar setPrototypeOf = require('./_set-proto').set;\nmodule.exports = function (that, target, C) {\n var S = target.constructor;\n var P;\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n } return that;\n};\n",
"// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n",
"// 20.1.2.3 Number.isInteger(number)\nvar isObject = require('./_is-object');\nvar floor = Math.floor;\nmodule.exports = function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n",
"module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n",
"module.exports = false;\n",
"// 20.2.2.14 Math.expm1(x)\nvar $expm1 = Math.expm1;\nmodule.exports = (!$expm1\n // Old FF bug\n || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168\n // Tor Browser bug\n || $expm1(-2e-17) != -2e-17\n) ? function expm1(x) {\n return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;\n} : $expm1;\n",
"// 20.2.2.16 Math.fround(x)\nvar sign = require('./_math-sign');\nvar pow = Math.pow;\nvar EPSILON = pow(2, -52);\nvar EPSILON32 = pow(2, -23);\nvar MAX32 = pow(2, 127) * (2 - EPSILON32);\nvar MIN32 = pow(2, -126);\n\nvar roundTiesToEven = function (n) {\n return n + 1 / EPSILON - 1 / EPSILON;\n};\n\nmodule.exports = Math.fround || function fround(x) {\n var $abs = Math.abs(x);\n var $sign = sign(x);\n var a, result;\n if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;\n a = (1 + EPSILON32 / EPSILON) * $abs;\n result = a - (a - $abs);\n // eslint-disable-next-line no-self-compare\n if (result > MAX32 || result != result) return $sign * Infinity;\n return $sign * result;\n};\n",
"// 20.2.2.20 Math.log1p(x)\nmodule.exports = Math.log1p || function log1p(x) {\n return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);\n};\n",
"// 20.2.2.28 Math.sign(x)\nmodule.exports = Math.sign || function sign(x) {\n // eslint-disable-next-line no-self-compare\n return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;\n};\n",
"// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake ` + "`"))) + ((`null` + ("`" + ` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n",
"var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n",
"var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n",
"var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n",
"// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n",
"var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n",
"// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n",
"exports.f = {}.propertyIsEnumerable;\n",
"var $parseFloat = require('./_global').parseFloat;\nvar $trim = require('./_string-trim').trim;\n\nmodule.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str) {\n var string = $trim(String(str), 3);\n var result = $parseFloat(string);\n return result === 0 && string.charAt(0) == '-' ? -0 : result;\n} : $parseFloat;\n",
"var $parseInt = require('./_global').parseInt;\nvar $trim = require('./_string-trim').trim;\nvar ws = require('./_string-ws');\nvar hex = /^[-+]?0[xX]/;\n\nmodule.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {\n var string = $trim(String(str), 3);\n return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));\n} : $parseInt;\n",
"module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n",
"var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n",
"// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n",
"var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n",
"var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2018 Denis Pushkarev (zloirock.ru)'\n});\n",
"'use strict';\nvar toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n\nmodule.exports = function repeat(count) {\n var str = String(defined(this));\n var res = '';\n var n = toInteger(count);\n if (n < 0 || n == Infinity) throw RangeError(\"Count can't be negative\");\n for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;\n return res;\n};\n",
"var $export = require('./_export');\nvar defined = require('./_defined');\nvar fails = require('./_fails');\nvar spaces = require('./_string-ws');\nvar space = '[' + spaces + ']';\nvar non = '\\u200b\\u0085';\nvar ltrim = RegExp('^' + space + space + '*');\nvar rtrim = RegExp(space + space + '*$');\n\nvar exporter = function (KEY, exec, ALIAS) {\n var exp = {};\n var FORCE = fails(function () {\n return !!spaces[KEY]() || non[KEY]() != non;\n });\n var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];\n if (ALIAS) exp[ALIAS] = fn;\n $export($export.P + $export.F * FORCE, 'String', exp);\n};\n\n// 1 -> String#trimLeft\n// 2 -> String#trimRight\n// 3 -> String#trim\nvar trim = exporter.trim = function (string, TYPE) {\n string = String(defined(string));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n};\n\nmodule.exports = exporter;\n",
"module.exports = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003' +\n '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n",
"var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n",
"// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n",
"// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n",
"// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n",
"// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n",
"var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n",
"// 20.2.2.3 Math.acosh(x)\nvar $export = require('./_export');\nvar log1p = require('./_math-log1p');\nvar sqrt = Math.sqrt;\nvar $acosh = Math.acosh;\n\n$export($export.S + $export.F * !($acosh\n // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509\n && Math.floor($acosh(Number.MAX_VALUE)) == 710\n // Tor Browser bug: Math.acosh(Infinity) -> NaN\n && $acosh(Infinity) == Infinity\n), 'Math', {\n acosh: function acosh(x) {\n return (x = +x) < 1 ? NaN : x > 94906265.62425156\n ? Math.log(x) + Math.LN2\n : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));\n }\n});\n",
"// 20.2.2.5 Math.asinh(x)\nvar $export = require('./_export');\nvar $asinh = Math.asinh;\n\nfunction asinh(x) {\n return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));\n}\n\n// Tor Browser bug: Math.asinh(0) -> -0\n$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });\n",
"// 20.2.2.7 Math.atanh(x)\nvar $export = require('./_export');\nvar $atanh = Math.atanh;\n\n// Tor Browser bug: Math.atanh(-0) -> 0\n$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {\n atanh: function atanh(x) {\n return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;\n }\n});\n",
"// 20.2.2.9 Math.cbrt(x)\nvar $export = require('./_export');\nvar sign = require('./_math-sign');\n\n$export($export.S, 'Math', {\n cbrt: function cbrt(x) {\n return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);\n }\n});\n",
"// 20.2.2.11 Math.clz32(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', {\n clz32: function clz32(x) {\n return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;\n }\n});\n",
"// 20.2.2.12 Math.cosh(x)\nvar $export = require('./_export');\nvar exp = Math.exp;\n\n$export($export.S, 'Math', {\n cosh: function cosh(x) {\n return (exp(x = +x) + exp(-x)) / 2;\n }\n});\n",
"// 20.2.2.14 Math.expm1(x)\nvar $export = require('./_export');\nvar $expm1 = require('./_math-expm1');\n\n$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });\n",
"// 20.2.2.16 Math.fround(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', { fround: require('./_math-fround') });\n",
"// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])\nvar $export = require('./_export');\nvar abs = Math.abs;\n\n$export($export.S, 'Math', {\n hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars\n var sum = 0;\n var i = 0;\n var aLen = arguments.length;\n var larg = 0;\n var arg, div;\n while (i < aLen) {\n arg = abs(arguments[i++]);\n if (larg < arg) {\n div = larg / arg;\n sum = sum * div * div + 1;\n larg = arg;\n } else if (arg > 0) {\n div = arg / larg;\n sum += div * div;\n } else sum += arg;\n }\n return larg === Infinity ? Infinity : larg * Math.sqrt(sum);\n }\n});\n",
"// 20.2.2.18 Math.imul(x, y)\nvar $export = require('./_export');\nvar $imul = Math.imul;\n\n// some WebKit versions fails with big numbers, some has wrong arity\n$export($export.S + $export.F * require('./_fails')(function () {\n return $imul(0xffffffff, 5) != -5 || $imul.length != 2;\n}), 'Math', {\n imul: function imul(x, y) {\n var UINT16 = 0xffff;\n var xn = +x;\n var yn = +y;\n var xl = UINT16 & xn;\n var yl = UINT16 & yn;\n return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);\n }\n});\n",
"// 20.2.2.21 Math.log10(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', {\n log10: function log10(x) {\n return Math.log(x) * Math.LOG10E;\n }\n});\n",
"// 20.2.2.20 Math.log1p(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', { log1p: require('./_math-log1p') });\n",
"// 20.2.2.22 Math.log2(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', {\n log2: function log2(x) {\n return Math.log(x) / Math.LN2;\n }\n});\n",
"// 20.2.2.28 Math.sign(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', { sign: require('./_math-sign') });\n",
"// 20.2.2.30 Math.sinh(x)\nvar $export = require('./_export');\nvar expm1 = require('./_math-expm1');\nvar exp = Math.exp;\n\n// V8 near Chromium 38 has a problem with very small numbers\n$export($export.S + $export.F * require('./_fails')(function () {\n return !Math.sinh(-2e-17) != -2e-17;\n}), 'Math', {\n sinh: function sinh(x) {\n return Math.abs(x = +x) < 1\n ? (expm1(x) - expm1(-x)) / 2\n : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);\n }\n});\n",
"// 20.2.2.33 Math.tanh(x)\nvar $export = require('./_export');\nvar expm1 = require('./_math-expm1');\nvar exp = Math.exp;\n\n$export($export.S, 'Math', {\n tanh: function tanh(x) {\n var a = expm1(x = +x);\n var b = expm1(-x);\n return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));\n }\n});\n",
"// 20.2.2.34 Math.trunc(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', {\n trunc: function trunc(it) {\n return (it > 0 ? Math.floor : Math.ceil)(it);\n }\n});\n",
"'use strict';\nvar global = require('./_global');\nvar has = require('./_has');\nvar cof = require('./_cof');\nvar inheritIfRequired = require('./_inherit-if-required');\nvar toPrimitive = require('./_to-primitive');\nvar fails = require('./_fails');\nvar gOPN = require('./_object-gopn').f;\nvar gOPD = require('./_object-gopd').f;\nvar dP = require('./_object-dp').f;\nvar $trim = require('./_string-trim').trim;\nvar NUMBER = 'Number';\nvar $Number = global[NUMBER];\nvar Base = $Number;\nvar proto = $Number.prototype;\n// Opera ~12 has broken Object#toString\nvar BROKEN_COF = cof(require('./_object-create')(proto)) == NUMBER;\nvar TRIM = 'trim' in String.prototype;\n\n// 7.1.3 ToNumber(argument)\nvar toNumber = function (argument) {\n var it = toPrimitive(argument, false);\n if (typeof it == 'string' && it.length > 2) {\n it = TRIM ? it.trim() : $trim(it, 3);\n var first = it.charCodeAt(0);\n var third, radix, maxCode;\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i\n default: return +it;\n }\n for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {\n code = digits.charCodeAt(i);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\nif (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {\n $Number = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var that = this;\n return that instanceof $Number\n // check on 1..constructor(foo) case\n && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)\n ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);\n };\n for (var keys = require('./_descriptors') ? gOPN(Base) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES6 (in case, if modules with ES6 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (has(Base, key = keys[j]) && !has($Number, key)) {\n dP($Number, key, gOPD(Base, key));\n }\n }\n $Number.prototype = proto;\n proto.constructor = $Number;\n require('./_redefine')(global, NUMBER, $Number);\n}\n",
"// 20.1.2.1 Number.EPSILON\nvar $export = require('./_export');\n\n$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });\n",
"// 20.1.2.2 Number.isFinite(number)\nvar $export = require('./_export');\nvar _isFinite = require('./_global').isFinite;\n\n$export($export.S, 'Number', {\n isFinite: function isFinite(it) {\n return typeof it == 'number' && _isFinite(it);\n }\n});\n",
"// 20.1.2.3 Number.isInteger(number)\nvar $export = require('./_export');\n\n$export($export.S, 'Number', { isInteger: require('./_is-integer') });\n",
"// 20.1.2.4 Number.isNaN(number)\nvar $export = require('./_export');\n\n$export($export.S, 'Number', {\n isNaN: function isNaN(number) {\n // eslint-disable-next-line no-self-compare\n return number != number;\n }\n});\n",
"// 20.1.2.5 Number.isSafeInteger(number)\nvar $export = require('./_export');\nvar isInteger = require('./_is-integer');\nvar abs = Math.abs;\n\n$export($export.S, 'Number', {\n isSafeInteger: function isSafeInteger(number) {\n return isInteger(number) && abs(number) <= 0x1fffffffffffff;\n }\n});\n",
"// 20.1.2.6 Number.MAX_SAFE_INTEGER\nvar $export = require('./_export');\n\n$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });\n",
"// 20.1.2.10 Number.MIN_SAFE_INTEGER\nvar $export = require('./_export');\n\n$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });\n",
"var $export = require('./_export');\nvar $parseFloat = require('./_parse-float');\n// 20.1.2.12 Number.parseFloat(string)\n$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat });\n",
"var $export = require('./_export');\nvar $parseInt = require('./_parse-int');\n// 20.1.2.13 Number.parseInt(string, radix)\n$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt });\n",
"'use strict';\nvar $export = require('./_export');\nvar toInteger = require('./_to-integer');\nvar aNumberValue = require('./_a-number-value');\nvar repeat = require('./_string-repeat');\nvar $toFixed = 1.0.toFixed;\nvar floor = Math.floor;\nvar data = [0, 0, 0, 0, 0, 0];\nvar ERROR = 'Number.toFixed: incorrect invocation!';\nvar ZERO = '0';\n\nvar multiply = function (n, c) {\n var i = -1;\n var c2 = c;\n while (++i < 6) {\n c2 += n * data[i];\n data[i] = c2 % 1e7;\n c2 = floor(c2 / 1e7);\n }\n};\nvar divide = function (n) {\n var i = 6;\n var c = 0;\n while (--i >= 0) {\n c += data[i];\n data[i] = floor(c / n);\n c = (c % n) * 1e7;\n }\n};\nvar numToString = function () {\n var i = 6;\n var s = '';\n while (--i >= 0) {\n if (s !== '' || i === 0 || data[i] !== 0) {\n var t = String(data[i]);\n s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;\n }\n } return s;\n};\nvar pow = function (x, n, acc) {\n return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);\n};\nvar log = function (x) {\n var n = 0;\n var x2 = x;\n while (x2 >= 4096) {\n n += 12;\n x2 /= 4096;\n }\n while (x2 >= 2) {\n n += 1;\n x2 /= 2;\n } return n;\n};\n\n$export($export.P + $export.F * (!!$toFixed && (\n 0.00008.toFixed(3) !== '0.000' ||\n 0.9.toFixed(0) !== '1' ||\n 1.255.toFixed(2) !== '1.25' ||\n 1000000000000000128.0.toFixed(0) !== '1000000000000000128'\n) || !require('./_fails')(function () {\n // V8 ~ Android 4.3-\n $toFixed.call({});\n})), 'Number', {\n toFixed: function toFixed(fractionDigits) {\n var x = aNumberValue(this, ERROR);\n var f = toInteger(fractionDigits);\n var s = '';\n var m = ZERO;\n var e, z, j, k;\n if (f < 0 || f > 20) throw RangeError(ERROR);\n // eslint-disable-next-line no-self-compare\n if (x != x) return 'NaN';\n if (x <= -1e21 || x >= 1e21) return String(x);\n if (x < 0) {\n s = '-';\n x = -x;\n }\n if (x > 1e-21) {\n e = log(x * pow(2, 69, 1)) - 69;\n z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);\n z *= 0x10000000000000;\n e = 52 - e;\n if (e > 0) {\n multiply(0, z);\n j = f;\n while (j >= 7) {\n multiply(1e7, 0);\n j -= 7;\n }\n multiply(pow(10, j, 1), 0);\n j = e - 1;\n while (j >= 23) {\n divide(1 << 23);\n j -= 23;\n }\n divide(1 << j);\n multiply(1, 1);\n divide(2);\n m = numToString();\n } else {\n multiply(0, z);\n multiply(1 << -e, 0);\n m = numToString() + repeat.call(ZERO, f);\n }\n }\n if (f > 0) {\n k = m.length;\n m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));\n } else {\n m = s + m;\n } return m;\n }\n});\n",
"'use strict';\nvar $export = require('./_export');\nvar $fails = require('./_fails');\nvar aNumberValue = require('./_a-number-value');\nvar $toPrecision = 1.0.toPrecision;\n\n$export($export.P + $export.F * ($fails(function () {\n // IE7-\n return $toPrecision.call(1, undefined) !== '1';\n}) || !$fails(function () {\n // V8 ~ Android 4.3-\n $toPrecision.call({});\n})), 'Number', {\n toPrecision: function toPrecision(precision) {\n var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');\n return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);\n }\n});\n",
"/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `)) + ("`" + (`prop-types` + "`")))))) + (((((` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in ` + "`") + (`./factoryWithTypeCheckers.js` + ("`" + `.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n",
"/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `))) + (("`" + (`prop-types` + "`")) + (` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using ` + ("`" + `prop-types`)))) + ((("`" + ` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n",
"/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n",
"/**\n * Module dependencies\n */\nvar balanced = require(\"balanced-match\")\nvar reduceFunctionCall = require(\"reduce-function-call\")\nvar mexp = require(\"math-expression-evaluator\")\n\n/**\n * Constantes\n */\nvar MAX_STACK = 100 // should be enough for a single calc()...\nvar NESTED_CALC_RE = /(\\+|\\-|\\*|\\\\|[^a-z]|)(\\s*)(\\()/g\n\n/**\n * Global variables\n */\nvar stack\n\n/**\n * Expose reduceCSSCalc plugin\n *\n * @type {Function}\n */\nmodule.exports = reduceCSSCalc\n\n/**\n * Reduce CSS calc() in a string, whenever it's possible\n *\n * @param {String} value css input\n */\nfunction reduceCSSCalc(value, decimalPrecision) {\n stack = 0\n decimalPrecision = Math.pow(10, decimalPrecision === undefined ? 5 : decimalPrecision)\n\n // Allow calc() on multiple lines\n value = value.replace(/\\n+/g, \" \")\n\n /**\n * Evaluates an expression\n *\n * @param {String} expression\n * @returns {String}\n */\n function evaluateExpression (expression, functionIdentifier, call) {\n if (stack++ > MAX_STACK) {\n stack = 0\n throw new Error(\"Call stack overflow for \" + call)\n }\n\n if (expression === \"\") {\n throw new Error(functionIdentifier + \"(): '\" + call + \"' must contain a non-whitespace string\")\n }\n\n expression = evaluateNestedExpression(expression, call)\n\n var units = getUnitsInExpression(expression)\n\n // If the expression contains multiple units or CSS variables,\n // then let the expression be (i.e. browser calc())\n if (units.length > 1 || expression.indexOf(\"var(\") > -1) {\n return functionIdentifier + \"(\" + expression + \")\"\n }\n\n var unit = units[0] || \"\"\n\n if (unit === \"%\") {\n // Convert percentages to numbers, to handle expressions like: 50% * 50% (will become: 25%):\n // console.log(expression)\n expression = expression.replace(/\\b[0-9\\.]+%/g, function(percent) {\n return parseFloat(percent.slice(0, -1)) * 0.01\n })\n }\n\n // Remove units in expression:\n var toEvaluate = expression.replace(new RegExp(unit, \"gi\"), \"\")\n var result\n\n try {\n result = mexp.eval(toEvaluate)\n }\n catch (e) {\n return functionIdentifier + \"(\" + expression + \")\"\n }\n\n // Transform back to a percentage result:\n if (unit === \"%\") {\n result *= 100\n }\n\n // adjust rounding shit\n // (0.1 * 0.2 === 0.020000000000000004)\n if (functionIdentifier.length || unit === \"%\") {\n result = Math.round(result * decimalPrecision) / decimalPrecision\n }\n\n // Add unit\n result += unit\n\n return result\n }\n\n /**\n * Evaluates nested expressions\n *\n * @param {String} expression\n * @returns {String}\n */\n function evaluateNestedExpression(expression, call) {\n // Remove the calc part from nested expressions to ensure\n // better browser compatibility\n expression = expression.replace(/((?:\\-[a-z]+\\-)?calc)/g, \"\")\n var evaluatedPart = \"\"\n var nonEvaluatedPart = expression\n var matches\n while ((matches = NESTED_CALC_RE.exec(nonEvaluatedPart))) {\n if (matches[0].index > 0) {\n evaluatedPart += nonEvaluatedPart.substring(0, matches[0].index)\n }\n\n var balancedExpr = balanced(\"(\", \")\", nonEvaluatedPart.substring([0].index))\n if (balancedExpr.body === \"\") {\n throw new Error(\"'\" + expression + \"' must contain a non-whitespace string\")\n }\n\n var evaluated = evaluateExpression(balancedExpr.body, \"\", call)\n\n evaluatedPart += balancedExpr.pre + evaluated\n nonEvaluatedPart = balancedExpr.post\n }\n\n return evaluatedPart + nonEvaluatedPart\n }\n\n return reduceFunctionCall(value, /((?:\\-[a-z]+\\-)?calc)\\(/, evaluateExpression)\n}\n\n/**\n * Checks what units are used in an expression\n *\n * @param {String} expression\n * @returns {Array}\n */\n\nfunction getUnitsInExpression(expression) {\n var uniqueUnits = []\n var uniqueLowerCaseUnits = []\n var unitRegEx = /[\\.0-9]([%a-z]+)/gi\n var matches = unitRegEx.exec(expression)\n\n while (matches) {\n if (!matches || !matches[1]) {\n continue\n }\n\n if (uniqueLowerCaseUnits.indexOf(matches[1].toLowerCase()) === -1) {\n uniqueUnits.push(matches[1])\n uniqueLowerCaseUnits.push(matches[1].toLowerCase())\n }\n\n matches = unitRegEx.exec(expression)\n }\n\n return uniqueUnits\n}\n",
"/*\n * Module dependencies\n */\nvar balanced = require(\"balanced-match\")\n\n/**\n * Expose `) + ("`" + (`reduceFunctionCall` + "`"))) + ((`\n *\n * @type {Function}\n */\nmodule.exports = reduceFunctionCall\n\n/**\n * Walkthrough all expressions, evaluate them and insert them into the declaration\n *\n * @param {Array} expressions\n * @param {Object} declaration\n */\n\nfunction reduceFunctionCall(string, functionRE, callback) {\n var call = string\n return getFunctionCalls(string, functionRE).reduce(function(string, obj) {\n return string.replace(obj.functionIdentifier + \"(\" + obj.matches.body + \")\", evalFunctionCall(obj.matches.body, obj.functionIdentifier, callback, call, functionRE))\n }, string)\n}\n\n/**\n * Parses expressions in a value\n *\n * @param {String} value\n * @returns {Array}\n * @api private\n */\n\nfunction getFunctionCalls(call, functionRE) {\n var expressions = []\n\n var fnRE = typeof functionRE === \"string\" ? new RegExp(\"\\\\b(\" + functionRE + \")\\\\(\") : functionRE\n do {\n var searchMatch = fnRE.exec(call)\n if (!searchMatch) {\n return expressions\n }\n if (searchMatch[1] === undefined) {\n throw new Error(\"Missing the first couple of parenthesis to get the function identifier in \" + functionRE)\n }\n var fn = searchMatch[1]\n var startIndex = searchMatch.index\n var matches = balanced(\"(\", \")\", call.substring(startIndex))\n\n if (!matches || matches.start !== searchMatch[0].length - 1) {\n throw new SyntaxError(fn + \"(): missing closing ')' in the value '\" + call + \"'\")\n }\n\n expressions.push({matches: matches, functionIdentifier: fn})\n call = matches.post\n }\n while (fnRE.test(call))\n\n return expressions\n}\n\n/**\n * Evaluates an expression\n *\n * @param {String} expression\n * @returns {String}\n * @api private\n */\n\nfunction evalFunctionCall (string, functionIdentifier, callback, call, functionRE) {\n // allow recursivity\n return callback(reduceFunctionCall(string, functionRE, callback), functionIdentifier, call)\n}\n",
"/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\r\n/* eslint-disable require-jsdoc, valid-jsdoc */\r\nvar MapShim = (function () {\r\n if (typeof Map !== 'undefined') {\r\n return Map;\r\n }\r\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\r\n function getIndex(arr, key) {\r\n var result = -1;\r\n arr.some(function (entry, index) {\r\n if (entry[0] === key) {\r\n result = index;\r\n return true;\r\n }\r\n return false;\r\n });\r\n return result;\r\n }\r\n return /** @class */ (function () {\r\n function class_1() {\r\n this.__entries__ = [];\r\n }\r\n Object.defineProperty(class_1.prototype, \"size\", {\r\n /**\r\n * @returns {boolean}\r\n */\r\n get: function () {\r\n return this.__entries__.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\r\n class_1.prototype.get = function (key) {\r\n var index = getIndex(this.__entries__, key);\r\n var entry = this.__entries__[index];\r\n return entry && entry[1];\r\n };\r\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\r\n class_1.prototype.set = function (key, value) {\r\n var index = getIndex(this.__entries__, key);\r\n if (~index) {\r\n this.__entries__[index][1] = value;\r\n }\r\n else {\r\n this.__entries__.push([key, value]);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.delete = function (key) {\r\n var entries = this.__entries__;\r\n var index = getIndex(entries, key);\r\n if (~index) {\r\n entries.splice(index, 1);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.has = function (key) {\r\n return !!~getIndex(this.__entries__, key);\r\n };\r\n /**\r\n * @returns {void}\r\n */\r\n class_1.prototype.clear = function () {\r\n this.__entries__.splice(0);\r\n };\r\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\r\n class_1.prototype.forEach = function (callback, ctx) {\r\n if (ctx === void 0) { ctx = null; }\r\n for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {\r\n var entry = _a[_i];\r\n callback.call(ctx, entry[1], entry[0]);\r\n }\r\n };\r\n return class_1;\r\n }());\r\n})();\n\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\r\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\n\n// Returns global object of a current environment.\r\nvar global$1 = (function () {\r\n if (typeof global !== 'undefined' && global.Math === Math) {\r\n return global;\r\n }\r\n if (typeof self !== 'undefined' && self.Math === Math) {\r\n return self;\r\n }\r\n if (typeof window !== 'undefined' && window.Math === Math) {\r\n return window;\r\n }\r\n // eslint-disable-next-line no-new-func\r\n return Function('return this')();\r\n})();\n\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\r\nvar requestAnimationFrame$1 = (function () {\r\n if (typeof requestAnimationFrame === 'function') {\r\n // It's required to use a bounded function because IE sometimes throws\r\n // an \"Invalid calling object\" error if rAF is invoked without the global\r\n // object on the left hand side.\r\n return requestAnimationFrame.bind(global$1);\r\n }\r\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\r\n})();\n\n// Defines minimum timeout before adding a trailing call.\r\nvar trailingTimeout = 2;\r\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\r\nfunction throttle (callback, delay) {\r\n var leadingCall = false, trailingCall = false, lastCallTime = 0;\r\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\r\n function resolvePending() {\r\n if (leadingCall) {\r\n leadingCall = false;\r\n callback();\r\n }\r\n if (trailingCall) {\r\n proxy();\r\n }\r\n }\r\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\r\n function timeoutCallback() {\r\n requestAnimationFrame$1(resolvePending);\r\n }\r\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\r\n function proxy() {\r\n var timeStamp = Date.now();\r\n if (leadingCall) {\r\n // Reject immediately following calls.\r\n if (timeStamp - lastCallTime < trailingTimeout) {\r\n return;\r\n }\r\n // Schedule new call to be in invoked when the pending one is resolved.\r\n // This is important for \"transitions\" which never actually start\r\n // immediately so there is a chance that we might miss one if change\r\n // happens amids the pending invocation.\r\n trailingCall = true;\r\n }\r\n else {\r\n leadingCall = true;\r\n trailingCall = false;\r\n setTimeout(timeoutCallback, delay);\r\n }\r\n lastCallTime = timeStamp;\r\n }\r\n return proxy;\r\n}\n\n// Minimum delay before invoking the update of observers.\r\nvar REFRESH_DELAY = 20;\r\n// A list of substrings of CSS properties used to find transition events that\r\n// might affect dimensions of observed elements.\r\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\r\n// Check if MutationObserver is available.\r\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\r\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\r\nvar ResizeObserverController = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserverController.\r\n *\r\n * @private\r\n */\r\n function ResizeObserverController() {\r\n /**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\r\n this.connected_ = false;\r\n /**\r\n * Tells that controller has subscribed for Mutation Events.\r\n *\r\n * @private {boolean}\r\n */\r\n this.mutationEventsAdded_ = false;\r\n /**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\r\n this.mutationsObserver_ = null;\r\n /**\r\n * A list of connected observers.\r\n *\r\n * @private {Array}\r\n */\r\n this.observers_ = [];\r\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\r\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\r\n }\r\n /**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.addObserver = function (observer) {\r\n if (!~this.observers_.indexOf(observer)) {\r\n this.observers_.push(observer);\r\n }\r\n // Add listeners if they haven't been added yet.\r\n if (!this.connected_) {\r\n this.connect_();\r\n }\r\n };\r\n /**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.removeObserver = function (observer) {\r\n var observers = this.observers_;\r\n var index = observers.indexOf(observer);\r\n // Remove observer if it's present in registry.\r\n if (~index) {\r\n observers.splice(index, 1);\r\n }\r\n // Remove listeners if controller has no connected observers.\r\n if (!observers.length && this.connected_) {\r\n this.disconnect_();\r\n }\r\n };\r\n /**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.refresh = function () {\r\n var changesDetected = this.updateObservers_();\r\n // Continue running updates if changes have been detected as there might\r\n // be future ones caused by CSS transitions.\r\n if (changesDetected) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\r\n ResizeObserverController.prototype.updateObservers_ = function () {\r\n // Collect observers that have active observations.\r\n var activeObservers = this.observers_.filter(function (observer) {\r\n return observer.gatherActive(), observer.hasActive();\r\n });\r\n // Deliver notifications in a separate cycle in order to avoid any\r\n // collisions between observers, e.g. when multiple instances of\r\n // ResizeObserver are tracking the same element and the callback of one\r\n // of them changes content dimensions of the observed target. Sometimes\r\n // this may result in notifications being blocked for the rest of observers.\r\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\r\n return activeObservers.length > 0;\r\n };\r\n /**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.connect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already added.\r\n if (!isBrowser || this.connected_) {\r\n return;\r\n }\r\n // Subscription to the \"Transitionend\" event is used as a workaround for\r\n // delayed transitions. This way it's possible to capture at least the\r\n // final state of an element.\r\n document.addEventListener('transitionend', this.onTransitionEnd_);\r\n window.addEventListener('resize', this.refresh);\r\n if (mutationObserverSupported) {\r\n this.mutationsObserver_ = new MutationObserver(this.refresh);\r\n this.mutationsObserver_.observe(document, {\r\n attributes: true,\r\n childList: true,\r\n characterData: true,\r\n subtree: true\r\n });\r\n }\r\n else {\r\n document.addEventListener('DOMSubtreeModified', this.refresh);\r\n this.mutationEventsAdded_ = true;\r\n }\r\n this.connected_ = true;\r\n };\r\n /**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.disconnect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already removed.\r\n if (!isBrowser || !this.connected_) {\r\n return;\r\n }\r\n document.removeEventListener('transitionend', this.onTransitionEnd_);\r\n window.removeEventListener('resize', this.refresh);\r\n if (this.mutationsObserver_) {\r\n this.mutationsObserver_.disconnect();\r\n }\r\n if (this.mutationEventsAdded_) {\r\n document.removeEventListener('DOMSubtreeModified', this.refresh);\r\n }\r\n this.mutationsObserver_ = null;\r\n this.mutationEventsAdded_ = false;\r\n this.connected_ = false;\r\n };\r\n /**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {\r\n var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;\r\n // Detect whether transition may affect dimensions of an element.\r\n var isReflowProperty = transitionKeys.some(function (key) {\r\n return !!~propertyName.indexOf(key);\r\n });\r\n if (isReflowProperty) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\r\n ResizeObserverController.getInstance = function () {\r\n if (!this.instance_) {\r\n this.instance_ = new ResizeObserverController();\r\n }\r\n return this.instance_;\r\n };\r\n /**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\r\n ResizeObserverController.instance_ = null;\r\n return ResizeObserverController;\r\n}());\n\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\r\nvar defineConfigurable = (function (target, props) {\r\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n Object.defineProperty(target, key, {\r\n value: props[key],\r\n enumerable: false,\r\n writable: false,\r\n configurable: true\r\n });\r\n }\r\n return target;\r\n});\n\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\r\nvar getWindowOf = (function (target) {\r\n // Assume that the element is an instance of Node, which means that it\r\n // has the \"ownerDocument\" property from which we can retrieve a\r\n // corresponding global object.\r\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\r\n // Return the local global object if it's not possible extract one from\r\n // provided element.\r\n return ownerGlobal || global$1;\r\n});\n\n// Placeholder of an empty content rectangle.\r\nvar emptyRect = createRectInit(0, 0, 0, 0);\r\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\r\nfunction toFloat(value) {\r\n return parseFloat(value) || 0;\r\n}\r\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\r\nfunction getBordersSize(styles) {\r\n var positions = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n positions[_i - 1] = arguments[_i];\r\n }\r\n return positions.reduce(function (size, position) {\r\n var value = styles['border-' + position + '-width'];\r\n return size + toFloat(value);\r\n }, 0);\r\n}\r\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\r\nfunction getPaddings(styles) {\r\n var positions = ['top', 'right', 'bottom', 'left'];\r\n var paddings = {};\r\n for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {\r\n var position = positions_1[_i];\r\n var value = styles['padding-' + position];\r\n paddings[position] = toFloat(value);\r\n }\r\n return paddings;\r\n}\r\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getSVGContentRect(target) {\r\n var bbox = target.getBBox();\r\n return createRectInit(0, 0, bbox.width, bbox.height);\r\n}\r\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getHTMLElementContentRect(target) {\r\n // Client width & height properties can't be\r\n // used exclusively as they provide rounded values.\r\n var clientWidth = target.clientWidth, clientHeight = target.clientHeight;\r\n // By this condition we can catch all non-replaced inline, hidden and\r\n // detached elements. Though elements with width & height properties less\r\n // than 0.5 will be discarded as well.\r\n //\r\n // Without it we would need to implement separate methods for each of\r\n // those cases and it's not possible to perform a precise and performance\r\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\r\n // gives wrong results for elements with width & height less than 0.5.\r\n if (!clientWidth && !clientHeight) {\r\n return emptyRect;\r\n }\r\n var styles = getWindowOf(target).getComputedStyle(target);\r\n var paddings = getPaddings(styles);\r\n var horizPad = paddings.left + paddings.right;\r\n var vertPad = paddings.top + paddings.bottom;\r\n // Computed styles of width & height are being used because they are the\r\n // only dimensions available to JS that contain non-rounded values. It could\r\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\r\n // affected by CSS transformations let alone paddings, borders and scroll bars.\r\n var width = toFloat(styles.width), height = toFloat(styles.height);\r\n // Width & height include paddings and borders when the 'border-box' box\r\n // model is applied (except for IE).\r\n if (styles.boxSizing === 'border-box') {\r\n // Following conditions are required to handle Internet Explorer which\r\n // doesn't include paddings and borders to computed CSS dimensions.\r\n //\r\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\r\n // properties then it's either IE, and thus we don't need to subtract\r\n // anything, or an element merely doesn't have paddings/borders styles.\r\n if (Math.round(width + horizPad) !== clientWidth) {\r\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\r\n }\r\n if (Math.round(height + vertPad) !== clientHeight) {\r\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\r\n }\r\n }\r\n // Following steps can't be applied to the document's root element as its\r\n // client[Width/Height] properties represent viewport area of the window.\r\n // Besides, it's as well not necessary as the itself neither has\r\n // rendered scroll bars nor it can be clipped.\r\n if (!isDocumentElement(target)) {\r\n // In some browsers (only in Firefox, actually) CSS width & height\r\n // include scroll bars size which can be removed at this step as scroll\r\n // bars are the only difference between rounded dimensions + paddings\r\n // and \"client\" properties, though that is not always true in Chrome.\r\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\r\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\r\n // Chrome has a rather weird rounding of \"client\" properties.\r\n // E.g. for an element with content width of 314.2px it sometimes gives\r\n // the client width of 315px and for the width of 314.7px it may give\r\n // 314px. And it doesn't happen all the time. So just ignore this delta\r\n // as a non-relevant.\r\n if (Math.abs(vertScrollbar) !== 1) {\r\n width -= vertScrollbar;\r\n }\r\n if (Math.abs(horizScrollbar) !== 1) {\r\n height -= horizScrollbar;\r\n }\r\n }\r\n return createRectInit(paddings.left, paddings.top, width, height);\r\n}\r\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nvar isSVGGraphicsElement = (function () {\r\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\r\n // interface.\r\n if (typeof SVGGraphicsElement !== 'undefined') {\r\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\r\n }\r\n // If it's so, then check that element is at least an instance of the\r\n // SVGElement and that it has the \"getBBox\" method.\r\n // eslint-disable-next-line no-extra-parens\r\n return function (target) { return (target instanceof getWindowOf(target).SVGElement &&\r\n typeof target.getBBox === 'function'); };\r\n})();\r\n/**\r\n * Checks whether provided element is a document element ().\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nfunction isDocumentElement(target) {\r\n return target === getWindowOf(target).document.documentElement;\r\n}\r\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getContentRect(target) {\r\n if (!isBrowser) {\r\n return emptyRect;\r\n }\r\n if (isSVGGraphicsElement(target)) {\r\n return getSVGContentRect(target);\r\n }\r\n return getHTMLElementContentRect(target);\r\n}\r\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\r\nfunction createReadOnlyRect(_a) {\r\n var x = _a.x, y = _a.y, width = _a.width, height = _a.height;\r\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\r\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\r\n var rect = Object.create(Constr.prototype);\r\n // Rectangle's properties are not writable and non-enumerable.\r\n defineConfigurable(rect, {\r\n x: x, y: y, width: width, height: height,\r\n top: y,\r\n right: x + width,\r\n bottom: height + y,\r\n left: x\r\n });\r\n return rect;\r\n}\r\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction createRectInit(x, y, width, height) {\r\n return { x: x, y: y, width: width, height: height };\r\n}\n\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\r\nvar ResizeObservation = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObservation.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n */\r\n function ResizeObservation(target) {\r\n /**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastWidth = 0;\r\n /**\r\n * Broadcasted height of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastHeight = 0;\r\n /**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\r\n this.contentRect_ = createRectInit(0, 0, 0, 0);\r\n this.target = target;\r\n }\r\n /**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObservation.prototype.isActive = function () {\r\n var rect = getContentRect(this.target);\r\n this.contentRect_ = rect;\r\n return (rect.width !== this.broadcastWidth ||\r\n rect.height !== this.broadcastHeight);\r\n };\r\n /**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\r\n ResizeObservation.prototype.broadcastRect = function () {\r\n var rect = this.contentRect_;\r\n this.broadcastWidth = rect.width;\r\n this.broadcastHeight = rect.height;\r\n return rect;\r\n };\r\n return ResizeObservation;\r\n}());\n\nvar ResizeObserverEntry = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObserverEntry.\r\n *\r\n * @param {Element} target - Element that is being observed.\r\n * @param {DOMRectInit} rectInit - Data of the element's content rectangle.\r\n */\r\n function ResizeObserverEntry(target, rectInit) {\r\n var contentRect = createReadOnlyRect(rectInit);\r\n // According to the specification following properties are not writable\r\n // and are also not enumerable in the native implementation.\r\n //\r\n // Property accessors are not being used as they'd require to define a\r\n // private WeakMap storage which may cause memory leaks in browsers that\r\n // don't support this type of collections.\r\n defineConfigurable(this, { target: target, contentRect: contentRect });\r\n }\r\n return ResizeObserverEntry;\r\n}());\n\nvar ResizeObserverSPI = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback function that is invoked\r\n * when one of the observed elements changes it's content dimensions.\r\n * @param {ResizeObserverController} controller - Controller instance which\r\n * is responsible for the updates of observer.\r\n * @param {ResizeObserver} callbackCtx - Reference to the public\r\n * ResizeObserver instance which will be passed to callback function.\r\n */\r\n function ResizeObserverSPI(callback, controller, callbackCtx) {\r\n /**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array}\r\n */\r\n this.activeObservations_ = [];\r\n /**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map}\r\n */\r\n this.observations_ = new MapShim();\r\n if (typeof callback !== 'function') {\r\n throw new TypeError('The callback provided as parameter 1 is not a function.');\r\n }\r\n this.callback_ = callback;\r\n this.controller_ = controller;\r\n this.callbackCtx_ = callbackCtx;\r\n }\r\n /**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.observe = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is already being observed.\r\n if (observations.has(target)) {\r\n return;\r\n }\r\n observations.set(target, new ResizeObservation(target));\r\n this.controller_.addObserver(this);\r\n // Force the update of observations.\r\n this.controller_.refresh();\r\n };\r\n /**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.unobserve = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is not being observed.\r\n if (!observations.has(target)) {\r\n return;\r\n }\r\n observations.delete(target);\r\n if (!observations.size) {\r\n this.controller_.removeObserver(this);\r\n }\r\n };\r\n /**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.disconnect = function () {\r\n this.clearActive();\r\n this.observations_.clear();\r\n this.controller_.removeObserver(this);\r\n };\r\n /**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.gatherActive = function () {\r\n var _this = this;\r\n this.clearActive();\r\n this.observations_.forEach(function (observation) {\r\n if (observation.isActive()) {\r\n _this.activeObservations_.push(observation);\r\n }\r\n });\r\n };\r\n /**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.broadcastActive = function () {\r\n // Do nothing if observer doesn't have active observations.\r\n if (!this.hasActive()) {\r\n return;\r\n }\r\n var ctx = this.callbackCtx_;\r\n // Create ResizeObserverEntry instance for every active observation.\r\n var entries = this.activeObservations_.map(function (observation) {\r\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\r\n });\r\n this.callback_.call(ctx, entries, ctx);\r\n this.clearActive();\r\n };\r\n /**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.clearActive = function () {\r\n this.activeObservations_.splice(0);\r\n };\r\n /**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObserverSPI.prototype.hasActive = function () {\r\n return this.activeObservations_.length > 0;\r\n };\r\n return ResizeObserverSPI;\r\n}());\n\n// Registry of internal observers. If WeakMap is not available use current shim\r\n// for the Map collection as it has all required methods and because WeakMap\r\n// can't be fully polyfilled anyway.\r\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\r\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\r\nvar ResizeObserver = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback that is invoked when\r\n * dimensions of the observed elements change.\r\n */\r\n function ResizeObserver(callback) {\r\n if (!(this instanceof ResizeObserver)) {\r\n throw new TypeError('Cannot call a class as a function.');\r\n }\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n var controller = ResizeObserverController.getInstance();\r\n var observer = new ResizeObserverSPI(callback, controller, this);\r\n observers.set(this, observer);\r\n }\r\n return ResizeObserver;\r\n}());\r\n// Expose public methods of ResizeObserver.\r\n[\r\n 'observe',\r\n 'unobserve',\r\n 'disconnect'\r\n].forEach(function (method) {\r\n ResizeObserver.prototype[method] = function () {\r\n var _a;\r\n return (_a = observers.get(this))[method].apply(_a, arguments);\r\n };\r\n});\n\nvar index = (function () {\r\n // Export existing implementation if available.\r\n if (typeof global$1.ResizeObserver !== 'undefined') {\r\n return global$1.ResizeObserver;\r\n }\r\n return ResizeObserver;\r\n})();\n\nexport default index;\n",
"/** @license React v0.13.4\n * scheduler.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\n'use strict';Object.defineProperty(exports,\"__esModule\",{value:!0});var d=null,e=!1,g=3,k=-1,l=-1,m=!1,n=!1;function p(){if(!m){var a=d.expirationTime;n?q():n=!0;r(t,a)}}\nfunction u(){var a=d,b=d.next;if(d===b)d=null;else{var c=d.previous;d=c.next=b;b.previous=c}a.next=a.previous=null;c=a.callback;b=a.expirationTime;a=a.priorityLevel;var f=g,Q=l;g=a;l=b;try{var h=c()}finally{g=f,l=Q}if(\"function\"===typeof h)if(h={callback:h,priorityLevel:a,expirationTime:b,next:null,previous:null},null===d)d=h.next=h.previous=h;else{c=null;a=d;do{if(a.expirationTime>=b){c=a;break}a=a.next}while(a!==d);null===c?c=d:c===d&&(d=h,p());b=c.previous;b.next=c.previous=h;h.next=c;h.previous=\nb}}function v(){if(-1===k&&null!==d&&1===d.priorityLevel){m=!0;try{do u();while(null!==d&&1===d.priorityLevel)}finally{m=!1,null!==d?p():n=!1}}}function t(a){m=!0;var b=e;e=a;try{if(a)for(;null!==d;){var c=exports.unstable_now();if(d.expirationTime<=c){do u();while(null!==d&&d.expirationTime<=c)}else break}else if(null!==d){do u();while(null!==d&&!w())}}finally{m=!1,e=b,null!==d?p():n=!1,v()}}\nvar x=Date,y=\"function\"===typeof setTimeout?setTimeout:void 0,z=\"function\"===typeof clearTimeout?clearTimeout:void 0,A=\"function\"===typeof requestAnimationFrame?requestAnimationFrame:void 0,B=\"function\"===typeof cancelAnimationFrame?cancelAnimationFrame:void 0,C,D;function E(a){C=A(function(b){z(D);a(b)});D=y(function(){B(C);a(exports.unstable_now())},100)}\nif(\"object\"===typeof performance&&\"function\"===typeof performance.now){var F=performance;exports.unstable_now=function(){return F.now()}}else exports.unstable_now=function(){return x.now()};var r,q,w,G=null;\"undefined\"!==typeof window?G=window:\"undefined\"!==typeof global&&(G=global);\nif(G&&G._schedMock){var H=G._schedMock;r=H[0];q=H[1];w=H[2];exports.unstable_now=H[3]}else if(\"undefined\"===typeof window||\"function\"!==typeof MessageChannel){var I=null,J=function(a){if(null!==I)try{I(a)}finally{I=null}};r=function(a){null!==I?setTimeout(r,0,a):(I=a,setTimeout(J,0,!1))};q=function(){I=null};w=function(){return!1}}else{\"undefined\"!==typeof console&&(\"function\"!==typeof A&&console.error(\"This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills\"),\n\"function\"!==typeof B&&console.error(\"This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills\"));var K=null,L=!1,M=-1,N=!1,O=!1,P=0,R=33,S=33;w=function(){return P<=exports.unstable_now()};var T=new MessageChannel,U=T.port2;T.port1.onmessage=function(){L=!1;var a=K,b=M;K=null;M=-1;var c=exports.unstable_now(),f=!1;if(0>=P-c)if(-1!==b&&b<=c)f=!0;else{N||(N=!0,E(V));K=a;M=b;return}if(null!==a){O=!0;try{a(f)}finally{O=!1}}};\nvar V=function(a){if(null!==K){E(V);var b=a-P+S;bb&&(b=8),S=bb?U.postMessage(void 0):N||(N=!0,E(V))};q=function(){K=null;L=!1;M=-1}}exports.unstable_ImmediatePriority=1;exports.unstable_UserBlockingPriority=2;exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=5;exports.unstable_LowPriority=4;\nexports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=g,f=k;g=a;k=exports.unstable_now();try{return b()}finally{g=c,k=f,v()}};exports.unstable_next=function(a){switch(g){case 1:case 2:case 3:var b=3;break;default:b=g}var c=g,f=k;g=b;k=exports.unstable_now();try{return a()}finally{g=c,k=f,v()}};\nexports.unstable_scheduleCallback=function(a,b){var c=-1!==k?k:exports.unstable_now();if(\"object\"===typeof b&&null!==b&&\"number\"===typeof b.timeout)b=c+b.timeout;else switch(g){case 1:b=c+-1;break;case 2:b=c+250;break;case 5:b=c+1073741823;break;case 4:b=c+1E4;break;default:b=c+5E3}a={callback:a,priorityLevel:g,expirationTime:b,next:null,previous:null};if(null===d)d=a.next=a.previous=a,p();else{c=null;var f=d;do{if(f.expirationTime>b){c=f;break}f=f.next}while(f!==d);null===c?c=d:c===d&&(d=a,p());\nb=c.previous;b.next=c.previous=a;a.next=c;a.previous=b}return a};exports.unstable_cancelCallback=function(a){var b=a.next;if(null!==b){if(b===a)d=null;else{a===d&&(d=b);var c=a.previous;c.next=b;b.previous=c}a.next=a.previous=null}};exports.unstable_wrapCallback=function(a){var b=g;return function(){var c=g,f=k;g=b;k=exports.unstable_now();try{return a.apply(this,arguments)}finally{g=c,k=f,v()}}};exports.unstable_getCurrentPriorityLevel=function(){return g};\nexports.unstable_shouldYield=function(){return!e&&(null!==d&&d.expirationTime element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n",
"/* global window */\nimport ponyfill from './ponyfill.js';\n\nvar root;\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = ponyfill(root);\nexport default result;\n",
"export default function symbolObservablePonyfill(root) {\n\tvar result;\n\tvar Symbol = root.Symbol;\n\n\tif (typeof Symbol === 'function') {\n\t\tif (Symbol.observable) {\n\t\t\tresult = Symbol.observable;\n\t\t} else {\n\t\t\tresult = Symbol('observable');\n\t\t\tSymbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n",
"var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `)))) + ((("`" + (`setimmediate` + "`")) + (` was\n// able to install onto. Search each possibility in the same order as the\n// ` + ("`" + `setimmediate`))) + (("`" + (` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n",
"/**\n * Copyright (c) 2014-present, Facebook, Inc.\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\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '` + "`")) + (`warning(condition, format, ...args)` + ("`" + ` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n",
"var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n",
"module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n",
"module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n"
],
"sourceRoot": ""
}`))))))))))))))
func bundleJsMapBytes() ([]byte, error) {
return _bundleJsMap, nil
}
func bundleJsMap() (*asset, error) {
bytes, err := bundleJsMapBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "bundle.js.map", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb6, 0x68, 0x46, 0x48, 0x3, 0x7c, 0x38, 0x69, 0xe7, 0xca, 0x1d, 0x61, 0xd8, 0x6c, 0x20, 0x6a, 0xf5, 0xe3, 0x9c, 0xa5, 0x35, 0xd7, 0xd9, 0x4d, 0x63, 0xd3, 0xe3, 0xdc, 0x80, 0x20, 0x6a, 0xe1}}
return a, nil
}
// Asset loads and returns the asset for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func Asset(name string) ([]byte, error) {
canonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[canonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
}
return a.bytes, nil
}
return nil, fmt.Errorf("Asset %s not found", name)
}
// AssetString returns the asset contents as a string (instead of a []byte).
func AssetString(name string) (string, error) {
data, err := Asset(name)
return string(data), err
}
// MustAsset is like Asset but panics when Asset would return an error.
// It simplifies safe initialization of global variables.
func MustAsset(name string) []byte {
a, err := Asset(name)
if err != nil {
panic("asset: Asset(" + name + "): " + err.Error())
}
return a
}
// MustAssetString is like AssetString but panics when Asset would return an
// error. It simplifies safe initialization of global variables.
func MustAssetString(name string) string {
return string(MustAsset(name))
}
// AssetInfo loads and returns the asset info for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func AssetInfo(name string) (os.FileInfo, error) {
canonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[canonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
}
return a.info, nil
}
return nil, fmt.Errorf("AssetInfo %s not found", name)
}
// AssetDigest returns the digest of the file with the given name. It returns an
// error if the asset could not be found or the digest could not be loaded.
func AssetDigest(name string) ([sha256.Size]byte, error) {
canonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[canonicalName]; ok {
a, err := f()
if err != nil {
return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s can't read by error: %v", name, err)
}
return a.digest, nil
}
return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s not found", name)
}
// Digests returns a map of all known files and their checksums.
func Digests() (map[string][sha256.Size]byte, error) {
mp := make(map[string][sha256.Size]byte, len(_bindata))
for name := range _bindata {
a, err := _bindata[name]()
if err != nil {
return nil, err
}
mp[name] = a.digest
}
return mp, nil
}
// AssetNames returns the names of the assets.
func AssetNames() []string {
names := make([]string, 0, len(_bindata))
for name := range _bindata {
names = append(names, name)
}
return names
}
// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
"index.html": indexHtml,
"bundle.js": bundleJs,
"bundle.js.map": bundleJsMap,
}
// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
// data/
// foo.txt
// img/
// a.png
// b.png
// then AssetDir("data") would return []string{"foo.txt", "img"},
// AssetDir("data/img") would return []string{"a.png", "b.png"},
// AssetDir("foo.txt") and AssetDir("notexist") would return an error, and
// AssetDir("") will return []string{"data"}.
func AssetDir(name string) ([]string, error) {
node := _bintree
if len(name) != 0 {
canonicalName := strings.Replace(name, "\\", "/", -1)
pathList := strings.Split(canonicalName, "/")
for _, p := range pathList {
node = node.Children[p]
if node == nil {
return nil, fmt.Errorf("Asset %s not found", name)
}
}
}
if node.Func != nil {
return nil, fmt.Errorf("Asset %s not found", name)
}
rv := make([]string, 0, len(node.Children))
for childName := range node.Children {
rv = append(rv, childName)
}
return rv, nil
}
type bintree struct {
Func func() (*asset, error)
Children map[string]*bintree
}
var _bintree = &bintree{nil, map[string]*bintree{
"bundle.js": {bundleJs, map[string]*bintree{}},
"bundle.js.map": {bundleJsMap, map[string]*bintree{}},
"index.html": {indexHtml, map[string]*bintree{}},
}}
// RestoreAsset restores an asset under the given directory.
func RestoreAsset(dir, name string) error {
data, err := Asset(name)
if err != nil {
return err
}
info, err := AssetInfo(name)
if err != nil {
return err
}
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
if err != nil {
return err
}
return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
}
// RestoreAssets restores an asset under the given directory recursively.
func RestoreAssets(dir, name string) error {
children, err := AssetDir(name)
// File
if err != nil {
return RestoreAsset(dir, name)
}
// Dir
for _, child := range children {
err = RestoreAssets(dir, filepath.Join(name, child))
if err != nil {
return err
}
}
return nil
}
func _filePath(dir, name string) string {
canonicalName := strings.Replace(name, "\\", "/", -1)
return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...)
}