{"version":3,"sources":["webpack:///./node_modules/react-motion/lib/react-motion.js","webpack:///./node_modules/object-keys/isArguments.js","webpack:///./node_modules/object-keys/index.js","webpack:///./node_modules/object-is/implementation.js","webpack:///./node_modules/is-regex/index.js","webpack:///./node_modules/is-arguments/index.js","webpack:///./node_modules/regexp.prototype.flags/index.js","webpack:///./node_modules/es-abstract/GetIntrinsic.js","webpack:///./node_modules/define-properties/index.js","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/function-bind/index.js","webpack:///./node_modules/is-date-object/index.js","webpack:///./node_modules/has-symbols/shams.js","webpack:///./node_modules/regexp.prototype.flags/shim.js","webpack:///./node_modules/react-motion/lib/presets.js","webpack:///./node_modules/d3-voronoi/src/constant.js","webpack:///./node_modules/d3-voronoi/src/point.js","webpack:///./node_modules/d3-voronoi/src/RedBlackTree.js","webpack:///./node_modules/d3-voronoi/src/Edge.js","webpack:///./node_modules/d3-voronoi/src/Cell.js","webpack:///./node_modules/d3-voronoi/src/Circle.js","webpack:///./node_modules/d3-voronoi/src/Beach.js","webpack:///./node_modules/d3-voronoi/src/Diagram.js","webpack:///./node_modules/d3-voronoi/src/voronoi.js","webpack:///./node_modules/d3-color/src/define.js","webpack:///./node_modules/d3-color/src/color.js","webpack:///./node_modules/d3-interpolate/src/basis.js","webpack:///./node_modules/d3-interpolate/src/constant.js","webpack:///./node_modules/d3-interpolate/src/color.js","webpack:///./node_modules/d3-interpolate/src/rgb.js","webpack:///./node_modules/d3-interpolate/src/basisClosed.js","webpack:///./node_modules/d3-interpolate/src/numberArray.js","webpack:///./node_modules/d3-interpolate/src/array.js","webpack:///./node_modules/d3-interpolate/src/date.js","webpack:///./node_modules/d3-interpolate/src/number.js","webpack:///./node_modules/d3-interpolate/src/object.js","webpack:///./node_modules/d3-interpolate/src/string.js","webpack:///./node_modules/d3-interpolate/src/value.js","webpack:///./node_modules/react-vis/es/animation.js","webpack:///./node_modules/d3-array/src/ascending.js","webpack:///./node_modules/d3-array/src/bisector.js","webpack:///./node_modules/d3-array/src/bisect.js","webpack:///./node_modules/d3-array/src/cross.js","webpack:///./node_modules/d3-array/src/extent.js","webpack:///./node_modules/d3-array/src/array.js","webpack:///./node_modules/d3-array/src/range.js","webpack:///./node_modules/d3-array/src/ticks.js","webpack:///./node_modules/d3-array/src/threshold/sturges.js","webpack:///./node_modules/d3-array/src/min.js","webpack:///./node_modules/d3-array/src/sum.js","webpack:///./node_modules/d3-collection/src/map.js","webpack:///./node_modules/d3-collection/src/nest.js","webpack:///./node_modules/d3-collection/src/set.js","webpack:///./node_modules/d3-scale/src/array.js","webpack:///./node_modules/d3-scale/src/ordinal.js","webpack:///./node_modules/d3-interpolate/src/round.js","webpack:///./node_modules/d3-scale/src/constant.js","webpack:///./node_modules/d3-scale/src/number.js","webpack:///./node_modules/d3-scale/src/continuous.js","webpack:///./node_modules/d3-format/src/formatSpecifier.js","webpack:///./node_modules/d3-format/src/formatDecimal.js","webpack:///./node_modules/d3-format/src/formatPrefixAuto.js","webpack:///./node_modules/d3-format/src/defaultLocale.js","webpack:///./node_modules/d3-format/src/exponent.js","webpack:///./node_modules/d3-format/src/formatRounded.js","webpack:///./node_modules/d3-format/src/formatTypes.js","webpack:///./node_modules/d3-format/src/identity.js","webpack:///./node_modules/d3-format/src/locale.js","webpack:///./node_modules/d3-format/src/formatGroup.js","webpack:///./node_modules/d3-format/src/formatNumerals.js","webpack:///./node_modules/d3-format/src/formatTrim.js","webpack:///./node_modules/d3-format/src/precisionRound.js","webpack:///./node_modules/d3-scale/src/tickFormat.js","webpack:///./node_modules/d3-format/src/precisionPrefix.js","webpack:///./node_modules/d3-format/src/precisionFixed.js","webpack:///./node_modules/d3-scale/src/linear.js","webpack:///./node_modules/d3-scale/src/nice.js","webpack:///./node_modules/d3-scale/src/log.js","webpack:///./node_modules/d3-scale/src/pow.js","webpack:///./node_modules/d3-time/src/interval.js","webpack:///./node_modules/d3-time/src/year.js","webpack:///./node_modules/d3-time/src/month.js","webpack:///./node_modules/d3-time/src/week.js","webpack:///./node_modules/d3-time/src/duration.js","webpack:///./node_modules/d3-time/src/day.js","webpack:///./node_modules/d3-time/src/hour.js","webpack:///./node_modules/d3-time/src/minute.js","webpack:///./node_modules/d3-time/src/second.js","webpack:///./node_modules/d3-time/src/millisecond.js","webpack:///./node_modules/d3-time/src/utcWeek.js","webpack:///./node_modules/d3-time/src/utcDay.js","webpack:///./node_modules/d3-time/src/utcYear.js","webpack:///./node_modules/d3-time-format/src/locale.js","webpack:///./node_modules/d3-time-format/src/defaultLocale.js","webpack:///./node_modules/d3-scale/src/time.js","webpack:///./node_modules/d3-time/src/utcMonth.js","webpack:///./node_modules/d3-time/src/utcHour.js","webpack:///./node_modules/d3-time/src/utcMinute.js","webpack:///./node_modules/d3-scale/src/colors.js","webpack:///./node_modules/d3-color/src/math.js","webpack:///./node_modules/d3-scale/src/category10.js","webpack:///./node_modules/d3-scale/src/category20b.js","webpack:///./node_modules/d3-scale/src/category20c.js","webpack:///./node_modules/d3-scale/src/category20.js","webpack:///./node_modules/d3-color/src/cubehelix.js","webpack:///./node_modules/d3-interpolate/src/cubehelix.js","webpack:///./node_modules/d3-scale/src/cubehelix.js","webpack:///./node_modules/d3-scale/src/rainbow.js","webpack:///./node_modules/d3-scale/src/viridis.js","webpack:///./node_modules/react-vis/es/utils/data-utils.js","webpack:///./node_modules/react-vis/es/utils/scales-utils.js","webpack:///./node_modules/d3-scale/src/band.js","webpack:///./node_modules/d3-scale/src/utcTime.js","webpack:///./node_modules/react-vis/es/plot/series/abstract-series.js","webpack:///./node_modules/react-vis/es/theme.js","webpack:///./node_modules/react-vis/es/utils/series-utils.js","webpack:///./node_modules/d3-path/src/path.js","webpack:///./node_modules/d3-shape/src/constant.js","webpack:///./node_modules/d3-shape/src/math.js","webpack:///./node_modules/d3-shape/src/arc.js","webpack:///./node_modules/react-vis/es/plot/series/arc-series.js","webpack:///./node_modules/d3-shape/src/curve/linear.js","webpack:///./node_modules/d3-shape/src/point.js","webpack:///./node_modules/d3-shape/src/line.js","webpack:///./node_modules/d3-shape/src/area.js","webpack:///./node_modules/d3-shape/src/descending.js","webpack:///./node_modules/d3-shape/src/identity.js","webpack:///./node_modules/d3-shape/src/pie.js","webpack:///./node_modules/d3-shape/src/curve/radial.js","webpack:///./node_modules/d3-shape/src/lineRadial.js","webpack:///./node_modules/d3-shape/src/areaRadial.js","webpack:///./node_modules/d3-shape/src/pointRadial.js","webpack:///./node_modules/d3-shape/src/array.js","webpack:///./node_modules/d3-shape/src/link/index.js","webpack:///./node_modules/d3-shape/src/symbol/circle.js","webpack:///./node_modules/d3-shape/src/symbol/cross.js","webpack:///./node_modules/d3-shape/src/symbol/diamond.js","webpack:///./node_modules/d3-shape/src/symbol/star.js","webpack:///./node_modules/d3-shape/src/symbol/square.js","webpack:///./node_modules/d3-shape/src/symbol/triangle.js","webpack:///./node_modules/d3-shape/src/symbol/wye.js","webpack:///./node_modules/d3-shape/src/symbol.js","webpack:///./node_modules/d3-shape/src/noop.js","webpack:///./node_modules/d3-shape/src/curve/basis.js","webpack:///./node_modules/d3-shape/src/curve/basisClosed.js","webpack:///./node_modules/d3-shape/src/curve/basisOpen.js","webpack:///./node_modules/d3-shape/src/curve/bundle.js","webpack:///./node_modules/d3-shape/src/curve/cardinal.js","webpack:///./node_modules/d3-shape/src/curve/cardinalClosed.js","webpack:///./node_modules/d3-shape/src/curve/cardinalOpen.js","webpack:///./node_modules/d3-shape/src/curve/catmullRom.js","webpack:///./node_modules/d3-shape/src/curve/catmullRomClosed.js","webpack:///./node_modules/d3-shape/src/curve/catmullRomOpen.js","webpack:///./node_modules/d3-shape/src/curve/linearClosed.js","webpack:///./node_modules/d3-shape/src/curve/monotone.js","webpack:///./node_modules/d3-shape/src/curve/natural.js","webpack:///./node_modules/d3-shape/src/curve/step.js","webpack:///./node_modules/d3-shape/src/offset/none.js","webpack:///./node_modules/d3-shape/src/order/none.js","webpack:///./node_modules/d3-shape/src/stack.js","webpack:///./node_modules/d3-shape/src/offset/expand.js","webpack:///./node_modules/d3-shape/src/offset/diverging.js","webpack:///./node_modules/d3-shape/src/offset/silhouette.js","webpack:///./node_modules/d3-shape/src/offset/wiggle.js","webpack:///./node_modules/d3-shape/src/order/appearance.js","webpack:///./node_modules/d3-shape/src/order/ascending.js","webpack:///./node_modules/d3-shape/src/order/descending.js","webpack:///./node_modules/d3-shape/src/order/insideOut.js","webpack:///./node_modules/d3-shape/src/order/reverse.js","webpack:///./node_modules/react-vis/es/plot/series/area-series.js","webpack:///./node_modules/react-vis/es/plot/borders.js","webpack:///./node_modules/react-vis/es/plot/chart-label.js","webpack:///./node_modules/react-vis/es/utils/axis-utils.js","webpack:///./node_modules/react-vis/es/plot/circular-grid-lines.js","webpack:///./node_modules/d3-contour/src/array.js","webpack:///./node_modules/d3-contour/src/ascending.js","webpack:///./node_modules/d3-contour/src/constant.js","webpack:///./node_modules/d3-contour/src/contains.js","webpack:///./node_modules/d3-contour/src/noop.js","webpack:///./node_modules/d3-contour/src/contours.js","webpack:///./node_modules/d3-contour/src/area.js","webpack:///./node_modules/d3-contour/src/blur.js","webpack:///./node_modules/d3-contour/src/density.js","webpack:///./node_modules/d3-geo/src/identity.js","webpack:///./node_modules/d3-geo/src/stream.js","webpack:///./node_modules/d3-geo/src/adder.js","webpack:///./node_modules/d3-geo/src/math.js","webpack:///./node_modules/d3-geo/src/noop.js","webpack:///./node_modules/d3-geo/src/path/area.js","webpack:///./node_modules/d3-geo/src/path/bounds.js","webpack:///./node_modules/d3-geo/src/path/centroid.js","webpack:///./node_modules/d3-geo/src/path/context.js","webpack:///./node_modules/d3-geo/src/path/measure.js","webpack:///./node_modules/d3-geo/src/path/string.js","webpack:///./node_modules/d3-geo/src/path/index.js","webpack:///./node_modules/react-vis/es/plot/series/contour-series.js","webpack:///./node_modules/d3-array/src/max.js","webpack:///./node_modules/react-vis/es/plot/crosshair.js","webpack:///./node_modules/react-vis/es/plot/series/custom-svg-series.js","webpack:///./node_modules/react-vis/es/plot/axis/decorative-axis-ticks.js","webpack:///./node_modules/react-vis/es/plot/axis/decorative-axis.js","webpack:///./node_modules/react-vis/es/plot/gradient-defs.js","webpack:///./node_modules/react-vis/es/plot/grid-lines.js","webpack:///./node_modules/react-vis/es/plot/series/heatmap-series.js","webpack:///./node_modules/d3-hexbin/src/hexbin.js","webpack:///./node_modules/react-vis/es/plot/series/hexbin-series.js","webpack:///./node_modules/react-vis/es/plot/highlight.js","webpack:///./node_modules/react-vis/es/plot/hint.js","webpack:///./node_modules/react-vis/es/plot/series/bar-series.js","webpack:///./node_modules/react-vis/es/plot/series/horizontal-bar-series.js","webpack:///./node_modules/react-vis/es/plot/series/bar-series-canvas.js","webpack:///./node_modules/react-vis/es/plot/series/horizontal-bar-series-canvas.js","webpack:///./node_modules/react-vis/es/plot/horizontal-grid-lines.js","webpack:///./node_modules/react-vis/es/plot/series/rect-series.js","webpack:///./node_modules/react-vis/es/plot/series/horizontal-rect-series.js","webpack:///./node_modules/react-vis/es/plot/series/rect-series-canvas.js","webpack:///./node_modules/react-vis/es/plot/series/horizontal-rect-series-canvas.js","webpack:///./node_modules/react-vis/es/plot/series/label-series.js","webpack:///./node_modules/react-vis/es/plot/series/line-series.js","webpack:///./node_modules/react-vis/es/plot/series/mark-series.js","webpack:///./node_modules/react-vis/es/plot/series/line-mark-series.js","webpack:///./node_modules/react-vis/es/plot/series/mark-series-canvas.js","webpack:///./node_modules/react-vis/es/plot/series/line-series-canvas.js","webpack:///./node_modules/react-vis/es/plot/series/line-mark-series-canvas.js","webpack:///./node_modules/react-vis/es/plot/series/polygon-series.js","webpack:///./node_modules/react-vis/es/plot/series/vertical-bar-series.js","webpack:///./node_modules/react-vis/es/plot/series/vertical-bar-series-canvas.js","webpack:///./node_modules/react-vis/es/plot/vertical-grid-lines.js","webpack:///./node_modules/react-vis/es/plot/series/vertical-rect-series.js","webpack:///./node_modules/react-vis/es/plot/series/vertical-rect-series-canvas.js","webpack:///./node_modules/react-vis/es/plot/voronoi.js","webpack:///./node_modules/react-vis/es/plot/series/whisker-series.js","webpack:///./node_modules/react-vis/es/utils/chart-utils.js","webpack:///./node_modules/react-vis/es/plot/series/canvas-wrapper.js","webpack:///./node_modules/react-vis/es/plot/xy-plot.js","webpack:///./node_modules/react-vis/es/plot/axis/axis-line.js","webpack:///./node_modules/react-vis/es/plot/axis/axis-ticks.js","webpack:///./node_modules/react-vis/es/plot/axis/axis-title.js","webpack:///./node_modules/react-vis/es/plot/axis/axis.js","webpack:///./node_modules/react-vis/es/plot/axis/x-axis.js","webpack:///./node_modules/react-vis/es/plot/axis/y-axis.js","webpack:///./node_modules/react-vis/es/legends/continuous-color-legend.js","webpack:///./node_modules/react-vis/es/legends/continuous-size-legend.js","webpack:///./node_modules/react-vis/es/legends/discrete-color-legend-item.js","webpack:///./node_modules/react-vis/es/legends/discrete-color-legend.js","webpack:///./node_modules/react-vis/es/legends/searchable-discrete-color-legend.js","webpack:///./node_modules/react-vis/es/parallel-coordinates/index.js","webpack:///./node_modules/react-vis/es/radar-chart/index.js","webpack:///./node_modules/react-vis/es/radial-chart/index.js","webpack:///./node_modules/d3-sankey/src/align.js","webpack:///./node_modules/d3-sankey/src/constant.js","webpack:///./node_modules/d3-sankey/src/sankey.js","webpack:///./node_modules/d3-sankey/src/sankeyLinkHorizontal.js","webpack:///./node_modules/react-vis/es/sankey/sankey-link.js","webpack:///./node_modules/react-vis/es/sankey/index.js","webpack:///./node_modules/d3-hierarchy/src/treemap/round.js","webpack:///./node_modules/d3-hierarchy/src/treemap/dice.js","webpack:///./node_modules/d3-hierarchy/src/partition.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/count.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/index.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/each.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/sum.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/sort.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/path.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/ancestors.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/descendants.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/leaves.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/links.js","webpack:///./node_modules/react-vis/es/sunburst/index.js","webpack:///./node_modules/d3-hierarchy/src/treemap/slice.js","webpack:///./node_modules/d3-hierarchy/src/treemap/squarify.js","webpack:///./node_modules/d3-hierarchy/src/treemap/resquarify.js","webpack:///./node_modules/d3-hierarchy/src/array.js","webpack:///./node_modules/d3-hierarchy/src/pack/enclose.js","webpack:///./node_modules/d3-hierarchy/src/pack/siblings.js","webpack:///./node_modules/d3-hierarchy/src/accessors.js","webpack:///./node_modules/d3-hierarchy/src/constant.js","webpack:///./node_modules/d3-hierarchy/src/pack/index.js","webpack:///./node_modules/d3-hierarchy/src/treemap/index.js","webpack:///./node_modules/react-vis/es/treemap/treemap-leaf.js","webpack:///./node_modules/react-vis/es/treemap/treemap-dom.js","webpack:///./node_modules/react-vis/es/treemap/treemap-svg.js","webpack:///./node_modules/react-vis/es/treemap/index.js","webpack:///./node_modules/d3-hierarchy/src/treemap/sliceDice.js","webpack:///./node_modules/d3-hierarchy/src/treemap/binary.js","webpack:///./node_modules/react-vis/es/make-vis-flexible.js","webpack:///./node_modules/react-motion/lib/reorderKeys.js","webpack:///./node_modules/es-abstract/helpers/callBind.js","webpack:///./node_modules/has-symbols/index.js","webpack:///./node_modules/regexp.prototype.flags/polyfill.js","webpack:///./node_modules/react-motion/node_modules/performance-now/lib/performance-now.js","webpack:///./node_modules/regexp.prototype.flags/implementation.js","webpack:///./node_modules/object-is/polyfill.js","webpack:///./node_modules/react-motion/lib/mapToZero.js","webpack:///./node_modules/function-bind/implementation.js","webpack:///./node_modules/performance-now/lib/performance-now.js","webpack:///./node_modules/object-is/index.js","webpack:///./node_modules/deep-equal/index.js","webpack:///./node_modules/react-motion/lib/stepper.js","webpack:///./node_modules/react-motion/lib/shouldStopAnimation.js","webpack:///./node_modules/react-motion/lib/TransitionMotion.js","webpack:///./node_modules/react-motion/lib/mergeDiff.js","webpack:///./node_modules/react-vis/es/utils/react-utils.js","webpack:///./node_modules/object-keys/implementation.js","webpack:///./node_modules/react-motion/lib/spring.js","webpack:///./node_modules/react-motion/lib/stripStyle.js","webpack:///./node_modules/react-motion/lib/StaggeredMotion.js","webpack:///./node_modules/global/window.js","webpack:///./node_modules/object-is/shim.js","webpack:///./node_modules/react-motion/lib/Motion.js","webpack:///./node_modules/raf/index.js"],"names":["_interopRequire","obj","__esModule","exports","_Motion","Motion","_StaggeredMotion","StaggeredMotion","_TransitionMotion","TransitionMotion","_spring","spring","_presets","presets","_stripStyle","stripStyle","_reorderKeys","reorderKeys","toStr","Object","prototype","toString","module","value","str","call","isArgs","length","callee","slice","Array","origKeys","keys","keysShim","o","originalKeys","shim","args","arguments","object","numberIsNaN","a","b","regexExec","isRegexMarker","badStringifier","hasToStringTag","Symbol","toStringTag","Function","bind","RegExp","exec","throwRegexMarker","valueOf","toPrimitive","e","isStandardArguments","isLegacyArguments","supportsStandardArguments","define","callBind","implementation","getPolyfill","flagsBound","$TypeError","TypeError","$gOPD","getOwnPropertyDescriptor","throwTypeError","ThrowTypeError","calleeThrows","get","gOPDthrows","hasSymbols","getProto","getPrototypeOf","x","__proto__","asyncGenIterator","undefined","TypedArray","Uint8Array","INTRINSICS","ArrayBuffer","iterator","entries","forEach","values","asyncIterator","Atomics","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parse","Map","Math","Number","parseFloat","parseInt","Promise","then","all","reject","resolve","Proxy","RangeError","ReferenceError","Reflect","Set","SharedArrayBuffer","String","SyntaxError","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakSet","$replace","replace","rePropName","reEscapeChar","stringToPath","string","result","match","number","quote","subString","getBaseIntrinsic","name","allowMissing","parts","i","desc","concat","origDefineProperty","defineProperty","supportsDescriptors","_","enumerable","arePropertyDescriptorsSupported","predicate","fn","configurable","writable","defineProperties","map","predicates","props","getOwnPropertySymbols","cachedSetTimeout","cachedClearTimeout","process","defaultSetTimout","defaultClearTimeout","runTimeout","fun","setTimeout","this","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","len","run","marker","runClearTimeout","Item","array","noop","nextTick","push","apply","title","browser","env","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","getDay","tryDateObject","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","gOPD","TypeErr","regex","polyfill","proto","noWobble","stiffness","damping","gentle","wobbly","stiff","d","RedBlackTree","RedBlackNode","node","U","C","L","R","P","N","RedBlackRotateLeft","tree","p","q","parent","RedBlackRotateRight","RedBlackFirst","constructor","insert","after","grandpa","uncle","remove","sibling","next","red","left","right","createEdge","v0","v1","edge","index","setEdgeEnd","cells","halfedges","createBorderEdge","vertex","clipEdge","x0","y0","x1","y1","r","ax","ay","t0","t1","dx","dy","connectEdge","fm","fb","lx","ly","rx","ry","fx","fy","cellHalfedgeAngle","cell","site","va","vb","atan2","cellHalfedgeStart","cellHalfedgeEnd","firstCircle","circlePool","Circle","y","arc","cy","attachCircle","lArc","rArc","lSite","cSite","rSite","bx","by","cx","epsilon2","ha","hc","circle","pop","sqrt","before","detachCircle","beachPool","Beach","createBeach","beach","detachBeach","beaches","removeBeach","previous","disappearing","abs","epsilon","unshift","iArc","nArcs","addBeach","dxl","dxr","directrix","leftBreakPoint","rightBreakPoint","createCell","newArc","hb","rfocx","rfocy","pby2","Infinity","lfocx","lfocy","plby2","hl","aby2","lexicographic","Diagram","sites","extent","sort","j","m","n","sortCellHalfedges","clipEdges","iCell","iHalfedge","nHalfedges","start","startX","startY","end","endX","endY","nCells","cover","splice","d2","dc","v00","v01","v11","v10","clipCells","edges","polygons","polygon","data","triangles","s0","c","e1","s1","links","filter","source","target","find","radius","i0","that","i1","_found","v","vx","vy","v2","voronoi","s","round","constant","size","factory","extend","definition","create","key","Color","reI","reN","reP","reHex","reRgbInteger","reRgbPercent","reRgbaInteger","reRgbaPercent","reHslPercent","reHslaPercent","named","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","color_formatHex","rgb","formatHex","color_formatRgb","formatRgb","format","l","trim","toLowerCase","rgbn","Rgb","rgba","hsla","hasOwnProperty","NaN","g","rgbConvert","opacity","rgb_formatHex","rgb_formatRgb","max","min","h","Hsl","hslConvert","hsl","hsl2rgb","m1","m2","basis","v3","t2","t3","copy","channels","assign","displayable","hex","formatHsl","brighter","k","pow","darker","linear","t","gamma","nogamma","exponential","color","rgbGamma","rgbSpline","spline","colors","floor","isNumberArray","isView","genericArray","nb","na","setTime","reA","reB","am","bm","bs","bi","lastIndex","one","join","numberArray","isArray","_createClass","Constructor","protoProps","staticProps","_extends","ANIMATION_PROPTYPES","oneOfType","shape","nonAnimatedProps","arrayOf","bool","extractAnimatedPropValues","animatedProps","otherProps","indexOf","_objectWithoutProperties","reduce","animatedPropName","_PureComponent","Animation","instance","_classCallCheck","_this","self","_possibleConstructorReturn","_motionEndHandler","onEnd","_renderChildren","_ref","children","interpolator","_interpolator","child","Children","only","interpolatedProps","_data","row","correspondingCell","cloneElement","_animation","random","_updateInterpolator","subClass","superClass","setPrototypeOf","_inherits","onStart","oldProps","newProps","animationStyle","getAnimationStyle","animation","style","createElement","defaultStyle","onRest","displayName","AnimationPropType","f","compare","ascending","lo","hi","mid","ascendingBisect","bisector","bisectRight","bisect","valueof","stop","step","ceil","range","e10","e5","e2","reverse","ticks","count","tickIncrement","power","log","LN10","error","tickStep","step0","step1","LN2","sum","each","set","has","property","clear","empty","_sortValues","_rollup","nest","_sortKeys","depth","createResult","setResult","keyValue","valuesByKey","createObject","setObject","createMap","setMap","_entries","sortKey","sortKeys","order","sortValues","rollup","add","implicit","ordinal","domain","unknown","scale","unit","deinterpolateLinear","bimap","deinterpolate","reinterpolate","d0","d1","r0","r1","polymap","interpolate","clamp","continuous","piecewise","output","input","rescale","deinterpolateClamp","invert","reinterpolateClamp","rangeRound","re","formatSpecifier","specifier","FormatSpecifier","fill","align","sign","symbol","zero","width","comma","precision","type","prefixExponent","toExponential","coefficient","formatDecimal","exponent","toFixed","toPrecision","_p","formatRounded","toUpperCase","_x","prefixes","group","locale","grouping","thousands","substring","currencyPrefix","currency","currencySuffix","decimal","numerals","formatNumerals","percent","minus","nan","newFormat","formatTypes","prefix","test","suffix","formatType","maybeSuffix","valuePrefix","valueSuffix","valueNegative","out","formatTrim","charCodeAt","padding","formatPrefix","precisionPrefix","precisionRound","precisionFixed","linearish","tickFormat","nice","interval","pow10","powp","base","E","exp","logp","log10","log2","reflect","raise","newInterval","floori","offseti","field","date","offset","every","setMonth","setHours","setFullYear","getFullYear","setDate","getMonth","weekday","getDate","getTimezoneOffset","sunday","monday","tuesday","wednesday","thursday","friday","saturday","getMilliseconds","getSeconds","getMinutes","getHours","getUTCSeconds","utcWeekday","setUTCDate","getUTCDate","getUTCDay","setUTCHours","utcSunday","utcMonday","utcTuesday","utcWednesday","utcThursday","utcFriday","utcSaturday","utcDay","utcYear","setUTCMonth","setUTCFullYear","getUTCFullYear","localDate","H","M","S","utcDate","UTC","newDate","timeFormat","utcFormat","pads","numberRe","percentRe","requoteRe","pad","requote","formatRe","names","formatLookup","parseWeekdayNumberSunday","w","parseWeekdayNumberMonday","u","parseWeekNumberSunday","parseWeekNumberISO","V","parseWeekNumberMonday","W","parseFullYear","parseYear","parseZone","Z","parseQuarter","parseMonthNumber","parseDayOfMonth","parseDayOfYear","parseHour24","parseMinutes","parseSeconds","parseMilliseconds","parseMicroseconds","parseLiteralPercent","parseUnixTimestamp","Q","parseUnixTimestampSeconds","formatDayOfMonth","formatHour24","formatHour12","formatDayOfYear","formatMilliseconds","formatMicroseconds","formatMonthNumber","formatMinutes","formatSeconds","formatWeekdayNumberMonday","day","formatWeekNumberSunday","formatWeekNumberISO","formatWeekdayNumberSunday","formatWeekNumberMonday","formatFullYear","formatZone","z","formatUTCDayOfMonth","formatUTCHour24","getUTCHours","formatUTCHour12","formatUTCDayOfYear","formatUTCMilliseconds","getUTCMilliseconds","formatUTCMicroseconds","formatUTCMonthNumber","getUTCMonth","formatUTCMinutes","getUTCMinutes","formatUTCSeconds","formatUTCWeekdayNumberMonday","dow","formatUTCWeekNumberSunday","formatUTCWeekNumberISO","formatUTCWeekdayNumberSunday","formatUTCWeekNumberMonday","formatUTCYear","formatUTCFullYear","formatUTCZone","formatLiteralPercent","formatUnixTimestamp","formatUnixTimestampSeconds","locale_dateTime","dateTime","locale_date","locale_time","time","locale_periods","periods","locale_weekdays","days","locale_shortWeekdays","shortDays","locale_months","months","locale_shortMonths","shortMonths","periodRe","periodLookup","weekdayRe","weekdayLookup","shortWeekdayRe","shortWeekdayLookup","monthRe","monthLookup","shortMonthRe","shortMonthLookup","formats","utcFormats","parses","parseSpecifier","charAt","newParse","week","X","utcParse","formatLocale","calendar","year","month","hour","minute","second","millisecond","formatMillisecond","formatSecond","formatMinute","formatHour","formatDay","formatWeek","formatMonth","formatYear","tickIntervals","tickInterval","utcMonth","utcHour","setUTCMinutes","utcMinute","setUTCSeconds","deg2rad","PI","rad2deg","A","ED","EB","BC_DA","cubehelixConvert","Cubehelix","bl","hue","cubehelixGamma","cubehelix","cosh","cos","sinh","sin","cubehelixLong","ramp","transformValueToString","toDateString","_SCALE_FUNCTIONS","_slicedToArray","arr","_arr","_n","_d","_e","_s","_i","done","err","sliceIterator","_toConsumableArray","arr2","from","_defineProperty","SCALE_FUNCTIONS","pointish","paddingOuter","paddingInner","band","bandwidth","ordinalRange","literalScale","logs","pows","XYPLOT_ATTR","toTitleCase","getScaleFnFromScaleObject","scaleObject","modDomain","_scale$range","_scale$range2","lower","upper","addInvertFunctionToOrdinalScaleObject","getDomainByAccessor","allData","accessor","accessor0","value0","_isDefined","_createScaleObjectForValue","attr","distance","baseValue","isValue","_getScaleDistanceAndAdjustedDomain","_normalizeValues","setOfValues","getUniquePropertyValues","scaleFn","nextValue","currentValue","nextDistance","_getSmallestDistanceIndex","adjustedDomain","_computeLeftDomainAdjustment","_computeRightDomainAdjustment","bestDistIndex","_computeScaleDistance","domain0","domainN","getScaleObjectFromProps","fallbackValue","_props$","_props$2","noFallBack","_props$3","_props$4","addValueToArray","_collectScaleObjectFromProps","_props$_adjustBy","_adjustBy","adjustBy","_props$_adjustWhat","_adjustWhat","_isScaleAdjustmentPossible","_adjustCategoricalScale","allSeriesData","_allData","_props$_adjustWhat2","adjustWhat","domainLength","scaleDomain0","scaleDomainN","scaleDistance","_getScaleDistanceAndA","_adjustContinuousScale","getAttributeScale","_getAttrValue","getAttributeFunctor","getAttr0Functor","_scaleObject$baseValu","getAttributeValue","getScalePropTypesByAttribute","_ref2","any","func","oneOf","extractScalePropsFromProps","attributes","isPlainSet","isUnderscoreSet","usesGet","getMissingScaleProps","_domain","domainPadding","_padDomain","defaultValue","response","getFontColorFromBackground","background","getXYPlotValues","XYPlotScales","prev","scaleInput","OPTIONAL_SCALE_PROPS_REGS","getOptionalScaleProps","acc","prop","reg","propTypes","height","onValueMouseOver","onValueMouseOut","onValueClick","onValueRightClick","onSeriesMouseOver","onSeriesMouseOut","onSeriesClick","onSeriesRightClick","onNearestX","onNearestXY","stack","AbstractSeries","_temp","_len","_key","_seriesClickHandler","event","_seriesMouseOutHandler","_seriesMouseOverHandler","_seriesRightClickHandler","_valueClickHandler","_this$props","_valueMouseOutHandler","_this$props2","_valueMouseOverHandler","_this$props3","_valueRightClickHandler","_this$props4","_props","_handleNearestXY","_handleNearestX","preventDefault","onParentMouseMove","_props2","_props2$marginTop","marginTop","_props2$marginLeft","marginLeft","evt","nativeEvent","currentTarget","rect","getBoundingClientRect","clientX","clientY","touches","pageX","pageY","clientLeft","top","clientTop","_props3","minDistance","POSITIVE_INFINITY","valueIndex","coordinate","_getXYCoordinateInContainer","xScaleFn","_getAttributeFunctor","item","currentCoordinate","newDistance","innerX","_props4","yScaleFn","foundPoint","voronoiInstance","innerY","defaultProps","className","DISCRETE_COLOR_RANGE","EXTENDED_DISCRETE_COLOR_RANGE","CONTINUOUS_COLOR_RANGE","SIZE_RANGE","DEFAULT_COLOR","isSeriesChild","getSeriesChildren","toArray","getStackedData","areSomeSeriesStacked","some","series","latestAttrPositions","accumulator","seriesIndex","seriesType","_series$props","_series$props$cluster","cluster","preppedData","angle","seriesHasAngleRadius","prepareData","attr0","baseAttr","dIndex","_extends2","_latestAttrPositions$2","_latestAttrPositions$","prevD","nextD","getSeriesPropsFromChildren","seriesTypesInfo","sameTypeTotal","sameTypeIndex","clusters","collectSeriesTypesInfo","seriesTypeInfo","_colorValue","_opacityValue","getRadialDomain","res","ANIMATED_SERIES_PROPS","getStackParams","_stackBy","valuePosAttr","_props$sameTypeTotal","_props$sameTypeIndex","pi","tau","tauEpsilon","Path","_x0","_y0","_x1","_y1","moveTo","closePath","lineTo","quadraticCurveTo","bezierCurveTo","x2","y2","arcTo","x21","y21","x01","y01","l01_2","x20","y20","l21_2","l20_2","l21","l01","acos","t01","t21","a0","a1","ccw","cw","da","halfPi","asin","arcInnerRadius","innerRadius","arcOuterRadius","outerRadius","arcStartAngle","startAngle","arcEndAngle","endAngle","arcPadAngle","padAngle","intersect","x3","y3","x10","y10","x32","y32","cornerTangents","rc","ox","oy","x11","y11","x00","y00","D","cx0","cy0","cx1","cy1","dx0","dy0","dx1","dy1","cornerRadius","padRadius","context","buffer","a01","a11","a00","a10","da0","da1","ap","rp","rc0","rc1","p0","p1","oc","kc","lc","centroid","ATTRIBUTES","center","arcClassName","modifyRow","angle0","truedAngle","truedAngle0","_AbstractSeries","ArcSeries","scaleProps","_getAllScaleProps","state","nextProps","setState","defaultScaleProps","_getDefaultScaleProps","userScaleProps","missingScaleProps","innerWidth","innerHeight","radiusRange","_radiusValue","angleType","_this2","disableSeries","hideSeries","cloneData","stroke","radiusDomain","radius0","predefinedClassName","onMouseOver","onMouseOut","onClick","onContextMenu","pointerEvents","transform","arcArg","arcedData","rowStyle","rowClassName","Linear","_context","areaStart","_line","areaEnd","lineStart","_point","lineEnd","point","defined","curve","line","defined0","area","x0z","y0z","arealine","lineX0","lineY0","lineY1","lineX1","pie","arcs","pa","curveRadialLinear","curveRadial","Radial","_curve","radial","lineRadial","lineStartAngle","lineEndAngle","lineInnerRadius","lineOuterRadius","linkSource","linkTarget","link","curveHorizontal","curveVertical","pointRadial","p2","p3","linkHorizontal","linkVertical","linkRadial","draw","tan30","tan30_2","kr","kx","sqrt3","symbols","diamond","square","star","triangle","wye","Basis","BasisClosed","_x2","_x3","_x4","_y2","_y3","_y4","BasisOpen","Bundle","beta","_basis","_beta","_y","bundle","custom","_k","Cardinal","tension","cardinal","CardinalClosed","_x5","_y5","CardinalOpen","_l01_a","_l01_2a","_l12_a","_l12_2a","_l23_a","_l23_2a","CatmullRom","alpha","_alpha","x23","y23","catmullRom","CatmullRomClosed","CatmullRomOpen","LinearClosed","slope3","h0","h1","slope2","MonotoneX","MonotoneY","ReflectContext","monotoneX","monotoneY","Natural","controlPoints","_t0","px","py","Step","_t","stepBefore","stepAfter","stackValue","oz","kz","sz","sij","ki","si","none","yp","yn","s2","sij0","s3","sk","peaks","peak","vi","vj","sums","appearance","bottom","tops","bottoms","AreaSeries","getNull","nullAccessor","_getAttr0Functor","_getAttributeValue","newOpacity","_renderArea","CLASSES","Borders","marginBottom","marginRight","requiresSVG","_React$PureComponent","ChartLabel","includeMargin","text","xPos","xPercent","yPos","yPercent","PureComponent","ORIENTATION","TOP","LEFT","RIGHT","BOTTOM","VERTICAL","HORIZONTAL","DIRECTION","getTicksTotalFromSize","getTickValues","tickTotal","tickValues","CircularGridLines","centerX","centerY","_getDefaultProps","rRange","xScale","yScale","hole","ringContains","ring","contains","xi","yi","pj","xj","yj","segmentContains","collinear","cases","threshold","smooth","smoothLinear","contours","tz","contour","holes","callback","fragmentByStart","fragmentByEnd","stitch","startIndex","endIndex","isorings","coordinates","xt","yt","_0","_1","thresholds","blurX","sr","blurY","defaultX","defaultY","defaultWeight","streamGeometry","geometry","stream","streamGeometryType","streamObjectType","Feature","FeatureCollection","features","Sphere","sphere","Point","MultiPoint","LineString","streamLine","MultiLineString","Polygon","streamPolygon","MultiPolygon","GeometryCollection","geometries","closed","polygonStart","polygonEnd","Adder","reset","_add","temp","adder","bv","av","atan","areaSum","areaRingSum","areaStream","areaRingStart","areaRingEnd","areaPointFirst","areaPoint","bounds","X0","Y0","Z0","X1","Y1","Z1","X2","Y2","Z2","centroidStream","centroidPoint","centroidLineStart","centroidLineEnd","centroidRingStart","centroidRingEnd","centroidPointFirstLine","centroidPointLine","centroidPointFirstRing","centroidPointRing","PathContext","_radius","pointRadius","lengthRing","lengthSum","lengthStream","lengthPointFirst","lengthPoint","PathString","_string","_circle","ContourSeries","colorRange","contouredData","weight","density","values0","values1","wi","shift","transformPolygon","transformRing","transformPoint","resize","cellSize","geo","projectionStream","contextStream","path","measure","projection","_getDomain","getDomain","colorScale","defaultTitleFormat","getFirstNonEmptyValue","defaultItemsFormat","Crosshair","items","itemsFormat","titleFormat","titleItem","innerLeft","_props$orientation","orientation","innerClassName","box","_renderCrosshairTitle","_renderCrosshairItems","DEFAULT_STYLE","predefinedComponents","points","starPoints","innerAngle","outerAngle","CustomSVGSeries","customComponent","contents","seriesComponent","positionInPixels","innerComponent","defaultType","positionFunctions","propsSize","aggStyle","getInnerComponent","onMouseEnter","onMouseLeave","decorativeAxisTick","axisDomain","numberOfTicks","axisStart","axisEnd","tickValue","tickSize","_generateFit","slope","generateFit","pointSlope","axisScale","slopeVertical","val","generatePoints","tickAngle","getAxisAngle","tickProps","textProps","textAnchor","DecorativeAxis","DEFAULT_FORMAT","strokeWidth","GradientDefs","direction","GridLines","isVertical","tickXAttr","tickYAttr","_pathProps","pos","pathProps","HeatmapSeries","rectStyle","xDistance","_getScaleDistance","yDistance","attrs","isDomainAdjustmentNeeded","thirdPi","angles","pointX","pointY","HexbinSeries","sizeHexagonsWithCount","xOffset","yOffset","hexbin","binsById","bins","py1","px1","pi2","pj2","px2","py2","id","bin","hexagon","centers","mesh","fragment","hexagonPath","hexes","countDomain","getColorDomain","getLocs","xLoc","offsetX","yLoc","offsetY","Highlight","dragging","brushArea","brushing","startLocX","startLocY","dragArea","_state","enableX","enableY","highlightWidth","highlightHeight","touchWidth","touchHeight","_state2","_state3","_state3$brushArea","clickedOutsideDragX","clickedOutsideDragY","_props5","onBrushStart","onDragStart","drag","_getLocs","startArea","resetDrag","emptyBrush","clickedOutsideDrag","_clickedOutsideDrag","_state4","_props6","onBrushEnd","onDragEnd","noHorizontal","isNulled","_convertAreaToCoordinates","_props7","onBrush","onDrag","_state5","_getLocs2","_getDrawArea","_brushArea","_getDragArea","_this3","_props8","highlightX","highlightY","_state$brushArea","leftPos","topPos","onMouseDown","startBrushing","onMouseMove","onMouseUp","stopBrushing","onTouchEnd","onTouchCancel","onContextMenuCapture","ALIGN","AUTO","LEFT_EDGE","RIGHT_EDGE","BOTTOM_EDGE","TOP_EDGE","BOTTOM_LEFT","BOTTOM_RIGHT","TOP_LEFT","TOP_RIGHT","defaultFormat","Hint","_props$align","horizontal","vertical","_mapOrientationToAlign","_getXCSS","_getYCSS","getAlignStyle","_getAlign","position","_getAlignStyle","positionClassName","_getAlignClassNames","_getCSSLeft","_getCSSRight","verticalAlign","_getCSSTop","_getCSSBottom","_getPositionInfo2","_getPositionInfo","content","formattedProp","scales","BarSeries","linePosAttr","lineSizeAttr","valueSizeAttr","barWidth","_getStackParams","lineFunctor","valueFunctor","value0Functor","fillFunctor","strokeFunctor","opacityFunctor","halfSpace","_attrs","totalSpaceAvailable","totalSpaceCenter","spacePerBar","barStartingPoint","HorizontalBarSeries","zeroBaseValue","BarSeriesCanvas","ctx","getScaleDistance","totalSpaceStartingPoint","lineSize","fillColor","strokeColor","rowOpacity","linePos","valuePos","valueSize","beginPath","fillStyle","strokeStyle","isRequired","HorizontalBarSeriesCanvas","renderLayer","HorizontalGridLines","RectSeries","line0Functor","HorizontalRectSeries","RectSeriesCanvas","line0","HorizontalRectSeriesCanvas","getTextAnchor","labelAnchorX","leftOfMiddle","getDominantBaseline","labelAnchorY","aboveMiddle","LabelSeries","allowOffsetToBeReversed","getLabel","rotation","xRange","yRange","xFunctor","yFunctor","markStyle","xVal","yVal","labelRotation","dominantBaseline","textContent","label","STROKE_STYLES","dashed","solid","LineSeries","strokeDasharray","_renderLine","MarkSeries","scalingFunctions","_renderCircle","LineMarkSeries","lineStyle","MarkSeriesCanvas","LineSeriesCanvas","lineWidth","setLineDash","LineMarkSeriesCanvas","generatePath","PolygonSeries","VerticalBarSeries","VerticalGridLines","VerticalRectSeries","NOOP","Voronoi","nodes","onBlur","_onClick","_onMouseUp","_onMouseDown","onHover","polygonStyle","handleTouchEvent","handler","_evt$nativeEvent","document","elementFromPoint","parentNode","childNodes","getNodeIndex","onTouchStart","onTouchMove","WhiskerSeries","crossBarWidth","whiskerMarkProps","sizeFunctor","valueClickHandler","valueRightClickHandler","valueMouseOverHandler","valueMouseOutHandler","positiveXVariance","xVariance","negativeXVariance","positiveYVariance","yVariance","negativeYVariance","hasXWhiskers","hasYWhiskers","styleAttr","crossBarExtension","rightLineAttrs","leftLineAttrs","rightCrossBarAttrs","leftCrossBarAttrs","upperLineAttrs","lowerLineAttrs","upperCrossBarAttrs","lowerCrossBarAttrs","getInnerDimensions","defaultMargins","margin","marginProps","_marginProps$left","_marginProps$top","_marginProps$right","_marginProps$bottom","getRadialLayoutMargin","marginX","marginY","MarginPropType","DEFAULT_MARGINS","drawLayers","layers","drawIteration","clearRect","layer","_Component","CanvasWrapper","canvas","getContext","pixelRatio","drawChildren","newChildren","oldChildren","childrenShouldAnimate","oldAnimatedProps","newAnimatedProps","drawCycle","setInterval","clearInterval","engageDrawLoop","ref","window","devicePixelRatio","cleanseData","_React$Component","XYPlot","stackBy","scaleMixins","_getScaleMixins","dontCheckIfEmpty","onDoubleClick","onWheel","nextData","nextScaleMixins","hasTreeStructure","newMixins","oldMixins","checkIfMixinsAreEqual","dimensions","seriesProps","XYPlotValues","dataProps","render","_getInnerDimensions","colorRanges","opacityType","sizeRange","filteredData","optionalScaleProps","zeroBaseProps","_child$type$getParent","getParentConfig","specifiedDomain","components","componentsToRender","isCanvas","_componentsToRender$","_isPlotEmpty","_getClonedChildComponents","_clickHandler","_doubleClickHandler","_mouseDownHandler","_mouseUpHandler","_mouseMoveHandler","_mouseLeaveHandler","_mouseEnterHandler","_touchMoveHandler","_touchEndHandler","_touchCancelHandler","_wheelHandler","renderCanvasComponents","Component","component","onParentMouseDown","onParentMouseEnter","onParentMouseLeave","onParentMouseUp","onParentTouchMove","_touchStartHandler","onParentTouchStart","AxisLine","lineProps","AxisTicks","_isAxisVertical","tickLabelAngle","_props$tickSizeOuter","tickSizeOuter","_props$tickPadding","tickPadding","labelOffset","_areTicksWrapped","_props2$tickSizeOuter","_props2$tickSizeInner","tickSizeInner","wrap","tickFormatFn","_getTickFormatFn","translateFn","_getTickContainerPropsGetterFn","_getTickLineProps","_getTickLabelProps","labelNode","shouldRenderAsOwnNode","isValidElement","includes","shouldAddProps","containerWidth","tickCount","AxisTitle","outerGroupTransform","_transformation$orien","middle","ADJUSTMENT_FOR_TEXT_SIZE","transformation","innerGroupTransform","defaultAnimatedProps","on0","Axis","_getDefaultAxisProps","attrAxis","hideLine","hideTicks","axisClassName","XAxis","YAxis","startColor","endColor","ContinuousColorLegend","midColor","startTitle","midTitle","endTitle","ContinuousSizeLegend","startSize","endSize","circlesTotal","circles","borderRadius","DiscreteColorLegendItem","disabled","strokeDasharrayStyle","DiscreteColorLegend","onItemClick","onItemMouseEnter","onItemMouseLeave","searchText","searchFn","SearchableDiscreteColorLegend","onSearchChange","searchPlaceholder","onChange","filteredItems","placeholder","getLabels","domains","ParallelCoordinates","brushFilters","hideInnerMostValues","showMarks","axes","sortedDomain","getAxes","lines","rowIndex","withinFilteredRange","mappedData","getValue","selectedName","deselectedLineStyle","getLines","labelSeries","labels","xType","yDomain","trigger","colorType","fontSize","strokeOpacity","getCoordinate","axisEndPoint","startingAngle","RadarChart","renderAxesOverPolygons","_ref3","dataPoint","getPolygons","polygonPoints","_ref4","_ref5","dataName","getPolygonPoints","xDomain","fillOpacity","RadialChart","getAngle","getSubLabel","hideRootNode","labelsAboveChildren","labelsRadiusMultiplier","labelsStyle","showLabels","getWedgesToRender","radialDomain","arcProps","radiusNoFallBack","radiusType","defaultMargin","getMaxRadius","accessors","updatedAngle","newLabels","generateLabels","getAngle0","getRadius","getRadius0","subLabel","targetDepth","justify","sourceLinks","ascendingSourceBreadth","ascendingBreadth","ascendingTargetBreadth","nodeCenter","weightedSource","weightedTarget","defaultId","defaultNodes","graph","defaultLinks","nodeById","horizontalSource","horizontalTarget","DEFAULT_LINK_COLOR","SankeyLink","onLinkClick","onLinkMouseOver","onLinkMouseOut","ALIGNMENTS","targetLinks","Sankey","hasVoronoi","hideLabels","layout","linkOpacity","nodePadding","nodeWidth","nodesCopy","linksCopy","sankeyInstance","iterations","sankey","computeNodeLinks","computeNodeValues","computeNodeDepths","computeNodeBreadths","computeLinkBreadths","ky","columns","resolveCollisions","relaxRightToLeft","relaxLeftToRight","update","nodeId","nodeAlign","nWidth","yType","rects","partition","root","eachBefore","positionNode","hierarchy","childs","Node","valued","defaultChildren","computeHeight","copyData","eachAfter","current","ancestor","aNodes","ancestors","bNodes","leastCommonAncestor","descendants","leaves","LISTENERS_TO_OVERWRITE","Sunburst","getSize","partitionFunction","structuredInput","getNodesToRender","labelData","rotateLabels","dontRotateLabel","rotAngle","labelStyle","buildLabels","propName","getColor","phi","squarifyRatio","ratio","nodeValue","sumValue","minValue","maxValue","newRatio","minRatio","rows","dice","squarify","resquarify","_squarify","B","enclosesWeak","encloseBasis","extendBasis","enclosesWeakAll","enclosesNot","encloseBasis2","encloseBasis3","dr","r2","r21","r3","a2","a3","b2","b3","c2","c3","d3","ab","xa","xb","ya","yb","place","intersects","score","packEnclose","aa","ca","sj","pack","enclose","optional","required","constantZero","defaultRadius","radiusLeaf","packChildren","translateChild","ANIMATED_PROPS","TreemapLeaf","mode","onLeafClick","onLeafMouseOver","onLeafMouseOut","useCirclePacking","leafStyle","TreemapDOM","nodeProps","TreemapSVG","_nodes$reduce","maxY","minY","maxX","minX","updatedNodes","onSeriesMouseEnter","onSeriesMouseLeave","sizeType","nodeHeight","getCircularNodes","getNonCircularNodes","TREEMAP_TILE_MODES","slicedice","binary","valueOffset","valueTarget","valueLeft","valueRight","xk","yk","_getScaleFns","compatibleProps","Treemap","sortFunction","mappedNodes","packingFunction","tileFn","tile","paddingStack","paddingTop","paddingRight","paddingBottom","paddingLeft","treemap","treemapingFunction","renderMode","_getNodesToRender","TreemapElement","resizeSubscribers","timeoutId","debounceEmitResize","emitResize","cb","subscribeToDebouncedResize","addEventListener","removeSubscriber","removeEventListener","makeFlexible","isWidthFlexible","isHeightFlexible","ResultClass","_onResize","containerElement","offsetHeight","offsetWidth","newHeight","newWidth","_Component$propTypes","cancelSubscription","updatedDimensions","getDisplayName","makeWidthFlexible","FlexibleWidthXYPlot","makeVisFlexible","GetIntrinsic","$apply","$call","$reflectApply","origSymbol","global","hasSymbolSham","flags","dotAll","getNanoSeconds","hrtime","loadTime","performance","now","hr","getTime","$Object","ignoreCase","multiline","unicode","sticky","is","ret","ERROR_MESSAGE","bound","binder","boundLength","boundArgs","Empty","moduleLoadTime","nodeLoadTime","upTime","uptime","objectKeys","isArguments","isRegex","isDate","deepEqual","actual","expected","options","opts","strict","isUndefinedOrNull","aIsRegex","bIsRegex","aIsBuffer","isBuffer","bIsBuffer","ka","kb","objEquiv","secondPerFrame","destX","newV","newX","reusedTuple","currentStyle","currentVelocity","styleValue","_interopRequireDefault","_mapToZero2","_stripStyle2","_stepper4","_mergeDiff2","_performanceNow2","_raf2","_shouldStopAnimation2","_react2","_propTypes2","rehydrateStyles","mergedPropsStyles","unreadPropStyles","plainStyles","cUnreadPropStyles","mergedPropsStyle","mergeAndSync","willEnter","willLeave","didLeave","oldMergedPropsStyles","destStyles","oldCurrentStyles","oldCurrentVelocities","oldLastIdealStyles","oldLastIdealVelocities","newMergedPropsStyles","oldIndex","oldMergedPropsStyle","leavingStyle","newCurrentStyles","newCurrentVelocities","newLastIdealStyles","newLastIdealVelocities","newMergedPropsStyleCell","foundOldIndex","plainStyle","velocity","unmounting","animationID","prevTime","accumulatedTime","clearUnreadPropStyle","_mergeAndSync","currentStyles","currentVelocities","lastIdealStyles","lastIdealVelocities","unreadPropStyle","dirty","startAnimationIfNecessary","timestamp","propStyles","styles","shouldStopAnimationAll","currentTime","timeDelta","currentFrameCompletion","framesToCatchUp","_mergeAndSync2","newMergedPropsStyle","newCurrentStyle","newCurrentVelocity","newLastIdealStyle","newLastIdealVelocity","newLastIdealStyleValue","newLastIdealVelocityValue","_stepper","_stepper2","nextIdealX","nextIdealV","defaultState","defaultStyles","objectOf","styleThatEntered","defaultStyleCell","_mergeAndSync3","componentDidMount","componentWillReceiveProps","componentWillUnmount","cancel","hydratedStyles","renderedChildren","onRemove","prevKeyIndex","nextKeyIndex","nextOrderA","nextOrderB","prevOrderA","prevOrderB","pivot","_React$version$split2","split","major","minor","versionHigherThanThirteen","getDOMNode","USED_MESSAGES","HIDDEN_PROCESSES","warning","message","onlyShowMessageOnce","console","warn","isEnumerable","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","isObject","isFunction","isString","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","config","defaultConfig","_presets2","someDirty","destStyle","win","wasAnimating","lastIdealStyle","lastIdealVelocity","propsStyle","vendors","raf","caf","last","_now","cp","cancelled","handle","requestAnimationFrame","cancelAnimationFrame"],"mappings":"8FAIA,SAASA,EAAgBC,GACvB,OAAOA,GAAOA,EAAIC,WAAaD,EAAa,QAAIA,EAHlDE,EAAQD,YAAa,EAMrB,IAAIE,EAAU,EAAQ,QAEtBD,EAAQE,OAASL,EAAgBI,GAEjC,IAAIE,EAAmB,EAAQ,QAE/BH,EAAQI,gBAAkBP,EAAgBM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6876b6411172f0e46d790a9c8c6-0f2abd3e08100e2fd09f.js","sourcesContent":["'use strict';\n\nexports.__esModule = true;\n\nfunction _interopRequire(obj) {\n  return obj && obj.__esModule ? obj['default'] : obj;\n}\n\nvar _Motion = require('./Motion');\n\nexports.Motion = _interopRequire(_Motion);\n\nvar _StaggeredMotion = require('./StaggeredMotion');\n\nexports.StaggeredMotion = _interopRequire(_StaggeredMotion);\n\nvar _TransitionMotion = require('./TransitionMotion');\n\nexports.TransitionMotion = _interopRequire(_TransitionMotion);\n\nvar _spring = require('./spring');\n\nexports.spring = _interopRequire(_spring);\n\nvar _presets = require('./presets');\n\nexports.presets = _interopRequire(_presets);\n\nvar _stripStyle = require('./stripStyle');\n\nexports.stripStyle = _interopRequire(_stripStyle); // deprecated, dummy warning function\n\nvar _reorderKeys = require('./reorderKeys');\n\nexports.reorderKeys = _interopRequire(_reorderKeys);","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n  var str = toStr.call(value);\n  var isArgs = str === '[object Arguments]';\n\n  if (!isArgs) {\n    isArgs = str !== '[object Array]' && value !== null && typeof value === 'object' && typeof value.length === 'number' && value.length >= 0 && toStr.call(value.callee) === '[object Function]';\n  }\n\n  return isArgs;\n};","'use strict';\n\nvar slice = Array.prototype.slice;\n\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) {\n  return origKeys(o);\n} : require('./implementation');\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n  if (Object.keys) {\n    var keysWorksWithArguments = function () {\n      // Safari 5.0 bug\n      var args = Object.keys(arguments);\n      return args && args.length === arguments.length;\n    }(1, 2);\n\n    if (!keysWorksWithArguments) {\n      Object.keys = function keys(object) {\n        // eslint-disable-line func-name-matching\n        if (isArgs(object)) {\n          return originalKeys(slice.call(object));\n        }\n\n        return originalKeys(object);\n      };\n    }\n  } else {\n    Object.keys = keysShim;\n  }\n\n  return Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;","'use strict';\n\nvar numberIsNaN = function numberIsNaN(value) {\n  return value !== value;\n};\n\nmodule.exports = function is(a, b) {\n  if (a === 0 && b === 0) {\n    return 1 / a === 1 / b;\n  }\n\n  if (a === b) {\n    return true;\n  }\n\n  if (numberIsNaN(a) && numberIsNaN(b)) {\n    return true;\n  }\n\n  return false;\n};","'use strict';\n\nvar hasSymbols = require('has-symbols')();\n\nvar hasToStringTag = hasSymbols && typeof Symbol.toStringTag === 'symbol';\nvar regexExec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n  regexExec = Function.call.bind(RegExp.prototype.exec);\n  isRegexMarker = {};\n\n  var throwRegexMarker = function throwRegexMarker() {\n    throw isRegexMarker;\n  };\n\n  badStringifier = {\n    toString: throwRegexMarker,\n    valueOf: throwRegexMarker\n  };\n\n  if (typeof Symbol.toPrimitive === 'symbol') {\n    badStringifier[Symbol.toPrimitive] = throwRegexMarker;\n  }\n}\n\nvar toStr = Object.prototype.toString;\nvar regexClass = '[object RegExp]';\nmodule.exports = hasToStringTag // eslint-disable-next-line consistent-return\n? function isRegex(value) {\n  if (!value || typeof value !== 'object') {\n    return false;\n  }\n\n  try {\n    regexExec(value, badStringifier);\n  } catch (e) {\n    return e === isRegexMarker;\n  }\n} : function isRegex(value) {\n  // In older browsers, typeof regex incorrectly returns 'function'\n  if (!value || typeof value !== 'object' && typeof value !== 'function') {\n    return false;\n  }\n\n  return toStr.call(value) === regexClass;\n};","'use strict';\n\nvar hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\nvar toStr = Object.prototype.toString;\n\nvar isStandardArguments = function isArguments(value) {\n  if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n    return false;\n  }\n\n  return toStr.call(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n  if (isStandardArguments(value)) {\n    return true;\n  }\n\n  return value !== null && typeof value === 'object' && typeof value.length === 'number' && value.length >= 0 && toStr.call(value) !== '[object Array]' && toStr.call(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = function () {\n  return isStandardArguments(arguments);\n}();\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;","'use strict';\n\nvar define = require('define-properties');\n\nvar callBind = require('es-abstract/helpers/callBind');\n\nvar implementation = require('./implementation');\n\nvar getPolyfill = require('./polyfill');\n\nvar shim = require('./shim');\n\nvar flagsBound = callBind(implementation);\ndefine(flagsBound, {\n  getPolyfill: getPolyfill,\n  implementation: implementation,\n  shim: shim\n});\nmodule.exports = flagsBound;","'use strict';\n/* globals\n\tAtomics,\n\tSharedArrayBuffer,\n*/\n\nvar undefined;\nvar $TypeError = TypeError;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nif ($gOPD) {\n  try {\n    $gOPD({}, '');\n  } catch (e) {\n    $gOPD = null; // this is IE 8, which has a broken gOPD\n  }\n}\n\nvar throwTypeError = function throwTypeError() {\n  throw new $TypeError();\n};\n\nvar ThrowTypeError = $gOPD ? function () {\n  try {\n    // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n    arguments.callee; // IE 8 does not throw here\n\n    return throwTypeError;\n  } catch (calleeThrows) {\n    try {\n      // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n      return $gOPD(arguments, 'callee').get;\n    } catch (gOPDthrows) {\n      return throwTypeError;\n    }\n  }\n}() : throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\n\nvar getProto = Object.getPrototypeOf || function (x) {\n  return x.__proto__;\n}; // eslint-disable-line no-proto\n\n\nvar generator; // = function * () {};\n\nvar generatorFunction = generator ? getProto(generator) : undefined;\nvar asyncFn; // async function() {};\n\nvar asyncFunction = asyncFn ? asyncFn.constructor : undefined;\nvar asyncGen; // async function * () {};\n\nvar asyncGenFunction = asyncGen ? getProto(asyncGen) : undefined;\nvar asyncGenIterator = asyncGen ? asyncGen() : undefined;\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\nvar INTRINSICS = {\n  '%Array%': Array,\n  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n  '%ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype,\n  '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n  '%ArrayPrototype%': Array.prototype,\n  '%ArrayProto_entries%': Array.prototype.entries,\n  '%ArrayProto_forEach%': Array.prototype.forEach,\n  '%ArrayProto_keys%': Array.prototype.keys,\n  '%ArrayProto_values%': Array.prototype.values,\n  '%AsyncFromSyncIteratorPrototype%': undefined,\n  '%AsyncFunction%': asyncFunction,\n  '%AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined,\n  '%AsyncGenerator%': asyncGen ? getProto(asyncGenIterator) : undefined,\n  '%AsyncGeneratorFunction%': asyncGenFunction,\n  '%AsyncGeneratorPrototype%': asyncGenFunction ? asyncGenFunction.prototype : undefined,\n  '%AsyncIteratorPrototype%': asyncGenIterator && hasSymbols && Symbol.asyncIterator ? asyncGenIterator[Symbol.asyncIterator]() : undefined,\n  '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n  '%Boolean%': Boolean,\n  '%BooleanPrototype%': Boolean.prototype,\n  '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n  '%DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype,\n  '%Date%': Date,\n  '%DatePrototype%': Date.prototype,\n  '%decodeURI%': decodeURI,\n  '%decodeURIComponent%': decodeURIComponent,\n  '%encodeURI%': encodeURI,\n  '%encodeURIComponent%': encodeURIComponent,\n  '%Error%': Error,\n  '%ErrorPrototype%': Error.prototype,\n  '%eval%': eval,\n  // eslint-disable-line no-eval\n  '%EvalError%': EvalError,\n  '%EvalErrorPrototype%': EvalError.prototype,\n  '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n  '%Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype,\n  '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n  '%Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype,\n  '%Function%': Function,\n  '%FunctionPrototype%': Function.prototype,\n  '%Generator%': generator ? getProto(generator()) : undefined,\n  '%GeneratorFunction%': generatorFunction,\n  '%GeneratorPrototype%': generatorFunction ? generatorFunction.prototype : undefined,\n  '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n  '%Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype,\n  '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n  '%Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype,\n  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n  '%Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype,\n  '%isFinite%': isFinite,\n  '%isNaN%': isNaN,\n  '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n  '%JSON%': typeof JSON === 'object' ? JSON : undefined,\n  '%JSONParse%': typeof JSON === 'object' ? JSON.parse : undefined,\n  '%Map%': typeof Map === 'undefined' ? undefined : Map,\n  '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n  '%MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype,\n  '%Math%': Math,\n  '%Number%': Number,\n  '%NumberPrototype%': Number.prototype,\n  '%Object%': Object,\n  '%ObjectPrototype%': Object.prototype,\n  '%ObjProto_toString%': Object.prototype.toString,\n  '%ObjProto_valueOf%': Object.prototype.valueOf,\n  '%parseFloat%': parseFloat,\n  '%parseInt%': parseInt,\n  '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n  '%PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype,\n  '%PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then,\n  '%Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all,\n  '%Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject,\n  '%Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve,\n  '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n  '%RangeError%': RangeError,\n  '%RangeErrorPrototype%': RangeError.prototype,\n  '%ReferenceError%': ReferenceError,\n  '%ReferenceErrorPrototype%': ReferenceError.prototype,\n  '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n  '%RegExp%': RegExp,\n  '%RegExpPrototype%': RegExp.prototype,\n  '%Set%': typeof Set === 'undefined' ? undefined : Set,\n  '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n  '%SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype,\n  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n  '%SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype,\n  '%String%': String,\n  '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n  '%StringPrototype%': String.prototype,\n  '%Symbol%': hasSymbols ? Symbol : undefined,\n  '%SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined,\n  '%SyntaxError%': SyntaxError,\n  '%SyntaxErrorPrototype%': SyntaxError.prototype,\n  '%ThrowTypeError%': ThrowTypeError,\n  '%TypedArray%': TypedArray,\n  '%TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined,\n  '%TypeError%': $TypeError,\n  '%TypeErrorPrototype%': $TypeError.prototype,\n  '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n  '%Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype,\n  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n  '%Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype,\n  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n  '%Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype,\n  '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n  '%Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype,\n  '%URIError%': URIError,\n  '%URIErrorPrototype%': URIError.prototype,\n  '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n  '%WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype,\n  '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,\n  '%WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype\n};\n\nvar bind = require('function-bind');\n\nvar $replace = bind.call(Function.call, String.prototype.replace);\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\n\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g;\n/** Used to match backslashes in property paths. */\n\nvar stringToPath = function stringToPath(string) {\n  var result = [];\n  $replace(string, rePropName, function (match, number, quote, subString) {\n    result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n  });\n  return result;\n};\n/* end adaptation */\n\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n  if (!(name in INTRINSICS)) {\n    throw new SyntaxError('intrinsic ' + name + ' does not exist!');\n  } // istanbul ignore if // hopefully this is impossible to test :-)\n\n\n  if (typeof INTRINSICS[name] === 'undefined' && !allowMissing) {\n    throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n  }\n\n  return INTRINSICS[name];\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n  if (typeof name !== 'string' || name.length === 0) {\n    throw new TypeError('intrinsic name must be a non-empty string');\n  }\n\n  if (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n    throw new TypeError('\"allowMissing\" argument must be a boolean');\n  }\n\n  var parts = stringToPath(name);\n  var value = getBaseIntrinsic('%' + (parts.length > 0 ? parts[0] : '') + '%', allowMissing);\n\n  for (var i = 1; i < parts.length; i += 1) {\n    if (value != null) {\n      if ($gOPD && i + 1 >= parts.length) {\n        var desc = $gOPD(value, parts[i]);\n\n        if (!allowMissing && !(parts[i] in value)) {\n          throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n        }\n\n        value = desc ? desc.get || desc.value : value[parts[i]];\n      } else {\n        value = value[parts[i]];\n      }\n    }\n  }\n\n  return value;\n};","'use strict';\n\nvar keys = require('object-keys');\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar origDefineProperty = Object.defineProperty;\n\nvar isFunction = function isFunction(fn) {\n  return typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar arePropertyDescriptorsSupported = function arePropertyDescriptorsSupported() {\n  var obj = {};\n\n  try {\n    origDefineProperty(obj, 'x', {\n      enumerable: false,\n      value: obj\n    }); // eslint-disable-next-line no-unused-vars, no-restricted-syntax\n\n    for (var _ in obj) {\n      // jscs:ignore disallowUnusedVariables\n      return false;\n    }\n\n    return obj.x === obj;\n  } catch (e) {\n    /* this is IE 8. */\n    return false;\n  }\n};\n\nvar supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();\n\nvar defineProperty = function defineProperty(object, name, value, predicate) {\n  if (name in object && (!isFunction(predicate) || !predicate())) {\n    return;\n  }\n\n  if (supportsDescriptors) {\n    origDefineProperty(object, name, {\n      configurable: true,\n      enumerable: false,\n      value: value,\n      writable: true\n    });\n  } else {\n    object[name] = value;\n  }\n};\n\nvar defineProperties = function defineProperties(object, map) {\n  var predicates = arguments.length > 2 ? arguments[2] : {};\n  var props = keys(map);\n\n  if (hasSymbols) {\n    props = concat.call(props, Object.getOwnPropertySymbols(map));\n  }\n\n  for (var i = 0; i < props.length; i += 1) {\n    defineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n  }\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\nmodule.exports = defineProperties;","// shim for using process in browser\nvar process = module.exports = {}; // cached from whatever global is present so that test runners that stub it\n// don't break things.  But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n  throw new Error('setTimeout has not been defined');\n}\n\nfunction defaultClearTimeout() {\n  throw new Error('clearTimeout has not been defined');\n}\n\n(function () {\n  try {\n    if (typeof setTimeout === 'function') {\n      cachedSetTimeout = setTimeout;\n    } else {\n      cachedSetTimeout = defaultSetTimout;\n    }\n  } catch (e) {\n    cachedSetTimeout = defaultSetTimout;\n  }\n\n  try {\n    if (typeof clearTimeout === 'function') {\n      cachedClearTimeout = clearTimeout;\n    } else {\n      cachedClearTimeout = defaultClearTimeout;\n    }\n  } catch (e) {\n    cachedClearTimeout = defaultClearTimeout;\n  }\n})();\n\nfunction runTimeout(fun) {\n  if (cachedSetTimeout === setTimeout) {\n    //normal enviroments in sane situations\n    return setTimeout(fun, 0);\n  } // if setTimeout wasn't available but was latter defined\n\n\n  if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n    cachedSetTimeout = setTimeout;\n    return setTimeout(fun, 0);\n  }\n\n  try {\n    // when when somebody has screwed with setTimeout but no I.E. maddness\n    return cachedSetTimeout(fun, 0);\n  } catch (e) {\n    try {\n      // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n      return cachedSetTimeout.call(null, fun, 0);\n    } catch (e) {\n      // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n      return cachedSetTimeout.call(this, fun, 0);\n    }\n  }\n}\n\nfunction runClearTimeout(marker) {\n  if (cachedClearTimeout === clearTimeout) {\n    //normal enviroments in sane situations\n    return clearTimeout(marker);\n  } // if clearTimeout wasn't available but was latter defined\n\n\n  if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n    cachedClearTimeout = clearTimeout;\n    return clearTimeout(marker);\n  }\n\n  try {\n    // when when somebody has screwed with setTimeout but no I.E. maddness\n    return cachedClearTimeout(marker);\n  } catch (e) {\n    try {\n      // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n      return cachedClearTimeout.call(null, marker);\n    } catch (e) {\n      // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n      // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n      return cachedClearTimeout.call(this, marker);\n    }\n  }\n}\n\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n  if (!draining || !currentQueue) {\n    return;\n  }\n\n  draining = false;\n\n  if (currentQueue.length) {\n    queue = currentQueue.concat(queue);\n  } else {\n    queueIndex = -1;\n  }\n\n  if (queue.length) {\n    drainQueue();\n  }\n}\n\nfunction drainQueue() {\n  if (draining) {\n    return;\n  }\n\n  var timeout = runTimeout(cleanUpNextTick);\n  draining = true;\n  var len = queue.length;\n\n  while (len) {\n    currentQueue = queue;\n    queue = [];\n\n    while (++queueIndex < len) {\n      if (currentQueue) {\n        currentQueue[queueIndex].run();\n      }\n    }\n\n    queueIndex = -1;\n    len = queue.length;\n  }\n\n  currentQueue = null;\n  draining = false;\n  runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n  var args = new Array(arguments.length - 1);\n\n  if (arguments.length > 1) {\n    for (var i = 1; i < arguments.length; i++) {\n      args[i - 1] = arguments[i];\n    }\n  }\n\n  queue.push(new Item(fun, args));\n\n  if (queue.length === 1 && !draining) {\n    runTimeout(drainQueue);\n  }\n}; // v8 likes predictible objects\n\n\nfunction Item(fun, array) {\n  this.fun = fun;\n  this.array = array;\n}\n\nItem.prototype.run = function () {\n  this.fun.apply(null, this.array);\n};\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\n\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) {\n  return [];\n};\n\nprocess.binding = function (name) {\n  throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () {\n  return '/';\n};\n\nprocess.chdir = function (dir) {\n  throw new Error('process.chdir is not supported');\n};\n\nprocess.umask = function () {\n  return 0;\n};","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;","'use strict';\n\nvar getDay = Date.prototype.getDay;\n\nvar tryDateObject = function tryDateGetDayCall(value) {\n  try {\n    getDay.call(value);\n    return true;\n  } catch (e) {\n    return false;\n  }\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\n\nmodule.exports = function isDateObject(value) {\n  if (typeof value !== 'object' || value === null) {\n    return false;\n  }\n\n  return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};","'use strict';\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\n\nmodule.exports = function hasSymbols() {\n  if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') {\n    return false;\n  }\n\n  if (typeof Symbol.iterator === 'symbol') {\n    return true;\n  }\n\n  var obj = {};\n  var sym = Symbol('test');\n  var symObj = Object(sym);\n\n  if (typeof sym === 'string') {\n    return false;\n  }\n\n  if (Object.prototype.toString.call(sym) !== '[object Symbol]') {\n    return false;\n  }\n\n  if (Object.prototype.toString.call(symObj) !== '[object Symbol]') {\n    return false;\n  } // temp disabled per https://github.com/ljharb/object.assign/issues/17\n  // if (sym instanceof Symbol) { return false; }\n  // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n  // if (!(symObj instanceof Symbol)) { return false; }\n  // if (typeof Symbol.prototype.toString !== 'function') { return false; }\n  // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\n  var symVal = 42;\n  obj[sym] = symVal;\n\n  for (sym in obj) {\n    return false;\n  } // eslint-disable-line no-restricted-syntax\n\n\n  if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) {\n    return false;\n  }\n\n  if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) {\n    return false;\n  }\n\n  var syms = Object.getOwnPropertySymbols(obj);\n\n  if (syms.length !== 1 || syms[0] !== sym) {\n    return false;\n  }\n\n  if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {\n    return false;\n  }\n\n  if (typeof Object.getOwnPropertyDescriptor === 'function') {\n    var descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\n    if (descriptor.value !== symVal || descriptor.enumerable !== true) {\n      return false;\n    }\n  }\n\n  return true;\n};","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\n\nvar getPolyfill = require('./polyfill');\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n  if (!supportsDescriptors || !getProto) {\n    throw new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n  }\n\n  var polyfill = getPolyfill();\n  var proto = getProto(regex);\n  var descriptor = gOPD(proto, 'flags');\n\n  if (!descriptor || descriptor.get !== polyfill) {\n    defineProperty(proto, 'flags', {\n      configurable: true,\n      enumerable: false,\n      get: polyfill\n    });\n  }\n\n  return polyfill;\n};","\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = {\n  noWobble: {\n    stiffness: 170,\n    damping: 26\n  },\n  // the default, if nothing provided\n  gentle: {\n    stiffness: 120,\n    damping: 14\n  },\n  wobbly: {\n    stiffness: 180,\n    damping: 12\n  },\n  stiff: {\n    stiffness: 210,\n    damping: 20\n  }\n};\nmodule.exports = exports[\"default\"];","export default function (x) {\n  return function () {\n    return x;\n  };\n}","export function x(d) {\n  return d[0];\n}\nexport function y(d) {\n  return d[1];\n}","function RedBlackTree() {\n  this._ = null; // root node\n}\n\nexport function RedBlackNode(node) {\n  node.U = // parent node\n  node.C = // color - true for red, false for black\n  node.L = // left node\n  node.R = // right node\n  node.P = // previous node\n  node.N = null; // next node\n}\nRedBlackTree.prototype = {\n  constructor: RedBlackTree,\n  insert: function insert(after, node) {\n    var parent, grandpa, uncle;\n\n    if (after) {\n      node.P = after;\n      node.N = after.N;\n      if (after.N) after.N.P = node;\n      after.N = node;\n\n      if (after.R) {\n        after = after.R;\n\n        while (after.L) {\n          after = after.L;\n        }\n\n        after.L = node;\n      } else {\n        after.R = node;\n      }\n\n      parent = after;\n    } else if (this._) {\n      after = RedBlackFirst(this._);\n      node.P = null;\n      node.N = after;\n      after.P = after.L = node;\n      parent = after;\n    } else {\n      node.P = node.N = null;\n      this._ = node;\n      parent = null;\n    }\n\n    node.L = node.R = null;\n    node.U = parent;\n    node.C = true;\n    after = node;\n\n    while (parent && parent.C) {\n      grandpa = parent.U;\n\n      if (parent === grandpa.L) {\n        uncle = grandpa.R;\n\n        if (uncle && uncle.C) {\n          parent.C = uncle.C = false;\n          grandpa.C = true;\n          after = grandpa;\n        } else {\n          if (after === parent.R) {\n            RedBlackRotateLeft(this, parent);\n            after = parent;\n            parent = after.U;\n          }\n\n          parent.C = false;\n          grandpa.C = true;\n          RedBlackRotateRight(this, grandpa);\n        }\n      } else {\n        uncle = grandpa.L;\n\n        if (uncle && uncle.C) {\n          parent.C = uncle.C = false;\n          grandpa.C = true;\n          after = grandpa;\n        } else {\n          if (after === parent.L) {\n            RedBlackRotateRight(this, parent);\n            after = parent;\n            parent = after.U;\n          }\n\n          parent.C = false;\n          grandpa.C = true;\n          RedBlackRotateLeft(this, grandpa);\n        }\n      }\n\n      parent = after.U;\n    }\n\n    this._.C = false;\n  },\n  remove: function remove(node) {\n    if (node.N) node.N.P = node.P;\n    if (node.P) node.P.N = node.N;\n    node.N = node.P = null;\n    var parent = node.U,\n        sibling,\n        left = node.L,\n        right = node.R,\n        next,\n        red;\n    if (!left) next = right;else if (!right) next = left;else next = RedBlackFirst(right);\n\n    if (parent) {\n      if (parent.L === node) parent.L = next;else parent.R = next;\n    } else {\n      this._ = next;\n    }\n\n    if (left && right) {\n      red = next.C;\n      next.C = node.C;\n      next.L = left;\n      left.U = next;\n\n      if (next !== right) {\n        parent = next.U;\n        next.U = node.U;\n        node = next.R;\n        parent.L = node;\n        next.R = right;\n        right.U = next;\n      } else {\n        next.U = parent;\n        parent = next;\n        node = next.R;\n      }\n    } else {\n      red = node.C;\n      node = next;\n    }\n\n    if (node) node.U = parent;\n    if (red) return;\n\n    if (node && node.C) {\n      node.C = false;\n      return;\n    }\n\n    do {\n      if (node === this._) break;\n\n      if (node === parent.L) {\n        sibling = parent.R;\n\n        if (sibling.C) {\n          sibling.C = false;\n          parent.C = true;\n          RedBlackRotateLeft(this, parent);\n          sibling = parent.R;\n        }\n\n        if (sibling.L && sibling.L.C || sibling.R && sibling.R.C) {\n          if (!sibling.R || !sibling.R.C) {\n            sibling.L.C = false;\n            sibling.C = true;\n            RedBlackRotateRight(this, sibling);\n            sibling = parent.R;\n          }\n\n          sibling.C = parent.C;\n          parent.C = sibling.R.C = false;\n          RedBlackRotateLeft(this, parent);\n          node = this._;\n          break;\n        }\n      } else {\n        sibling = parent.L;\n\n        if (sibling.C) {\n          sibling.C = false;\n          parent.C = true;\n          RedBlackRotateRight(this, parent);\n          sibling = parent.L;\n        }\n\n        if (sibling.L && sibling.L.C || sibling.R && sibling.R.C) {\n          if (!sibling.L || !sibling.L.C) {\n            sibling.R.C = false;\n            sibling.C = true;\n            RedBlackRotateLeft(this, sibling);\n            sibling = parent.L;\n          }\n\n          sibling.C = parent.C;\n          parent.C = sibling.L.C = false;\n          RedBlackRotateRight(this, parent);\n          node = this._;\n          break;\n        }\n      }\n\n      sibling.C = true;\n      node = parent;\n      parent = parent.U;\n    } while (!node.C);\n\n    if (node) node.C = false;\n  }\n};\n\nfunction RedBlackRotateLeft(tree, node) {\n  var p = node,\n      q = node.R,\n      parent = p.U;\n\n  if (parent) {\n    if (parent.L === p) parent.L = q;else parent.R = q;\n  } else {\n    tree._ = q;\n  }\n\n  q.U = parent;\n  p.U = q;\n  p.R = q.L;\n  if (p.R) p.R.U = p;\n  q.L = p;\n}\n\nfunction RedBlackRotateRight(tree, node) {\n  var p = node,\n      q = node.L,\n      parent = p.U;\n\n  if (parent) {\n    if (parent.L === p) parent.L = q;else parent.R = q;\n  } else {\n    tree._ = q;\n  }\n\n  q.U = parent;\n  p.U = q;\n  p.L = q.R;\n  if (p.L) p.L.U = p;\n  q.R = p;\n}\n\nfunction RedBlackFirst(node) {\n  while (node.L) {\n    node = node.L;\n  }\n\n  return node;\n}\n\nexport default RedBlackTree;","import { cells, edges, epsilon } from \"./Diagram\";\nexport function createEdge(left, right, v0, v1) {\n  var edge = [null, null],\n      index = edges.push(edge) - 1;\n  edge.left = left;\n  edge.right = right;\n  if (v0) setEdgeEnd(edge, left, right, v0);\n  if (v1) setEdgeEnd(edge, right, left, v1);\n  cells[left.index].halfedges.push(index);\n  cells[right.index].halfedges.push(index);\n  return edge;\n}\nexport function createBorderEdge(left, v0, v1) {\n  var edge = [v0, v1];\n  edge.left = left;\n  return edge;\n}\nexport function setEdgeEnd(edge, left, right, vertex) {\n  if (!edge[0] && !edge[1]) {\n    edge[0] = vertex;\n    edge.left = left;\n    edge.right = right;\n  } else if (edge.left === right) {\n    edge[1] = vertex;\n  } else {\n    edge[0] = vertex;\n  }\n} // Liang–Barsky line clipping.\n\nfunction clipEdge(edge, x0, y0, x1, y1) {\n  var a = edge[0],\n      b = edge[1],\n      ax = a[0],\n      ay = a[1],\n      bx = b[0],\n      by = b[1],\n      t0 = 0,\n      t1 = 1,\n      dx = bx - ax,\n      dy = by - ay,\n      r;\n  r = x0 - ax;\n  if (!dx && r > 0) return;\n  r /= dx;\n\n  if (dx < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dx > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = x1 - ax;\n  if (!dx && r < 0) return;\n  r /= dx;\n\n  if (dx < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dx > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  r = y0 - ay;\n  if (!dy && r > 0) return;\n  r /= dy;\n\n  if (dy < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dy > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = y1 - ay;\n  if (!dy && r < 0) return;\n  r /= dy;\n\n  if (dy < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dy > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  if (!(t0 > 0) && !(t1 < 1)) return true; // TODO Better check?\n\n  if (t0 > 0) edge[0] = [ax + t0 * dx, ay + t0 * dy];\n  if (t1 < 1) edge[1] = [ax + t1 * dx, ay + t1 * dy];\n  return true;\n}\n\nfunction connectEdge(edge, x0, y0, x1, y1) {\n  var v1 = edge[1];\n  if (v1) return true;\n  var v0 = edge[0],\n      left = edge.left,\n      right = edge.right,\n      lx = left[0],\n      ly = left[1],\n      rx = right[0],\n      ry = right[1],\n      fx = (lx + rx) / 2,\n      fy = (ly + ry) / 2,\n      fm,\n      fb;\n\n  if (ry === ly) {\n    if (fx < x0 || fx >= x1) return;\n\n    if (lx > rx) {\n      if (!v0) v0 = [fx, y0];else if (v0[1] >= y1) return;\n      v1 = [fx, y1];\n    } else {\n      if (!v0) v0 = [fx, y1];else if (v0[1] < y0) return;\n      v1 = [fx, y0];\n    }\n  } else {\n    fm = (lx - rx) / (ry - ly);\n    fb = fy - fm * fx;\n\n    if (fm < -1 || fm > 1) {\n      if (lx > rx) {\n        if (!v0) v0 = [(y0 - fb) / fm, y0];else if (v0[1] >= y1) return;\n        v1 = [(y1 - fb) / fm, y1];\n      } else {\n        if (!v0) v0 = [(y1 - fb) / fm, y1];else if (v0[1] < y0) return;\n        v1 = [(y0 - fb) / fm, y0];\n      }\n    } else {\n      if (ly < ry) {\n        if (!v0) v0 = [x0, fm * x0 + fb];else if (v0[0] >= x1) return;\n        v1 = [x1, fm * x1 + fb];\n      } else {\n        if (!v0) v0 = [x1, fm * x1 + fb];else if (v0[0] < x0) return;\n        v1 = [x0, fm * x0 + fb];\n      }\n    }\n  }\n\n  edge[0] = v0;\n  edge[1] = v1;\n  return true;\n}\n\nexport function clipEdges(x0, y0, x1, y1) {\n  var i = edges.length,\n      edge;\n\n  while (i--) {\n    if (!connectEdge(edge = edges[i], x0, y0, x1, y1) || !clipEdge(edge, x0, y0, x1, y1) || !(Math.abs(edge[0][0] - edge[1][0]) > epsilon || Math.abs(edge[0][1] - edge[1][1]) > epsilon)) {\n      delete edges[i];\n    }\n  }\n}","import { createBorderEdge } from \"./Edge\";\nimport { cells, edges, epsilon } from \"./Diagram\";\nexport function createCell(site) {\n  return cells[site.index] = {\n    site: site,\n    halfedges: []\n  };\n}\n\nfunction cellHalfedgeAngle(cell, edge) {\n  var site = cell.site,\n      va = edge.left,\n      vb = edge.right;\n  if (site === vb) vb = va, va = site;\n  if (vb) return Math.atan2(vb[1] - va[1], vb[0] - va[0]);\n  if (site === va) va = edge[1], vb = edge[0];else va = edge[0], vb = edge[1];\n  return Math.atan2(va[0] - vb[0], vb[1] - va[1]);\n}\n\nexport function cellHalfedgeStart(cell, edge) {\n  return edge[+(edge.left !== cell.site)];\n}\nexport function cellHalfedgeEnd(cell, edge) {\n  return edge[+(edge.left === cell.site)];\n}\nexport function sortCellHalfedges() {\n  for (var i = 0, n = cells.length, cell, halfedges, j, m; i < n; ++i) {\n    if ((cell = cells[i]) && (m = (halfedges = cell.halfedges).length)) {\n      var index = new Array(m),\n          array = new Array(m);\n\n      for (j = 0; j < m; ++j) {\n        index[j] = j, array[j] = cellHalfedgeAngle(cell, edges[halfedges[j]]);\n      }\n\n      index.sort(function (i, j) {\n        return array[j] - array[i];\n      });\n\n      for (j = 0; j < m; ++j) {\n        array[j] = halfedges[index[j]];\n      }\n\n      for (j = 0; j < m; ++j) {\n        halfedges[j] = array[j];\n      }\n    }\n  }\n}\nexport function clipCells(x0, y0, x1, y1) {\n  var nCells = cells.length,\n      iCell,\n      cell,\n      site,\n      iHalfedge,\n      halfedges,\n      nHalfedges,\n      start,\n      startX,\n      startY,\n      end,\n      endX,\n      endY,\n      cover = true;\n\n  for (iCell = 0; iCell < nCells; ++iCell) {\n    if (cell = cells[iCell]) {\n      site = cell.site;\n      halfedges = cell.halfedges;\n      iHalfedge = halfedges.length; // Remove any dangling clipped edges.\n\n      while (iHalfedge--) {\n        if (!edges[halfedges[iHalfedge]]) {\n          halfedges.splice(iHalfedge, 1);\n        }\n      } // Insert any border edges as necessary.\n\n\n      iHalfedge = 0, nHalfedges = halfedges.length;\n\n      while (iHalfedge < nHalfedges) {\n        end = cellHalfedgeEnd(cell, edges[halfedges[iHalfedge]]), endX = end[0], endY = end[1];\n        start = cellHalfedgeStart(cell, edges[halfedges[++iHalfedge % nHalfedges]]), startX = start[0], startY = start[1];\n\n        if (Math.abs(endX - startX) > epsilon || Math.abs(endY - startY) > epsilon) {\n          halfedges.splice(iHalfedge, 0, edges.push(createBorderEdge(site, end, Math.abs(endX - x0) < epsilon && y1 - endY > epsilon ? [x0, Math.abs(startX - x0) < epsilon ? startY : y1] : Math.abs(endY - y1) < epsilon && x1 - endX > epsilon ? [Math.abs(startY - y1) < epsilon ? startX : x1, y1] : Math.abs(endX - x1) < epsilon && endY - y0 > epsilon ? [x1, Math.abs(startX - x1) < epsilon ? startY : y0] : Math.abs(endY - y0) < epsilon && endX - x0 > epsilon ? [Math.abs(startY - y0) < epsilon ? startX : x0, y0] : null)) - 1);\n          ++nHalfedges;\n        }\n      }\n\n      if (nHalfedges) cover = false;\n    }\n  } // If there weren’t any edges, have the closest site cover the extent.\n  // It doesn’t matter which corner of the extent we measure!\n\n\n  if (cover) {\n    var dx,\n        dy,\n        d2,\n        dc = Infinity;\n\n    for (iCell = 0, cover = null; iCell < nCells; ++iCell) {\n      if (cell = cells[iCell]) {\n        site = cell.site;\n        dx = site[0] - x0;\n        dy = site[1] - y0;\n        d2 = dx * dx + dy * dy;\n        if (d2 < dc) dc = d2, cover = cell;\n      }\n    }\n\n    if (cover) {\n      var v00 = [x0, y0],\n          v01 = [x0, y1],\n          v11 = [x1, y1],\n          v10 = [x1, y0];\n      cover.halfedges.push(edges.push(createBorderEdge(site = cover.site, v00, v01)) - 1, edges.push(createBorderEdge(site, v01, v11)) - 1, edges.push(createBorderEdge(site, v11, v10)) - 1, edges.push(createBorderEdge(site, v10, v00)) - 1);\n    }\n  } // Lastly delete any cells with no edges; these were entirely clipped.\n\n\n  for (iCell = 0; iCell < nCells; ++iCell) {\n    if (cell = cells[iCell]) {\n      if (!cell.halfedges.length) {\n        delete cells[iCell];\n      }\n    }\n  }\n}","import { RedBlackNode } from \"./RedBlackTree\";\nimport { circles, epsilon2 } from \"./Diagram\";\nvar circlePool = [];\nexport var firstCircle;\n\nfunction Circle() {\n  RedBlackNode(this);\n  this.x = this.y = this.arc = this.site = this.cy = null;\n}\n\nexport function attachCircle(arc) {\n  var lArc = arc.P,\n      rArc = arc.N;\n  if (!lArc || !rArc) return;\n  var lSite = lArc.site,\n      cSite = arc.site,\n      rSite = rArc.site;\n  if (lSite === rSite) return;\n  var bx = cSite[0],\n      by = cSite[1],\n      ax = lSite[0] - bx,\n      ay = lSite[1] - by,\n      cx = rSite[0] - bx,\n      cy = rSite[1] - by;\n  var d = 2 * (ax * cy - ay * cx);\n  if (d >= -epsilon2) return;\n  var ha = ax * ax + ay * ay,\n      hc = cx * cx + cy * cy,\n      x = (cy * ha - ay * hc) / d,\n      y = (ax * hc - cx * ha) / d;\n  var circle = circlePool.pop() || new Circle();\n  circle.arc = arc;\n  circle.site = cSite;\n  circle.x = x + bx;\n  circle.y = (circle.cy = y + by) + Math.sqrt(x * x + y * y); // y bottom\n\n  arc.circle = circle;\n  var before = null,\n      node = circles._;\n\n  while (node) {\n    if (circle.y < node.y || circle.y === node.y && circle.x <= node.x) {\n      if (node.L) node = node.L;else {\n        before = node.P;\n        break;\n      }\n    } else {\n      if (node.R) node = node.R;else {\n        before = node;\n        break;\n      }\n    }\n  }\n\n  circles.insert(before, circle);\n  if (!before) firstCircle = circle;\n}\nexport function detachCircle(arc) {\n  var circle = arc.circle;\n\n  if (circle) {\n    if (!circle.P) firstCircle = circle.N;\n    circles.remove(circle);\n    circlePool.push(circle);\n    RedBlackNode(circle);\n    arc.circle = null;\n  }\n}","import { RedBlackNode } from \"./RedBlackTree\";\nimport { createCell } from \"./Cell\";\nimport { attachCircle, detachCircle } from \"./Circle\";\nimport { createEdge, setEdgeEnd } from \"./Edge\";\nimport { beaches, epsilon } from \"./Diagram\";\nvar beachPool = [];\n\nfunction Beach() {\n  RedBlackNode(this);\n  this.edge = this.site = this.circle = null;\n}\n\nfunction createBeach(site) {\n  var beach = beachPool.pop() || new Beach();\n  beach.site = site;\n  return beach;\n}\n\nfunction detachBeach(beach) {\n  detachCircle(beach);\n  beaches.remove(beach);\n  beachPool.push(beach);\n  RedBlackNode(beach);\n}\n\nexport function removeBeach(beach) {\n  var circle = beach.circle,\n      x = circle.x,\n      y = circle.cy,\n      vertex = [x, y],\n      previous = beach.P,\n      next = beach.N,\n      disappearing = [beach];\n  detachBeach(beach);\n  var lArc = previous;\n\n  while (lArc.circle && Math.abs(x - lArc.circle.x) < epsilon && Math.abs(y - lArc.circle.cy) < epsilon) {\n    previous = lArc.P;\n    disappearing.unshift(lArc);\n    detachBeach(lArc);\n    lArc = previous;\n  }\n\n  disappearing.unshift(lArc);\n  detachCircle(lArc);\n  var rArc = next;\n\n  while (rArc.circle && Math.abs(x - rArc.circle.x) < epsilon && Math.abs(y - rArc.circle.cy) < epsilon) {\n    next = rArc.N;\n    disappearing.push(rArc);\n    detachBeach(rArc);\n    rArc = next;\n  }\n\n  disappearing.push(rArc);\n  detachCircle(rArc);\n  var nArcs = disappearing.length,\n      iArc;\n\n  for (iArc = 1; iArc < nArcs; ++iArc) {\n    rArc = disappearing[iArc];\n    lArc = disappearing[iArc - 1];\n    setEdgeEnd(rArc.edge, lArc.site, rArc.site, vertex);\n  }\n\n  lArc = disappearing[0];\n  rArc = disappearing[nArcs - 1];\n  rArc.edge = createEdge(lArc.site, rArc.site, null, vertex);\n  attachCircle(lArc);\n  attachCircle(rArc);\n}\nexport function addBeach(site) {\n  var x = site[0],\n      directrix = site[1],\n      lArc,\n      rArc,\n      dxl,\n      dxr,\n      node = beaches._;\n\n  while (node) {\n    dxl = leftBreakPoint(node, directrix) - x;\n    if (dxl > epsilon) node = node.L;else {\n      dxr = x - rightBreakPoint(node, directrix);\n\n      if (dxr > epsilon) {\n        if (!node.R) {\n          lArc = node;\n          break;\n        }\n\n        node = node.R;\n      } else {\n        if (dxl > -epsilon) {\n          lArc = node.P;\n          rArc = node;\n        } else if (dxr > -epsilon) {\n          lArc = node;\n          rArc = node.N;\n        } else {\n          lArc = rArc = node;\n        }\n\n        break;\n      }\n    }\n  }\n\n  createCell(site);\n  var newArc = createBeach(site);\n  beaches.insert(lArc, newArc);\n  if (!lArc && !rArc) return;\n\n  if (lArc === rArc) {\n    detachCircle(lArc);\n    rArc = createBeach(lArc.site);\n    beaches.insert(newArc, rArc);\n    newArc.edge = rArc.edge = createEdge(lArc.site, newArc.site);\n    attachCircle(lArc);\n    attachCircle(rArc);\n    return;\n  }\n\n  if (!rArc) {\n    // && lArc\n    newArc.edge = createEdge(lArc.site, newArc.site);\n    return;\n  } // else lArc !== rArc\n\n\n  detachCircle(lArc);\n  detachCircle(rArc);\n  var lSite = lArc.site,\n      ax = lSite[0],\n      ay = lSite[1],\n      bx = site[0] - ax,\n      by = site[1] - ay,\n      rSite = rArc.site,\n      cx = rSite[0] - ax,\n      cy = rSite[1] - ay,\n      d = 2 * (bx * cy - by * cx),\n      hb = bx * bx + by * by,\n      hc = cx * cx + cy * cy,\n      vertex = [(cy * hb - by * hc) / d + ax, (bx * hc - cx * hb) / d + ay];\n  setEdgeEnd(rArc.edge, lSite, rSite, vertex);\n  newArc.edge = createEdge(lSite, site, null, vertex);\n  rArc.edge = createEdge(site, rSite, null, vertex);\n  attachCircle(lArc);\n  attachCircle(rArc);\n}\n\nfunction leftBreakPoint(arc, directrix) {\n  var site = arc.site,\n      rfocx = site[0],\n      rfocy = site[1],\n      pby2 = rfocy - directrix;\n  if (!pby2) return rfocx;\n  var lArc = arc.P;\n  if (!lArc) return -Infinity;\n  site = lArc.site;\n  var lfocx = site[0],\n      lfocy = site[1],\n      plby2 = lfocy - directrix;\n  if (!plby2) return lfocx;\n  var hl = lfocx - rfocx,\n      aby2 = 1 / pby2 - 1 / plby2,\n      b = hl / plby2;\n  if (aby2) return (-b + Math.sqrt(b * b - 2 * aby2 * (hl * hl / (-2 * plby2) - lfocy + plby2 / 2 + rfocy - pby2 / 2))) / aby2 + rfocx;\n  return (rfocx + lfocx) / 2;\n}\n\nfunction rightBreakPoint(arc, directrix) {\n  var rArc = arc.N;\n  if (rArc) return leftBreakPoint(rArc, directrix);\n  var site = arc.site;\n  return site[1] === directrix ? site[0] : Infinity;\n}","import { addBeach, removeBeach } from \"./Beach\";\nimport { sortCellHalfedges, cellHalfedgeStart, clipCells } from \"./Cell\";\nimport { firstCircle } from \"./Circle\";\nimport { clipEdges } from \"./Edge\";\nimport RedBlackTree from \"./RedBlackTree\";\nexport var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var beaches;\nexport var cells;\nexport var circles;\nexport var edges;\n\nfunction triangleArea(a, b, c) {\n  return (a[0] - c[0]) * (b[1] - a[1]) - (a[0] - b[0]) * (c[1] - a[1]);\n}\n\nfunction lexicographic(a, b) {\n  return b[1] - a[1] || b[0] - a[0];\n}\n\nexport default function Diagram(sites, extent) {\n  var site = sites.sort(lexicographic).pop(),\n      x,\n      y,\n      circle;\n  edges = [];\n  cells = new Array(sites.length);\n  beaches = new RedBlackTree();\n  circles = new RedBlackTree();\n\n  while (true) {\n    circle = firstCircle;\n\n    if (site && (!circle || site[1] < circle.y || site[1] === circle.y && site[0] < circle.x)) {\n      if (site[0] !== x || site[1] !== y) {\n        addBeach(site);\n        x = site[0], y = site[1];\n      }\n\n      site = sites.pop();\n    } else if (circle) {\n      removeBeach(circle.arc);\n    } else {\n      break;\n    }\n  }\n\n  sortCellHalfedges();\n\n  if (extent) {\n    var x0 = +extent[0][0],\n        y0 = +extent[0][1],\n        x1 = +extent[1][0],\n        y1 = +extent[1][1];\n    clipEdges(x0, y0, x1, y1);\n    clipCells(x0, y0, x1, y1);\n  }\n\n  this.edges = edges;\n  this.cells = cells;\n  beaches = circles = edges = cells = null;\n}\nDiagram.prototype = {\n  constructor: Diagram,\n  polygons: function polygons() {\n    var edges = this.edges;\n    return this.cells.map(function (cell) {\n      var polygon = cell.halfedges.map(function (i) {\n        return cellHalfedgeStart(cell, edges[i]);\n      });\n      polygon.data = cell.site.data;\n      return polygon;\n    });\n  },\n  triangles: function triangles() {\n    var triangles = [],\n        edges = this.edges;\n    this.cells.forEach(function (cell, i) {\n      if (!(m = (halfedges = cell.halfedges).length)) return;\n      var site = cell.site,\n          halfedges,\n          j = -1,\n          m,\n          s0,\n          e1 = edges[halfedges[m - 1]],\n          s1 = e1.left === site ? e1.right : e1.left;\n\n      while (++j < m) {\n        s0 = s1;\n        e1 = edges[halfedges[j]];\n        s1 = e1.left === site ? e1.right : e1.left;\n\n        if (s0 && s1 && i < s0.index && i < s1.index && triangleArea(site, s0, s1) < 0) {\n          triangles.push([site.data, s0.data, s1.data]);\n        }\n      }\n    });\n    return triangles;\n  },\n  links: function links() {\n    return this.edges.filter(function (edge) {\n      return edge.right;\n    }).map(function (edge) {\n      return {\n        source: edge.left.data,\n        target: edge.right.data\n      };\n    });\n  },\n  find: function find(x, y, radius) {\n    var that = this,\n        i0,\n        i1 = that._found || 0,\n        n = that.cells.length,\n        cell; // Use the previously-found cell, or start with an arbitrary one.\n\n    while (!(cell = that.cells[i1])) {\n      if (++i1 >= n) return null;\n    }\n\n    var dx = x - cell.site[0],\n        dy = y - cell.site[1],\n        d2 = dx * dx + dy * dy; // Traverse the half-edges to find a closer cell, if any.\n\n    do {\n      cell = that.cells[i0 = i1], i1 = null;\n      cell.halfedges.forEach(function (e) {\n        var edge = that.edges[e],\n            v = edge.left;\n        if ((v === cell.site || !v) && !(v = edge.right)) return;\n        var vx = x - v[0],\n            vy = y - v[1],\n            v2 = vx * vx + vy * vy;\n        if (v2 < d2) d2 = v2, i1 = v.index;\n      });\n    } while (i1 !== null);\n\n    that._found = i0;\n    return radius == null || d2 <= radius * radius ? cell.site : null;\n  }\n};","import constant from \"./constant\";\nimport { x as pointX, y as pointY } from \"./point\";\nimport Diagram, { epsilon } from \"./Diagram\";\nexport default function () {\n  var x = pointX,\n      y = pointY,\n      extent = null;\n\n  function voronoi(data) {\n    return new Diagram(data.map(function (d, i) {\n      var s = [Math.round(x(d, i, data) / epsilon) * epsilon, Math.round(y(d, i, data) / epsilon) * epsilon];\n      s.index = i;\n      s.data = d;\n      return s;\n    }), extent);\n  }\n\n  voronoi.polygons = function (data) {\n    return voronoi(data).polygons();\n  };\n\n  voronoi.links = function (data) {\n    return voronoi(data).links();\n  };\n\n  voronoi.triangles = function (data) {\n    return voronoi(data).triangles();\n  };\n\n  voronoi.x = function (_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), voronoi) : x;\n  };\n\n  voronoi.y = function (_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), voronoi) : y;\n  };\n\n  voronoi.extent = function (_) {\n    return arguments.length ? (extent = _ == null ? null : [[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]], voronoi) : extent && [[extent[0][0], extent[0][1]], [extent[1][0], extent[1][1]]];\n  };\n\n  voronoi.size = function (_) {\n    return arguments.length ? (extent = _ == null ? null : [[0, 0], [+_[0], +_[1]]], voronoi) : extent && [extent[1][0] - extent[0][0], extent[1][1] - extent[0][1]];\n  };\n\n  return voronoi;\n}","export default function (constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n}\nexport function extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n\n  for (var key in definition) {\n    prototype[key] = definition[key];\n  }\n\n  return prototype;\n}","import define, { extend } from \"./define.js\";\nexport function Color() {}\nvar _darker = 0.7;\nexport { _darker as darker };\n\nvar _brighter = 1 / _darker;\n\nexport { _brighter as brighter };\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex = /^#([0-9a-f]{3,8})$/,\n    reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n    reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n    reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n    reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n    reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n    reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\ndefine(Color, color, {\n  copy: function copy(channels) {\n    return Object.assign(new this.constructor(), this, channels);\n  },\n  displayable: function displayable() {\n    return this.rgb().displayable();\n  },\n  hex: color_formatHex,\n  // Deprecated! Use color.formatHex.\n  formatHex: color_formatHex,\n  formatHsl: color_formatHsl,\n  formatRgb: color_formatRgb,\n  toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n  return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n  return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n  return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n  var m, l;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n  : l === 3 ? new Rgb(m >> 8 & 0xf | m >> 4 & 0xf0, m >> 4 & 0xf | m & 0xf0, (m & 0xf) << 4 | m & 0xf, 1) // #f00\n  : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n  : l === 4 ? rgba(m >> 12 & 0xf | m >> 8 & 0xf0, m >> 8 & 0xf | m >> 4 & 0xf0, m >> 4 & 0xf | m & 0xf0, ((m & 0xf) << 4 | m & 0xf) / 0xff) // #f000\n  : null // invalid hex\n  ) : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n  : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n  : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n  : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n  : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n  : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n  : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n  : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0) : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb();\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\nexport function rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\nexport function Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\ndefine(Rgb, rgb, extend(Color, {\n  brighter: function brighter(k) {\n    k = k == null ? _brighter : Math.pow(_brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker: function darker(k) {\n    k = k == null ? _darker : Math.pow(_darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb: function rgb() {\n    return this;\n  },\n  displayable: function displayable() {\n    return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;\n  },\n  hex: rgb_formatHex,\n  // Deprecated! Use color.formatHex.\n  formatHex: rgb_formatHex,\n  formatRgb: rgb_formatRgb,\n  toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n  return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n  var a = this.opacity;\n  a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n  return (a === 1 ? \"rgb(\" : \"rgba(\") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \" + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \" + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n  value = Math.max(0, Math.min(255, Math.round(value) || 0));\n  return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;else if (l <= 0 || l >= 1) h = s = NaN;else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl();\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;else if (g === max) h = (b - r) / s + 2;else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n\n  return new Hsl(h, s, l, o.opacity);\n}\nexport function hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n  brighter: function brighter(k) {\n    k = k == null ? _brighter : Math.pow(_brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function darker(k) {\n    k = k == null ? _darker : Math.pow(_darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function rgb() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);\n  },\n  displayable: function displayable() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;\n  },\n  formatHsl: function formatHsl() {\n    var a = this.opacity;\n    a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n    return (a === 1 ? \"hsl(\" : \"hsla(\") + (this.h || 0) + \", \" + (this.s || 0) * 100 + \"%, \" + (this.l || 0) * 100 + \"%\" + (a === 1 ? \")\" : \", \" + a + \")\");\n  }\n}));\n/* From FvD 13.37, CSS Color Module Level 3 */\n\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;\n}","export function basis(t1, v0, v1, v2, v3) {\n  var t2 = t1 * t1,\n      t3 = t2 * t1;\n  return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + (4 - 6 * t2 + 3 * t3) * v1 + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + t3 * v3) / 6;\n}\nexport default function (values) {\n  var n = values.length - 1;\n  return function (t) {\n    var i = t <= 0 ? t = 0 : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n        v1 = values[i],\n        v2 = values[i + 1],\n        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n}","export default function (x) {\n  return function () {\n    return x;\n  };\n}","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n  return function (t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function (t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nexport function hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\nexport function gamma(y) {\n  return (y = +y) === 1 ? nogamma : function (a, b) {\n    return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n  };\n}\nexport default function nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}","import { rgb as colorRgb } from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, { gamma } from \"./color.js\";\nexport default (function rgbGamma(y) {\n  var color = gamma(y);\n\n  function rgb(start, end) {\n    var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = nogamma(start.opacity, end.opacity);\n    return function (t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n  return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n  return function (colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i,\n        color;\n\n    for (i = 0; i < n; ++i) {\n      color = colorRgb(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function (t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);","import { basis } from \"./basis.js\";\nexport default function (values) {\n  var n = values.length;\n  return function (t) {\n    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n        v0 = values[(i + n - 1) % n],\n        v1 = values[i % n],\n        v2 = values[(i + 1) % n],\n        v3 = values[(i + 2) % n];\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n}","export default function (a, b) {\n  if (!b) b = [];\n  var n = a ? Math.min(b.length, a.length) : 0,\n      c = b.slice(),\n      i;\n  return function (t) {\n    for (i = 0; i < n; ++i) {\n      c[i] = a[i] * (1 - t) + b[i] * t;\n    }\n\n    return c;\n  };\n}\nexport function isNumberArray(x) {\n  return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}","import value from \"./value.js\";\nimport numberArray, { isNumberArray } from \"./numberArray.js\";\nexport default function (a, b) {\n  return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\nexport function genericArray(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) {\n    x[i] = value(a[i], b[i]);\n  }\n\n  for (; i < nb; ++i) {\n    c[i] = b[i];\n  }\n\n  return function (t) {\n    for (i = 0; i < na; ++i) {\n      c[i] = x[i](t);\n    }\n\n    return c;\n  };\n}","export default function (a, b) {\n  var d = new Date();\n  return a = +a, b = +b, function (t) {\n    return d.setTime(a * (1 - t) + b * t), d;\n  };\n}","export default function (a, b) {\n  return a = +a, b = +b, function (t) {\n    return a * (1 - t) + b * t;\n  };\n}","import value from \"./value.js\";\nexport default function (a, b) {\n  var i = {},\n      c = {},\n      k;\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = value(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function (t) {\n    for (k in i) {\n      c[k] = i[k](t);\n    }\n\n    return c;\n  };\n}","import number from \"./number.js\";\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function () {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function (t) {\n    return b(t) + \"\";\n  };\n}\n\nexport default function (a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0,\n      // scan index for next number in b\n  am,\n      // current match in a\n  bm,\n      // current match in b\n  bs,\n      // string preceding current number in b, if any\n  i = -1,\n      // index in s\n  s = [],\n      // string constants and placeholders\n  q = []; // number interpolators\n  // Coerce inputs to strings.\n\n  a = a + \"\", b = b + \"\"; // Interpolate pairs of numbers in a & b.\n\n  while ((am = reA.exec(a)) && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) {\n      // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n\n    if ((am = am[0]) === (bm = bm[0])) {\n      // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else {\n      // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({\n        i: i,\n        x: number(am, bm)\n      });\n    }\n\n    bi = reB.lastIndex;\n  } // Add remains of b.\n\n\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  } // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n\n\n  return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function (t) {\n    for (var i = 0, o; i < b; ++i) {\n      s[(o = q[i]).i] = o.x(t);\n    }\n\n    return s.join(\"\");\n  });\n}","import { color } from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport { genericArray } from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, { isNumberArray } from \"./numberArray.js\";\nexport default function (a, b) {\n  var t = typeof b,\n      c;\n  return b == null || t === \"boolean\" ? constant(b) : (t === \"number\" ? number : t === \"string\" ? (c = color(b)) ? (b = c, rgb) : string : b instanceof color ? rgb : b instanceof Date ? date : isNumberArray(b) ? numberArray : Array.isArray(b) ? genericArray : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object : number)(a, b);\n}","import \"core-js/modules/es.array.reduce.js\";\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nfunction _objectWithoutProperties(obj, keys) {\n  var target = {};\n\n  for (var i in obj) {\n    if (keys.indexOf(i) >= 0) continue;\n    if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n    target[i] = obj[i];\n  }\n\n  return target;\n}\n\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { interpolate } from 'd3-interpolate';\nimport { spring, Motion, presets } from 'react-motion';\nvar ANIMATION_PROPTYPES = PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n  stiffness: PropTypes.number,\n  nonAnimatedProps: PropTypes.arrayOf(PropTypes.string),\n  damping: PropTypes.number\n}), PropTypes.bool]);\n\n/**\n * Format the animation style object\n * @param {Object|String} animationStyle - The animation style property, either the name of a\n * presets are one of noWobble, gentle, wobbly, stiff\n */\nfunction getAnimationStyle() {\n  var animationStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : presets.noWobble;\n\n  if (typeof animationStyle === 'string') {\n    return presets[animationStyle] || presets.noWobble;\n  }\n\n  var damping = animationStyle.damping,\n      stiffness = animationStyle.stiffness;\n  return _extends({\n    damping: damping || presets.noWobble.damping,\n    stiffness: stiffness || presets.noWobble.stiffness\n  }, animationStyle);\n}\n/**\n * Extract the animated props from the entire props object.\n * @param {Object} props Props.\n * @returns {Object} Object of animated props.\n */\n\n\nexport function extractAnimatedPropValues(props) {\n  var animatedProps = props.animatedProps,\n      otherProps = _objectWithoutProperties(props, ['animatedProps']);\n\n  return animatedProps.reduce(function (result, animatedPropName) {\n    if (otherProps.hasOwnProperty(animatedPropName)) {\n      result[animatedPropName] = otherProps[animatedPropName];\n    }\n\n    return result;\n  }, {});\n}\n\nvar Animation = function (_PureComponent) {\n  _inherits(Animation, _PureComponent);\n\n  function Animation(props) {\n    _classCallCheck(this, Animation);\n\n    var _this = _possibleConstructorReturn(this, (Animation.__proto__ || Object.getPrototypeOf(Animation)).call(this, props));\n\n    _this._motionEndHandler = function () {\n      if (_this.props.onEnd) {\n        _this.props.onEnd();\n      }\n    };\n\n    _this._renderChildren = function (_ref) {\n      var i = _ref.i;\n      var children = _this.props.children;\n      var interpolator = _this._interpolator;\n      var child = React.Children.only(children);\n      var interpolatedProps = interpolator ? interpolator(i) : interpolator; // interpolator doesnt play nice with deeply nested objected\n      // so we expose an additional prop for situations like these, soit _data,\n      // which stores the full tree and can be recombined with the sanitized version\n      // after interpolation\n\n      var data = interpolatedProps && interpolatedProps.data || null;\n\n      if (data && child.props._data) {\n        data = data.map(function (row, index) {\n          var correspondingCell = child.props._data[index];\n          return _extends({}, row, {\n            parent: correspondingCell.parent,\n            children: correspondingCell.children\n          });\n        });\n      }\n\n      return React.cloneElement(child, _extends({}, child.props, interpolatedProps, {\n        data: data || child.props.data || null,\n        // enforce re-rendering\n        _animation: Math.random()\n      }));\n    };\n\n    _this._updateInterpolator(props);\n\n    return _this;\n  }\n\n  _createClass(Animation, [{\n    key: 'componentWillUpdate',\n    value: function componentWillUpdate(props) {\n      this._updateInterpolator(this.props, props);\n\n      if (props.onStart) {\n        props.onStart();\n      }\n    }\n    /**\n     * Render the child into the parent.\n     * @param {Number} i Number generated by the spring.\n     * @returns {React.Component} Rendered react element.\n     * @private\n     */\n\n  }, {\n    key: '_updateInterpolator',\n\n    /**\n     * Update the interpolator function and assign it to this._interpolator.\n     * @param {Object} oldProps Old props.\n     * @param {Object} newProps New props.\n     * @private\n     */\n    value: function _updateInterpolator(oldProps, newProps) {\n      this._interpolator = interpolate(extractAnimatedPropValues(oldProps), newProps ? extractAnimatedPropValues(newProps) : null);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var animationStyle = getAnimationStyle(this.props.animation);\n      var defaultStyle = {\n        i: 0\n      };\n      var style = {\n        i: spring(1, animationStyle)\n      }; // In order to make Motion re-run animations each time, the random key is\n      // always passed.\n      // TODO: find a better solution for the spring.\n\n      var key = Math.random();\n      return React.createElement(Motion, _extends({\n        defaultStyle: defaultStyle,\n        style: style,\n        key: key\n      }, {\n        onRest: this._motionEndHandler\n      }), this._renderChildren);\n    }\n  }]);\n\n  return Animation;\n}(PureComponent);\n\nAnimation.displayName = 'Animation';\nexport default Animation;\nexport var AnimationPropType = ANIMATION_PROPTYPES;","export default function (a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}","import ascending from \"./ascending\";\nexport default function (compare) {\n  if (compare.length === 1) compare = ascendingComparator(compare);\n  return {\n    left: function left(a, x, lo, hi) {\n      if (lo == null) lo = 0;\n      if (hi == null) hi = a.length;\n\n      while (lo < hi) {\n        var mid = lo + hi >>> 1;\n        if (compare(a[mid], x) < 0) lo = mid + 1;else hi = mid;\n      }\n\n      return lo;\n    },\n    right: function right(a, x, lo, hi) {\n      if (lo == null) lo = 0;\n      if (hi == null) hi = a.length;\n\n      while (lo < hi) {\n        var mid = lo + hi >>> 1;\n        if (compare(a[mid], x) > 0) hi = mid;else lo = mid + 1;\n      }\n\n      return lo;\n    }\n  };\n}\n\nfunction ascendingComparator(f) {\n  return function (d, x) {\n    return ascending(f(d), x);\n  };\n}","import ascending from \"./ascending\";\nimport bisector from \"./bisector\";\nvar ascendingBisect = bisector(ascending);\nexport var bisectRight = ascendingBisect.right;\nexport var bisectLeft = ascendingBisect.left;\nexport default bisectRight;","import { pair } from \"./pairs\";\nexport default function (values0, values1, reduce) {\n  var n0 = values0.length,\n      n1 = values1.length,\n      values = new Array(n0 * n1),\n      i0,\n      i1,\n      i,\n      value0;\n  if (reduce == null) reduce = pair;\n\n  for (i0 = i = 0; i0 < n0; ++i0) {\n    for (value0 = values0[i0], i1 = 0; i1 < n1; ++i1, ++i) {\n      values[i] = reduce(value0, values1[i1]);\n    }\n  }\n\n  return values;\n}","export default function (values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      min,\n      max;\n\n  if (valueof == null) {\n    while (++i < n) {\n      // Find the first comparable value.\n      if ((value = values[i]) != null && value >= value) {\n        min = max = value;\n\n        while (++i < n) {\n          // Compare the remaining values.\n          if ((value = values[i]) != null) {\n            if (min > value) min = value;\n            if (max < value) max = value;\n          }\n        }\n      }\n    }\n  } else {\n    while (++i < n) {\n      // Find the first comparable value.\n      if ((value = valueof(values[i], i, values)) != null && value >= value) {\n        min = max = value;\n\n        while (++i < n) {\n          // Compare the remaining values.\n          if ((value = valueof(values[i], i, values)) != null) {\n            if (min > value) min = value;\n            if (max < value) max = value;\n          }\n        }\n      }\n    }\n  }\n\n  return [min, max];\n}","var array = Array.prototype;\nexport var slice = array.slice;\nexport var map = array.map;","export default function (start, stop, step) {\n  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n  var i = -1,\n      n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n      range = new Array(n);\n\n  while (++i < n) {\n    range[i] = start + i * step;\n  }\n\n  return range;\n}","var e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\nexport default function (start, stop, count) {\n  var reverse,\n      i = -1,\n      n,\n      ticks,\n      step;\n  stop = +stop, start = +start, count = +count;\n  if (start === stop && count > 0) return [start];\n  if (reverse = stop < start) n = start, start = stop, stop = n;\n  if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n  if (step > 0) {\n    start = Math.ceil(start / step);\n    stop = Math.floor(stop / step);\n    ticks = new Array(n = Math.ceil(stop - start + 1));\n\n    while (++i < n) {\n      ticks[i] = (start + i) * step;\n    }\n  } else {\n    start = Math.floor(start * step);\n    stop = Math.ceil(stop * step);\n    ticks = new Array(n = Math.ceil(start - stop + 1));\n\n    while (++i < n) {\n      ticks[i] = (start - i) / step;\n    }\n  }\n\n  if (reverse) ticks.reverse();\n  return ticks;\n}\nexport function tickIncrement(start, stop, count) {\n  var step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log(step) / Math.LN10),\n      error = step / Math.pow(10, power);\n  return power >= 0 ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\nexport function tickStep(start, stop, count) {\n  var step0 = Math.abs(stop - start) / Math.max(0, count),\n      step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n      error = step0 / step1;\n  if (error >= e10) step1 *= 10;else if (error >= e5) step1 *= 5;else if (error >= e2) step1 *= 2;\n  return stop < start ? -step1 : step1;\n}","export default function (values) {\n  return Math.ceil(Math.log(values.length) / Math.LN2) + 1;\n}","export default function (values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      min;\n\n  if (valueof == null) {\n    while (++i < n) {\n      // Find the first comparable value.\n      if ((value = values[i]) != null && value >= value) {\n        min = value;\n\n        while (++i < n) {\n          // Compare the remaining values.\n          if ((value = values[i]) != null && min > value) {\n            min = value;\n          }\n        }\n      }\n    }\n  } else {\n    while (++i < n) {\n      // Find the first comparable value.\n      if ((value = valueof(values[i], i, values)) != null && value >= value) {\n        min = value;\n\n        while (++i < n) {\n          // Compare the remaining values.\n          if ((value = valueof(values[i], i, values)) != null && min > value) {\n            min = value;\n          }\n        }\n      }\n    }\n  }\n\n  return min;\n}","export default function (values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      sum = 0;\n\n  if (valueof == null) {\n    while (++i < n) {\n      if (value = +values[i]) sum += value; // Note: zero and null are equivalent.\n    }\n  } else {\n    while (++i < n) {\n      if (value = +valueof(values[i], i, values)) sum += value;\n    }\n  }\n\n  return sum;\n}","export var prefix = \"$\";\n\nfunction Map() {}\n\nMap.prototype = map.prototype = {\n  constructor: Map,\n  has: function has(key) {\n    return prefix + key in this;\n  },\n  get: function get(key) {\n    return this[prefix + key];\n  },\n  set: function set(key, value) {\n    this[prefix + key] = value;\n    return this;\n  },\n  remove: function remove(key) {\n    var property = prefix + key;\n    return property in this && delete this[property];\n  },\n  clear: function clear() {\n    for (var property in this) {\n      if (property[0] === prefix) delete this[property];\n    }\n  },\n  keys: function keys() {\n    var keys = [];\n\n    for (var property in this) {\n      if (property[0] === prefix) keys.push(property.slice(1));\n    }\n\n    return keys;\n  },\n  values: function values() {\n    var values = [];\n\n    for (var property in this) {\n      if (property[0] === prefix) values.push(this[property]);\n    }\n\n    return values;\n  },\n  entries: function entries() {\n    var entries = [];\n\n    for (var property in this) {\n      if (property[0] === prefix) entries.push({\n        key: property.slice(1),\n        value: this[property]\n      });\n    }\n\n    return entries;\n  },\n  size: function size() {\n    var size = 0;\n\n    for (var property in this) {\n      if (property[0] === prefix) ++size;\n    }\n\n    return size;\n  },\n  empty: function empty() {\n    for (var property in this) {\n      if (property[0] === prefix) return false;\n    }\n\n    return true;\n  },\n  each: function each(f) {\n    for (var property in this) {\n      if (property[0] === prefix) f(this[property], property.slice(1), this);\n    }\n  }\n};\n\nfunction map(object, f) {\n  var map = new Map(); // Copy constructor.\n\n  if (object instanceof Map) object.each(function (value, key) {\n    map.set(key, value);\n  }); // Index array by numeric index or specified key function.\n  else if (Array.isArray(object)) {\n      var i = -1,\n          n = object.length,\n          o;\n      if (f == null) while (++i < n) {\n        map.set(i, object[i]);\n      } else while (++i < n) {\n        map.set(f(o = object[i], i, object), o);\n      }\n    } // Convert object to map.\n    else if (object) for (var key in object) {\n        map.set(key, object[key]);\n      }\n  return map;\n}\n\nexport default map;","import map from \"./map\";\nexport default function () {\n  var keys = [],\n      _sortKeys = [],\n      _sortValues,\n      _rollup,\n      nest;\n\n  function apply(array, depth, createResult, setResult) {\n    if (depth >= keys.length) {\n      if (_sortValues != null) array.sort(_sortValues);\n      return _rollup != null ? _rollup(array) : array;\n    }\n\n    var i = -1,\n        n = array.length,\n        key = keys[depth++],\n        keyValue,\n        value,\n        valuesByKey = map(),\n        values,\n        result = createResult();\n\n    while (++i < n) {\n      if (values = valuesByKey.get(keyValue = key(value = array[i]) + \"\")) {\n        values.push(value);\n      } else {\n        valuesByKey.set(keyValue, [value]);\n      }\n    }\n\n    valuesByKey.each(function (values, key) {\n      setResult(result, key, apply(values, depth, createResult, setResult));\n    });\n    return result;\n  }\n\n  function _entries(map, depth) {\n    if (++depth > keys.length) return map;\n    var array,\n        sortKey = _sortKeys[depth - 1];\n    if (_rollup != null && depth >= keys.length) array = map.entries();else array = [], map.each(function (v, k) {\n      array.push({\n        key: k,\n        values: _entries(v, depth)\n      });\n    });\n    return sortKey != null ? array.sort(function (a, b) {\n      return sortKey(a.key, b.key);\n    }) : array;\n  }\n\n  return nest = {\n    object: function object(array) {\n      return apply(array, 0, createObject, setObject);\n    },\n    map: function map(array) {\n      return apply(array, 0, createMap, setMap);\n    },\n    entries: function entries(array) {\n      return _entries(apply(array, 0, createMap, setMap), 0);\n    },\n    key: function key(d) {\n      keys.push(d);\n      return nest;\n    },\n    sortKeys: function sortKeys(order) {\n      _sortKeys[keys.length - 1] = order;\n      return nest;\n    },\n    sortValues: function sortValues(order) {\n      _sortValues = order;\n      return nest;\n    },\n    rollup: function rollup(f) {\n      _rollup = f;\n      return nest;\n    }\n  };\n}\n\nfunction createObject() {\n  return {};\n}\n\nfunction setObject(object, key, value) {\n  object[key] = value;\n}\n\nfunction createMap() {\n  return map();\n}\n\nfunction setMap(map, key, value) {\n  map.set(key, value);\n}","import { default as map, prefix } from \"./map\";\n\nfunction Set() {}\n\nvar proto = map.prototype;\nSet.prototype = set.prototype = {\n  constructor: Set,\n  has: proto.has,\n  add: function add(value) {\n    value += \"\";\n    this[prefix + value] = value;\n    return this;\n  },\n  remove: proto.remove,\n  clear: proto.clear,\n  values: proto.keys,\n  size: proto.size,\n  empty: proto.empty,\n  each: proto.each\n};\n\nfunction set(object, f) {\n  var set = new Set(); // Copy constructor.\n\n  if (object instanceof Set) object.each(function (value) {\n    set.add(value);\n  }); // Otherwise, assume it’s an array.\n  else if (object) {\n      var i = -1,\n          n = object.length;\n      if (f == null) while (++i < n) {\n        set.add(object[i]);\n      } else while (++i < n) {\n        set.add(f(object[i], i, object));\n      }\n    }\n  return set;\n}\n\nexport default set;","var array = Array.prototype;\nexport var map = array.map;\nexport var slice = array.slice;","import { map } from \"d3-collection\";\nimport { slice } from \"./array\";\nexport var implicit = {\n  name: \"implicit\"\n};\nexport default function ordinal(range) {\n  var index = map(),\n      domain = [],\n      unknown = implicit;\n  range = range == null ? [] : slice.call(range);\n\n  function scale(d) {\n    var key = d + \"\",\n        i = index.get(key);\n\n    if (!i) {\n      if (unknown !== implicit) return unknown;\n      index.set(key, i = domain.push(d));\n    }\n\n    return range[(i - 1) % range.length];\n  }\n\n  scale.domain = function (_) {\n    if (!arguments.length) return domain.slice();\n    domain = [], index = map();\n    var i = -1,\n        n = _.length,\n        d,\n        key;\n\n    while (++i < n) {\n      if (!index.has(key = (d = _[i]) + \"\")) index.set(key, domain.push(d));\n    }\n\n    return scale;\n  };\n\n  scale.range = function (_) {\n    return arguments.length ? (range = slice.call(_), scale) : range.slice();\n  };\n\n  scale.unknown = function (_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function () {\n    return ordinal().domain(domain).range(range).unknown(unknown);\n  };\n\n  return scale;\n}","export default function (a, b) {\n  return a = +a, b = +b, function (t) {\n    return Math.round(a * (1 - t) + b * t);\n  };\n}","export default function (x) {\n  return function () {\n    return x;\n  };\n}","export default function (x) {\n  return +x;\n}","import { bisect } from \"d3-array\";\nimport { interpolate as interpolateValue, interpolateRound } from \"d3-interpolate\";\nimport { map, slice } from \"./array\";\nimport constant from \"./constant\";\nimport number from \"./number\";\nvar unit = [0, 1];\nexport function deinterpolateLinear(a, b) {\n  return (b -= a = +a) ? function (x) {\n    return (x - a) / b;\n  } : constant(b);\n}\n\nfunction deinterpolateClamp(deinterpolate) {\n  return function (a, b) {\n    var d = deinterpolate(a = +a, b = +b);\n    return function (x) {\n      return x <= a ? 0 : x >= b ? 1 : d(x);\n    };\n  };\n}\n\nfunction reinterpolateClamp(reinterpolate) {\n  return function (a, b) {\n    var r = reinterpolate(a = +a, b = +b);\n    return function (t) {\n      return t <= 0 ? a : t >= 1 ? b : r(t);\n    };\n  };\n}\n\nfunction bimap(domain, range, deinterpolate, reinterpolate) {\n  var d0 = domain[0],\n      d1 = domain[1],\n      r0 = range[0],\n      r1 = range[1];\n  if (d1 < d0) d0 = deinterpolate(d1, d0), r0 = reinterpolate(r1, r0);else d0 = deinterpolate(d0, d1), r0 = reinterpolate(r0, r1);\n  return function (x) {\n    return r0(d0(x));\n  };\n}\n\nfunction polymap(domain, range, deinterpolate, reinterpolate) {\n  var j = Math.min(domain.length, range.length) - 1,\n      d = new Array(j),\n      r = new Array(j),\n      i = -1; // Reverse descending domains.\n\n  if (domain[j] < domain[0]) {\n    domain = domain.slice().reverse();\n    range = range.slice().reverse();\n  }\n\n  while (++i < j) {\n    d[i] = deinterpolate(domain[i], domain[i + 1]);\n    r[i] = reinterpolate(range[i], range[i + 1]);\n  }\n\n  return function (x) {\n    var i = bisect(domain, x, 1, j) - 1;\n    return r[i](d[i](x));\n  };\n}\n\nexport function copy(source, target) {\n  return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp());\n} // deinterpolate(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// reinterpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding domain value x in [a,b].\n\nexport default function continuous(deinterpolate, reinterpolate) {\n  var domain = unit,\n      range = unit,\n      interpolate = interpolateValue,\n      clamp = false,\n      piecewise,\n      output,\n      input;\n\n  function rescale() {\n    piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n    output = input = null;\n    return scale;\n  }\n\n  function scale(x) {\n    return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);\n  }\n\n  scale.invert = function (y) {\n    return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);\n  };\n\n  scale.domain = function (_) {\n    return arguments.length ? (domain = map.call(_, number), rescale()) : domain.slice();\n  };\n\n  scale.range = function (_) {\n    return arguments.length ? (range = slice.call(_), rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function (_) {\n    return range = slice.call(_), interpolate = interpolateRound, rescale();\n  };\n\n  scale.clamp = function (_) {\n    return arguments.length ? (clamp = !!_, rescale()) : clamp;\n  };\n\n  scale.interpolate = function (_) {\n    return arguments.length ? (interpolate = _, rescale()) : interpolate;\n  };\n\n  return rescale();\n}","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\nexport default function formatSpecifier(specifier) {\n  if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n  var match;\n  return new FormatSpecifier({\n    fill: match[1],\n    align: match[2],\n    sign: match[3],\n    symbol: match[4],\n    zero: match[5],\n    width: match[6],\n    comma: match[7],\n    precision: match[8] && match[8].slice(1),\n    trim: match[9],\n    type: match[10]\n  });\n}\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n  this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n  this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n  this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n  this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n  this.zero = !!specifier.zero;\n  this.width = specifier.width === undefined ? undefined : +specifier.width;\n  this.comma = !!specifier.comma;\n  this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n  this.trim = !!specifier.trim;\n  this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function () {\n  return this.fill + this.align + this.sign + this.symbol + (this.zero ? \"0\" : \"\") + (this.width === undefined ? \"\" : Math.max(1, this.width | 0)) + (this.comma ? \",\" : \"\") + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0)) + (this.trim ? \"~\" : \"\") + this.type;\n};","// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimal(1.23) returns [\"123\", 0].\nexport default function (x, p) {\n  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\n  var i,\n      coefficient = x.slice(0, i); // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n  // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\n  return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];\n}","import formatDecimal from \"./formatDecimal.js\";\nexport var prefixExponent;\nexport default function (x, p) {\n  var d = formatDecimal(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1],\n      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n      n = coefficient.length;\n  return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join(\"0\") : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i) : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimal(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}","import formatLocale from \"./locale.js\";\nvar locale;\nexport var format;\nexport var formatPrefix;\ndefaultLocale({\n  decimal: \".\",\n  thousands: \",\",\n  grouping: [3],\n  currency: [\"$\", \"\"],\n  minus: \"-\"\n});\nexport default function defaultLocale(definition) {\n  locale = formatLocale(definition);\n  format = locale.format;\n  formatPrefix = locale.formatPrefix;\n  return locale;\n}","import formatDecimal from \"./formatDecimal.js\";\nexport default function (x) {\n  return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN;\n}","import formatDecimal from \"./formatDecimal.js\";\nexport default function (x, p) {\n  var d = formatDecimal(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1];\n  return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}","import formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\nexport default {\n  \"%\": function _(x, p) {\n    return (x * 100).toFixed(p);\n  },\n  \"b\": function b(x) {\n    return Math.round(x).toString(2);\n  },\n  \"c\": function c(x) {\n    return x + \"\";\n  },\n  \"d\": function d(x) {\n    return Math.round(x).toString(10);\n  },\n  \"e\": function e(x, p) {\n    return x.toExponential(p);\n  },\n  \"f\": function f(x, p) {\n    return x.toFixed(p);\n  },\n  \"g\": function g(x, p) {\n    return x.toPrecision(p);\n  },\n  \"o\": function o(x) {\n    return Math.round(x).toString(8);\n  },\n  \"p\": function p(x, _p) {\n    return formatRounded(x * 100, _p);\n  },\n  \"r\": formatRounded,\n  \"s\": formatPrefixAuto,\n  \"X\": function X(x) {\n    return Math.round(x).toString(16).toUpperCase();\n  },\n  \"x\": function x(_x) {\n    return Math.round(_x).toString(16);\n  }\n};","export default function (x) {\n  return x;\n}","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport { prefixExponent } from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\nvar map = Array.prototype.map,\n    prefixes = [\"y\", \"z\", \"a\", \"f\", \"p\", \"n\", \"µ\", \"m\", \"\", \"k\", \"M\", \"G\", \"T\", \"P\", \"E\", \"Z\", \"Y\"];\nexport default function (locale) {\n  var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n      currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n      currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n      decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n      numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n      percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n      minus = locale.minus === undefined ? \"-\" : locale.minus + \"\",\n      nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n  function newFormat(specifier) {\n    specifier = formatSpecifier(specifier);\n    var fill = specifier.fill,\n        align = specifier.align,\n        sign = specifier.sign,\n        symbol = specifier.symbol,\n        zero = specifier.zero,\n        width = specifier.width,\n        comma = specifier.comma,\n        precision = specifier.precision,\n        trim = specifier.trim,\n        type = specifier.type; // The \"n\" type is an alias for \",g\".\n\n    if (type === \"n\") comma = true, type = \"g\"; // The \"\" type, and any invalid type, is an alias for \".12~g\".\n    else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\"; // If zero fill is specified, padding goes after sign and before digits.\n\n    if (zero || fill === \"0\" && align === \"=\") zero = true, fill = \"0\", align = \"=\"; // Compute the prefix and suffix.\n    // For SI-prefix, the suffix is lazily computed.\n\n    var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n        suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\"; // What format function should we use?\n    // Is this an integer type?\n    // Can this type generate exponential notation?\n\n    var formatType = formatTypes[type],\n        maybeSuffix = /[defgprs%]/.test(type); // Set the default precision if not specified,\n    // or clamp the specified precision to the supported range.\n    // For significant precision, it must be in [1, 21].\n    // For fixed precision, it must be in [0, 20].\n\n    precision = precision === undefined ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));\n\n    function format(value) {\n      var valuePrefix = prefix,\n          valueSuffix = suffix,\n          i,\n          n,\n          c;\n\n      if (type === \"c\") {\n        valueSuffix = formatType(value) + valueSuffix;\n        value = \"\";\n      } else {\n        value = +value; // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n\n        var valueNegative = value < 0 || 1 / value < 0; // Perform the initial formatting.\n\n        value = isNaN(value) ? nan : formatType(Math.abs(value), precision); // Trim insignificant zeros.\n\n        if (trim) value = formatTrim(value); // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n\n        if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false; // Compute the prefix and suffix.\n\n        valuePrefix = (valueNegative ? sign === \"(\" ? sign : minus : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n        valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\"); // Break the formatted value into the integer “value” part that can be\n        // grouped, and fractional or exponential “suffix” part that is not.\n\n        if (maybeSuffix) {\n          i = -1, n = value.length;\n\n          while (++i < n) {\n            if (c = value.charCodeAt(i), 48 > c || c > 57) {\n              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n              value = value.slice(0, i);\n              break;\n            }\n          }\n        }\n      } // If the fill character is not \"0\", grouping is applied before padding.\n\n\n      if (comma && !zero) value = group(value, Infinity); // Compute the padding.\n\n      var length = valuePrefix.length + value.length + valueSuffix.length,\n          padding = length < width ? new Array(width - length + 1).join(fill) : \"\"; // If the fill character is \"0\", grouping is applied after padding.\n\n      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\"; // Reconstruct the final output based on the desired alignment.\n\n      switch (align) {\n        case \"<\":\n          value = valuePrefix + value + valueSuffix + padding;\n          break;\n\n        case \"=\":\n          value = valuePrefix + padding + value + valueSuffix;\n          break;\n\n        case \"^\":\n          value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);\n          break;\n\n        default:\n          value = padding + valuePrefix + value + valueSuffix;\n          break;\n      }\n\n      return numerals(value);\n    }\n\n    format.toString = function () {\n      return specifier + \"\";\n    };\n\n    return format;\n  }\n\n  function formatPrefix(specifier, value) {\n    var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n        e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n        k = Math.pow(10, -e),\n        prefix = prefixes[8 + e / 3];\n    return function (value) {\n      return f(k * value) + prefix;\n    };\n  }\n\n  return {\n    format: newFormat,\n    formatPrefix: formatPrefix\n  };\n}","export default function (grouping, thousands) {\n  return function (value, width) {\n    var i = value.length,\n        t = [],\n        j = 0,\n        g = grouping[0],\n        length = 0;\n\n    while (i > 0 && g > 0) {\n      if (length + g + 1 > width) g = Math.max(1, width - length);\n      t.push(value.substring(i -= g, i + g));\n      if ((length += g + 1) > width) break;\n      g = grouping[j = (j + 1) % grouping.length];\n    }\n\n    return t.reverse().join(thousands);\n  };\n}","export default function (numerals) {\n  return function (value) {\n    return value.replace(/[0-9]/g, function (i) {\n      return numerals[+i];\n    });\n  };\n}","// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function (s) {\n  out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n    switch (s[i]) {\n      case \".\":\n        i0 = i1 = i;\n        break;\n\n      case \"0\":\n        if (i0 === 0) i0 = i;\n        i1 = i;\n        break;\n\n      default:\n        if (!+s[i]) break out;\n        if (i0 > 0) i0 = 0;\n        break;\n    }\n  }\n\n  return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}","import exponent from \"./exponent.js\";\nexport default function (step, max) {\n  step = Math.abs(step), max = Math.abs(max) - step;\n  return Math.max(0, exponent(max) - exponent(step)) + 1;\n}","import { tickStep } from \"d3-array\";\nimport { format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound } from \"d3-format\";\nexport default function (domain, count, specifier) {\n  var start = domain[0],\n      stop = domain[domain.length - 1],\n      step = tickStep(start, stop, count == null ? 10 : count),\n      precision;\n  specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n\n  switch (specifier.type) {\n    case \"s\":\n      {\n        var value = Math.max(Math.abs(start), Math.abs(stop));\n        if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n        return formatPrefix(specifier, value);\n      }\n\n    case \"\":\n    case \"e\":\n    case \"g\":\n    case \"p\":\n    case \"r\":\n      {\n        if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n        break;\n      }\n\n    case \"f\":\n    case \"%\":\n      {\n        if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n        break;\n      }\n  }\n\n  return format(specifier);\n}","import exponent from \"./exponent.js\";\nexport default function (step, value) {\n  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}","import exponent from \"./exponent.js\";\nexport default function (step) {\n  return Math.max(0, -exponent(Math.abs(step)));\n}","import { ticks, tickIncrement } from \"d3-array\";\nimport { interpolateNumber as reinterpolate } from \"d3-interpolate\";\nimport { default as continuous, copy, deinterpolateLinear as deinterpolate } from \"./continuous\";\nimport tickFormat from \"./tickFormat\";\nexport function linearish(scale) {\n  var domain = scale.domain;\n\n  scale.ticks = function (count) {\n    var d = domain();\n    return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n  };\n\n  scale.tickFormat = function (count, specifier) {\n    return tickFormat(domain(), count, specifier);\n  };\n\n  scale.nice = function (count) {\n    if (count == null) count = 10;\n    var d = domain(),\n        i0 = 0,\n        i1 = d.length - 1,\n        start = d[i0],\n        stop = d[i1],\n        step;\n\n    if (stop < start) {\n      step = start, start = stop, stop = step;\n      step = i0, i0 = i1, i1 = step;\n    }\n\n    step = tickIncrement(start, stop, count);\n\n    if (step > 0) {\n      start = Math.floor(start / step) * step;\n      stop = Math.ceil(stop / step) * step;\n      step = tickIncrement(start, stop, count);\n    } else if (step < 0) {\n      start = Math.ceil(start * step) / step;\n      stop = Math.floor(stop * step) / step;\n      step = tickIncrement(start, stop, count);\n    }\n\n    if (step > 0) {\n      d[i0] = Math.floor(start / step) * step;\n      d[i1] = Math.ceil(stop / step) * step;\n      domain(d);\n    } else if (step < 0) {\n      d[i0] = Math.ceil(start * step) / step;\n      d[i1] = Math.floor(stop * step) / step;\n      domain(d);\n    }\n\n    return scale;\n  };\n\n  return scale;\n}\nexport default function linear() {\n  var scale = continuous(deinterpolate, reinterpolate);\n\n  scale.copy = function () {\n    return copy(scale, linear());\n  };\n\n  return linearish(scale);\n}","export default function (domain, interval) {\n  domain = domain.slice();\n  var i0 = 0,\n      i1 = domain.length - 1,\n      x0 = domain[i0],\n      x1 = domain[i1],\n      t;\n\n  if (x1 < x0) {\n    t = i0, i0 = i1, i1 = t;\n    t = x0, x0 = x1, x1 = t;\n  }\n\n  domain[i0] = interval.floor(x0);\n  domain[i1] = interval.ceil(x1);\n  return domain;\n}","import { ticks } from \"d3-array\";\nimport { format } from \"d3-format\";\nimport constant from \"./constant\";\nimport nice from \"./nice\";\nimport { default as continuous, copy } from \"./continuous\";\n\nfunction deinterpolate(a, b) {\n  return (b = Math.log(b / a)) ? function (x) {\n    return Math.log(x / a) / b;\n  } : constant(b);\n}\n\nfunction reinterpolate(a, b) {\n  return a < 0 ? function (t) {\n    return -Math.pow(-b, t) * Math.pow(-a, 1 - t);\n  } : function (t) {\n    return Math.pow(b, t) * Math.pow(a, 1 - t);\n  };\n}\n\nfunction pow10(x) {\n  return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n  return base === 10 ? pow10 : base === Math.E ? Math.exp : function (x) {\n    return Math.pow(base, x);\n  };\n}\n\nfunction logp(base) {\n  return base === Math.E ? Math.log : base === 10 && Math.log10 || base === 2 && Math.log2 || (base = Math.log(base), function (x) {\n    return Math.log(x) / base;\n  });\n}\n\nfunction reflect(f) {\n  return function (x) {\n    return -f(-x);\n  };\n}\n\nexport default function log() {\n  var scale = continuous(deinterpolate, reinterpolate).domain([1, 10]),\n      domain = scale.domain,\n      base = 10,\n      logs = logp(10),\n      pows = powp(10);\n\n  function rescale() {\n    logs = logp(base), pows = powp(base);\n    if (domain()[0] < 0) logs = reflect(logs), pows = reflect(pows);\n    return scale;\n  }\n\n  scale.base = function (_) {\n    return arguments.length ? (base = +_, rescale()) : base;\n  };\n\n  scale.domain = function (_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.ticks = function (count) {\n    var d = domain(),\n        u = d[0],\n        v = d[d.length - 1],\n        r;\n    if (r = v < u) i = u, u = v, v = i;\n    var i = logs(u),\n        j = logs(v),\n        p,\n        k,\n        t,\n        n = count == null ? 10 : +count,\n        z = [];\n\n    if (!(base % 1) && j - i < n) {\n      i = Math.round(i) - 1, j = Math.round(j) + 1;\n      if (u > 0) for (; i < j; ++i) {\n        for (k = 1, p = pows(i); k < base; ++k) {\n          t = p * k;\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      } else for (; i < j; ++i) {\n        for (k = base - 1, p = pows(i); k >= 1; --k) {\n          t = p * k;\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      }\n    } else {\n      z = ticks(i, j, Math.min(j - i, n)).map(pows);\n    }\n\n    return r ? z.reverse() : z;\n  };\n\n  scale.tickFormat = function (count, specifier) {\n    if (specifier == null) specifier = base === 10 ? \".0e\" : \",\";\n    if (typeof specifier !== \"function\") specifier = format(specifier);\n    if (count === Infinity) return specifier;\n    if (count == null) count = 10;\n    var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n\n    return function (d) {\n      var i = d / pows(Math.round(logs(d)));\n      if (i * base < base - 0.5) i *= base;\n      return i <= k ? specifier(d) : \"\";\n    };\n  };\n\n  scale.nice = function () {\n    return domain(nice(domain(), {\n      floor: function floor(x) {\n        return pows(Math.floor(logs(x)));\n      },\n      ceil: function ceil(x) {\n        return pows(Math.ceil(logs(x)));\n      }\n    }));\n  };\n\n  scale.copy = function () {\n    return copy(scale, log().base(base));\n  };\n\n  return scale;\n}","import constant from \"./constant\";\nimport { linearish } from \"./linear\";\nimport { default as continuous, copy } from \"./continuous\";\n\nfunction raise(x, exponent) {\n  return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n}\n\nexport default function pow() {\n  var exponent = 1,\n      scale = continuous(deinterpolate, reinterpolate),\n      domain = scale.domain;\n\n  function deinterpolate(a, b) {\n    return (b = raise(b, exponent) - (a = raise(a, exponent))) ? function (x) {\n      return (raise(x, exponent) - a) / b;\n    } : constant(b);\n  }\n\n  function reinterpolate(a, b) {\n    b = raise(b, exponent) - (a = raise(a, exponent));\n    return function (t) {\n      return raise(a + b * t, 1 / exponent);\n    };\n  }\n\n  scale.exponent = function (_) {\n    return arguments.length ? (exponent = +_, domain(domain())) : exponent;\n  };\n\n  scale.copy = function () {\n    return copy(scale, pow().exponent(exponent));\n  };\n\n  return linearish(scale);\n}\nexport function sqrt() {\n  return pow().exponent(0.5);\n}","var t0 = new Date(),\n    t1 = new Date();\nexport default function newInterval(floori, offseti, count, field) {\n  function interval(date) {\n    return floori(date = arguments.length === 0 ? new Date() : new Date(+date)), date;\n  }\n\n  interval.floor = function (date) {\n    return floori(date = new Date(+date)), date;\n  };\n\n  interval.ceil = function (date) {\n    return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n  };\n\n  interval.round = function (date) {\n    var d0 = interval(date),\n        d1 = interval.ceil(date);\n    return date - d0 < d1 - date ? d0 : d1;\n  };\n\n  interval.offset = function (date, step) {\n    return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n  };\n\n  interval.range = function (start, stop, step) {\n    var range = [],\n        previous;\n    start = interval.ceil(start);\n    step = step == null ? 1 : Math.floor(step);\n    if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n\n    do {\n      range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n    } while (previous < start && start < stop);\n\n    return range;\n  };\n\n  interval.filter = function (test) {\n    return newInterval(function (date) {\n      if (date >= date) while (floori(date), !test(date)) {\n        date.setTime(date - 1);\n      }\n    }, function (date, step) {\n      if (date >= date) {\n        if (step < 0) while (++step <= 0) {\n          while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n\n        } else while (--step >= 0) {\n          while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n\n        }\n      }\n    });\n  };\n\n  if (count) {\n    interval.count = function (start, end) {\n      t0.setTime(+start), t1.setTime(+end);\n      floori(t0), floori(t1);\n      return Math.floor(count(t0, t1));\n    };\n\n    interval.every = function (step) {\n      step = Math.floor(step);\n      return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? function (d) {\n        return field(d) % step === 0;\n      } : function (d) {\n        return interval.count(0, d) % step === 0;\n      });\n    };\n  }\n\n  return interval;\n}","import interval from \"./interval.js\";\nvar year = interval(function (date) {\n  date.setMonth(0, 1);\n  date.setHours(0, 0, 0, 0);\n}, function (date, step) {\n  date.setFullYear(date.getFullYear() + step);\n}, function (start, end) {\n  return end.getFullYear() - start.getFullYear();\n}, function (date) {\n  return date.getFullYear();\n}); // An optimized implementation for this simple case.\n\nyear.every = function (k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function (date) {\n    date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n    date.setMonth(0, 1);\n    date.setHours(0, 0, 0, 0);\n  }, function (date, step) {\n    date.setFullYear(date.getFullYear() + step * k);\n  });\n};\n\nexport default year;\nexport var years = year.range;","import interval from \"./interval.js\";\nvar month = interval(function (date) {\n  date.setDate(1);\n  date.setHours(0, 0, 0, 0);\n}, function (date, step) {\n  date.setMonth(date.getMonth() + step);\n}, function (start, end) {\n  return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function (date) {\n  return date.getMonth();\n});\nexport default month;\nexport var months = month.range;","import interval from \"./interval.js\";\nimport { durationMinute, durationWeek } from \"./duration.js\";\n\nfunction weekday(i) {\n  return interval(function (date) {\n    date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n    date.setHours(0, 0, 0, 0);\n  }, function (date, step) {\n    date.setDate(date.getDate() + step * 7);\n  }, function (start, end) {\n    return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n  });\n}\n\nexport var sunday = weekday(0);\nexport var monday = weekday(1);\nexport var tuesday = weekday(2);\nexport var wednesday = weekday(3);\nexport var thursday = weekday(4);\nexport var friday = weekday(5);\nexport var saturday = weekday(6);\nexport var sundays = sunday.range;\nexport var mondays = monday.range;\nexport var tuesdays = tuesday.range;\nexport var wednesdays = wednesday.range;\nexport var thursdays = thursday.range;\nexport var fridays = friday.range;\nexport var saturdays = saturday.range;","export var durationSecond = 1e3;\nexport var durationMinute = 6e4;\nexport var durationHour = 36e5;\nexport var durationDay = 864e5;\nexport var durationWeek = 6048e5;","import interval from \"./interval.js\";\nimport { durationDay, durationMinute } from \"./duration.js\";\nvar day = interval(function (date) {\n  date.setHours(0, 0, 0, 0);\n}, function (date, step) {\n  date.setDate(date.getDate() + step);\n}, function (start, end) {\n  return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;\n}, function (date) {\n  return date.getDate() - 1;\n});\nexport default day;\nexport var days = day.range;","import interval from \"./interval.js\";\nimport { durationHour, durationMinute, durationSecond } from \"./duration.js\";\nvar hour = interval(function (date) {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, function (date, step) {\n  date.setTime(+date + step * durationHour);\n}, function (start, end) {\n  return (end - start) / durationHour;\n}, function (date) {\n  return date.getHours();\n});\nexport default hour;\nexport var hours = hour.range;","import interval from \"./interval.js\";\nimport { durationMinute, durationSecond } from \"./duration.js\";\nvar minute = interval(function (date) {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, function (date, step) {\n  date.setTime(+date + step * durationMinute);\n}, function (start, end) {\n  return (end - start) / durationMinute;\n}, function (date) {\n  return date.getMinutes();\n});\nexport default minute;\nexport var minutes = minute.range;","import interval from \"./interval.js\";\nimport { durationSecond } from \"./duration.js\";\nvar second = interval(function (date) {\n  date.setTime(date - date.getMilliseconds());\n}, function (date, step) {\n  date.setTime(+date + step * durationSecond);\n}, function (start, end) {\n  return (end - start) / durationSecond;\n}, function (date) {\n  return date.getUTCSeconds();\n});\nexport default second;\nexport var seconds = second.range;","import interval from \"./interval.js\";\nvar millisecond = interval(function () {// noop\n}, function (date, step) {\n  date.setTime(+date + step);\n}, function (start, end) {\n  return end - start;\n}); // An optimized implementation for this simple case.\n\nmillisecond.every = function (k) {\n  k = Math.floor(k);\n  if (!isFinite(k) || !(k > 0)) return null;\n  if (!(k > 1)) return millisecond;\n  return interval(function (date) {\n    date.setTime(Math.floor(date / k) * k);\n  }, function (date, step) {\n    date.setTime(+date + step * k);\n  }, function (start, end) {\n    return (end - start) / k;\n  });\n};\n\nexport default millisecond;\nexport var milliseconds = millisecond.range;","import interval from \"./interval.js\";\nimport { durationWeek } from \"./duration.js\";\n\nfunction utcWeekday(i) {\n  return interval(function (date) {\n    date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function (date, step) {\n    date.setUTCDate(date.getUTCDate() + step * 7);\n  }, function (start, end) {\n    return (end - start) / durationWeek;\n  });\n}\n\nexport var utcSunday = utcWeekday(0);\nexport var utcMonday = utcWeekday(1);\nexport var utcTuesday = utcWeekday(2);\nexport var utcWednesday = utcWeekday(3);\nexport var utcThursday = utcWeekday(4);\nexport var utcFriday = utcWeekday(5);\nexport var utcSaturday = utcWeekday(6);\nexport var utcSundays = utcSunday.range;\nexport var utcMondays = utcMonday.range;\nexport var utcTuesdays = utcTuesday.range;\nexport var utcWednesdays = utcWednesday.range;\nexport var utcThursdays = utcThursday.range;\nexport var utcFridays = utcFriday.range;\nexport var utcSaturdays = utcSaturday.range;","import interval from \"./interval.js\";\nimport { durationDay } from \"./duration.js\";\nvar utcDay = interval(function (date) {\n  date.setUTCHours(0, 0, 0, 0);\n}, function (date, step) {\n  date.setUTCDate(date.getUTCDate() + step);\n}, function (start, end) {\n  return (end - start) / durationDay;\n}, function (date) {\n  return date.getUTCDate() - 1;\n});\nexport default utcDay;\nexport var utcDays = utcDay.range;","import interval from \"./interval.js\";\nvar utcYear = interval(function (date) {\n  date.setUTCMonth(0, 1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function (date, step) {\n  date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function (start, end) {\n  return end.getUTCFullYear() - start.getUTCFullYear();\n}, function (date) {\n  return date.getUTCFullYear();\n}); // An optimized implementation for this simple case.\n\nutcYear.every = function (k) {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function (date) {\n    date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n    date.setUTCMonth(0, 1);\n    date.setUTCHours(0, 0, 0, 0);\n  }, function (date, step) {\n    date.setUTCFullYear(date.getUTCFullYear() + step * k);\n  });\n};\n\nexport default utcYear;\nexport var utcYears = utcYear.range;","import { timeDay, timeSunday, timeMonday, timeThursday, timeYear, utcDay, utcSunday, utcMonday, utcThursday, utcYear } from \"d3-time\";\n\nfunction localDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n    date.setFullYear(d.y);\n    return date;\n  }\n\n  return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n    date.setUTCFullYear(d.y);\n    return date;\n  }\n\n  return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n  return {\n    y: y,\n    m: m,\n    d: d,\n    H: 0,\n    M: 0,\n    S: 0,\n    L: 0\n  };\n}\n\nexport default function formatLocale(locale) {\n  var locale_dateTime = locale.dateTime,\n      locale_date = locale.date,\n      locale_time = locale.time,\n      locale_periods = locale.periods,\n      locale_weekdays = locale.days,\n      locale_shortWeekdays = locale.shortDays,\n      locale_months = locale.months,\n      locale_shortMonths = locale.shortMonths;\n  var periodRe = formatRe(locale_periods),\n      periodLookup = formatLookup(locale_periods),\n      weekdayRe = formatRe(locale_weekdays),\n      weekdayLookup = formatLookup(locale_weekdays),\n      shortWeekdayRe = formatRe(locale_shortWeekdays),\n      shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n      monthRe = formatRe(locale_months),\n      monthLookup = formatLookup(locale_months),\n      shortMonthRe = formatRe(locale_shortMonths),\n      shortMonthLookup = formatLookup(locale_shortMonths);\n  var formats = {\n    \"a\": formatShortWeekday,\n    \"A\": formatWeekday,\n    \"b\": formatShortMonth,\n    \"B\": formatMonth,\n    \"c\": null,\n    \"d\": formatDayOfMonth,\n    \"e\": formatDayOfMonth,\n    \"f\": formatMicroseconds,\n    \"H\": formatHour24,\n    \"I\": formatHour12,\n    \"j\": formatDayOfYear,\n    \"L\": formatMilliseconds,\n    \"m\": formatMonthNumber,\n    \"M\": formatMinutes,\n    \"p\": formatPeriod,\n    \"q\": formatQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatSeconds,\n    \"u\": formatWeekdayNumberMonday,\n    \"U\": formatWeekNumberSunday,\n    \"V\": formatWeekNumberISO,\n    \"w\": formatWeekdayNumberSunday,\n    \"W\": formatWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatYear,\n    \"Y\": formatFullYear,\n    \"Z\": formatZone,\n    \"%\": formatLiteralPercent\n  };\n  var utcFormats = {\n    \"a\": formatUTCShortWeekday,\n    \"A\": formatUTCWeekday,\n    \"b\": formatUTCShortMonth,\n    \"B\": formatUTCMonth,\n    \"c\": null,\n    \"d\": formatUTCDayOfMonth,\n    \"e\": formatUTCDayOfMonth,\n    \"f\": formatUTCMicroseconds,\n    \"H\": formatUTCHour24,\n    \"I\": formatUTCHour12,\n    \"j\": formatUTCDayOfYear,\n    \"L\": formatUTCMilliseconds,\n    \"m\": formatUTCMonthNumber,\n    \"M\": formatUTCMinutes,\n    \"p\": formatUTCPeriod,\n    \"q\": formatUTCQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatUTCSeconds,\n    \"u\": formatUTCWeekdayNumberMonday,\n    \"U\": formatUTCWeekNumberSunday,\n    \"V\": formatUTCWeekNumberISO,\n    \"w\": formatUTCWeekdayNumberSunday,\n    \"W\": formatUTCWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatUTCYear,\n    \"Y\": formatUTCFullYear,\n    \"Z\": formatUTCZone,\n    \"%\": formatLiteralPercent\n  };\n  var parses = {\n    \"a\": parseShortWeekday,\n    \"A\": parseWeekday,\n    \"b\": parseShortMonth,\n    \"B\": parseMonth,\n    \"c\": parseLocaleDateTime,\n    \"d\": parseDayOfMonth,\n    \"e\": parseDayOfMonth,\n    \"f\": parseMicroseconds,\n    \"H\": parseHour24,\n    \"I\": parseHour24,\n    \"j\": parseDayOfYear,\n    \"L\": parseMilliseconds,\n    \"m\": parseMonthNumber,\n    \"M\": parseMinutes,\n    \"p\": parsePeriod,\n    \"q\": parseQuarter,\n    \"Q\": parseUnixTimestamp,\n    \"s\": parseUnixTimestampSeconds,\n    \"S\": parseSeconds,\n    \"u\": parseWeekdayNumberMonday,\n    \"U\": parseWeekNumberSunday,\n    \"V\": parseWeekNumberISO,\n    \"w\": parseWeekdayNumberSunday,\n    \"W\": parseWeekNumberMonday,\n    \"x\": parseLocaleDate,\n    \"X\": parseLocaleTime,\n    \"y\": parseYear,\n    \"Y\": parseFullYear,\n    \"Z\": parseZone,\n    \"%\": parseLiteralPercent\n  }; // These recursive directive definitions must be deferred.\n\n  formats.x = newFormat(locale_date, formats);\n  formats.X = newFormat(locale_time, formats);\n  formats.c = newFormat(locale_dateTime, formats);\n  utcFormats.x = newFormat(locale_date, utcFormats);\n  utcFormats.X = newFormat(locale_time, utcFormats);\n  utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n  function newFormat(specifier, formats) {\n    return function (date) {\n      var string = [],\n          i = -1,\n          j = 0,\n          n = specifier.length,\n          c,\n          pad,\n          format;\n      if (!(date instanceof Date)) date = new Date(+date);\n\n      while (++i < n) {\n        if (specifier.charCodeAt(i) === 37) {\n          string.push(specifier.slice(j, i));\n          if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);else pad = c === \"e\" ? \" \" : \"0\";\n          if (format = formats[c]) c = format(date, pad);\n          string.push(c);\n          j = i + 1;\n        }\n      }\n\n      string.push(specifier.slice(j, i));\n      return string.join(\"\");\n    };\n  }\n\n  function newParse(specifier, Z) {\n    return function (string) {\n      var d = newDate(1900, undefined, 1),\n          i = parseSpecifier(d, specifier, string += \"\", 0),\n          week,\n          day;\n      if (i != string.length) return null; // If a UNIX timestamp is specified, return it.\n\n      if (\"Q\" in d) return new Date(d.Q);\n      if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0)); // If this is utcParse, never use the local timezone.\n\n      if (Z && !(\"Z\" in d)) d.Z = 0; // The am-pm flag is 0 for AM, and 1 for PM.\n\n      if (\"p\" in d) d.H = d.H % 12 + d.p * 12; // If the month was not specified, inherit from the quarter.\n\n      if (d.m === undefined) d.m = \"q\" in d ? d.q : 0; // Convert day-of-week and week-of-year to day-of-year.\n\n      if (\"V\" in d) {\n        if (d.V < 1 || d.V > 53) return null;\n        if (!(\"w\" in d)) d.w = 1;\n\n        if (\"Z\" in d) {\n          week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n          week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n          week = utcDay.offset(week, (d.V - 1) * 7);\n          d.y = week.getUTCFullYear();\n          d.m = week.getUTCMonth();\n          d.d = week.getUTCDate() + (d.w + 6) % 7;\n        } else {\n          week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n          week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n          week = timeDay.offset(week, (d.V - 1) * 7);\n          d.y = week.getFullYear();\n          d.m = week.getMonth();\n          d.d = week.getDate() + (d.w + 6) % 7;\n        }\n      } else if (\"W\" in d || \"U\" in d) {\n        if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n        day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n        d.m = 0;\n        d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n      } // If a time zone is specified, all fields are interpreted as UTC and then\n      // offset according to the specified time zone.\n\n\n      if (\"Z\" in d) {\n        d.H += d.Z / 100 | 0;\n        d.M += d.Z % 100;\n        return utcDate(d);\n      } // Otherwise, all fields are in local time.\n\n\n      return localDate(d);\n    };\n  }\n\n  function parseSpecifier(d, specifier, string, j) {\n    var i = 0,\n        n = specifier.length,\n        m = string.length,\n        c,\n        parse;\n\n    while (i < n) {\n      if (j >= m) return -1;\n      c = specifier.charCodeAt(i++);\n\n      if (c === 37) {\n        c = specifier.charAt(i++);\n        parse = parses[c in pads ? specifier.charAt(i++) : c];\n        if (!parse || (j = parse(d, string, j)) < 0) return -1;\n      } else if (c != string.charCodeAt(j++)) {\n        return -1;\n      }\n    }\n\n    return j;\n  }\n\n  function parsePeriod(d, string, i) {\n    var n = periodRe.exec(string.slice(i));\n    return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseShortWeekday(d, string, i) {\n    var n = shortWeekdayRe.exec(string.slice(i));\n    return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseWeekday(d, string, i) {\n    var n = weekdayRe.exec(string.slice(i));\n    return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseShortMonth(d, string, i) {\n    var n = shortMonthRe.exec(string.slice(i));\n    return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseMonth(d, string, i) {\n    var n = monthRe.exec(string.slice(i));\n    return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n  }\n\n  function parseLocaleDateTime(d, string, i) {\n    return parseSpecifier(d, locale_dateTime, string, i);\n  }\n\n  function parseLocaleDate(d, string, i) {\n    return parseSpecifier(d, locale_date, string, i);\n  }\n\n  function parseLocaleTime(d, string, i) {\n    return parseSpecifier(d, locale_time, string, i);\n  }\n\n  function formatShortWeekday(d) {\n    return locale_shortWeekdays[d.getDay()];\n  }\n\n  function formatWeekday(d) {\n    return locale_weekdays[d.getDay()];\n  }\n\n  function formatShortMonth(d) {\n    return locale_shortMonths[d.getMonth()];\n  }\n\n  function formatMonth(d) {\n    return locale_months[d.getMonth()];\n  }\n\n  function formatPeriod(d) {\n    return locale_periods[+(d.getHours() >= 12)];\n  }\n\n  function formatQuarter(d) {\n    return 1 + ~~(d.getMonth() / 3);\n  }\n\n  function formatUTCShortWeekday(d) {\n    return locale_shortWeekdays[d.getUTCDay()];\n  }\n\n  function formatUTCWeekday(d) {\n    return locale_weekdays[d.getUTCDay()];\n  }\n\n  function formatUTCShortMonth(d) {\n    return locale_shortMonths[d.getUTCMonth()];\n  }\n\n  function formatUTCMonth(d) {\n    return locale_months[d.getUTCMonth()];\n  }\n\n  function formatUTCPeriod(d) {\n    return locale_periods[+(d.getUTCHours() >= 12)];\n  }\n\n  function formatUTCQuarter(d) {\n    return 1 + ~~(d.getUTCMonth() / 3);\n  }\n\n  return {\n    format: function format(specifier) {\n      var f = newFormat(specifier += \"\", formats);\n\n      f.toString = function () {\n        return specifier;\n      };\n\n      return f;\n    },\n    parse: function parse(specifier) {\n      var p = newParse(specifier += \"\", false);\n\n      p.toString = function () {\n        return specifier;\n      };\n\n      return p;\n    },\n    utcFormat: function utcFormat(specifier) {\n      var f = newFormat(specifier += \"\", utcFormats);\n\n      f.toString = function () {\n        return specifier;\n      };\n\n      return f;\n    },\n    utcParse: function utcParse(specifier) {\n      var p = newParse(specifier += \"\", true);\n\n      p.toString = function () {\n        return specifier;\n      };\n\n      return p;\n    }\n  };\n}\nvar pads = {\n  \"-\": \"\",\n  \"_\": \" \",\n  \"0\": \"0\"\n},\n    numberRe = /^\\s*\\d+/,\n    // note: ignores next directive\npercentRe = /^%/,\n    requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n  var sign = value < 0 ? \"-\" : \"\",\n      string = (sign ? -value : value) + \"\",\n      length = string.length;\n  return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n  return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n  return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n  var map = {},\n      i = -1,\n      n = names.length;\n\n  while (++i < n) {\n    map[names[i].toLowerCase()] = i;\n  }\n\n  return map;\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 4));\n  return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n  var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n  return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 6));\n  return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n  var n = percentRe.exec(string.slice(i, i + 1));\n  return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n  return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n  return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n  return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n  return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n  return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n  return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n  return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n  return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n  return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n  var day = d.getDay();\n  return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n  return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatWeekNumberISO(d, p) {\n  var day = d.getDay();\n  d = day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);\n  return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n  return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n  return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n  var z = d.getTimezoneOffset();\n  return (z > 0 ? \"-\" : (z *= -1, \"+\")) + pad(z / 60 | 0, \"0\", 2) + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n  return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n  return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n  return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n  return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n  return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n  return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n  return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n  return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n  return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n  var dow = d.getUTCDay();\n  return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n  return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n  var day = d.getUTCDay();\n  d = day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);\n  return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n  return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n  return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n  return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n  return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n  return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n  return Math.floor(+d / 1000);\n}","import formatLocale from \"./locale.js\";\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\ndefaultLocale({\n  dateTime: \"%x, %X\",\n  date: \"%-m/%-d/%Y\",\n  time: \"%-I:%M:%S %p\",\n  periods: [\"AM\", \"PM\"],\n  days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n  shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n  shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\nexport default function defaultLocale(definition) {\n  locale = formatLocale(definition);\n  timeFormat = locale.format;\n  timeParse = locale.parse;\n  utcFormat = locale.utcFormat;\n  utcParse = locale.utcParse;\n  return locale;\n}","import { bisector, tickStep } from \"d3-array\";\nimport { interpolateNumber as reinterpolate } from \"d3-interpolate\";\nimport { timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeMillisecond } from \"d3-time\";\nimport { timeFormat } from \"d3-time-format\";\nimport { map } from \"./array\";\nimport { default as continuous, copy, deinterpolateLinear as deinterpolate } from \"./continuous\";\nimport nice from \"./nice\";\nvar durationSecond = 1000,\n    durationMinute = durationSecond * 60,\n    durationHour = durationMinute * 60,\n    durationDay = durationHour * 24,\n    durationWeek = durationDay * 7,\n    durationMonth = durationDay * 30,\n    durationYear = durationDay * 365;\n\nfunction date(t) {\n  return new Date(t);\n}\n\nfunction number(t) {\n  return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(year, month, week, day, hour, minute, second, millisecond, format) {\n  var scale = continuous(deinterpolate, reinterpolate),\n      invert = scale.invert,\n      domain = scale.domain;\n  var formatMillisecond = format(\".%L\"),\n      formatSecond = format(\":%S\"),\n      formatMinute = format(\"%I:%M\"),\n      formatHour = format(\"%I %p\"),\n      formatDay = format(\"%a %d\"),\n      formatWeek = format(\"%b %d\"),\n      formatMonth = format(\"%B\"),\n      formatYear = format(\"%Y\");\n  var tickIntervals = [[second, 1, durationSecond], [second, 5, 5 * durationSecond], [second, 15, 15 * durationSecond], [second, 30, 30 * durationSecond], [minute, 1, durationMinute], [minute, 5, 5 * durationMinute], [minute, 15, 15 * durationMinute], [minute, 30, 30 * durationMinute], [hour, 1, durationHour], [hour, 3, 3 * durationHour], [hour, 6, 6 * durationHour], [hour, 12, 12 * durationHour], [day, 1, durationDay], [day, 2, 2 * durationDay], [week, 1, durationWeek], [month, 1, durationMonth], [month, 3, 3 * durationMonth], [year, 1, durationYear]];\n\n  function tickFormat(date) {\n    return (second(date) < date ? formatMillisecond : minute(date) < date ? formatSecond : hour(date) < date ? formatMinute : day(date) < date ? formatHour : month(date) < date ? week(date) < date ? formatDay : formatWeek : year(date) < date ? formatMonth : formatYear)(date);\n  }\n\n  function tickInterval(interval, start, stop, step) {\n    if (interval == null) interval = 10; // If a desired tick count is specified, pick a reasonable tick interval\n    // based on the extent of the domain and a rough estimate of tick size.\n    // Otherwise, assume interval is already a time interval and use it.\n\n    if (typeof interval === \"number\") {\n      var target = Math.abs(stop - start) / interval,\n          i = bisector(function (i) {\n        return i[2];\n      }).right(tickIntervals, target);\n\n      if (i === tickIntervals.length) {\n        step = tickStep(start / durationYear, stop / durationYear, interval);\n        interval = year;\n      } else if (i) {\n        i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n        step = i[1];\n        interval = i[0];\n      } else {\n        step = Math.max(tickStep(start, stop, interval), 1);\n        interval = millisecond;\n      }\n    }\n\n    return step == null ? interval : interval.every(step);\n  }\n\n  scale.invert = function (y) {\n    return new Date(invert(y));\n  };\n\n  scale.domain = function (_) {\n    return arguments.length ? domain(map.call(_, number)) : domain().map(date);\n  };\n\n  scale.ticks = function (interval, step) {\n    var d = domain(),\n        t0 = d[0],\n        t1 = d[d.length - 1],\n        r = t1 < t0,\n        t;\n    if (r) t = t0, t0 = t1, t1 = t;\n    t = tickInterval(interval, t0, t1, step);\n    t = t ? t.range(t0, t1 + 1) : []; // inclusive stop\n\n    return r ? t.reverse() : t;\n  };\n\n  scale.tickFormat = function (count, specifier) {\n    return specifier == null ? tickFormat : format(specifier);\n  };\n\n  scale.nice = function (interval, step) {\n    var d = domain();\n    return (interval = tickInterval(interval, d[0], d[d.length - 1], step)) ? domain(nice(d, interval)) : scale;\n  };\n\n  scale.copy = function () {\n    return copy(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format));\n  };\n\n  return scale;\n}\nexport default function () {\n  return calendar(timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeMillisecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]);\n}","import interval from \"./interval.js\";\nvar utcMonth = interval(function (date) {\n  date.setUTCDate(1);\n  date.setUTCHours(0, 0, 0, 0);\n}, function (date, step) {\n  date.setUTCMonth(date.getUTCMonth() + step);\n}, function (start, end) {\n  return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function (date) {\n  return date.getUTCMonth();\n});\nexport default utcMonth;\nexport var utcMonths = utcMonth.range;","import interval from \"./interval.js\";\nimport { durationHour } from \"./duration.js\";\nvar utcHour = interval(function (date) {\n  date.setUTCMinutes(0, 0, 0);\n}, function (date, step) {\n  date.setTime(+date + step * durationHour);\n}, function (start, end) {\n  return (end - start) / durationHour;\n}, function (date) {\n  return date.getUTCHours();\n});\nexport default utcHour;\nexport var utcHours = utcHour.range;","import interval from \"./interval.js\";\nimport { durationMinute } from \"./duration.js\";\nvar utcMinute = interval(function (date) {\n  date.setUTCSeconds(0, 0);\n}, function (date, step) {\n  date.setTime(+date + step * durationMinute);\n}, function (start, end) {\n  return (end - start) / durationMinute;\n}, function (date) {\n  return date.getUTCMinutes();\n});\nexport default utcMinute;\nexport var utcMinutes = utcMinute.range;","export default function (s) {\n  return s.match(/.{6}/g).map(function (x) {\n    return \"#\" + x;\n  });\n}","export var deg2rad = Math.PI / 180;\nexport var rad2deg = 180 / Math.PI;","import colors from \"./colors\";\nexport default colors(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\");","import colors from \"./colors\";\nexport default colors(\"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6\");","import colors from \"./colors\";\nexport default colors(\"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9\");","import colors from \"./colors\";\nexport default colors(\"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5\");","import define, { extend } from \"./define.js\";\nimport { Color, rgbConvert, Rgb, darker as _darker, brighter as _brighter } from \"./color.js\";\nimport { deg2rad, rad2deg } from \"./math.js\";\nvar A = -0.14861,\n    B = +1.78277,\n    C = -0.29227,\n    D = -0.90649,\n    E = +1.97294,\n    ED = E * D,\n    EB = E * B,\n    BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Rgb)) o = rgbConvert(o);\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n      bl = b - l,\n      k = (E * (g - l) - C * bl) / D,\n      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)),\n      // NaN if l=0 or l=1\n  h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;\n  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nexport default function cubehelix(h, s, l, opacity) {\n  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\nexport function Cubehelix(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\ndefine(Cubehelix, cubehelix, extend(Color, {\n  brighter: function brighter(k) {\n    k = k == null ? _brighter : Math.pow(_brighter, k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker: function darker(k) {\n    k = k == null ? _darker : Math.pow(_darker, k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb: function rgb() {\n    var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,\n        l = +this.l,\n        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n        cosh = Math.cos(h),\n        sinh = Math.sin(h);\n    return new Rgb(255 * (l + a * (A * cosh + B * sinh)), 255 * (l + a * (C * cosh + D * sinh)), 255 * (l + a * (E * cosh)), this.opacity);\n  }\n}));","import { cubehelix as colorCubehelix } from \"d3-color\";\nimport color, { hue } from \"./color.js\";\n\nfunction cubehelix(hue) {\n  return function cubehelixGamma(y) {\n    y = +y;\n\n    function cubehelix(start, end) {\n      var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h),\n          s = color(start.s, end.s),\n          l = color(start.l, end.l),\n          opacity = color(start.opacity, end.opacity);\n      return function (t) {\n        start.h = h(t);\n        start.s = s(t);\n        start.l = l(Math.pow(t, y));\n        start.opacity = opacity(t);\n        return start + \"\";\n      };\n    }\n\n    cubehelix.gamma = cubehelixGamma;\n    return cubehelix;\n  }(1);\n}\n\nexport default cubehelix(hue);\nexport var cubehelixLong = cubehelix(color);","import { cubehelix } from \"d3-color\";\nimport { interpolateCubehelixLong } from \"d3-interpolate\";\nexport default interpolateCubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0));","import { cubehelix } from \"d3-color\";\nimport { interpolateCubehelixLong } from \"d3-interpolate\";\nexport var warm = interpolateCubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\nexport var cool = interpolateCubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\nvar rainbow = cubehelix();\nexport default function (t) {\n  if (t < 0 || t > 1) t -= Math.floor(t);\n  var ts = Math.abs(t - 0.5);\n  rainbow.h = 360 * t - 100;\n  rainbow.s = 1.5 - 1.5 * ts;\n  rainbow.l = 0.8 - 0.9 * ts;\n  return rainbow + \"\";\n}","import colors from \"./colors\";\n\nfunction ramp(range) {\n  var n = range.length;\n  return function (t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n}\n\nexport default ramp(colors(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\"));\nexport var magma = ramp(colors(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\nexport var inferno = ramp(colors(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\nexport var plasma = ramp(colors(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));","// Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/**\n * Get unique property values from an array.\n * @param {Array} arr Array of data.\n * @param {string} propertyName Prop name.\n * @returns {Array} Array of unique values.\n */\nexport function getUniquePropertyValues(arr, accessor) {\n  var setOfValues = new Set(arr.map(accessor));\n  return Array.from(setOfValues);\n}\n/**\n * Add zero to the domain.\n * @param {Array} arr Add zero to the domain.\n * @param {Number} value Add zero to domain.\n * @returns {Array} Adjusted domain.\n */\n\nexport function addValueToArray(arr, value) {\n  var result = [].concat(arr);\n\n  if (result[0] > value) {\n    result[0] = value;\n  }\n\n  if (result[result.length - 1] < value) {\n    result[result.length - 1] = value;\n  }\n\n  return result;\n}\n/**\n * Transforms a value ( number or date ) to a string.\n * @param {Date | number} value The value as date or number.\n * @returns {string | number} The value as string.\n */\n\nexport function transformValueToString(value) {\n  return Object.prototype.toString.call(value) === '[object Date]' ? value.toDateString() : value;\n}","import \"core-js/modules/es.array.reduce.js\";\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _slicedToArray = function () {\n  function sliceIterator(arr, i) {\n    var _arr = [];\n    var _n = true;\n    var _d = false;\n    var _e = undefined;\n\n    try {\n      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n        _arr.push(_s.value);\n\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\"]) _i[\"return\"]();\n      } finally {\n        if (_d) throw _e;\n      }\n    }\n\n    return _arr;\n  }\n\n  return function (arr, i) {\n    if (Array.isArray(arr)) {\n      return arr;\n    } else if (Symbol.iterator in Object(arr)) {\n      return sliceIterator(arr, i);\n    } else {\n      throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n    }\n  };\n}();\n\nvar _SCALE_FUNCTIONS;\n\nfunction _toConsumableArray(arr) {\n  if (Array.isArray(arr)) {\n    for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n      arr2[i] = arr[i];\n    }\n\n    return arr2;\n  } else {\n    return Array.from(arr);\n  }\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\n  return obj;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport { scaleLinear, scalePoint, scaleOrdinal, scaleLog, scaleTime, scaleUtc } from 'd3-scale';\nimport { extent } from 'd3-array';\nimport { set } from 'd3-collection';\nimport { hsl } from 'd3-color';\nimport PropTypes from 'prop-types';\nimport { warning } from './react-utils';\nimport { getUniquePropertyValues, addValueToArray } from './data-utils';\n/**\n * Linear scale name.\n * @type {string}\n * @const\n */\n\nvar LINEAR_SCALE_TYPE = 'linear';\n/**\n * Ordinal scale name.\n * @type {string}\n * @const\n */\n\nvar ORDINAL_SCALE_TYPE = 'ordinal';\n/**\n * Category scale.\n * @type {string}\n * @const\n */\n\nvar CATEGORY_SCALE_TYPE = 'category';\n/**\n * Literal scale.\n * Differs slightly from d3's identity scale in that it does not coerce value\n * into numbers, it simply returns exactly what you give it\n * @type {string}\n * @const\n */\n\nvar LITERAL_SCALE_TYPE = 'literal';\n/**\n * Log scale name.\n * @type {string}\n * @const\n */\n\nvar LOG_SCALE_TYPE = 'log';\n/**\n * Time scale name.\n * @type {string}\n * @const\n */\n\nvar TIME_SCALE_TYPE = 'time';\n/**\n * Time UTC scale name.\n * @type {string}\n * @const\n */\n\nvar TIME_UTC_SCALE_TYPE = 'time-utc';\n/**\n * Scale functions that are supported in the library.\n * @type {Object}\n * @const\n */\n\nvar SCALE_FUNCTIONS = (_SCALE_FUNCTIONS = {}, _defineProperty(_SCALE_FUNCTIONS, LINEAR_SCALE_TYPE, scaleLinear), _defineProperty(_SCALE_FUNCTIONS, ORDINAL_SCALE_TYPE, scalePoint), _defineProperty(_SCALE_FUNCTIONS, CATEGORY_SCALE_TYPE, scaleOrdinal), _defineProperty(_SCALE_FUNCTIONS, LITERAL_SCALE_TYPE, literalScale), _defineProperty(_SCALE_FUNCTIONS, LOG_SCALE_TYPE, scaleLog), _defineProperty(_SCALE_FUNCTIONS, TIME_SCALE_TYPE, scaleTime), _defineProperty(_SCALE_FUNCTIONS, TIME_UTC_SCALE_TYPE, scaleUtc), _SCALE_FUNCTIONS);\n/**\n * Attrs for which a scale can be set up at XYPlot level\n * @type {Array}\n * @const\n */\n\nvar XYPLOT_ATTR = ['color', 'fill', 'opacity', 'stroke'];\n/**\n * Title case a given string\n * @param {String} str Array of values.\n * @returns {String} titlecased string\n */\n\nfunction toTitleCase(str) {\n  return '' + str[0].toUpperCase() + str.slice(1);\n}\n/**\n * Find the smallest distance between the values on a given scale and return\n * the index of the element, where the smallest distance was found.\n * It returns the first occurrence of i where\n * `scale(value[i]) - scale(value[i - 1])` is minimal\n * @param {Array} values Array of values.\n * @param {Object} scaleObject Scale object.\n * @returns {number} Index of an element where the smallest distance was found.\n * @private\n */\n\n\nexport function _getSmallestDistanceIndex(values, scaleObject) {\n  var scaleFn = getScaleFnFromScaleObject(scaleObject);\n  var result = 0;\n\n  if (scaleFn) {\n    var nextValue = void 0;\n    var currentValue = scaleFn(values[0]);\n    var distance = Infinity;\n    var nextDistance = void 0;\n\n    for (var i = 1; i < values.length; i++) {\n      nextValue = scaleFn(values[i]);\n      nextDistance = Math.abs(nextValue - currentValue);\n\n      if (nextDistance < distance) {\n        distance = nextDistance;\n        result = i;\n      }\n\n      currentValue = nextValue;\n    }\n  }\n\n  return result;\n}\n/**\n * This is a workaround for issue that ordinal scale\n * does not have invert method implemented in d3-scale.\n * @param {Object} Ordinal d3-scale object.\n * @returns {void}\n * @private\n */\n\nfunction addInvertFunctionToOrdinalScaleObject(scale) {\n  if (scale.invert) {\n    return;\n  }\n\n  scale.invert = function invert(value) {\n    var _scale$range = scale.range(),\n        _scale$range2 = _slicedToArray(_scale$range, 2),\n        lower = _scale$range2[0],\n        upper = _scale$range2[1];\n\n    var start = Math.min(lower, upper);\n    var stop = Math.max(lower, upper);\n\n    if (value < start + scale.padding() * scale.step()) {\n      return scale.domain()[0];\n    }\n\n    if (value > stop - scale.padding() * scale.step()) {\n      return scale.domain()[scale.domain().length - 1];\n    }\n\n    var index = Math.floor((value - start - scale.padding() * scale.step()) / scale.step());\n    return scale.domain()[index];\n  };\n}\n/**\n * Crate a scale function from the scale object.\n * @param {Object} scaleObject Scale object.\n - scaleObject.domain {Array}\n - scaleObject.range {Array}\n - scaleObject.type {string}\n - scaleObject.attr {string}\n * @returns {*} Scale function.\n * @private\n */\n\n\nexport function getScaleFnFromScaleObject(scaleObject) {\n  if (!scaleObject) {\n    return null;\n  }\n\n  var type = scaleObject.type,\n      domain = scaleObject.domain,\n      range = scaleObject.range;\n  var modDomain = domain[0] === domain[1] ? domain[0] === 0 ? [-1, 0] : [-domain[0], domain[0]] : domain;\n\n  if (type === LITERAL_SCALE_TYPE) {\n    return literalScale(range[0]);\n  }\n\n  var scale = SCALE_FUNCTIONS[type]().domain(modDomain).range(range);\n\n  if (type === ORDINAL_SCALE_TYPE) {\n    scale.padding(0.5);\n    addInvertFunctionToOrdinalScaleObject(scale);\n  }\n\n  return scale;\n}\n/**\n * Get the domain from the array of data.\n * @param {Array} allData All data.\n * @param {function} accessor - accessor for main value.\n * @param {function} accessor0 - accessor for the naught value.\n * @param {string} type Scale type.\n * @returns {Array} Domain.\n * @private\n */\n\nexport function getDomainByAccessor(allData, accessor, accessor0, type) {\n  var domain = void 0; // Collect both attr and available attr0 values from the array of data.\n\n  var values = allData.reduce(function (data, d) {\n    var value = accessor(d);\n    var value0 = accessor0(d);\n\n    if (_isDefined(value)) {\n      data.push(value);\n    }\n\n    if (_isDefined(value0)) {\n      data.push(value0);\n    }\n\n    return data;\n  }, []);\n\n  if (!values.length) {\n    return [];\n  } // Create proper domain depending on the type of the scale.\n\n\n  if (type !== ORDINAL_SCALE_TYPE && type !== CATEGORY_SCALE_TYPE) {\n    domain = extent(values);\n  } else {\n    domain = set(values).values();\n  }\n\n  return domain;\n}\n/**\n * Create custom scale object from the value. When the scale is created from\n * this object, it should return the same value all time.\n * @param {string} attr Attribute.\n * @param {*} value Value.\n * @param {string} type - the type of scale being used\n * @param {function} accessor - the accessor function\n * @param {function} accessor0 - the accessor function for the potential naught value\n * @returns {Object} Custom scale object.\n * @private\n */\n\nfunction _createScaleObjectForValue(attr, value, type, accessor, accessor0) {\n  if (type === LITERAL_SCALE_TYPE) {\n    return {\n      type: LITERAL_SCALE_TYPE,\n      domain: [],\n      range: [value],\n      distance: 0,\n      attr: attr,\n      baseValue: undefined,\n      isValue: true,\n      accessor: accessor,\n      accessor0: accessor0\n    };\n  }\n\n  if (typeof value === 'undefined') {\n    return null;\n  }\n\n  return {\n    type: CATEGORY_SCALE_TYPE,\n    range: [value],\n    domain: [],\n    distance: 0,\n    attr: attr,\n    baseValue: undefined,\n    isValue: true,\n    accessor: accessor,\n    accessor0: accessor0\n  };\n}\n/**\n * Create a regular scale object for a further use from the existing parameters.\n * @param {Array} domain - Domain.\n * @param {Array} range - Range.\n * @param {string} type - Type.\n * @param {number} distance - Distance.\n * @param {string} attr - Attribute.\n * @param {number} baseValue - Base value.\n * @param {function} accessor - Attribute accesor\n * @param {function} accessor0 - Attribute accesor for potential naught value\n * @returns {Object} Scale object.\n * @private\n */\n\n\nfunction _createScaleObjectForFunction(_ref) {\n  var domain = _ref.domain,\n      range = _ref.range,\n      type = _ref.type,\n      distance = _ref.distance,\n      attr = _ref.attr,\n      baseValue = _ref.baseValue,\n      accessor = _ref.accessor,\n      accessor0 = _ref.accessor0;\n  return {\n    domain: domain,\n    range: range,\n    type: type,\n    distance: distance,\n    attr: attr,\n    baseValue: baseValue,\n    isValue: false,\n    accessor: accessor,\n    accessor0: accessor0\n  };\n}\n/**\n * Get scale object from props. E. g. object like {xRange, xDomain, xDistance,\n * xType} is transformed into {range, domain, distance, type}.\n * @param {Object} props Props.\n * @param {string} attr Attribute.\n * @returns {*} Null or an object with the scale.\n * @private\n */\n\n\nfunction _collectScaleObjectFromProps(props, attr) {\n  var value = props[attr],\n      fallbackValue = props['_' + attr + 'Value'],\n      range = props[attr + 'Range'],\n      _props$ = props[attr + 'Distance'],\n      distance = _props$ === undefined ? 0 : _props$,\n      baseValue = props[attr + 'BaseValue'],\n      _props$2 = props[attr + 'Type'],\n      type = _props$2 === undefined ? LINEAR_SCALE_TYPE : _props$2,\n      noFallBack = props[attr + 'NoFallBack'],\n      _props$3 = props['get' + toTitleCase(attr)],\n      accessor = _props$3 === undefined ? function (d) {\n    return d[attr];\n  } : _props$3,\n      _props$4 = props['get' + toTitleCase(attr) + '0'],\n      accessor0 = _props$4 === undefined ? function (d) {\n    return d[attr + '0'];\n  } : _props$4;\n  var domain = props[attr + 'Domain']; // Return value-based scale if the value is assigned.\n\n  if (!noFallBack && typeof value !== 'undefined') {\n    return _createScaleObjectForValue(attr, value, props[attr + 'Type'], accessor, accessor0);\n  } // Pick up the domain from the properties and create a new one if it's not\n  // available.\n\n\n  if (typeof baseValue !== 'undefined') {\n    domain = addValueToArray(domain, baseValue);\n  } // Make sure that the minimum necessary properties exist.\n\n\n  if (!range || !domain || !domain.length) {\n    // Try to use the fallback value if it is available.\n    return _createScaleObjectForValue(attr, fallbackValue, props[attr + 'Type'], accessor, accessor0);\n  }\n\n  return _createScaleObjectForFunction({\n    domain: domain,\n    range: range,\n    type: type,\n    distance: distance,\n    attr: attr,\n    baseValue: baseValue,\n    accessor: accessor,\n    accessor0: accessor0\n  });\n}\n/**\n * Compute left domain adjustment for the given values.\n * @param {Array} values Array of values.\n * @returns {number} Domain adjustment.\n * @private\n */\n\n\nfunction _computeLeftDomainAdjustment(values) {\n  if (values.length > 1) {\n    return (values[1] - values[0]) / 2;\n  }\n\n  if (values.length === 1) {\n    return values[0] - 0.5;\n  }\n\n  return 0;\n}\n/**\n * Compute right domain adjustment for the given values.\n * @param {Array} values Array of values.\n * @returns {number} Domain adjustment.\n * @private\n */\n\n\nfunction _computeRightDomainAdjustment(values) {\n  if (values.length > 1) {\n    return (values[values.length - 1] - values[values.length - 2]) / 2;\n  }\n\n  if (values.length === 1) {\n    return values[0] - 0.5;\n  }\n\n  return 0;\n}\n/**\n * Compute distance for the given values.\n * @param {Array} values Array of values.\n * @param {Array} domain Domain.\n * @param {number} bestDistIndex Index of a best distance found.\n * @param {function} scaleFn Scale function.\n * @returns {number} Domain adjustment.\n * @private\n */\n\n\nfunction _computeScaleDistance(values, domain, bestDistIndex, scaleFn) {\n  if (values.length > 1) {\n    // Avoid zero indexes.\n    var i = Math.max(bestDistIndex, 1);\n    return Math.abs(scaleFn(values[i]) - scaleFn(values[i - 1]));\n  }\n\n  if (values.length === 1) {\n    return Math.abs(scaleFn(domain[1]) - scaleFn(domain[0]));\n  }\n\n  return 0;\n}\n/**\n * Normilize array of values with a single value.\n * @param {Array} arr Array of data.\n * @param {Array} values Array of values.\n * @param {string} attr Attribute.\n * @param {string} type Type.\n * @private\n */\n\n\nfunction _normalizeValues(data, values, accessor0, type) {\n  if (type === TIME_SCALE_TYPE && values.length === 1) {\n    var attr0 = accessor0(data[0]);\n    return [attr0].concat(_toConsumableArray(values));\n  }\n\n  return values;\n}\n/**\n * Get the distance, the smallest and the largest value of the domain.\n * @param {Array} data Array of data for the single series.\n * @param {Object} scaleObject Scale object.\n * @returns {{domain0: number, domainN: number, distance: number}} Result.\n * @private\n */\n\n\nexport function _getScaleDistanceAndAdjustedDomain(data, scaleObject) {\n  var domain = scaleObject.domain,\n      type = scaleObject.type,\n      accessor = scaleObject.accessor,\n      accessor0 = scaleObject.accessor0;\n  var uniqueValues = getUniquePropertyValues(data, accessor); // Fix time scale if a data has only one value.\n\n  var values = _normalizeValues(data, uniqueValues, accessor0, type);\n\n  var index = _getSmallestDistanceIndex(values, scaleObject);\n\n  var adjustedDomain = [].concat(domain);\n  adjustedDomain[0] -= _computeLeftDomainAdjustment(values);\n  adjustedDomain[domain.length - 1] += _computeRightDomainAdjustment(values); // Fix log scale if it's too small.\n\n  if (type === LOG_SCALE_TYPE && domain[0] <= 0) {\n    adjustedDomain[0] = Math.min(domain[1] / 10, 1);\n  }\n\n  var adjustedScaleFn = getScaleFnFromScaleObject(_extends({}, scaleObject, {\n    domain: adjustedDomain\n  }));\n\n  var distance = _computeScaleDistance(values, adjustedDomain, index, adjustedScaleFn);\n\n  return {\n    domain0: adjustedDomain[0],\n    domainN: adjustedDomain[adjustedDomain.length - 1],\n    distance: distance\n  };\n}\n/**\n * Returns true if scale adjustments are possible for a given scale.\n * @param {Object} props Props.\n * @param {Object} scaleObject Scale object.\n * @returns {boolean} True if scale adjustments possible.\n * @private\n */\n\nfunction _isScaleAdjustmentPossible(props, scaleObject) {\n  var attr = scaleObject.attr;\n  var _props$_adjustBy = props._adjustBy,\n      adjustBy = _props$_adjustBy === undefined ? [] : _props$_adjustBy,\n      _props$_adjustWhat = props._adjustWhat,\n      adjustWhat = _props$_adjustWhat === undefined ? [] : _props$_adjustWhat; // The scale cannot be adjusted if there's no attributes to adjust, no\n  // suitable values\n\n  return adjustWhat.length && adjustBy.length && adjustBy.indexOf(attr) !== -1;\n}\n/**\n * Adjust continuous scales (e.g. 'linear', 'log' and 'time') by adding the\n * space from the left and right of them and by computing the best distance.\n * @param {Object} props Props.\n * @param {Object} scaleObject Scale object.\n * @returns {*} Scale object with adjustments.\n * @private\n */\n\n\nfunction _adjustContinuousScale(props, scaleObject) {\n  var allSeriesData = props._allData,\n      _props$_adjustWhat2 = props._adjustWhat,\n      adjustWhat = _props$_adjustWhat2 === undefined ? [] : _props$_adjustWhat2; // Assign the initial values.\n\n  var domainLength = scaleObject.domain.length;\n  var domain = scaleObject.domain;\n  var scaleDomain0 = domain[0];\n  var scaleDomainN = domain[domainLength - 1];\n  var scaleDistance = scaleObject.distance; // Find the smallest left position of the domain, the largest right position\n  // of the domain and the best distance for them.\n\n  allSeriesData.forEach(function (data, index) {\n    if (adjustWhat.indexOf(index) === -1) {\n      return;\n    }\n\n    if (data && data.length) {\n      var _getScaleDistanceAndA = _getScaleDistanceAndAdjustedDomain(data, scaleObject),\n          domain0 = _getScaleDistanceAndA.domain0,\n          domainN = _getScaleDistanceAndA.domainN,\n          distance = _getScaleDistanceAndA.distance;\n\n      scaleDomain0 = Math.min(scaleDomain0, domain0);\n      scaleDomainN = Math.max(scaleDomainN, domainN);\n      scaleDistance = Math.max(scaleDistance, distance);\n    }\n  });\n  scaleObject.domain = [scaleDomain0].concat(_toConsumableArray(domain.slice(1, -1)), [scaleDomainN]);\n  scaleObject.distance = scaleDistance;\n  return scaleObject;\n}\n/**\n * Get an adjusted scale. Suitable for 'category' and 'ordinal' scales.\n * @param {Object} scaleObject Scale object.\n * @returns {*} Scale object with adjustments.\n * @private\n */\n\n\nexport function _adjustCategoricalScale(scaleObject) {\n  var scaleFn = getScaleFnFromScaleObject(scaleObject);\n  var domain = scaleObject.domain,\n      range = scaleObject.range;\n\n  if (domain.length > 1) {\n    scaleObject.distance = Math.abs(scaleFn(domain[1]) - scaleFn(domain[0]));\n  } else {\n    scaleObject.distance = Math.abs(range[1] - range[0]);\n  }\n\n  return scaleObject;\n}\n/**\n * Retrieve a scale object or a value from the properties passed.\n * @param {Object} props Object of props.\n * @param {string} attr Attribute.\n * @returns {*} Scale object, value or null.\n */\n\nexport function getScaleObjectFromProps(props, attr) {\n  // Create the initial scale object.\n  var scaleObject = _collectScaleObjectFromProps(props, attr);\n\n  if (!scaleObject) {\n    return null;\n  } // Make sure if it's possible to add space to the scale object. If not,\n  // return the object immediately.\n\n\n  if (!_isScaleAdjustmentPossible(props, scaleObject)) {\n    return scaleObject;\n  }\n\n  var type = scaleObject.type; // Depending on what type the scale is, apply different adjustments. Distances\n  // for the ordinal and category scales are even, equal domains cannot be\n  // adjusted.\n\n  if (type === ORDINAL_SCALE_TYPE || type === CATEGORY_SCALE_TYPE) {\n    return _adjustCategoricalScale(scaleObject);\n  }\n\n  return _adjustContinuousScale(props, scaleObject);\n}\n/**\n * Get d3 scale for a given prop.\n * @param {Object} props Props.\n * @param {string} attr Attribute.\n * @returns {function} d3 scale function.\n */\n\nexport function getAttributeScale(props, attr) {\n  var scaleObject = getScaleObjectFromProps(props, attr);\n  return getScaleFnFromScaleObject(scaleObject);\n}\n/**\n * Get the value of `attr` from the object.\n * @param {Object} d - data Object.\n * @param {Function} accessor - accessor function.\n * @returns {*} Value of the point.\n * @private\n */\n\nfunction _getAttrValue(d, accessor) {\n  return accessor(d.data ? d.data : d);\n}\n\nfunction _isDefined(value) {\n  return typeof value !== 'undefined';\n}\n/*\n * Adds a percentage of padding to a given domain\n * @param {Array} domain X or Y domain to pad.\n * @param {Number} padding Percentage of padding to add to domain\n * @returns {Array} Padded Domain\n */\n\n\nfunction _padDomain(domain, padding) {\n  if (!domain) {\n    return domain;\n  }\n\n  if (isNaN(parseFloat(domain[0])) || isNaN(parseFloat(domain[1]))) {\n    return domain;\n  }\n\n  var _domain = _slicedToArray(domain, 2),\n      min = _domain[0],\n      max = _domain[1];\n\n  var domainPadding = (max - min) * (padding * 0.01);\n  return [min - domainPadding, max + domainPadding];\n}\n/**\n * Get prop functor (either a value or a function) for a given attribute.\n * @param {Object} props Series props.\n * @param {Function} accessor - Property accessor.\n * @returns {*} Function or value.\n */\n\n\nexport function getAttributeFunctor(props, attr) {\n  var scaleObject = getScaleObjectFromProps(props, attr);\n\n  if (scaleObject) {\n    var scaleFn = getScaleFnFromScaleObject(scaleObject);\n    return function (d) {\n      return scaleFn(_getAttrValue(d, scaleObject.accessor));\n    };\n  }\n\n  return null;\n}\n/**\n * Get the functor which extracts value form [attr]0 property. Use baseValue if\n * no attr0 property for a given object is defined. Fall back to domain[0] if no\n * base value is available.\n * @param {Object} props Object of props.\n * @param {string} attr Attribute name.\n * @returns {*} Function which returns value or null if no values available.\n */\n\nexport function getAttr0Functor(props, attr) {\n  var scaleObject = getScaleObjectFromProps(props, attr);\n\n  if (scaleObject) {\n    var domain = scaleObject.domain;\n    var _scaleObject$baseValu = scaleObject.baseValue,\n        baseValue = _scaleObject$baseValu === undefined ? domain[0] : _scaleObject$baseValu;\n    var scaleFn = getScaleFnFromScaleObject(scaleObject);\n    return function (d) {\n      var value = _getAttrValue(d, scaleObject.accessor0);\n\n      return scaleFn(_isDefined(value) ? value : baseValue);\n    };\n  }\n\n  return null;\n}\n/**\n * Tries to get the string|number value of the attr and falls back to\n * a fallback property in case if the value is a scale.\n * @param {Object} props Series props.\n * @param {string} attr Property name.\n * @returns {*} Function or value.\n */\n\nexport function getAttributeValue(props, attr) {\n  var scaleObject = getScaleObjectFromProps(props, attr);\n\n  if (scaleObject) {\n    if (!scaleObject.isValue && props['_' + attr + 'Value'] === undefined) {\n      warning('[React-vis] Cannot use data defined ' + attr + ' for this ' + 'series type. Using fallback value instead.');\n    }\n\n    return props['_' + attr + 'Value'] || scaleObject.range[0];\n  }\n\n  return null;\n}\n/**\n * Get prop types by the attribute.\n * @param {string} attr Attribute.\n * @returns {Object} Object of xDomain, xRange, xType, xDistance and _xValue,\n * where x is an attribute passed to the function.\n */\n\nexport function getScalePropTypesByAttribute(attr) {\n  var _ref2;\n\n  return _ref2 = {}, _defineProperty(_ref2, '_' + attr + 'Value', PropTypes.any), _defineProperty(_ref2, attr + 'Domain', PropTypes.array), _defineProperty(_ref2, 'get' + toTitleCase(attr), PropTypes.func), _defineProperty(_ref2, 'get' + toTitleCase(attr) + '0', PropTypes.func), _defineProperty(_ref2, attr + 'Range', PropTypes.array), _defineProperty(_ref2, attr + 'Type', PropTypes.oneOf(Object.keys(SCALE_FUNCTIONS))), _defineProperty(_ref2, attr + 'Distance', PropTypes.number), _defineProperty(_ref2, attr + 'BaseValue', PropTypes.any), _ref2;\n}\n/**\n * Extract the list of scale properties from the entire props object.\n * @param {Object} props Props.\n * @param {Array<String>} attributes Array of attributes for the given\n * components (for instance, `['x', 'y', 'color']`).\n * @returns {Object} Collected props.\n */\n\nexport function extractScalePropsFromProps(props, attributes) {\n  var result = {};\n  Object.keys(props).forEach(function (key) {\n    // this filtering is critical for extracting the correct accessors!\n    var attr = attributes.find(function (a) {\n      // width\n      var isPlainSet = key.indexOf(a) === 0; // Ex: _data\n\n      var isUnderscoreSet = key.indexOf('_' + a) === 0; // EX: getX\n\n      var usesGet = key.indexOf('get' + toTitleCase(a)) === 0;\n      return isPlainSet || isUnderscoreSet || usesGet;\n    });\n\n    if (!attr) {\n      return;\n    }\n\n    result[key] = props[key];\n  });\n  return result;\n}\n/**\n * Extract the missing scale props from the given data and return them as\n * an object.\n * @param {Object} props Props.\n * @param {Array} data Array of all data.\n * @param {Array<String>} attributes Array of attributes for the given\n * components (for instance, `['x', 'y', 'color']`).\n * @returns {Object} Collected props.\n */\n\nexport function getMissingScaleProps(props, data, attributes) {\n  var result = {}; // Make sure that the domain is set pad it if specified\n\n  attributes.forEach(function (attr) {\n    if (!props['get' + toTitleCase(attr)]) {\n      result['get' + toTitleCase(attr)] = function (d) {\n        return d[attr];\n      };\n    }\n\n    if (!props['get' + toTitleCase(attr) + '0']) {\n      result['get' + toTitleCase(attr) + '0'] = function (d) {\n        return d[attr + '0'];\n      };\n    }\n\n    if (!props[attr + 'Domain']) {\n      result[attr + 'Domain'] = getDomainByAccessor(data, props['get' + toTitleCase(attr)] || result['get' + toTitleCase(attr)], props['get' + toTitleCase(attr) + '0'] || result['get' + toTitleCase(attr) + '0'], props[attr + 'Type']);\n\n      if (props[attr + 'Padding']) {\n        result[attr + 'Domain'] = _padDomain(result[attr + 'Domain'], props[attr + 'Padding']);\n      }\n    }\n  });\n  return result;\n}\n/**\n * Return a d3 scale that returns the literal value that was given to it\n * @returns {function} literal scale.\n */\n\nexport function literalScale(defaultValue) {\n  function scale(d) {\n    if (d === undefined) {\n      return defaultValue;\n    }\n\n    return d;\n  }\n\n  function response() {\n    return scale;\n  }\n\n  scale.domain = response;\n  scale.range = response;\n  scale.unknown = response;\n  scale.copy = response;\n  return scale;\n}\nexport function getFontColorFromBackground(background) {\n  if (background) {\n    return hsl(background).l > 0.57 ? '#222' : '#fff';\n  }\n\n  return null;\n}\n/**\n * Creates fallback values for series from scales defined at XYPlot level.\n * @param {Object} props Props of the XYPlot object.\n * @param {Array<Object>} children Array of components, children of XYPlot\n * @returns {Array<Object>} Collected props.\n */\n\nexport function getXYPlotValues(props, children) {\n  var XYPlotScales = XYPLOT_ATTR.reduce(function (prev, attr) {\n    var domain = props[attr + 'Domain'],\n        range = props[attr + 'Range'],\n        type = props[attr + 'Type'];\n\n    if (domain && range && type) {\n      return _extends({}, prev, _defineProperty({}, attr, SCALE_FUNCTIONS[type]().domain(domain).range(range)));\n    }\n\n    return prev;\n  }, {});\n  return children.map(function (child) {\n    return XYPLOT_ATTR.reduce(function (prev, attr) {\n      if (child.props && child.props[attr] !== undefined) {\n        var scaleInput = child.props[attr];\n        var scale = XYPlotScales[attr];\n        var fallbackValue = scale ? scale(scaleInput) : scaleInput;\n        return _extends({}, prev, _defineProperty({}, '_' + attr + 'Value', fallbackValue));\n      }\n\n      return prev;\n    }, {});\n  });\n}\nvar OPTIONAL_SCALE_PROPS = ['Padding'];\nvar OPTIONAL_SCALE_PROPS_REGS = OPTIONAL_SCALE_PROPS.map(function (str) {\n  return new RegExp(str + '$', 'i');\n});\n/**\n * Get the list of optional scale-related settings for XYPlot\n * mostly just used to find padding properties\n * @param {Object} props Object of props.\n * @returns {Object} Optional Props.\n * @private\n */\n\nexport function getOptionalScaleProps(props) {\n  return Object.keys(props).reduce(function (acc, prop) {\n    var propIsNotOptional = OPTIONAL_SCALE_PROPS_REGS.every(function (reg) {\n      return !prop.match(reg);\n    });\n\n    if (propIsNotOptional) {\n      return acc;\n    }\n\n    acc[prop] = props[prop];\n    return acc;\n  }, {});\n}\nexport default {\n  extractScalePropsFromProps: extractScalePropsFromProps,\n  getAttributeScale: getAttributeScale,\n  getAttributeFunctor: getAttributeFunctor,\n  getAttr0Functor: getAttr0Functor,\n  getAttributeValue: getAttributeValue,\n  getDomainByAccessor: getDomainByAccessor,\n  getFontColorFromBackground: getFontColorFromBackground,\n  getMissingScaleProps: getMissingScaleProps,\n  getOptionalScaleProps: getOptionalScaleProps,\n  getScaleObjectFromProps: getScaleObjectFromProps,\n  getScalePropTypesByAttribute: getScalePropTypesByAttribute,\n  getXYPlotValues: getXYPlotValues,\n  literalScale: literalScale\n};","import { range as sequence } from \"d3-array\";\nimport ordinal from \"./ordinal\";\nexport default function band() {\n  var scale = ordinal().unknown(undefined),\n      domain = scale.domain,\n      ordinalRange = scale.range,\n      range = [0, 1],\n      step,\n      bandwidth,\n      round = false,\n      paddingInner = 0,\n      paddingOuter = 0,\n      align = 0.5;\n  delete scale.unknown;\n\n  function rescale() {\n    var n = domain().length,\n        reverse = range[1] < range[0],\n        start = range[reverse - 0],\n        stop = range[1 - reverse];\n    step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n    if (round) step = Math.floor(step);\n    start += (stop - start - step * (n - paddingInner)) * align;\n    bandwidth = step * (1 - paddingInner);\n    if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n    var values = sequence(n).map(function (i) {\n      return start + step * i;\n    });\n    return ordinalRange(reverse ? values.reverse() : values);\n  }\n\n  scale.domain = function (_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.range = function (_) {\n    return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function (_) {\n    return range = [+_[0], +_[1]], round = true, rescale();\n  };\n\n  scale.bandwidth = function () {\n    return bandwidth;\n  };\n\n  scale.step = function () {\n    return step;\n  };\n\n  scale.round = function (_) {\n    return arguments.length ? (round = !!_, rescale()) : round;\n  };\n\n  scale.padding = function (_) {\n    return arguments.length ? (paddingInner = paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;\n  };\n\n  scale.paddingInner = function (_) {\n    return arguments.length ? (paddingInner = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;\n  };\n\n  scale.paddingOuter = function (_) {\n    return arguments.length ? (paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingOuter;\n  };\n\n  scale.align = function (_) {\n    return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n  };\n\n  scale.copy = function () {\n    return band().domain(domain()).range(range).round(round).paddingInner(paddingInner).paddingOuter(paddingOuter).align(align);\n  };\n\n  return rescale();\n}\n\nfunction pointish(scale) {\n  var copy = scale.copy;\n  scale.padding = scale.paddingOuter;\n  delete scale.paddingInner;\n  delete scale.paddingOuter;\n\n  scale.copy = function () {\n    return pointish(copy());\n  };\n\n  return scale;\n}\n\nexport function point() {\n  return pointish(band().paddingInner(1));\n}","import { calendar } from \"./time\";\nimport { utcFormat } from \"d3-time-format\";\nimport { utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcMillisecond } from \"d3-time\";\nexport default function () {\n  return calendar(utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcMillisecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]);\n}","var _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport PropTypes from 'prop-types';\nimport { voronoi } from 'd3-voronoi';\nimport { PureComponent } from 'react';\nimport { AnimationPropType } from '../../animation';\nimport { getAttributeFunctor, getAttr0Functor, getAttributeValue, getScaleObjectFromProps, getScalePropTypesByAttribute } from '../../utils/scales-utils';\n\nvar propTypes = _extends({}, getScalePropTypesByAttribute('x'), getScalePropTypesByAttribute('y'), getScalePropTypesByAttribute('size'), getScalePropTypesByAttribute('opacity'), getScalePropTypesByAttribute('color'), {\n  width: PropTypes.number,\n  height: PropTypes.number,\n  data: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object, PropTypes.array])),\n  onValueMouseOver: PropTypes.func,\n  onValueMouseOut: PropTypes.func,\n  onValueClick: PropTypes.func,\n  onValueRightClick: PropTypes.func,\n  onSeriesMouseOver: PropTypes.func,\n  onSeriesMouseOut: PropTypes.func,\n  onSeriesClick: PropTypes.func,\n  onSeriesRightClick: PropTypes.func,\n  onNearestX: PropTypes.func,\n  onNearestXY: PropTypes.func,\n  style: PropTypes.object,\n  animation: AnimationPropType,\n  stack: PropTypes.bool\n});\n\nvar defaultProps = {\n  className: '',\n  stack: false,\n  style: {}\n};\n\nvar AbstractSeries = function (_PureComponent) {\n  _inherits(AbstractSeries, _PureComponent);\n\n  function AbstractSeries() {\n    var _ref;\n\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, AbstractSeries);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = AbstractSeries.__proto__ || Object.getPrototypeOf(AbstractSeries)).call.apply(_ref, [this].concat(args))), _this), _this._seriesClickHandler = function (event) {\n      var onSeriesClick = _this.props.onSeriesClick;\n\n      if (onSeriesClick) {\n        onSeriesClick({\n          event: event\n        });\n      }\n    }, _this._seriesMouseOutHandler = function (event) {\n      var onSeriesMouseOut = _this.props.onSeriesMouseOut;\n\n      if (onSeriesMouseOut) {\n        onSeriesMouseOut({\n          event: event\n        });\n      }\n    }, _this._seriesMouseOverHandler = function (event) {\n      var onSeriesMouseOver = _this.props.onSeriesMouseOver;\n\n      if (onSeriesMouseOver) {\n        onSeriesMouseOver({\n          event: event\n        });\n      }\n    }, _this._seriesRightClickHandler = function (event) {\n      var onSeriesRightClick = _this.props.onSeriesRightClick;\n\n      if (onSeriesRightClick) {\n        onSeriesRightClick({\n          event: event\n        });\n      }\n    }, _this._valueClickHandler = function (d, event) {\n      var _this$props = _this.props,\n          onValueClick = _this$props.onValueClick,\n          onSeriesClick = _this$props.onSeriesClick;\n\n      if (onValueClick) {\n        onValueClick(d, {\n          event: event\n        });\n      }\n\n      if (onSeriesClick) {\n        onSeriesClick({\n          event: event\n        });\n      }\n    }, _this._valueMouseOutHandler = function (d, event) {\n      var _this$props2 = _this.props,\n          onValueMouseOut = _this$props2.onValueMouseOut,\n          onSeriesMouseOut = _this$props2.onSeriesMouseOut;\n\n      if (onValueMouseOut) {\n        onValueMouseOut(d, {\n          event: event\n        });\n      }\n\n      if (onSeriesMouseOut) {\n        onSeriesMouseOut({\n          event: event\n        });\n      }\n    }, _this._valueMouseOverHandler = function (d, event) {\n      var _this$props3 = _this.props,\n          onValueMouseOver = _this$props3.onValueMouseOver,\n          onSeriesMouseOver = _this$props3.onSeriesMouseOver;\n\n      if (onValueMouseOver) {\n        onValueMouseOver(d, {\n          event: event\n        });\n      }\n\n      if (onSeriesMouseOver) {\n        onSeriesMouseOver({\n          event: event\n        });\n      }\n    }, _this._valueRightClickHandler = function (d, event) {\n      var _this$props4 = _this.props,\n          onValueRightClick = _this$props4.onValueRightClick,\n          onSeriesRightClick = _this$props4.onSeriesRightClick;\n\n      if (onValueRightClick) {\n        onValueRightClick(d, {\n          event: event\n        });\n      }\n\n      if (onSeriesRightClick) {\n        onSeriesRightClick({\n          event: event\n        });\n      }\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  _createClass(AbstractSeries, [{\n    key: 'onParentMouseMove',\n    value: function onParentMouseMove(event) {\n      var _props = this.props,\n          onNearestX = _props.onNearestX,\n          onNearestXY = _props.onNearestXY,\n          data = _props.data;\n\n      if (!onNearestX && !onNearestXY || !data) {\n        return;\n      }\n\n      if (onNearestXY) {\n        this._handleNearestXY(event);\n      } else {\n        this._handleNearestX(event);\n      }\n    }\n  }, {\n    key: 'onParentTouchMove',\n    value: function onParentTouchMove(e) {\n      e.preventDefault();\n      this.onParentMouseMove(e);\n    }\n  }, {\n    key: 'onParentTouchStart',\n    value: function onParentTouchStart(e) {\n      // prevent mouse event emulation\n      e.preventDefault();\n    }\n    /**\n     * Get the attr0 functor.\n     * @param {string} attr Attribute name.\n     * @returns {*} Functor.\n     * @private\n     */\n\n  }, {\n    key: '_getAttr0Functor',\n    value: function _getAttr0Functor(attr) {\n      return getAttr0Functor(this.props, attr);\n    }\n    /**\n     * Get attribute functor.\n     * @param {string} attr Attribute name\n     * @returns {*} Functor.\n     * @protected\n     */\n\n  }, {\n    key: '_getAttributeFunctor',\n    value: function _getAttributeFunctor(attr) {\n      return getAttributeFunctor(this.props, attr);\n    }\n    /**\n     * Get the attribute value if it is available.\n     * @param {string} attr Attribute name.\n     * @returns {*} Attribute value if available, fallback value or undefined\n     * otherwise.\n     * @protected\n     */\n\n  }, {\n    key: '_getAttributeValue',\n    value: function _getAttributeValue(attr) {\n      return getAttributeValue(this.props, attr);\n    }\n    /**\n     * Get the scale object distance by the attribute from the list of properties.\n     * @param {string} attr Attribute name.\n     * @returns {number} Scale distance.\n     * @protected\n     */\n\n  }, {\n    key: '_getScaleDistance',\n    value: function _getScaleDistance(attr) {\n      var scaleObject = getScaleObjectFromProps(this.props, attr);\n      return scaleObject ? scaleObject.distance : 0;\n    }\n  }, {\n    key: '_getXYCoordinateInContainer',\n    value: function _getXYCoordinateInContainer(event) {\n      var _props2 = this.props,\n          _props2$marginTop = _props2.marginTop,\n          marginTop = _props2$marginTop === undefined ? 0 : _props2$marginTop,\n          _props2$marginLeft = _props2.marginLeft,\n          marginLeft = _props2$marginLeft === undefined ? 0 : _props2$marginLeft;\n      var evt = event.nativeEvent,\n          currentTarget = event.currentTarget;\n      var rect = currentTarget.getBoundingClientRect();\n      var x = evt.clientX;\n      var y = evt.clientY;\n\n      if (evt.type === 'touchmove') {\n        x = evt.touches[0].pageX;\n        y = evt.touches[0].pageY;\n      }\n\n      return {\n        x: x - rect.left - currentTarget.clientLeft - marginLeft,\n        y: y - rect.top - currentTarget.clientTop - marginTop\n      };\n    }\n  }, {\n    key: '_handleNearestX',\n    value: function _handleNearestX(event) {\n      var _props3 = this.props,\n          onNearestX = _props3.onNearestX,\n          data = _props3.data;\n      var minDistance = Number.POSITIVE_INFINITY;\n      var value = null;\n      var valueIndex = null;\n\n      var coordinate = this._getXYCoordinateInContainer(event);\n\n      var xScaleFn = this._getAttributeFunctor('x');\n\n      data.forEach(function (item, i) {\n        var currentCoordinate = xScaleFn(item);\n        var newDistance = Math.abs(coordinate.x - currentCoordinate);\n\n        if (newDistance < minDistance) {\n          minDistance = newDistance;\n          value = item;\n          valueIndex = i;\n        }\n      });\n\n      if (!value) {\n        return;\n      }\n\n      onNearestX(value, {\n        innerX: xScaleFn(value),\n        index: valueIndex,\n        event: event.nativeEvent\n      });\n    }\n  }, {\n    key: '_handleNearestXY',\n    value: function _handleNearestXY(event) {\n      var _props4 = this.props,\n          onNearestXY = _props4.onNearestXY,\n          data = _props4.data;\n\n      var coordinate = this._getXYCoordinateInContainer(event);\n\n      var xScaleFn = this._getAttributeFunctor('x');\n\n      var yScaleFn = this._getAttributeFunctor('y'); // Create a voronoi with each node center points\n\n\n      var voronoiInstance = voronoi().x(xScaleFn).y(yScaleFn);\n      var foundPoint = voronoiInstance(data).find(coordinate.x, coordinate.y);\n      var value = foundPoint.data;\n\n      if (!value) {\n        return;\n      }\n\n      onNearestXY(value, {\n        innerX: foundPoint[0],\n        innerY: foundPoint[1],\n        index: foundPoint.index,\n        event: event.nativeEvent\n      });\n    }\n    /**\n     * Click handler for the entire series.\n     * @param {Object} event Event.\n     * @protected\n     */\n\n    /**\n     * Mouse out handler for the entire series.\n     * @param {Object} event Event.\n     * @protected\n     */\n\n    /**\n     * Mouse over handler for the entire series.\n     * @param {Object} event Event.\n     * @protected\n     */\n\n    /**\n     * Right Click handler for the entire series.\n     * @param {Object} event Event.\n     * @protected\n     */\n\n    /**\n     * Click handler for the specific series' value.\n     * @param {Object} d Value object\n     * @param {Object} event Event.\n     * @protected\n     */\n\n    /**\n     * Mouse out handler for the specific series' value.\n     * @param {Object} d Value object\n     * @param {Object} event Event.\n     * @protected\n     */\n\n    /**\n     * Mouse over handler for the specific series' value.\n     * @param {Object} d Value object\n     * @param {Object} event Event.\n     * @protected\n     */\n\n    /**\n     * Right Click handler for the specific series' value.\n     * @param {Object} d Value object\n     * @param {Object} event Event.\n     * @protected\n     */\n\n  }], [{\n    key: 'getParentConfig',\n\n    /**\n     * Get a default config for the parent.\n     * @returns {Object} Empty config.\n     */\n    value: function getParentConfig() {\n      return {};\n    }\n    /**\n     * Tells the rest of the world that it requires SVG to work.\n     * @returns {boolean} Result.\n     */\n\n  }, {\n    key: 'requiresSVG',\n    get: function get() {\n      return true;\n    }\n  }]);\n\n  return AbstractSeries;\n}(PureComponent);\n\nAbstractSeries.displayName = 'AbstractSeries';\nAbstractSeries.propTypes = propTypes;\nAbstractSeries.defaultProps = defaultProps;\nexport default AbstractSeries;","// Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nexport var DISCRETE_COLOR_RANGE = ['#12939A', '#79C7E3', '#1A3177', '#FF9833', '#EF5D28'];\nexport var EXTENDED_DISCRETE_COLOR_RANGE = ['#19CDD7', '#DDB27C', '#88572C', '#FF991F', '#F15C17', '#223F9A', '#DA70BF', '#125C77', '#4DC19C', '#776E57', '#12939A', '#17B8BE', '#F6D18A', '#B7885E', '#FFCB99', '#F89570', '#829AE3', '#E79FD5', '#1E96BE', '#89DAC1', '#B3AD9E'];\nexport var CONTINUOUS_COLOR_RANGE = ['#EF5D28', '#FF9833'];\nexport var SIZE_RANGE = [1, 10];\nexport var OPACITY_RANGE = [0.1, 1];\nexport var OPACITY_TYPE = 'literal';\nexport var DEFAULT_OPACITY = 1;\nexport var DEFAULT_SIZE = 5;\nexport var DEFAULT_COLOR = DISCRETE_COLOR_RANGE[0];\nexport var DEFAULT_TICK_SIZE = 7;","import \"core-js/modules/es.array.reduce.js\";\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\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\n  return obj;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport AbstractSeries from '../plot/series/abstract-series';\nimport { DISCRETE_COLOR_RANGE, DEFAULT_OPACITY } from '../theme';\n/**\n * Check if the component is series or not.\n * @param {React.Component} child Component.\n * @returns {boolean} True if the child is series, false otherwise.\n */\n\nexport function isSeriesChild(child) {\n  var prototype = child.type.prototype;\n  return prototype instanceof AbstractSeries;\n}\n/**\n * Get all series from the 'children' object of the component.\n * @param {Object} children Children.\n * @returns {Array} Array of children.\n */\n\nexport function getSeriesChildren(children) {\n  return React.Children.toArray(children).filter(function (child) {\n    return child && isSeriesChild(child);\n  });\n}\n/**\n * Collect the map of repetitions of the series type for all children.\n * @param {Array} children Array of children.\n * @returns {{}} Map of repetitions where sameTypeTotal is the total amount and\n * sameTypeIndex is always 0.\n */\n\nfunction collectSeriesTypesInfo(children) {\n  var result = {};\n  children.filter(isSeriesChild).forEach(function (child) {\n    var displayName = child.type.displayName;\n    var cluster = child.props.cluster;\n\n    if (!result[displayName]) {\n      result[displayName] = {\n        sameTypeTotal: 0,\n        sameTypeIndex: 0,\n        clusters: new Set()\n      };\n    }\n\n    result[displayName].clusters.add(cluster);\n    result[displayName].sameTypeTotal++;\n  });\n  return result;\n}\n/**\n * Check series to see if it has angular data that needs to be converted\n * @param {Array} data - an array of objects to check\n * @returns {Boolean} whether or not this series contains polar configuration\n */\n\n\nfunction seriesHasAngleRadius() {\n  var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n  if (!data) {\n    return false;\n  }\n\n  return data.some(function (row) {\n    return row.radius && row.angle;\n  });\n}\n/**\n * Possibly convert polar coordinates to x/y for computing domain\n * @param {Array} data - an array of objects to check\n * @param {String} attr - the property being checked\n * @returns {Boolean} whether or not this series contains polar configuration\n */\n\n\nfunction prepareData(data) {\n  if (!seriesHasAngleRadius(data)) {\n    return data;\n  }\n\n  return data.map(function (row) {\n    return _extends({}, row, {\n      x: row.radius * Math.cos(row.angle),\n      y: row.radius * Math.sin(row.angle)\n    });\n  });\n}\n/**\n * Collect the stacked data for all children in use. If the children don't have\n * the data (e.g. the child is invalid series or something else), then the child\n * is skipped.\n * Each next value of attr is equal to the previous value plus the difference\n * between attr0 and attr.\n * @param {Array} children Array of children.\n * @param {string} attr Attribute to stack by.\n * @returns {Array} New array of children for the series.\n */\n\n\nexport function getStackedData(children, attr) {\n  var areSomeSeriesStacked = children.some(function (series) {\n    return series && series.props.stack;\n  }); // It stores the last segment position added to each bar, separated by cluster.\n\n  var latestAttrPositions = {};\n  return children.reduce(function (accumulator, series, seriesIndex) {\n    // Skip the children that are not series (e.g. don't have any data).\n    if (!series) {\n      accumulator.push(null);\n      return accumulator;\n    }\n\n    var seriesType = series.type.displayName;\n    var _series$props = series.props,\n        data = _series$props.data,\n        _series$props$cluster = _series$props.cluster,\n        cluster = _series$props$cluster === undefined ? 'default' : _series$props$cluster,\n        stack = _series$props.stack;\n    var preppedData = prepareData(data, attr);\n\n    if (!attr || !preppedData || !preppedData.length || areSomeSeriesStacked && !stack) {\n      accumulator.push(preppedData);\n      return accumulator;\n    }\n\n    var attr0 = attr + '0';\n    var baseAttr = attr === 'y' ? 'x' : 'y';\n    accumulator.push(preppedData.map(function (d, dIndex) {\n      var _extends2, _latestAttrPositions$2;\n\n      if (!latestAttrPositions[cluster]) {\n        latestAttrPositions[cluster] = {};\n      }\n\n      if (!latestAttrPositions[cluster][seriesType]) {\n        latestAttrPositions[cluster][seriesType] = {};\n      }\n\n      var prevD = latestAttrPositions[cluster][seriesType][d[baseAttr]]; // It is the first segment of a bar.\n\n      if (!prevD) {\n        var _latestAttrPositions$;\n\n        latestAttrPositions[cluster][seriesType][d[baseAttr]] = (_latestAttrPositions$ = {}, _defineProperty(_latestAttrPositions$, attr0, d[attr0]), _defineProperty(_latestAttrPositions$, attr, d[attr]), _latestAttrPositions$);\n        return _extends({}, d);\n      } // Calculate the position of the next segment in a bar.\n\n\n      var nextD = _extends({}, d, (_extends2 = {}, _defineProperty(_extends2, attr0, prevD[attr]), _defineProperty(_extends2, attr, prevD[attr] + d[attr] - (d[attr0] || 0)), _extends2));\n\n      latestAttrPositions[cluster][seriesType][d[baseAttr]] = (_latestAttrPositions$2 = {}, _defineProperty(_latestAttrPositions$2, attr0, nextD[attr0]), _defineProperty(_latestAttrPositions$2, attr, nextD[attr]), _latestAttrPositions$2);\n      return nextD;\n    }));\n    return accumulator;\n  }, []);\n}\n/**\n * Get the list of series props for a child.\n * @param {Array} children Array of all children.\n * @returns {Array} Array of series props for each child. If a child is not a\n * series, than it's undefined.\n */\n\nexport function getSeriesPropsFromChildren(children) {\n  var result = [];\n  var seriesTypesInfo = collectSeriesTypesInfo(children);\n  var seriesIndex = 0;\n  var _opacityValue = DEFAULT_OPACITY;\n  children.forEach(function (child) {\n    var props = void 0;\n\n    if (isSeriesChild(child)) {\n      var seriesTypeInfo = seriesTypesInfo[child.type.displayName];\n      var _colorValue = DISCRETE_COLOR_RANGE[seriesIndex % DISCRETE_COLOR_RANGE.length];\n      props = _extends({}, seriesTypeInfo, {\n        seriesIndex: seriesIndex,\n        _colorValue: _colorValue,\n        _opacityValue: _opacityValue\n      });\n      seriesTypeInfo.sameTypeIndex++;\n      seriesIndex++;\n\n      if (child.props.cluster) {\n        props.cluster = child.props.cluster; // Using Array.from() so we can use .indexOf\n\n        props.clusters = Array.from(seriesTypeInfo.clusters);\n        props.sameTypeTotal = props.clusters.length;\n        props.sameTypeIndex = props.clusters.indexOf(child.props.cluster);\n      }\n    }\n\n    result.push(props);\n  });\n  return result;\n}\n/**\n * Find the max radius value from the nodes to be rendered after they have been\n * transformed into an array\n * @param {Array} data - the tree data after it has been broken into a iterable\n * it is an array of objects!\n * @returns {number} the maximum value in coordinates for the radial variable\n */\n\nexport function getRadialDomain(data) {\n  return data.reduce(function (res, row) {\n    return Math.max(row.radius, res);\n  }, 0);\n}\nexport var ANIMATED_SERIES_PROPS = ['xRange', 'xDomain', 'x', 'yRange', 'yDomain', 'y', 'colorRange', 'colorDomain', 'color', 'opacityRange', 'opacityDomain', 'opacity', 'strokeRange', 'strokeDomain', 'stroke', 'fillRange', 'fillDomain', 'fill', 'width', 'height', 'marginLeft', 'marginTop', 'marginRight', 'marginBottom', 'data', 'angleDomain', 'angleRange', 'angle', 'radiusDomain', 'radiusRange', 'radius', 'innerRadiusDomain', 'innerRadiusRange', 'innerRadius'];\nexport function getStackParams(props) {\n  var _stackBy = props._stackBy,\n      valuePosAttr = props.valuePosAttr,\n      cluster = props.cluster;\n  var _props$sameTypeTotal = props.sameTypeTotal,\n      sameTypeTotal = _props$sameTypeTotal === undefined ? 1 : _props$sameTypeTotal,\n      _props$sameTypeIndex = props.sameTypeIndex,\n      sameTypeIndex = _props$sameTypeIndex === undefined ? 0 : _props$sameTypeIndex; // If bars are stacked, but not clustering, override `sameTypeTotal` and\n  // `sameTypeIndex` such that bars are stacked and not staggered.\n\n  if (_stackBy === valuePosAttr && !cluster) {\n    sameTypeTotal = 1;\n    sameTypeIndex = 0;\n  }\n\n  return {\n    sameTypeTotal: sameTypeTotal,\n    sameTypeIndex: sameTypeIndex\n  };\n}","var pi = Math.PI,\n    tau = 2 * pi,\n    epsilon = 1e-6,\n    tauEpsilon = tau - epsilon;\n\nfunction Path() {\n  this._x0 = this._y0 = // start of current subpath\n  this._x1 = this._y1 = null; // end of current subpath\n\n  this._ = \"\";\n}\n\nfunction path() {\n  return new Path();\n}\n\nPath.prototype = path.prototype = {\n  constructor: Path,\n  moveTo: function moveTo(x, y) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n  },\n  closePath: function closePath() {\n    if (this._x1 !== null) {\n      this._x1 = this._x0, this._y1 = this._y0;\n      this._ += \"Z\";\n    }\n  },\n  lineTo: function lineTo(x, y) {\n    this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  quadraticCurveTo: function quadraticCurveTo(x1, y1, x, y) {\n    this._ += \"Q\" + +x1 + \",\" + +y1 + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  bezierCurveTo: function bezierCurveTo(x1, y1, x2, y2, x, y) {\n    this._ += \"C\" + +x1 + \",\" + +y1 + \",\" + +x2 + \",\" + +y2 + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n  },\n  arcTo: function arcTo(x1, y1, x2, y2, r) {\n    x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n    var x0 = this._x1,\n        y0 = this._y1,\n        x21 = x2 - x1,\n        y21 = y2 - y1,\n        x01 = x0 - x1,\n        y01 = y0 - y1,\n        l01_2 = x01 * x01 + y01 * y01; // Is the radius negative? Error.\n\n    if (r < 0) throw new Error(\"negative radius: \" + r); // Is this path empty? Move to (x1,y1).\n\n    if (this._x1 === null) {\n      this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n    } // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n    else if (!(l01_2 > epsilon)) ; // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n      // Equivalently, is (x1,y1) coincident with (x2,y2)?\n      // Or, is the radius zero? Line to (x1,y1).\n      else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n          this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n        } // Otherwise, draw an arc!\n        else {\n            var x20 = x2 - x0,\n                y20 = y2 - y0,\n                l21_2 = x21 * x21 + y21 * y21,\n                l20_2 = x20 * x20 + y20 * y20,\n                l21 = Math.sqrt(l21_2),\n                l01 = Math.sqrt(l01_2),\n                l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n                t01 = l / l01,\n                t21 = l / l21; // If the start tangent is not coincident with (x0,y0), line to.\n\n            if (Math.abs(t01 - 1) > epsilon) {\n              this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n            }\n\n            this._ += \"A\" + r + \",\" + r + \",0,0,\" + +(y01 * x20 > x01 * y20) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n          }\n  },\n  arc: function arc(x, y, r, a0, a1, ccw) {\n    x = +x, y = +y, r = +r, ccw = !!ccw;\n    var dx = r * Math.cos(a0),\n        dy = r * Math.sin(a0),\n        x0 = x + dx,\n        y0 = y + dy,\n        cw = 1 ^ ccw,\n        da = ccw ? a0 - a1 : a1 - a0; // Is the radius negative? Error.\n\n    if (r < 0) throw new Error(\"negative radius: \" + r); // Is this path empty? Move to (x0,y0).\n\n    if (this._x1 === null) {\n      this._ += \"M\" + x0 + \",\" + y0;\n    } // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n    else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n        this._ += \"L\" + x0 + \",\" + y0;\n      } // Is this arc empty? We’re done.\n\n\n    if (!r) return; // Does the angle go the wrong way? Flip the direction.\n\n    if (da < 0) da = da % tau + tau; // Is this a complete circle? Draw two arcs to complete the circle.\n\n    if (da > tauEpsilon) {\n      this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n    } // Is this arc non-empty? Draw an arc!\n    else if (da > epsilon) {\n        this._ += \"A\" + r + \",\" + r + \",0,\" + +(da >= pi) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n      }\n  },\n  rect: function rect(x, y, w, h) {\n    this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + +w + \"v\" + +h + \"h\" + -w + \"Z\";\n  },\n  toString: function toString() {\n    return this._;\n  }\n};\nexport default path;","export default function (x) {\n  return function constant() {\n    return x;\n  };\n}","export var abs = Math.abs;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var max = Math.max;\nexport var min = Math.min;\nexport var sin = Math.sin;\nexport var sqrt = Math.sqrt;\nexport var epsilon = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var tau = 2 * pi;\nexport function acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\nexport function asin(x) {\n  return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}","import { path } from \"d3-path\";\nimport constant from \"./constant.js\";\nimport { abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau } from \"./math.js\";\n\nfunction arcInnerRadius(d) {\n  return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n  return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n  return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n  return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n  return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n  var x10 = x1 - x0,\n      y10 = y1 - y0,\n      x32 = x3 - x2,\n      y32 = y3 - y2,\n      t = y32 * x10 - x32 * y10;\n  if (t * t < epsilon) return;\n  t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n  return [x0 + t * x10, y0 + t * y10];\n} // Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\n\n\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n  var x01 = x0 - x1,\n      y01 = y0 - y1,\n      lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n      ox = lo * y01,\n      oy = -lo * x01,\n      x11 = x0 + ox,\n      y11 = y0 + oy,\n      x10 = x1 + ox,\n      y10 = y1 + oy,\n      x00 = (x11 + x10) / 2,\n      y00 = (y11 + y10) / 2,\n      dx = x10 - x11,\n      dy = y10 - y11,\n      d2 = dx * dx + dy * dy,\n      r = r1 - rc,\n      D = x11 * y10 - x10 * y11,\n      d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n      cx0 = (D * dy - dx * d) / d2,\n      cy0 = (-D * dx - dy * d) / d2,\n      cx1 = (D * dy + dx * d) / d2,\n      cy1 = (-D * dx + dy * d) / d2,\n      dx0 = cx0 - x00,\n      dy0 = cy0 - y00,\n      dx1 = cx1 - x00,\n      dy1 = cy1 - y00; // Pick the closer of the two intersection points.\n  // TODO Is there a faster way to determine which intersection to use?\n\n  if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n  return {\n    cx: cx0,\n    cy: cy0,\n    x01: -ox,\n    y01: -oy,\n    x11: cx0 * (r1 / r - 1),\n    y11: cy0 * (r1 / r - 1)\n  };\n}\n\nexport default function () {\n  var innerRadius = arcInnerRadius,\n      outerRadius = arcOuterRadius,\n      cornerRadius = constant(0),\n      padRadius = null,\n      startAngle = arcStartAngle,\n      endAngle = arcEndAngle,\n      padAngle = arcPadAngle,\n      context = null;\n\n  function arc() {\n    var buffer,\n        r,\n        r0 = +innerRadius.apply(this, arguments),\n        r1 = +outerRadius.apply(this, arguments),\n        a0 = startAngle.apply(this, arguments) - halfPi,\n        a1 = endAngle.apply(this, arguments) - halfPi,\n        da = abs(a1 - a0),\n        cw = a1 > a0;\n    if (!context) context = buffer = path(); // Ensure that the outer radius is always larger than the inner radius.\n\n    if (r1 < r0) r = r1, r1 = r0, r0 = r; // Is it a point?\n\n    if (!(r1 > epsilon)) context.moveTo(0, 0); // Or is it a circle or annulus?\n    else if (da > tau - epsilon) {\n        context.moveTo(r1 * cos(a0), r1 * sin(a0));\n        context.arc(0, 0, r1, a0, a1, !cw);\n\n        if (r0 > epsilon) {\n          context.moveTo(r0 * cos(a1), r0 * sin(a1));\n          context.arc(0, 0, r0, a1, a0, cw);\n        }\n      } // Or is it a circular or annular sector?\n      else {\n          var a01 = a0,\n              a11 = a1,\n              a00 = a0,\n              a10 = a1,\n              da0 = da,\n              da1 = da,\n              ap = padAngle.apply(this, arguments) / 2,\n              rp = ap > epsilon && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n              rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n              rc0 = rc,\n              rc1 = rc,\n              t0,\n              t1; // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n\n          if (rp > epsilon) {\n            var p0 = asin(rp / r0 * sin(ap)),\n                p1 = asin(rp / r1 * sin(ap));\n            if ((da0 -= p0 * 2) > epsilon) p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0;else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n            if ((da1 -= p1 * 2) > epsilon) p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1;else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n          }\n\n          var x01 = r1 * cos(a01),\n              y01 = r1 * sin(a01),\n              x10 = r0 * cos(a10),\n              y10 = r0 * sin(a10); // Apply rounded corners?\n\n          if (rc > epsilon) {\n            var x11 = r1 * cos(a11),\n                y11 = r1 * sin(a11),\n                x00 = r0 * cos(a00),\n                y00 = r0 * sin(a00),\n                oc; // Restrict the corner radius according to the sector angle.\n\n            if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {\n              var ax = x01 - oc[0],\n                  ay = y01 - oc[1],\n                  bx = x11 - oc[0],\n                  by = y11 - oc[1],\n                  kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n                  lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n              rc0 = min(rc, (r0 - lc) / (kc - 1));\n              rc1 = min(rc, (r1 - lc) / (kc + 1));\n            }\n          } // Is the sector collapsed to a line?\n\n\n          if (!(da1 > epsilon)) context.moveTo(x01, y01); // Does the sector’s outer ring have rounded corners?\n          else if (rc1 > epsilon) {\n              t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n              t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n              context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01); // Have the corners merged?\n\n              if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw); // Otherwise, draw the two corners and the ring.\n              else {\n                  context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n                  context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n                  context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n                }\n            } // Or is the outer ring just a circular arc?\n            else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw); // Is there no inner ring, and it’s a circular sector?\n          // Or perhaps it’s an annular sector collapsed due to padding?\n\n          if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10); // Does the sector’s inner ring (or point) have rounded corners?\n          else if (rc0 > epsilon) {\n              t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n              t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n              context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01); // Have the corners merged?\n\n              if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw); // Otherwise, draw the two corners and the ring.\n              else {\n                  context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n                  context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n                  context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n                }\n            } // Or is the inner ring just a circular arc?\n            else context.arc(0, 0, r0, a10, a00, cw);\n        }\n    context.closePath();\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  arc.centroid = function () {\n    var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n        a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n    return [cos(a) * r, sin(a) * r];\n  };\n\n  arc.innerRadius = function (_) {\n    return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n  };\n\n  arc.outerRadius = function (_) {\n    return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n  };\n\n  arc.cornerRadius = function (_) {\n    return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n  };\n\n  arc.padRadius = function (_) {\n    return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n  };\n\n  arc.startAngle = function (_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n  };\n\n  arc.endAngle = function (_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n  };\n\n  arc.padAngle = function (_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n  };\n\n  arc.context = function (_) {\n    return arguments.length ? (context = _ == null ? null : _, arc) : context;\n  };\n\n  return arc;\n}","var _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport Animation from '../../animation';\nimport { ANIMATED_SERIES_PROPS } from '../../utils/series-utils';\nimport { arc as arcBuilder } from 'd3-shape';\nimport AbstractSeries from './abstract-series';\nimport { getAttributeFunctor, getAttr0Functor, extractScalePropsFromProps, getMissingScaleProps, getScalePropTypesByAttribute } from '../../utils/scales-utils';\nvar predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--arc';\nvar ATTRIBUTES = ['radius', 'angle'];\n\nvar defaultProps = _extends({}, AbstractSeries.defaultProps, {\n  center: {\n    x: 0,\n    y: 0\n  },\n  arcClassName: '',\n  className: '',\n  style: {},\n  padAngle: 0\n});\n/**\n * Prepare the internal representation of row for real use.\n * This is necessary because d3 insists on starting at 12 oclock and moving\n * clockwise, rather than starting at 3 oclock and moving counter clockwise\n * as one might expect from polar\n * @param {Object} row - coordinate object to be modifed\n * @return {Object} angle corrected object\n */\n\n\nfunction modifyRow(row) {\n  var radius = row.radius,\n      angle = row.angle,\n      angle0 = row.angle0;\n  var truedAngle = -1 * angle + Math.PI / 2;\n  var truedAngle0 = -1 * angle0 + Math.PI / 2;\n  return _extends({}, row, {\n    x: radius * Math.cos(truedAngle),\n    y: radius * Math.sin(truedAngle),\n    angle: truedAngle,\n    angle0: truedAngle0\n  });\n}\n\nvar ArcSeries = function (_AbstractSeries) {\n  _inherits(ArcSeries, _AbstractSeries);\n\n  function ArcSeries(props) {\n    _classCallCheck(this, ArcSeries);\n\n    var _this = _possibleConstructorReturn(this, (ArcSeries.__proto__ || Object.getPrototypeOf(ArcSeries)).call(this, props));\n\n    var scaleProps = _this._getAllScaleProps(props);\n\n    _this.state = {\n      scaleProps: scaleProps\n    };\n    return _this;\n  }\n\n  _createClass(ArcSeries, [{\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps(nextProps) {\n      this.setState({\n        scaleProps: this._getAllScaleProps(nextProps)\n      });\n    }\n    /**\n     * Get the map of scales from the props.\n     * @param {Object} props Props.\n     * @param {Array} data Array of all data.\n     * @returns {Object} Map of scales.\n     * @private\n     */\n\n  }, {\n    key: '_getAllScaleProps',\n    value: function _getAllScaleProps(props) {\n      var defaultScaleProps = this._getDefaultScaleProps(props);\n\n      var userScaleProps = extractScalePropsFromProps(props, ATTRIBUTES);\n      var missingScaleProps = getMissingScaleProps(_extends({}, defaultScaleProps, userScaleProps), props.data, ATTRIBUTES);\n      return _extends({}, defaultScaleProps, userScaleProps, missingScaleProps);\n    }\n    /**\n     * Get the list of scale-related settings that should be applied by default.\n     * @param {Object} props Object of props.\n     * @returns {Object} Defaults.\n     * @private\n     */\n\n  }, {\n    key: '_getDefaultScaleProps',\n    value: function _getDefaultScaleProps(props) {\n      var innerWidth = props.innerWidth,\n          innerHeight = props.innerHeight;\n      var radius = Math.min(innerWidth / 2, innerHeight / 2);\n      return {\n        radiusRange: [0, radius],\n        _radiusValue: radius,\n        angleType: 'literal'\n      };\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          arcClassName = _props.arcClassName,\n          animation = _props.animation,\n          className = _props.className,\n          center = _props.center,\n          data = _props.data,\n          disableSeries = _props.disableSeries,\n          hideSeries = _props.hideSeries,\n          marginLeft = _props.marginLeft,\n          marginTop = _props.marginTop,\n          padAngle = _props.padAngle,\n          style = _props.style;\n\n      if (!data) {\n        return null;\n      }\n\n      if (animation) {\n        var cloneData = data.map(function (d) {\n          return _extends({}, d);\n        });\n        return React.createElement('g', {\n          className: 'rv-xy-plot__series--arc__animation-wrapper'\n        }, React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: ANIMATED_SERIES_PROPS,\n          data: cloneData\n        }), React.createElement(ArcSeries, _extends({}, this.props, {\n          animation: null,\n          disableSeries: true,\n          data: cloneData\n        }))), React.createElement(ArcSeries, _extends({}, this.props, {\n          animation: null,\n          hideSeries: true,\n          style: {\n            stroke: 'red'\n          }\n        })));\n      }\n\n      var scaleProps = this.state.scaleProps;\n      var radiusDomain = scaleProps.radiusDomain; // need to generate our own functors as abstract series doesnt have anythign for us\n\n      var radius = getAttributeFunctor(scaleProps, 'radius');\n      var radius0 = getAttr0Functor(scaleProps, 'radius');\n      var angle = getAttributeFunctor(scaleProps, 'angle');\n      var angle0 = getAttr0Functor(scaleProps, 'angle'); // but it does have good color support!\n\n      var fill = this._getAttributeFunctor('fill') || this._getAttributeFunctor('color');\n\n      var stroke = this._getAttributeFunctor('stroke') || this._getAttributeFunctor('color');\n\n      var opacity = this._getAttributeFunctor('opacity');\n\n      var x = this._getAttributeFunctor('x');\n\n      var y = this._getAttributeFunctor('y');\n\n      return React.createElement('g', {\n        className: predefinedClassName + ' ' + className,\n        onMouseOver: this._seriesMouseOverHandler,\n        onMouseOut: this._seriesMouseOutHandler,\n        onClick: this._seriesClickHandler,\n        onContextMenu: this._seriesRightClickHandler,\n        opacity: hideSeries ? 0 : 1,\n        pointerEvents: disableSeries ? 'none' : 'all',\n        transform: 'translate(' + (marginLeft + x(center)) + ',' + (marginTop + y(center)) + ')'\n      }, data.map(function (row, i) {\n        var noRadius = radiusDomain[1] === radiusDomain[0];\n        var arcArg = {\n          innerRadius: noRadius ? 0 : radius0(row),\n          outerRadius: radius(row),\n          startAngle: angle0(row) || 0,\n          endAngle: angle(row)\n        };\n        var arcedData = arcBuilder().padAngle(padAngle);\n        var rowStyle = row.style || {};\n        var rowClassName = row.className || '';\n        return React.createElement('path', {\n          style: _extends({\n            opacity: opacity && opacity(row),\n            stroke: stroke && stroke(row),\n            fill: fill && fill(row)\n          }, style, rowStyle),\n          onClick: function onClick(e) {\n            return _this2._valueClickHandler(modifyRow(row), e);\n          },\n          onContextMenu: function onContextMenu(e) {\n            return _this2._valueRightClickHandler(modifyRow(row), e);\n          },\n          onMouseOver: function onMouseOver(e) {\n            return _this2._valueMouseOverHandler(modifyRow(row), e);\n          },\n          onMouseOut: function onMouseOut(e) {\n            return _this2._valueMouseOutHandler(modifyRow(row), e);\n          },\n          key: i,\n          className: predefinedClassName + '-path ' + arcClassName + ' ' + rowClassName,\n          d: arcedData(arcArg)\n        });\n      }));\n    }\n  }]);\n\n  return ArcSeries;\n}(AbstractSeries);\n\nArcSeries.defaultProps = defaultProps;\nArcSeries.displayName = 'ArcSeries';\nexport default ArcSeries;","function Linear(context) {\n  this._context = context;\n}\n\nLinear.prototype = {\n  areaStart: function areaStart() {\n    this._line = 0;\n  },\n  areaEnd: function areaEnd() {\n    this._line = NaN;\n  },\n  lineStart: function lineStart() {\n    this._point = 0;\n  },\n  lineEnd: function lineEnd() {\n    if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function point(x, y) {\n    x = +x, y = +y;\n\n    switch (this._point) {\n      case 0:\n        this._point = 1;\n        this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n        break;\n\n      case 1:\n        this._point = 2;\n      // proceed\n\n      default:\n        this._context.lineTo(x, y);\n\n        break;\n    }\n  }\n};\nexport default function (context) {\n  return new Linear(context);\n}","export function x(p) {\n  return p[0];\n}\nexport function y(p) {\n  return p[1];\n}","import { path } from \"d3-path\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport { x as pointX, y as pointY } from \"./point.js\";\nexport default function () {\n  var x = pointX,\n      y = pointY,\n      defined = constant(true),\n      context = null,\n      curve = curveLinear,\n      output = null;\n\n  function line(data) {\n    var i,\n        n = data.length,\n        d,\n        defined0 = false,\n        buffer;\n    if (context == null) output = curve(buffer = path());\n\n    for (i = 0; i <= n; ++i) {\n      if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n        if (defined0 = !defined0) output.lineStart();else output.lineEnd();\n      }\n\n      if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n    }\n\n    if (buffer) return output = null, buffer + \"\" || null;\n  }\n\n  line.x = function (_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n  };\n\n  line.y = function (_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n  };\n\n  line.defined = function (_) {\n    return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n  };\n\n  line.curve = function (_) {\n    return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n  };\n\n  line.context = function (_) {\n    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n  };\n\n  return line;\n}","import { path } from \"d3-path\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport line from \"./line.js\";\nimport { x as pointX, y as pointY } from \"./point.js\";\nexport default function () {\n  var x0 = pointX,\n      x1 = null,\n      y0 = constant(0),\n      y1 = pointY,\n      defined = constant(true),\n      context = null,\n      curve = curveLinear,\n      output = null;\n\n  function area(data) {\n    var i,\n        j,\n        k,\n        n = data.length,\n        d,\n        defined0 = false,\n        buffer,\n        x0z = new Array(n),\n        y0z = new Array(n);\n    if (context == null) output = curve(buffer = path());\n\n    for (i = 0; i <= n; ++i) {\n      if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n        if (defined0 = !defined0) {\n          j = i;\n          output.areaStart();\n          output.lineStart();\n        } else {\n          output.lineEnd();\n          output.lineStart();\n\n          for (k = i - 1; k >= j; --k) {\n            output.point(x0z[k], y0z[k]);\n          }\n\n          output.lineEnd();\n          output.areaEnd();\n        }\n      }\n\n      if (defined0) {\n        x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n        output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n      }\n    }\n\n    if (buffer) return output = null, buffer + \"\" || null;\n  }\n\n  function arealine() {\n    return line().defined(defined).curve(curve).context(context);\n  }\n\n  area.x = function (_) {\n    return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), x1 = null, area) : x0;\n  };\n\n  area.x0 = function (_) {\n    return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), area) : x0;\n  };\n\n  area.x1 = function (_) {\n    return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : x1;\n  };\n\n  area.y = function (_) {\n    return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), y1 = null, area) : y0;\n  };\n\n  area.y0 = function (_) {\n    return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), area) : y0;\n  };\n\n  area.y1 = function (_) {\n    return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : y1;\n  };\n\n  area.lineX0 = area.lineY0 = function () {\n    return arealine().x(x0).y(y0);\n  };\n\n  area.lineY1 = function () {\n    return arealine().x(x0).y(y1);\n  };\n\n  area.lineX1 = function () {\n    return arealine().x(x1).y(y0);\n  };\n\n  area.defined = function (_) {\n    return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), area) : defined;\n  };\n\n  area.curve = function (_) {\n    return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n  };\n\n  area.context = function (_) {\n    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n  };\n\n  return area;\n}","export default function (a, b) {\n  return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}","export default function (d) {\n  return d;\n}","import constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport { tau } from \"./math.js\";\nexport default function () {\n  var value = identity,\n      sortValues = descending,\n      sort = null,\n      startAngle = constant(0),\n      endAngle = constant(tau),\n      padAngle = constant(0);\n\n  function pie(data) {\n    var i,\n        n = data.length,\n        j,\n        k,\n        sum = 0,\n        index = new Array(n),\n        arcs = new Array(n),\n        a0 = +startAngle.apply(this, arguments),\n        da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n        a1,\n        p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n        pa = p * (da < 0 ? -1 : 1),\n        v;\n\n    for (i = 0; i < n; ++i) {\n      if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n        sum += v;\n      }\n    } // Optionally sort the arcs by previously-computed values or by data.\n\n\n    if (sortValues != null) index.sort(function (i, j) {\n      return sortValues(arcs[i], arcs[j]);\n    });else if (sort != null) index.sort(function (i, j) {\n      return sort(data[i], data[j]);\n    }); // Compute the arcs! They are stored in the original data's order.\n\n    for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n      j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n        data: data[j],\n        index: i,\n        value: v,\n        startAngle: a0,\n        endAngle: a1,\n        padAngle: p\n      };\n    }\n\n    return arcs;\n  }\n\n  pie.value = function (_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n  };\n\n  pie.sortValues = function (_) {\n    return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n  };\n\n  pie.sort = function (_) {\n    return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n  };\n\n  pie.startAngle = function (_) {\n    return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n  };\n\n  pie.endAngle = function (_) {\n    return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n  };\n\n  pie.padAngle = function (_) {\n    return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n  };\n\n  return pie;\n}","import curveLinear from \"./linear.js\";\nexport var curveRadialLinear = curveRadial(curveLinear);\n\nfunction Radial(curve) {\n  this._curve = curve;\n}\n\nRadial.prototype = {\n  areaStart: function areaStart() {\n    this._curve.areaStart();\n  },\n  areaEnd: function areaEnd() {\n    this._curve.areaEnd();\n  },\n  lineStart: function lineStart() {\n    this._curve.lineStart();\n  },\n  lineEnd: function lineEnd() {\n    this._curve.lineEnd();\n  },\n  point: function point(a, r) {\n    this._curve.point(r * Math.sin(a), r * -Math.cos(a));\n  }\n};\nexport default function curveRadial(curve) {\n  function radial(context) {\n    return new Radial(curve(context));\n  }\n\n  radial._curve = curve;\n  return radial;\n}","import curveRadial, { curveRadialLinear } from \"./curve/radial.js\";\nimport line from \"./line.js\";\nexport function lineRadial(l) {\n  var c = l.curve;\n  l.angle = l.x, delete l.x;\n  l.radius = l.y, delete l.y;\n\n  l.curve = function (_) {\n    return arguments.length ? c(curveRadial(_)) : c()._curve;\n  };\n\n  return l;\n}\nexport default function () {\n  return lineRadial(line().curve(curveRadialLinear));\n}","import curveRadial, { curveRadialLinear } from \"./curve/radial.js\";\nimport area from \"./area.js\";\nimport { lineRadial } from \"./lineRadial.js\";\nexport default function () {\n  var a = area().curve(curveRadialLinear),\n      c = a.curve,\n      x0 = a.lineX0,\n      x1 = a.lineX1,\n      y0 = a.lineY0,\n      y1 = a.lineY1;\n  a.angle = a.x, delete a.x;\n  a.startAngle = a.x0, delete a.x0;\n  a.endAngle = a.x1, delete a.x1;\n  a.radius = a.y, delete a.y;\n  a.innerRadius = a.y0, delete a.y0;\n  a.outerRadius = a.y1, delete a.y1;\n  a.lineStartAngle = function () {\n    return lineRadial(x0());\n  }, delete a.lineX0;\n  a.lineEndAngle = function () {\n    return lineRadial(x1());\n  }, delete a.lineX1;\n  a.lineInnerRadius = function () {\n    return lineRadial(y0());\n  }, delete a.lineY0;\n  a.lineOuterRadius = function () {\n    return lineRadial(y1());\n  }, delete a.lineY1;\n\n  a.curve = function (_) {\n    return arguments.length ? c(curveRadial(_)) : c()._curve;\n  };\n\n  return a;\n}","export default function (x, y) {\n  return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)];\n}","export var slice = Array.prototype.slice;","import { path } from \"d3-path\";\nimport { slice } from \"../array.js\";\nimport constant from \"../constant.js\";\nimport { x as pointX, y as pointY } from \"../point.js\";\nimport pointRadial from \"../pointRadial.js\";\n\nfunction linkSource(d) {\n  return d.source;\n}\n\nfunction linkTarget(d) {\n  return d.target;\n}\n\nfunction link(curve) {\n  var source = linkSource,\n      target = linkTarget,\n      x = pointX,\n      y = pointY,\n      context = null;\n\n  function link() {\n    var buffer,\n        argv = slice.call(arguments),\n        s = source.apply(this, argv),\n        t = target.apply(this, argv);\n    if (!context) context = buffer = path();\n    curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  link.source = function (_) {\n    return arguments.length ? (source = _, link) : source;\n  };\n\n  link.target = function (_) {\n    return arguments.length ? (target = _, link) : target;\n  };\n\n  link.x = function (_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), link) : x;\n  };\n\n  link.y = function (_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), link) : y;\n  };\n\n  link.context = function (_) {\n    return arguments.length ? (context = _ == null ? null : _, link) : context;\n  };\n\n  return link;\n}\n\nfunction curveHorizontal(context, x0, y0, x1, y1) {\n  context.moveTo(x0, y0);\n  context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);\n}\n\nfunction curveVertical(context, x0, y0, x1, y1) {\n  context.moveTo(x0, y0);\n  context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);\n}\n\nfunction curveRadial(context, x0, y0, x1, y1) {\n  var p0 = pointRadial(x0, y0),\n      p1 = pointRadial(x0, y0 = (y0 + y1) / 2),\n      p2 = pointRadial(x1, y0),\n      p3 = pointRadial(x1, y1);\n  context.moveTo(p0[0], p0[1]);\n  context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\nexport function linkHorizontal() {\n  return link(curveHorizontal);\n}\nexport function linkVertical() {\n  return link(curveVertical);\n}\nexport function linkRadial() {\n  var l = link(curveRadial);\n  l.angle = l.x, delete l.x;\n  l.radius = l.y, delete l.y;\n  return l;\n}","import { pi, tau } from \"../math.js\";\nexport default {\n  draw: function draw(context, size) {\n    var r = Math.sqrt(size / pi);\n    context.moveTo(r, 0);\n    context.arc(0, 0, r, 0, tau);\n  }\n};","export default {\n  draw: function draw(context, size) {\n    var r = Math.sqrt(size / 5) / 2;\n    context.moveTo(-3 * r, -r);\n    context.lineTo(-r, -r);\n    context.lineTo(-r, -3 * r);\n    context.lineTo(r, -3 * r);\n    context.lineTo(r, -r);\n    context.lineTo(3 * r, -r);\n    context.lineTo(3 * r, r);\n    context.lineTo(r, r);\n    context.lineTo(r, 3 * r);\n    context.lineTo(-r, 3 * r);\n    context.lineTo(-r, r);\n    context.lineTo(-3 * r, r);\n    context.closePath();\n  }\n};","var tan30 = Math.sqrt(1 / 3),\n    tan30_2 = tan30 * 2;\nexport default {\n  draw: function draw(context, size) {\n    var y = Math.sqrt(size / tan30_2),\n        x = y * tan30;\n    context.moveTo(0, -y);\n    context.lineTo(x, 0);\n    context.lineTo(0, y);\n    context.lineTo(-x, 0);\n    context.closePath();\n  }\n};","import { pi, tau } from \"../math.js\";\nvar ka = 0.89081309152928522810,\n    kr = Math.sin(pi / 10) / Math.sin(7 * pi / 10),\n    kx = Math.sin(tau / 10) * kr,\n    ky = -Math.cos(tau / 10) * kr;\nexport default {\n  draw: function draw(context, size) {\n    var r = Math.sqrt(size * ka),\n        x = kx * r,\n        y = ky * r;\n    context.moveTo(0, -r);\n    context.lineTo(x, y);\n\n    for (var i = 1; i < 5; ++i) {\n      var a = tau * i / 5,\n          c = Math.cos(a),\n          s = Math.sin(a);\n      context.lineTo(s * r, -c * r);\n      context.lineTo(c * x - s * y, s * x + c * y);\n    }\n\n    context.closePath();\n  }\n};","export default {\n  draw: function draw(context, size) {\n    var w = Math.sqrt(size),\n        x = -w / 2;\n    context.rect(x, x, w, w);\n  }\n};","var sqrt3 = Math.sqrt(3);\nexport default {\n  draw: function draw(context, size) {\n    var y = -Math.sqrt(size / (sqrt3 * 3));\n    context.moveTo(0, y * 2);\n    context.lineTo(-sqrt3 * y, -y);\n    context.lineTo(sqrt3 * y, -y);\n    context.closePath();\n  }\n};","var c = -0.5,\n    s = Math.sqrt(3) / 2,\n    k = 1 / Math.sqrt(12),\n    a = (k / 2 + 1) * 3;\nexport default {\n  draw: function draw(context, size) {\n    var r = Math.sqrt(size / a),\n        x0 = r / 2,\n        y0 = r * k,\n        x1 = x0,\n        y1 = r * k + r,\n        x2 = -x1,\n        y2 = y1;\n    context.moveTo(x0, y0);\n    context.lineTo(x1, y1);\n    context.lineTo(x2, y2);\n    context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n    context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n    context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n    context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n    context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n    context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n    context.closePath();\n  }\n};","import { path } from \"d3-path\";\nimport circle from \"./symbol/circle.js\";\nimport cross from \"./symbol/cross.js\";\nimport diamond from \"./symbol/diamond.js\";\nimport star from \"./symbol/star.js\";\nimport square from \"./symbol/square.js\";\nimport triangle from \"./symbol/triangle.js\";\nimport wye from \"./symbol/wye.js\";\nimport constant from \"./constant.js\";\nexport var symbols = [circle, cross, diamond, square, star, triangle, wye];\nexport default function () {\n  var type = constant(circle),\n      size = constant(64),\n      context = null;\n\n  function symbol() {\n    var buffer;\n    if (!context) context = buffer = path();\n    type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  symbol.type = function (_) {\n    return arguments.length ? (type = typeof _ === \"function\" ? _ : constant(_), symbol) : type;\n  };\n\n  symbol.size = function (_) {\n    return arguments.length ? (size = typeof _ === \"function\" ? _ : constant(+_), symbol) : size;\n  };\n\n  symbol.context = function (_) {\n    return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n  };\n\n  return symbol;\n}","export default function () {}","function _point(that, x, y) {\n  that._context.bezierCurveTo((2 * that._x0 + that._x1) / 3, (2 * that._y0 + that._y1) / 3, (that._x0 + 2 * that._x1) / 3, (that._y0 + 2 * that._y1) / 3, (that._x0 + 4 * that._x1 + x) / 6, (that._y0 + 4 * that._y1 + y) / 6);\n}\n\nexport { _point as point };\nexport function Basis(context) {\n  this._context = context;\n}\nBasis.prototype = {\n  areaStart: function areaStart() {\n    this._line = 0;\n  },\n  areaEnd: function areaEnd() {\n    this._line = NaN;\n  },\n  lineStart: function lineStart() {\n    this._x0 = this._x1 = this._y0 = this._y1 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function lineEnd() {\n    switch (this._point) {\n      case 3:\n        _point(this, this._x1, this._y1);\n\n      // proceed\n\n      case 2:\n        this._context.lineTo(this._x1, this._y1);\n\n        break;\n    }\n\n    if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function point(x, y) {\n    x = +x, y = +y;\n\n    switch (this._point) {\n      case 0:\n        this._point = 1;\n        this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n        break;\n\n      case 1:\n        this._point = 2;\n        break;\n\n      case 2:\n        this._point = 3;\n\n        this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);\n\n      // proceed\n\n      default:\n        _point(this, x, y);\n\n        break;\n    }\n\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\nexport default function (context) {\n  return new Basis(context);\n}","import noop from \"../noop.js\";\nimport { point as _point } from \"./basis.js\";\n\nfunction BasisClosed(context) {\n  this._context = context;\n}\n\nBasisClosed.prototype = {\n  areaStart: noop,\n  areaEnd: noop,\n  lineStart: function lineStart() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function lineEnd() {\n    switch (this._point) {\n      case 1:\n        {\n          this._context.moveTo(this._x2, this._y2);\n\n          this._context.closePath();\n\n          break;\n        }\n\n      case 2:\n        {\n          this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n\n          this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n\n          this._context.closePath();\n\n          break;\n        }\n\n      case 3:\n        {\n          this.point(this._x2, this._y2);\n          this.point(this._x3, this._y3);\n          this.point(this._x4, this._y4);\n          break;\n        }\n    }\n  },\n  point: function point(x, y) {\n    x = +x, y = +y;\n\n    switch (this._point) {\n      case 0:\n        this._point = 1;\n        this._x2 = x, this._y2 = y;\n        break;\n\n      case 1:\n        this._point = 2;\n        this._x3 = x, this._y3 = y;\n        break;\n\n      case 2:\n        this._point = 3;\n        this._x4 = x, this._y4 = y;\n\n        this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6);\n\n        break;\n\n      default:\n        _point(this, x, y);\n\n        break;\n    }\n\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\nexport default function (context) {\n  return new BasisClosed(context);\n}","import { point as _point } from \"./basis.js\";\n\nfunction BasisOpen(context) {\n  this._context = context;\n}\n\nBasisOpen.prototype = {\n  areaStart: function areaStart() {\n    this._line = 0;\n  },\n  areaEnd: function areaEnd() {\n    this._line = NaN;\n  },\n  lineStart: function lineStart() {\n    this._x0 = this._x1 = this._y0 = this._y1 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function lineEnd() {\n    if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function point(x, y) {\n    x = +x, y = +y;\n\n    switch (this._point) {\n      case 0:\n        this._point = 1;\n        break;\n\n      case 1:\n        this._point = 2;\n        break;\n\n      case 2:\n        this._point = 3;\n        var x0 = (this._x0 + 4 * this._x1 + x) / 6,\n            y0 = (this._y0 + 4 * this._y1 + y) / 6;\n        this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0);\n        break;\n\n      case 3:\n        this._point = 4;\n      // proceed\n\n      default:\n        _point(this, x, y);\n\n        break;\n    }\n\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n  }\n};\nexport default function (context) {\n  return new BasisOpen(context);\n}","import { Basis } from \"./basis.js\";\n\nfunction Bundle(context, beta) {\n  this._basis = new Basis(context);\n  this._beta = beta;\n}\n\nBundle.prototype = {\n  lineStart: function lineStart() {\n    this._x = [];\n    this._y = [];\n\n    this._basis.lineStart();\n  },\n  lineEnd: function lineEnd() {\n    var x = this._x,\n        y = this._y,\n        j = x.length - 1;\n\n    if (j > 0) {\n      var x0 = x[0],\n          y0 = y[0],\n          dx = x[j] - x0,\n          dy = y[j] - y0,\n          i = -1,\n          t;\n\n      while (++i <= j) {\n        t = i / j;\n\n        this._basis.point(this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), this._beta * y[i] + (1 - this._beta) * (y0 + t * dy));\n      }\n    }\n\n    this._x = this._y = null;\n\n    this._basis.lineEnd();\n  },\n  point: function point(x, y) {\n    this._x.push(+x);\n\n    this._y.push(+y);\n  }\n};\nexport default (function custom(beta) {\n  function bundle(context) {\n    return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n  }\n\n  bundle.beta = function (beta) {\n    return custom(+beta);\n  };\n\n  return bundle;\n})(0.85);","function _point(that, x, y) {\n  that._context.bezierCurveTo(that._x1 + that._k * (that._x2 - that._x0), that._y1 + that._k * (that._y2 - that._y0), that._x2 + that._k * (that._x1 - x), that._y2 + that._k * (that._y1 - y), that._x2, that._y2);\n}\n\nexport { _point as point };\nexport function Cardinal(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\nCardinal.prototype = {\n  areaStart: function areaStart() {\n    this._line = 0;\n  },\n  areaEnd: function areaEnd() {\n    this._line = NaN;\n  },\n  lineStart: function lineStart() {\n    this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function lineEnd() {\n    switch (this._point) {\n      case 2:\n        this._context.lineTo(this._x2, this._y2);\n\n        break;\n\n      case 3:\n        _point(this, this._x1, this._y1);\n\n        break;\n    }\n\n    if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function point(x, y) {\n    x = +x, y = +y;\n\n    switch (this._point) {\n      case 0:\n        this._point = 1;\n        this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n        break;\n\n      case 1:\n        this._point = 2;\n        this._x1 = x, this._y1 = y;\n        break;\n\n      case 2:\n        this._point = 3;\n      // proceed\n\n      default:\n        _point(this, x, y);\n\n        break;\n    }\n\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\nexport default (function custom(tension) {\n  function cardinal(context) {\n    return new Cardinal(context, tension);\n  }\n\n  cardinal.tension = function (tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0);","import noop from \"../noop.js\";\nimport { point as _point } from \"./cardinal.js\";\nexport function CardinalClosed(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\nCardinalClosed.prototype = {\n  areaStart: noop,\n  areaEnd: noop,\n  lineStart: function lineStart() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function lineEnd() {\n    switch (this._point) {\n      case 1:\n        {\n          this._context.moveTo(this._x3, this._y3);\n\n          this._context.closePath();\n\n          break;\n        }\n\n      case 2:\n        {\n          this._context.lineTo(this._x3, this._y3);\n\n          this._context.closePath();\n\n          break;\n        }\n\n      case 3:\n        {\n          this.point(this._x3, this._y3);\n          this.point(this._x4, this._y4);\n          this.point(this._x5, this._y5);\n          break;\n        }\n    }\n  },\n  point: function point(x, y) {\n    x = +x, y = +y;\n\n    switch (this._point) {\n      case 0:\n        this._point = 1;\n        this._x3 = x, this._y3 = y;\n        break;\n\n      case 1:\n        this._point = 2;\n\n        this._context.moveTo(this._x4 = x, this._y4 = y);\n\n        break;\n\n      case 2:\n        this._point = 3;\n        this._x5 = x, this._y5 = y;\n        break;\n\n      default:\n        _point(this, x, y);\n\n        break;\n    }\n\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\nexport default (function custom(tension) {\n  function cardinal(context) {\n    return new CardinalClosed(context, tension);\n  }\n\n  cardinal.tension = function (tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0);","import { point as _point } from \"./cardinal.js\";\nexport function CardinalOpen(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\nCardinalOpen.prototype = {\n  areaStart: function areaStart() {\n    this._line = 0;\n  },\n  areaEnd: function areaEnd() {\n    this._line = NaN;\n  },\n  lineStart: function lineStart() {\n    this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function lineEnd() {\n    if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function point(x, y) {\n    x = +x, y = +y;\n\n    switch (this._point) {\n      case 0:\n        this._point = 1;\n        break;\n\n      case 1:\n        this._point = 2;\n        break;\n\n      case 2:\n        this._point = 3;\n        this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);\n        break;\n\n      case 3:\n        this._point = 4;\n      // proceed\n\n      default:\n        _point(this, x, y);\n\n        break;\n    }\n\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\nexport default (function custom(tension) {\n  function cardinal(context) {\n    return new CardinalOpen(context, tension);\n  }\n\n  cardinal.tension = function (tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0);","import { epsilon } from \"../math.js\";\nimport { Cardinal } from \"./cardinal.js\";\n\nfunction _point(that, x, y) {\n  var x1 = that._x1,\n      y1 = that._y1,\n      x2 = that._x2,\n      y2 = that._y2;\n\n  if (that._l01_a > epsilon) {\n    var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n        n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n    x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n    y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n  }\n\n  if (that._l23_a > epsilon) {\n    var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n        m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n    x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n    y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n  }\n\n  that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nexport { _point as point };\n\nfunction CatmullRom(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n  areaStart: function areaStart() {\n    this._line = 0;\n  },\n  areaEnd: function areaEnd() {\n    this._line = NaN;\n  },\n  lineStart: function lineStart() {\n    this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;\n    this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;\n  },\n  lineEnd: function lineEnd() {\n    switch (this._point) {\n      case 2:\n        this._context.lineTo(this._x2, this._y2);\n\n        break;\n\n      case 3:\n        this.point(this._x2, this._y2);\n        break;\n    }\n\n    if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function point(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0:\n        this._point = 1;\n        this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n        break;\n\n      case 1:\n        this._point = 2;\n        break;\n\n      case 2:\n        this._point = 3;\n      // proceed\n\n      default:\n        _point(this, x, y);\n\n        break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\nexport default (function custom(alpha) {\n  function catmullRom(context) {\n    return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n  }\n\n  catmullRom.alpha = function (alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5);","import { CardinalClosed } from \"./cardinalClosed.js\";\nimport noop from \"../noop.js\";\nimport { point as _point } from \"./catmullRom.js\";\n\nfunction CatmullRomClosed(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n  areaStart: noop,\n  areaEnd: noop,\n  lineStart: function lineStart() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n    this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;\n  },\n  lineEnd: function lineEnd() {\n    switch (this._point) {\n      case 1:\n        {\n          this._context.moveTo(this._x3, this._y3);\n\n          this._context.closePath();\n\n          break;\n        }\n\n      case 2:\n        {\n          this._context.lineTo(this._x3, this._y3);\n\n          this._context.closePath();\n\n          break;\n        }\n\n      case 3:\n        {\n          this.point(this._x3, this._y3);\n          this.point(this._x4, this._y4);\n          this.point(this._x5, this._y5);\n          break;\n        }\n    }\n  },\n  point: function point(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0:\n        this._point = 1;\n        this._x3 = x, this._y3 = y;\n        break;\n\n      case 1:\n        this._point = 2;\n\n        this._context.moveTo(this._x4 = x, this._y4 = y);\n\n        break;\n\n      case 2:\n        this._point = 3;\n        this._x5 = x, this._y5 = y;\n        break;\n\n      default:\n        _point(this, x, y);\n\n        break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\nexport default (function custom(alpha) {\n  function catmullRom(context) {\n    return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n  }\n\n  catmullRom.alpha = function (alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5);","import { CardinalOpen } from \"./cardinalOpen.js\";\nimport { point as _point } from \"./catmullRom.js\";\n\nfunction CatmullRomOpen(context, alpha) {\n  this._context = context;\n  this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n  areaStart: function areaStart() {\n    this._line = 0;\n  },\n  areaEnd: function areaEnd() {\n    this._line = NaN;\n  },\n  lineStart: function lineStart() {\n    this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;\n    this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;\n  },\n  lineEnd: function lineEnd() {\n    if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function point(x, y) {\n    x = +x, y = +y;\n\n    if (this._point) {\n      var x23 = this._x2 - x,\n          y23 = this._y2 - y;\n      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n    }\n\n    switch (this._point) {\n      case 0:\n        this._point = 1;\n        break;\n\n      case 1:\n        this._point = 2;\n        break;\n\n      case 2:\n        this._point = 3;\n        this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);\n        break;\n\n      case 3:\n        this._point = 4;\n      // proceed\n\n      default:\n        _point(this, x, y);\n\n        break;\n    }\n\n    this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n    this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\nexport default (function custom(alpha) {\n  function catmullRom(context) {\n    return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n  }\n\n  catmullRom.alpha = function (alpha) {\n    return custom(+alpha);\n  };\n\n  return catmullRom;\n})(0.5);","import noop from \"../noop.js\";\n\nfunction LinearClosed(context) {\n  this._context = context;\n}\n\nLinearClosed.prototype = {\n  areaStart: noop,\n  areaEnd: noop,\n  lineStart: function lineStart() {\n    this._point = 0;\n  },\n  lineEnd: function lineEnd() {\n    if (this._point) this._context.closePath();\n  },\n  point: function point(x, y) {\n    x = +x, y = +y;\n    if (this._point) this._context.lineTo(x, y);else this._point = 1, this._context.moveTo(x, y);\n  }\n};\nexport default function (context) {\n  return new LinearClosed(context);\n}","function sign(x) {\n  return x < 0 ? -1 : 1;\n} // Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\n\n\nfunction slope3(that, x2, y2) {\n  var h0 = that._x1 - that._x0,\n      h1 = x2 - that._x1,\n      s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n      s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n      p = (s0 * h1 + s1 * h0) / (h0 + h1);\n  return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n} // Calculate a one-sided slope.\n\n\nfunction slope2(that, t) {\n  var h = that._x1 - that._x0;\n  return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n} // According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\n\n\nfunction _point(that, t0, t1) {\n  var x0 = that._x0,\n      y0 = that._y0,\n      x1 = that._x1,\n      y1 = that._y1,\n      dx = (x1 - x0) / 3;\n\n  that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n  this._context = context;\n}\n\nMonotoneX.prototype = {\n  areaStart: function areaStart() {\n    this._line = 0;\n  },\n  areaEnd: function areaEnd() {\n    this._line = NaN;\n  },\n  lineStart: function lineStart() {\n    this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function lineEnd() {\n    switch (this._point) {\n      case 2:\n        this._context.lineTo(this._x1, this._y1);\n\n        break;\n\n      case 3:\n        _point(this, this._t0, slope2(this, this._t0));\n\n        break;\n    }\n\n    if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function point(x, y) {\n    var t1 = NaN;\n    x = +x, y = +y;\n    if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n\n    switch (this._point) {\n      case 0:\n        this._point = 1;\n        this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n        break;\n\n      case 1:\n        this._point = 2;\n        break;\n\n      case 2:\n        this._point = 3;\n\n        _point(this, slope2(this, t1 = slope3(this, x, y)), t1);\n\n        break;\n\n      default:\n        _point(this, this._t0, t1 = slope3(this, x, y));\n\n        break;\n    }\n\n    this._x0 = this._x1, this._x1 = x;\n    this._y0 = this._y1, this._y1 = y;\n    this._t0 = t1;\n  }\n};\n\nfunction MonotoneY(context) {\n  this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function (x, y) {\n  MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n  this._context = context;\n}\n\nReflectContext.prototype = {\n  moveTo: function moveTo(x, y) {\n    this._context.moveTo(y, x);\n  },\n  closePath: function closePath() {\n    this._context.closePath();\n  },\n  lineTo: function lineTo(x, y) {\n    this._context.lineTo(y, x);\n  },\n  bezierCurveTo: function bezierCurveTo(x1, y1, x2, y2, x, y) {\n    this._context.bezierCurveTo(y1, x1, y2, x2, y, x);\n  }\n};\nexport function monotoneX(context) {\n  return new MonotoneX(context);\n}\nexport function monotoneY(context) {\n  return new MonotoneY(context);\n}","function Natural(context) {\n  this._context = context;\n}\n\nNatural.prototype = {\n  areaStart: function areaStart() {\n    this._line = 0;\n  },\n  areaEnd: function areaEnd() {\n    this._line = NaN;\n  },\n  lineStart: function lineStart() {\n    this._x = [];\n    this._y = [];\n  },\n  lineEnd: function lineEnd() {\n    var x = this._x,\n        y = this._y,\n        n = x.length;\n\n    if (n) {\n      this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n\n      if (n === 2) {\n        this._context.lineTo(x[1], y[1]);\n      } else {\n        var px = controlPoints(x),\n            py = controlPoints(y);\n\n        for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n          this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n        }\n      }\n    }\n\n    if (this._line || this._line !== 0 && n === 1) this._context.closePath();\n    this._line = 1 - this._line;\n    this._x = this._y = null;\n  },\n  point: function point(x, y) {\n    this._x.push(+x);\n\n    this._y.push(+y);\n  }\n}; // See https://www.particleincell.com/2012/bezier-splines/ for derivation.\n\nfunction controlPoints(x) {\n  var i,\n      n = x.length - 1,\n      m,\n      a = new Array(n),\n      b = new Array(n),\n      r = new Array(n);\n  a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n\n  for (i = 1; i < n - 1; ++i) {\n    a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n  }\n\n  a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n\n  for (i = 1; i < n; ++i) {\n    m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n  }\n\n  a[n - 1] = r[n - 1] / b[n - 1];\n\n  for (i = n - 2; i >= 0; --i) {\n    a[i] = (r[i] - a[i + 1]) / b[i];\n  }\n\n  b[n - 1] = (x[n] + a[n - 1]) / 2;\n\n  for (i = 0; i < n - 1; ++i) {\n    b[i] = 2 * x[i + 1] - a[i + 1];\n  }\n\n  return [a, b];\n}\n\nexport default function (context) {\n  return new Natural(context);\n}","function Step(context, t) {\n  this._context = context;\n  this._t = t;\n}\n\nStep.prototype = {\n  areaStart: function areaStart() {\n    this._line = 0;\n  },\n  areaEnd: function areaEnd() {\n    this._line = NaN;\n  },\n  lineStart: function lineStart() {\n    this._x = this._y = NaN;\n    this._point = 0;\n  },\n  lineEnd: function lineEnd() {\n    if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n    if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n    if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n  },\n  point: function point(x, y) {\n    x = +x, y = +y;\n\n    switch (this._point) {\n      case 0:\n        this._point = 1;\n        this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n        break;\n\n      case 1:\n        this._point = 2;\n      // proceed\n\n      default:\n        {\n          if (this._t <= 0) {\n            this._context.lineTo(this._x, y);\n\n            this._context.lineTo(x, y);\n          } else {\n            var x1 = this._x * (1 - this._t) + x * this._t;\n\n            this._context.lineTo(x1, this._y);\n\n            this._context.lineTo(x1, y);\n          }\n\n          break;\n        }\n    }\n\n    this._x = x, this._y = y;\n  }\n};\nexport default function (context) {\n  return new Step(context, 0.5);\n}\nexport function stepBefore(context) {\n  return new Step(context, 0);\n}\nexport function stepAfter(context) {\n  return new Step(context, 1);\n}","export default function (series, order) {\n  if (!((n = series.length) > 1)) return;\n\n  for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {\n    s0 = s1, s1 = series[order[i]];\n\n    for (j = 0; j < m; ++j) {\n      s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];\n    }\n  }\n}","export default function (series) {\n  var n = series.length,\n      o = new Array(n);\n\n  while (--n >= 0) {\n    o[n] = n;\n  }\n\n  return o;\n}","import { slice } from \"./array.js\";\nimport constant from \"./constant.js\";\nimport offsetNone from \"./offset/none.js\";\nimport orderNone from \"./order/none.js\";\n\nfunction stackValue(d, key) {\n  return d[key];\n}\n\nexport default function () {\n  var keys = constant([]),\n      order = orderNone,\n      offset = offsetNone,\n      value = stackValue;\n\n  function stack(data) {\n    var kz = keys.apply(this, arguments),\n        i,\n        m = data.length,\n        n = kz.length,\n        sz = new Array(n),\n        oz;\n\n    for (i = 0; i < n; ++i) {\n      for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) {\n        si[j] = sij = [0, +value(data[j], ki, j, data)];\n        sij.data = data[j];\n      }\n\n      si.key = ki;\n    }\n\n    for (i = 0, oz = order(sz); i < n; ++i) {\n      sz[oz[i]].index = i;\n    }\n\n    offset(sz, oz);\n    return sz;\n  }\n\n  stack.keys = function (_) {\n    return arguments.length ? (keys = typeof _ === \"function\" ? _ : constant(slice.call(_)), stack) : keys;\n  };\n\n  stack.value = function (_) {\n    return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), stack) : value;\n  };\n\n  stack.order = function (_) {\n    return arguments.length ? (order = _ == null ? orderNone : typeof _ === \"function\" ? _ : constant(slice.call(_)), stack) : order;\n  };\n\n  stack.offset = function (_) {\n    return arguments.length ? (offset = _ == null ? offsetNone : _, stack) : offset;\n  };\n\n  return stack;\n}","import none from \"./none.js\";\nexport default function (series, order) {\n  if (!((n = series.length) > 0)) return;\n\n  for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {\n    for (y = i = 0; i < n; ++i) {\n      y += series[i][j][1] || 0;\n    }\n\n    if (y) for (i = 0; i < n; ++i) {\n      series[i][j][1] /= y;\n    }\n  }\n\n  none(series, order);\n}","export default function (series, order) {\n  if (!((n = series.length) > 0)) return;\n\n  for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {\n    for (yp = yn = 0, i = 0; i < n; ++i) {\n      if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) {\n        d[0] = yp, d[1] = yp += dy;\n      } else if (dy < 0) {\n        d[1] = yn, d[0] = yn += dy;\n      } else {\n        d[0] = 0, d[1] = dy;\n      }\n    }\n  }\n}","import none from \"./none.js\";\nexport default function (series, order) {\n  if (!((n = series.length) > 0)) return;\n\n  for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {\n    for (var i = 0, y = 0; i < n; ++i) {\n      y += series[i][j][1] || 0;\n    }\n\n    s0[j][1] += s0[j][0] = -y / 2;\n  }\n\n  none(series, order);\n}","import none from \"./none.js\";\nexport default function (series, order) {\n  if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;\n\n  for (var y = 0, j = 1, s0, m, n; j < m; ++j) {\n    for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {\n      var si = series[order[i]],\n          sij0 = si[j][1] || 0,\n          sij1 = si[j - 1][1] || 0,\n          s3 = (sij0 - sij1) / 2;\n\n      for (var k = 0; k < i; ++k) {\n        var sk = series[order[k]],\n            skj0 = sk[j][1] || 0,\n            skj1 = sk[j - 1][1] || 0;\n        s3 += skj0 - skj1;\n      }\n\n      s1 += sij0, s2 += s3 * sij0;\n    }\n\n    s0[j - 1][1] += s0[j - 1][0] = y;\n    if (s1) y -= s2 / s1;\n  }\n\n  s0[j - 1][1] += s0[j - 1][0] = y;\n  none(series, order);\n}","import none from \"./none.js\";\nexport default function (series) {\n  var peaks = series.map(peak);\n  return none(series).sort(function (a, b) {\n    return peaks[a] - peaks[b];\n  });\n}\n\nfunction peak(series) {\n  var i = -1,\n      j = 0,\n      n = series.length,\n      vi,\n      vj = -Infinity;\n\n  while (++i < n) {\n    if ((vi = +series[i][1]) > vj) vj = vi, j = i;\n  }\n\n  return j;\n}","import none from \"./none.js\";\nexport default function (series) {\n  var sums = series.map(sum);\n  return none(series).sort(function (a, b) {\n    return sums[a] - sums[b];\n  });\n}\nexport function sum(series) {\n  var s = 0,\n      i = -1,\n      n = series.length,\n      v;\n\n  while (++i < n) {\n    if (v = +series[i][1]) s += v;\n  }\n\n  return s;\n}","import ascending from \"./ascending.js\";\nexport default function (series) {\n  return ascending(series).reverse();\n}","import appearance from \"./appearance.js\";\nimport { sum } from \"./ascending.js\";\nexport default function (series) {\n  var n = series.length,\n      i,\n      j,\n      sums = series.map(sum),\n      order = appearance(series),\n      top = 0,\n      bottom = 0,\n      tops = [],\n      bottoms = [];\n\n  for (i = 0; i < n; ++i) {\n    j = order[i];\n\n    if (top < bottom) {\n      top += sums[j];\n      tops.push(j);\n    } else {\n      bottom += sums[j];\n      bottoms.push(j);\n    }\n  }\n\n  return bottoms.reverse().concat(tops);\n}","import none from \"./none.js\";\nexport default function (series) {\n  return none(series).reverse();\n}","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport * as d3Shape from 'd3-shape';\nimport Animation from '../../animation';\nimport { DEFAULT_OPACITY } from '../../theme';\nimport { ANIMATED_SERIES_PROPS } from '../../utils/series-utils';\nimport { warning } from '../../utils/react-utils';\nimport AbstractSeries from './abstract-series';\nvar predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--line';\n\nvar AreaSeries = function (_AbstractSeries) {\n  _inherits(AreaSeries, _AbstractSeries);\n\n  function AreaSeries() {\n    _classCallCheck(this, AreaSeries);\n\n    return _possibleConstructorReturn(this, (AreaSeries.__proto__ || Object.getPrototypeOf(AreaSeries)).apply(this, arguments));\n  }\n\n  _createClass(AreaSeries, [{\n    key: '_renderArea',\n    value: function _renderArea(data, x, y0, y, curve, getNull) {\n      var area = d3Shape.area();\n\n      if (curve !== null) {\n        if (typeof curve === 'string' && d3Shape[curve]) {\n          area = area.curve(d3Shape[curve]);\n        } else if (typeof curve === 'function') {\n          area = area.curve(curve);\n        }\n      }\n\n      area = area.defined(getNull);\n      area = area.x(x).y0(y0).y1(y);\n      return area(data);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          animation = _props.animation,\n          className = _props.className,\n          curve = _props.curve,\n          data = _props.data,\n          marginLeft = _props.marginLeft,\n          marginTop = _props.marginTop,\n          style = _props.style;\n\n      if (this.props.nullAccessor) {\n        warning('nullAccessor has been renamed to getNull', true);\n      }\n\n      if (!data) {\n        return null;\n      }\n\n      if (animation) {\n        return React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: ANIMATED_SERIES_PROPS\n        }), React.createElement(AreaSeries, _extends({}, this.props, {\n          animation: null\n        })));\n      }\n\n      var x = this._getAttributeFunctor('x');\n\n      var y = this._getAttributeFunctor('y');\n\n      var y0 = this._getAttr0Functor('y');\n\n      var stroke = this._getAttributeValue('stroke') || this._getAttributeValue('color');\n\n      var fill = this._getAttributeValue('fill') || this._getAttributeValue('color');\n\n      var newOpacity = this._getAttributeValue('opacity');\n\n      var opacity = Number.isFinite(newOpacity) ? newOpacity : DEFAULT_OPACITY;\n      var getNull = this.props.nullAccessor || this.props.getNull;\n\n      var d = this._renderArea(data, x, y0, y, curve, getNull);\n\n      return React.createElement('path', {\n        d: d,\n        className: predefinedClassName + ' ' + className,\n        transform: 'translate(' + marginLeft + ',' + marginTop + ')',\n        onMouseOver: this._seriesMouseOverHandler,\n        onMouseOut: this._seriesMouseOutHandler,\n        onClick: this._seriesClickHandler,\n        onContextMenu: this._seriesRightClickHandler,\n        style: _extends({\n          opacity: opacity,\n          stroke: stroke,\n          fill: fill\n        }, style)\n      });\n    }\n  }]);\n\n  return AreaSeries;\n}(AbstractSeries);\n\nAreaSeries.displayName = 'AreaSeries';\nAreaSeries.defaultProps = _extends({}, AbstractSeries.defaultProps, {\n  getNull: function getNull() {\n    return true;\n  }\n});\nexport default AreaSeries;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n}; // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nvar CLASSES = {\n  bottom: 'rv-xy-plot__borders-bottom',\n  container: 'rv-xy-plot__borders',\n  left: 'rv-xy-plot__borders-left',\n  right: 'rv-xy-plot__borders-right',\n  top: 'rv-xy-plot__borders-top'\n};\n\nfunction Borders(props) {\n  var marginTop = props.marginTop,\n      marginBottom = props.marginBottom,\n      marginLeft = props.marginLeft,\n      marginRight = props.marginRight,\n      innerWidth = props.innerWidth,\n      innerHeight = props.innerHeight,\n      style = props.style,\n      className = props.className;\n  var height = innerHeight + marginTop + marginBottom;\n  var width = innerWidth + marginLeft + marginRight;\n  return React.createElement('g', {\n    className: CLASSES.container + ' ' + className\n  }, React.createElement('rect', {\n    className: CLASSES.bottom + ' ' + className + '-bottom',\n    style: _extends({}, style.all, style.bottom),\n    x: 0,\n    y: height - marginBottom,\n    width: width,\n    height: marginBottom\n  }), React.createElement('rect', {\n    className: CLASSES.left + ' ' + className + '-left',\n    style: _extends({}, style.all, style.left),\n    x: 0,\n    y: 0,\n    width: marginLeft,\n    height: height\n  }), React.createElement('rect', {\n    className: CLASSES.right + ' ' + className + '-right',\n    style: _extends({}, style.all, style.right),\n    x: width - marginRight,\n    y: 0,\n    width: marginRight,\n    height: height\n  }), React.createElement('rect', {\n    className: CLASSES.top + ' ' + className + '-top',\n    style: _extends({}, style.all, style.top),\n    x: 0,\n    y: 0,\n    width: width,\n    height: marginTop\n  }));\n}\n\nBorders.displayName = 'Borders';\nBorders.defaultProps = {\n  className: '',\n  style: {\n    all: {},\n    bottom: {},\n    left: {},\n    right: {},\n    top: {}\n  }\n};\nBorders.requiresSVG = true;\nexport default Borders;","var _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2018 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\n\nvar ChartLabel = function (_React$PureComponent) {\n  _inherits(ChartLabel, _React$PureComponent);\n\n  function ChartLabel() {\n    _classCallCheck(this, ChartLabel);\n\n    return _possibleConstructorReturn(this, (ChartLabel.__proto__ || Object.getPrototypeOf(ChartLabel)).apply(this, arguments));\n  }\n\n  _createClass(ChartLabel, [{\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          innerHeight = _props.innerHeight,\n          innerWidth = _props.innerWidth,\n          marginBottom = _props.marginBottom,\n          marginLeft = _props.marginLeft,\n          marginRight = _props.marginRight,\n          marginTop = _props.marginTop,\n          className = _props.className,\n          includeMargin = _props.includeMargin,\n          style = _props.style,\n          text = _props.text,\n          xPercent = _props.xPercent,\n          yPercent = _props.yPercent;\n      var width = innerWidth + (includeMargin ? marginLeft + marginRight : 0);\n      var height = innerHeight + (includeMargin ? marginTop + marginBottom : 0);\n      var xPos = width * xPercent + (includeMargin ? 0 : marginLeft);\n      var yPos = height * yPercent + (includeMargin ? marginLeft : 0);\n      return React.createElement('g', {\n        transform: 'translate(' + xPos + ', ' + yPos + ')',\n        className: 'rv-xy-plot__axis__title ' + className\n      }, React.createElement('text', style, text));\n    }\n  }], [{\n    key: 'requiresSVG',\n    get: function get() {\n      return true;\n    }\n  }]);\n\n  return ChartLabel;\n}(React.PureComponent);\n\nChartLabel.displayName = 'ChartLabel';\nChartLabel.defaultProps = {\n  className: '',\n  includeMargin: true,\n  text: '',\n  xPercent: 0,\n  yPercent: 0,\n  style: {}\n};\nexport default ChartLabel;","// Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport { range } from 'd3-array';\nimport { scaleLinear } from 'd3-scale';\nexport var ORIENTATION = {\n  TOP: 'top',\n  LEFT: 'left',\n  RIGHT: 'right',\n  BOTTOM: 'bottom',\n  VERTICAL: 'vertical',\n  HORIZONTAL: 'horizontal'\n};\nexport var DIRECTION = {\n  VERTICAL: 'vertical',\n  HORIZONTAL: 'horizontal'\n};\n/**\n * Get total amount of ticks from a given size in pixels.\n * @param {number} size Size of the axis in pixels.\n * @returns {number} Total amount of ticks.\n */\n\nexport function getTicksTotalFromSize(size) {\n  if (size < 700) {\n    if (size > 300) {\n      return 10;\n    }\n\n    return 5;\n  }\n\n  return 20;\n}\n/**\n * Get the tick values from a given d3 scale.\n * @param {d3.scale} scale Scale function.\n * @param {number} tickTotal Total number of ticks\n * @param {Array} tickValues Array of tick values if they exist.\n * @returns {Array} Array of tick values.\n */\n\nexport function getTickValues(scale, tickTotal, tickValues) {\n  return !tickValues ? scale.ticks ? scale.ticks(tickTotal) : scale.domain() : tickValues;\n}\n/**\n * Generate a description of a decorative axis in terms of a linear equation\n * y = slope * x + offset in coordinates\n * @param {Object} axisStart Object of format {x, y} describing in coordinates\n * the start position of the decorative axis\n * @param {Object} axisEnd Object of format {x, y} describing in coordinates\n * the start position of the decorative axis\n * @returns {Number} Object describing each the line in coordinates\n */\n\nexport function generateFit(axisStart, axisEnd) {\n  // address the special case when the slope is infinite\n  if (axisStart.x === axisEnd.x) {\n    return {\n      left: axisStart.y,\n      right: axisEnd.y,\n      slope: 0,\n      offset: axisStart.x\n    };\n  }\n\n  var slope = (axisStart.y - axisEnd.y) / (axisStart.x - axisEnd.x);\n  return {\n    left: axisStart.x,\n    right: axisEnd.x,\n    // generate the linear projection of the axis direction\n    slope: slope,\n    offset: axisStart.y - slope * axisStart.x\n  };\n}\n/**\n * Generate a description of a decorative axis in terms of a linear equation\n * y = slope * x + offset in coordinates\n * @param props\n * props.@param {Object} axisStart Object of format {x, y} describing in coordinates\n * the start position of the decorative axis\n * props.@param {Object} axisEnd Object of format {x, y} describing in coordinates\n * the start position of the decorative axis\n * props.@param {Number} numberOfTicks The number of ticks on the axis\n * props.@param {Array.Numbers} axisDomain The values to be interpolated across for the axis\n * @returns {Number} Object describing the slope and the specific coordinates of the points\n */\n\nexport function generatePoints(_ref) {\n  var axisStart = _ref.axisStart,\n      axisEnd = _ref.axisEnd,\n      numberOfTicks = _ref.numberOfTicks,\n      axisDomain = _ref.axisDomain;\n\n  var _generateFit = generateFit(axisStart, axisEnd),\n      left = _generateFit.left,\n      right = _generateFit.right,\n      slope = _generateFit.slope,\n      offset = _generateFit.offset; // construct a linear band of points, then map them\n\n\n  var pointSlope = (right - left) / numberOfTicks;\n  var axisScale = scaleLinear().domain([left, right]).range(axisDomain);\n  var slopeVertical = axisStart.x === axisEnd.x;\n  return {\n    slope: slopeVertical ? Infinity : slope,\n    points: range(left, right + pointSlope, pointSlope).map(function (val) {\n      if (slopeVertical) {\n        return {\n          y: val,\n          x: slope * val + offset,\n          text: axisScale(val)\n        };\n      }\n\n      return {\n        x: val,\n        y: slope * val + offset,\n        text: axisScale(val)\n      };\n    }).slice(0, numberOfTicks + 1)\n  };\n}\n/**\n * Compute the angle (in radians) of a decorative axis\n * @param {Object} axisStart Object of format {x, y} describing in coordinates\n * the start position of the decorative axis\n * @param {Object} axisEnd Object of format {x, y} describing in coordinates\n * the start position of the decorative axis\n * @returns {Number} Angle in radials\n */\n\nexport function getAxisAngle(axisStart, axisEnd) {\n  if (axisStart.x === axisEnd.x) {\n    return axisEnd.y > axisStart.y ? Math.PI / 2 : 3 * Math.PI / 2;\n  }\n\n  return Math.atan((axisEnd.y - axisStart.y) / (axisEnd.x - axisStart.x));\n}\nexport default {\n  DIRECTION: DIRECTION,\n  ORIENTATION: ORIENTATION,\n  getTicksTotalFromSize: getTicksTotalFromSize,\n  getTickValues: getTickValues\n};","import \"core-js/modules/es.array.reduce.js\";\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React, { PureComponent } from 'react';\nimport { getAttributeScale } from '../utils/scales-utils';\nimport Animation, { AnimationPropType } from '../animation';\nimport { getTicksTotalFromSize, getTickValues } from '../utils/axis-utils';\nvar animatedProps = ['xRange', 'yRange', 'xDomain', 'yDomain', 'width', 'height', 'marginLeft', 'marginTop', 'marginRight', 'marginBottom', 'tickTotal'];\n\nvar CircularGridLines = function (_PureComponent) {\n  _inherits(CircularGridLines, _PureComponent);\n\n  function CircularGridLines() {\n    _classCallCheck(this, CircularGridLines);\n\n    return _possibleConstructorReturn(this, (CircularGridLines.__proto__ || Object.getPrototypeOf(CircularGridLines)).apply(this, arguments));\n  }\n\n  _createClass(CircularGridLines, [{\n    key: '_getDefaultProps',\n    value: function _getDefaultProps() {\n      var _props = this.props,\n          innerWidth = _props.innerWidth,\n          innerHeight = _props.innerHeight,\n          marginTop = _props.marginTop,\n          marginLeft = _props.marginLeft;\n      return {\n        left: marginLeft,\n        top: marginTop,\n        width: innerWidth,\n        height: innerHeight,\n        style: {},\n        tickTotal: getTicksTotalFromSize(Math.min(innerWidth, innerHeight))\n      };\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props2 = this.props,\n          animation = _props2.animation,\n          centerX = _props2.centerX,\n          centerY = _props2.centerY;\n\n      if (animation) {\n        return React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: animatedProps\n        }), React.createElement(CircularGridLines, _extends({}, this.props, {\n          animation: null\n        })));\n      }\n\n      var props = _extends({}, this._getDefaultProps(), this.props);\n\n      var tickTotal = props.tickTotal,\n          tickValues = props.tickValues,\n          marginLeft = props.marginLeft,\n          marginTop = props.marginTop,\n          rRange = props.rRange,\n          style = props.style;\n      var xScale = getAttributeScale(props, 'x');\n      var yScale = getAttributeScale(props, 'y');\n      var values = getTickValues(xScale, tickTotal, tickValues);\n      return React.createElement('g', {\n        transform: 'translate(' + (xScale(centerX) + marginLeft) + ',' + (yScale(centerY) + marginTop) + ')',\n        className: 'rv-xy-plot__circular-grid-lines'\n      }, values.reduce(function (res, value, index) {\n        var radius = xScale(value);\n\n        if (rRange && (radius < rRange[0] || radius > rRange[1])) {\n          return res;\n        }\n\n        return res.concat([React.createElement('circle', _extends({\n          cx: 0,\n          cy: 0,\n          r: radius\n        }, {\n          key: index,\n          className: 'rv-xy-plot__circular-grid-lines__line',\n          style: style\n        }))]);\n      }, []));\n    }\n  }]);\n\n  return CircularGridLines;\n}(PureComponent);\n\nCircularGridLines.displayName = 'CircularGridLines';\nCircularGridLines.defaultProps = {\n  centerX: 0,\n  centerY: 0\n};\nCircularGridLines.requiresSVG = true;\nexport default CircularGridLines;","var array = Array.prototype;\nexport var slice = array.slice;","export default function (a, b) {\n  return a - b;\n}","export default function (x) {\n  return function () {\n    return x;\n  };\n}","export default function (ring, hole) {\n  var i = -1,\n      n = hole.length,\n      c;\n\n  while (++i < n) {\n    if (c = ringContains(ring, hole[i])) return c;\n  }\n\n  return 0;\n}\n\nfunction ringContains(ring, point) {\n  var x = point[0],\n      y = point[1],\n      contains = -1;\n\n  for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) {\n    var pi = ring[i],\n        xi = pi[0],\n        yi = pi[1],\n        pj = ring[j],\n        xj = pj[0],\n        yj = pj[1];\n    if (segmentContains(pi, pj, point)) return 0;\n    if (yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi) contains = -contains;\n  }\n\n  return contains;\n}\n\nfunction segmentContains(a, b, c) {\n  var i;\n  return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]);\n}\n\nfunction collinear(a, b, c) {\n  return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]);\n}\n\nfunction within(p, q, r) {\n  return p <= q && q <= r || r <= q && q <= p;\n}","export default function () {}","import { extent, thresholdSturges, tickStep, range } from \"d3-array\";\nimport { slice } from \"./array\";\nimport ascending from \"./ascending\";\nimport area from \"./area\";\nimport constant from \"./constant\";\nimport contains from \"./contains\";\nimport noop from \"./noop\";\nvar cases = [[], [[[1.0, 1.5], [0.5, 1.0]]], [[[1.5, 1.0], [1.0, 1.5]]], [[[1.5, 1.0], [0.5, 1.0]]], [[[1.0, 0.5], [1.5, 1.0]]], [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]], [[[1.0, 0.5], [1.0, 1.5]]], [[[1.0, 0.5], [0.5, 1.0]]], [[[0.5, 1.0], [1.0, 0.5]]], [[[1.0, 1.5], [1.0, 0.5]]], [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]], [[[1.5, 1.0], [1.0, 0.5]]], [[[0.5, 1.0], [1.5, 1.0]]], [[[1.0, 1.5], [1.5, 1.0]]], [[[0.5, 1.0], [1.0, 1.5]]], []];\nexport default function () {\n  var dx = 1,\n      dy = 1,\n      threshold = thresholdSturges,\n      smooth = smoothLinear;\n\n  function contours(values) {\n    var tz = threshold(values); // Convert number of thresholds into uniform thresholds.\n\n    if (!Array.isArray(tz)) {\n      var domain = extent(values),\n          start = domain[0],\n          stop = domain[1];\n      tz = tickStep(start, stop, tz);\n      tz = range(Math.floor(start / tz) * tz, Math.floor(stop / tz) * tz, tz);\n    } else {\n      tz = tz.slice().sort(ascending);\n    }\n\n    return tz.map(function (value) {\n      return contour(values, value);\n    });\n  } // Accumulate, smooth contour rings, assign holes to exterior rings.\n  // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js\n\n\n  function contour(values, value) {\n    var polygons = [],\n        holes = [];\n    isorings(values, value, function (ring) {\n      smooth(ring, values, value);\n      if (area(ring) > 0) polygons.push([ring]);else holes.push(ring);\n    });\n    holes.forEach(function (hole) {\n      for (var i = 0, n = polygons.length, polygon; i < n; ++i) {\n        if (contains((polygon = polygons[i])[0], hole) !== -1) {\n          polygon.push(hole);\n          return;\n        }\n      }\n    });\n    return {\n      type: \"MultiPolygon\",\n      value: value,\n      coordinates: polygons\n    };\n  } // Marching squares with isolines stitched into rings.\n  // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js\n\n\n  function isorings(values, value, callback) {\n    var fragmentByStart = new Array(),\n        fragmentByEnd = new Array(),\n        x,\n        y,\n        t0,\n        t1,\n        t2,\n        t3; // Special case for the first row (y = -1, t2 = t3 = 0).\n\n    x = y = -1;\n    t1 = values[0] >= value;\n    cases[t1 << 1].forEach(stitch);\n\n    while (++x < dx - 1) {\n      t0 = t1, t1 = values[x + 1] >= value;\n      cases[t0 | t1 << 1].forEach(stitch);\n    }\n\n    cases[t1 << 0].forEach(stitch); // General case for the intermediate rows.\n\n    while (++y < dy - 1) {\n      x = -1;\n      t1 = values[y * dx + dx] >= value;\n      t2 = values[y * dx] >= value;\n      cases[t1 << 1 | t2 << 2].forEach(stitch);\n\n      while (++x < dx - 1) {\n        t0 = t1, t1 = values[y * dx + dx + x + 1] >= value;\n        t3 = t2, t2 = values[y * dx + x + 1] >= value;\n        cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch);\n      }\n\n      cases[t1 | t2 << 3].forEach(stitch);\n    } // Special case for the last row (y = dy - 1, t0 = t1 = 0).\n\n\n    x = -1;\n    t2 = values[y * dx] >= value;\n    cases[t2 << 2].forEach(stitch);\n\n    while (++x < dx - 1) {\n      t3 = t2, t2 = values[y * dx + x + 1] >= value;\n      cases[t2 << 2 | t3 << 3].forEach(stitch);\n    }\n\n    cases[t2 << 3].forEach(stitch);\n\n    function stitch(line) {\n      var start = [line[0][0] + x, line[0][1] + y],\n          end = [line[1][0] + x, line[1][1] + y],\n          startIndex = index(start),\n          endIndex = index(end),\n          f,\n          g;\n\n      if (f = fragmentByEnd[startIndex]) {\n        if (g = fragmentByStart[endIndex]) {\n          delete fragmentByEnd[f.end];\n          delete fragmentByStart[g.start];\n\n          if (f === g) {\n            f.ring.push(end);\n            callback(f.ring);\n          } else {\n            fragmentByStart[f.start] = fragmentByEnd[g.end] = {\n              start: f.start,\n              end: g.end,\n              ring: f.ring.concat(g.ring)\n            };\n          }\n        } else {\n          delete fragmentByEnd[f.end];\n          f.ring.push(end);\n          fragmentByEnd[f.end = endIndex] = f;\n        }\n      } else if (f = fragmentByStart[endIndex]) {\n        if (g = fragmentByEnd[startIndex]) {\n          delete fragmentByStart[f.start];\n          delete fragmentByEnd[g.end];\n\n          if (f === g) {\n            f.ring.push(end);\n            callback(f.ring);\n          } else {\n            fragmentByStart[g.start] = fragmentByEnd[f.end] = {\n              start: g.start,\n              end: f.end,\n              ring: g.ring.concat(f.ring)\n            };\n          }\n        } else {\n          delete fragmentByStart[f.start];\n          f.ring.unshift(start);\n          fragmentByStart[f.start = startIndex] = f;\n        }\n      } else {\n        fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {\n          start: startIndex,\n          end: endIndex,\n          ring: [start, end]\n        };\n      }\n    }\n  }\n\n  function index(point) {\n    return point[0] * 2 + point[1] * (dx + 1) * 4;\n  }\n\n  function smoothLinear(ring, values, value) {\n    ring.forEach(function (point) {\n      var x = point[0],\n          y = point[1],\n          xt = x | 0,\n          yt = y | 0,\n          v0,\n          v1 = values[yt * dx + xt];\n\n      if (x > 0 && x < dx && xt === x) {\n        v0 = values[yt * dx + xt - 1];\n        point[0] = x + (value - v0) / (v1 - v0) - 0.5;\n      }\n\n      if (y > 0 && y < dy && yt === y) {\n        v0 = values[(yt - 1) * dx + xt];\n        point[1] = y + (value - v0) / (v1 - v0) - 0.5;\n      }\n    });\n  }\n\n  contours.contour = contour;\n\n  contours.size = function (_) {\n    if (!arguments.length) return [dx, dy];\n\n    var _0 = Math.ceil(_[0]),\n        _1 = Math.ceil(_[1]);\n\n    if (!(_0 > 0) || !(_1 > 0)) throw new Error(\"invalid size\");\n    return dx = _0, dy = _1, contours;\n  };\n\n  contours.thresholds = function (_) {\n    return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), contours) : threshold;\n  };\n\n  contours.smooth = function (_) {\n    return arguments.length ? (smooth = _ ? smoothLinear : noop, contours) : smooth === smoothLinear;\n  };\n\n  return contours;\n}","export default function (ring) {\n  var i = 0,\n      n = ring.length,\n      area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1];\n\n  while (++i < n) {\n    area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1];\n  }\n\n  return area;\n}","// TODO Optimize edge cases.\n// TODO Optimize index calculation.\n// TODO Optimize arguments.\nexport function blurX(source, target, r) {\n  var n = source.width,\n      m = source.height,\n      w = (r << 1) + 1;\n\n  for (var j = 0; j < m; ++j) {\n    for (var i = 0, sr = 0; i < n + r; ++i) {\n      if (i < n) {\n        sr += source.data[i + j * n];\n      }\n\n      if (i >= r) {\n        if (i >= w) {\n          sr -= source.data[i - w + j * n];\n        }\n\n        target.data[i - r + j * n] = sr / Math.min(i + 1, n - 1 + w - i, w);\n      }\n    }\n  }\n} // TODO Optimize edge cases.\n// TODO Optimize index calculation.\n// TODO Optimize arguments.\n\nexport function blurY(source, target, r) {\n  var n = source.width,\n      m = source.height,\n      w = (r << 1) + 1;\n\n  for (var i = 0; i < n; ++i) {\n    for (var j = 0, sr = 0; j < m + r; ++j) {\n      if (j < m) {\n        sr += source.data[i + j * n];\n      }\n\n      if (j >= r) {\n        if (j >= w) {\n          sr -= source.data[i + (j - w) * n];\n        }\n\n        target.data[i + (j - r) * n] = sr / Math.min(j + 1, m - 1 + w - j, w);\n      }\n    }\n  }\n}","import { max, range, tickStep } from \"d3-array\";\nimport { slice } from \"./array\";\nimport { blurX, blurY } from \"./blur\";\nimport constant from \"./constant\";\nimport contours from \"./contours\";\n\nfunction defaultX(d) {\n  return d[0];\n}\n\nfunction defaultY(d) {\n  return d[1];\n}\n\nfunction defaultWeight() {\n  return 1;\n}\n\nexport default function () {\n  var x = defaultX,\n      y = defaultY,\n      weight = defaultWeight,\n      dx = 960,\n      dy = 500,\n      r = 20,\n      // blur radius\n  k = 2,\n      // log2(grid cell size)\n  o = r * 3,\n      // grid offset, to pad for blur\n  n = dx + o * 2 >> k,\n      // grid width\n  m = dy + o * 2 >> k,\n      // grid height\n  threshold = constant(20);\n\n  function density(data) {\n    var values0 = new Float32Array(n * m),\n        values1 = new Float32Array(n * m);\n    data.forEach(function (d, i, data) {\n      var xi = +x(d, i, data) + o >> k,\n          yi = +y(d, i, data) + o >> k,\n          wi = +weight(d, i, data);\n\n      if (xi >= 0 && xi < n && yi >= 0 && yi < m) {\n        values0[xi + yi * n] += wi;\n      }\n    }); // TODO Optimize.\n\n    blurX({\n      width: n,\n      height: m,\n      data: values0\n    }, {\n      width: n,\n      height: m,\n      data: values1\n    }, r >> k);\n    blurY({\n      width: n,\n      height: m,\n      data: values1\n    }, {\n      width: n,\n      height: m,\n      data: values0\n    }, r >> k);\n    blurX({\n      width: n,\n      height: m,\n      data: values0\n    }, {\n      width: n,\n      height: m,\n      data: values1\n    }, r >> k);\n    blurY({\n      width: n,\n      height: m,\n      data: values1\n    }, {\n      width: n,\n      height: m,\n      data: values0\n    }, r >> k);\n    blurX({\n      width: n,\n      height: m,\n      data: values0\n    }, {\n      width: n,\n      height: m,\n      data: values1\n    }, r >> k);\n    blurY({\n      width: n,\n      height: m,\n      data: values1\n    }, {\n      width: n,\n      height: m,\n      data: values0\n    }, r >> k);\n    var tz = threshold(values0); // Convert number of thresholds into uniform thresholds.\n\n    if (!Array.isArray(tz)) {\n      var stop = max(values0);\n      tz = tickStep(0, stop, tz);\n      tz = range(0, Math.floor(stop / tz) * tz, tz);\n      tz.shift();\n    }\n\n    return contours().thresholds(tz).size([n, m])(values0).map(transform);\n  }\n\n  function transform(geometry) {\n    geometry.value *= Math.pow(2, -2 * k); // Density in points per square pixel.\n\n    geometry.coordinates.forEach(transformPolygon);\n    return geometry;\n  }\n\n  function transformPolygon(coordinates) {\n    coordinates.forEach(transformRing);\n  }\n\n  function transformRing(coordinates) {\n    coordinates.forEach(transformPoint);\n  } // TODO Optimize.\n\n\n  function transformPoint(coordinates) {\n    coordinates[0] = coordinates[0] * Math.pow(2, k) - o;\n    coordinates[1] = coordinates[1] * Math.pow(2, k) - o;\n  }\n\n  function resize() {\n    o = r * 3;\n    n = dx + o * 2 >> k;\n    m = dy + o * 2 >> k;\n    return density;\n  }\n\n  density.x = function (_) {\n    return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), density) : x;\n  };\n\n  density.y = function (_) {\n    return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), density) : y;\n  };\n\n  density.weight = function (_) {\n    return arguments.length ? (weight = typeof _ === \"function\" ? _ : constant(+_), density) : weight;\n  };\n\n  density.size = function (_) {\n    if (!arguments.length) return [dx, dy];\n\n    var _0 = Math.ceil(_[0]),\n        _1 = Math.ceil(_[1]);\n\n    if (!(_0 >= 0) && !(_0 >= 0)) throw new Error(\"invalid size\");\n    return dx = _0, dy = _1, resize();\n  };\n\n  density.cellSize = function (_) {\n    if (!arguments.length) return 1 << k;\n    if (!((_ = +_) >= 1)) throw new Error(\"invalid cell size\");\n    return k = Math.floor(Math.log(_) / Math.LN2), resize();\n  };\n\n  density.thresholds = function (_) {\n    return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), density) : threshold;\n  };\n\n  density.bandwidth = function (_) {\n    if (!arguments.length) return Math.sqrt(r * (r + 1));\n    if (!((_ = +_) >= 0)) throw new Error(\"invalid bandwidth\");\n    return r = Math.round((Math.sqrt(4 * _ * _ + 1) - 1) / 2), resize();\n  };\n\n  return density;\n}","export default function (x) {\n  return x;\n}","function streamGeometry(geometry, stream) {\n  if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n    streamGeometryType[geometry.type](geometry, stream);\n  }\n}\n\nvar streamObjectType = {\n  Feature: function Feature(object, stream) {\n    streamGeometry(object.geometry, stream);\n  },\n  FeatureCollection: function FeatureCollection(object, stream) {\n    var features = object.features,\n        i = -1,\n        n = features.length;\n\n    while (++i < n) {\n      streamGeometry(features[i].geometry, stream);\n    }\n  }\n};\nvar streamGeometryType = {\n  Sphere: function Sphere(object, stream) {\n    stream.sphere();\n  },\n  Point: function Point(object, stream) {\n    object = object.coordinates;\n    stream.point(object[0], object[1], object[2]);\n  },\n  MultiPoint: function MultiPoint(object, stream) {\n    var coordinates = object.coordinates,\n        i = -1,\n        n = coordinates.length;\n\n    while (++i < n) {\n      object = coordinates[i], stream.point(object[0], object[1], object[2]);\n    }\n  },\n  LineString: function LineString(object, stream) {\n    streamLine(object.coordinates, stream, 0);\n  },\n  MultiLineString: function MultiLineString(object, stream) {\n    var coordinates = object.coordinates,\n        i = -1,\n        n = coordinates.length;\n\n    while (++i < n) {\n      streamLine(coordinates[i], stream, 0);\n    }\n  },\n  Polygon: function Polygon(object, stream) {\n    streamPolygon(object.coordinates, stream);\n  },\n  MultiPolygon: function MultiPolygon(object, stream) {\n    var coordinates = object.coordinates,\n        i = -1,\n        n = coordinates.length;\n\n    while (++i < n) {\n      streamPolygon(coordinates[i], stream);\n    }\n  },\n  GeometryCollection: function GeometryCollection(object, stream) {\n    var geometries = object.geometries,\n        i = -1,\n        n = geometries.length;\n\n    while (++i < n) {\n      streamGeometry(geometries[i], stream);\n    }\n  }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n  var i = -1,\n      n = coordinates.length - closed,\n      coordinate;\n  stream.lineStart();\n\n  while (++i < n) {\n    coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n  }\n\n  stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n  var i = -1,\n      n = coordinates.length;\n  stream.polygonStart();\n\n  while (++i < n) {\n    streamLine(coordinates[i], stream, 1);\n  }\n\n  stream.polygonEnd();\n}\n\nexport default function (object, stream) {\n  if (object && streamObjectType.hasOwnProperty(object.type)) {\n    streamObjectType[object.type](object, stream);\n  } else {\n    streamGeometry(object, stream);\n  }\n}","// Adds floating point numbers with twice the normal precision.\n// Reference: J. R. Shewchuk, Adaptive Precision Floating-Point Arithmetic and\n// Fast Robust Geometric Predicates, Discrete & Computational Geometry 18(3)\n// 305–363 (1997).\n// Code adapted from GeographicLib by Charles F. F. Karney,\n// http://geographiclib.sourceforge.net/\nexport default function () {\n  return new Adder();\n}\n\nfunction Adder() {\n  this.reset();\n}\n\nAdder.prototype = {\n  constructor: Adder,\n  reset: function reset() {\n    this.s = // rounded value\n    this.t = 0; // exact error\n  },\n  add: function add(y) {\n    _add(temp, y, this.t);\n\n    _add(this, temp.s, this.s);\n\n    if (this.s) this.t += temp.t;else this.s = temp.t;\n  },\n  valueOf: function valueOf() {\n    return this.s;\n  }\n};\nvar temp = new Adder();\n\nfunction _add(adder, a, b) {\n  var x = adder.s = a + b,\n      bv = x - a,\n      av = x - bv;\n  adder.t = a - av + (b - bv);\n}","export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function (x) {\n  return x > 0 ? 1 : x < 0 ? -1 : 0;\n};\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\nexport function acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\nexport function asin(x) {\n  return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\nexport function haversin(x) {\n  return (x = sin(x / 2)) * x;\n}","export default function noop() {}","import adder from \"../adder.js\";\nimport { abs } from \"../math.js\";\nimport noop from \"../noop.js\";\nvar areaSum = adder(),\n    areaRingSum = adder(),\n    x00,\n    y00,\n    x0,\n    y0;\nvar areaStream = {\n  point: noop,\n  lineStart: noop,\n  lineEnd: noop,\n  polygonStart: function polygonStart() {\n    areaStream.lineStart = areaRingStart;\n    areaStream.lineEnd = areaRingEnd;\n  },\n  polygonEnd: function polygonEnd() {\n    areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;\n    areaSum.add(abs(areaRingSum));\n    areaRingSum.reset();\n  },\n  result: function result() {\n    var area = areaSum / 2;\n    areaSum.reset();\n    return area;\n  }\n};\n\nfunction areaRingStart() {\n  areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n  areaStream.point = areaPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n  areaRingSum.add(y0 * x - x0 * y);\n  x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n  areaPoint(x00, y00);\n}\n\nexport default areaStream;","import noop from \"../noop.js\";\nvar x0 = Infinity,\n    y0 = x0,\n    x1 = -x0,\n    y1 = x1;\nvar boundsStream = {\n  point: boundsPoint,\n  lineStart: noop,\n  lineEnd: noop,\n  polygonStart: noop,\n  polygonEnd: noop,\n  result: function result() {\n    var bounds = [[x0, y0], [x1, y1]];\n    x1 = y1 = -(y0 = x0 = Infinity);\n    return bounds;\n  }\n};\n\nfunction boundsPoint(x, y) {\n  if (x < x0) x0 = x;\n  if (x > x1) x1 = x;\n  if (y < y0) y0 = y;\n  if (y > y1) y1 = y;\n}\n\nexport default boundsStream;","import { sqrt } from \"../math.js\"; // TODO Enforce positive area for exterior, negative area for interior?\n\nvar X0 = 0,\n    Y0 = 0,\n    Z0 = 0,\n    X1 = 0,\n    Y1 = 0,\n    Z1 = 0,\n    X2 = 0,\n    Y2 = 0,\n    Z2 = 0,\n    x00,\n    y00,\n    x0,\n    y0;\nvar centroidStream = {\n  point: centroidPoint,\n  lineStart: centroidLineStart,\n  lineEnd: centroidLineEnd,\n  polygonStart: function polygonStart() {\n    centroidStream.lineStart = centroidRingStart;\n    centroidStream.lineEnd = centroidRingEnd;\n  },\n  polygonEnd: function polygonEnd() {\n    centroidStream.point = centroidPoint;\n    centroidStream.lineStart = centroidLineStart;\n    centroidStream.lineEnd = centroidLineEnd;\n  },\n  result: function result() {\n    var centroid = Z2 ? [X2 / Z2, Y2 / Z2] : Z1 ? [X1 / Z1, Y1 / Z1] : Z0 ? [X0 / Z0, Y0 / Z0] : [NaN, NaN];\n    X0 = Y0 = Z0 = X1 = Y1 = Z1 = X2 = Y2 = Z2 = 0;\n    return centroid;\n  }\n};\n\nfunction centroidPoint(x, y) {\n  X0 += x;\n  Y0 += y;\n  ++Z0;\n}\n\nfunction centroidLineStart() {\n  centroidStream.point = centroidPointFirstLine;\n}\n\nfunction centroidPointFirstLine(x, y) {\n  centroidStream.point = centroidPointLine;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidPointLine(x, y) {\n  var dx = x - x0,\n      dy = y - y0,\n      z = sqrt(dx * dx + dy * dy);\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidLineEnd() {\n  centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingStart() {\n  centroidStream.point = centroidPointFirstRing;\n}\n\nfunction centroidRingEnd() {\n  centroidPointRing(x00, y00);\n}\n\nfunction centroidPointFirstRing(x, y) {\n  centroidStream.point = centroidPointRing;\n  centroidPoint(x00 = x0 = x, y00 = y0 = y);\n}\n\nfunction centroidPointRing(x, y) {\n  var dx = x - x0,\n      dy = y - y0,\n      z = sqrt(dx * dx + dy * dy);\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n  z = y0 * x - x0 * y;\n  X2 += z * (x0 + x);\n  Y2 += z * (y0 + y);\n  Z2 += z * 3;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nexport default centroidStream;","import { tau } from \"../math.js\";\nimport noop from \"../noop.js\";\nexport default function PathContext(context) {\n  this._context = context;\n}\nPathContext.prototype = {\n  _radius: 4.5,\n  pointRadius: function pointRadius(_) {\n    return this._radius = _, this;\n  },\n  polygonStart: function polygonStart() {\n    this._line = 0;\n  },\n  polygonEnd: function polygonEnd() {\n    this._line = NaN;\n  },\n  lineStart: function lineStart() {\n    this._point = 0;\n  },\n  lineEnd: function lineEnd() {\n    if (this._line === 0) this._context.closePath();\n    this._point = NaN;\n  },\n  point: function point(x, y) {\n    switch (this._point) {\n      case 0:\n        {\n          this._context.moveTo(x, y);\n\n          this._point = 1;\n          break;\n        }\n\n      case 1:\n        {\n          this._context.lineTo(x, y);\n\n          break;\n        }\n\n      default:\n        {\n          this._context.moveTo(x + this._radius, y);\n\n          this._context.arc(x, y, this._radius, 0, tau);\n\n          break;\n        }\n    }\n  },\n  result: noop\n};","import adder from \"../adder.js\";\nimport { sqrt } from \"../math.js\";\nimport noop from \"../noop.js\";\nvar lengthSum = adder(),\n    lengthRing,\n    x00,\n    y00,\n    x0,\n    y0;\nvar lengthStream = {\n  point: noop,\n  lineStart: function lineStart() {\n    lengthStream.point = lengthPointFirst;\n  },\n  lineEnd: function lineEnd() {\n    if (lengthRing) lengthPoint(x00, y00);\n    lengthStream.point = noop;\n  },\n  polygonStart: function polygonStart() {\n    lengthRing = true;\n  },\n  polygonEnd: function polygonEnd() {\n    lengthRing = null;\n  },\n  result: function result() {\n    var length = +lengthSum;\n    lengthSum.reset();\n    return length;\n  }\n};\n\nfunction lengthPointFirst(x, y) {\n  lengthStream.point = lengthPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n  x0 -= x, y0 -= y;\n  lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n  x0 = x, y0 = y;\n}\n\nexport default lengthStream;","export default function PathString() {\n  this._string = [];\n}\nPathString.prototype = {\n  _radius: 4.5,\n  _circle: circle(4.5),\n  pointRadius: function pointRadius(_) {\n    if ((_ = +_) !== this._radius) this._radius = _, this._circle = null;\n    return this;\n  },\n  polygonStart: function polygonStart() {\n    this._line = 0;\n  },\n  polygonEnd: function polygonEnd() {\n    this._line = NaN;\n  },\n  lineStart: function lineStart() {\n    this._point = 0;\n  },\n  lineEnd: function lineEnd() {\n    if (this._line === 0) this._string.push(\"Z\");\n    this._point = NaN;\n  },\n  point: function point(x, y) {\n    switch (this._point) {\n      case 0:\n        {\n          this._string.push(\"M\", x, \",\", y);\n\n          this._point = 1;\n          break;\n        }\n\n      case 1:\n        {\n          this._string.push(\"L\", x, \",\", y);\n\n          break;\n        }\n\n      default:\n        {\n          if (this._circle == null) this._circle = circle(this._radius);\n\n          this._string.push(\"M\", x, \",\", y, this._circle);\n\n          break;\n        }\n    }\n  },\n  result: function result() {\n    if (this._string.length) {\n      var result = this._string.join(\"\");\n\n      this._string = [];\n      return result;\n    } else {\n      return null;\n    }\n  }\n};\n\nfunction circle(radius) {\n  return \"m0,\" + radius + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + -2 * radius + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + 2 * radius + \"z\";\n}","import identity from \"../identity.js\";\nimport stream from \"../stream.js\";\nimport pathArea from \"./area.js\";\nimport pathBounds from \"./bounds.js\";\nimport pathCentroid from \"./centroid.js\";\nimport PathContext from \"./context.js\";\nimport pathMeasure from \"./measure.js\";\nimport PathString from \"./string.js\";\nexport default function (projection, context) {\n  var pointRadius = 4.5,\n      projectionStream,\n      contextStream;\n\n  function path(object) {\n    if (object) {\n      if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n      stream(object, projectionStream(contextStream));\n    }\n\n    return contextStream.result();\n  }\n\n  path.area = function (object) {\n    stream(object, projectionStream(pathArea));\n    return pathArea.result();\n  };\n\n  path.measure = function (object) {\n    stream(object, projectionStream(pathMeasure));\n    return pathMeasure.result();\n  };\n\n  path.bounds = function (object) {\n    stream(object, projectionStream(pathBounds));\n    return pathBounds.result();\n  };\n\n  path.centroid = function (object) {\n    stream(object, projectionStream(pathCentroid));\n    return pathCentroid.result();\n  };\n\n  path.projection = function (_) {\n    return arguments.length ? (projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream, path) : projection;\n  };\n\n  path.context = function (_) {\n    if (!arguments.length) return context;\n    contextStream = _ == null ? (context = null, new PathString()) : new PathContext(context = _);\n    if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n    return path;\n  };\n\n  path.pointRadius = function (_) {\n    if (!arguments.length) return pointRadius;\n    pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n    return path;\n  };\n\n  return path.projection(projection).context(context);\n}","import \"core-js/modules/es.array.reduce.js\";\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport { contourDensity } from 'd3-contour';\nimport { geoPath } from 'd3-geo';\nimport { scaleLinear } from 'd3-scale';\nimport AbstractSeries from './abstract-series';\nimport Animation from '../../animation';\nimport { ANIMATED_SERIES_PROPS } from '../../utils/series-utils';\nimport { CONTINUOUS_COLOR_RANGE } from '../../theme';\nvar predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--contour';\n\nfunction getDomain(data) {\n  return data.reduce(function (acc, row) {\n    return {\n      min: Math.min(acc.min, row.value),\n      max: Math.max(acc.max, row.value)\n    };\n  }, {\n    min: Infinity,\n    max: -Infinity\n  });\n}\n\nvar ContourSeries = function (_AbstractSeries) {\n  _inherits(ContourSeries, _AbstractSeries);\n\n  function ContourSeries() {\n    _classCallCheck(this, ContourSeries);\n\n    return _possibleConstructorReturn(this, (ContourSeries.__proto__ || Object.getPrototypeOf(ContourSeries)).apply(this, arguments));\n  }\n\n  _createClass(ContourSeries, [{\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          animation = _props.animation,\n          bandwidth = _props.bandwidth,\n          className = _props.className,\n          colorRange = _props.colorRange,\n          data = _props.data,\n          innerHeight = _props.innerHeight,\n          innerWidth = _props.innerWidth,\n          marginLeft = _props.marginLeft,\n          marginTop = _props.marginTop,\n          style = _props.style;\n\n      if (!data || !innerWidth || !innerHeight) {\n        return null;\n      }\n\n      if (animation) {\n        return React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: ANIMATED_SERIES_PROPS\n        }), React.createElement(ContourSeries, _extends({}, this.props, {\n          animation: null\n        })));\n      }\n\n      var x = this._getAttributeFunctor('x');\n\n      var y = this._getAttributeFunctor('y');\n\n      var contouredData = contourDensity().x(function (d) {\n        return x(d);\n      }).y(function (d) {\n        return y(d);\n      }).size([innerWidth, innerHeight]).bandwidth(bandwidth)(data);\n      var geo = geoPath();\n\n      var _getDomain = getDomain(contouredData),\n          min = _getDomain.min,\n          max = _getDomain.max;\n\n      var colorScale = scaleLinear().domain([min, max]).range(colorRange || CONTINUOUS_COLOR_RANGE);\n      return React.createElement('g', {\n        className: predefinedClassName + ' ' + className,\n        transform: 'translate(' + marginLeft + ',' + marginTop + ')'\n      }, contouredData.map(function (polygon, index) {\n        return React.createElement('path', {\n          className: 'rv-xy-plot__series--contour-line',\n          key: 'rv-xy-plot__series--contour-line-' + index,\n          d: geo(polygon),\n          style: _extends({\n            fill: colorScale(polygon.value)\n          }, style)\n        });\n      }));\n    }\n  }]);\n\n  return ContourSeries;\n}(AbstractSeries);\n\nContourSeries.defaultProps = _extends({}, AbstractSeries.defaultProps, {\n  bandwidth: 40,\n  style: {}\n});\nexport default ContourSeries;","export default function (values, valueof) {\n  var n = values.length,\n      i = -1,\n      value,\n      max;\n\n  if (valueof == null) {\n    while (++i < n) {\n      // Find the first comparable value.\n      if ((value = values[i]) != null && value >= value) {\n        max = value;\n\n        while (++i < n) {\n          // Compare the remaining values.\n          if ((value = values[i]) != null && value > max) {\n            max = value;\n          }\n        }\n      }\n    }\n  } else {\n    while (++i < n) {\n      // Find the first comparable value.\n      if ((value = valueof(values[i], i, values)) != null && value >= value) {\n        max = value;\n\n        while (++i < n) {\n          // Compare the remaining values.\n          if ((value = valueof(values[i], i, values)) != null && value > max) {\n            max = value;\n          }\n        }\n      }\n    }\n  }\n\n  return max;\n}","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { transformValueToString } from '../utils/data-utils';\nimport { getAttributeFunctor } from '../utils/scales-utils';\n/**\n * Format title by detault.\n * @param {Array} values List of values.\n * @returns {*} Formatted value or undefined.\n */\n\nfunction defaultTitleFormat(values) {\n  var value = getFirstNonEmptyValue(values);\n\n  if (value) {\n    return {\n      title: 'x',\n      value: transformValueToString(value.x)\n    };\n  }\n}\n/**\n * Format items by default.\n * @param {Array} values Array of values.\n * @returns {*} Formatted list of items.\n */\n\n\nfunction defaultItemsFormat(values) {\n  return values.map(function (v, i) {\n    if (v) {\n      return {\n        value: v.y,\n        title: i\n      };\n    }\n  });\n}\n/**\n * Get the first non-empty item from an array.\n * @param {Array} values Array of values.\n * @returns {*} First non-empty value or undefined.\n */\n\n\nfunction getFirstNonEmptyValue(values) {\n  return (values || []).find(function (v) {\n    return Boolean(v);\n  });\n}\n\nvar Crosshair = function (_PureComponent) {\n  _inherits(Crosshair, _PureComponent);\n\n  function Crosshair() {\n    _classCallCheck(this, Crosshair);\n\n    return _possibleConstructorReturn(this, (Crosshair.__proto__ || Object.getPrototypeOf(Crosshair)).apply(this, arguments));\n  }\n\n  _createClass(Crosshair, [{\n    key: '_renderCrosshairItems',\n\n    /**\n     * Render crosshair items (title + value for each series).\n     * @returns {*} Array of React classes with the crosshair values.\n     * @private\n     */\n    value: function _renderCrosshairItems() {\n      var _props = this.props,\n          values = _props.values,\n          itemsFormat = _props.itemsFormat;\n      var items = itemsFormat(values);\n\n      if (!items) {\n        return null;\n      }\n\n      return items.filter(function (i) {\n        return i;\n      }).map(function renderValue(item, i) {\n        return React.createElement('div', {\n          className: 'rv-crosshair__item',\n          key: 'item' + i\n        }, React.createElement('span', {\n          className: 'rv-crosshair__item__title'\n        }, item.title), ': ', React.createElement('span', {\n          className: 'rv-crosshair__item__value'\n        }, item.value));\n      });\n    }\n    /**\n     * Render crosshair title.\n     * @returns {*} Container with the crosshair title.\n     * @private\n     */\n\n  }, {\n    key: '_renderCrosshairTitle',\n    value: function _renderCrosshairTitle() {\n      var _props2 = this.props,\n          values = _props2.values,\n          titleFormat = _props2.titleFormat,\n          style = _props2.style;\n      var titleItem = titleFormat(values);\n\n      if (!titleItem) {\n        return null;\n      }\n\n      return React.createElement('div', {\n        className: 'rv-crosshair__title',\n        key: 'title',\n        style: style.title\n      }, React.createElement('span', {\n        className: 'rv-crosshair__title__title'\n      }, titleItem.title), ': ', React.createElement('span', {\n        className: 'rv-crosshair__title__value'\n      }, titleItem.value));\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props3 = this.props,\n          children = _props3.children,\n          className = _props3.className,\n          values = _props3.values,\n          marginTop = _props3.marginTop,\n          marginLeft = _props3.marginLeft,\n          innerWidth = _props3.innerWidth,\n          innerHeight = _props3.innerHeight,\n          style = _props3.style;\n      var value = getFirstNonEmptyValue(values);\n\n      if (!value) {\n        return null;\n      }\n\n      var x = getAttributeFunctor(this.props, 'x');\n      var innerLeft = x(value);\n      var _props$orientation = this.props.orientation,\n          orientation = _props$orientation === undefined ? innerLeft > innerWidth / 2 ? 'left' : 'right' : _props$orientation;\n      var left = marginLeft + innerLeft;\n      var top = marginTop;\n      var innerClassName = 'rv-crosshair__inner rv-crosshair__inner--' + orientation;\n      return React.createElement('div', {\n        className: 'rv-crosshair ' + className,\n        style: {\n          left: left + 'px',\n          top: top + 'px'\n        }\n      }, React.createElement('div', {\n        className: 'rv-crosshair__line',\n        style: _extends({\n          height: innerHeight + 'px'\n        }, style.line)\n      }), React.createElement('div', {\n        className: innerClassName\n      }, children ? children : React.createElement('div', {\n        className: 'rv-crosshair__inner__content',\n        style: style.box\n      }, React.createElement('div', null, this._renderCrosshairTitle(), this._renderCrosshairItems()))));\n    }\n  }], [{\n    key: 'defaultProps',\n    get: function get() {\n      return {\n        titleFormat: defaultTitleFormat,\n        itemsFormat: defaultItemsFormat,\n        style: {\n          line: {},\n          title: {},\n          box: {}\n        }\n      };\n    }\n  }, {\n    key: 'propTypes',\n    get: function get() {\n      return {\n        className: PropTypes.string,\n        values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object])),\n        series: PropTypes.object,\n        innerWidth: PropTypes.number,\n        innerHeight: PropTypes.number,\n        marginLeft: PropTypes.number,\n        marginTop: PropTypes.number,\n        orientation: PropTypes.oneOf(['left', 'right']),\n        itemsFormat: PropTypes.func,\n        titleFormat: PropTypes.func,\n        style: PropTypes.shape({\n          line: PropTypes.object,\n          title: PropTypes.object,\n          box: PropTypes.object\n        })\n      };\n    }\n  }]);\n\n  return Crosshair;\n}(PureComponent);\n\nCrosshair.displayName = 'Crosshair';\nexport default Crosshair;","var _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nfunction _toConsumableArray(arr) {\n  if (Array.isArray(arr)) {\n    for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n      arr2[i] = arr[i];\n    }\n\n    return arr2;\n  } else {\n    return Array.from(arr);\n  }\n} // Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport AbstractSeries from './abstract-series';\nimport Animation from '../../animation';\nimport { ANIMATED_SERIES_PROPS } from '../../utils/series-utils';\nvar predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--custom-svg-wrapper';\nvar DEFAULT_STYLE = {\n  stroke: 'blue',\n  fill: 'blue'\n};\n\nfunction predefinedComponents(type) {\n  var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n  var style = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_STYLE;\n\n  switch (type) {\n    case 'diamond':\n      return React.createElement('polygon', {\n        style: style,\n        points: '0 0 ' + size / 2 + ' ' + size / 2 + ' 0 ' + size + ' ' + -size / 2 + ' ' + size / 2 + ' 0 0'\n      });\n\n    case 'star':\n      var starPoints = [].concat(_toConsumableArray(new Array(5))).map(function (c, index) {\n        var angle = index / 5 * Math.PI * 2;\n        var innerAngle = angle + Math.PI / 10;\n        var outerAngle = angle - Math.PI / 10; // ratio of inner polygon to outer polgyon\n\n        var innerRadius = size / 2.61;\n        return '\\n        ' + Math.cos(outerAngle) * size + ' ' + Math.sin(outerAngle) * size + '\\n        ' + Math.cos(innerAngle) * innerRadius + ' ' + Math.sin(innerAngle) * innerRadius + '\\n      ';\n      }).join(' ');\n      return React.createElement('polygon', {\n        points: starPoints,\n        x: '0',\n        y: '0',\n        height: size,\n        width: size,\n        style: style\n      });\n\n    case 'square':\n      return React.createElement('rect', {\n        x: '' + -size / 2,\n        y: '' + -size / 2,\n        height: size,\n        width: size,\n        style: style\n      });\n\n    default:\n    case 'circle':\n      return React.createElement('circle', {\n        cx: '0',\n        cy: '0',\n        r: size / 2,\n        style: style\n      });\n  }\n}\n\nfunction getInnerComponent(_ref) {\n  var customComponent = _ref.customComponent,\n      defaultType = _ref.defaultType,\n      positionInPixels = _ref.positionInPixels,\n      positionFunctions = _ref.positionFunctions,\n      style = _ref.style,\n      propsSize = _ref.propsSize;\n  var size = customComponent.size;\n\n  var aggStyle = _extends({}, style, customComponent.style || {});\n\n  var innerComponent = customComponent.customComponent;\n\n  if (!innerComponent && typeof defaultType === 'string') {\n    return predefinedComponents(defaultType, size || propsSize, aggStyle);\n  } // if default component is a function\n\n\n  if (!innerComponent) {\n    return defaultType(customComponent, positionInPixels, aggStyle);\n  }\n\n  if (typeof innerComponent === 'string') {\n    return predefinedComponents(innerComponent || defaultType, size, aggStyle);\n  } // if inner component is a function\n\n\n  return innerComponent(customComponent, positionInPixels, aggStyle);\n}\n\nvar CustomSVGSeries = function (_AbstractSeries) {\n  _inherits(CustomSVGSeries, _AbstractSeries);\n\n  function CustomSVGSeries() {\n    _classCallCheck(this, CustomSVGSeries);\n\n    return _possibleConstructorReturn(this, (CustomSVGSeries.__proto__ || Object.getPrototypeOf(CustomSVGSeries)).apply(this, arguments));\n  }\n\n  _createClass(CustomSVGSeries, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          animation = _props.animation,\n          className = _props.className,\n          customComponent = _props.customComponent,\n          data = _props.data,\n          innerHeight = _props.innerHeight,\n          innerWidth = _props.innerWidth,\n          marginLeft = _props.marginLeft,\n          marginTop = _props.marginTop,\n          style = _props.style,\n          size = _props.size;\n\n      if (!data || !innerWidth || !innerHeight) {\n        return null;\n      }\n\n      if (animation) {\n        return React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: ANIMATED_SERIES_PROPS\n        }), React.createElement(CustomSVGSeries, _extends({}, this.props, {\n          animation: false\n        })));\n      }\n\n      var x = this._getAttributeFunctor('x');\n\n      var y = this._getAttributeFunctor('y');\n\n      var contents = data.map(function (seriesComponent, index) {\n        var positionInPixels = {\n          x: x(seriesComponent),\n          y: y(seriesComponent)\n        };\n        var innerComponent = getInnerComponent({\n          customComponent: seriesComponent,\n          positionInPixels: positionInPixels,\n          defaultType: customComponent,\n          positionFunctions: {\n            x: x,\n            y: y\n          },\n          style: style,\n          propsSize: size\n        });\n        return React.createElement('g', {\n          className: 'rv-xy-plot__series--custom-svg',\n          key: 'rv-xy-plot__series--custom-svg-' + index,\n          transform: 'translate(' + positionInPixels.x + ',' + positionInPixels.y + ')',\n          onMouseEnter: function onMouseEnter(e) {\n            return _this2._valueMouseOverHandler(seriesComponent, e);\n          },\n          onMouseLeave: function onMouseLeave(e) {\n            return _this2._valueMouseOutHandler(seriesComponent, e);\n          }\n        }, innerComponent);\n      });\n      return React.createElement('g', {\n        className: predefinedClassName + ' ' + className,\n        transform: 'translate(' + marginLeft + ',' + marginTop + ')'\n      }, contents);\n    }\n  }]);\n\n  return CustomSVGSeries;\n}(AbstractSeries);\n\nCustomSVGSeries.defaultProps = _extends({}, AbstractSeries.defaultProps, {\n  animation: false,\n  customComponent: 'circle',\n  style: {},\n  size: 2\n});\nexport default CustomSVGSeries;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n}; // Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport { generatePoints, getAxisAngle } from '../../utils/axis-utils';\n/**\n * Generate the actual polygons to be plotted\n * @param {Object} props\n - props.animation {Boolean}\n - props.axisDomain {Array} a pair of values specifying the domain of the axis\n - props.numberOfTicks{Number} the number of ticks on the axis\n - props.axisStart {Object} a object specify in cartesian space the start of the axis\n example: {x: 0, y: 0}\n - props.axisEnd {Object} a object specify in cartesian space the start of the axis\n - props.tickValue {Func} a formatting function for the tick values\n - props.tickSize {Number} a pixel size of the axis\n - props.style {Object} The style object for the axis\n * @return {Component} the plotted axis\n */\n\nexport default function decorativeAxisTick(props) {\n  var axisDomain = props.axisDomain,\n      numberOfTicks = props.numberOfTicks,\n      axisStart = props.axisStart,\n      axisEnd = props.axisEnd,\n      tickValue = props.tickValue,\n      tickSize = props.tickSize,\n      style = props.style;\n\n  var _generatePoints = generatePoints({\n    axisStart: axisStart,\n    axisEnd: axisEnd,\n    numberOfTicks: numberOfTicks,\n    axisDomain: axisDomain\n  }),\n      points = _generatePoints.points; // add a quarter rotation to make ticks orthogonal to axis\n\n\n  var tickAngle = getAxisAngle(axisStart, axisEnd) + Math.PI / 2;\n  return points.map(function (point, index) {\n    var tickProps = _extends({\n      x1: 0,\n      y1: 0,\n      x2: tickSize * Math.cos(tickAngle),\n      y2: tickSize * Math.sin(tickAngle)\n    }, style.ticks);\n\n    var textProps = _extends({\n      x: tickSize * Math.cos(tickAngle),\n      y: tickSize * Math.sin(tickAngle),\n      textAnchor: 'start'\n    }, style.text);\n\n    return React.createElement('g', {\n      key: index,\n      transform: 'translate(' + point.x + ', ' + point.y + ')',\n      className: 'rv-xy-plot__axis__tick'\n    }, React.createElement('line', _extends({}, tickProps, {\n      className: 'rv-xy-plot__axis__tick__line'\n    })), React.createElement('text', _extends({}, textProps, {\n      className: 'rv-xy-plot__axis__tick__text'\n    }), tickValue(point.text)));\n  });\n}","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport { format } from 'd3-format';\nimport AbstractSeries from '../series/abstract-series';\nimport DecorativeAxisTicks from './decorative-axis-ticks';\nimport Animation from '../../animation';\nvar predefinedClassName = 'rv-xy-manipulable-axis rv-xy-plot__axis';\nvar animatedProps = ['xRange', 'yRange', 'xDomain', 'yDomain', 'width', 'height', 'marginLeft', 'marginTop', 'marginRight', 'marginBottom', 'tickSize', 'tickTotal', 'tickSizeInner', 'tickSizeOuter'];\n\nvar DecorativeAxis = function (_AbstractSeries) {\n  _inherits(DecorativeAxis, _AbstractSeries);\n\n  function DecorativeAxis() {\n    _classCallCheck(this, DecorativeAxis);\n\n    return _possibleConstructorReturn(this, (DecorativeAxis.__proto__ || Object.getPrototypeOf(DecorativeAxis)).apply(this, arguments));\n  }\n\n  _createClass(DecorativeAxis, [{\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          animation = _props.animation,\n          className = _props.className,\n          marginLeft = _props.marginLeft,\n          marginTop = _props.marginTop,\n          axisStart = _props.axisStart,\n          axisEnd = _props.axisEnd,\n          axisDomain = _props.axisDomain,\n          numberOfTicks = _props.numberOfTicks,\n          tickValue = _props.tickValue,\n          tickSize = _props.tickSize,\n          style = _props.style;\n\n      if (animation) {\n        return React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: animatedProps\n        }), React.createElement(DecorativeAxis, _extends({}, this.props, {\n          animation: null\n        })));\n      }\n\n      var x = this._getAttributeFunctor('x');\n\n      var y = this._getAttributeFunctor('y');\n\n      return React.createElement('g', {\n        className: predefinedClassName + ' ' + className,\n        transform: 'translate(' + marginLeft + ',' + marginTop + ')'\n      }, React.createElement('line', _extends({}, _extends({\n        x1: x({\n          x: axisStart.x\n        }),\n        x2: x({\n          x: axisEnd.x\n        }),\n        y1: y({\n          y: axisStart.y\n        }),\n        y2: y({\n          y: axisEnd.y\n        })\n      }, style.line), {\n        className: 'rv-xy-plot__axis__line'\n      })), React.createElement('g', {\n        className: 'rv-xy-manipulable-axis__ticks'\n      }, DecorativeAxisTicks({\n        axisDomain: axisDomain,\n        axisEnd: {\n          x: x(axisEnd),\n          y: y(axisEnd)\n        },\n        axisStart: {\n          x: x(axisStart),\n          y: y(axisStart)\n        },\n        numberOfTicks: numberOfTicks,\n        tickValue: tickValue,\n        tickSize: tickSize,\n        style: style\n      })));\n    }\n  }]);\n\n  return DecorativeAxis;\n}(AbstractSeries);\n\nvar DEFAULT_FORMAT = format('.2r');\nDecorativeAxis.defaultProps = {\n  className: '',\n  numberOfTicks: 10,\n  tickValue: function tickValue(d) {\n    return DEFAULT_FORMAT(d);\n  },\n  tickSize: 5,\n  style: {\n    line: {\n      strokeWidth: 1\n    },\n    ticks: {\n      strokeWidth: 2\n    },\n    text: {}\n  }\n};\nDecorativeAxis.displayName = 'DecorativeAxis';\nexport default DecorativeAxis;","// Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport React from 'react';\nvar predefinedClassName = 'rv-gradient-defs';\n\nfunction GradientDefs(props) {\n  var className = props.className;\n  return React.createElement('defs', {\n    className: predefinedClassName + ' ' + className\n  }, props.children);\n}\n\nGradientDefs.displayName = 'GradientDefs';\nGradientDefs.requiresSVG = true;\nGradientDefs.defaultProps = {\n  className: ''\n};\nexport default GradientDefs;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\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\n  return obj;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React, { PureComponent } from 'react';\nimport { getAttributeScale } from '../utils/scales-utils';\nimport Animation, { AnimationPropType } from '../animation';\nimport { getTicksTotalFromSize, getTickValues, DIRECTION } from '../utils/axis-utils';\nvar VERTICAL = DIRECTION.VERTICAL;\nvar defaultProps = {\n  direction: VERTICAL\n};\nvar animatedProps = ['xRange', 'yRange', 'xDomain', 'yDomain', 'width', 'height', 'marginLeft', 'marginTop', 'marginRight', 'marginBottom', 'tickTotal'];\n\nvar GridLines = function (_PureComponent) {\n  _inherits(GridLines, _PureComponent);\n\n  function GridLines() {\n    _classCallCheck(this, GridLines);\n\n    return _possibleConstructorReturn(this, (GridLines.__proto__ || Object.getPrototypeOf(GridLines)).apply(this, arguments));\n  }\n\n  _createClass(GridLines, [{\n    key: '_getDefaultProps',\n    value: function _getDefaultProps() {\n      var _props = this.props,\n          innerWidth = _props.innerWidth,\n          innerHeight = _props.innerHeight,\n          marginTop = _props.marginTop,\n          marginLeft = _props.marginLeft,\n          direction = _props.direction;\n      return {\n        left: marginLeft,\n        top: marginTop,\n        width: innerWidth,\n        height: innerHeight,\n        tickTotal: getTicksTotalFromSize(direction === VERTICAL ? innerWidth : innerHeight)\n      };\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props2 = this.props,\n          animation = _props2.animation,\n          className = _props2.className;\n\n      if (animation) {\n        return React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: animatedProps\n        }), React.createElement(GridLines, _extends({}, this.props, {\n          animation: null\n        })));\n      }\n\n      var props = _extends({}, this._getDefaultProps(), this.props);\n\n      var attr = props.attr,\n          direction = props.direction,\n          width = props.width,\n          height = props.height,\n          style = props.style,\n          tickTotal = props.tickTotal,\n          tickValues = props.tickValues,\n          top = props.top,\n          left = props.left;\n      var isVertical = direction === VERTICAL;\n      var tickXAttr = isVertical ? 'y' : 'x';\n      var tickYAttr = isVertical ? 'x' : 'y';\n      var length = isVertical ? height : width;\n      var scale = getAttributeScale(props, attr);\n      var values = getTickValues(scale, tickTotal, tickValues);\n      return React.createElement('g', {\n        transform: 'translate(' + left + ',' + top + ')',\n        className: 'rv-xy-plot__grid-lines ' + className\n      }, values.map(function (v, i) {\n        var _pathProps;\n\n        var pos = scale(v);\n        var pathProps = (_pathProps = {}, _defineProperty(_pathProps, tickYAttr + '1', pos), _defineProperty(_pathProps, tickYAttr + '2', pos), _defineProperty(_pathProps, tickXAttr + '1', 0), _defineProperty(_pathProps, tickXAttr + '2', length), _pathProps);\n        return React.createElement('line', _extends({}, pathProps, {\n          key: i,\n          className: 'rv-xy-plot__grid-lines__line',\n          style: style\n        }));\n      }));\n    }\n  }]);\n\n  return GridLines;\n}(PureComponent);\n\nGridLines.displayName = 'GridLines';\nGridLines.defaultProps = defaultProps;\nGridLines.requiresSVG = true;\nexport default GridLines;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport Animation from '../../animation';\nimport { ANIMATED_SERIES_PROPS } from '../../utils/series-utils';\nimport AbstractSeries from './abstract-series';\nvar predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--heatmap';\n\nvar HeatmapSeries = function (_AbstractSeries) {\n  _inherits(HeatmapSeries, _AbstractSeries);\n\n  function HeatmapSeries() {\n    _classCallCheck(this, HeatmapSeries);\n\n    return _possibleConstructorReturn(this, (HeatmapSeries.__proto__ || Object.getPrototypeOf(HeatmapSeries)).apply(this, arguments));\n  }\n\n  _createClass(HeatmapSeries, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          animation = _props.animation,\n          className = _props.className,\n          data = _props.data,\n          marginLeft = _props.marginLeft,\n          marginTop = _props.marginTop,\n          style = _props.style;\n\n      if (!data) {\n        return null;\n      }\n\n      if (animation) {\n        return React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: ANIMATED_SERIES_PROPS\n        }), React.createElement(HeatmapSeries, _extends({}, this.props, {\n          animation: null\n        })));\n      }\n\n      var _rectStyle$style = _extends({\n        rectStyle: {}\n      }, style),\n          rectStyle = _rectStyle$style.rectStyle;\n\n      var x = this._getAttributeFunctor('x');\n\n      var y = this._getAttributeFunctor('y');\n\n      var opacity = this._getAttributeFunctor('opacity');\n\n      var fill = this._getAttributeFunctor('fill') || this._getAttributeFunctor('color');\n\n      var stroke = this._getAttributeFunctor('stroke') || this._getAttributeFunctor('color');\n\n      var xDistance = this._getScaleDistance('x');\n\n      var yDistance = this._getScaleDistance('y');\n\n      return React.createElement('g', {\n        className: predefinedClassName + ' ' + className,\n        transform: 'translate(' + marginLeft + ',' + marginTop + ')'\n      }, data.map(function (d, i) {\n        var attrs = _extends({\n          style: _extends({\n            stroke: stroke && stroke(d),\n            fill: fill && fill(d),\n            opacity: opacity && opacity(d)\n          }, style)\n        }, rectStyle, {\n          x: x(d) - xDistance / 2,\n          y: y(d) - yDistance / 2,\n          width: xDistance,\n          height: yDistance,\n          key: i,\n          onClick: function onClick(e) {\n            return _this2._valueClickHandler(d, e);\n          },\n          onContextMenu: function onContextMenu(e) {\n            return _this2._valueRightClickHandler(d, e);\n          },\n          onMouseOver: function onMouseOver(e) {\n            return _this2._valueMouseOverHandler(d, e);\n          },\n          onMouseOut: function onMouseOut(e) {\n            return _this2._valueMouseOutHandler(d, e);\n          }\n        });\n\n        return React.createElement('rect', attrs);\n      }));\n    }\n  }], [{\n    key: 'getParentConfig',\n    value: function getParentConfig(attr) {\n      var isDomainAdjustmentNeeded = attr === 'x' || attr === 'y';\n      return {\n        isDomainAdjustmentNeeded: isDomainAdjustmentNeeded\n      };\n    }\n  }]);\n\n  return HeatmapSeries;\n}(AbstractSeries);\n\nHeatmapSeries.displayName = 'HeatmapSeries';\nexport default HeatmapSeries;","var thirdPi = Math.PI / 3,\n    angles = [0, thirdPi, 2 * thirdPi, 3 * thirdPi, 4 * thirdPi, 5 * thirdPi];\n\nfunction pointX(d) {\n  return d[0];\n}\n\nfunction pointY(d) {\n  return d[1];\n}\n\nexport default function () {\n  var x0 = 0,\n      y0 = 0,\n      x1 = 1,\n      y1 = 1,\n      x = pointX,\n      y = pointY,\n      r,\n      dx,\n      dy;\n\n  function hexbin(points) {\n    var binsById = {},\n        bins = [],\n        i,\n        n = points.length;\n\n    for (i = 0; i < n; ++i) {\n      if (isNaN(px = +x.call(null, point = points[i], i, points)) || isNaN(py = +y.call(null, point, i, points))) continue;\n      var point,\n          px,\n          py,\n          pj = Math.round(py = py / dy),\n          pi = Math.round(px = px / dx - (pj & 1) / 2),\n          py1 = py - pj;\n\n      if (Math.abs(py1) * 3 > 1) {\n        var px1 = px - pi,\n            pi2 = pi + (px < pi ? -1 : 1) / 2,\n            pj2 = pj + (py < pj ? -1 : 1),\n            px2 = px - pi2,\n            py2 = py - pj2;\n        if (px1 * px1 + py1 * py1 > px2 * px2 + py2 * py2) pi = pi2 + (pj & 1 ? 1 : -1) / 2, pj = pj2;\n      }\n\n      var id = pi + \"-\" + pj,\n          bin = binsById[id];\n      if (bin) bin.push(point);else {\n        bins.push(bin = binsById[id] = [point]);\n        bin.x = (pi + (pj & 1) / 2) * dx;\n        bin.y = pj * dy;\n      }\n    }\n\n    return bins;\n  }\n\n  function hexagon(radius) {\n    var x0 = 0,\n        y0 = 0;\n    return angles.map(function (angle) {\n      var x1 = Math.sin(angle) * radius,\n          y1 = -Math.cos(angle) * radius,\n          dx = x1 - x0,\n          dy = y1 - y0;\n      x0 = x1, y0 = y1;\n      return [dx, dy];\n    });\n  }\n\n  hexbin.hexagon = function (radius) {\n    return \"m\" + hexagon(radius == null ? r : +radius).join(\"l\") + \"z\";\n  };\n\n  hexbin.centers = function () {\n    var centers = [],\n        j = Math.round(y0 / dy),\n        i = Math.round(x0 / dx);\n\n    for (var y = j * dy; y < y1 + r; y += dy, ++j) {\n      for (var x = i * dx + (j & 1) * dx / 2; x < x1 + dx / 2; x += dx) {\n        centers.push([x, y]);\n      }\n    }\n\n    return centers;\n  };\n\n  hexbin.mesh = function () {\n    var fragment = hexagon(r).slice(0, 4).join(\"l\");\n    return hexbin.centers().map(function (p) {\n      return \"M\" + p + \"m\" + fragment;\n    }).join(\"\");\n  };\n\n  hexbin.x = function (_) {\n    return arguments.length ? (x = _, hexbin) : x;\n  };\n\n  hexbin.y = function (_) {\n    return arguments.length ? (y = _, hexbin) : y;\n  };\n\n  hexbin.radius = function (_) {\n    return arguments.length ? (r = +_, dx = r * 2 * Math.sin(thirdPi), dy = r * 1.5, hexbin) : r;\n  };\n\n  hexbin.size = function (_) {\n    return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], hexbin) : [x1 - x0, y1 - y0];\n  };\n\n  hexbin.extent = function (_) {\n    return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], hexbin) : [[x0, y0], [x1, y1]];\n  };\n\n  return hexbin.radius(1);\n}","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nfunction _toConsumableArray(arr) {\n  if (Array.isArray(arr)) {\n    for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n      arr2[i] = arr[i];\n    }\n\n    return arr2;\n  } else {\n    return Array.from(arr);\n  }\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport Animation from '../../animation';\nimport { hexbin } from 'd3-hexbin';\nimport { scaleLinear } from 'd3-scale';\nimport { ANIMATED_SERIES_PROPS } from '../../utils/series-utils';\nimport { CONTINUOUS_COLOR_RANGE } from '../../theme';\nimport AbstractSeries from './abstract-series';\nvar predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--hexbin';\n\nfunction getColorDomain(_ref, hexes) {\n  var countDomain = _ref.countDomain;\n\n  if (countDomain) {\n    return countDomain;\n  }\n\n  return [0, Math.max.apply(Math, _toConsumableArray(hexes.map(function (row) {\n    return row.length;\n  })))];\n}\n\nvar HexbinSeries = function (_AbstractSeries) {\n  _inherits(HexbinSeries, _AbstractSeries);\n\n  function HexbinSeries() {\n    _classCallCheck(this, HexbinSeries);\n\n    return _possibleConstructorReturn(this, (HexbinSeries.__proto__ || Object.getPrototypeOf(HexbinSeries)).apply(this, arguments));\n  }\n\n  _createClass(HexbinSeries, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          animation = _props.animation,\n          className = _props.className,\n          colorRange = _props.colorRange,\n          data = _props.data,\n          innerHeight = _props.innerHeight,\n          innerWidth = _props.innerWidth,\n          marginLeft = _props.marginLeft,\n          marginTop = _props.marginTop,\n          radius = _props.radius,\n          sizeHexagonsWithCount = _props.sizeHexagonsWithCount,\n          style = _props.style,\n          xOffset = _props.xOffset,\n          yOffset = _props.yOffset;\n\n      if (!data) {\n        return null;\n      }\n\n      if (animation) {\n        return React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: ANIMATED_SERIES_PROPS\n        }), React.createElement(HexbinSeries, _extends({}, this.props, {\n          animation: null\n        })));\n      }\n\n      var x = this._getAttributeFunctor('x');\n\n      var y = this._getAttributeFunctor('y');\n\n      var hex = hexbin().x(function (d) {\n        return x(d) + xOffset;\n      }).y(function (d) {\n        return y(d) + yOffset;\n      }).radius(radius).size([innerWidth, innerHeight]);\n      var hexagonPath = hex.hexagon();\n      var hexes = hex(data);\n      var countDomain = getColorDomain(this.props, hexes);\n      var color = scaleLinear().domain(countDomain).range(colorRange);\n      var size = scaleLinear().domain(countDomain).range([0, radius]);\n      return React.createElement('g', {\n        className: predefinedClassName + ' ' + className,\n        transform: 'translate(' + marginLeft + ',' + marginTop + ')'\n      }, hexes.map(function (d, i) {\n        var attrs = {\n          style: style,\n          d: sizeHexagonsWithCount ? hex.hexagon(size(d.length)) : hexagonPath,\n          fill: color(d.length),\n          transform: 'translate(' + d.x + ', ' + d.y + ')',\n          key: i,\n          onClick: function onClick(e) {\n            return _this2._valueClickHandler(d, e);\n          },\n          onContextMenu: function onContextMenu(e) {\n            return _this2._valueRightClickHandler(d, e);\n          },\n          onMouseOver: function onMouseOver(e) {\n            return _this2._valueMouseOverHandler(d, e);\n          },\n          onMouseOut: function onMouseOut(e) {\n            return _this2._valueMouseOutHandler(d, e);\n          }\n        };\n        return React.createElement('path', attrs);\n      }));\n    }\n  }]);\n\n  return HexbinSeries;\n}(AbstractSeries);\n\nHexbinSeries.defaultProps = {\n  radius: 20,\n  colorRange: CONTINUOUS_COLOR_RANGE,\n  xOffset: 0,\n  yOffset: 0\n};\nHexbinSeries.displayName = 'HexbinSeries';\nexport default HexbinSeries;","var _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nimport React from 'react';\nimport AbstractSeries from './series/abstract-series';\nimport { getAttributeScale } from '../utils/scales-utils';\n\nfunction getLocs(evt) {\n  var xLoc = evt.type === 'touchstart' ? evt.pageX : evt.offsetX;\n  var yLoc = evt.type === 'touchstart' ? evt.pageY : evt.offsetY;\n  return {\n    xLoc: xLoc,\n    yLoc: yLoc\n  };\n}\n\nvar Highlight = function (_AbstractSeries) {\n  _inherits(Highlight, _AbstractSeries);\n\n  function Highlight() {\n    var _ref;\n\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, Highlight);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Highlight.__proto__ || Object.getPrototypeOf(Highlight)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n      dragging: false,\n      brushArea: {\n        top: 0,\n        right: 0,\n        bottom: 0,\n        left: 0\n      },\n      brushing: false,\n      startLocX: 0,\n      startLocY: 0,\n      dragArea: null\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  _createClass(Highlight, [{\n    key: '_getDrawArea',\n    value: function _getDrawArea(xLoc, yLoc) {\n      var _state = this.state,\n          startLocX = _state.startLocX,\n          startLocY = _state.startLocY;\n      var _props = this.props,\n          enableX = _props.enableX,\n          enableY = _props.enableY,\n          highlightWidth = _props.highlightWidth,\n          highlightHeight = _props.highlightHeight,\n          innerWidth = _props.innerWidth,\n          innerHeight = _props.innerHeight,\n          marginLeft = _props.marginLeft,\n          marginRight = _props.marginRight,\n          marginBottom = _props.marginBottom,\n          marginTop = _props.marginTop;\n      var plotHeight = innerHeight + marginTop + marginBottom;\n      var plotWidth = innerWidth + marginLeft + marginRight;\n      var touchWidth = highlightWidth || plotWidth;\n      var touchHeight = highlightHeight || plotHeight;\n      return {\n        bottom: enableY ? Math.max(startLocY, yLoc) : touchHeight,\n        right: enableX ? Math.max(startLocX, xLoc) : touchWidth,\n        left: enableX ? Math.min(xLoc, startLocX) : 0,\n        top: enableY ? Math.min(yLoc, startLocY) : 0\n      };\n    }\n  }, {\n    key: '_getDragArea',\n    value: function _getDragArea(xLoc, yLoc) {\n      var _props2 = this.props,\n          enableX = _props2.enableX,\n          enableY = _props2.enableY;\n      var _state2 = this.state,\n          startLocX = _state2.startLocX,\n          startLocY = _state2.startLocY,\n          dragArea = _state2.dragArea;\n      return {\n        bottom: dragArea.bottom + (enableY ? yLoc - startLocY : 0),\n        left: dragArea.left + (enableX ? xLoc - startLocX : 0),\n        right: dragArea.right + (enableX ? xLoc - startLocX : 0),\n        top: dragArea.top + (enableY ? yLoc - startLocY : 0)\n      };\n    }\n  }, {\n    key: '_clickedOutsideDrag',\n    value: function _clickedOutsideDrag(xLoc, yLoc) {\n      var _props3 = this.props,\n          enableX = _props3.enableX,\n          enableY = _props3.enableY;\n      var _state3 = this.state,\n          dragArea = _state3.dragArea,\n          _state3$brushArea = _state3.brushArea,\n          left = _state3$brushArea.left,\n          right = _state3$brushArea.right,\n          top = _state3$brushArea.top,\n          bottom = _state3$brushArea.bottom;\n      var clickedOutsideDragX = dragArea && (xLoc < left || xLoc > right);\n      var clickedOutsideDragY = dragArea && (yLoc < top || yLoc > bottom);\n\n      if (enableX && enableY) {\n        return clickedOutsideDragX || clickedOutsideDragY;\n      }\n\n      if (enableX) {\n        return clickedOutsideDragX;\n      }\n\n      if (enableY) {\n        return clickedOutsideDragY;\n      }\n\n      return true;\n    }\n  }, {\n    key: '_convertAreaToCoordinates',\n    value: function _convertAreaToCoordinates(brushArea) {\n      // NOTE only continuous scales are supported for brushing/getting coordinates back\n      var _props4 = this.props,\n          enableX = _props4.enableX,\n          enableY = _props4.enableY,\n          marginLeft = _props4.marginLeft,\n          marginTop = _props4.marginTop;\n      var xScale = getAttributeScale(this.props, 'x');\n      var yScale = getAttributeScale(this.props, 'y'); // Ensure that users wishes are being respected about which scales are evaluated\n      // this is specifically enabled to ensure brushing on mixed categorical and linear\n      // charts will run as expected\n\n      if (enableX && enableY) {\n        return {\n          bottom: yScale.invert(brushArea.bottom),\n          left: xScale.invert(brushArea.left - marginLeft),\n          right: xScale.invert(brushArea.right - marginLeft),\n          top: yScale.invert(brushArea.top)\n        };\n      }\n\n      if (enableY) {\n        return {\n          bottom: yScale.invert(brushArea.bottom - marginTop),\n          top: yScale.invert(brushArea.top - marginTop)\n        };\n      }\n\n      if (enableX) {\n        return {\n          left: xScale.invert(brushArea.left - marginLeft),\n          right: xScale.invert(brushArea.right - marginLeft)\n        };\n      }\n\n      return {};\n    }\n  }, {\n    key: 'startBrushing',\n    value: function startBrushing(e) {\n      var _this2 = this;\n\n      var _props5 = this.props,\n          onBrushStart = _props5.onBrushStart,\n          onDragStart = _props5.onDragStart,\n          drag = _props5.drag;\n      var dragArea = this.state.dragArea;\n\n      var _getLocs = getLocs(e.nativeEvent),\n          xLoc = _getLocs.xLoc,\n          yLoc = _getLocs.yLoc;\n\n      var startArea = function startArea(dragging, resetDrag) {\n        var emptyBrush = {\n          bottom: yLoc,\n          left: xLoc,\n          right: xLoc,\n          top: yLoc\n        };\n\n        _this2.setState({\n          dragging: dragging,\n          brushArea: dragArea && !resetDrag ? dragArea : emptyBrush,\n          brushing: !dragging,\n          startLocX: xLoc,\n          startLocY: yLoc\n        });\n      };\n\n      var clickedOutsideDrag = this._clickedOutsideDrag(xLoc, yLoc);\n\n      if (drag && !dragArea || !drag || clickedOutsideDrag) {\n        startArea(false, clickedOutsideDrag);\n\n        if (onBrushStart) {\n          onBrushStart(e);\n        }\n\n        return;\n      }\n\n      if (drag && dragArea) {\n        startArea(true, clickedOutsideDrag);\n\n        if (onDragStart) {\n          onDragStart(e);\n        }\n      }\n    }\n  }, {\n    key: 'stopBrushing',\n    value: function stopBrushing(e) {\n      var _state4 = this.state,\n          brushing = _state4.brushing,\n          dragging = _state4.dragging,\n          brushArea = _state4.brushArea; // Quickly short-circuit if the user isn't brushing in our component\n\n      if (!brushing && !dragging) {\n        return;\n      }\n\n      var _props6 = this.props,\n          onBrushEnd = _props6.onBrushEnd,\n          onDragEnd = _props6.onDragEnd,\n          drag = _props6.drag;\n      var noHorizontal = Math.abs(brushArea.right - brushArea.left) < 5;\n      var noVertical = Math.abs(brushArea.top - brushArea.bottom) < 5; // Invoke the callback with null if the selected area was < 5px\n\n      var isNulled = noVertical || noHorizontal; // Clear the draw area\n\n      this.setState({\n        brushing: false,\n        dragging: false,\n        brushArea: drag ? brushArea : {\n          top: 0,\n          right: 0,\n          bottom: 0,\n          left: 0\n        },\n        startLocX: 0,\n        startLocY: 0,\n        dragArea: drag && !isNulled && brushArea\n      });\n\n      if (brushing && onBrushEnd) {\n        onBrushEnd(!isNulled ? this._convertAreaToCoordinates(brushArea) : null);\n      }\n\n      if (drag && onDragEnd) {\n        onDragEnd(!isNulled ? this._convertAreaToCoordinates(brushArea) : null);\n      }\n    }\n  }, {\n    key: 'onBrush',\n    value: function onBrush(e) {\n      var _props7 = this.props,\n          onBrush = _props7.onBrush,\n          onDrag = _props7.onDrag,\n          drag = _props7.drag;\n      var _state5 = this.state,\n          brushing = _state5.brushing,\n          dragging = _state5.dragging;\n\n      var _getLocs2 = getLocs(e.nativeEvent),\n          xLoc = _getLocs2.xLoc,\n          yLoc = _getLocs2.yLoc;\n\n      if (brushing) {\n        var brushArea = this._getDrawArea(xLoc, yLoc);\n\n        this.setState({\n          brushArea: brushArea\n        });\n\n        if (onBrush) {\n          onBrush(this._convertAreaToCoordinates(brushArea));\n        }\n      }\n\n      if (drag && dragging) {\n        var _brushArea = this._getDragArea(xLoc, yLoc);\n\n        this.setState({\n          brushArea: _brushArea\n        });\n\n        if (onDrag) {\n          onDrag(this._convertAreaToCoordinates(_brushArea));\n        }\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this3 = this;\n\n      var _props8 = this.props,\n          color = _props8.color,\n          className = _props8.className,\n          highlightHeight = _props8.highlightHeight,\n          highlightWidth = _props8.highlightWidth,\n          highlightX = _props8.highlightX,\n          highlightY = _props8.highlightY,\n          innerWidth = _props8.innerWidth,\n          innerHeight = _props8.innerHeight,\n          marginLeft = _props8.marginLeft,\n          marginRight = _props8.marginRight,\n          marginTop = _props8.marginTop,\n          marginBottom = _props8.marginBottom,\n          opacity = _props8.opacity;\n      var _state$brushArea = this.state.brushArea,\n          left = _state$brushArea.left,\n          right = _state$brushArea.right,\n          top = _state$brushArea.top,\n          bottom = _state$brushArea.bottom;\n      var leftPos = 0;\n\n      if (highlightX) {\n        var xScale = getAttributeScale(this.props, 'x');\n        leftPos = xScale(highlightX);\n      }\n\n      var topPos = 0;\n\n      if (highlightY) {\n        var yScale = getAttributeScale(this.props, 'y');\n        topPos = yScale(highlightY);\n      }\n\n      var plotWidth = marginLeft + marginRight + innerWidth;\n      var plotHeight = marginTop + marginBottom + innerHeight;\n      var touchWidth = highlightWidth || plotWidth;\n      var touchHeight = highlightHeight || plotHeight;\n      return React.createElement('g', {\n        transform: 'translate(' + leftPos + ', ' + topPos + ')',\n        className: className + ' rv-highlight-container'\n      }, React.createElement('rect', {\n        className: 'rv-mouse-target',\n        fill: 'black',\n        opacity: '0',\n        x: '0',\n        y: '0',\n        width: Math.max(touchWidth, 0),\n        height: Math.max(touchHeight, 0),\n        onMouseDown: function onMouseDown(e) {\n          return _this3.startBrushing(e);\n        },\n        onMouseMove: function onMouseMove(e) {\n          return _this3.onBrush(e);\n        },\n        onMouseUp: function onMouseUp(e) {\n          return _this3.stopBrushing(e);\n        },\n        onMouseLeave: function onMouseLeave(e) {\n          return _this3.stopBrushing(e);\n        } // preventDefault() so that mouse event emulation does not happen\n        ,\n        onTouchEnd: function onTouchEnd(e) {\n          e.preventDefault();\n\n          _this3.stopBrushing(e);\n        },\n        onTouchCancel: function onTouchCancel(e) {\n          e.preventDefault();\n\n          _this3.stopBrushing(e);\n        },\n        onContextMenu: function onContextMenu(e) {\n          return e.preventDefault();\n        },\n        onContextMenuCapture: function onContextMenuCapture(e) {\n          return e.preventDefault();\n        }\n      }), React.createElement('rect', {\n        className: 'rv-highlight',\n        pointerEvents: 'none',\n        opacity: opacity,\n        fill: color,\n        x: left,\n        y: top,\n        width: Math.min(Math.max(0, right - left), touchWidth),\n        height: Math.min(Math.max(0, bottom - top), touchHeight)\n      }));\n    }\n  }]);\n\n  return Highlight;\n}(AbstractSeries);\n\nHighlight.displayName = 'HighlightOverlay';\nHighlight.defaultProps = {\n  color: 'rgb(77, 182, 172)',\n  className: '',\n  enableX: true,\n  enableY: true,\n  opacity: 0.3\n};\nexport default Highlight;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { transformValueToString } from '../utils/data-utils';\nimport { getAttributeFunctor } from '../utils/scales-utils';\n/*\n * Hint provides two options for placement of hint:\n * a) around a data point in one of four quadrants (imagine the point bisected\n *    by two axes -vertical, horizontal- creating 4 quadrants around a data\n *    point).\n * b) **New** pin to an edge of chart/plot area and position along that edge\n *    using data point's other dimension value.\n *\n * To support these two options, deprecate one Hint props (orientation) with two\n * new Hint align prop object (horizontal, vertical) with following values:\n *\n *   horizontal: auto, left, right, leftEdge, rightEdge\n *   vertical: auto, bottom, top, bottomEdge, topEdge\n *\n * Thus, the following ALIGN constants are the values for horizontal\n * and vertical\n */\n\nvar ALIGN = {\n  AUTO: 'auto',\n  LEFT: 'left',\n  RIGHT: 'right',\n  LEFT_EDGE: 'leftEdge',\n  RIGHT_EDGE: 'rightEdge',\n  BOTTOM: 'bottom',\n  TOP: 'top',\n  BOTTOM_EDGE: 'bottomEdge',\n  TOP_EDGE: 'topEdge'\n};\n/**\n * For backwards support, retain the ORIENTATION prop constants\n */\n\nvar ORIENTATION = {\n  BOTTOM_LEFT: 'bottomleft',\n  BOTTOM_RIGHT: 'bottomright',\n  TOP_LEFT: 'topleft',\n  TOP_RIGHT: 'topright'\n};\n/**\n * Default format function for the value.\n * @param {Object} value Value.\n * @returns {Array} title-value pairs.\n */\n\nfunction defaultFormat(value) {\n  return Object.keys(value).map(function getProp(key) {\n    return {\n      title: key,\n      value: transformValueToString(value[key])\n    };\n  });\n}\n\nvar Hint = function (_PureComponent) {\n  _inherits(Hint, _PureComponent);\n\n  function Hint() {\n    _classCallCheck(this, Hint);\n\n    return _possibleConstructorReturn(this, (Hint.__proto__ || Object.getPrototypeOf(Hint)).apply(this, arguments));\n  }\n\n  _createClass(Hint, [{\n    key: '_getAlign',\n\n    /**\n     * Obtain align object with horizontal and vertical settings\n     * but convert any AUTO values to the non-auto ALIGN depending on the\n     * values of x and y.\n     * @param {number} x X value.\n     * @param {number} y Y value.\n     * @returns {Object} Align object w/ horizontal, vertical prop strings.\n     * @private\n     */\n    value: function _getAlign(x, y) {\n      var _props = this.props,\n          innerWidth = _props.innerWidth,\n          innerHeight = _props.innerHeight,\n          orientation = _props.orientation,\n          _props$align = _props.align,\n          horizontal = _props$align.horizontal,\n          vertical = _props$align.vertical;\n      var align = orientation ? this._mapOrientationToAlign(orientation) : {\n        horizontal: horizontal,\n        vertical: vertical\n      };\n\n      if (horizontal === ALIGN.AUTO) {\n        align.horizontal = x > innerWidth / 2 ? ALIGN.LEFT : ALIGN.RIGHT;\n      }\n\n      if (vertical === ALIGN.AUTO) {\n        align.vertical = y > innerHeight / 2 ? ALIGN.TOP : ALIGN.BOTTOM;\n      }\n\n      return align;\n    }\n    /**\n     * Get the class names from align values.\n     * @param {Object} align object with horizontal and vertical prop strings.\n     * @returns {string} Class names.\n     * @private\n     */\n\n  }, {\n    key: '_getAlignClassNames',\n    value: function _getAlignClassNames(align) {\n      var orientation = this.props.orientation;\n      var orientationClass = orientation ? 'rv-hint--orientation-' + orientation : '';\n      return orientationClass + ' rv-hint--horizontalAlign-' + align.horizontal + '\\n     rv-hint--verticalAlign-' + align.vertical;\n    }\n    /**\n     * Get a CSS mixin for a proper positioning of the element.\n     * @param {Object} align object with horizontal and vertical prop strings.\n     * @param {number} x X position.\n     * @param {number} y Y position.\n     * @returns {Object} Object, that may contain `left` or `right, `top` or\n     * `bottom` properties.\n     * @private\n     */\n\n  }, {\n    key: '_getAlignStyle',\n    value: function _getAlignStyle(align, x, y) {\n      return _extends({}, this._getXCSS(align.horizontal, x), this._getYCSS(align.vertical, y));\n    }\n    /**\n     * Get the bottom coordinate of the hint.\n     * When y undefined or null, edge case, pin bottom.\n     * @param {number} y Y.\n     * @returns {{bottom: *}} Mixin.\n     * @private\n     */\n\n  }, {\n    key: '_getCSSBottom',\n    value: function _getCSSBottom(y) {\n      if (y === undefined || y === null) {\n        return {\n          bottom: 0\n        };\n      }\n\n      var _props2 = this.props,\n          innerHeight = _props2.innerHeight,\n          marginBottom = _props2.marginBottom;\n      return {\n        bottom: marginBottom + innerHeight - y\n      };\n    }\n    /**\n     * Get the left coordinate of the hint.\n     * When x undefined or null, edge case, pin left.\n     * @param {number} x X.\n     * @returns {{left: *}} Mixin.\n     * @private\n     */\n\n  }, {\n    key: '_getCSSLeft',\n    value: function _getCSSLeft(x) {\n      if (x === undefined || x === null) {\n        return {\n          left: 0\n        };\n      }\n\n      var marginLeft = this.props.marginLeft;\n      return {\n        left: marginLeft + x\n      };\n    }\n    /**\n     * Get the right coordinate of the hint.\n     * When x undefined or null, edge case, pin right.\n     * @param {number} x X.\n     * @returns {{right: *}} Mixin.\n     * @private\n     */\n\n  }, {\n    key: '_getCSSRight',\n    value: function _getCSSRight(x) {\n      if (x === undefined || x === null) {\n        return {\n          right: 0\n        };\n      }\n\n      var _props3 = this.props,\n          innerWidth = _props3.innerWidth,\n          marginRight = _props3.marginRight;\n      return {\n        right: marginRight + innerWidth - x\n      };\n    }\n    /**\n     * Get the top coordinate of the hint.\n     * When y undefined or null, edge case, pin top.\n     * @param {number} y Y.\n     * @returns {{top: *}} Mixin.\n     * @private\n     */\n\n  }, {\n    key: '_getCSSTop',\n    value: function _getCSSTop(y) {\n      if (y === undefined || y === null) {\n        return {\n          top: 0\n        };\n      }\n\n      var marginTop = this.props.marginTop;\n      return {\n        top: marginTop + y\n      };\n    }\n    /**\n     * Get the position for the hint and the appropriate class name.\n     * @returns {{style: Object, positionClassName: string}} Style and className for the\n     * hint.\n     * @private\n     */\n\n  }, {\n    key: '_getPositionInfo',\n    value: function _getPositionInfo() {\n      var _props4 = this.props,\n          value = _props4.value,\n          getAlignStyle = _props4.getAlignStyle;\n      var x = getAttributeFunctor(this.props, 'x')(value);\n      var y = getAttributeFunctor(this.props, 'y')(value);\n\n      var align = this._getAlign(x, y);\n\n      return {\n        position: getAlignStyle ? getAlignStyle(align, x, y) : this._getAlignStyle(align, x, y),\n        positionClassName: this._getAlignClassNames(align)\n      };\n    }\n  }, {\n    key: '_getXCSS',\n    value: function _getXCSS(horizontal, x) {\n      // obtain xCSS\n      switch (horizontal) {\n        case ALIGN.LEFT_EDGE:\n          // this pins x to left edge\n          return this._getCSSLeft(null);\n\n        case ALIGN.RIGHT_EDGE:\n          // this pins x to left edge\n          return this._getCSSRight(null);\n\n        case ALIGN.LEFT:\n          // this places hint text to the left of center, so set its right edge\n          return this._getCSSRight(x);\n\n        case ALIGN.RIGHT:\n        default:\n          // this places hint text to the right of center, so set its left edge\n          // default case should not be possible but if it happens set to RIGHT\n          return this._getCSSLeft(x);\n      }\n    }\n  }, {\n    key: '_getYCSS',\n    value: function _getYCSS(verticalAlign, y) {\n      // obtain yCSS\n      switch (verticalAlign) {\n        case ALIGN.TOP_EDGE:\n          // this pins x to top edge\n          return this._getCSSTop(null);\n\n        case ALIGN.BOTTOM_EDGE:\n          // this pins x to bottom edge\n          return this._getCSSBottom(null);\n\n        case ALIGN.BOTTOM:\n          // this places hint text to the bottom of center, so set its top edge\n          return this._getCSSTop(y);\n\n        case ALIGN.TOP:\n        default:\n          // this places hint text to the top of center, so set its bottom edge\n          // default case should not be possible but if it happens set to BOTTOM\n          return this._getCSSBottom(y);\n      }\n    }\n  }, {\n    key: '_mapOrientationToAlign',\n    value: function _mapOrientationToAlign(orientation) {\n      // TODO: print warning that this feature is deprecated and support will be\n      // removed in next major release.\n      switch (orientation) {\n        case ORIENTATION.BOTTOM_LEFT:\n          return {\n            horizontal: ALIGN.LEFT,\n            vertical: ALIGN.BOTTOM\n          };\n\n        case ORIENTATION.BOTTOM_RIGHT:\n          return {\n            horizontal: ALIGN.RIGHT,\n            vertical: ALIGN.BOTTOM\n          };\n\n        case ORIENTATION.TOP_LEFT:\n          return {\n            horizontal: ALIGN.LEFT,\n            vertical: ALIGN.TOP\n          };\n\n        case ORIENTATION.TOP_RIGHT:\n          return {\n            horizontal: ALIGN.RIGHT,\n            vertical: ALIGN.TOP\n          };\n\n        default:\n          // fall back to horizontalAlign, verticalAlign that are either\n          // provided or defaulted to AUTO.  So, don't change things\n          break;\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props5 = this.props,\n          value = _props5.value,\n          format = _props5.format,\n          children = _props5.children,\n          style = _props5.style,\n          className = _props5.className;\n\n      var _getPositionInfo2 = this._getPositionInfo(),\n          position = _getPositionInfo2.position,\n          positionClassName = _getPositionInfo2.positionClassName;\n\n      return React.createElement('div', {\n        className: 'rv-hint ' + positionClassName + ' ' + className,\n        style: _extends({}, style, position, {\n          position: 'absolute'\n        })\n      }, children ? children : React.createElement('div', {\n        className: 'rv-hint__content',\n        style: style.content\n      }, format(value).map(function (formattedProp, i) {\n        return React.createElement('div', {\n          key: 'rv-hint' + i,\n          style: style.row\n        }, React.createElement('span', {\n          className: 'rv-hint__title',\n          style: style.title\n        }, formattedProp.title), ': ', React.createElement('span', {\n          className: 'rv-hint__value',\n          style: style.value\n        }, formattedProp.value));\n      })));\n    }\n  }], [{\n    key: 'defaultProps',\n    get: function get() {\n      return {\n        format: defaultFormat,\n        align: {\n          horizontal: ALIGN.AUTO,\n          vertical: ALIGN.AUTO\n        },\n        style: {}\n      };\n    }\n  }, {\n    key: 'propTypes',\n    get: function get() {\n      return {\n        marginTop: PropTypes.number,\n        marginLeft: PropTypes.number,\n        innerWidth: PropTypes.number,\n        innerHeight: PropTypes.number,\n        scales: PropTypes.object,\n        value: PropTypes.object,\n        format: PropTypes.func,\n        style: PropTypes.object,\n        className: PropTypes.string,\n        align: PropTypes.shape({\n          horizontal: PropTypes.oneOf([ALIGN.AUTO, ALIGN.LEFT, ALIGN.RIGHT, ALIGN.LEFT_EDGE, ALIGN.RIGHT_EDGE]),\n          vertical: PropTypes.oneOf([ALIGN.AUTO, ALIGN.BOTTOM, ALIGN.TOP, ALIGN.BOTTOM_EDGE, ALIGN.TOP_EDGE])\n        }),\n        getAlignStyle: PropTypes.func,\n        orientation: PropTypes.oneOf([ORIENTATION.BOTTOM_LEFT, ORIENTATION.BOTTOM_RIGHT, ORIENTATION.TOP_LEFT, ORIENTATION.TOP_RIGHT])\n      };\n    }\n  }]);\n\n  return Hint;\n}(PureComponent);\n\nHint.displayName = 'Hint';\nHint.ORIENTATION = ORIENTATION;\nHint.ALIGN = ALIGN;\nexport default Hint;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\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\n  return obj;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Animation from '../../animation';\nimport { ANIMATED_SERIES_PROPS, getStackParams } from '../../utils/series-utils';\nimport AbstractSeries from './abstract-series';\nvar predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--bar';\n\nvar BarSeries = function (_AbstractSeries) {\n  _inherits(BarSeries, _AbstractSeries);\n\n  function BarSeries() {\n    _classCallCheck(this, BarSeries);\n\n    return _possibleConstructorReturn(this, (BarSeries.__proto__ || Object.getPrototypeOf(BarSeries)).apply(this, arguments));\n  }\n\n  _createClass(BarSeries, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          animation = _props.animation,\n          className = _props.className,\n          data = _props.data,\n          linePosAttr = _props.linePosAttr,\n          lineSizeAttr = _props.lineSizeAttr,\n          marginLeft = _props.marginLeft,\n          marginTop = _props.marginTop,\n          style = _props.style,\n          valuePosAttr = _props.valuePosAttr,\n          valueSizeAttr = _props.valueSizeAttr,\n          barWidth = _props.barWidth;\n\n      if (!data) {\n        return null;\n      }\n\n      if (animation) {\n        return React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: ANIMATED_SERIES_PROPS\n        }), React.createElement(BarSeries, _extends({}, this.props, {\n          animation: null\n        })));\n      }\n\n      var _getStackParams = getStackParams(this.props),\n          sameTypeTotal = _getStackParams.sameTypeTotal,\n          sameTypeIndex = _getStackParams.sameTypeIndex;\n\n      var distance = this._getScaleDistance(linePosAttr);\n\n      var lineFunctor = this._getAttributeFunctor(linePosAttr);\n\n      var valueFunctor = this._getAttributeFunctor(valuePosAttr);\n\n      var value0Functor = this._getAttr0Functor(valuePosAttr);\n\n      var fillFunctor = this._getAttributeFunctor('fill') || this._getAttributeFunctor('color');\n\n      var strokeFunctor = this._getAttributeFunctor('stroke') || this._getAttributeFunctor('color');\n\n      var opacityFunctor = this._getAttributeFunctor('opacity');\n\n      var halfSpace = distance / 2 * barWidth;\n      return React.createElement('g', {\n        className: predefinedClassName + ' ' + className,\n        transform: 'translate(' + marginLeft + ',' + marginTop + ')'\n      }, data.map(function (d, i) {\n        var _attrs; // totalSpaceAvailable is the space we have available to draw all the\n        // bars of a same 'linePosAttr' value (a.k.a. sameTypeTotal)\n\n\n        var totalSpaceAvailable = halfSpace * 2;\n        var totalSpaceCenter = lineFunctor(d); // totalSpaceStartingPoint is the first pixel were we can start drawing\n\n        var totalSpaceStartingPoint = totalSpaceCenter - halfSpace; // spaceTakenByInterBarsPixels has the overhead space consumed by each bar of sameTypeTotal\n\n        var spaceTakenByInterBarsPixels = (sameTypeTotal - 1) / sameTypeTotal; // spacePerBar is the space we have available to draw sameTypeIndex bar\n\n        var spacePerBar = totalSpaceAvailable / sameTypeTotal - spaceTakenByInterBarsPixels; // barStartingPoint is the first pixel were we can start drawing sameTypeIndex bar\n\n        var barStartingPoint = totalSpaceStartingPoint + spacePerBar * sameTypeIndex + sameTypeIndex;\n        var attrs = (_attrs = {\n          style: _extends({\n            opacity: opacityFunctor && opacityFunctor(d),\n            stroke: strokeFunctor && strokeFunctor(d),\n            fill: fillFunctor && fillFunctor(d)\n          }, style)\n        }, _defineProperty(_attrs, linePosAttr, barStartingPoint), _defineProperty(_attrs, lineSizeAttr, spacePerBar), _defineProperty(_attrs, valuePosAttr, Math.min(value0Functor(d), valueFunctor(d))), _defineProperty(_attrs, valueSizeAttr, Math.abs(-value0Functor(d) + valueFunctor(d))), _defineProperty(_attrs, 'onClick', function onClick(e) {\n          return _this2._valueClickHandler(d, e);\n        }), _defineProperty(_attrs, 'onContextMenu', function onContextMenu(e) {\n          return _this2._valueRightClickHandler(d, e);\n        }), _defineProperty(_attrs, 'onMouseOver', function onMouseOver(e) {\n          return _this2._valueMouseOverHandler(d, e);\n        }), _defineProperty(_attrs, 'onMouseOut', function onMouseOut(e) {\n          return _this2._valueMouseOutHandler(d, e);\n        }), _defineProperty(_attrs, 'key', i), _attrs);\n        return React.createElement('rect', attrs);\n      }));\n    }\n  }], [{\n    key: 'propTypes',\n    get: function get() {\n      return _extends({}, AbstractSeries.propTypes, {\n        linePosAttr: PropTypes.string,\n        valuePosAttr: PropTypes.string,\n        lineSizeAttr: PropTypes.string,\n        valueSizeAttr: PropTypes.string,\n        cluster: PropTypes.string,\n        barWidth: PropTypes.number\n      });\n    }\n  }, {\n    key: 'defaultProps',\n    get: function get() {\n      return {\n        barWidth: 0.85\n      };\n    }\n  }]);\n\n  return BarSeries;\n}(AbstractSeries);\n\nBarSeries.displayName = 'BarSeries';\nexport default BarSeries;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport AbstractSeries from './abstract-series';\nimport BarSeries from './bar-series';\n\nvar HorizontalBarSeries = function (_AbstractSeries) {\n  _inherits(HorizontalBarSeries, _AbstractSeries);\n\n  function HorizontalBarSeries() {\n    _classCallCheck(this, HorizontalBarSeries);\n\n    return _possibleConstructorReturn(this, (HorizontalBarSeries.__proto__ || Object.getPrototypeOf(HorizontalBarSeries)).apply(this, arguments));\n  }\n\n  _createClass(HorizontalBarSeries, [{\n    key: 'render',\n    value: function render() {\n      return React.createElement(BarSeries, _extends({}, this.props, {\n        linePosAttr: 'y',\n        valuePosAttr: 'x',\n        lineSizeAttr: 'height',\n        valueSizeAttr: 'width'\n      }));\n    }\n  }], [{\n    key: 'getParentConfig',\n    value: function getParentConfig(attr) {\n      var isDomainAdjustmentNeeded = attr === 'y';\n      var zeroBaseValue = attr === 'x';\n      return {\n        isDomainAdjustmentNeeded: isDomainAdjustmentNeeded,\n        zeroBaseValue: zeroBaseValue\n      };\n    }\n  }]);\n\n  return HorizontalBarSeries;\n}(AbstractSeries);\n\nHorizontalBarSeries.displayName = 'HorizontalBarSeries';\nexport default HorizontalBarSeries;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport PropTypes from 'prop-types';\nimport { rgb } from 'd3-color';\nimport { DEFAULT_OPACITY } from '../../theme';\nimport { getAttributeFunctor, getScaleObjectFromProps, getAttr0Functor } from '../../utils/scales-utils';\nimport { getStackParams } from '../../utils/series-utils';\nimport AbstractSeries from './abstract-series';\n\nfunction getScaleDistance(props, attr) {\n  var scaleObject = getScaleObjectFromProps(props, attr);\n  return scaleObject ? scaleObject.distance : 0;\n}\n\nvar BarSeriesCanvas = function (_AbstractSeries) {\n  _inherits(BarSeriesCanvas, _AbstractSeries);\n\n  function BarSeriesCanvas() {\n    _classCallCheck(this, BarSeriesCanvas);\n\n    return _possibleConstructorReturn(this, (BarSeriesCanvas.__proto__ || Object.getPrototypeOf(BarSeriesCanvas)).apply(this, arguments));\n  }\n\n  _createClass(BarSeriesCanvas, [{\n    key: 'render',\n    value: function render() {\n      return null;\n    }\n  }], [{\n    key: 'renderLayer',\n    value: function renderLayer(props, ctx) {\n      var data = props.data,\n          linePosAttr = props.linePosAttr,\n          lineSizeAttr = props.lineSizeAttr,\n          valuePosAttr = props.valuePosAttr,\n          marginTop = props.marginTop,\n          marginBottom = props.marginBottom;\n\n      if (!data || data.length === 0) {\n        return;\n      }\n\n      var distance = getScaleDistance(props, linePosAttr);\n      var line = getAttributeFunctor(props, linePosAttr);\n      var value = getAttributeFunctor(props, valuePosAttr);\n      var value0 = getAttr0Functor(props, valuePosAttr);\n      var fill = getAttributeFunctor(props, 'fill') || getAttributeFunctor(props, 'color');\n      var stroke = getAttributeFunctor(props, 'stroke') || getAttributeFunctor(props, 'color');\n      var opacity = getAttributeFunctor(props, 'opacity');\n      var halfSpace = distance / 2 * 0.85; // totalSpaceAvailable is the space we have available to draw all the\n      // bars of a same 'linePosAttr' value (a.k.a. sameTypeTotal)\n\n      var totalSpaceAvailable = halfSpace * 2;\n\n      var _getStackParams = getStackParams(props),\n          sameTypeTotal = _getStackParams.sameTypeTotal,\n          sameTypeIndex = _getStackParams.sameTypeIndex;\n\n      data.forEach(function (row) {\n        var totalSpaceCenter = line(row); // totalSpaceStartingPoint is the first pixel were we can start drawing\n\n        var totalSpaceStartingPoint = totalSpaceCenter - halfSpace; // spaceTakenByInterBarsPixels has the overhead space consumed by each bar of sameTypeTotal\n\n        var spaceTakenByInterBarsPixels = (sameTypeTotal - 1) / sameTypeTotal; // lineSize is the space we have available to draw sameTypeIndex bar\n\n        var lineSize = totalSpaceAvailable / sameTypeTotal - spaceTakenByInterBarsPixels;\n        var fillColor = rgb(fill(row));\n        var strokeColor = rgb(stroke(row));\n        var rowOpacity = opacity(row) || DEFAULT_OPACITY; // linePos is the first pixel were we can start drawing sameTypeIndex bar\n\n        var linePos = totalSpaceStartingPoint + lineSize * sameTypeIndex + sameTypeIndex;\n        var valuePos = Math.min(value0(row), value(row));\n        var x = valuePosAttr === 'x' ? valuePos : linePos;\n        var y = valuePosAttr === 'y' ? valuePos : linePos;\n        var valueSize = Math.abs(-value0(row) + value(row));\n        var height = lineSizeAttr === 'height' ? lineSize : valueSize;\n        var width = lineSizeAttr === 'width' ? lineSize : valueSize;\n        ctx.beginPath();\n        ctx.rect(x + marginBottom, y + marginTop, width, height);\n        ctx.fillStyle = 'rgba(' + fillColor.r + ', ' + fillColor.g + ', ' + fillColor.b + ', ' + rowOpacity + ')';\n        ctx.fill();\n        ctx.strokeStyle = 'rgba(' + strokeColor.r + ', ' + strokeColor.g + ', ' + strokeColor.b + ', ' + rowOpacity + ')';\n        ctx.stroke();\n      });\n    }\n  }, {\n    key: 'requiresSVG',\n    get: function get() {\n      return false;\n    }\n  }, {\n    key: 'isCanvas',\n    get: function get() {\n      return true;\n    }\n  }]);\n\n  return BarSeriesCanvas;\n}(AbstractSeries);\n\nBarSeriesCanvas.displayName = 'BarSeriesCanvas';\nBarSeriesCanvas.defaultProps = _extends({}, AbstractSeries.defaultProps, {\n  linePosAttr: PropTypes.string.isRequired,\n  valuePosAttr: PropTypes.string.isRequired,\n  lineSizeAttr: PropTypes.string.isRequired,\n  valueSizeAttr: PropTypes.string.isRequired\n});\nBarSeriesCanvas.propTypes = _extends({}, AbstractSeries.propTypes);\nexport default BarSeriesCanvas;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport AbstractSeries from './abstract-series';\nimport BarSeries from './bar-series-canvas';\n\nvar HorizontalBarSeriesCanvas = function (_AbstractSeries) {\n  _inherits(HorizontalBarSeriesCanvas, _AbstractSeries);\n\n  function HorizontalBarSeriesCanvas() {\n    _classCallCheck(this, HorizontalBarSeriesCanvas);\n\n    return _possibleConstructorReturn(this, (HorizontalBarSeriesCanvas.__proto__ || Object.getPrototypeOf(HorizontalBarSeriesCanvas)).apply(this, arguments));\n  }\n\n  _createClass(HorizontalBarSeriesCanvas, [{\n    key: 'render',\n    value: function render() {\n      return null;\n    }\n  }], [{\n    key: 'getParentConfig',\n    value: function getParentConfig(attr) {\n      var isDomainAdjustmentNeeded = attr === 'y';\n      var zeroBaseValue = attr === 'x';\n      return {\n        isDomainAdjustmentNeeded: isDomainAdjustmentNeeded,\n        zeroBaseValue: zeroBaseValue\n      };\n    }\n  }, {\n    key: 'renderLayer',\n    value: function renderLayer(props, ctx) {\n      BarSeries.renderLayer(_extends({}, props, {\n        linePosAttr: 'y',\n        valuePosAttr: 'x',\n        lineSizeAttr: 'height',\n        valueSizeAttr: 'width'\n      }), ctx);\n    }\n  }, {\n    key: 'requiresSVG',\n    get: function get() {\n      return false;\n    }\n  }, {\n    key: 'isCanvas',\n    get: function get() {\n      return true;\n    }\n  }]);\n\n  return HorizontalBarSeriesCanvas;\n}(AbstractSeries);\n\nHorizontalBarSeriesCanvas.displayName = 'HorizontalBarSeriesCanvas';\nHorizontalBarSeriesCanvas.propTypes = _extends({}, AbstractSeries.propTypes);\nexport default HorizontalBarSeriesCanvas;","// Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport React from 'react';\nimport { DIRECTION } from '../utils/axis-utils';\nimport GridLines from './grid-lines';\nvar HORIZONTAL = DIRECTION.HORIZONTAL;\nvar defaultProps = {\n  direction: HORIZONTAL,\n  attr: 'y'\n};\n\nfunction HorizontalGridLines(props) {\n  return React.createElement(GridLines, props);\n}\n\nHorizontalGridLines.displayName = 'HorizontalGridLines';\nHorizontalGridLines.defaultProps = defaultProps;\nHorizontalGridLines.requiresSVG = true;\nexport default HorizontalGridLines;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\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\n  return obj;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Animation from '../../animation';\nimport { ANIMATED_SERIES_PROPS } from '../../utils/series-utils';\nimport AbstractSeries from './abstract-series';\nvar predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--rect';\n\nvar RectSeries = function (_AbstractSeries) {\n  _inherits(RectSeries, _AbstractSeries);\n\n  function RectSeries() {\n    _classCallCheck(this, RectSeries);\n\n    return _possibleConstructorReturn(this, (RectSeries.__proto__ || Object.getPrototypeOf(RectSeries)).apply(this, arguments));\n  }\n\n  _createClass(RectSeries, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          animation = _props.animation,\n          className = _props.className,\n          data = _props.data,\n          linePosAttr = _props.linePosAttr,\n          lineSizeAttr = _props.lineSizeAttr,\n          marginLeft = _props.marginLeft,\n          marginTop = _props.marginTop,\n          style = _props.style,\n          valuePosAttr = _props.valuePosAttr,\n          valueSizeAttr = _props.valueSizeAttr;\n\n      if (!data) {\n        return null;\n      }\n\n      if (animation) {\n        return React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: ANIMATED_SERIES_PROPS\n        }), React.createElement(RectSeries, _extends({}, this.props, {\n          animation: null\n        })));\n      }\n\n      var lineFunctor = this._getAttributeFunctor(linePosAttr);\n\n      var line0Functor = this._getAttr0Functor(linePosAttr);\n\n      var valueFunctor = this._getAttributeFunctor(valuePosAttr);\n\n      var value0Functor = this._getAttr0Functor(valuePosAttr);\n\n      var fillFunctor = this._getAttributeFunctor('fill') || this._getAttributeFunctor('color');\n\n      var strokeFunctor = this._getAttributeFunctor('stroke') || this._getAttributeFunctor('color');\n\n      var opacityFunctor = this._getAttributeFunctor('opacity');\n\n      return React.createElement('g', {\n        className: predefinedClassName + ' ' + className,\n        transform: 'translate(' + marginLeft + ',' + marginTop + ')'\n      }, data.map(function (d, i) {\n        var _attrs;\n\n        var attrs = (_attrs = {\n          style: _extends({\n            opacity: opacityFunctor && opacityFunctor(d),\n            stroke: strokeFunctor && strokeFunctor(d),\n            fill: fillFunctor && fillFunctor(d)\n          }, style)\n        }, _defineProperty(_attrs, linePosAttr, line0Functor(d)), _defineProperty(_attrs, lineSizeAttr, Math.abs(lineFunctor(d) - line0Functor(d))), _defineProperty(_attrs, valuePosAttr, Math.min(value0Functor(d), valueFunctor(d))), _defineProperty(_attrs, valueSizeAttr, Math.abs(-value0Functor(d) + valueFunctor(d))), _defineProperty(_attrs, 'onClick', function onClick(e) {\n          return _this2._valueClickHandler(d, e);\n        }), _defineProperty(_attrs, 'onContextMenu', function onContextMenu(e) {\n          return _this2._valueRightClickHandler(d, e);\n        }), _defineProperty(_attrs, 'onMouseOver', function onMouseOver(e) {\n          return _this2._valueMouseOverHandler(d, e);\n        }), _defineProperty(_attrs, 'onMouseOut', function onMouseOut(e) {\n          return _this2._valueMouseOutHandler(d, e);\n        }), _defineProperty(_attrs, 'key', i), _attrs);\n        return React.createElement('rect', attrs);\n      }));\n    }\n  }], [{\n    key: 'propTypes',\n    get: function get() {\n      return _extends({}, AbstractSeries.propTypes, {\n        linePosAttr: PropTypes.string,\n        valuePosAttr: PropTypes.string,\n        lineSizeAttr: PropTypes.string,\n        valueSizeAttr: PropTypes.string\n      });\n    }\n  }]);\n\n  return RectSeries;\n}(AbstractSeries);\n\nRectSeries.displayName = 'RectSeries';\nexport default RectSeries;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport AbstractSeries from './abstract-series';\nimport RectSeries from './rect-series';\n\nvar HorizontalRectSeries = function (_AbstractSeries) {\n  _inherits(HorizontalRectSeries, _AbstractSeries);\n\n  function HorizontalRectSeries() {\n    _classCallCheck(this, HorizontalRectSeries);\n\n    return _possibleConstructorReturn(this, (HorizontalRectSeries.__proto__ || Object.getPrototypeOf(HorizontalRectSeries)).apply(this, arguments));\n  }\n\n  _createClass(HorizontalRectSeries, [{\n    key: 'render',\n    value: function render() {\n      return React.createElement(RectSeries, _extends({}, this.props, {\n        linePosAttr: 'y',\n        valuePosAttr: 'x',\n        lineSizeAttr: 'height',\n        valueSizeAttr: 'width'\n      }));\n    }\n  }], [{\n    key: 'getParentConfig',\n    value: function getParentConfig(attr) {\n      var isDomainAdjustmentNeeded = false;\n      var zeroBaseValue = attr === 'x';\n      return {\n        isDomainAdjustmentNeeded: isDomainAdjustmentNeeded,\n        zeroBaseValue: zeroBaseValue\n      };\n    }\n  }]);\n\n  return HorizontalRectSeries;\n}(AbstractSeries);\n\nHorizontalRectSeries.displayName = 'HorizontalRectSeries';\nexport default HorizontalRectSeries;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport PropTypes from 'prop-types';\nimport { rgb } from 'd3-color';\nimport { DEFAULT_OPACITY } from '../../theme';\nimport { getAttributeFunctor, getAttr0Functor } from '../../utils/scales-utils';\nimport AbstractSeries from './abstract-series';\n\nvar RectSeriesCanvas = function (_AbstractSeries) {\n  _inherits(RectSeriesCanvas, _AbstractSeries);\n\n  function RectSeriesCanvas() {\n    _classCallCheck(this, RectSeriesCanvas);\n\n    return _possibleConstructorReturn(this, (RectSeriesCanvas.__proto__ || Object.getPrototypeOf(RectSeriesCanvas)).apply(this, arguments));\n  }\n\n  _createClass(RectSeriesCanvas, [{\n    key: 'render',\n    value: function render() {\n      return null;\n    }\n  }], [{\n    key: 'renderLayer',\n    value: function renderLayer(props, ctx) {\n      var data = props.data,\n          linePosAttr = props.linePosAttr,\n          lineSizeAttr = props.lineSizeAttr,\n          marginLeft = props.marginLeft,\n          marginTop = props.marginTop,\n          valuePosAttr = props.valuePosAttr;\n\n      if (!data || data.length === 0) {\n        return;\n      }\n\n      var line = getAttributeFunctor(props, linePosAttr);\n      var line0 = getAttr0Functor(props, linePosAttr);\n      var value = getAttributeFunctor(props, valuePosAttr);\n      var value0 = getAttr0Functor(props, valuePosAttr);\n      var fill = getAttributeFunctor(props, 'fill') || getAttributeFunctor(props, 'color');\n      var stroke = getAttributeFunctor(props, 'stroke') || getAttributeFunctor(props, 'color');\n      var opacity = getAttributeFunctor(props, 'opacity');\n      data.forEach(function (row) {\n        var fillColor = rgb(fill(row));\n        var strokeColor = rgb(stroke(row));\n        var rowOpacity = opacity(row) || DEFAULT_OPACITY;\n        var linePos = line0(row);\n        var valuePos = Math.min(value0(row), value(row));\n        var x = valuePosAttr === 'x' ? valuePos : linePos;\n        var y = valuePosAttr === 'y' ? valuePos : linePos;\n        var lineSize = Math.abs(line(row) - line0(row));\n        var valueSize = Math.abs(-value0(row) + value(row));\n        var height = lineSizeAttr === 'height' ? lineSize : valueSize;\n        var width = lineSizeAttr === 'width' ? lineSize : valueSize;\n        ctx.beginPath();\n        ctx.rect(x + marginLeft, y + marginTop, width, height);\n        ctx.fillStyle = 'rgba(' + fillColor.r + ', ' + fillColor.g + ', ' + fillColor.b + ', ' + rowOpacity + ')';\n        ctx.fill();\n        ctx.strokeStyle = 'rgba(' + strokeColor.r + ', ' + strokeColor.g + ', ' + strokeColor.b + ', ' + rowOpacity + ')';\n        ctx.stroke();\n      });\n    }\n  }, {\n    key: 'requiresSVG',\n    get: function get() {\n      return false;\n    }\n  }, {\n    key: 'isCanvas',\n    get: function get() {\n      return true;\n    }\n  }]);\n\n  return RectSeriesCanvas;\n}(AbstractSeries);\n\nRectSeriesCanvas.displayName = 'RectSeriesCanvas';\nRectSeriesCanvas.defaultProps = _extends({}, AbstractSeries.defaultProps, {\n  linePosAttr: PropTypes.string.isRequired,\n  valuePosAttr: PropTypes.string.isRequired,\n  lineSizeAttr: PropTypes.string.isRequired,\n  valueSizeAttr: PropTypes.string.isRequired\n});\nRectSeriesCanvas.propTypes = _extends({}, AbstractSeries.propTypes);\nexport default RectSeriesCanvas;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport AbstractSeries from './abstract-series';\nimport RectSeries from './rect-series-canvas';\n\nvar HorizontalRectSeriesCanvas = function (_AbstractSeries) {\n  _inherits(HorizontalRectSeriesCanvas, _AbstractSeries);\n\n  function HorizontalRectSeriesCanvas() {\n    _classCallCheck(this, HorizontalRectSeriesCanvas);\n\n    return _possibleConstructorReturn(this, (HorizontalRectSeriesCanvas.__proto__ || Object.getPrototypeOf(HorizontalRectSeriesCanvas)).apply(this, arguments));\n  }\n\n  _createClass(HorizontalRectSeriesCanvas, [{\n    key: 'render',\n    value: function render() {\n      return null;\n    }\n  }], [{\n    key: 'getParentConfig',\n    value: function getParentConfig(attr) {\n      var isDomainAdjustmentNeeded = false;\n      var zeroBaseValue = attr === 'x';\n      return {\n        isDomainAdjustmentNeeded: isDomainAdjustmentNeeded,\n        zeroBaseValue: zeroBaseValue\n      };\n    }\n  }, {\n    key: 'renderLayer',\n    value: function renderLayer(props, ctx) {\n      RectSeries.renderLayer(_extends({}, props, {\n        linePosAttr: 'y',\n        valuePosAttr: 'x',\n        lineSizeAttr: 'height',\n        valueSizeAttr: 'width'\n      }), ctx);\n    }\n  }, {\n    key: 'requiresSVG',\n    get: function get() {\n      return false;\n    }\n  }, {\n    key: 'isCanvas',\n    get: function get() {\n      return true;\n    }\n  }]);\n\n  return HorizontalRectSeriesCanvas;\n}(AbstractSeries);\n\nHorizontalRectSeriesCanvas.displayName = 'HorizontalRectSeriesCanvas';\nHorizontalRectSeriesCanvas.propTypes = _extends({}, AbstractSeries.propTypes);\nexport default HorizontalRectSeriesCanvas;","import \"core-js/modules/es.array.reduce.js\";\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport AbstractSeries from './abstract-series';\nimport Animation from '../../animation';\nimport { ANIMATED_SERIES_PROPS } from '../../utils/series-utils';\nvar predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--label';\n\nvar getTextAnchor = function getTextAnchor(labelAnchorX, leftOfMiddle) {\n  return labelAnchorX ? labelAnchorX : leftOfMiddle ? 'start' : 'end';\n};\n\nvar getDominantBaseline = function getDominantBaseline(labelAnchorY, aboveMiddle) {\n  return labelAnchorY ? labelAnchorY : aboveMiddle ? 'text-before-edge' : 'text-after-edge';\n};\n\nvar LabelSeries = function (_AbstractSeries) {\n  _inherits(LabelSeries, _AbstractSeries);\n\n  function LabelSeries() {\n    _classCallCheck(this, LabelSeries);\n\n    return _possibleConstructorReturn(this, (LabelSeries.__proto__ || Object.getPrototypeOf(LabelSeries)).apply(this, arguments));\n  }\n\n  _createClass(LabelSeries, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          animation = _props.animation,\n          allowOffsetToBeReversed = _props.allowOffsetToBeReversed,\n          className = _props.className,\n          data = _props.data,\n          _data = _props._data,\n          getLabel = _props.getLabel,\n          marginLeft = _props.marginLeft,\n          marginTop = _props.marginTop,\n          rotation = _props.rotation,\n          style = _props.style,\n          xRange = _props.xRange,\n          yRange = _props.yRange,\n          labelAnchorX = _props.labelAnchorX,\n          labelAnchorY = _props.labelAnchorY;\n\n      if (!data) {\n        return null;\n      }\n\n      if (animation) {\n        return React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: ANIMATED_SERIES_PROPS\n        }), React.createElement(LabelSeries, _extends({}, this.props, {\n          animation: null,\n          _data: data\n        })));\n      }\n\n      var xFunctor = this._getAttributeFunctor('x');\n\n      var yFunctor = this._getAttributeFunctor('y');\n\n      return React.createElement('g', {\n        className: predefinedClassName + ' ' + className,\n        transform: 'translate(' + marginLeft + ',' + marginTop + ')',\n        style: style\n      }, data.reduce(function (res, d, i) {\n        var markStyle = d.style,\n            xOffset = d.xOffset,\n            yOffset = d.yOffset;\n\n        if (!getLabel(d)) {\n          return res;\n        }\n\n        var xVal = xFunctor(d);\n        var yVal = yFunctor(d);\n        var leftOfMiddle = xVal < (xRange[1] - xRange[0]) / 2;\n        var aboveMiddle = yVal < Math.abs(yRange[1] - yRange[0]) / 2;\n        var x = xVal + (allowOffsetToBeReversed && leftOfMiddle ? -1 : 1) * (xOffset || 0);\n        var y = yVal + (allowOffsetToBeReversed && aboveMiddle ? -1 : 1) * (yOffset || 0);\n        var hasRotationValueSet = d.rotation === 0 || d.rotation;\n        var labelRotation = hasRotationValueSet ? d.rotation : rotation;\n\n        var attrs = _extends({\n          dominantBaseline: getDominantBaseline(labelAnchorY, aboveMiddle),\n          className: 'rv-xy-plot__series--label-text',\n          key: i,\n          onClick: function onClick(e) {\n            return _this2._valueClickHandler(d, e);\n          },\n          onContextMenu: function onContextMenu(e) {\n            return _this2._valueRightClickHandler(d, e);\n          },\n          onMouseOver: function onMouseOver(e) {\n            return _this2._valueMouseOverHandler(d, e);\n          },\n          onMouseOut: function onMouseOut(e) {\n            return _this2._valueMouseOutHandler(d, e);\n          },\n          textAnchor: getTextAnchor(labelAnchorX, leftOfMiddle),\n          x: x,\n          y: y,\n          transform: 'rotate(' + labelRotation + ',' + x + ',' + y + ')'\n        }, markStyle);\n\n        var textContent = getLabel(_data ? _data[i] : d);\n        return res.concat([React.createElement('text', attrs, textContent)]);\n      }, []));\n    }\n  }]);\n\n  return LabelSeries;\n}(AbstractSeries);\n\nLabelSeries.defaultProps = _extends({}, AbstractSeries.defaultProps, {\n  animation: false,\n  rotation: 0,\n  getLabel: function getLabel(d) {\n    return d.label;\n  }\n});\nLabelSeries.displayName = 'LabelSeries';\nexport default LabelSeries;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport * as d3Shape from 'd3-shape';\nimport Animation from '../../animation';\nimport { DEFAULT_OPACITY } from '../../theme';\nimport { ANIMATED_SERIES_PROPS } from '../../utils/series-utils';\nimport { warning } from '../../utils/react-utils';\nimport AbstractSeries from './abstract-series';\nvar predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--line';\nvar STROKE_STYLES = {\n  dashed: '6, 2',\n  solid: null\n};\n\nvar LineSeries = function (_AbstractSeries) {\n  _inherits(LineSeries, _AbstractSeries);\n\n  function LineSeries() {\n    _classCallCheck(this, LineSeries);\n\n    return _possibleConstructorReturn(this, (LineSeries.__proto__ || Object.getPrototypeOf(LineSeries)).apply(this, arguments));\n  }\n\n  _createClass(LineSeries, [{\n    key: '_renderLine',\n    value: function _renderLine(data, x, y, curve, getNull) {\n      var line = d3Shape.line();\n\n      if (curve !== null) {\n        if (typeof curve === 'string' && d3Shape[curve]) {\n          line = line.curve(d3Shape[curve]);\n        } else if (typeof curve === 'function') {\n          line = line.curve(curve);\n        }\n      }\n\n      line = line.defined(getNull);\n      line = line.x(x).y(y);\n      return line(data);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          animation = _props.animation,\n          className = _props.className,\n          data = _props.data;\n\n      if (this.props.nullAccessor) {\n        warning('nullAccessor has been renamed to getNull', true);\n      }\n\n      if (!data) {\n        return null;\n      }\n\n      if (animation) {\n        return React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: ANIMATED_SERIES_PROPS\n        }), React.createElement(LineSeries, _extends({}, this.props, {\n          animation: null\n        })));\n      }\n\n      var _props2 = this.props,\n          curve = _props2.curve,\n          marginLeft = _props2.marginLeft,\n          marginTop = _props2.marginTop,\n          strokeDasharray = _props2.strokeDasharray,\n          strokeStyle = _props2.strokeStyle,\n          strokeWidth = _props2.strokeWidth,\n          style = _props2.style;\n\n      var x = this._getAttributeFunctor('x');\n\n      var y = this._getAttributeFunctor('y');\n\n      var stroke = this._getAttributeValue('stroke') || this._getAttributeValue('color');\n\n      var newOpacity = this._getAttributeValue('opacity');\n\n      var opacity = Number.isFinite(newOpacity) ? newOpacity : DEFAULT_OPACITY;\n      var getNull = this.props.nullAccessor || this.props.getNull;\n\n      var d = this._renderLine(data, x, y, curve, getNull);\n\n      return React.createElement('path', {\n        d: d,\n        className: predefinedClassName + ' ' + className,\n        transform: 'translate(' + marginLeft + ',' + marginTop + ')',\n        onMouseOver: this._seriesMouseOverHandler,\n        onMouseOut: this._seriesMouseOutHandler,\n        onClick: this._seriesClickHandler,\n        onContextMenu: this._seriesRightClickHandler,\n        style: _extends({\n          opacity: opacity,\n          strokeDasharray: STROKE_STYLES[strokeStyle] || strokeDasharray,\n          strokeWidth: strokeWidth,\n          stroke: stroke\n        }, style)\n      });\n    }\n  }]);\n\n  return LineSeries;\n}(AbstractSeries);\n\nLineSeries.displayName = 'LineSeries';\nLineSeries.defaultProps = _extends({}, AbstractSeries.defaultProps, {\n  strokeStyle: 'solid',\n  style: {},\n  opacity: 1,\n  curve: null,\n  className: '',\n  getNull: function getNull() {\n    return true;\n  }\n});\nexport default LineSeries;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport Animation from '../../animation';\nimport { ANIMATED_SERIES_PROPS } from '../../utils/series-utils';\nimport { warning } from '../../utils/react-utils';\nimport { DEFAULT_SIZE, DEFAULT_OPACITY } from '../../theme';\nimport AbstractSeries from './abstract-series';\nvar predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--mark';\nvar DEFAULT_STROKE_WIDTH = 1;\n\nvar MarkSeries = function (_AbstractSeries) {\n  _inherits(MarkSeries, _AbstractSeries);\n\n  function MarkSeries() {\n    _classCallCheck(this, MarkSeries);\n\n    return _possibleConstructorReturn(this, (MarkSeries.__proto__ || Object.getPrototypeOf(MarkSeries)).apply(this, arguments));\n  }\n\n  _createClass(MarkSeries, [{\n    key: '_renderCircle',\n    value: function _renderCircle(d, i, strokeWidth, style, scalingFunctions) {\n      var _this2 = this;\n\n      var fill = scalingFunctions.fill,\n          opacity = scalingFunctions.opacity,\n          size = scalingFunctions.size,\n          stroke = scalingFunctions.stroke,\n          x = scalingFunctions.x,\n          y = scalingFunctions.y;\n      var attrs = {\n        r: size ? size(d) : DEFAULT_SIZE,\n        cx: x(d),\n        cy: y(d),\n        style: _extends({\n          opacity: opacity ? opacity(d) : DEFAULT_OPACITY,\n          stroke: stroke && stroke(d),\n          fill: fill && fill(d),\n          strokeWidth: strokeWidth || DEFAULT_STROKE_WIDTH\n        }, style),\n        key: i,\n        onClick: function onClick(e) {\n          return _this2._valueClickHandler(d, e);\n        },\n        onContextMenu: function onContextMenu(e) {\n          return _this2._valueRightClickHandler(d, e);\n        },\n        onMouseOver: function onMouseOver(e) {\n          return _this2._valueMouseOverHandler(d, e);\n        },\n        onMouseOut: function onMouseOut(e) {\n          return _this2._valueMouseOutHandler(d, e);\n        }\n      };\n      return React.createElement('circle', attrs);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this3 = this;\n\n      var _props = this.props,\n          animation = _props.animation,\n          className = _props.className,\n          data = _props.data,\n          marginLeft = _props.marginLeft,\n          marginTop = _props.marginTop,\n          strokeWidth = _props.strokeWidth,\n          style = _props.style;\n\n      if (this.props.nullAccessor) {\n        warning('nullAccessor has been renamed to getNull', true);\n      }\n\n      var getNull = this.props.nullAccessor || this.props.getNull;\n\n      if (!data) {\n        return null;\n      }\n\n      if (animation) {\n        return React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: ANIMATED_SERIES_PROPS\n        }), React.createElement(MarkSeries, _extends({}, this.props, {\n          animation: null\n        })));\n      }\n\n      var scalingFunctions = {\n        fill: this._getAttributeFunctor('fill') || this._getAttributeFunctor('color'),\n        opacity: this._getAttributeFunctor('opacity'),\n        size: this._getAttributeFunctor('size'),\n        stroke: this._getAttributeFunctor('stroke') || this._getAttributeFunctor('color'),\n        x: this._getAttributeFunctor('x'),\n        y: this._getAttributeFunctor('y')\n      };\n      return React.createElement('g', {\n        className: predefinedClassName + ' ' + className,\n        transform: 'translate(' + marginLeft + ',' + marginTop + ')'\n      }, data.map(function (d, i) {\n        return getNull(d) && _this3._renderCircle(d, i, strokeWidth, style, scalingFunctions);\n      }));\n    }\n  }]);\n\n  return MarkSeries;\n}(AbstractSeries);\n\nMarkSeries.displayName = 'MarkSeries';\nMarkSeries.defaultProps = {\n  getNull: function getNull() {\n    return true;\n  }\n};\nexport default MarkSeries;","var _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport AbstractSeries from './abstract-series';\nimport LineSeries from './line-series';\nimport MarkSeries from './mark-series';\n\nvar LineMarkSeries = function (_AbstractSeries) {\n  _inherits(LineMarkSeries, _AbstractSeries);\n\n  function LineMarkSeries() {\n    _classCallCheck(this, LineMarkSeries);\n\n    return _possibleConstructorReturn(this, (LineMarkSeries.__proto__ || Object.getPrototypeOf(LineMarkSeries)).apply(this, arguments));\n  }\n\n  _createClass(LineMarkSeries, [{\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          lineStyle = _props.lineStyle,\n          markStyle = _props.markStyle,\n          style = _props.style;\n      return React.createElement('g', {\n        className: 'rv-xy-plot__series rv-xy-plot__series--linemark'\n      }, React.createElement(LineSeries, _extends({}, this.props, {\n        style: _extends({}, style, lineStyle)\n      })), React.createElement(MarkSeries, _extends({}, this.props, {\n        style: _extends({}, style, markStyle)\n      })));\n    }\n  }], [{\n    key: 'defaultProps',\n    get: function get() {\n      return _extends({}, LineSeries.defaultProps, {\n        lineStyle: {},\n        markStyle: {}\n      });\n    }\n  }]);\n\n  return LineMarkSeries;\n}(AbstractSeries);\n\nLineMarkSeries.displayName = 'LineMarkSeries';\nexport default LineMarkSeries;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport { rgb } from 'd3-color';\nimport { DEFAULT_SIZE, DEFAULT_OPACITY } from '../../theme';\nimport { getAttributeFunctor } from '../../utils/scales-utils';\nimport AbstractSeries from './abstract-series';\n\nvar MarkSeriesCanvas = function (_AbstractSeries) {\n  _inherits(MarkSeriesCanvas, _AbstractSeries);\n\n  function MarkSeriesCanvas() {\n    _classCallCheck(this, MarkSeriesCanvas);\n\n    return _possibleConstructorReturn(this, (MarkSeriesCanvas.__proto__ || Object.getPrototypeOf(MarkSeriesCanvas)).apply(this, arguments));\n  }\n\n  _createClass(MarkSeriesCanvas, [{\n    key: 'render',\n    value: function render() {\n      return null;\n    }\n  }], [{\n    key: 'renderLayer',\n    value: function renderLayer(props, ctx) {\n      var data = props.data,\n          marginLeft = props.marginLeft,\n          marginTop = props.marginTop;\n      var x = getAttributeFunctor(props, 'x');\n      var y = getAttributeFunctor(props, 'y');\n\n      var size = getAttributeFunctor(props, 'size') || function (p) {\n        return DEFAULT_SIZE;\n      };\n\n      var fill = getAttributeFunctor(props, 'fill') || getAttributeFunctor(props, 'color');\n      var stroke = getAttributeFunctor(props, 'stroke') || getAttributeFunctor(props, 'color');\n      var opacity = getAttributeFunctor(props, 'opacity');\n      data.forEach(function (row) {\n        var fillColor = rgb(fill(row));\n        var strokeColor = rgb(stroke(row));\n        var rowOpacity = opacity(row) || DEFAULT_OPACITY;\n        ctx.beginPath();\n        ctx.arc(x(row) + marginLeft, y(row) + marginTop, size(row), 0, 2 * Math.PI);\n        ctx.fillStyle = 'rgba(' + fillColor.r + ', ' + fillColor.g + ', ' + fillColor.b + ', ' + rowOpacity + ')';\n        ctx.fill();\n        ctx.strokeStyle = 'rgba(' + strokeColor.r + ', ' + strokeColor.g + ', ' + strokeColor.b + ', ' + rowOpacity + ')';\n        ctx.stroke();\n      });\n    }\n  }, {\n    key: 'requiresSVG',\n    get: function get() {\n      return false;\n    }\n  }, {\n    key: 'isCanvas',\n    get: function get() {\n      return true;\n    }\n  }]);\n\n  return MarkSeriesCanvas;\n}(AbstractSeries);\n\nMarkSeriesCanvas.displayName = 'MarkSeriesCanvas';\nMarkSeriesCanvas.propTypes = _extends({}, AbstractSeries.propTypes);\nexport default MarkSeriesCanvas;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport { rgb } from 'd3-color';\nimport * as d3Shape from 'd3-shape';\nimport React from 'react';\nimport { DEFAULT_OPACITY } from '../../theme';\nimport { getAttributeFunctor, getAttributeValue } from '../../utils/scales-utils';\nimport AbstractSeries from './abstract-series';\n\nvar LineSeriesCanvas = function (_AbstractSeries) {\n  _inherits(LineSeriesCanvas, _AbstractSeries);\n\n  function LineSeriesCanvas() {\n    _classCallCheck(this, LineSeriesCanvas);\n\n    return _possibleConstructorReturn(this, (LineSeriesCanvas.__proto__ || Object.getPrototypeOf(LineSeriesCanvas)).apply(this, arguments));\n  }\n\n  _createClass(LineSeriesCanvas, [{\n    key: 'render',\n    value: function render() {\n      return React.createElement('div', null);\n    }\n  }], [{\n    key: 'renderLayer',\n    value: function renderLayer(props, ctx) {\n      var curve = props.curve,\n          data = props.data,\n          marginLeft = props.marginLeft,\n          marginTop = props.marginTop,\n          strokeWidth = props.strokeWidth,\n          strokeDasharray = props.strokeDasharray;\n\n      if (!data || data.length === 0) {\n        return;\n      }\n\n      var x = getAttributeFunctor(props, 'x');\n      var y = getAttributeFunctor(props, 'y');\n      var stroke = getAttributeValue(props, 'stroke') || getAttributeValue(props, 'color');\n      var strokeColor = rgb(stroke);\n      var newOpacity = getAttributeValue(props, 'opacity');\n      var opacity = Number.isFinite(newOpacity) ? newOpacity : DEFAULT_OPACITY;\n      var line = d3Shape.line().x(function (row) {\n        return x(row) + marginLeft;\n      }).y(function (row) {\n        return y(row) + marginTop;\n      });\n\n      if (typeof curve === 'string' && d3Shape[curve]) {\n        line = line.curve(d3Shape[curve]);\n      } else if (typeof curve === 'function') {\n        line = line.curve(curve);\n      }\n\n      ctx.beginPath();\n      ctx.strokeStyle = 'rgba(' + strokeColor.r + ', ' + strokeColor.g + ', ' + strokeColor.b + ', ' + opacity + ')';\n      ctx.lineWidth = strokeWidth;\n\n      if (strokeDasharray) {\n        ctx.setLineDash(strokeDasharray);\n      }\n\n      line.context(ctx)(data);\n      ctx.stroke();\n      ctx.closePath(); // set back to default\n\n      ctx.lineWidth = 1;\n      ctx.setLineDash([]);\n    }\n  }, {\n    key: 'requiresSVG',\n    get: function get() {\n      return false;\n    }\n  }, {\n    key: 'isCanvas',\n    get: function get() {\n      return true;\n    }\n  }]);\n\n  return LineSeriesCanvas;\n}(AbstractSeries);\n\nLineSeriesCanvas.displayName = 'LineSeriesCanvas';\nLineSeriesCanvas.defaultProps = _extends({}, AbstractSeries.defaultProps, {\n  strokeWidth: 2\n});\nexport default LineSeriesCanvas;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport AbstractSeries from './abstract-series';\nimport MarkSeriesCanvas from './mark-series-canvas';\nimport LineSeriesCanvas from './line-series-canvas';\n\nvar LineMarkSeriesCanvas = function (_AbstractSeries) {\n  _inherits(LineMarkSeriesCanvas, _AbstractSeries);\n\n  function LineMarkSeriesCanvas() {\n    _classCallCheck(this, LineMarkSeriesCanvas);\n\n    return _possibleConstructorReturn(this, (LineMarkSeriesCanvas.__proto__ || Object.getPrototypeOf(LineMarkSeriesCanvas)).apply(this, arguments));\n  }\n\n  _createClass(LineMarkSeriesCanvas, [{\n    key: 'render',\n    value: function render() {\n      return null;\n    }\n  }], [{\n    key: 'renderLayer',\n    value: function renderLayer(props, ctx) {\n      LineSeriesCanvas.renderLayer(props, ctx);\n      MarkSeriesCanvas.renderLayer(props, ctx);\n    }\n  }, {\n    key: 'requiresSVG',\n    get: function get() {\n      return false;\n    }\n  }, {\n    key: 'isCanvas',\n    get: function get() {\n      return true;\n    }\n  }]);\n\n  return LineMarkSeriesCanvas;\n}(AbstractSeries);\n\nLineMarkSeriesCanvas.displayName = 'LineMarkSeriesCanvas';\nLineMarkSeriesCanvas.propTypes = _extends({}, AbstractSeries.propTypes);\nexport default LineMarkSeriesCanvas;","import \"core-js/modules/es.array.reduce.js\";\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport Animation from '../../animation';\nimport { ANIMATED_SERIES_PROPS } from '../../utils/series-utils';\nimport AbstractSeries from './abstract-series';\nvar predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--polygon';\nvar DEFAULT_COLOR = '#12939A';\n\nvar generatePath = function generatePath(data, xFunctor, yFunctor) {\n  return data.reduce(function (res, row, i) {\n    return res + ' ' + (i ? 'L' : 'M') + xFunctor(row) + ' ' + yFunctor(row);\n  }, '') + ' Z';\n};\n\nvar PolygonSeries = function (_AbstractSeries) {\n  _inherits(PolygonSeries, _AbstractSeries);\n\n  function PolygonSeries() {\n    _classCallCheck(this, PolygonSeries);\n\n    return _possibleConstructorReturn(this, (PolygonSeries.__proto__ || Object.getPrototypeOf(PolygonSeries)).apply(this, arguments));\n  }\n\n  _createClass(PolygonSeries, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          animation = _props.animation,\n          color = _props.color,\n          className = _props.className,\n          data = _props.data,\n          marginLeft = _props.marginLeft,\n          marginTop = _props.marginTop,\n          style = _props.style;\n\n      if (!data) {\n        return null;\n      }\n\n      if (animation) {\n        return React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: ANIMATED_SERIES_PROPS\n        }), React.createElement(PolygonSeries, _extends({}, this.props, {\n          animation: null\n        })));\n      }\n\n      var xFunctor = this._getAttributeFunctor('x');\n\n      var yFunctor = this._getAttributeFunctor('y');\n\n      return React.createElement('path', {\n        className: predefinedClassName + ' ' + className,\n        onMouseOver: function onMouseOver(e) {\n          return _this2._seriesMouseOverHandler(data, e);\n        },\n        onMouseOut: function onMouseOut(e) {\n          return _this2._seriesMouseOutHandler(data, e);\n        },\n        onClick: this._seriesClickHandler,\n        onContextMenu: this._seriesRightClickHandler,\n        fill: color || DEFAULT_COLOR,\n        style: style,\n        d: generatePath(data, xFunctor, yFunctor),\n        transform: 'translate(' + marginLeft + ',' + marginTop + ')'\n      });\n    }\n  }], [{\n    key: 'propTypes',\n    get: function get() {\n      return _extends({}, AbstractSeries.propTypes);\n    }\n  }]);\n\n  return PolygonSeries;\n}(AbstractSeries);\n\nPolygonSeries.displayName = 'PolygonSeries';\nexport default PolygonSeries;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport AbstractSeries from './abstract-series';\nimport BarSeries from './bar-series';\n\nvar VerticalBarSeries = function (_AbstractSeries) {\n  _inherits(VerticalBarSeries, _AbstractSeries);\n\n  function VerticalBarSeries() {\n    _classCallCheck(this, VerticalBarSeries);\n\n    return _possibleConstructorReturn(this, (VerticalBarSeries.__proto__ || Object.getPrototypeOf(VerticalBarSeries)).apply(this, arguments));\n  }\n\n  _createClass(VerticalBarSeries, [{\n    key: 'render',\n    value: function render() {\n      return React.createElement(BarSeries, _extends({}, this.props, {\n        linePosAttr: 'x',\n        valuePosAttr: 'y',\n        lineSizeAttr: 'width',\n        valueSizeAttr: 'height'\n      }));\n    }\n  }], [{\n    key: 'getParentConfig',\n    value: function getParentConfig(attr) {\n      var isDomainAdjustmentNeeded = attr === 'x';\n      var zeroBaseValue = attr === 'y';\n      return {\n        isDomainAdjustmentNeeded: isDomainAdjustmentNeeded,\n        zeroBaseValue: zeroBaseValue\n      };\n    }\n  }]);\n\n  return VerticalBarSeries;\n}(AbstractSeries);\n\nVerticalBarSeries.displayName = 'VerticalBarSeries';\nexport default VerticalBarSeries;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport AbstractSeries from './abstract-series';\nimport BarSeries from './bar-series-canvas';\n\nvar HorizontalBarSeriesCanvas = function (_AbstractSeries) {\n  _inherits(HorizontalBarSeriesCanvas, _AbstractSeries);\n\n  function HorizontalBarSeriesCanvas() {\n    _classCallCheck(this, HorizontalBarSeriesCanvas);\n\n    return _possibleConstructorReturn(this, (HorizontalBarSeriesCanvas.__proto__ || Object.getPrototypeOf(HorizontalBarSeriesCanvas)).apply(this, arguments));\n  }\n\n  _createClass(HorizontalBarSeriesCanvas, [{\n    key: 'render',\n    value: function render() {\n      return null;\n    }\n  }], [{\n    key: 'getParentConfig',\n    value: function getParentConfig(attr) {\n      var isDomainAdjustmentNeeded = attr === 'x';\n      var zeroBaseValue = attr === 'y';\n      return {\n        isDomainAdjustmentNeeded: isDomainAdjustmentNeeded,\n        zeroBaseValue: zeroBaseValue\n      };\n    }\n  }, {\n    key: 'renderLayer',\n    value: function renderLayer(props, ctx) {\n      BarSeries.renderLayer(_extends({}, props, {\n        linePosAttr: 'x',\n        valuePosAttr: 'y',\n        lineSizeAttr: 'width',\n        valueSizeAttr: 'height'\n      }), ctx);\n    }\n  }, {\n    key: 'requiresSVG',\n    get: function get() {\n      return false;\n    }\n  }, {\n    key: 'isCanvas',\n    get: function get() {\n      return true;\n    }\n  }]);\n\n  return HorizontalBarSeriesCanvas;\n}(AbstractSeries);\n\nHorizontalBarSeriesCanvas.displayName = 'HorizontalBarSeriesCanvas';\nHorizontalBarSeriesCanvas.propTypes = _extends({}, AbstractSeries.propTypes);\nexport default HorizontalBarSeriesCanvas;","// Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport React from 'react';\nimport GridLines from './grid-lines';\nimport { DIRECTION } from '../utils/axis-utils';\nvar VERTICAL = DIRECTION.VERTICAL;\nvar defaultProps = {\n  direction: VERTICAL,\n  attr: 'x'\n};\n\nfunction VerticalGridLines(props) {\n  return React.createElement(GridLines, props);\n}\n\nVerticalGridLines.displayName = 'VerticalGridLines';\nVerticalGridLines.defaultProps = defaultProps;\nVerticalGridLines.requiresSVG = true;\nexport default VerticalGridLines;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport AbstractSeries from './abstract-series';\nimport RectSeries from './rect-series';\n\nvar VerticalRectSeries = function (_AbstractSeries) {\n  _inherits(VerticalRectSeries, _AbstractSeries);\n\n  function VerticalRectSeries() {\n    _classCallCheck(this, VerticalRectSeries);\n\n    return _possibleConstructorReturn(this, (VerticalRectSeries.__proto__ || Object.getPrototypeOf(VerticalRectSeries)).apply(this, arguments));\n  }\n\n  _createClass(VerticalRectSeries, [{\n    key: 'render',\n    value: function render() {\n      return React.createElement(RectSeries, _extends({}, this.props, {\n        linePosAttr: 'x',\n        valuePosAttr: 'y',\n        lineSizeAttr: 'width',\n        valueSizeAttr: 'height'\n      }));\n    }\n  }], [{\n    key: 'getParentConfig',\n    value: function getParentConfig(attr) {\n      var isDomainAdjustmentNeeded = false;\n      var zeroBaseValue = attr === 'y';\n      return {\n        isDomainAdjustmentNeeded: isDomainAdjustmentNeeded,\n        zeroBaseValue: zeroBaseValue\n      };\n    }\n  }]);\n\n  return VerticalRectSeries;\n}(AbstractSeries);\n\nVerticalRectSeries.displayName = 'VerticalRectSeries';\nexport default VerticalRectSeries;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport AbstractSeries from './abstract-series';\nimport RectSeries from './rect-series-canvas';\n\nvar HorizontalRectSeriesCanvas = function (_AbstractSeries) {\n  _inherits(HorizontalRectSeriesCanvas, _AbstractSeries);\n\n  function HorizontalRectSeriesCanvas() {\n    _classCallCheck(this, HorizontalRectSeriesCanvas);\n\n    return _possibleConstructorReturn(this, (HorizontalRectSeriesCanvas.__proto__ || Object.getPrototypeOf(HorizontalRectSeriesCanvas)).apply(this, arguments));\n  }\n\n  _createClass(HorizontalRectSeriesCanvas, [{\n    key: 'render',\n    value: function render() {\n      return null;\n    }\n  }], [{\n    key: 'getParentConfig',\n    value: function getParentConfig(attr) {\n      var isDomainAdjustmentNeeded = false;\n      var zeroBaseValue = attr === 'y';\n      return {\n        isDomainAdjustmentNeeded: isDomainAdjustmentNeeded,\n        zeroBaseValue: zeroBaseValue\n      };\n    }\n  }, {\n    key: 'renderLayer',\n    value: function renderLayer(props, ctx) {\n      RectSeries.renderLayer(_extends({}, props, {\n        linePosAttr: 'x',\n        valuePosAttr: 'y',\n        lineSizeAttr: 'width',\n        valueSizeAttr: 'height'\n      }), ctx);\n    }\n  }, {\n    key: 'requiresSVG',\n    get: function get() {\n      return false;\n    }\n  }, {\n    key: 'isCanvas',\n    get: function get() {\n      return true;\n    }\n  }]);\n\n  return HorizontalRectSeriesCanvas;\n}(AbstractSeries);\n\nHorizontalRectSeriesCanvas.displayName = 'HorizontalRectSeriesCanvas';\nHorizontalRectSeriesCanvas.propTypes = _extends({}, AbstractSeries.propTypes);\nexport default HorizontalRectSeriesCanvas;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nimport React from 'react';\nimport { voronoi } from 'd3-voronoi';\nimport { getAttributeFunctor } from '../utils/scales-utils';\n\nvar NOOP = function NOOP(f) {\n  return f;\n}; // Find the index of the node at coordinates of a touch point\n\n\nfunction getNodeIndex(evt) {\n  var _evt$nativeEvent = evt.nativeEvent,\n      pageX = _evt$nativeEvent.pageX,\n      pageY = _evt$nativeEvent.pageY;\n  var target = document.elementFromPoint(pageX, pageY);\n\n  if (!target) {\n    return -1;\n  }\n\n  var parentNode = target.parentNode;\n  return Array.prototype.indexOf.call(parentNode.childNodes, target);\n}\n\nfunction getExtent(_ref) {\n  var innerWidth = _ref.innerWidth,\n      innerHeight = _ref.innerHeight,\n      marginLeft = _ref.marginLeft,\n      marginTop = _ref.marginTop;\n  return [[marginLeft, marginTop], [innerWidth + marginLeft, innerHeight + marginTop]];\n}\n\nfunction Voronoi(props) {\n  var className = props.className,\n      extent = props.extent,\n      nodes = props.nodes,\n      onBlur = props.onBlur,\n      _onClick = props.onClick,\n      _onMouseUp = props.onMouseUp,\n      _onMouseDown = props.onMouseDown,\n      onHover = props.onHover,\n      polygonStyle = props.polygonStyle,\n      style = props.style,\n      x = props.x,\n      y = props.y; // Create a voronoi with each node center points\n\n  var voronoiInstance = voronoi().x(x || getAttributeFunctor(props, 'x')).y(y || getAttributeFunctor(props, 'y')).extent(extent || getExtent(props)); // Create an array of polygons corresponding to the cells in voronoi\n\n  var polygons = voronoiInstance.polygons(nodes); // Create helper function to handle special logic for touch events\n\n  var handleTouchEvent = function handleTouchEvent(handler) {\n    return function (evt) {\n      evt.preventDefault();\n      var index = getNodeIndex(evt);\n\n      if (index > -1 && index < polygons.length) {\n        var d = polygons[index];\n        handler(d.data);\n      }\n    };\n  };\n\n  return React.createElement('g', {\n    className: className + ' rv-voronoi',\n    style: style // Because of the nature of how touch events, and more specifically touchmove\n    // and how it differs from mouseover, we must manage touch events on the parent\n    ,\n    onTouchEnd: handleTouchEvent(_onMouseUp),\n    onTouchStart: handleTouchEvent(_onMouseDown),\n    onTouchMove: handleTouchEvent(onHover),\n    onTouchCancel: handleTouchEvent(onBlur)\n  }, polygons.map(function (d, i) {\n    return React.createElement('path', {\n      className: 'rv-voronoi__cell ' + (d.data && d.data.className || ''),\n      d: 'M' + d.join('L') + 'Z',\n      onClick: function onClick() {\n        return _onClick(d.data);\n      },\n      onMouseUp: function onMouseUp() {\n        return _onMouseUp(d.data);\n      },\n      onMouseDown: function onMouseDown() {\n        return _onMouseDown(d.data);\n      },\n      onMouseOver: function onMouseOver() {\n        return onHover(d.data);\n      },\n      onMouseOut: function onMouseOut() {\n        return onBlur(d.data);\n      },\n      fill: 'none',\n      style: _extends({\n        pointerEvents: 'all'\n      }, polygonStyle, d.data && d.data.style),\n      key: i\n    });\n  }));\n}\n\nVoronoi.requiresSVG = true;\nVoronoi.displayName = 'Voronoi';\nVoronoi.defaultProps = {\n  className: '',\n  onBlur: NOOP,\n  onClick: NOOP,\n  onHover: NOOP,\n  onMouseDown: NOOP,\n  onMouseUp: NOOP\n};\nexport default Voronoi;","var _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport Animation from '../../animation';\nimport { ANIMATED_SERIES_PROPS } from '../../utils/series-utils';\nimport { DEFAULT_OPACITY } from '../../theme';\nimport AbstractSeries from './abstract-series';\nvar predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--whisker';\nvar DEFAULT_STROKE_WIDTH = 1;\nvar DEFAULT_CROSS_BAR_WIDTH = 6;\n/**\n * Render whisker lines for a data point.\n * @param {Object} whiskerMarkProps All the properties of the whisker mark.\n * @private\n */\n\nvar renderWhiskerMark = function renderWhiskerMark(whiskerMarkProps) {\n  return function (d, i) {\n    var crossBarWidth = whiskerMarkProps.crossBarWidth,\n        opacityFunctor = whiskerMarkProps.opacityFunctor,\n        sizeFunctor = whiskerMarkProps.sizeFunctor,\n        strokeFunctor = whiskerMarkProps.strokeFunctor,\n        strokeWidth = whiskerMarkProps.strokeWidth,\n        style = whiskerMarkProps.style,\n        valueClickHandler = whiskerMarkProps.valueClickHandler,\n        valueMouseOutHandler = whiskerMarkProps.valueMouseOutHandler,\n        valueMouseOverHandler = whiskerMarkProps.valueMouseOverHandler,\n        valueRightClickHandler = whiskerMarkProps.valueRightClickHandler,\n        xFunctor = whiskerMarkProps.xFunctor,\n        yFunctor = whiskerMarkProps.yFunctor;\n    var r = sizeFunctor ? sizeFunctor(d) : 0;\n    var cx = xFunctor(d);\n    var cy = yFunctor(d);\n    var positiveXVariance = xFunctor({\n      x: d.x + d.xVariance / 2\n    });\n    var negativeXVariance = xFunctor({\n      x: d.x - d.xVariance / 2\n    });\n    var positiveYVariance = yFunctor({\n      y: d.y + d.yVariance / 2\n    });\n    var negativeYVariance = yFunctor({\n      y: d.y - d.yVariance / 2\n    });\n    /**\n     * Determine whether on not we should draw whiskers in each direction.\n     * We need to see an actual variance value, and also have that value extend past the\n     * radius \"buffer\" region in which we won't be drawing (if any).\n     */\n\n    var hasXWhiskers = positiveXVariance && cx + r < positiveXVariance;\n    var hasYWhiskers = positiveYVariance && cy - r > positiveYVariance;\n\n    if (!hasXWhiskers && !hasYWhiskers) {\n      return null;\n    }\n\n    var styleAttr = _extends({\n      opacity: opacityFunctor ? opacityFunctor(d) : DEFAULT_OPACITY,\n      stroke: strokeFunctor && strokeFunctor(d),\n      strokeWidth: strokeWidth || DEFAULT_STROKE_WIDTH\n    }, style);\n\n    var crossBarExtension = crossBarWidth / 2;\n    var rightLineAttrs = {\n      x1: cx + r,\n      y1: cy,\n      x2: positiveXVariance,\n      y2: cy,\n      style: styleAttr\n    };\n    var leftLineAttrs = {\n      x1: cx - r,\n      y1: cy,\n      x2: negativeXVariance,\n      y2: cy,\n      style: styleAttr\n    };\n    var rightCrossBarAttrs = {\n      x1: positiveXVariance,\n      y1: cy - crossBarExtension,\n      x2: positiveXVariance,\n      y2: cy + crossBarExtension,\n      style: styleAttr\n    };\n    var leftCrossBarAttrs = {\n      x1: negativeXVariance,\n      y1: cy - crossBarExtension,\n      x2: negativeXVariance,\n      y2: cy + crossBarExtension,\n      style: styleAttr\n    };\n    var upperLineAttrs = {\n      x1: cx,\n      y1: cy - r,\n      x2: cx,\n      y2: positiveYVariance,\n      style: styleAttr\n    };\n    var lowerLineAttrs = {\n      x1: cx,\n      y1: cy + r,\n      x2: cx,\n      y2: negativeYVariance,\n      style: styleAttr\n    };\n    var upperCrossBarAttrs = {\n      x1: cx - crossBarExtension,\n      y1: positiveYVariance,\n      x2: cx + crossBarExtension,\n      y2: positiveYVariance,\n      style: styleAttr\n    };\n    var lowerCrossBarAttrs = {\n      x1: cx - crossBarExtension,\n      y1: negativeYVariance,\n      x2: cx + crossBarExtension,\n      y2: negativeYVariance,\n      style: styleAttr\n    };\n    return React.createElement('g', {\n      className: 'mark-whiskers',\n      key: i,\n      onClick: function onClick(e) {\n        return valueClickHandler(d, e);\n      },\n      onContextMenu: function onContextMenu(e) {\n        return valueRightClickHandler(d, e);\n      },\n      onMouseOver: function onMouseOver(e) {\n        return valueMouseOverHandler(d, e);\n      },\n      onMouseOut: function onMouseOut(e) {\n        return valueMouseOutHandler(d, e);\n      }\n    }, hasXWhiskers ? React.createElement('g', {\n      className: 'x-whiskers'\n    }, React.createElement('line', rightLineAttrs), React.createElement('line', leftLineAttrs), React.createElement('line', rightCrossBarAttrs), React.createElement('line', leftCrossBarAttrs)) : null, hasYWhiskers ? React.createElement('g', {\n      className: 'y-whiskers'\n    }, React.createElement('line', upperLineAttrs), React.createElement('line', lowerLineAttrs), React.createElement('line', upperCrossBarAttrs), React.createElement('line', lowerCrossBarAttrs)) : null);\n  };\n};\n\nvar WhiskerSeries = function (_AbstractSeries) {\n  _inherits(WhiskerSeries, _AbstractSeries);\n\n  function WhiskerSeries() {\n    _classCallCheck(this, WhiskerSeries);\n\n    return _possibleConstructorReturn(this, (WhiskerSeries.__proto__ || Object.getPrototypeOf(WhiskerSeries)).apply(this, arguments));\n  }\n\n  _createClass(WhiskerSeries, [{\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          animation = _props.animation,\n          className = _props.className,\n          crossBarWidth = _props.crossBarWidth,\n          data = _props.data,\n          marginLeft = _props.marginLeft,\n          marginTop = _props.marginTop,\n          strokeWidth = _props.strokeWidth,\n          style = _props.style;\n\n      if (!data) {\n        return null;\n      }\n\n      if (animation) {\n        return React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: ANIMATED_SERIES_PROPS\n        }), React.createElement(WhiskerSeries, _extends({}, this.props, {\n          animation: null\n        })));\n      }\n\n      var whiskerMarkProps = {\n        crossBarWidth: crossBarWidth,\n        opacityFunctor: this._getAttributeFunctor('opacity'),\n        sizeFunctor: this._getAttributeFunctor('size'),\n        strokeFunctor: this._getAttributeFunctor('stroke') || this._getAttributeFunctor('color'),\n        strokeWidth: strokeWidth,\n        style: style,\n        xFunctor: this._getAttributeFunctor('x'),\n        yFunctor: this._getAttributeFunctor('y'),\n        valueClickHandler: this._valueClickHandler,\n        valueRightClickHandler: this._valueRightClickHandler,\n        valueMouseOverHandler: this._valueMouseOverHandler,\n        valueMouseOutHandler: this._valueMouseOutHandler\n      };\n      return React.createElement('g', {\n        className: predefinedClassName + ' ' + className,\n        transform: 'translate(' + marginLeft + ',' + marginTop + ')'\n      }, data.map(renderWhiskerMark(whiskerMarkProps)));\n    }\n  }]);\n\n  return WhiskerSeries;\n}(AbstractSeries);\n\nWhiskerSeries.displayName = 'WhiskerSeries';\nWhiskerSeries.defaultProps = _extends({}, AbstractSeries.defaultProps, {\n  crossBarWidth: DEFAULT_CROSS_BAR_WIDTH,\n  size: 0,\n  strokeWidth: DEFAULT_STROKE_WIDTH\n});\nexport default WhiskerSeries;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n}; // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport PropTypes from 'prop-types';\n/**\n * Get the dimensions of the component for the future use.\n * @param {Object} props Props.\n * @param {Object} defaultMargins Object with default margins.\n * @returns {Object} Dimensions of the component.\n */\n\nexport function getInnerDimensions(props, defaultMargins) {\n  var margin = props.margin,\n      width = props.width,\n      height = props.height;\n\n  var marginProps = _extends({}, defaultMargins, typeof margin === 'number' ? {\n    left: margin,\n    right: margin,\n    top: margin,\n    bottom: margin\n  } : margin);\n\n  var _marginProps$left = marginProps.left,\n      marginLeft = _marginProps$left === undefined ? 0 : _marginProps$left,\n      _marginProps$top = marginProps.top,\n      marginTop = _marginProps$top === undefined ? 0 : _marginProps$top,\n      _marginProps$right = marginProps.right,\n      marginRight = _marginProps$right === undefined ? 0 : _marginProps$right,\n      _marginProps$bottom = marginProps.bottom,\n      marginBottom = _marginProps$bottom === undefined ? 0 : _marginProps$bottom;\n  return {\n    marginLeft: marginLeft,\n    marginTop: marginTop,\n    marginRight: marginRight,\n    marginBottom: marginBottom,\n    innerHeight: height - marginBottom - marginTop,\n    innerWidth: width - marginLeft - marginRight\n  };\n}\n/**\n * Calculate the margin of the sunburst,\n * so it can be at the center of the container\n * @param  {Number} width - the width of the container\n * @param  {Number} height - the height of the container\n * @param  {Number} radius - the max radius of the sunburst\n * @return {Object} an object includes {bottom, left, right, top}\n */\n\nexport function getRadialLayoutMargin(width, height, radius) {\n  var marginX = width / 2 - radius;\n  var marginY = height / 2 - radius;\n  return {\n    bottom: marginY,\n    left: marginX,\n    right: marginX,\n    top: marginY\n  };\n}\nexport var MarginPropType = PropTypes.oneOfType([PropTypes.shape({\n  left: PropTypes.number,\n  top: PropTypes.number,\n  right: PropTypes.number,\n  bottom: PropTypes.number\n}), PropTypes.number]);\nexport var DEFAULT_MARGINS = {\n  left: 40,\n  right: 10,\n  top: 10,\n  bottom: 40\n};","var _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React, { Component } from 'react';\nimport { interpolate } from 'd3-interpolate';\nimport { extractAnimatedPropValues } from '../../animation';\nimport { ANIMATED_SERIES_PROPS } from '../../utils/series-utils';\nvar MAX_DRAWS = 30;\n/**\n * Draw loop draws each of the layers until it should draw more\n * @param {CanvasContext} ctx - the context where the drawing will take place\n * @param {Number} height - height of the canvas\n * @param {Number} width - width of the canvas\n * @param {Array} layers - the layer objects to render\n */\n\nfunction engageDrawLoop(ctx, height, width, layers) {\n  var drawIteration = 0; // using setInterval because request animation frame goes too fast\n\n  var drawCycle = setInterval(function () {\n    if (!ctx) {\n      clearInterval(drawCycle);\n      return;\n    }\n\n    drawLayers(ctx, height, width, layers, drawIteration);\n\n    if (drawIteration > MAX_DRAWS) {\n      clearInterval(drawCycle);\n    }\n\n    drawIteration += 1;\n  }, 1);\n}\n/**\n * Loops across each of the layers to be drawn and draws them\n * @param {CanvasContext} ctx - the context where the drawing will take place\n * @param {Number} height - height of the canvas\n * @param {Number} width - width of the canvas\n * @param {Array} layers - the layer objects to render\n * @param {Number} drawIteration - width of the canvas\n */\n\n\nfunction drawLayers(ctx, height, width, layers, drawIteration) {\n  ctx.clearRect(0, 0, width, height);\n  layers.forEach(function (layer) {\n    var interpolator = layer.interpolator,\n        newProps = layer.newProps,\n        animation = layer.animation; // return an empty object if dont need to be animating\n\n    var interpolatedProps = animation ? interpolator ? interpolator(drawIteration / MAX_DRAWS) : interpolator : function () {\n      return {};\n    };\n    layer.renderLayer(_extends({}, newProps, interpolatedProps), ctx);\n  });\n}\n/**\n * Build an array of layer of objects the contain the method for drawing each series\n * as well as an interpolar (specifically a d3-interpolate interpolator)\n * @param {Object} newChildren the new children to be rendered.\n * @param {Object} oldChildren the old children to be rendered.\n * @returns {Array} Object for rendering\n */\n\n\nfunction buildLayers(newChildren, oldChildren) {\n  return newChildren.map(function (child, index) {\n    var oldProps = oldChildren[index] ? oldChildren[index].props : {};\n    var newProps = child.props;\n    var oldAnimatedProps = extractAnimatedPropValues(_extends({}, oldProps, {\n      animatedProps: ANIMATED_SERIES_PROPS\n    }));\n    var newAnimatedProps = newProps ? extractAnimatedPropValues(_extends({}, newProps, {\n      animatedProps: ANIMATED_SERIES_PROPS\n    })) : null;\n    var interpolator = interpolate(oldAnimatedProps, newAnimatedProps);\n    return {\n      renderLayer: child.type.renderLayer,\n      newProps: child.props,\n      animation: child.props.animation,\n      interpolator: interpolator\n    };\n  });\n}\n\nvar CanvasWrapper = function (_Component) {\n  _inherits(CanvasWrapper, _Component);\n\n  function CanvasWrapper() {\n    _classCallCheck(this, CanvasWrapper);\n\n    return _possibleConstructorReturn(this, (CanvasWrapper.__proto__ || Object.getPrototypeOf(CanvasWrapper)).apply(this, arguments));\n  }\n\n  _createClass(CanvasWrapper, [{\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      var ctx = this.canvas.getContext('2d');\n\n      if (!ctx) {\n        return;\n      }\n\n      var pixelRatio = this.props.pixelRatio;\n\n      if (!ctx) {\n        return;\n      }\n\n      ctx.scale(pixelRatio, pixelRatio);\n      this.drawChildren(null, this.props, ctx);\n    }\n  }, {\n    key: 'componentDidUpdate',\n    value: function componentDidUpdate(oldProps) {\n      this.drawChildren(oldProps, this.props, this.canvas.getContext('2d'));\n    }\n    /**\n     * Check that we can and should be animating, then kick off animations as apporpriate\n     * @param {Object} newProps the new props to be interpolated to\n     * @param {Object} oldProps the old props to be interpolated against\n     * @param {DomRef} ctx the canvas context to be drawn on.\n     * @returns {Array} Object for rendering\n     */\n\n  }, {\n    key: 'drawChildren',\n    value: function drawChildren(oldProps, newProps, ctx) {\n      var children = newProps.children,\n          innerHeight = newProps.innerHeight,\n          innerWidth = newProps.innerWidth,\n          marginBottom = newProps.marginBottom,\n          marginLeft = newProps.marginLeft,\n          marginRight = newProps.marginRight,\n          marginTop = newProps.marginTop;\n\n      if (!ctx) {\n        return;\n      }\n\n      var childrenShouldAnimate = children.find(function (child) {\n        return child.props.animation;\n      });\n      var height = innerHeight + marginTop + marginBottom;\n      var width = innerWidth + marginLeft + marginRight;\n      var layers = buildLayers(newProps.children, oldProps ? oldProps.children : []); // if we don't need to be animating, dont! cut short\n\n      if (!childrenShouldAnimate) {\n        drawLayers(ctx, height, width, layers);\n        return;\n      }\n\n      engageDrawLoop(ctx, height, width, layers);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          innerHeight = _props.innerHeight,\n          innerWidth = _props.innerWidth,\n          marginBottom = _props.marginBottom,\n          marginLeft = _props.marginLeft,\n          marginRight = _props.marginRight,\n          marginTop = _props.marginTop,\n          pixelRatio = _props.pixelRatio;\n      var height = innerHeight + marginTop + marginBottom;\n      var width = innerWidth + marginLeft + marginRight;\n      return React.createElement('div', {\n        style: {\n          left: 0,\n          top: 0\n        },\n        className: 'rv-xy-canvas'\n      }, React.createElement('canvas', {\n        className: 'rv-xy-canvas-element',\n        height: height * pixelRatio,\n        width: width * pixelRatio,\n        style: {\n          height: height + 'px',\n          width: width + 'px'\n        },\n        ref: function ref(_ref) {\n          return _this2.canvas = _ref;\n        }\n      }), this.props.children);\n    }\n  }], [{\n    key: 'defaultProps',\n    get: function get() {\n      return {\n        pixelRatio: window && window.devicePixelRatio || 1\n      };\n    }\n  }]);\n\n  return CanvasWrapper;\n}(Component);\n\nCanvasWrapper.displayName = 'CanvasWrapper';\nexport default CanvasWrapper;","import \"core-js/modules/es.array.reduce.js\";\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nfunction _toConsumableArray(arr) {\n  if (Array.isArray(arr)) {\n    for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n      arr2[i] = arr[i];\n    }\n\n    return arr2;\n  } else {\n    return Array.from(arr);\n  }\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\n  return obj;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport equal from 'deep-equal';\nimport { extractScalePropsFromProps, getMissingScaleProps, getOptionalScaleProps, getXYPlotValues } from '../utils/scales-utils';\nimport { getStackedData, getSeriesChildren, getSeriesPropsFromChildren } from '../utils/series-utils';\nimport { getInnerDimensions, MarginPropType, DEFAULT_MARGINS } from '../utils/chart-utils';\nimport { AnimationPropType } from '../animation';\nimport { CONTINUOUS_COLOR_RANGE, EXTENDED_DISCRETE_COLOR_RANGE, SIZE_RANGE, OPACITY_TYPE } from '../theme';\nimport CanvasWrapper from './series/canvas-wrapper';\nvar ATTRIBUTES = ['x', 'y', 'radius', 'angle', 'color', 'fill', 'stroke', 'opacity', 'size'];\n/**\n * Remove parents from tree formatted data. deep-equal doesnt play nice with data\n * that has circular structures, so we make every node single directional by pruning the parents.\n * @param {Array} data - the data object to have circular deps resolved in\n * @returns {Array} the sanitized data\n */\n\nfunction cleanseData(data) {\n  return data.map(function (series) {\n    if (!Array.isArray(series)) {\n      return series;\n    }\n\n    return series.map(function (row) {\n      return _extends({}, row, {\n        parent: null\n      });\n    });\n  });\n}\n/**\n * Wrapper on the deep-equal method for checking equality of next props vs current props\n * @param {Object} scaleMixins - Scale object.\n * @param {Object} nextScaleMixins - Scale object.\n * @param {Boolean} hasTreeStructure - Whether or not to cleanse the data of possible cyclic structures\n * @returns {Boolean} whether or not the two mixins objects are equal\n */\n\n\nfunction checkIfMixinsAreEqual(nextScaleMixins, scaleMixins, hasTreeStructure) {\n  var newMixins = _extends({}, nextScaleMixins, {\n    _allData: hasTreeStructure ? cleanseData(nextScaleMixins._allData) : nextScaleMixins._allData\n  });\n\n  var oldMixins = _extends({}, scaleMixins, {\n    _allData: hasTreeStructure ? cleanseData(scaleMixins._allData) : scaleMixins._allData\n  }); // it's hard to say if this function is reasonable?\n\n\n  return equal(newMixins, oldMixins);\n}\n\nvar XYPlot = function (_React$Component) {\n  _inherits(XYPlot, _React$Component);\n\n  _createClass(XYPlot, null, [{\n    key: 'defaultProps',\n    get: function get() {\n      return {\n        className: ''\n      };\n    }\n  }, {\n    key: 'propTypes',\n    get: function get() {\n      return {\n        animation: AnimationPropType,\n        className: PropTypes.string,\n        dontCheckIfEmpty: PropTypes.bool,\n        height: PropTypes.number.isRequired,\n        margin: MarginPropType,\n        onClick: PropTypes.func,\n        onDoubleClick: PropTypes.func,\n        onMouseDown: PropTypes.func,\n        onMouseUp: PropTypes.func,\n        onMouseEnter: PropTypes.func,\n        onMouseLeave: PropTypes.func,\n        onMouseMove: PropTypes.func,\n        onTouchStart: PropTypes.func,\n        onTouchMove: PropTypes.func,\n        onTouchEnd: PropTypes.func,\n        onTouchCancel: PropTypes.func,\n        onWheel: PropTypes.func,\n        stackBy: PropTypes.oneOf(ATTRIBUTES),\n        style: PropTypes.object,\n        width: PropTypes.number.isRequired\n      };\n    }\n  }]);\n\n  function XYPlot(props) {\n    _classCallCheck(this, XYPlot);\n\n    var _this = _possibleConstructorReturn(this, (XYPlot.__proto__ || Object.getPrototypeOf(XYPlot)).call(this, props));\n\n    _initialiseProps.call(_this);\n\n    var stackBy = props.stackBy;\n    var children = getSeriesChildren(props.children);\n    var data = getStackedData(children, stackBy);\n    _this.state = {\n      scaleMixins: _this._getScaleMixins(data, props),\n      data: data\n    };\n    return _this;\n  }\n\n  _createClass(XYPlot, [{\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps(nextProps) {\n      var children = getSeriesChildren(nextProps.children);\n      var nextData = getStackedData(children, nextProps.stackBy);\n      var scaleMixins = this.state.scaleMixins;\n\n      var nextScaleMixins = this._getScaleMixins(nextData, nextProps);\n\n      if (!checkIfMixinsAreEqual(nextScaleMixins, scaleMixins, nextProps.hasTreeStructure)) {\n        this.setState({\n          scaleMixins: nextScaleMixins,\n          data: nextData\n        });\n      }\n    }\n    /**\n     * Trigger click related callbacks if they are available.\n     * @param {React.SyntheticEvent} event Click event.\n     * @private\n     */\n\n    /**\n     * Trigger doule-click related callbacks if they are available.\n     * @param {React.SyntheticEvent} event Double-click event.\n     * @private\n     */\n\n  }, {\n    key: '_getClonedChildComponents',\n\n    /**\n     * Prepare the child components (including series) for rendering.\n     * @returns {Array} Array of child components.\n     * @private\n     */\n    value: function _getClonedChildComponents() {\n      var _this2 = this;\n\n      var props = this.props;\n      var animation = this.props.animation;\n      var _state = this.state,\n          scaleMixins = _state.scaleMixins,\n          data = _state.data;\n      var dimensions = getInnerDimensions(this.props, DEFAULT_MARGINS);\n      var children = React.Children.toArray(this.props.children);\n      var seriesProps = getSeriesPropsFromChildren(children);\n      var XYPlotValues = getXYPlotValues(props, children);\n      return children.map(function (child, index) {\n        var dataProps = null;\n\n        if (seriesProps[index]) {\n          // Get the index of the series in the list of props and retrieve\n          // the data property from it.\n          var seriesIndex = seriesProps[index].seriesIndex;\n          dataProps = {\n            data: data[seriesIndex]\n          };\n        }\n\n        return React.cloneElement(child, _extends({}, dimensions, {\n          animation: animation\n        }, dataProps && child.type.prototype && child.type.prototype.render ? {\n          ref: function ref(_ref) {\n            return _this2['series' + seriesProps[index].seriesIndex] = _ref;\n          }\n        } : {}, seriesProps[index], scaleMixins, child.props, XYPlotValues[index], dataProps));\n      });\n    }\n    /**\n     * Get the list of scale-related settings that should be applied by default.\n     * @param {Object} props Object of props.\n     * @returns {Object} Defaults.\n     * @private\n     */\n\n  }, {\n    key: '_getDefaultScaleProps',\n    value: function _getDefaultScaleProps(props) {\n      var _getInnerDimensions = getInnerDimensions(props, DEFAULT_MARGINS),\n          innerWidth = _getInnerDimensions.innerWidth,\n          innerHeight = _getInnerDimensions.innerHeight;\n\n      var colorRanges = ['color', 'fill', 'stroke'].reduce(function (acc, attr) {\n        var range = props[attr + 'Type'] === 'category' ? EXTENDED_DISCRETE_COLOR_RANGE : CONTINUOUS_COLOR_RANGE;\n        return _extends({}, acc, _defineProperty({}, attr + 'Range', range));\n      }, {});\n      return _extends({\n        xRange: [0, innerWidth],\n        yRange: [innerHeight, 0]\n      }, colorRanges, {\n        opacityType: OPACITY_TYPE,\n        sizeRange: SIZE_RANGE\n      });\n    }\n    /**\n     * Get the map of scales from the props, apply defaults to them and then pass\n     * them further.\n     * @param {Object} data Array of all data.\n     * @param {Object} props Props of the component.\n     * @returns {Object} Map of scale-related props.\n     * @private\n     */\n\n  }, {\n    key: '_getScaleMixins',\n    value: function _getScaleMixins(data, props) {\n      var _ref2;\n\n      var filteredData = data.filter(function (d) {\n        return d;\n      });\n\n      var allData = (_ref2 = []).concat.apply(_ref2, _toConsumableArray(filteredData));\n\n      var defaultScaleProps = this._getDefaultScaleProps(props);\n\n      var optionalScaleProps = getOptionalScaleProps(props);\n      var userScaleProps = extractScalePropsFromProps(props, ATTRIBUTES);\n      var missingScaleProps = getMissingScaleProps(_extends({}, defaultScaleProps, optionalScaleProps, userScaleProps), allData, ATTRIBUTES);\n      var children = getSeriesChildren(props.children);\n      var zeroBaseProps = {};\n      var adjustBy = new Set();\n      var adjustWhat = new Set();\n      children.forEach(function (child, index) {\n        if (!child || !data[index]) {\n          return;\n        }\n\n        ATTRIBUTES.forEach(function (attr) {\n          var _child$type$getParent = child.type.getParentConfig(attr, child.props),\n              isDomainAdjustmentNeeded = _child$type$getParent.isDomainAdjustmentNeeded,\n              zeroBaseValue = _child$type$getParent.zeroBaseValue;\n\n          if (isDomainAdjustmentNeeded) {\n            adjustBy.add(attr);\n            adjustWhat.add(index);\n          }\n\n          if (zeroBaseValue) {\n            var specifiedDomain = props[attr + 'Domain'];\n            zeroBaseProps[attr + 'BaseValue'] = specifiedDomain ? specifiedDomain[0] : 0;\n          }\n        });\n      });\n      return _extends({}, defaultScaleProps, zeroBaseProps, userScaleProps, missingScaleProps, {\n        _allData: data,\n        _adjustBy: Array.from(adjustBy),\n        _adjustWhat: Array.from(adjustWhat),\n        _stackBy: props.stackBy\n      });\n    }\n    /**\n     * Checks if the plot is empty or not.\n     * Currently checks the data only.\n     * @returns {boolean} True for empty.\n     * @private\n     */\n\n  }, {\n    key: '_isPlotEmpty',\n    value: function _isPlotEmpty() {\n      var data = this.state.data;\n      return !data || !data.length || !data.some(function (series) {\n        return series && series.some(function (d) {\n          return d;\n        });\n      });\n    }\n    /**\n     * Trigger mouse-down related callbacks if they are available.\n     * @param {React.SyntheticEvent} event Mouse down event.\n     * @private\n     */\n\n    /**\n     * Trigger onMouseEnter handler if it was passed in props.\n     * @param {React.SyntheticEvent} event Mouse enter event.\n     * @private\n     */\n\n    /**\n     * Trigger onMouseLeave handler if it was passed in props.\n     * @param {React.SyntheticEvent} event Mouse leave event.\n     * @private\n     */\n\n    /**\n     * Trigger movement-related callbacks if they are available.\n     * @param {React.SyntheticEvent} event Mouse move event.\n     * @private\n     */\n\n    /**\n     * Trigger mouse-up related callbacks if they are available.\n     * @param {React.SyntheticEvent} event Mouse up event.\n     * @private\n     */\n\n    /**\n     * Trigger onTouchCancel handler if it was passed in props.\n     * @param {React.SyntheticEvent} event Touch Cancel event.\n     * @private\n     */\n\n    /**\n     * Trigger onTouchEnd handler if it was passed in props.\n     * @param {React.SyntheticEvent} event Touch End event.\n     * @private\n     */\n\n    /**\n     * Trigger touch movement-related callbacks if they are available.\n     * @param {React.SyntheticEvent} event Touch move event.\n     * @private\n     */\n\n    /**\n     * Trigger touch-start related callbacks if they are available.\n     * @param {React.SyntheticEvent} event Touch start event.\n     * @private\n     */\n\n    /**\n     * Trigger doule-click related callbacks if they are available.\n     * @param {React.SyntheticEvent} event Double-click event.\n     * @private\n     */\n\n  }, {\n    key: 'renderCanvasComponents',\n    value: function renderCanvasComponents(components, props) {\n      var componentsToRender = components.filter(function (c) {\n        return c && !c.type.requiresSVG && c.type.isCanvas;\n      });\n\n      if (componentsToRender.length === 0) {\n        return null;\n      }\n\n      var _componentsToRender$ = componentsToRender[0].props,\n          marginLeft = _componentsToRender$.marginLeft,\n          marginTop = _componentsToRender$.marginTop,\n          marginBottom = _componentsToRender$.marginBottom,\n          marginRight = _componentsToRender$.marginRight,\n          innerHeight = _componentsToRender$.innerHeight,\n          innerWidth = _componentsToRender$.innerWidth;\n      return React.createElement(CanvasWrapper, {\n        innerHeight: innerHeight,\n        innerWidth: innerWidth,\n        marginLeft: marginLeft,\n        marginTop: marginTop,\n        marginBottom: marginBottom,\n        marginRight: marginRight\n      }, componentsToRender);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          className = _props.className,\n          dontCheckIfEmpty = _props.dontCheckIfEmpty,\n          style = _props.style,\n          width = _props.width,\n          height = _props.height;\n\n      if (!dontCheckIfEmpty && this._isPlotEmpty()) {\n        return React.createElement('div', {\n          className: 'rv-xy-plot ' + className,\n          style: _extends({\n            width: width + 'px',\n            height: height + 'px'\n          }, this.props.style)\n        });\n      }\n\n      var components = this._getClonedChildComponents();\n\n      return React.createElement('div', {\n        style: {\n          width: width + 'px',\n          height: height + 'px'\n        },\n        className: 'rv-xy-plot ' + className\n      }, React.createElement('svg', {\n        className: 'rv-xy-plot__inner',\n        width: width,\n        height: height,\n        style: style,\n        onClick: this._clickHandler,\n        onDoubleClick: this._doubleClickHandler,\n        onMouseDown: this._mouseDownHandler,\n        onMouseUp: this._mouseUpHandler,\n        onMouseMove: this._mouseMoveHandler,\n        onMouseLeave: this._mouseLeaveHandler,\n        onMouseEnter: this._mouseEnterHandler,\n        onTouchStart: this._mouseDownHandler,\n        onTouchMove: this._touchMoveHandler,\n        onTouchEnd: this._touchEndHandler,\n        onTouchCancel: this._touchCancelHandler,\n        onWheel: this._wheelHandler\n      }, components.filter(function (c) {\n        return c && c.type.requiresSVG;\n      })), this.renderCanvasComponents(components, this.props), components.filter(function (c) {\n        return c && !c.type.requiresSVG && !c.type.isCanvas;\n      }));\n    }\n  }]);\n\n  return XYPlot;\n}(React.Component);\n\nvar _initialiseProps = function _initialiseProps() {\n  var _this3 = this;\n\n  this._clickHandler = function (event) {\n    var onClick = _this3.props.onClick;\n\n    if (onClick) {\n      onClick(event);\n    }\n  };\n\n  this._doubleClickHandler = function (event) {\n    var onDoubleClick = _this3.props.onDoubleClick;\n\n    if (onDoubleClick) {\n      onDoubleClick(event);\n    }\n  };\n\n  this._mouseDownHandler = function (event) {\n    var _props2 = _this3.props,\n        onMouseDown = _props2.onMouseDown,\n        children = _props2.children;\n\n    if (onMouseDown) {\n      onMouseDown(event);\n    }\n\n    var seriesChildren = getSeriesChildren(children);\n    seriesChildren.forEach(function (child, index) {\n      var component = _this3['series' + index];\n\n      if (component && component.onParentMouseDown) {\n        component.onParentMouseDown(event);\n      }\n    });\n  };\n\n  this._mouseEnterHandler = function (event) {\n    var _props3 = _this3.props,\n        onMouseEnter = _props3.onMouseEnter,\n        children = _props3.children;\n\n    if (onMouseEnter) {\n      onMouseEnter(event);\n    }\n\n    var seriesChildren = getSeriesChildren(children);\n    seriesChildren.forEach(function (child, index) {\n      var component = _this3['series' + index];\n\n      if (component && component.onParentMouseEnter) {\n        component.onParentMouseEnter(event);\n      }\n    });\n  };\n\n  this._mouseLeaveHandler = function (event) {\n    var _props4 = _this3.props,\n        onMouseLeave = _props4.onMouseLeave,\n        children = _props4.children;\n\n    if (onMouseLeave) {\n      onMouseLeave(event);\n    }\n\n    var seriesChildren = getSeriesChildren(children);\n    seriesChildren.forEach(function (child, index) {\n      var component = _this3['series' + index];\n\n      if (component && component.onParentMouseLeave) {\n        component.onParentMouseLeave(event);\n      }\n    });\n  };\n\n  this._mouseMoveHandler = function (event) {\n    var _props5 = _this3.props,\n        onMouseMove = _props5.onMouseMove,\n        children = _props5.children;\n\n    if (onMouseMove) {\n      onMouseMove(event);\n    }\n\n    var seriesChildren = getSeriesChildren(children);\n    seriesChildren.forEach(function (child, index) {\n      var component = _this3['series' + index];\n\n      if (component && component.onParentMouseMove) {\n        component.onParentMouseMove(event);\n      }\n    });\n  };\n\n  this._mouseUpHandler = function (event) {\n    var _props6 = _this3.props,\n        onMouseUp = _props6.onMouseUp,\n        children = _props6.children;\n\n    if (onMouseUp) {\n      onMouseUp(event);\n    }\n\n    var seriesChildren = getSeriesChildren(children);\n    seriesChildren.forEach(function (child, index) {\n      var component = _this3['series' + index];\n\n      if (component && component.onParentMouseUp) {\n        component.onParentMouseUp(event);\n      }\n    });\n  };\n\n  this._touchCancelHandler = function (event) {\n    var onTouchCancel = _this3.props.onTouchCancel;\n\n    if (onTouchCancel) {\n      onTouchCancel(event);\n    }\n  };\n\n  this._touchEndHandler = function (event) {\n    var onTouchEnd = _this3.props.onTouchEnd;\n\n    if (onTouchEnd) {\n      onTouchEnd(event);\n    }\n  };\n\n  this._touchMoveHandler = function (event) {\n    var _props7 = _this3.props,\n        onTouchMove = _props7.onTouchMove,\n        children = _props7.children;\n\n    if (onTouchMove) {\n      onTouchMove(event);\n    }\n\n    var seriesChildren = getSeriesChildren(children);\n    seriesChildren.forEach(function (child, index) {\n      var component = _this3['series' + index];\n\n      if (component && component.onParentTouchMove) {\n        component.onParentTouchMove(event);\n      }\n    });\n  };\n\n  this._touchStartHandler = function (event) {\n    var _props8 = _this3.props,\n        onTouchStart = _props8.onTouchStart,\n        children = _props8.children;\n\n    if (onTouchStart) {\n      onTouchStart(event);\n    }\n\n    var seriesChildren = getSeriesChildren(children);\n    seriesChildren.forEach(function (child, index) {\n      var component = _this3['series' + index];\n\n      if (component && component.onParentTouchStart) {\n        component.onParentTouchStart(event);\n      }\n    });\n  };\n\n  this._wheelHandler = function (event) {\n    var onWheel = _this3.props.onWheel;\n\n    if (onWheel) {\n      onWheel(event);\n    }\n  };\n};\n\nXYPlot.displayName = 'XYPlot';\nexport default XYPlot;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n}; // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport { ORIENTATION } from '../../utils/axis-utils';\nvar LEFT = ORIENTATION.LEFT,\n    RIGHT = ORIENTATION.RIGHT,\n    TOP = ORIENTATION.TOP;\nvar defaultProps = {\n  style: {}\n};\n\nfunction AxisLine(_ref) {\n  var orientation = _ref.orientation,\n      width = _ref.width,\n      height = _ref.height,\n      style = _ref.style;\n  var lineProps = void 0;\n\n  if (orientation === LEFT) {\n    lineProps = {\n      x1: width,\n      x2: width,\n      y1: 0,\n      y2: height\n    };\n  } else if (orientation === RIGHT) {\n    lineProps = {\n      x1: 0,\n      x2: 0,\n      y1: 0,\n      y2: height\n    };\n  } else if (orientation === TOP) {\n    lineProps = {\n      x1: 0,\n      x2: width,\n      y1: height,\n      y2: height\n    };\n  } else {\n    lineProps = {\n      x1: 0,\n      x2: width,\n      y1: 0,\n      y2: 0\n    };\n  }\n\n  return React.createElement('line', _extends({}, lineProps, {\n    className: 'rv-xy-plot__axis__line',\n    style: style\n  }));\n}\n\nAxisLine.defaultProps = defaultProps;\nAxisLine.displayName = 'AxisLine';\nexport default AxisLine;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\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\n  return obj;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport { ORIENTATION, getTickValues } from '../../utils/axis-utils';\nimport { getAttributeScale } from '../../utils/scales-utils';\nvar LEFT = ORIENTATION.LEFT,\n    RIGHT = ORIENTATION.RIGHT,\n    TOP = ORIENTATION.TOP,\n    BOTTOM = ORIENTATION.BOTTOM;\nvar defaultProps = {\n  style: {}\n};\n\nfunction _getTickFormatFn(scale, tickTotal, tickFormat) {\n  return !tickFormat ? scale.tickFormat ? scale.tickFormat(tickTotal) : function (v) {\n    return v;\n  } : tickFormat;\n}\n\nvar AxisTicks = function (_React$Component) {\n  _inherits(AxisTicks, _React$Component);\n\n  function AxisTicks() {\n    _classCallCheck(this, AxisTicks);\n\n    return _possibleConstructorReturn(this, (AxisTicks.__proto__ || Object.getPrototypeOf(AxisTicks)).apply(this, arguments));\n  }\n\n  _createClass(AxisTicks, [{\n    key: '_areTicksWrapped',\n\n    /**\n     * Check if axis ticks should be mirrored (for the right and top positions.\n     * @returns {boolean} True if mirrored.\n     * @private\n     */\n    value: function _areTicksWrapped() {\n      var orientation = this.props.orientation;\n      return orientation === LEFT || orientation === TOP;\n    }\n  }, {\n    key: '_getTickContainerPropsGetterFn',\n    value: function _getTickContainerPropsGetterFn() {\n      if (this._isAxisVertical()) {\n        return function (pos) {\n          return {\n            transform: 'translate(0, ' + pos + ')'\n          };\n        };\n      }\n\n      return function (pos) {\n        return {\n          transform: 'translate(' + pos + ', 0)'\n        };\n      };\n    }\n    /**\n     * Get attributes for the label of the tick.\n     * @returns {Object} Object with properties.\n     * @private\n     */\n\n  }, {\n    key: '_getTickLabelProps',\n    value: function _getTickLabelProps() {\n      var _props = this.props,\n          orientation = _props.orientation,\n          tickLabelAngle = _props.tickLabelAngle,\n          tickSize = _props.tickSize,\n          _props$tickSizeOuter = _props.tickSizeOuter,\n          tickSizeOuter = _props$tickSizeOuter === undefined ? tickSize : _props$tickSizeOuter,\n          _props$tickPadding = _props.tickPadding,\n          tickPadding = _props$tickPadding === undefined ? tickSize : _props$tickPadding; // Assign the text orientation inside the label of the tick mark.\n\n      var textAnchor = void 0;\n\n      if (orientation === LEFT || orientation === BOTTOM && tickLabelAngle) {\n        textAnchor = 'end';\n      } else if (orientation === RIGHT || orientation === TOP && tickLabelAngle) {\n        textAnchor = 'start';\n      } else {\n        textAnchor = 'middle';\n      } // The label's position is translated to the given padding and then the\n      // label is rotated to the given angle.\n\n\n      var isVertical = this._isAxisVertical();\n\n      var wrap = this._areTicksWrapped() ? -1 : 1;\n      var labelOffset = wrap * (tickSizeOuter + tickPadding);\n      var transform = (isVertical ? 'translate(' + labelOffset + ', 0)' : 'translate(0, ' + labelOffset + ')') + (tickLabelAngle ? ' rotate(' + tickLabelAngle + ')' : ''); // Set the vertical offset of the label according to the position of\n      // the axis.\n\n      var dy = orientation === TOP || tickLabelAngle ? '0' : orientation === BOTTOM ? '0.72em' : '0.32em';\n      return {\n        textAnchor: textAnchor,\n        dy: dy,\n        transform: transform\n      };\n    }\n    /**\n     * Get the props of the tick line.\n     * @returns {Object} Props.\n     * @private\n     */\n\n  }, {\n    key: '_getTickLineProps',\n    value: function _getTickLineProps() {\n      var _ref;\n\n      var _props2 = this.props,\n          tickSize = _props2.tickSize,\n          _props2$tickSizeOuter = _props2.tickSizeOuter,\n          tickSizeOuter = _props2$tickSizeOuter === undefined ? tickSize : _props2$tickSizeOuter,\n          _props2$tickSizeInner = _props2.tickSizeInner,\n          tickSizeInner = _props2$tickSizeInner === undefined ? tickSize : _props2$tickSizeInner;\n\n      var isVertical = this._isAxisVertical();\n\n      var tickXAttr = isVertical ? 'y' : 'x';\n      var tickYAttr = isVertical ? 'x' : 'y';\n      var wrap = this._areTicksWrapped() ? -1 : 1;\n      return _ref = {}, _defineProperty(_ref, tickXAttr + '1', 0), _defineProperty(_ref, tickXAttr + '2', 0), _defineProperty(_ref, tickYAttr + '1', -wrap * tickSizeInner), _defineProperty(_ref, tickYAttr + '2', wrap * tickSizeOuter), _ref;\n    }\n    /**\n     * Gets if the axis is vertical.\n     * @returns {boolean} True if vertical.\n     * @private\n     */\n\n  }, {\n    key: '_isAxisVertical',\n    value: function _isAxisVertical() {\n      var orientation = this.props.orientation;\n      return orientation === LEFT || orientation === RIGHT;\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props3 = this.props,\n          attr = _props3.attr,\n          orientation = _props3.orientation,\n          width = _props3.width,\n          height = _props3.height,\n          style = _props3.style,\n          tickFormat = _props3.tickFormat,\n          tickTotal = _props3.tickTotal,\n          tickValues = _props3.tickValues;\n      var x = orientation === LEFT ? width : 0;\n      var y = orientation === TOP ? height : 0;\n      var scale = getAttributeScale(this.props, attr);\n      var values = getTickValues(scale, tickTotal, tickValues);\n\n      var tickFormatFn = _getTickFormatFn(scale, tickTotal, tickFormat);\n\n      var translateFn = this._getTickContainerPropsGetterFn();\n\n      var pathProps = this._getTickLineProps();\n\n      var textProps = this._getTickLabelProps();\n\n      var ticks = values.map(function (v, i) {\n        var pos = scale(v);\n        var labelNode = tickFormatFn(v, i, scale, tickTotal);\n        var shouldRenderAsOwnNode = React.isValidElement(labelNode) && !['tspan', 'textPath'].includes(labelNode.type);\n        var shouldAddProps = labelNode && typeof labelNode.type !== 'string';\n        return React.createElement('g', _extends({\n          key: i\n        }, translateFn(pos, 0), {\n          className: 'rv-xy-plot__axis__tick',\n          style: style\n        }), React.createElement('line', _extends({}, pathProps, {\n          className: 'rv-xy-plot__axis__tick__line',\n          style: _extends({}, style, style.line)\n        })), shouldRenderAsOwnNode ? React.cloneElement(labelNode, shouldAddProps ? _extends({}, textProps, {\n          containerWidth: width,\n          tickCount: values.length\n        }) : undefined) : React.createElement('text', _extends({}, textProps, {\n          className: 'rv-xy-plot__axis__tick__text',\n          style: _extends({}, style, style.text)\n        }), labelNode));\n      });\n      return React.createElement('g', {\n        transform: 'translate(' + x + ', ' + y + ')',\n        className: 'rv-xy-plot__axis__ticks'\n      }, ticks);\n    }\n  }]);\n\n  return AxisTicks;\n}(React.Component);\n\nAxisTicks.defaultProps = defaultProps;\nAxisTicks.displayName = 'AxisTicks';\nAxisTicks.requiresSVG = true;\nexport default AxisTicks;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\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\n  return obj;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport { ORIENTATION } from '../../utils/axis-utils'; // Assuming that 16px = 1em\n\nvar ADJUSTMENT_FOR_TEXT_SIZE = 16;\nvar MARGIN = 6;\nvar LEFT = ORIENTATION.LEFT,\n    RIGHT = ORIENTATION.RIGHT,\n    TOP = ORIENTATION.TOP,\n    BOTTOM = ORIENTATION.BOTTOM;\nvar defaultProps = {\n  position: 'end'\n};\n/**\n * Compute transformations, keyed by orientation\n * @param {number} width - width of axis\n * @param {number} height - height of axis\n * @returns {Object} Object of transformations, keyed by orientation\n */\n\nvar transformation = function transformation(width, height) {\n  var _ref;\n\n  return _ref = {}, _defineProperty(_ref, LEFT, {\n    end: {\n      x: ADJUSTMENT_FOR_TEXT_SIZE,\n      y: MARGIN,\n      rotation: -90,\n      textAnchor: 'end'\n    },\n    middle: {\n      x: ADJUSTMENT_FOR_TEXT_SIZE,\n      y: height / 2 - MARGIN,\n      rotation: -90,\n      textAnchor: 'middle'\n    },\n    start: {\n      x: ADJUSTMENT_FOR_TEXT_SIZE,\n      y: height - MARGIN,\n      rotation: -90,\n      textAnchor: 'start'\n    }\n  }), _defineProperty(_ref, RIGHT, {\n    end: {\n      x: ADJUSTMENT_FOR_TEXT_SIZE * -0.5,\n      y: MARGIN,\n      rotation: -90,\n      textAnchor: 'end'\n    },\n    middle: {\n      x: ADJUSTMENT_FOR_TEXT_SIZE * -0.5,\n      y: height / 2 - MARGIN,\n      rotation: -90,\n      textAnchor: 'middle'\n    },\n    start: {\n      x: ADJUSTMENT_FOR_TEXT_SIZE * -0.5,\n      y: height - MARGIN,\n      rotation: -90,\n      textAnchor: 'start'\n    }\n  }), _defineProperty(_ref, TOP, {\n    start: {\n      x: MARGIN,\n      y: ADJUSTMENT_FOR_TEXT_SIZE,\n      rotation: 0,\n      textAnchor: 'start'\n    },\n    middle: {\n      x: width / 2 - MARGIN,\n      y: ADJUSTMENT_FOR_TEXT_SIZE,\n      rotation: 0,\n      textAnchor: 'middle'\n    },\n    end: {\n      x: width - MARGIN,\n      y: ADJUSTMENT_FOR_TEXT_SIZE,\n      rotation: 0,\n      textAnchor: 'end'\n    }\n  }), _defineProperty(_ref, BOTTOM, {\n    start: {\n      x: MARGIN,\n      y: -MARGIN,\n      rotation: 0,\n      textAnchor: 'start'\n    },\n    middle: {\n      x: width / 2 - MARGIN,\n      y: -MARGIN,\n      rotation: 0,\n      textAnchor: 'middle'\n    },\n    end: {\n      x: width - MARGIN,\n      y: -MARGIN,\n      rotation: 0,\n      textAnchor: 'end'\n    }\n  }), _ref;\n};\n\nfunction AxisTitle(_ref2) {\n  var orientation = _ref2.orientation,\n      position = _ref2.position,\n      width = _ref2.width,\n      height = _ref2.height,\n      style = _ref2.style,\n      title = _ref2.title;\n  var outerGroupTranslateX = orientation === LEFT ? width : 0;\n  var outerGroupTranslateY = orientation === TOP ? height : 0;\n  var outerGroupTransform = 'translate(' + outerGroupTranslateX + ', ' + outerGroupTranslateY + ')';\n  var _transformation$orien = transformation(width, height)[orientation][position],\n      x = _transformation$orien.x,\n      y = _transformation$orien.y,\n      rotation = _transformation$orien.rotation,\n      textAnchor = _transformation$orien.textAnchor;\n  var innerGroupTransform = 'translate(' + x + ', ' + y + ') rotate(' + rotation + ')';\n  return React.createElement('g', {\n    transform: outerGroupTransform,\n    className: 'rv-xy-plot__axis__title'\n  }, React.createElement('g', {\n    style: _extends({\n      textAnchor: textAnchor\n    }, style),\n    transform: innerGroupTransform\n  }, React.createElement('text', {\n    style: style\n  }, title)));\n}\n\nAxisTitle.displayName = 'AxisTitle';\nAxisTitle.defaultProps = defaultProps;\nexport default AxisTitle;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React, { PureComponent } from 'react';\nimport Animation from '../../animation';\nimport { ORIENTATION, getTicksTotalFromSize } from '../../utils/axis-utils';\nimport { getAttributeScale } from '../../utils/scales-utils';\nimport AxisLine from './axis-line';\nimport AxisTicks from './axis-ticks';\nimport AxisTitle from './axis-title';\nvar defaultAnimatedProps = ['xRange', 'yRange', 'xDomain', 'yDomain', 'width', 'height', 'marginLeft', 'marginTop', 'marginRight', 'marginBottom', 'tickSize', 'tickTotal', 'tickSizeInner', 'tickSizeOuter'];\nvar LEFT = ORIENTATION.LEFT,\n    RIGHT = ORIENTATION.RIGHT,\n    TOP = ORIENTATION.TOP,\n    BOTTOM = ORIENTATION.BOTTOM;\nvar defaultProps = {\n  className: '',\n  on0: false,\n  style: {},\n  tickSize: 6,\n  tickPadding: 8,\n  orientation: BOTTOM\n};\nvar predefinedClassName = 'rv-xy-plot__axis';\nvar VERTICAL_CLASS_NAME = 'rv-xy-plot__axis--vertical';\nvar HORIZONTAL_CLASS_NAME = 'rv-xy-plot__axis--horizontal';\n\nvar Axis = function (_PureComponent) {\n  _inherits(Axis, _PureComponent);\n\n  function Axis() {\n    _classCallCheck(this, Axis);\n\n    return _possibleConstructorReturn(this, (Axis.__proto__ || Object.getPrototypeOf(Axis)).apply(this, arguments));\n  }\n\n  _createClass(Axis, [{\n    key: '_getDefaultAxisProps',\n\n    /**\n     * Define the default values depending on the data passed from the outside.\n     * @returns {*} Object of default properties.\n     * @private\n     */\n    value: function _getDefaultAxisProps() {\n      var _props = this.props,\n          innerWidth = _props.innerWidth,\n          innerHeight = _props.innerHeight,\n          marginTop = _props.marginTop,\n          marginBottom = _props.marginBottom,\n          marginLeft = _props.marginLeft,\n          marginRight = _props.marginRight,\n          orientation = _props.orientation;\n\n      if (orientation === BOTTOM) {\n        return {\n          tickTotal: getTicksTotalFromSize(innerWidth),\n          top: innerHeight + marginTop,\n          left: marginLeft,\n          width: innerWidth,\n          height: marginBottom\n        };\n      } else if (orientation === TOP) {\n        return {\n          tickTotal: getTicksTotalFromSize(innerWidth),\n          top: 0,\n          left: marginLeft,\n          width: innerWidth,\n          height: marginTop\n        };\n      } else if (orientation === LEFT) {\n        return {\n          tickTotal: getTicksTotalFromSize(innerHeight),\n          top: marginTop,\n          left: 0,\n          width: marginLeft,\n          height: innerHeight\n        };\n      }\n\n      return {\n        tickTotal: getTicksTotalFromSize(innerHeight),\n        top: marginTop,\n        left: marginLeft + innerWidth,\n        width: marginRight,\n        height: innerHeight\n      };\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var animation = this.props.animation;\n\n      if (animation) {\n        var animatedProps = animation.nonAnimatedProps ? defaultAnimatedProps.filter(function (prop) {\n          return animation.nonAnimatedProps.indexOf(prop) < 0;\n        }) : defaultAnimatedProps;\n        return React.createElement(Animation, _extends({}, this.props, {\n          animatedProps: animatedProps\n        }), React.createElement(Axis, _extends({}, this.props, {\n          animation: null\n        })));\n      }\n\n      var props = _extends({}, this._getDefaultAxisProps(), this.props);\n\n      var attrAxis = props.attrAxis,\n          className = props.className,\n          height = props.height,\n          hideLine = props.hideLine,\n          hideTicks = props.hideTicks,\n          left = props.left,\n          marginTop = props.marginTop,\n          on0 = props.on0,\n          orientation = props.orientation,\n          position = props.position,\n          style = props.style,\n          title = props.title,\n          top = props.top,\n          width = props.width;\n      var isVertical = [LEFT, RIGHT].indexOf(orientation) > -1;\n      var axisClassName = isVertical ? VERTICAL_CLASS_NAME : HORIZONTAL_CLASS_NAME;\n      var leftPos = left;\n      var topPos = top;\n\n      if (on0) {\n        var scale = getAttributeScale(props, attrAxis);\n\n        if (isVertical) {\n          leftPos = scale(0);\n        } else {\n          topPos = marginTop + scale(0);\n        }\n      }\n\n      return React.createElement('g', {\n        transform: 'translate(' + leftPos + ',' + topPos + ')',\n        className: predefinedClassName + ' ' + axisClassName + ' ' + className,\n        style: style\n      }, !hideLine && React.createElement(AxisLine, {\n        height: height,\n        width: width,\n        orientation: orientation,\n        style: _extends({}, style, style.line)\n      }), !hideTicks && React.createElement(AxisTicks, _extends({}, props, {\n        style: _extends({}, style, style.ticks)\n      })), title ? React.createElement(AxisTitle, {\n        position: position,\n        title: title,\n        height: height,\n        width: width,\n        style: _extends({}, style, style.title),\n        orientation: orientation\n      }) : null);\n    }\n  }]);\n\n  return Axis;\n}(PureComponent);\n\nAxis.displayName = 'Axis';\nAxis.defaultProps = defaultProps;\nAxis.requiresSVG = true;\nexport default Axis;","// Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport React from 'react';\nimport { ORIENTATION } from '../../utils/axis-utils';\nimport Axis from './axis';\nvar BOTTOM = ORIENTATION.BOTTOM;\nvar defaultProps = {\n  orientation: BOTTOM,\n  attr: 'x',\n  attrAxis: 'y'\n};\n\nfunction XAxis(props) {\n  return React.createElement(Axis, props);\n}\n\nXAxis.displayName = 'XAxis';\nXAxis.defaultProps = defaultProps;\nXAxis.requiresSVG = true;\nexport default XAxis;","// Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport React from 'react';\nimport { ORIENTATION } from '../../utils/axis-utils';\nimport Axis from './axis';\nvar LEFT = ORIENTATION.LEFT;\nvar defaultProps = {\n  orientation: LEFT,\n  attr: 'y',\n  attrAxis: 'x'\n};\n\nfunction YAxis(props) {\n  return React.createElement(Axis, props);\n}\n\nYAxis.displayName = 'YAxis';\nYAxis.defaultProps = defaultProps;\nYAxis.requiresSVG = true;\nexport default YAxis;","// Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport React from 'react';\nimport { CONTINUOUS_COLOR_RANGE } from '../theme';\nvar defaultProps = {\n  className: '',\n  startColor: CONTINUOUS_COLOR_RANGE[0],\n  endColor: CONTINUOUS_COLOR_RANGE[1]\n};\n\nfunction ContinuousColorLegend(_ref) {\n  var startColor = _ref.startColor,\n      midColor = _ref.midColor,\n      endColor = _ref.endColor,\n      startTitle = _ref.startTitle,\n      midTitle = _ref.midTitle,\n      endTitle = _ref.endTitle,\n      height = _ref.height,\n      width = _ref.width,\n      className = _ref.className;\n  var colors = [startColor];\n\n  if (midColor) {\n    colors.push(midColor);\n  }\n\n  colors.push(endColor);\n  return React.createElement('div', {\n    className: 'rv-continuous-color-legend ' + className,\n    style: {\n      width: width,\n      height: height\n    }\n  }, React.createElement('div', {\n    className: 'rv-gradient',\n    style: {\n      background: 'linear-gradient(to right, ' + colors.join(',') + ')'\n    }\n  }), React.createElement('div', {\n    className: 'rv-legend-titles'\n  }, React.createElement('span', {\n    className: 'rv-legend-titles__left'\n  }, startTitle), React.createElement('span', {\n    className: 'rv-legend-titles__right'\n  }, endTitle), midTitle ? React.createElement('span', {\n    className: 'rv-legend-titles__center'\n  }, midTitle) : null));\n}\n\nContinuousColorLegend.displayName = 'ContinuousColorLegend';\nContinuousColorLegend.defaultProps = defaultProps;\nexport default ContinuousColorLegend;","// Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport React from 'react';\nvar defaultProps = {\n  circlesTotal: 10,\n  className: '',\n  endSize: 20,\n  startSize: 2\n};\n\nfunction ContinuousSizeLegend(_ref) {\n  var startTitle = _ref.startTitle,\n      endTitle = _ref.endTitle,\n      startSize = _ref.startSize,\n      endSize = _ref.endSize,\n      circlesTotal = _ref.circlesTotal,\n      height = _ref.height,\n      width = _ref.width,\n      className = _ref.className;\n  var circles = [];\n  var step = (endSize - startSize) / (circlesTotal - 1);\n\n  for (var i = 0; i < circlesTotal; i++) {\n    var size = step * i + startSize;\n    circles.push(React.createElement('div', {\n      key: i,\n      className: 'rv-bubble',\n      style: {\n        width: size,\n        height: size,\n        borderRadius: size / 2\n      }\n    })); // Add the separator in order to justify the content (otherwise the tags\n    // will be stacked together without any margins around).\n\n    circles.push(' ');\n  }\n\n  return React.createElement('div', {\n    className: 'rv-continuous-size-legend ' + className,\n    style: {\n      width: width,\n      height: height\n    }\n  }, React.createElement('div', {\n    className: 'rv-bubbles',\n    style: {\n      height: endSize\n    }\n  }, circles, React.createElement('div', {\n    className: 'rv-spacer'\n  })), React.createElement('div', {\n    className: 'rv-legend-titles'\n  }, React.createElement('span', {\n    className: 'rv-legend-titles__left'\n  }, startTitle), React.createElement('span', {\n    className: 'rv-legend-titles__right'\n  }, endTitle)));\n}\n\nContinuousSizeLegend.displayName = 'ContinuousSizeLegend';\nContinuousSizeLegend.defaultProps = defaultProps;\nexport default ContinuousSizeLegend;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n}; // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nvar STROKE_STYLES = {\n  dashed: '6, 2',\n  solid: null\n};\n\nfunction DiscreteColorLegendItem(_ref) {\n  var color = _ref.color,\n      strokeDasharray = _ref.strokeDasharray,\n      strokeStyle = _ref.strokeStyle,\n      strokeWidth = _ref.strokeWidth,\n      disabled = _ref.disabled,\n      onClick = _ref.onClick,\n      orientation = _ref.orientation,\n      onMouseEnter = _ref.onMouseEnter,\n      onMouseLeave = _ref.onMouseLeave,\n      title = _ref.title;\n  var className = 'rv-discrete-color-legend-item ' + orientation;\n\n  if (disabled) {\n    className += ' disabled';\n  }\n\n  if (onClick) {\n    className += ' clickable';\n  }\n\n  var strokeDasharrayStyle = STROKE_STYLES[strokeStyle] || strokeDasharray;\n  return React.createElement('div', {\n    className: className,\n    onClick: onClick,\n    onMouseEnter: onMouseEnter,\n    onMouseLeave: onMouseLeave\n  }, React.createElement('svg', {\n    className: 'rv-discrete-color-legend-item__color',\n    height: 2,\n    width: 14\n  }, React.createElement('path', {\n    className: 'rv-discrete-color-legend-item__color__path',\n    d: 'M 0, 1 L 14, 1',\n    style: _extends({}, strokeWidth ? {\n      strokeWidth: strokeWidth\n    } : {}, strokeDasharrayStyle ? {\n      strokeDasharray: strokeDasharrayStyle\n    } : {}, {\n      stroke: disabled ? null : color\n    })\n  })), React.createElement('span', {\n    className: 'rv-discrete-color-legend-item__title'\n  }, title));\n}\n\nDiscreteColorLegendItem.defaultProps = {\n  disabled: false,\n  strokeStyle: 'solid'\n};\nDiscreteColorLegendItem.displayName = 'DiscreteColorLegendItem';\nexport default DiscreteColorLegendItem;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n}; // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport DiscreteColorLegendItem from './discrete-color-legend-item';\nimport { DISCRETE_COLOR_RANGE } from '../theme';\n\nfunction DiscreteColorLegend(_ref) {\n  var className = _ref.className,\n      colors = _ref.colors,\n      height = _ref.height,\n      items = _ref.items,\n      onItemClick = _ref.onItemClick,\n      onItemMouseEnter = _ref.onItemMouseEnter,\n      onItemMouseLeave = _ref.onItemMouseLeave,\n      orientation = _ref.orientation,\n      style = _ref.style,\n      width = _ref.width;\n  return React.createElement('div', {\n    className: 'rv-discrete-color-legend ' + orientation + ' ' + className,\n    style: _extends({\n      width: width,\n      height: height\n    }, style)\n  }, items.map(function (item, i) {\n    return React.createElement(DiscreteColorLegendItem, {\n      title: item.title ? item.title : item,\n      color: item.color ? item.color : colors[i % colors.length],\n      strokeDasharray: item.strokeDasharray,\n      strokeStyle: item.strokeStyle,\n      strokeWidth: item.strokeWidth,\n      disabled: Boolean(item.disabled),\n      orientation: orientation,\n      key: i,\n      onClick: onItemClick ? function (e) {\n        return onItemClick(item, i, e);\n      } : null,\n      onMouseEnter: onItemMouseEnter ? function (e) {\n        return onItemMouseEnter(item, i, e);\n      } : null,\n      onMouseLeave: onItemMouseEnter ? function (e) {\n        return onItemMouseLeave(item, i, e);\n      } : null\n    });\n  }));\n}\n\nDiscreteColorLegend.displayName = 'DiscreteColorLegendItem';\nDiscreteColorLegend.defaultProps = {\n  className: '',\n  colors: DISCRETE_COLOR_RANGE,\n  orientation: 'vertical'\n};\nexport default DiscreteColorLegend;","// Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport React from 'react';\nimport DiscreteColorLegend from './discrete-color-legend';\nvar defaultProps = {\n  className: '',\n  searchText: '',\n  searchFn: function searchFn(items, s) {\n    return items.filter(function (item) {\n      return String(item.title || item).toLowerCase().indexOf(s) !== -1;\n    });\n  }\n};\n\nfunction SearchableDiscreteColorLegend(props) {\n  var className = props.className,\n      colors = props.colors,\n      height = props.height,\n      items = props.items,\n      onItemClick = props.onItemClick,\n      onSearchChange = props.onSearchChange,\n      orientation = props.orientation,\n      searchFn = props.searchFn,\n      searchPlaceholder = props.searchPlaceholder,\n      searchText = props.searchText,\n      width = props.width;\n  var onChange = onSearchChange ? function (_ref) {\n    var value = _ref.target.value;\n    return onSearchChange(value);\n  } : null;\n  var filteredItems = searchFn(items, searchText);\n  return React.createElement('div', {\n    className: 'rv-search-wrapper ' + className,\n    style: {\n      width: width,\n      height: height\n    }\n  }, React.createElement('form', {\n    className: 'rv-search-wrapper__form'\n  }, React.createElement('input', {\n    type: 'search',\n    placeholder: searchPlaceholder,\n    className: 'rv-search-wrapper__form__input',\n    value: searchText,\n    onChange: onChange\n  })), React.createElement('div', {\n    className: 'rv-search-wrapper__contents'\n  }, React.createElement(DiscreteColorLegend, {\n    colors: colors,\n    items: filteredItems,\n    onItemClick: onItemClick,\n    orientation: orientation\n  })));\n}\n\nSearchableDiscreteColorLegend.defaultProps = defaultProps;\nSearchableDiscreteColorLegend.displayName = 'SearchableDiscreteColorLegend';\nexport default SearchableDiscreteColorLegend;","import \"core-js/modules/es.array.reduce.js\";\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\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\n  return obj;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React, { Component } from 'react';\nimport { scaleLinear } from 'd3-scale';\nimport { format } from 'd3-format';\nimport { AnimationPropType } from '../animation';\nimport XYPlot from '../plot/xy-plot';\nimport { DISCRETE_COLOR_RANGE } from '../theme';\nimport { MarginPropType, getInnerDimensions, DEFAULT_MARGINS } from '../utils/chart-utils';\nimport LineSeries from '../plot/series/line-series';\nimport LineMarkSeries from '../plot/series/line-mark-series';\nimport LabelSeries from '../plot/series/label-series';\nimport DecorativeAxis from '../plot/axis/decorative-axis';\nimport Highlight from '../plot/highlight';\nvar predefinedClassName = 'rv-parallel-coordinates-chart';\nvar DEFAULT_FORMAT = format('.2r');\n/**\n * Generate axes for each of the domains\n * @param {Object} props\n - props.animation {Boolean}\n - props.domains {Array} array of object specifying the way each axis is to be plotted\n - props.style {object} style object for the whole chart\n - props.tickFormat {Function} formatting function for axes\n * @return {Array} the plotted axis components\n */\n\nfunction getAxes(props) {\n  var animation = props.animation,\n      domains = props.domains,\n      style = props.style,\n      tickFormat = props.tickFormat;\n  return domains.map(function (domain, index) {\n    var sortedDomain = domain.domain;\n\n    var domainTickFormat = function domainTickFormat(t) {\n      return domain.tickFormat ? domain.tickFormat(t) : tickFormat(t);\n    };\n\n    return React.createElement(DecorativeAxis, {\n      animation: animation,\n      key: index + '-axis',\n      axisStart: {\n        x: domain.name,\n        y: 0\n      },\n      axisEnd: {\n        x: domain.name,\n        y: 1\n      },\n      axisDomain: sortedDomain,\n      numberOfTicks: 5,\n      tickValue: domainTickFormat,\n      style: style.axes\n    });\n  });\n}\n/**\n * Generate labels for the ends of the axes\n * @param {Object} props\n - props.domains {Array} array of object specifying the way each axis is to be plotted\n - props.style {object} style object for just the labels\n * @return {Array} the prepped data for the labelSeries\n */\n\n\nfunction getLabels(props) {\n  var domains = props.domains,\n      style = props.style;\n  return domains.map(function (domain, index) {\n    return {\n      x: domain.name,\n      y: 1.1,\n      label: domain.name,\n      style: style\n    };\n  });\n}\n/**\n * Generate the actual lines to be plotted\n * @param {Object} props\n - props.animation {Boolean}\n - props.data {Array} array of object specifying what values are to be plotted\n - props.domains {Array} array of object specifying the way each axis is to be plotted\n - props.style {object} style object for the whole chart\n - props.showMarks {Bool} whether or not to use the line mark series\n * @return {Array} the plotted axis components\n */\n\n\nfunction getLines(props) {\n  var animation = props.animation,\n      brushFilters = props.brushFilters,\n      colorRange = props.colorRange,\n      domains = props.domains,\n      data = props.data,\n      style = props.style,\n      showMarks = props.showMarks;\n  var scales = domains.reduce(function (acc, _ref) {\n    var domain = _ref.domain,\n        name = _ref.name;\n    acc[name] = scaleLinear().domain(domain).range([0, 1]);\n    return acc;\n  }, {}); // const\n\n  return data.map(function (row, rowIndex) {\n    var withinFilteredRange = true;\n    var mappedData = domains.map(function (domain, index) {\n      var getValue = domain.getValue,\n          name = domain.name; // watch out! Gotcha afoot\n      // yVal after being scale is in [0, 1] range\n\n      var yVal = scales[name](getValue ? getValue(row) : row[name]);\n      var filter = brushFilters[name]; // filter value after being scale back from pixel space is also in [0, 1]\n\n      if (filter && (yVal < filter.min || yVal > filter.max)) {\n        withinFilteredRange = false;\n      }\n\n      return {\n        x: name,\n        y: yVal\n      };\n    });\n    var selectedName = predefinedClassName + '-line';\n    var unselectedName = selectedName + ' ' + predefinedClassName + '-line-unselected';\n    var lineProps = {\n      animation: animation,\n      className: withinFilteredRange ? selectedName : unselectedName,\n      key: rowIndex + '-polygon',\n      data: mappedData,\n      color: row.color || colorRange[rowIndex % colorRange.length],\n      style: _extends({}, style.lines, row.style || {})\n    };\n\n    if (!withinFilteredRange) {\n      lineProps.style = _extends({}, lineProps.style, style.deselectedLineStyle);\n    }\n\n    return showMarks ? React.createElement(LineMarkSeries, lineProps) : React.createElement(LineSeries, lineProps);\n  });\n}\n\nvar ParallelCoordinates = function (_Component) {\n  _inherits(ParallelCoordinates, _Component);\n\n  function ParallelCoordinates() {\n    var _ref2;\n\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, ParallelCoordinates);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref2 = ParallelCoordinates.__proto__ || Object.getPrototypeOf(ParallelCoordinates)).call.apply(_ref2, [this].concat(args))), _this), _this.state = {\n      brushFilters: {}\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  _createClass(ParallelCoordinates, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var brushFilters = this.state.brushFilters;\n      var _props = this.props,\n          animation = _props.animation,\n          brushing = _props.brushing,\n          className = _props.className,\n          children = _props.children,\n          colorRange = _props.colorRange,\n          data = _props.data,\n          domains = _props.domains,\n          height = _props.height,\n          hideInnerMostValues = _props.hideInnerMostValues,\n          margin = _props.margin,\n          onMouseLeave = _props.onMouseLeave,\n          onMouseEnter = _props.onMouseEnter,\n          showMarks = _props.showMarks,\n          style = _props.style,\n          tickFormat = _props.tickFormat,\n          width = _props.width;\n      var axes = getAxes({\n        domains: domains,\n        animation: animation,\n        hideInnerMostValues: hideInnerMostValues,\n        style: style,\n        tickFormat: tickFormat\n      });\n      var lines = getLines({\n        animation: animation,\n        brushFilters: brushFilters,\n        colorRange: colorRange,\n        domains: domains,\n        data: data,\n        showMarks: showMarks,\n        style: style\n      });\n      var labelSeries = React.createElement(LabelSeries, {\n        animation: true,\n        key: className,\n        className: predefinedClassName + '-label',\n        data: getLabels({\n          domains: domains,\n          style: style.labels\n        })\n      });\n\n      var _getInnerDimensions = getInnerDimensions(this.props, DEFAULT_MARGINS),\n          marginLeft = _getInnerDimensions.marginLeft,\n          marginRight = _getInnerDimensions.marginRight;\n\n      return React.createElement(XYPlot, {\n        height: height,\n        width: width,\n        margin: margin,\n        dontCheckIfEmpty: true,\n        className: className + ' ' + predefinedClassName,\n        onMouseLeave: onMouseLeave,\n        onMouseEnter: onMouseEnter,\n        xType: 'ordinal',\n        yDomain: [0, 1]\n      }, children, axes.concat(lines).concat(labelSeries), brushing && domains.map(function (d) {\n        var trigger = function trigger(row) {\n          _this2.setState({\n            brushFilters: _extends({}, brushFilters, _defineProperty({}, d.name, row ? {\n              min: row.bottom,\n              max: row.top\n            } : null))\n          });\n        };\n\n        return React.createElement(Highlight, {\n          key: d.name,\n          drag: true,\n          highlightX: d.name,\n          onBrushEnd: trigger,\n          onDragEnd: trigger,\n          highlightWidth: (width - marginLeft - marginRight) / domains.length,\n          enableX: false\n        });\n      }));\n    }\n  }]);\n\n  return ParallelCoordinates;\n}(Component);\n\nParallelCoordinates.displayName = 'ParallelCoordinates';\nParallelCoordinates.defaultProps = {\n  className: '',\n  colorType: 'category',\n  colorRange: DISCRETE_COLOR_RANGE,\n  style: {\n    axes: {\n      line: {},\n      ticks: {},\n      text: {}\n    },\n    labels: {\n      fontSize: 10,\n      textAnchor: 'middle'\n    },\n    lines: {\n      strokeWidth: 1,\n      strokeOpacity: 1\n    },\n    deselectedLineStyle: {\n      strokeOpacity: 0.1\n    }\n  },\n  tickFormat: DEFAULT_FORMAT\n};\nexport default ParallelCoordinates;","import \"core-js/modules/es.array.reduce.js\";\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n}; // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport { scaleLinear } from 'd3-scale';\nimport { format } from 'd3-format';\nimport { AnimationPropType } from '../animation';\nimport XYPlot from '../plot/xy-plot';\nimport { DISCRETE_COLOR_RANGE } from '../theme';\nimport { MarginPropType } from '../utils/chart-utils';\nimport MarkSeries from '../plot/series/mark-series';\nimport PolygonSeries from '../plot/series/polygon-series';\nimport LabelSeries from '../plot/series/label-series';\nimport DecorativeAxis from '../plot/axis/decorative-axis';\nvar predefinedClassName = 'rv-radar-chart';\nvar DEFAULT_FORMAT = format('.2r');\n/**\n * Generate axes for each of the domains\n * @param {Object} props\n - props.animation {Boolean}\n - props.domains {Array} array of object specifying the way each axis is to be plotted\n - props.style {object} style object for the whole chart\n - props.tickFormat {Function} formatting function for axes\n - props.startingAngle {number} the initial angle offset\n * @return {Array} the plotted axis components\n */\n\nfunction getAxes(props) {\n  var animation = props.animation,\n      domains = props.domains,\n      startingAngle = props.startingAngle,\n      style = props.style,\n      tickFormat = props.tickFormat,\n      hideInnerMostValues = props.hideInnerMostValues;\n  return domains.map(function (domain, index) {\n    var angle = index / domains.length * Math.PI * 2 + startingAngle;\n    var sortedDomain = domain.domain;\n\n    var domainTickFormat = function domainTickFormat(t) {\n      if (hideInnerMostValues && t === sortedDomain[0]) {\n        return '';\n      }\n\n      return domain.tickFormat ? domain.tickFormat(t) : tickFormat(t);\n    };\n\n    return React.createElement(DecorativeAxis, {\n      animation: animation,\n      key: index + '-axis',\n      axisStart: {\n        x: 0,\n        y: 0\n      },\n      axisEnd: {\n        x: getCoordinate(Math.cos(angle)),\n        y: getCoordinate(Math.sin(angle))\n      },\n      axisDomain: sortedDomain,\n      numberOfTicks: 5,\n      tickValue: domainTickFormat,\n      style: style.axes\n    });\n  });\n}\n/**\n * Generate x or y coordinate for axisEnd\n * @param {Number} axisEndPoint\n - epsilon is an arbitrarily chosen small number to approximate axisEndPoints\n - to true values resulting from trigonometry functions (sin, cos) on angles\n * @return {Number} the x or y coordinate accounting for exact trig values\n */\n\n\nfunction getCoordinate(axisEndPoint) {\n  var epsilon = 10e-13;\n\n  if (Math.abs(axisEndPoint) <= epsilon) {\n    axisEndPoint = 0;\n  } else if (axisEndPoint > 0) {\n    if (Math.abs(axisEndPoint - 0.5) <= epsilon) {\n      axisEndPoint = 0.5;\n    }\n  } else if (axisEndPoint < 0) {\n    if (Math.abs(axisEndPoint + 0.5) <= epsilon) {\n      axisEndPoint = -0.5;\n    }\n  }\n\n  return axisEndPoint;\n}\n/**\n * Generate labels for the ends of the axes\n * @param {Object} props\n - props.domains {Array} array of object specifying the way each axis is to be plotted\n  - props.startingAngle {number} the initial angle offset\n - props.style {object} style object for just the labels\n * @return {Array} the prepped data for the labelSeries\n */\n\n\nfunction getLabels(props) {\n  var domains = props.domains,\n      startingAngle = props.startingAngle,\n      style = props.style;\n  return domains.map(function (_ref, index) {\n    var name = _ref.name;\n    var angle = index / domains.length * Math.PI * 2 + startingAngle;\n    var radius = 1.2;\n    return {\n      x: radius * Math.cos(angle),\n      y: radius * Math.sin(angle),\n      label: name,\n      style: style\n    };\n  });\n}\n/**\n * Generate the actual polygons to be plotted\n * @param {Object} props\n - props.animation {Boolean}\n - props.data {Array} array of object specifying what values are to be plotted\n - props.domains {Array} array of object specifying the way each axis is to be plotted\n - props.startingAngle {number} the initial angle offset\n - props.style {object} style object for the whole chart\n * @return {Array} the plotted axis components\n */\n\n\nfunction getPolygons(props) {\n  var animation = props.animation,\n      colorRange = props.colorRange,\n      domains = props.domains,\n      data = props.data,\n      style = props.style,\n      startingAngle = props.startingAngle,\n      onSeriesMouseOver = props.onSeriesMouseOver,\n      onSeriesMouseOut = props.onSeriesMouseOut;\n  var scales = domains.reduce(function (acc, _ref2) {\n    var domain = _ref2.domain,\n        name = _ref2.name;\n    acc[name] = scaleLinear().domain(domain).range([0, 1]);\n    return acc;\n  }, {});\n  return data.map(function (row, rowIndex) {\n    var mappedData = domains.map(function (_ref3, index) {\n      var name = _ref3.name,\n          getValue = _ref3.getValue;\n      var dataPoint = getValue ? getValue(row) : row[name]; // error handling if point doesn't exist\n\n      var angle = index / domains.length * Math.PI * 2 + startingAngle; // dont let the radius become negative\n\n      var radius = Math.max(scales[name](dataPoint), 0);\n      return {\n        x: radius * Math.cos(angle),\n        y: radius * Math.sin(angle),\n        name: row.name\n      };\n    });\n    return React.createElement(PolygonSeries, {\n      animation: animation,\n      className: predefinedClassName + '-polygon',\n      key: rowIndex + '-polygon',\n      data: mappedData,\n      style: _extends({\n        stroke: row.color || row.stroke || colorRange[rowIndex % colorRange.length],\n        fill: row.color || row.fill || colorRange[rowIndex % colorRange.length]\n      }, style.polygons),\n      onSeriesMouseOver: onSeriesMouseOver,\n      onSeriesMouseOut: onSeriesMouseOut\n    });\n  });\n}\n/**\n * Generate circles at the polygon points for Hover functionality\n * @param {Object} props\n - props.animation {Boolean}\n - props.data {Array} array of object specifying what values are to be plotted\n - props.domains {Array} array of object specifying the way each axis is to be plotted\n - props.startingAngle {number} the initial angle offset\n - props.style {object} style object for the whole chart\n - props.onValueMouseOver {function} function to call on mouse over a polygon point\n - props.onValueMouseOver {function} function to call when mouse leaves a polygon point\n * @return {Array} the plotted axis components\n */\n\n\nfunction getPolygonPoints(props) {\n  var animation = props.animation,\n      domains = props.domains,\n      data = props.data,\n      startingAngle = props.startingAngle,\n      style = props.style,\n      onValueMouseOver = props.onValueMouseOver,\n      onValueMouseOut = props.onValueMouseOut;\n\n  if (!onValueMouseOver) {\n    return;\n  }\n\n  var scales = domains.reduce(function (acc, _ref4) {\n    var domain = _ref4.domain,\n        name = _ref4.name;\n    acc[name] = scaleLinear().domain(domain).range([0, 1]);\n    return acc;\n  }, {});\n  return data.map(function (row, rowIndex) {\n    var mappedData = domains.map(function (_ref5, index) {\n      var name = _ref5.name,\n          getValue = _ref5.getValue;\n      var dataPoint = getValue ? getValue(row) : row[name]; // error handling if point doesn't exist\n\n      var angle = index / domains.length * Math.PI * 2 + startingAngle; // dont let the radius become negative\n\n      var radius = Math.max(scales[name](dataPoint), 0);\n      return {\n        x: radius * Math.cos(angle),\n        y: radius * Math.sin(angle),\n        domain: name,\n        value: dataPoint,\n        dataName: row.name\n      };\n    });\n    return React.createElement(MarkSeries, {\n      animation: animation,\n      className: predefinedClassName + '-polygonPoint',\n      key: rowIndex + '-polygonPoint',\n      data: mappedData,\n      size: 10,\n      style: _extends({}, style.polygons, {\n        fill: 'transparent',\n        stroke: 'transparent'\n      }),\n      onValueMouseOver: onValueMouseOver,\n      onValueMouseOut: onValueMouseOut\n    });\n  });\n}\n\nfunction RadarChart(props) {\n  var animation = props.animation,\n      className = props.className,\n      children = props.children,\n      colorRange = props.colorRange,\n      data = props.data,\n      domains = props.domains,\n      height = props.height,\n      hideInnerMostValues = props.hideInnerMostValues,\n      margin = props.margin,\n      onMouseLeave = props.onMouseLeave,\n      onMouseEnter = props.onMouseEnter,\n      startingAngle = props.startingAngle,\n      style = props.style,\n      tickFormat = props.tickFormat,\n      width = props.width,\n      renderAxesOverPolygons = props.renderAxesOverPolygons,\n      onValueMouseOver = props.onValueMouseOver,\n      onValueMouseOut = props.onValueMouseOut,\n      onSeriesMouseOver = props.onSeriesMouseOver,\n      onSeriesMouseOut = props.onSeriesMouseOut;\n  var axes = getAxes({\n    domains: domains,\n    animation: animation,\n    hideInnerMostValues: hideInnerMostValues,\n    startingAngle: startingAngle,\n    style: style,\n    tickFormat: tickFormat\n  });\n  var polygons = getPolygons({\n    animation: animation,\n    colorRange: colorRange,\n    domains: domains,\n    data: data,\n    startingAngle: startingAngle,\n    style: style,\n    onSeriesMouseOver: onSeriesMouseOver,\n    onSeriesMouseOut: onSeriesMouseOut\n  });\n  var polygonPoints = getPolygonPoints({\n    animation: animation,\n    colorRange: colorRange,\n    domains: domains,\n    data: data,\n    startingAngle: startingAngle,\n    style: style,\n    onValueMouseOver: onValueMouseOver,\n    onValueMouseOut: onValueMouseOut\n  });\n  var labelSeries = React.createElement(LabelSeries, {\n    animation: animation,\n    key: className,\n    className: predefinedClassName + '-label',\n    data: getLabels({\n      domains: domains,\n      style: style.labels,\n      startingAngle: startingAngle\n    })\n  });\n  return React.createElement(XYPlot, {\n    height: height,\n    width: width,\n    margin: margin,\n    dontCheckIfEmpty: true,\n    className: className + ' ' + predefinedClassName,\n    onMouseLeave: onMouseLeave,\n    onMouseEnter: onMouseEnter,\n    xDomain: [-1, 1],\n    yDomain: [-1, 1]\n  }, children, !renderAxesOverPolygons && axes.concat(polygons).concat(labelSeries).concat(polygonPoints), renderAxesOverPolygons && polygons.concat(labelSeries).concat(axes).concat(polygonPoints));\n}\n\nRadarChart.displayName = 'RadarChart';\nRadarChart.defaultProps = {\n  className: '',\n  colorType: 'category',\n  colorRange: DISCRETE_COLOR_RANGE,\n  hideInnerMostValues: true,\n  startingAngle: Math.PI / 2,\n  style: {\n    axes: {\n      line: {},\n      ticks: {},\n      text: {}\n    },\n    labels: {\n      fontSize: 10,\n      textAnchor: 'middle'\n    },\n    polygons: {\n      strokeWidth: 0.5,\n      strokeOpacity: 1,\n      fillOpacity: 0.1\n    }\n  },\n  tickFormat: DEFAULT_FORMAT,\n  renderAxesOverPolygons: false\n};\nexport default RadarChart;","import \"core-js/modules/es.array.reduce.js\";\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n}; // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport { pie as pieBuilder } from 'd3-shape';\nimport { AnimationPropType } from '../animation';\nimport ArcSeries from '../plot/series/arc-series';\nimport LabelSeries from '../plot/series/label-series';\nimport XYPlot from '../plot/xy-plot';\nimport { DISCRETE_COLOR_RANGE } from '../theme';\nimport { MarginPropType, getRadialLayoutMargin } from '../utils/chart-utils';\nimport { getRadialDomain } from '../utils/series-utils';\nvar predefinedClassName = 'rv-radial-chart';\nvar DEFAULT_RADIUS_MARGIN = 15;\n/**\n * Create the list of wedges to render.\n * @param {Object} props\n   props.data {Object} - tree structured data (each node has a name anc an array of children)\n * @returns {Array} Array of nodes.\n */\n\nfunction getWedgesToRender(_ref) {\n  var data = _ref.data,\n      getAngle = _ref.getAngle;\n  var pie = pieBuilder().sort(null).value(getAngle);\n  var pieData = pie(data).reverse();\n  return pieData.map(function (row, index) {\n    return _extends({}, row.data, {\n      angle0: row.startAngle,\n      angle: row.endAngle,\n      radius0: row.data.innerRadius || 0,\n      radius: row.data.radius || 1,\n      color: row.data.color || index\n    });\n  });\n}\n\nfunction generateLabels(mappedData, accessors) {\n  var labelsRadiusMultiplier = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1.1;\n  var getLabel = accessors.getLabel,\n      getSubLabel = accessors.getSubLabel;\n  return mappedData.reduce(function (res, row) {\n    var angle = row.angle,\n        angle0 = row.angle0,\n        radius = row.radius;\n    var centeredAngle = (angle + angle0) / 2; // unfortunate, but true fact: d3 starts its radians at 12 oclock rather than 3\n    // and move clockwise rather than counter clockwise. why why why!\n\n    var updatedAngle = -1 * centeredAngle + Math.PI / 2;\n    var newLabels = [];\n\n    if (getLabel(row)) {\n      newLabels.push({\n        angle: updatedAngle,\n        radius: radius * labelsRadiusMultiplier,\n        label: getLabel(row)\n      });\n    }\n\n    if (getSubLabel(row)) {\n      newLabels.push({\n        angle: updatedAngle,\n        radius: radius * labelsRadiusMultiplier,\n        label: getSubLabel(row),\n        style: {\n          fontSize: 10\n        },\n        yOffset: 12\n      });\n    }\n\n    return res.concat(newLabels);\n  }, []); // could add force direction here to make sure the labels dont overlap\n}\n/**\n * Get the max radius so the chart can extend to the margin.\n * @param  {Number} width - container width\n * @param  {Number} height - container height\n * @return {Number} radius\n */\n\n\nfunction getMaxRadius(width, height) {\n  return Math.min(width, height) / 2 - DEFAULT_RADIUS_MARGIN;\n}\n\nfunction RadialChart(props) {\n  var animation = props.animation,\n      className = props.className,\n      children = props.children,\n      colorType = props.colorType,\n      data = props.data,\n      getAngle = props.getAngle,\n      getLabel = props.getLabel,\n      getSubLabel = props.getSubLabel,\n      height = props.height,\n      hideRootNode = props.hideRootNode,\n      innerRadius = props.innerRadius,\n      labelsAboveChildren = props.labelsAboveChildren,\n      labelsRadiusMultiplier = props.labelsRadiusMultiplier,\n      labelsStyle = props.labelsStyle,\n      margin = props.margin,\n      onMouseLeave = props.onMouseLeave,\n      onMouseEnter = props.onMouseEnter,\n      radius = props.radius,\n      showLabels = props.showLabels,\n      style = props.style,\n      width = props.width;\n  var mappedData = getWedgesToRender({\n    data: data,\n    height: height,\n    hideRootNode: hideRootNode,\n    width: width,\n    getAngle: getAngle\n  });\n  var radialDomain = getRadialDomain(mappedData);\n\n  var arcProps = _extends({\n    colorType: colorType\n  }, props, {\n    animation: animation,\n    radiusDomain: [0, radialDomain],\n    data: mappedData,\n    radiusNoFallBack: true,\n    style: style,\n    arcClassName: 'rv-radial-chart__series--pie__slice'\n  });\n\n  if (radius) {\n    arcProps.radiusDomain = [0, 1];\n    arcProps.radiusRange = [innerRadius || 0, radius];\n    arcProps.radiusType = 'linear';\n  }\n\n  var maxRadius = radius ? radius : getMaxRadius(width, height);\n  var defaultMargin = getRadialLayoutMargin(width, height, maxRadius);\n  var labels = generateLabels(mappedData, {\n    getLabel: getLabel,\n    getSubLabel: getSubLabel\n  }, labelsRadiusMultiplier);\n  return React.createElement(XYPlot, {\n    height: height,\n    width: width,\n    margin: _extends({}, margin, defaultMargin),\n    className: className + ' ' + predefinedClassName,\n    onMouseLeave: onMouseLeave,\n    onMouseEnter: onMouseEnter,\n    xDomain: [-radialDomain, radialDomain],\n    yDomain: [-radialDomain, radialDomain]\n  }, React.createElement(ArcSeries, _extends({}, arcProps, {\n    getAngle: function getAngle(d) {\n      return d.angle;\n    }\n  })), showLabels && !labelsAboveChildren && React.createElement(LabelSeries, {\n    data: labels,\n    style: labelsStyle\n  }), children, showLabels && labelsAboveChildren && React.createElement(LabelSeries, {\n    data: labels,\n    style: labelsStyle\n  }));\n}\n\nRadialChart.displayName = 'RadialChart';\nRadialChart.defaultProps = {\n  className: '',\n  colorType: 'category',\n  colorRange: DISCRETE_COLOR_RANGE,\n  padAngle: 0,\n  getAngle: function getAngle(d) {\n    return d.angle;\n  },\n  getAngle0: function getAngle0(d) {\n    return d.angle0;\n  },\n  getRadius: function getRadius(d) {\n    return d.radius;\n  },\n  getRadius0: function getRadius0(d) {\n    return d.radius0;\n  },\n  getLabel: function getLabel(d) {\n    return d.label;\n  },\n  getSubLabel: function getSubLabel(d) {\n    return d.subLabel;\n  }\n};\nexport default RadialChart;","import { min } from \"d3-array\";\n\nfunction targetDepth(d) {\n  return d.target.depth;\n}\n\nexport function left(node) {\n  return node.depth;\n}\nexport function right(node, n) {\n  return n - 1 - node.height;\n}\nexport function justify(node, n) {\n  return node.sourceLinks.length ? node.depth : n - 1;\n}\nexport function center(node) {\n  return node.targetLinks.length ? node.depth : node.sourceLinks.length ? min(node.sourceLinks, targetDepth) - 1 : 0;\n}","export default function constant(x) {\n  return function () {\n    return x;\n  };\n}","import { ascending, min, sum } from \"d3-array\";\nimport { map, nest } from \"d3-collection\";\nimport { justify } from \"./align\";\nimport constant from \"./constant\";\n\nfunction ascendingSourceBreadth(a, b) {\n  return ascendingBreadth(a.source, b.source) || a.index - b.index;\n}\n\nfunction ascendingTargetBreadth(a, b) {\n  return ascendingBreadth(a.target, b.target) || a.index - b.index;\n}\n\nfunction ascendingBreadth(a, b) {\n  return a.y0 - b.y0;\n}\n\nfunction value(d) {\n  return d.value;\n}\n\nfunction nodeCenter(node) {\n  return (node.y0 + node.y1) / 2;\n}\n\nfunction weightedSource(link) {\n  return nodeCenter(link.source) * link.value;\n}\n\nfunction weightedTarget(link) {\n  return nodeCenter(link.target) * link.value;\n}\n\nfunction defaultId(d) {\n  return d.index;\n}\n\nfunction defaultNodes(graph) {\n  return graph.nodes;\n}\n\nfunction defaultLinks(graph) {\n  return graph.links;\n}\n\nfunction find(nodeById, id) {\n  var node = nodeById.get(id);\n  if (!node) throw new Error(\"missing: \" + id);\n  return node;\n}\n\nexport default function () {\n  var x0 = 0,\n      y0 = 0,\n      x1 = 1,\n      y1 = 1,\n      // extent\n  dx = 24,\n      // nodeWidth\n  py = 8,\n      // nodePadding\n  id = defaultId,\n      align = justify,\n      nodes = defaultNodes,\n      links = defaultLinks,\n      iterations = 32;\n\n  function sankey() {\n    var graph = {\n      nodes: nodes.apply(null, arguments),\n      links: links.apply(null, arguments)\n    };\n    computeNodeLinks(graph);\n    computeNodeValues(graph);\n    computeNodeDepths(graph);\n    computeNodeBreadths(graph, iterations);\n    computeLinkBreadths(graph);\n    return graph;\n  }\n\n  sankey.update = function (graph) {\n    computeLinkBreadths(graph);\n    return graph;\n  };\n\n  sankey.nodeId = function (_) {\n    return arguments.length ? (id = typeof _ === \"function\" ? _ : constant(_), sankey) : id;\n  };\n\n  sankey.nodeAlign = function (_) {\n    return arguments.length ? (align = typeof _ === \"function\" ? _ : constant(_), sankey) : align;\n  };\n\n  sankey.nodeWidth = function (_) {\n    return arguments.length ? (dx = +_, sankey) : dx;\n  };\n\n  sankey.nodePadding = function (_) {\n    return arguments.length ? (py = +_, sankey) : py;\n  };\n\n  sankey.nodes = function (_) {\n    return arguments.length ? (nodes = typeof _ === \"function\" ? _ : constant(_), sankey) : nodes;\n  };\n\n  sankey.links = function (_) {\n    return arguments.length ? (links = typeof _ === \"function\" ? _ : constant(_), sankey) : links;\n  };\n\n  sankey.size = function (_) {\n    return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0];\n  };\n\n  sankey.extent = function (_) {\n    return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]];\n  };\n\n  sankey.iterations = function (_) {\n    return arguments.length ? (iterations = +_, sankey) : iterations;\n  }; // Populate the sourceLinks and targetLinks for each node.\n  // Also, if the source and target are not objects, assume they are indices.\n\n\n  function computeNodeLinks(graph) {\n    graph.nodes.forEach(function (node, i) {\n      node.index = i;\n      node.sourceLinks = [];\n      node.targetLinks = [];\n    });\n    var nodeById = map(graph.nodes, id);\n    graph.links.forEach(function (link, i) {\n      link.index = i;\n      var source = link.source,\n          target = link.target;\n      if (typeof source !== \"object\") source = link.source = find(nodeById, source);\n      if (typeof target !== \"object\") target = link.target = find(nodeById, target);\n      source.sourceLinks.push(link);\n      target.targetLinks.push(link);\n    });\n  } // Compute the value (size) of each node by summing the associated links.\n\n\n  function computeNodeValues(graph) {\n    graph.nodes.forEach(function (node) {\n      node.value = Math.max(sum(node.sourceLinks, value), sum(node.targetLinks, value));\n    });\n  } // Iteratively assign the depth (x-position) for each node.\n  // Nodes are assigned the maximum depth of incoming neighbors plus one;\n  // nodes with no incoming links are assigned depth zero, while\n  // nodes with no outgoing links are assigned the maximum depth.\n\n\n  function computeNodeDepths(graph) {\n    var nodes, next, x;\n\n    for (nodes = graph.nodes, next = [], x = 0; nodes.length; ++x, nodes = next, next = []) {\n      nodes.forEach(function (node) {\n        node.depth = x;\n        node.sourceLinks.forEach(function (link) {\n          if (next.indexOf(link.target) < 0) {\n            next.push(link.target);\n          }\n        });\n      });\n    }\n\n    for (nodes = graph.nodes, next = [], x = 0; nodes.length; ++x, nodes = next, next = []) {\n      nodes.forEach(function (node) {\n        node.height = x;\n        node.targetLinks.forEach(function (link) {\n          if (next.indexOf(link.source) < 0) {\n            next.push(link.source);\n          }\n        });\n      });\n    }\n\n    var kx = (x1 - x0 - dx) / (x - 1);\n    graph.nodes.forEach(function (node) {\n      node.x1 = (node.x0 = x0 + Math.max(0, Math.min(x - 1, Math.floor(align.call(null, node, x)))) * kx) + dx;\n    });\n  }\n\n  function computeNodeBreadths(graph) {\n    var columns = nest().key(function (d) {\n      return d.x0;\n    }).sortKeys(ascending).entries(graph.nodes).map(function (d) {\n      return d.values;\n    }); //\n\n    initializeNodeBreadth();\n    resolveCollisions();\n\n    for (var alpha = 1, n = iterations; n > 0; --n) {\n      relaxRightToLeft(alpha *= 0.99);\n      resolveCollisions();\n      relaxLeftToRight(alpha);\n      resolveCollisions();\n    }\n\n    function initializeNodeBreadth() {\n      var ky = min(columns, function (nodes) {\n        return (y1 - y0 - (nodes.length - 1) * py) / sum(nodes, value);\n      });\n      columns.forEach(function (nodes) {\n        nodes.forEach(function (node, i) {\n          node.y1 = (node.y0 = i) + node.value * ky;\n        });\n      });\n      graph.links.forEach(function (link) {\n        link.width = link.value * ky;\n      });\n    }\n\n    function relaxLeftToRight(alpha) {\n      columns.forEach(function (nodes) {\n        nodes.forEach(function (node) {\n          if (node.targetLinks.length) {\n            var dy = (sum(node.targetLinks, weightedSource) / sum(node.targetLinks, value) - nodeCenter(node)) * alpha;\n            node.y0 += dy, node.y1 += dy;\n          }\n        });\n      });\n    }\n\n    function relaxRightToLeft(alpha) {\n      columns.slice().reverse().forEach(function (nodes) {\n        nodes.forEach(function (node) {\n          if (node.sourceLinks.length) {\n            var dy = (sum(node.sourceLinks, weightedTarget) / sum(node.sourceLinks, value) - nodeCenter(node)) * alpha;\n            node.y0 += dy, node.y1 += dy;\n          }\n        });\n      });\n    }\n\n    function resolveCollisions() {\n      columns.forEach(function (nodes) {\n        var node,\n            dy,\n            y = y0,\n            n = nodes.length,\n            i; // Push any overlapping nodes down.\n\n        nodes.sort(ascendingBreadth);\n\n        for (i = 0; i < n; ++i) {\n          node = nodes[i];\n          dy = y - node.y0;\n          if (dy > 0) node.y0 += dy, node.y1 += dy;\n          y = node.y1 + py;\n        } // If the bottommost node goes outside the bounds, push it back up.\n\n\n        dy = y - py - y1;\n\n        if (dy > 0) {\n          y = node.y0 -= dy, node.y1 -= dy; // Push any overlapping nodes back up.\n\n          for (i = n - 2; i >= 0; --i) {\n            node = nodes[i];\n            dy = node.y1 + py - y;\n            if (dy > 0) node.y0 -= dy, node.y1 -= dy;\n            y = node.y0;\n          }\n        }\n      });\n    }\n  }\n\n  function computeLinkBreadths(graph) {\n    graph.nodes.forEach(function (node) {\n      node.sourceLinks.sort(ascendingTargetBreadth);\n      node.targetLinks.sort(ascendingSourceBreadth);\n    });\n    graph.nodes.forEach(function (node) {\n      var y0 = node.y0,\n          y1 = y0;\n      node.sourceLinks.forEach(function (link) {\n        link.y0 = y0 + link.width / 2, y0 += link.width;\n      });\n      node.targetLinks.forEach(function (link) {\n        link.y1 = y1 + link.width / 2, y1 += link.width;\n      });\n    });\n  }\n\n  return sankey;\n}","import { linkHorizontal } from \"d3-shape\";\n\nfunction horizontalSource(d) {\n  return [d.source.x1, d.y0];\n}\n\nfunction horizontalTarget(d) {\n  return [d.target.x0, d.y1];\n}\n\nexport default function () {\n  return linkHorizontal().source(horizontalSource).target(horizontalTarget);\n}","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n}; // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport { DISCRETE_COLOR_RANGE } from '../theme';\nimport Animation from '../animation';\nimport { ANIMATED_SERIES_PROPS } from '../utils/series-utils';\nvar DEFAULT_LINK_COLOR = DISCRETE_COLOR_RANGE[1];\nvar DEFAULT_LINK_OPACITY = 0.7;\n\nfunction SankeyLink(props) {\n  var animation = props.animation,\n      data = props.data,\n      node = props.node,\n      opacity = props.opacity,\n      color = props.color,\n      strokeWidth = props.strokeWidth,\n      style = props.style,\n      onLinkClick = props.onLinkClick,\n      onLinkMouseOver = props.onLinkMouseOver,\n      onLinkMouseOut = props.onLinkMouseOut;\n\n  if (animation) {\n    return React.createElement(Animation, _extends({}, props, {\n      animatedProps: ANIMATED_SERIES_PROPS\n    }), React.createElement(SankeyLink, _extends({}, props, {\n      animation: null\n    })));\n  }\n\n  return React.createElement('path', _extends({\n    d: data\n  }, style, {\n    className: 'rv-sankey__link',\n    opacity: Number.isFinite(opacity) ? opacity : DEFAULT_LINK_OPACITY,\n    stroke: color || DEFAULT_LINK_COLOR,\n    onClick: function onClick(e) {\n      return onLinkClick(node, e);\n    },\n    onMouseOver: function onMouseOver(e) {\n      return onLinkMouseOver(node, e);\n    },\n    onMouseOut: function onMouseOut(e) {\n      return onLinkMouseOut(node, e);\n    },\n    strokeWidth: strokeWidth,\n    fill: 'none'\n  }));\n}\n\nSankeyLink.displayName = 'SankeyLink';\nSankeyLink.requiresSVG = true;\nexport default SankeyLink;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nfunction _toConsumableArray(arr) {\n  if (Array.isArray(arr)) {\n    for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n      arr2[i] = arr[i];\n    }\n\n    return arr2;\n  } else {\n    return Array.from(arr);\n  }\n}\n\nimport React from 'react';\nimport { sankey, sankeyLinkHorizontal, sankeyLeft, sankeyRight, sankeyCenter, sankeyJustify } from 'd3-sankey';\nimport XYPlot from '../plot/xy-plot';\nimport { MarginPropType, getInnerDimensions } from '../utils/chart-utils';\nimport VerticalRectSeries from '../plot/series/vertical-rect-series';\nimport LabelSeries from '../plot/series/label-series';\nimport Voronoi from '../plot/voronoi';\nimport { DISCRETE_COLOR_RANGE } from '../theme';\nimport SankeyLink from './sankey-link';\n\nvar NOOP = function NOOP(f) {\n  return f;\n};\n\nvar ALIGNMENTS = {\n  justify: sankeyJustify,\n  center: sankeyCenter,\n  left: sankeyLeft,\n  right: sankeyRight\n};\nvar DEFAULT_MARGINS = {\n  top: 20,\n  left: 20,\n  right: 20,\n  bottom: 20\n};\n\nfunction Sankey(props) {\n  var align = props.align,\n      animation = props.animation,\n      children = props.children,\n      className = props.className,\n      hasVoronoi = props.hasVoronoi,\n      height = props.height,\n      hideLabels = props.hideLabels,\n      labelRotation = props.labelRotation,\n      layout = props.layout,\n      links = props.links,\n      linkOpacity = props.linkOpacity,\n      margin = props.margin,\n      nodePadding = props.nodePadding,\n      nodes = props.nodes,\n      nodeWidth = props.nodeWidth,\n      onValueClick = props.onValueClick,\n      onValueMouseOver = props.onValueMouseOver,\n      onValueMouseOut = props.onValueMouseOut,\n      onLinkClick = props.onLinkClick,\n      onLinkMouseOver = props.onLinkMouseOver,\n      onLinkMouseOut = props.onLinkMouseOut,\n      style = props.style,\n      width = props.width;\n  var nodesCopy = [].concat(_toConsumableArray(new Array(nodes.length))).map(function (e, i) {\n    return _extends({}, nodes[i]);\n  });\n  var linksCopy = [].concat(_toConsumableArray(new Array(links.length))).map(function (e, i) {\n    return _extends({}, links[i]);\n  });\n\n  var _getInnerDimensions = getInnerDimensions({\n    margin: margin,\n    height: height,\n    width: width\n  }, DEFAULT_MARGINS),\n      marginLeft = _getInnerDimensions.marginLeft,\n      marginTop = _getInnerDimensions.marginTop,\n      marginRight = _getInnerDimensions.marginRight,\n      marginBottom = _getInnerDimensions.marginBottom;\n\n  var sankeyInstance = sankey().extent([[marginLeft, marginTop], [width - marginRight, height - marginBottom - marginTop]]).nodeWidth(nodeWidth).nodePadding(nodePadding).nodes(nodesCopy).links(linksCopy).nodeAlign(ALIGNMENTS[align]).iterations(layout);\n  sankeyInstance(nodesCopy);\n  var nWidth = sankeyInstance.nodeWidth();\n  var path = sankeyLinkHorizontal();\n  return React.createElement(XYPlot, _extends({}, props, {\n    yType: 'literal',\n    className: 'rv-sankey ' + className\n  }), linksCopy.map(function (link, i) {\n    return React.createElement(SankeyLink, {\n      style: style.links,\n      data: path(link),\n      opacity: link.opacity || linkOpacity,\n      color: link.color,\n      onLinkClick: onLinkClick,\n      onLinkMouseOver: onLinkMouseOver,\n      onLinkMouseOut: onLinkMouseOut,\n      strokeWidth: Math.max(link.width, 1),\n      node: link,\n      nWidth: nWidth,\n      key: 'link-' + i\n    });\n  }), React.createElement(VerticalRectSeries, {\n    animation: animation,\n    className: className + ' rv-sankey__node',\n    data: nodesCopy.map(function (node) {\n      return _extends({}, node, {\n        y: node.y1 - marginTop,\n        y0: node.y0 - marginTop,\n        x: node.x1,\n        x0: node.x0,\n        color: node.color || DISCRETE_COLOR_RANGE[0],\n        sourceLinks: null,\n        targetLinks: null\n      });\n    }),\n    style: style.rects,\n    onValueClick: onValueClick,\n    onValueMouseOver: onValueMouseOver,\n    onValueMouseOut: onValueMouseOut,\n    colorType: 'literal'\n  }), !hideLabels && React.createElement(LabelSeries, {\n    animation: animation,\n    className: className,\n    rotation: labelRotation,\n    labelAnchorY: 'text-before-edge',\n    data: nodesCopy.map(function (node, i) {\n      return _extends({\n        x: node.x0 + (node.x0 < width / 2 ? nWidth + 10 : -10),\n        y: (node.y0 + node.y1) / 2 - marginTop,\n        label: node.name,\n        style: _extends({\n          textAnchor: node.x0 < width / 2 ? 'start' : 'end',\n          dy: '-.5em'\n        }, style.labels)\n      }, nodes[i]);\n    })\n  }), hasVoronoi && React.createElement(Voronoi, {\n    className: 'rv-sankey__voronoi',\n    extent: [[-marginLeft, -marginTop], [width + marginRight, height + marginBottom]],\n    nodes: nodesCopy,\n    onClick: onValueClick,\n    onHover: onValueMouseOver,\n    onBlur: onValueMouseOut,\n    x: function x(d) {\n      return d.x0 + (d.x1 - d.x0) / 2;\n    },\n    y: function y(d) {\n      return d.y0 + (d.y1 - d.y0) / 2;\n    }\n  }), children);\n}\n\nSankey.defaultProps = {\n  align: 'justify',\n  className: '',\n  hasVoronoi: false,\n  hideLabels: false,\n  labelRotation: 0,\n  layout: 50,\n  margin: DEFAULT_MARGINS,\n  nodePadding: 10,\n  nodeWidth: 10,\n  onValueMouseOver: NOOP,\n  onValueClick: NOOP,\n  onValueMouseOut: NOOP,\n  onLinkClick: NOOP,\n  onLinkMouseOver: NOOP,\n  onLinkMouseOut: NOOP,\n  style: {\n    links: {},\n    rects: {},\n    labels: {}\n  }\n};\nexport default Sankey;","export default function (node) {\n  node.x0 = Math.round(node.x0);\n  node.y0 = Math.round(node.y0);\n  node.x1 = Math.round(node.x1);\n  node.y1 = Math.round(node.y1);\n}","export default function (parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      node,\n      i = -1,\n      n = nodes.length,\n      k = parent.value && (x1 - x0) / parent.value;\n\n  while (++i < n) {\n    node = nodes[i], node.y0 = y0, node.y1 = y1;\n    node.x0 = x0, node.x1 = x0 += node.value * k;\n  }\n}","import roundNode from \"./treemap/round.js\";\nimport treemapDice from \"./treemap/dice.js\";\nexport default function () {\n  var dx = 1,\n      dy = 1,\n      padding = 0,\n      round = false;\n\n  function partition(root) {\n    var n = root.height + 1;\n    root.x0 = root.y0 = padding;\n    root.x1 = dx;\n    root.y1 = dy / n;\n    root.eachBefore(positionNode(dy, n));\n    if (round) root.eachBefore(roundNode);\n    return root;\n  }\n\n  function positionNode(dy, n) {\n    return function (node) {\n      if (node.children) {\n        treemapDice(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n);\n      }\n\n      var x0 = node.x0,\n          y0 = node.y0,\n          x1 = node.x1 - padding,\n          y1 = node.y1 - padding;\n      if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n      if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n      node.x0 = x0;\n      node.y0 = y0;\n      node.x1 = x1;\n      node.y1 = y1;\n    };\n  }\n\n  partition.round = function (x) {\n    return arguments.length ? (round = !!x, partition) : round;\n  };\n\n  partition.size = function (x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy];\n  };\n\n  partition.padding = function (x) {\n    return arguments.length ? (padding = +x, partition) : padding;\n  };\n\n  return partition;\n}","function count(node) {\n  var sum = 0,\n      children = node.children,\n      i = children && children.length;\n  if (!i) sum = 1;else while (--i >= 0) {\n    sum += children[i].value;\n  }\n  node.value = sum;\n}\n\nexport default function () {\n  return this.eachAfter(count);\n}","import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nexport default function hierarchy(data, children) {\n  var root = new Node(data),\n      valued = +data.value && (root.value = data.value),\n      node,\n      nodes = [root],\n      child,\n      childs,\n      i,\n      n;\n  if (children == null) children = defaultChildren;\n\n  while (node = nodes.pop()) {\n    if (valued) node.value = +node.data.value;\n\n    if ((childs = children(node.data)) && (n = childs.length)) {\n      node.children = new Array(n);\n\n      for (i = n - 1; i >= 0; --i) {\n        nodes.push(child = node.children[i] = new Node(childs[i]));\n        child.parent = node;\n        child.depth = node.depth + 1;\n      }\n    }\n  }\n\n  return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n  return hierarchy(this).eachBefore(copyData);\n}\n\nfunction defaultChildren(d) {\n  return d.children;\n}\n\nfunction copyData(node) {\n  node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n  var height = 0;\n\n  do {\n    node.height = height;\n  } while ((node = node.parent) && node.height < ++height);\n}\nexport function Node(data) {\n  this.data = data;\n  this.depth = this.height = 0;\n  this.parent = null;\n}\nNode.prototype = hierarchy.prototype = {\n  constructor: Node,\n  count: node_count,\n  each: node_each,\n  eachAfter: node_eachAfter,\n  eachBefore: node_eachBefore,\n  sum: node_sum,\n  sort: node_sort,\n  path: node_path,\n  ancestors: node_ancestors,\n  descendants: node_descendants,\n  leaves: node_leaves,\n  links: node_links,\n  copy: node_copy\n};","export default function (callback) {\n  var node = this,\n      current,\n      next = [node],\n      children,\n      i,\n      n;\n\n  do {\n    current = next.reverse(), next = [];\n\n    while (node = current.pop()) {\n      callback(node), children = node.children;\n      if (children) for (i = 0, n = children.length; i < n; ++i) {\n        next.push(children[i]);\n      }\n    }\n  } while (next.length);\n\n  return this;\n}","export default function (callback) {\n  var node = this,\n      nodes = [node],\n      next = [],\n      children,\n      i,\n      n;\n\n  while (node = nodes.pop()) {\n    next.push(node), children = node.children;\n    if (children) for (i = 0, n = children.length; i < n; ++i) {\n      nodes.push(children[i]);\n    }\n  }\n\n  while (node = next.pop()) {\n    callback(node);\n  }\n\n  return this;\n}","export default function (callback) {\n  var node = this,\n      nodes = [node],\n      children,\n      i;\n\n  while (node = nodes.pop()) {\n    callback(node), children = node.children;\n    if (children) for (i = children.length - 1; i >= 0; --i) {\n      nodes.push(children[i]);\n    }\n  }\n\n  return this;\n}","export default function (value) {\n  return this.eachAfter(function (node) {\n    var sum = +value(node.data) || 0,\n        children = node.children,\n        i = children && children.length;\n\n    while (--i >= 0) {\n      sum += children[i].value;\n    }\n\n    node.value = sum;\n  });\n}","export default function (compare) {\n  return this.eachBefore(function (node) {\n    if (node.children) {\n      node.children.sort(compare);\n    }\n  });\n}","export default function (end) {\n  var start = this,\n      ancestor = leastCommonAncestor(start, end),\n      nodes = [start];\n\n  while (start !== ancestor) {\n    start = start.parent;\n    nodes.push(start);\n  }\n\n  var k = nodes.length;\n\n  while (end !== ancestor) {\n    nodes.splice(k, 0, end);\n    end = end.parent;\n  }\n\n  return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n  if (a === b) return a;\n  var aNodes = a.ancestors(),\n      bNodes = b.ancestors(),\n      c = null;\n  a = aNodes.pop();\n  b = bNodes.pop();\n\n  while (a === b) {\n    c = a;\n    a = aNodes.pop();\n    b = bNodes.pop();\n  }\n\n  return c;\n}","export default function () {\n  var node = this,\n      nodes = [node];\n\n  while (node = node.parent) {\n    nodes.push(node);\n  }\n\n  return nodes;\n}","export default function () {\n  var nodes = [];\n  this.each(function (node) {\n    nodes.push(node);\n  });\n  return nodes;\n}","export default function () {\n  var leaves = [];\n  this.eachBefore(function (node) {\n    if (!node.children) {\n      leaves.push(node);\n    }\n  });\n  return leaves;\n}","export default function () {\n  var root = this,\n      links = [];\n  root.each(function (node) {\n    if (node !== root) {\n      // Don’t include the root’s parent, if any.\n      links.push({\n        source: node.parent,\n        target: node\n      });\n    }\n  });\n  return links;\n}","import \"core-js/modules/es.array.reduce.js\";\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n}; // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport { hierarchy, partition } from 'd3-hierarchy';\nimport { scaleLinear, scaleSqrt } from 'd3-scale';\nimport { AnimationPropType } from '../animation';\nimport LabelSeries from '../plot/series/label-series';\nimport ArcSeries from '../plot/series/arc-series';\nimport XYPlot from '../plot/xy-plot';\nimport { getRadialDomain } from '../utils/series-utils';\nimport { getRadialLayoutMargin } from '../utils/chart-utils';\nvar predefinedClassName = 'rv-sunburst';\nvar LISTENERS_TO_OVERWRITE = ['onValueMouseOver', 'onValueMouseOut', 'onValueClick', 'onValueRightClick', 'onSeriesMouseOver', 'onSeriesMouseOut', 'onSeriesClick', 'onSeriesRightClick'];\n/**\n * Create the list of nodes to render.\n * @param {Object} props\n   props.data {Object} - tree structured data (each node has a name anc an array of children)\n   props.height {number} - the height of the graphic to be rendered\n   props.hideRootNode {boolean} - whether or not to hide the root node\n   props.width {number} - the width of the graphic to be rendered\n   props.getSize {function} - accessor for the size\n * @returns {Array} Array of nodes.\n */\n\nfunction getNodesToRender(_ref) {\n  var data = _ref.data,\n      height = _ref.height,\n      hideRootNode = _ref.hideRootNode,\n      width = _ref.width,\n      getSize = _ref.getSize;\n  var partitionFunction = partition();\n  var structuredInput = hierarchy(data).sum(getSize);\n  var radius = Math.min(width, height) / 2 - 10;\n  var x = scaleLinear().range([0, 2 * Math.PI]);\n  var y = scaleSqrt().range([0, radius]);\n  return partitionFunction(structuredInput).descendants().reduce(function (res, cell, index) {\n    if (hideRootNode && index === 0) {\n      return res;\n    }\n\n    return res.concat([_extends({\n      angle0: Math.max(0, Math.min(2 * Math.PI, x(cell.x0))),\n      angle: Math.max(0, Math.min(2 * Math.PI, x(cell.x1))),\n      radius0: Math.max(0, y(cell.y0)),\n      radius: Math.max(0, y(cell.y1)),\n      depth: cell.depth,\n      parent: cell.parent\n    }, cell.data)]);\n  }, []);\n}\n/**\n * Convert arc nodes into label rows.\n * Important to use mappedData rather than regular data, bc it is already unrolled\n * @param {Array} mappedData - Array of nodes.\n * @param {Object} accessors - object of accessors\n * @returns {Array} array of node for rendering as labels\n */\n\n\nfunction buildLabels(mappedData, accessors) {\n  var getAngle = accessors.getAngle,\n      getAngle0 = accessors.getAngle0,\n      getLabel = accessors.getLabel,\n      getRadius0 = accessors.getRadius0;\n  return mappedData.filter(getLabel).map(function (row) {\n    var truedAngle = -1 * getAngle(row) + Math.PI / 2;\n    var truedAngle0 = -1 * getAngle0(row) + Math.PI / 2;\n    var angle = (truedAngle0 + truedAngle) / 2;\n    var rotateLabels = !row.dontRotateLabel;\n    var rotAngle = -angle / (2 * Math.PI) * 360;\n    return _extends({}, row, {\n      children: null,\n      angle: null,\n      radius: null,\n      x: getRadius0(row) * Math.cos(angle),\n      y: getRadius0(row) * Math.sin(angle),\n      style: _extends({\n        textAnchor: rotAngle > 90 ? 'end' : 'start'\n      }, row.labelStyle),\n      rotation: rotateLabels ? rotAngle > 90 ? rotAngle + 180 : rotAngle === 90 ? 90 : rotAngle : null\n    });\n  });\n}\n\nvar NOOP = function NOOP() {};\n\nfunction Sunburst(props) {\n  var getAngle = props.getAngle,\n      getAngle0 = props.getAngle0,\n      animation = props.animation,\n      className = props.className,\n      children = props.children,\n      data = props.data,\n      height = props.height,\n      hideRootNode = props.hideRootNode,\n      getLabel = props.getLabel,\n      width = props.width,\n      getSize = props.getSize,\n      colorType = props.colorType;\n  var mappedData = getNodesToRender({\n    data: data,\n    height: height,\n    hideRootNode: hideRootNode,\n    width: width,\n    getSize: getSize\n  });\n  var radialDomain = getRadialDomain(mappedData);\n  var margin = getRadialLayoutMargin(width, height, radialDomain);\n  var labelData = buildLabels(mappedData, {\n    getAngle: getAngle,\n    getAngle0: getAngle0,\n    getLabel: getLabel,\n    getRadius0: function getRadius0(d) {\n      return d.radius0;\n    }\n  });\n\n  var hofBuilder = function hofBuilder(f) {\n    return function (e, i) {\n      return f ? f(mappedData[e.index], i) : NOOP;\n    };\n  };\n\n  return React.createElement(XYPlot, {\n    height: height,\n    hasTreeStructure: true,\n    width: width,\n    className: predefinedClassName + ' ' + className,\n    margin: margin,\n    xDomain: [-radialDomain, radialDomain],\n    yDomain: [-radialDomain, radialDomain]\n  }, React.createElement(ArcSeries, _extends({\n    colorType: colorType\n  }, props, {\n    animation: animation,\n    radiusDomain: [0, radialDomain],\n    // need to present a stripped down version for interpolation\n    data: animation ? mappedData.map(function (row, index) {\n      return _extends({}, row, {\n        parent: null,\n        children: null,\n        index: index\n      });\n    }) : mappedData,\n    _data: animation ? mappedData : null,\n    arcClassName: predefinedClassName + '__series--radial__arc'\n  }, LISTENERS_TO_OVERWRITE.reduce(function (acc, propName) {\n    var prop = props[propName];\n    acc[propName] = animation ? hofBuilder(prop) : prop;\n    return acc;\n  }, {}))), labelData.length > 0 && React.createElement(LabelSeries, {\n    data: labelData,\n    getLabel: getLabel\n  }), children);\n}\n\nSunburst.displayName = 'Sunburst';\nSunburst.defaultProps = {\n  getAngle: function getAngle(d) {\n    return d.angle;\n  },\n  getAngle0: function getAngle0(d) {\n    return d.angle0;\n  },\n  className: '',\n  colorType: 'literal',\n  getColor: function getColor(d) {\n    return d.color;\n  },\n  hideRootNode: false,\n  getLabel: function getLabel(d) {\n    return d.label;\n  },\n  getSize: function getSize(d) {\n    return d.size;\n  },\n  padAngle: 0\n};\nexport default Sunburst;","export default function (parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      node,\n      i = -1,\n      n = nodes.length,\n      k = parent.value && (y1 - y0) / parent.value;\n\n  while (++i < n) {\n    node = nodes[i], node.x0 = x0, node.x1 = x1;\n    node.y0 = y0, node.y1 = y0 += node.value * k;\n  }\n}","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\nexport var phi = (1 + Math.sqrt(5)) / 2;\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n  var rows = [],\n      nodes = parent.children,\n      row,\n      nodeValue,\n      i0 = 0,\n      i1 = 0,\n      n = nodes.length,\n      dx,\n      dy,\n      value = parent.value,\n      sumValue,\n      minValue,\n      maxValue,\n      newRatio,\n      minRatio,\n      alpha,\n      beta;\n\n  while (i0 < n) {\n    dx = x1 - x0, dy = y1 - y0; // Find the next non-empty node.\n\n    do {\n      sumValue = nodes[i1++].value;\n    } while (!sumValue && i1 < n);\n\n    minValue = maxValue = sumValue;\n    alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n    beta = sumValue * sumValue * alpha;\n    minRatio = Math.max(maxValue / beta, beta / minValue); // Keep adding nodes while the aspect ratio maintains or improves.\n\n    for (; i1 < n; ++i1) {\n      sumValue += nodeValue = nodes[i1].value;\n      if (nodeValue < minValue) minValue = nodeValue;\n      if (nodeValue > maxValue) maxValue = nodeValue;\n      beta = sumValue * sumValue * alpha;\n      newRatio = Math.max(maxValue / beta, beta / minValue);\n\n      if (newRatio > minRatio) {\n        sumValue -= nodeValue;\n        break;\n      }\n\n      minRatio = newRatio;\n    } // Position and record the row orientation.\n\n\n    rows.push(row = {\n      value: sumValue,\n      dice: dx < dy,\n      children: nodes.slice(i0, i1)\n    });\n    if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n    value -= sumValue, i0 = i1;\n  }\n\n  return rows;\n}\nexport default (function custom(ratio) {\n  function squarify(parent, x0, y0, x1, y1) {\n    squarifyRatio(ratio, parent, x0, y0, x1, y1);\n  }\n\n  squarify.ratio = function (x) {\n    return custom((x = +x) > 1 ? x : 1);\n  };\n\n  return squarify;\n})(phi);","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\nimport { phi, squarifyRatio } from \"./squarify.js\";\nexport default (function custom(ratio) {\n  function resquarify(parent, x0, y0, x1, y1) {\n    if ((rows = parent._squarify) && rows.ratio === ratio) {\n      var rows,\n          row,\n          nodes,\n          i,\n          j = -1,\n          n,\n          m = rows.length,\n          value = parent.value;\n\n      while (++j < m) {\n        row = rows[j], nodes = row.children;\n\n        for (i = row.value = 0, n = nodes.length; i < n; ++i) {\n          row.value += nodes[i].value;\n        }\n\n        if (row.dice) treemapDice(row, x0, y0, x1, y0 += (y1 - y0) * row.value / value);else treemapSlice(row, x0, y0, x0 += (x1 - x0) * row.value / value, y1);\n        value -= row.value;\n      }\n    } else {\n      parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1);\n      rows.ratio = ratio;\n    }\n  }\n\n  resquarify.ratio = function (x) {\n    return custom((x = +x) > 1 ? x : 1);\n  };\n\n  return resquarify;\n})(phi);","export var slice = Array.prototype.slice;\nexport function shuffle(array) {\n  var m = array.length,\n      t,\n      i;\n\n  while (m) {\n    i = Math.random() * m-- | 0;\n    t = array[m];\n    array[m] = array[i];\n    array[i] = t;\n  }\n\n  return array;\n}","import { shuffle, slice } from \"../array.js\";\nexport default function (circles) {\n  var i = 0,\n      n = (circles = shuffle(slice.call(circles))).length,\n      B = [],\n      p,\n      e;\n\n  while (i < n) {\n    p = circles[i];\n    if (e && enclosesWeak(e, p)) ++i;else e = encloseBasis(B = extendBasis(B, p)), i = 0;\n  }\n\n  return e;\n}\n\nfunction extendBasis(B, p) {\n  var i, j;\n  if (enclosesWeakAll(p, B)) return [p]; // If we get here then B must have at least one element.\n\n  for (i = 0; i < B.length; ++i) {\n    if (enclosesNot(p, B[i]) && enclosesWeakAll(encloseBasis2(B[i], p), B)) {\n      return [B[i], p];\n    }\n  } // If we get here then B must have at least two elements.\n\n\n  for (i = 0; i < B.length - 1; ++i) {\n    for (j = i + 1; j < B.length; ++j) {\n      if (enclosesNot(encloseBasis2(B[i], B[j]), p) && enclosesNot(encloseBasis2(B[i], p), B[j]) && enclosesNot(encloseBasis2(B[j], p), B[i]) && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) {\n        return [B[i], B[j], p];\n      }\n    }\n  } // If we get here then something is very wrong.\n\n\n  throw new Error();\n}\n\nfunction enclosesNot(a, b) {\n  var dr = a.r - b.r,\n      dx = b.x - a.x,\n      dy = b.y - a.y;\n  return dr < 0 || dr * dr < dx * dx + dy * dy;\n}\n\nfunction enclosesWeak(a, b) {\n  var dr = a.r - b.r + 1e-6,\n      dx = b.x - a.x,\n      dy = b.y - a.y;\n  return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction enclosesWeakAll(a, B) {\n  for (var i = 0; i < B.length; ++i) {\n    if (!enclosesWeak(a, B[i])) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nfunction encloseBasis(B) {\n  switch (B.length) {\n    case 1:\n      return encloseBasis1(B[0]);\n\n    case 2:\n      return encloseBasis2(B[0], B[1]);\n\n    case 3:\n      return encloseBasis3(B[0], B[1], B[2]);\n  }\n}\n\nfunction encloseBasis1(a) {\n  return {\n    x: a.x,\n    y: a.y,\n    r: a.r\n  };\n}\n\nfunction encloseBasis2(a, b) {\n  var x1 = a.x,\n      y1 = a.y,\n      r1 = a.r,\n      x2 = b.x,\n      y2 = b.y,\n      r2 = b.r,\n      x21 = x2 - x1,\n      y21 = y2 - y1,\n      r21 = r2 - r1,\n      l = Math.sqrt(x21 * x21 + y21 * y21);\n  return {\n    x: (x1 + x2 + x21 / l * r21) / 2,\n    y: (y1 + y2 + y21 / l * r21) / 2,\n    r: (l + r1 + r2) / 2\n  };\n}\n\nfunction encloseBasis3(a, b, c) {\n  var x1 = a.x,\n      y1 = a.y,\n      r1 = a.r,\n      x2 = b.x,\n      y2 = b.y,\n      r2 = b.r,\n      x3 = c.x,\n      y3 = c.y,\n      r3 = c.r,\n      a2 = x1 - x2,\n      a3 = x1 - x3,\n      b2 = y1 - y2,\n      b3 = y1 - y3,\n      c2 = r2 - r1,\n      c3 = r3 - r1,\n      d1 = x1 * x1 + y1 * y1 - r1 * r1,\n      d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2,\n      d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3,\n      ab = a3 * b2 - a2 * b3,\n      xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1,\n      xb = (b3 * c2 - b2 * c3) / ab,\n      ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1,\n      yb = (a2 * c3 - a3 * c2) / ab,\n      A = xb * xb + yb * yb - 1,\n      B = 2 * (r1 + xa * xb + ya * yb),\n      C = xa * xa + ya * ya - r1 * r1,\n      r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B);\n  return {\n    x: x1 + xa + xb * r,\n    y: y1 + ya + yb * r,\n    r: r\n  };\n}","import enclose from \"./enclose.js\";\n\nfunction place(b, a, c) {\n  var dx = b.x - a.x,\n      x,\n      a2,\n      dy = b.y - a.y,\n      y,\n      b2,\n      d2 = dx * dx + dy * dy;\n\n  if (d2) {\n    a2 = a.r + c.r, a2 *= a2;\n    b2 = b.r + c.r, b2 *= b2;\n\n    if (a2 > b2) {\n      x = (d2 + b2 - a2) / (2 * d2);\n      y = Math.sqrt(Math.max(0, b2 / d2 - x * x));\n      c.x = b.x - x * dx - y * dy;\n      c.y = b.y - x * dy + y * dx;\n    } else {\n      x = (d2 + a2 - b2) / (2 * d2);\n      y = Math.sqrt(Math.max(0, a2 / d2 - x * x));\n      c.x = a.x + x * dx - y * dy;\n      c.y = a.y + x * dy + y * dx;\n    }\n  } else {\n    c.x = a.x + c.r;\n    c.y = a.y;\n  }\n}\n\nfunction intersects(a, b) {\n  var dr = a.r + b.r - 1e-6,\n      dx = b.x - a.x,\n      dy = b.y - a.y;\n  return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction score(node) {\n  var a = node._,\n      b = node.next._,\n      ab = a.r + b.r,\n      dx = (a.x * b.r + b.x * a.r) / ab,\n      dy = (a.y * b.r + b.y * a.r) / ab;\n  return dx * dx + dy * dy;\n}\n\nfunction Node(circle) {\n  this._ = circle;\n  this.next = null;\n  this.previous = null;\n}\n\nexport function packEnclose(circles) {\n  if (!(n = circles.length)) return 0;\n  var a, b, c, n, aa, ca, i, j, k, sj, sk; // Place the first circle.\n\n  a = circles[0], a.x = 0, a.y = 0;\n  if (!(n > 1)) return a.r; // Place the second circle.\n\n  b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0;\n  if (!(n > 2)) return a.r + b.r; // Place the third circle.\n\n  place(b, a, c = circles[2]); // Initialize the front-chain using the first three circles a, b and c.\n\n  a = new Node(a), b = new Node(b), c = new Node(c);\n  a.next = c.previous = b;\n  b.next = a.previous = c;\n  c.next = b.previous = a; // Attempt to place each remaining circle…\n\n  pack: for (i = 3; i < n; ++i) {\n    place(a._, b._, c = circles[i]), c = new Node(c); // Find the closest intersecting circle on the front-chain, if any.\n    // “Closeness” is determined by linear distance along the front-chain.\n    // “Ahead” or “behind” is likewise determined by linear distance.\n\n    j = b.next, k = a.previous, sj = b._.r, sk = a._.r;\n\n    do {\n      if (sj <= sk) {\n        if (intersects(j._, c._)) {\n          b = j, a.next = b, b.previous = a, --i;\n          continue pack;\n        }\n\n        sj += j._.r, j = j.next;\n      } else {\n        if (intersects(k._, c._)) {\n          a = k, a.next = b, b.previous = a, --i;\n          continue pack;\n        }\n\n        sk += k._.r, k = k.previous;\n      }\n    } while (j !== k.next); // Success! Insert the new circle c between a and b.\n\n\n    c.previous = a, c.next = b, a.next = b.previous = b = c; // Compute the new closest circle pair to the centroid.\n\n    aa = score(a);\n\n    while ((c = c.next) !== b) {\n      if ((ca = score(c)) < aa) {\n        a = c, aa = ca;\n      }\n    }\n\n    b = a.next;\n  } // Compute the enclosing circle of the front chain.\n\n\n  a = [b._], c = b;\n\n  while ((c = c.next) !== b) {\n    a.push(c._);\n  }\n\n  c = enclose(a); // Translate the circles to put the enclosing circle around the origin.\n\n  for (i = 0; i < n; ++i) {\n    a = circles[i], a.x -= c.x, a.y -= c.y;\n  }\n\n  return c.r;\n}\nexport default function (circles) {\n  packEnclose(circles);\n  return circles;\n}","export function optional(f) {\n  return f == null ? null : required(f);\n}\nexport function required(f) {\n  if (typeof f !== \"function\") throw new Error();\n  return f;\n}","export function constantZero() {\n  return 0;\n}\nexport default function (x) {\n  return function () {\n    return x;\n  };\n}","import { packEnclose } from \"./siblings.js\";\nimport { optional } from \"../accessors.js\";\nimport constant, { constantZero } from \"../constant.js\";\n\nfunction defaultRadius(d) {\n  return Math.sqrt(d.value);\n}\n\nexport default function () {\n  var radius = null,\n      dx = 1,\n      dy = 1,\n      padding = constantZero;\n\n  function pack(root) {\n    root.x = dx / 2, root.y = dy / 2;\n\n    if (radius) {\n      root.eachBefore(radiusLeaf(radius)).eachAfter(packChildren(padding, 0.5)).eachBefore(translateChild(1));\n    } else {\n      root.eachBefore(radiusLeaf(defaultRadius)).eachAfter(packChildren(constantZero, 1)).eachAfter(packChildren(padding, root.r / Math.min(dx, dy))).eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r)));\n    }\n\n    return root;\n  }\n\n  pack.radius = function (x) {\n    return arguments.length ? (radius = optional(x), pack) : radius;\n  };\n\n  pack.size = function (x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy];\n  };\n\n  pack.padding = function (x) {\n    return arguments.length ? (padding = typeof x === \"function\" ? x : constant(+x), pack) : padding;\n  };\n\n  return pack;\n}\n\nfunction radiusLeaf(radius) {\n  return function (node) {\n    if (!node.children) {\n      node.r = Math.max(0, +radius(node) || 0);\n    }\n  };\n}\n\nfunction packChildren(padding, k) {\n  return function (node) {\n    if (children = node.children) {\n      var children,\n          i,\n          n = children.length,\n          r = padding(node) * k || 0,\n          e;\n      if (r) for (i = 0; i < n; ++i) {\n        children[i].r += r;\n      }\n      e = packEnclose(children);\n      if (r) for (i = 0; i < n; ++i) {\n        children[i].r -= r;\n      }\n      node.r = e + r;\n    }\n  };\n}\n\nfunction translateChild(k) {\n  return function (node) {\n    var parent = node.parent;\n    node.r *= k;\n\n    if (parent) {\n      node.x = parent.x + k * node.x;\n      node.y = parent.y + k * node.y;\n    }\n  };\n}","import roundNode from \"./round.js\";\nimport squarify from \"./squarify.js\";\nimport { required } from \"../accessors.js\";\nimport constant, { constantZero } from \"../constant.js\";\nexport default function () {\n  var tile = squarify,\n      round = false,\n      dx = 1,\n      dy = 1,\n      paddingStack = [0],\n      paddingInner = constantZero,\n      paddingTop = constantZero,\n      paddingRight = constantZero,\n      paddingBottom = constantZero,\n      paddingLeft = constantZero;\n\n  function treemap(root) {\n    root.x0 = root.y0 = 0;\n    root.x1 = dx;\n    root.y1 = dy;\n    root.eachBefore(positionNode);\n    paddingStack = [0];\n    if (round) root.eachBefore(roundNode);\n    return root;\n  }\n\n  function positionNode(node) {\n    var p = paddingStack[node.depth],\n        x0 = node.x0 + p,\n        y0 = node.y0 + p,\n        x1 = node.x1 - p,\n        y1 = node.y1 - p;\n    if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n    if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n    node.x0 = x0;\n    node.y0 = y0;\n    node.x1 = x1;\n    node.y1 = y1;\n\n    if (node.children) {\n      p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n      x0 += paddingLeft(node) - p;\n      y0 += paddingTop(node) - p;\n      x1 -= paddingRight(node) - p;\n      y1 -= paddingBottom(node) - p;\n      if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n      if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n      tile(node, x0, y0, x1, y1);\n    }\n  }\n\n  treemap.round = function (x) {\n    return arguments.length ? (round = !!x, treemap) : round;\n  };\n\n  treemap.size = function (x) {\n    return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n  };\n\n  treemap.tile = function (x) {\n    return arguments.length ? (tile = required(x), treemap) : tile;\n  };\n\n  treemap.padding = function (x) {\n    return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n  };\n\n  treemap.paddingInner = function (x) {\n    return arguments.length ? (paddingInner = typeof x === \"function\" ? x : constant(+x), treemap) : paddingInner;\n  };\n\n  treemap.paddingOuter = function (x) {\n    return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n  };\n\n  treemap.paddingTop = function (x) {\n    return arguments.length ? (paddingTop = typeof x === \"function\" ? x : constant(+x), treemap) : paddingTop;\n  };\n\n  treemap.paddingRight = function (x) {\n    return arguments.length ? (paddingRight = typeof x === \"function\" ? x : constant(+x), treemap) : paddingRight;\n  };\n\n  treemap.paddingBottom = function (x) {\n    return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : constant(+x), treemap) : paddingBottom;\n  };\n\n  treemap.paddingLeft = function (x) {\n    return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : constant(+x), treemap) : paddingLeft;\n  };\n\n  return treemap;\n}","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n}; // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport Animation, { AnimationPropType } from '../animation';\nimport { getFontColorFromBackground } from '../utils/scales-utils';\nvar ANIMATED_PROPS = ['colorRange', 'colorDomain', 'color', 'opacityRange', 'opacityDomain', 'opacity', 'x0', 'x1', 'y0', 'y1', 'r'];\n\nfunction TreemapLeaf(props) {\n  var animation = props.animation,\n      getLabel = props.getLabel,\n      mode = props.mode,\n      node = props.node,\n      onLeafClick = props.onLeafClick,\n      onLeafMouseOver = props.onLeafMouseOver,\n      onLeafMouseOut = props.onLeafMouseOut,\n      r = props.r,\n      scales = props.scales,\n      x0 = props.x0,\n      x1 = props.x1,\n      y0 = props.y0,\n      y1 = props.y1,\n      style = props.style;\n\n  if (animation) {\n    return React.createElement(Animation, _extends({}, props, {\n      animatedProps: ANIMATED_PROPS\n    }), React.createElement(TreemapLeaf, _extends({}, props, {\n      animation: null\n    })));\n  }\n\n  var useCirclePacking = mode === 'circlePack';\n  var background = scales.color(node);\n  var opacity = scales.opacity(node);\n  var color = getFontColorFromBackground(background);\n  var data = node.data;\n  var title = getLabel(data);\n\n  var leafStyle = _extends({\n    top: useCirclePacking ? y0 - r : y0,\n    left: useCirclePacking ? x0 - r : x0,\n    width: useCirclePacking ? r * 2 : x1 - x0,\n    height: useCirclePacking ? r * 2 : y1 - y0,\n    background: background,\n    opacity: opacity,\n    color: color\n  }, style, node.data.style);\n\n  return React.createElement('div', {\n    className: 'rv-treemap__leaf ' + (useCirclePacking ? 'rv-treemap__leaf--circle' : ''),\n    onMouseEnter: function onMouseEnter(event) {\n      return onLeafMouseOver(node, event);\n    },\n    onMouseLeave: function onMouseLeave(event) {\n      return onLeafMouseOut(node, event);\n    },\n    onClick: function onClick(event) {\n      return onLeafClick(node, event);\n    },\n    style: leafStyle\n  }, React.createElement('div', {\n    className: 'rv-treemap__leaf__content'\n  }, title));\n}\n\nexport default TreemapLeaf;","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n}; // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport TreemapLeaf from './treemap-leaf';\n\nfunction TreemapDOM(props) {\n  var animation = props.animation,\n      className = props.className,\n      height = props.height,\n      hideRootNode = props.hideRootNode,\n      getLabel = props.getLabel,\n      mode = props.mode,\n      nodes = props.nodes,\n      width = props.width,\n      scales = props.scales,\n      style = props.style;\n  var useCirclePacking = mode === 'circlePack';\n  return React.createElement('div', {\n    className: 'rv-treemap ' + (useCirclePacking ? 'rv-treemap-circle-packed' : '') + ' ' + className,\n    style: {\n      height: height,\n      width: width\n    }\n  }, nodes.map(function (node, index) {\n    // throw out the rootest node\n    if (hideRootNode && !index) {\n      return null;\n    }\n\n    var nodeProps = _extends({\n      animation: animation,\n      node: node,\n      getLabel: getLabel\n    }, props, {\n      x0: useCirclePacking ? node.x : node.x0,\n      x1: useCirclePacking ? node.x : node.x1,\n      y0: useCirclePacking ? node.y : node.y0,\n      y1: useCirclePacking ? node.y : node.y1,\n      r: useCirclePacking ? node.r : 1,\n      scales: scales,\n      style: style\n    });\n\n    return React.createElement(TreemapLeaf, _extends({}, nodeProps, {\n      key: 'leaf-' + index\n    }));\n  }));\n}\n\nTreemapDOM.displayName = 'TreemapDOM';\nexport default TreemapDOM;","import \"core-js/modules/es.array.reduce.js\";\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport XYPlot from '../plot/xy-plot';\nimport PolygonSeries from '../plot/series/polygon-series';\nimport MarkSeries from '../plot/series/mark-series';\nimport LabelSeries from '../plot/series/label-series';\nvar MARGIN_ADJUST = 1.2;\n\nvar TreemapSVG = function (_React$Component) {\n  _inherits(TreemapSVG, _React$Component);\n\n  function TreemapSVG() {\n    _classCallCheck(this, TreemapSVG);\n\n    return _possibleConstructorReturn(this, (TreemapSVG.__proto__ || Object.getPrototypeOf(TreemapSVG)).apply(this, arguments));\n  }\n\n  _createClass(TreemapSVG, [{\n    key: 'getCircularNodes',\n    value: function getCircularNodes() {\n      var _props = this.props,\n          animation = _props.animation,\n          hideRootNode = _props.hideRootNode,\n          nodes = _props.nodes,\n          onLeafMouseOver = _props.onLeafMouseOver,\n          onLeafMouseOut = _props.onLeafMouseOut,\n          onLeafClick = _props.onLeafClick,\n          scales = _props.scales,\n          style = _props.style;\n\n      var _nodes$reduce = nodes.reduce(function (acc, node, index) {\n        if (!index && hideRootNode) {\n          return acc;\n        }\n\n        var x = node.x,\n            y = node.y,\n            r = node.r;\n        return {\n          maxY: Math.max(y + r, acc.maxY),\n          minY: Math.min(y - r, acc.minY),\n          maxX: Math.max(x + MARGIN_ADJUST * r, acc.maxX),\n          minX: Math.min(x - MARGIN_ADJUST * r, acc.minX),\n          rows: acc.rows.concat([{\n            x: x,\n            y: y,\n            size: r,\n            color: scales.color(node)\n          }])\n        };\n      }, {\n        rows: [],\n        maxY: -Infinity,\n        minY: Infinity,\n        maxX: -Infinity,\n        minX: Infinity\n      }),\n          rows = _nodes$reduce.rows,\n          minY = _nodes$reduce.minY,\n          maxY = _nodes$reduce.maxY,\n          minX = _nodes$reduce.minX,\n          maxX = _nodes$reduce.maxX;\n\n      return {\n        updatedNodes: React.createElement(MarkSeries, {\n          animation: animation,\n          className: 'rv-treemap__leaf rv-treemap__leaf--circle',\n          onSeriesMouseEnter: onLeafMouseOver,\n          onSeriesMouseLeave: onLeafMouseOut,\n          onSeriesClick: onLeafClick,\n          data: rows,\n          colorType: 'literal',\n          getColor: function getColor(d) {\n            return d.color;\n          },\n          sizeType: 'literal',\n          getSize: function getSize(d) {\n            return d.size;\n          },\n          style: style\n        }),\n        minY: minY,\n        maxY: maxY,\n        minX: minX,\n        maxX: maxX\n      };\n    }\n  }, {\n    key: 'getNonCircularNodes',\n    value: function getNonCircularNodes() {\n      var _props2 = this.props,\n          animation = _props2.animation,\n          hideRootNode = _props2.hideRootNode,\n          nodes = _props2.nodes,\n          onLeafMouseOver = _props2.onLeafMouseOver,\n          onLeafMouseOut = _props2.onLeafMouseOut,\n          onLeafClick = _props2.onLeafClick,\n          scales = _props2.scales,\n          style = _props2.style;\n      var color = scales.color;\n      return nodes.reduce(function (acc, node, index) {\n        if (!index && hideRootNode) {\n          return acc;\n        }\n\n        var x0 = node.x0,\n            x1 = node.x1,\n            y1 = node.y1,\n            y0 = node.y0;\n        var x = x0;\n        var y = y0;\n        var nodeHeight = y1 - y0;\n        var nodeWidth = x1 - x0;\n        acc.maxY = Math.max(y + nodeHeight, acc.maxY);\n        acc.minY = Math.min(y, acc.minY);\n        acc.maxX = Math.max(x + nodeWidth, acc.maxX);\n        acc.minX = Math.min(x, acc.minX);\n        var data = [{\n          x: x,\n          y: y\n        }, {\n          x: x,\n          y: y + nodeHeight\n        }, {\n          x: x + nodeWidth,\n          y: y + nodeHeight\n        }, {\n          x: x + nodeWidth,\n          y: y\n        }];\n        acc.updatedNodes = acc.updatedNodes.concat([React.createElement(PolygonSeries, {\n          animation: animation,\n          className: 'rv-treemap__leaf',\n          key: index,\n          color: color(node),\n          type: 'literal',\n          onSeriesMouseEnter: onLeafMouseOver,\n          onSeriesMouseLeave: onLeafMouseOut,\n          onSeriesClick: onLeafClick,\n          data: data,\n          style: _extends({}, style, node.style)\n        })]);\n        return acc;\n      }, {\n        updatedNodes: [],\n        maxY: -Infinity,\n        minY: Infinity,\n        maxX: -Infinity,\n        minX: Infinity\n      });\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props3 = this.props,\n          className = _props3.className,\n          height = _props3.height,\n          mode = _props3.mode,\n          nodes = _props3.nodes,\n          width = _props3.width;\n      var useCirclePacking = mode === 'circlePack';\n\n      var _ref = useCirclePacking ? this.getCircularNodes() : this.getNonCircularNodes(),\n          minY = _ref.minY,\n          maxY = _ref.maxY,\n          minX = _ref.minX,\n          maxX = _ref.maxX,\n          updatedNodes = _ref.updatedNodes;\n\n      var labels = nodes.reduce(function (acc, node) {\n        if (!node.data.title) {\n          return acc;\n        }\n\n        return acc.concat(_extends({}, node.data, {\n          x: node.x0 || node.x,\n          y: node.y0 || node.y,\n          label: '' + node.data.title\n        }));\n      }, []);\n      return React.createElement(XYPlot, _extends({\n        className: 'rv-treemap ' + (useCirclePacking ? 'rv-treemap-circle-packed' : '') + ' ' + className,\n        width: width,\n        height: height,\n        yDomain: [maxY, minY],\n        xDomain: [minX, maxX],\n        colorType: 'literal',\n        hasTreeStructure: true\n      }, this.props), updatedNodes, React.createElement(LabelSeries, {\n        data: labels\n      }));\n    }\n  }]);\n\n  return TreemapSVG;\n}(React.Component);\n\nTreemapSVG.displayName = 'TreemapSVG';\nexport default TreemapSVG;","var _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport { hierarchy, pack, partition, treemapSquarify, treemapResquarify, treemapSlice, treemapDice, treemapSliceDice, treemapBinary, treemap } from 'd3-hierarchy';\nimport { CONTINUOUS_COLOR_RANGE, DEFAULT_COLOR, DEFAULT_OPACITY, OPACITY_TYPE } from '../theme';\nimport { AnimationPropType } from '../animation';\nimport { getAttributeFunctor, getMissingScaleProps } from '../utils/scales-utils';\nimport { MarginPropType, getInnerDimensions } from '../utils/chart-utils';\nimport TreemapDOM from './treemap-dom';\nimport TreemapSVG from './treemap-svg';\nvar TREEMAP_TILE_MODES = {\n  squarify: treemapSquarify,\n  resquarify: treemapResquarify,\n  slice: treemapSlice,\n  dice: treemapDice,\n  slicedice: treemapSliceDice,\n  binary: treemapBinary\n};\n\nvar NOOP = function NOOP(d) {\n  return d;\n};\n\nvar ATTRIBUTES = ['opacity', 'color'];\nvar DEFAULT_MARGINS = {\n  left: 40,\n  right: 10,\n  top: 10,\n  bottom: 40\n};\n/**\n * Get the map of scale functions from the given props.\n * @param {Object} props Props for the component.\n * @returns {Object} Map of scale functions.\n * @private\n */\n\nfunction _getScaleFns(props) {\n  var data = props.data;\n  var allData = data.children || []; // Adding _allData property to the object to reuse the existing\n  // getAttributeFunctor function.\n\n  var compatibleProps = _extends({}, props, getMissingScaleProps(props, allData, ATTRIBUTES), {\n    _allData: allData\n  });\n\n  return {\n    opacity: getAttributeFunctor(compatibleProps, 'opacity'),\n    color: getAttributeFunctor(compatibleProps, 'color')\n  };\n}\n\nvar Treemap = function (_React$Component) {\n  _inherits(Treemap, _React$Component);\n\n  function Treemap(props) {\n    _classCallCheck(this, Treemap);\n\n    var _this = _possibleConstructorReturn(this, (Treemap.__proto__ || Object.getPrototypeOf(Treemap)).call(this, props));\n\n    _this.state = _extends({\n      scales: _getScaleFns(props)\n    }, getInnerDimensions(props, props.margin));\n    return _this;\n  }\n\n  _createClass(Treemap, [{\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps(props) {\n      this.setState(_extends({\n        scales: _getScaleFns(props)\n      }, getInnerDimensions(props, props.margin)));\n    }\n    /**\n     * Create the list of nodes to render.\n     * @returns {Array} Array of nodes.\n     * @private\n     */\n\n  }, {\n    key: '_getNodesToRender',\n    value: function _getNodesToRender() {\n      var _state = this.state,\n          innerWidth = _state.innerWidth,\n          innerHeight = _state.innerHeight;\n      var _props = this.props,\n          data = _props.data,\n          mode = _props.mode,\n          padding = _props.padding,\n          sortFunction = _props.sortFunction,\n          getSize = _props.getSize;\n\n      if (!data) {\n        return [];\n      }\n\n      if (mode === 'partition' || mode === 'partition-pivot') {\n        var partitionFunction = partition().size(mode === 'partition-pivot' ? [innerHeight, innerWidth] : [innerWidth, innerHeight]).padding(padding);\n\n        var _structuredInput = hierarchy(data).sum(getSize).sort(function (a, b) {\n          return sortFunction(a, b, getSize);\n        });\n\n        var mappedNodes = partitionFunction(_structuredInput).descendants();\n\n        if (mode === 'partition-pivot') {\n          return mappedNodes.map(function (node) {\n            return _extends({}, node, {\n              x0: node.y0,\n              x1: node.y1,\n              y0: node.x0,\n              y1: node.x1\n            });\n          });\n        }\n\n        return mappedNodes;\n      }\n\n      if (mode === 'circlePack') {\n        var packingFunction = pack().size([innerWidth, innerHeight]).padding(padding);\n\n        var _structuredInput2 = hierarchy(data).sum(getSize).sort(function (a, b) {\n          return sortFunction(a, b, getSize);\n        });\n\n        return packingFunction(_structuredInput2).descendants();\n      }\n\n      var tileFn = TREEMAP_TILE_MODES[mode];\n      var treemapingFunction = treemap(tileFn).tile(tileFn).size([innerWidth, innerHeight]).padding(padding);\n      var structuredInput = hierarchy(data).sum(getSize).sort(function (a, b) {\n        return sortFunction(a, b, getSize);\n      });\n      return treemapingFunction(structuredInput).descendants();\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var renderMode = this.props.renderMode;\n      var scales = this.state.scales;\n\n      var nodes = this._getNodesToRender();\n\n      var TreemapElement = renderMode === 'SVG' ? TreemapSVG : TreemapDOM;\n      return React.createElement(TreemapElement, _extends({}, this.props, {\n        nodes: nodes,\n        scales: scales\n      }));\n    }\n  }]);\n\n  return Treemap;\n}(React.Component);\n\nTreemap.displayName = 'Treemap';\nTreemap.defaultProps = {\n  className: '',\n  colorRange: CONTINUOUS_COLOR_RANGE,\n  _colorValue: DEFAULT_COLOR,\n  data: {\n    children: []\n  },\n  hideRootNode: false,\n  margin: DEFAULT_MARGINS,\n  mode: 'squarify',\n  onLeafClick: NOOP,\n  onLeafMouseOver: NOOP,\n  onLeafMouseOut: NOOP,\n  opacityType: OPACITY_TYPE,\n  _opacityValue: DEFAULT_OPACITY,\n  padding: 1,\n  sortFunction: function sortFunction(a, b, accessor) {\n    if (!accessor) {\n      return 0;\n    }\n\n    return accessor(a) - accessor(b);\n  },\n  getSize: function getSize(d) {\n    return d.size;\n  },\n  getColor: function getColor(d) {\n    return d.color;\n  },\n  getLabel: function getLabel(d) {\n    return d.title;\n  }\n};\nexport default Treemap;","import dice from \"./dice.js\";\nimport slice from \"./slice.js\";\nexport default function (parent, x0, y0, x1, y1) {\n  (parent.depth & 1 ? slice : dice)(parent, x0, y0, x1, y1);\n}","export default function (parent, x0, y0, x1, y1) {\n  var nodes = parent.children,\n      i,\n      n = nodes.length,\n      sum,\n      sums = new Array(n + 1);\n\n  for (sums[0] = sum = i = 0; i < n; ++i) {\n    sums[i + 1] = sum += nodes[i].value;\n  }\n\n  partition(0, n, parent.value, x0, y0, x1, y1);\n\n  function partition(i, j, value, x0, y0, x1, y1) {\n    if (i >= j - 1) {\n      var node = nodes[i];\n      node.x0 = x0, node.y0 = y0;\n      node.x1 = x1, node.y1 = y1;\n      return;\n    }\n\n    var valueOffset = sums[i],\n        valueTarget = value / 2 + valueOffset,\n        k = i + 1,\n        hi = j - 1;\n\n    while (k < hi) {\n      var mid = k + hi >>> 1;\n      if (sums[mid] < valueTarget) k = mid + 1;else hi = mid;\n    }\n\n    if (valueTarget - sums[k - 1] < sums[k] - valueTarget && i + 1 < k) --k;\n    var valueLeft = sums[k] - valueOffset,\n        valueRight = value - valueLeft;\n\n    if (x1 - x0 > y1 - y0) {\n      var xk = (x0 * valueRight + x1 * valueLeft) / value;\n      partition(i, k, valueLeft, x0, y0, xk, y1);\n      partition(k, j, valueRight, xk, y0, x1, y1);\n    } else {\n      var yk = (y0 * valueRight + y1 * valueLeft) / value;\n      partition(i, k, valueLeft, x0, y0, x1, yk);\n      partition(k, j, valueRight, x0, yk, x1, y1);\n    }\n  }\n}","var _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\nfunction _objectWithoutProperties(obj, keys) {\n  var target = {};\n\n  for (var i in obj) {\n    if (keys.indexOf(i) >= 0) continue;\n    if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n    target[i] = obj[i];\n  }\n\n  return target;\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 _possibleConstructorReturn(self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\nimport window from 'global/window';\nimport XYPlot from './plot/xy-plot';\nimport { getDOMNode } from './utils/react-utils';\nvar CONTAINER_REF = 'container'; // As a performance enhancement, we want to only listen once\n\nvar resizeSubscribers = [];\nvar DEBOUNCE_DURATION = 100;\nvar timeoutId = null;\n/**\n * Calls each subscriber, debounced to the\n */\n\nfunction debounceEmitResize() {\n  window.clearTimeout(timeoutId);\n  timeoutId = window.setTimeout(emitResize, DEBOUNCE_DURATION);\n}\n/**\n * Calls each subscriber once syncronously.\n */\n\n\nfunction emitResize() {\n  resizeSubscribers.forEach(function (cb) {\n    return cb();\n  });\n}\n/**\n * Add the given callback to the list of subscribers to be caled when the\n * window resizes. Returns a function that, when called, removes the given\n * callback from the list of subscribers. This function is also resposible for\n * adding and removing the resize listener on `window`.\n *\n * @param {Function} cb - Subscriber callback function\n * @returns {Function} Unsubscribe function\n */\n\n\nfunction subscribeToDebouncedResize(cb) {\n  resizeSubscribers.push(cb); // if we go from zero to one Flexible components instances, add the listener\n\n  if (resizeSubscribers.length === 1) {\n    window.addEventListener('resize', debounceEmitResize);\n  }\n\n  return function unsubscribe() {\n    removeSubscriber(cb); // if we have no Flexible components, remove the listener\n\n    if (resizeSubscribers.length === 0) {\n      window.clearTimeout(timeoutId);\n      window.removeEventListener('resize', debounceEmitResize);\n    }\n  };\n}\n/**\n * Helper for removing the given callback from the list of subscribers.\n *\n * @param {Function} cb - Subscriber callback function\n */\n\n\nfunction removeSubscriber(cb) {\n  var index = resizeSubscribers.indexOf(cb);\n\n  if (index > -1) {\n    resizeSubscribers.splice(index, 1);\n  }\n}\n/**\n * Helper for getting a display name for the child component\n * @param {*} Component React class for the child component.\n * @returns {String} The child components name\n */\n\n\nfunction getDisplayName(Component) {\n  return Component.displayName || Component.name || 'Component';\n}\n/**\n * Add the ability to stretch the visualization on window resize.\n * @param {*} Component React class for the child component.\n * @returns {*} Flexible component.\n */\n\n\nfunction makeFlexible(Component, isWidthFlexible, isHeightFlexible) {\n  var ResultClass = function (_React$Component) {\n    _inherits(ResultClass, _React$Component);\n\n    _createClass(ResultClass, null, [{\n      key: 'propTypes',\n      get: function get() {\n        var _Component$propTypes = Component.propTypes,\n            height = _Component$propTypes.height,\n            width = _Component$propTypes.width,\n            otherPropTypes = _objectWithoutProperties(_Component$propTypes, ['height', 'width']); // eslint-disable-line no-unused-vars\n\n\n        return otherPropTypes;\n      }\n    }]);\n\n    function ResultClass(props) {\n      _classCallCheck(this, ResultClass);\n\n      var _this = _possibleConstructorReturn(this, (ResultClass.__proto__ || Object.getPrototypeOf(ResultClass)).call(this, props));\n\n      _this._onResize = function () {\n        var containerElement = getDOMNode(_this[CONTAINER_REF]);\n        var offsetHeight = containerElement.offsetHeight,\n            offsetWidth = containerElement.offsetWidth;\n        var newHeight = _this.state.height === offsetHeight ? {} : {\n          height: offsetHeight\n        };\n        var newWidth = _this.state.width === offsetWidth ? {} : {\n          width: offsetWidth\n        };\n\n        _this.setState(_extends({}, newHeight, newWidth));\n      };\n\n      _this.state = {\n        height: 0,\n        width: 0\n      };\n      return _this;\n    }\n    /**\n     * Get the width of the container and assign the width.\n     * @private\n     */\n\n\n    _createClass(ResultClass, [{\n      key: 'componentDidMount',\n      value: function componentDidMount() {\n        this._onResize();\n\n        this.cancelSubscription = subscribeToDebouncedResize(this._onResize);\n      }\n    }, {\n      key: 'componentWillReceiveProps',\n      value: function componentWillReceiveProps() {\n        this._onResize();\n      }\n    }, {\n      key: 'componentWillUnmount',\n      value: function componentWillUnmount() {\n        this.cancelSubscription();\n      }\n    }, {\n      key: 'render',\n      value: function render() {\n        var _this2 = this;\n\n        var _state = this.state,\n            height = _state.height,\n            width = _state.width;\n\n        var props = _extends({}, this.props, {\n          animation: height === 0 && width === 0 ? null : this.props.animation\n        });\n\n        var updatedDimensions = _extends({}, isHeightFlexible ? {\n          height: height\n        } : {}, isWidthFlexible ? {\n          width: width\n        } : {});\n\n        return React.createElement('div', {\n          ref: function ref(_ref) {\n            return _this2[CONTAINER_REF] = _ref;\n          },\n          style: {\n            width: '100%',\n            height: '100%'\n          }\n        }, React.createElement(Component, _extends({}, updatedDimensions, props)));\n      }\n    }]);\n\n    return ResultClass;\n  }(React.Component);\n\n  ResultClass.displayName = 'Flexible' + getDisplayName(Component);\n  return ResultClass;\n}\n\nexport function makeHeightFlexible(component) {\n  return makeFlexible(component, false, true);\n}\nexport function makeVisFlexible(component) {\n  return makeFlexible(component, true, true);\n}\nexport function makeWidthFlexible(component) {\n  return makeFlexible(component, true, false);\n}\nexport var FlexibleWidthXYPlot = makeWidthFlexible(XYPlot);\nexport var FlexibleHeightXYPlot = makeHeightFlexible(XYPlot);\nexport var FlexibleXYPlot = makeVisFlexible(XYPlot);","'use strict';\n\nexports.__esModule = true;\nexports['default'] = reorderKeys;\nvar hasWarned = false;\n\nfunction reorderKeys() {\n  if (process.env.NODE_ENV === 'development') {\n    if (!hasWarned) {\n      hasWarned = true;\n      console.error('`reorderKeys` has been removed, since it is no longer needed for TransitionMotion\\'s new styles array API.');\n    }\n  }\n}\n\nmodule.exports = exports['default'];","'use strict';\n\nvar bind = require('function-bind');\n\nvar GetIntrinsic = require('../GetIntrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nmodule.exports = function callBind() {\n  return $reflectApply(bind, $call, arguments);\n};\n\nmodule.exports.apply = function applyBind() {\n  return $reflectApply(bind, $apply, arguments);\n};","'use strict';\n\nvar origSymbol = global.Symbol;\n\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n  if (typeof origSymbol !== 'function') {\n    return false;\n  }\n\n  if (typeof Symbol !== 'function') {\n    return false;\n  }\n\n  if (typeof origSymbol('foo') !== 'symbol') {\n    return false;\n  }\n\n  if (typeof Symbol('bar') !== 'symbol') {\n    return false;\n  }\n\n  return hasSymbolSham();\n};","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nvar $TypeError = TypeError;\n\nmodule.exports = function getPolyfill() {\n  if (!supportsDescriptors) {\n    throw new $TypeError('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n  }\n\n  if (/a/mig.flags === 'gim') {\n    var descriptor = $gOPD(RegExp.prototype, 'flags');\n\n    if (descriptor && typeof descriptor.get === 'function' && typeof /a/.dotAll === 'boolean') {\n      return descriptor.get;\n    }\n  }\n\n  return implementation;\n};","// Generated by CoffeeScript 1.7.1\n(function () {\n  var getNanoSeconds, hrtime, loadTime;\n\n  if (typeof performance !== \"undefined\" && performance !== null && performance.now) {\n    module.exports = function () {\n      return performance.now();\n    };\n  } else if (typeof process !== \"undefined\" && process !== null && process.hrtime) {\n    module.exports = function () {\n      return (getNanoSeconds() - loadTime) / 1e6;\n    };\n\n    hrtime = process.hrtime;\n\n    getNanoSeconds = function getNanoSeconds() {\n      var hr;\n      hr = hrtime();\n      return hr[0] * 1e9 + hr[1];\n    };\n\n    loadTime = getNanoSeconds();\n  } else if (Date.now) {\n    module.exports = function () {\n      return Date.now() - loadTime;\n    };\n\n    loadTime = Date.now();\n  } else {\n    module.exports = function () {\n      return new Date().getTime() - loadTime;\n    };\n\n    loadTime = new Date().getTime();\n  }\n}).call(this);","'use strict';\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = function flags() {\n  if (this != null && this !== $Object(this)) {\n    throw new $TypeError('RegExp.prototype.flags getter called on non-object');\n  }\n\n  var result = '';\n\n  if (this.global) {\n    result += 'g';\n  }\n\n  if (this.ignoreCase) {\n    result += 'i';\n  }\n\n  if (this.multiline) {\n    result += 'm';\n  }\n\n  if (this.dotAll) {\n    result += 's';\n  }\n\n  if (this.unicode) {\n    result += 'u';\n  }\n\n  if (this.sticky) {\n    result += 'y';\n  }\n\n  return result;\n};","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n  return typeof Object.is === 'function' ? Object.is : implementation;\n};","// currently used to initiate the velocity style object to 0\n'use strict';\n\nexports.__esModule = true;\nexports['default'] = mapToZero;\n\nfunction mapToZero(obj) {\n  var ret = {};\n\n  for (var key in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, key)) {\n      ret[key] = 0;\n    }\n  }\n\n  return ret;\n}\n\nmodule.exports = exports['default'];","'use strict';\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n  var target = this;\n\n  if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n    throw new TypeError(ERROR_MESSAGE + target);\n  }\n\n  var args = slice.call(arguments, 1);\n  var bound;\n\n  var binder = function binder() {\n    if (this instanceof bound) {\n      var result = target.apply(this, args.concat(slice.call(arguments)));\n\n      if (Object(result) === result) {\n        return result;\n      }\n\n      return this;\n    } else {\n      return target.apply(that, args.concat(slice.call(arguments)));\n    }\n  };\n\n  var boundLength = Math.max(0, target.length - args.length);\n  var boundArgs = [];\n\n  for (var i = 0; i < boundLength; i++) {\n    boundArgs.push('$' + i);\n  }\n\n  bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n  if (target.prototype) {\n    var Empty = function Empty() {};\n\n    Empty.prototype = target.prototype;\n    bound.prototype = new Empty();\n    Empty.prototype = null;\n  }\n\n  return bound;\n};","// Generated by CoffeeScript 1.12.2\n(function () {\n  var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n  if (typeof performance !== \"undefined\" && performance !== null && performance.now) {\n    module.exports = function () {\n      return performance.now();\n    };\n  } else if (typeof process !== \"undefined\" && process !== null && process.hrtime) {\n    module.exports = function () {\n      return (getNanoSeconds() - nodeLoadTime) / 1e6;\n    };\n\n    hrtime = process.hrtime;\n\n    getNanoSeconds = function getNanoSeconds() {\n      var hr;\n      hr = hrtime();\n      return hr[0] * 1e9 + hr[1];\n    };\n\n    moduleLoadTime = getNanoSeconds();\n    upTime = process.uptime() * 1e9;\n    nodeLoadTime = moduleLoadTime - upTime;\n  } else if (Date.now) {\n    module.exports = function () {\n      return Date.now() - loadTime;\n    };\n\n    loadTime = Date.now();\n  } else {\n    module.exports = function () {\n      return new Date().getTime() - loadTime;\n    };\n\n    loadTime = new Date().getTime();\n  }\n}).call(this);","'use strict';\n\nvar define = require('define-properties');\n\nvar callBind = require('es-abstract/helpers/callBind');\n\nvar implementation = require('./implementation');\n\nvar getPolyfill = require('./polyfill');\n\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Object);\ndefine(polyfill, {\n  getPolyfill: getPolyfill,\n  implementation: implementation,\n  shim: shim\n});\nmodule.exports = polyfill;","var objectKeys = require('object-keys');\n\nvar isArguments = require('is-arguments');\n\nvar is = require('object-is');\n\nvar isRegex = require('is-regex');\n\nvar flags = require('regexp.prototype.flags');\n\nvar isDate = require('is-date-object');\n\nvar getTime = Date.prototype.getTime;\n\nfunction deepEqual(actual, expected, options) {\n  var opts = options || {}; // 7.1. All identical values are equivalent, as determined by ===.\n\n  if (opts.strict ? is(actual, expected) : actual === expected) {\n    return true;\n  } // 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.\n\n\n  if (!actual || !expected || typeof actual !== 'object' && typeof expected !== 'object') {\n    return opts.strict ? is(actual, expected) : actual == expected;\n  }\n  /*\n   * 7.4. For all other Object pairs, including Array objects, equivalence is\n   * determined by having the same number of owned properties (as verified\n   * with Object.prototype.hasOwnProperty.call), the same set of keys\n   * (although not necessarily the same order), equivalent values for every\n   * corresponding key, and an identical 'prototype' property. Note: this\n   * accounts for both named and indexed properties on Arrays.\n   */\n  // eslint-disable-next-line no-use-before-define\n\n\n  return objEquiv(actual, expected, opts);\n}\n\nfunction isUndefinedOrNull(value) {\n  return value === null || value === undefined;\n}\n\nfunction isBuffer(x) {\n  if (!x || typeof x !== 'object' || typeof x.length !== 'number') {\n    return false;\n  }\n\n  if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {\n    return false;\n  }\n\n  if (x.length > 0 && typeof x[0] !== 'number') {\n    return false;\n  }\n\n  return true;\n}\n\nfunction objEquiv(a, b, opts) {\n  /* eslint max-statements: [2, 50] */\n  var i, key;\n\n  if (typeof a !== typeof b) {\n    return false;\n  }\n\n  if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) {\n    return false;\n  } // an identical 'prototype' property.\n\n\n  if (a.prototype !== b.prototype) {\n    return false;\n  }\n\n  if (isArguments(a) !== isArguments(b)) {\n    return false;\n  }\n\n  var aIsRegex = isRegex(a);\n  var bIsRegex = isRegex(b);\n\n  if (aIsRegex !== bIsRegex) {\n    return false;\n  }\n\n  if (aIsRegex || bIsRegex) {\n    return a.source === b.source && flags(a) === flags(b);\n  }\n\n  if (isDate(a) && isDate(b)) {\n    return getTime.call(a) === getTime.call(b);\n  }\n\n  var aIsBuffer = isBuffer(a);\n  var bIsBuffer = isBuffer(b);\n\n  if (aIsBuffer !== bIsBuffer) {\n    return false;\n  }\n\n  if (aIsBuffer || bIsBuffer) {\n    // && would work too, because both are true or both false here\n    if (a.length !== b.length) {\n      return false;\n    }\n\n    for (i = 0; i < a.length; i++) {\n      if (a[i] !== b[i]) {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  if (typeof a !== typeof b) {\n    return false;\n  }\n\n  try {\n    var ka = objectKeys(a);\n    var kb = objectKeys(b);\n  } catch (e) {\n    // happens when one is a string literal and the other isn't\n    return false;\n  } // having the same number of owned properties (keys incorporates hasOwnProperty)\n\n\n  if (ka.length !== kb.length) {\n    return false;\n  } // the same set of keys (although not necessarily the same order),\n\n\n  ka.sort();\n  kb.sort(); // ~~~cheap key test\n\n  for (i = ka.length - 1; i >= 0; i--) {\n    if (ka[i] != kb[i]) {\n      return false;\n    }\n  } // equivalent values for every corresponding key, and ~~~possibly expensive deep test\n\n\n  for (i = ka.length - 1; i >= 0; i--) {\n    key = ka[i];\n\n    if (!deepEqual(a[key], b[key], opts)) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nmodule.exports = deepEqual;","// stepper is used a lot. Saves allocation to return the same array wrapper.\n// This is fine and danger-free against mutations because the callsite\n// immediately destructures it and gets the numbers inside without passing the\n\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = stepper;\nvar reusedTuple = [0, 0];\n\nfunction stepper(secondPerFrame, x, v, destX, k, b, precision) {\n  // Spring stiffness, in kg / s^2\n  // for animations, destX is really spring length (spring at rest). initial\n  // position is considered as the stretched/compressed position of a spring\n  var Fspring = -k * (x - destX); // Damping, in kg / s\n\n  var Fdamper = -b * v; // usually we put mass here, but for animation purposes, specifying mass is a\n  // bit redundant. you could simply adjust k and b accordingly\n  // let a = (Fspring + Fdamper) / mass;\n\n  var a = Fspring + Fdamper;\n  var newV = v + a * secondPerFrame;\n  var newX = x + newV * secondPerFrame;\n\n  if (Math.abs(newV) < precision && Math.abs(newX - destX) < precision) {\n    reusedTuple[0] = destX;\n    reusedTuple[1] = 0;\n    return reusedTuple;\n  }\n\n  reusedTuple[0] = newX;\n  reusedTuple[1] = newV;\n  return reusedTuple;\n}\n\nmodule.exports = exports[\"default\"]; // array reference around.","// usage assumption: currentStyle values have already been rendered but it says\n// nothing of whether currentStyle is stale (see unreadPropStyle)\n'use strict';\n\nexports.__esModule = true;\nexports['default'] = shouldStopAnimation;\n\nfunction shouldStopAnimation(currentStyle, style, currentVelocity) {\n  for (var key in style) {\n    if (!Object.prototype.hasOwnProperty.call(style, key)) {\n      continue;\n    }\n\n    if (currentVelocity[key] !== 0) {\n      return false;\n    }\n\n    var styleValue = typeof style[key] === 'number' ? style[key] : style[key].val; // stepper will have already taken care of rounding precision errors, so\n    // won't have such thing as 0.9999 !=== 1\n\n    if (currentStyle[key] !== styleValue) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\nfunction _interopRequireDefault(obj) {\n  return obj && obj.__esModule ? obj : {\n    'default': obj\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 _inherits(subClass, superClass) {\n  if (typeof superClass !== 'function' && superClass !== null) {\n    throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar _mapToZero = require('./mapToZero');\n\nvar _mapToZero2 = _interopRequireDefault(_mapToZero);\n\nvar _stripStyle = require('./stripStyle');\n\nvar _stripStyle2 = _interopRequireDefault(_stripStyle);\n\nvar _stepper3 = require('./stepper');\n\nvar _stepper4 = _interopRequireDefault(_stepper3);\n\nvar _mergeDiff = require('./mergeDiff');\n\nvar _mergeDiff2 = _interopRequireDefault(_mergeDiff);\n\nvar _performanceNow = require('performance-now');\n\nvar _performanceNow2 = _interopRequireDefault(_performanceNow);\n\nvar _raf = require('raf');\n\nvar _raf2 = _interopRequireDefault(_raf);\n\nvar _shouldStopAnimation = require('./shouldStopAnimation');\n\nvar _shouldStopAnimation2 = _interopRequireDefault(_shouldStopAnimation);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar msPerFrame = 1000 / 60; // the children function & (potential) styles function asks as param an\n// Array<TransitionPlainStyle>, where each TransitionPlainStyle is of the format\n// {key: string, data?: any, style: PlainStyle}. However, the way we keep\n// internal states doesn't contain such a data structure (check the state and\n// TransitionMotionState). So when children function and others ask for such\n// data we need to generate them on the fly by combining mergedPropsStyles and\n// currentStyles/lastIdealStyles\n\nfunction rehydrateStyles(mergedPropsStyles, unreadPropStyles, plainStyles) {\n  // Copy the value to a `const` so that Flow understands that the const won't\n  // change and will be non-nullable in the callback below.\n  var cUnreadPropStyles = unreadPropStyles;\n\n  if (cUnreadPropStyles == null) {\n    return mergedPropsStyles.map(function (mergedPropsStyle, i) {\n      return {\n        key: mergedPropsStyle.key,\n        data: mergedPropsStyle.data,\n        style: plainStyles[i]\n      };\n    });\n  }\n\n  return mergedPropsStyles.map(function (mergedPropsStyle, i) {\n    for (var j = 0; j < cUnreadPropStyles.length; j++) {\n      if (cUnreadPropStyles[j].key === mergedPropsStyle.key) {\n        return {\n          key: cUnreadPropStyles[j].key,\n          data: cUnreadPropStyles[j].data,\n          style: plainStyles[i]\n        };\n      }\n    }\n\n    return {\n      key: mergedPropsStyle.key,\n      data: mergedPropsStyle.data,\n      style: plainStyles[i]\n    };\n  });\n}\n\nfunction shouldStopAnimationAll(currentStyles, destStyles, currentVelocities, mergedPropsStyles) {\n  if (mergedPropsStyles.length !== destStyles.length) {\n    return false;\n  }\n\n  for (var i = 0; i < mergedPropsStyles.length; i++) {\n    if (mergedPropsStyles[i].key !== destStyles[i].key) {\n      return false;\n    }\n  } // we have the invariant that mergedPropsStyles and\n  // currentStyles/currentVelocities/last* are synced in terms of cells, see\n  // mergeAndSync comment for more info\n\n\n  for (var i = 0; i < mergedPropsStyles.length; i++) {\n    if (!_shouldStopAnimation2['default'](currentStyles[i], destStyles[i].style, currentVelocities[i])) {\n      return false;\n    }\n  }\n\n  return true;\n} // core key merging logic\n// things to do: say previously merged style is {a, b}, dest style (prop) is {b,\n// c}, previous current (interpolating) style is {a, b}\n// **invariant**: current[i] corresponds to merged[i] in terms of key\n// steps:\n// turn merged style into {a?, b, c}\n//    add c, value of c is destStyles.c\n//    maybe remove a, aka call willLeave(a), then merged is either {b, c} or {a, b, c}\n// turn current (interpolating) style from {a, b} into {a?, b, c}\n//    maybe remove a\n//    certainly add c, value of c is willEnter(c)\n// loop over merged and construct new current\n// dest doesn't change, that's owner's\n\n\nfunction mergeAndSync(willEnter, willLeave, didLeave, oldMergedPropsStyles, destStyles, oldCurrentStyles, oldCurrentVelocities, oldLastIdealStyles, oldLastIdealVelocities) {\n  var newMergedPropsStyles = _mergeDiff2['default'](oldMergedPropsStyles, destStyles, function (oldIndex, oldMergedPropsStyle) {\n    var leavingStyle = willLeave(oldMergedPropsStyle);\n\n    if (leavingStyle == null) {\n      didLeave({\n        key: oldMergedPropsStyle.key,\n        data: oldMergedPropsStyle.data\n      });\n      return null;\n    }\n\n    if (_shouldStopAnimation2['default'](oldCurrentStyles[oldIndex], leavingStyle, oldCurrentVelocities[oldIndex])) {\n      didLeave({\n        key: oldMergedPropsStyle.key,\n        data: oldMergedPropsStyle.data\n      });\n      return null;\n    }\n\n    return {\n      key: oldMergedPropsStyle.key,\n      data: oldMergedPropsStyle.data,\n      style: leavingStyle\n    };\n  });\n\n  var newCurrentStyles = [];\n  var newCurrentVelocities = [];\n  var newLastIdealStyles = [];\n  var newLastIdealVelocities = [];\n\n  for (var i = 0; i < newMergedPropsStyles.length; i++) {\n    var newMergedPropsStyleCell = newMergedPropsStyles[i];\n    var foundOldIndex = null;\n\n    for (var j = 0; j < oldMergedPropsStyles.length; j++) {\n      if (oldMergedPropsStyles[j].key === newMergedPropsStyleCell.key) {\n        foundOldIndex = j;\n        break;\n      }\n    } // TODO: key search code\n\n\n    if (foundOldIndex == null) {\n      var plainStyle = willEnter(newMergedPropsStyleCell);\n      newCurrentStyles[i] = plainStyle;\n      newLastIdealStyles[i] = plainStyle;\n\n      var velocity = _mapToZero2['default'](newMergedPropsStyleCell.style);\n\n      newCurrentVelocities[i] = velocity;\n      newLastIdealVelocities[i] = velocity;\n    } else {\n      newCurrentStyles[i] = oldCurrentStyles[foundOldIndex];\n      newLastIdealStyles[i] = oldLastIdealStyles[foundOldIndex];\n      newCurrentVelocities[i] = oldCurrentVelocities[foundOldIndex];\n      newLastIdealVelocities[i] = oldLastIdealVelocities[foundOldIndex];\n    }\n  }\n\n  return [newMergedPropsStyles, newCurrentStyles, newCurrentVelocities, newLastIdealStyles, newLastIdealVelocities];\n}\n\nvar TransitionMotion = function (_React$Component) {\n  _inherits(TransitionMotion, _React$Component);\n\n  _createClass(TransitionMotion, null, [{\n    key: 'propTypes',\n    value: {\n      defaultStyles: _propTypes2['default'].arrayOf(_propTypes2['default'].shape({\n        key: _propTypes2['default'].string.isRequired,\n        data: _propTypes2['default'].any,\n        style: _propTypes2['default'].objectOf(_propTypes2['default'].number).isRequired\n      })),\n      styles: _propTypes2['default'].oneOfType([_propTypes2['default'].func, _propTypes2['default'].arrayOf(_propTypes2['default'].shape({\n        key: _propTypes2['default'].string.isRequired,\n        data: _propTypes2['default'].any,\n        style: _propTypes2['default'].objectOf(_propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].object])).isRequired\n      }))]).isRequired,\n      children: _propTypes2['default'].func.isRequired,\n      willEnter: _propTypes2['default'].func,\n      willLeave: _propTypes2['default'].func,\n      didLeave: _propTypes2['default'].func\n    },\n    enumerable: true\n  }, {\n    key: 'defaultProps',\n    value: {\n      willEnter: function willEnter(styleThatEntered) {\n        return _stripStyle2['default'](styleThatEntered.style);\n      },\n      // recall: returning null makes the current unmounting TransitionStyle\n      // disappear immediately\n      willLeave: function willLeave() {\n        return null;\n      },\n      didLeave: function didLeave() {}\n    },\n    enumerable: true\n  }]);\n\n  function TransitionMotion(props) {\n    var _this = this;\n\n    _classCallCheck(this, TransitionMotion);\n\n    _React$Component.call(this, props);\n\n    this.unmounting = false;\n    this.animationID = null;\n    this.prevTime = 0;\n    this.accumulatedTime = 0;\n    this.unreadPropStyles = null;\n\n    this.clearUnreadPropStyle = function (unreadPropStyles) {\n      var _mergeAndSync = mergeAndSync(_this.props.willEnter, _this.props.willLeave, _this.props.didLeave, _this.state.mergedPropsStyles, unreadPropStyles, _this.state.currentStyles, _this.state.currentVelocities, _this.state.lastIdealStyles, _this.state.lastIdealVelocities);\n\n      var mergedPropsStyles = _mergeAndSync[0];\n      var currentStyles = _mergeAndSync[1];\n      var currentVelocities = _mergeAndSync[2];\n      var lastIdealStyles = _mergeAndSync[3];\n      var lastIdealVelocities = _mergeAndSync[4];\n\n      for (var i = 0; i < unreadPropStyles.length; i++) {\n        var unreadPropStyle = unreadPropStyles[i].style;\n        var dirty = false;\n\n        for (var key in unreadPropStyle) {\n          if (!Object.prototype.hasOwnProperty.call(unreadPropStyle, key)) {\n            continue;\n          }\n\n          var styleValue = unreadPropStyle[key];\n\n          if (typeof styleValue === 'number') {\n            if (!dirty) {\n              dirty = true;\n              currentStyles[i] = _extends({}, currentStyles[i]);\n              currentVelocities[i] = _extends({}, currentVelocities[i]);\n              lastIdealStyles[i] = _extends({}, lastIdealStyles[i]);\n              lastIdealVelocities[i] = _extends({}, lastIdealVelocities[i]);\n              mergedPropsStyles[i] = {\n                key: mergedPropsStyles[i].key,\n                data: mergedPropsStyles[i].data,\n                style: _extends({}, mergedPropsStyles[i].style)\n              };\n            }\n\n            currentStyles[i][key] = styleValue;\n            currentVelocities[i][key] = 0;\n            lastIdealStyles[i][key] = styleValue;\n            lastIdealVelocities[i][key] = 0;\n            mergedPropsStyles[i].style[key] = styleValue;\n          }\n        }\n      } // unlike the other 2 components, we can't detect staleness and optionally\n      // opt out of setState here. each style object's data might contain new\n      // stuff we're not/cannot compare\n\n\n      _this.setState({\n        currentStyles: currentStyles,\n        currentVelocities: currentVelocities,\n        mergedPropsStyles: mergedPropsStyles,\n        lastIdealStyles: lastIdealStyles,\n        lastIdealVelocities: lastIdealVelocities\n      });\n    };\n\n    this.startAnimationIfNecessary = function () {\n      if (_this.unmounting) {\n        return;\n      } // TODO: when config is {a: 10} and dest is {a: 10} do we raf once and\n      // call cb? No, otherwise accidental parent rerender causes cb trigger\n\n\n      _this.animationID = _raf2['default'](function (timestamp) {\n        // https://github.com/chenglou/react-motion/pull/420\n        // > if execution passes the conditional if (this.unmounting), then\n        // executes async defaultRaf and after that component unmounts and after\n        // that the callback of defaultRaf is called, then setState will be called\n        // on unmounted component.\n        if (_this.unmounting) {\n          return;\n        }\n\n        var propStyles = _this.props.styles;\n        var destStyles = typeof propStyles === 'function' ? propStyles(rehydrateStyles(_this.state.mergedPropsStyles, _this.unreadPropStyles, _this.state.lastIdealStyles)) : propStyles; // check if we need to animate in the first place\n\n        if (shouldStopAnimationAll(_this.state.currentStyles, destStyles, _this.state.currentVelocities, _this.state.mergedPropsStyles)) {\n          // no need to cancel animationID here; shouldn't have any in flight\n          _this.animationID = null;\n          _this.accumulatedTime = 0;\n          return;\n        }\n\n        var currentTime = timestamp || _performanceNow2['default']();\n\n        var timeDelta = currentTime - _this.prevTime;\n        _this.prevTime = currentTime;\n        _this.accumulatedTime = _this.accumulatedTime + timeDelta; // more than 10 frames? prolly switched browser tab. Restart\n\n        if (_this.accumulatedTime > msPerFrame * 10) {\n          _this.accumulatedTime = 0;\n        }\n\n        if (_this.accumulatedTime === 0) {\n          // no need to cancel animationID here; shouldn't have any in flight\n          _this.animationID = null;\n\n          _this.startAnimationIfNecessary();\n\n          return;\n        }\n\n        var currentFrameCompletion = (_this.accumulatedTime - Math.floor(_this.accumulatedTime / msPerFrame) * msPerFrame) / msPerFrame;\n        var framesToCatchUp = Math.floor(_this.accumulatedTime / msPerFrame);\n\n        var _mergeAndSync2 = mergeAndSync(_this.props.willEnter, _this.props.willLeave, _this.props.didLeave, _this.state.mergedPropsStyles, destStyles, _this.state.currentStyles, _this.state.currentVelocities, _this.state.lastIdealStyles, _this.state.lastIdealVelocities);\n\n        var newMergedPropsStyles = _mergeAndSync2[0];\n        var newCurrentStyles = _mergeAndSync2[1];\n        var newCurrentVelocities = _mergeAndSync2[2];\n        var newLastIdealStyles = _mergeAndSync2[3];\n        var newLastIdealVelocities = _mergeAndSync2[4];\n\n        for (var i = 0; i < newMergedPropsStyles.length; i++) {\n          var newMergedPropsStyle = newMergedPropsStyles[i].style;\n          var newCurrentStyle = {};\n          var newCurrentVelocity = {};\n          var newLastIdealStyle = {};\n          var newLastIdealVelocity = {};\n\n          for (var key in newMergedPropsStyle) {\n            if (!Object.prototype.hasOwnProperty.call(newMergedPropsStyle, key)) {\n              continue;\n            }\n\n            var styleValue = newMergedPropsStyle[key];\n\n            if (typeof styleValue === 'number') {\n              newCurrentStyle[key] = styleValue;\n              newCurrentVelocity[key] = 0;\n              newLastIdealStyle[key] = styleValue;\n              newLastIdealVelocity[key] = 0;\n            } else {\n              var newLastIdealStyleValue = newLastIdealStyles[i][key];\n              var newLastIdealVelocityValue = newLastIdealVelocities[i][key];\n\n              for (var j = 0; j < framesToCatchUp; j++) {\n                var _stepper = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);\n\n                newLastIdealStyleValue = _stepper[0];\n                newLastIdealVelocityValue = _stepper[1];\n              }\n\n              var _stepper2 = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);\n\n              var nextIdealX = _stepper2[0];\n              var nextIdealV = _stepper2[1];\n              newCurrentStyle[key] = newLastIdealStyleValue + (nextIdealX - newLastIdealStyleValue) * currentFrameCompletion;\n              newCurrentVelocity[key] = newLastIdealVelocityValue + (nextIdealV - newLastIdealVelocityValue) * currentFrameCompletion;\n              newLastIdealStyle[key] = newLastIdealStyleValue;\n              newLastIdealVelocity[key] = newLastIdealVelocityValue;\n            }\n          }\n\n          newLastIdealStyles[i] = newLastIdealStyle;\n          newLastIdealVelocities[i] = newLastIdealVelocity;\n          newCurrentStyles[i] = newCurrentStyle;\n          newCurrentVelocities[i] = newCurrentVelocity;\n        }\n\n        _this.animationID = null; // the amount we're looped over above\n\n        _this.accumulatedTime -= framesToCatchUp * msPerFrame;\n\n        _this.setState({\n          currentStyles: newCurrentStyles,\n          currentVelocities: newCurrentVelocities,\n          lastIdealStyles: newLastIdealStyles,\n          lastIdealVelocities: newLastIdealVelocities,\n          mergedPropsStyles: newMergedPropsStyles\n        });\n\n        _this.unreadPropStyles = null;\n\n        _this.startAnimationIfNecessary();\n      });\n    };\n\n    this.state = this.defaultState();\n  }\n\n  TransitionMotion.prototype.defaultState = function defaultState() {\n    var _props = this.props;\n    var defaultStyles = _props.defaultStyles;\n    var styles = _props.styles;\n    var willEnter = _props.willEnter;\n    var willLeave = _props.willLeave;\n    var didLeave = _props.didLeave;\n    var destStyles = typeof styles === 'function' ? styles(defaultStyles) : styles; // this is special. for the first time around, we don't have a comparison\n    // between last (no last) and current merged props. we'll compute last so:\n    // say default is {a, b} and styles (dest style) is {b, c}, we'll\n    // fabricate last as {a, b}\n\n    var oldMergedPropsStyles = undefined;\n\n    if (defaultStyles == null) {\n      oldMergedPropsStyles = destStyles;\n    } else {\n      oldMergedPropsStyles = defaultStyles.map(function (defaultStyleCell) {\n        // TODO: key search code\n        for (var i = 0; i < destStyles.length; i++) {\n          if (destStyles[i].key === defaultStyleCell.key) {\n            return destStyles[i];\n          }\n        }\n\n        return defaultStyleCell;\n      });\n    }\n\n    var oldCurrentStyles = defaultStyles == null ? destStyles.map(function (s) {\n      return _stripStyle2['default'](s.style);\n    }) : defaultStyles.map(function (s) {\n      return _stripStyle2['default'](s.style);\n    });\n    var oldCurrentVelocities = defaultStyles == null ? destStyles.map(function (s) {\n      return _mapToZero2['default'](s.style);\n    }) : defaultStyles.map(function (s) {\n      return _mapToZero2['default'](s.style);\n    });\n\n    var _mergeAndSync3 = mergeAndSync( // Because this is an old-style createReactClass component, Flow doesn't\n    // understand that the willEnter and willLeave props have default values\n    // and will always be present.\n    willEnter, willLeave, didLeave, oldMergedPropsStyles, destStyles, oldCurrentStyles, oldCurrentVelocities, oldCurrentStyles, // oldLastIdealStyles really\n    oldCurrentVelocities);\n\n    var mergedPropsStyles = _mergeAndSync3[0];\n    var currentStyles = _mergeAndSync3[1];\n    var currentVelocities = _mergeAndSync3[2];\n    var lastIdealStyles = _mergeAndSync3[3];\n    var lastIdealVelocities = _mergeAndSync3[4]; // oldLastIdealVelocities really\n\n    return {\n      currentStyles: currentStyles,\n      currentVelocities: currentVelocities,\n      lastIdealStyles: lastIdealStyles,\n      lastIdealVelocities: lastIdealVelocities,\n      mergedPropsStyles: mergedPropsStyles\n    };\n  }; // after checking for unreadPropStyles != null, we manually go set the\n  // non-interpolating values (those that are a number, without a spring\n  // config)\n\n\n  TransitionMotion.prototype.componentDidMount = function componentDidMount() {\n    this.prevTime = _performanceNow2['default']();\n    this.startAnimationIfNecessary();\n  };\n\n  TransitionMotion.prototype.componentWillReceiveProps = function componentWillReceiveProps(props) {\n    if (this.unreadPropStyles) {\n      // previous props haven't had the chance to be set yet; set them here\n      this.clearUnreadPropStyle(this.unreadPropStyles);\n    }\n\n    var styles = props.styles;\n\n    if (typeof styles === 'function') {\n      this.unreadPropStyles = styles(rehydrateStyles(this.state.mergedPropsStyles, this.unreadPropStyles, this.state.lastIdealStyles));\n    } else {\n      this.unreadPropStyles = styles;\n    }\n\n    if (this.animationID == null) {\n      this.prevTime = _performanceNow2['default']();\n      this.startAnimationIfNecessary();\n    }\n  };\n\n  TransitionMotion.prototype.componentWillUnmount = function componentWillUnmount() {\n    this.unmounting = true;\n\n    if (this.animationID != null) {\n      _raf2['default'].cancel(this.animationID);\n\n      this.animationID = null;\n    }\n  };\n\n  TransitionMotion.prototype.render = function render() {\n    var hydratedStyles = rehydrateStyles(this.state.mergedPropsStyles, this.unreadPropStyles, this.state.currentStyles);\n    var renderedChildren = this.props.children(hydratedStyles);\n    return renderedChildren && _react2['default'].Children.only(renderedChildren);\n  };\n\n  return TransitionMotion;\n}(_react2['default'].Component);\n\nexports['default'] = TransitionMotion;\nmodule.exports = exports['default']; // list of styles, each containing interpolating values. Part of what's passed\n// to children function. Notice that this is\n// Array<ActualInterpolatingStyleObject>, without the wrapper that is {key: ...,\n// data: ... style: ActualInterpolatingStyleObject}. Only mergedPropsStyles\n// contains the key & data info (so that we only have a single source of truth\n// for these, and to save space). Check the comment for `rehydrateStyles` to\n// see how we regenerate the entirety of what's passed to children function\n// the array that keeps track of currently rendered stuff! Including stuff\n// that you've unmounted but that's still animating. This is where it lives\n// it's possible that currentStyle's value is stale: if props is immediately\n// changed from 0 to 400 to spring(0) again, the async currentStyle is still\n// at 0 (didn't have time to tick and interpolate even once). If we naively\n// compare currentStyle with destVal it'll be 0 === 0 (no animation, stop).\n// In reality currentStyle should be 400","// core keys merging algorithm. If previous render's keys are [a, b], and the\n// next render's [c, b, d], what's the final merged keys and ordering?\n// - c and a must both be before b\n// - b before d\n// - ordering between a and c ambiguous\n// this reduces to merging two partially ordered lists (e.g. lists where not\n// every item has a definite ordering, like comparing a and c above). For the\n// ambiguous ordering we deterministically choose to place the next render's\n// item after the previous'; so c after a\n// this is called a topological sorting. Except the existing algorithms don't\n// work well with js bc of the amount of allocation, and isn't optimized for our\n// current use-case bc the runtime is linear in terms of edges (see wiki for\n// meaning), which is huge when two lists have many common elements\n'use strict';\n\nexports.__esModule = true;\nexports['default'] = mergeDiff;\n\nfunction mergeDiff(prev, next, onRemove) {\n  // bookkeeping for easier access of a key's index below. This is 2 allocations +\n  // potentially triggering chrome hash map mode for objs (so it might be faster\n  var prevKeyIndex = {};\n\n  for (var i = 0; i < prev.length; i++) {\n    prevKeyIndex[prev[i].key] = i;\n  }\n\n  var nextKeyIndex = {};\n\n  for (var i = 0; i < next.length; i++) {\n    nextKeyIndex[next[i].key] = i;\n  } // first, an overly elaborate way of merging prev and next, eliminating\n  // duplicates (in terms of keys). If there's dupe, keep the item in next).\n  // This way of writing it saves allocations\n\n\n  var ret = [];\n\n  for (var i = 0; i < next.length; i++) {\n    ret[i] = next[i];\n  }\n\n  for (var i = 0; i < prev.length; i++) {\n    if (!Object.prototype.hasOwnProperty.call(nextKeyIndex, prev[i].key)) {\n      // this is called my TM's `mergeAndSync`, which calls willLeave. We don't\n      // merge in keys that the user desires to kill\n      var fill = onRemove(i, prev[i]);\n\n      if (fill != null) {\n        ret.push(fill);\n      }\n    }\n  } // now all the items all present. Core sorting logic to have the right order\n\n\n  return ret.sort(function (a, b) {\n    var nextOrderA = nextKeyIndex[a.key];\n    var nextOrderB = nextKeyIndex[b.key];\n    var prevOrderA = prevKeyIndex[a.key];\n    var prevOrderB = prevKeyIndex[b.key];\n\n    if (nextOrderA != null && nextOrderB != null) {\n      // both keys in next\n      return nextKeyIndex[a.key] - nextKeyIndex[b.key];\n    } else if (prevOrderA != null && prevOrderB != null) {\n      // both keys in prev\n      return prevKeyIndex[a.key] - prevKeyIndex[b.key];\n    } else if (nextOrderA != null) {\n      // key a in next, key b in prev\n      // how to determine the order between a and b? We find a \"pivot\" (term\n      // abuse), a key present in both prev and next, that is sandwiched between\n      // a and b. In the context of our above example, if we're comparing a and\n      // d, b's (the only) pivot\n      for (var i = 0; i < next.length; i++) {\n        var pivot = next[i].key;\n\n        if (!Object.prototype.hasOwnProperty.call(prevKeyIndex, pivot)) {\n          continue;\n        }\n\n        if (nextOrderA < nextKeyIndex[pivot] && prevOrderB > prevKeyIndex[pivot]) {\n          return -1;\n        } else if (nextOrderA > nextKeyIndex[pivot] && prevOrderB < prevKeyIndex[pivot]) {\n          return 1;\n        }\n      } // pluggable. default to: next bigger than prev\n\n\n      return 1;\n    } // prevOrderA, nextOrderB\n\n\n    for (var i = 0; i < next.length; i++) {\n      var pivot = next[i].key;\n\n      if (!Object.prototype.hasOwnProperty.call(prevKeyIndex, pivot)) {\n        continue;\n      }\n\n      if (nextOrderB < nextKeyIndex[pivot] && prevOrderA > prevKeyIndex[pivot]) {\n        return 1;\n      } else if (nextOrderB > nextKeyIndex[pivot] && prevOrderA < prevKeyIndex[pivot]) {\n        return -1;\n      }\n    } // pluggable. default to: next bigger than prev\n\n\n    return -1;\n  });\n}\n\nmodule.exports = exports['default']; // to loop through and find a key's index each time), but I no longer care","var _slicedToArray = function () {\n  function sliceIterator(arr, i) {\n    var _arr = [];\n    var _n = true;\n    var _d = false;\n    var _e = undefined;\n\n    try {\n      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n        _arr.push(_s.value);\n\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\"]) _i[\"return\"]();\n      } finally {\n        if (_d) throw _e;\n      }\n    }\n\n    return _arr;\n  }\n\n  return function (arr, i) {\n    if (Array.isArray(arr)) {\n      return arr;\n    } else if (Symbol.iterator in Object(arr)) {\n      return sliceIterator(arr, i);\n    } else {\n      throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n    }\n  };\n}(); // Copyright (c) 2016 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\nimport React from 'react';\n\nvar _React$version$split = React.version.split('.'),\n    _React$version$split2 = _slicedToArray(_React$version$split, 2),\n    major = _React$version$split2[0],\n    minor = _React$version$split2[1];\n\nvar versionHigherThanThirteen = Number(minor) > 13 || Number(major) > 13;\nexport var isReactDOMSupported = function isReactDOMSupported() {\n  return versionHigherThanThirteen;\n};\n/**\n * Support React 0.13 and greater where refs are React components, not DOM\n * nodes.\n * @param {*} ref React's ref.\n * @returns {Element} DOM element.\n */\n\nexport var getDOMNode = function getDOMNode(ref) {\n  if (!isReactDOMSupported()) {\n    return ref && ref.getDOMNode();\n  }\n\n  return ref;\n};\nvar USED_MESSAGES = {};\nvar HIDDEN_PROCESSES = {\n  test: true,\n  production: true\n};\n/**\n * Warn the user about something\n * @param {String} message - the message to be shown\n * @param {Boolean} onlyShowMessageOnce - whether or not we allow the\n - message to be show multiple times\n */\n\nexport function warning(message) {\n  var onlyShowMessageOnce = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n  /* eslint-disable no-undef, no-process-env */\n\n  if (global.process && HIDDEN_PROCESSES[process.env.NODE_ENV]) {\n    return;\n  }\n  /* eslint-enable no-undef, no-process-env */\n\n\n  if (!onlyShowMessageOnce || !USED_MESSAGES[message]) {\n    /* eslint-disable no-console */\n    console.warn(message);\n    /* eslint-enable no-console */\n\n    USED_MESSAGES[message] = true;\n  }\n}\n/**\n * Convience wrapper for warning\n * @param {String} message - the message to be shown\n */\n\nexport function warnOnce(message) {\n  warning(message, true);\n}","'use strict';\n\nvar keysShim;\n\nif (!Object.keys) {\n  // modified from https://github.com/es-shims/es5-shim\n  var has = Object.prototype.hasOwnProperty;\n  var toStr = Object.prototype.toString;\n\n  var isArgs = require('./isArguments'); // eslint-disable-line global-require\n\n\n  var isEnumerable = Object.prototype.propertyIsEnumerable;\n  var hasDontEnumBug = !isEnumerable.call({\n    toString: null\n  }, 'toString');\n  var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n  var dontEnums = ['toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor'];\n\n  var equalsConstructorPrototype = function equalsConstructorPrototype(o) {\n    var ctor = o.constructor;\n    return ctor && ctor.prototype === o;\n  };\n\n  var excludedKeys = {\n    $applicationCache: true,\n    $console: true,\n    $external: true,\n    $frame: true,\n    $frameElement: true,\n    $frames: true,\n    $innerHeight: true,\n    $innerWidth: true,\n    $onmozfullscreenchange: true,\n    $onmozfullscreenerror: true,\n    $outerHeight: true,\n    $outerWidth: true,\n    $pageXOffset: true,\n    $pageYOffset: true,\n    $parent: true,\n    $scrollLeft: true,\n    $scrollTop: true,\n    $scrollX: true,\n    $scrollY: true,\n    $self: true,\n    $webkitIndexedDB: true,\n    $webkitStorageInfo: true,\n    $window: true\n  };\n\n  var hasAutomationEqualityBug = function () {\n    /* global window */\n    if (typeof window === 'undefined') {\n      return false;\n    }\n\n    for (var k in window) {\n      try {\n        if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n          try {\n            equalsConstructorPrototype(window[k]);\n          } catch (e) {\n            return true;\n          }\n        }\n      } catch (e) {\n        return true;\n      }\n    }\n\n    return false;\n  }();\n\n  var equalsConstructorPrototypeIfNotBuggy = function equalsConstructorPrototypeIfNotBuggy(o) {\n    /* global window */\n    if (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n      return equalsConstructorPrototype(o);\n    }\n\n    try {\n      return equalsConstructorPrototype(o);\n    } catch (e) {\n      return false;\n    }\n  };\n\n  keysShim = function keys(object) {\n    var isObject = object !== null && typeof object === 'object';\n    var isFunction = toStr.call(object) === '[object Function]';\n    var isArguments = isArgs(object);\n    var isString = isObject && toStr.call(object) === '[object String]';\n    var theKeys = [];\n\n    if (!isObject && !isFunction && !isArguments) {\n      throw new TypeError('Object.keys called on a non-object');\n    }\n\n    var skipProto = hasProtoEnumBug && isFunction;\n\n    if (isString && object.length > 0 && !has.call(object, 0)) {\n      for (var i = 0; i < object.length; ++i) {\n        theKeys.push(String(i));\n      }\n    }\n\n    if (isArguments && object.length > 0) {\n      for (var j = 0; j < object.length; ++j) {\n        theKeys.push(String(j));\n      }\n    } else {\n      for (var name in object) {\n        if (!(skipProto && name === 'prototype') && has.call(object, name)) {\n          theKeys.push(String(name));\n        }\n      }\n    }\n\n    if (hasDontEnumBug) {\n      var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n      for (var k = 0; k < dontEnums.length; ++k) {\n        if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n          theKeys.push(dontEnums[k]);\n        }\n      }\n    }\n\n    return theKeys;\n  };\n}\n\nmodule.exports = keysShim;","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nexports['default'] = spring;\n\nfunction _interopRequireDefault(obj) {\n  return obj && obj.__esModule ? obj : {\n    'default': obj\n  };\n}\n\nvar _presets = require('./presets');\n\nvar _presets2 = _interopRequireDefault(_presets);\n\nvar defaultConfig = _extends({}, _presets2['default'].noWobble, {\n  precision: 0.01\n});\n\nfunction spring(val, config) {\n  return _extends({}, defaultConfig, config, {\n    val: val\n  });\n}\n\nmodule.exports = exports['default'];","// turn {x: {val: 1, stiffness: 1, damping: 2}, y: 2} generated by\n// `{x: spring(1, {stiffness: 1, damping: 2}), y: 2}` into {x: 1, y: 2}\n'use strict';\n\nexports.__esModule = true;\nexports['default'] = stripStyle;\n\nfunction stripStyle(style) {\n  var ret = {};\n\n  for (var key in style) {\n    if (!Object.prototype.hasOwnProperty.call(style, key)) {\n      continue;\n    }\n\n    ret[key] = typeof style[key] === 'number' ? style[key] : style[key].val;\n  }\n\n  return ret;\n}\n\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\nfunction _interopRequireDefault(obj) {\n  return obj && obj.__esModule ? obj : {\n    'default': obj\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 _inherits(subClass, superClass) {\n  if (typeof superClass !== 'function' && superClass !== null) {\n    throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar _mapToZero = require('./mapToZero');\n\nvar _mapToZero2 = _interopRequireDefault(_mapToZero);\n\nvar _stripStyle = require('./stripStyle');\n\nvar _stripStyle2 = _interopRequireDefault(_stripStyle);\n\nvar _stepper3 = require('./stepper');\n\nvar _stepper4 = _interopRequireDefault(_stepper3);\n\nvar _performanceNow = require('performance-now');\n\nvar _performanceNow2 = _interopRequireDefault(_performanceNow);\n\nvar _raf = require('raf');\n\nvar _raf2 = _interopRequireDefault(_raf);\n\nvar _shouldStopAnimation = require('./shouldStopAnimation');\n\nvar _shouldStopAnimation2 = _interopRequireDefault(_shouldStopAnimation);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar msPerFrame = 1000 / 60;\n\nfunction shouldStopAnimationAll(currentStyles, styles, currentVelocities) {\n  for (var i = 0; i < currentStyles.length; i++) {\n    if (!_shouldStopAnimation2['default'](currentStyles[i], styles[i], currentVelocities[i])) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nvar StaggeredMotion = function (_React$Component) {\n  _inherits(StaggeredMotion, _React$Component);\n\n  _createClass(StaggeredMotion, null, [{\n    key: 'propTypes',\n    value: {\n      // TOOD: warn against putting a config in here\n      defaultStyles: _propTypes2['default'].arrayOf(_propTypes2['default'].objectOf(_propTypes2['default'].number)),\n      styles: _propTypes2['default'].func.isRequired,\n      children: _propTypes2['default'].func.isRequired\n    },\n    enumerable: true\n  }]);\n\n  function StaggeredMotion(props) {\n    var _this = this;\n\n    _classCallCheck(this, StaggeredMotion);\n\n    _React$Component.call(this, props);\n\n    this.animationID = null;\n    this.prevTime = 0;\n    this.accumulatedTime = 0;\n    this.unreadPropStyles = null;\n\n    this.clearUnreadPropStyle = function (unreadPropStyles) {\n      var _state = _this.state;\n      var currentStyles = _state.currentStyles;\n      var currentVelocities = _state.currentVelocities;\n      var lastIdealStyles = _state.lastIdealStyles;\n      var lastIdealVelocities = _state.lastIdealVelocities;\n      var someDirty = false;\n\n      for (var i = 0; i < unreadPropStyles.length; i++) {\n        var unreadPropStyle = unreadPropStyles[i];\n        var dirty = false;\n\n        for (var key in unreadPropStyle) {\n          if (!Object.prototype.hasOwnProperty.call(unreadPropStyle, key)) {\n            continue;\n          }\n\n          var styleValue = unreadPropStyle[key];\n\n          if (typeof styleValue === 'number') {\n            if (!dirty) {\n              dirty = true;\n              someDirty = true;\n              currentStyles[i] = _extends({}, currentStyles[i]);\n              currentVelocities[i] = _extends({}, currentVelocities[i]);\n              lastIdealStyles[i] = _extends({}, lastIdealStyles[i]);\n              lastIdealVelocities[i] = _extends({}, lastIdealVelocities[i]);\n            }\n\n            currentStyles[i][key] = styleValue;\n            currentVelocities[i][key] = 0;\n            lastIdealStyles[i][key] = styleValue;\n            lastIdealVelocities[i][key] = 0;\n          }\n        }\n      }\n\n      if (someDirty) {\n        _this.setState({\n          currentStyles: currentStyles,\n          currentVelocities: currentVelocities,\n          lastIdealStyles: lastIdealStyles,\n          lastIdealVelocities: lastIdealVelocities\n        });\n      }\n    };\n\n    this.startAnimationIfNecessary = function () {\n      // TODO: when config is {a: 10} and dest is {a: 10} do we raf once and\n      // call cb? No, otherwise accidental parent rerender causes cb trigger\n      _this.animationID = _raf2['default'](function (timestamp) {\n        var destStyles = _this.props.styles(_this.state.lastIdealStyles); // check if we need to animate in the first place\n\n\n        if (shouldStopAnimationAll(_this.state.currentStyles, destStyles, _this.state.currentVelocities)) {\n          // no need to cancel animationID here; shouldn't have any in flight\n          _this.animationID = null;\n          _this.accumulatedTime = 0;\n          return;\n        }\n\n        var currentTime = timestamp || _performanceNow2['default']();\n\n        var timeDelta = currentTime - _this.prevTime;\n        _this.prevTime = currentTime;\n        _this.accumulatedTime = _this.accumulatedTime + timeDelta; // more than 10 frames? prolly switched browser tab. Restart\n\n        if (_this.accumulatedTime > msPerFrame * 10) {\n          _this.accumulatedTime = 0;\n        }\n\n        if (_this.accumulatedTime === 0) {\n          // no need to cancel animationID here; shouldn't have any in flight\n          _this.animationID = null;\n\n          _this.startAnimationIfNecessary();\n\n          return;\n        }\n\n        var currentFrameCompletion = (_this.accumulatedTime - Math.floor(_this.accumulatedTime / msPerFrame) * msPerFrame) / msPerFrame;\n        var framesToCatchUp = Math.floor(_this.accumulatedTime / msPerFrame);\n        var newLastIdealStyles = [];\n        var newLastIdealVelocities = [];\n        var newCurrentStyles = [];\n        var newCurrentVelocities = [];\n\n        for (var i = 0; i < destStyles.length; i++) {\n          var destStyle = destStyles[i];\n          var newCurrentStyle = {};\n          var newCurrentVelocity = {};\n          var newLastIdealStyle = {};\n          var newLastIdealVelocity = {};\n\n          for (var key in destStyle) {\n            if (!Object.prototype.hasOwnProperty.call(destStyle, key)) {\n              continue;\n            }\n\n            var styleValue = destStyle[key];\n\n            if (typeof styleValue === 'number') {\n              newCurrentStyle[key] = styleValue;\n              newCurrentVelocity[key] = 0;\n              newLastIdealStyle[key] = styleValue;\n              newLastIdealVelocity[key] = 0;\n            } else {\n              var newLastIdealStyleValue = _this.state.lastIdealStyles[i][key];\n              var newLastIdealVelocityValue = _this.state.lastIdealVelocities[i][key];\n\n              for (var j = 0; j < framesToCatchUp; j++) {\n                var _stepper = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);\n\n                newLastIdealStyleValue = _stepper[0];\n                newLastIdealVelocityValue = _stepper[1];\n              }\n\n              var _stepper2 = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);\n\n              var nextIdealX = _stepper2[0];\n              var nextIdealV = _stepper2[1];\n              newCurrentStyle[key] = newLastIdealStyleValue + (nextIdealX - newLastIdealStyleValue) * currentFrameCompletion;\n              newCurrentVelocity[key] = newLastIdealVelocityValue + (nextIdealV - newLastIdealVelocityValue) * currentFrameCompletion;\n              newLastIdealStyle[key] = newLastIdealStyleValue;\n              newLastIdealVelocity[key] = newLastIdealVelocityValue;\n            }\n          }\n\n          newCurrentStyles[i] = newCurrentStyle;\n          newCurrentVelocities[i] = newCurrentVelocity;\n          newLastIdealStyles[i] = newLastIdealStyle;\n          newLastIdealVelocities[i] = newLastIdealVelocity;\n        }\n\n        _this.animationID = null; // the amount we're looped over above\n\n        _this.accumulatedTime -= framesToCatchUp * msPerFrame;\n\n        _this.setState({\n          currentStyles: newCurrentStyles,\n          currentVelocities: newCurrentVelocities,\n          lastIdealStyles: newLastIdealStyles,\n          lastIdealVelocities: newLastIdealVelocities\n        });\n\n        _this.unreadPropStyles = null;\n\n        _this.startAnimationIfNecessary();\n      });\n    };\n\n    this.state = this.defaultState();\n  }\n\n  StaggeredMotion.prototype.defaultState = function defaultState() {\n    var _props = this.props;\n    var defaultStyles = _props.defaultStyles;\n    var styles = _props.styles;\n    var currentStyles = defaultStyles || styles().map(_stripStyle2['default']);\n    var currentVelocities = currentStyles.map(function (currentStyle) {\n      return _mapToZero2['default'](currentStyle);\n    });\n    return {\n      currentStyles: currentStyles,\n      currentVelocities: currentVelocities,\n      lastIdealStyles: currentStyles,\n      lastIdealVelocities: currentVelocities\n    };\n  };\n\n  StaggeredMotion.prototype.componentDidMount = function componentDidMount() {\n    this.prevTime = _performanceNow2['default']();\n    this.startAnimationIfNecessary();\n  };\n\n  StaggeredMotion.prototype.componentWillReceiveProps = function componentWillReceiveProps(props) {\n    if (this.unreadPropStyles != null) {\n      // previous props haven't had the chance to be set yet; set them here\n      this.clearUnreadPropStyle(this.unreadPropStyles);\n    }\n\n    this.unreadPropStyles = props.styles(this.state.lastIdealStyles);\n\n    if (this.animationID == null) {\n      this.prevTime = _performanceNow2['default']();\n      this.startAnimationIfNecessary();\n    }\n  };\n\n  StaggeredMotion.prototype.componentWillUnmount = function componentWillUnmount() {\n    if (this.animationID != null) {\n      _raf2['default'].cancel(this.animationID);\n\n      this.animationID = null;\n    }\n  };\n\n  StaggeredMotion.prototype.render = function render() {\n    var renderedChildren = this.props.children(this.state.currentStyles);\n    return renderedChildren && _react2['default'].Children.only(renderedChildren);\n  };\n\n  return StaggeredMotion;\n}(_react2['default'].Component);\n\nexports['default'] = StaggeredMotion;\nmodule.exports = exports['default']; // it's possible that currentStyle's value is stale: if props is immediately\n// changed from 0 to 400 to spring(0) again, the async currentStyle is still\n// at 0 (didn't have time to tick and interpolate even once). If we naively\n// compare currentStyle with destVal it'll be 0 === 0 (no animation, stop).\n// In reality currentStyle should be 400\n// after checking for unreadPropStyles != null, we manually go set the\n// non-interpolating values (those that are a number, without a spring\n// config)","var win;\n\nif (typeof window !== \"undefined\") {\n  win = window;\n} else if (typeof global !== \"undefined\") {\n  win = global;\n} else if (typeof self !== \"undefined\") {\n  win = self;\n} else {\n  win = {};\n}\n\nmodule.exports = win;","'use strict';\n\nvar getPolyfill = require('./polyfill');\n\nvar define = require('define-properties');\n\nmodule.exports = function shimObjectIs() {\n  var polyfill = getPolyfill();\n  define(Object, {\n    is: polyfill\n  }, {\n    is: function testObjectIs() {\n      return Object.is !== polyfill;\n    }\n  });\n  return polyfill;\n};","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar _createClass = function () {\n  function 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  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\nfunction _interopRequireDefault(obj) {\n  return obj && obj.__esModule ? obj : {\n    'default': obj\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 _inherits(subClass, superClass) {\n  if (typeof superClass !== 'function' && superClass !== null) {\n    throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar _mapToZero = require('./mapToZero');\n\nvar _mapToZero2 = _interopRequireDefault(_mapToZero);\n\nvar _stripStyle = require('./stripStyle');\n\nvar _stripStyle2 = _interopRequireDefault(_stripStyle);\n\nvar _stepper3 = require('./stepper');\n\nvar _stepper4 = _interopRequireDefault(_stepper3);\n\nvar _performanceNow = require('performance-now');\n\nvar _performanceNow2 = _interopRequireDefault(_performanceNow);\n\nvar _raf = require('raf');\n\nvar _raf2 = _interopRequireDefault(_raf);\n\nvar _shouldStopAnimation = require('./shouldStopAnimation');\n\nvar _shouldStopAnimation2 = _interopRequireDefault(_shouldStopAnimation);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar msPerFrame = 1000 / 60;\n\nvar Motion = function (_React$Component) {\n  _inherits(Motion, _React$Component);\n\n  _createClass(Motion, null, [{\n    key: 'propTypes',\n    value: {\n      // TOOD: warn against putting a config in here\n      defaultStyle: _propTypes2['default'].objectOf(_propTypes2['default'].number),\n      style: _propTypes2['default'].objectOf(_propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].object])).isRequired,\n      children: _propTypes2['default'].func.isRequired,\n      onRest: _propTypes2['default'].func\n    },\n    enumerable: true\n  }]);\n\n  function Motion(props) {\n    var _this = this;\n\n    _classCallCheck(this, Motion);\n\n    _React$Component.call(this, props);\n\n    this.wasAnimating = false;\n    this.animationID = null;\n    this.prevTime = 0;\n    this.accumulatedTime = 0;\n    this.unreadPropStyle = null;\n\n    this.clearUnreadPropStyle = function (destStyle) {\n      var dirty = false;\n      var _state = _this.state;\n      var currentStyle = _state.currentStyle;\n      var currentVelocity = _state.currentVelocity;\n      var lastIdealStyle = _state.lastIdealStyle;\n      var lastIdealVelocity = _state.lastIdealVelocity;\n\n      for (var key in destStyle) {\n        if (!Object.prototype.hasOwnProperty.call(destStyle, key)) {\n          continue;\n        }\n\n        var styleValue = destStyle[key];\n\n        if (typeof styleValue === 'number') {\n          if (!dirty) {\n            dirty = true;\n            currentStyle = _extends({}, currentStyle);\n            currentVelocity = _extends({}, currentVelocity);\n            lastIdealStyle = _extends({}, lastIdealStyle);\n            lastIdealVelocity = _extends({}, lastIdealVelocity);\n          }\n\n          currentStyle[key] = styleValue;\n          currentVelocity[key] = 0;\n          lastIdealStyle[key] = styleValue;\n          lastIdealVelocity[key] = 0;\n        }\n      }\n\n      if (dirty) {\n        _this.setState({\n          currentStyle: currentStyle,\n          currentVelocity: currentVelocity,\n          lastIdealStyle: lastIdealStyle,\n          lastIdealVelocity: lastIdealVelocity\n        });\n      }\n    };\n\n    this.startAnimationIfNecessary = function () {\n      // TODO: when config is {a: 10} and dest is {a: 10} do we raf once and\n      // call cb? No, otherwise accidental parent rerender causes cb trigger\n      _this.animationID = _raf2['default'](function (timestamp) {\n        // check if we need to animate in the first place\n        var propsStyle = _this.props.style;\n\n        if (_shouldStopAnimation2['default'](_this.state.currentStyle, propsStyle, _this.state.currentVelocity)) {\n          if (_this.wasAnimating && _this.props.onRest) {\n            _this.props.onRest();\n          } // no need to cancel animationID here; shouldn't have any in flight\n\n\n          _this.animationID = null;\n          _this.wasAnimating = false;\n          _this.accumulatedTime = 0;\n          return;\n        }\n\n        _this.wasAnimating = true;\n\n        var currentTime = timestamp || _performanceNow2['default']();\n\n        var timeDelta = currentTime - _this.prevTime;\n        _this.prevTime = currentTime;\n        _this.accumulatedTime = _this.accumulatedTime + timeDelta; // more than 10 frames? prolly switched browser tab. Restart\n\n        if (_this.accumulatedTime > msPerFrame * 10) {\n          _this.accumulatedTime = 0;\n        }\n\n        if (_this.accumulatedTime === 0) {\n          // no need to cancel animationID here; shouldn't have any in flight\n          _this.animationID = null;\n\n          _this.startAnimationIfNecessary();\n\n          return;\n        }\n\n        var currentFrameCompletion = (_this.accumulatedTime - Math.floor(_this.accumulatedTime / msPerFrame) * msPerFrame) / msPerFrame;\n        var framesToCatchUp = Math.floor(_this.accumulatedTime / msPerFrame);\n        var newLastIdealStyle = {};\n        var newLastIdealVelocity = {};\n        var newCurrentStyle = {};\n        var newCurrentVelocity = {};\n\n        for (var key in propsStyle) {\n          if (!Object.prototype.hasOwnProperty.call(propsStyle, key)) {\n            continue;\n          }\n\n          var styleValue = propsStyle[key];\n\n          if (typeof styleValue === 'number') {\n            newCurrentStyle[key] = styleValue;\n            newCurrentVelocity[key] = 0;\n            newLastIdealStyle[key] = styleValue;\n            newLastIdealVelocity[key] = 0;\n          } else {\n            var newLastIdealStyleValue = _this.state.lastIdealStyle[key];\n            var newLastIdealVelocityValue = _this.state.lastIdealVelocity[key];\n\n            for (var i = 0; i < framesToCatchUp; i++) {\n              var _stepper = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);\n\n              newLastIdealStyleValue = _stepper[0];\n              newLastIdealVelocityValue = _stepper[1];\n            }\n\n            var _stepper2 = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);\n\n            var nextIdealX = _stepper2[0];\n            var nextIdealV = _stepper2[1];\n            newCurrentStyle[key] = newLastIdealStyleValue + (nextIdealX - newLastIdealStyleValue) * currentFrameCompletion;\n            newCurrentVelocity[key] = newLastIdealVelocityValue + (nextIdealV - newLastIdealVelocityValue) * currentFrameCompletion;\n            newLastIdealStyle[key] = newLastIdealStyleValue;\n            newLastIdealVelocity[key] = newLastIdealVelocityValue;\n          }\n        }\n\n        _this.animationID = null; // the amount we're looped over above\n\n        _this.accumulatedTime -= framesToCatchUp * msPerFrame;\n\n        _this.setState({\n          currentStyle: newCurrentStyle,\n          currentVelocity: newCurrentVelocity,\n          lastIdealStyle: newLastIdealStyle,\n          lastIdealVelocity: newLastIdealVelocity\n        });\n\n        _this.unreadPropStyle = null;\n\n        _this.startAnimationIfNecessary();\n      });\n    };\n\n    this.state = this.defaultState();\n  }\n\n  Motion.prototype.defaultState = function defaultState() {\n    var _props = this.props;\n    var defaultStyle = _props.defaultStyle;\n    var style = _props.style;\n\n    var currentStyle = defaultStyle || _stripStyle2['default'](style);\n\n    var currentVelocity = _mapToZero2['default'](currentStyle);\n\n    return {\n      currentStyle: currentStyle,\n      currentVelocity: currentVelocity,\n      lastIdealStyle: currentStyle,\n      lastIdealVelocity: currentVelocity\n    };\n  }; // it's possible that currentStyle's value is stale: if props is immediately\n  // changed from 0 to 400 to spring(0) again, the async currentStyle is still\n  // at 0 (didn't have time to tick and interpolate even once). If we naively\n  // compare currentStyle with destVal it'll be 0 === 0 (no animation, stop).\n  // In reality currentStyle should be 400\n\n\n  Motion.prototype.componentDidMount = function componentDidMount() {\n    this.prevTime = _performanceNow2['default']();\n    this.startAnimationIfNecessary();\n  };\n\n  Motion.prototype.componentWillReceiveProps = function componentWillReceiveProps(props) {\n    if (this.unreadPropStyle != null) {\n      // previous props haven't had the chance to be set yet; set them here\n      this.clearUnreadPropStyle(this.unreadPropStyle);\n    }\n\n    this.unreadPropStyle = props.style;\n\n    if (this.animationID == null) {\n      this.prevTime = _performanceNow2['default']();\n      this.startAnimationIfNecessary();\n    }\n  };\n\n  Motion.prototype.componentWillUnmount = function componentWillUnmount() {\n    if (this.animationID != null) {\n      _raf2['default'].cancel(this.animationID);\n\n      this.animationID = null;\n    }\n  };\n\n  Motion.prototype.render = function render() {\n    var renderedChildren = this.props.children(this.state.currentStyle);\n    return renderedChildren && _react2['default'].Children.only(renderedChildren);\n  };\n\n  return Motion;\n}(_react2['default'].Component);\n\nexports['default'] = Motion;\nmodule.exports = exports['default']; // after checking for unreadPropStyle != null, we manually go set the\n// non-interpolating values (those that are a number, without a spring\n// config)","var now = require('performance-now'),\n    root = typeof window === 'undefined' ? global : window,\n    vendors = ['moz', 'webkit'],\n    suffix = 'AnimationFrame',\n    raf = root['request' + suffix],\n    caf = root['cancel' + suffix] || root['cancelRequest' + suffix];\n\nfor (var i = 0; !raf && i < vendors.length; i++) {\n  raf = root[vendors[i] + 'Request' + suffix];\n  caf = root[vendors[i] + 'Cancel' + suffix] || root[vendors[i] + 'CancelRequest' + suffix];\n} // Some versions of FF have rAF but not cAF\n\n\nif (!raf || !caf) {\n  var last = 0,\n      id = 0,\n      queue = [],\n      frameDuration = 1000 / 60;\n\n  raf = function raf(callback) {\n    if (queue.length === 0) {\n      var _now = now(),\n          next = Math.max(0, frameDuration - (_now - last));\n\n      last = next + _now;\n      setTimeout(function () {\n        var cp = queue.slice(0); // Clear queue here to prevent\n        // callbacks from appending listeners\n        // to the current frame's queue\n\n        queue.length = 0;\n\n        for (var i = 0; i < cp.length; i++) {\n          if (!cp[i].cancelled) {\n            try {\n              cp[i].callback(last);\n            } catch (e) {\n              setTimeout(function () {\n                throw e;\n              }, 0);\n            }\n          }\n        }\n      }, Math.round(next));\n    }\n\n    queue.push({\n      handle: ++id,\n      callback: callback,\n      cancelled: false\n    });\n    return id;\n  };\n\n  caf = function caf(handle) {\n    for (var i = 0; i < queue.length; i++) {\n      if (queue[i].handle === handle) {\n        queue[i].cancelled = true;\n      }\n    }\n  };\n}\n\nmodule.exports = function (fn) {\n  // Wrap in a new function to prevent\n  // `cancel` potentially being assigned\n  // to the native rAF function\n  return raf.call(root, fn);\n};\n\nmodule.exports.cancel = function () {\n  caf.apply(root, arguments);\n};\n\nmodule.exports.polyfill = function (object) {\n  if (!object) {\n    object = root;\n  }\n\n  object.requestAnimationFrame = raf;\n  object.cancelAnimationFrame = caf;\n};"],"sourceRoot":""}