{"version":3,"file":"@nivo.ea737451.js","sources":["../../../node_modules/@nivo/tooltip/dist/nivo-tooltip.es.js","../../../node_modules/@nivo/core/dist/nivo-core.es.js","../../../node_modules/@nivo/colors/dist/nivo-colors.es.js","../../../node_modules/@nivo/legends/dist/nivo-legends.es.js","../../../node_modules/@nivo/pie/dist/nivo-pie.es.js","../../../node_modules/@nivo/axes/dist/nivo-axes.es.js","../../../node_modules/@nivo/scales/dist/nivo-scales.es.js","../../../node_modules/@nivo/voronoi/dist/nivo-voronoi.es.js","../../../node_modules/@nivo/line/dist/nivo-line.es.js","../../../node_modules/@nivo/annotations/dist/nivo-annotations.es.js","../../../node_modules/@nivo/bar/dist/nivo-bar.es.js","../../../node_modules/@nivo/calendar/dist/nivo-calendar.es.js","../../../node_modules/@nivo/circle-packing/dist/nivo-circle-packing.es.js"],"sourcesContent":["import React, { memo, useRef, useMemo, createContext, useState, useCallback, useContext } from 'react';\nimport { useSpring, animated } from 'react-spring';\nimport { useTheme, useMotionConfig, useMeasure, useValueFormatter } from '@nivo/core';\nimport PropTypes from 'prop-types';\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nvar TOOLTIP_OFFSET = 14;\nvar tooltipStyle = {\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 10,\n top: 0,\n left: 0\n};\nvar TooltipWrapper = function TooltipWrapper(_ref) {\n var position = _ref.position,\n anchor = _ref.anchor,\n children = _ref.children;\n var theme = useTheme();\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.config;\n var _useMeasure = useMeasure(),\n _useMeasure2 = _slicedToArray(_useMeasure, 2),\n measureRef = _useMeasure2[0],\n bounds = _useMeasure2[1];\n var previousPosition = useRef(false);\n var to = undefined;\n var immediate = false;\n var hasDimension = bounds.width > 0 && bounds.height > 0;\n if (hasDimension) {\n var x = Math.round(position[0]);\n var y = Math.round(position[1]);\n if (anchor === 'top') {\n x -= bounds.width / 2;\n y -= bounds.height + TOOLTIP_OFFSET;\n } else if (anchor === 'right') {\n x += TOOLTIP_OFFSET;\n y -= bounds.height / 2;\n } else if (anchor === 'bottom') {\n x -= bounds.width / 2;\n y += TOOLTIP_OFFSET;\n } else if (anchor === 'left') {\n x -= bounds.width + TOOLTIP_OFFSET;\n y -= bounds.height / 2;\n } else if (anchor === 'center') {\n x -= bounds.width / 2;\n y -= bounds.height / 2;\n }\n to = {\n transform: \"translate(\".concat(x, \"px, \").concat(y, \"px)\")\n };\n if (!previousPosition.current) {\n immediate = true;\n }\n previousPosition.current = [x, y];\n }\n var animatedProps = useSpring({\n to: to,\n config: springConfig,\n immediate: !animate || immediate\n });\n var style = _objectSpread2(_objectSpread2(_objectSpread2({}, tooltipStyle), theme.tooltip), {}, {\n transform: animatedProps.transform,\n opacity: animatedProps.transform ? 1 : 0\n });\n return React.createElement(animated.div, {\n ref: measureRef,\n style: style\n }, children);\n};\nTooltipWrapper.defaultProps = {\n anchor: 'top'\n};\nvar TooltipWrapper$1 = memo(TooltipWrapper);\n\nvar Chip = memo(function (_ref) {\n var size = _ref.size,\n color = _ref.color,\n style = _ref.style;\n return React.createElement(\"span\", {\n style: _objectSpread2({\n display: 'block',\n width: size,\n height: size,\n background: color\n }, style)\n });\n});\nChip.propTypes = {\n size: PropTypes.number.isRequired,\n color: PropTypes.string.isRequired,\n style: PropTypes.object.isRequired\n};\nChip.defaultProps = {\n size: 12,\n style: {}\n};\nChip.displayName = 'Chip';\n\nvar BasicTooltip = memo(function (_ref) {\n var id = _ref.id,\n _value = _ref.value,\n format = _ref.format,\n enableChip = _ref.enableChip,\n color = _ref.color,\n renderContent = _ref.renderContent;\n var theme = useTheme();\n var formatValue = useValueFormatter(format);\n var content;\n if (typeof renderContent === 'function') {\n content = renderContent();\n } else {\n var value = _value;\n if (formatValue !== undefined && value !== undefined) {\n value = formatValue(value);\n }\n content = React.createElement(\"div\", {\n style: theme.tooltip.basic\n }, enableChip && React.createElement(Chip, {\n color: color,\n style: theme.tooltip.chip\n }), value !== undefined ? React.createElement(\"span\", null, id, \": \", React.createElement(\"strong\", null, isNaN(value) ? String(value) : value)) : id);\n }\n return React.createElement(\"div\", {\n style: theme.tooltip.container\n }, content);\n});\nBasicTooltip.displayName = 'BasicTooltip';\nBasicTooltip.defaultProps = {\n enableChip: false\n};\n\nvar tableStyle = {\n width: '100%',\n borderCollapse: 'collapse'\n};\nvar TableTooltip = memo(function (_ref) {\n var title = _ref.title,\n rows = _ref.rows,\n renderContent = _ref.renderContent;\n var theme = useTheme();\n if (!rows.length) return null;\n var content;\n if (typeof renderContent === 'function') {\n content = renderContent();\n } else {\n content = React.createElement(\"div\", null, title && title, React.createElement(\"table\", {\n style: _objectSpread2(_objectSpread2({}, tableStyle), theme.tooltip.table)\n }, React.createElement(\"tbody\", null, rows.map(function (row, i) {\n return React.createElement(\"tr\", {\n key: i\n }, row.map(function (column, j) {\n return React.createElement(\"td\", {\n key: j,\n style: theme.tooltip.tableCell\n }, column);\n }));\n }))));\n }\n return React.createElement(\"div\", {\n style: theme.tooltip.container\n }, content);\n});\nTableTooltip.displayName = 'TableTooltip';\n\nvar crosshairTypes = ['x', 'y', 'top-left', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'cross'];\nvar crosshairPropTypes = {\n type: PropTypes.oneOf(crosshairTypes)\n};\n\nvar CrosshairLine = memo(function (_ref) {\n var x0 = _ref.x0,\n x1 = _ref.x1,\n y0 = _ref.y0,\n y1 = _ref.y1;\n var theme = useTheme();\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.config;\n var style = useMemo(function () {\n return _objectSpread2(_objectSpread2({}, theme.crosshair.line), {}, {\n pointerEvents: 'none'\n });\n }, [theme.crosshair.line]);\n var animatedProps = useSpring({\n x1: x0,\n x2: x1,\n y1: y0,\n y2: y1,\n config: springConfig,\n immediate: !animate\n });\n return React.createElement(animated.line, Object.assign({}, animatedProps, {\n fill: \"none\",\n style: style\n }));\n});\nCrosshairLine.displayName = 'CrosshairLine';\n\nvar Crosshair = memo(function (_ref) {\n var width = _ref.width,\n height = _ref.height,\n type = _ref.type,\n x = _ref.x,\n y = _ref.y;\n var xLine;\n var yLine;\n if (type === 'cross') {\n xLine = {\n x0: x,\n x1: x,\n y0: 0,\n y1: height\n };\n yLine = {\n x0: 0,\n x1: width,\n y0: y,\n y1: y\n };\n } else if (type === 'top-left') {\n xLine = {\n x0: x,\n x1: x,\n y0: 0,\n y1: y\n };\n yLine = {\n x0: 0,\n x1: x,\n y0: y,\n y1: y\n };\n } else if (type === 'top') {\n xLine = {\n x0: x,\n x1: x,\n y0: 0,\n y1: y\n };\n } else if (type === 'top-right') {\n xLine = {\n x0: x,\n x1: x,\n y0: 0,\n y1: y\n };\n yLine = {\n x0: x,\n x1: width,\n y0: y,\n y1: y\n };\n } else if (type === 'right') {\n yLine = {\n x0: x,\n x1: width,\n y0: y,\n y1: y\n };\n } else if (type === 'bottom-right') {\n xLine = {\n x0: x,\n x1: x,\n y0: y,\n y1: height\n };\n yLine = {\n x0: x,\n x1: width,\n y0: y,\n y1: y\n };\n } else if (type === 'bottom') {\n xLine = {\n x0: x,\n x1: x,\n y0: y,\n y1: height\n };\n } else if (type === 'bottom-left') {\n xLine = {\n x0: x,\n x1: x,\n y0: y,\n y1: height\n };\n yLine = {\n x0: 0,\n x1: x,\n y0: y,\n y1: y\n };\n } else if (type === 'left') {\n yLine = {\n x0: 0,\n x1: x,\n y0: y,\n y1: y\n };\n } else if (type === 'x') {\n xLine = {\n x0: x,\n x1: x,\n y0: 0,\n y1: height\n };\n } else if (type === 'y') {\n yLine = {\n x0: 0,\n x1: width,\n y0: y,\n y1: y\n };\n }\n return React.createElement(React.Fragment, null, xLine && React.createElement(CrosshairLine, {\n x0: xLine.x0,\n x1: xLine.x1,\n y0: xLine.y0,\n y1: xLine.y1\n }), yLine && React.createElement(CrosshairLine, {\n x0: yLine.x0,\n x1: yLine.x1,\n y0: yLine.y0,\n y1: yLine.y1\n }));\n});\nCrosshair.displayName = 'Crosshair';\nCrosshair.defaultProps = {\n type: 'cross'\n};\n\nvar tooltipContext = createContext();\n\nvar useTooltipHandlers = function useTooltipHandlers(container) {\n var _useState = useState({\n isVisible: false,\n content: null,\n position: {}\n }),\n _useState2 = _slicedToArray(_useState, 2),\n state = _useState2[0],\n setState = _useState2[1];\n var showTooltipAt = useCallback(function (content, _ref, anchor) {\n var _ref2 = _slicedToArray(_ref, 2),\n x = _ref2[0],\n y = _ref2[1];\n setState({\n isVisible: true,\n position: [x, y],\n anchor: anchor,\n content: content\n });\n }, [setState]);\n var showTooltipFromEvent = useCallback(function (content, event, anchor) {\n var bounds = container.current.getBoundingClientRect();\n var x = event.clientX - bounds.left;\n var y = event.clientY - bounds.top;\n if (anchor === 'left' || anchor === 'right') {\n if (x < bounds.width / 2) anchor = 'right';else anchor = 'left';\n }\n setState({\n isVisible: true,\n position: [x, y],\n anchor: anchor,\n content: content\n });\n }, [container, setState]);\n var hideTooltip = useCallback(function () {\n setState({\n isVisible: false,\n content: null\n });\n }, [setState]);\n return {\n showTooltipAt: showTooltipAt,\n showTooltipFromEvent: showTooltipFromEvent,\n hideTooltip: hideTooltip,\n isTooltipVisible: state.isVisible,\n tooltipPosition: state.position,\n tooltipAnchor: state.anchor,\n tooltipContent: state.content\n };\n};\nvar useTooltip = function useTooltip() {\n var context = useContext(tooltipContext);\n var memoizedContext = useMemo(function () {\n return {\n showTooltipAt: context.showTooltipAt,\n showTooltipFromEvent: context.showTooltipFromEvent,\n hideTooltip: context.hideTooltip\n };\n }, [context.showTooltipAt, context.showTooltipFromEvent, context.hideTooltip]);\n return memoizedContext;\n};\n\nexport { BasicTooltip, Chip, Crosshair, TableTooltip, TooltipWrapper$1 as TooltipWrapper, crosshairPropTypes, crosshairTypes, tooltipContext, useTooltip, useTooltipHandlers };\n//# sourceMappingURL=nivo-tooltip.es.js.map\n","import React, { createContext, useMemo, useContext, useRef, useEffect, useState, useCallback, memo, Component } from 'react';\nimport { tooltipContext, useTooltipHandlers, TooltipWrapper } from '@nivo/tooltip';\nimport PropTypes from 'prop-types';\nimport merge from 'lodash/merge';\nimport get from 'lodash/get';\nimport set from 'lodash/set';\nimport { interpolateString } from 'd3-interpolate';\nimport _isString from 'lodash/isString';\nimport { config, useSpring, animated } from 'react-spring';\nimport last from 'lodash/last';\nimport isArray from 'lodash/isArray';\nimport { scaleQuantize, scaleOrdinal, scaleSequential } from 'd3-scale';\nimport { schemeBrBG, schemePRGn, schemePiYG, schemePuOr, schemeRdBu, schemeRdGy, schemeRdYlBu, schemeRdYlGn, schemeSpectral, schemeBlues, schemeGreens, schemeGreys, schemeOranges, schemePurples, schemeReds, schemeBuGn, schemeBuPu, schemeGnBu, schemeOrRd, schemePuBuGn, schemePuBu, schemePuRd, schemeRdPu, schemeYlGnBu, schemeYlGn, schemeYlOrBr, schemeYlOrRd, schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, interpolateBrBG, interpolatePRGn, interpolatePiYG, interpolatePuOr, interpolateRdBu, interpolateRdGy, interpolateRdYlBu, interpolateRdYlGn, interpolateSpectral, interpolateBlues, interpolateGreens, interpolateGreys, interpolateOranges, interpolatePurples, interpolateReds, interpolateViridis, interpolateInferno, interpolateMagma, interpolatePlasma, interpolateWarm, interpolateCool, interpolateCubehelixDefault, interpolateBuGn, interpolateBuPu, interpolateGnBu, interpolateOrRd, interpolatePuBuGn, interpolatePuBu, interpolatePuRd, interpolateRdPu, interpolateYlGnBu, interpolateYlGn, interpolateYlOrBr, interpolateYlOrRd, interpolateRainbow, interpolateSinebow } from 'd3-scale-chromatic';\nimport isFunction from 'lodash/isFunction';\nimport without from 'lodash/without';\nimport { curveBasis, curveBasisClosed, curveBasisOpen, curveBundle, curveCardinal, curveCardinalClosed, curveCardinalOpen, curveCatmullRom, curveCatmullRomClosed, curveCatmullRomOpen, curveLinear, curveLinearClosed, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle } from 'd3-shape';\nimport { treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify, hierarchy } from 'd3-hierarchy';\nimport { format } from 'd3-format';\nimport { timeFormat } from 'd3-time-format';\nimport withProps from 'recompose/withProps';\nimport isEqual from 'lodash/isEqual';\nimport compose from 'recompose/compose';\nimport setPropTypes from 'recompose/setPropTypes';\nimport defaultProps from 'recompose/defaultProps';\nimport withPropsOnChange from 'recompose/withPropsOnChange';\nimport isPlainObject from 'lodash/isPlainObject';\nimport pick from 'lodash/pick';\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nvar noop = (function () {});\n\nvar textProps = {\n fill: PropTypes.string,\n fontSize: PropTypes.number,\n fontFamily: PropTypes.string\n};\nvar axisThemePropType = PropTypes.shape({\n domain: PropTypes.shape({\n line: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n strokeDasharray: PropTypes.string\n }).isRequired\n }).isRequired,\n ticks: PropTypes.shape({\n line: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n strokeDasharray: PropTypes.string\n }).isRequired,\n text: PropTypes.shape(_objectSpread2({}, textProps)).isRequired\n }).isRequired,\n legend: PropTypes.shape({\n text: PropTypes.shape(_objectSpread2({}, textProps)).isRequired\n }).isRequired\n});\nvar gridThemePropType = PropTypes.shape({\n line: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n strokeDasharray: PropTypes.string\n }).isRequired\n});\nvar legendsThemePropType = PropTypes.shape({\n text: PropTypes.shape(_objectSpread2({}, textProps)).isRequired\n});\nvar labelsThemePropType = PropTypes.shape({\n text: PropTypes.shape(_objectSpread2({}, textProps)).isRequired\n});\nvar dotsThemePropType = PropTypes.shape({\n text: PropTypes.shape(_objectSpread2({}, textProps)).isRequired\n});\nvar markersThemePropType = PropTypes.shape({\n text: PropTypes.shape(_objectSpread2({}, textProps)).isRequired\n});\nvar crosshairPropType = PropTypes.shape({\n line: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n strokeDasharray: PropTypes.string\n }).isRequired\n});\nvar annotationsPropType = PropTypes.shape({\n text: PropTypes.shape(_objectSpread2(_objectSpread2({}, textProps), {}, {\n outlineWidth: PropTypes.number.isRequired,\n outlineColor: PropTypes.string.isRequired\n })).isRequired,\n link: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n outlineWidth: PropTypes.number.isRequired,\n outlineColor: PropTypes.string.isRequired\n }).isRequired,\n outline: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n outlineWidth: PropTypes.number.isRequired,\n outlineColor: PropTypes.string.isRequired\n }).isRequired,\n symbol: PropTypes.shape({\n fill: PropTypes.string.isRequired,\n outlineWidth: PropTypes.number.isRequired,\n outlineColor: PropTypes.string.isRequired\n }).isRequired\n});\nvar themePropType = PropTypes.shape({\n background: PropTypes.string.isRequired,\n fontFamily: PropTypes.string.isRequired,\n fontSize: PropTypes.number.isRequired,\n textColor: PropTypes.string.isRequired,\n axis: axisThemePropType.isRequired,\n grid: gridThemePropType.isRequired,\n legends: legendsThemePropType.isRequired,\n labels: labelsThemePropType.isRequired,\n dots: dotsThemePropType.isRequired,\n markers: markersThemePropType,\n crosshair: crosshairPropType.isRequired,\n annotations: annotationsPropType.isRequired\n});\n\nvar defaultTheme = {\n background: 'transparent',\n fontFamily: 'sans-serif',\n fontSize: 11,\n textColor: '#333333',\n axis: {\n domain: {\n line: {\n stroke: 'transparent',\n strokeWidth: 1\n }\n },\n ticks: {\n line: {\n stroke: '#777777',\n strokeWidth: 1\n },\n text: {}\n },\n legend: {\n text: {\n fontSize: 12\n }\n }\n },\n grid: {\n line: {\n stroke: '#dddddd',\n strokeWidth: 1\n }\n },\n legends: {\n text: {\n fill: '#333333'\n }\n },\n labels: {\n text: {}\n },\n markers: {\n lineColor: '#000000',\n lineStrokeWidth: 1,\n text: {}\n },\n dots: {\n text: {}\n },\n tooltip: {\n container: {\n background: 'white',\n color: 'inherit',\n fontSize: 'inherit',\n borderRadius: '2px',\n boxShadow: '0 1px 2px rgba(0, 0, 0, 0.25)',\n padding: '5px 9px'\n },\n basic: {\n whiteSpace: 'pre',\n display: 'flex',\n alignItems: 'center'\n },\n chip: {\n marginRight: 7\n },\n table: {},\n tableCell: {\n padding: '3px 5px'\n }\n },\n crosshair: {\n line: {\n stroke: '#000000',\n strokeWidth: 1,\n strokeOpacity: 0.75,\n strokeDasharray: '6 6'\n }\n },\n annotations: {\n text: {\n fontSize: 13,\n outlineWidth: 2,\n outlineColor: '#ffffff'\n },\n link: {\n stroke: '#000000',\n strokeWidth: 1,\n outlineWidth: 2,\n outlineColor: '#ffffff'\n },\n outline: {\n fill: 'none',\n stroke: '#000000',\n strokeWidth: 2,\n outlineWidth: 2,\n outlineColor: '#ffffff'\n },\n symbol: {\n fill: '#000000',\n outlineWidth: 2,\n outlineColor: '#ffffff'\n }\n }\n};\n\nvar fontProps = ['axis.ticks.text', 'axis.legend.text', 'legends.text', 'labels.text', 'dots.text', 'markers.text', 'annotations.text'];\nvar extendDefaultTheme = function extendDefaultTheme(defaultTheme, customTheme) {\n var theme = merge({}, defaultTheme, customTheme);\n fontProps.forEach(function (prop) {\n if (get(theme, \"\".concat(prop, \".fontFamily\")) === undefined) {\n set(theme, \"\".concat(prop, \".fontFamily\"), theme.fontFamily);\n }\n if (get(theme, \"\".concat(prop, \".fontSize\")) === undefined) {\n set(theme, \"\".concat(prop, \".fontSize\"), theme.fontSize);\n }\n if (get(theme, \"\".concat(prop, \".fill\")) === undefined) {\n set(theme, \"\".concat(prop, \".fill\"), theme.textColor);\n }\n });\n return theme;\n};\n\nvar motionConfigContext = createContext();\nvar MotionConfigProvider = function MotionConfigProvider(_ref) {\n var children = _ref.children,\n animate = _ref.animate,\n stiffness = _ref.stiffness,\n damping = _ref.damping,\n config$1 = _ref.config;\n var value = useMemo(function () {\n var reactSpringConfig = _isString(config$1) ? config[config$1] : config$1;\n return {\n animate: animate,\n springConfig: {\n stiffness: stiffness,\n damping: damping\n },\n config: reactSpringConfig\n };\n }, [animate, stiffness, damping, config$1]);\n return React.createElement(motionConfigContext.Provider, {\n value: value\n }, children);\n};\nvar motionPropTypes = {\n animate: PropTypes.bool,\n motionStiffness: PropTypes.number,\n motionDamping: PropTypes.number,\n motionConfig: PropTypes.oneOfType([PropTypes.oneOf(Object.keys(config)), PropTypes.shape({\n mass: PropTypes.number,\n tension: PropTypes.number,\n friction: PropTypes.number,\n clamp: PropTypes.bool,\n precision: PropTypes.number,\n velocity: PropTypes.number,\n duration: PropTypes.number,\n easing: PropTypes.func\n })])\n};\nvar motionDefaultProps = {\n animate: true,\n stiffness: 90,\n damping: 15,\n config: 'default'\n};\nMotionConfigProvider.defaultProps = motionDefaultProps;\n\nvar useMotionConfig = function useMotionConfig() {\n return useContext(motionConfigContext);\n};\n\nvar usePrevious = function usePrevious(value) {\n var ref = useRef();\n useEffect(function () {\n ref.current = value;\n }, [value]);\n return ref.current;\n};\nvar useAnimatedPath = function useAnimatedPath(path) {\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.config;\n var previousPath = usePrevious(path);\n var interpolator = useMemo(function () {\n return interpolateString(previousPath, path);\n }, [previousPath, path]);\n var _useSpring = useSpring({\n from: {\n value: 0\n },\n to: {\n value: 1\n },\n reset: true,\n config: springConfig,\n immediate: !animate\n }),\n value = _useSpring.value;\n return value.interpolate(interpolator);\n};\n\nvar quantizeColorScales = {\n nivo: ['#d76445', '#f47560', '#e8c1a0', '#97e3d5', '#61cdbb', '#00b0a7'],\n BrBG: last(schemeBrBG),\n PRGn: last(schemePRGn),\n PiYG: last(schemePiYG),\n PuOr: last(schemePuOr),\n RdBu: last(schemeRdBu),\n RdGy: last(schemeRdGy),\n RdYlBu: last(schemeRdYlBu),\n RdYlGn: last(schemeRdYlGn),\n spectral: last(schemeSpectral),\n blues: last(schemeBlues),\n greens: last(schemeGreens),\n greys: last(schemeGreys),\n oranges: last(schemeOranges),\n purples: last(schemePurples),\n reds: last(schemeReds),\n BuGn: last(schemeBuGn),\n BuPu: last(schemeBuPu),\n GnBu: last(schemeGnBu),\n OrRd: last(schemeOrRd),\n PuBuGn: last(schemePuBuGn),\n PuBu: last(schemePuBu),\n PuRd: last(schemePuRd),\n RdPu: last(schemeRdPu),\n YlGnBu: last(schemeYlGnBu),\n YlGn: last(schemeYlGn),\n YlOrBr: last(schemeYlOrBr),\n YlOrRd: last(schemeYlOrRd)\n};\nvar quantizeColorScalesKeys = Object.keys(quantizeColorScales);\nvar guessQuantizeColorScale = function guessQuantizeColorScale(colors) {\n if (isFunction(colors)) {\n if (!isFunction(colors.domain)) {\n throw new Error(\"Provided colors should be a valid quantize scale providing a 'domain()' function\");\n }\n return colors;\n }\n if (quantizeColorScales[colors]) {\n return scaleQuantize().range(quantizeColorScales[colors]);\n }\n if (isArray(colors)) return scaleQuantize().range(colors);\n throw new Error(\"Unable to guess quantize color scale from '\".concat(colors, \"',\\nmust be a function or one of:\\n'\").concat(quantizeColorScalesKeys.join(\"', '\"), \"'\"));\n};\n\nvar colorSchemes = {\n nivo: ['#e8c1a0', '#f47560', '#f1e15b', '#e8a838', '#61cdbb', '#97e3d5'],\n category10: schemeCategory10,\n accent: schemeAccent,\n dark2: schemeDark2,\n paired: schemePaired,\n pastel1: schemePastel1,\n pastel2: schemePastel2,\n set1: schemeSet1,\n set2: schemeSet2,\n set3: schemeSet3,\n brown_blueGreen: last(schemeBrBG),\n purpleRed_green: last(schemePRGn),\n pink_yellowGreen: last(schemePiYG),\n purple_orange: last(schemePuOr),\n red_blue: last(schemeRdBu),\n red_grey: last(schemeRdGy),\n red_yellow_blue: last(schemeRdYlBu),\n red_yellow_green: last(schemeRdYlGn),\n spectral: last(schemeSpectral),\n blues: last(schemeBlues),\n greens: last(schemeGreens),\n greys: last(schemeGreys),\n oranges: last(schemeOranges),\n purples: last(schemePurples),\n reds: last(schemeReds),\n blue_green: last(schemeBuGn),\n blue_purple: last(schemeBuPu),\n green_blue: last(schemeGnBu),\n orange_red: last(schemeOrRd),\n purple_blue_green: last(schemePuBuGn),\n purple_blue: last(schemePuBu),\n purple_red: last(schemePuRd),\n red_purple: last(schemeRdPu),\n yellow_green_blue: last(schemeYlGnBu),\n yellow_green: last(schemeYlGn),\n yellow_orange_brown: last(schemeYlOrBr),\n yellow_orange_red: last(schemeYlOrRd)\n};\nvar colorSchemeIds = ['nivo',\n'category10', 'accent', 'dark2', 'paired', 'pastel1', 'pastel2', 'set1', 'set2', 'set3',\n'brown_blueGreen', 'purpleRed_green', 'pink_yellowGreen', 'purple_orange', 'red_blue', 'red_grey', 'red_yellow_blue', 'red_yellow_green', 'spectral',\n'blues', 'greens', 'greys', 'oranges', 'purples', 'reds',\n'blue_green', 'blue_purple', 'green_blue', 'orange_red', 'purple_blue_green', 'purple_blue', 'purple_red', 'red_purple', 'yellow_green_blue', 'yellow_green', 'yellow_orange_brown', 'yellow_orange_red'];\nvar colorInterpolators = {\n brown_blueGreen: interpolateBrBG,\n purpleRed_green: interpolatePRGn,\n pink_yellowGreen: interpolatePiYG,\n purple_orange: interpolatePuOr,\n red_blue: interpolateRdBu,\n red_grey: interpolateRdGy,\n red_yellow_blue: interpolateRdYlBu,\n red_yellow_green: interpolateRdYlGn,\n spectral: interpolateSpectral,\n blues: interpolateBlues,\n greens: interpolateGreens,\n greys: interpolateGreys,\n oranges: interpolateOranges,\n purples: interpolatePurples,\n reds: interpolateReds,\n viridis: interpolateViridis,\n inferno: interpolateInferno,\n magma: interpolateMagma,\n plasma: interpolatePlasma,\n warm: interpolateWarm,\n cool: interpolateCool,\n cubehelixDefault: interpolateCubehelixDefault,\n blue_green: interpolateBuGn,\n blue_purple: interpolateBuPu,\n green_blue: interpolateGnBu,\n orange_red: interpolateOrRd,\n purple_blue_green: interpolatePuBuGn,\n purple_blue: interpolatePuBu,\n purple_red: interpolatePuRd,\n red_purple: interpolateRdPu,\n yellow_green_blue: interpolateYlGnBu,\n yellow_green: interpolateYlGn,\n yellow_orange_brown: interpolateYlOrBr,\n yellow_orange_red: interpolateYlOrRd,\n rainbow: interpolateRainbow,\n sinebow: interpolateSinebow\n};\nvar colorInterpolatorIds = [\n'brown_blueGreen', 'purpleRed_green', 'pink_yellowGreen', 'purple_orange', 'red_blue', 'red_grey', 'red_yellow_blue', 'red_yellow_green', 'spectral',\n'blues', 'greens', 'greys', 'oranges', 'purples', 'reds',\n'viridis', 'inferno', 'magma', 'plasma', 'warm', 'cool', 'cubehelixDefault', 'blue_green', 'blue_purple', 'green_blue', 'orange_red', 'purple_blue_green', 'purple_blue', 'purple_red', 'red_purple', 'yellow_green_blue', 'yellow_green', 'yellow_orange_brown', 'yellow_orange_red',\n'rainbow', 'sinebow'];\nvar nivoCategoricalColors = function nivoCategoricalColors() {\n return scaleOrdinal(['#e8c1a0', '#f47560', '#f1e15b', '#e8a838', '#61cdbb', '#97e3d5']);\n};\nvar getColorScale = function getColorScale(colors, dataScale) {\n if (_isString(colors)) {\n var scheme = colorSchemes[colors];\n if (scheme !== undefined) {\n var scale = scaleOrdinal(scheme);\n scale.type = 'ordinal';\n return scale;\n }\n if (dataScale !== undefined && colors.indexOf('seq:') === 0) {\n var interpolator = colorInterpolators[colors.slice(4)];\n if (interpolator !== undefined) {\n var _scale = scaleSequential(interpolator).domain(dataScale.domain());\n _scale.type = 'sequential';\n return _scale;\n }\n }\n }\n if (isArray(colors)) {\n var _scale2 = scaleOrdinal(colors);\n _scale2.type = 'ordinal';\n return _scale2;\n }\n return function () {\n return colors;\n };\n};\n\nvar quantizeColorScalePropType = PropTypes.oneOfType([PropTypes.oneOf(quantizeColorScalesKeys), PropTypes.func, PropTypes.arrayOf(PropTypes.string)]);\n\nvar curvePropMapping = {\n basis: curveBasis,\n basisClosed: curveBasisClosed,\n basisOpen: curveBasisOpen,\n bundle: curveBundle,\n cardinal: curveCardinal,\n cardinalClosed: curveCardinalClosed,\n cardinalOpen: curveCardinalOpen,\n catmullRom: curveCatmullRom,\n catmullRomClosed: curveCatmullRomClosed,\n catmullRomOpen: curveCatmullRomOpen,\n linear: curveLinear,\n linearClosed: curveLinearClosed,\n monotoneX: curveMonotoneX,\n monotoneY: curveMonotoneY,\n natural: curveNatural,\n step: curveStep,\n stepAfter: curveStepAfter,\n stepBefore: curveStepBefore\n};\nvar curvePropKeys = Object.keys(curvePropMapping);\nvar curvePropType = PropTypes.oneOf(curvePropKeys);\nvar closedCurvePropKeys = curvePropKeys.filter(function (c) {\n return c.endsWith('Closed');\n});\nvar closedCurvePropType = PropTypes.oneOf(closedCurvePropKeys);\nvar areaCurvePropKeys = without(curvePropKeys, 'bundle', 'basisClosed', 'basisOpen', 'cardinalClosed', 'cardinalOpen', 'catmullRomClosed', 'catmullRomOpen', 'linearClosed');\nvar areaCurvePropType = PropTypes.oneOf(areaCurvePropKeys);\nvar lineCurvePropKeys = without(curvePropKeys, 'bundle', 'basisClosed', 'basisOpen', 'cardinalClosed', 'cardinalOpen', 'catmullRomClosed', 'catmullRomOpen', 'linearClosed');\nvar lineCurvePropType = PropTypes.oneOf(lineCurvePropKeys);\nvar curveFromProp = function curveFromProp(id) {\n var curveInterpolator = curvePropMapping[id];\n if (!curveInterpolator) {\n throw new TypeError(\"'\".concat(id, \"', is not a valid curve interpolator identifier.\"));\n }\n return curvePropMapping[id];\n};\n\nvar defsPropTypes = {\n defs: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.string.isRequired\n })).isRequired,\n fill: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.string.isRequired,\n match: PropTypes.oneOfType([PropTypes.oneOf(['*']), PropTypes.object, PropTypes.func]).isRequired\n })).isRequired\n};\n\nvar stackOrderPropMapping = {\n ascending: stackOrderAscending,\n descending: stackOrderDescending,\n insideOut: stackOrderInsideOut,\n none: stackOrderNone,\n reverse: stackOrderReverse\n};\nvar stackOrderPropKeys = Object.keys(stackOrderPropMapping);\nvar stackOrderPropType = PropTypes.oneOf(stackOrderPropKeys);\nvar stackOrderFromProp = function stackOrderFromProp(prop) {\n return stackOrderPropMapping[prop];\n};\nvar stackOffsetPropMapping = {\n expand: stackOffsetExpand,\n diverging: stackOffsetDiverging,\n none: stackOffsetNone,\n silhouette: stackOffsetSilhouette,\n wiggle: stackOffsetWiggle\n};\nvar stackOffsetPropKeys = Object.keys(stackOffsetPropMapping);\nvar stackOffsetPropType = PropTypes.oneOf(stackOffsetPropKeys);\nvar stackOffsetFromProp = function stackOffsetFromProp(prop) {\n return stackOffsetPropMapping[prop];\n};\n\nvar treeMapTilePropMapping = {\n binary: treemapBinary,\n dice: treemapDice,\n slice: treemapSlice,\n sliceDice: treemapSliceDice,\n squarify: treemapSquarify,\n resquarify: treemapResquarify\n};\nvar treeMapTilePropKeys = Object.keys(treeMapTilePropMapping);\nvar treeMapTilePropType = PropTypes.oneOf(treeMapTilePropKeys);\nvar treeMapTileFromProp = function treeMapTileFromProp(prop) {\n return treeMapTilePropMapping[prop];\n};\n\nvar marginPropType = PropTypes.shape({\n top: PropTypes.number,\n right: PropTypes.number,\n bottom: PropTypes.number,\n left: PropTypes.number\n}).isRequired;\nvar blendModes = ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];\nvar blendModePropType = PropTypes.oneOf(blendModes);\n\nvar useCurveInterpolation = function useCurveInterpolation(interpolation) {\n return useMemo(function () {\n return curveFromProp(interpolation);\n }, [interpolation]);\n};\n\nvar defaultAnimate = true;\nvar defaultMotionStiffness = 90;\nvar defaultMotionDamping = 15;\nvar defaultCategoricalColors = nivoCategoricalColors;\nvar defaultColorRange = scaleOrdinal(schemeSet3);\nvar defaultMargin = {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n};\n\nvar useDimensions = function useDimensions(width, height) {\n var partialMargin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return useMemo(function () {\n var margin = _objectSpread2(_objectSpread2({}, defaultMargin), partialMargin);\n return {\n margin: margin,\n innerWidth: width - margin.left - margin.right,\n innerHeight: height - margin.top - margin.bottom,\n outerWidth: width,\n outerHeight: height\n };\n }, [width, height, partialMargin.top, partialMargin.right, partialMargin.bottom, partialMargin.left]);\n};\n\nvar MapShim = (function () {\n if (typeof Map !== 'undefined') {\n return Map;\n }\n function getIndex(arr, key) {\n var result = -1;\n arr.some(function (entry, index) {\n if (entry[0] === key) {\n result = index;\n return true;\n }\n return false;\n });\n return result;\n }\n return (function () {\n function class_1() {\n this.__entries__ = [];\n }\n Object.defineProperty(class_1.prototype, \"size\", {\n get: function () {\n return this.__entries__.length;\n },\n enumerable: true,\n configurable: true\n });\n class_1.prototype.get = function (key) {\n var index = getIndex(this.__entries__, key);\n var entry = this.__entries__[index];\n return entry && entry[1];\n };\n class_1.prototype.set = function (key, value) {\n var index = getIndex(this.__entries__, key);\n if (~index) {\n this.__entries__[index][1] = value;\n }\n else {\n this.__entries__.push([key, value]);\n }\n };\n class_1.prototype.delete = function (key) {\n var entries = this.__entries__;\n var index = getIndex(entries, key);\n if (~index) {\n entries.splice(index, 1);\n }\n };\n class_1.prototype.has = function (key) {\n return !!~getIndex(this.__entries__, key);\n };\n class_1.prototype.clear = function () {\n this.__entries__.splice(0);\n };\n class_1.prototype.forEach = function (callback, ctx) {\n if (ctx === void 0) { ctx = null; }\n for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {\n var entry = _a[_i];\n callback.call(ctx, entry[1], entry[0]);\n }\n };\n return class_1;\n }());\n})();\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\nvar global$1 = (function () {\n if (typeof global !== 'undefined' && global.Math === Math) {\n return global;\n }\n if (typeof self !== 'undefined' && self.Math === Math) {\n return self;\n }\n if (typeof window !== 'undefined' && window.Math === Math) {\n return window;\n }\n return Function('return this')();\n})();\nvar requestAnimationFrame$1 = (function () {\n if (typeof requestAnimationFrame === 'function') {\n return requestAnimationFrame.bind(global$1);\n }\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\n})();\nvar trailingTimeout = 2;\nfunction throttle (callback, delay) {\n var leadingCall = false, trailingCall = false, lastCallTime = 0;\n function resolvePending() {\n if (leadingCall) {\n leadingCall = false;\n callback();\n }\n if (trailingCall) {\n proxy();\n }\n }\n function timeoutCallback() {\n requestAnimationFrame$1(resolvePending);\n }\n function proxy() {\n var timeStamp = Date.now();\n if (leadingCall) {\n if (timeStamp - lastCallTime < trailingTimeout) {\n return;\n }\n trailingCall = true;\n }\n else {\n leadingCall = true;\n trailingCall = false;\n setTimeout(timeoutCallback, delay);\n }\n lastCallTime = timeStamp;\n }\n return proxy;\n}\nvar REFRESH_DELAY = 20;\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\nvar ResizeObserverController = (function () {\n function ResizeObserverController() {\n this.connected_ = false;\n this.mutationEventsAdded_ = false;\n this.mutationsObserver_ = null;\n this.observers_ = [];\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\n }\n ResizeObserverController.prototype.addObserver = function (observer) {\n if (!~this.observers_.indexOf(observer)) {\n this.observers_.push(observer);\n }\n if (!this.connected_) {\n this.connect_();\n }\n };\n ResizeObserverController.prototype.removeObserver = function (observer) {\n var observers = this.observers_;\n var index = observers.indexOf(observer);\n if (~index) {\n observers.splice(index, 1);\n }\n if (!observers.length && this.connected_) {\n this.disconnect_();\n }\n };\n ResizeObserverController.prototype.refresh = function () {\n var changesDetected = this.updateObservers_();\n if (changesDetected) {\n this.refresh();\n }\n };\n ResizeObserverController.prototype.updateObservers_ = function () {\n var activeObservers = this.observers_.filter(function (observer) {\n return observer.gatherActive(), observer.hasActive();\n });\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\n return activeObservers.length > 0;\n };\n ResizeObserverController.prototype.connect_ = function () {\n if (!isBrowser || this.connected_) {\n return;\n }\n document.addEventListener('transitionend', this.onTransitionEnd_);\n window.addEventListener('resize', this.refresh);\n if (mutationObserverSupported) {\n this.mutationsObserver_ = new MutationObserver(this.refresh);\n this.mutationsObserver_.observe(document, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true\n });\n }\n else {\n document.addEventListener('DOMSubtreeModified', this.refresh);\n this.mutationEventsAdded_ = true;\n }\n this.connected_ = true;\n };\n ResizeObserverController.prototype.disconnect_ = function () {\n if (!isBrowser || !this.connected_) {\n return;\n }\n document.removeEventListener('transitionend', this.onTransitionEnd_);\n window.removeEventListener('resize', this.refresh);\n if (this.mutationsObserver_) {\n this.mutationsObserver_.disconnect();\n }\n if (this.mutationEventsAdded_) {\n document.removeEventListener('DOMSubtreeModified', this.refresh);\n }\n this.mutationsObserver_ = null;\n this.mutationEventsAdded_ = false;\n this.connected_ = false;\n };\n ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {\n var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;\n var isReflowProperty = transitionKeys.some(function (key) {\n return !!~propertyName.indexOf(key);\n });\n if (isReflowProperty) {\n this.refresh();\n }\n };\n ResizeObserverController.getInstance = function () {\n if (!this.instance_) {\n this.instance_ = new ResizeObserverController();\n }\n return this.instance_;\n };\n ResizeObserverController.instance_ = null;\n return ResizeObserverController;\n}());\nvar defineConfigurable = (function (target, props) {\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\n var key = _a[_i];\n Object.defineProperty(target, key, {\n value: props[key],\n enumerable: false,\n writable: false,\n configurable: true\n });\n }\n return target;\n});\nvar getWindowOf = (function (target) {\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\n return ownerGlobal || global$1;\n});\nvar emptyRect = createRectInit(0, 0, 0, 0);\nfunction toFloat(value) {\n return parseFloat(value) || 0;\n}\nfunction getBordersSize(styles) {\n var positions = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n positions[_i - 1] = arguments[_i];\n }\n return positions.reduce(function (size, position) {\n var value = styles['border-' + position + '-width'];\n return size + toFloat(value);\n }, 0);\n}\nfunction getPaddings(styles) {\n var positions = ['top', 'right', 'bottom', 'left'];\n var paddings = {};\n for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {\n var position = positions_1[_i];\n var value = styles['padding-' + position];\n paddings[position] = toFloat(value);\n }\n return paddings;\n}\nfunction getSVGContentRect(target) {\n var bbox = target.getBBox();\n return createRectInit(0, 0, bbox.width, bbox.height);\n}\nfunction getHTMLElementContentRect(target) {\n var clientWidth = target.clientWidth, clientHeight = target.clientHeight;\n if (!clientWidth && !clientHeight) {\n return emptyRect;\n }\n var styles = getWindowOf(target).getComputedStyle(target);\n var paddings = getPaddings(styles);\n var horizPad = paddings.left + paddings.right;\n var vertPad = paddings.top + paddings.bottom;\n var width = toFloat(styles.width), height = toFloat(styles.height);\n if (styles.boxSizing === 'border-box') {\n if (Math.round(width + horizPad) !== clientWidth) {\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\n }\n if (Math.round(height + vertPad) !== clientHeight) {\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\n }\n }\n if (!isDocumentElement(target)) {\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\n if (Math.abs(vertScrollbar) !== 1) {\n width -= vertScrollbar;\n }\n if (Math.abs(horizScrollbar) !== 1) {\n height -= horizScrollbar;\n }\n }\n return createRectInit(paddings.left, paddings.top, width, height);\n}\nvar isSVGGraphicsElement = (function () {\n if (typeof SVGGraphicsElement !== 'undefined') {\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\n }\n return function (target) { return (target instanceof getWindowOf(target).SVGElement &&\n typeof target.getBBox === 'function'); };\n})();\nfunction isDocumentElement(target) {\n return target === getWindowOf(target).document.documentElement;\n}\nfunction getContentRect(target) {\n if (!isBrowser) {\n return emptyRect;\n }\n if (isSVGGraphicsElement(target)) {\n return getSVGContentRect(target);\n }\n return getHTMLElementContentRect(target);\n}\nfunction createReadOnlyRect(_a) {\n var x = _a.x, y = _a.y, width = _a.width, height = _a.height;\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\n var rect = Object.create(Constr.prototype);\n defineConfigurable(rect, {\n x: x, y: y, width: width, height: height,\n top: y,\n right: x + width,\n bottom: height + y,\n left: x\n });\n return rect;\n}\nfunction createRectInit(x, y, width, height) {\n return { x: x, y: y, width: width, height: height };\n}\nvar ResizeObservation = (function () {\n function ResizeObservation(target) {\n this.broadcastWidth = 0;\n this.broadcastHeight = 0;\n this.contentRect_ = createRectInit(0, 0, 0, 0);\n this.target = target;\n }\n ResizeObservation.prototype.isActive = function () {\n var rect = getContentRect(this.target);\n this.contentRect_ = rect;\n return (rect.width !== this.broadcastWidth ||\n rect.height !== this.broadcastHeight);\n };\n ResizeObservation.prototype.broadcastRect = function () {\n var rect = this.contentRect_;\n this.broadcastWidth = rect.width;\n this.broadcastHeight = rect.height;\n return rect;\n };\n return ResizeObservation;\n}());\nvar ResizeObserverEntry = (function () {\n function ResizeObserverEntry(target, rectInit) {\n var contentRect = createReadOnlyRect(rectInit);\n defineConfigurable(this, { target: target, contentRect: contentRect });\n }\n return ResizeObserverEntry;\n}());\nvar ResizeObserverSPI = (function () {\n function ResizeObserverSPI(callback, controller, callbackCtx) {\n this.activeObservations_ = [];\n this.observations_ = new MapShim();\n if (typeof callback !== 'function') {\n throw new TypeError('The callback provided as parameter 1 is not a function.');\n }\n this.callback_ = callback;\n this.controller_ = controller;\n this.callbackCtx_ = callbackCtx;\n }\n ResizeObserverSPI.prototype.observe = function (target) {\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\n return;\n }\n if (!(target instanceof getWindowOf(target).Element)) {\n throw new TypeError('parameter 1 is not of type \"Element\".');\n }\n var observations = this.observations_;\n if (observations.has(target)) {\n return;\n }\n observations.set(target, new ResizeObservation(target));\n this.controller_.addObserver(this);\n this.controller_.refresh();\n };\n ResizeObserverSPI.prototype.unobserve = function (target) {\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\n return;\n }\n if (!(target instanceof getWindowOf(target).Element)) {\n throw new TypeError('parameter 1 is not of type \"Element\".');\n }\n var observations = this.observations_;\n if (!observations.has(target)) {\n return;\n }\n observations.delete(target);\n if (!observations.size) {\n this.controller_.removeObserver(this);\n }\n };\n ResizeObserverSPI.prototype.disconnect = function () {\n this.clearActive();\n this.observations_.clear();\n this.controller_.removeObserver(this);\n };\n ResizeObserverSPI.prototype.gatherActive = function () {\n var _this = this;\n this.clearActive();\n this.observations_.forEach(function (observation) {\n if (observation.isActive()) {\n _this.activeObservations_.push(observation);\n }\n });\n };\n ResizeObserverSPI.prototype.broadcastActive = function () {\n if (!this.hasActive()) {\n return;\n }\n var ctx = this.callbackCtx_;\n var entries = this.activeObservations_.map(function (observation) {\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\n });\n this.callback_.call(ctx, entries, ctx);\n this.clearActive();\n };\n ResizeObserverSPI.prototype.clearActive = function () {\n this.activeObservations_.splice(0);\n };\n ResizeObserverSPI.prototype.hasActive = function () {\n return this.activeObservations_.length > 0;\n };\n return ResizeObserverSPI;\n}());\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\nvar ResizeObserver = (function () {\n function ResizeObserver(callback) {\n if (!(this instanceof ResizeObserver)) {\n throw new TypeError('Cannot call a class as a function.');\n }\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n var controller = ResizeObserverController.getInstance();\n var observer = new ResizeObserverSPI(callback, controller, this);\n observers.set(this, observer);\n }\n return ResizeObserver;\n}());\n[\n 'observe',\n 'unobserve',\n 'disconnect'\n].forEach(function (method) {\n ResizeObserver.prototype[method] = function () {\n var _a;\n return (_a = observers.get(this))[method].apply(_a, arguments);\n };\n});\nvar index = (function () {\n if (typeof global$1.ResizeObserver !== 'undefined') {\n return global$1.ResizeObserver;\n }\n return ResizeObserver;\n})();\n\nvar useMeasure = function useMeasure() {\n var measureRef = useRef(null);\n var _useState = useState({\n left: 0,\n top: 0,\n width: 0,\n height: 0\n }),\n _useState2 = _slicedToArray(_useState, 2),\n bounds = _useState2[0],\n setBounds = _useState2[1];\n var _useState3 = useState(function () {\n return new index(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n entry = _ref2[0];\n return setBounds(entry.contentRect);\n });\n }),\n _useState4 = _slicedToArray(_useState3, 1),\n observer = _useState4[0];\n useEffect(function () {\n if (measureRef.current) {\n observer.observe(measureRef.current);\n }\n return function () {\n return observer.disconnect();\n };\n }, []);\n return [measureRef, bounds];\n};\n\nvar usePartialTheme = function usePartialTheme(partialTheme) {\n return useMemo(function () {\n return extendDefaultTheme(defaultTheme, partialTheme);\n }, [partialTheme]);\n};\n\nvar getValueFormatter = function getValueFormatter(format$1) {\n if (typeof format$1 === 'function') return format$1;\n if (typeof format$1 === 'string') {\n if (format$1.indexOf('time:') === 0) {\n return timeFormat(format$1.slice('5'));\n }\n return format(format$1);\n }\n return function (v) {\n return v;\n };\n};\nvar useValueFormatter = function useValueFormatter(format) {\n return useMemo(function () {\n return getValueFormatter(format);\n }, [format]);\n};\n\nvar themeContext = createContext();\nvar defaultPartialTheme = {};\nvar ThemeProvider = function ThemeProvider(_ref) {\n var _ref$theme = _ref.theme,\n partialTheme = _ref$theme === void 0 ? defaultPartialTheme : _ref$theme,\n children = _ref.children;\n var theme = usePartialTheme(partialTheme);\n return React.createElement(themeContext.Provider, {\n value: theme\n }, children);\n};\nvar useTheme = function useTheme() {\n return useContext(themeContext);\n};\n\nvar containerStyle = {\n position: 'relative'\n};\nvar tooltipStyle = {\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 10\n};\nvar Container = function Container(_ref) {\n var children = _ref.children,\n theme = _ref.theme,\n _ref$isInteractive = _ref.isInteractive,\n isInteractive = _ref$isInteractive === void 0 ? true : _ref$isInteractive,\n animate = _ref.animate,\n motionStiffness = _ref.motionStiffness,\n motionDamping = _ref.motionDamping;\n var containerEl = useRef(null);\n var _useState = useState({\n isTooltipVisible: false,\n tooltipContent: null,\n position: {}\n }),\n _useState2 = _slicedToArray(_useState, 2),\n state = _useState2[0],\n setState = _useState2[1];\n var showTooltip = useCallback(function (content, event) {\n if (!containerEl) return;\n var bounds = containerEl.current.getBoundingClientRect();\n var clientX = event.clientX,\n clientY = event.clientY;\n var x = clientX - bounds.left;\n var y = clientY - bounds.top;\n var position = {};\n if (x < bounds.width / 2) position.left = x + 20;else position.right = bounds.width - x + 20;\n if (y < bounds.height / 2) position.top = y - 12;else position.bottom = bounds.height - y - 12;\n setState({\n isTooltipVisible: true,\n tooltipContent: content,\n position: position\n });\n }, [containerEl]);\n var hideTooltip = useCallback(function () {\n setState({\n isTooltipVisible: false,\n tooltipContent: null\n });\n });\n var isTooltipVisible = state.isTooltipVisible,\n tooltipContent = state.tooltipContent,\n position = state.position;\n var content;\n if (isInteractive === true) {\n content = React.createElement(\"div\", {\n style: containerStyle,\n ref: containerEl\n }, children({\n showTooltip: isInteractive ? showTooltip : noop,\n hideTooltip: isInteractive ? hideTooltip : noop\n }), isTooltipVisible && React.createElement(\"div\", {\n style: _objectSpread2(_objectSpread2(_objectSpread2({}, tooltipStyle), position), theme.tooltip)\n }, tooltipContent));\n } else {\n content = children({\n showTooltip: isInteractive ? showTooltip : noop,\n hideTooltip: isInteractive ? hideTooltip : noop\n });\n }\n return React.createElement(themeContext.Provider, {\n value: theme\n }, React.createElement(MotionConfigProvider, {\n animate: animate,\n stiffness: motionStiffness,\n damping: motionDamping\n }, React.createElement(tooltipContext.Provider, {\n value: [showTooltip, hideTooltip]\n }, content)));\n};\n\nvar ResponsiveWrapper = function ResponsiveWrapper(_ref) {\n var children = _ref.children;\n var _useMeasure = useMeasure(),\n _useMeasure2 = _slicedToArray(_useMeasure, 2),\n measureRef = _useMeasure2[0],\n bounds = _useMeasure2[1];\n var shouldRender = bounds.width > 0 && bounds.height > 0;\n return React.createElement(\"div\", {\n ref: measureRef,\n style: {\n width: '100%',\n height: '100%'\n }\n }, shouldRender && children({\n width: bounds.width,\n height: bounds.height\n }));\n};\n\nvar LinearGradient = function LinearGradient(_ref) {\n var id = _ref.id,\n colors = _ref.colors;\n return React.createElement(\"linearGradient\", {\n id: id,\n x1: 0,\n x2: 0,\n y1: 0,\n y2: 1\n }, colors.map(function (_ref2) {\n var offset = _ref2.offset,\n color = _ref2.color,\n opacity = _ref2.opacity;\n return React.createElement(\"stop\", {\n key: offset,\n offset: \"\".concat(offset, \"%\"),\n stopColor: color,\n stopOpacity: opacity !== undefined ? opacity : 1\n });\n }));\n};\nvar linearGradientDef = function linearGradientDef(id, colors) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return _objectSpread2({\n id: id,\n type: 'linearGradient',\n colors: colors\n }, options);\n};\n\nvar gradientTypes = {\n linearGradient: LinearGradient\n};\n\nvar PatternDots = memo(function (_ref) {\n var id = _ref.id,\n background = _ref.background,\n color = _ref.color,\n size = _ref.size,\n padding = _ref.padding,\n stagger = _ref.stagger;\n var fullSize = size + padding;\n var radius = size / 2;\n var halfPadding = padding / 2;\n if (stagger === true) {\n fullSize = size * 2 + padding * 2;\n }\n return React.createElement(\"pattern\", {\n id: id,\n width: fullSize,\n height: fullSize,\n patternUnits: \"userSpaceOnUse\"\n }, React.createElement(\"rect\", {\n width: fullSize,\n height: fullSize,\n fill: background\n }), React.createElement(\"circle\", {\n cx: halfPadding + radius,\n cy: halfPadding + radius,\n r: radius,\n fill: color\n }), stagger && React.createElement(\"circle\", {\n cx: padding * 1.5 + size + radius,\n cy: padding * 1.5 + size + radius,\n r: radius,\n fill: color\n }));\n});\nPatternDots.displayName = 'PatternDots';\nPatternDots.defaultProps = {\n color: '#000000',\n background: '#ffffff',\n size: 4,\n padding: 4,\n stagger: false\n};\nvar patternDotsDef = function patternDotsDef(id) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _objectSpread2({\n id: id,\n type: 'patternDots'\n }, options);\n};\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nvar TWO_PI = Math.PI * 2;\nvar degreesToRadians = function degreesToRadians(degrees) {\n return degrees * Math.PI / 180;\n};\nvar radiansToDegrees = function radiansToDegrees(radians) {\n return 180 * radians / Math.PI;\n};\nvar midAngle = function midAngle(arc) {\n return arc.startAngle + (arc.endAngle - arc.startAngle) / 2;\n};\nvar positionFromAngle = function positionFromAngle(angle, distance) {\n return {\n x: Math.cos(angle) * distance,\n y: Math.sin(angle) * distance\n };\n};\nvar absoluteAngleDegrees = function absoluteAngleDegrees(angle) {\n var absAngle = angle % 360;\n if (absAngle < 0) {\n absAngle += 360;\n }\n return absAngle;\n};\nvar absoluteAngleRadians = function absoluteAngleRadians(angle) {\n return angle - TWO_PI * Math.floor((angle + Math.PI) / TWO_PI);\n};\nvar computeArcBoundingBox = function computeArcBoundingBox(ox, oy, radius, startAngle, endAngle) {\n var includeCenter = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n var points = [];\n var p0 = positionFromAngle(degreesToRadians(startAngle), radius);\n points.push([p0.x, p0.y]);\n var p1 = positionFromAngle(degreesToRadians(endAngle), radius);\n points.push([p1.x, p1.y]);\n for (var angle = Math.round(Math.min(startAngle, endAngle)); angle <= Math.round(Math.max(startAngle, endAngle)); angle++) {\n if (angle % 90 === 0) {\n var p = positionFromAngle(degreesToRadians(angle), radius);\n points.push([p.x, p.y]);\n }\n }\n points = points.map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n x = _ref2[0],\n y = _ref2[1];\n return [ox + x, oy + y];\n });\n if (includeCenter === true) points.push([ox, oy]);\n var xs = points.map(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 1),\n x = _ref4[0];\n return x;\n });\n var ys = points.map(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n y = _ref6[1];\n return y;\n });\n var x0 = Math.min.apply(Math, _toConsumableArray(xs));\n var x1 = Math.max.apply(Math, _toConsumableArray(xs));\n var y0 = Math.min.apply(Math, _toConsumableArray(ys));\n var y1 = Math.max.apply(Math, _toConsumableArray(ys));\n return {\n points: points,\n x: x0,\n y: y0,\n width: x1 - x0,\n height: y1 - y0\n };\n};\n\nvar textPropsByEngine = {\n svg: {\n align: {\n left: 'start',\n center: 'middle',\n right: 'end'\n },\n baseline: {\n top: 'text-before-edge',\n center: 'central',\n bottom: 'alphabetic'\n }\n },\n canvas: {\n align: {\n left: 'left',\n center: 'center',\n right: 'right'\n },\n baseline: {\n top: 'top',\n center: 'middle',\n bottom: 'bottom'\n }\n }\n};\n\nvar getPolarLabelProps = function getPolarLabelProps(radius, angle, rotation) {\n var engine = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'svg';\n var textProps = textPropsByEngine[engine];\n var _positionFromAngle = positionFromAngle(angle - Math.PI / 2, radius),\n x = _positionFromAngle.x,\n y = _positionFromAngle.y;\n var rotate = radiansToDegrees(angle);\n var align = textProps.align.center;\n var baseline = textProps.baseline.bottom;\n if (rotation > 0) {\n align = textProps.align.right;\n baseline = textProps.baseline.center;\n } else if (rotation < 0) {\n align = textProps.align.left;\n baseline = textProps.baseline.center;\n }\n if (rotation !== 0 && rotate > 180) {\n rotate -= 180;\n align = align === textProps.align.right ? textProps.align.left : textProps.align.right;\n }\n rotate += rotation;\n return {\n x: x,\n y: y,\n rotate: rotate,\n align: align,\n baseline: baseline\n };\n};\n\nvar PatternLines = memo(function (_ref) {\n var id = _ref.id,\n _spacing = _ref.spacing,\n _rotation = _ref.rotation,\n background = _ref.background,\n color = _ref.color,\n lineWidth = _ref.lineWidth;\n var rotation = Math.round(_rotation) % 360;\n var spacing = Math.abs(_spacing);\n if (rotation > 180) rotation = rotation - 360;else if (rotation > 90) rotation = rotation - 180;else if (rotation < -180) rotation = rotation + 360;else if (rotation < -90) rotation = rotation + 180;\n var width = spacing;\n var height = spacing;\n var path;\n if (rotation === 0) {\n path = \"\\n M 0 0 L \".concat(width, \" 0\\n M 0 \").concat(height, \" L \").concat(width, \" \").concat(height, \"\\n \");\n } else if (rotation === 90) {\n path = \"\\n M 0 0 L 0 \".concat(height, \"\\n M \").concat(width, \" 0 L \").concat(width, \" \").concat(height, \"\\n \");\n } else {\n width = Math.abs(spacing / Math.sin(degreesToRadians(rotation)));\n height = spacing / Math.sin(degreesToRadians(90 - rotation));\n if (rotation > 0) {\n path = \"\\n M 0 \".concat(-height, \" L \").concat(width * 2, \" \").concat(height, \"\\n M \").concat(-width, \" \").concat(-height, \" L \").concat(width, \" \").concat(height, \"\\n M \").concat(-width, \" 0 L \").concat(width, \" \").concat(height * 2, \"\\n \");\n } else {\n path = \"\\n M \".concat(-width, \" \").concat(height, \" L \").concat(width, \" \").concat(-height, \"\\n M \").concat(-width, \" \").concat(height * 2, \" L \").concat(width * 2, \" \").concat(-height, \"\\n M 0 \").concat(height * 2, \" L \").concat(width * 2, \" 0\\n \");\n }\n }\n return React.createElement(\"pattern\", {\n id: id,\n width: width,\n height: height,\n patternUnits: \"userSpaceOnUse\"\n }, React.createElement(\"rect\", {\n width: width,\n height: height,\n fill: background,\n stroke: \"rgba(255, 0, 0, 0.1)\",\n strokeWidth: 0\n }), React.createElement(\"path\", {\n d: path,\n strokeWidth: lineWidth,\n stroke: color,\n strokeLinecap: \"square\"\n }));\n});\nPatternLines.displayName = 'PatternLines';\nPatternLines.defaultProps = {\n spacing: 5,\n rotation: 0,\n color: '#000000',\n background: '#ffffff',\n lineWidth: 2\n};\nvar patternLinesDef = function patternLinesDef(id) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _objectSpread2({\n id: id,\n type: 'patternLines'\n }, options);\n};\n\nvar PatternSquares = memo(function (_ref) {\n var id = _ref.id,\n background = _ref.background,\n color = _ref.color,\n size = _ref.size,\n padding = _ref.padding,\n stagger = _ref.stagger;\n var fullSize = size + padding;\n var halfPadding = padding / 2;\n if (stagger === true) {\n fullSize = size * 2 + padding * 2;\n }\n return React.createElement(\"pattern\", {\n id: id,\n width: fullSize,\n height: fullSize,\n patternUnits: \"userSpaceOnUse\"\n }, React.createElement(\"rect\", {\n width: fullSize,\n height: fullSize,\n fill: background\n }), React.createElement(\"rect\", {\n x: halfPadding,\n y: halfPadding,\n width: size,\n height: size,\n fill: color\n }), stagger && React.createElement(\"rect\", {\n x: padding * 1.5 + size,\n y: padding * 1.5 + size,\n width: size,\n height: size,\n fill: color\n }));\n});\nPatternSquares.displayName = 'PatternSquares';\nPatternSquares.defaultProps = {\n color: '#000000',\n background: '#ffffff',\n size: 4,\n padding: 4,\n stagger: false\n};\nvar patternSquaresDef = function patternSquaresDef(id) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _objectSpread2({\n id: id,\n type: 'patternSquares'\n }, options);\n};\n\nvar patternTypes = {\n patternDots: PatternDots,\n patternLines: PatternLines,\n patternSquares: PatternSquares\n};\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = _objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\n\nvar defsMapping = _objectSpread2(_objectSpread2({}, gradientTypes), patternTypes);\nvar Defs = function Defs(_ref) {\n var definitions = _ref.defs;\n if (!definitions || definitions.length < 1) return null;\n return React.createElement(\"defs\", null, definitions.map(function (_ref2) {\n var type = _ref2.type,\n def = _objectWithoutProperties(_ref2, [\"type\"]);\n if (defsMapping[type]) return React.createElement(defsMapping[type], _objectSpread2({\n key: def.id\n }, def));\n return null;\n }));\n};\nvar Defs$1 = memo(Defs);\n\nvar SvgWrapper = function SvgWrapper(_ref) {\n var width = _ref.width,\n height = _ref.height,\n margin = _ref.margin,\n defs = _ref.defs,\n children = _ref.children,\n role = _ref.role;\n var theme = useTheme();\n return React.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n role: role,\n width: width,\n height: height\n }, React.createElement(Defs$1, {\n defs: defs\n }), React.createElement(\"rect\", {\n width: width,\n height: height,\n fill: theme.background\n }), React.createElement(\"g\", {\n transform: \"translate(\".concat(margin.left, \",\").concat(margin.top, \")\")\n }, children));\n};\n\nvar DotsItemSymbol = function DotsItemSymbol(_ref) {\n var size = _ref.size,\n color = _ref.color,\n borderWidth = _ref.borderWidth,\n borderColor = _ref.borderColor;\n return React.createElement(\"circle\", {\n r: size / 2,\n fill: color,\n stroke: borderColor,\n strokeWidth: borderWidth,\n style: {\n pointerEvents: 'none'\n }\n });\n};\nvar DotsItemSymbol$1 = memo(DotsItemSymbol);\n\nvar DotsItem = function DotsItem(_ref) {\n var x = _ref.x,\n y = _ref.y,\n symbol = _ref.symbol,\n size = _ref.size,\n datum = _ref.datum,\n color = _ref.color,\n borderWidth = _ref.borderWidth,\n borderColor = _ref.borderColor,\n label = _ref.label,\n labelTextAnchor = _ref.labelTextAnchor,\n labelYOffset = _ref.labelYOffset,\n theme = _ref.theme;\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.config;\n var animatedProps = useSpring({\n transform: \"translate(\".concat(x, \", \").concat(y, \")\"),\n config: springConfig,\n immediate: !animate\n });\n return React.createElement(animated.g, {\n transform: animatedProps.transform,\n style: {\n pointerEvents: 'none'\n }\n }, React.createElement(symbol, {\n size: size,\n color: color,\n datum: datum,\n borderWidth: borderWidth,\n borderColor: borderColor\n }), label && React.createElement(\"text\", {\n textAnchor: labelTextAnchor,\n y: labelYOffset,\n style: theme.dots.text\n }, label));\n};\nvar DotsItemDefaultProps = {\n symbol: DotsItemSymbol$1,\n labelTextAnchor: 'middle',\n labelYOffset: -12\n};\nDotsItem.defaultProps = DotsItemDefaultProps;\nvar DotsItem$1 = memo(DotsItem);\n\nvar computeLabel = function computeLabel(_ref) {\n var axis = _ref.axis,\n width = _ref.width,\n height = _ref.height,\n position = _ref.position,\n offsetX = _ref.offsetX,\n offsetY = _ref.offsetY,\n orientation = _ref.orientation;\n var x = 0;\n var y = 0;\n var rotation = orientation === 'vertical' ? -90 : 0;\n var textAnchor = 'start';\n if (axis === 'x') {\n switch (position) {\n case 'top-left':\n x = -offsetX;\n y = offsetY;\n textAnchor = 'end';\n break;\n case 'top':\n y = -offsetY;\n if (orientation === 'horizontal') {\n textAnchor = 'middle';\n } else {\n textAnchor = 'start';\n }\n break;\n case 'top-right':\n x = offsetX;\n y = offsetY;\n if (orientation === 'horizontal') {\n textAnchor = 'start';\n } else {\n textAnchor = 'end';\n }\n break;\n case 'right':\n x = offsetX;\n y = height / 2;\n if (orientation === 'horizontal') {\n textAnchor = 'start';\n } else {\n textAnchor = 'middle';\n }\n break;\n case 'bottom-right':\n x = offsetX;\n y = height - offsetY;\n textAnchor = 'start';\n break;\n case 'bottom':\n y = height + offsetY;\n if (orientation === 'horizontal') {\n textAnchor = 'middle';\n } else {\n textAnchor = 'end';\n }\n break;\n case 'bottom-left':\n y = height - offsetY;\n x = -offsetX;\n if (orientation === 'horizontal') {\n textAnchor = 'end';\n } else {\n textAnchor = 'start';\n }\n break;\n case 'left':\n x = -offsetX;\n y = height / 2;\n if (orientation === 'horizontal') {\n textAnchor = 'end';\n } else {\n textAnchor = 'middle';\n }\n break;\n }\n } else {\n switch (position) {\n case 'top-left':\n x = offsetX;\n y = -offsetY;\n textAnchor = 'start';\n break;\n case 'top':\n x = width / 2;\n y = -offsetY;\n if (orientation === 'horizontal') {\n textAnchor = 'middle';\n } else {\n textAnchor = 'start';\n }\n break;\n case 'top-right':\n x = width - offsetX;\n y = -offsetY;\n if (orientation === 'horizontal') {\n textAnchor = 'end';\n } else {\n textAnchor = 'start';\n }\n break;\n case 'right':\n x = width + offsetX;\n if (orientation === 'horizontal') {\n textAnchor = 'start';\n } else {\n textAnchor = 'middle';\n }\n break;\n case 'bottom-right':\n x = width - offsetX;\n y = offsetY;\n textAnchor = 'end';\n break;\n case 'bottom':\n x = width / 2;\n y = offsetY;\n if (orientation === 'horizontal') {\n textAnchor = 'middle';\n } else {\n textAnchor = 'end';\n }\n break;\n case 'bottom-left':\n x = offsetX;\n y = offsetY;\n if (orientation === 'horizontal') {\n textAnchor = 'start';\n } else {\n textAnchor = 'end';\n }\n break;\n case 'left':\n x = -offsetX;\n if (orientation === 'horizontal') {\n textAnchor = 'end';\n } else {\n textAnchor = 'middle';\n }\n break;\n }\n }\n return {\n x: x,\n y: y,\n rotation: rotation,\n textAnchor: textAnchor\n };\n};\nvar CartesianMarkersItem = function CartesianMarkersItem(_ref2) {\n var width = _ref2.width,\n height = _ref2.height,\n axis = _ref2.axis,\n scale = _ref2.scale,\n value = _ref2.value,\n lineStyle = _ref2.lineStyle,\n textStyle = _ref2.textStyle,\n legend = _ref2.legend,\n legendPosition = _ref2.legendPosition,\n legendOffsetX = _ref2.legendOffsetX,\n legendOffsetY = _ref2.legendOffsetY,\n legendOrientation = _ref2.legendOrientation;\n var theme = useTheme();\n var x = 0;\n var x2 = 0;\n var y = 0;\n var y2 = 0;\n if (axis === 'y') {\n y = scale(value);\n x2 = width;\n } else {\n x = scale(value);\n y2 = height;\n }\n var legendNode = null;\n if (legend) {\n var legendProps = computeLabel({\n axis: axis,\n width: width,\n height: height,\n position: legendPosition,\n offsetX: legendOffsetX,\n offsetY: legendOffsetY,\n orientation: legendOrientation\n });\n legendNode = React.createElement(\"text\", {\n transform: \"translate(\".concat(legendProps.x, \", \").concat(legendProps.y, \") rotate(\").concat(legendProps.rotation, \")\"),\n textAnchor: legendProps.textAnchor,\n dominantBaseline: \"central\",\n style: textStyle\n }, legend);\n }\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \", \").concat(y, \")\")\n }, React.createElement(\"line\", {\n x1: 0,\n x2: x2,\n y1: 0,\n y2: y2,\n stroke: theme.markers.lineColor,\n strokeWidth: theme.markers.lineStrokeWidth,\n style: lineStyle\n }), legendNode);\n};\nCartesianMarkersItem.defaultProps = {\n legendPosition: 'top-right',\n legendOffsetX: 14,\n legendOffsetY: 14,\n legendOrientation: 'horizontal'\n};\nvar CartesianMarkersItem$1 = memo(CartesianMarkersItem);\n\nvar CartesianMarkers = function CartesianMarkers(_ref) {\n var markers = _ref.markers,\n width = _ref.width,\n height = _ref.height,\n xScale = _ref.xScale,\n yScale = _ref.yScale;\n if (!markers || markers.length === 0) return null;\n return markers.map(function (marker, i) {\n return React.createElement(CartesianMarkersItem$1, Object.assign({\n key: i\n }, marker, {\n width: width,\n height: height,\n scale: marker.axis === 'y' ? yScale : xScale\n }));\n });\n};\nvar CartesianMarkers$1 = memo(CartesianMarkers);\n\nvar withCurve = (function () {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$srcKey = _ref.srcKey,\n srcKey = _ref$srcKey === void 0 ? 'curve' : _ref$srcKey,\n _ref$destKey = _ref.destKey,\n destKey = _ref$destKey === void 0 ? 'curveInterpolator' : _ref$destKey;\n return withProps(function (props) {\n return _defineProperty({}, destKey, curveFromProp(props[srcKey]));\n });\n});\n\nvar withDimensions = (function () {\n return compose(defaultProps({\n margin: defaultMargin\n }), setPropTypes({\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n margin: marginPropType\n }), withPropsOnChange(function (props, nextProps) {\n return props.width !== nextProps.width || props.height !== nextProps.height || !isEqual(props.margin, nextProps.margin);\n }, function (props) {\n var margin = Object.assign({}, defaultMargin, props.margin);\n return {\n margin: margin,\n width: props.width - margin.left - margin.right,\n height: props.height - margin.top - margin.bottom,\n outerWidth: props.width,\n outerHeight: props.height\n };\n }));\n});\n\nvar getLabelGenerator = function getLabelGenerator(_label, labelFormat) {\n var getRawLabel = isFunction(_label) ? _label : function (d) {\n return get(d, _label);\n };\n var formatter;\n if (labelFormat) {\n formatter = isFunction(labelFormat) ? labelFormat : format(labelFormat);\n }\n if (formatter) return function (d) {\n return formatter(getRawLabel(d));\n };\n return getRawLabel;\n};\nvar getAccessorFor = function getAccessorFor(directive) {\n return isFunction(directive) ? directive : function (d) {\n return d[directive];\n };\n};\nvar getAccessorOrValue = function getAccessorOrValue(value) {\n return isFunction(value) ? value : function () {\n return value;\n };\n};\n\nvar withHierarchy = (function () {\n var _setPropTypes;\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$srcKey = _ref.srcKey,\n srcKey = _ref$srcKey === void 0 ? 'root' : _ref$srcKey,\n _ref$destKey = _ref.destKey,\n destKey = _ref$destKey === void 0 ? 'root' : _ref$destKey,\n _ref$valueKey = _ref.valueKey,\n valueKey = _ref$valueKey === void 0 ? 'value' : _ref$valueKey,\n _ref$valueDefault = _ref.valueDefault,\n valueDefault = _ref$valueDefault === void 0 ? 'value' : _ref$valueDefault;\n return compose(defaultProps(_defineProperty({}, valueKey, valueDefault)), setPropTypes((_setPropTypes = {}, _defineProperty(_setPropTypes, srcKey, PropTypes.object.isRequired), _defineProperty(_setPropTypes, valueKey, PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired), _setPropTypes)), withPropsOnChange([srcKey, valueKey], function (props) {\n return _defineProperty({}, destKey, hierarchy(props[srcKey]).sum(getAccessorFor(props[valueKey])));\n }));\n});\n\nvar withMotion = (function () {\n return compose(setPropTypes(motionPropTypes), defaultProps({\n animate: defaultAnimate,\n motionDamping: defaultMotionDamping,\n motionStiffness: defaultMotionStiffness\n }));\n});\n\nvar withTheme = (function () {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$srcKey = _ref.srcKey,\n srcKey = _ref$srcKey === void 0 ? 'theme' : _ref$srcKey,\n _ref$destKey = _ref.destKey,\n destKey = _ref$destKey === void 0 ? 'theme' : _ref$destKey;\n return compose(setPropTypes(_defineProperty({}, srcKey, PropTypes.object)), withPropsOnChange([srcKey], function (props) {\n return _defineProperty({}, destKey, extendDefaultTheme(defaultTheme, props[srcKey]));\n }));\n});\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n return _typeof(obj);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n return function () {\n var Super = _getPrototypeOf(Derived),\n result;\n if (_isNativeReflectConstruct()) {\n var NewTarget = _getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return _possibleConstructorReturn(this, result);\n };\n}\n\nvar containerStyle$1 = {\n position: 'relative'\n};\nvar Container$1 = function Container(_ref) {\n var theme = _ref.theme,\n _ref$renderWrapper = _ref.renderWrapper,\n renderWrapper = _ref$renderWrapper === void 0 ? true : _ref$renderWrapper,\n children = _ref.children,\n animate = _ref.animate,\n motionStiffness = _ref.motionStiffness,\n motionDamping = _ref.motionDamping,\n motionConfig = _ref.motionConfig;\n var container = useRef(null);\n var _useTooltipHandlers = useTooltipHandlers(container),\n showTooltipAt = _useTooltipHandlers.showTooltipAt,\n showTooltipFromEvent = _useTooltipHandlers.showTooltipFromEvent,\n hideTooltip = _useTooltipHandlers.hideTooltip,\n isTooltipVisible = _useTooltipHandlers.isTooltipVisible,\n tooltipContent = _useTooltipHandlers.tooltipContent,\n tooltipPosition = _useTooltipHandlers.tooltipPosition,\n tooltipAnchor = _useTooltipHandlers.tooltipAnchor;\n return React.createElement(ThemeProvider, {\n theme: theme\n }, React.createElement(MotionConfigProvider, {\n animate: animate,\n stiffness: motionStiffness,\n damping: motionDamping,\n config: motionConfig\n }, React.createElement(tooltipContext.Provider, {\n value: {\n showTooltipAt: showTooltipAt,\n showTooltipFromEvent: showTooltipFromEvent,\n hideTooltip: hideTooltip\n }\n }, renderWrapper === true && React.createElement(\"div\", {\n style: containerStyle$1,\n ref: container\n }, children, isTooltipVisible && React.createElement(TooltipWrapper, {\n position: tooltipPosition,\n anchor: tooltipAnchor\n }, tooltipContent)), renderWrapper !== true && children)));\n};\nvar withContainer = function withContainer(WrappedComponent) {\n return function (_Component) {\n _inherits(_class, _Component);\n var _super = _createSuper(_class);\n function _class() {\n _classCallCheck(this, _class);\n return _super.apply(this, arguments);\n }\n _createClass(_class, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n theme = _this$props.theme,\n renderWrapper = _this$props.renderWrapper,\n childProps = _objectWithoutProperties(_this$props, [\"theme\", \"renderWrapper\"]);\n return React.createElement(Container$1, {\n theme: theme,\n renderWrapper: renderWrapper,\n animate: childProps.animate,\n motionStiffness: childProps.motionStiffness,\n motionDamping: childProps.motionDamping,\n motionConfig: childProps.motionConfig\n }, React.createElement(WrappedComponent, childProps));\n }\n }]);\n return _class;\n }(Component);\n};\n\nvar boxAlignments = ['center', 'top-left', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left'];\nvar alignBox = function alignBox(box, container, alignment) {\n var deltaX = container.width - box.width;\n var deltaY = container.height - box.height;\n var x = 0;\n var y = 0;\n if (alignment === 'center') {\n x = deltaX / 2;\n y = deltaY / 2;\n }\n if (alignment === 'top') {\n x = deltaX / 2;\n }\n if (alignment === 'top-right') {\n x = deltaX;\n }\n if (alignment === 'right') {\n x = deltaX;\n y = deltaY / 2;\n }\n if (alignment === 'bottom-right') {\n x = deltaX;\n y = deltaY;\n }\n if (alignment === 'bottom') {\n x = deltaX / 2;\n y = deltaY;\n }\n if (alignment === 'bottom-left') {\n y = deltaY;\n }\n if (alignment === 'left') {\n y = deltaY / 2;\n }\n return [x, y];\n};\n\nvar getDistance = function getDistance(x1, y1, x2, y2) {\n var deltaX = x2 - x1;\n var deltaY = y2 - y1;\n deltaX *= deltaX;\n deltaY *= deltaY;\n return Math.sqrt(deltaX + deltaY);\n};\nvar getAngle = function getAngle(x1, y1, x2, y2) {\n var angle = Math.atan2(y2 - y1, x2 - x1) - Math.PI / 2;\n return angle > 0 ? angle : Math.PI * 2 + angle;\n};\nvar isCursorInRect = function isCursorInRect(x, y, width, height, cursorX, cursorY) {\n return x <= cursorX && cursorX <= x + width && y <= cursorY && cursorY <= y + height;\n};\nvar isCursorInRing = function isCursorInRing(centerX, centerY, radius, innerRadius, cursorX, cursorY) {\n var distance = getDistance(cursorX, cursorY, centerX, centerY);\n return distance < radius && distance > innerRadius;\n};\nvar getHoveredArc = function getHoveredArc(centerX, centerY, radius, innerRadius, arcs, cursorX, cursorY) {\n if (!isCursorInRing(centerX, centerY, radius, innerRadius, cursorX, cursorY)) return null;\n var cursorAngle = getAngle(cursorX, cursorY, centerX, centerY);\n return arcs.find(function (_ref) {\n var startAngle = _ref.startAngle,\n endAngle = _ref.endAngle;\n return cursorAngle >= startAngle && cursorAngle < endAngle;\n });\n};\n\nvar getRelativeCursor = function getRelativeCursor(el, event) {\n var clientX = event.clientX,\n clientY = event.clientY;\n var bounds = el.getBoundingClientRect();\n return [clientX - bounds.left, clientY - bounds.top];\n};\n\nvar gradientKeys = Object.keys(gradientTypes);\nvar patternKeys = Object.keys(patternTypes);\nvar isMatchingDef = function isMatchingDef(predicate, node, dataKey) {\n if (predicate === '*') {\n return true;\n } else if (isFunction(predicate)) {\n return predicate(node);\n } else if (isPlainObject(predicate)) {\n var data = dataKey ? get(node, dataKey) : node;\n return isEqual(pick(data, Object.keys(predicate)), predicate);\n }\n return false;\n};\nvar bindDefs = function bindDefs(defs, nodes, rules) {\n var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n dataKey = _ref.dataKey,\n _ref$colorKey = _ref.colorKey,\n colorKey = _ref$colorKey === void 0 ? 'color' : _ref$colorKey,\n _ref$targetKey = _ref.targetKey,\n targetKey = _ref$targetKey === void 0 ? 'fill' : _ref$targetKey;\n var boundDefs = [];\n var generatedIds = {};\n if (defs.length && nodes.length) {\n boundDefs = _toConsumableArray(defs);\n nodes.forEach(function (node) {\n var _loop = function _loop(i) {\n var _rules$i = rules[i],\n id = _rules$i.id,\n match = _rules$i.match;\n if (isMatchingDef(match, node, dataKey)) {\n var def = defs.find(function (_ref2) {\n var defId = _ref2.id;\n return defId === id;\n });\n if (def) {\n if (patternKeys.includes(def.type)) {\n if (def.background === 'inherit' || def.color === 'inherit') {\n var nodeColor = get(node, colorKey);\n var background = def.background;\n var color = def.color;\n var inheritedId = id;\n if (def.background === 'inherit') {\n inheritedId = \"\".concat(inheritedId, \".bg.\").concat(nodeColor);\n background = nodeColor;\n }\n if (def.color === 'inherit') {\n inheritedId = \"\".concat(inheritedId, \".fg.\").concat(nodeColor);\n color = nodeColor;\n }\n set(node, targetKey, \"url(#\".concat(inheritedId, \")\"));\n if (!generatedIds[inheritedId]) {\n boundDefs.push(_objectSpread2(_objectSpread2({}, def), {}, {\n id: inheritedId,\n background: background,\n color: color\n }));\n generatedIds[inheritedId] = 1;\n }\n } else {\n set(node, targetKey, \"url(#\".concat(id, \")\"));\n }\n } else if (gradientKeys.includes(def.type)) {\n var allColors = def.colors.map(function (_ref3) {\n var color = _ref3.color;\n return color;\n });\n if (allColors.includes('inherit')) {\n var _nodeColor = get(node, colorKey);\n var _inheritedId = id;\n var inheritedDef = _objectSpread2(_objectSpread2({}, def), {}, {\n colors: def.colors.map(function (colorStop, i) {\n if (colorStop.color !== 'inherit') return colorStop;\n _inheritedId = \"\".concat(_inheritedId, \".\").concat(i, \".\").concat(_nodeColor);\n return _objectSpread2(_objectSpread2({}, colorStop), {}, {\n color: colorStop.color === 'inherit' ? _nodeColor : colorStop.color\n });\n })\n });\n inheritedDef.id = _inheritedId;\n set(node, targetKey, \"url(#\".concat(_inheritedId, \")\"));\n if (!generatedIds[_inheritedId]) {\n boundDefs.push(inheritedDef);\n generatedIds[_inheritedId] = 1;\n }\n } else {\n set(node, targetKey, \"url(#\".concat(id, \")\"));\n }\n }\n }\n return \"break\";\n }\n };\n for (var i = 0; i < rules.length; i++) {\n var _ret = _loop(i);\n if (_ret === \"break\") break;\n }\n });\n }\n return boundDefs;\n};\n\nexport { CartesianMarkers$1 as CartesianMarkers, CartesianMarkersItem$1 as CartesianMarkersItem, Container, Defs$1 as Defs, DotsItem$1 as DotsItem, DotsItemDefaultProps, LinearGradient, MotionConfigProvider, PatternDots, PatternLines, PatternSquares, ResponsiveWrapper, SvgWrapper, TWO_PI, ThemeProvider, absoluteAngleDegrees, absoluteAngleRadians, alignBox, annotationsPropType, areaCurvePropKeys, areaCurvePropType, axisThemePropType, bindDefs, blendModePropType, blendModes, boxAlignments, closedCurvePropKeys, closedCurvePropType, colorInterpolatorIds, colorInterpolators, colorSchemeIds, computeArcBoundingBox, crosshairPropType, curveFromProp, curvePropKeys, curvePropMapping, curvePropType, defaultAnimate, defaultCategoricalColors, defaultColorRange, defaultMargin, defaultMotionDamping, defaultMotionStiffness, defaultTheme, defsPropTypes, degreesToRadians, dotsThemePropType, extendDefaultTheme, getAccessorFor, getAccessorOrValue, getAngle, getColorScale, getDistance, getHoveredArc, getLabelGenerator, getPolarLabelProps, getRelativeCursor, getValueFormatter, gradientTypes, gridThemePropType, guessQuantizeColorScale, isCursorInRect, isCursorInRing, isMatchingDef, labelsThemePropType, legendsThemePropType, lineCurvePropKeys, lineCurvePropType, linearGradientDef, marginPropType, markersThemePropType, midAngle, motionConfigContext, motionDefaultProps, motionPropTypes, nivoCategoricalColors, noop, patternDotsDef, patternLinesDef, patternSquaresDef, patternTypes, positionFromAngle, quantizeColorScalePropType, quantizeColorScales, quantizeColorScalesKeys, radiansToDegrees, stackOffsetFromProp, stackOffsetPropKeys, stackOffsetPropMapping, stackOffsetPropType, stackOrderFromProp, stackOrderPropKeys, stackOrderPropMapping, stackOrderPropType, textPropsByEngine, themeContext, themePropType, treeMapTileFromProp, treeMapTilePropKeys, treeMapTilePropMapping, treeMapTilePropType, useAnimatedPath, useCurveInterpolation, useDimensions, useMeasure, useMotionConfig, usePartialTheme, useTheme, useValueFormatter, withContainer, withCurve, withDimensions, withHierarchy, withMotion, withTheme };\n//# sourceMappingURL=nivo-core.es.js.map\n","import { schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeBrBG, schemePRGn, schemePiYG, schemePuOr, schemeRdBu, schemeRdGy, schemeRdYlBu, schemeRdYlGn, schemeSpectral, schemeBlues, schemeGreens, schemeGreys, schemeOranges, schemePurples, schemeReds, schemeBuGn, schemeBuPu, schemeGnBu, schemeOrRd, schemePuBuGn, schemePuBu, schemePuRd, schemeRdPu, schemeYlGnBu, schemeYlGn, schemeYlOrBr, schemeYlOrRd, interpolateBrBG, interpolatePRGn, interpolatePiYG, interpolatePuOr, interpolateRdBu, interpolateRdGy, interpolateRdYlBu, interpolateRdYlGn, interpolateSpectral, interpolateBlues, interpolateGreens, interpolateGreys, interpolateOranges, interpolatePurples, interpolateReds, interpolateViridis, interpolateInferno, interpolateMagma, interpolatePlasma, interpolateWarm, interpolateCool, interpolateCubehelixDefault, interpolateBuGn, interpolateBuPu, interpolateGnBu, interpolateOrRd, interpolatePuBuGn, interpolatePuBu, interpolatePuRd, interpolateRdPu, interpolateYlGnBu, interpolateYlGn, interpolateYlOrBr, interpolateYlOrRd, interpolateRainbow, interpolateSinebow } from 'd3-scale-chromatic';\nimport { useMemo } from 'react';\nimport get from 'lodash.get';\nimport isPlainObject from 'lodash.isplainobject';\nimport { scaleOrdinal } from 'd3-scale';\nimport { rgb } from 'd3-color';\nimport PropTypes from 'prop-types';\nimport { spring } from 'react-motion';\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n}\n\nvar categoricalColorSchemes = {\n nivo: ['#e8c1a0', '#f47560', '#f1e15b', '#e8a838', '#61cdbb', '#97e3d5'],\n category10: schemeCategory10,\n accent: schemeAccent,\n dark2: schemeDark2,\n paired: schemePaired,\n pastel1: schemePastel1,\n pastel2: schemePastel2,\n set1: schemeSet1,\n set2: schemeSet2,\n set3: schemeSet3\n};\nvar categoricalColorSchemeIds = Object.keys(categoricalColorSchemes);\nvar isCategoricalColorScheme = function isCategoricalColorScheme(scheme) {\n return categoricalColorSchemeIds.includes(scheme);\n};\nvar divergingColorSchemes = {\n brown_blueGreen: schemeBrBG,\n purpleRed_green: schemePRGn,\n pink_yellowGreen: schemePiYG,\n purple_orange: schemePuOr,\n red_blue: schemeRdBu,\n red_grey: schemeRdGy,\n red_yellow_blue: schemeRdYlBu,\n red_yellow_green: schemeRdYlGn,\n spectral: schemeSpectral\n};\nvar divergingColorSchemeIds = Object.keys(divergingColorSchemes);\nvar isDivergingColorScheme = function isDivergingColorScheme(scheme) {\n return divergingColorSchemeIds.includes(scheme);\n};\nvar sequentialColorSchemes = {\n blues: schemeBlues,\n greens: schemeGreens,\n greys: schemeGreys,\n oranges: schemeOranges,\n purples: schemePurples,\n reds: schemeReds,\n blue_green: schemeBuGn,\n blue_purple: schemeBuPu,\n green_blue: schemeGnBu,\n orange_red: schemeOrRd,\n purple_blue_green: schemePuBuGn,\n purple_blue: schemePuBu,\n purple_red: schemePuRd,\n red_purple: schemeRdPu,\n yellow_green_blue: schemeYlGnBu,\n yellow_green: schemeYlGn,\n yellow_orange_brown: schemeYlOrBr,\n yellow_orange_red: schemeYlOrRd\n};\nvar sequentialColorSchemeIds = Object.keys(sequentialColorSchemes);\nvar isSequentialColorScheme = function isSequentialColorScheme(scheme) {\n return sequentialColorSchemeIds.includes(scheme);\n};\nvar colorSchemes = _objectSpread2(_objectSpread2(_objectSpread2({}, categoricalColorSchemes), divergingColorSchemes), sequentialColorSchemes);\nvar colorSchemeIds = Object.keys(colorSchemes);\nvar colorInterpolators = {\n brown_blueGreen: interpolateBrBG,\n purpleRed_green: interpolatePRGn,\n pink_yellowGreen: interpolatePiYG,\n purple_orange: interpolatePuOr,\n red_blue: interpolateRdBu,\n red_grey: interpolateRdGy,\n red_yellow_blue: interpolateRdYlBu,\n red_yellow_green: interpolateRdYlGn,\n spectral: interpolateSpectral,\n blues: interpolateBlues,\n greens: interpolateGreens,\n greys: interpolateGreys,\n oranges: interpolateOranges,\n purples: interpolatePurples,\n reds: interpolateReds,\n viridis: interpolateViridis,\n inferno: interpolateInferno,\n magma: interpolateMagma,\n plasma: interpolatePlasma,\n warm: interpolateWarm,\n cool: interpolateCool,\n cubehelixDefault: interpolateCubehelixDefault,\n blue_green: interpolateBuGn,\n blue_purple: interpolateBuPu,\n green_blue: interpolateGnBu,\n orange_red: interpolateOrRd,\n purple_blue_green: interpolatePuBuGn,\n purple_blue: interpolatePuBu,\n purple_red: interpolatePuRd,\n red_purple: interpolateRdPu,\n yellow_green_blue: interpolateYlGnBu,\n yellow_green: interpolateYlGn,\n yellow_orange_brown: interpolateYlOrBr,\n yellow_orange_red: interpolateYlOrRd,\n rainbow: interpolateRainbow,\n sinebow: interpolateSinebow\n};\nvar colorInterpolatorIds = Object.keys(colorInterpolators);\n\nvar getOrdinalColorScale = function getOrdinalColorScale(instruction, identity) {\n if (typeof instruction === 'function') return instruction;\n var getIdentity = typeof identity === 'function' ? identity : function (d) {\n return get(d, identity);\n };\n if (Array.isArray(instruction)) {\n var scale = scaleOrdinal(instruction);\n var generator = function generator(d) {\n return scale(getIdentity(d));\n };\n generator.scale = scale;\n return generator;\n }\n if (isPlainObject(instruction)) {\n if (instruction.datum !== undefined) {\n return function (datum) {\n return get(datum, instruction.datum);\n };\n }\n if (instruction.scheme !== undefined) {\n if (isCategoricalColorScheme(instruction.scheme)) {\n var _scale = scaleOrdinal(colorSchemes[instruction.scheme]);\n var _generator = function _generator(d) {\n return _scale(getIdentity(d));\n };\n _generator.scale = _scale;\n return _generator;\n }\n if (isDivergingColorScheme(instruction.scheme)) {\n if (instruction.size !== undefined && (instruction.size < 3 || instruction.size > 11)) {\n throw new Error(\"Invalid size '\".concat(instruction.size, \"' for diverging color scheme '\").concat(instruction.scheme, \"', must be between 3~11\"));\n }\n var _scale2 = scaleOrdinal(colorSchemes[instruction.scheme][instruction.size || 11]);\n var _generator2 = function _generator2(d) {\n return _scale2(getIdentity(d));\n };\n _generator2.scale = _scale2;\n return _generator2;\n }\n if (isSequentialColorScheme(instruction.scheme)) {\n if (instruction.size !== undefined && (instruction.size < 3 || instruction.size > 9)) {\n throw new Error(\"Invalid size '\".concat(instruction.size, \"' for sequential color scheme '\").concat(instruction.scheme, \"', must be between 3~9\"));\n }\n var _scale3 = scaleOrdinal(colorSchemes[instruction.scheme][instruction.size || 9]);\n var _generator3 = function _generator3(d) {\n return _scale3(getIdentity(d));\n };\n _generator3.scale = _scale3;\n return _generator3;\n }\n }\n throw new Error(\"Invalid colors, when using an object, you should either pass a 'datum' or a 'scheme' property\");\n }\n return function () {\n return instruction;\n };\n};\nvar useOrdinalColorScale = function useOrdinalColorScale(instruction, identity) {\n return useMemo(function () {\n return getOrdinalColorScale(instruction, identity);\n }, [instruction, identity]);\n};\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _createForOfIteratorHelper(o) {\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) {\n var i = 0;\n var F = function F() {};\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n var it,\n normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = o[Symbol.iterator]();\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\n\nvar getInheritedColorGenerator = function getInheritedColorGenerator(inheritedColor, theme) {\n if (typeof inheritedColor === 'function') return function (node) {\n return inheritedColor(node);\n };\n if (isPlainObject(inheritedColor)) {\n if (inheritedColor.theme !== undefined) {\n if (theme === undefined) {\n throw new Error(\"Unable to use color from theme as no theme was provided\");\n }\n var themeColor = get(theme, inheritedColor.theme);\n if (themeColor === undefined) {\n throw new Error(\"Color from theme is undefined at path: '\".concat(inheritedColor.theme, \"'\"));\n }\n return function () {\n return themeColor;\n };\n }\n if (inheritedColor.from !== undefined) {\n var getColor = function getColor(datum) {\n return get(datum, inheritedColor.from);\n };\n if (Array.isArray(inheritedColor.modifiers)) {\n var modifiers = [];\n var _iterator = _createForOfIteratorHelper(inheritedColor.modifiers),\n _step;\n try {\n var _loop = function _loop() {\n var modifier = _step.value;\n var _modifier = _slicedToArray(modifier, 2),\n modifierType = _modifier[0],\n amount = _modifier[1];\n if (modifierType === 'brighter') {\n modifiers.push(function (color) {\n return color.brighter(amount);\n });\n } else if (modifierType === 'darker') {\n modifiers.push(function (color) {\n return color.darker(amount);\n });\n } else if (modifierType === 'opacity') {\n modifiers.push(function (color) {\n color.opacity = amount;\n return color;\n });\n } else {\n throw new Error(\"Invalid color modifier: '\".concat(modifierType, \"', must be one of: 'brighter', 'darker', 'opacity'\"));\n }\n };\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n _loop();\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n if (modifiers.length === 0) return getColor;\n return function (datum) {\n return modifiers.reduce(function (color, modify) {\n return modify(color);\n }, rgb(getColor(datum))).toString();\n };\n }\n return getColor;\n }\n throw new Error(\"Invalid color spec, you should either specify 'theme' or 'from' when using a config object\");\n }\n return function () {\n return inheritedColor;\n };\n};\nvar useInheritedColor = function useInheritedColor(parentColor, theme) {\n return useMemo(function () {\n return getInheritedColorGenerator(parentColor, theme);\n }, [parentColor, theme]);\n};\n\nvar ordinalColorsPropType = PropTypes.oneOfType([PropTypes.func, PropTypes.arrayOf(PropTypes.string), PropTypes.shape({\n scheme: PropTypes.oneOf(colorSchemeIds).isRequired,\n size: PropTypes.number\n}), PropTypes.shape({\n datum: PropTypes.string.isRequired\n}), PropTypes.string]);\nvar colorPropertyAccessorPropType = PropTypes.oneOfType([PropTypes.func, PropTypes.string]);\nvar inheritedColorPropType = PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.shape({\n theme: PropTypes.string.isRequired\n}), PropTypes.shape({\n from: PropTypes.string.isRequired,\n modifiers: PropTypes.arrayOf(PropTypes.array)\n})]);\n\nvar interpolateColor = function interpolateColor(color, springConfig) {\n var colorComponents = rgb(color);\n if (!springConfig) {\n return {\n colorR: colorComponents.r,\n colorG: colorComponents.g,\n colorB: colorComponents.b\n };\n }\n var configWithPrecision = _objectSpread2(_objectSpread2({}, springConfig), {}, {\n precision: 1\n });\n return {\n colorR: spring(colorComponents.r, configWithPrecision),\n colorG: spring(colorComponents.g, configWithPrecision),\n colorB: spring(colorComponents.b, configWithPrecision)\n };\n};\nvar getInterpolatedColor = function getInterpolatedColor(_ref) {\n var colorR = _ref.colorR,\n colorG = _ref.colorG,\n colorB = _ref.colorB;\n return \"rgb(\".concat(Math.round(Math.max(colorR, 0)), \",\").concat(Math.round(Math.max(colorG, 0)), \",\").concat(Math.round(Math.max(colorB, 0)), \")\");\n};\n\nexport { categoricalColorSchemeIds, categoricalColorSchemes, colorInterpolatorIds, colorInterpolators, colorPropertyAccessorPropType, colorSchemeIds, colorSchemes, divergingColorSchemeIds, divergingColorSchemes, getInheritedColorGenerator, getInterpolatedColor, getOrdinalColorScale, inheritedColorPropType, interpolateColor, isCategoricalColorScheme, isDivergingColorScheme, isSequentialColorScheme, ordinalColorsPropType, sequentialColorSchemeIds, sequentialColorSchemes, useInheritedColor, useOrdinalColorScale };\n//# sourceMappingURL=nivo-colors.es.js.map\n","import React, { PureComponent, useState, useCallback, useMemo } from 'react';\nimport isFunction from 'lodash/isFunction';\nimport { useTheme } from '@nivo/core';\nimport PropTypes from 'prop-types';\nimport isNumber from 'lodash/isNumber';\nimport isPlainObject from 'lodash/isPlainObject';\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nvar DIRECTION_ROW = 'row';\nvar DIRECTION_COLUMN = 'column';\nvar ANCHOR_TOP = 'top';\nvar ANCHOR_TOP_RIGHT = 'top-right';\nvar ANCHOR_RIGHT = 'right';\nvar ANCHOR_BOTTOM_RIGHT = 'bottom-right';\nvar ANCHOR_BOTTOM = 'bottom';\nvar ANCHOR_BOTTOM_LEFT = 'bottom-left';\nvar ANCHOR_LEFT = 'left';\nvar ANCHOR_TOP_LEFT = 'top-left';\nvar ANCHOR_CENTER = 'center';\nvar DIRECTION_LEFT_TO_RIGHT = 'left-to-right';\nvar DIRECTION_RIGHT_TO_LEFT = 'right-to-left';\nvar DIRECTION_TOP_TO_BOTTOM = 'top-to-bottom';\nvar DIRECTION_BOTTOM_TO_TOP = 'bottom-to-top';\n\nvar legendEffectPropType = PropTypes.shape({\n on: PropTypes.oneOfType([PropTypes.oneOf(['hover'])]).isRequired,\n style: PropTypes.shape({\n itemTextColor: PropTypes.string,\n itemBackground: PropTypes.string,\n itemOpacity: PropTypes.number,\n symbolSize: PropTypes.number,\n symbolBorderWidth: PropTypes.number,\n symbolBorderColor: PropTypes.string\n }).isRequired\n});\nvar symbolPropTypes = {\n symbolShape: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n symbolSize: PropTypes.number,\n symbolSpacing: PropTypes.number,\n symbolBorderWidth: PropTypes.number,\n symbolBorderColor: PropTypes.string\n};\nvar interactivityPropTypes = {\n onClick: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func\n};\nvar datumPropType = PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n color: PropTypes.string.isRequired,\n fill: PropTypes.string\n});\nvar LegendPropShape = _objectSpread2(_objectSpread2(_objectSpread2({\n data: PropTypes.arrayOf(datumPropType),\n anchor: PropTypes.oneOf([ANCHOR_TOP, ANCHOR_TOP_RIGHT, ANCHOR_RIGHT, ANCHOR_BOTTOM_RIGHT, ANCHOR_BOTTOM, ANCHOR_BOTTOM_LEFT, ANCHOR_LEFT, ANCHOR_TOP_LEFT, ANCHOR_CENTER]).isRequired,\n translateX: PropTypes.number,\n translateY: PropTypes.number,\n direction: PropTypes.oneOf([DIRECTION_ROW, DIRECTION_COLUMN]).isRequired,\n itemsSpacing: PropTypes.number,\n itemWidth: PropTypes.number.isRequired,\n itemHeight: PropTypes.number.isRequired,\n itemDirection: PropTypes.oneOf([DIRECTION_LEFT_TO_RIGHT, DIRECTION_RIGHT_TO_LEFT, DIRECTION_TOP_TO_BOTTOM, DIRECTION_BOTTOM_TO_TOP]),\n itemTextColor: PropTypes.string,\n itemBackground: PropTypes.string,\n itemOpacity: PropTypes.number\n}, symbolPropTypes), interactivityPropTypes), {}, {\n effects: PropTypes.arrayOf(legendEffectPropType)\n});\n\nvar zeroPadding = {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n};\nvar computeDimensions = function computeDimensions(_ref) {\n var direction = _ref.direction,\n itemsSpacing = _ref.itemsSpacing,\n _padding = _ref.padding,\n itemCount = _ref.itemCount,\n itemWidth = _ref.itemWidth,\n itemHeight = _ref.itemHeight;\n var padding;\n if (isNumber(_padding)) {\n padding = {\n top: _padding,\n right: _padding,\n bottom: _padding,\n left: _padding\n };\n } else if (isPlainObject(_padding)) {\n padding = _objectSpread2(_objectSpread2({}, zeroPadding), _padding);\n } else {\n throw new TypeError(\"Invalid property padding, must be one of: number, object\");\n }\n var horizontalPadding = padding.left + padding.right;\n var verticalPadding = padding.top + padding.bottom;\n var width = itemWidth + horizontalPadding;\n var height = itemHeight + verticalPadding;\n var spacing = (itemCount - 1) * itemsSpacing;\n if (direction === DIRECTION_ROW) {\n width = itemWidth * itemCount + spacing + horizontalPadding;\n } else if (direction === DIRECTION_COLUMN) {\n height = itemHeight * itemCount + spacing + verticalPadding;\n }\n return {\n width: width,\n height: height,\n padding: padding\n };\n};\nvar computePositionFromAnchor = function computePositionFromAnchor(_ref2) {\n var anchor = _ref2.anchor,\n translateX = _ref2.translateX,\n translateY = _ref2.translateY,\n containerWidth = _ref2.containerWidth,\n containerHeight = _ref2.containerHeight,\n width = _ref2.width,\n height = _ref2.height;\n var x = translateX;\n var y = translateY;\n switch (anchor) {\n case ANCHOR_TOP:\n x += (containerWidth - width) / 2;\n break;\n case ANCHOR_TOP_RIGHT:\n x += containerWidth - width;\n break;\n case ANCHOR_RIGHT:\n x += containerWidth - width;\n y += (containerHeight - height) / 2;\n break;\n case ANCHOR_BOTTOM_RIGHT:\n x += containerWidth - width;\n y += containerHeight - height;\n break;\n case ANCHOR_BOTTOM:\n x += (containerWidth - width) / 2;\n y += containerHeight - height;\n break;\n case ANCHOR_BOTTOM_LEFT:\n y += containerHeight - height;\n break;\n case ANCHOR_LEFT:\n y += (containerHeight - height) / 2;\n break;\n case ANCHOR_CENTER:\n x += (containerWidth - width) / 2;\n y += (containerHeight - height) / 2;\n break;\n }\n return {\n x: x,\n y: y\n };\n};\nvar computeItemLayout = function computeItemLayout(_ref3) {\n var direction = _ref3.direction,\n justify = _ref3.justify,\n symbolSize = _ref3.symbolSize,\n symbolSpacing = _ref3.symbolSpacing,\n width = _ref3.width,\n height = _ref3.height;\n var symbolX;\n var symbolY;\n var labelX;\n var labelY;\n var labelAnchor;\n var labelAlignment;\n switch (direction) {\n case DIRECTION_LEFT_TO_RIGHT:\n symbolX = 0;\n symbolY = (height - symbolSize) / 2;\n labelY = height / 2;\n labelAlignment = 'central';\n if (justify === true) {\n labelX = width;\n labelAnchor = 'end';\n } else {\n labelX = symbolSize + symbolSpacing;\n labelAnchor = 'start';\n }\n break;\n case DIRECTION_RIGHT_TO_LEFT:\n symbolX = width - symbolSize;\n symbolY = (height - symbolSize) / 2;\n labelY = height / 2;\n labelAlignment = 'central';\n if (justify === true) {\n labelX = 0;\n labelAnchor = 'start';\n } else {\n labelX = width - symbolSize - symbolSpacing;\n labelAnchor = 'end';\n }\n break;\n case DIRECTION_TOP_TO_BOTTOM:\n symbolX = (width - symbolSize) / 2;\n symbolY = 0;\n labelX = width / 2;\n labelAnchor = 'middle';\n if (justify === true) {\n labelY = height;\n labelAlignment = 'alphabetic';\n } else {\n labelY = symbolSize + symbolSpacing;\n labelAlignment = 'text-before-edge';\n }\n break;\n case DIRECTION_BOTTOM_TO_TOP:\n symbolX = (width - symbolSize) / 2;\n symbolY = height - symbolSize;\n labelX = width / 2;\n labelAnchor = 'middle';\n if (justify === true) {\n labelY = 0;\n labelAlignment = 'text-before-edge';\n } else {\n labelY = height - symbolSize - symbolSpacing;\n labelAlignment = 'alphabetic';\n }\n break;\n }\n return {\n symbolX: symbolX,\n symbolY: symbolY,\n labelX: labelX,\n labelY: labelY,\n labelAnchor: labelAnchor,\n labelAlignment: labelAlignment\n };\n};\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n return _typeof(obj);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n return function () {\n var Super = _getPrototypeOf(Derived),\n result;\n if (_isNativeReflectConstruct()) {\n var NewTarget = _getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return _possibleConstructorReturn(this, result);\n };\n}\n\nvar symbolPropTypes$1 = {\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n size: PropTypes.number.isRequired,\n fill: PropTypes.string.isRequired,\n borderWidth: PropTypes.number.isRequired,\n borderColor: PropTypes.string.isRequired\n};\nvar symbolDefaultProps = {\n borderWidth: 0,\n borderColor: 'transparent'\n};\n\nvar SymbolCircle = function (_PureComponent) {\n _inherits(SymbolCircle, _PureComponent);\n var _super = _createSuper(SymbolCircle);\n function SymbolCircle() {\n _classCallCheck(this, SymbolCircle);\n return _super.apply(this, arguments);\n }\n _createClass(SymbolCircle, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n x = _this$props.x,\n y = _this$props.y,\n size = _this$props.size,\n fill = _this$props.fill,\n borderWidth = _this$props.borderWidth,\n borderColor = _this$props.borderColor;\n return React.createElement(\"circle\", {\n r: size / 2,\n cx: x + size / 2,\n cy: y + size / 2,\n fill: fill,\n strokeWidth: borderWidth,\n stroke: borderColor,\n style: {\n pointerEvents: 'none'\n }\n });\n }\n }]);\n return SymbolCircle;\n}(PureComponent);\nSymbolCircle.defaultProps = _objectSpread2({}, symbolDefaultProps);\n\nvar SymbolDiamond = function (_PureComponent) {\n _inherits(SymbolDiamond, _PureComponent);\n var _super = _createSuper(SymbolDiamond);\n function SymbolDiamond() {\n _classCallCheck(this, SymbolDiamond);\n return _super.apply(this, arguments);\n }\n _createClass(SymbolDiamond, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n x = _this$props.x,\n y = _this$props.y,\n size = _this$props.size,\n fill = _this$props.fill,\n borderWidth = _this$props.borderWidth,\n borderColor = _this$props.borderColor;\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \",\").concat(y, \")\")\n }, React.createElement(\"path\", {\n d: \"\\n M\".concat(size / 2, \" 0\\n L\").concat(size * 0.8, \" \").concat(size / 2, \"\\n L\").concat(size / 2, \" \").concat(size, \"\\n L\").concat(size * 0.2, \" \").concat(size / 2, \"\\n L\").concat(size / 2, \" 0\\n \"),\n fill: fill,\n strokeWidth: borderWidth,\n stroke: borderColor,\n style: {\n pointerEvents: 'none'\n }\n }));\n }\n }]);\n return SymbolDiamond;\n}(PureComponent);\nSymbolDiamond.defaultProps = _objectSpread2({}, symbolDefaultProps);\n\nvar SymbolSquare = function (_PureComponent) {\n _inherits(SymbolSquare, _PureComponent);\n var _super = _createSuper(SymbolSquare);\n function SymbolSquare() {\n _classCallCheck(this, SymbolSquare);\n return _super.apply(this, arguments);\n }\n _createClass(SymbolSquare, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n x = _this$props.x,\n y = _this$props.y,\n size = _this$props.size,\n fill = _this$props.fill,\n borderWidth = _this$props.borderWidth,\n borderColor = _this$props.borderColor;\n return React.createElement(\"rect\", {\n x: x,\n y: y,\n fill: fill,\n strokeWidth: borderWidth,\n stroke: borderColor,\n width: size,\n height: size,\n style: {\n pointerEvents: 'none'\n }\n });\n }\n }]);\n return SymbolSquare;\n}(PureComponent);\nSymbolSquare.defaultProps = _objectSpread2({}, symbolDefaultProps);\n\nvar SymbolTriangle = function (_PureComponent) {\n _inherits(SymbolTriangle, _PureComponent);\n var _super = _createSuper(SymbolTriangle);\n function SymbolTriangle() {\n _classCallCheck(this, SymbolTriangle);\n return _super.apply(this, arguments);\n }\n _createClass(SymbolTriangle, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n x = _this$props.x,\n y = _this$props.y,\n size = _this$props.size,\n fill = _this$props.fill,\n borderWidth = _this$props.borderWidth,\n borderColor = _this$props.borderColor;\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \",\").concat(y, \")\")\n }, React.createElement(\"path\", {\n d: \"\\n M\".concat(size / 2, \" 0\\n L\").concat(size, \" \").concat(size, \"\\n L0 \").concat(size, \"\\n L\").concat(size / 2, \" 0\\n \"),\n fill: fill,\n strokeWidth: borderWidth,\n stroke: borderColor,\n style: {\n pointerEvents: 'none'\n }\n }));\n }\n }]);\n return SymbolTriangle;\n}(PureComponent);\nSymbolTriangle.defaultProps = _objectSpread2({}, symbolDefaultProps);\n\nvar symbolByShape = {\n circle: SymbolCircle,\n diamond: SymbolDiamond,\n square: SymbolSquare,\n triangle: SymbolTriangle\n};\nvar LegendSvgItem = function LegendSvgItem(_ref) {\n var x = _ref.x,\n y = _ref.y,\n width = _ref.width,\n height = _ref.height,\n data = _ref.data,\n direction = _ref.direction,\n justify = _ref.justify,\n textColor = _ref.textColor,\n background = _ref.background,\n opacity = _ref.opacity,\n symbolShape = _ref.symbolShape,\n symbolSize = _ref.symbolSize,\n symbolSpacing = _ref.symbolSpacing,\n symbolBorderWidth = _ref.symbolBorderWidth,\n symbolBorderColor = _ref.symbolBorderColor,\n onClick = _ref.onClick,\n onMouseEnter = _ref.onMouseEnter,\n onMouseLeave = _ref.onMouseLeave,\n effects = _ref.effects;\n var _useState = useState({}),\n _useState2 = _slicedToArray(_useState, 2),\n style = _useState2[0],\n setStyle = _useState2[1];\n var theme = useTheme();\n var handleClick = useCallback(function (event) {\n return onClick && onClick(data, event);\n }, [onClick, data]);\n var handleMouseEnter = useCallback(function (event) {\n if (effects.length > 0) {\n var applyEffects = effects.filter(function (_ref2) {\n var on = _ref2.on;\n return on === 'hover';\n });\n var _style = applyEffects.reduce(function (acc, effect) {\n return _objectSpread2(_objectSpread2({}, acc), effect.style);\n }, {});\n setStyle(_style);\n }\n if (onMouseEnter === undefined) return;\n onMouseEnter(data, event);\n }, [onMouseEnter, data, effects]);\n var handleMouseLeave = useCallback(function () {\n if (effects.length > 0) {\n var applyEffects = effects.filter(function (_ref3) {\n var on = _ref3.on;\n return on !== 'hover';\n });\n var _style2 = applyEffects.reduce(function (acc, effect) {\n return _objectSpread2(_objectSpread2({}, acc), effect.style);\n }, {});\n setStyle(_style2);\n }\n if (onMouseLeave === undefined) return;\n onMouseLeave(data, event);\n }, [onMouseLeave, data, effects]);\n var _computeItemLayout = computeItemLayout({\n direction: direction,\n justify: justify,\n symbolSize: style.symbolSize || symbolSize,\n symbolSpacing: symbolSpacing,\n width: width,\n height: height\n }),\n symbolX = _computeItemLayout.symbolX,\n symbolY = _computeItemLayout.symbolY,\n labelX = _computeItemLayout.labelX,\n labelY = _computeItemLayout.labelY,\n labelAnchor = _computeItemLayout.labelAnchor,\n labelAlignment = _computeItemLayout.labelAlignment;\n var isInteractive = [onClick, onMouseEnter, onMouseLeave].some(function (handler) {\n return handler !== undefined;\n });\n var Symbol;\n if (isFunction(symbolShape)) {\n Symbol = symbolShape;\n } else {\n Symbol = symbolByShape[symbolShape];\n }\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \",\").concat(y, \")\"),\n style: {\n opacity: style.itemOpacity !== undefined ? style.itemOpacity : opacity\n }\n }, React.createElement(\"rect\", {\n width: width,\n height: height,\n fill: style.itemBackground || background,\n style: {\n cursor: isInteractive ? 'pointer' : 'auto'\n },\n onClick: handleClick,\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave\n }), React.createElement(Symbol, {\n id: data.id,\n x: symbolX,\n y: symbolY,\n size: style.symbolSize || symbolSize,\n fill: data.fill || data.color,\n borderWidth: style.symbolBorderWidth !== undefined ? style.symbolBorderWidth : symbolBorderWidth,\n borderColor: style.symbolBorderColor || symbolBorderColor\n }), React.createElement(\"text\", {\n textAnchor: labelAnchor,\n style: _objectSpread2(_objectSpread2({}, theme.legends.text), {}, {\n fill: style.itemTextColor || theme.legends.text.fill || textColor,\n dominantBaseline: labelAlignment,\n pointerEvents: 'none',\n userSelect: 'none'\n }),\n x: labelX,\n y: labelY\n }, data.label));\n};\nLegendSvgItem.displayName = 'LegendSvgItem';\nLegendSvgItem.defaultProps = {\n direction: 'left-to-right',\n justify: false,\n textColor: 'black',\n background: 'transparent',\n opacity: 1,\n symbolShape: 'square',\n symbolSize: 16,\n symbolSpacing: 8,\n symbolBorderWidth: 0,\n symbolBorderColor: 'transparent',\n effects: []\n};\n\nvar LegendSvg = function LegendSvg(_ref) {\n var data = _ref.data,\n x = _ref.x,\n y = _ref.y,\n direction = _ref.direction,\n _padding = _ref.padding,\n justify = _ref.justify,\n effects = _ref.effects,\n itemWidth = _ref.itemWidth,\n itemHeight = _ref.itemHeight,\n itemDirection = _ref.itemDirection,\n itemsSpacing = _ref.itemsSpacing,\n itemTextColor = _ref.itemTextColor,\n itemBackground = _ref.itemBackground,\n itemOpacity = _ref.itemOpacity,\n symbolShape = _ref.symbolShape,\n symbolSize = _ref.symbolSize,\n symbolSpacing = _ref.symbolSpacing,\n symbolBorderWidth = _ref.symbolBorderWidth,\n symbolBorderColor = _ref.symbolBorderColor,\n onClick = _ref.onClick,\n onMouseEnter = _ref.onMouseEnter,\n onMouseLeave = _ref.onMouseLeave;\n var _computeDimensions = computeDimensions({\n itemCount: data.length,\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n itemsSpacing: itemsSpacing,\n direction: direction,\n padding: _padding\n }),\n padding = _computeDimensions.padding;\n var xStep = 0;\n var yStep = 0;\n if (direction === 'row') {\n xStep = itemWidth + itemsSpacing;\n } else if (direction === 'column') {\n yStep = itemHeight + itemsSpacing;\n }\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \",\").concat(y, \")\")\n }, data.map(function (data, i) {\n return React.createElement(LegendSvgItem, {\n key: i,\n data: data,\n x: i * xStep + padding.left,\n y: i * yStep + padding.top,\n width: itemWidth,\n height: itemHeight,\n direction: itemDirection,\n justify: justify,\n effects: effects,\n textColor: itemTextColor,\n background: itemBackground,\n opacity: itemOpacity,\n symbolShape: symbolShape,\n symbolSize: symbolSize,\n symbolSpacing: symbolSpacing,\n symbolBorderWidth: symbolBorderWidth,\n symbolBorderColor: symbolBorderColor,\n onClick: onClick,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave\n });\n }));\n};\nLegendSvg.defaultProps = {\n padding: 0,\n justify: false,\n itemsSpacing: 0,\n itemDirection: 'left-to-right',\n itemTextColor: 'black',\n itemBackground: 'transparent',\n itemOpacity: 1\n};\n\nvar BoxLegendSvg = function BoxLegendSvg(_ref) {\n var data = _ref.data,\n containerWidth = _ref.containerWidth,\n containerHeight = _ref.containerHeight,\n translateX = _ref.translateX,\n translateY = _ref.translateY,\n anchor = _ref.anchor,\n direction = _ref.direction,\n padding = _ref.padding,\n justify = _ref.justify,\n itemsSpacing = _ref.itemsSpacing,\n itemWidth = _ref.itemWidth,\n itemHeight = _ref.itemHeight,\n itemDirection = _ref.itemDirection,\n itemTextColor = _ref.itemTextColor,\n itemBackground = _ref.itemBackground,\n itemOpacity = _ref.itemOpacity,\n symbolShape = _ref.symbolShape,\n symbolSize = _ref.symbolSize,\n symbolSpacing = _ref.symbolSpacing,\n symbolBorderWidth = _ref.symbolBorderWidth,\n symbolBorderColor = _ref.symbolBorderColor,\n onClick = _ref.onClick,\n onMouseEnter = _ref.onMouseEnter,\n onMouseLeave = _ref.onMouseLeave,\n effects = _ref.effects;\n var _computeDimensions = computeDimensions({\n itemCount: data.length,\n itemsSpacing: itemsSpacing,\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n direction: direction,\n padding: padding\n }),\n width = _computeDimensions.width,\n height = _computeDimensions.height;\n var _computePositionFromA = computePositionFromAnchor({\n anchor: anchor,\n translateX: translateX,\n translateY: translateY,\n containerWidth: containerWidth,\n containerHeight: containerHeight,\n width: width,\n height: height\n }),\n x = _computePositionFromA.x,\n y = _computePositionFromA.y;\n return React.createElement(LegendSvg, {\n data: data,\n x: x,\n y: y,\n direction: direction,\n padding: padding,\n justify: justify,\n effects: effects,\n itemsSpacing: itemsSpacing,\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n itemDirection: itemDirection,\n itemTextColor: itemTextColor,\n itemBackground: itemBackground,\n itemOpacity: itemOpacity,\n symbolShape: symbolShape,\n symbolSize: symbolSize,\n symbolSpacing: symbolSpacing,\n symbolBorderWidth: symbolBorderWidth,\n symbolBorderColor: symbolBorderColor,\n onClick: onClick,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave\n });\n};\nBoxLegendSvg.defaultProps = {\n translateX: 0,\n translateY: 0,\n itemsSpacing: LegendSvg.defaultProps.itemsSpacing,\n padding: LegendSvg.defaultProps.padding\n};\n\nvar textPropsMapping = {\n align: {\n start: 'left',\n middle: 'center',\n end: 'right'\n },\n baseline: {\n hanging: 'top',\n middle: 'middle',\n central: 'middle',\n baseline: 'bottom'\n }\n};\nvar renderLegendToCanvas = function renderLegendToCanvas(ctx, _ref) {\n var data = _ref.data,\n containerWidth = _ref.containerWidth,\n containerHeight = _ref.containerHeight,\n _ref$translateX = _ref.translateX,\n translateX = _ref$translateX === void 0 ? BoxLegendSvg.defaultProps.translateX : _ref$translateX,\n _ref$translateY = _ref.translateY,\n translateY = _ref$translateY === void 0 ? BoxLegendSvg.defaultProps.translateY : _ref$translateY,\n anchor = _ref.anchor,\n direction = _ref.direction,\n _ref$padding = _ref.padding,\n _padding = _ref$padding === void 0 ? LegendSvg.defaultProps.padding : _ref$padding,\n _ref$justify = _ref.justify,\n justify = _ref$justify === void 0 ? LegendSvgItem.defaultProps.justify : _ref$justify,\n _ref$itemsSpacing = _ref.itemsSpacing,\n itemsSpacing = _ref$itemsSpacing === void 0 ? LegendSvg.defaultProps.itemsSpacing : _ref$itemsSpacing,\n itemWidth = _ref.itemWidth,\n itemHeight = _ref.itemHeight,\n _ref$itemDirection = _ref.itemDirection,\n itemDirection = _ref$itemDirection === void 0 ? LegendSvgItem.defaultProps.direction : _ref$itemDirection,\n _ref$itemTextColor = _ref.itemTextColor,\n itemTextColor = _ref$itemTextColor === void 0 ? LegendSvg.defaultProps.textColor : _ref$itemTextColor,\n _ref$symbolSize = _ref.symbolSize,\n symbolSize = _ref$symbolSize === void 0 ? LegendSvgItem.defaultProps.symbolSize : _ref$symbolSize,\n _ref$symbolSpacing = _ref.symbolSpacing,\n symbolSpacing = _ref$symbolSpacing === void 0 ? LegendSvgItem.defaultProps.symbolSpacing : _ref$symbolSpacing,\n theme = _ref.theme;\n var _computeDimensions = computeDimensions({\n itemCount: data.length,\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n itemsSpacing: itemsSpacing,\n direction: direction,\n padding: _padding\n }),\n width = _computeDimensions.width,\n height = _computeDimensions.height,\n padding = _computeDimensions.padding;\n var _computePositionFromA = computePositionFromAnchor({\n anchor: anchor,\n translateX: translateX,\n translateY: translateY,\n containerWidth: containerWidth,\n containerHeight: containerHeight,\n width: width,\n height: height\n }),\n x = _computePositionFromA.x,\n y = _computePositionFromA.y;\n var xStep = 0;\n var yStep = 0;\n if (direction === DIRECTION_ROW) {\n xStep = itemWidth + itemsSpacing;\n } else if (direction === DIRECTION_COLUMN) {\n yStep = itemHeight + itemsSpacing;\n }\n ctx.save();\n ctx.translate(x, y);\n ctx.font = \"\".concat(theme.legends.text.fontSize, \"px \").concat(theme.legends.text.fontFamily || 'sans-serif');\n data.forEach(function (d, i) {\n var itemX = i * xStep + padding.left;\n var itemY = i * yStep + padding.top;\n var _computeItemLayout = computeItemLayout({\n direction: itemDirection,\n justify: justify,\n symbolSize: symbolSize,\n symbolSpacing: symbolSpacing,\n width: itemWidth,\n height: itemHeight\n }),\n symbolX = _computeItemLayout.symbolX,\n symbolY = _computeItemLayout.symbolY,\n labelX = _computeItemLayout.labelX,\n labelY = _computeItemLayout.labelY,\n labelAnchor = _computeItemLayout.labelAnchor,\n labelAlignment = _computeItemLayout.labelAlignment;\n ctx.fillStyle = d.color;\n ctx.fillRect(itemX + symbolX, itemY + symbolY, symbolSize, symbolSize);\n ctx.textAlign = textPropsMapping.align[labelAnchor];\n ctx.textBaseline = textPropsMapping.baseline[labelAlignment];\n ctx.fillStyle = itemTextColor || theme.legends.text.fill;\n ctx.fillText(d.label, itemX + labelX, itemY + labelY);\n });\n ctx.restore();\n};\n\nvar useQuantizeColorScaleLegendData = function useQuantizeColorScaleLegendData(_ref) {\n var scale = _ref.scale,\n overriddenDomain = _ref.domain,\n _ref$reverse = _ref.reverse,\n reverse = _ref$reverse === void 0 ? false : _ref$reverse,\n _ref$valueFormat = _ref.valueFormat,\n valueFormat = _ref$valueFormat === void 0 ? function (v) {\n return v;\n } : _ref$valueFormat,\n _ref$separator = _ref.separator,\n separator = _ref$separator === void 0 ? ' - ' : _ref$separator;\n return useMemo(function () {\n var domain = overriddenDomain || scale.range();\n var items = domain.map(function (domainValue, index) {\n var _scale$invertExtent = scale.invertExtent(domainValue),\n _scale$invertExtent2 = _slicedToArray(_scale$invertExtent, 2),\n start = _scale$invertExtent2[0],\n end = _scale$invertExtent2[1];\n return {\n id: domainValue,\n index: index,\n extent: [start, end],\n label: \"\".concat(valueFormat(start)).concat(separator).concat(valueFormat(end)),\n value: scale(start),\n color: domainValue\n };\n });\n if (reverse === true) items.reverse();\n return items;\n }, [overriddenDomain, scale, reverse]);\n};\n\nexport { ANCHOR_BOTTOM, ANCHOR_BOTTOM_LEFT, ANCHOR_BOTTOM_RIGHT, ANCHOR_CENTER, ANCHOR_LEFT, ANCHOR_RIGHT, ANCHOR_TOP, ANCHOR_TOP_LEFT, ANCHOR_TOP_RIGHT, BoxLegendSvg, DIRECTION_BOTTOM_TO_TOP, DIRECTION_COLUMN, DIRECTION_LEFT_TO_RIGHT, DIRECTION_RIGHT_TO_LEFT, DIRECTION_ROW, DIRECTION_TOP_TO_BOTTOM, LegendPropShape, LegendSvg, LegendSvgItem, datumPropType, interactivityPropTypes, legendEffectPropType, renderLegendToCanvas, symbolPropTypes, useQuantizeColorScaleLegendData };\n//# sourceMappingURL=nivo-legends.es.js.map\n","import React, { Fragment, Component, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { pie, arc, line } from 'd3-shape';\nimport { degreesToRadians, radiansToDegrees, computeArcBoundingBox, noop, absoluteAngleRadians, midAngle, positionFromAngle, absoluteAngleDegrees, textPropsByEngine, usePartialTheme, useDimensions, getLabelGenerator, bindDefs, Container, SvgWrapper, ResponsiveWrapper, getRelativeCursor, getHoveredArc } from '@nivo/core';\nimport { getOrdinalColorScale, inheritedColorPropType, ordinalColorsPropType, getInheritedColorGenerator } from '@nivo/colors';\nimport { LegendPropShape, BoxLegendSvg, renderLegendToCanvas } from '@nivo/legends';\nimport { BasicTooltip } from '@nivo/tooltip';\nimport get from 'lodash/get';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = _objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n}\n\nvar PieLayoutDefaultProps = {\n fit: true,\n sortByValue: false,\n innerRadius: 0,\n startAngle: 0,\n endAngle: 360,\n padAngle: 0,\n cornerRadius: 0\n};\nfunction PieLayout(props) {\n var startAngle = props.startAngle,\n endAngle = props.endAngle,\n width = props.width,\n height = props.height,\n _innerRadius = props.innerRadius,\n debug = props.debug,\n render = props.children,\n fit = props.fit,\n cornerRadius = props.cornerRadius,\n colors = props.colors,\n sortByValue = props.sortByValue,\n padAngle = props.padAngle,\n data = props.data;\n var getColor = React.useMemo(function () {\n return getOrdinalColorScale(colors, 'id');\n }, [colors]);\n var pie$1 = React.useMemo(function () {\n var pie$1 = pie().value(function (d) {\n return d.value;\n }).padAngle(degreesToRadians(padAngle)).startAngle(degreesToRadians(startAngle)).endAngle(degreesToRadians(endAngle));\n if (sortByValue !== true) pie$1.sortValues(null);\n return pie$1;\n }, [sortByValue, padAngle, startAngle, endAngle]);\n var arcs = React.useMemo(function () {\n return pie$1(data).map(function (arc) {\n var angle = Math.abs(arc.endAngle - arc.startAngle);\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n angle: angle,\n angleDeg: radiansToDegrees(angle),\n color: getColor(arc.data)\n });\n });\n }, [pie$1, data, getColor]);\n var computedProps = React.useMemo(function () {\n var radius = Math.min(width, height) / 2;\n var innerRadius = radius * Math.min(_innerRadius, 1);\n var centerX = width / 2;\n var centerY = height / 2;\n var boundingBox;\n if (fit === true) {\n var _computeArcBoundingBo = computeArcBoundingBox(centerX, centerY, radius, startAngle - 90, endAngle - 90),\n points = _computeArcBoundingBo.points,\n box = _objectWithoutProperties(_computeArcBoundingBo, [\"points\"]);\n var ratio = Math.min(width / box.width, height / box.height);\n var adjustedBox = {\n width: box.width * ratio,\n height: box.height * ratio\n };\n adjustedBox.x = (width - adjustedBox.width) / 2;\n adjustedBox.y = (height - adjustedBox.height) / 2;\n centerX = (centerX - box.x) / box.width * box.width * ratio + adjustedBox.x;\n centerY = (centerY - box.y) / box.height * box.height * ratio + adjustedBox.y;\n boundingBox = {\n box: box,\n ratio: ratio,\n points: points\n };\n radius = radius * ratio;\n innerRadius = innerRadius * ratio;\n }\n var arcGenerator = arc().outerRadius(radius).innerRadius(innerRadius).cornerRadius(cornerRadius);\n return {\n centerX: centerX,\n centerY: centerY,\n radius: radius,\n innerRadius: innerRadius,\n arcGenerator: arcGenerator,\n debug: boundingBox\n };\n }, [width, height, _innerRadius, startAngle, endAngle, fit, cornerRadius]);\n return render(_objectSpread2({\n arcs: arcs,\n startAngle: startAngle,\n endAngle: endAngle,\n width: width,\n height: height,\n debug: debug\n }, computedProps));\n}\nPieLayout.propTypes = {\n data: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.string.isRequired,\n value: PropTypes.number.isRequired\n })).isRequired,\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n fit: PropTypes.bool.isRequired,\n sortByValue: PropTypes.bool.isRequired,\n startAngle: PropTypes.number.isRequired,\n endAngle: PropTypes.number.isRequired,\n padAngle: PropTypes.number.isRequired,\n innerRadius: PropTypes.number.isRequired,\n cornerRadius: PropTypes.number.isRequired,\n debug: PropTypes.shape({\n points: PropTypes.array.isRequired,\n box: PropTypes.shape({\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired\n }).isRequired,\n ratio: PropTypes.number.isRequired\n }),\n children: PropTypes.func.isRequired\n};\nPieLayout.defaultProps = PieLayoutDefaultProps;\n\nvar arcPropType = PropTypes.shape({\n startAngle: PropTypes.number.isRequired,\n endAngle: PropTypes.number.isRequired,\n angle: PropTypes.number.isRequired,\n angleDeg: PropTypes.number.isRequired,\n color: PropTypes.string.isRequired,\n data: PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n value: PropTypes.number.isRequired\n }).isRequired\n});\nvar PiePropTypes = {\n data: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n value: PropTypes.number.isRequired\n })).isRequired,\n startAngle: PropTypes.number.isRequired,\n endAngle: PropTypes.number.isRequired,\n fit: PropTypes.bool.isRequired,\n padAngle: PropTypes.number.isRequired,\n sortByValue: PropTypes.bool.isRequired,\n innerRadius: PropTypes.number.isRequired,\n cornerRadius: PropTypes.number.isRequired,\n borderWidth: PropTypes.number.isRequired,\n borderColor: inheritedColorPropType.isRequired,\n enableRadialLabels: PropTypes.bool.isRequired,\n radialLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n radialLabelsSkipAngle: PropTypes.number,\n radialLabelsTextXOffset: PropTypes.number,\n radialLabelsTextColor: inheritedColorPropType.isRequired,\n radialLabelsLinkOffset: PropTypes.number,\n radialLabelsLinkDiagonalLength: PropTypes.number,\n radialLabelsLinkHorizontalLength: PropTypes.number,\n radialLabelsLinkStrokeWidth: PropTypes.number,\n radialLabelsLinkColor: inheritedColorPropType.isRequired,\n enableSlicesLabels: PropTypes.bool.isRequired,\n sliceLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n slicesLabelsSkipAngle: PropTypes.number,\n slicesLabelsTextColor: inheritedColorPropType.isRequired,\n colors: ordinalColorsPropType.isRequired,\n defs: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.string.isRequired\n })).isRequired,\n fill: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.string,\n match: PropTypes.oneOfType([PropTypes.oneOf(['*']), PropTypes.object, PropTypes.func]).isRequired\n })).isRequired,\n isInteractive: PropTypes.bool,\n onClick: PropTypes.func.isRequired,\n onMouseEnter: PropTypes.func.isRequired,\n onMouseLeave: PropTypes.func.isRequired,\n lockTooltip: PropTypes.bool.isRequired,\n tooltipFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n tooltip: PropTypes.func,\n legends: PropTypes.arrayOf(PropTypes.shape(LegendPropShape)).isRequired\n};\nvar PieSvgPropTypes = _objectSpread2(_objectSpread2({}, PiePropTypes), {}, {\n role: PropTypes.string.isRequired\n});\nvar PieDefaultProps = {\n sortByValue: false,\n innerRadius: 0,\n padAngle: 0,\n cornerRadius: 0,\n startAngle: 0,\n endAngle: radiansToDegrees(Math.PI * 2),\n fit: true,\n borderWidth: 0,\n borderColor: {\n from: 'color',\n modifiers: [['darker', 1]]\n },\n enableRadialLabels: true,\n radialLabel: 'id',\n radialLabelsTextColor: {\n theme: 'labels.text.fill'\n },\n radialLabelsLinkColor: {\n theme: 'axis.ticks.line.stroke'\n },\n enableSlicesLabels: true,\n sliceLabel: 'value',\n slicesLabelsTextColor: {\n theme: 'labels.text.fill'\n },\n colors: {\n scheme: 'nivo'\n },\n defs: [],\n fill: [],\n isInteractive: true,\n onClick: noop,\n onMouseEnter: noop,\n onMouseLeave: noop,\n lockTooltip: true,\n legends: []\n};\nvar PieSvgDefaultProps = _objectSpread2(_objectSpread2({}, PieDefaultProps), {}, {\n role: 'img'\n});\n\nvar PieSlice = function PieSlice(_ref) {\n var data = _ref.data,\n path = _ref.path,\n color = _ref.color,\n fill = _ref.fill,\n borderWidth = _ref.borderWidth,\n borderColor = _ref.borderColor,\n showTooltip = _ref.showTooltip,\n hideTooltip = _ref.hideTooltip,\n _onClick = _ref.onClick,\n onMouseEnter = _ref.onMouseEnter,\n onMouseLeave = _ref.onMouseLeave,\n tooltipFormat = _ref.tooltipFormat,\n tooltip = _ref.tooltip,\n theme = _ref.theme;\n var handleTooltip = function handleTooltip(e) {\n return showTooltip( React.createElement(BasicTooltip, {\n id: data.label || data.id,\n value: data.value,\n enableChip: true,\n color: color,\n theme: theme,\n format: tooltipFormat,\n renderContent: typeof tooltip === 'function' ? tooltip.bind(null, _objectSpread2({\n color: color\n }, data)) : null\n }), e);\n };\n var handleMouseEnter = function handleMouseEnter(e) {\n onMouseEnter(data, e);\n handleTooltip(e);\n };\n var handleMouseLeave = function handleMouseLeave(e) {\n onMouseLeave(data, e);\n hideTooltip(e);\n };\n return React.createElement(\"path\", {\n key: data.id,\n d: path,\n fill: fill,\n strokeWidth: borderWidth,\n stroke: borderColor,\n onMouseEnter: handleMouseEnter,\n onMouseMove: handleTooltip,\n onMouseLeave: handleMouseLeave,\n onClick: function onClick() {\n return _onClick(data, event);\n }\n });\n};\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n return _typeof(obj);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n return function () {\n var Super = _getPrototypeOf(Derived),\n result;\n if (_isNativeReflectConstruct()) {\n var NewTarget = _getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return _possibleConstructorReturn(this, result);\n };\n}\n\nvar computeRadialLabels = function computeRadialLabels(arcs, _ref) {\n var getLabel = _ref.getLabel,\n radius = _ref.radius,\n skipAngle = _ref.skipAngle,\n linkOffset = _ref.linkOffset,\n linkDiagonalLength = _ref.linkDiagonalLength,\n linkHorizontalLength = _ref.linkHorizontalLength,\n textXOffset = _ref.textXOffset;\n return arcs.filter(function (arc) {\n return skipAngle === 0 || arc.angleDeg > skipAngle;\n }).map(function (arc) {\n var angle = absoluteAngleRadians(midAngle(arc) - Math.PI / 2);\n var positionA = positionFromAngle(angle, radius + linkOffset);\n var positionB = positionFromAngle(angle, radius + linkOffset + linkDiagonalLength);\n var positionC;\n var labelPosition;\n var textAlign;\n if (absoluteAngleDegrees(radiansToDegrees(angle)) < 90 || absoluteAngleDegrees(radiansToDegrees(angle)) >= 270) {\n positionC = {\n x: positionB.x + linkHorizontalLength,\n y: positionB.y\n };\n labelPosition = {\n x: positionB.x + linkHorizontalLength + textXOffset,\n y: positionB.y\n };\n textAlign = 'left';\n } else {\n positionC = {\n x: positionB.x - linkHorizontalLength,\n y: positionB.y\n };\n labelPosition = {\n x: positionB.x - linkHorizontalLength - textXOffset,\n y: positionB.y\n };\n textAlign = 'right';\n }\n return {\n arc: arc,\n text: getLabel(arc.data),\n position: labelPosition,\n align: textAlign,\n line: [positionA, positionB, positionC]\n };\n });\n};\n\nvar lineGenerator = line().x(function (d) {\n return d.x;\n}).y(function (d) {\n return d.y;\n});\nvar PieRadialLabels = function (_Component) {\n _inherits(PieRadialLabels, _Component);\n var _super = _createSuper(PieRadialLabels);\n function PieRadialLabels() {\n _classCallCheck(this, PieRadialLabels);\n return _super.apply(this, arguments);\n }\n _createClass(PieRadialLabels, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n arcs = _this$props.arcs,\n label = _this$props.label,\n radius = _this$props.radius,\n skipAngle = _this$props.skipAngle,\n linkOffset = _this$props.linkOffset,\n linkDiagonalLength = _this$props.linkDiagonalLength,\n linkHorizontalLength = _this$props.linkHorizontalLength,\n linkStrokeWidth = _this$props.linkStrokeWidth,\n textXOffset = _this$props.textXOffset,\n textColor = _this$props.textColor,\n linkColor = _this$props.linkColor,\n theme = _this$props.theme;\n var labels = computeRadialLabels(arcs, {\n getLabel: label,\n radius: radius,\n skipAngle: skipAngle,\n linkOffset: linkOffset,\n linkDiagonalLength: linkDiagonalLength,\n linkHorizontalLength: linkHorizontalLength,\n textXOffset: textXOffset\n });\n return labels.map(function (label) {\n return React.createElement(Fragment, {\n key: label.arc.data.id\n }, React.createElement(\"path\", {\n d: lineGenerator(label.line),\n fill: \"none\",\n style: {\n fill: 'none',\n stroke: linkColor(label.arc, theme)\n },\n strokeWidth: linkStrokeWidth\n }), React.createElement(\"g\", {\n transform: \"translate(\".concat(label.position.x, \", \").concat(label.position.y, \")\")\n }, React.createElement(\"text\", {\n textAnchor: textPropsByEngine.svg.align[label.align],\n dominantBaseline: \"central\",\n style: _objectSpread2(_objectSpread2({}, theme.labels.text), {}, {\n fill: textColor(label.arc.data, theme)\n })\n }, label.text)));\n });\n }\n }]);\n return PieRadialLabels;\n}(Component);\nPieRadialLabels.defaultProps = {\n skipAngle: 0,\n linkOffset: 0,\n linkDiagonalLength: 16,\n linkHorizontalLength: 24,\n linkStrokeWidth: 1,\n textXOffset: 6\n};\n\nvar sliceStyle = {\n pointerEvents: 'none'\n};\nvar PieSlicesLabels = function (_Component) {\n _inherits(PieSlicesLabels, _Component);\n var _super = _createSuper(PieSlicesLabels);\n function PieSlicesLabels() {\n _classCallCheck(this, PieSlicesLabels);\n return _super.apply(this, arguments);\n }\n _createClass(PieSlicesLabels, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n arcs = _this$props.arcs,\n label = _this$props.label,\n radius = _this$props.radius,\n skipAngle = _this$props.skipAngle,\n innerRadius = _this$props.innerRadius,\n textColor = _this$props.textColor,\n theme = _this$props.theme;\n var centerRadius = innerRadius + (radius - innerRadius) / 2;\n return React.createElement(Fragment, null, arcs.filter(function (arc) {\n return skipAngle === 0 || arc.angleDeg > skipAngle;\n }).map(function (arc) {\n var angle = midAngle(arc) - Math.PI / 2;\n var position = positionFromAngle(angle, centerRadius);\n return React.createElement(\"g\", {\n key: arc.data.id,\n transform: \"translate(\".concat(position.x, \", \").concat(position.y, \")\"),\n style: sliceStyle\n }, React.createElement(\"text\", {\n textAnchor: \"middle\",\n dominantBaseline: \"central\",\n style: _objectSpread2(_objectSpread2({}, theme.labels.text), {}, {\n fill: textColor(arc.data, theme)\n })\n }, label(arc.data)));\n }));\n }\n }]);\n return PieSlicesLabels;\n}(Component);\nPieSlicesLabels.defaultProps = {\n skipAngle: 0\n};\n\nfunction PieLegends(props) {\n var width = props.width,\n height = props.height,\n legends = props.legends,\n theme = props.theme,\n arcs = props.arcs;\n var data = React.useMemo(function () {\n return arcs.map(function (_ref) {\n var color = _ref.color,\n _ref$data = _ref.data,\n id = _ref$data.id,\n label = _ref$data.label,\n fill = _ref.fill;\n return {\n id: id,\n label: label || id,\n color: color,\n fill: fill\n };\n });\n }, [arcs]);\n return legends.map(function (legend, i) {\n return React.createElement(BoxLegendSvg, Object.assign({\n key: i\n }, legend, {\n containerWidth: width,\n containerHeight: height,\n data: data,\n theme: theme\n }));\n });\n}\n\nfunction Pie(props) {\n var data = props.data,\n sortByValue = props.sortByValue,\n startAngle = props.startAngle,\n endAngle = props.endAngle,\n padAngle = props.padAngle,\n fit = props.fit,\n innerRadius = props.innerRadius,\n cornerRadius = props.cornerRadius,\n _margin = props.margin,\n _width = props.width,\n _height = props.height,\n colors = props.colors,\n colorBy = props.colorBy,\n borderWidth = props.borderWidth,\n _borderColor = props.borderColor,\n radialLabel = props.radialLabel,\n enableRadialLabels = props.enableRadialLabels,\n radialLabelsSkipAngle = props.radialLabelsSkipAngle,\n radialLabelsLinkOffset = props.radialLabelsLinkOffset,\n radialLabelsLinkDiagonalLength = props.radialLabelsLinkDiagonalLength,\n radialLabelsLinkHorizontalLength = props.radialLabelsLinkHorizontalLength,\n radialLabelsLinkStrokeWidth = props.radialLabelsLinkStrokeWidth,\n radialLabelsTextXOffset = props.radialLabelsTextXOffset,\n radialLabelsTextColor = props.radialLabelsTextColor,\n radialLabelsLinkColor = props.radialLabelsLinkColor,\n sliceLabel = props.sliceLabel,\n enableSlicesLabels = props.enableSlicesLabels,\n slicesLabelsSkipAngle = props.slicesLabelsSkipAngle,\n slicesLabelsTextColor = props.slicesLabelsTextColor,\n _theme = props.theme,\n defs = props.defs,\n fill = props.fill,\n isInteractive = props.isInteractive,\n onClick = props.onClick,\n onMouseEnter = props.onMouseEnter,\n onMouseLeave = props.onMouseLeave,\n tooltipFormat = props.tooltipFormat,\n tooltip = props.tooltip,\n legends = props.legends,\n role = props.role;\n var theme = usePartialTheme(_theme);\n var _useDimensions = useDimensions(_width, _height, _margin),\n outerWidth = _useDimensions.outerWidth,\n outerHeight = _useDimensions.outerHeight,\n margin = _useDimensions.margin,\n innerWidth = _useDimensions.innerWidth,\n innerHeight = _useDimensions.innerHeight;\n var getRadialLabel = React.useMemo(function () {\n return getLabelGenerator(radialLabel);\n }, [radialLabel]);\n var getSliceLabel = React.useMemo(function () {\n return getLabelGenerator(sliceLabel);\n }, [sliceLabel]);\n var borderColor = getInheritedColorGenerator(_borderColor, theme);\n return React.createElement(PieLayout, {\n width: innerWidth,\n height: innerHeight,\n data: data,\n sortByValue: sortByValue,\n startAngle: startAngle,\n endAngle: endAngle,\n fit: fit,\n padAngle: padAngle,\n innerRadius: innerRadius,\n cornerRadius: cornerRadius,\n colors: colors,\n colorBy: colorBy\n }, function (_ref) {\n var centerX = _ref.centerX,\n centerY = _ref.centerY,\n radius = _ref.radius,\n innerRadius = _ref.innerRadius,\n arcs = _ref.arcs,\n arcGenerator = _ref.arcGenerator;\n var boundDefs = bindDefs(defs, arcs, fill, {\n dataKey: 'data'\n });\n return React.createElement(Container, {\n isInteractive: isInteractive,\n theme: theme,\n animate: false\n }, function (_ref2) {\n var showTooltip = _ref2.showTooltip,\n hideTooltip = _ref2.hideTooltip;\n return React.createElement(SvgWrapper, {\n width: outerWidth,\n height: outerHeight,\n margin: margin,\n defs: boundDefs,\n theme: theme,\n role: role\n }, React.createElement(\"g\", {\n transform: \"translate(\".concat(centerX, \",\").concat(centerY, \")\")\n }, arcs.map(function (arc) {\n return React.createElement(PieSlice, {\n key: arc.data.id,\n data: arc.data,\n path: arcGenerator(arc),\n color: arc.color,\n fill: arc.fill ? arc.fill : arc.color,\n borderWidth: borderWidth,\n borderColor: borderColor(arc),\n showTooltip: showTooltip,\n hideTooltip: hideTooltip,\n tooltipFormat: tooltipFormat,\n tooltip: tooltip,\n onClick: onClick,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n theme: theme\n });\n }), enableRadialLabels && React.createElement(PieRadialLabels, {\n arcs: arcs,\n radius: radius,\n label: getRadialLabel,\n skipAngle: radialLabelsSkipAngle,\n linkOffset: radialLabelsLinkOffset,\n linkDiagonalLength: radialLabelsLinkDiagonalLength,\n linkHorizontalLength: radialLabelsLinkHorizontalLength,\n linkStrokeWidth: radialLabelsLinkStrokeWidth,\n textXOffset: radialLabelsTextXOffset,\n textColor: getInheritedColorGenerator(radialLabelsTextColor, theme),\n linkColor: getInheritedColorGenerator(radialLabelsLinkColor, theme),\n theme: theme\n }), enableSlicesLabels && React.createElement(PieSlicesLabels, {\n arcs: arcs,\n radius: radius,\n innerRadius: innerRadius,\n theme: theme,\n label: getSliceLabel,\n skipAngle: slicesLabelsSkipAngle,\n textColor: getInheritedColorGenerator(slicesLabelsTextColor, theme)\n })), React.createElement(PieLegends, {\n width: innerWidth,\n height: innerHeight,\n arcs: arcs,\n legends: legends,\n theme: theme\n }));\n });\n });\n}\nPie.displayName = 'Pie';\nPie.defaultProps = PieSvgDefaultProps;\n\nvar ResponsivePie = function ResponsivePie(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(Pie, Object.assign({\n width: width,\n height: height\n }, props));\n });\n};\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nvar drawSliceLabels = function drawSliceLabels(ctx, arcs, _ref) {\n var arcGenerator = _ref.arcGenerator,\n getLabel = _ref.getLabel,\n skipAngle = _ref.skipAngle,\n getTextColor = _ref.getTextColor,\n theme = _ref.theme;\n ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n ctx.font = \"\".concat(theme.labels.text.fontSize, \"px \").concat(theme.labels.text.fontFamily);\n arcs.filter(function (arc) {\n return skipAngle === 0 || arc.angleDeg > skipAngle;\n }).forEach(function (arc) {\n var _arcGenerator$centroi = arcGenerator.centroid(arc),\n _arcGenerator$centroi2 = _slicedToArray(_arcGenerator$centroi, 2),\n centroidX = _arcGenerator$centroi2[0],\n centroidY = _arcGenerator$centroi2[1];\n var sliceLabel = getLabel(arc.data);\n var textColor = getTextColor(arc, theme);\n ctx.save();\n ctx.translate(centroidX, centroidY);\n ctx.fillStyle = textColor;\n ctx.fillText(sliceLabel, 0, 0);\n ctx.restore();\n });\n};\nvar drawRadialLabels = function drawRadialLabels(ctx, arcs, _ref2) {\n var radius = _ref2.radius,\n getLabel = _ref2.getLabel,\n skipAngle = _ref2.skipAngle,\n linkOffset = _ref2.linkOffset,\n linkDiagonalLength = _ref2.linkDiagonalLength,\n linkHorizontalLength = _ref2.linkHorizontalLength,\n linkStrokeWidth = _ref2.linkStrokeWidth,\n textXOffset = _ref2.textXOffset,\n getTextColor = _ref2.getTextColor,\n getLinkColor = _ref2.getLinkColor,\n theme = _ref2.theme;\n var radialLabels = computeRadialLabels(arcs, {\n getLabel: getLabel,\n radius: radius,\n skipAngle: skipAngle,\n linkOffset: linkOffset,\n linkDiagonalLength: linkDiagonalLength,\n linkHorizontalLength: linkHorizontalLength,\n textXOffset: textXOffset\n });\n ctx.textBaseline = 'middle';\n ctx.font = \"\".concat(theme.labels.text.fontSize, \"px \").concat(theme.labels.text.fontFamily);\n radialLabels.forEach(function (label) {\n var dataWithColor = _objectSpread2(_objectSpread2({}, label.arc.data), {}, {\n color: label.arc.color\n });\n ctx.save();\n ctx.translate(label.position.x, label.position.y);\n ctx.fillStyle = getTextColor(dataWithColor, theme);\n ctx.textAlign = textPropsByEngine.canvas.align[label.align];\n ctx.fillText(label.text, 0, 0);\n ctx.restore();\n ctx.beginPath();\n ctx.strokeStyle = getLinkColor(dataWithColor, theme);\n ctx.lineWidth = linkStrokeWidth;\n label.line.forEach(function (point, index) {\n if (index === 0) ctx.moveTo(point.x, point.y);else ctx.lineTo(point.x, point.y);\n });\n if (linkStrokeWidth > 0) ctx.stroke();\n });\n};\n\nvar PieTooltip = function PieTooltip(_ref) {\n var data = _ref.data,\n color = _ref.color,\n tooltipFormat = _ref.tooltipFormat,\n tooltip = _ref.tooltip,\n theme = _ref.theme;\n return React.createElement(BasicTooltip, {\n id: data.label,\n value: data.value,\n enableChip: true,\n color: color,\n theme: theme,\n format: tooltipFormat,\n renderContent: typeof tooltip === 'function' ? tooltip.bind(null, _objectSpread2({\n color: color\n }, data)) : null\n });\n};\n\nvar PieCanvasRenderer = function (_Component) {\n _inherits(PieCanvasRenderer, _Component);\n var _super = _createSuper(PieCanvasRenderer);\n function PieCanvasRenderer() {\n var _this;\n _classCallCheck(this, PieCanvasRenderer);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _this.getArcFromMouse = function (event) {\n var _getRelativeCursor = getRelativeCursor(_this.surface, event),\n _getRelativeCursor2 = _slicedToArray(_getRelativeCursor, 2),\n x = _getRelativeCursor2[0],\n y = _getRelativeCursor2[1];\n var _this$props = _this.props,\n centerX = _this$props.centerX,\n centerY = _this$props.centerY,\n margin = _this$props.margin,\n radius = _this$props.radius,\n innerRadius = _this$props.innerRadius,\n arcs = _this$props.arcs;\n return getHoveredArc(margin.left + centerX, margin.top + centerY, radius, innerRadius, arcs, x, y);\n };\n _this.handleMouseHover = function (showTooltip, hideTooltip) {\n return function (event) {\n if (_this.props.isInteractive !== true) return;\n var arc = _this.getArcFromMouse(event);\n if (arc) {\n showTooltip( React.createElement(PieTooltip, {\n data: arc.data,\n color: arc.color,\n theme: _this.props.theme\n }), event);\n } else {\n hideTooltip();\n }\n };\n };\n _this.handleMouseLeave = function (hideTooltip) {\n return function () {\n if (_this.props.isInteractive !== true) return;\n hideTooltip();\n };\n };\n _this.handleClick = function (event) {\n var arc = _this.getArcFromMouse(event);\n if (arc) _this.props.onClick(arc.data, event);\n };\n return _this;\n }\n _createClass(PieCanvasRenderer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.ctx = this.surface.getContext('2d');\n this.draw(this.props);\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(props) {\n if (this.props.outerWidth !== props.outerWidth || this.props.outerHeight !== props.outerHeight || this.props.isInteractive !== props.isInteractive || this.props.theme !== props.theme) {\n return true;\n }\n this.draw(props);\n return false;\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.ctx = this.surface.getContext('2d');\n this.draw(this.props);\n }\n }, {\n key: \"draw\",\n value: function draw(props) {\n var _this2 = this;\n var arcs = props.arcs,\n arcGenerator = props.arcGenerator,\n width = props.width,\n height = props.height,\n centerX = props.centerX,\n centerY = props.centerY,\n radius = props.radius,\n outerWidth = props.outerWidth,\n outerHeight = props.outerHeight,\n pixelRatio = props.pixelRatio,\n margin = props.margin,\n borderWidth = props.borderWidth,\n borderColor = props.borderColor,\n enableSlicesLabels = props.enableSlicesLabels,\n enableRadialLabels = props.enableRadialLabels,\n legends = props.legends,\n theme = props.theme;\n this.surface.width = outerWidth * pixelRatio;\n this.surface.height = outerHeight * pixelRatio;\n this.ctx.scale(pixelRatio, pixelRatio);\n this.ctx.fillStyle = theme.background;\n this.ctx.fillRect(0, 0, outerWidth, outerHeight);\n this.ctx.save();\n this.ctx.translate(margin.left, margin.top);\n arcGenerator.context(this.ctx);\n this.ctx.save();\n this.ctx.translate(centerX, centerY);\n var getBorderColor = getInheritedColorGenerator(borderColor, theme);\n arcs.forEach(function (arc) {\n _this2.ctx.beginPath();\n _this2.ctx.fillStyle = arc.color;\n _this2.ctx.strokeStyle = getBorderColor(_objectSpread2(_objectSpread2({}, arc.data), {}, {\n color: arc.color\n }));\n _this2.ctx.lineWidth = borderWidth;\n arcGenerator(arc);\n _this2.ctx.fill();\n if (borderWidth > 0) _this2.ctx.stroke();\n });\n if (enableSlicesLabels === true) {\n var sliceLabel = props.sliceLabel,\n slicesLabelsSkipAngle = props.slicesLabelsSkipAngle,\n slicesLabelsTextColor = props.slicesLabelsTextColor;\n drawSliceLabels(this.ctx, arcs, {\n arcGenerator: arcGenerator,\n skipAngle: slicesLabelsSkipAngle,\n getLabel: getLabelGenerator(sliceLabel),\n getTextColor: getInheritedColorGenerator(slicesLabelsTextColor, theme),\n theme: theme\n });\n }\n if (enableRadialLabels === true) {\n var radialLabel = props.radialLabel,\n radialLabelsSkipAngle = props.radialLabelsSkipAngle,\n radialLabelsLinkOffset = props.radialLabelsLinkOffset,\n radialLabelsLinkStrokeWidth = props.radialLabelsLinkStrokeWidth,\n radialLabelsLinkDiagonalLength = props.radialLabelsLinkDiagonalLength,\n radialLabelsLinkHorizontalLength = props.radialLabelsLinkHorizontalLength,\n radialLabelsTextXOffset = props.radialLabelsTextXOffset,\n radialLabelsTextColor = props.radialLabelsTextColor,\n radialLabelsLinkColor = props.radialLabelsLinkColor;\n drawRadialLabels(this.ctx, arcs, {\n radius: radius,\n getLabel: getLabelGenerator(radialLabel),\n skipAngle: radialLabelsSkipAngle,\n linkOffset: radialLabelsLinkOffset,\n linkDiagonalLength: radialLabelsLinkDiagonalLength,\n linkHorizontalLength: radialLabelsLinkHorizontalLength,\n linkStrokeWidth: radialLabelsLinkStrokeWidth,\n textXOffset: radialLabelsTextXOffset,\n getTextColor: getInheritedColorGenerator(radialLabelsTextColor, theme),\n getLinkColor: getInheritedColorGenerator(radialLabelsLinkColor, theme),\n theme: theme\n });\n }\n this.ctx.restore();\n legends.forEach(function (legend) {\n renderLegendToCanvas(_this2.ctx, _objectSpread2(_objectSpread2({}, legend), {}, {\n data: arcs.map(function (arc) {\n return {\n id: arc.data.id,\n label: arc.data.id,\n color: arc.color\n };\n }),\n containerWidth: width,\n containerHeight: height,\n theme: theme\n }));\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n var _this$props2 = this.props,\n outerWidth = _this$props2.outerWidth,\n outerHeight = _this$props2.outerHeight,\n pixelRatio = _this$props2.pixelRatio,\n isInteractive = _this$props2.isInteractive,\n theme = _this$props2.theme;\n return React.createElement(Container, {\n isInteractive: isInteractive,\n theme: theme,\n animate: false\n }, function (_ref) {\n var showTooltip = _ref.showTooltip,\n hideTooltip = _ref.hideTooltip;\n return React.createElement(\"canvas\", {\n ref: function ref(surface) {\n _this3.surface = surface;\n },\n width: outerWidth * pixelRatio,\n height: outerHeight * pixelRatio,\n style: {\n width: outerWidth,\n height: outerHeight\n },\n onMouseEnter: _this3.handleMouseHover(showTooltip, hideTooltip),\n onMouseMove: _this3.handleMouseHover(showTooltip, hideTooltip),\n onMouseLeave: _this3.handleMouseLeave(hideTooltip),\n onClick: _this3.handleClick\n });\n });\n }\n }]);\n return PieCanvasRenderer;\n}(Component);\n\nfunction PieCanvas(props) {\n var data = props.data,\n sortByValue = props.sortByValue,\n startAngle = props.startAngle,\n endAngle = props.endAngle,\n fit = props.fit,\n padAngle = props.padAngle,\n innerRadius = props.innerRadius,\n cornerRadius = props.cornerRadius,\n width = props.width,\n height = props.height,\n colors = props.colors,\n colorBy = props.colorBy,\n topProps = _objectWithoutProperties(props, [\"data\", \"sortByValue\", \"startAngle\", \"endAngle\", \"fit\", \"padAngle\", \"innerRadius\", \"cornerRadius\", \"width\", \"height\", \"colors\", \"colorBy\"]);\n return React.createElement(PieLayout, {\n width: width,\n height: height,\n data: data,\n sortByValue: sortByValue,\n startAngle: startAngle,\n endAngle: endAngle,\n fit: fit,\n padAngle: padAngle,\n innerRadius: innerRadius,\n cornerRadius: cornerRadius,\n colors: colors,\n colorBy: colorBy\n }, function (props) {\n return React.createElement(PieCanvasRenderer, Object.assign({}, topProps, props));\n });\n}\nPieCanvas.displayName = 'PieCanvas';\n\nvar ResponsivePieCanvas = function ResponsivePieCanvas(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(PieCanvas, Object.assign({\n width: width,\n height: height\n }, props));\n });\n};\n\nvar usePie = function usePie(_ref) {\n var data = _ref.data,\n radius = _ref.radius,\n _ref$value = _ref.value,\n value = _ref$value === void 0 ? function (v) {\n return v;\n } : _ref$value,\n _ref$startAngle = _ref.startAngle,\n startAngle = _ref$startAngle === void 0 ? 0 : _ref$startAngle,\n _ref$endAngle = _ref.endAngle,\n endAngle = _ref$endAngle === void 0 ? 360 : _ref$endAngle,\n _ref$innerRadius = _ref.innerRadius,\n innerRadius = _ref$innerRadius === void 0 ? 0 : _ref$innerRadius,\n _ref$cornerRadius = _ref.cornerRadius,\n cornerRadius = _ref$cornerRadius === void 0 ? 0 : _ref$cornerRadius,\n _ref$sortByValue = _ref.sortByValue,\n sortByValue = _ref$sortByValue === void 0 ? false : _ref$sortByValue,\n _ref$padAngle = _ref.padAngle,\n padAngle = _ref$padAngle === void 0 ? 0 : _ref$padAngle;\n var arcGenerator = useMemo(function () {\n return arc().outerRadius(radius).innerRadius(innerRadius).cornerRadius(cornerRadius);\n }, [radius, innerRadius, cornerRadius]);\n var getValue = useMemo(function () {\n return typeof value === 'function' ? value : function (d) {\n return get(d, value);\n };\n }, [value]);\n var pie$1 = useMemo(function () {\n var computedPie = pie().value(getValue).padAngle(degreesToRadians(padAngle)).startAngle(degreesToRadians(startAngle)).endAngle(degreesToRadians(endAngle));\n if (sortByValue !== true) computedPie.sortValues(null);\n return computedPie;\n }, [getValue, padAngle, startAngle, endAngle, sortByValue]);\n var arcs = useMemo(function () {\n return pie$1(data).map(function (arc) {\n var angle = arc.endAngle - (arc.endAngle - arc.startAngle) * 0.5;\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n startAngleDeg: radiansToDegrees(angle.startAngle),\n endAngleDeg: radiansToDegrees(arc.endAngle),\n angle: angle,\n angleDeg: radiansToDegrees(angle)\n });\n });\n }, [data, pie$1]);\n return {\n arcs: arcs,\n arcGenerator: arcGenerator\n };\n};\n\nexport { Pie, PieCanvas, PieDefaultProps, PieLayout, PiePropTypes, PieSvgDefaultProps, PieSvgPropTypes, ResponsivePie, ResponsivePieCanvas, arcPropType, usePie };\n//# sourceMappingURL=nivo-pie.es.js.map\n","import React, { memo, useMemo } from 'react';\nimport { animated, useSpring, useTransition } from 'react-spring';\nimport { textPropsByEngine, useTheme, useMotionConfig } from '@nivo/core';\nimport { timeMillisecond, utcMillisecond, timeSecond, utcSecond, timeMinute, utcMinute, timeHour, utcHour, timeDay, utcDay, timeWeek, utcWeek, timeSunday, utcSunday, timeMonday, utcMonday, timeTuesday, utcTuesday, timeWednesday, utcWednesday, timeThursday, utcThursday, timeFriday, utcFriday, timeSaturday, utcSaturday, timeMonth, utcMonth, timeYear, utcYear } from 'd3-time';\nimport { timeFormat } from 'd3-time-format';\nimport { format } from 'd3-format';\nimport PropTypes from 'prop-types';\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n}\n\nvar centerScale = function centerScale(scale) {\n var bandwidth = scale.bandwidth();\n if (bandwidth === 0) return scale;\n var offset = bandwidth / 2;\n if (scale.round()) {\n offset = Math.round(offset);\n }\n return function (d) {\n return scale(d) + offset;\n };\n};\nvar timeByType = {\n millisecond: [timeMillisecond, utcMillisecond],\n second: [timeSecond, utcSecond],\n minute: [timeMinute, utcMinute],\n hour: [timeHour, utcHour],\n day: [timeDay, utcDay],\n week: [timeWeek, utcWeek],\n sunday: [timeSunday, utcSunday],\n monday: [timeMonday, utcMonday],\n tuesday: [timeTuesday, utcTuesday],\n wednesday: [timeWednesday, utcWednesday],\n thursday: [timeThursday, utcThursday],\n friday: [timeFriday, utcFriday],\n saturday: [timeSaturday, utcSaturday],\n month: [timeMonth, utcMonth],\n year: [timeYear, utcYear]\n};\nvar timeTypes = Object.keys(timeByType);\nvar timeIntervalRegexp = new RegExp(\"^every\\\\s*(\\\\d+)?\\\\s*(\".concat(timeTypes.join('|'), \")s?$\"), 'i');\nvar isInteger = function isInteger(value) {\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n};\nvar getScaleTicks = function getScaleTicks(scale, spec) {\n if (Array.isArray(spec)) {\n return spec;\n }\n if (scale.ticks) {\n if (spec === undefined) {\n return scale.ticks();\n }\n if (isInteger(spec)) {\n return scale.ticks(spec);\n }\n if (typeof spec === 'string') {\n var matches = spec.match(timeIntervalRegexp);\n if (matches) {\n var timeType = timeByType[matches[2]][scale.useUTC ? 1 : 0];\n if (matches[1] === undefined) {\n return scale.ticks(timeType);\n }\n return scale.ticks(timeType.every(Number(matches[1])));\n }\n throw new Error(\"Invalid tickValues: \".concat(spec));\n }\n }\n return scale.domain();\n};\nvar computeCartesianTicks = function computeCartesianTicks(_ref) {\n var axis = _ref.axis,\n scale = _ref.scale,\n ticksPosition = _ref.ticksPosition,\n tickValues = _ref.tickValues,\n tickSize = _ref.tickSize,\n tickPadding = _ref.tickPadding,\n tickRotation = _ref.tickRotation,\n _ref$engine = _ref.engine,\n engine = _ref$engine === void 0 ? 'svg' : _ref$engine;\n var values = getScaleTicks(scale, tickValues);\n var textProps = textPropsByEngine[engine];\n var position = scale.bandwidth ? centerScale(scale) : scale;\n var line = {\n lineX: 0,\n lineY: 0\n };\n var text = {\n textX: 0,\n textY: 0\n };\n var translate;\n var textAlign = textProps.align.center;\n var textBaseline = textProps.baseline.center;\n if (axis === 'x') {\n translate = function translate(d) {\n return {\n x: position(d),\n y: 0\n };\n };\n line.lineY = tickSize * (ticksPosition === 'after' ? 1 : -1);\n text.textY = (tickSize + tickPadding) * (ticksPosition === 'after' ? 1 : -1);\n if (ticksPosition === 'after') {\n textBaseline = textProps.baseline.top;\n } else {\n textBaseline = textProps.baseline.bottom;\n }\n if (tickRotation === 0) {\n textAlign = textProps.align.center;\n } else if (ticksPosition === 'after' && tickRotation < 0 || ticksPosition === 'before' && tickRotation > 0) {\n textAlign = textProps.align.right;\n textBaseline = textProps.baseline.center;\n } else if (ticksPosition === 'after' && tickRotation > 0 || ticksPosition === 'before' && tickRotation < 0) {\n textAlign = textProps.align.left;\n textBaseline = textProps.baseline.center;\n }\n } else {\n translate = function translate(d) {\n return {\n x: 0,\n y: position(d)\n };\n };\n line.lineX = tickSize * (ticksPosition === 'after' ? 1 : -1);\n text.textX = (tickSize + tickPadding) * (ticksPosition === 'after' ? 1 : -1);\n if (ticksPosition === 'after') {\n textAlign = textProps.align.left;\n } else {\n textAlign = textProps.align.right;\n }\n }\n var ticks = values.map(function (value) {\n return _objectSpread2(_objectSpread2(_objectSpread2({\n key: value,\n value: value\n }, translate(value)), line), text);\n });\n return {\n ticks: ticks,\n textAlign: textAlign,\n textBaseline: textBaseline\n };\n};\nvar getFormatter = function getFormatter(format$1, scale) {\n if (!format$1 || typeof format$1 === 'function') return format$1;\n if (scale.type === 'time') {\n var f = timeFormat(format$1);\n return function (d) {\n return f(new Date(d));\n };\n }\n return format(format$1);\n};\nvar computeGridLines = function computeGridLines(_ref2) {\n var width = _ref2.width,\n height = _ref2.height,\n scale = _ref2.scale,\n axis = _ref2.axis,\n _values = _ref2.values;\n var lineValues = Array.isArray(_values) ? _values : undefined;\n var lineCount = isInteger(_values) ? _values : undefined;\n var values = lineValues || getScaleTicks(scale, lineCount);\n var position = scale.bandwidth ? centerScale(scale) : scale;\n var lines;\n if (axis === 'x') {\n lines = values.map(function (v) {\n return {\n key: \"\".concat(v),\n x1: position(v),\n x2: position(v),\n y1: 0,\n y2: height\n };\n });\n } else if (axis === 'y') {\n lines = values.map(function (v) {\n return {\n key: \"\".concat(v),\n x1: 0,\n x2: width,\n y1: position(v),\n y2: position(v)\n };\n });\n }\n return lines;\n};\n\nvar axisPropTypes = {\n ticksPosition: PropTypes.oneOf(['before', 'after']),\n tickValues: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.instanceOf(Date)])), PropTypes.string]),\n tickSize: PropTypes.number,\n tickPadding: PropTypes.number,\n tickRotation: PropTypes.number,\n format: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n renderTick: PropTypes.func,\n legend: PropTypes.node,\n legendPosition: PropTypes.oneOf(['start', 'middle', 'end']),\n legendOffset: PropTypes.number,\n ariaHidden: PropTypes.bool\n};\nvar axisPropType = PropTypes.shape(axisPropTypes);\n\nvar AxisTick = function AxisTick(_ref) {\n var _value = _ref.value,\n format = _ref.format,\n lineX = _ref.lineX,\n lineY = _ref.lineY,\n _onClick = _ref.onClick,\n textBaseline = _ref.textBaseline,\n textAnchor = _ref.textAnchor,\n animatedProps = _ref.animatedProps;\n var theme = useTheme();\n var value = _value;\n if (format !== undefined) {\n value = format(value);\n }\n var gStyle = {\n opacity: animatedProps.opacity\n };\n if (_onClick) {\n gStyle['cursor'] = 'pointer';\n }\n return React.createElement(animated.g, Object.assign({\n transform: animatedProps.transform\n }, _onClick ? {\n onClick: function onClick(e) {\n return _onClick(e, value);\n }\n } : {}, {\n style: gStyle\n }), React.createElement(\"line\", {\n x1: 0,\n x2: lineX,\n y1: 0,\n y2: lineY,\n style: theme.axis.ticks.line\n }), React.createElement(animated.text, {\n dominantBaseline: textBaseline,\n textAnchor: textAnchor,\n transform: animatedProps.textTransform,\n style: theme.axis.ticks.text\n }, value));\n};\nAxisTick.defaultProps = {\n opacity: 1,\n rotate: 0\n};\nvar AxisTick$1 = memo(AxisTick);\n\nvar defaultTickRenderer = function defaultTickRenderer(props) {\n return React.createElement(AxisTick$1, props);\n};\nvar Axis = function Axis(_ref) {\n var axis = _ref.axis,\n scale = _ref.scale,\n x = _ref.x,\n y = _ref.y,\n length = _ref.length,\n ticksPosition = _ref.ticksPosition,\n tickValues = _ref.tickValues,\n tickSize = _ref.tickSize,\n tickPadding = _ref.tickPadding,\n tickRotation = _ref.tickRotation,\n format = _ref.format,\n renderTick = _ref.renderTick,\n legend = _ref.legend,\n legendPosition = _ref.legendPosition,\n legendOffset = _ref.legendOffset,\n onClick = _ref.onClick,\n ariaHidden = _ref.ariaHidden;\n var theme = useTheme();\n var formatValue = useMemo(function () {\n return getFormatter(format, scale);\n }, [format, scale]);\n var _computeCartesianTick = computeCartesianTicks({\n axis: axis,\n scale: scale,\n ticksPosition: ticksPosition,\n tickValues: tickValues,\n tickSize: tickSize,\n tickPadding: tickPadding,\n tickRotation: tickRotation\n }),\n ticks = _computeCartesianTick.ticks,\n textAlign = _computeCartesianTick.textAlign,\n textBaseline = _computeCartesianTick.textBaseline;\n var legendNode = null;\n if (legend !== undefined) {\n var legendX = 0;\n var legendY = 0;\n var legendRotation = 0;\n var textAnchor;\n if (axis === 'y') {\n legendRotation = -90;\n legendX = legendOffset;\n if (legendPosition === 'start') {\n textAnchor = 'start';\n legendY = length;\n } else if (legendPosition === 'middle') {\n textAnchor = 'middle';\n legendY = length / 2;\n } else if (legendPosition === 'end') {\n textAnchor = 'end';\n }\n } else {\n legendY = legendOffset;\n if (legendPosition === 'start') {\n textAnchor = 'start';\n } else if (legendPosition === 'middle') {\n textAnchor = 'middle';\n legendX = length / 2;\n } else if (legendPosition === 'end') {\n textAnchor = 'end';\n legendX = length;\n }\n }\n legendNode = React.createElement(\"text\", {\n transform: \"translate(\".concat(legendX, \", \").concat(legendY, \") rotate(\").concat(legendRotation, \")\"),\n textAnchor: textAnchor,\n style: _objectSpread2({\n dominantBaseline: 'central'\n }, theme.axis.legend.text)\n }, legend);\n }\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.config;\n var animatedProps = useSpring({\n transform: \"translate(\".concat(x, \",\").concat(y, \")\"),\n lineX2: axis === 'x' ? length : 0,\n lineY2: axis === 'x' ? 0 : length,\n config: springConfig,\n immediate: !animate\n });\n var transitions = useTransition(ticks, function (tick) {\n return tick.key;\n }, {\n initial: function initial(tick) {\n return {\n opacity: 1,\n transform: \"translate(\".concat(tick.x, \",\").concat(tick.y, \")\"),\n textTransform: \"translate(\".concat(tick.textX, \",\").concat(tick.textY, \") rotate(\").concat(tickRotation, \")\")\n };\n },\n from: function from(tick) {\n return {\n opacity: 0,\n transform: \"translate(\".concat(tick.x, \",\").concat(tick.y, \")\"),\n textTransform: \"translate(\".concat(tick.textX, \",\").concat(tick.textY, \") rotate(\").concat(tickRotation, \")\")\n };\n },\n enter: function enter(tick) {\n return {\n opacity: 1,\n transform: \"translate(\".concat(tick.x, \",\").concat(tick.y, \")\"),\n textTransform: \"translate(\".concat(tick.textX, \",\").concat(tick.textY, \") rotate(\").concat(tickRotation, \")\")\n };\n },\n update: function update(tick) {\n return {\n opacity: 1,\n transform: \"translate(\".concat(tick.x, \",\").concat(tick.y, \")\"),\n textTransform: \"translate(\".concat(tick.textX, \",\").concat(tick.textY, \") rotate(\").concat(tickRotation, \")\")\n };\n },\n leave: {\n opacity: 0\n },\n config: springConfig,\n immediate: !animate\n });\n return React.createElement(animated.g, {\n transform: animatedProps.transform,\n \"aria-hidden\": ariaHidden\n }, transitions.map(function (_ref2, tickIndex) {\n var tick = _ref2.item,\n transitionProps = _ref2.props,\n key = _ref2.key;\n return React.createElement(renderTick, _objectSpread2(_objectSpread2(_objectSpread2({\n tickIndex: tickIndex,\n format: formatValue,\n rotate: tickRotation,\n textBaseline: textBaseline,\n textAnchor: textAlign,\n animatedProps: transitionProps\n }, tick), onClick ? {\n onClick: onClick\n } : {}), {}, {\n key: key\n }));\n }), React.createElement(animated.line, {\n style: theme.axis.domain.line,\n x1: 0,\n x2: animatedProps.lineX2,\n y1: 0,\n y2: animatedProps.lineY2\n }), legendNode);\n};\nAxis.defaultProps = {\n x: 0,\n y: 0,\n tickSize: 5,\n tickPadding: 5,\n tickRotation: 0,\n renderTick: defaultTickRenderer,\n legendPosition: 'end',\n legendOffset: 0\n};\nvar Axis$1 = memo(Axis);\n\nvar positions = ['top', 'right', 'bottom', 'left'];\nvar Axes = function Axes(_ref) {\n var xScale = _ref.xScale,\n yScale = _ref.yScale,\n width = _ref.width,\n height = _ref.height,\n top = _ref.top,\n right = _ref.right,\n bottom = _ref.bottom,\n left = _ref.left;\n var axes = {\n top: top,\n right: right,\n bottom: bottom,\n left: left\n };\n return positions.map(function (position) {\n var axis = axes[position];\n if (!axis) return null;\n var isXAxis = position === 'top' || position === 'bottom';\n var ticksPosition = position === 'top' || position === 'left' ? 'before' : 'after';\n return React.createElement(Axis$1, Object.assign({\n key: position\n }, axis, {\n axis: isXAxis ? 'x' : 'y',\n x: position === 'right' ? width : 0,\n y: position === 'bottom' ? height : 0,\n scale: isXAxis ? xScale : yScale,\n length: isXAxis ? width : height,\n ticksPosition: ticksPosition\n }));\n });\n};\nvar Axes$1 = memo(Axes);\n\nvar GridLine = function GridLine(_ref) {\n var animatedProps = _ref.animatedProps;\n var theme = useTheme();\n return React.createElement(animated.line, Object.assign({}, animatedProps, theme.grid.line));\n};\nGridLine.defaultProps = {\n x1: 0,\n x2: 0,\n y1: 0,\n y2: 0\n};\nvar GridLine$1 = memo(GridLine);\n\nvar GridLines = function GridLines(_ref) {\n var lines = _ref.lines;\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.config;\n var transitions = useTransition(lines, function (line) {\n return line.key;\n }, {\n initial: function initial(line) {\n return {\n opacity: 1,\n x1: line.x1,\n x2: line.x2,\n y1: line.y1,\n y2: line.y2\n };\n },\n from: function from(line) {\n return {\n opacity: 0,\n x1: line.x1,\n x2: line.x2,\n y1: line.y1,\n y2: line.y2\n };\n },\n enter: function enter(line) {\n return {\n opacity: 1,\n x1: line.x1,\n x2: line.x2,\n y1: line.y1,\n y2: line.y2\n };\n },\n update: function update(line) {\n return {\n opacity: 1,\n x1: line.x1,\n x2: line.x2,\n y1: line.y1,\n y2: line.y2\n };\n },\n leave: {\n opacity: 0\n },\n config: springConfig,\n immediate: !animate\n });\n return React.createElement(\"g\", null, transitions.map(function (_ref2) {\n var line = _ref2.item,\n animatedProps = _ref2.props,\n key = _ref2.key;\n return React.createElement(GridLine$1, Object.assign({}, line, {\n key: key,\n animatedProps: animatedProps\n }));\n }));\n};\nvar GridLines$1 = memo(GridLines);\n\nvar Grid = function Grid(_ref) {\n var width = _ref.width,\n height = _ref.height,\n xScale = _ref.xScale,\n yScale = _ref.yScale,\n xValues = _ref.xValues,\n yValues = _ref.yValues;\n var xLines = useMemo(function () {\n if (!xScale) return false;\n return computeGridLines({\n width: width,\n height: height,\n scale: xScale,\n axis: 'x',\n values: xValues\n });\n }, [xScale, xValues]);\n var yLines = yScale ? computeGridLines({\n width: width,\n height: height,\n scale: yScale,\n axis: 'y',\n values: yValues\n }) : false;\n return React.createElement(React.Fragment, null, xLines && React.createElement(GridLines$1, {\n type: \"x\",\n lines: xLines\n }), yLines && React.createElement(GridLines$1, {\n type: \"y\",\n lines: yLines\n }));\n};\nvar Grid$1 = memo(Grid);\n\nvar degreesToRadians = function degreesToRadians(degrees) {\n return degrees * Math.PI / 180;\n};\n\nvar renderAxisToCanvas = function renderAxisToCanvas(ctx, _ref) {\n var axis = _ref.axis,\n scale = _ref.scale,\n _ref$x = _ref.x,\n x = _ref$x === void 0 ? 0 : _ref$x,\n _ref$y = _ref.y,\n y = _ref$y === void 0 ? 0 : _ref$y,\n length = _ref.length,\n ticksPosition = _ref.ticksPosition,\n tickValues = _ref.tickValues,\n _ref$tickSize = _ref.tickSize,\n tickSize = _ref$tickSize === void 0 ? 5 : _ref$tickSize,\n _ref$tickPadding = _ref.tickPadding,\n tickPadding = _ref$tickPadding === void 0 ? 5 : _ref$tickPadding,\n _ref$tickRotation = _ref.tickRotation,\n tickRotation = _ref$tickRotation === void 0 ? 0 : _ref$tickRotation,\n format = _ref.format,\n legend = _ref.legend,\n _ref$legendPosition = _ref.legendPosition,\n legendPosition = _ref$legendPosition === void 0 ? 'end' : _ref$legendPosition,\n _ref$legendOffset = _ref.legendOffset,\n legendOffset = _ref$legendOffset === void 0 ? 0 : _ref$legendOffset,\n theme = _ref.theme;\n var _computeCartesianTick = computeCartesianTicks({\n axis: axis,\n scale: scale,\n ticksPosition: ticksPosition,\n tickValues: tickValues,\n tickSize: tickSize,\n tickPadding: tickPadding,\n tickRotation: tickRotation,\n engine: 'canvas'\n }),\n ticks = _computeCartesianTick.ticks,\n textAlign = _computeCartesianTick.textAlign,\n textBaseline = _computeCartesianTick.textBaseline;\n ctx.save();\n ctx.translate(x, y);\n ctx.textAlign = textAlign;\n ctx.textBaseline = textBaseline;\n ctx.font = \"\".concat(theme.axis.ticks.text.fontSize, \"px \").concat(theme.axis.ticks.text.fontFamily);\n if (theme.axis.domain.line.strokeWidth > 0) {\n ctx.lineWidth = theme.axis.domain.line.strokeWidth;\n ctx.lineCap = 'square';\n ctx.strokeStyle = theme.axis.domain.line.stroke;\n ctx.beginPath();\n ctx.moveTo(0, 0);\n ctx.lineTo(axis === 'x' ? length : 0, axis === 'x' ? 0 : length);\n ctx.stroke();\n }\n ticks.forEach(function (tick) {\n if (theme.axis.ticks.line.strokeWidth > 0) {\n ctx.lineWidth = theme.axis.ticks.line.strokeWidth;\n ctx.lineCap = 'square';\n ctx.strokeStyle = theme.axis.ticks.line.stroke;\n ctx.beginPath();\n ctx.moveTo(tick.x, tick.y);\n ctx.lineTo(tick.x + tick.lineX, tick.y + tick.lineY);\n ctx.stroke();\n }\n var value = format !== undefined ? format(tick.value) : tick.value;\n ctx.save();\n ctx.translate(tick.x + tick.textX, tick.y + tick.textY);\n ctx.rotate(degreesToRadians(tickRotation));\n ctx.fillStyle = theme.axis.ticks.text.fill;\n ctx.fillText(value, 0, 0);\n ctx.restore();\n });\n if (legend !== undefined) {\n var legendX = 0;\n var legendY = 0;\n var legendRotation = 0;\n var _textAlign;\n if (axis === 'y') {\n legendRotation = -90;\n legendX = legendOffset;\n if (legendPosition === 'start') {\n _textAlign = 'start';\n legendY = length;\n } else if (legendPosition === 'middle') {\n _textAlign = 'center';\n legendY = length / 2;\n } else if (legendPosition === 'end') {\n _textAlign = 'end';\n }\n } else {\n legendY = legendOffset;\n if (legendPosition === 'start') {\n _textAlign = 'start';\n } else if (legendPosition === 'middle') {\n _textAlign = 'center';\n legendX = length / 2;\n } else if (legendPosition === 'end') {\n _textAlign = 'end';\n legendX = length;\n }\n }\n ctx.translate(legendX, legendY);\n ctx.rotate(degreesToRadians(legendRotation));\n ctx.font = \"\".concat(theme.axis.legend.text.fontWeight ? \"\".concat(theme.axis.legend.text.fontWeight, \" \") : '').concat(theme.axis.legend.text.fontSize, \"px \").concat(theme.axis.legend.text.fontFamily);\n ctx.fillStyle = theme.axis.legend.text.fill;\n ctx.textAlign = _textAlign;\n ctx.textBaseline = 'middle';\n ctx.fillText(legend, 0, 0);\n }\n ctx.restore();\n};\nvar positions$1 = ['top', 'right', 'bottom', 'left'];\nvar renderAxesToCanvas = function renderAxesToCanvas(ctx, _ref2) {\n var xScale = _ref2.xScale,\n yScale = _ref2.yScale,\n width = _ref2.width,\n height = _ref2.height,\n top = _ref2.top,\n right = _ref2.right,\n bottom = _ref2.bottom,\n left = _ref2.left,\n theme = _ref2.theme;\n var axes = {\n top: top,\n right: right,\n bottom: bottom,\n left: left\n };\n positions$1.forEach(function (position) {\n var axis = axes[position];\n if (!axis) return null;\n var isXAxis = position === 'top' || position === 'bottom';\n var ticksPosition = position === 'top' || position === 'left' ? 'before' : 'after';\n var scale = isXAxis ? xScale : yScale;\n var format = getFormatter(axis.format, scale);\n renderAxisToCanvas(ctx, _objectSpread2(_objectSpread2({}, axis), {}, {\n axis: isXAxis ? 'x' : 'y',\n x: position === 'right' ? width : 0,\n y: position === 'bottom' ? height : 0,\n scale: scale,\n format: format,\n length: isXAxis ? width : height,\n ticksPosition: ticksPosition,\n theme: theme\n }));\n });\n};\nvar renderGridLinesToCanvas = function renderGridLinesToCanvas(ctx, _ref3) {\n var width = _ref3.width,\n height = _ref3.height,\n scale = _ref3.scale,\n axis = _ref3.axis,\n values = _ref3.values;\n var lines = computeGridLines({\n width: width,\n height: height,\n scale: scale,\n axis: axis,\n values: values\n });\n lines.forEach(function (line) {\n ctx.beginPath();\n ctx.moveTo(line.x1, line.y1);\n ctx.lineTo(line.x2, line.y2);\n ctx.stroke();\n });\n};\n\nexport { Axes$1 as Axes, Axis$1 as Axis, Grid$1 as Grid, axisPropType, axisPropTypes, renderAxesToCanvas, renderAxisToCanvas, renderGridLinesToCanvas };\n//# sourceMappingURL=nivo-axes.es.js.map\n","import PropTypes from 'prop-types';\nimport { scaleLinear, scaleLog, scaleSymlog, scalePoint, scaleUtc, scaleTime } from 'd3-scale';\nimport { utcParse, timeParse } from 'd3-time-format';\nimport uniq from 'lodash/uniq';\nimport uniqBy from 'lodash/uniqBy';\nimport sortBy from 'lodash/sortBy';\nimport last from 'lodash/last';\nimport isDate from 'lodash/isDate';\n\nvar linearScale = function linearScale(_ref, xy, width, height) {\n var axis = _ref.axis,\n _ref$min = _ref.min,\n min = _ref$min === void 0 ? 0 : _ref$min,\n _ref$max = _ref.max,\n max = _ref$max === void 0 ? 'auto' : _ref$max,\n _ref$stacked = _ref.stacked,\n stacked = _ref$stacked === void 0 ? false : _ref$stacked,\n _ref$reverse = _ref.reverse,\n reverse = _ref$reverse === void 0 ? false : _ref$reverse;\n var values = xy[axis];\n var size = axis === 'x' ? width : height;\n var minValue = min;\n if (min === 'auto') {\n minValue = stacked === true ? values.minStacked : values.min;\n }\n var maxValue = max;\n if (max === 'auto') {\n maxValue = stacked === true ? values.maxStacked : values.max;\n }\n var scale = scaleLinear().rangeRound(axis === 'x' ? [0, size] : [size, 0]);\n if (reverse === true) scale.domain([maxValue, minValue]);else scale.domain([minValue, maxValue]);\n scale.type = 'linear';\n scale.stacked = stacked;\n return scale;\n};\nvar linearScalePropTypes = {\n type: PropTypes.oneOf(['linear']).isRequired,\n min: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),\n max: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),\n stacked: PropTypes.bool,\n reverse: PropTypes.bool\n};\n\nvar logScale = function logScale(_ref, xy, width, height) {\n var axis = _ref.axis,\n _ref$base = _ref.base,\n base = _ref$base === void 0 ? 10 : _ref$base,\n _ref$min = _ref.min,\n min = _ref$min === void 0 ? 'auto' : _ref$min,\n _ref$max = _ref.max,\n max = _ref$max === void 0 ? 'auto' : _ref$max;\n var values = xy[axis];\n var size = axis === 'x' ? width : height;\n var hasZero = values.all.some(function (v) {\n return v === 0;\n });\n var sign;\n var hasMixedSign = false;\n values.all.forEach(function (v) {\n if (hasMixedSign === true) return;\n if (sign === undefined) {\n sign = Math.sign(v);\n } else if (Math.sign(v) !== sign) {\n hasMixedSign = true;\n }\n });\n if (hasZero || hasMixedSign) {\n throw new Error([\"a log scale domain must be strictly-positive or strictly-negative,\", \"and must not include or cross zero.\"].join('\\n'));\n }\n var minValue = min;\n if (min === 'auto') {\n minValue = values.min;\n }\n var maxValue = max;\n if (max === 'auto') {\n maxValue = values.max;\n }\n var scale = scaleLog().domain([minValue, maxValue]).rangeRound(axis === 'x' ? [0, size] : [size, 0]).base(base).nice();\n scale.type = 'log';\n return scale;\n};\nvar logScalePropTypes = {\n type: PropTypes.oneOf(['log']).isRequired,\n base: PropTypes.number,\n min: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),\n max: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])\n};\n\nvar symlogScale = function symlogScale(_ref, xy, width, height) {\n var axis = _ref.axis,\n _ref$constant = _ref.constant,\n constant = _ref$constant === void 0 ? 1 : _ref$constant,\n _ref$min = _ref.min,\n min = _ref$min === void 0 ? 'auto' : _ref$min,\n _ref$max = _ref.max,\n max = _ref$max === void 0 ? 'auto' : _ref$max;\n var values = xy[axis];\n var size = axis === 'x' ? width : height;\n var minValue = min;\n if (min === 'auto') {\n minValue = values.min;\n }\n var maxValue = max;\n if (max === 'auto') {\n maxValue = values.max;\n }\n var scale = scaleSymlog().domain([minValue, maxValue]).constant(constant).rangeRound(axis === 'x' ? [0, size] : [size, 0]).nice();\n scale.type = 'symlog';\n return scale;\n};\nvar symLogScalePropTypes = {\n type: PropTypes.oneOf(['symlog']).isRequired,\n constant: PropTypes.number,\n min: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),\n max: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])\n};\n\nvar pointScale = function pointScale(_ref, xy, width, height) {\n var axis = _ref.axis;\n var values = xy[axis];\n var size = axis === 'x' ? width : height;\n var scale = scalePoint().range([0, size]).domain(values.all);\n scale.type = 'point';\n return scale;\n};\nvar pointScalePropTypes = {\n type: PropTypes.oneOf(['point']).isRequired\n};\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nvar _precisionCutOffsByTy;\nvar TIME_PRECISION_MILLISECOND = 'millisecond';\nvar TIME_PRECISION_SECOND = 'second';\nvar TIME_PRECISION_MINUTE = 'minute';\nvar TIME_PRECISION_HOUR = 'hour';\nvar TIME_PRECISION_DAY = 'day';\nvar TIME_PRECISION_MONTH = 'month';\nvar TIME_PRECISION_YEAR = 'year';\nvar timePrecisions = [TIME_PRECISION_MILLISECOND, TIME_PRECISION_SECOND, TIME_PRECISION_MINUTE, TIME_PRECISION_HOUR, TIME_PRECISION_DAY, TIME_PRECISION_MONTH, TIME_PRECISION_YEAR];\nvar precisionCutOffs = [function (date) {\n return date.setMilliseconds(0);\n}, function (date) {\n return date.setSeconds(0);\n}, function (date) {\n return date.setMinutes(0);\n}, function (date) {\n return date.setHours(0);\n}, function (date) {\n return date.setDate(1);\n}, function (date) {\n return date.setMonth(0);\n}];\nvar precisionCutOffsByType = (_precisionCutOffsByTy = {}, _defineProperty(_precisionCutOffsByTy, TIME_PRECISION_MILLISECOND, []), _defineProperty(_precisionCutOffsByTy, TIME_PRECISION_SECOND, precisionCutOffs.slice(0, 1)), _defineProperty(_precisionCutOffsByTy, TIME_PRECISION_MINUTE, precisionCutOffs.slice(0, 2)), _defineProperty(_precisionCutOffsByTy, TIME_PRECISION_HOUR, precisionCutOffs.slice(0, 3)), _defineProperty(_precisionCutOffsByTy, TIME_PRECISION_DAY, precisionCutOffs.slice(0, 4)), _defineProperty(_precisionCutOffsByTy, TIME_PRECISION_MONTH, precisionCutOffs.slice(0, 5)), _defineProperty(_precisionCutOffsByTy, TIME_PRECISION_YEAR, precisionCutOffs.slice(0, 6)), _precisionCutOffsByTy);\nvar createPrecisionMethod = function createPrecisionMethod(precision) {\n return function (date) {\n precisionCutOffsByType[precision].forEach(function (cutOff) {\n cutOff(date);\n });\n return date;\n };\n};\nvar createDateNormalizer = function createDateNormalizer(_ref) {\n var _ref$format = _ref.format,\n format = _ref$format === void 0 ? 'native' : _ref$format,\n _ref$precision = _ref.precision,\n precision = _ref$precision === void 0 ? 'millisecond' : _ref$precision,\n _ref$useUTC = _ref.useUTC,\n useUTC = _ref$useUTC === void 0 ? true : _ref$useUTC;\n var precisionFn = createPrecisionMethod(precision);\n if (format === 'native') return function (v) {\n return precisionFn(v);\n };\n var parseTime = useUTC ? utcParse(format) : timeParse(format);\n return function (v) {\n return precisionFn(parseTime(v));\n };\n};\n\nvar timeScale = function timeScale(_ref, xy, width, height) {\n var axis = _ref.axis,\n _ref$format = _ref.format,\n format = _ref$format === void 0 ? 'native' : _ref$format,\n _ref$precision = _ref.precision,\n precision = _ref$precision === void 0 ? TIME_PRECISION_MILLISECOND : _ref$precision,\n _ref$min = _ref.min,\n min = _ref$min === void 0 ? 'auto' : _ref$min,\n _ref$max = _ref.max,\n max = _ref$max === void 0 ? 'auto' : _ref$max,\n _ref$useUTC = _ref.useUTC,\n useUTC = _ref$useUTC === void 0 ? true : _ref$useUTC;\n var values = xy[axis];\n var size = axis === 'x' ? width : height;\n var normalize = createDateNormalizer({\n format: format,\n precision: precision,\n useUTC: useUTC\n });\n var minValue = min;\n if (min === 'auto') {\n minValue = values.min;\n } else if (format !== 'native') {\n minValue = normalize(min);\n }\n var maxValue = max;\n if (max === 'auto') {\n maxValue = values.max;\n } else if (format !== 'native') {\n maxValue = normalize(max);\n }\n var scale = useUTC ? scaleUtc() : scaleTime();\n scale.domain([minValue, maxValue]).range([0, size]);\n scale.type = 'time';\n scale.useUTC = useUTC;\n return scale;\n};\nvar timeScalePropTypes = {\n type: PropTypes.oneOf(['time']).isRequired,\n format: PropTypes.string,\n precision: PropTypes.oneOf(timePrecisions)\n};\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n}\n\nvar getOtherAxis = function getOtherAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n};\nvar compareValues = function compareValues(a, b) {\n return a === b;\n};\nvar compareDateValues = function compareDateValues(a, b) {\n return a.getTime() === b.getTime();\n};\nvar computeXYScalesForSeries = function computeXYScalesForSeries(_series, xScaleSpec, yScaleSpec, width, height) {\n var series = _series.map(function (serie) {\n return _objectSpread2(_objectSpread2({}, serie), {}, {\n data: serie.data.map(function (d) {\n return {\n data: _objectSpread2({}, d)\n };\n })\n });\n });\n var xy = generateSeriesXY(series, xScaleSpec, yScaleSpec);\n if (xScaleSpec.stacked === true) {\n stackX(yScaleSpec.type, xy, series);\n }\n if (yScaleSpec.stacked === true) {\n stackY(xScaleSpec.type, xy, series);\n }\n var xScale = computeScale(_objectSpread2(_objectSpread2({}, xScaleSpec), {}, {\n axis: 'x'\n }), xy, width, height);\n var yScale = computeScale(_objectSpread2(_objectSpread2({}, yScaleSpec), {}, {\n axis: 'y'\n }), xy, width, height);\n series.forEach(function (serie) {\n serie.data.forEach(function (d) {\n d.position = {\n x: xScale.stacked === true ? d.data.xStacked === null ? null : xScale(d.data.xStacked) : d.data.x === null ? null : xScale(d.data.x),\n y: yScale.stacked === true ? d.data.yStacked === null ? null : yScale(d.data.yStacked) : d.data.y === null ? null : yScale(d.data.y)\n };\n });\n });\n return _objectSpread2(_objectSpread2({}, xy), {}, {\n series: series,\n xScale: xScale,\n yScale: yScale\n });\n};\nvar computeScale = function computeScale(spec, xy, width, height) {\n if (spec.type === 'linear') return linearScale(spec, xy, width, height);else if (spec.type === 'point') return pointScale(spec, xy, width, height);else if (spec.type === 'time') return timeScale(spec, xy, width, height);else if (spec.type === 'log') return logScale(spec, xy, width, height);else if (spec.type === 'symlog') return symlogScale(spec, xy, width, height);\n};\nvar generateSeriesXY = function generateSeriesXY(series, xScaleSpec, yScaleSpec) {\n return {\n x: generateSeriesAxis(series, 'x', xScaleSpec),\n y: generateSeriesAxis(series, 'y', yScaleSpec)\n };\n};\nvar generateSeriesAxis = function generateSeriesAxis(series, axis, scaleSpec) {\n var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref$getValue = _ref.getValue,\n getValue = _ref$getValue === void 0 ? function (d) {\n return d.data[axis];\n } : _ref$getValue,\n _ref$setValue = _ref.setValue,\n setValue = _ref$setValue === void 0 ? function (d, v) {\n d.data[axis] = v;\n } : _ref$setValue;\n if (scaleSpec.type === 'linear') {\n series.forEach(function (serie) {\n serie.data.forEach(function (d) {\n setValue(d, getValue(d) === null ? null : parseFloat(getValue(d)));\n });\n });\n } else if (scaleSpec.type === 'time' && scaleSpec.format !== 'native') {\n var parseTime = createDateNormalizer(scaleSpec);\n series.forEach(function (serie) {\n serie.data.forEach(function (d) {\n setValue(d, getValue(d) === null ? null : parseTime(getValue(d)));\n });\n });\n }\n var all = [];\n series.forEach(function (serie) {\n serie.data.forEach(function (d) {\n all.push(getValue(d));\n });\n });\n var min, max;\n if (scaleSpec.type === 'linear') {\n all = uniq(all);\n all = sortBy(all, function (v) {\n return v;\n });\n min = Math.min.apply(Math, _toConsumableArray(all));\n max = Math.max.apply(Math, _toConsumableArray(all));\n } else if (scaleSpec.type === 'time') {\n all = uniqBy(all, function (v) {\n return v.getTime();\n });\n all = all.slice(0).sort(function (a, b) {\n return b - a;\n }).reverse();\n min = all[0];\n max = last(all);\n } else {\n all = uniq(all);\n min = all[0];\n max = last(all);\n }\n return {\n all: all,\n min: min,\n max: max\n };\n};\nvar stackAxis = function stackAxis(axis, otherType, xy, series) {\n var otherAxis = getOtherAxis(axis);\n var all = [];\n xy[otherAxis].all.forEach(function (v) {\n var compare = isDate(v) ? compareDateValues : compareValues;\n var stack = [];\n series.forEach(function (serie) {\n var datum = serie.data.find(function (d) {\n return compare(d.data[otherAxis], v);\n });\n var value = null;\n var stackValue = null;\n if (datum !== undefined) {\n value = datum.data[axis];\n if (value !== null) {\n var head = last(stack);\n if (head === undefined) {\n stackValue = value;\n } else if (head !== null) {\n stackValue = head + value;\n }\n }\n datum.data[\"\".concat(axis, \"Stacked\")] = stackValue;\n }\n stack.push(stackValue);\n all.push(stackValue);\n });\n });\n all = all.filter(function (v) {\n return v !== null;\n });\n xy[axis].minStacked = Math.min.apply(Math, _toConsumableArray(all));\n xy[axis].maxStacked = Math.max.apply(Math, _toConsumableArray(all));\n};\nvar stackX = function stackX(xy, otherType, series) {\n return stackAxis('x', xy, otherType, series);\n};\nvar stackY = function stackY(xy, otherType, series) {\n return stackAxis('y', xy, otherType, series);\n};\nvar computeAxisSlices = function computeAxisSlices(axis, data) {\n var otherAxis = getOtherAxis(axis);\n return data[otherAxis].all.map(function (v) {\n var _slice;\n var slice = (_slice = {\n id: v\n }, _defineProperty(_slice, otherAxis, data[\"\".concat(otherAxis, \"Scale\")](v)), _defineProperty(_slice, \"data\", []), _slice);\n var compare = isDate(v) ? compareDateValues : compareValues;\n data.series.forEach(function (serie) {\n var datum = serie.data.find(function (d) {\n return compare(d.data[otherAxis], v);\n });\n if (datum !== undefined) {\n slice.data.push(_objectSpread2(_objectSpread2({}, datum), {}, {\n serie: serie\n }));\n }\n });\n slice.data.reverse();\n return slice;\n });\n};\nvar computeXSlices = function computeXSlices(data) {\n return computeAxisSlices('x', data);\n};\nvar computeYSlices = function computeYSlices(data) {\n return computeAxisSlices('y', data);\n};\n\nvar scalePropType = PropTypes.oneOfType([PropTypes.shape(linearScalePropTypes), PropTypes.shape(pointScalePropTypes), PropTypes.shape(timeScalePropTypes), PropTypes.shape(logScalePropTypes), PropTypes.shape(symLogScalePropTypes)]);\n\nexport { TIME_PRECISION_DAY, TIME_PRECISION_HOUR, TIME_PRECISION_MILLISECOND, TIME_PRECISION_MINUTE, TIME_PRECISION_MONTH, TIME_PRECISION_SECOND, TIME_PRECISION_YEAR, compareDateValues, compareValues, computeAxisSlices, computeScale, computeXSlices, computeXYScalesForSeries, computeYSlices, createDateNormalizer, createPrecisionMethod, generateSeriesAxis, generateSeriesXY, getOtherAxis, linearScale, linearScalePropTypes, logScale, logScalePropTypes, pointScale, pointScalePropTypes, precisionCutOffs, precisionCutOffsByType, scalePropType, stackAxis, stackX, stackY, timePrecisions, timeScale, timeScalePropTypes };\n//# sourceMappingURL=nivo-scales.es.js.map\n","import React, { Fragment, useMemo, useRef, useState, useCallback } from 'react';\nimport { withTheme, withDimensions, Container, SvgWrapper, ResponsiveWrapper, getRelativeCursor } from '@nivo/core';\nimport { scaleLinear } from 'd3-scale';\nimport { Delaunay } from 'd3-delaunay';\nimport compose from 'recompose/compose';\nimport defaultProps from 'recompose/defaultProps';\nimport withPropsOnChange from 'recompose/withPropsOnChange';\nimport pure from 'recompose/pure';\nimport PropTypes from 'prop-types';\n\nvar VoronoiPropTypes = {\n data: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired\n })).isRequired,\n xDomain: PropTypes.arrayOf(PropTypes.number).isRequired,\n yDomain: PropTypes.arrayOf(PropTypes.number).isRequired,\n layers: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['links', 'cells', 'points', 'bounds']), PropTypes.func])).isRequired,\n enableLinks: PropTypes.bool.isRequired,\n linkLineWidth: PropTypes.number.isRequired,\n linkLineColor: PropTypes.string.isRequired,\n enableCells: PropTypes.bool.isRequired,\n cellLineWidth: PropTypes.number.isRequired,\n cellLineColor: PropTypes.string.isRequired,\n enablePoints: PropTypes.bool.isRequired,\n pointSize: PropTypes.number.isRequired,\n pointColor: PropTypes.string.isRequired,\n delaunay: PropTypes.object.isRequired,\n voronoi: PropTypes.object.isRequired\n};\nvar VoronoiDefaultProps = {\n xDomain: [0, 1],\n yDomain: [0, 1],\n layers: ['links', 'cells', 'points', 'bounds'],\n enableLinks: false,\n linkLineWidth: 1,\n linkLineColor: '#bbb',\n enableCells: true,\n cellLineWidth: 2,\n cellLineColor: '#000',\n enablePoints: true,\n pointSize: 4,\n pointColor: '#666'\n};\n\nvar enhance = (function (Component) {\n return compose(defaultProps(VoronoiDefaultProps), withTheme(), withDimensions(), withPropsOnChange(['xDomain', 'yDomain', 'width', 'height'], function (_ref) {\n var xDomain = _ref.xDomain,\n yDomain = _ref.yDomain,\n width = _ref.width,\n height = _ref.height;\n return {\n xScale: scaleLinear().domain(xDomain).range([0, width]),\n yScale: scaleLinear().domain(yDomain).range([0, height])\n };\n }), withPropsOnChange(['data', 'xScale', 'yScale'], function (_ref2) {\n var data = _ref2.data,\n xScale = _ref2.xScale,\n yScale = _ref2.yScale;\n return {\n scaledPoints: data.map(function (d) {\n return {\n data: d,\n x: xScale(d.x),\n y: yScale(d.y)\n };\n })\n };\n }), withPropsOnChange(['scaledPoints', 'width', 'height'], function (_ref3) {\n var scaledPoints = _ref3.scaledPoints,\n width = _ref3.width,\n height = _ref3.height;\n var delaunay = Delaunay.from(scaledPoints.map(function (p) {\n return [p.x, p.y];\n }));\n var voronoi = delaunay.voronoi([0, 0, width, height]);\n return {\n delaunay: delaunay,\n voronoi: voronoi\n };\n }), pure)(Component);\n});\n\nvar Voronoi = function Voronoi(_ref) {\n var delaunay = _ref.delaunay,\n voronoi = _ref.voronoi,\n data = _ref.data,\n layers = _ref.layers,\n margin = _ref.margin,\n width = _ref.width,\n height = _ref.height,\n outerWidth = _ref.outerWidth,\n outerHeight = _ref.outerHeight,\n enableLinks = _ref.enableLinks,\n linkLineWidth = _ref.linkLineWidth,\n linkLineColor = _ref.linkLineColor,\n enableCells = _ref.enableCells,\n cellLineWidth = _ref.cellLineWidth,\n cellLineColor = _ref.cellLineColor,\n enablePoints = _ref.enablePoints,\n pointSize = _ref.pointSize,\n pointColor = _ref.pointColor,\n theme = _ref.theme;\n var context = {\n width: width,\n height: height,\n data: data,\n delaunay: delaunay,\n voronoi: voronoi\n };\n var layerById = {\n bounds: React.createElement(\"path\", {\n key: \"bounds\",\n fill: \"none\",\n stroke: cellLineColor,\n strokeWidth: cellLineWidth,\n d: voronoi.renderBounds()\n })\n };\n if (enableLinks === true) {\n layerById.links = React.createElement(\"path\", {\n key: \"links\",\n stroke: linkLineColor,\n strokeWidth: linkLineWidth,\n fill: \"none\",\n d: delaunay.render()\n });\n }\n if (enableCells === true) {\n layerById.cells = React.createElement(\"path\", {\n key: \"cells\",\n d: voronoi.render(),\n fill: \"none\",\n stroke: cellLineColor,\n strokeWidth: cellLineWidth\n });\n }\n if (enablePoints === true) {\n layerById.points = React.createElement(\"path\", {\n key: \"points\",\n stroke: \"none\",\n fill: pointColor,\n d: delaunay.renderPoints(undefined, pointSize / 2)\n });\n }\n return React.createElement(Container, {\n isInteractive: false,\n theme: theme,\n animate: false\n }, function () {\n return (\n React.createElement(SvgWrapper, {\n width: outerWidth,\n height: outerHeight,\n margin: margin,\n theme: theme\n }, layers.map(function (layer, i) {\n if (typeof layer === 'function') {\n return React.createElement(Fragment, {\n key: i\n }, layer(context));\n }\n return layerById[layer];\n }))\n );\n });\n};\nvar Voronoi$1 = enhance(Voronoi);\n\nvar ResponsiveVoronoi = function ResponsiveVoronoi(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(Voronoi$1, Object.assign({\n width: width,\n height: height\n }, props));\n });\n};\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nvar getAccessor = function getAccessor(directive) {\n return typeof directive === 'function' ? directive : function (d) {\n return d[directive];\n };\n};\nvar computeMeshPoints = function computeMeshPoints(_ref) {\n var points = _ref.points,\n _ref$x = _ref.x,\n x = _ref$x === void 0 ? 'x' : _ref$x,\n _ref$y = _ref.y,\n y = _ref$y === void 0 ? 'y' : _ref$y;\n var getX = getAccessor(x);\n var getY = getAccessor(y);\n return points.map(function (p) {\n return [getX(p), getY(p)];\n });\n};\nvar computeMesh = function computeMesh(_ref2) {\n var points = _ref2.points,\n width = _ref2.width,\n height = _ref2.height,\n debug = _ref2.debug;\n var delaunay = Delaunay.from(points);\n var voronoi = debug === true ? delaunay.voronoi([0, 0, width, height]) : undefined;\n return {\n delaunay: delaunay,\n voronoi: voronoi\n };\n};\n\nvar useVoronoiMesh = function useVoronoiMesh(_ref) {\n var points = _ref.points,\n x = _ref.x,\n y = _ref.y,\n width = _ref.width,\n height = _ref.height,\n debug = _ref.debug;\n var points2d = useMemo(function () {\n return computeMeshPoints({\n points: points,\n x: x,\n y: y\n });\n }, [points, x, y]);\n return useMemo(function () {\n return computeMesh({\n points: points2d,\n width: width,\n height: height,\n debug: debug\n });\n }, [points2d, width, height, debug]);\n};\n\nvar Mesh = function Mesh(_ref) {\n var nodes = _ref.nodes,\n width = _ref.width,\n height = _ref.height,\n x = _ref.x,\n y = _ref.y,\n debug = _ref.debug,\n onMouseEnter = _ref.onMouseEnter,\n onMouseMove = _ref.onMouseMove,\n onMouseLeave = _ref.onMouseLeave,\n onClick = _ref.onClick;\n var elementRef = useRef(null);\n var _useState = useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n currentIndex = _useState2[0],\n setCurrentIndex = _useState2[1];\n var _useVoronoiMesh = useVoronoiMesh({\n points: nodes,\n x: x,\n y: y,\n width: width,\n height: height,\n debug: debug\n }),\n delaunay = _useVoronoiMesh.delaunay,\n voronoi = _useVoronoiMesh.voronoi;\n var voronoiPath = useMemo(function () {\n return debug ? voronoi.render() : undefined;\n });\n var getIndexAndNodeFromEvent = useCallback(function (event) {\n var _getRelativeCursor = getRelativeCursor(elementRef.current, event),\n _getRelativeCursor2 = _slicedToArray(_getRelativeCursor, 2),\n x = _getRelativeCursor2[0],\n y = _getRelativeCursor2[1];\n var index = delaunay.find(x, y);\n return [index, index !== undefined ? nodes[index] : null];\n }, [delaunay]);\n var handleMouseEnter = useCallback(function (event) {\n var _getIndexAndNodeFromE = getIndexAndNodeFromEvent(event),\n _getIndexAndNodeFromE2 = _slicedToArray(_getIndexAndNodeFromE, 2),\n index = _getIndexAndNodeFromE2[0],\n node = _getIndexAndNodeFromE2[1];\n if (currentIndex !== index) setCurrentIndex(index);\n node && onMouseEnter && onMouseEnter(node, event);\n }, [getIndexAndNodeFromEvent, setCurrentIndex]);\n var handleMouseMove = useCallback(function (event) {\n var _getIndexAndNodeFromE3 = getIndexAndNodeFromEvent(event),\n _getIndexAndNodeFromE4 = _slicedToArray(_getIndexAndNodeFromE3, 2),\n index = _getIndexAndNodeFromE4[0],\n node = _getIndexAndNodeFromE4[1];\n if (currentIndex !== index) setCurrentIndex(index);\n node && onMouseMove && onMouseMove(node, event);\n }, [getIndexAndNodeFromEvent, setCurrentIndex]);\n var handleMouseLeave = useCallback(function (event) {\n setCurrentIndex(null);\n if (onMouseLeave) {\n var previousNode;\n if (currentIndex !== undefined && currentIndex !== null) {\n previousNode = nodes[currentIndex];\n }\n previousNode && onMouseLeave(previousNode, event);\n }\n }, [setCurrentIndex, currentIndex, nodes]);\n var handleClick = useCallback(function (event) {\n var _getIndexAndNodeFromE5 = getIndexAndNodeFromEvent(event),\n _getIndexAndNodeFromE6 = _slicedToArray(_getIndexAndNodeFromE5, 2),\n index = _getIndexAndNodeFromE6[0],\n node = _getIndexAndNodeFromE6[1];\n if (currentIndex !== index) setCurrentIndex(index);\n onClick && onClick(node, event);\n }, [getIndexAndNodeFromEvent, setCurrentIndex]);\n return React.createElement(\"g\", {\n ref: elementRef\n }, debug && React.createElement(\"path\", {\n d: voronoiPath,\n stroke: \"red\",\n strokeWidth: 1,\n opacity: 0.75\n }), currentIndex !== null && debug && React.createElement(\"path\", {\n fill: \"red\",\n opacity: 0.35,\n d: voronoi.renderCell(currentIndex)\n }), React.createElement(\"rect\", {\n width: width,\n height: height,\n fill: \"red\",\n opacity: 0,\n style: {\n cursor: 'auto'\n },\n onMouseEnter: handleMouseEnter,\n onMouseMove: handleMouseMove,\n onMouseLeave: handleMouseLeave,\n onClick: handleClick\n }));\n};\nMesh.defaultProps = {\n x: 'x',\n y: 'y',\n debug: false\n};\n\nvar renderVoronoiToCanvas = function renderVoronoiToCanvas(ctx, voronoi) {\n ctx.save();\n ctx.globalAlpha = 0.75;\n ctx.beginPath();\n voronoi.render(ctx);\n ctx.strokeStyle = 'red';\n ctx.lineWidth = 1;\n ctx.stroke();\n ctx.restore();\n};\nvar renderVoronoiCellToCanvas = function renderVoronoiCellToCanvas(ctx, voronoi, index) {\n ctx.save();\n ctx.globalAlpha = 0.35;\n ctx.beginPath();\n voronoi.renderCell(index, ctx);\n ctx.fillStyle = 'red';\n ctx.fill();\n ctx.restore();\n};\n\nexport { Mesh, ResponsiveVoronoi, Voronoi$1 as Voronoi, VoronoiDefaultProps, VoronoiPropTypes, computeMesh, computeMeshPoints, renderVoronoiCellToCanvas, renderVoronoiToCanvas, useVoronoiMesh };\n//# sourceMappingURL=nivo-voronoi.es.js.map\n","import React, { memo, useMemo, useCallback, useState, Fragment, useRef, useEffect } from 'react';\nimport { lineCurvePropType, blendModePropType, motionPropTypes, defsPropTypes, curveFromProp, useValueFormatter, useTheme, useMotionConfig, useAnimatedPath, getLabelGenerator, DotsItem, withContainer, useDimensions, CartesianMarkers, bindDefs, SvgWrapper, ResponsiveWrapper, getRelativeCursor, isCursorInRect } from '@nivo/core';\nimport { ordinalColorsPropType, useOrdinalColorScale, useInheritedColor } from '@nivo/colors';\nimport { axisPropType, Grid, Axes, renderGridLinesToCanvas, renderAxesToCanvas } from '@nivo/axes';\nimport { LegendPropShape, BoxLegendSvg, renderLegendToCanvas } from '@nivo/legends';\nimport { BasicTooltip, TableTooltip, crosshairPropTypes, useTooltip, Crosshair } from '@nivo/tooltip';\nimport { line, area } from 'd3-shape';\nimport { scalePropType, computeXYScalesForSeries } from '@nivo/scales';\nimport PropTypes from 'prop-types';\nimport { useSpring, animated } from 'react-spring';\nimport { Mesh as Mesh$2, useVoronoiMesh, renderVoronoiToCanvas, renderVoronoiCellToCanvas } from '@nivo/voronoi';\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nvar LinePointTooltip = function LinePointTooltip(_ref) {\n var point = _ref.point;\n return React.createElement(BasicTooltip, {\n id: React.createElement(\"span\", null, \"x: \", React.createElement(\"strong\", null, point.data.xFormatted), \", y:\", ' ', React.createElement(\"strong\", null, point.data.yFormatted)),\n enableChip: true,\n color: point.serieColor\n });\n};\nvar PointTooltip = memo(LinePointTooltip);\n\nvar Chip = function Chip(_ref) {\n var color = _ref.color;\n return React.createElement(\"span\", {\n style: {\n display: 'block',\n width: '12px',\n height: '12px',\n background: color\n }\n });\n};\nvar SliceTooltip = function SliceTooltip(_ref2) {\n var slice = _ref2.slice,\n axis = _ref2.axis;\n var otherAxis = axis === 'x' ? 'y' : 'x';\n return React.createElement(TableTooltip, {\n rows: slice.points.map(function (point) {\n return [React.createElement(Chip, {\n key: \"chip\",\n color: point.serieColor\n }), point.serieId, React.createElement(\"strong\", {\n key: \"value\"\n }, point.data[\"\".concat(otherAxis, \"Formatted\")])];\n })\n });\n};\nvar SliceTooltip$1 = memo(SliceTooltip);\n\nvar commonPropTypes = {\n data: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n data: PropTypes.arrayOf(PropTypes.shape({\n x: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.instanceOf(Date)]),\n y: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.instanceOf(Date)])\n })).isRequired\n })).isRequired,\n xScale: scalePropType.isRequired,\n xFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n yScale: scalePropType.isRequired,\n yFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n layers: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['grid', 'markers', 'axes', 'areas', 'crosshair', 'lines', 'slices', 'points', 'mesh', 'legends']), PropTypes.func])).isRequired,\n curve: lineCurvePropType.isRequired,\n axisTop: axisPropType,\n axisRight: axisPropType,\n axisBottom: axisPropType,\n axisLeft: axisPropType,\n enableGridX: PropTypes.bool.isRequired,\n enableGridY: PropTypes.bool.isRequired,\n gridXValues: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.instanceOf(Date)]))]),\n gridYValues: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.instanceOf(Date)]))]),\n enablePoints: PropTypes.bool.isRequired,\n pointSymbol: PropTypes.func,\n pointSize: PropTypes.number.isRequired,\n pointColor: PropTypes.any.isRequired,\n pointBorderWidth: PropTypes.number.isRequired,\n pointBorderColor: PropTypes.any.isRequired,\n enablePointLabel: PropTypes.bool.isRequired,\n pointLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired,\n markers: PropTypes.arrayOf(PropTypes.shape({\n axis: PropTypes.oneOf(['x', 'y']).isRequired,\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.instanceOf(Date)]).isRequired,\n style: PropTypes.object\n })),\n colors: ordinalColorsPropType.isRequired,\n enableArea: PropTypes.bool.isRequired,\n areaOpacity: PropTypes.number.isRequired,\n areaBlendMode: blendModePropType.isRequired,\n areaBaselineValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.instanceOf(Date)]).isRequired,\n lineWidth: PropTypes.number.isRequired,\n legends: PropTypes.arrayOf(PropTypes.shape(LegendPropShape)).isRequired,\n isInteractive: PropTypes.bool.isRequired,\n debugMesh: PropTypes.bool.isRequired,\n tooltip: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,\n enableSlices: PropTypes.oneOf(['x', 'y', false]).isRequired,\n debugSlices: PropTypes.bool.isRequired,\n sliceTooltip: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,\n enableCrosshair: PropTypes.bool.isRequired,\n crosshairType: crosshairPropTypes.type.isRequired\n};\nvar LinePropTypes = _objectSpread2(_objectSpread2(_objectSpread2({}, commonPropTypes), {}, {\n enablePointLabel: PropTypes.bool.isRequired,\n role: PropTypes.string.isRequired,\n useMesh: PropTypes.bool.isRequired\n}, motionPropTypes), defsPropTypes);\nvar LineCanvasPropTypes = _objectSpread2({\n pixelRatio: PropTypes.number.isRequired\n}, commonPropTypes);\nvar commonDefaultProps = {\n curve: 'linear',\n xScale: {\n type: 'point'\n },\n yScale: {\n type: 'linear',\n min: 0,\n max: 'auto'\n },\n layers: ['grid', 'markers', 'axes', 'areas', 'crosshair', 'lines', 'points', 'slices', 'mesh', 'legends'],\n axisBottom: {},\n axisLeft: {},\n enableGridX: true,\n enableGridY: true,\n enablePoints: true,\n pointSize: 6,\n pointColor: {\n from: 'color'\n },\n pointBorderWidth: 0,\n pointBorderColor: {\n theme: 'background'\n },\n enablePointLabel: false,\n pointLabel: 'yFormatted',\n colors: {\n scheme: 'nivo'\n },\n enableArea: false,\n areaBaselineValue: 0,\n areaOpacity: 0.2,\n areaBlendMode: 'normal',\n lineWidth: 2,\n legends: [],\n isInteractive: true,\n tooltip: PointTooltip,\n enableSlices: false,\n debugSlices: false,\n sliceTooltip: SliceTooltip$1,\n debugMesh: false,\n enableCrosshair: true,\n crosshairType: 'bottom-left'\n};\nvar LineDefaultProps = _objectSpread2(_objectSpread2({}, commonDefaultProps), {}, {\n enablePointLabel: false,\n useMesh: false,\n animate: true,\n motionConfig: 'gentle',\n defs: [],\n fill: [],\n role: 'img'\n});\nvar LineCanvasDefaultProps = _objectSpread2(_objectSpread2({}, commonDefaultProps), {}, {\n pixelRatio: global.window && global.window.devicePixelRatio ? global.window.devicePixelRatio : 1\n});\n\nvar useLineGenerator = function useLineGenerator(_ref) {\n var curve = _ref.curve;\n return useMemo(function () {\n return line().defined(function (d) {\n return d.x !== null && d.y !== null;\n }).x(function (d) {\n return d.x;\n }).y(function (d) {\n return d.y;\n }).curve(curveFromProp(curve));\n }, [curve]);\n};\nvar useAreaGenerator = function useAreaGenerator(_ref2) {\n var curve = _ref2.curve,\n yScale = _ref2.yScale,\n areaBaselineValue = _ref2.areaBaselineValue;\n return useMemo(function () {\n return area().defined(function (d) {\n return d.x !== null && d.y !== null;\n }).x(function (d) {\n return d.x;\n }).y1(function (d) {\n return d.y;\n }).curve(curveFromProp(curve)).y0(yScale(areaBaselineValue));\n }, [curve, yScale, areaBaselineValue]);\n};\nvar usePoints = function usePoints(_ref3) {\n var series = _ref3.series,\n getPointColor = _ref3.getPointColor,\n getPointBorderColor = _ref3.getPointBorderColor,\n formatX = _ref3.formatX,\n formatY = _ref3.formatY;\n return useMemo(function () {\n return series.reduce(function (acc, serie) {\n return [].concat(_toConsumableArray(acc), _toConsumableArray(serie.data.filter(function (datum) {\n return datum.position.x !== null && datum.position.y !== null;\n }).map(function (datum, i) {\n var point = {\n id: \"\".concat(serie.id, \".\").concat(i),\n index: acc.length + i,\n serieId: serie.id,\n serieColor: serie.color,\n x: datum.position.x,\n y: datum.position.y\n };\n point.color = getPointColor(serie);\n point.borderColor = getPointBorderColor(point);\n point.data = _objectSpread2(_objectSpread2({}, datum.data), {}, {\n xFormatted: formatX(datum.data.x),\n yFormatted: formatY(datum.data.y)\n });\n return point;\n })));\n }, []);\n }, [series, getPointColor, getPointBorderColor, formatX, formatY]);\n};\nvar useSlices = function useSlices(_ref4) {\n var enableSlices = _ref4.enableSlices,\n points = _ref4.points,\n width = _ref4.width,\n height = _ref4.height;\n return useMemo(function () {\n if (enableSlices === false) return [];\n if (enableSlices === 'x') {\n var map = new Map();\n points.forEach(function (point) {\n if (point.data.x === null || point.data.y === null) return;\n if (!map.has(point.x)) map.set(point.x, [point]);else map.get(point.x).push(point);\n });\n return Array.from(map.entries()).sort(function (a, b) {\n return a[0] - b[0];\n }).map(function (_ref5, i, slices) {\n var _ref6 = _slicedToArray(_ref5, 2),\n x = _ref6[0],\n slicePoints = _ref6[1];\n var prevSlice = slices[i - 1];\n var nextSlice = slices[i + 1];\n var x0;\n if (!prevSlice) x0 = x;else x0 = x - (x - prevSlice[0]) / 2;\n var sliceWidth;\n if (!nextSlice) sliceWidth = width - x0;else sliceWidth = x - x0 + (nextSlice[0] - x) / 2;\n return {\n id: x,\n x0: x0,\n x: x,\n y0: 0,\n y: 0,\n width: sliceWidth,\n height: height,\n points: slicePoints.reverse()\n };\n });\n } else if (enableSlices === 'y') {\n var _map = new Map();\n points.forEach(function (point) {\n if (point.data.x === null || point.data.y === null) return;\n if (!_map.has(point.y)) _map.set(point.y, [point]);else _map.get(point.y).push(point);\n });\n return Array.from(_map.entries()).sort(function (a, b) {\n return a[0] - b[0];\n }).map(function (_ref7, i, slices) {\n var _ref8 = _slicedToArray(_ref7, 2),\n y = _ref8[0],\n slicePoints = _ref8[1];\n var prevSlice = slices[i - 1];\n var nextSlice = slices[i + 1];\n var y0;\n if (!prevSlice) y0 = y;else y0 = y - (y - prevSlice[0]) / 2;\n var sliceHeight;\n if (!nextSlice) sliceHeight = height - y0;else sliceHeight = y - y0 + (nextSlice[0] - y) / 2;\n return {\n id: y,\n x0: 0,\n x: 0,\n y0: y0,\n y: y,\n width: width,\n height: sliceHeight,\n points: slicePoints.reverse()\n };\n });\n }\n }, [enableSlices, points]);\n};\nvar useLine = function useLine(_ref9) {\n var data = _ref9.data,\n _ref9$xScale = _ref9.xScale,\n xScaleSpec = _ref9$xScale === void 0 ? LineDefaultProps.xScale : _ref9$xScale,\n xFormat = _ref9.xFormat,\n _ref9$yScale = _ref9.yScale,\n yScaleSpec = _ref9$yScale === void 0 ? LineDefaultProps.yScale : _ref9$yScale,\n yFormat = _ref9.yFormat,\n width = _ref9.width,\n height = _ref9.height,\n _ref9$colors = _ref9.colors,\n colors = _ref9$colors === void 0 ? LineDefaultProps.colors : _ref9$colors,\n _ref9$curve = _ref9.curve,\n curve = _ref9$curve === void 0 ? LineDefaultProps.curve : _ref9$curve,\n _ref9$areaBaselineVal = _ref9.areaBaselineValue,\n areaBaselineValue = _ref9$areaBaselineVal === void 0 ? LineDefaultProps.areaBaselineValue : _ref9$areaBaselineVal,\n _ref9$pointColor = _ref9.pointColor,\n pointColor = _ref9$pointColor === void 0 ? LineDefaultProps.pointColor : _ref9$pointColor,\n _ref9$pointBorderColo = _ref9.pointBorderColor,\n pointBorderColor = _ref9$pointBorderColo === void 0 ? LineDefaultProps.pointBorderColor : _ref9$pointBorderColo,\n _ref9$enableSlices = _ref9.enableSlices,\n enableSlices = _ref9$enableSlices === void 0 ? LineDefaultProps.enableSlicesTooltip : _ref9$enableSlices;\n var formatX = useValueFormatter(xFormat);\n var formatY = useValueFormatter(yFormat);\n var getColor = useOrdinalColorScale(colors, 'id');\n var theme = useTheme();\n var getPointColor = useInheritedColor(pointColor, theme);\n var getPointBorderColor = useInheritedColor(pointBorderColor, theme);\n var _useMemo = useMemo(function () {\n return computeXYScalesForSeries(data, xScaleSpec, yScaleSpec, width, height);\n }, [data, xScaleSpec, yScaleSpec, width, height]),\n xScale = _useMemo.xScale,\n yScale = _useMemo.yScale,\n rawSeries = _useMemo.series;\n var series = useMemo(function () {\n return rawSeries.map(function (serie) {\n return _objectSpread2(_objectSpread2({}, serie), {}, {\n color: getColor(serie)\n });\n });\n }, [rawSeries, getColor]);\n var points = usePoints({\n series: series,\n getPointColor: getPointColor,\n getPointBorderColor: getPointBorderColor,\n formatX: formatX,\n formatY: formatY\n });\n var slices = useSlices({\n enableSlices: enableSlices,\n points: points,\n width: width,\n height: height\n });\n var lineGenerator = useLineGenerator({\n curve: curve\n });\n var areaGenerator = useAreaGenerator({\n curve: curve,\n yScale: yScale,\n areaBaselineValue: areaBaselineValue\n });\n return {\n lineGenerator: lineGenerator,\n areaGenerator: areaGenerator,\n getColor: getColor,\n series: series,\n xScale: xScale,\n yScale: yScale,\n slices: slices,\n points: points\n };\n};\n\nvar AreaPath = function AreaPath(_ref) {\n var areaBlendMode = _ref.areaBlendMode,\n areaOpacity = _ref.areaOpacity,\n color = _ref.color,\n fill = _ref.fill,\n path = _ref.path;\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.config;\n var animatedPath = useAnimatedPath(path);\n var animatedProps = useSpring({\n color: color,\n config: springConfig,\n immediate: !animate\n });\n return React.createElement(animated.path, {\n d: animatedPath,\n fill: fill ? fill : animatedProps.color,\n fillOpacity: areaOpacity,\n strokeWidth: 0,\n style: {\n mixBlendMode: areaBlendMode\n }\n });\n};\nvar Areas = function Areas(_ref2) {\n var areaGenerator = _ref2.areaGenerator,\n areaOpacity = _ref2.areaOpacity,\n areaBlendMode = _ref2.areaBlendMode,\n lines = _ref2.lines;\n var computedLines = lines.slice(0).reverse();\n return React.createElement(\"g\", null, computedLines.map(function (line) {\n return React.createElement(AreaPath, Object.assign({\n key: line.id,\n path: areaGenerator(line.data.map(function (d) {\n return d.position;\n }))\n }, _objectSpread2({\n areaOpacity: areaOpacity,\n areaBlendMode: areaBlendMode\n }, line)));\n }));\n};\nvar Areas$1 = memo(Areas);\n\nvar LinesItem = function LinesItem(_ref) {\n var lineGenerator = _ref.lineGenerator,\n points = _ref.points,\n color = _ref.color,\n thickness = _ref.thickness;\n var path = useMemo(function () {\n return lineGenerator(points);\n }, [lineGenerator, points]);\n var animatedPath = useAnimatedPath(path);\n return React.createElement(animated.path, {\n d: animatedPath,\n fill: \"none\",\n strokeWidth: thickness,\n stroke: color\n });\n};\nvar LinesItem$1 = memo(LinesItem);\n\nvar Lines = function Lines(_ref) {\n var lines = _ref.lines,\n lineGenerator = _ref.lineGenerator,\n lineWidth = _ref.lineWidth;\n return lines.reverse().map(function (_ref2) {\n var id = _ref2.id,\n data = _ref2.data,\n color = _ref2.color;\n return React.createElement(LinesItem$1, {\n key: id,\n id: id,\n points: data.map(function (d) {\n return d.position;\n }),\n lineGenerator: lineGenerator,\n color: color,\n thickness: lineWidth\n });\n });\n};\nvar Lines$1 = memo(Lines);\n\nvar SlicesItem = function SlicesItem(_ref) {\n var slice = _ref.slice,\n axis = _ref.axis,\n debug = _ref.debug,\n tooltip = _ref.tooltip,\n isCurrent = _ref.isCurrent,\n setCurrent = _ref.setCurrent;\n var _useTooltip = useTooltip(),\n showTooltipFromEvent = _useTooltip.showTooltipFromEvent,\n hideTooltip = _useTooltip.hideTooltip;\n var handleMouseEnter = useCallback(function (event) {\n showTooltipFromEvent(React.createElement(tooltip, {\n slice: slice,\n axis: axis\n }), event, 'right');\n setCurrent(slice);\n }, [showTooltipFromEvent, tooltip, slice]);\n var handleMouseMove = useCallback(function (event) {\n showTooltipFromEvent(React.createElement(tooltip, {\n slice: slice,\n axis: axis\n }), event, 'right');\n }, [showTooltipFromEvent, tooltip, slice]);\n var handleMouseLeave = useCallback(function () {\n hideTooltip();\n setCurrent(null);\n }, [hideTooltip]);\n return React.createElement(\"rect\", {\n x: slice.x0,\n y: slice.y0,\n width: slice.width,\n height: slice.height,\n stroke: \"red\",\n strokeWidth: debug ? 1 : 0,\n strokeOpacity: 0.75,\n fill: \"red\",\n fillOpacity: isCurrent && debug ? 0.35 : 0,\n onMouseEnter: handleMouseEnter,\n onMouseMove: handleMouseMove,\n onMouseLeave: handleMouseLeave\n });\n};\nvar SlicesItem$1 = memo(SlicesItem);\n\nvar Slices = function Slices(_ref) {\n var slices = _ref.slices,\n axis = _ref.axis,\n debug = _ref.debug,\n height = _ref.height,\n tooltip = _ref.tooltip,\n current = _ref.current,\n setCurrent = _ref.setCurrent;\n return slices.map(function (slice) {\n return React.createElement(SlicesItem$1, {\n key: slice.id,\n slice: slice,\n axis: axis,\n debug: debug,\n height: height,\n tooltip: tooltip,\n setCurrent: setCurrent,\n isCurrent: current !== null && current.id === slice.id\n });\n });\n};\nvar Slices$1 = memo(Slices);\n\nvar Points = function Points(_ref) {\n var points = _ref.points,\n symbol = _ref.symbol,\n size = _ref.size,\n borderWidth = _ref.borderWidth,\n enableLabel = _ref.enableLabel,\n label = _ref.label,\n labelYOffset = _ref.labelYOffset;\n var theme = useTheme();\n var getLabel = getLabelGenerator(label);\n var mappedPoints = points.reverse().map(function (point) {\n var mappedPoint = {\n id: point.id,\n x: point.x,\n y: point.y,\n datum: point.data,\n fill: point.color,\n stroke: point.borderColor,\n label: enableLabel ? getLabel(point.data) : null\n };\n return mappedPoint;\n });\n return React.createElement(\"g\", null, mappedPoints.map(function (point) {\n return React.createElement(DotsItem, {\n key: point.id,\n x: point.x,\n y: point.y,\n datum: point.datum,\n symbol: symbol,\n size: size,\n color: point.fill,\n borderWidth: borderWidth,\n borderColor: point.stroke,\n label: point.label,\n labelYOffset: labelYOffset,\n theme: theme\n });\n }));\n};\nvar Points$1 = memo(Points);\n\nvar Mesh = function Mesh(_ref) {\n var points = _ref.points,\n width = _ref.width,\n height = _ref.height,\n margin = _ref.margin,\n setCurrent = _ref.setCurrent,\n onMouseEnter = _ref.onMouseEnter,\n onMouseMove = _ref.onMouseMove,\n onMouseLeave = _ref.onMouseLeave,\n onClick = _ref.onClick,\n tooltip = _ref.tooltip,\n debug = _ref.debug;\n var _useTooltip = useTooltip(),\n showTooltipAt = _useTooltip.showTooltipAt,\n hideTooltip = _useTooltip.hideTooltip;\n var handleMouseEnter = useCallback(function (point, event) {\n showTooltipAt(React.createElement(tooltip, {\n point: point\n }), [point.x + margin.left, point.y + margin.top], 'top');\n setCurrent(point);\n onMouseEnter && onMouseEnter(point, event);\n }, [setCurrent, showTooltipAt, tooltip, onMouseEnter, margin]);\n var handleMouseMove = useCallback(function (point, event) {\n showTooltipAt(React.createElement(tooltip, {\n point: point\n }), [point.x + margin.left, point.y + margin.top], 'top');\n setCurrent(point);\n onMouseMove && onMouseMove(point, event);\n }, [setCurrent, showTooltipAt, tooltip, onMouseMove]);\n var handleMouseLeave = useCallback(function (point, event) {\n hideTooltip();\n setCurrent(null);\n onMouseLeave && onMouseLeave(point, event);\n }, [hideTooltip, setCurrent, onMouseLeave]);\n var handleClick = useCallback(function (point, event) {\n onClick && onClick(point, event);\n }, [onClick]);\n return React.createElement(Mesh$2, {\n nodes: points,\n width: width,\n height: height,\n onMouseEnter: handleMouseEnter,\n onMouseMove: handleMouseMove,\n onMouseLeave: handleMouseLeave,\n onClick: handleClick,\n debug: debug\n });\n};\nvar Mesh$1 = memo(Mesh);\n\nvar Line = function Line(props) {\n var data = props.data,\n xScaleSpec = props.xScale,\n xFormat = props.xFormat,\n yScaleSpec = props.yScale,\n yFormat = props.yFormat,\n layers = props.layers,\n curve = props.curve,\n areaBaselineValue = props.areaBaselineValue,\n colors = props.colors,\n partialMargin = props.margin,\n width = props.width,\n height = props.height,\n axisTop = props.axisTop,\n axisRight = props.axisRight,\n axisBottom = props.axisBottom,\n axisLeft = props.axisLeft,\n enableGridX = props.enableGridX,\n enableGridY = props.enableGridY,\n gridXValues = props.gridXValues,\n gridYValues = props.gridYValues,\n lineWidth = props.lineWidth,\n enableArea = props.enableArea,\n areaOpacity = props.areaOpacity,\n areaBlendMode = props.areaBlendMode,\n enablePoints = props.enablePoints,\n pointSymbol = props.pointSymbol,\n pointSize = props.pointSize,\n pointColor = props.pointColor,\n pointBorderWidth = props.pointBorderWidth,\n pointBorderColor = props.pointBorderColor,\n enablePointLabel = props.enablePointLabel,\n pointLabel = props.pointLabel,\n pointLabelYOffset = props.pointLabelYOffset,\n defs = props.defs,\n fill = props.fill,\n markers = props.markers,\n legends = props.legends,\n isInteractive = props.isInteractive,\n useMesh = props.useMesh,\n debugMesh = props.debugMesh,\n onMouseEnter = props.onMouseEnter,\n onMouseMove = props.onMouseMove,\n onMouseLeave = props.onMouseLeave,\n onClick = props.onClick,\n tooltip = props.tooltip,\n enableSlices = props.enableSlices,\n debugSlices = props.debugSlices,\n sliceTooltip = props.sliceTooltip,\n enableCrosshair = props.enableCrosshair,\n crosshairType = props.crosshairType,\n role = props.role;\n var _useDimensions = useDimensions(width, height, partialMargin),\n margin = _useDimensions.margin,\n innerWidth = _useDimensions.innerWidth,\n innerHeight = _useDimensions.innerHeight,\n outerWidth = _useDimensions.outerWidth,\n outerHeight = _useDimensions.outerHeight;\n var _useLine = useLine({\n data: data,\n xScale: xScaleSpec,\n xFormat: xFormat,\n yScale: yScaleSpec,\n yFormat: yFormat,\n width: innerWidth,\n height: innerHeight,\n colors: colors,\n curve: curve,\n areaBaselineValue: areaBaselineValue,\n pointColor: pointColor,\n pointBorderColor: pointBorderColor,\n enableSlices: enableSlices\n }),\n lineGenerator = _useLine.lineGenerator,\n areaGenerator = _useLine.areaGenerator,\n series = _useLine.series,\n xScale = _useLine.xScale,\n yScale = _useLine.yScale,\n slices = _useLine.slices,\n points = _useLine.points;\n var theme = useTheme();\n var getPointColor = useInheritedColor(pointColor, theme);\n var getPointBorderColor = useInheritedColor(pointBorderColor, theme);\n var _useState = useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n currentPoint = _useState2[0],\n setCurrentPoint = _useState2[1];\n var _useState3 = useState(null),\n _useState4 = _slicedToArray(_useState3, 2),\n currentSlice = _useState4[0],\n setCurrentSlice = _useState4[1];\n var legendData = useMemo(function () {\n return series.map(function (line) {\n return {\n id: line.id,\n label: line.id,\n color: line.color\n };\n }).reverse();\n }, [series]);\n var layerById = {\n grid: React.createElement(Grid, {\n key: \"grid\",\n theme: theme,\n width: innerWidth,\n height: innerHeight,\n xScale: enableGridX ? xScale : null,\n yScale: enableGridY ? yScale : null,\n xValues: gridXValues,\n yValues: gridYValues\n }),\n markers: React.createElement(CartesianMarkers, {\n key: \"markers\",\n markers: markers,\n width: innerWidth,\n height: innerHeight,\n xScale: xScale,\n yScale: yScale,\n theme: theme\n }),\n axes: React.createElement(Axes, {\n key: \"axes\",\n xScale: xScale,\n yScale: yScale,\n width: innerWidth,\n height: innerHeight,\n theme: theme,\n top: axisTop,\n right: axisRight,\n bottom: axisBottom,\n left: axisLeft\n }),\n areas: null,\n lines: React.createElement(Lines$1, {\n key: \"lines\",\n lines: series,\n lineGenerator: lineGenerator,\n lineWidth: lineWidth\n }),\n slices: null,\n points: null,\n crosshair: null,\n mesh: null,\n legends: legends.map(function (legend, i) {\n return React.createElement(BoxLegendSvg, Object.assign({\n key: \"legend.\".concat(i)\n }, legend, {\n containerWidth: innerWidth,\n containerHeight: innerHeight,\n data: legend.data || legendData,\n theme: theme\n }));\n })\n };\n var boundDefs = bindDefs(defs, series, fill);\n if (enableArea) {\n layerById.areas = React.createElement(Areas$1, {\n key: \"areas\",\n areaGenerator: areaGenerator,\n areaOpacity: areaOpacity,\n areaBlendMode: areaBlendMode,\n lines: series\n });\n }\n if (isInteractive && enableSlices !== false) {\n layerById.slices = React.createElement(Slices$1, {\n key: \"slices\",\n slices: slices,\n axis: enableSlices,\n debug: debugSlices,\n height: innerHeight,\n tooltip: sliceTooltip,\n current: currentSlice,\n setCurrent: setCurrentSlice\n });\n }\n if (enablePoints) {\n layerById.points = React.createElement(Points$1, {\n key: \"points\",\n points: points,\n symbol: pointSymbol,\n size: pointSize,\n color: getPointColor,\n borderWidth: pointBorderWidth,\n borderColor: getPointBorderColor,\n enableLabel: enablePointLabel,\n label: pointLabel,\n labelYOffset: pointLabelYOffset\n });\n }\n if (isInteractive && enableCrosshair) {\n if (currentPoint !== null) {\n layerById.crosshair = React.createElement(Crosshair, {\n key: \"crosshair\",\n width: innerWidth,\n height: innerHeight,\n x: currentPoint.x,\n y: currentPoint.y,\n type: crosshairType\n });\n }\n if (currentSlice !== null) {\n layerById.crosshair = React.createElement(Crosshair, {\n key: \"crosshair\",\n width: innerWidth,\n height: innerHeight,\n x: currentSlice.x,\n y: currentSlice.y,\n type: enableSlices\n });\n }\n }\n if (isInteractive && useMesh && enableSlices === false) {\n layerById.mesh = React.createElement(Mesh$1, {\n key: \"mesh\",\n points: points,\n width: innerWidth,\n height: innerHeight,\n margin: margin,\n current: currentPoint,\n setCurrent: setCurrentPoint,\n onMouseEnter: onMouseEnter,\n onMouseMove: onMouseMove,\n onMouseLeave: onMouseLeave,\n onClick: onClick,\n tooltip: tooltip,\n debug: debugMesh\n });\n }\n return React.createElement(SvgWrapper, {\n defs: boundDefs,\n width: outerWidth,\n height: outerHeight,\n margin: margin,\n role: role\n }, layers.map(function (layer, i) {\n if (typeof layer === 'function') {\n return React.createElement(Fragment, {\n key: i\n }, layer(_objectSpread2(_objectSpread2({}, props), {}, {\n innerWidth: innerWidth,\n innerHeight: innerHeight,\n series: series,\n slices: slices,\n points: points,\n xScale: xScale,\n yScale: yScale,\n lineGenerator: lineGenerator,\n areaGenerator: areaGenerator,\n currentPoint: currentPoint,\n setCurrentPoint: setCurrentPoint,\n currentSlice: currentSlice,\n setCurrentSlice: setCurrentSlice\n })));\n }\n return layerById[layer];\n }));\n};\nLine.defaultProps = LineDefaultProps;\nvar Line$1 = withContainer(Line);\n\nvar ResponsiveLine = function ResponsiveLine(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(Line$1, Object.assign({\n width: width,\n height: height\n }, props));\n });\n};\n\nvar LineCanvas = function LineCanvas(_ref) {\n var width = _ref.width,\n height = _ref.height,\n partialMargin = _ref.margin,\n pixelRatio = _ref.pixelRatio,\n data = _ref.data,\n xScaleSpec = _ref.xScale,\n xFormat = _ref.xFormat,\n yScaleSpec = _ref.yScale,\n yFormat = _ref.yFormat,\n curve = _ref.curve,\n layers = _ref.layers,\n colors = _ref.colors,\n lineWidth = _ref.lineWidth,\n enableArea = _ref.enableArea,\n areaBaselineValue = _ref.areaBaselineValue,\n areaOpacity = _ref.areaOpacity,\n enablePoints = _ref.enablePoints,\n pointSize = _ref.pointSize,\n pointColor = _ref.pointColor,\n pointBorderWidth = _ref.pointBorderWidth,\n pointBorderColor = _ref.pointBorderColor,\n enableGridX = _ref.enableGridX,\n gridXValues = _ref.gridXValues,\n enableGridY = _ref.enableGridY,\n gridYValues = _ref.gridYValues,\n axisTop = _ref.axisTop,\n axisRight = _ref.axisRight,\n axisBottom = _ref.axisBottom,\n axisLeft = _ref.axisLeft,\n legends = _ref.legends,\n isInteractive = _ref.isInteractive,\n debugMesh = _ref.debugMesh,\n onMouseLeave = _ref.onMouseLeave,\n onClick = _ref.onClick,\n tooltip = _ref.tooltip;\n var canvasEl = useRef(null);\n var _useDimensions = useDimensions(width, height, partialMargin),\n margin = _useDimensions.margin,\n innerWidth = _useDimensions.innerWidth,\n innerHeight = _useDimensions.innerHeight,\n outerWidth = _useDimensions.outerWidth,\n outerHeight = _useDimensions.outerHeight;\n var theme = useTheme();\n var _useState = useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n currentPoint = _useState2[0],\n setCurrentPoint = _useState2[1];\n var _useLine = useLine({\n data: data,\n xScale: xScaleSpec,\n xFormat: xFormat,\n yScale: yScaleSpec,\n yFormat: yFormat,\n width: innerWidth,\n height: innerHeight,\n colors: colors,\n curve: curve,\n areaBaselineValue: areaBaselineValue,\n pointColor: pointColor,\n pointBorderColor: pointBorderColor\n }),\n lineGenerator = _useLine.lineGenerator,\n areaGenerator = _useLine.areaGenerator,\n series = _useLine.series,\n xScale = _useLine.xScale,\n yScale = _useLine.yScale,\n points = _useLine.points;\n var _useVoronoiMesh = useVoronoiMesh({\n points: points,\n width: innerWidth,\n height: innerHeight,\n debug: debugMesh\n }),\n delaunay = _useVoronoiMesh.delaunay,\n voronoi = _useVoronoiMesh.voronoi;\n useEffect(function () {\n canvasEl.current.width = outerWidth * pixelRatio;\n canvasEl.current.height = outerHeight * pixelRatio;\n var ctx = canvasEl.current.getContext('2d');\n ctx.scale(pixelRatio, pixelRatio);\n ctx.fillStyle = theme.background;\n ctx.fillRect(0, 0, outerWidth, outerHeight);\n ctx.translate(margin.left, margin.top);\n layers.forEach(function (layer) {\n if (typeof layer === 'function') {\n layer({\n ctx: ctx,\n innerWidth: innerWidth,\n innerHeight: innerHeight,\n series: series,\n points: points,\n xScale: xScale,\n yScale: yScale,\n lineWidth: lineWidth,\n lineGenerator: lineGenerator,\n areaGenerator: areaGenerator,\n currentPoint: currentPoint,\n setCurrentPoint: setCurrentPoint\n });\n }\n if (layer === 'grid' && theme.grid.line.strokeWidth > 0) {\n ctx.lineWidth = theme.grid.line.strokeWidth;\n ctx.strokeStyle = theme.grid.line.stroke;\n enableGridX && renderGridLinesToCanvas(ctx, {\n width: innerWidth,\n height: innerHeight,\n scale: xScale,\n axis: 'x',\n values: gridXValues\n });\n enableGridY && renderGridLinesToCanvas(ctx, {\n width: innerWidth,\n height: innerHeight,\n scale: yScale,\n axis: 'y',\n values: gridYValues\n });\n }\n if (layer === 'axes') {\n renderAxesToCanvas(ctx, {\n xScale: xScale,\n yScale: yScale,\n width: innerWidth,\n height: innerHeight,\n top: axisTop,\n right: axisRight,\n bottom: axisBottom,\n left: axisLeft,\n theme: theme\n });\n }\n if (layer === 'areas' && enableArea === true) {\n ctx.save();\n ctx.globalAlpha = areaOpacity;\n areaGenerator.context(ctx);\n series.forEach(function (serie) {\n ctx.fillStyle = serie.color;\n ctx.beginPath();\n areaGenerator(serie.data.map(function (d) {\n return d.position;\n }));\n ctx.fill();\n });\n ctx.restore();\n }\n if (layer === 'lines') {\n lineGenerator.context(ctx);\n series.forEach(function (serie) {\n ctx.strokeStyle = serie.color;\n ctx.lineWidth = lineWidth;\n ctx.beginPath();\n lineGenerator(serie.data.map(function (d) {\n return d.position;\n }));\n ctx.stroke();\n });\n }\n if (layer === 'points' && enablePoints === true && pointSize > 0) {\n points.forEach(function (point) {\n ctx.fillStyle = point.color;\n ctx.beginPath();\n ctx.arc(point.x, point.y, pointSize / 2, 0, 2 * Math.PI);\n ctx.fill();\n if (pointBorderWidth > 0) {\n ctx.strokeStyle = point.borderColor;\n ctx.lineWidth = pointBorderWidth;\n ctx.stroke();\n }\n });\n }\n if (layer === 'mesh' && debugMesh === true) {\n renderVoronoiToCanvas(ctx, voronoi);\n if (currentPoint) {\n renderVoronoiCellToCanvas(ctx, voronoi, currentPoint.index);\n }\n }\n if (layer === 'legends') {\n var legendData = series.map(function (serie) {\n return {\n id: serie.id,\n label: serie.id,\n color: serie.color\n };\n }).reverse();\n legends.forEach(function (legend) {\n renderLegendToCanvas(ctx, _objectSpread2(_objectSpread2({}, legend), {}, {\n data: legend.data || legendData,\n containerWidth: innerWidth,\n containerHeight: innerHeight,\n theme: theme\n }));\n });\n }\n });\n }, [canvasEl, outerWidth, outerHeight, layers, theme, lineGenerator, series, xScale, yScale, enableGridX, gridXValues, enableGridY, gridYValues, axisTop, axisRight, axisBottom, axisLeft, legends, points, enablePoints, pointSize, currentPoint]);\n var getPointFromMouseEvent = useCallback(function (event) {\n var _getRelativeCursor = getRelativeCursor(canvasEl.current, event),\n _getRelativeCursor2 = _slicedToArray(_getRelativeCursor, 2),\n x = _getRelativeCursor2[0],\n y = _getRelativeCursor2[1];\n if (!isCursorInRect(margin.left, margin.top, innerWidth, innerHeight, x, y)) return null;\n var pointIndex = delaunay.find(x - margin.left, y - margin.top);\n return points[pointIndex];\n }, [canvasEl, margin, innerWidth, innerHeight, delaunay]);\n var _useTooltip = useTooltip(),\n showTooltipFromEvent = _useTooltip.showTooltipFromEvent,\n hideTooltip = _useTooltip.hideTooltip;\n var handleMouseHover = useCallback(function (event) {\n var point = getPointFromMouseEvent(event);\n setCurrentPoint(point);\n if (point) {\n showTooltipFromEvent(React.createElement(tooltip, {\n point: point\n }), event);\n } else {\n hideTooltip();\n }\n }, [getPointFromMouseEvent, setCurrentPoint, showTooltipFromEvent, hideTooltip, tooltip]);\n var handleMouseLeave = useCallback(function (event) {\n hideTooltip();\n setCurrentPoint(null);\n currentPoint && onMouseLeave && onMouseLeave(currentPoint, event);\n }, [hideTooltip, setCurrentPoint, onMouseLeave]);\n var handleClick = useCallback(function (event) {\n if (onClick) {\n var point = getPointFromMouseEvent(event);\n point && onClick(point, event);\n }\n }, [getPointFromMouseEvent, onClick]);\n return React.createElement(\"canvas\", {\n ref: canvasEl,\n width: outerWidth * pixelRatio,\n height: outerHeight * pixelRatio,\n style: {\n width: outerWidth,\n height: outerHeight,\n cursor: isInteractive ? 'auto' : 'normal'\n },\n onMouseEnter: isInteractive ? handleMouseHover : undefined,\n onMouseMove: isInteractive ? handleMouseHover : undefined,\n onMouseLeave: isInteractive ? handleMouseLeave : undefined,\n onClick: isInteractive ? handleClick : undefined\n });\n};\nLineCanvas.defaultProps = LineCanvasDefaultProps;\nvar LineCanvas$1 = withContainer(LineCanvas);\n\nvar ResponsiveLineCanvas = function ResponsiveLineCanvas(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(LineCanvas$1, Object.assign({\n width: width,\n height: height\n }, props));\n });\n};\n\nexport { Line$1 as Line, LineCanvas$1 as LineCanvas, LineCanvasDefaultProps, LineCanvasPropTypes, LineDefaultProps, LinePropTypes, ResponsiveLine, ResponsiveLineCanvas, useAreaGenerator, useLine, useLineGenerator, useSlices };\n//# sourceMappingURL=nivo-line.es.js.map\n","import React, { useMemo, memo } from 'react';\nimport PropTypes from 'prop-types';\nimport isPlainObject from 'lodash/isPlainObject';\nimport filter from 'lodash/filter';\nimport omit from 'lodash/omit';\nimport { absoluteAngleDegrees, radiansToDegrees, positionFromAngle, degreesToRadians, useTheme, useMotionConfig, useAnimatedPath } from '@nivo/core';\nimport { useSpring, animated } from 'react-spring';\n\nvar annotationSpecPropType = PropTypes.shape({\n match: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,\n type: PropTypes.oneOf(['circle', 'rect', 'dot']).isRequired,\n noteX: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n abs: PropTypes.number.isRequired\n })]).isRequired,\n noteY: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n abs: PropTypes.number.isRequired\n })]).isRequired,\n noteWidth: PropTypes.number,\n noteTextOffset: PropTypes.number,\n note: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,\n offset: PropTypes.number\n});\nvar defaultProps = {\n noteWidth: 120,\n noteTextOffset: 8,\n animate: true,\n motionStiffness: 90,\n motionDamping: 13\n};\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n}\n\nvar defaultPositionAccessor = function defaultPositionAccessor(item) {\n return {\n x: item.x,\n y: item.y\n };\n};\nvar bindAnnotations = function bindAnnotations(_ref) {\n var items = _ref.items,\n annotations = _ref.annotations,\n _ref$getPosition = _ref.getPosition,\n getPosition = _ref$getPosition === void 0 ? defaultPositionAccessor : _ref$getPosition,\n getDimensions = _ref.getDimensions;\n return annotations.reduce(function (acc, annotation) {\n filter(items, annotation.match).forEach(function (item) {\n var position = getPosition(item);\n var dimensions = getDimensions(item, annotation.offset || 0);\n acc.push(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, omit(annotation, ['match', 'offset'])), position), dimensions), {}, {\n datum: item,\n size: annotation.size || dimensions.size\n }));\n });\n return acc;\n }, []);\n};\nvar getLinkAngle = function getLinkAngle(sourceX, sourceY, targetX, targetY) {\n var angle = Math.atan2(targetY - sourceY, targetX - sourceX);\n return absoluteAngleDegrees(radiansToDegrees(angle));\n};\nvar computeAnnotation = function computeAnnotation(_ref2) {\n var type = _ref2.type,\n x = _ref2.x,\n y = _ref2.y,\n size = _ref2.size,\n width = _ref2.width,\n height = _ref2.height,\n noteX = _ref2.noteX,\n noteY = _ref2.noteY,\n _ref2$noteWidth = _ref2.noteWidth,\n noteWidth = _ref2$noteWidth === void 0 ? defaultProps.noteWidth : _ref2$noteWidth,\n _ref2$noteTextOffset = _ref2.noteTextOffset,\n noteTextOffset = _ref2$noteTextOffset === void 0 ? defaultProps.noteTextOffset : _ref2$noteTextOffset;\n var computedNoteX;\n var computedNoteY;\n if (isPlainObject(noteX)) {\n if (noteX.abs !== undefined) {\n computedNoteX = noteX.abs;\n }\n } else {\n computedNoteX = x + noteX;\n }\n if (isPlainObject(noteY)) {\n if (noteY.abs !== undefined) {\n computedNoteY = noteY.abs;\n }\n } else {\n computedNoteY = y + noteY;\n }\n var computedX = x;\n var computedY = y;\n var angle = getLinkAngle(x, y, computedNoteX, computedNoteY);\n if (type === 'circle') {\n var position = positionFromAngle(degreesToRadians(angle), size / 2);\n computedX += position.x;\n computedY += position.y;\n }\n if (type === 'rect') {\n var eighth = Math.round((angle + 90) / 45) % 8;\n if (eighth === 0) {\n computedY -= height / 2;\n }\n if (eighth === 1) {\n computedX += width / 2;\n computedY -= height / 2;\n }\n if (eighth === 2) {\n computedX += width / 2;\n }\n if (eighth === 3) {\n computedX += width / 2;\n computedY += height / 2;\n }\n if (eighth === 4) {\n computedY += height / 2;\n }\n if (eighth === 5) {\n computedX -= width / 2;\n computedY += height / 2;\n }\n if (eighth === 6) {\n computedX -= width / 2;\n }\n if (eighth === 7) {\n computedX -= width / 2;\n computedY -= height / 2;\n }\n }\n var textX = computedNoteX;\n var textY = computedNoteY - noteTextOffset;\n var noteLineX = computedNoteX;\n var noteLineY = computedNoteY;\n if ((angle + 90) % 360 > 180) {\n textX -= noteWidth;\n noteLineX -= noteWidth;\n } else {\n noteLineX += noteWidth;\n }\n return {\n points: [[computedX, computedY], [computedNoteX, computedNoteY], [noteLineX, noteLineY]],\n text: [textX, textY],\n angle: angle + 90\n };\n};\n\nvar useAnnotations = function useAnnotations(_ref) {\n var items = _ref.items,\n annotations = _ref.annotations,\n getPosition = _ref.getPosition,\n getDimensions = _ref.getDimensions;\n return useMemo(function () {\n return bindAnnotations({\n items: items,\n annotations: annotations,\n getPosition: getPosition,\n getDimensions: getDimensions\n });\n }, [items, annotations, getPosition, getDimensions]);\n};\nvar useComputedAnnotations = function useComputedAnnotations(_ref2) {\n var annotations = _ref2.annotations,\n containerWidth = _ref2.containerWidth,\n containerHeight = _ref2.containerHeight;\n return useMemo(function () {\n return annotations.map(function (annotation) {\n return _objectSpread2(_objectSpread2({}, annotation), {}, {\n computed: computeAnnotation(_objectSpread2({\n containerWidth: containerWidth,\n containerHeight: containerHeight\n }, annotation))\n });\n });\n }, [annotations, containerWidth, containerHeight]);\n};\nvar useComputedAnnotation = function useComputedAnnotation(_ref3) {\n var type = _ref3.type,\n containerWidth = _ref3.containerWidth,\n containerHeight = _ref3.containerHeight,\n x = _ref3.x,\n y = _ref3.y,\n size = _ref3.size,\n width = _ref3.width,\n height = _ref3.height,\n noteX = _ref3.noteX,\n noteY = _ref3.noteY,\n noteWidth = _ref3.noteWidth,\n noteTextOffset = _ref3.noteTextOffset;\n return useMemo(function () {\n return computeAnnotation({\n type: type,\n containerWidth: containerWidth,\n containerHeight: containerHeight,\n x: x,\n y: y,\n size: size,\n width: width,\n height: height,\n noteX: noteX,\n noteY: noteY,\n noteWidth: noteWidth,\n noteTextOffset: noteTextOffset\n });\n }, [type, containerWidth, containerHeight, x, y, size, width, height, noteX, noteY, noteWidth, noteTextOffset]);\n};\n\nvar AnnotationNote = memo(function (_ref) {\n var datum = _ref.datum,\n x = _ref.x,\n y = _ref.y,\n note = _ref.note;\n var theme = useTheme();\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfiig = _useMotionConfig.config;\n var animatedProps = useSpring({\n x: x,\n y: y,\n config: springConfiig,\n immediate: !animate\n });\n if (typeof note === 'function') {\n return note({\n x: x,\n y: y,\n datum: datum\n });\n }\n return React.createElement(React.Fragment, null, theme.annotations.text.outlineWidth > 0 && React.createElement(animated.text, {\n x: animatedProps.x,\n y: animatedProps.y,\n style: _objectSpread2(_objectSpread2({}, theme.annotations.text), {}, {\n strokeLinejoin: 'round',\n strokeWidth: theme.annotations.text.outlineWidth * 2,\n stroke: theme.annotations.text.outlineColor\n })\n }, note), React.createElement(animated.text, {\n x: animatedProps.x,\n y: animatedProps.y,\n style: omit(theme.annotations.text, ['outlineWidth', 'outlineColor'])\n }, note));\n});\nAnnotationNote.displayName = 'AnnotationNote';\nAnnotationNote.defaultProps = {};\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _toArray(arr) {\n return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = _objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\n\nvar AnnotationLink = memo(function (_ref) {\n var isOutline = _ref.isOutline,\n props = _objectWithoutProperties(_ref, [\"isOutline\"]);\n var theme = useTheme();\n var _props$points = _toArray(props.points),\n point = _props$points[0],\n points = _props$points.slice(1);\n var path = points.reduce(function (acc, _ref2) {\n var _ref3 = _slicedToArray(_ref2, 2),\n x = _ref3[0],\n y = _ref3[1];\n return \"\".concat(acc, \" L\").concat(x, \",\").concat(y);\n }, \"M\".concat(point[0], \",\").concat(point[1]));\n var animatedPath = useAnimatedPath(path);\n if (isOutline && theme.annotations.link.outlineWidth <= 0) {\n return null;\n }\n var style = _objectSpread2({}, theme.annotations.link);\n if (isOutline) {\n style.strokeLinecap = 'square';\n style.strokeWidth = theme.annotations.link.strokeWidth + theme.annotations.link.outlineWidth * 2;\n style.stroke = theme.annotations.link.outlineColor;\n }\n return React.createElement(animated.path, {\n fill: \"none\",\n d: animatedPath,\n style: style\n });\n});\nAnnotationLink.displayName = 'AnnotationLink';\nAnnotationLink.defaultProps = {\n isOutline: false\n};\n\nvar CircleAnnotationOutline = memo(function (_ref) {\n var x = _ref.x,\n y = _ref.y,\n size = _ref.size;\n var theme = useTheme();\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.config;\n var animatedProps = useSpring({\n x: x,\n y: y,\n radius: size / 2,\n config: springConfig,\n immediate: !animate\n });\n return React.createElement(React.Fragment, null, theme.annotations.outline.outlineWidth > 0 && React.createElement(animated.circle, {\n cx: animatedProps.x,\n cy: animatedProps.y,\n r: animatedProps.radius,\n style: _objectSpread2(_objectSpread2({}, theme.annotations.outline), {}, {\n fill: 'none',\n strokeWidth: theme.annotations.outline.strokeWidth + theme.annotations.outline.outlineWidth * 2,\n stroke: theme.annotations.outline.outlineColor\n })\n }), React.createElement(animated.circle, {\n cx: animatedProps.x,\n cy: animatedProps.y,\n r: animatedProps.radius,\n style: theme.annotations.outline\n }));\n});\nCircleAnnotationOutline.displayName = 'CircleAnnotationOutline';\n\nvar DotAnnotationOutline = memo(function (_ref) {\n var x = _ref.x,\n y = _ref.y,\n size = _ref.size;\n var theme = useTheme();\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.config;\n var animatedProps = useSpring({\n x: x,\n y: y,\n radius: size / 2,\n config: springConfig,\n immediate: !animate\n });\n return React.createElement(React.Fragment, null, theme.annotations.outline.outlineWidth > 0 && React.createElement(animated.circle, {\n cx: animatedProps.x,\n cy: animatedProps.y,\n r: animatedProps.radius,\n style: _objectSpread2(_objectSpread2({}, theme.annotations.outline), {}, {\n fill: 'none',\n strokeWidth: theme.annotations.outline.outlineWidth * 2,\n stroke: theme.annotations.outline.outlineColor\n })\n }), React.createElement(animated.circle, {\n cx: animatedProps.x,\n cy: animatedProps.y,\n r: animatedProps.radius,\n style: theme.annotations.symbol\n }));\n});\nDotAnnotationOutline.displayName = 'DotAnnotationOutline';\nDotAnnotationOutline.defaultProps = {\n size: 4\n};\n\nvar RectAnnotationOutline = memo(function (_ref) {\n var x = _ref.x,\n y = _ref.y,\n width = _ref.width,\n height = _ref.height;\n var theme = useTheme();\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.config;\n var animatedProps = useSpring({\n x: x - width / 2,\n y: y - height / 2,\n width: width,\n height: height,\n config: springConfig,\n immediate: !animate\n });\n return React.createElement(React.Fragment, null, theme.annotations.outline.outlineWidth > 0 && React.createElement(animated.rect, {\n x: animatedProps.x,\n y: animatedProps.y,\n width: animatedProps.width,\n height: animatedProps.height,\n style: _objectSpread2(_objectSpread2({}, theme.annotations.outline), {}, {\n fill: 'none',\n strokeWidth: theme.annotations.outline.strokeWidth + theme.annotations.outline.outlineWidth * 2,\n stroke: theme.annotations.outline.outlineColor\n })\n }), React.createElement(animated.rect, {\n x: animatedProps.x,\n y: animatedProps.y,\n width: animatedProps.width,\n height: animatedProps.height,\n style: theme.annotations.outline\n }));\n});\nRectAnnotationOutline.displayName = 'RectAnnotationOutline';\n\nvar Annotation = memo(function (_ref) {\n var datum = _ref.datum,\n type = _ref.type,\n containerWidth = _ref.containerWidth,\n containerHeight = _ref.containerHeight,\n x = _ref.x,\n y = _ref.y,\n size = _ref.size,\n width = _ref.width,\n height = _ref.height,\n noteX = _ref.noteX,\n noteY = _ref.noteY,\n noteWidth = _ref.noteWidth,\n noteTextOffset = _ref.noteTextOffset,\n note = _ref.note;\n var computed = useComputedAnnotation({\n type: type,\n containerWidth: containerWidth,\n containerHeight: containerHeight,\n x: x,\n y: y,\n size: size,\n width: width,\n height: height,\n noteX: noteX,\n noteY: noteY,\n noteWidth: noteWidth,\n noteTextOffset: noteTextOffset\n });\n return React.createElement(React.Fragment, null, React.createElement(AnnotationLink, {\n points: computed.points,\n isOutline: true\n }), type === 'circle' && React.createElement(CircleAnnotationOutline, {\n x: x,\n y: y,\n size: size\n }), type === 'dot' && React.createElement(DotAnnotationOutline, {\n x: x,\n y: y,\n size: size\n }), type === 'rect' && React.createElement(RectAnnotationOutline, {\n x: x,\n y: y,\n width: width,\n height: height\n }), React.createElement(AnnotationLink, {\n points: computed.points\n }), React.createElement(AnnotationNote, {\n datum: datum,\n x: computed.text[0],\n y: computed.text[1],\n note: note\n }));\n});\nAnnotation.displayName = 'Annotation';\nAnnotation.defaultProps = {\n noteWidth: defaultProps.noteWidth,\n noteTextOffset: defaultProps.noteTextOffset\n};\n\nvar drawPoints = function drawPoints(ctx, points) {\n points.forEach(function (_ref, index) {\n var _ref2 = _slicedToArray(_ref, 2),\n x = _ref2[0],\n y = _ref2[1];\n if (index === 0) {\n ctx.moveTo(x, y);\n } else {\n ctx.lineTo(x, y);\n }\n });\n};\nvar renderAnnotationsToCanvas = function renderAnnotationsToCanvas(ctx, _ref3) {\n var annotations = _ref3.annotations,\n theme = _ref3.theme;\n if (annotations.length === 0) return;\n ctx.save();\n annotations.forEach(function (annotation) {\n if (theme.annotations.link.outlineWidth > 0) {\n ctx.lineCap = 'square';\n ctx.strokeStyle = theme.annotations.link.outlineColor;\n ctx.lineWidth = theme.annotations.link.strokeWidth + theme.annotations.link.outlineWidth * 2;\n ctx.beginPath();\n drawPoints(ctx, annotation.computed.points);\n ctx.stroke();\n ctx.lineCap = 'butt';\n }\n if (annotation.type === 'circle' && theme.annotations.outline.outlineWidth > 0) {\n ctx.strokeStyle = theme.annotations.outline.outlineColor;\n ctx.lineWidth = theme.annotations.outline.strokeWidth + theme.annotations.outline.outlineWidth * 2;\n ctx.beginPath();\n ctx.arc(annotation.x, annotation.y, annotation.size / 2, 0, 2 * Math.PI);\n ctx.stroke();\n }\n if (annotation.type === 'dot' && theme.annotations.symbol.outlineWidth > 0) {\n ctx.strokeStyle = theme.annotations.symbol.outlineColor;\n ctx.lineWidth = theme.annotations.symbol.outlineWidth * 2;\n ctx.beginPath();\n ctx.arc(annotation.x, annotation.y, annotation.size / 2, 0, 2 * Math.PI);\n ctx.stroke();\n }\n if (annotation.type === 'rect' && theme.annotations.outline.outlineWidth > 0) {\n ctx.strokeStyle = theme.annotations.outline.outlineColor;\n ctx.lineWidth = theme.annotations.outline.strokeWidth + theme.annotations.outline.outlineWidth * 2;\n ctx.beginPath();\n ctx.rect(annotation.x - annotation.width / 2, annotation.y - annotation.height / 2, annotation.width, annotation.height);\n ctx.stroke();\n }\n ctx.strokeStyle = theme.annotations.link.stroke;\n ctx.lineWidth = theme.annotations.link.strokeWidth;\n ctx.beginPath();\n drawPoints(ctx, annotation.computed.points);\n ctx.stroke();\n if (annotation.type === 'circle') {\n ctx.strokeStyle = theme.annotations.outline.stroke;\n ctx.lineWidth = theme.annotations.outline.strokeWidth;\n ctx.beginPath();\n ctx.arc(annotation.x, annotation.y, annotation.size / 2, 0, 2 * Math.PI);\n ctx.stroke();\n }\n if (annotation.type === 'dot') {\n ctx.fillStyle = theme.annotations.symbol.fill;\n ctx.beginPath();\n ctx.arc(annotation.x, annotation.y, annotation.size / 2, 0, 2 * Math.PI);\n ctx.fill();\n }\n if (annotation.type === 'rect') {\n ctx.strokeStyle = theme.annotations.outline.stroke;\n ctx.lineWidth = theme.annotations.outline.strokeWidth;\n ctx.beginPath();\n ctx.rect(annotation.x - annotation.width / 2, annotation.y - annotation.height / 2, annotation.width, annotation.height);\n ctx.stroke();\n }\n if (typeof annotation.note === 'function') {\n annotation.note(ctx, {\n datum: annotation.datum,\n x: annotation.computed.text[0],\n y: annotation.computed.text[1],\n theme: theme\n });\n } else {\n ctx.font = \"\".concat(theme.annotations.text.fontSize, \"px \").concat(theme.annotations.text.fontFamily);\n ctx.fillStyle = theme.annotations.text.fill;\n ctx.strokeStyle = theme.annotations.text.outlineColor;\n ctx.lineWidth = theme.annotations.text.outlineWidth * 2;\n if (theme.annotations.text.outlineWidth > 0) {\n ctx.lineJoin = 'round';\n ctx.strokeText(annotation.note, annotation.computed.text[0], annotation.computed.text[1]);\n ctx.lineJoin = 'miter';\n }\n ctx.fillText(annotation.note, annotation.computed.text[0], annotation.computed.text[1]);\n }\n });\n ctx.restore();\n};\n\nexport { Annotation, annotationSpecPropType, bindAnnotations, computeAnnotation, defaultProps, getLinkAngle, renderAnnotationsToCanvas, useAnnotations, useComputedAnnotation, useComputedAnnotations };\n//# sourceMappingURL=nivo-annotations.es.js.map\n","import React, { Fragment, Component } from 'react';\nimport { TransitionMotion, spring } from 'react-motion';\nimport { defsPropTypes, noop, withTheme, withDimensions, withMotion, getAccessorFor, getLabelGenerator, bindDefs, Container, CartesianMarkers, SvgWrapper, getRelativeCursor, isCursorInRect, ResponsiveWrapper } from '@nivo/core';\nimport { axisPropType, Grid, Axes, renderGridLinesToCanvas, renderAxesToCanvas } from '@nivo/axes';\nimport { LegendPropShape, BoxLegendSvg, renderLegendToCanvas } from '@nivo/legends';\nimport min from 'lodash/min';\nimport max from 'lodash/max';\nimport range from 'lodash/range';\nimport { scaleBand, scaleLinear } from 'd3-scale';\nimport flattenDepth from 'lodash/flattenDepth';\nimport { stack, stackOffsetDiverging } from 'd3-shape';\nimport _uniqBy from 'lodash/uniqBy';\nimport setDisplayName from 'recompose/setDisplayName';\nimport { compose as compose$1 } from 'recompose';\nimport defaultProps from 'recompose/defaultProps';\nimport withPropsOnChange from 'recompose/withPropsOnChange';\nimport pure from 'recompose/pure';\nimport { inheritedColorPropType, ordinalColorsPropType, colorPropertyAccessorPropType, getOrdinalColorScale, getInheritedColorGenerator } from '@nivo/colors';\nimport PropTypes from 'prop-types';\nimport compose from 'recompose/compose';\nimport { BasicTooltip } from '@nivo/tooltip';\nimport { useAnnotations, Annotation } from '@nivo/annotations';\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nvar getIndexedScale = function getIndexedScale(data, getIndex, range, padding) {\n return scaleBand().rangeRound(range).domain(data.map(getIndex)).padding(padding);\n};\n\nvar getGroupedScale = function getGroupedScale(data, keys, _minValue, _maxValue, range) {\n var allValues = data.reduce(function (acc, entry) {\n return [].concat(_toConsumableArray(acc), _toConsumableArray(keys.map(function (k) {\n return entry[k];\n })));\n }, []);\n var maxValue = _maxValue;\n if (maxValue === 'auto') {\n maxValue = max(allValues);\n }\n var minValue = _minValue;\n if (minValue === 'auto') {\n minValue = min(allValues);\n if (minValue > 0) minValue = 0;\n }\n return scaleLinear().rangeRound(range).domain([minValue, maxValue]);\n};\nvar generateVerticalGroupedBars = function generateVerticalGroupedBars(_ref) {\n var data = _ref.data,\n getIndex = _ref.getIndex,\n keys = _ref.keys,\n minValue = _ref.minValue,\n maxValue = _ref.maxValue,\n reverse = _ref.reverse,\n width = _ref.width,\n height = _ref.height,\n getColor = _ref.getColor,\n _ref$padding = _ref.padding,\n padding = _ref$padding === void 0 ? 0 : _ref$padding,\n _ref$innerPadding = _ref.innerPadding,\n innerPadding = _ref$innerPadding === void 0 ? 0 : _ref$innerPadding;\n var xScale = getIndexedScale(data, getIndex, [0, width], padding);\n var yRange = reverse ? [0, height] : [height, 0];\n var yScale = getGroupedScale(data, keys, minValue, maxValue, yRange);\n var barWidth = (xScale.bandwidth() - innerPadding * (keys.length - 1)) / keys.length;\n var yRef = yScale(0);\n var getY = function getY(d) {\n return d > 0 ? yScale(d) : yRef;\n };\n var getHeight = function getHeight(d, y) {\n return d > 0 ? yRef - y : yScale(d) - yRef;\n };\n if (reverse) {\n getY = function getY(d) {\n return d < 0 ? yScale(d) : yRef;\n };\n getHeight = function getHeight(d, y) {\n return d < 0 ? yRef - y : yScale(d) - yRef;\n };\n }\n var bars = [];\n if (barWidth > 0) {\n keys.forEach(function (key, i) {\n range(xScale.domain().length).forEach(function (index) {\n var x = xScale(getIndex(data[index])) + barWidth * i + innerPadding * i;\n var y = getY(data[index][key]);\n var barHeight = getHeight(data[index][key], y);\n if (barWidth > 0 && barHeight > 0) {\n var barData = {\n id: key,\n value: data[index][key],\n index: index,\n indexValue: getIndex(data[index]),\n data: data[index]\n };\n bars.push({\n key: \"\".concat(key, \".\").concat(barData.indexValue),\n data: barData,\n x: x,\n y: y,\n width: barWidth,\n height: barHeight,\n color: getColor(barData)\n });\n }\n });\n });\n }\n return {\n xScale: xScale,\n yScale: yScale,\n bars: bars\n };\n};\nvar generateHorizontalGroupedBars = function generateHorizontalGroupedBars(_ref2) {\n var data = _ref2.data,\n getIndex = _ref2.getIndex,\n keys = _ref2.keys,\n minValue = _ref2.minValue,\n maxValue = _ref2.maxValue,\n reverse = _ref2.reverse,\n width = _ref2.width,\n height = _ref2.height,\n getColor = _ref2.getColor,\n _ref2$padding = _ref2.padding,\n padding = _ref2$padding === void 0 ? 0 : _ref2$padding,\n _ref2$innerPadding = _ref2.innerPadding,\n innerPadding = _ref2$innerPadding === void 0 ? 0 : _ref2$innerPadding;\n var xRange = reverse ? [width, 0] : [0, width];\n var xScale = getGroupedScale(data, keys, minValue, maxValue, xRange);\n var yScale = getIndexedScale(data, getIndex, [height, 0], padding);\n var barHeight = (yScale.bandwidth() - innerPadding * (keys.length - 1)) / keys.length;\n var xRef = xScale(0);\n var getX = function getX(d) {\n return d > 0 ? xRef : xScale(d);\n };\n var getWidth = function getWidth(d, x) {\n return d > 0 ? xScale(d) - xRef : xRef - x;\n };\n if (reverse) {\n getX = function getX(d) {\n return d < 0 ? xRef : xScale(d);\n };\n getWidth = function getWidth(d, x) {\n return d < 0 ? xScale(d) - xRef : xRef - x;\n };\n }\n var bars = [];\n if (barHeight > 0) {\n keys.forEach(function (key, i) {\n range(yScale.domain().length).forEach(function (index) {\n var x = getX(data[index][key]);\n var y = yScale(getIndex(data[index])) + barHeight * i + innerPadding * i;\n var barWidth = getWidth(data[index][key], x);\n if (barWidth > 0) {\n var barData = {\n id: key,\n value: data[index][key],\n index: index,\n indexValue: getIndex(data[index]),\n data: data[index]\n };\n bars.push({\n key: \"\".concat(key, \".\").concat(barData.indexValue),\n data: barData,\n x: x,\n y: y,\n width: barWidth,\n height: barHeight,\n color: getColor(barData)\n });\n }\n });\n });\n }\n return {\n xScale: xScale,\n yScale: yScale,\n bars: bars\n };\n};\nvar generateGroupedBars = function generateGroupedBars(options) {\n return options.layout === 'vertical' ? generateVerticalGroupedBars(options) : generateHorizontalGroupedBars(options);\n};\n\nvar getStackedScale = function getStackedScale(data, _minValue, _maxValue, range) {\n var allValues = flattenDepth(data, 2);\n var minValue = _minValue;\n if (minValue === 'auto') {\n minValue = min(allValues);\n }\n var maxValue = _maxValue;\n if (maxValue === 'auto') {\n maxValue = max(allValues);\n }\n return scaleLinear().rangeRound(range).domain([minValue, maxValue]);\n};\nvar generateVerticalStackedBars = function generateVerticalStackedBars(_ref) {\n var data = _ref.data,\n getIndex = _ref.getIndex,\n keys = _ref.keys,\n minValue = _ref.minValue,\n maxValue = _ref.maxValue,\n reverse = _ref.reverse,\n width = _ref.width,\n height = _ref.height,\n getColor = _ref.getColor,\n _ref$padding = _ref.padding,\n padding = _ref$padding === void 0 ? 0 : _ref$padding,\n _ref$innerPadding = _ref.innerPadding,\n innerPadding = _ref$innerPadding === void 0 ? 0 : _ref$innerPadding;\n var stackedData = stack().keys(keys).offset(stackOffsetDiverging)(data);\n var xScale = getIndexedScale(data, getIndex, [0, width], padding);\n var yRange = reverse ? [0, height] : [height, 0];\n var yScale = getStackedScale(stackedData, minValue, maxValue, yRange);\n var bars = [];\n var barWidth = xScale.bandwidth();\n var getY = function getY(d) {\n return yScale(d[1]);\n };\n var getHeight = function getHeight(d, y) {\n return yScale(d[0]) - y;\n };\n if (reverse) {\n getY = function getY(d) {\n return yScale(d[0]);\n };\n getHeight = function getHeight(d, y) {\n return yScale(d[1]) - y;\n };\n }\n if (barWidth > 0) {\n stackedData.forEach(function (stackedDataItem) {\n xScale.domain().forEach(function (index, i) {\n var d = stackedDataItem[i];\n var x = xScale(getIndex(d.data));\n var y = getY(d);\n var barHeight = getHeight(d, y);\n if (innerPadding > 0) {\n y += innerPadding * 0.5;\n barHeight -= innerPadding;\n }\n if (barHeight > 0) {\n var barData = {\n id: stackedDataItem.key,\n value: d.data[stackedDataItem.key],\n index: i,\n indexValue: index,\n data: d.data\n };\n bars.push({\n key: \"\".concat(stackedDataItem.key, \".\").concat(index),\n data: barData,\n x: x,\n y: y,\n width: barWidth,\n height: barHeight,\n color: getColor(barData)\n });\n }\n });\n });\n }\n return {\n xScale: xScale,\n yScale: yScale,\n bars: bars\n };\n};\nvar generateHorizontalStackedBars = function generateHorizontalStackedBars(_ref2) {\n var data = _ref2.data,\n getIndex = _ref2.getIndex,\n keys = _ref2.keys,\n minValue = _ref2.minValue,\n maxValue = _ref2.maxValue,\n reverse = _ref2.reverse,\n width = _ref2.width,\n height = _ref2.height,\n getColor = _ref2.getColor,\n _ref2$padding = _ref2.padding,\n padding = _ref2$padding === void 0 ? 0 : _ref2$padding,\n _ref2$innerPadding = _ref2.innerPadding,\n innerPadding = _ref2$innerPadding === void 0 ? 0 : _ref2$innerPadding;\n var stackedData = stack().keys(keys).offset(stackOffsetDiverging)(data);\n var xRange = reverse ? [width, 0] : [0, width];\n var xScale = getStackedScale(stackedData, minValue, maxValue, xRange);\n var yScale = getIndexedScale(data, getIndex, [height, 0], padding);\n var bars = [];\n var barHeight = yScale.bandwidth();\n var getX = function getX(d) {\n return xScale(d[0]);\n };\n var getWidth = function getWidth(d, x) {\n return xScale(d[1]) - x;\n };\n if (reverse) {\n getX = function getX(d) {\n return xScale(d[1]);\n };\n getWidth = function getWidth(d, y) {\n return xScale(d[0]) - y;\n };\n }\n if (barHeight > 0) {\n stackedData.forEach(function (stackedDataItem) {\n yScale.domain().forEach(function (index, i) {\n var d = stackedDataItem[i];\n var y = yScale(getIndex(d.data));\n var barData = {\n id: stackedDataItem.key,\n value: d.data[stackedDataItem.key],\n index: i,\n indexValue: index,\n data: d.data\n };\n var x = getX(d);\n var barWidth = getWidth(d, x);\n if (innerPadding > 0) {\n x += innerPadding * 0.5;\n barWidth -= innerPadding;\n }\n if (barWidth > 0) {\n bars.push({\n key: \"\".concat(stackedDataItem.key, \".\").concat(index),\n data: barData,\n x: x,\n y: y,\n width: barWidth,\n height: barHeight,\n color: getColor(barData)\n });\n }\n });\n });\n }\n return {\n xScale: xScale,\n yScale: yScale,\n bars: bars\n };\n};\nvar generateStackedBars = function generateStackedBars(options) {\n return options.layout === 'vertical' ? generateVerticalStackedBars(options) : generateHorizontalStackedBars(options);\n};\n\nvar getLegendDataForKeys = function getLegendDataForKeys(bars, layout, direction, groupMode, reverse) {\n var data = _uniqBy(bars.map(function (bar) {\n return {\n id: bar.data.id,\n label: bar.data.id,\n color: bar.color,\n fill: bar.data.fill\n };\n }), function (_ref) {\n var id = _ref.id;\n return id;\n });\n if (layout === 'vertical' && groupMode === 'stacked' && direction === 'column' && reverse !== true || layout === 'horizontal' && groupMode === 'stacked' && reverse === true) {\n data.reverse();\n }\n return data;\n};\nvar getLegendDataForIndexes = function getLegendDataForIndexes(bars) {\n return _uniqBy(bars.map(function (bar) {\n return {\n id: bar.data.indexValue,\n label: bar.data.indexValue,\n color: bar.color,\n fill: bar.data.fill\n };\n }), function (_ref2) {\n var id = _ref2.id;\n return id;\n });\n};\nvar getLegendData = function getLegendData(_ref3) {\n var from = _ref3.from,\n bars = _ref3.bars,\n layout = _ref3.layout,\n direction = _ref3.direction,\n groupMode = _ref3.groupMode,\n reverse = _ref3.reverse;\n if (from === 'indexes') {\n return getLegendDataForIndexes(bars);\n }\n return getLegendDataForKeys(bars, layout, direction, groupMode, reverse);\n};\n\nvar BarItem = function BarItem(_ref) {\n var data = _ref.data,\n x = _ref.x,\n y = _ref.y,\n width = _ref.width,\n height = _ref.height,\n borderRadius = _ref.borderRadius,\n color = _ref.color,\n borderWidth = _ref.borderWidth,\n borderColor = _ref.borderColor,\n label = _ref.label,\n shouldRenderLabel = _ref.shouldRenderLabel,\n labelColor = _ref.labelColor,\n showTooltip = _ref.showTooltip,\n hideTooltip = _ref.hideTooltip,\n onClick = _ref.onClick,\n onMouseEnter = _ref.onMouseEnter,\n onMouseLeave = _ref.onMouseLeave,\n tooltip = _ref.tooltip,\n theme = _ref.theme;\n var handleTooltip = function handleTooltip(e) {\n return showTooltip(tooltip, e);\n };\n var handleMouseEnter = function handleMouseEnter(e) {\n onMouseEnter(data, e);\n showTooltip(tooltip, e);\n };\n var handleMouseLeave = function handleMouseLeave(e) {\n onMouseLeave(data, e);\n hideTooltip(e);\n };\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \", \").concat(y, \")\")\n }, React.createElement(\"rect\", {\n width: width,\n height: height,\n rx: borderRadius,\n ry: borderRadius,\n fill: data.fill ? data.fill : color,\n strokeWidth: borderWidth,\n stroke: borderColor,\n onMouseEnter: handleMouseEnter,\n onMouseMove: handleTooltip,\n onMouseLeave: handleMouseLeave,\n onClick: onClick\n }), shouldRenderLabel && React.createElement(\"text\", {\n x: width / 2,\n y: height / 2,\n textAnchor: \"middle\",\n dominantBaseline: \"central\",\n style: _objectSpread2(_objectSpread2({}, theme.labels.text), {}, {\n pointerEvents: 'none',\n fill: labelColor\n })\n }, label));\n};\nvar enhance = compose(withPropsOnChange(['data', 'color', 'onClick'], function (_ref2) {\n var data = _ref2.data,\n color = _ref2.color,\n _onClick = _ref2.onClick;\n return {\n onClick: function onClick(event) {\n return _onClick(_objectSpread2({\n color: color\n }, data), event);\n }\n };\n}), withPropsOnChange(['data', 'color', 'theme', 'tooltip', 'getTooltipLabel', 'tooltipFormat'], function (_ref3) {\n var data = _ref3.data,\n color = _ref3.color,\n theme = _ref3.theme,\n tooltip = _ref3.tooltip,\n getTooltipLabel = _ref3.getTooltipLabel,\n tooltipFormat = _ref3.tooltipFormat;\n return {\n tooltip: React.createElement(BasicTooltip, {\n id: getTooltipLabel(data),\n value: data.value,\n enableChip: true,\n color: color,\n theme: theme,\n format: tooltipFormat,\n renderContent: typeof tooltip === 'function' ? tooltip.bind(null, _objectSpread2({\n color: color,\n theme: theme\n }, data)) : null\n })\n };\n}), pure);\nvar BarItem$1 = enhance(BarItem);\n\nvar BarPropTypes = _objectSpread2(_objectSpread2({\n data: PropTypes.arrayOf(PropTypes.object).isRequired,\n indexBy: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired,\n getIndex: PropTypes.func.isRequired,\n keys: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])).isRequired,\n layers: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['grid', 'axes', 'bars', 'markers', 'legends', 'annotations']), PropTypes.func])).isRequired,\n groupMode: PropTypes.oneOf(['stacked', 'grouped']).isRequired,\n layout: PropTypes.oneOf(['horizontal', 'vertical']).isRequired,\n reverse: PropTypes.bool.isRequired,\n minValue: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['auto'])]).isRequired,\n maxValue: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['auto'])]).isRequired,\n padding: PropTypes.number.isRequired,\n innerPadding: PropTypes.number.isRequired,\n axisTop: axisPropType,\n axisRight: axisPropType,\n axisBottom: axisPropType,\n axisLeft: axisPropType,\n enableGridX: PropTypes.bool.isRequired,\n enableGridY: PropTypes.bool.isRequired,\n gridXValues: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]))]),\n gridYValues: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]))]),\n barComponent: PropTypes.func.isRequired,\n enableLabel: PropTypes.bool.isRequired,\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired,\n labelFormat: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n getLabel: PropTypes.func.isRequired,\n labelSkipWidth: PropTypes.number.isRequired,\n labelSkipHeight: PropTypes.number.isRequired,\n labelTextColor: inheritedColorPropType.isRequired,\n getLabelTextColor: PropTypes.func.isRequired,\n labelLinkColor: inheritedColorPropType.isRequired,\n getLabelLinkColor: PropTypes.func.isRequired,\n colors: ordinalColorsPropType.isRequired,\n colorBy: colorPropertyAccessorPropType.isRequired,\n borderRadius: PropTypes.number.isRequired,\n getColor: PropTypes.func.isRequired\n}, defsPropTypes), {}, {\n borderWidth: PropTypes.number.isRequired,\n borderColor: inheritedColorPropType.isRequired,\n getBorderColor: PropTypes.func.isRequired,\n isInteractive: PropTypes.bool,\n onClick: PropTypes.func.isRequired,\n onMouseEnter: PropTypes.func.isRequired,\n onMouseLeave: PropTypes.func.isRequired,\n tooltipLabel: PropTypes.func,\n getTooltipLabel: PropTypes.func.isRequired,\n tooltipFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n tooltip: PropTypes.func,\n legends: PropTypes.arrayOf(PropTypes.shape(_objectSpread2({\n dataFrom: PropTypes.oneOf(['indexes', 'keys']).isRequired\n }, LegendPropShape))).isRequired,\n pixelRatio: PropTypes.number.isRequired\n});\nvar BarSvgPropTypes = _objectSpread2(_objectSpread2({}, BarPropTypes), {}, {\n role: PropTypes.string.isRequired\n});\nvar BarDefaultProps = {\n indexBy: 'id',\n keys: ['value'],\n layers: ['grid', 'axes', 'bars', 'markers', 'legends', 'annotations'],\n groupMode: 'stacked',\n layout: 'vertical',\n reverse: false,\n minValue: 'auto',\n maxValue: 'auto',\n padding: 0.1,\n innerPadding: 0,\n axisBottom: {},\n axisLeft: {},\n enableGridX: false,\n enableGridY: true,\n barComponent: BarItem$1,\n enableLabel: true,\n label: 'value',\n labelSkipWidth: 0,\n labelSkipHeight: 0,\n labelLinkColor: 'theme',\n labelTextColor: 'theme',\n colors: {\n scheme: 'nivo'\n },\n colorBy: 'id',\n defs: [],\n fill: [],\n borderRadius: 0,\n borderWidth: 0,\n borderColor: {\n from: 'color'\n },\n isInteractive: true,\n onClick: noop,\n onMouseEnter: noop,\n onMouseLeave: noop,\n legends: [],\n annotations: [],\n pixelRatio: global.window && global.window.devicePixelRatio ? global.window.devicePixelRatio : 1\n};\nvar BarSvgDefaultProps = _objectSpread2(_objectSpread2({}, BarDefaultProps), {}, {\n role: 'img'\n});\n\nvar enhance$1 = (function (Component) {\n return compose$1(defaultProps(BarDefaultProps), withTheme(), withDimensions(), withMotion(), withPropsOnChange(['colors', 'colorBy'], function (_ref) {\n var colors = _ref.colors,\n colorBy = _ref.colorBy;\n return {\n getColor: getOrdinalColorScale(colors, colorBy)\n };\n }), withPropsOnChange(['indexBy'], function (_ref2) {\n var indexBy = _ref2.indexBy;\n return {\n getIndex: getAccessorFor(indexBy)\n };\n }), withPropsOnChange(['labelTextColor', 'theme'], function (_ref3) {\n var labelTextColor = _ref3.labelTextColor,\n theme = _ref3.theme;\n return {\n getLabelTextColor: getInheritedColorGenerator(labelTextColor, theme)\n };\n }), withPropsOnChange(['labelLinkColor', 'theme'], function (_ref4) {\n var labelLinkColor = _ref4.labelLinkColor,\n theme = _ref4.theme;\n return {\n getLabelLinkColor: getInheritedColorGenerator(labelLinkColor, theme)\n };\n }), withPropsOnChange(['label', 'labelFormat'], function (_ref5) {\n var label = _ref5.label,\n labelFormat = _ref5.labelFormat;\n return {\n getLabel: getLabelGenerator(label, labelFormat)\n };\n }), withPropsOnChange(['borderColor', 'theme'], function (_ref6) {\n var borderColor = _ref6.borderColor,\n theme = _ref6.theme;\n return {\n getBorderColor: getInheritedColorGenerator(borderColor, theme)\n };\n }), withPropsOnChange(['tooltipLabel'], function (_ref7) {\n var tooltipLabel = _ref7.tooltipLabel;\n var getTooltipLabel = function getTooltipLabel(d) {\n return \"\".concat(d.id, \" - \").concat(d.indexValue);\n };\n if (typeof tooltipLabel === 'function') {\n getTooltipLabel = tooltipLabel;\n }\n return {\n getTooltipLabel: getTooltipLabel\n };\n }), pure)(Component);\n});\n\nvar BarAnnotations = function BarAnnotations(_ref) {\n var bars = _ref.bars,\n annotations = _ref.annotations,\n animate = _ref.animate,\n motionStiffness = _ref.motionStiffness,\n motionDamping = _ref.motionDamping;\n var boundAnnotations = useAnnotations({\n items: bars,\n annotations: annotations,\n getPosition: function getPosition(bar) {\n return {\n x: bar.x + bar.width / 2,\n y: bar.y + bar.height / 2\n };\n },\n getDimensions: function getDimensions(bar, offset) {\n var width = bar.width + offset * 2;\n var height = bar.height + offset * 2;\n return {\n width: width,\n height: height,\n size: Math.max(width, height)\n };\n }\n });\n return boundAnnotations.map(function (annotation, i) {\n return React.createElement(Annotation, Object.assign({\n key: i\n }, annotation, {\n containerWidth: innerWidth,\n containerHeight: innerHeight,\n animate: animate,\n motionStiffness: motionStiffness,\n motionDamping: motionDamping\n }));\n });\n};\n\nvar barWillEnterHorizontal = function barWillEnterHorizontal(_ref) {\n var style = _ref.style;\n return {\n x: style.x.val,\n y: style.y.val,\n width: 0,\n height: style.height.val\n };\n};\nvar barWillEnterVertical = function barWillEnterVertical(_ref2) {\n var style = _ref2.style;\n return {\n x: style.x.val,\n y: style.y.val + style.height.val,\n width: style.width.val,\n height: 0\n };\n};\nvar barWillLeaveHorizontal = function barWillLeaveHorizontal(springConfig) {\n return function (_ref3) {\n var style = _ref3.style;\n return {\n x: style.x,\n y: style.y,\n width: spring(0, springConfig),\n height: style.height\n };\n };\n};\nvar barWillLeaveVertical = function barWillLeaveVertical(springConfig) {\n return function (_ref4) {\n var style = _ref4.style;\n return {\n x: style.x,\n y: spring(style.y.val + style.height.val, springConfig),\n width: style.width,\n height: spring(0, springConfig)\n };\n };\n};\nvar Bar = function Bar(props) {\n var data = props.data,\n getIndex = props.getIndex,\n keys = props.keys,\n groupMode = props.groupMode,\n layout = props.layout,\n reverse = props.reverse,\n minValue = props.minValue,\n maxValue = props.maxValue,\n margin = props.margin,\n width = props.width,\n height = props.height,\n outerWidth = props.outerWidth,\n outerHeight = props.outerHeight,\n padding = props.padding,\n innerPadding = props.innerPadding,\n axisTop = props.axisTop,\n axisRight = props.axisRight,\n axisBottom = props.axisBottom,\n axisLeft = props.axisLeft,\n enableGridX = props.enableGridX,\n enableGridY = props.enableGridY,\n gridXValues = props.gridXValues,\n gridYValues = props.gridYValues,\n layers = props.layers,\n barComponent = props.barComponent,\n enableLabel = props.enableLabel,\n getLabel = props.getLabel,\n labelSkipWidth = props.labelSkipWidth,\n labelSkipHeight = props.labelSkipHeight,\n getLabelTextColor = props.getLabelTextColor,\n markers = props.markers,\n theme = props.theme,\n getColor = props.getColor,\n defs = props.defs,\n fill = props.fill,\n borderRadius = props.borderRadius,\n borderWidth = props.borderWidth,\n getBorderColor = props.getBorderColor,\n annotations = props.annotations,\n isInteractive = props.isInteractive,\n getTooltipLabel = props.getTooltipLabel,\n tooltipFormat = props.tooltipFormat,\n tooltip = props.tooltip,\n onClick = props.onClick,\n onMouseEnter = props.onMouseEnter,\n onMouseLeave = props.onMouseLeave,\n legends = props.legends,\n animate = props.animate,\n motionStiffness = props.motionStiffness,\n motionDamping = props.motionDamping,\n role = props.role;\n var options = {\n layout: layout,\n reverse: reverse,\n data: data,\n getIndex: getIndex,\n keys: keys,\n minValue: minValue,\n maxValue: maxValue,\n width: width,\n height: height,\n getColor: getColor,\n padding: padding,\n innerPadding: innerPadding\n };\n var result = groupMode === 'grouped' ? generateGroupedBars(options) : generateStackedBars(options);\n var motionProps = {\n animate: animate,\n motionDamping: motionDamping,\n motionStiffness: motionStiffness\n };\n var springConfig = {\n damping: motionDamping,\n stiffness: motionStiffness\n };\n var willEnter = layout === 'vertical' ? barWillEnterVertical : barWillEnterHorizontal;\n var willLeave = layout === 'vertical' ? barWillLeaveVertical(springConfig) : barWillLeaveHorizontal(springConfig);\n var shouldRenderLabel = function shouldRenderLabel(_ref5) {\n var width = _ref5.width,\n height = _ref5.height;\n if (!enableLabel) return false;\n if (labelSkipWidth > 0 && width < labelSkipWidth) return false;\n if (labelSkipHeight > 0 && height < labelSkipHeight) return false;\n return true;\n };\n var boundDefs = bindDefs(defs, result.bars, fill, {\n dataKey: 'data',\n targetKey: 'data.fill'\n });\n return React.createElement(Container, {\n isInteractive: isInteractive,\n theme: theme,\n animate: animate,\n motionStiffness: motionStiffness,\n motionDamping: motionDamping\n }, function (_ref6) {\n var showTooltip = _ref6.showTooltip,\n hideTooltip = _ref6.hideTooltip;\n var commonProps = {\n borderRadius: borderRadius,\n borderWidth: borderWidth,\n enableLabel: enableLabel,\n labelSkipWidth: labelSkipWidth,\n labelSkipHeight: labelSkipHeight,\n showTooltip: showTooltip,\n hideTooltip: hideTooltip,\n onClick: onClick,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n theme: theme,\n getTooltipLabel: getTooltipLabel,\n tooltipFormat: tooltipFormat,\n tooltip: tooltip\n };\n var bars;\n if (animate === true) {\n bars = React.createElement(TransitionMotion, {\n key: \"bars\",\n willEnter: willEnter,\n willLeave: willLeave,\n styles: result.bars.map(function (bar) {\n return {\n key: bar.key,\n data: bar,\n style: {\n x: spring(bar.x, springConfig),\n y: spring(bar.y, springConfig),\n width: spring(bar.width, springConfig),\n height: spring(bar.height, springConfig)\n }\n };\n })\n }, function (interpolatedStyles) {\n return React.createElement(\"g\", null, interpolatedStyles.map(function (_ref7) {\n var key = _ref7.key,\n style = _ref7.style,\n bar = _ref7.data;\n var baseProps = _objectSpread2(_objectSpread2({}, bar), style);\n return React.createElement(barComponent, _objectSpread2(_objectSpread2(_objectSpread2({\n key: key\n }, baseProps), commonProps), {}, {\n shouldRenderLabel: shouldRenderLabel(baseProps),\n width: Math.max(style.width, 0),\n height: Math.max(style.height, 0),\n label: getLabel(bar.data),\n labelColor: getLabelTextColor(baseProps, theme),\n borderColor: getBorderColor(baseProps),\n theme: theme\n }));\n }));\n });\n } else {\n bars = result.bars.map(function (d) {\n return React.createElement(barComponent, _objectSpread2(_objectSpread2(_objectSpread2({\n key: d.key\n }, d), commonProps), {}, {\n label: getLabel(d.data),\n shouldRenderLabel: shouldRenderLabel(d),\n labelColor: getLabelTextColor(d, theme),\n borderColor: getBorderColor(d),\n theme: theme\n }));\n });\n }\n var layerById = {\n grid: React.createElement(Grid, {\n key: \"grid\",\n width: width,\n height: height,\n xScale: enableGridX ? result.xScale : null,\n yScale: enableGridY ? result.yScale : null,\n xValues: gridXValues,\n yValues: gridYValues\n }),\n axes: React.createElement(Axes, {\n key: \"axes\",\n xScale: result.xScale,\n yScale: result.yScale,\n width: width,\n height: height,\n top: axisTop,\n right: axisRight,\n bottom: axisBottom,\n left: axisLeft\n }),\n bars: bars,\n markers: React.createElement(CartesianMarkers, {\n key: \"markers\",\n markers: markers,\n width: width,\n height: height,\n xScale: result.xScale,\n yScale: result.yScale,\n theme: theme\n }),\n legends: legends.map(function (legend, i) {\n var legendData = getLegendData({\n from: legend.dataFrom,\n bars: result.bars,\n layout: layout,\n direction: legend.direction,\n groupMode: groupMode,\n reverse: reverse\n });\n if (legendData === undefined) return null;\n return React.createElement(BoxLegendSvg, Object.assign({\n key: i\n }, legend, {\n containerWidth: width,\n containerHeight: height,\n data: legendData,\n theme: theme\n }));\n }),\n annotations: React.createElement(BarAnnotations, Object.assign({\n key: \"annotations\",\n innerWidth: width,\n innerHeight: height,\n bars: result.bars,\n annotations: annotations\n }, motionProps))\n };\n return React.createElement(SvgWrapper, {\n width: outerWidth,\n height: outerHeight,\n margin: margin,\n defs: boundDefs,\n theme: theme,\n role: role\n }, layers.map(function (layer, i) {\n if (typeof layer === 'function') {\n return React.createElement(Fragment, {\n key: i\n }, layer(_objectSpread2(_objectSpread2(_objectSpread2({}, props), result), {}, {\n showTooltip: showTooltip,\n hideTooltip: hideTooltip\n })));\n }\n return layerById[layer];\n }));\n });\n};\nBar.defaultProps = BarSvgDefaultProps;\nvar Bar$1 = setDisplayName('Bar')(enhance$1(Bar));\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n return _typeof(obj);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n return function () {\n var Super = _getPrototypeOf(Derived),\n result;\n if (_isNativeReflectConstruct()) {\n var NewTarget = _getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return _possibleConstructorReturn(this, result);\n };\n}\n\nvar findNodeUnderCursor = function findNodeUnderCursor(nodes, margin, x, y) {\n return nodes.find(function (node) {\n return isCursorInRect(node.x + margin.left, node.y + margin.top, node.width, node.height, x, y);\n });\n};\nvar BarCanvas = function (_Component) {\n _inherits(BarCanvas, _Component);\n var _super = _createSuper(BarCanvas);\n function BarCanvas() {\n var _this;\n _classCallCheck(this, BarCanvas);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _this.handleMouseHover = function (showTooltip, hideTooltip) {\n return function (event) {\n if (!_this.bars) return;\n var _this$props = _this.props,\n margin = _this$props.margin,\n theme = _this$props.theme,\n tooltip = _this$props.tooltip,\n getTooltipLabel = _this$props.getTooltipLabel,\n tooltipFormat = _this$props.tooltipFormat;\n var _getRelativeCursor = getRelativeCursor(_this.surface, event),\n _getRelativeCursor2 = _slicedToArray(_getRelativeCursor, 2),\n x = _getRelativeCursor2[0],\n y = _getRelativeCursor2[1];\n var bar = findNodeUnderCursor(_this.bars, margin, x, y);\n if (bar !== undefined) {\n showTooltip( React.createElement(BasicTooltip, {\n id: getTooltipLabel(bar.data),\n value: bar.data.value,\n enableChip: true,\n color: bar.color,\n theme: theme,\n format: tooltipFormat,\n renderContent: typeof tooltip === 'function' ? tooltip.bind(null, _objectSpread2({\n color: bar.color\n }, bar.data)) : null\n }), event);\n } else {\n hideTooltip();\n }\n };\n };\n _this.handleMouseLeave = function (hideTooltip) {\n return function () {\n hideTooltip();\n };\n };\n _this.handleClick = function (event) {\n if (!_this.bars) return;\n var _this$props2 = _this.props,\n margin = _this$props2.margin,\n onClick = _this$props2.onClick;\n var _getRelativeCursor3 = getRelativeCursor(_this.surface, event),\n _getRelativeCursor4 = _slicedToArray(_getRelativeCursor3, 2),\n x = _getRelativeCursor4[0],\n y = _getRelativeCursor4[1];\n var node = findNodeUnderCursor(_this.bars, margin, x, y);\n if (node !== undefined) onClick(node.data, event);\n };\n return _this;\n }\n _createClass(BarCanvas, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.ctx = this.surface.getContext('2d');\n this.draw(this.props);\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(props) {\n if (this.props.outerWidth !== props.outerWidth || this.props.outerHeight !== props.outerHeight || this.props.isInteractive !== props.isInteractive || this.props.theme !== props.theme) {\n return true;\n } else {\n this.draw(props);\n return false;\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.ctx = this.surface.getContext('2d');\n this.draw(this.props);\n }\n }, {\n key: \"draw\",\n value: function draw(props) {\n var _this2 = this;\n var data = props.data,\n keys = props.keys,\n getIndex = props.getIndex,\n minValue = props.minValue,\n maxValue = props.maxValue,\n width = props.width,\n height = props.height,\n outerWidth = props.outerWidth,\n outerHeight = props.outerHeight,\n pixelRatio = props.pixelRatio,\n margin = props.margin,\n layout = props.layout,\n reverse = props.reverse,\n groupMode = props.groupMode,\n padding = props.padding,\n innerPadding = props.innerPadding,\n axisTop = props.axisTop,\n axisRight = props.axisRight,\n axisBottom = props.axisBottom,\n axisLeft = props.axisLeft,\n theme = props.theme,\n getColor = props.getColor,\n borderWidth = props.borderWidth,\n getBorderColor = props.getBorderColor,\n legends = props.legends,\n enableGridX = props.enableGridX,\n gridXValues = props.gridXValues,\n enableGridY = props.enableGridY,\n gridYValues = props.gridYValues;\n this.surface.width = outerWidth * pixelRatio;\n this.surface.height = outerHeight * pixelRatio;\n this.ctx.scale(pixelRatio, pixelRatio);\n var options = {\n layout: layout,\n reverse: reverse,\n data: data,\n getIndex: getIndex,\n keys: keys,\n minValue: minValue,\n maxValue: maxValue,\n width: width,\n height: height,\n getColor: getColor,\n padding: padding,\n innerPadding: innerPadding\n };\n var result = groupMode === 'grouped' ? generateGroupedBars(options) : generateStackedBars(options);\n this.bars = result.bars;\n this.ctx.fillStyle = theme.background;\n this.ctx.fillRect(0, 0, outerWidth, outerHeight);\n this.ctx.translate(margin.left, margin.top);\n if (theme.grid.line.strokeWidth > 0) {\n this.ctx.lineWidth = theme.grid.line.strokeWidth;\n this.ctx.strokeStyle = theme.grid.line.stroke;\n enableGridX && renderGridLinesToCanvas(this.ctx, {\n width: width,\n height: height,\n scale: result.xScale,\n axis: 'x',\n values: gridXValues\n });\n enableGridY && renderGridLinesToCanvas(this.ctx, {\n width: width,\n height: height,\n scale: result.yScale,\n axis: 'y',\n values: gridYValues\n });\n }\n this.ctx.strokeStyle = '#dddddd';\n var legendDataForKeys = _uniqBy(result.bars.map(function (bar) {\n return {\n id: bar.data.id,\n label: bar.data.id,\n color: bar.color,\n fill: bar.data.fill\n };\n }).reverse(), function (_ref) {\n var id = _ref.id;\n return id;\n });\n var legendDataForIndexes = _uniqBy(result.bars.map(function (bar) {\n return {\n id: bar.data.indexValue,\n label: bar.data.indexValue,\n color: bar.color,\n fill: bar.data.fill\n };\n }), function (_ref2) {\n var id = _ref2.id;\n return id;\n });\n legends.forEach(function (legend) {\n var legendData;\n if (legend.dataFrom === 'keys') {\n legendData = legendDataForKeys;\n } else if (legend.dataFrom === 'indexes') {\n legendData = legendDataForIndexes;\n }\n if (legendData === undefined) return null;\n renderLegendToCanvas(_this2.ctx, _objectSpread2(_objectSpread2({}, legend), {}, {\n data: legendData,\n containerWidth: width,\n containerHeight: height,\n itemTextColor: '#999',\n symbolSize: 16,\n theme: theme\n }));\n });\n renderAxesToCanvas(this.ctx, {\n xScale: result.xScale,\n yScale: result.yScale,\n width: width,\n height: height,\n top: axisTop,\n right: axisRight,\n bottom: axisBottom,\n left: axisLeft,\n theme: theme\n });\n result.bars.forEach(function (bar) {\n var x = bar.x,\n y = bar.y,\n color = bar.color,\n width = bar.width,\n height = bar.height;\n _this2.ctx.fillStyle = color;\n if (borderWidth > 0) {\n _this2.ctx.strokeStyle = getBorderColor(bar);\n _this2.ctx.lineWidth = borderWidth;\n }\n _this2.ctx.beginPath();\n _this2.ctx.rect(x, y, width, height);\n _this2.ctx.fill();\n if (borderWidth > 0) {\n _this2.ctx.stroke();\n }\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n var _this$props3 = this.props,\n outerWidth = _this$props3.outerWidth,\n outerHeight = _this$props3.outerHeight,\n pixelRatio = _this$props3.pixelRatio,\n isInteractive = _this$props3.isInteractive,\n theme = _this$props3.theme;\n return React.createElement(Container, {\n isInteractive: isInteractive,\n theme: theme,\n animate: false\n }, function (_ref3) {\n var showTooltip = _ref3.showTooltip,\n hideTooltip = _ref3.hideTooltip;\n return React.createElement(\"canvas\", {\n ref: function ref(surface) {\n _this3.surface = surface;\n },\n width: outerWidth * pixelRatio,\n height: outerHeight * pixelRatio,\n style: {\n width: outerWidth,\n height: outerHeight\n },\n onMouseEnter: _this3.handleMouseHover(showTooltip, hideTooltip),\n onMouseMove: _this3.handleMouseHover(showTooltip, hideTooltip),\n onMouseLeave: _this3.handleMouseLeave(hideTooltip),\n onClick: _this3.handleClick\n });\n });\n }\n }]);\n return BarCanvas;\n}(Component);\nvar BarCanvas$1 = setDisplayName('BarCanvas')(enhance$1(BarCanvas));\n\nvar ResponsiveBar = function ResponsiveBar(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(Bar$1, Object.assign({\n width: width,\n height: height\n }, props));\n });\n};\n\nvar ResponsiveBarCanvas = function ResponsiveBarCanvas(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(BarCanvas$1, Object.assign({\n width: width,\n height: height\n }, props));\n });\n};\n\nexport { Bar$1 as Bar, BarCanvas$1 as BarCanvas, BarDefaultProps, BarPropTypes, BarSvgDefaultProps, BarSvgPropTypes, ResponsiveBar, ResponsiveBarCanvas };\n//# sourceMappingURL=nivo-bar.es.js.map\n","import React, { memo, useMemo, useCallback, useRef, useState, useEffect } from 'react';\nimport { boxAlignments, alignBox, withContainer, useTheme, useDimensions, useValueFormatter, SvgWrapper, ResponsiveWrapper, degreesToRadians, isCursorInRect, getRelativeCursor } from '@nivo/core';\nimport { LegendPropShape, BoxLegendSvg, renderLegendToCanvas } from '@nivo/legends';\nimport PropTypes from 'prop-types';\nimport { timeFormat } from 'd3-time-format';\nimport { BasicTooltip, useTooltip } from '@nivo/tooltip';\nimport { scaleQuantize } from 'd3-scale';\nimport memoize from 'lodash.memoize';\nimport isDate from 'lodash.isdate';\nimport range from 'lodash.range';\nimport { timeWeeks, timeDays, timeMonths, timeWeek, timeYear } from 'd3-time';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = _objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n}\n\nvar CalendarTooltip = memo(function (_ref) {\n var value = _ref.value,\n day = _ref.day,\n color = _ref.color;\n if (value === undefined || isNaN(value)) return null;\n return React.createElement(BasicTooltip, {\n id: day,\n value: value,\n color: color,\n enableChip: true\n });\n});\nCalendarTooltip.displayName = 'CalendarTooltip';\n\nvar monthLabelFormat = timeFormat('%b');\nvar commonPropTypes = {\n from: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]).isRequired,\n to: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]).isRequired,\n data: PropTypes.arrayOf(PropTypes.shape({\n day: PropTypes.string.isRequired,\n value: PropTypes.number.isRequired\n })).isRequired,\n align: PropTypes.oneOf(boxAlignments).isRequired,\n minValue: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]).isRequired,\n maxValue: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]).isRequired,\n colors: PropTypes.arrayOf(PropTypes.string).isRequired,\n colorScale: PropTypes.func,\n direction: PropTypes.oneOf(['horizontal', 'vertical']),\n emptyColor: PropTypes.string.isRequired,\n yearLegend: PropTypes.func.isRequired,\n yearSpacing: PropTypes.number.isRequired,\n yearLegendPosition: PropTypes.oneOf(['before', 'after']).isRequired,\n yearLegendOffset: PropTypes.number.isRequired,\n monthBorderWidth: PropTypes.number.isRequired,\n monthBorderColor: PropTypes.string.isRequired,\n monthLegend: PropTypes.func.isRequired,\n monthSpacing: PropTypes.number.isRequired,\n monthLegendPosition: PropTypes.oneOf(['before', 'after']).isRequired,\n monthLegendOffset: PropTypes.number.isRequired,\n daySpacing: PropTypes.number.isRequired,\n dayBorderWidth: PropTypes.number.isRequired,\n dayBorderColor: PropTypes.string.isRequired,\n isInteractive: PropTypes.bool,\n onClick: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onMouseMove: PropTypes.func,\n tooltip: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,\n valueFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n legendFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n legends: PropTypes.arrayOf(PropTypes.shape(_objectSpread2(_objectSpread2({}, LegendPropShape), {}, {\n itemCount: PropTypes.number.isRequired\n }))).isRequired\n};\nvar CalendarPropTypes = _objectSpread2(_objectSpread2({}, commonPropTypes), {}, {\n role: PropTypes.string.isRequired\n});\nvar CalendarCanvasPropTypes = _objectSpread2(_objectSpread2({}, commonPropTypes), {}, {\n pixelRatio: PropTypes.number.isRequired\n});\nvar commonDefaultProps = {\n colors: ['#61cdbb', '#97e3d5', '#e8c1a0', '#f47560'],\n align: 'center',\n direction: 'horizontal',\n emptyColor: '#fff',\n minValue: 0,\n maxValue: 'auto',\n yearSpacing: 30,\n yearLegend: function yearLegend(year) {\n return year;\n },\n yearLegendPosition: 'before',\n yearLegendOffset: 10,\n monthBorderWidth: 2,\n monthBorderColor: '#000',\n monthSpacing: 0,\n monthLegend: function monthLegend(year, month, date) {\n return monthLabelFormat(date);\n },\n monthLegendPosition: 'before',\n monthLegendOffset: 10,\n weekdayLegend: function weekdayLegend(d) {\n return d;\n },\n daySpacing: 0,\n dayBorderWidth: 1,\n dayBorderColor: '#000',\n isInteractive: true,\n legends: [],\n tooltip: CalendarTooltip\n};\nvar CalendarDefaultProps = _objectSpread2(_objectSpread2({}, commonDefaultProps), {}, {\n role: 'img'\n});\nvar CalendarCanvasDefaultProps = _objectSpread2(_objectSpread2({}, commonDefaultProps), {}, {\n pixelRatio: global.window && global.window.devicePixelRatio ? global.window.devicePixelRatio : 1\n});\n\nvar CalendarYearLegends = memo(function (_ref) {\n var years = _ref.years,\n legend = _ref.legend,\n theme = _ref.theme;\n return React.createElement(React.Fragment, null, years.map(function (year) {\n return React.createElement(\"text\", {\n key: year.year,\n transform: \"translate(\".concat(year.x, \",\").concat(year.y, \") rotate(\").concat(year.rotation, \")\"),\n textAnchor: \"middle\",\n style: theme.labels.text\n }, legend(year.year));\n }));\n});\nCalendarYearLegends.displayName = 'CalendarYearLegends';\n\nvar CalendarMonthPath = memo(function (_ref) {\n var path = _ref.path,\n borderWidth = _ref.borderWidth,\n borderColor = _ref.borderColor;\n return React.createElement(\"path\", {\n d: path,\n style: {\n fill: 'none',\n strokeWidth: borderWidth,\n stroke: borderColor,\n pointerEvents: 'none'\n }\n });\n});\nCalendarMonthPath.displayName = 'CalendarMonthPath';\n\nvar CalendarMonthLegends = memo(function (_ref) {\n var months = _ref.months,\n legend = _ref.legend,\n theme = _ref.theme;\n return React.createElement(React.Fragment, null, months.map(function (month) {\n return React.createElement(\"text\", {\n key: \"\".concat(month.date.toString(), \".legend\"),\n transform: \"translate(\".concat(month.x, \",\").concat(month.y, \") rotate(\").concat(month.rotation, \")\"),\n textAnchor: \"middle\",\n style: theme.labels.text\n }, legend(month.year, month.month, month.date));\n }));\n});\nCalendarMonthLegends.displayName = 'CalendarMonthLegends';\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nvar computeDomain = function computeDomain(data, minSpec, maxSpec) {\n var allValues = data.map(function (d) {\n return d.value;\n });\n var minValue = minSpec === 'auto' ? Math.min.apply(Math, _toConsumableArray(allValues)) : minSpec;\n var maxValue = maxSpec === 'auto' ? Math.max.apply(Math, _toConsumableArray(allValues)) : maxSpec;\n return [minValue, maxValue];\n};\nvar computeCellSize = function computeCellSize(_ref) {\n var width = _ref.width,\n height = _ref.height,\n direction = _ref.direction,\n yearRange = _ref.yearRange,\n yearSpacing = _ref.yearSpacing,\n monthSpacing = _ref.monthSpacing,\n daySpacing = _ref.daySpacing,\n maxWeeks = _ref.maxWeeks;\n var hCellSize;\n var vCellSize;\n if (direction === 'horizontal') {\n hCellSize = (width - monthSpacing * 12 - daySpacing * maxWeeks) / maxWeeks;\n vCellSize = (height - (yearRange.length - 1) * yearSpacing - yearRange.length * (8 * daySpacing)) / (yearRange.length * 7);\n } else {\n hCellSize = (width - (yearRange.length - 1) * yearSpacing - yearRange.length * (8 * daySpacing)) / (yearRange.length * 7);\n vCellSize = (height - monthSpacing * 12 - daySpacing * maxWeeks) / maxWeeks;\n }\n return Math.min(hCellSize, vCellSize);\n};\nvar monthPathAndBBox = function monthPathAndBBox(_ref2) {\n var date = _ref2.date,\n cellSize = _ref2.cellSize,\n yearIndex = _ref2.yearIndex,\n yearSpacing = _ref2.yearSpacing,\n monthSpacing = _ref2.monthSpacing,\n daySpacing = _ref2.daySpacing,\n direction = _ref2.direction,\n originX = _ref2.originX,\n originY = _ref2.originY;\n var t1 = new Date(date.getFullYear(), date.getMonth() + 1, 0);\n var firstWeek = timeWeek.count(timeYear(date), date);\n var lastWeek = timeWeek.count(timeYear(t1), t1);\n var firstDay = date.getDay();\n var lastDay = t1.getDay();\n var xO = originX;\n var yO = originY;\n var yearOffset = yearIndex * (7 * (cellSize + daySpacing) + yearSpacing);\n var monthOffset = date.getMonth() * monthSpacing;\n if (direction === 'horizontal') {\n yO += yearOffset;\n xO += monthOffset;\n } else {\n yO += monthOffset;\n xO += yearOffset;\n }\n var path;\n var bbox = {\n x: xO,\n y: yO,\n width: 0,\n height: 0\n };\n if (direction === 'horizontal') {\n path = [\"M\".concat(xO + (firstWeek + 1) * (cellSize + daySpacing), \",\").concat(yO + firstDay * (cellSize + daySpacing)), \"H\".concat(xO + firstWeek * (cellSize + daySpacing), \"V\").concat(yO + 7 * (cellSize + daySpacing)), \"H\".concat(xO + lastWeek * (cellSize + daySpacing), \"V\").concat(yO + (lastDay + 1) * (cellSize + daySpacing)), \"H\".concat(xO + (lastWeek + 1) * (cellSize + daySpacing), \"V\").concat(yO), \"H\".concat(xO + (firstWeek + 1) * (cellSize + daySpacing), \"Z\")].join('');\n bbox.x = xO + firstWeek * (cellSize + daySpacing);\n bbox.width = xO + (lastWeek + 1) * (cellSize + daySpacing) - bbox.x;\n bbox.height = 7 * (cellSize + daySpacing);\n } else {\n path = [\"M\".concat(xO + firstDay * (cellSize + daySpacing), \",\").concat(yO + (firstWeek + 1) * (cellSize + daySpacing)), \"H\".concat(xO, \"V\").concat(yO + (lastWeek + 1) * (cellSize + daySpacing)), \"H\".concat(xO + (lastDay + 1) * (cellSize + daySpacing), \"V\").concat(yO + lastWeek * (cellSize + daySpacing)), \"H\".concat(xO + 7 * (cellSize + daySpacing), \"V\").concat(yO + firstWeek * (cellSize + daySpacing)), \"H\".concat(xO + firstDay * (cellSize + daySpacing), \"Z\")].join('');\n bbox.y = yO + firstWeek * (cellSize + daySpacing);\n bbox.width = 7 * (cellSize + daySpacing);\n bbox.height = yO + (lastWeek + 1) * (cellSize + daySpacing) - bbox.y;\n }\n return {\n path: path,\n bbox: bbox\n };\n};\nvar memoMonthPathAndBBox = memoize(monthPathAndBBox, function (_ref3) {\n var date = _ref3.date,\n cellSize = _ref3.cellSize,\n yearIndex = _ref3.yearIndex,\n yearSpacing = _ref3.yearSpacing,\n monthSpacing = _ref3.monthSpacing,\n daySpacing = _ref3.daySpacing,\n direction = _ref3.direction,\n originX = _ref3.originX,\n originY = _ref3.originY;\n return \"\".concat(date.toString(), \".\").concat(cellSize, \".\").concat(yearIndex, \".\").concat(yearSpacing, \".\").concat(monthSpacing, \".\").concat(daySpacing, \".\").concat(direction, \".\").concat(originX, \".\").concat(originY);\n});\nvar cellPositionHorizontal = function cellPositionHorizontal(cellSize, yearSpacing, monthSpacing, daySpacing) {\n return function (originX, originY, d, yearIndex) {\n var weekOfYear = timeWeek.count(timeYear(d), d);\n return {\n x: originX + weekOfYear * (cellSize + daySpacing) + daySpacing / 2 + d.getMonth() * monthSpacing,\n y: originY + d.getDay() * (cellSize + daySpacing) + daySpacing / 2 + yearIndex * (yearSpacing + 7 * (cellSize + daySpacing))\n };\n };\n};\nvar cellPositionVertical = function cellPositionVertical(cellSize, yearSpacing, monthSpacing, daySpacing) {\n return function (originX, originY, d, yearIndex) {\n var weekOfYear = timeWeek.count(timeYear(d), d);\n return {\n x: originX + d.getDay() * (cellSize + daySpacing) + daySpacing / 2 + yearIndex * (yearSpacing + 7 * (cellSize + daySpacing)),\n y: originY + weekOfYear * (cellSize + daySpacing) + daySpacing / 2 + d.getMonth() * monthSpacing\n };\n };\n};\nvar dayFormat = timeFormat('%Y-%m-%d');\nvar computeLayout = function computeLayout(_ref4) {\n var width = _ref4.width,\n height = _ref4.height,\n from = _ref4.from,\n to = _ref4.to,\n direction = _ref4.direction,\n yearSpacing = _ref4.yearSpacing,\n monthSpacing = _ref4.monthSpacing,\n daySpacing = _ref4.daySpacing,\n align = _ref4.align;\n var fromDate = isDate(from) ? from : new Date(from);\n var toDate = isDate(to) ? to : new Date(to);\n var yearRange = range(fromDate.getFullYear(), toDate.getFullYear() + 1);\n var maxWeeks = Math.max.apply(Math, _toConsumableArray(yearRange.map(function (year) {\n return timeWeeks(new Date(year, 0, 1), new Date(year + 1, 0, 1)).length;\n }))) + 1;\n var cellSize = computeCellSize({\n width: width,\n height: height,\n direction: direction,\n yearRange: yearRange,\n yearSpacing: yearSpacing,\n monthSpacing: monthSpacing,\n daySpacing: daySpacing,\n maxWeeks: maxWeeks\n });\n var monthsSize = cellSize * maxWeeks + daySpacing * maxWeeks + monthSpacing * 12;\n var yearsSize = (cellSize + daySpacing) * 7 * yearRange.length + yearSpacing * (yearRange.length - 1);\n var calendarWidth = direction === 'horizontal' ? monthsSize : yearsSize;\n var calendarHeight = direction === 'horizontal' ? yearsSize : monthsSize;\n var _alignBox = alignBox({\n x: 0,\n y: 0,\n width: calendarWidth,\n height: calendarHeight\n }, {\n x: 0,\n y: 0,\n width: width,\n height: height\n }, align),\n _alignBox2 = _slicedToArray(_alignBox, 2),\n originX = _alignBox2[0],\n originY = _alignBox2[1];\n var cellPosition;\n if (direction === 'horizontal') {\n cellPosition = cellPositionHorizontal(cellSize, yearSpacing, monthSpacing, daySpacing);\n } else {\n cellPosition = cellPositionVertical(cellSize, yearSpacing, monthSpacing, daySpacing);\n }\n var years = [];\n var months = [];\n var days = [];\n yearRange.forEach(function (year, i) {\n var yearStart = new Date(year, 0, 1);\n var yearEnd = new Date(year + 1, 0, 1);\n days = days.concat(timeDays(yearStart, yearEnd).map(function (dayDate) {\n return _objectSpread2({\n date: dayDate,\n day: dayFormat(dayDate),\n size: cellSize\n }, cellPosition(originX, originY, dayDate, i));\n }));\n var yearMonths = timeMonths(yearStart, yearEnd).map(function (monthDate) {\n return _objectSpread2({\n date: monthDate,\n year: monthDate.getFullYear(),\n month: monthDate.getMonth()\n }, memoMonthPathAndBBox({\n originX: originX,\n originY: originY,\n date: monthDate,\n direction: direction,\n yearIndex: i,\n yearSpacing: yearSpacing,\n monthSpacing: monthSpacing,\n daySpacing: daySpacing,\n cellSize: cellSize\n }));\n });\n months = months.concat(yearMonths);\n years.push({\n year: year,\n bbox: {\n x: yearMonths[0].bbox.x,\n y: yearMonths[0].bbox.y,\n width: yearMonths[11].bbox.x - yearMonths[0].bbox.x + yearMonths[11].bbox.width,\n height: yearMonths[11].bbox.y - yearMonths[0].bbox.y + yearMonths[11].bbox.height\n }\n });\n });\n return {\n years: years,\n months: months,\n days: days,\n cellSize: cellSize,\n calendarWidth: calendarWidth,\n calendarHeight: calendarHeight,\n originX: originX,\n originY: originY\n };\n};\nvar bindDaysData = function bindDaysData(_ref5) {\n var days = _ref5.days,\n data = _ref5.data,\n colorScale = _ref5.colorScale,\n emptyColor = _ref5.emptyColor;\n return days.map(function (day) {\n var dayData = data.find(function (item) {\n return item.day === day.day;\n });\n if (!dayData) {\n return _objectSpread2(_objectSpread2({}, day), {}, {\n color: emptyColor\n });\n }\n return _objectSpread2(_objectSpread2({}, day), {}, {\n color: colorScale(dayData.value),\n data: dayData,\n value: dayData.value\n });\n });\n};\nvar computeYearLegendPositions = function computeYearLegendPositions(_ref6) {\n var years = _ref6.years,\n direction = _ref6.direction,\n position = _ref6.position,\n offset = _ref6.offset;\n return years.map(function (year) {\n var x = 0;\n var y = 0;\n var rotation = 0;\n if (direction === 'horizontal' && position === 'before') {\n x = year.bbox.x - offset;\n y = year.bbox.y + year.bbox.height / 2;\n rotation = -90;\n } else if (direction === 'horizontal' && position === 'after') {\n x = year.bbox.x + year.bbox.width + offset;\n y = year.bbox.y + year.bbox.height / 2;\n rotation = -90;\n } else if (direction === 'vertical' && position === 'before') {\n x = year.bbox.x + year.bbox.width / 2;\n y = year.bbox.y - offset;\n } else {\n x = year.bbox.x + year.bbox.width / 2;\n y = year.bbox.y + year.bbox.height + offset;\n }\n return _objectSpread2(_objectSpread2({}, year), {}, {\n x: x,\n y: y,\n rotation: rotation\n });\n });\n};\nvar computeMonthLegendPositions = function computeMonthLegendPositions(_ref7) {\n var months = _ref7.months,\n direction = _ref7.direction,\n position = _ref7.position,\n offset = _ref7.offset;\n return months.map(function (month) {\n var x = 0;\n var y = 0;\n var rotation = 0;\n if (direction === 'horizontal' && position === 'before') {\n x = month.bbox.x + month.bbox.width / 2;\n y = month.bbox.y - offset;\n } else if (direction === 'horizontal' && position === 'after') {\n x = month.bbox.x + month.bbox.width / 2;\n y = month.bbox.y + month.bbox.height + offset;\n } else if (direction === 'vertical' && position === 'before') {\n x = month.bbox.x - offset;\n y = month.bbox.y + month.bbox.height / 2;\n rotation = -90;\n } else {\n x = month.bbox.x + month.bbox.width + offset;\n y = month.bbox.y + month.bbox.height / 2;\n rotation = -90;\n }\n return _objectSpread2(_objectSpread2({}, month), {}, {\n x: x,\n y: y,\n rotation: rotation\n });\n });\n};\n\nvar useCalendarLayout = function useCalendarLayout(_ref) {\n var width = _ref.width,\n height = _ref.height,\n from = _ref.from,\n to = _ref.to,\n direction = _ref.direction,\n yearSpacing = _ref.yearSpacing,\n monthSpacing = _ref.monthSpacing,\n daySpacing = _ref.daySpacing,\n align = _ref.align;\n return useMemo(function () {\n return computeLayout({\n width: width,\n height: height,\n from: from,\n to: to,\n direction: direction,\n yearSpacing: yearSpacing,\n monthSpacing: monthSpacing,\n daySpacing: daySpacing,\n align: align\n });\n }, [width, height, from, to, direction, yearSpacing, monthSpacing, daySpacing, align]);\n};\nvar useColorScale = function useColorScale(_ref2) {\n var data = _ref2.data,\n minValue = _ref2.minValue,\n maxValue = _ref2.maxValue,\n colors = _ref2.colors,\n colorScale = _ref2.colorScale;\n return useMemo(function () {\n if (colorScale) return colorScale;\n var domain = computeDomain(data, minValue, maxValue);\n var defaultColorScale = scaleQuantize().domain(domain).range(colors);\n return defaultColorScale;\n }, [data, minValue, maxValue, colors, colorScale]);\n};\nvar useYearLegends = function useYearLegends(_ref3) {\n var years = _ref3.years,\n direction = _ref3.direction,\n yearLegendPosition = _ref3.yearLegendPosition,\n yearLegendOffset = _ref3.yearLegendOffset;\n return useMemo(function () {\n return computeYearLegendPositions({\n years: years,\n direction: direction,\n position: yearLegendPosition,\n offset: yearLegendOffset\n });\n }, [years, direction, yearLegendPosition, yearLegendOffset]);\n};\nvar useMonthLegends = function useMonthLegends(_ref4) {\n var months = _ref4.months,\n direction = _ref4.direction,\n monthLegendPosition = _ref4.monthLegendPosition,\n monthLegendOffset = _ref4.monthLegendOffset;\n return useMemo(function () {\n return computeMonthLegendPositions({\n months: months,\n direction: direction,\n position: monthLegendPosition,\n offset: monthLegendOffset\n });\n }, [months, direction, monthLegendPosition, monthLegendOffset]);\n};\nvar useDays = function useDays(_ref5) {\n var days = _ref5.days,\n data = _ref5.data,\n colorScale = _ref5.colorScale,\n emptyColor = _ref5.emptyColor;\n return useMemo(function () {\n return bindDaysData({\n days: days,\n data: data,\n colorScale: colorScale,\n emptyColor: emptyColor\n });\n }, [days, data, colorScale, emptyColor]);\n};\n\nvar CalendarDay = memo(function (_ref) {\n var data = _ref.data,\n x = _ref.x,\n y = _ref.y,\n size = _ref.size,\n color = _ref.color,\n borderWidth = _ref.borderWidth,\n borderColor = _ref.borderColor,\n isInteractive = _ref.isInteractive,\n tooltip = _ref.tooltip,\n onMouseEnter = _ref.onMouseEnter,\n onMouseMove = _ref.onMouseMove,\n onMouseLeave = _ref.onMouseLeave,\n onClick = _ref.onClick,\n formatValue = _ref.formatValue;\n var _useTooltip = useTooltip(),\n showTooltipFromEvent = _useTooltip.showTooltipFromEvent,\n hideTooltip = _useTooltip.hideTooltip;\n var handleMouseEnter = useCallback(function (event) {\n var formatedData = _objectSpread2(_objectSpread2({}, data), {}, {\n value: formatValue(data.value),\n data: _objectSpread2({}, data.data)\n });\n showTooltipFromEvent(React.createElement(tooltip, _objectSpread2({}, formatedData)), event);\n onMouseEnter && onMouseEnter(data, event);\n }, [showTooltipFromEvent, tooltip, data, onMouseEnter, formatValue]);\n var handleMouseMove = useCallback(function (event) {\n var formatedData = _objectSpread2(_objectSpread2({}, data), {}, {\n value: formatValue(data.value),\n data: _objectSpread2({}, data.data)\n });\n showTooltipFromEvent(React.createElement(tooltip, _objectSpread2({}, formatedData)), event);\n onMouseMove && onMouseMove(data, event);\n }, [showTooltipFromEvent, tooltip, data, onMouseMove, formatValue]);\n var handleMouseLeave = useCallback(function (event) {\n hideTooltip();\n onMouseLeave && onMouseLeave(data, event);\n }, [isInteractive, hideTooltip, data, onMouseLeave]);\n var handleClick = useCallback(function (event) {\n return onClick && onClick(data, event);\n }, [isInteractive, data, onClick]);\n return React.createElement(\"rect\", {\n x: x,\n y: y,\n width: size,\n height: size,\n style: {\n fill: color,\n strokeWidth: borderWidth,\n stroke: borderColor\n },\n onMouseEnter: isInteractive ? handleMouseEnter : undefined,\n onMouseMove: isInteractive ? handleMouseMove : undefined,\n onMouseLeave: isInteractive ? handleMouseLeave : undefined,\n onClick: isInteractive ? handleClick : undefined\n });\n});\nCalendarDay.displayName = 'CalendarDay';\n\nvar Calendar = function Calendar(_ref) {\n var partialMargin = _ref.margin,\n width = _ref.width,\n height = _ref.height,\n align = _ref.align,\n colors = _ref.colors,\n colorScale = _ref.colorScale,\n data = _ref.data,\n direction = _ref.direction,\n emptyColor = _ref.emptyColor,\n from = _ref.from,\n to = _ref.to,\n minValue = _ref.minValue,\n maxValue = _ref.maxValue,\n valueFormat = _ref.valueFormat,\n legendFormat = _ref.legendFormat,\n yearLegend = _ref.yearLegend,\n yearLegendOffset = _ref.yearLegendOffset,\n yearLegendPosition = _ref.yearLegendPosition,\n yearSpacing = _ref.yearSpacing,\n monthBorderColor = _ref.monthBorderColor,\n monthBorderWidth = _ref.monthBorderWidth,\n monthLegend = _ref.monthLegend,\n monthLegendOffset = _ref.monthLegendOffset,\n monthLegendPosition = _ref.monthLegendPosition,\n monthSpacing = _ref.monthSpacing,\n dayBorderColor = _ref.dayBorderColor,\n dayBorderWidth = _ref.dayBorderWidth,\n daySpacing = _ref.daySpacing,\n isInteractive = _ref.isInteractive,\n tooltip = _ref.tooltip,\n onClick = _ref.onClick,\n onMouseEnter = _ref.onMouseEnter,\n onMouseLeave = _ref.onMouseLeave,\n onMouseMove = _ref.onMouseMove,\n legends = _ref.legends,\n role = _ref.role;\n var theme = useTheme();\n var _useDimensions = useDimensions(width, height, partialMargin),\n margin = _useDimensions.margin,\n innerWidth = _useDimensions.innerWidth,\n innerHeight = _useDimensions.innerHeight,\n outerWidth = _useDimensions.outerWidth,\n outerHeight = _useDimensions.outerHeight;\n var _useCalendarLayout = useCalendarLayout({\n width: innerWidth,\n height: innerHeight,\n from: from,\n to: to,\n direction: direction,\n yearSpacing: yearSpacing,\n monthSpacing: monthSpacing,\n daySpacing: daySpacing,\n align: align\n }),\n months = _useCalendarLayout.months,\n years = _useCalendarLayout.years,\n rest = _objectWithoutProperties(_useCalendarLayout, [\"months\", \"years\"]);\n var colorScaleFn = useColorScale({\n data: data,\n minValue: minValue,\n maxValue: maxValue,\n colors: colors,\n colorScale: colorScale\n });\n var monthLegends = useMonthLegends({\n months: months,\n direction: direction,\n monthLegendPosition: monthLegendPosition,\n monthLegendOffset: monthLegendOffset\n });\n var yearLegends = useYearLegends({\n years: years,\n direction: direction,\n yearLegendPosition: yearLegendPosition,\n yearLegendOffset: yearLegendOffset\n });\n var days = useDays({\n days: rest.days,\n data: data,\n colorScale: colorScaleFn,\n emptyColor: emptyColor\n });\n var formatLegend = useValueFormatter(legendFormat);\n var formatValue = useValueFormatter(valueFormat);\n return React.createElement(SvgWrapper, {\n width: outerWidth,\n height: outerHeight,\n margin: margin,\n theme: theme,\n role: role\n }, days.map(function (d) {\n return React.createElement(CalendarDay, {\n key: d.date.toString(),\n data: d,\n x: d.x,\n y: d.y,\n size: d.size,\n spacing: daySpacing,\n color: d.color,\n borderWidth: dayBorderWidth,\n borderColor: dayBorderColor,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onMouseMove: onMouseMove,\n isInteractive: isInteractive,\n tooltip: tooltip,\n theme: theme,\n onClick: onClick,\n formatValue: formatValue\n });\n }), months.map(function (m) {\n return React.createElement(CalendarMonthPath, {\n key: m.date.toString(),\n path: m.path,\n borderWidth: monthBorderWidth,\n borderColor: monthBorderColor\n });\n }), React.createElement(CalendarMonthLegends, {\n months: monthLegends,\n legend: monthLegend,\n theme: theme\n }), React.createElement(CalendarYearLegends, {\n years: yearLegends,\n legend: yearLegend,\n theme: theme\n }), legends.map(function (legend, i) {\n var legendData = colorScaleFn.ticks(legend.itemCount).map(function (value) {\n return {\n id: value,\n label: formatLegend(value),\n color: colorScaleFn(value)\n };\n });\n return React.createElement(BoxLegendSvg, Object.assign({\n key: i\n }, legend, {\n containerWidth: width,\n containerHeight: height,\n data: legendData,\n theme: theme\n }));\n }));\n};\nCalendar.displayName = 'Calendar';\nCalendar.defaultProps = CalendarDefaultProps;\nvar Calendar$1 = withContainer(Calendar);\n\nvar ResponsiveCalendar = function ResponsiveCalendar(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(Calendar$1, Object.assign({\n width: width,\n height: height\n }, props));\n });\n};\n\nvar findDayUnderCursor = function findDayUnderCursor(event, canvasEl, days, size, dayBorderWidth, margin) {\n var _getRelativeCursor = getRelativeCursor(canvasEl, event),\n _getRelativeCursor2 = _slicedToArray(_getRelativeCursor, 2),\n x = _getRelativeCursor2[0],\n y = _getRelativeCursor2[1];\n return days.find(function (day) {\n return day.value !== undefined && isCursorInRect(day.x + margin.left - dayBorderWidth / 2, day.y + margin.top - dayBorderWidth / 2, size + dayBorderWidth, size + dayBorderWidth, x, y);\n });\n};\nvar CalendarCanvas = memo(function (_ref) {\n var partialMargin = _ref.margin,\n width = _ref.width,\n height = _ref.height,\n pixelRatio = _ref.pixelRatio,\n align = _ref.align,\n colors = _ref.colors,\n colorScale = _ref.colorScale,\n data = _ref.data,\n direction = _ref.direction,\n emptyColor = _ref.emptyColor,\n from = _ref.from,\n to = _ref.to,\n minValue = _ref.minValue,\n maxValue = _ref.maxValue,\n valueFormat = _ref.valueFormat,\n legendFormat = _ref.legendFormat,\n yearLegend = _ref.yearLegend,\n yearLegendOffset = _ref.yearLegendOffset,\n yearLegendPosition = _ref.yearLegendPosition,\n yearSpacing = _ref.yearSpacing,\n monthLegend = _ref.monthLegend,\n monthLegendOffset = _ref.monthLegendOffset,\n monthLegendPosition = _ref.monthLegendPosition,\n monthSpacing = _ref.monthSpacing,\n dayBorderColor = _ref.dayBorderColor,\n dayBorderWidth = _ref.dayBorderWidth,\n daySpacing = _ref.daySpacing,\n isInteractive = _ref.isInteractive,\n tooltip = _ref.tooltip,\n onClick = _ref.onClick,\n onMouseEnter = _ref.onMouseEnter,\n onMouseLeave = _ref.onMouseLeave,\n onMouseMove = _ref.onMouseMove,\n legends = _ref.legends;\n var canvasEl = useRef(null);\n var _useDimensions = useDimensions(width, height, partialMargin),\n innerWidth = _useDimensions.innerWidth,\n innerHeight = _useDimensions.innerHeight,\n outerWidth = _useDimensions.outerWidth,\n outerHeight = _useDimensions.outerHeight,\n margin = _useDimensions.margin;\n var _useCalendarLayout = useCalendarLayout({\n width: innerWidth,\n height: innerHeight,\n from: from,\n to: to,\n direction: direction,\n yearSpacing: yearSpacing,\n monthSpacing: monthSpacing,\n daySpacing: daySpacing,\n align: align\n }),\n months = _useCalendarLayout.months,\n years = _useCalendarLayout.years,\n rest = _objectWithoutProperties(_useCalendarLayout, [\"months\", \"years\"]);\n var colorScaleFn = useColorScale({\n data: data,\n minValue: minValue,\n maxValue: maxValue,\n colors: colors,\n colorScale: colorScale\n });\n var monthLegends = useMonthLegends({\n months: months,\n direction: direction,\n monthLegendPosition: monthLegendPosition,\n monthLegendOffset: monthLegendOffset\n });\n var yearLegends = useYearLegends({\n years: years,\n direction: direction,\n yearLegendPosition: yearLegendPosition,\n yearLegendOffset: yearLegendOffset\n });\n var days = useDays({\n days: rest.days,\n data: data,\n colorScale: colorScaleFn,\n emptyColor: emptyColor\n });\n var _useState = useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n currentDay = _useState2[0],\n setCurrentDay = _useState2[1];\n var theme = useTheme();\n var formatValue = useValueFormatter(valueFormat);\n var formatLegend = useValueFormatter(legendFormat);\n var _useTooltip = useTooltip(),\n showTooltipFromEvent = _useTooltip.showTooltipFromEvent,\n hideTooltip = _useTooltip.hideTooltip;\n useEffect(function () {\n canvasEl.current.width = outerWidth * pixelRatio;\n canvasEl.current.height = outerHeight * pixelRatio;\n var ctx = canvasEl.current.getContext('2d');\n ctx.scale(pixelRatio, pixelRatio);\n ctx.fillStyle = theme.background;\n ctx.fillRect(0, 0, outerWidth, outerHeight);\n ctx.translate(margin.left, margin.top);\n days.forEach(function (day) {\n ctx.fillStyle = day.color;\n if (dayBorderWidth > 0) {\n ctx.strokeStyle = dayBorderColor;\n ctx.lineWidth = dayBorderWidth;\n }\n ctx.beginPath();\n ctx.rect(day.x, day.y, day.size, day.size);\n ctx.fill();\n if (dayBorderWidth > 0) {\n ctx.stroke();\n }\n });\n ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n ctx.fillStyle = theme.labels.text.fill;\n ctx.font = \"\".concat(theme.labels.text.fontSize, \"px \").concat(theme.labels.text.fontFamily);\n monthLegends.forEach(function (month) {\n ctx.save();\n ctx.translate(month.x, month.y);\n ctx.rotate(degreesToRadians(month.rotation));\n ctx.fillText(monthLegend(month.year, month.month, month.date), 0, 0);\n ctx.restore();\n });\n yearLegends.forEach(function (year) {\n ctx.save();\n ctx.translate(year.x, year.y);\n ctx.rotate(degreesToRadians(year.rotation));\n ctx.fillText(yearLegend(year.year), 0, 0);\n ctx.restore();\n });\n legends.forEach(function (legend) {\n var legendData = colorScaleFn.ticks(legend.itemCount).map(function (value) {\n return {\n id: value,\n label: formatLegend(value),\n color: colorScaleFn(value)\n };\n });\n renderLegendToCanvas(ctx, _objectSpread2(_objectSpread2({}, legend), {}, {\n data: legendData,\n containerWidth: innerWidth,\n containerHeight: innerHeight,\n theme: theme\n }));\n });\n }, [canvasEl, innerHeight, innerWidth, outerWidth, outerHeight, pixelRatio, margin, days, dayBorderColor, dayBorderWidth, colorScale, yearLegend, yearLegends, monthLegend, monthLegends, legends, theme, formatLegend]);\n var handleMouseHover = useCallback(function (event) {\n var data = findDayUnderCursor(event, canvasEl.current, days, days[0].size, dayBorderWidth, margin);\n if (data) {\n setCurrentDay(data);\n var formatedData = _objectSpread2(_objectSpread2({}, data), {}, {\n value: formatValue(data.value),\n data: _objectSpread2({}, data.data)\n });\n showTooltipFromEvent(React.createElement(tooltip, _objectSpread2({}, formatedData)), event);\n !currentDay && onMouseEnter && onMouseEnter(data, event);\n onMouseMove && onMouseMove(data, event);\n currentDay && currentDay.id !== data.id && onMouseLeave && onMouseLeave(data, event);\n } else {\n hideTooltip();\n onMouseLeave && onMouseLeave(data, event);\n }\n }, [canvasEl, margin, days, setCurrentDay, formatValue, daySpacing, showTooltipFromEvent, hideTooltip, onMouseEnter, onMouseMove, onMouseLeave]);\n var handleMouseLeave = useCallback(function () {\n setCurrentDay(null);\n hideTooltip();\n }, [setCurrentDay, hideTooltip]);\n var handleClick = useCallback(function (event) {\n if (!onClick) return;\n var data = findDayUnderCursor(event, canvasEl.current, days, days[0].size, daySpacing, margin);\n data && onClick(data, event);\n }, [canvasEl, daySpacing, margin, setCurrentDay, days, onClick]);\n return React.createElement(\"canvas\", {\n ref: canvasEl,\n width: outerWidth * pixelRatio,\n height: outerHeight * pixelRatio,\n style: {\n width: outerWidth,\n height: outerHeight\n },\n onMouseEnter: isInteractive ? handleMouseHover : undefined,\n onMouseMove: isInteractive ? handleMouseHover : undefined,\n onMouseLeave: isInteractive ? handleMouseLeave : undefined,\n onClick: isInteractive ? handleClick : undefined\n });\n});\nCalendarCanvas.displayName = 'CalendarCanvas';\nCalendarCanvas.defaultProps = CalendarCanvasDefaultProps;\nvar CalendarCanvas$1 = withContainer(CalendarCanvas);\n\nvar ResponsiveCalendarCanvas = function ResponsiveCalendarCanvas(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(CalendarCanvas$1, Object.assign({\n width: width,\n height: height\n }, props));\n });\n};\n\nexport { Calendar$1 as Calendar, CalendarCanvas$1 as CalendarCanvas, CalendarCanvasDefaultProps, CalendarCanvasPropTypes, CalendarDefaultProps, CalendarPropTypes, ResponsiveCalendar, ResponsiveCalendarCanvas, bindDaysData, computeDomain, computeLayout, computeMonthLegendPositions, computeYearLegendPositions, useCalendarLayout, useColorScale, useDays, useMonthLegends, useYearLegends };\n//# sourceMappingURL=nivo-calendar.es.js.map\n","import React, { Component } from 'react';\nimport { spring, TransitionMotion } from 'react-motion';\nimport pick from 'lodash/pick';\nimport { defsPropTypes, noop, withHierarchy, withDimensions, withTheme, getAccessorFor, getLabelGenerator, bindDefs, withMotion, Container, SvgWrapper, ResponsiveWrapper } from '@nivo/core';\nimport { ordinalColorsPropType, colorPropertyAccessorPropType, inheritedColorPropType, getOrdinalColorScale, getInheritedColorGenerator, interpolateColor, getInterpolatedColor } from '@nivo/colors';\nimport { pack } from 'd3-hierarchy';\nimport compose from 'recompose/compose';\nimport defaultProps from 'recompose/defaultProps';\nimport withPropsOnChange from 'recompose/withPropsOnChange';\nimport withStateHandlers from 'recompose/withStateHandlers';\nimport pure from 'recompose/pure';\nimport PropTypes from 'prop-types';\nimport { BasicTooltip } from '@nivo/tooltip';\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n}\n\nvar computeNodePath = function computeNodePath(node, getIdentity) {\n return node.ancestors().map(function (ancestor) {\n return getIdentity(ancestor.data);\n }).join('.');\n};\nvar computeNodes = function computeNodes(_ref) {\n var root = _ref.root,\n pack = _ref.pack,\n leavesOnly = _ref.leavesOnly,\n getIdentity = _ref.getIdentity,\n getColor = _ref.getColor;\n root.each(function (node) {\n node.id = getIdentity(node.data);\n node.path = computeNodePath(node, getIdentity);\n });\n pack(root);\n var nodes = leavesOnly ? root.leaves() : root.descendants();\n nodes = nodes.map(function (node) {\n node.color = getColor(_objectSpread2(_objectSpread2({}, node.data), {}, {\n depth: node.depth\n }));\n node.label = false;\n return node;\n });\n return nodes;\n};\nvar computeZoom = function computeZoom(nodes, currentNodePath, width, height) {\n var currentNode = nodes.find(function (_ref2) {\n var path = _ref2.path;\n return path === currentNodePath;\n });\n if (!currentNode) return nodes;\n var ratio = Math.min(width, height) / (currentNode.r * 2);\n var offsetX = width / 2 - currentNode.x * ratio;\n var offsetY = height / 2 - currentNode.y * ratio;\n return nodes.map(function (node) {\n return _objectSpread2(_objectSpread2({}, node), {}, {\n r: node.r * ratio,\n x: node.x * ratio + offsetX,\n y: node.y * ratio + offsetY\n });\n });\n};\n\nvar BubbleNode = function BubbleNode(_ref) {\n var node = _ref.node,\n style = _ref.style,\n handlers = _ref.handlers,\n theme = _ref.theme;\n if (style.r <= 0) return null;\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(style.x, \",\").concat(style.y, \")\")\n }, React.createElement(\"circle\", Object.assign({\n r: style.r\n }, handlers, {\n fill: style.fill ? style.fill : style.color,\n stroke: style.borderColor,\n strokeWidth: style.borderWidth\n })), node.label !== false && React.createElement(\"text\", {\n textAnchor: \"middle\",\n dominantBaseline: \"central\",\n style: _objectSpread2(_objectSpread2({}, theme.labels.text), {}, {\n fill: style.labelTextColor,\n pointerEvents: 'none'\n })\n }, node.label));\n};\n\nvar BubbleHtmlNode = function BubbleHtmlNode(_ref) {\n var node = _ref.node,\n style = _ref.style,\n handlers = _ref.handlers;\n if (style.r <= 0) return null;\n return React.createElement(\"div\", Object.assign({\n id: (node.data && node.data.id ? node.data.id :\n node.id).replace(/[^\\w]/gi, '-'),\n style: {\n position: 'absolute',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n background: style.color,\n color: style.labelTextColor,\n borderWidth: style.borderWidth,\n borderColor: style.borderColor,\n top: style.y - style.r,\n left: style.x - style.r,\n width: style.r * 2,\n height: style.r * 2,\n borderStyle: 'solid',\n borderRadius: style.r\n }\n }, handlers), node.label !== false && node.label);\n};\n\nvar commonPropTypes = {\n identity: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired,\n colors: ordinalColorsPropType.isRequired,\n colorBy: colorPropertyAccessorPropType.isRequired,\n leavesOnly: PropTypes.bool.isRequired,\n padding: PropTypes.number.isRequired,\n borderWidth: PropTypes.number.isRequired,\n borderColor: inheritedColorPropType.isRequired,\n enableLabel: PropTypes.bool.isRequired,\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired,\n labelFormat: PropTypes.string,\n labelTextColor: inheritedColorPropType.isRequired,\n labelSkipRadius: PropTypes.number.isRequired,\n isInteractive: PropTypes.bool.isRequired,\n onClick: PropTypes.func.isRequired,\n isZoomable: PropTypes.bool.isRequired,\n tooltipFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n tooltip: PropTypes.func\n};\nvar BubblePropTypes = _objectSpread2(_objectSpread2({}, commonPropTypes), {}, {\n nodeComponent: PropTypes.func.isRequired,\n role: PropTypes.string.isRequired\n}, defsPropTypes);\nvar BubbleHtmlPropTypes = _objectSpread2(_objectSpread2({}, commonPropTypes), {}, {\n nodeComponent: PropTypes.func.isRequired\n});\nvar BubbleCanvasPropTypes = _objectSpread2(_objectSpread2({}, commonPropTypes), {}, {\n pixelRatio: PropTypes.number.isRequired\n});\nvar commonDefaultProps = {\n identity: 'id',\n leavesOnly: false,\n padding: 1,\n colors: {\n scheme: 'nivo'\n },\n colorBy: 'depth',\n borderWidth: 0,\n borderColor: {\n from: 'color'\n },\n enableLabel: true,\n label: 'id',\n labelTextColor: {\n from: 'color',\n modifiers: [['darker', 1]]\n },\n labelSkipRadius: 8,\n isInteractive: true,\n onClick: noop,\n isZoomable: true\n};\nvar BubbleDefaultProps = _objectSpread2(_objectSpread2({}, commonDefaultProps), {}, {\n nodeComponent: BubbleNode,\n role: 'img',\n defs: [],\n fill: []\n});\nvar BubbleHtmlDefaultProps = _objectSpread2(_objectSpread2({}, commonDefaultProps), {}, {\n nodeComponent: BubbleHtmlNode\n});\nvar BubbleCanvasDefaultProps = _objectSpread2(_objectSpread2({}, commonDefaultProps), {}, {\n pixelRatio: global.window && global.window.devicePixelRatio ? global.window.devicePixelRatio : 1\n});\n\nvar props = /*#__PURE__*/Object.freeze({\n __proto__: null,\n BubblePropTypes: BubblePropTypes,\n BubbleHtmlPropTypes: BubbleHtmlPropTypes,\n BubbleCanvasPropTypes: BubbleCanvasPropTypes,\n BubbleDefaultProps: BubbleDefaultProps,\n BubbleHtmlDefaultProps: BubbleHtmlDefaultProps,\n BubbleCanvasDefaultProps: BubbleCanvasDefaultProps\n});\n\nvar commonEnhancers = [withHierarchy(), withDimensions(), withTheme(), withPropsOnChange(['colors', 'colorBy'], function (_ref) {\n var colors = _ref.colors,\n colorBy = _ref.colorBy;\n return {\n getColor: getOrdinalColorScale(colors, colorBy)\n };\n}), withPropsOnChange(['width', 'height', 'padding'], function (_ref2) {\n var width = _ref2.width,\n height = _ref2.height,\n padding = _ref2.padding;\n return {\n pack: pack().size([width, height]).padding(padding)\n };\n}), withPropsOnChange(['identity'], function (_ref3) {\n var identity = _ref3.identity;\n return {\n getIdentity: getAccessorFor(identity)\n };\n}),\nwithPropsOnChange(['borderColor', 'theme'], function (_ref4) {\n var borderColor = _ref4.borderColor,\n theme = _ref4.theme;\n return {\n getBorderColor: getInheritedColorGenerator(borderColor, theme)\n };\n}),\nwithPropsOnChange(['label', 'labelFormat'], function (_ref5) {\n var label = _ref5.label,\n labelFormat = _ref5.labelFormat;\n return {\n getLabel: getLabelGenerator(label, labelFormat)\n };\n}), withPropsOnChange(['labelTextColor', 'theme'], function (_ref6) {\n var labelTextColor = _ref6.labelTextColor,\n theme = _ref6.theme;\n return {\n getLabelTextColor: getInheritedColorGenerator(labelTextColor, theme)\n };\n}),\nwithStateHandlers(function (_ref7) {\n var _ref7$currentNodePath = _ref7.currentNodePath,\n currentNodePath = _ref7$currentNodePath === void 0 ? null : _ref7$currentNodePath;\n return {\n currentNodePath: currentNodePath\n };\n}, {\n zoomToNode: function zoomToNode(_ref8) {\n var currentNodePath = _ref8.currentNodePath;\n return function (path) {\n if (path === currentNodePath) return {\n currentNodePath: null\n };\n return {\n currentNodePath: path\n };\n };\n }\n}), withPropsOnChange(['root', 'pack', 'leavesOnly', 'getIdentity', 'getColor'], function (_ref9) {\n var root = _ref9.root,\n pack = _ref9.pack,\n leavesOnly = _ref9.leavesOnly,\n getIdentity = _ref9.getIdentity,\n getColor = _ref9.getColor;\n var nodes = computeNodes({\n root: root,\n pack: pack,\n leavesOnly: leavesOnly,\n getIdentity: getIdentity,\n getColor: getColor\n });\n return {\n nodes: nodes\n };\n}), withPropsOnChange(['enableLabel', 'nodes', 'getLabel', 'labelSkipRadius'], function (_ref10) {\n var enableLabel = _ref10.enableLabel,\n nodes = _ref10.nodes,\n getLabel = _ref10.getLabel,\n labelSkipRadius = _ref10.labelSkipRadius;\n if (!enableLabel) return;\n var nodesWithLabel = nodes.map(function (node) {\n if (node.height !== 0 || labelSkipRadius > 0 && node.r < labelSkipRadius) return node;\n return _objectSpread2(_objectSpread2({}, node), {}, {\n label: getLabel(node)\n });\n });\n return {\n nodes: nodesWithLabel\n };\n}), withPropsOnChange(['nodes', 'isZoomable', 'currentNodePath'], function (_ref11) {\n var nodes = _ref11.nodes,\n isZoomable = _ref11.isZoomable,\n currentNodePath = _ref11.currentNodePath,\n width = _ref11.width,\n height = _ref11.height;\n if (currentNodePath && isZoomable) {\n return {\n nodes: computeZoom(nodes, currentNodePath, width, height)\n };\n }\n})];\nvar svgEnhancers = [withPropsOnChange(['nodes', 'defs', 'fill'], function (_ref12) {\n var nodes = _ref12.nodes,\n defs = _ref12.defs,\n fill = _ref12.fill;\n return {\n defs: bindDefs(defs, nodes, fill, {\n targetKey: 'fill'\n })\n };\n})];\nvar enhance = (function (Component) {\n var implPropTypes = props[\"\".concat(Component.displayName, \"PropTypes\")];\n var implDefaultProps = props[\"\".concat(Component.displayName, \"DefaultProps\")];\n Component.propTypes = implPropTypes;\n switch (Component.displayName) {\n case 'Bubble':\n return compose.apply(void 0, [defaultProps(implDefaultProps)].concat(commonEnhancers, svgEnhancers, [withMotion(), pure]))(Component);\n case 'BubbleHtml':\n return compose.apply(void 0, [defaultProps(implDefaultProps)].concat(commonEnhancers, [withMotion(), pure]))(Component);\n case 'BubbleCanvas':\n return compose.apply(void 0, [defaultProps(implDefaultProps)].concat(commonEnhancers, [pure]))(Component);\n }\n return Component;\n});\n\nvar nodeWillEnter = function nodeWillEnter(_ref) {\n var data = _ref.data;\n return _objectSpread2({\n scale: 0,\n r: 0,\n x: data.x,\n y: data.y\n }, interpolateColor(data.color));\n};\nvar nodeWillLeave = function nodeWillLeave(springConfig) {\n return function (_ref2) {\n var data = _ref2.data;\n return _objectSpread2({\n scale: spring(0, springConfig),\n r: spring(0, springConfig),\n x: spring(data.x, springConfig),\n y: spring(data.y, springConfig)\n }, interpolateColor(data.color, springConfig));\n };\n};\n\nvar getNodeHandlers = function getNodeHandlers(node, _ref) {\n var isInteractive = _ref.isInteractive,\n onClick = _ref.onClick,\n showTooltip = _ref.showTooltip,\n hideTooltip = _ref.hideTooltip,\n isZoomable = _ref.isZoomable,\n zoomToNode = _ref.zoomToNode,\n theme = _ref.theme,\n tooltipFormat = _ref.tooltipFormat,\n tooltip = _ref.tooltip;\n if (!isInteractive) return {};\n var handleTooltip = function handleTooltip(e) {\n showTooltip( React.createElement(BasicTooltip, {\n id: node.id,\n value: node.value,\n enableChip: true,\n color: node.color,\n theme: theme,\n format: tooltipFormat,\n renderContent: typeof tooltip === 'function' ? tooltip.bind(null, _objectSpread2({\n node: node\n }, node)) : null\n }), e);\n };\n var clickHandler = onClick;\n if (isZoomable) {\n clickHandler = function clickHandler(event) {\n onClick(node, event);\n zoomToNode(node.path);\n };\n } else {\n clickHandler = function clickHandler(event) {\n onClick(node, event);\n };\n }\n return {\n onMouseEnter: handleTooltip,\n onMouseMove: handleTooltip,\n onMouseLeave: hideTooltip,\n onClick: clickHandler\n };\n};\n\nvar Bubble = function Bubble(_ref) {\n var nodes = _ref.nodes,\n nodeComponent = _ref.nodeComponent,\n margin = _ref.margin,\n outerWidth = _ref.outerWidth,\n outerHeight = _ref.outerHeight,\n theme = _ref.theme,\n borderWidth = _ref.borderWidth,\n getBorderColor = _ref.getBorderColor,\n defs = _ref.defs,\n getLabelTextColor = _ref.getLabelTextColor,\n animate = _ref.animate,\n motionStiffness = _ref.motionStiffness,\n motionDamping = _ref.motionDamping,\n isInteractive = _ref.isInteractive,\n onClick = _ref.onClick,\n tooltipFormat = _ref.tooltipFormat,\n tooltip = _ref.tooltip,\n isZoomable = _ref.isZoomable,\n zoomToNode = _ref.zoomToNode,\n role = _ref.role;\n var springConfig = {\n stiffness: motionStiffness,\n damping: motionDamping\n };\n var getHandlers = function getHandlers(node, showTooltip, hideTooltip) {\n return getNodeHandlers(node, {\n isInteractive: isInteractive,\n onClick: onClick,\n showTooltip: showTooltip,\n hideTooltip: hideTooltip,\n isZoomable: isZoomable,\n zoomToNode: zoomToNode,\n theme: theme,\n tooltipFormat: tooltipFormat,\n tooltip: tooltip\n });\n };\n return React.createElement(Container, {\n isInteractive: isInteractive,\n theme: theme,\n animate: animate,\n motionStiffness: motionStiffness,\n motionDamping: motionDamping\n }, function (_ref2) {\n var showTooltip = _ref2.showTooltip,\n hideTooltip = _ref2.hideTooltip;\n return React.createElement(SvgWrapper, {\n width: outerWidth,\n height: outerHeight,\n margin: margin,\n defs: defs,\n theme: theme,\n role: role\n }, !animate && React.createElement(\"g\", null, nodes.map(function (node) {\n return React.createElement(nodeComponent, {\n key: node.path,\n node: node,\n style: _objectSpread2(_objectSpread2({}, pick(node, ['scale', 'r', 'x', 'y', 'color'])), {}, {\n fill: node.fill,\n borderWidth: borderWidth,\n borderColor: getBorderColor(node),\n labelTextColor: getLabelTextColor(node)\n }),\n handlers: getHandlers(node, showTooltip, hideTooltip),\n theme: theme\n });\n })), animate && React.createElement(TransitionMotion, {\n willEnter: nodeWillEnter,\n willLeave: nodeWillLeave(springConfig),\n styles: nodes.map(function (node) {\n return {\n key: node.path,\n data: node,\n style: _objectSpread2({\n scale: spring(1, springConfig),\n r: spring(node.r, springConfig),\n x: spring(node.x, springConfig),\n y: spring(node.y, springConfig),\n opacity: spring(1, springConfig)\n }, interpolateColor(node.color, springConfig))\n };\n })\n }, function (interpolatedStyles) {\n return React.createElement(\"g\", null, interpolatedStyles.map(function (_ref3) {\n var style = _ref3.style,\n node = _ref3.data;\n style.color = getInterpolatedColor(style);\n return React.createElement(nodeComponent, {\n key: node.path,\n node: node,\n style: _objectSpread2(_objectSpread2({}, style), {}, {\n fill: node.fill,\n borderWidth: borderWidth,\n borderColor: getBorderColor(style),\n labelTextColor: getLabelTextColor(style)\n }),\n handlers: getHandlers(node, showTooltip, hideTooltip),\n theme: theme\n });\n }));\n }));\n });\n};\nBubble.displayName = 'Bubble';\nvar enhancedBubble = enhance(Bubble);\nenhancedBubble.displayName = 'Bubble';\n\nvar ResponsiveBubble = function ResponsiveBubble(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(enhancedBubble, Object.assign({\n width: width,\n height: height\n }, props));\n });\n};\n\nvar BubbleHtml = function BubbleHtml(_ref) {\n var nodes = _ref.nodes,\n nodeComponent = _ref.nodeComponent,\n margin = _ref.margin,\n outerWidth = _ref.outerWidth,\n outerHeight = _ref.outerHeight,\n theme = _ref.theme,\n borderWidth = _ref.borderWidth,\n getBorderColor = _ref.getBorderColor,\n getLabelTextColor = _ref.getLabelTextColor,\n animate = _ref.animate,\n motionStiffness = _ref.motionStiffness,\n motionDamping = _ref.motionDamping,\n isInteractive = _ref.isInteractive,\n onClick = _ref.onClick,\n isZoomable = _ref.isZoomable,\n zoomToNode = _ref.zoomToNode,\n tooltipFormat = _ref.tooltipFormat,\n tooltip = _ref.tooltip;\n var springConfig = {\n stiffness: motionStiffness,\n damping: motionDamping\n };\n var getHandlers = function getHandlers(node, showTooltip, hideTooltip) {\n return getNodeHandlers(node, {\n isInteractive: isInteractive,\n onClick: onClick,\n showTooltip: showTooltip,\n hideTooltip: hideTooltip,\n isZoomable: isZoomable,\n zoomToNode: zoomToNode,\n theme: theme,\n tooltipFormat: tooltipFormat,\n tooltip: tooltip\n });\n };\n return React.createElement(Container, {\n isInteractive: isInteractive,\n theme: theme,\n animate: animate,\n motionStiffness: motionStiffness,\n motionDamping: motionDamping\n }, function (_ref2) {\n var showTooltip = _ref2.showTooltip,\n hideTooltip = _ref2.hideTooltip;\n return React.createElement(\"div\", {\n style: {\n position: 'relative',\n width: outerWidth,\n height: outerHeight\n }\n }, !animate && React.createElement(\"div\", {\n style: {\n position: 'absolute',\n top: margin.top,\n left: margin.left\n }\n }, nodes.map(function (node) {\n return React.createElement(nodeComponent, {\n key: node.path,\n node: node,\n style: _objectSpread2(_objectSpread2({}, pick(node, ['scale', 'r', 'x', 'y', 'color'])), {}, {\n borderWidth: borderWidth,\n borderColor: getBorderColor(node),\n labelTextColor: getLabelTextColor(node)\n }),\n handlers: getHandlers(node, showTooltip, hideTooltip)\n });\n })), animate && React.createElement(TransitionMotion, {\n willEnter: nodeWillEnter,\n willLeave: nodeWillLeave(springConfig),\n styles: nodes.map(function (node) {\n return {\n key: node.path,\n data: node,\n style: _objectSpread2({\n scale: spring(1, springConfig),\n r: spring(node.r, springConfig),\n x: spring(node.x, springConfig),\n y: spring(node.y, springConfig),\n opacity: spring(1, springConfig)\n }, interpolateColor(node.color, springConfig))\n };\n })\n }, function (interpolatedStyles) {\n return React.createElement(\"div\", {\n style: {\n position: 'absolute',\n top: margin.top,\n left: margin.left\n }\n }, interpolatedStyles.map(function (_ref3) {\n var style = _ref3.style,\n node = _ref3.data;\n style.color = getInterpolatedColor(style);\n return React.createElement(nodeComponent, {\n key: node.path,\n node: node,\n style: _objectSpread2(_objectSpread2({}, style), {}, {\n borderWidth: borderWidth,\n borderColor: getBorderColor(style),\n labelTextColor: getLabelTextColor(style)\n }),\n handlers: getHandlers(node, showTooltip, hideTooltip)\n });\n }));\n }));\n });\n};\nBubbleHtml.displayName = 'BubbleHtml';\nvar enhancedBubbleHtml = enhance(BubbleHtml);\nenhancedBubbleHtml.displayName = 'BubbleHtml';\n\nvar ResponsiveBubbleHtml = function ResponsiveBubbleHtml(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(enhancedBubbleHtml, Object.assign({\n width: width,\n height: height\n }, props));\n });\n};\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n return _typeof(obj);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n return function () {\n var Super = _getPrototypeOf(Derived),\n result;\n if (_isNativeReflectConstruct()) {\n var NewTarget = _getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return _possibleConstructorReturn(this, result);\n };\n}\n\nvar BubbleCanvas = function (_Component) {\n _inherits(BubbleCanvas, _Component);\n var _super = _createSuper(BubbleCanvas);\n function BubbleCanvas() {\n _classCallCheck(this, BubbleCanvas);\n return _super.apply(this, arguments);\n }\n _createClass(BubbleCanvas, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.ctx = this.surface.getContext('2d');\n this.draw(this.props);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.ctx = this.surface.getContext('2d');\n this.draw(this.props);\n }\n }, {\n key: \"draw\",\n value: function draw(props) {\n var _this = this;\n var nodes = props.nodes,\n pixelRatio = props.pixelRatio,\n margin = props.margin,\n outerWidth = props.outerWidth,\n outerHeight = props.outerHeight,\n theme = props.theme,\n borderWidth = props.borderWidth,\n getBorderColor = props.getBorderColor,\n enableLabel = props.enableLabel,\n getLabel = props.getLabel,\n labelSkipRadius = props.labelSkipRadius,\n getLabelTextColor = props.getLabelTextColor;\n this.surface.width = outerWidth * pixelRatio;\n this.surface.height = outerHeight * pixelRatio;\n this.ctx.scale(pixelRatio, pixelRatio);\n this.ctx.fillStyle = theme.background;\n this.ctx.fillRect(0, 0, outerWidth, outerHeight);\n this.ctx.translate(margin.left, margin.top);\n nodes.forEach(function (node) {\n _this.ctx.save();\n if (borderWidth > 0) {\n _this.ctx.strokeStyle = getBorderColor(node);\n _this.ctx.lineWidth = borderWidth;\n }\n _this.ctx.beginPath();\n _this.ctx.arc(node.x, node.y, node.r, 0, 2 * Math.PI);\n _this.ctx.fillStyle = node.color;\n _this.ctx.fill();\n if (borderWidth > 0) {\n _this.ctx.stroke();\n }\n });\n if (enableLabel) {\n this.ctx.textAlign = 'center';\n this.ctx.textBaseline = 'middle';\n this.ctx.font = \"\".concat(theme.labels.text.fontSize, \"px \").concat(theme.labels.text.fontFamily);\n nodes.filter(function (_ref) {\n var r = _ref.r;\n return r > labelSkipRadius;\n }).forEach(function (node) {\n var label = getLabel(node);\n var labelTextColor = getLabelTextColor(node);\n _this.ctx.fillStyle = labelTextColor;\n _this.ctx.fillText(label, node.x, node.y);\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n var _this$props = this.props,\n outerWidth = _this$props.outerWidth,\n outerHeight = _this$props.outerHeight,\n pixelRatio = _this$props.pixelRatio,\n isInteractive = _this$props.isInteractive,\n theme = _this$props.theme;\n return React.createElement(Container, {\n isInteractive: isInteractive,\n theme: theme,\n animate: false\n }, function () {\n return React.createElement(\"canvas\", {\n ref: function ref(surface) {\n _this2.surface = surface;\n },\n width: outerWidth * pixelRatio,\n height: outerHeight * pixelRatio,\n style: {\n width: outerWidth,\n height: outerHeight\n }\n });\n });\n }\n }]);\n return BubbleCanvas;\n}(Component);\nBubbleCanvas.displayName = 'BubbleCanvas';\nvar enhancedBubbleCanvas = enhance(BubbleCanvas);\nenhancedBubbleCanvas.displayName = 'BubbleCanvas';\n\nvar ResponsiveBubbleCanvas = function ResponsiveBubbleCanvas(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(enhancedBubbleCanvas, Object.assign({\n width: width,\n height: height\n }, props));\n });\n};\n\nexport { enhancedBubble as Bubble, enhancedBubbleCanvas as BubbleCanvas, BubbleCanvasDefaultProps, BubbleCanvasPropTypes, BubbleDefaultProps, enhancedBubbleHtml as BubbleHtml, BubbleHtmlDefaultProps, BubbleHtmlPropTypes, BubblePropTypes, ResponsiveBubble, ResponsiveBubbleCanvas, ResponsiveBubbleHtml };\n//# sourceMappingURL=nivo-circle-packing.es.js.map\n"],"names":["_defineProperty","obj","key","value","ownKeys","object","enumerableOnly","keys","symbols","sym","_objectSpread2","target","i","source","_arrayWithHoles","arr","_iterableToArrayLimit","_arr","_n","_d","_e","_i","_s","err","_arrayLikeToArray","len","arr2","_unsupportedIterableToArray","o","minLen","n","_nonIterableRest","_slicedToArray","TOOLTIP_OFFSET","tooltipStyle","TooltipWrapper","_ref","position","anchor","children","theme","useTheme","_useMotionConfig","useMotionConfig","animate","springConfig","_useMeasure","useMeasure","_useMeasure2","measureRef","bounds","previousPosition","useRef","to","immediate","hasDimension","y","animatedProps","useSpring","style","React","animated","TooltipWrapper$1","memo","Chip","size","color","PropTypes","BasicTooltip","id","_value","format","enableChip","renderContent","formatValue","useValueFormatter","content","tableStyle","TableTooltip","title","rows","row","column","j","crosshairTypes","crosshairPropTypes","CrosshairLine","x0","x1","y0","y1","useMemo","Crosshair","width","height","type","x","xLine","yLine","tooltipContext","createContext","useTooltipHandlers","container","_useState","useState","_useState2","state","setState","showTooltipAt","useCallback","_ref2","showTooltipFromEvent","event","hideTooltip","useTooltip","context","useContext","memoizedContext","noop","textProps","axisThemePropType","gridThemePropType","legendsThemePropType","labelsThemePropType","dotsThemePropType","markersThemePropType","crosshairPropType","annotationsPropType","defaultTheme","fontProps","extendDefaultTheme","customTheme","merge","prop","get","set","motionConfigContext","MotionConfigProvider","stiffness","damping","config$1","reactSpringConfig","_isString","config","motionPropTypes","motionDefaultProps","usePrevious","ref","useEffect","useAnimatedPath","path","previousPath","interpolator","interpolateString","_useSpring","quantizeColorScales","last","schemeBrBG","schemePRGn","schemePiYG","schemePuOr","schemeRdBu","schemeRdGy","schemeRdYlBu","schemeRdYlGn","schemeSpectral","schemeBlues","schemeGreens","schemeGreys","schemeOranges","schemePurples","schemeReds","schemeBuGn","schemeBuPu","schemeGnBu","schemeOrRd","schemePuBuGn","schemePuBu","schemePuRd","schemeRdPu","schemeYlGnBu","schemeYlGn","schemeYlOrBr","schemeYlOrRd","quantizeColorScalesKeys","schemeCategory10","schemeAccent","schemeDark2","schemePaired","schemePastel1","schemePastel2","schemeSet1","schemeSet2","schemeSet3","curvePropMapping","curveBasis","curveBasisClosed","curveBasisOpen","curveBundle","curveCardinal","curveCardinalClosed","curveCardinalOpen","curveCatmullRom","curveCatmullRomClosed","curveCatmullRomOpen","curveLinear","curveLinearClosed","curveMonotoneX","curveMonotoneY","curveNatural","curveStep","curveStepAfter","curveStepBefore","curvePropKeys","closedCurvePropKeys","c","areaCurvePropKeys","without","lineCurvePropKeys","lineCurvePropType","curveFromProp","curveInterpolator","defsPropTypes","stackOrderPropMapping","stackOrderAscending","stackOrderDescending","stackOrderInsideOut","stackOrderNone","stackOrderReverse","stackOrderPropKeys","stackOffsetPropMapping","stackOffsetExpand","stackOffsetDiverging","stackOffsetNone","stackOffsetSilhouette","stackOffsetWiggle","stackOffsetPropKeys","treeMapTilePropMapping","treemapBinary","treemapDice","treemapSlice","treemapSliceDice","treemapSquarify","treemapResquarify","treeMapTilePropKeys","marginPropType","blendModes","blendModePropType","defaultAnimate","defaultMotionStiffness","defaultMotionDamping","scaleOrdinal","defaultMargin","useDimensions","partialMargin","margin","MapShim","getIndex","result","entry","index","class_1","entries","callback","ctx","_a","isBrowser","global$1","requestAnimationFrame$1","trailingTimeout","throttle","delay","leadingCall","trailingCall","lastCallTime","resolvePending","proxy","timeoutCallback","timeStamp","REFRESH_DELAY","transitionKeys","mutationObserverSupported","ResizeObserverController","observer","observers","changesDetected","activeObservers","_b","propertyName","isReflowProperty","defineConfigurable","props","getWindowOf","ownerGlobal","emptyRect","createRectInit","toFloat","getBordersSize","styles","positions","getPaddings","paddings","positions_1","getSVGContentRect","bbox","getHTMLElementContentRect","clientWidth","clientHeight","horizPad","vertPad","isDocumentElement","vertScrollbar","horizScrollbar","isSVGGraphicsElement","getContentRect","createReadOnlyRect","Constr","rect","ResizeObservation","ResizeObserverEntry","rectInit","contentRect","ResizeObserverSPI","controller","callbackCtx","observations","_this","observation","ResizeObserver","method","setBounds","_useState3","_useState4","usePartialTheme","partialTheme","getValueFormatter","format$1","timeFormat","v","themeContext","defaultPartialTheme","ThemeProvider","_ref$theme","containerStyle","Container","_ref$isInteractive","isInteractive","motionStiffness","motionDamping","containerEl","showTooltip","clientX","clientY","isTooltipVisible","tooltipContent","ResponsiveWrapper","shouldRender","LinearGradient","colors","offset","opacity","gradientTypes","PatternDots","background","padding","stagger","fullSize","radius","halfPadding","_arrayWithoutHoles","_iterableToArray","iter","_nonIterableSpread","_toConsumableArray","TWO_PI","degreesToRadians","degrees","radiansToDegrees","radians","midAngle","arc","positionFromAngle","angle","distance","absoluteAngleDegrees","absAngle","absoluteAngleRadians","computeArcBoundingBox","ox","oy","startAngle","endAngle","includeCenter","points","p0","p1","p","xs","_ref3","_ref4","ys","_ref5","_ref6","textPropsByEngine","PatternLines","_spacing","_rotation","lineWidth","rotation","spacing","PatternSquares","patternTypes","_objectWithoutPropertiesLoose","excluded","sourceKeys","_objectWithoutProperties","sourceSymbolKeys","defsMapping","Defs","definitions","def","Defs$1","SvgWrapper","defs","role","DotsItemSymbol","borderWidth","borderColor","DotsItemSymbol$1","DotsItem","symbol","datum","label","labelTextAnchor","labelYOffset","DotsItemDefaultProps","DotsItem$1","computeLabel","axis","offsetX","offsetY","orientation","textAnchor","CartesianMarkersItem","scale","lineStyle","textStyle","legend","legendPosition","legendOffsetX","legendOffsetY","legendOrientation","x2","y2","legendNode","legendProps","CartesianMarkersItem$1","CartesianMarkers","markers","xScale","yScale","marker","CartesianMarkers$1","withDimensions","compose","defaultProps","setPropTypes","withPropsOnChange","nextProps","isEqual","getLabelGenerator","_label","labelFormat","getRawLabel","isFunction","d","formatter","getAccessorFor","directive","withHierarchy","_setPropTypes","_ref$srcKey","srcKey","_ref$destKey","destKey","_ref$valueKey","valueKey","_ref$valueDefault","valueDefault","hierarchy","withMotion","withTheme","_classCallCheck","instance","Constructor","_defineProperties","descriptor","_createClass","protoProps","staticProps","_setPrototypeOf","_inherits","subClass","superClass","_getPrototypeOf","_isNativeReflectConstruct","e","_typeof","_assertThisInitialized","self","_possibleConstructorReturn","call","_createSuper","Derived","Super","NewTarget","containerStyle$1","Container$1","_ref$renderWrapper","renderWrapper","motionConfig","_useTooltipHandlers","tooltipPosition","tooltipAnchor","withContainer","WrappedComponent","_Component","_class","_super","_this$props","childProps","Component","boxAlignments","alignBox","box","alignment","deltaX","deltaY","getDistance","getAngle","isCursorInRect","cursorX","cursorY","isCursorInRing","centerX","centerY","innerRadius","getHoveredArc","arcs","cursorAngle","getRelativeCursor","el","gradientKeys","patternKeys","isMatchingDef","predicate","node","dataKey","isPlainObject","data","pick","bindDefs","nodes","rules","_ref$colorKey","colorKey","_ref$targetKey","targetKey","boundDefs","generatedIds","_loop","_rules$i","match","defId","nodeColor","inheritedId","allColors","_nodeColor","_inheritedId","inheritedDef","colorStop","_ret","categoricalColorSchemes","categoricalColorSchemeIds","isCategoricalColorScheme","scheme","divergingColorSchemes","divergingColorSchemeIds","isDivergingColorScheme","sequentialColorSchemes","sequentialColorSchemeIds","isSequentialColorScheme","colorSchemes","colorSchemeIds","getOrdinalColorScale","instruction","identity","getIdentity","generator","_scale","_generator","_scale2","_generator2","_scale3","_generator3","useOrdinalColorScale","_createForOfIteratorHelper","F","it","normalCompletion","didErr","step","_e2","getInheritedColorGenerator","inheritedColor","themeColor","getColor","modifiers","_iterator","_step","modifier","_modifier","modifierType","amount","modify","rgb","useInheritedColor","parentColor","ordinalColorsPropType","colorPropertyAccessorPropType","inheritedColorPropType","interpolateColor","colorComponents","configWithPrecision","spring","getInterpolatedColor","colorR","colorG","colorB","DIRECTION_ROW","DIRECTION_COLUMN","ANCHOR_TOP","ANCHOR_TOP_RIGHT","ANCHOR_RIGHT","ANCHOR_BOTTOM_RIGHT","ANCHOR_BOTTOM","ANCHOR_BOTTOM_LEFT","ANCHOR_LEFT","ANCHOR_TOP_LEFT","ANCHOR_CENTER","DIRECTION_LEFT_TO_RIGHT","DIRECTION_RIGHT_TO_LEFT","DIRECTION_TOP_TO_BOTTOM","DIRECTION_BOTTOM_TO_TOP","legendEffectPropType","symbolPropTypes","interactivityPropTypes","datumPropType","LegendPropShape","zeroPadding","computeDimensions","direction","itemsSpacing","_padding","itemCount","itemWidth","itemHeight","isNumber","horizontalPadding","verticalPadding","computePositionFromAnchor","translateX","translateY","containerWidth","containerHeight","computeItemLayout","justify","symbolSize","symbolSpacing","symbolX","symbolY","labelX","labelY","labelAnchor","labelAlignment","symbolDefaultProps","SymbolCircle","_PureComponent","fill","PureComponent","SymbolDiamond","SymbolSquare","SymbolTriangle","symbolByShape","LegendSvgItem","textColor","symbolShape","symbolBorderWidth","symbolBorderColor","onClick","onMouseEnter","onMouseLeave","effects","setStyle","handleClick","handleMouseEnter","applyEffects","on","_style","acc","effect","handleMouseLeave","_style2","_computeItemLayout","handler","Symbol","LegendSvg","itemDirection","itemTextColor","itemBackground","itemOpacity","_computeDimensions","xStep","yStep","BoxLegendSvg","_computePositionFromA","textPropsMapping","renderLegendToCanvas","_ref$translateX","_ref$translateY","_ref$padding","_ref$justify","_ref$itemsSpacing","_ref$itemDirection","_ref$itemTextColor","_ref$symbolSize","_ref$symbolSpacing","itemX","itemY","PieLayoutDefaultProps","PieLayout","_innerRadius","debug","render","fit","cornerRadius","sortByValue","padAngle","pie$1","pie","computedProps","boundingBox","_computeArcBoundingBo","ratio","adjustedBox","arcGenerator","PiePropTypes","PieDefaultProps","PieSvgDefaultProps","PieSlice","_onClick","tooltipFormat","tooltip","handleTooltip","computeRadialLabels","getLabel","skipAngle","linkOffset","linkDiagonalLength","linkHorizontalLength","textXOffset","positionA","positionB","positionC","labelPosition","textAlign","lineGenerator","line","PieRadialLabels","linkStrokeWidth","linkColor","labels","Fragment","sliceStyle","PieSlicesLabels","centerRadius","PieLegends","legends","_ref$data","Pie","_margin","_width","_height","colorBy","_borderColor","radialLabel","enableRadialLabels","radialLabelsSkipAngle","radialLabelsLinkOffset","radialLabelsLinkDiagonalLength","radialLabelsLinkHorizontalLength","radialLabelsLinkStrokeWidth","radialLabelsTextXOffset","radialLabelsTextColor","radialLabelsLinkColor","sliceLabel","enableSlicesLabels","slicesLabelsSkipAngle","slicesLabelsTextColor","_theme","_useDimensions","outerWidth","outerHeight","innerWidth","innerHeight","getRadialLabel","getSliceLabel","ResponsivePie","drawSliceLabels","getTextColor","_arcGenerator$centroi","_arcGenerator$centroi2","centroidX","centroidY","drawRadialLabels","getLinkColor","radialLabels","dataWithColor","point","PieTooltip","PieCanvasRenderer","_len","args","_key","_getRelativeCursor","_getRelativeCursor2","_this2","pixelRatio","getBorderColor","_this3","_this$props2","surface","centerScale","bandwidth","timeByType","timeMillisecond","utcMillisecond","timeSecond","utcSecond","timeMinute","utcMinute","timeHour","utcHour","timeDay","utcDay","timeWeek","utcWeek","timeSunday","utcSunday","timeMonday","utcMonday","timeTuesday","utcTuesday","timeWednesday","utcWednesday","timeThursday","utcThursday","timeFriday","utcFriday","timeSaturday","utcSaturday","timeMonth","utcMonth","timeYear","utcYear","timeTypes","timeIntervalRegexp","isInteger","getScaleTicks","spec","matches","timeType","computeCartesianTicks","ticksPosition","tickValues","tickSize","tickPadding","tickRotation","_ref$engine","engine","values","text","translate","textBaseline","ticks","getFormatter","f","computeGridLines","_values","lineValues","lineCount","lines","axisPropTypes","axisPropType","AxisTick","lineX","lineY","gStyle","AxisTick$1","defaultTickRenderer","Axis","length","renderTick","legendOffset","ariaHidden","_computeCartesianTick","legendX","legendY","legendRotation","transitions","useTransition","tick","tickIndex","transitionProps","Axis$1","Axes","top","right","bottom","left","axes","isXAxis","Axes$1","GridLine","GridLine$1","GridLines","GridLines$1","Grid","xValues","yValues","xLines","yLines","Grid$1","renderAxisToCanvas","_ref$x","_ref$y","_ref$tickSize","_ref$tickPadding","_ref$tickRotation","_ref$legendPosition","_ref$legendOffset","_textAlign","positions$1","renderAxesToCanvas","renderGridLinesToCanvas","linearScale","xy","_ref$min","min","_ref$max","max","_ref$stacked","stacked","_ref$reverse","reverse","minValue","maxValue","scaleLinear","linearScalePropTypes","logScale","_ref$base","base","hasZero","sign","hasMixedSign","scaleLog","logScalePropTypes","symlogScale","_ref$constant","constant","scaleSymlog","symLogScalePropTypes","pointScale","scalePoint","pointScalePropTypes","_precisionCutOffsByTy","TIME_PRECISION_MILLISECOND","TIME_PRECISION_SECOND","TIME_PRECISION_MINUTE","TIME_PRECISION_HOUR","TIME_PRECISION_DAY","TIME_PRECISION_MONTH","TIME_PRECISION_YEAR","timePrecisions","precisionCutOffs","date","precisionCutOffsByType","createPrecisionMethod","precision","cutOff","createDateNormalizer","_ref$format","_ref$precision","_ref$useUTC","useUTC","precisionFn","parseTime","utcParse","timeParse","timeScale","normalize","scaleUtc","scaleTime","timeScalePropTypes","getOtherAxis","compareValues","a","b","compareDateValues","computeXYScalesForSeries","_series","xScaleSpec","yScaleSpec","series","serie","generateSeriesXY","stackX","stackY","computeScale","generateSeriesAxis","scaleSpec","_ref$getValue","getValue","_ref$setValue","setValue","all","uniq","sortBy","uniqBy","stackAxis","otherType","otherAxis","compare","isDate","stack","stackValue","head","scalePropType","VoronoiDefaultProps","enhance","xDomain","yDomain","scaledPoints","delaunay","Delaunay","voronoi","pure","Voronoi","layers","enableLinks","linkLineWidth","linkLineColor","enableCells","cellLineWidth","cellLineColor","enablePoints","pointSize","pointColor","layerById","layer","getAccessor","computeMeshPoints","getX","getY","computeMesh","useVoronoiMesh","points2d","Mesh","onMouseMove","elementRef","currentIndex","setCurrentIndex","_useVoronoiMesh","voronoiPath","getIndexAndNodeFromEvent","_getIndexAndNodeFromE","_getIndexAndNodeFromE2","handleMouseMove","_getIndexAndNodeFromE3","_getIndexAndNodeFromE4","previousNode","_getIndexAndNodeFromE5","_getIndexAndNodeFromE6","renderVoronoiToCanvas","renderVoronoiCellToCanvas","LinePointTooltip","PointTooltip","SliceTooltip","slice","SliceTooltip$1","commonPropTypes","commonDefaultProps","LineDefaultProps","LineCanvasDefaultProps","useLineGenerator","curve","useAreaGenerator","areaBaselineValue","area","usePoints","getPointColor","getPointBorderColor","formatX","formatY","useSlices","enableSlices","map","slices","slicePoints","prevSlice","nextSlice","sliceWidth","_map","_ref7","_ref8","sliceHeight","useLine","_ref9","_ref9$xScale","xFormat","_ref9$yScale","yFormat","_ref9$colors","_ref9$curve","_ref9$areaBaselineVal","_ref9$pointColor","_ref9$pointBorderColo","pointBorderColor","_ref9$enableSlices","_useMemo","rawSeries","areaGenerator","AreaPath","areaBlendMode","areaOpacity","animatedPath","Areas","computedLines","Areas$1","LinesItem","thickness","LinesItem$1","Lines","Lines$1","SlicesItem","isCurrent","setCurrent","_useTooltip","SlicesItem$1","Slices","current","Slices$1","Points","enableLabel","mappedPoints","mappedPoint","Points$1","Mesh$2","Mesh$1","Line","axisTop","axisRight","axisBottom","axisLeft","enableGridX","enableGridY","gridXValues","gridYValues","enableArea","pointSymbol","pointBorderWidth","enablePointLabel","pointLabel","pointLabelYOffset","useMesh","debugMesh","debugSlices","sliceTooltip","enableCrosshair","crosshairType","_useLine","currentPoint","setCurrentPoint","currentSlice","setCurrentSlice","legendData","Line$1","ResponsiveLine","LineCanvas","canvasEl","getPointFromMouseEvent","pointIndex","handleMouseHover","defaultPositionAccessor","item","bindAnnotations","items","annotations","_ref$getPosition","getPosition","getDimensions","annotation","filter","dimensions","omit","getLinkAngle","sourceX","sourceY","targetX","targetY","computeAnnotation","noteX","noteY","_ref2$noteWidth","noteWidth","_ref2$noteTextOffset","noteTextOffset","computedNoteX","computedNoteY","computedX","computedY","eighth","textX","textY","noteLineX","noteLineY","useAnnotations","useComputedAnnotation","AnnotationNote","note","springConfiig","_toArray","AnnotationLink","isOutline","_props$points","CircleAnnotationOutline","DotAnnotationOutline","RectAnnotationOutline","Annotation","computed","getIndexedScale","range","scaleBand","getGroupedScale","_minValue","_maxValue","allValues","k","generateVerticalGroupedBars","_ref$innerPadding","innerPadding","yRange","barWidth","yRef","getHeight","bars","barHeight","barData","generateHorizontalGroupedBars","_ref2$padding","_ref2$innerPadding","xRange","xRef","getWidth","generateGroupedBars","options","getStackedScale","flattenDepth","generateVerticalStackedBars","stackedData","stackedDataItem","generateHorizontalStackedBars","generateStackedBars","getLegendDataForKeys","layout","groupMode","_uniqBy","bar","getLegendDataForIndexes","getLegendData","from","BarItem","borderRadius","shouldRenderLabel","labelColor","getTooltipLabel","BarItem$1","BarPropTypes","BarDefaultProps","BarSvgDefaultProps","enhance$1","compose$1","indexBy","labelTextColor","labelLinkColor","tooltipLabel","BarAnnotations","boundAnnotations","barWillEnterHorizontal","barWillEnterVertical","barWillLeaveHorizontal","barWillLeaveVertical","Bar","barComponent","labelSkipWidth","labelSkipHeight","getLabelTextColor","motionProps","willEnter","willLeave","commonProps","TransitionMotion","interpolatedStyles","baseProps","Bar$1","setDisplayName","findNodeUnderCursor","BarCanvas","_getRelativeCursor3","_getRelativeCursor4","legendDataForKeys","legendDataForIndexes","_this$props3","ResponsiveBar","CalendarTooltip","day","monthLabelFormat","year","month","CalendarDefaultProps","CalendarCanvasDefaultProps","CalendarYearLegends","years","CalendarMonthPath","CalendarMonthLegends","months","computeDomain","minSpec","maxSpec","computeCellSize","yearRange","yearSpacing","monthSpacing","daySpacing","maxWeeks","hCellSize","vCellSize","monthPathAndBBox","cellSize","yearIndex","originX","originY","t1","firstWeek","lastWeek","firstDay","lastDay","xO","yO","yearOffset","monthOffset","memoMonthPathAndBBox","memoize","cellPositionHorizontal","weekOfYear","cellPositionVertical","dayFormat","computeLayout","align","fromDate","toDate","timeWeeks","monthsSize","yearsSize","calendarWidth","calendarHeight","_alignBox","_alignBox2","cellPosition","days","yearStart","yearEnd","timeDays","dayDate","yearMonths","timeMonths","monthDate","bindDaysData","colorScale","emptyColor","dayData","computeYearLegendPositions","computeMonthLegendPositions","useCalendarLayout","useColorScale","domain","defaultColorScale","scaleQuantize","useYearLegends","yearLegendPosition","yearLegendOffset","useMonthLegends","monthLegendPosition","monthLegendOffset","useDays","CalendarDay","formatedData","Calendar","valueFormat","legendFormat","yearLegend","monthBorderColor","monthBorderWidth","monthLegend","dayBorderColor","dayBorderWidth","_useCalendarLayout","rest","colorScaleFn","monthLegends","yearLegends","formatLegend","m","Calendar$1","ResponsiveCalendar","findDayUnderCursor","CalendarCanvas","currentDay","setCurrentDay","computeNodePath","ancestor","computeNodes","root","pack","leavesOnly","computeZoom","currentNodePath","currentNode","BubbleNode","handlers","BubbleHtmlNode","BubblePropTypes","BubbleHtmlPropTypes","BubbleCanvasPropTypes","BubbleDefaultProps","BubbleHtmlDefaultProps","BubbleCanvasDefaultProps","commonEnhancers","withStateHandlers","_ref7$currentNodePath","_ref10","labelSkipRadius","nodesWithLabel","_ref11","isZoomable","svgEnhancers","_ref12","implPropTypes","implDefaultProps","nodeWillEnter","nodeWillLeave","getNodeHandlers","zoomToNode","clickHandler","Bubble","nodeComponent","getHandlers","enhancedBubble","ResponsiveBubble","BubbleHtml","enhancedBubbleHtml","BubbleCanvas","r","enhancedBubbleCanvas"],"mappings":"ivDAKA,SAASA,GAAgBC,EAAKC,EAAKC,EAAO,CACxC,OAAID,KAAOD,EACT,OAAO,eAAeA,EAAKC,EAAK,CAC9B,MAAOC,EACP,WAAY,GACZ,aAAc,GACd,SAAU,EAChB,CAAK,EAEDF,EAAIC,CAAG,EAAIC,EAENF,CACT,CAEA,SAASG,GAAQC,EAAQC,EAAgB,CACvC,IAAIC,EAAO,OAAO,KAAKF,CAAM,EAC7B,GAAI,OAAO,sBAAuB,CAChC,IAAIG,EAAU,OAAO,sBAAsBH,CAAM,EAC7CC,IAAgBE,EAAUA,EAAQ,OAAO,SAAUC,EAAK,CAC1D,OAAO,OAAO,yBAAyBJ,EAAQI,CAAG,EAAE,UAC1D,CAAK,GACDF,EAAK,KAAK,MAAMA,EAAMC,CAAO,CAC9B,CACD,OAAOD,CACT,CACA,SAASG,GAAeC,EAAQ,CAC9B,QAASC,EAAI,EAAGA,EAAI,UAAU,OAAQA,IAAK,CACzC,IAAIC,EAAS,UAAUD,CAAC,GAAK,KAAO,UAAUA,CAAC,EAAI,GAC/CA,EAAI,EACNR,GAAQ,OAAOS,CAAM,EAAG,EAAI,EAAE,QAAQ,SAAUX,EAAK,CACnDF,GAAgBW,EAAQT,EAAKW,EAAOX,CAAG,CAAC,CAChD,CAAO,EACQ,OAAO,0BAChB,OAAO,i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