victory-canvas 37.3.1 → 37.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # victory-canvas
2
2
 
3
+ ## 37.3.3
4
+
5
+ ## 37.3.2
6
+
3
7
  ## 37.3.1
4
8
 
5
9
  ## 37.3.0
@@ -291,7 +291,6 @@ const CanvasPoint = props => {
291
291
  } = modifiedProps;
292
292
  const path = getPath(modifiedProps);
293
293
  ctx.fillStyle = style.fill;
294
- // eslint-disable-next-line no-undef
295
294
  const path2d = new Path2D(path);
296
295
  ctx.fill(path2d);
297
296
  }, [modifiedProps]);
@@ -2269,7 +2268,6 @@ const circle = (center, radius) => ({
2269
2268
  // Left-most point is returned as 0th element of array
2270
2269
  // Right-most point is returned as 1st elemennt of array
2271
2270
  intersection(circle1) {
2272
- // eslint-disable-line max-statements
2273
2271
  const P0 = this.center;
2274
2272
  const P1 = circle1.center;
2275
2273
  const r0 = this.radius;
@@ -2436,8 +2434,6 @@ const getVerticalBarPoints = (position, sign, cr) => {
2436
2434
  y0,
2437
2435
  y1
2438
2436
  } = position;
2439
-
2440
- // eslint-disable-next-line max-statements, max-len
2441
2437
  const getHalfPoints = side => {
2442
2438
  const isLeft = side === "Left";
2443
2439
  const signL = isLeft ? 1 : -1;
@@ -2521,8 +2517,6 @@ const getHorizontalBarPoints = (position, sign, cr) => {
2521
2517
  } = position;
2522
2518
  const x0 = position.x0 < position.x1 ? position.x0 : position.x1;
2523
2519
  const x1 = position.x0 < position.x1 ? position.x1 : position.x0;
2524
-
2525
- // eslint-disable-next-line max-statements, max-len
2526
2520
  const getHalfPoints = side => {
2527
2521
  const isTop = side === "top";
2528
2522
  const signL = isTop ? -1 : 1;
@@ -2602,8 +2596,6 @@ const getHorizontalBarPoints = (position, sign, cr) => {
2602
2596
  // eslint-disable-next-line no-magic-numbers
2603
2597
  bottomPoints[3], bottomPoints[2]];
2604
2598
  };
2605
-
2606
- // eslint-disable-next-line max-params
2607
2599
  const getVerticalBarPath = (props, width, cornerRadius) => {
2608
2600
  const position = getPosition(props, width);
2609
2601
  const sign = position.y0 > position.y1 ? 1 : -1;
@@ -2611,8 +2603,6 @@ const getVerticalBarPath = (props, width, cornerRadius) => {
2611
2603
  const points = getVerticalBarPoints(position, sign, cornerRadius);
2612
2604
  return mapPointsToPath(points, cornerRadius, direction);
2613
2605
  };
2614
-
2615
- // eslint-disable-next-line max-params
2616
2606
  const getHorizontalBarPath = (props, width, cornerRadius) => {
2617
2607
  const position = getPosition(props, width);
2618
2608
  const sign = position.x0 < position.x1 ? 1 : -1;
@@ -2670,8 +2660,6 @@ const getVerticalPolarBarPath = (props, cornerRadius) => {
2670
2660
  leftMiddle
2671
2661
  };
2672
2662
  };
2673
-
2674
- // eslint-disable-next-line max-statements
2675
2663
  const getTopPath = () => {
2676
2664
  const {
2677
2665
  topRight,
@@ -2714,8 +2702,6 @@ const getVerticalPolarBarPath = (props, cornerRadius) => {
2714
2702
  coords: subCoords[i].split(",")
2715
2703
  }));
2716
2704
  };
2717
-
2718
- // eslint-disable-next-line max-statements
2719
2705
  const getBottomPath = () => {
2720
2706
  const {
2721
2707
  bottomRight,
@@ -2805,41 +2791,45 @@ __webpack_require__.r(__webpack_exports__);
2805
2791
  /* harmony export */ "reduceChildren": function() { return /* binding */ reduceChildren; },
2806
2792
  /* harmony export */ "scalePoint": function() { return /* binding */ scalePoint; }
2807
2793
  /* harmony export */ });
2808
- /* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/pick */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pick.js");
2809
- /* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_0__);
2810
- /* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/property */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/property.js");
2811
- /* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_property__WEBPACK_IMPORTED_MODULE_1__);
2812
- /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
2813
- /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_2__);
2814
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
2815
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
2816
-
2794
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2795
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2796
+ /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
2797
+ /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
2798
+ /* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/property */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/property.js");
2799
+ /* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_property__WEBPACK_IMPORTED_MODULE_2__);
2800
+ /* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/pick */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pick.js");
2801
+ /* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_3__);
2817
2802
 
2818
2803
 
2819
- /* eslint-disable no-use-before-define */
2820
2804
 
2821
- // Private Functions
2822
2805
 
2823
- function getCartesianRange(props, axis) {
2824
- // determine how to lay the axis and what direction positive and negative are
2825
- const vertical = axis !== "x";
2826
- const padding = getPadding(props);
2806
+ /**
2807
+ * Determine the range of a cartesian axis
2808
+ */
2809
+ function getCartesianRange(options) {
2810
+ const vertical = options.axis !== "x";
2827
2811
  if (vertical) {
2828
- return [props.height - padding.bottom, padding.top];
2812
+ return [options.height - options.padding.bottom, options.padding.top];
2829
2813
  }
2830
- return [padding.left, props.width - padding.right];
2814
+ return [options.padding.left, options.width - options.padding.right];
2831
2815
  }
2832
- function getPolarRange(props, axis) {
2833
- if (axis === "x") {
2834
- const startAngle = degreesToRadians(props.startAngle || 0);
2835
- const endAngle = degreesToRadians(props.endAngle || 360);
2816
+
2817
+ /**
2818
+ * Determine the range of a polar axis in radians
2819
+ */
2820
+ function getPolarRange(options) {
2821
+ if (options.axis === "x") {
2822
+ const startAngle = degreesToRadians(options.startAngle || 0);
2823
+ const endAngle = degreesToRadians(options.endAngle || 360);
2836
2824
  return [startAngle, endAngle];
2837
2825
  }
2838
- return [props.innerRadius || 0, getRadius(props)];
2826
+ return [options.innerRadius || 0, getRadius({
2827
+ height: options.height,
2828
+ width: options.width,
2829
+ padding: options.padding
2830
+ })];
2839
2831
  }
2840
2832
 
2841
- // Exported Functions
2842
-
2843
2833
  /**
2844
2834
  * Creates an object composed of the inverted keys and values of object.
2845
2835
  * If object contains duplicate values, subsequent values overwrite property assignments of previous values.
@@ -2876,8 +2866,11 @@ function omit(originalObject, ks) {
2876
2866
  }
2877
2867
  return newObject;
2878
2868
  }
2869
+
2870
+ /**
2871
+ * Coalesce the x and y values from a data point
2872
+ */
2879
2873
  function getPoint(datum) {
2880
- const exists = val => val !== undefined;
2881
2874
  const {
2882
2875
  _x,
2883
2876
  _x1,
@@ -2888,16 +2881,20 @@ function getPoint(datum) {
2888
2881
  _y0,
2889
2882
  _voronoiY
2890
2883
  } = datum;
2891
- const defaultX = exists(_x1) ? _x1 : _x;
2892
- const defaultY = exists(_y1) ? _y1 : _y;
2884
+ const defaultX = _x1 ?? _x;
2885
+ const defaultY = _y1 ?? _y;
2893
2886
  const point = {
2894
- x: exists(_voronoiX) ? _voronoiX : defaultX,
2895
- x0: exists(_x0) ? _x0 : _x,
2896
- y: exists(_voronoiY) ? _voronoiY : defaultY,
2897
- y0: exists(_y0) ? _y0 : _y
2887
+ x: _voronoiX ?? defaultX,
2888
+ x0: _x0 ?? _x,
2889
+ y: _voronoiY ?? defaultY,
2890
+ y0: _y0 ?? _y
2898
2891
  };
2899
- return lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, point, datum);
2892
+ return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, point, datum);
2900
2893
  }
2894
+
2895
+ /**
2896
+ * Scale a point based on the origin, direction, and given scale function
2897
+ */
2901
2898
  function scalePoint(props, datum) {
2902
2899
  const {
2903
2900
  scale,
@@ -2920,11 +2917,11 @@ function scalePoint(props, datum) {
2920
2917
  y0: polar ? -y0 * Math.sin(x0) + origin.x : y0
2921
2918
  };
2922
2919
  }
2923
- function getPadding(props, name) {
2924
- if (name === void 0) {
2925
- name = "padding";
2926
- }
2927
- const padding = props[name];
2920
+
2921
+ /**
2922
+ * Returns a padding value from a number or partial padding values
2923
+ */
2924
+ function getPadding(padding) {
2928
2925
  const paddingVal = typeof padding === "number" ? padding : 0;
2929
2926
  const paddingObj = typeof padding === "object" ? padding : {};
2930
2927
  return {
@@ -2934,6 +2931,10 @@ function getPadding(props, name) {
2934
2931
  right: paddingObj.right || paddingVal
2935
2932
  };
2936
2933
  }
2934
+
2935
+ /**
2936
+ * Returns true if the component is defined as a tooltip
2937
+ */
2937
2938
  function isTooltip(component) {
2938
2939
  const labelRole = component && component.type && component.type.role;
2939
2940
  return labelRole === "tooltip";
@@ -2948,8 +2949,8 @@ function getDefaultStyles(props, role) {
2948
2949
  return defaultStyles;
2949
2950
  }
2950
2951
  const tooltipStyle = theme.tooltip && theme.tooltip.style || {};
2951
- const labelStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, tooltipStyle, defaultStyles.labels);
2952
- return lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, {
2952
+ const labelStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, tooltipStyle, defaultStyles.labels);
2953
+ return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, {
2953
2954
  labels: labelStyle
2954
2955
  }, defaultStyles);
2955
2956
  }
@@ -2957,7 +2958,7 @@ function getStyles(style, defaultStyles) {
2957
2958
  const width = "100%";
2958
2959
  const height = "100%";
2959
2960
  if (!style) {
2960
- return lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({
2961
+ return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
2961
2962
  parent: {
2962
2963
  height,
2963
2964
  width
@@ -2973,14 +2974,18 @@ function getStyles(style, defaultStyles) {
2973
2974
  const defaultLabels = defaultStyles && defaultStyles.labels || {};
2974
2975
  const defaultData = defaultStyles && defaultStyles.data || {};
2975
2976
  return {
2976
- parent: lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, parent, defaultParent, {
2977
+ parent: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, parent, defaultParent, {
2977
2978
  width,
2978
2979
  height
2979
2980
  }),
2980
- labels: lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, labels, defaultLabels),
2981
- data: lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, data, defaultData)
2981
+ labels: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labels, defaultLabels),
2982
+ data: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, data, defaultData)
2982
2983
  };
2983
2984
  }
2985
+
2986
+ /**
2987
+ * Returns the value of a prop or accessor function with the given props
2988
+ */
2984
2989
  function evaluateProp(prop, props) {
2985
2990
  return isFunction(prop) ? prop(props) : prop;
2986
2991
  }
@@ -3002,19 +3007,28 @@ function degreesToRadians(degrees) {
3002
3007
  function radiansToDegrees(radians) {
3003
3008
  return typeof radians === "number" ? radians / (Math.PI / 180) : radians;
3004
3009
  }
3005
- function getRadius(props) {
3010
+
3011
+ /**
3012
+ * Get the maximum radius that will fit in the container
3013
+ */
3014
+ function getRadius(options) {
3015
+ const {
3016
+ width,
3017
+ height,
3018
+ padding
3019
+ } = options;
3006
3020
  const {
3007
3021
  left,
3008
3022
  right,
3009
3023
  top,
3010
3024
  bottom
3011
- } = getPadding(props);
3012
- const {
3013
- width,
3014
- height
3015
- } = props;
3025
+ } = padding;
3016
3026
  return Math.min(width - left - right, height - top - bottom) / 2;
3017
3027
  }
3028
+
3029
+ /**
3030
+ * Returns the origin for a polar chart within the padded area
3031
+ */
3018
3032
  function getPolarOrigin(props) {
3019
3033
  const {
3020
3034
  width,
@@ -3025,7 +3039,7 @@ function getPolarOrigin(props) {
3025
3039
  bottom,
3026
3040
  left,
3027
3041
  right
3028
- } = getPadding(props);
3042
+ } = getPadding(props.padding);
3029
3043
  const radius = Math.min(width - left - right, height - top - bottom) / 2;
3030
3044
  const offsetWidth = width / 2 + left - right;
3031
3045
  const offsetHeight = height / 2 + top - bottom;
@@ -3034,13 +3048,30 @@ function getPolarOrigin(props) {
3034
3048
  y: offsetHeight + radius > height ? radius + top - bottom : offsetHeight
3035
3049
  };
3036
3050
  }
3051
+
3052
+ /**
3053
+ * Determine the range of an axis based on the given props
3054
+ */
3037
3055
  function getRange(props, axis) {
3038
3056
  if (props.range && props.range[axis]) {
3039
3057
  return props.range[axis];
3040
3058
  } else if (props.range && Array.isArray(props.range)) {
3041
3059
  return props.range;
3042
3060
  }
3043
- return props.polar ? getPolarRange(props, axis) : getCartesianRange(props, axis);
3061
+ return props.polar ? getPolarRange({
3062
+ axis,
3063
+ innerRadius: props.innerRadius,
3064
+ startAngle: props.startAngle,
3065
+ endAngle: props.endAngle,
3066
+ height: props.height,
3067
+ width: props.width,
3068
+ padding: getPadding(props.padding)
3069
+ }) : getCartesianRange({
3070
+ axis,
3071
+ height: props.height,
3072
+ width: props.width,
3073
+ padding: getPadding(props.padding)
3074
+ });
3044
3075
  }
3045
3076
 
3046
3077
  /**
@@ -3072,7 +3103,7 @@ function createAccessor(key) {
3072
3103
  return x => x;
3073
3104
  }
3074
3105
  // otherwise, assume it is an array index, property key or path (_.property handles all three)
3075
- return lodash_property__WEBPACK_IMPORTED_MODULE_1___default()(key);
3106
+ return lodash_property__WEBPACK_IMPORTED_MODULE_2___default()(key);
3076
3107
  }
3077
3108
  function modifyProps(props, fallbackProps, role) {
3078
3109
  const theme = props.theme && props.theme[role] ? props.theme[role] : {};
@@ -3081,7 +3112,7 @@ function modifyProps(props, fallbackProps, role) {
3081
3112
  const defaultObject = horizontal === undefined ? {} : {
3082
3113
  horizontal
3083
3114
  };
3084
- return lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()(defaultObject, props, themeProps, fallbackProps);
3115
+ return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(defaultObject, props, themeProps, fallbackProps);
3085
3116
  }
3086
3117
 
3087
3118
  /**
@@ -3168,10 +3199,10 @@ initialMemo, combine) {
3168
3199
  const childRole = child.type && child.type.role;
3169
3200
  const childName = child.props.name || `${childRole}-${names[index]}`;
3170
3201
  if (child.props && child.props.children) {
3171
- const childProps = Object.assign({}, child.props, lodash_pick__WEBPACK_IMPORTED_MODULE_0___default()(parentProps, sharedProps));
3172
- const nestedChildren = child.type && child.type.role === "stack" && isFunction(child.type.getChildren) ? child.type.getChildren(childProps) : react__WEBPACK_IMPORTED_MODULE_3___default().Children.toArray(child.props.children).map(c => {
3173
- const nestedChildProps = Object.assign({}, c.props, lodash_pick__WEBPACK_IMPORTED_MODULE_0___default()(childProps, sharedProps));
3174
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(c, nestedChildProps);
3202
+ const childProps = Object.assign({}, child.props, lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(parentProps, sharedProps));
3203
+ const nestedChildren = child.type && child.type.role === "stack" && isFunction(child.type.getChildren) ? child.type.getChildren(childProps) : react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children).map(c => {
3204
+ const nestedChildProps = Object.assign({}, c.props, lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(childProps, sharedProps));
3205
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(c, nestedChildProps);
3175
3206
  });
3176
3207
  const childNames = nestedChildren.map((c, i) => `${childName}-${i}`);
3177
3208
  const nestedResults = traverseChildren(nestedChildren, childNames, child);
@@ -3185,7 +3216,7 @@ initialMemo, combine) {
3185
3216
  return newMemo;
3186
3217
  }, initialMemo);
3187
3218
  };
3188
- const validChildren = children.filter(react__WEBPACK_IMPORTED_MODULE_3__.isValidElement);
3219
+ const validChildren = children.filter(react__WEBPACK_IMPORTED_MODULE_0__.isValidElement);
3189
3220
  const childNames = validChildren.map((c, i) => i);
3190
3221
  return traverseChildren(validChildren, childNames);
3191
3222
  }
@@ -3205,10 +3236,10 @@ function isHorizontal(props) {
3205
3236
  if (memo || childProps.horizontal || !childProps.children) {
3206
3237
  return memo || childProps.horizontal;
3207
3238
  }
3208
- return traverseChildren(react__WEBPACK_IMPORTED_MODULE_3___default().Children.toArray(childProps.children));
3239
+ return traverseChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(childProps.children));
3209
3240
  }, false);
3210
3241
  };
3211
- return traverseChildren(react__WEBPACK_IMPORTED_MODULE_3___default().Children.toArray(props.children));
3242
+ return traverseChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children));
3212
3243
  }
3213
3244
 
3214
3245
  /***/ }),
@@ -1,2 +1,2 @@
1
- !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):"object"==typeof exports?exports.VictoryCanvas=n(require("react")):t.VictoryCanvas=n(t.React)}(self,(function(t){return function(){var n={2596:function(t,n,i){var e=i(2373).Symbol;t.exports=e},6082:function(t){t.exports=function(t,n,i){switch(i.length){case 0:return t.call(n);case 1:return t.call(n,i[0]);case 2:return t.call(n,i[0],i[1]);case 3:return t.call(n,i[0],i[1],i[2])}return t.apply(n,i)}},8644:function(t){t.exports=function(t,n){for(var i=-1,e=null==t?0:t.length,o=Array(e);++i<e;)o[i]=n(t[i],i,t);return o}},9559:function(t){t.exports=function(t,n){for(var i=-1,e=n.length,o=t.length;++i<e;)t[o+i]=n[i];return t}},4132:function(t,n,i){var e=i(8347),o=i(788),r=Object.prototype.hasOwnProperty;t.exports=function(t,n,i){var s=t[n];r.call(t,n)&&o(s,i)&&(void 0!==i||n in t)||e(t,n,i)}},8347:function(t,n,i){var e=i(5525);t.exports=function(t,n,i){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[n]=i}},6457:function(t,n,i){var e=i(9559),o=i(3608);t.exports=function t(n,i,r,s,u){var c=-1,h=n.length;for(r||(r=o),u||(u=[]);++c<h;){var a=n[c];i>0&&r(a)?i>1?t(a,i-1,r,s,u):e(u,a):s||(u[u.length]=a)}return u}},4432:function(t,n,i){var e=i(9026),o=i(3110);t.exports=function(t,n){for(var i=0,r=(n=e(n,t)).length;null!=t&&i<r;)t=t[o(n[i++])];return i&&i==r?t:void 0}},563:function(t){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},6776:function(t){t.exports=function(t,n){return null!=t&&n in Object(t)}},5436:function(t,n,i){var e=i(6371),o=i(5066);t.exports=function(t,n){return e(t,n,(function(n,i){return o(t,i)}))}},6371:function(t,n,i){var e=i(4432),o=i(6539),r=i(9026);t.exports=function(t,n,i){for(var s=-1,u=n.length,c={};++s<u;){var h=n[s],a=e(t,h);i(a,h)&&o(c,r(h,t),a)}return c}},1600:function(t){t.exports=function(t){return function(n){return null==n?void 0:n[t]}}},3301:function(t,n,i){var e=i(4432);t.exports=function(t){return function(n){return e(n,t)}}},6317:function(t,n,i){var e=i(5346),o=i(4280),r=i(201);t.exports=function(t,n){return r(o(t,n,e),t+"")}},6539:function(t,n,i){var e=i(4132),o=i(9026),r=i(9099),s=i(7709),u=i(3110);t.exports=function(t,n,i,c){if(!s(t))return t;for(var h=-1,a=(n=o(n,t)).length,l=a-1,_=t;null!=_&&++h<a;){var f=u(n[h]),x=i;if("__proto__"===f||"constructor"===f||"prototype"===f)return t;if(h!=l){var y=_[f];void 0===(x=c?c(y,f,_):void 0)&&(x=s(y)?y:r(n[h+1])?[]:{})}e(_,f,x),_=_[f]}return t}},6316:function(t,n,i){var e=i(2596),o=i(8644),r=i(163),s=i(1995),u=e?e.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(n){if("string"==typeof n)return n;if(r(n))return o(n,t)+"";if(s(n))return c?c.call(n):"";var i=n+"";return"0"==i&&1/n==-1/0?"-0":i}},9026:function(t,n,i){var e=i(163),o=i(726),r=i(7801),s=i(7010);t.exports=function(t,n){return e(t)?t:o(t,n)?[t]:r(s(t))}},5525:function(t,n,i){var e=i(3743),o=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},5557:function(t,n,i){var e=i(2645),o=i(4280),r=i(201);t.exports=function(t){return r(o(t,void 0,e),t+"")}},2117:function(t,n,i){var e="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;t.exports=e},3743:function(t){t.exports=function(t,n){return null==t?void 0:t[n]}},9817:function(t,n,i){var e=i(5125)(Object.getPrototypeOf,Object);t.exports=e},3096:function(t,n,i){var e=i(9026),o=i(5075),r=i(163),s=i(9099),u=i(8454),c=i(3110);t.exports=function(t,n,i){for(var h=-1,a=(n=e(n,t)).length,l=!1;++h<a;){var _=c(n[h]);if(!(l=null!=t&&i(t,_)))break;t=t[_]}return l||++h!=a?l:!!(a=null==t?0:t.length)&&u(a)&&s(_,a)&&(r(t)||o(t))}},3608:function(t,n,i){var e=i(2596),o=i(5075),r=i(163),s=e?e.isConcatSpreadable:void 0;t.exports=function(t){return r(t)||o(t)||!!(s&&t&&t[s])}},9099:function(t){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,i){var e=typeof t;return!!(i=null==i?9007199254740991:i)&&("number"==e||"symbol"!=e&&n.test(t))&&t>-1&&t%1==0&&t<i}},8286:function(t){t.exports=function(){return!1}},726:function(t,n,i){var e=i(163),o=i(1995),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,n){if(e(t))return!1;var i=typeof t;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=t&&!o(t))||s.test(t)||!r.test(t)||null!=n&&t in Object(n)}},2453:function(t){t.exports=function(t){return t}},5125:function(t){t.exports=function(t,n){return function(i){return t(n(i))}}},4280:function(t,n,i){var e=i(6082),o=Math.max;t.exports=function(t,n,i){return n=o(void 0===n?t.length-1:n,0),function(){for(var r=arguments,s=-1,u=o(r.length-n,0),c=Array(u);++s<u;)c[s]=r[n+s];s=-1;for(var h=Array(n+1);++s<n;)h[s]=r[s];return h[n]=i(c),e(t,this,h)}}},2373:function(t,n,i){var e=i(2117),o="object"==typeof self&&self&&self.Object===Object&&self,r=e||o||Function("return this")();t.exports=r},201:function(t){t.exports=function(t){return t}},7801:function(t,n,i){var e=i(2453),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,s=e((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(o,(function(t,i,e,o){n.push(e?o.replace(r,"$1"):i||t)})),n}));t.exports=s},3110:function(t,n,i){var e=i(1995);t.exports=function(t){if("string"==typeof t||e(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},1893:function(t,n,i){var e=i(6317),o=i(788),r=i(8286),s=i(8855),u=Object.prototype,c=u.hasOwnProperty,h=e((function(t,n){t=Object(t);var i=-1,e=n.length,h=e>2?n[2]:void 0;for(h&&r(n[0],n[1],h)&&(e=1);++i<e;)for(var a=n[i],l=s(a),_=-1,f=l.length;++_<f;){var x=l[_],y=t[x];(void 0===y||o(y,u[x])&&!c.call(t,x))&&(t[x]=a[x])}return t}));t.exports=h},788:function(t){t.exports=function(t,n){return t===n||t!=t&&n!=n}},2645:function(t,n,i){var e=i(6457);t.exports=function(t){return null!=t&&t.length?e(t,1):[]}},5066:function(t,n,i){var e=i(6776),o=i(3096);t.exports=function(t,n){return null!=t&&o(t,n,e)}},5346:function(t){t.exports=function(t){return t}},5075:function(t){t.exports=function(){return!1}},163:function(t){var n=Array.isArray;t.exports=n},8454:function(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},7709:function(t){t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},3474:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},3849:function(t,n,i){var e=i(563),o=i(9817),r=i(3474),s=Function.prototype,u=Object.prototype,c=s.toString,h=u.hasOwnProperty,a=c.call(Object);t.exports=function(t){if(!r(t)||"[object Object]"!=e(t))return!1;var n=o(t);if(null===n)return!0;var i=h.call(n,"constructor")&&n.constructor;return"function"==typeof i&&i instanceof i&&c.call(i)==a}},1995:function(t){t.exports=function(){return!1}},8855:function(t){t.exports=function(t){var n=[];if(null!=t)for(var i in Object(t))n.push(i);return n}},9082:function(t,n,i){var e=i(5436),o=i(5557)((function(t,n){return null==t?{}:e(t,n)}));t.exports=o},8532:function(t,n,i){var e=i(1600),o=i(3301),r=i(726),s=i(3110);t.exports=function(t){return r(t)?e(s(t)):o(t)}},7010:function(t,n,i){var e=i(6316);t.exports=function(t){return null==t?"":e(t)}},9787:function(n){"use strict";n.exports=t}},i={};function e(t){var o=i[t];if(void 0!==o)return o.exports;var r=i[t]={exports:{}};return n[t](r,r.exports,e),r.exports}e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},e.d=function(t,n){for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return function(){"use strict";e.r(o),e.d(o,{CanvasBar:function(){return H},CanvasCurve:function(){return _i},CanvasGroup:function(){return Q},CanvasPoint:function(){return Ti},useCanvasContext:function(){return G}});var t={};e.r(t),e.d(t,{arc:function(){return I},area:function(){return rt},areaRadial:function(){return xt},curveBasis:function(){return rn},curveBasisClosed:function(){return un},curveBasisOpen:function(){return hn},curveBumpX:function(){return dt},curveBumpY:function(){return gt},curveBundle:function(){return ln},curveCardinal:function(){return xn},curveCardinalClosed:function(){return pn},curveCardinalOpen:function(){return dn},curveCatmullRom:function(){return mn},curveCatmullRomClosed:function(){return $n},curveCatmullRomOpen:function(){return wn},curveLinear:function(){return nt},curveLinearClosed:function(){return Sn},curveMonotoneX:function(){return Ln},curveMonotoneY:function(){return jn},curveNatural:function(){return In},curveStep:function(){return Xn},curveStepAfter:function(){return Dn},curveStepBefore:function(){return Yn},line:function(){return ot},lineRadial:function(){return ft},link:function(){return $t},linkHorizontal:function(){return Mt},linkRadial:function(){return kt},linkVertical:function(){return wt},pie:function(){return ct},pointRadial:function(){return yt},radialArea:function(){return xt},radialLine:function(){return ft},stack:function(){return Gn},stackOffsetDiverging:function(){return Hn},stackOffsetExpand:function(){return Un},stackOffsetNone:function(){return Bn},stackOffsetSilhouette:function(){return Qn},stackOffsetWiggle:function(){return Jn},stackOrderAppearance:function(){return Kn},stackOrderAscending:function(){return ni},stackOrderDescending:function(){return ei},stackOrderInsideOut:function(){return oi},stackOrderNone:function(){return Zn},stackOrderReverse:function(){return ri},symbol:function(){return tn},symbolAsterisk:function(){return Pt},symbolCircle:function(){return Ct},symbolCross:function(){return Rt},symbolDiamond:function(){return Et},symbolDiamond2:function(){return Nt},symbolPlus:function(){return Lt},symbolSquare:function(){return jt},symbolSquare2:function(){return zt},symbolStar:function(){return Xt},symbolTriangle:function(){return Dt},symbolTriangle2:function(){return Zt},symbolWye:function(){return Ht},symbolX:function(){return Qt},symbols:function(){return Jt},symbolsFill:function(){return Jt},symbolsStroke:function(){return Kt}});var n=e(9787),i=e.n(n),r=e(3849),s=e.n(r);function u(t,n){return a(t)?t(n):t}function c(t,n){return n.disableInlineStyles?{}:t&&Object.keys(t).some((n=>a(t[n])))?Object.keys(t).reduce(((i,e)=>(i[e]=u(t[e],n),i)),{}):t}function h(t){return null==t}function a(t){return"function"==typeof t}e(9082),e(8532),e(1893);const l=Math.PI,_=2*l,f=1e-6,x=_-f;function y(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function p(){return new y}y.prototype=p.prototype={constructor:y,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,i,e){this._+="Q"+ +t+","+ +n+","+(this._x1=+i)+","+(this._y1=+e)},bezierCurveTo:function(t,n,i,e,o,r){this._+="C"+ +t+","+ +n+","+ +i+","+ +e+","+(this._x1=+o)+","+(this._y1=+r)},arcTo:function(t,n,i,e,o){t=+t,n=+n,i=+i,e=+e,o=+o;var r=this._x1,s=this._y1,u=i-t,c=e-n,h=r-t,a=s-n,_=h*h+a*a;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(_>f)if(Math.abs(a*u-c*h)>f&&o){var x=i-r,y=e-s,p=u*u+c*c,v=x*x+y*y,d=Math.sqrt(p),g=Math.sqrt(_),b=o*Math.tan((l-Math.acos((p+_-v)/(2*d*g)))/2),m=b/g,T=b/d;Math.abs(m-1)>f&&(this._+="L"+(t+m*h)+","+(n+m*a)),this._+="A"+o+","+o+",0,0,"+ +(a*x>h*y)+","+(this._x1=t+T*u)+","+(this._y1=n+T*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,i,e,o,r){t=+t,n=+n,r=!!r;var s=(i=+i)*Math.cos(e),u=i*Math.sin(e),c=t+s,h=n+u,a=1^r,y=r?e-o:o-e;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+c+","+h:(Math.abs(this._x1-c)>f||Math.abs(this._y1-h)>f)&&(this._+="L"+c+","+h),i&&(y<0&&(y=y%_+_),y>x?this._+="A"+i+","+i+",0,1,"+a+","+(t-s)+","+(n-u)+"A"+i+","+i+",0,1,"+a+","+(this._x1=c)+","+(this._y1=h):y>f&&(this._+="A"+i+","+i+",0,"+ +(y>=l)+","+a+","+(this._x1=t+i*Math.cos(o))+","+(this._y1=n+i*Math.sin(o))))},rect:function(t,n,i,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +i+"v"+ +e+"h"+-i+"Z"},toString:function(){return this._}};var v=p;function d(t){return function(){return t}}const g=Math.abs,b=Math.atan2,m=Math.cos,T=Math.max,$=Math.min,M=Math.sin,w=Math.sqrt,k=1e-12,S=Math.PI,P=S/2,C=2*S;function R(t){return t>1?0:t<-1?S:Math.acos(t)}function A(t){return t>=1?P:t<=-1?-P:Math.asin(t)}function O(t){return t.innerRadius}function E(t){return t.outerRadius}function N(t){return t.startAngle}function L(t){return t.endAngle}function j(t){return t&&t.padAngle}function z(t,n,i,e,o,r,s,u){var c=i-t,h=e-n,a=s-o,l=u-r,_=l*c-a*h;if(!(_*_<k))return[t+(_=(a*(n-r)-l*(t-o))/_)*c,n+_*h]}function q(t,n,i,e,o,r,s){var u=t-i,c=n-e,h=(s?r:-r)/w(u*u+c*c),a=h*c,l=-h*u,_=t+a,f=n+l,x=i+a,y=e+l,p=(_+x)/2,v=(f+y)/2,d=x-_,g=y-f,b=d*d+g*g,m=o-r,$=_*y-x*f,M=(g<0?-1:1)*w(T(0,m*m*b-$*$)),k=($*g-d*M)/b,S=(-$*d-g*M)/b,P=($*g+d*M)/b,C=(-$*d+g*M)/b,R=k-p,A=S-v,O=P-p,E=C-v;return R*R+A*A>O*O+E*E&&(k=P,S=C),{cx:k,cy:S,x01:-a,y01:-l,x11:k*(o/m-1),y11:S*(o/m-1)}}function I(){var t=O,n=E,i=d(0),e=null,o=N,r=L,s=j,u=null;function c(){var c,h,a=+t.apply(this,arguments),l=+n.apply(this,arguments),_=o.apply(this,arguments)-P,f=r.apply(this,arguments)-P,x=g(f-_),y=f>_;if(u||(u=c=v()),l<a&&(h=l,l=a,a=h),l>k)if(x>C-k)u.moveTo(l*m(_),l*M(_)),u.arc(0,0,l,_,f,!y),a>k&&(u.moveTo(a*m(f),a*M(f)),u.arc(0,0,a,f,_,y));else{var p,d,T=_,O=f,E=_,N=f,L=x,j=x,I=s.apply(this,arguments)/2,W=I>k&&(e?+e.apply(this,arguments):w(a*a+l*l)),X=$(g(l-a)/2,+i.apply(this,arguments)),Y=X,D=X;if(W>k){var B=A(W/a*M(I)),Z=A(W/l*M(I));(L-=2*B)>k?(E+=B*=y?1:-1,N-=B):(L=0,E=N=(_+f)/2),(j-=2*Z)>k?(T+=Z*=y?1:-1,O-=Z):(j=0,T=O=(_+f)/2)}var F=l*m(T),V=l*M(T),G=a*m(N),U=a*M(N);if(X>k){var H,Q=l*m(O),J=l*M(O),K=a*m(E),tt=a*M(E);if(x<S&&(H=z(F,V,K,tt,Q,J,G,U))){var nt=F-H[0],it=V-H[1],et=Q-H[0],ot=J-H[1],rt=1/M(R((nt*et+it*ot)/(w(nt*nt+it*it)*w(et*et+ot*ot)))/2),st=w(H[0]*H[0]+H[1]*H[1]);Y=$(X,(a-st)/(rt-1)),D=$(X,(l-st)/(rt+1))}}j>k?D>k?(p=q(K,tt,F,V,l,D,y),d=q(Q,J,G,U,l,D,y),u.moveTo(p.cx+p.x01,p.cy+p.y01),D<X?u.arc(p.cx,p.cy,D,b(p.y01,p.x01),b(d.y01,d.x01),!y):(u.arc(p.cx,p.cy,D,b(p.y01,p.x01),b(p.y11,p.x11),!y),u.arc(0,0,l,b(p.cy+p.y11,p.cx+p.x11),b(d.cy+d.y11,d.cx+d.x11),!y),u.arc(d.cx,d.cy,D,b(d.y11,d.x11),b(d.y01,d.x01),!y))):(u.moveTo(F,V),u.arc(0,0,l,T,O,!y)):u.moveTo(F,V),a>k&&L>k?Y>k?(p=q(G,U,Q,J,a,-Y,y),d=q(F,V,K,tt,a,-Y,y),u.lineTo(p.cx+p.x01,p.cy+p.y01),Y<X?u.arc(p.cx,p.cy,Y,b(p.y01,p.x01),b(d.y01,d.x01),!y):(u.arc(p.cx,p.cy,Y,b(p.y01,p.x01),b(p.y11,p.x11),!y),u.arc(0,0,a,b(p.cy+p.y11,p.cx+p.x11),b(d.cy+d.y11,d.cx+d.x11),y),u.arc(d.cx,d.cy,Y,b(d.y11,d.x11),b(d.y01,d.x01),!y))):u.arc(0,0,a,N,E,y):u.lineTo(G,U)}else u.moveTo(0,0);if(u.closePath(),c)return u=null,c+""||null}return c.centroid=function(){var i=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,e=(+o.apply(this,arguments)+ +r.apply(this,arguments))/2-S/2;return[m(e)*i,M(e)*i]},c.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:d(+n),c):t},c.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),c):n},c.cornerRadius=function(t){return arguments.length?(i="function"==typeof t?t:d(+t),c):i},c.padRadius=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:d(+t),c):e},c.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:d(+t),c):o},c.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:d(+t),c):r},c.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:d(+t),c):s},c.context=function(t){return arguments.length?(u=null==t?null:t,c):u},c}const W=(t,n)=>({x:t,y:n,distance(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},add(t){return W(this.x+t.x,this.y+t.y)},subtract(t){return W(this.x-t.x,this.y-t.y)},scalarMult(t){return W(this.x*t,this.y*t)},scalarDivide(t){if(0===t)throw new Error("Division by 0 error");return W(this.x/t,this.y/t)},equals(t){return this.x===t.x&&this.y===t.y}}),X=(t,n)=>({center:t,radius:n,hasIntersection(t){const n=this.center,i=t.center,e=this.radius,o=t.radius,r=n.distance(i);return!(r>e+o||r<Math.abs(e-o))},equals(t){const n=this.center,i=t.center;return this.radius===t.radius&&n.equals(i)},intersection(t){const n=this.center,i=t.center,e=this.radius,o=t.radius,r=n.distance(i);if(!this.hasIntersection(t)||this.equals(t))return[];const s=(Math.pow(e,2)-Math.pow(o,2)+Math.pow(r,2))/(2*r),u=Math.sqrt(Math.pow(e,2)-Math.pow(s,2)),c=n.add(i.subtract(n).scalarMult(s).scalarDivide(r)),{x:h,y:a}=n,{x:l,y:_}=i,{x:f,y:x}=c,y=[W(f-u*(_-a)/r,x+u*(l-h)/r),W(f+u*(_-a)/r,x-u*(l-h)/r)];return y.sort(((t,n)=>t.x-n.x)),y},solveX(t){const n=Math.sqrt(Math.pow(this.radius,2)-Math.pow(t-this.center.y,2));return[this.center.x-n,this.center.x+n]},solveY(t){const n=Math.sqrt(Math.pow(this.radius,2)-Math.pow(t-this.center.x,2));return[this.center.y-n,this.center.y+n]}}),Y=(t,n)=>{const{x:i,x0:e,y:o,y0:r,horizontal:s}=t,u=t.alignment||"middle",c="middle"===u?n/2:n,h=s?-1:1;return s?{x0:e,x1:i,y0:"start"===u?o:o-h*c,y1:"end"===u?o:o+h*c}:{x0:"start"===u?i:i-h*c,x1:"end"===u?i:i+h*c,y0:r,y1:o}},D=(t,n)=>{const{data:i,scale:e}=t,o=void 0===i[n]._x1?"_x":"_x1";return e.x(i[n][o])},B=t=>-1*t+Math.PI/2,Z=(t,n,i)=>{const e=`${n.topLeft} ${n.topLeft} ${i}`,o=`${n.topRight} ${n.topRight} ${i}`;return`${["M",`A ${n.bottomLeft} ${n.bottomLeft} ${i},`,"L",`A ${e},`,"L",`A ${o},`,"L",`A ${n.bottomRight} ${n.bottomRight} ${i},`].reduce(((n,i,e)=>`${n}${i} ${t[e].x}, ${t[e].y} \n`),"")} z`},F=(t,n,i)=>t.getPath?((t,n)=>{const{getPath:i}=t;if("function"==typeof i)return i({...t,...Y(t,n)})})(t,n):t.horizontal?((t,n,i)=>{const e=Y(t,n),o=e.x0<e.x1?1:-1,r={topRight:o>0?i.topLeft:i.bottomLeft,bottomRight:o>0?i.topRight:i.bottomRight,bottomLeft:o>0?i.bottomRight:i.topRight,topLeft:o>0?i.bottomLeft:i.topLeft},s=((t,n,i)=>{const{y0:e,y1:o}=t,r=t.x0<t.x1?t.x0:t.x1,s=t.x0<t.x1?t.x1:t.x0,u=t=>{const u="top"===t,c=u?-1:1,h=u?o:e;let a={x:r,y:h-c*i[`${t}Left`]},l={x:r+i[`${t}Left`],y:h},_={x:s-i[`${t}Right`],y:h},f={x:s,y:h-c*i[`${t}Right`]};if(l.x>_.x){const e=W(r+i[`${t}Left`],h-c*i[`${t}Left`]),o=X(e,i[`${t}Left`]),x=W(s-i[`${t}Right`],h-c*i[`${t}Right`]),y=X(x,i[`${t}Right`]),p=o.intersection(y);if(p.length>0){const t=p[n>0?1:0];l={x:t.x,y:t.y},_={x:t.x,y:t.y}}else if(i[`${t}Right`]>i[`${t}Left`]){const t=y.solveY(r)[u?0:1];a={x:r,y:t},l={x:r,y:t},_={x:r,y:t}}else{const t=o.solveY(s)[u?0:1];f={x:s,y:t},_={x:s,y:t},l={x:s,y:t}}}return[a,l,_,f]},c=u("top"),h=u("bottom");return[h[1],h[0],...c,h[3],h[2]]})(e,o,r);return Z(s,r,"0 0 1")})(t,n,i):((t,n,i)=>{const e=Y(t,n),o=e.y0>e.y1?1:-1,r=o>0?"0 0 1":"0 0 0",s=((t,n,i)=>{const{x0:e,x1:o,y0:r,y1:s}=t,u=t=>{const u="Left"===t,c=u?1:-1,h=u?e:o;let a={x:h+c*i[`bottom${t}`],y:r},l={x:h,y:r-n*i[`bottom${t}`]},_={x:h,y:s+n*i[`top${t}`]},f={x:h+c*i[`top${t}`],y:s};if(1===n?r-i[`bottom${t}`]<s+i[`top${t}`]:r+i[`bottom${t}`]>s-i[`top${t}`]){const e=W(h+c*i[`top${t}`],s+n*i[`top${t}`]),o=X(e,i[`top${t}`]),x=W(h+c*i[`bottom${t}`],r-n*i[`bottom${t}`]),y=X(x,i[`bottom${t}`]),p=o.intersection(y);if(p.length>0){const t=p[u?0:1];l={x:t.x,y:t.y},_={x:t.x,y:t.y}}else if(i[`top${t}`]>i[`bottom${t}`]){const t=o.solveX(r)[u?0:1];a={x:t,y:r},l={x:t,y:r},_={x:t,y:r}}else{const t=y.solveX(s)[u?0:1];l={x:t,y:s},_={x:t,y:s},f={x:t,y:s}}}const x=[a,l,_,f];return u?x:x.reverse()};return u("Left").concat(u("Right"))})(e,o,i);return Z(s,i,r)})(t,n,i),V=i().createContext(void 0),G=()=>{const t=i().useContext(V);if(!t)throw new Error("This component must be wrapped in a CanvasContext.Provider component.\n Try setting groupComponent={<CanvasGroup />} in your chart component.");return t},U=t=>{const n=function(t,n){if(void 0===t&&(t={}),n.disableInlineStyles)return{};const i={fill:"black",stroke:t.fill||"black"};return c(Object.assign(i,t),n)}(t.style,t),i=((t,n)=>{const{scale:i,data:e,style:o}=n;if(t)return u(t,n);if(o.width)return o.width;const r=i.x.range(),s=Math.abs(r[1]-r[0]),c=e.length+2,h=(n.barRatio||.5)*(e.length<2?8:s/c);return Math.max(1,h)})(t.barWidth,Object.assign({},t,{style:n})),e=((t,n)=>{const i={topLeft:0,topRight:0,bottomLeft:0,bottomRight:0};return t?function(t){return s()(t)}(t)?((t,n)=>{const i={topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},e=(e,o)=>{h(t[e])?h(t[o])||(i[e]=u(t[o],n)):i[e]=u(t[e],n)};return e("topLeft","top"),e("topRight","top"),e("bottomLeft","bottom"),e("bottomRight","bottom"),i})(t,n):(i.topLeft=u(t,n),i.topRight=u(t,n),i):i})(t.cornerRadius,Object.assign({},t,{style:n,barWidth:i}));return Object.assign({},t,{style:n,barWidth:i,cornerRadius:e})},H=t=>{const{canvasRef:n}=G(),e=U(t),{polar:o,style:r,barWidth:s,cornerRadius:u,origin:c}=e,h=i().useMemo((()=>{const t=o?((t,n)=>((t,n)=>{const{datum:i,scale:e,index:o,alignment:r,style:s}=t,u=e.y(i._y0||0),c=e.y(void 0!==i._y1?i._y1:i._y),h=e.x(void 0!==i._x1?i._x1:i._x);let a,l;if(s.width){const n=((t,n)=>{const{scale:i}=t,e=i.y.range(),o=Math.max(...e),r=Math.abs(i.x.range()[1]-i.x.range()[0]);return n/(2*Math.PI*o)*r})(t,s.width),i="middle"===r?n/2:n;a="start"===r?h:h-i,l="end"===r?h:h+i}else a=((t,n)=>{const{data:i,scale:e,alignment:o}=t,r=D(t,n),s=Math.abs(e.x.range()[1]-e.x.range()[0]),u=0===n?D(t,i.length-1)-2*Math.PI:D(t,n-1);return 0===n&&s<2*Math.PI?e.x.range()[0]:"start"===o||"end"===o?"start"===o?u:r:(r+u)/2})(t,Number(o)),l=((t,n)=>{const{data:i,scale:e,alignment:o}=t,r=D(t,n),s=Math.abs(e.x.range()[1]-e.x.range()[0]),u=e.x.range()[1]===2*Math.PI?D(t,0)+2*Math.PI:e.x.range()[1],c=n===i.length-1?D(t,0)+2*Math.PI:D(t,n+1);return n===i.length-1&&s<2*Math.PI?u:"start"===o||"end"===o?"start"===o?r:c:(r+c)/2})(t,Number(o));const _=t=>I().innerRadius(u).outerRadius(c).startAngle(B(a)).endAngle(B(l)).cornerRadius(n[t])(),f=t=>{const n=_(`${t}Right`),i=n.match(/[A-Z]/g)||[],e=n.split(/[A-Z]/).slice(1),o=i.indexOf("L"),r=_(`${t}Left`),s=r.match(/[A-Z]/g)||[],u=r.split(/[A-Z]/).slice(1),c=s.indexOf("L");return{rightMoves:i,rightCoords:e,rightMiddle:o,leftMoves:s,leftCoords:u,leftMiddle:c}};return`${[...(()=>{const{topRight:t,topLeft:i}=n,e=c*Math.abs(l-a),{rightMoves:o,rightCoords:r,rightMiddle:s,leftMoves:u,leftCoords:h,leftMiddle:_}=f("top");let x,y;if(t===i||e<2*t+2*i)x=t>i?o:u,y=t>i?r:h;else{const n=t=>t<3,e=i>t&&n(s)?1:2;let c;if(t>i){const t=n(s)?_:_-2;c=n(_)?_-1:t}else{const t=n(_)?1:2;c=n(s)?t:_-2}x=[...o.slice(0,e),...u.slice(c)],y=[...r.slice(0,e),...h.slice(c)]}const p=x.indexOf("L"),v=x.slice(0,p),d=y.slice(0,p);return v.map(((t,n)=>({command:t,coords:d[n].split(",")})))})(),...(()=>{const{bottomRight:t,bottomLeft:i}=n,e=u*Math.abs(l-a),{rightMoves:o,rightCoords:r,rightMiddle:s,leftMoves:c,leftCoords:h,leftMiddle:_}=f("bottom");let x,y;if(t===i||e<2*t+2*i)x=t>i?o:c,y=t>i?r:h;else{const n=(t,n)=>t.length-n<4,e=(t>i?n(o,s):n(c,_))?-1:-3;x=[...c.slice(0,_+2),...o.slice(e)],y=[...h.slice(0,_+2),...r.slice(e)]}const p=x.indexOf("L"),v=x.slice(p,-1),d=y.slice(p,-1);return v.map(((t,n)=>({command:t,coords:d[n].split(",")})))})()].reduce(((t,n)=>`${t}${n.command} ${n.coords.join()}`),"")} z`})(t,n))(e,u):F(e,s,u);return new Path2D(t)}),[o,s,u,e]),a=(t=>{const n=i().useRef();return i().useEffect((()=>{n.current=t})),n.current})(h),l=i().useCallback(((t,n)=>{t.fillStyle=r.fill,t.strokeStyle=r.stroke,t.globalAlpha=r.fillOpacity,t.lineWidth=r.strokeWidth,o&&t.translate(c?.x||0,c?.y||0),t.fill(n),t.setTransform(1,0,0,1,0,0)}),[r,c,o]),_=i().useCallback((t=>{if(a){t.save();const n=r.strokeWidth||0;t.lineWidth=n+2,t.globalCompositeOperation="destination-out",l(t,a),t.stroke(a),t.restore()}}),[l,a,r]);return i().useEffect((()=>{const t=n.current?.getContext("2d");t&&(_(t),l(t,h))}),[n,l,o,s,u,e,h,_]),null},Q=t=>{const n=i().useRef(null),{children:e,width:o=0,height:r=0,clipWidth:s,padding:u}=t,c=i().useCallback((t=>t.clearRect(0,0,o,r)),[o,r]),h=i().useCallback((t=>{const n="number"==typeof u?u:u?.right||0,i=o-n-("number"==typeof u?u:u?.left||0);t.clearRect(o-n,0,s?-1*(i-s):0,r)}),[o,r,u,s]);return i().createElement(V.Provider,{value:{canvasRef:n,clear:c,clip:h}},i().createElement("foreignObject",{width:o,height:r,x:0,y:0},i().createElement("canvas",{width:o,height:r,ref:n})),e)};Q.role="container";var J=Array.prototype.slice;function K(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function tt(t){this._context=t}function nt(t){return new tt(t)}function it(t){return t[0]}function et(t){return t[1]}function ot(t,n){var i=d(!0),e=null,o=nt,r=null;function s(s){var u,c,h,a=(s=K(s)).length,l=!1;for(null==e&&(r=o(h=v())),u=0;u<=a;++u)!(u<a&&i(c=s[u],u,s))===l&&((l=!l)?r.lineStart():r.lineEnd()),l&&r.point(+t(c,u,s),+n(c,u,s));if(h)return r=null,h+""||null}return t="function"==typeof t?t:void 0===t?it:d(t),n="function"==typeof n?n:void 0===n?et:d(n),s.x=function(n){return arguments.length?(t="function"==typeof n?n:d(+n),s):t},s.y=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),s):n},s.defined=function(t){return arguments.length?(i="function"==typeof t?t:d(!!t),s):i},s.curve=function(t){return arguments.length?(o=t,null!=e&&(r=o(e)),s):o},s.context=function(t){return arguments.length?(null==t?e=r=null:r=o(e=t),s):e},s}function rt(t,n,i){var e=null,o=d(!0),r=null,s=nt,u=null;function c(c){var h,a,l,_,f,x=(c=K(c)).length,y=!1,p=new Array(x),d=new Array(x);for(null==r&&(u=s(f=v())),h=0;h<=x;++h){if(!(h<x&&o(_=c[h],h,c))===y)if(y=!y)a=h,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),l=h-1;l>=a;--l)u.point(p[l],d[l]);u.lineEnd(),u.areaEnd()}y&&(p[h]=+t(_,h,c),d[h]=+n(_,h,c),u.point(e?+e(_,h,c):p[h],i?+i(_,h,c):d[h]))}if(f)return u=null,f+""||null}function h(){return ot().defined(o).curve(s).context(r)}return t="function"==typeof t?t:void 0===t?it:d(+t),n="function"==typeof n?n:d(void 0===n?0:+n),i="function"==typeof i?i:void 0===i?et:d(+i),c.x=function(n){return arguments.length?(t="function"==typeof n?n:d(+n),e=null,c):t},c.x0=function(n){return arguments.length?(t="function"==typeof n?n:d(+n),c):t},c.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:d(+t),c):e},c.y=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),i=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),c):n},c.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:d(+t),c):i},c.lineX0=c.lineY0=function(){return h().x(t).y(n)},c.lineY1=function(){return h().x(t).y(i)},c.lineX1=function(){return h().x(e).y(n)},c.defined=function(t){return arguments.length?(o="function"==typeof t?t:d(!!t),c):o},c.curve=function(t){return arguments.length?(s=t,null!=r&&(u=s(r)),c):s},c.context=function(t){return arguments.length?(null==t?r=u=null:u=s(r=t),c):r},c}function st(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function ut(t){return t}function ct(){var t=ut,n=st,i=null,e=d(0),o=d(C),r=d(0);function s(s){var u,c,h,a,l,_=(s=K(s)).length,f=0,x=new Array(_),y=new Array(_),p=+e.apply(this,arguments),v=Math.min(C,Math.max(-C,o.apply(this,arguments)-p)),d=Math.min(Math.abs(v)/_,r.apply(this,arguments)),g=d*(v<0?-1:1);for(u=0;u<_;++u)(l=y[x[u]=u]=+t(s[u],u,s))>0&&(f+=l);for(null!=n?x.sort((function(t,i){return n(y[t],y[i])})):null!=i&&x.sort((function(t,n){return i(s[t],s[n])})),u=0,h=f?(v-_*g)/f:0;u<_;++u,p=a)c=x[u],a=p+((l=y[c])>0?l*h:0)+g,y[c]={data:s[c],index:u,value:l,startAngle:p,endAngle:a,padAngle:d};return y}return s.value=function(n){return arguments.length?(t="function"==typeof n?n:d(+n),s):t},s.sortValues=function(t){return arguments.length?(n=t,i=null,s):n},s.sort=function(t){return arguments.length?(i=t,n=null,s):i},s.startAngle=function(t){return arguments.length?(e="function"==typeof t?t:d(+t),s):e},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:d(+t),s):o},s.padAngle=function(t){return arguments.length?(r="function"==typeof t?t:d(+t),s):r},s}tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var ht=lt(nt);function at(t){this._curve=t}function lt(t){function n(n){return new at(t(n))}return n._curve=t,n}function _t(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(lt(t)):n()._curve},t}function ft(){return _t(ot().curve(ht))}function xt(){var t=rt().curve(ht),n=t.curve,i=t.lineX0,e=t.lineX1,o=t.lineY0,r=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return _t(i())},delete t.lineX0,t.lineEndAngle=function(){return _t(e())},delete t.lineX1,t.lineInnerRadius=function(){return _t(o())},delete t.lineY0,t.lineOuterRadius=function(){return _t(r())},delete t.lineY1,t.curve=function(t){return arguments.length?n(lt(t)):n()._curve},t}function yt(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}at.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};class pt{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}class vt{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,n){if(t=+t,n=+n,0==this._point++)this._x0=t,this._y0=n;else{const i=yt(this._x0,this._y0),e=yt(this._x0,this._y0=(this._y0+n)/2),o=yt(t,this._y0),r=yt(t,n);this._context.moveTo(...i),this._context.bezierCurveTo(...e,...o,...r)}}}function dt(t){return new pt(t,!0)}function gt(t){return new pt(t,!1)}function bt(t){return new vt(t)}function mt(t){return t.source}function Tt(t){return t.target}function $t(t){let n=mt,i=Tt,e=it,o=et,r=null,s=null;function u(){let u;const c=J.call(arguments),h=n.apply(this,c),a=i.apply(this,c);if(null==r&&(s=t(u=v())),s.lineStart(),c[0]=h,s.point(+e.apply(this,c),+o.apply(this,c)),c[0]=a,s.point(+e.apply(this,c),+o.apply(this,c)),s.lineEnd(),u)return s=null,u+""||null}return u.source=function(t){return arguments.length?(n=t,u):n},u.target=function(t){return arguments.length?(i=t,u):i},u.x=function(t){return arguments.length?(e="function"==typeof t?t:d(+t),u):e},u.y=function(t){return arguments.length?(o="function"==typeof t?t:d(+t),u):o},u.context=function(n){return arguments.length?(null==n?r=s=null:s=t(r=n),u):r},u}function Mt(){return $t(dt)}function wt(){return $t(gt)}function kt(){const t=$t(bt);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const St=w(3);var Pt={draw(t,n){const i=.59436*w(n+$(n/28,.75)),e=i/2,o=e*St;t.moveTo(0,i),t.lineTo(0,-i),t.moveTo(-o,-e),t.lineTo(o,e),t.moveTo(-o,e),t.lineTo(o,-e)}},Ct={draw(t,n){const i=w(n/S);t.moveTo(i,0),t.arc(0,0,i,0,C)}},Rt={draw(t,n){const i=w(n/5)/2;t.moveTo(-3*i,-i),t.lineTo(-i,-i),t.lineTo(-i,-3*i),t.lineTo(i,-3*i),t.lineTo(i,-i),t.lineTo(3*i,-i),t.lineTo(3*i,i),t.lineTo(i,i),t.lineTo(i,3*i),t.lineTo(-i,3*i),t.lineTo(-i,i),t.lineTo(-3*i,i),t.closePath()}};const At=w(1/3),Ot=2*At;var Et={draw(t,n){const i=w(n/Ot),e=i*At;t.moveTo(0,-i),t.lineTo(e,0),t.lineTo(0,i),t.lineTo(-e,0),t.closePath()}},Nt={draw(t,n){const i=.62625*w(n);t.moveTo(0,-i),t.lineTo(i,0),t.lineTo(0,i),t.lineTo(-i,0),t.closePath()}},Lt={draw(t,n){const i=.87559*w(n-$(n/7,2));t.moveTo(-i,0),t.lineTo(i,0),t.moveTo(0,i),t.lineTo(0,-i)}},jt={draw(t,n){const i=w(n),e=-i/2;t.rect(e,e,i,i)}},zt={draw(t,n){const i=.4431*w(n);t.moveTo(i,i),t.lineTo(i,-i),t.lineTo(-i,-i),t.lineTo(-i,i),t.closePath()}};const qt=M(S/10)/M(7*S/10),It=M(C/10)*qt,Wt=-m(C/10)*qt;var Xt={draw(t,n){const i=w(.8908130915292852*n),e=It*i,o=Wt*i;t.moveTo(0,-i),t.lineTo(e,o);for(let n=1;n<5;++n){const r=C*n/5,s=m(r),u=M(r);t.lineTo(u*i,-s*i),t.lineTo(s*e-u*o,u*e+s*o)}t.closePath()}};const Yt=w(3);var Dt={draw(t,n){const i=-w(n/(3*Yt));t.moveTo(0,2*i),t.lineTo(-Yt*i,-i),t.lineTo(Yt*i,-i),t.closePath()}};const Bt=w(3);var Zt={draw(t,n){const i=.6824*w(n),e=i/2,o=i*Bt/2;t.moveTo(0,-i),t.lineTo(o,e),t.lineTo(-o,e),t.closePath()}};const Ft=-.5,Vt=w(3)/2,Gt=1/w(12),Ut=3*(Gt/2+1);var Ht={draw(t,n){const i=w(n/Ut),e=i/2,o=i*Gt,r=e,s=i*Gt+i,u=-r,c=s;t.moveTo(e,o),t.lineTo(r,s),t.lineTo(u,c),t.lineTo(Ft*e-Vt*o,Vt*e+Ft*o),t.lineTo(Ft*r-Vt*s,Vt*r+Ft*s),t.lineTo(Ft*u-Vt*c,Vt*u+Ft*c),t.lineTo(Ft*e+Vt*o,Ft*o-Vt*e),t.lineTo(Ft*r+Vt*s,Ft*s-Vt*r),t.lineTo(Ft*u+Vt*c,Ft*c-Vt*u),t.closePath()}},Qt={draw(t,n){const i=.6189*w(n-$(n/6,1.7));t.moveTo(-i,-i),t.lineTo(i,i),t.moveTo(-i,i),t.lineTo(i,-i)}};const Jt=[Ct,Rt,Et,jt,Xt,Dt,Ht],Kt=[Ct,Lt,Qt,Zt,Pt,zt,Nt];function tn(t,n){let i=null;function e(){let e;if(i||(i=e=v()),t.apply(this,arguments).draw(i,+n.apply(this,arguments)),e)return i=null,e+""||null}return t="function"==typeof t?t:d(t||Ct),n="function"==typeof n?n:d(void 0===n?64:+n),e.type=function(n){return arguments.length?(t="function"==typeof n?n:d(n),e):t},e.size=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),e):n},e.context=function(t){return arguments.length?(i=null==t?null:t,e):i},e}function nn(){}function en(t,n,i){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+i)/6)}function on(t){this._context=t}function rn(t){return new on(t)}function sn(t){this._context=t}function un(t){return new sn(t)}function cn(t){this._context=t}function hn(t){return new cn(t)}function an(t,n){this._basis=new on(t),this._beta=n}on.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:en(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:en(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},sn.prototype={areaStart:nn,areaEnd:nn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:en(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},cn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,e=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 3:this._point=4;default:en(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},an.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,i=t.length-1;if(i>0)for(var e,o=t[0],r=n[0],s=t[i]-o,u=n[i]-r,c=-1;++c<=i;)e=c/i,this._basis.point(this._beta*t[c]+(1-this._beta)*(o+e*s),this._beta*n[c]+(1-this._beta)*(r+e*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var ln=function t(n){function i(t){return 1===n?new on(t):new an(t,n)}return i.beta=function(n){return t(+n)},i}(.85);function _n(t,n,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function fn(t,n){this._context=t,this._k=(1-n)/6}fn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:_n(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:_n(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var xn=function t(n){function i(t){return new fn(t,n)}return i.tension=function(n){return t(+n)},i}(0);function yn(t,n){this._context=t,this._k=(1-n)/6}yn.prototype={areaStart:nn,areaEnd:nn,lineStart:function(){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,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:_n(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var pn=function t(n){function i(t){return new yn(t,n)}return i.tension=function(n){return t(+n)},i}(0);function vn(t,n){this._context=t,this._k=(1-n)/6}vn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_n(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var dn=function t(n){function i(t){return new vn(t,n)}return i.tension=function(n){return t(+n)},i}(0);function gn(t,n,i){var e=t._x1,o=t._y1,r=t._x2,s=t._y2;if(t._l01_a>k){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);e=(e*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,o=(o*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>k){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,a=3*t._l23_a*(t._l23_a+t._l12_a);r=(r*h+t._x1*t._l23_2a-n*t._l12_2a)/a,s=(s*h+t._y1*t._l23_2a-i*t._l12_2a)/a}t._context.bezierCurveTo(e,o,r,s,t._x2,t._y2)}function bn(t,n){this._context=t,this._alpha=n}bn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:gn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var mn=function t(n){function i(t){return n?new bn(t,n):new fn(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function Tn(t,n){this._context=t,this._alpha=n}Tn.prototype={areaStart:nn,areaEnd:nn,lineStart:function(){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,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:gn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var $n=function t(n){function i(t){return n?new Tn(t,n):new yn(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function Mn(t,n){this._context=t,this._alpha=n}Mn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:gn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var wn=function t(n){function i(t){return n?new Mn(t,n):new vn(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function kn(t){this._context=t}function Sn(t){return new kn(t)}function Pn(t){return t<0?-1:1}function Cn(t,n,i){var e=t._x1-t._x0,o=n-t._x1,r=(t._y1-t._y0)/(e||o<0&&-0),s=(i-t._y1)/(o||e<0&&-0),u=(r*o+s*e)/(e+o);return(Pn(r)+Pn(s))*Math.min(Math.abs(r),Math.abs(s),.5*Math.abs(u))||0}function Rn(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function An(t,n,i){var e=t._x0,o=t._y0,r=t._x1,s=t._y1,u=(r-e)/3;t._context.bezierCurveTo(e+u,o+u*n,r-u,s-u*i,r,s)}function On(t){this._context=t}function En(t){this._context=new Nn(t)}function Nn(t){this._context=t}function Ln(t){return new On(t)}function jn(t){return new En(t)}function zn(t){this._context=t}function qn(t){var n,i,e=t.length-1,o=new Array(e),r=new Array(e),s=new Array(e);for(o[0]=0,r[0]=2,s[0]=t[0]+2*t[1],n=1;n<e-1;++n)o[n]=1,r[n]=4,s[n]=4*t[n]+2*t[n+1];for(o[e-1]=2,r[e-1]=7,s[e-1]=8*t[e-1]+t[e],n=1;n<e;++n)i=o[n]/r[n-1],r[n]-=i,s[n]-=i*s[n-1];for(o[e-1]=s[e-1]/r[e-1],n=e-2;n>=0;--n)o[n]=(s[n]-o[n+1])/r[n];for(r[e-1]=(t[e]+o[e-1])/2,n=0;n<e-1;++n)r[n]=2*t[n+1]-o[n+1];return[o,r]}function In(t){return new zn(t)}function Wn(t,n){this._context=t,this._t=n}function Xn(t){return new Wn(t,.5)}function Yn(t){return new Wn(t,0)}function Dn(t){return new Wn(t,1)}function Bn(t,n){if((o=t.length)>1)for(var i,e,o,r=1,s=t[n[0]],u=s.length;r<o;++r)for(e=s,s=t[n[r]],i=0;i<u;++i)s[i][1]+=s[i][0]=isNaN(e[i][1])?e[i][0]:e[i][1]}function Zn(t){for(var n=t.length,i=new Array(n);--n>=0;)i[n]=n;return i}function Fn(t,n){return t[n]}function Vn(t){const n=[];return n.key=t,n}function Gn(){var t=d([]),n=Zn,i=Bn,e=Fn;function o(o){var r,s,u=Array.from(t.apply(this,arguments),Vn),c=u.length,h=-1;for(const t of o)for(r=0,++h;r<c;++r)(u[r][h]=[0,+e(t,u[r].key,h,o)]).data=t;for(r=0,s=K(n(u));r<c;++r)u[s[r]].index=r;return i(u,s),u}return o.keys=function(n){return arguments.length?(t="function"==typeof n?n:d(Array.from(n)),o):t},o.value=function(t){return arguments.length?(e="function"==typeof t?t:d(+t),o):e},o.order=function(t){return arguments.length?(n=null==t?Zn:"function"==typeof t?t:d(Array.from(t)),o):n},o.offset=function(t){return arguments.length?(i=null==t?Bn:t,o):i},o}function Un(t,n){if((e=t.length)>0){for(var i,e,o,r=0,s=t[0].length;r<s;++r){for(o=i=0;i<e;++i)o+=t[i][r][1]||0;if(o)for(i=0;i<e;++i)t[i][r][1]/=o}Bn(t,n)}}function Hn(t,n){if((u=t.length)>0)for(var i,e,o,r,s,u,c=0,h=t[n[0]].length;c<h;++c)for(r=s=0,i=0;i<u;++i)(o=(e=t[n[i]][c])[1]-e[0])>0?(e[0]=r,e[1]=r+=o):o<0?(e[1]=s,e[0]=s+=o):(e[0]=0,e[1]=o)}function Qn(t,n){if((i=t.length)>0){for(var i,e=0,o=t[n[0]],r=o.length;e<r;++e){for(var s=0,u=0;s<i;++s)u+=t[s][e][1]||0;o[e][1]+=o[e][0]=-u/2}Bn(t,n)}}function Jn(t,n){if((o=t.length)>0&&(e=(i=t[n[0]]).length)>0){for(var i,e,o,r=0,s=1;s<e;++s){for(var u=0,c=0,h=0;u<o;++u){for(var a=t[n[u]],l=a[s][1]||0,_=(l-(a[s-1][1]||0))/2,f=0;f<u;++f){var x=t[n[f]];_+=(x[s][1]||0)-(x[s-1][1]||0)}c+=l,h+=_*l}i[s-1][1]+=i[s-1][0]=r,c&&(r-=h/c)}i[s-1][1]+=i[s-1][0]=r,Bn(t,n)}}function Kn(t){var n=t.map(ti);return Zn(t).sort((function(t,i){return n[t]-n[i]}))}function ti(t){for(var n,i=-1,e=0,o=t.length,r=-1/0;++i<o;)(n=+t[i][1])>r&&(r=n,e=i);return e}function ni(t){var n=t.map(ii);return Zn(t).sort((function(t,i){return n[t]-n[i]}))}function ii(t){for(var n,i=0,e=-1,o=t.length;++e<o;)(n=+t[e][1])&&(i+=n);return i}function ei(t){return ni(t).reverse()}function oi(t){var n,i,e=t.length,o=t.map(ii),r=Kn(t),s=0,u=0,c=[],h=[];for(n=0;n<e;++n)i=r[n],s<u?(s+=o[i],c.push(i)):(u+=o[i],h.push(i));return h.reverse().concat(c)}function ri(t){return Zn(t).reverse()}kn.prototype={areaStart:nn,areaEnd:nn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}},On.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:An(this,this._t0,Rn(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var i=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,An(this,Rn(this,i=Cn(this,t,n)),i);break;default:An(this,this._t0,i=Cn(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=i}}},(En.prototype=Object.create(On.prototype)).point=function(t,n){On.prototype.point.call(this,n,t)},Nn.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,i,e,o,r){this._context.bezierCurveTo(n,t,e,i,r,o)}},zn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===i)this._context.lineTo(t[1],n[1]);else for(var e=qn(t),o=qn(n),r=0,s=1;s<i;++r,++s)this._context.bezierCurveTo(e[0][r],o[0][r],e[1][r],o[1][r],t[s],n[s]);(this._line||0!==this._line&&1===i)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},Wn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}}this._x=t,this._y=n}};const si=t=>null!=(void 0!==t._y1?t._y1:t._y)&&null!==t._y0,ui=t=>n=>t.x(void 0!==n._x1?n._x1:n._x),ci=t=>n=>t.y(void 0!==n._y1?n._y1:n._y),hi=t=>`curve${(t=>t&&t[0].toUpperCase()+t.slice(1))(t)}`,ai=n=>{const{interpolation:i}=n;if("function"==typeof i)return i;if("string"==typeof i){const{polar:e,openCurve:o=!e}=n,r=o?hi(i):(t=>`${hi(t)}Closed`)(i);return t[r]}return nt},li=t=>{const{polar:n,scale:i,horizontal:e}=t;return n?ft().defined(si).curve(ai(t)).angle((t=>n=>-1*t.x(void 0!==n._x1?n._x1:n._x)+Math.PI/2)(i)).radius(ci(i)):ot().defined(si).curve(ai(t)).x(e?ci(i):ui(i)).y(e?ui(i):ci(i))},_i=t=>{const{canvasRef:n,clear:e,clip:o}=G(),{style:r,data:s}=t,{stroke:u,strokeWidth:c}=r,h=i().useCallback((n=>{const i=li(t);n.strokeStyle=u,n.lineWidth=c,i.context(n)(s),n.stroke()}),[s,t,u,c]);return i().useEffect((()=>{const t=n.current?.getContext("2d");t&&(e(t),h(t),o(t))}),[n,h,e,o]),null};function fi(t,n,i){return`M ${t}, ${n}\n m ${-i}, 0\n a ${i}, ${i} 0 1,0 ${2*i},0\n a ${i}, ${i} 0 1,0 ${2*-i},0`}function xi(t,n,i){const e=.87*i,o=t-e,r=t+e-o;return`M ${o}, ${n+e}\n h${r}\n v-${r}\n h-${r}\n z`}function yi(t,n,i){const e=.87*i,o=Math.sqrt(e*e*2);return`M ${t}, ${n+o}\n l ${o}, -${o}\n l -${o}, -${o}\n l -${o}, ${o}\n l ${o}, ${o}\n z`}function pi(t,n,i){const e=n-i;return`M ${t-i}, ${e}\n L ${t+i}, ${e}\n L ${t}, ${n+i/2*Math.sqrt(3)}\n z`}function vi(t,n,i){const e=n+i;return`M ${t-i}, ${e}\n L ${t+i}, ${e}\n L ${t}, ${n-i/2*Math.sqrt(3)}\n z`}function di(t,n,i){const e=1.1*i,o=e/1.5;return`\n M ${t-o/2}, ${n+e}\n v-${o}\n h-${o}\n v-${o}\n h${o}\n v-${o}\n h${o}\n v${o}\n h${o}\n v${o}\n h-${o}\n v${o}\n z`}function gi(t,n,i){const e=.8*i,o=e/1.5;return`\n M ${t-o/2}, ${n+e+o}\n v-${2*o}\n h-${o}\n v-${o}\n h${o}\n v-${o}\n h${o}\n v${o}\n h${o}\n v${o}\n h-${o}\n v${2*o}\n z`}function bi(t,n,i){const e=1.1*i,o=e-.3*e,r=t-e,s=t+e-r;return`M ${r}, ${n+o/2}\n h${s}\n v-${o}\n h-${s}\n z`}function mi(t,n,i){const e=1.35*i,o=Math.PI/5,r=function(t,n,i){let e=10;e||(e=0);const o=e-0,r=Math.abs(o),s=o/r||1,u=Math.max(Math.ceil(r/1),0);return Array.from(Array(u),((t,n)=>0+n*s*1))}().map((i=>{const r=i%2==0?e:e/2;return`${r*Math.sin(o*(i+1))+t},\n ${r*Math.cos(o*(i+1))+n}`}));return`M ${r.join("L")} z`}const Ti=t=>{const{canvasRef:n}=G(),e=(t=>{const n=u(t.size,t),i=c(t.style,t),e=u(t.symbol,t);return Object.assign({},t,{size:n,style:i,symbol:e})})(t),o=i().useCallback((t=>{const{style:n}=e,i=(t=>{const{x:n,y:i,size:e,symbol:o}=t;if(t.getPath)return t.getPath(n,i,e);const r={circle:fi,square:xi,diamond:yi,triangleDown:pi,triangleUp:vi,plus:di,minus:bi,star:mi,cross:gi};return("function"==typeof r[o]?r[o]:r.circle)(n,i,e)})(e);t.fillStyle=n.fill;const o=new Path2D(i);t.fill(o)}),[e]);return i().useEffect((()=>{const t=n.current?.getContext("2d");t&&o(t)}),[]),null}}(),o}()}));
1
+ !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):"object"==typeof exports?exports.VictoryCanvas=n(require("react")):t.VictoryCanvas=n(t.React)}(self,(function(t){return function(){var n={2596:function(t,n,i){var e=i(2373).Symbol;t.exports=e},6082:function(t){t.exports=function(t,n,i){switch(i.length){case 0:return t.call(n);case 1:return t.call(n,i[0]);case 2:return t.call(n,i[0],i[1]);case 3:return t.call(n,i[0],i[1],i[2])}return t.apply(n,i)}},8644:function(t){t.exports=function(t,n){for(var i=-1,e=null==t?0:t.length,o=Array(e);++i<e;)o[i]=n(t[i],i,t);return o}},9559:function(t){t.exports=function(t,n){for(var i=-1,e=n.length,o=t.length;++i<e;)t[o+i]=n[i];return t}},4132:function(t,n,i){var e=i(8347),o=i(788),r=Object.prototype.hasOwnProperty;t.exports=function(t,n,i){var s=t[n];r.call(t,n)&&o(s,i)&&(void 0!==i||n in t)||e(t,n,i)}},8347:function(t,n,i){var e=i(5525);t.exports=function(t,n,i){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[n]=i}},6457:function(t,n,i){var e=i(9559),o=i(3608);t.exports=function t(n,i,r,s,u){var c=-1,h=n.length;for(r||(r=o),u||(u=[]);++c<h;){var a=n[c];i>0&&r(a)?i>1?t(a,i-1,r,s,u):e(u,a):s||(u[u.length]=a)}return u}},4432:function(t,n,i){var e=i(9026),o=i(3110);t.exports=function(t,n){for(var i=0,r=(n=e(n,t)).length;null!=t&&i<r;)t=t[o(n[i++])];return i&&i==r?t:void 0}},563:function(t){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},6776:function(t){t.exports=function(t,n){return null!=t&&n in Object(t)}},5436:function(t,n,i){var e=i(6371),o=i(5066);t.exports=function(t,n){return e(t,n,(function(n,i){return o(t,i)}))}},6371:function(t,n,i){var e=i(4432),o=i(6539),r=i(9026);t.exports=function(t,n,i){for(var s=-1,u=n.length,c={};++s<u;){var h=n[s],a=e(t,h);i(a,h)&&o(c,r(h,t),a)}return c}},1600:function(t){t.exports=function(t){return function(n){return null==n?void 0:n[t]}}},3301:function(t,n,i){var e=i(4432);t.exports=function(t){return function(n){return e(n,t)}}},6317:function(t,n,i){var e=i(5346),o=i(4280),r=i(201);t.exports=function(t,n){return r(o(t,n,e),t+"")}},6539:function(t,n,i){var e=i(4132),o=i(9026),r=i(9099),s=i(7709),u=i(3110);t.exports=function(t,n,i,c){if(!s(t))return t;for(var h=-1,a=(n=o(n,t)).length,l=a-1,_=t;null!=_&&++h<a;){var f=u(n[h]),x=i;if("__proto__"===f||"constructor"===f||"prototype"===f)return t;if(h!=l){var y=_[f];void 0===(x=c?c(y,f,_):void 0)&&(x=s(y)?y:r(n[h+1])?[]:{})}e(_,f,x),_=_[f]}return t}},6316:function(t,n,i){var e=i(2596),o=i(8644),r=i(163),s=i(1995),u=e?e.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(n){if("string"==typeof n)return n;if(r(n))return o(n,t)+"";if(s(n))return c?c.call(n):"";var i=n+"";return"0"==i&&1/n==-1/0?"-0":i}},9026:function(t,n,i){var e=i(163),o=i(726),r=i(7801),s=i(7010);t.exports=function(t,n){return e(t)?t:o(t,n)?[t]:r(s(t))}},5525:function(t,n,i){var e=i(3743),o=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},5557:function(t,n,i){var e=i(2645),o=i(4280),r=i(201);t.exports=function(t){return r(o(t,void 0,e),t+"")}},2117:function(t,n,i){var e="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;t.exports=e},3743:function(t){t.exports=function(t,n){return null==t?void 0:t[n]}},9817:function(t,n,i){var e=i(5125)(Object.getPrototypeOf,Object);t.exports=e},3096:function(t,n,i){var e=i(9026),o=i(5075),r=i(163),s=i(9099),u=i(8454),c=i(3110);t.exports=function(t,n,i){for(var h=-1,a=(n=e(n,t)).length,l=!1;++h<a;){var _=c(n[h]);if(!(l=null!=t&&i(t,_)))break;t=t[_]}return l||++h!=a?l:!!(a=null==t?0:t.length)&&u(a)&&s(_,a)&&(r(t)||o(t))}},3608:function(t,n,i){var e=i(2596),o=i(5075),r=i(163),s=e?e.isConcatSpreadable:void 0;t.exports=function(t){return r(t)||o(t)||!!(s&&t&&t[s])}},9099:function(t){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,i){var e=typeof t;return!!(i=null==i?9007199254740991:i)&&("number"==e||"symbol"!=e&&n.test(t))&&t>-1&&t%1==0&&t<i}},8286:function(t){t.exports=function(){return!1}},726:function(t,n,i){var e=i(163),o=i(1995),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,n){if(e(t))return!1;var i=typeof t;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=t&&!o(t))||s.test(t)||!r.test(t)||null!=n&&t in Object(n)}},2453:function(t){t.exports=function(t){return t}},5125:function(t){t.exports=function(t,n){return function(i){return t(n(i))}}},4280:function(t,n,i){var e=i(6082),o=Math.max;t.exports=function(t,n,i){return n=o(void 0===n?t.length-1:n,0),function(){for(var r=arguments,s=-1,u=o(r.length-n,0),c=Array(u);++s<u;)c[s]=r[n+s];s=-1;for(var h=Array(n+1);++s<n;)h[s]=r[s];return h[n]=i(c),e(t,this,h)}}},2373:function(t,n,i){var e=i(2117),o="object"==typeof self&&self&&self.Object===Object&&self,r=e||o||Function("return this")();t.exports=r},201:function(t){t.exports=function(t){return t}},7801:function(t,n,i){var e=i(2453),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,s=e((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(o,(function(t,i,e,o){n.push(e?o.replace(r,"$1"):i||t)})),n}));t.exports=s},3110:function(t,n,i){var e=i(1995);t.exports=function(t){if("string"==typeof t||e(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},1893:function(t,n,i){var e=i(6317),o=i(788),r=i(8286),s=i(8855),u=Object.prototype,c=u.hasOwnProperty,h=e((function(t,n){t=Object(t);var i=-1,e=n.length,h=e>2?n[2]:void 0;for(h&&r(n[0],n[1],h)&&(e=1);++i<e;)for(var a=n[i],l=s(a),_=-1,f=l.length;++_<f;){var x=l[_],y=t[x];(void 0===y||o(y,u[x])&&!c.call(t,x))&&(t[x]=a[x])}return t}));t.exports=h},788:function(t){t.exports=function(t,n){return t===n||t!=t&&n!=n}},2645:function(t,n,i){var e=i(6457);t.exports=function(t){return null!=t&&t.length?e(t,1):[]}},5066:function(t,n,i){var e=i(6776),o=i(3096);t.exports=function(t,n){return null!=t&&o(t,n,e)}},5346:function(t){t.exports=function(t){return t}},5075:function(t){t.exports=function(){return!1}},163:function(t){var n=Array.isArray;t.exports=n},8454:function(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},7709:function(t){t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},3474:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},3849:function(t,n,i){var e=i(563),o=i(9817),r=i(3474),s=Function.prototype,u=Object.prototype,c=s.toString,h=u.hasOwnProperty,a=c.call(Object);t.exports=function(t){if(!r(t)||"[object Object]"!=e(t))return!1;var n=o(t);if(null===n)return!0;var i=h.call(n,"constructor")&&n.constructor;return"function"==typeof i&&i instanceof i&&c.call(i)==a}},1995:function(t){t.exports=function(){return!1}},8855:function(t){t.exports=function(t){var n=[];if(null!=t)for(var i in Object(t))n.push(i);return n}},9082:function(t,n,i){var e=i(5436),o=i(5557)((function(t,n){return null==t?{}:e(t,n)}));t.exports=o},8532:function(t,n,i){var e=i(1600),o=i(3301),r=i(726),s=i(3110);t.exports=function(t){return r(t)?e(s(t)):o(t)}},7010:function(t,n,i){var e=i(6316);t.exports=function(t){return null==t?"":e(t)}},9787:function(n){"use strict";n.exports=t}},i={};function e(t){var o=i[t];if(void 0!==o)return o.exports;var r=i[t]={exports:{}};return n[t](r,r.exports,e),r.exports}e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},e.d=function(t,n){for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return function(){"use strict";e.r(o),e.d(o,{CanvasBar:function(){return H},CanvasCurve:function(){return _i},CanvasGroup:function(){return Q},CanvasPoint:function(){return Ti},useCanvasContext:function(){return G}});var t={};e.r(t),e.d(t,{arc:function(){return I},area:function(){return rt},areaRadial:function(){return xt},curveBasis:function(){return rn},curveBasisClosed:function(){return un},curveBasisOpen:function(){return hn},curveBumpX:function(){return dt},curveBumpY:function(){return gt},curveBundle:function(){return ln},curveCardinal:function(){return xn},curveCardinalClosed:function(){return pn},curveCardinalOpen:function(){return dn},curveCatmullRom:function(){return mn},curveCatmullRomClosed:function(){return $n},curveCatmullRomOpen:function(){return wn},curveLinear:function(){return nt},curveLinearClosed:function(){return Sn},curveMonotoneX:function(){return Ln},curveMonotoneY:function(){return jn},curveNatural:function(){return In},curveStep:function(){return Xn},curveStepAfter:function(){return Dn},curveStepBefore:function(){return Yn},line:function(){return ot},lineRadial:function(){return ft},link:function(){return $t},linkHorizontal:function(){return Mt},linkRadial:function(){return kt},linkVertical:function(){return wt},pie:function(){return ct},pointRadial:function(){return yt},radialArea:function(){return xt},radialLine:function(){return ft},stack:function(){return Gn},stackOffsetDiverging:function(){return Hn},stackOffsetExpand:function(){return Un},stackOffsetNone:function(){return Bn},stackOffsetSilhouette:function(){return Qn},stackOffsetWiggle:function(){return Jn},stackOrderAppearance:function(){return Kn},stackOrderAscending:function(){return ni},stackOrderDescending:function(){return ei},stackOrderInsideOut:function(){return oi},stackOrderNone:function(){return Zn},stackOrderReverse:function(){return ri},symbol:function(){return tn},symbolAsterisk:function(){return Pt},symbolCircle:function(){return Ct},symbolCross:function(){return Rt},symbolDiamond:function(){return Et},symbolDiamond2:function(){return Nt},symbolPlus:function(){return Lt},symbolSquare:function(){return jt},symbolSquare2:function(){return zt},symbolStar:function(){return Xt},symbolTriangle:function(){return Dt},symbolTriangle2:function(){return Zt},symbolWye:function(){return Ht},symbolX:function(){return Qt},symbols:function(){return Jt},symbolsFill:function(){return Jt},symbolsStroke:function(){return Kt}});var n=e(9787),i=e.n(n),r=e(3849),s=e.n(r);function u(t,n){return a(t)?t(n):t}function c(t,n){return n.disableInlineStyles?{}:t&&Object.keys(t).some((n=>a(t[n])))?Object.keys(t).reduce(((i,e)=>(i[e]=u(t[e],n),i)),{}):t}function h(t){return null==t}function a(t){return"function"==typeof t}e(1893),e(8532),e(9082);const l=Math.PI,_=2*l,f=1e-6,x=_-f;function y(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function p(){return new y}y.prototype=p.prototype={constructor:y,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,i,e){this._+="Q"+ +t+","+ +n+","+(this._x1=+i)+","+(this._y1=+e)},bezierCurveTo:function(t,n,i,e,o,r){this._+="C"+ +t+","+ +n+","+ +i+","+ +e+","+(this._x1=+o)+","+(this._y1=+r)},arcTo:function(t,n,i,e,o){t=+t,n=+n,i=+i,e=+e,o=+o;var r=this._x1,s=this._y1,u=i-t,c=e-n,h=r-t,a=s-n,_=h*h+a*a;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(_>f)if(Math.abs(a*u-c*h)>f&&o){var x=i-r,y=e-s,p=u*u+c*c,v=x*x+y*y,d=Math.sqrt(p),g=Math.sqrt(_),b=o*Math.tan((l-Math.acos((p+_-v)/(2*d*g)))/2),m=b/g,T=b/d;Math.abs(m-1)>f&&(this._+="L"+(t+m*h)+","+(n+m*a)),this._+="A"+o+","+o+",0,0,"+ +(a*x>h*y)+","+(this._x1=t+T*u)+","+(this._y1=n+T*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,i,e,o,r){t=+t,n=+n,r=!!r;var s=(i=+i)*Math.cos(e),u=i*Math.sin(e),c=t+s,h=n+u,a=1^r,y=r?e-o:o-e;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+c+","+h:(Math.abs(this._x1-c)>f||Math.abs(this._y1-h)>f)&&(this._+="L"+c+","+h),i&&(y<0&&(y=y%_+_),y>x?this._+="A"+i+","+i+",0,1,"+a+","+(t-s)+","+(n-u)+"A"+i+","+i+",0,1,"+a+","+(this._x1=c)+","+(this._y1=h):y>f&&(this._+="A"+i+","+i+",0,"+ +(y>=l)+","+a+","+(this._x1=t+i*Math.cos(o))+","+(this._y1=n+i*Math.sin(o))))},rect:function(t,n,i,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +i+"v"+ +e+"h"+-i+"Z"},toString:function(){return this._}};var v=p;function d(t){return function(){return t}}const g=Math.abs,b=Math.atan2,m=Math.cos,T=Math.max,$=Math.min,M=Math.sin,w=Math.sqrt,k=1e-12,S=Math.PI,P=S/2,C=2*S;function R(t){return t>1?0:t<-1?S:Math.acos(t)}function A(t){return t>=1?P:t<=-1?-P:Math.asin(t)}function O(t){return t.innerRadius}function E(t){return t.outerRadius}function N(t){return t.startAngle}function L(t){return t.endAngle}function j(t){return t&&t.padAngle}function z(t,n,i,e,o,r,s,u){var c=i-t,h=e-n,a=s-o,l=u-r,_=l*c-a*h;if(!(_*_<k))return[t+(_=(a*(n-r)-l*(t-o))/_)*c,n+_*h]}function q(t,n,i,e,o,r,s){var u=t-i,c=n-e,h=(s?r:-r)/w(u*u+c*c),a=h*c,l=-h*u,_=t+a,f=n+l,x=i+a,y=e+l,p=(_+x)/2,v=(f+y)/2,d=x-_,g=y-f,b=d*d+g*g,m=o-r,$=_*y-x*f,M=(g<0?-1:1)*w(T(0,m*m*b-$*$)),k=($*g-d*M)/b,S=(-$*d-g*M)/b,P=($*g+d*M)/b,C=(-$*d+g*M)/b,R=k-p,A=S-v,O=P-p,E=C-v;return R*R+A*A>O*O+E*E&&(k=P,S=C),{cx:k,cy:S,x01:-a,y01:-l,x11:k*(o/m-1),y11:S*(o/m-1)}}function I(){var t=O,n=E,i=d(0),e=null,o=N,r=L,s=j,u=null;function c(){var c,h,a=+t.apply(this,arguments),l=+n.apply(this,arguments),_=o.apply(this,arguments)-P,f=r.apply(this,arguments)-P,x=g(f-_),y=f>_;if(u||(u=c=v()),l<a&&(h=l,l=a,a=h),l>k)if(x>C-k)u.moveTo(l*m(_),l*M(_)),u.arc(0,0,l,_,f,!y),a>k&&(u.moveTo(a*m(f),a*M(f)),u.arc(0,0,a,f,_,y));else{var p,d,T=_,O=f,E=_,N=f,L=x,j=x,I=s.apply(this,arguments)/2,W=I>k&&(e?+e.apply(this,arguments):w(a*a+l*l)),X=$(g(l-a)/2,+i.apply(this,arguments)),Y=X,D=X;if(W>k){var B=A(W/a*M(I)),Z=A(W/l*M(I));(L-=2*B)>k?(E+=B*=y?1:-1,N-=B):(L=0,E=N=(_+f)/2),(j-=2*Z)>k?(T+=Z*=y?1:-1,O-=Z):(j=0,T=O=(_+f)/2)}var F=l*m(T),V=l*M(T),G=a*m(N),U=a*M(N);if(X>k){var H,Q=l*m(O),J=l*M(O),K=a*m(E),tt=a*M(E);if(x<S&&(H=z(F,V,K,tt,Q,J,G,U))){var nt=F-H[0],it=V-H[1],et=Q-H[0],ot=J-H[1],rt=1/M(R((nt*et+it*ot)/(w(nt*nt+it*it)*w(et*et+ot*ot)))/2),st=w(H[0]*H[0]+H[1]*H[1]);Y=$(X,(a-st)/(rt-1)),D=$(X,(l-st)/(rt+1))}}j>k?D>k?(p=q(K,tt,F,V,l,D,y),d=q(Q,J,G,U,l,D,y),u.moveTo(p.cx+p.x01,p.cy+p.y01),D<X?u.arc(p.cx,p.cy,D,b(p.y01,p.x01),b(d.y01,d.x01),!y):(u.arc(p.cx,p.cy,D,b(p.y01,p.x01),b(p.y11,p.x11),!y),u.arc(0,0,l,b(p.cy+p.y11,p.cx+p.x11),b(d.cy+d.y11,d.cx+d.x11),!y),u.arc(d.cx,d.cy,D,b(d.y11,d.x11),b(d.y01,d.x01),!y))):(u.moveTo(F,V),u.arc(0,0,l,T,O,!y)):u.moveTo(F,V),a>k&&L>k?Y>k?(p=q(G,U,Q,J,a,-Y,y),d=q(F,V,K,tt,a,-Y,y),u.lineTo(p.cx+p.x01,p.cy+p.y01),Y<X?u.arc(p.cx,p.cy,Y,b(p.y01,p.x01),b(d.y01,d.x01),!y):(u.arc(p.cx,p.cy,Y,b(p.y01,p.x01),b(p.y11,p.x11),!y),u.arc(0,0,a,b(p.cy+p.y11,p.cx+p.x11),b(d.cy+d.y11,d.cx+d.x11),y),u.arc(d.cx,d.cy,Y,b(d.y11,d.x11),b(d.y01,d.x01),!y))):u.arc(0,0,a,N,E,y):u.lineTo(G,U)}else u.moveTo(0,0);if(u.closePath(),c)return u=null,c+""||null}return c.centroid=function(){var i=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,e=(+o.apply(this,arguments)+ +r.apply(this,arguments))/2-S/2;return[m(e)*i,M(e)*i]},c.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:d(+n),c):t},c.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),c):n},c.cornerRadius=function(t){return arguments.length?(i="function"==typeof t?t:d(+t),c):i},c.padRadius=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:d(+t),c):e},c.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:d(+t),c):o},c.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:d(+t),c):r},c.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:d(+t),c):s},c.context=function(t){return arguments.length?(u=null==t?null:t,c):u},c}const W=(t,n)=>({x:t,y:n,distance(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},add(t){return W(this.x+t.x,this.y+t.y)},subtract(t){return W(this.x-t.x,this.y-t.y)},scalarMult(t){return W(this.x*t,this.y*t)},scalarDivide(t){if(0===t)throw new Error("Division by 0 error");return W(this.x/t,this.y/t)},equals(t){return this.x===t.x&&this.y===t.y}}),X=(t,n)=>({center:t,radius:n,hasIntersection(t){const n=this.center,i=t.center,e=this.radius,o=t.radius,r=n.distance(i);return!(r>e+o||r<Math.abs(e-o))},equals(t){const n=this.center,i=t.center;return this.radius===t.radius&&n.equals(i)},intersection(t){const n=this.center,i=t.center,e=this.radius,o=t.radius,r=n.distance(i);if(!this.hasIntersection(t)||this.equals(t))return[];const s=(Math.pow(e,2)-Math.pow(o,2)+Math.pow(r,2))/(2*r),u=Math.sqrt(Math.pow(e,2)-Math.pow(s,2)),c=n.add(i.subtract(n).scalarMult(s).scalarDivide(r)),{x:h,y:a}=n,{x:l,y:_}=i,{x:f,y:x}=c,y=[W(f-u*(_-a)/r,x+u*(l-h)/r),W(f+u*(_-a)/r,x-u*(l-h)/r)];return y.sort(((t,n)=>t.x-n.x)),y},solveX(t){const n=Math.sqrt(Math.pow(this.radius,2)-Math.pow(t-this.center.y,2));return[this.center.x-n,this.center.x+n]},solveY(t){const n=Math.sqrt(Math.pow(this.radius,2)-Math.pow(t-this.center.x,2));return[this.center.y-n,this.center.y+n]}}),Y=(t,n)=>{const{x:i,x0:e,y:o,y0:r,horizontal:s}=t,u=t.alignment||"middle",c="middle"===u?n/2:n,h=s?-1:1;return s?{x0:e,x1:i,y0:"start"===u?o:o-h*c,y1:"end"===u?o:o+h*c}:{x0:"start"===u?i:i-h*c,x1:"end"===u?i:i+h*c,y0:r,y1:o}},D=(t,n)=>{const{data:i,scale:e}=t,o=void 0===i[n]._x1?"_x":"_x1";return e.x(i[n][o])},B=t=>-1*t+Math.PI/2,Z=(t,n,i)=>{const e=`${n.topLeft} ${n.topLeft} ${i}`,o=`${n.topRight} ${n.topRight} ${i}`;return`${["M",`A ${n.bottomLeft} ${n.bottomLeft} ${i},`,"L",`A ${e},`,"L",`A ${o},`,"L",`A ${n.bottomRight} ${n.bottomRight} ${i},`].reduce(((n,i,e)=>`${n}${i} ${t[e].x}, ${t[e].y} \n`),"")} z`},F=(t,n,i)=>t.getPath?((t,n)=>{const{getPath:i}=t;if("function"==typeof i)return i({...t,...Y(t,n)})})(t,n):t.horizontal?((t,n,i)=>{const e=Y(t,n),o=e.x0<e.x1?1:-1,r={topRight:o>0?i.topLeft:i.bottomLeft,bottomRight:o>0?i.topRight:i.bottomRight,bottomLeft:o>0?i.bottomRight:i.topRight,topLeft:o>0?i.bottomLeft:i.topLeft},s=((t,n,i)=>{const{y0:e,y1:o}=t,r=t.x0<t.x1?t.x0:t.x1,s=t.x0<t.x1?t.x1:t.x0,u=t=>{const u="top"===t,c=u?-1:1,h=u?o:e;let a={x:r,y:h-c*i[`${t}Left`]},l={x:r+i[`${t}Left`],y:h},_={x:s-i[`${t}Right`],y:h},f={x:s,y:h-c*i[`${t}Right`]};if(l.x>_.x){const e=W(r+i[`${t}Left`],h-c*i[`${t}Left`]),o=X(e,i[`${t}Left`]),x=W(s-i[`${t}Right`],h-c*i[`${t}Right`]),y=X(x,i[`${t}Right`]),p=o.intersection(y);if(p.length>0){const t=p[n>0?1:0];l={x:t.x,y:t.y},_={x:t.x,y:t.y}}else if(i[`${t}Right`]>i[`${t}Left`]){const t=y.solveY(r)[u?0:1];a={x:r,y:t},l={x:r,y:t},_={x:r,y:t}}else{const t=o.solveY(s)[u?0:1];f={x:s,y:t},_={x:s,y:t},l={x:s,y:t}}}return[a,l,_,f]},c=u("top"),h=u("bottom");return[h[1],h[0],...c,h[3],h[2]]})(e,o,r);return Z(s,r,"0 0 1")})(t,n,i):((t,n,i)=>{const e=Y(t,n),o=e.y0>e.y1?1:-1,r=o>0?"0 0 1":"0 0 0",s=((t,n,i)=>{const{x0:e,x1:o,y0:r,y1:s}=t,u=t=>{const u="Left"===t,c=u?1:-1,h=u?e:o;let a={x:h+c*i[`bottom${t}`],y:r},l={x:h,y:r-n*i[`bottom${t}`]},_={x:h,y:s+n*i[`top${t}`]},f={x:h+c*i[`top${t}`],y:s};if(1===n?r-i[`bottom${t}`]<s+i[`top${t}`]:r+i[`bottom${t}`]>s-i[`top${t}`]){const e=W(h+c*i[`top${t}`],s+n*i[`top${t}`]),o=X(e,i[`top${t}`]),x=W(h+c*i[`bottom${t}`],r-n*i[`bottom${t}`]),y=X(x,i[`bottom${t}`]),p=o.intersection(y);if(p.length>0){const t=p[u?0:1];l={x:t.x,y:t.y},_={x:t.x,y:t.y}}else if(i[`top${t}`]>i[`bottom${t}`]){const t=o.solveX(r)[u?0:1];a={x:t,y:r},l={x:t,y:r},_={x:t,y:r}}else{const t=y.solveX(s)[u?0:1];l={x:t,y:s},_={x:t,y:s},f={x:t,y:s}}}const x=[a,l,_,f];return u?x:x.reverse()};return u("Left").concat(u("Right"))})(e,o,i);return Z(s,i,r)})(t,n,i),V=i().createContext(void 0),G=()=>{const t=i().useContext(V);if(!t)throw new Error("This component must be wrapped in a CanvasContext.Provider component.\n Try setting groupComponent={<CanvasGroup />} in your chart component.");return t},U=t=>{const n=function(t,n){if(void 0===t&&(t={}),n.disableInlineStyles)return{};const i={fill:"black",stroke:t.fill||"black"};return c(Object.assign(i,t),n)}(t.style,t),i=((t,n)=>{const{scale:i,data:e,style:o}=n;if(t)return u(t,n);if(o.width)return o.width;const r=i.x.range(),s=Math.abs(r[1]-r[0]),c=e.length+2,h=(n.barRatio||.5)*(e.length<2?8:s/c);return Math.max(1,h)})(t.barWidth,Object.assign({},t,{style:n})),e=((t,n)=>{const i={topLeft:0,topRight:0,bottomLeft:0,bottomRight:0};return t?function(t){return s()(t)}(t)?((t,n)=>{const i={topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},e=(e,o)=>{h(t[e])?h(t[o])||(i[e]=u(t[o],n)):i[e]=u(t[e],n)};return e("topLeft","top"),e("topRight","top"),e("bottomLeft","bottom"),e("bottomRight","bottom"),i})(t,n):(i.topLeft=u(t,n),i.topRight=u(t,n),i):i})(t.cornerRadius,Object.assign({},t,{style:n,barWidth:i}));return Object.assign({},t,{style:n,barWidth:i,cornerRadius:e})},H=t=>{const{canvasRef:n}=G(),e=U(t),{polar:o,style:r,barWidth:s,cornerRadius:u,origin:c}=e,h=i().useMemo((()=>{const t=o?((t,n)=>((t,n)=>{const{datum:i,scale:e,index:o,alignment:r,style:s}=t,u=e.y(i._y0||0),c=e.y(void 0!==i._y1?i._y1:i._y),h=e.x(void 0!==i._x1?i._x1:i._x);let a,l;if(s.width){const n=((t,n)=>{const{scale:i}=t,e=i.y.range(),o=Math.max(...e),r=Math.abs(i.x.range()[1]-i.x.range()[0]);return n/(2*Math.PI*o)*r})(t,s.width),i="middle"===r?n/2:n;a="start"===r?h:h-i,l="end"===r?h:h+i}else a=((t,n)=>{const{data:i,scale:e,alignment:o}=t,r=D(t,n),s=Math.abs(e.x.range()[1]-e.x.range()[0]),u=0===n?D(t,i.length-1)-2*Math.PI:D(t,n-1);return 0===n&&s<2*Math.PI?e.x.range()[0]:"start"===o||"end"===o?"start"===o?u:r:(r+u)/2})(t,Number(o)),l=((t,n)=>{const{data:i,scale:e,alignment:o}=t,r=D(t,n),s=Math.abs(e.x.range()[1]-e.x.range()[0]),u=e.x.range()[1]===2*Math.PI?D(t,0)+2*Math.PI:e.x.range()[1],c=n===i.length-1?D(t,0)+2*Math.PI:D(t,n+1);return n===i.length-1&&s<2*Math.PI?u:"start"===o||"end"===o?"start"===o?r:c:(r+c)/2})(t,Number(o));const _=t=>I().innerRadius(u).outerRadius(c).startAngle(B(a)).endAngle(B(l)).cornerRadius(n[t])(),f=t=>{const n=_(`${t}Right`),i=n.match(/[A-Z]/g)||[],e=n.split(/[A-Z]/).slice(1),o=i.indexOf("L"),r=_(`${t}Left`),s=r.match(/[A-Z]/g)||[],u=r.split(/[A-Z]/).slice(1),c=s.indexOf("L");return{rightMoves:i,rightCoords:e,rightMiddle:o,leftMoves:s,leftCoords:u,leftMiddle:c}};return`${[...(()=>{const{topRight:t,topLeft:i}=n,e=c*Math.abs(l-a),{rightMoves:o,rightCoords:r,rightMiddle:s,leftMoves:u,leftCoords:h,leftMiddle:_}=f("top");let x,y;if(t===i||e<2*t+2*i)x=t>i?o:u,y=t>i?r:h;else{const n=t=>t<3,e=i>t&&n(s)?1:2;let c;if(t>i){const t=n(s)?_:_-2;c=n(_)?_-1:t}else{const t=n(_)?1:2;c=n(s)?t:_-2}x=[...o.slice(0,e),...u.slice(c)],y=[...r.slice(0,e),...h.slice(c)]}const p=x.indexOf("L"),v=x.slice(0,p),d=y.slice(0,p);return v.map(((t,n)=>({command:t,coords:d[n].split(",")})))})(),...(()=>{const{bottomRight:t,bottomLeft:i}=n,e=u*Math.abs(l-a),{rightMoves:o,rightCoords:r,rightMiddle:s,leftMoves:c,leftCoords:h,leftMiddle:_}=f("bottom");let x,y;if(t===i||e<2*t+2*i)x=t>i?o:c,y=t>i?r:h;else{const n=(t,n)=>t.length-n<4,e=(t>i?n(o,s):n(c,_))?-1:-3;x=[...c.slice(0,_+2),...o.slice(e)],y=[...h.slice(0,_+2),...r.slice(e)]}const p=x.indexOf("L"),v=x.slice(p,-1),d=y.slice(p,-1);return v.map(((t,n)=>({command:t,coords:d[n].split(",")})))})()].reduce(((t,n)=>`${t}${n.command} ${n.coords.join()}`),"")} z`})(t,n))(e,u):F(e,s,u);return new Path2D(t)}),[o,s,u,e]),a=(t=>{const n=i().useRef();return i().useEffect((()=>{n.current=t})),n.current})(h),l=i().useCallback(((t,n)=>{t.fillStyle=r.fill,t.strokeStyle=r.stroke,t.globalAlpha=r.fillOpacity,t.lineWidth=r.strokeWidth,o&&t.translate(c?.x||0,c?.y||0),t.fill(n),t.setTransform(1,0,0,1,0,0)}),[r,c,o]),_=i().useCallback((t=>{if(a){t.save();const n=r.strokeWidth||0;t.lineWidth=n+2,t.globalCompositeOperation="destination-out",l(t,a),t.stroke(a),t.restore()}}),[l,a,r]);return i().useEffect((()=>{const t=n.current?.getContext("2d");t&&(_(t),l(t,h))}),[n,l,o,s,u,e,h,_]),null},Q=t=>{const n=i().useRef(null),{children:e,width:o=0,height:r=0,clipWidth:s,padding:u}=t,c=i().useCallback((t=>t.clearRect(0,0,o,r)),[o,r]),h=i().useCallback((t=>{const n="number"==typeof u?u:u?.right||0,i=o-n-("number"==typeof u?u:u?.left||0);t.clearRect(o-n,0,s?-1*(i-s):0,r)}),[o,r,u,s]);return i().createElement(V.Provider,{value:{canvasRef:n,clear:c,clip:h}},i().createElement("foreignObject",{width:o,height:r,x:0,y:0},i().createElement("canvas",{width:o,height:r,ref:n})),e)};Q.role="container";var J=Array.prototype.slice;function K(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function tt(t){this._context=t}function nt(t){return new tt(t)}function it(t){return t[0]}function et(t){return t[1]}function ot(t,n){var i=d(!0),e=null,o=nt,r=null;function s(s){var u,c,h,a=(s=K(s)).length,l=!1;for(null==e&&(r=o(h=v())),u=0;u<=a;++u)!(u<a&&i(c=s[u],u,s))===l&&((l=!l)?r.lineStart():r.lineEnd()),l&&r.point(+t(c,u,s),+n(c,u,s));if(h)return r=null,h+""||null}return t="function"==typeof t?t:void 0===t?it:d(t),n="function"==typeof n?n:void 0===n?et:d(n),s.x=function(n){return arguments.length?(t="function"==typeof n?n:d(+n),s):t},s.y=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),s):n},s.defined=function(t){return arguments.length?(i="function"==typeof t?t:d(!!t),s):i},s.curve=function(t){return arguments.length?(o=t,null!=e&&(r=o(e)),s):o},s.context=function(t){return arguments.length?(null==t?e=r=null:r=o(e=t),s):e},s}function rt(t,n,i){var e=null,o=d(!0),r=null,s=nt,u=null;function c(c){var h,a,l,_,f,x=(c=K(c)).length,y=!1,p=new Array(x),d=new Array(x);for(null==r&&(u=s(f=v())),h=0;h<=x;++h){if(!(h<x&&o(_=c[h],h,c))===y)if(y=!y)a=h,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),l=h-1;l>=a;--l)u.point(p[l],d[l]);u.lineEnd(),u.areaEnd()}y&&(p[h]=+t(_,h,c),d[h]=+n(_,h,c),u.point(e?+e(_,h,c):p[h],i?+i(_,h,c):d[h]))}if(f)return u=null,f+""||null}function h(){return ot().defined(o).curve(s).context(r)}return t="function"==typeof t?t:void 0===t?it:d(+t),n="function"==typeof n?n:d(void 0===n?0:+n),i="function"==typeof i?i:void 0===i?et:d(+i),c.x=function(n){return arguments.length?(t="function"==typeof n?n:d(+n),e=null,c):t},c.x0=function(n){return arguments.length?(t="function"==typeof n?n:d(+n),c):t},c.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:d(+t),c):e},c.y=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),i=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),c):n},c.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:d(+t),c):i},c.lineX0=c.lineY0=function(){return h().x(t).y(n)},c.lineY1=function(){return h().x(t).y(i)},c.lineX1=function(){return h().x(e).y(n)},c.defined=function(t){return arguments.length?(o="function"==typeof t?t:d(!!t),c):o},c.curve=function(t){return arguments.length?(s=t,null!=r&&(u=s(r)),c):s},c.context=function(t){return arguments.length?(null==t?r=u=null:u=s(r=t),c):r},c}function st(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function ut(t){return t}function ct(){var t=ut,n=st,i=null,e=d(0),o=d(C),r=d(0);function s(s){var u,c,h,a,l,_=(s=K(s)).length,f=0,x=new Array(_),y=new Array(_),p=+e.apply(this,arguments),v=Math.min(C,Math.max(-C,o.apply(this,arguments)-p)),d=Math.min(Math.abs(v)/_,r.apply(this,arguments)),g=d*(v<0?-1:1);for(u=0;u<_;++u)(l=y[x[u]=u]=+t(s[u],u,s))>0&&(f+=l);for(null!=n?x.sort((function(t,i){return n(y[t],y[i])})):null!=i&&x.sort((function(t,n){return i(s[t],s[n])})),u=0,h=f?(v-_*g)/f:0;u<_;++u,p=a)c=x[u],a=p+((l=y[c])>0?l*h:0)+g,y[c]={data:s[c],index:u,value:l,startAngle:p,endAngle:a,padAngle:d};return y}return s.value=function(n){return arguments.length?(t="function"==typeof n?n:d(+n),s):t},s.sortValues=function(t){return arguments.length?(n=t,i=null,s):n},s.sort=function(t){return arguments.length?(i=t,n=null,s):i},s.startAngle=function(t){return arguments.length?(e="function"==typeof t?t:d(+t),s):e},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:d(+t),s):o},s.padAngle=function(t){return arguments.length?(r="function"==typeof t?t:d(+t),s):r},s}tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var ht=lt(nt);function at(t){this._curve=t}function lt(t){function n(n){return new at(t(n))}return n._curve=t,n}function _t(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(lt(t)):n()._curve},t}function ft(){return _t(ot().curve(ht))}function xt(){var t=rt().curve(ht),n=t.curve,i=t.lineX0,e=t.lineX1,o=t.lineY0,r=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return _t(i())},delete t.lineX0,t.lineEndAngle=function(){return _t(e())},delete t.lineX1,t.lineInnerRadius=function(){return _t(o())},delete t.lineY0,t.lineOuterRadius=function(){return _t(r())},delete t.lineY1,t.curve=function(t){return arguments.length?n(lt(t)):n()._curve},t}function yt(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}at.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};class pt{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}class vt{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,n){if(t=+t,n=+n,0==this._point++)this._x0=t,this._y0=n;else{const i=yt(this._x0,this._y0),e=yt(this._x0,this._y0=(this._y0+n)/2),o=yt(t,this._y0),r=yt(t,n);this._context.moveTo(...i),this._context.bezierCurveTo(...e,...o,...r)}}}function dt(t){return new pt(t,!0)}function gt(t){return new pt(t,!1)}function bt(t){return new vt(t)}function mt(t){return t.source}function Tt(t){return t.target}function $t(t){let n=mt,i=Tt,e=it,o=et,r=null,s=null;function u(){let u;const c=J.call(arguments),h=n.apply(this,c),a=i.apply(this,c);if(null==r&&(s=t(u=v())),s.lineStart(),c[0]=h,s.point(+e.apply(this,c),+o.apply(this,c)),c[0]=a,s.point(+e.apply(this,c),+o.apply(this,c)),s.lineEnd(),u)return s=null,u+""||null}return u.source=function(t){return arguments.length?(n=t,u):n},u.target=function(t){return arguments.length?(i=t,u):i},u.x=function(t){return arguments.length?(e="function"==typeof t?t:d(+t),u):e},u.y=function(t){return arguments.length?(o="function"==typeof t?t:d(+t),u):o},u.context=function(n){return arguments.length?(null==n?r=s=null:s=t(r=n),u):r},u}function Mt(){return $t(dt)}function wt(){return $t(gt)}function kt(){const t=$t(bt);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const St=w(3);var Pt={draw(t,n){const i=.59436*w(n+$(n/28,.75)),e=i/2,o=e*St;t.moveTo(0,i),t.lineTo(0,-i),t.moveTo(-o,-e),t.lineTo(o,e),t.moveTo(-o,e),t.lineTo(o,-e)}},Ct={draw(t,n){const i=w(n/S);t.moveTo(i,0),t.arc(0,0,i,0,C)}},Rt={draw(t,n){const i=w(n/5)/2;t.moveTo(-3*i,-i),t.lineTo(-i,-i),t.lineTo(-i,-3*i),t.lineTo(i,-3*i),t.lineTo(i,-i),t.lineTo(3*i,-i),t.lineTo(3*i,i),t.lineTo(i,i),t.lineTo(i,3*i),t.lineTo(-i,3*i),t.lineTo(-i,i),t.lineTo(-3*i,i),t.closePath()}};const At=w(1/3),Ot=2*At;var Et={draw(t,n){const i=w(n/Ot),e=i*At;t.moveTo(0,-i),t.lineTo(e,0),t.lineTo(0,i),t.lineTo(-e,0),t.closePath()}},Nt={draw(t,n){const i=.62625*w(n);t.moveTo(0,-i),t.lineTo(i,0),t.lineTo(0,i),t.lineTo(-i,0),t.closePath()}},Lt={draw(t,n){const i=.87559*w(n-$(n/7,2));t.moveTo(-i,0),t.lineTo(i,0),t.moveTo(0,i),t.lineTo(0,-i)}},jt={draw(t,n){const i=w(n),e=-i/2;t.rect(e,e,i,i)}},zt={draw(t,n){const i=.4431*w(n);t.moveTo(i,i),t.lineTo(i,-i),t.lineTo(-i,-i),t.lineTo(-i,i),t.closePath()}};const qt=M(S/10)/M(7*S/10),It=M(C/10)*qt,Wt=-m(C/10)*qt;var Xt={draw(t,n){const i=w(.8908130915292852*n),e=It*i,o=Wt*i;t.moveTo(0,-i),t.lineTo(e,o);for(let n=1;n<5;++n){const r=C*n/5,s=m(r),u=M(r);t.lineTo(u*i,-s*i),t.lineTo(s*e-u*o,u*e+s*o)}t.closePath()}};const Yt=w(3);var Dt={draw(t,n){const i=-w(n/(3*Yt));t.moveTo(0,2*i),t.lineTo(-Yt*i,-i),t.lineTo(Yt*i,-i),t.closePath()}};const Bt=w(3);var Zt={draw(t,n){const i=.6824*w(n),e=i/2,o=i*Bt/2;t.moveTo(0,-i),t.lineTo(o,e),t.lineTo(-o,e),t.closePath()}};const Ft=-.5,Vt=w(3)/2,Gt=1/w(12),Ut=3*(Gt/2+1);var Ht={draw(t,n){const i=w(n/Ut),e=i/2,o=i*Gt,r=e,s=i*Gt+i,u=-r,c=s;t.moveTo(e,o),t.lineTo(r,s),t.lineTo(u,c),t.lineTo(Ft*e-Vt*o,Vt*e+Ft*o),t.lineTo(Ft*r-Vt*s,Vt*r+Ft*s),t.lineTo(Ft*u-Vt*c,Vt*u+Ft*c),t.lineTo(Ft*e+Vt*o,Ft*o-Vt*e),t.lineTo(Ft*r+Vt*s,Ft*s-Vt*r),t.lineTo(Ft*u+Vt*c,Ft*c-Vt*u),t.closePath()}},Qt={draw(t,n){const i=.6189*w(n-$(n/6,1.7));t.moveTo(-i,-i),t.lineTo(i,i),t.moveTo(-i,i),t.lineTo(i,-i)}};const Jt=[Ct,Rt,Et,jt,Xt,Dt,Ht],Kt=[Ct,Lt,Qt,Zt,Pt,zt,Nt];function tn(t,n){let i=null;function e(){let e;if(i||(i=e=v()),t.apply(this,arguments).draw(i,+n.apply(this,arguments)),e)return i=null,e+""||null}return t="function"==typeof t?t:d(t||Ct),n="function"==typeof n?n:d(void 0===n?64:+n),e.type=function(n){return arguments.length?(t="function"==typeof n?n:d(n),e):t},e.size=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),e):n},e.context=function(t){return arguments.length?(i=null==t?null:t,e):i},e}function nn(){}function en(t,n,i){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+i)/6)}function on(t){this._context=t}function rn(t){return new on(t)}function sn(t){this._context=t}function un(t){return new sn(t)}function cn(t){this._context=t}function hn(t){return new cn(t)}function an(t,n){this._basis=new on(t),this._beta=n}on.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:en(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:en(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},sn.prototype={areaStart:nn,areaEnd:nn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:en(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},cn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,e=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 3:this._point=4;default:en(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},an.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,i=t.length-1;if(i>0)for(var e,o=t[0],r=n[0],s=t[i]-o,u=n[i]-r,c=-1;++c<=i;)e=c/i,this._basis.point(this._beta*t[c]+(1-this._beta)*(o+e*s),this._beta*n[c]+(1-this._beta)*(r+e*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var ln=function t(n){function i(t){return 1===n?new on(t):new an(t,n)}return i.beta=function(n){return t(+n)},i}(.85);function _n(t,n,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function fn(t,n){this._context=t,this._k=(1-n)/6}fn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:_n(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:_n(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var xn=function t(n){function i(t){return new fn(t,n)}return i.tension=function(n){return t(+n)},i}(0);function yn(t,n){this._context=t,this._k=(1-n)/6}yn.prototype={areaStart:nn,areaEnd:nn,lineStart:function(){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,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:_n(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var pn=function t(n){function i(t){return new yn(t,n)}return i.tension=function(n){return t(+n)},i}(0);function vn(t,n){this._context=t,this._k=(1-n)/6}vn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_n(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var dn=function t(n){function i(t){return new vn(t,n)}return i.tension=function(n){return t(+n)},i}(0);function gn(t,n,i){var e=t._x1,o=t._y1,r=t._x2,s=t._y2;if(t._l01_a>k){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);e=(e*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,o=(o*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>k){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,a=3*t._l23_a*(t._l23_a+t._l12_a);r=(r*h+t._x1*t._l23_2a-n*t._l12_2a)/a,s=(s*h+t._y1*t._l23_2a-i*t._l12_2a)/a}t._context.bezierCurveTo(e,o,r,s,t._x2,t._y2)}function bn(t,n){this._context=t,this._alpha=n}bn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:gn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var mn=function t(n){function i(t){return n?new bn(t,n):new fn(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function Tn(t,n){this._context=t,this._alpha=n}Tn.prototype={areaStart:nn,areaEnd:nn,lineStart:function(){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,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:gn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var $n=function t(n){function i(t){return n?new Tn(t,n):new yn(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function Mn(t,n){this._context=t,this._alpha=n}Mn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:gn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var wn=function t(n){function i(t){return n?new Mn(t,n):new vn(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function kn(t){this._context=t}function Sn(t){return new kn(t)}function Pn(t){return t<0?-1:1}function Cn(t,n,i){var e=t._x1-t._x0,o=n-t._x1,r=(t._y1-t._y0)/(e||o<0&&-0),s=(i-t._y1)/(o||e<0&&-0),u=(r*o+s*e)/(e+o);return(Pn(r)+Pn(s))*Math.min(Math.abs(r),Math.abs(s),.5*Math.abs(u))||0}function Rn(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function An(t,n,i){var e=t._x0,o=t._y0,r=t._x1,s=t._y1,u=(r-e)/3;t._context.bezierCurveTo(e+u,o+u*n,r-u,s-u*i,r,s)}function On(t){this._context=t}function En(t){this._context=new Nn(t)}function Nn(t){this._context=t}function Ln(t){return new On(t)}function jn(t){return new En(t)}function zn(t){this._context=t}function qn(t){var n,i,e=t.length-1,o=new Array(e),r=new Array(e),s=new Array(e);for(o[0]=0,r[0]=2,s[0]=t[0]+2*t[1],n=1;n<e-1;++n)o[n]=1,r[n]=4,s[n]=4*t[n]+2*t[n+1];for(o[e-1]=2,r[e-1]=7,s[e-1]=8*t[e-1]+t[e],n=1;n<e;++n)i=o[n]/r[n-1],r[n]-=i,s[n]-=i*s[n-1];for(o[e-1]=s[e-1]/r[e-1],n=e-2;n>=0;--n)o[n]=(s[n]-o[n+1])/r[n];for(r[e-1]=(t[e]+o[e-1])/2,n=0;n<e-1;++n)r[n]=2*t[n+1]-o[n+1];return[o,r]}function In(t){return new zn(t)}function Wn(t,n){this._context=t,this._t=n}function Xn(t){return new Wn(t,.5)}function Yn(t){return new Wn(t,0)}function Dn(t){return new Wn(t,1)}function Bn(t,n){if((o=t.length)>1)for(var i,e,o,r=1,s=t[n[0]],u=s.length;r<o;++r)for(e=s,s=t[n[r]],i=0;i<u;++i)s[i][1]+=s[i][0]=isNaN(e[i][1])?e[i][0]:e[i][1]}function Zn(t){for(var n=t.length,i=new Array(n);--n>=0;)i[n]=n;return i}function Fn(t,n){return t[n]}function Vn(t){const n=[];return n.key=t,n}function Gn(){var t=d([]),n=Zn,i=Bn,e=Fn;function o(o){var r,s,u=Array.from(t.apply(this,arguments),Vn),c=u.length,h=-1;for(const t of o)for(r=0,++h;r<c;++r)(u[r][h]=[0,+e(t,u[r].key,h,o)]).data=t;for(r=0,s=K(n(u));r<c;++r)u[s[r]].index=r;return i(u,s),u}return o.keys=function(n){return arguments.length?(t="function"==typeof n?n:d(Array.from(n)),o):t},o.value=function(t){return arguments.length?(e="function"==typeof t?t:d(+t),o):e},o.order=function(t){return arguments.length?(n=null==t?Zn:"function"==typeof t?t:d(Array.from(t)),o):n},o.offset=function(t){return arguments.length?(i=null==t?Bn:t,o):i},o}function Un(t,n){if((e=t.length)>0){for(var i,e,o,r=0,s=t[0].length;r<s;++r){for(o=i=0;i<e;++i)o+=t[i][r][1]||0;if(o)for(i=0;i<e;++i)t[i][r][1]/=o}Bn(t,n)}}function Hn(t,n){if((u=t.length)>0)for(var i,e,o,r,s,u,c=0,h=t[n[0]].length;c<h;++c)for(r=s=0,i=0;i<u;++i)(o=(e=t[n[i]][c])[1]-e[0])>0?(e[0]=r,e[1]=r+=o):o<0?(e[1]=s,e[0]=s+=o):(e[0]=0,e[1]=o)}function Qn(t,n){if((i=t.length)>0){for(var i,e=0,o=t[n[0]],r=o.length;e<r;++e){for(var s=0,u=0;s<i;++s)u+=t[s][e][1]||0;o[e][1]+=o[e][0]=-u/2}Bn(t,n)}}function Jn(t,n){if((o=t.length)>0&&(e=(i=t[n[0]]).length)>0){for(var i,e,o,r=0,s=1;s<e;++s){for(var u=0,c=0,h=0;u<o;++u){for(var a=t[n[u]],l=a[s][1]||0,_=(l-(a[s-1][1]||0))/2,f=0;f<u;++f){var x=t[n[f]];_+=(x[s][1]||0)-(x[s-1][1]||0)}c+=l,h+=_*l}i[s-1][1]+=i[s-1][0]=r,c&&(r-=h/c)}i[s-1][1]+=i[s-1][0]=r,Bn(t,n)}}function Kn(t){var n=t.map(ti);return Zn(t).sort((function(t,i){return n[t]-n[i]}))}function ti(t){for(var n,i=-1,e=0,o=t.length,r=-1/0;++i<o;)(n=+t[i][1])>r&&(r=n,e=i);return e}function ni(t){var n=t.map(ii);return Zn(t).sort((function(t,i){return n[t]-n[i]}))}function ii(t){for(var n,i=0,e=-1,o=t.length;++e<o;)(n=+t[e][1])&&(i+=n);return i}function ei(t){return ni(t).reverse()}function oi(t){var n,i,e=t.length,o=t.map(ii),r=Kn(t),s=0,u=0,c=[],h=[];for(n=0;n<e;++n)i=r[n],s<u?(s+=o[i],c.push(i)):(u+=o[i],h.push(i));return h.reverse().concat(c)}function ri(t){return Zn(t).reverse()}kn.prototype={areaStart:nn,areaEnd:nn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}},On.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:An(this,this._t0,Rn(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var i=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,An(this,Rn(this,i=Cn(this,t,n)),i);break;default:An(this,this._t0,i=Cn(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=i}}},(En.prototype=Object.create(On.prototype)).point=function(t,n){On.prototype.point.call(this,n,t)},Nn.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,i,e,o,r){this._context.bezierCurveTo(n,t,e,i,r,o)}},zn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===i)this._context.lineTo(t[1],n[1]);else for(var e=qn(t),o=qn(n),r=0,s=1;s<i;++r,++s)this._context.bezierCurveTo(e[0][r],o[0][r],e[1][r],o[1][r],t[s],n[s]);(this._line||0!==this._line&&1===i)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},Wn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}}this._x=t,this._y=n}};const si=t=>null!=(void 0!==t._y1?t._y1:t._y)&&null!==t._y0,ui=t=>n=>t.x(void 0!==n._x1?n._x1:n._x),ci=t=>n=>t.y(void 0!==n._y1?n._y1:n._y),hi=t=>`curve${(t=>t&&t[0].toUpperCase()+t.slice(1))(t)}`,ai=n=>{const{interpolation:i}=n;if("function"==typeof i)return i;if("string"==typeof i){const{polar:e,openCurve:o=!e}=n,r=o?hi(i):(t=>`${hi(t)}Closed`)(i);return t[r]}return nt},li=t=>{const{polar:n,scale:i,horizontal:e}=t;return n?ft().defined(si).curve(ai(t)).angle((t=>n=>-1*t.x(void 0!==n._x1?n._x1:n._x)+Math.PI/2)(i)).radius(ci(i)):ot().defined(si).curve(ai(t)).x(e?ci(i):ui(i)).y(e?ui(i):ci(i))},_i=t=>{const{canvasRef:n,clear:e,clip:o}=G(),{style:r,data:s}=t,{stroke:u,strokeWidth:c}=r,h=i().useCallback((n=>{const i=li(t);n.strokeStyle=u,n.lineWidth=c,i.context(n)(s),n.stroke()}),[s,t,u,c]);return i().useEffect((()=>{const t=n.current?.getContext("2d");t&&(e(t),h(t),o(t))}),[n,h,e,o]),null};function fi(t,n,i){return`M ${t}, ${n}\n m ${-i}, 0\n a ${i}, ${i} 0 1,0 ${2*i},0\n a ${i}, ${i} 0 1,0 ${2*-i},0`}function xi(t,n,i){const e=.87*i,o=t-e,r=t+e-o;return`M ${o}, ${n+e}\n h${r}\n v-${r}\n h-${r}\n z`}function yi(t,n,i){const e=.87*i,o=Math.sqrt(e*e*2);return`M ${t}, ${n+o}\n l ${o}, -${o}\n l -${o}, -${o}\n l -${o}, ${o}\n l ${o}, ${o}\n z`}function pi(t,n,i){const e=n-i;return`M ${t-i}, ${e}\n L ${t+i}, ${e}\n L ${t}, ${n+i/2*Math.sqrt(3)}\n z`}function vi(t,n,i){const e=n+i;return`M ${t-i}, ${e}\n L ${t+i}, ${e}\n L ${t}, ${n-i/2*Math.sqrt(3)}\n z`}function di(t,n,i){const e=1.1*i,o=e/1.5;return`\n M ${t-o/2}, ${n+e}\n v-${o}\n h-${o}\n v-${o}\n h${o}\n v-${o}\n h${o}\n v${o}\n h${o}\n v${o}\n h-${o}\n v${o}\n z`}function gi(t,n,i){const e=.8*i,o=e/1.5;return`\n M ${t-o/2}, ${n+e+o}\n v-${2*o}\n h-${o}\n v-${o}\n h${o}\n v-${o}\n h${o}\n v${o}\n h${o}\n v${o}\n h-${o}\n v${2*o}\n z`}function bi(t,n,i){const e=1.1*i,o=e-.3*e,r=t-e,s=t+e-r;return`M ${r}, ${n+o/2}\n h${s}\n v-${o}\n h-${s}\n z`}function mi(t,n,i){const e=1.35*i,o=Math.PI/5,r=function(t,n,i){let e=10;e||(e=0);const o=e-0,r=Math.abs(o),s=o/r||1,u=Math.max(Math.ceil(r/1),0);return Array.from(Array(u),((t,n)=>0+n*s*1))}().map((i=>{const r=i%2==0?e:e/2;return`${r*Math.sin(o*(i+1))+t},\n ${r*Math.cos(o*(i+1))+n}`}));return`M ${r.join("L")} z`}const Ti=t=>{const{canvasRef:n}=G(),e=(t=>{const n=u(t.size,t),i=c(t.style,t),e=u(t.symbol,t);return Object.assign({},t,{size:n,style:i,symbol:e})})(t),o=i().useCallback((t=>{const{style:n}=e,i=(t=>{const{x:n,y:i,size:e,symbol:o}=t;if(t.getPath)return t.getPath(n,i,e);const r={circle:fi,square:xi,diamond:yi,triangleDown:pi,triangleUp:vi,plus:di,minus:bi,star:mi,cross:gi};return("function"==typeof r[o]?r[o]:r.circle)(n,i,e)})(e);t.fillStyle=n.fill;const o=new Path2D(i);t.fill(o)}),[e]);return i().useEffect((()=>{const t=n.current?.getContext("2d");t&&o(t)}),[]),null}}(),o}()}));
2
2
  //# sourceMappingURL=victory-canvas.min.js.map
@@ -52,7 +52,6 @@ export const CanvasPoint = props => {
52
52
  } = modifiedProps;
53
53
  const path = getPath(modifiedProps);
54
54
  ctx.fillStyle = style.fill;
55
- // eslint-disable-next-line no-undef
56
55
  const path2d = new Path2D(path);
57
56
  ctx.fill(path2d);
58
57
  }, [modifiedProps]);
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- export declare type CanvasContextValue = {
2
+ export type CanvasContextValue = {
3
3
  canvasRef: React.RefObject<HTMLCanvasElement>;
4
4
  clear: (ctx: CanvasRenderingContext2D) => void;
5
5
  clip: (ctx: CanvasRenderingContext2D) => void;
@@ -59,7 +59,6 @@ const CanvasPoint = props => {
59
59
  } = modifiedProps;
60
60
  const path = getPath(modifiedProps);
61
61
  ctx.fillStyle = style.fill;
62
- // eslint-disable-next-line no-undef
63
62
  const path2d = new Path2D(path);
64
63
  ctx.fill(path2d);
65
64
  }, [modifiedProps]);
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- export declare type CanvasContextValue = {
2
+ export type CanvasContextValue = {
3
3
  canvasRef: React.RefObject<HTMLCanvasElement>;
4
4
  clear: (ctx: CanvasRenderingContext2D) => void;
5
5
  clip: (ctx: CanvasRenderingContext2D) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-canvas",
3
- "version": "37.3.1",
3
+ "version": "37.3.3",
4
4
  "description": "HTML5 Canvas Components for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -21,8 +21,8 @@
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
23
  "lodash": "^4.17.19",
24
- "victory-bar": "37.3.1",
25
- "victory-core": "37.3.1"
24
+ "victory-bar": "37.3.3",
25
+ "victory-core": "37.3.3"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": ">=16.6.0"
@@ -187,38 +187,10 @@
187
187
  "pnpm-lock.yaml"
188
188
  ]
189
189
  },
190
- "format": {
191
- "command": "nps format:pkg",
192
- "files": [
193
- "src/**",
194
- "*.json",
195
- "../../.prettierignore",
196
- "../../.prettierrc.json"
197
- ],
198
- "output": [],
199
- "packageLocks": [
200
- "pnpm-lock.yaml"
201
- ]
202
- },
203
- "format:fix": {
204
- "command": "pnpm run format || nps format:pkg:fix",
205
- "files": [
206
- "src/**",
207
- "*.json",
208
- "../../.prettierignore",
209
- "../../.prettierrc.json"
210
- ],
211
- "output": [],
212
- "packageLocks": [
213
- "pnpm-lock.yaml"
214
- ]
215
- },
216
190
  "lint": {
217
- "command": "nps lint:pkg",
191
+ "command": "eslint src",
218
192
  "files": [
219
- "src/**",
220
- "../../.eslintignore",
221
- "../../.eslintrc.js"
193
+ "src/**"
222
194
  ],
223
195
  "output": [],
224
196
  "dependencies": [
@@ -232,11 +204,9 @@
232
204
  ]
233
205
  },
234
206
  "lint:fix": {
235
- "command": "pnpm run lint || nps lint:pkg:fix",
207
+ "command": "eslint --fix src",
236
208
  "files": [
237
- "src/**",
238
- "../../.eslintignore",
239
- "../../.eslintrc.js"
209
+ "src/**"
240
210
  ],
241
211
  "output": [],
242
212
  "dependencies": [
@@ -282,8 +252,6 @@
282
252
  "check": "wireit",
283
253
  "types:check": "wireit",
284
254
  "types:create": "wireit",
285
- "format": "wireit",
286
- "format:fix": "wireit",
287
255
  "lint": "wireit",
288
256
  "lint:fix": "wireit",
289
257
  "jest": "wireit"
@@ -10,7 +10,7 @@ import { LineRadial } from "../../victory-vendor/d3-shape";
10
10
 
11
11
  export interface CanvasCurveProps extends VictoryCommonPrimitiveProps {
12
12
  ariaLabel?: StringOrCallback;
13
- // eslint-disable-next-line @typescript-eslint/ban-types
13
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
14
14
  interpolation?: string | Function;
15
15
  openCurve?: boolean;
16
16
  tabIndex?: NumberOrCallback;
@@ -10,9 +10,9 @@ import { useCanvasContext } from "./hooks/use-canvas-context";
10
10
  export interface CanvasPointProps extends VictoryCommonPrimitiveProps {
11
11
  datum?: any;
12
12
  getPath?: (x: number, y: number, size: number) => string;
13
- // eslint-disable-next-line @typescript-eslint/ban-types
13
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
14
14
  size?: number | Function;
15
- // eslint-disable-next-line @typescript-eslint/ban-types
15
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
16
16
  symbol?: ScatterSymbolType | Function;
17
17
  x?: number;
18
18
  y?: number;
@@ -68,7 +68,7 @@ export const CanvasPoint = (props: CanvasPointProps) => {
68
68
  const { style } = modifiedProps;
69
69
  const path = getPath(modifiedProps);
70
70
  ctx.fillStyle = style.fill;
71
- // eslint-disable-next-line no-undef
71
+
72
72
  const path2d = new Path2D(path);
73
73
  ctx.fill(path2d);
74
74
  },