victory-brush-container 37.0.3-next.0 → 37.1.0

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,12 +1,12 @@
1
1
  # victory-brush-container
2
2
 
3
- ## 37.0.3-next.0
3
+ ## 37.1.0
4
4
 
5
- ### Patch Changes
5
+ ### Minor Changes
6
+
7
+ - Refactor containers and portal to function components ([#2799](https://github.com/FormidableLabs/victory/pull/2799))
6
8
 
7
- - 65d02419f: Refactor containers and portal to function components
8
- - Updated dependencies [65d02419f]
9
- - victory-core@37.0.3-next.0
9
+ * Pin all internal victory package versions ([#2876](https://github.com/FormidableLabs/victory/pull/2876))
10
10
 
11
11
  ## 37.0.2
12
12
 
@@ -2861,9 +2861,9 @@ __webpack_require__.r(__webpack_exports__);
2861
2861
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2862
2862
  /* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-portal/portal */ "../../victory-core/es/victory-portal/portal.js");
2863
2863
  /* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../victory-util/user-props */ "../../victory-core/es/victory-util/user-props.js");
2864
- /* harmony import */ var _victory_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util */ "../../victory-core/es/victory-util/merge-refs.js");
2864
+ /* harmony import */ var _victory_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util */ "../../victory-core/es/victory-util/merge-refs.js");
2865
2865
  /* harmony import */ var _victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-portal/portal-outlet */ "../../victory-core/es/victory-portal/portal-outlet.js");
2866
- /* harmony import */ var _victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-portal/portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
2866
+ /* harmony import */ var _victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-portal/portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
2867
2867
 
2868
2868
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2869
2869
 
@@ -2963,7 +2963,7 @@ const VictoryContainer = initialProps => {
2963
2963
  };
2964
2964
  // eslint-disable-next-line react-hooks/exhaustive-deps
2965
2965
  }, []);
2966
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_4__.PortalProvider, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", {
2966
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", {
2967
2967
  className: className,
2968
2968
  style: {
2969
2969
  ...style,
@@ -2976,8 +2976,8 @@ const VictoryContainer = initialProps => {
2976
2976
  "data-ouia-component-id": ouiaId,
2977
2977
  "data-ouia-component-type": ouiaType,
2978
2978
  "data-ouia-safe": ouiaSafe,
2979
- ref: (0,_victory_util__WEBPACK_IMPORTED_MODULE_5__.mergeRefs)([localContainerRef, containerRef])
2980
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("svg", _extends({
2979
+ ref: (0,_victory_util__WEBPACK_IMPORTED_MODULE_4__.mergeRefs)([localContainerRef, containerRef])
2980
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_5__.PortalProvider, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("svg", _extends({
2981
2981
  width: width,
2982
2982
  height: height,
2983
2983
  tabIndex: tabIndex,
@@ -3038,9 +3038,6 @@ const PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().
3038
3038
  PortalContext.displayName = "PortalContext";
3039
3039
  const usePortalContext = () => {
3040
3040
  const context = react__WEBPACK_IMPORTED_MODULE_0___default().useContext(PortalContext);
3041
- if (!context) {
3042
- throw new Error("`usePortalContext` must be used within a `<PortalProvider />`");
3043
- }
3044
3041
  return context;
3045
3042
  };
3046
3043
  const PortalProvider = _ref => {
@@ -3096,12 +3093,10 @@ const PortalOutlet = _ref => {
3096
3093
  ...props
3097
3094
  } = _ref;
3098
3095
  const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_1__.usePortalContext)();
3099
- const children = Array.from(portalContext.children.entries()).map(_ref2 => {
3100
- let [key, node] = _ref2;
3101
- return !node.key ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(node, {
3102
- key
3103
- }) : node;
3104
- });
3096
+ if (!portalContext) {
3097
+ return null;
3098
+ }
3099
+ const children = Array.from(portalContext.children.values());
3105
3100
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(portalComponent, props, children);
3106
3101
  };
3107
3102
 
@@ -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.VictoryBrushContainer=n(require("react")):t.VictoryBrushContainer=n(t.React)}(self,(function(t){return function(){var n={2596:function(t,n,e){var r=e(2373).Symbol;t.exports=r},6082:function(t){t.exports=function(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}},8644:function(t){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length,o=Array(r);++e<r;)o[e]=n(t[e],e,t);return o}},9559:function(t){t.exports=function(t,n){for(var e=-1,r=n.length,o=t.length;++e<r;)t[o+e]=n[e];return t}},4132:function(t,n,e){var r=e(8347),o=e(788),i=Object.prototype.hasOwnProperty;t.exports=function(t,n,e){var a=t[n];i.call(t,n)&&o(a,e)&&(void 0!==e||n in t)||r(t,n,e)}},8347:function(t,n,e){var r=e(5525);t.exports=function(t,n,e){"__proto__"==n&&r?r(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}},6457:function(t,n,e){var r=e(9559),o=e(3608);t.exports=function t(n,e,i,a,u){var s=-1,c=n.length;for(i||(i=o),u||(u=[]);++s<c;){var l=n[s];e>0&&i(l)?e>1?t(l,e-1,i,a,u):r(u,l):a||(u[u.length]=l)}return u}},4432:function(t,n,e){var r=e(9026),o=e(3110);t.exports=function(t,n){for(var e=0,i=(n=r(n,t)).length;null!=t&&e<i;)t=t[o(n[e++])];return e&&e==i?t:void 0}},6776:function(t){t.exports=function(t,n){return null!=t&&n in Object(t)}},5436:function(t,n,e){var r=e(6371),o=e(5066);t.exports=function(t,n){return r(t,n,(function(n,e){return o(t,e)}))}},6371:function(t,n,e){var r=e(4432),o=e(6539),i=e(9026);t.exports=function(t,n,e){for(var a=-1,u=n.length,s={};++a<u;){var c=n[a],l=r(t,c);e(l,c)&&o(s,i(c,t),l)}return s}},1600:function(t){t.exports=function(t){return function(n){return null==n?void 0:n[t]}}},3301:function(t,n,e){var r=e(4432);t.exports=function(t){return function(n){return r(n,t)}}},6317:function(t,n,e){var r=e(5346),o=e(4280),i=e(201);t.exports=function(t,n){return i(o(t,n,r),t+"")}},6539:function(t,n,e){var r=e(4132),o=e(9026),i=e(9099),a=e(7709),u=e(3110);t.exports=function(t,n,e,s){if(!a(t))return t;for(var c=-1,l=(n=o(n,t)).length,f=l-1,h=t;null!=h&&++c<l;){var x=u(n[c]),y=e;if("__proto__"===x||"constructor"===x||"prototype"===x)return t;if(c!=f){var p=h[x];void 0===(y=s?s(p,x,h):void 0)&&(y=a(p)?p:i(n[c+1])?[]:{})}r(h,x,y),h=h[x]}return t}},6316:function(t,n,e){var r=e(2596),o=e(8644),i=e(163),a=e(1995),u=r?r.prototype:void 0,s=u?u.toString:void 0;t.exports=function t(n){if("string"==typeof n)return n;if(i(n))return o(n,t)+"";if(a(n))return s?s.call(n):"";var e=n+"";return"0"==e&&1/n==-1/0?"-0":e}},1367:function(t,n,e){var r=e(4120),o=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(o,""):t}},9026:function(t,n,e){var r=e(163),o=e(726),i=e(7801),a=e(7010);t.exports=function(t,n){return r(t)?t:o(t,n)?[t]:i(a(t))}},5525:function(t,n,e){var r=e(3743),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},5557:function(t,n,e){var r=e(2645),o=e(4280),i=e(201);t.exports=function(t){return i(o(t,void 0,r),t+"")}},2117:function(t,n,e){var r="object"==typeof e.g&&e.g&&e.g.Object===Object&&e.g;t.exports=r},3743:function(t){t.exports=function(t,n){return null==t?void 0:t[n]}},3096:function(t,n,e){var r=e(9026),o=e(5075),i=e(163),a=e(9099),u=e(8454),s=e(3110);t.exports=function(t,n,e){for(var c=-1,l=(n=r(n,t)).length,f=!1;++c<l;){var h=s(n[c]);if(!(f=null!=t&&e(t,h)))break;t=t[h]}return f||++c!=l?f:!!(l=null==t?0:t.length)&&u(l)&&a(h,l)&&(i(t)||o(t))}},3608:function(t,n,e){var r=e(2596),o=e(5075),i=e(163),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(a&&t&&t[a])}},9099:function(t){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},8286:function(t){t.exports=function(){return!1}},726:function(t,n,e){var r=e(163),o=e(1995),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,n){if(r(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!o(t))||a.test(t)||!i.test(t)||null!=n&&t in Object(n)}},2453:function(t){t.exports=function(t){return t}},4280:function(t,n,e){var r=e(6082),o=Math.max;t.exports=function(t,n,e){return n=o(void 0===n?t.length-1:n,0),function(){for(var i=arguments,a=-1,u=o(i.length-n,0),s=Array(u);++a<u;)s[a]=i[n+a];a=-1;for(var c=Array(n+1);++a<n;)c[a]=i[a];return c[n]=e(s),r(t,this,c)}}},2373:function(t,n,e){var r=e(2117),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},201:function(t){t.exports=function(t){return t}},7801:function(t,n,e){var r=e(2453),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(o,(function(t,e,r,o){n.push(r?o.replace(i,"$1"):e||t)})),n}));t.exports=a},3110:function(t,n,e){var r=e(1995);t.exports=function(t){if("string"==typeof t||r(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},4120:function(t){var n=/\s/;t.exports=function(t){for(var e=t.length;e--&&n.test(t.charAt(e)););return e}},5034:function(t,n,e){var r=e(7709),o=e(6987),i=e(5812),a=Math.max,u=Math.min;t.exports=function(t,n,e){var s,c,l,f,h,x,y=0,p=!1,d=!1,m=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function v(n){var e=s,r=c;return s=c=void 0,y=n,f=t.apply(r,e)}function g(t){return y=t,h=setTimeout(M,n),p?v(t):f}function b(t){var e=t-x;return void 0===x||e>=n||e<0||d&&t-y>=l}function M(){var t=o();if(b(t))return w(t);h=setTimeout(M,function(t){var e=n-(t-x);return d?u(e,l-(t-y)):e}(t))}function w(t){return h=void 0,m&&s?v(t):(s=c=void 0,f)}function D(){var t=o(),e=b(t);if(s=arguments,c=this,x=t,e){if(void 0===h)return g(x);if(d)return clearTimeout(h),h=setTimeout(M,n),v(x)}return void 0===h&&(h=setTimeout(M,n)),f}return n=i(n)||0,r(e)&&(p=!!e.leading,l=(d="maxWait"in e)?a(i(e.maxWait)||0,n):l,m="trailing"in e?!!e.trailing:m),D.cancel=function(){void 0!==h&&clearTimeout(h),y=0,s=x=c=h=void 0},D.flush=function(){return void 0===h?f:w(o())},D}},1893:function(t,n,e){var r=e(6317),o=e(788),i=e(8286),a=e(8855),u=Object.prototype,s=u.hasOwnProperty,c=r((function(t,n){t=Object(t);var e=-1,r=n.length,c=r>2?n[2]:void 0;for(c&&i(n[0],n[1],c)&&(r=1);++e<r;)for(var l=n[e],f=a(l),h=-1,x=f.length;++h<x;){var y=f[h],p=t[y];(void 0===p||o(p,u[y])&&!s.call(t,y))&&(t[y]=l[y])}return t}));t.exports=c},788:function(t){t.exports=function(t,n){return t===n||t!=t&&n!=n}},2645:function(t,n,e){var r=e(6457);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},5066:function(t,n,e){var r=e(6776),o=e(3096);t.exports=function(t,n){return null!=t&&o(t,n,r)}},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)}},1995:function(t){t.exports=function(){return!1}},8855:function(t){t.exports=function(t){var n=[];if(null!=t)for(var e in Object(t))n.push(e);return n}},6987:function(t,n,e){var r=e(2373);t.exports=function(){return r.Date.now()}},9082:function(t,n,e){var r=e(5436),o=e(5557)((function(t,n){return null==t?{}:r(t,n)}));t.exports=o},8532:function(t,n,e){var r=e(1600),o=e(3301),i=e(726),a=e(3110);t.exports=function(t){return i(t)?r(a(t)):o(t)}},8163:function(t,n,e){var r=e(5034),o=e(7709);t.exports=function(t,n,e){var i=!0,a=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return o(e)&&(i="leading"in e?!!e.leading:i,a="trailing"in e?!!e.trailing:a),r(t,n,{leading:i,maxWait:n,trailing:a})}},5812:function(t,n,e){var r=e(1367),o=e(7709),i=e(1995),a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(o(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=o(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var e=u.test(t);return e||s.test(t)?c(t.slice(2),e?2:8):a.test(t)?NaN:+t}},7010:function(t,n,e){var r=e(6316);t.exports=function(t){return null==t?"":r(t)}},660:function(t,n,e){var r=e(7010),o=0;t.exports=function(t){var n=++o;return r(t)+n}},7491:function(t){var n="undefined"!=typeof Element,e="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function i(t,a){if(t===a)return!0;if(t&&a&&"object"==typeof t&&"object"==typeof a){if(t.constructor!==a.constructor)return!1;var u,s,c,l;if(Array.isArray(t)){if((u=t.length)!=a.length)return!1;for(s=u;0!=s--;)if(!i(t[s],a[s]))return!1;return!0}if(e&&t instanceof Map&&a instanceof Map){if(t.size!==a.size)return!1;for(l=t.entries();!(s=l.next()).done;)if(!a.has(s.value[0]))return!1;for(l=t.entries();!(s=l.next()).done;)if(!i(s.value[1],a.get(s.value[0])))return!1;return!0}if(r&&t instanceof Set&&a instanceof Set){if(t.size!==a.size)return!1;for(l=t.entries();!(s=l.next()).done;)if(!a.has(s.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(a)){if((u=t.length)!=a.length)return!1;for(s=u;0!=s--;)if(t[s]!==a[s])return!1;return!0}if(t.constructor===RegExp)return t.source===a.source&&t.flags===a.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===a.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===a.toString();if((u=(c=Object.keys(t)).length)!==Object.keys(a).length)return!1;for(s=u;0!=s--;)if(!Object.prototype.hasOwnProperty.call(a,c[s]))return!1;if(n&&t instanceof Element)return!1;for(s=u;0!=s--;)if(("_owner"!==c[s]&&"__v"!==c[s]&&"__o"!==c[s]||!t.$$typeof)&&!i(t[c[s]],a[c[s]]))return!1;return!0}return t!=t&&a!=a}t.exports=function(t,n){try{return i(t,n)}catch(t){if((t.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw t}}},9787:function(n){"use strict";n.exports=t}},e={};function r(t){var o=e[t];if(void 0!==o)return o.exports;var i=e[t]={exports:{}};return n[t](i,i.exports,r),i.exports}r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,{a:n}),n},r.d=function(t,n){for(var e in n)r.o(n,e)&&!r.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.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";r.r(o),r.d(o,{BrushHelpers:function(){return I},VICTORY_BRUSH_CONTAINER_DEFAULT_PROPS:function(){return V},VictoryBrushContainer:function(){return k},useVictoryBrushContainer:function(){return $}});var t=r(1893),n=r.n(t),e=r(9787),i=r.n(e);function a(t,n){return u(t)?t(n):t}function u(t){return"function"==typeof t}function s(t,n){if(t)return Object.keys(t).reduce(((e,r)=>(e[r]=n(t[r]),e)),{})}function c(){return c=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},c.apply(this,arguments)}r(9082),r(8532);const l=(0,e.forwardRef)(((t,n)=>{const{desc:e,id:r,tabIndex:o,origin:u,...s}=t,l={vectorEffect:"non-scaling-stroke",id:a(r,t)?.toString(),tabIndex:a(o,t),...s};return e?i().createElement("rect",c({},l,{ref:n}),i().createElement("desc",null,e)):i().createElement("rect",c({},l,{ref:n}))}));function f(t){return Array.isArray(t)&&t.some((t=>t instanceof Date))}function h(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];const o=t.concat(e);return f(o)?new Date(Math.max(...o)):Math.max(...o)}function x(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];const o=t.concat(e);return f(o)?new Date(Math.min(...o)):Math.min(...o)}function y(t,n,e){const{a:r,d:o,e:i,f:a}=n;return"y"===e?o*t+a:r*t+i}function p(t){return!(!t||void 0===t.identifier)}function d(t){if(p(t.nativeEvent))return;const n=t=>"svg"===t.nodeName?t:t.parentNode?n(t.parentNode):t;return n(t.target)}function m(t,n){if(p(t.nativeEvent))return{x:t.nativeEvent.locationX,y:t.nativeEvent.locationY};const e=function(t){return t.changedTouches&&t.changedTouches.length>0}(t)?t.changedTouches[0]:t,r=function(t){return t.getScreenCTM().inverse()}(n||d(e));return{x:y(e.clientX,r,"x"),y:y(e.clientY,r,"y")}}function v(t,n){const{horizontal:e}=t,r=t.scale,o=n||{x:r.x.domain(),y:r.y.domain()};return{x:e?[r.y(o.y[0]),r.y(o.y[1])]:[r.x(o.x[0]),r.x(o.x[1])],y:e?[r.x(o.x[0]),r.x(o.x[1])]:[r.y(o.y[0]),r.y(o.y[1])]}}function g(t,n,e,r){const{polar:o,horizontal:i}=t;if(!o)return{x:i?n.x.invert(r):n.x.invert(e),y:i?n.y.invert(e):n.y.invert(r)};const a=t.origin||{x:0,y:0},u=e-a.x,s=r-a.y,c=Math.abs(u*Math.sqrt(1+Math.pow(-s/u,2))),l=(-Math.atan2(s,u)+2*Math.PI)%(2*Math.PI);return{x:n.x.invert(l),y:n.y.invert(c)}}function b(t){const{x1:n,x2:e,y1:r,y2:o,scale:i}=t,a=g(t,i,n,r),u=g(t,i,e,o),s=(t,n)=>[x([t,n]),h([t,n])];return{x:s(a.x,u.x),y:s(a.y,u.y)}}var M=r(660),w=r.n(M);function D(){return D=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},D.apply(this,arguments)}const B=i().forwardRef(((t,n)=>i().createElement("svg",D({ref:n},t)))),O={startsWith:["data-","aria-"],exactMatch:[]},E=t=>{const n={...t};return Object.fromEntries(Object.entries(n).filter((t=>{let[n]=t;return(t=>!(!(t=>{let n=!1;return O.startsWith.forEach((e=>{new RegExp(`\\b(${e})(\\w|-)+`,"g").test(t)&&(n=!0)})),n})(t)&&!(t=>O.exactMatch.includes(t))(t)))(n)})).map((n=>{let[e,r]=n;return[e,a(r,t)]})))},j=i().createContext(void 0);j.displayName="PortalContext";const S=t=>{let{children:n}=t;const[e,r]=i().useState(new Map),o=i().useCallback(((t,n)=>{r((e=>{const r=new Map(e);return r.set(t,n),r}))}),[r]),a=i().useCallback((t=>{r((n=>{const e=new Map(n);return e.delete(t),e}))}),[r]),u=i().useMemo((()=>({addChild:o,removeChild:a,children:e})),[o,a,e]);return i().createElement(j.Provider,{value:u},n)},A=t=>{let{as:n,...e}=t;const r=(()=>{const t=i().useContext(j);if(!t)throw new Error("`usePortalContext` must be used within a `<PortalProvider />`");return t})(),o=Array.from(r.children.entries()).map((t=>{let[n,e]=t;return e.key?e:i().cloneElement(e,{key:n})}));return i().cloneElement(n,e,o)};function P(){return P=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},P.apply(this,arguments)}const C={className:"VictoryContainer",portalComponent:i().createElement(B,null),portalZIndex:99,responsive:!0,role:"img"},R=t=>{const{role:n,title:r,desc:o,children:a,className:s,portalZIndex:c,portalComponent:l,width:f,height:h,style:x,tabIndex:y,responsive:p,events:d,ouiaId:m,ouiaSafe:v,ouiaType:g,dimensions:b,ariaDescribedBy:M,ariaLabelledBy:D,viewBox:B,preserveAspectRatio:O,userProps:j,titleId:R,descId:T,containerRef:G,localContainerRef:z}=function(t){const n={...C,...t},{title:r,desc:o,width:i,height:a,responsive:u}=n,s=(0,e.useRef)(null),c=(0,e.useRef)(w()("victory-container-")),l=n.containerId??c.current,f=t=>`${l}-${t}`,h=E(n),x=u?{width:"100%",height:"100%"}:{width:i,height:a},y=u?`0 0 ${i} ${a}`:void 0,p=u?n.preserveAspectRatio:void 0,d=[r&&f("title"),n["aria-labelledby"]].filter(Boolean).join(" ")||void 0,m=[o&&f("desc"),n["aria-describedby"]].filter(Boolean).join(" ")||void 0,v=f("title"),g=f("desc");return{...n,titleId:v,descId:g,dimensions:x,viewBox:y,preserveAspectRatio:p,ariaLabelledBy:d,ariaDescribedBy:m,userProps:h,localContainerRef:s}}(t);return i().useEffect((()=>{if(!d?.onWheel)return;const t=t=>t.preventDefault(),n=z?.current;return n?.addEventListener("wheel",t),()=>{n?.removeEventListener("wheel",t)}}),[]),i().createElement(S,null,i().createElement("div",{className:s,style:{...x,width:p?x?.width:b.width,height:p?x?.height:b.height,pointerEvents:"none",touchAction:"none",position:"relative"},"data-ouia-component-id":m,"data-ouia-component-type":g,"data-ouia-safe":v,ref:(_=[z,G],t=>{_.forEach((n=>{u(n)?n(t):null!=n&&(n.current=t)}))})},i().createElement("svg",P({width:f,height:h,tabIndex:y,role:n,"aria-labelledby":D,"aria-describedby":M,viewBox:B,preserveAspectRatio:O,style:{...b,pointerEvents:"all"}},j,d),r?i().createElement("title",{id:R},r):null,o?i().createElement("desc",{id:T},o):null,a),i().createElement("div",{style:{...b,zIndex:c,position:"absolute",top:0,left:0}},i().createElement(A,{as:l,width:f,height:h,viewBox:B,preserveAspectRatio:O,style:{...b,overflow:"visible"}}))));var _};R.role="container";var T=r(8163),G=r.n(T),z=r(7491),_=r.n(z);const N={getDimension(t){const{horizontal:n,brushDimension:e}=t;return n&&e?"x"===e?"y":"x":e},withinBounds(t,n,e){const{x1:r,x2:o,y1:i,y2:a}=s(n,Number),{x:u,y:c}=s(t,Number),l=e?e/2:0;return u+l>=Math.min(r,o)&&u-l<=Math.max(r,o)&&c+l>=Math.min(i,a)&&c-l<=Math.max(i,a)},getDomainBox(t,e,r){const o=this.getDimension(t),i=n()({},e,t.domain),a=n()({},r,i),u=v(t,i),s=v(t,a);return{x1:"y"!==o?Math.min(...s.x):Math.min(...u.x),x2:"y"!==o?Math.max(...s.x):Math.max(...u.x),y1:"x"!==o?Math.min(...s.y):Math.min(...u.y),y2:"x"!==o?Math.max(...s.y):Math.max(...u.y)}},getHandles(t,n){const e=this.getDimension(t),{x1:r,x2:o,y1:i,y2:a}=n,u=Math.min(r,o),s=Math.max(r,o),c=Math.min(i,a),l=Math.max(i,a),f=t.handleWidth/2;return{left:"y"!==e&&{x1:u-f,x2:u+f,y1:i,y2:a},right:"y"!==e&&{x1:s-f,x2:s+f,y1:i,y2:a},top:"x"!==e&&{x1:r,x2:o,y1:c-f,y2:c+f},bottom:"x"!==e&&{x1:r,x2:o,y1:l-f,y2:l+f}}},getActiveHandles(t,n,e){const r=this.getHandles(n,e),o=["top","bottom","left","right"].reduce(((n,e)=>r[e]&&this.withinBounds(t,r[e])?n.concat(e):n),[]);return o.length&&o},getResizeMutation(t,n){const{x1:e,y1:r,x2:o,y2:i}=t,a={left:{x1:Math.max(e,o),x2:Math.min(e,o),y1:r,y2:i},right:{x1:Math.min(e,o),x2:Math.max(e,o),y1:r,y2:i},top:{y1:Math.max(r,i),y2:Math.min(r,i),x1:e,x2:o},bottom:{y1:Math.min(r,i),y2:Math.max(r,i),x1:e,x2:o}};return n.reduce(((t,n)=>Object.assign(t,a[n])),{})},getMinimumDomain:()=>({x:[0,1/Number.MAX_SAFE_INTEGER],y:[0,1/Number.MAX_SAFE_INTEGER]}),getDefaultBrushArea(t,n,e){const{domain:r,fullDomain:o,scale:i,horizontal:a,allowResize:u}=t,s=u||t.defaultBrushArea?t.defaultBrushArea:"move";if("none"===s)return this.getMinimumDomain();if("disable"===s)return n;if("move"===s){const r=this.getDomainBox(t,o,n),u=t.parentSVG||d(e),s=this.panBox({...t,...r,brushDomain:n,startX:(r.x1+r.x2)/2,startY:(r.y1+r.y2)/2},m(e,u)),c=t.fullDomainBox||this.getDomainBox(t,o);return b({...this.constrainBox(s,c),scale:i,horizontal:a})}return r},getSelectionMutation(t,n,e){const{x:r,y:o}=t,{x1:i,x2:a,y1:u,y2:s}=n;return{x1:"y"!==e?r:i,y1:"x"!==e?o:u,x2:"y"!==e?r:a,y2:"x"!==e?o:s}},panBox(t,e){const{domain:r,startX:o,startY:i}=t,a=this.getDimension(t),u=n()({},t.brushDomain,r),s=n()({},t.fullDomain,r),{x1:c,x2:l,y1:f,y2:h}=t.x1?t:this.getDomainBox(t,s,u),{x:x,y:y}=e,p=o?o-x:0,d=i?i-y:0;return{x1:"y"!==a?Math.min(c,l)-p:Math.min(c,l),x2:"y"!==a?Math.max(c,l)-p:Math.max(c,l),y1:"x"!==a?Math.min(f,h)-d:Math.min(f,h),y2:"x"!==a?Math.max(f,h)-d:Math.max(f,h)}},constrainBox(t,n){const{x1:e,y1:r,x2:o,y2:i}=s(n,Number);return{x1:t.x2>o?o-Math.abs(t.x2-t.x1):Math.max(t.x1,e),y1:t.y2>i?i-Math.abs(t.y2-t.y1):Math.max(t.y1,r),x2:t.x1<e?e+Math.abs(t.x2-t.x1):Math.min(t.x2,o),y2:t.y1<r?r+Math.abs(t.y2-t.y1):Math.min(t.y2,i)}},constrainPoint(t,n){const{x1:e,y1:r,x2:o,y2:i}=s(n,Number);return{x:Math.min(Math.max(t.x,e),o),y:Math.min(Math.max(t.y,r),i)}},hasMoved(t){const{x1:n,x2:e,y1:r,y2:o,mouseMoveThreshold:i}=t,a=this.getDimension(t),u=Math.abs(n-e)>=i,s=Math.abs(r-o)>=i;switch(a){case"x":return u;case"y":return s;default:return u||s}},onMouseDown(t,e){t.preventDefault();const{handleWidth:r,cachedBrushDomain:o,domain:i,allowResize:a,allowDrag:u,allowDraw:s}=e,c=this.getDimension(e),l=a||e.defaultBrushArea?e.defaultBrushArea:"move";if(!a&&!u)return{};const f=e.fullDomainBox||this.getDomainBox(e,i),h=e.parentSVG||d(t),{x:x,y:y}=m(t,h);if(!this.withinBounds({x:x,y:y},f,r))return{};const p=n()({},e.brushDomain,i),v=_()(p,o)?e.currentDomain||p||i:p||i,g=this.getDomainBox(e,i,v),b=a&&this.getActiveHandles({x:x,y:y},e,g);return b?[{target:"parent",mutation:()=>({isSelecting:!0,domainBox:g,fullDomainBox:f,cachedBrushDomain:p,currentDomain:v,parentSVG:h,...this.getResizeMutation(g,b)})}]:this.withinBounds({x:x,y:y},g)&&!_()(i,v)?[{target:"parent",mutation:()=>({isPanning:u,startX:x,startY:y,domainBox:g,fullDomainBox:f,currentDomain:v,cachedBrushDomain:p,parentSVG:h,...g})}]:s?[{target:"parent",mutation:()=>({isSelecting:a||"move"===l,domainBox:g,fullDomainBox:f,parentSVG:h,cachedBrushDomain:p,cachedCurrentDomain:v,currentDomain:this.getMinimumDomain(),...this.getSelectionMutation({x:x,y:y},g,c)})}]:{}},onGlobalMouseMove(t,e){const{scale:r,isPanning:o,isSelecting:i,fullDomainBox:a,onBrushDomainChange:s,allowResize:c,allowDrag:l,horizontal:f,mouseMoveThreshold:h,parentSVG:x}=e,y=this.getDimension(e),{x:p,y:d}=m(t,x);if(!c&&!l||h>0&&!this.hasMoved({...e,x2:p,y2:d}))return{};if(l&&o){const{startX:t,startY:o}=e,i=this.panBox(e,{x:p,y:d}),c=this.constrainBox(i,a),l=b({...c,scale:r,horizontal:f}),h={currentDomain:l,parentSVG:x,startX:i.x2>=a.x2||i.x1<=a.x1?t:p,startY:i.y2>=a.y2||i.y1<=a.y1?o:d,...c};return u(s)&&s(l,n()({},h,e)),[{target:"parent",mutation:()=>h}]}if(c&&i){const{x:t,y:o}=this.constrainPoint({x:"y"!==y?p:e.x2,y:"x"!==y?d:e.y2},a),i=b({x2:t,y2:o,x1:e.x1,y1:e.y1,scale:r,horizontal:f}),c={x2:t,y2:o,currentDomain:i,parentSVG:x};return u(s)&&s(i,n()({},c,e)),[{target:"parent",mutation:()=>c}]}return{}},onGlobalMouseUp(t,e){if(!e.isPanning&&!e.isSelecting)return{};const{x1:r,y1:o,x2:i,y2:a,isPanning:s,isSelecting:c,onBrushDomainChange:l,onBrushDomainChangeEnd:f,onBrushCleared:h,currentDomain:x,allowResize:y,allowDrag:p}=e,d=y||e.defaultBrushArea?e.defaultBrushArea:"move",m={isPanning:!1,isSelecting:!1};if(!y&&(void 0===d||"none"===d)||r!==i&&o!==a)(p&&s||y&&c)&&u(f)&&f(x,n()({},m,e));else{const r=e.cachedCurrentDomain||x,o=this.getDefaultBrushArea(e,r,t);m.currentDomain=o,u(l)&&l(o,n()({},m,e)),u(f)&&f(o,n()({},m,e)),u(h)&&h(o,n()({},m,e))}return[{target:"parent",mutation:()=>m}]}},I={...N,onMouseDown:N.onMouseDown.bind(N),onGlobalMouseUp:N.onGlobalMouseUp.bind(N),onGlobalMouseMove:G()(N.onGlobalMouseMove.bind(N),16,{leading:!0,trailing:!1})},V={allowDrag:!0,allowDraw:!0,allowResize:!0,brushComponent:i().createElement(l,null),brushStyle:{stroke:"transparent",fill:"black",fillOpacity:.1},handleComponent:i().createElement(l,null),handleStyle:{stroke:"transparent",fill:"transparent"},handleWidth:8,mouseMoveThreshold:0},$=t=>{const e={...V,...t},{children:r}=e,o=t=>{const{handleWidth:r,handleStyle:o,handleComponent:a,name:u}=e,s=I.getDomainBox(e,t),{x1:c,x2:l,y1:f,y2:h}=s,{top:x,bottom:y,left:p,right:d}=I.getHandles(e,s),m=Math.abs(l-c)||1,v=Math.abs(h-f)||1,g=a.props&&a.props.style||{},b=n()({},g,o),M=(()=>{const t={yProps:"ns-resize",xProps:"ew-resize"};return!e.allowResize&&e.allowDrag?(t.xProps="move",t.yProps="move"):e.allowResize||e.allowDrag||(t.xProps="auto",t.yProps="auto"),t})(),w={style:b,width:m,height:r,cursor:M.yProps},D={style:b,width:r,height:v,cursor:M.xProps},B={top:x&&Object.assign({x:x.x1,y:x.y1},w),bottom:y&&Object.assign({x:y.x1,y:y.y1},w),left:p&&Object.assign({y:p.y1,x:p.x1},D),right:d&&Object.assign({y:d.y1,x:d.x1},D)},O=["top","bottom","left","right"].reduce(((t,n)=>B[n]?t.concat(i().cloneElement(a,Object.assign({key:`${u}-handle-${n}`},B[n]))):t),[]);return O.length?O:null};return{props:e,children:[...i().Children.toArray(r),...(()=>{const{currentDomain:t,cachedBrushDomain:r}=e,a=n()({},e.brushDomain,e.domain),u=_()(a,r)?n()({},t,a):a,s=(t=>{const{x:r,y:o}=t,{brushStyle:a,brushComponent:u,name:s}=e,c=u.props&&u.props.style,l=e.allowDrag||e.allowResize?"move":"auto";return r[0]!==r[1]&&o[0]!==o[1]?i().cloneElement(u,{key:`${s}-brush`,width:Math.abs(r[1]-r[0])||1,height:Math.abs(o[1]-o[0])||1,x:Math.min(r[0],r[1]),y:Math.min(o[0],o[1]),cursor:l,style:n()({},c,a)}):null})(v(e,u));return s?[s,o(u)]:[]})()]}},k=t=>{const{props:n,children:e}=$(t);return i().createElement(R,n,e)};k.role="container",k.defaultEvents=t=>{const n={...V,...t},e=(t,e)=>(r,o,i,a)=>n.disable||e?.(o)?{}:t(r,{...n,...o},i,a);return[{target:"parent",eventHandlers:{onMouseDown:e(I.onMouseDown),onTouchStart:e(I.onMouseDown),onGlobalMouseMove:e(I.onGlobalMouseMove,(t=>!t.isPanning&&!t.isSelecting)),onGlobalTouchMove:e(I.onGlobalMouseMove,(t=>!t.isPanning&&!t.isSelecting)),onGlobalMouseUp:e(I.onGlobalMouseUp),onGlobalTouchEnd:e(I.onGlobalMouseUp),onGlobalTouchCancel:e(I.onGlobalMouseUp)}}]}}(),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.VictoryBrushContainer=n(require("react")):t.VictoryBrushContainer=n(t.React)}(self,(function(t){return function(){var n={2596:function(t,n,e){var r=e(2373).Symbol;t.exports=r},6082:function(t){t.exports=function(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}},8644:function(t){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length,o=Array(r);++e<r;)o[e]=n(t[e],e,t);return o}},9559:function(t){t.exports=function(t,n){for(var e=-1,r=n.length,o=t.length;++e<r;)t[o+e]=n[e];return t}},4132:function(t,n,e){var r=e(8347),o=e(788),i=Object.prototype.hasOwnProperty;t.exports=function(t,n,e){var a=t[n];i.call(t,n)&&o(a,e)&&(void 0!==e||n in t)||r(t,n,e)}},8347:function(t,n,e){var r=e(5525);t.exports=function(t,n,e){"__proto__"==n&&r?r(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}},6457:function(t,n,e){var r=e(9559),o=e(3608);t.exports=function t(n,e,i,a,u){var s=-1,c=n.length;for(i||(i=o),u||(u=[]);++s<c;){var l=n[s];e>0&&i(l)?e>1?t(l,e-1,i,a,u):r(u,l):a||(u[u.length]=l)}return u}},4432:function(t,n,e){var r=e(9026),o=e(3110);t.exports=function(t,n){for(var e=0,i=(n=r(n,t)).length;null!=t&&e<i;)t=t[o(n[e++])];return e&&e==i?t:void 0}},6776:function(t){t.exports=function(t,n){return null!=t&&n in Object(t)}},5436:function(t,n,e){var r=e(6371),o=e(5066);t.exports=function(t,n){return r(t,n,(function(n,e){return o(t,e)}))}},6371:function(t,n,e){var r=e(4432),o=e(6539),i=e(9026);t.exports=function(t,n,e){for(var a=-1,u=n.length,s={};++a<u;){var c=n[a],l=r(t,c);e(l,c)&&o(s,i(c,t),l)}return s}},1600:function(t){t.exports=function(t){return function(n){return null==n?void 0:n[t]}}},3301:function(t,n,e){var r=e(4432);t.exports=function(t){return function(n){return r(n,t)}}},6317:function(t,n,e){var r=e(5346),o=e(4280),i=e(201);t.exports=function(t,n){return i(o(t,n,r),t+"")}},6539:function(t,n,e){var r=e(4132),o=e(9026),i=e(9099),a=e(7709),u=e(3110);t.exports=function(t,n,e,s){if(!a(t))return t;for(var c=-1,l=(n=o(n,t)).length,f=l-1,h=t;null!=h&&++c<l;){var x=u(n[c]),y=e;if("__proto__"===x||"constructor"===x||"prototype"===x)return t;if(c!=f){var p=h[x];void 0===(y=s?s(p,x,h):void 0)&&(y=a(p)?p:i(n[c+1])?[]:{})}r(h,x,y),h=h[x]}return t}},6316:function(t,n,e){var r=e(2596),o=e(8644),i=e(163),a=e(1995),u=r?r.prototype:void 0,s=u?u.toString:void 0;t.exports=function t(n){if("string"==typeof n)return n;if(i(n))return o(n,t)+"";if(a(n))return s?s.call(n):"";var e=n+"";return"0"==e&&1/n==-1/0?"-0":e}},9026:function(t,n,e){var r=e(163),o=e(726),i=e(7801),a=e(7010);t.exports=function(t,n){return r(t)?t:o(t,n)?[t]:i(a(t))}},5525:function(t,n,e){var r=e(3743),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},5557:function(t,n,e){var r=e(2645),o=e(4280),i=e(201);t.exports=function(t){return i(o(t,void 0,r),t+"")}},2117:function(t,n,e){var r="object"==typeof e.g&&e.g&&e.g.Object===Object&&e.g;t.exports=r},3743:function(t){t.exports=function(t,n){return null==t?void 0:t[n]}},3096:function(t,n,e){var r=e(9026),o=e(5075),i=e(163),a=e(9099),u=e(8454),s=e(3110);t.exports=function(t,n,e){for(var c=-1,l=(n=r(n,t)).length,f=!1;++c<l;){var h=s(n[c]);if(!(f=null!=t&&e(t,h)))break;t=t[h]}return f||++c!=l?f:!!(l=null==t?0:t.length)&&u(l)&&a(h,l)&&(i(t)||o(t))}},3608:function(t,n,e){var r=e(2596),o=e(5075),i=e(163),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(a&&t&&t[a])}},9099:function(t){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},8286:function(t){t.exports=function(){return!1}},726:function(t,n,e){var r=e(163),o=e(1995),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,n){if(r(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!o(t))||a.test(t)||!i.test(t)||null!=n&&t in Object(n)}},2453:function(t){t.exports=function(t){return t}},4280:function(t,n,e){var r=e(6082),o=Math.max;t.exports=function(t,n,e){return n=o(void 0===n?t.length-1:n,0),function(){for(var i=arguments,a=-1,u=o(i.length-n,0),s=Array(u);++a<u;)s[a]=i[n+a];a=-1;for(var c=Array(n+1);++a<n;)c[a]=i[a];return c[n]=e(s),r(t,this,c)}}},2373:function(t,n,e){var r=e(2117),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},201:function(t){t.exports=function(t){return t}},7801:function(t,n,e){var r=e(2453),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(o,(function(t,e,r,o){n.push(r?o.replace(i,"$1"):e||t)})),n}));t.exports=a},3110:function(t,n,e){var r=e(1995);t.exports=function(t){if("string"==typeof t||r(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},5034:function(t,n,e){var r=e(7709),o=e(6987),i=e(5812),a=Math.max,u=Math.min;t.exports=function(t,n,e){var s,c,l,f,h,x,y=0,p=!1,d=!1,m=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function v(n){var e=s,r=c;return s=c=void 0,y=n,f=t.apply(r,e)}function g(t){return y=t,h=setTimeout(M,n),p?v(t):f}function b(t){var e=t-x;return void 0===x||e>=n||e<0||d&&t-y>=l}function M(){var t=o();if(b(t))return w(t);h=setTimeout(M,function(t){var e=n-(t-x);return d?u(e,l-(t-y)):e}(t))}function w(t){return h=void 0,m&&s?v(t):(s=c=void 0,f)}function D(){var t=o(),e=b(t);if(s=arguments,c=this,x=t,e){if(void 0===h)return g(x);if(d)return clearTimeout(h),h=setTimeout(M,n),v(x)}return void 0===h&&(h=setTimeout(M,n)),f}return n=i(n)||0,r(e)&&(p=!!e.leading,l=(d="maxWait"in e)?a(i(e.maxWait)||0,n):l,m="trailing"in e?!!e.trailing:m),D.cancel=function(){void 0!==h&&clearTimeout(h),y=0,s=x=c=h=void 0},D.flush=function(){return void 0===h?f:w(o())},D}},1893:function(t,n,e){var r=e(6317),o=e(788),i=e(8286),a=e(8855),u=Object.prototype,s=u.hasOwnProperty,c=r((function(t,n){t=Object(t);var e=-1,r=n.length,c=r>2?n[2]:void 0;for(c&&i(n[0],n[1],c)&&(r=1);++e<r;)for(var l=n[e],f=a(l),h=-1,x=f.length;++h<x;){var y=f[h],p=t[y];(void 0===p||o(p,u[y])&&!s.call(t,y))&&(t[y]=l[y])}return t}));t.exports=c},788:function(t){t.exports=function(t,n){return t===n||t!=t&&n!=n}},2645:function(t,n,e){var r=e(6457);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},5066:function(t,n,e){var r=e(6776),o=e(3096);t.exports=function(t,n){return null!=t&&o(t,n,r)}},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)}},1995:function(t){t.exports=function(){return!1}},8855:function(t){t.exports=function(t){var n=[];if(null!=t)for(var e in Object(t))n.push(e);return n}},6987:function(t,n,e){var r=e(2373);t.exports=function(){return r.Date.now()}},9082:function(t,n,e){var r=e(5436),o=e(5557)((function(t,n){return null==t?{}:r(t,n)}));t.exports=o},8532:function(t,n,e){var r=e(1600),o=e(3301),i=e(726),a=e(3110);t.exports=function(t){return i(t)?r(a(t)):o(t)}},8163:function(t,n,e){var r=e(5034),o=e(7709);t.exports=function(t,n,e){var i=!0,a=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return o(e)&&(i="leading"in e?!!e.leading:i,a="trailing"in e?!!e.trailing:a),r(t,n,{leading:i,maxWait:n,trailing:a})}},5812:function(t){t.exports=function(t){return t}},7010:function(t,n,e){var r=e(6316);t.exports=function(t){return null==t?"":r(t)}},660:function(t,n,e){var r=e(7010),o=0;t.exports=function(t){var n=++o;return r(t)+n}},7491:function(t){var n="undefined"!=typeof Element,e="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function i(t,a){if(t===a)return!0;if(t&&a&&"object"==typeof t&&"object"==typeof a){if(t.constructor!==a.constructor)return!1;var u,s,c,l;if(Array.isArray(t)){if((u=t.length)!=a.length)return!1;for(s=u;0!=s--;)if(!i(t[s],a[s]))return!1;return!0}if(e&&t instanceof Map&&a instanceof Map){if(t.size!==a.size)return!1;for(l=t.entries();!(s=l.next()).done;)if(!a.has(s.value[0]))return!1;for(l=t.entries();!(s=l.next()).done;)if(!i(s.value[1],a.get(s.value[0])))return!1;return!0}if(r&&t instanceof Set&&a instanceof Set){if(t.size!==a.size)return!1;for(l=t.entries();!(s=l.next()).done;)if(!a.has(s.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(a)){if((u=t.length)!=a.length)return!1;for(s=u;0!=s--;)if(t[s]!==a[s])return!1;return!0}if(t.constructor===RegExp)return t.source===a.source&&t.flags===a.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===a.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===a.toString();if((u=(c=Object.keys(t)).length)!==Object.keys(a).length)return!1;for(s=u;0!=s--;)if(!Object.prototype.hasOwnProperty.call(a,c[s]))return!1;if(n&&t instanceof Element)return!1;for(s=u;0!=s--;)if(("_owner"!==c[s]&&"__v"!==c[s]&&"__o"!==c[s]||!t.$$typeof)&&!i(t[c[s]],a[c[s]]))return!1;return!0}return t!=t&&a!=a}t.exports=function(t,n){try{return i(t,n)}catch(t){if((t.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw t}}},9787:function(n){"use strict";n.exports=t}},e={};function r(t){var o=e[t];if(void 0!==o)return o.exports;var i=e[t]={exports:{}};return n[t](i,i.exports,r),i.exports}r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,{a:n}),n},r.d=function(t,n){for(var e in n)r.o(n,e)&&!r.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.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";r.r(o),r.d(o,{BrushHelpers:function(){return N},VICTORY_BRUSH_CONTAINER_DEFAULT_PROPS:function(){return V},VictoryBrushContainer:function(){return k},useVictoryBrushContainer:function(){return $}});var t=r(1893),n=r.n(t),e=r(9787),i=r.n(e);function a(t,n){return u(t)?t(n):t}function u(t){return"function"==typeof t}function s(t,n){if(t)return Object.keys(t).reduce(((e,r)=>(e[r]=n(t[r]),e)),{})}function c(){return c=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},c.apply(this,arguments)}r(9082),r(8532);const l=(0,e.forwardRef)(((t,n)=>{const{desc:e,id:r,tabIndex:o,origin:u,...s}=t,l={vectorEffect:"non-scaling-stroke",id:a(r,t)?.toString(),tabIndex:a(o,t),...s};return e?i().createElement("rect",c({},l,{ref:n}),i().createElement("desc",null,e)):i().createElement("rect",c({},l,{ref:n}))}));function f(t){return Array.isArray(t)&&t.some((t=>t instanceof Date))}function h(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];const o=t.concat(e);return f(o)?new Date(Math.max(...o)):Math.max(...o)}function x(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];const o=t.concat(e);return f(o)?new Date(Math.min(...o)):Math.min(...o)}function y(t,n,e){const{a:r,d:o,e:i,f:a}=n;return"y"===e?o*t+a:r*t+i}function p(t){return!(!t||void 0===t.identifier)}function d(t){if(p(t.nativeEvent))return;const n=t=>"svg"===t.nodeName?t:t.parentNode?n(t.parentNode):t;return n(t.target)}function m(t,n){if(p(t.nativeEvent))return{x:t.nativeEvent.locationX,y:t.nativeEvent.locationY};const e=function(t){return t.changedTouches&&t.changedTouches.length>0}(t)?t.changedTouches[0]:t,r=function(t){return t.getScreenCTM().inverse()}(n||d(e));return{x:y(e.clientX,r,"x"),y:y(e.clientY,r,"y")}}function v(t,n){const{horizontal:e}=t,r=t.scale,o=n||{x:r.x.domain(),y:r.y.domain()};return{x:e?[r.y(o.y[0]),r.y(o.y[1])]:[r.x(o.x[0]),r.x(o.x[1])],y:e?[r.x(o.x[0]),r.x(o.x[1])]:[r.y(o.y[0]),r.y(o.y[1])]}}function g(t,n,e,r){const{polar:o,horizontal:i}=t;if(!o)return{x:i?n.x.invert(r):n.x.invert(e),y:i?n.y.invert(e):n.y.invert(r)};const a=t.origin||{x:0,y:0},u=e-a.x,s=r-a.y,c=Math.abs(u*Math.sqrt(1+Math.pow(-s/u,2))),l=(-Math.atan2(s,u)+2*Math.PI)%(2*Math.PI);return{x:n.x.invert(l),y:n.y.invert(c)}}function b(t){const{x1:n,x2:e,y1:r,y2:o,scale:i}=t,a=g(t,i,n,r),u=g(t,i,e,o),s=(t,n)=>[x([t,n]),h([t,n])];return{x:s(a.x,u.x),y:s(a.y,u.y)}}var M=r(660),w=r.n(M);function D(){return D=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},D.apply(this,arguments)}const B=i().forwardRef(((t,n)=>i().createElement("svg",D({ref:n},t)))),O={startsWith:["data-","aria-"],exactMatch:[]},E=t=>{const n={...t};return Object.fromEntries(Object.entries(n).filter((t=>{let[n]=t;return(t=>!(!(t=>{let n=!1;return O.startsWith.forEach((e=>{new RegExp(`\\b(${e})(\\w|-)+`,"g").test(t)&&(n=!0)})),n})(t)&&!(t=>O.exactMatch.includes(t))(t)))(n)})).map((n=>{let[e,r]=n;return[e,a(r,t)]})))},j=i().createContext(void 0);j.displayName="PortalContext";const S=t=>{let{children:n}=t;const[e,r]=i().useState(new Map),o=i().useCallback(((t,n)=>{r((e=>{const r=new Map(e);return r.set(t,n),r}))}),[r]),a=i().useCallback((t=>{r((n=>{const e=new Map(n);return e.delete(t),e}))}),[r]),u=i().useMemo((()=>({addChild:o,removeChild:a,children:e})),[o,a,e]);return i().createElement(j.Provider,{value:u},n)},A=t=>{let{as:n,...e}=t;const r=i().useContext(j);if(!r)return null;const o=Array.from(r.children.values());return i().cloneElement(n,e,o)};function P(){return P=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},P.apply(this,arguments)}const C={className:"VictoryContainer",portalComponent:i().createElement(B,null),portalZIndex:99,responsive:!0,role:"img"},R=t=>{const{role:n,title:r,desc:o,children:a,className:s,portalZIndex:c,portalComponent:l,width:f,height:h,style:x,tabIndex:y,responsive:p,events:d,ouiaId:m,ouiaSafe:v,ouiaType:g,dimensions:b,ariaDescribedBy:M,ariaLabelledBy:D,viewBox:B,preserveAspectRatio:O,userProps:j,titleId:R,descId:T,containerRef:G,localContainerRef:z}=function(t){const n={...C,...t},{title:r,desc:o,width:i,height:a,responsive:u}=n,s=(0,e.useRef)(null),c=(0,e.useRef)(w()("victory-container-")),l=n.containerId??c.current,f=t=>`${l}-${t}`,h=E(n),x=u?{width:"100%",height:"100%"}:{width:i,height:a},y=u?`0 0 ${i} ${a}`:void 0,p=u?n.preserveAspectRatio:void 0,d=[r&&f("title"),n["aria-labelledby"]].filter(Boolean).join(" ")||void 0,m=[o&&f("desc"),n["aria-describedby"]].filter(Boolean).join(" ")||void 0,v=f("title"),g=f("desc");return{...n,titleId:v,descId:g,dimensions:x,viewBox:y,preserveAspectRatio:p,ariaLabelledBy:d,ariaDescribedBy:m,userProps:h,localContainerRef:s}}(t);return i().useEffect((()=>{if(!d?.onWheel)return;const t=t=>t.preventDefault(),n=z?.current;return n?.addEventListener("wheel",t),()=>{n?.removeEventListener("wheel",t)}}),[]),i().createElement("div",{className:s,style:{...x,width:p?x?.width:b.width,height:p?x?.height:b.height,pointerEvents:"none",touchAction:"none",position:"relative"},"data-ouia-component-id":m,"data-ouia-component-type":g,"data-ouia-safe":v,ref:(_=[z,G],t=>{_.forEach((n=>{u(n)?n(t):null!=n&&(n.current=t)}))})},i().createElement(S,null,i().createElement("svg",P({width:f,height:h,tabIndex:y,role:n,"aria-labelledby":D,"aria-describedby":M,viewBox:B,preserveAspectRatio:O,style:{...b,pointerEvents:"all"}},j,d),r?i().createElement("title",{id:R},r):null,o?i().createElement("desc",{id:T},o):null,a),i().createElement("div",{style:{...b,zIndex:c,position:"absolute",top:0,left:0}},i().createElement(A,{as:l,width:f,height:h,viewBox:B,preserveAspectRatio:O,style:{...b,overflow:"visible"}}))));var _};R.role="container";var T=r(8163),G=r.n(T),z=r(7491),_=r.n(z);const I={getDimension(t){const{horizontal:n,brushDimension:e}=t;return n&&e?"x"===e?"y":"x":e},withinBounds(t,n,e){const{x1:r,x2:o,y1:i,y2:a}=s(n,Number),{x:u,y:c}=s(t,Number),l=e?e/2:0;return u+l>=Math.min(r,o)&&u-l<=Math.max(r,o)&&c+l>=Math.min(i,a)&&c-l<=Math.max(i,a)},getDomainBox(t,e,r){const o=this.getDimension(t),i=n()({},e,t.domain),a=n()({},r,i),u=v(t,i),s=v(t,a);return{x1:"y"!==o?Math.min(...s.x):Math.min(...u.x),x2:"y"!==o?Math.max(...s.x):Math.max(...u.x),y1:"x"!==o?Math.min(...s.y):Math.min(...u.y),y2:"x"!==o?Math.max(...s.y):Math.max(...u.y)}},getHandles(t,n){const e=this.getDimension(t),{x1:r,x2:o,y1:i,y2:a}=n,u=Math.min(r,o),s=Math.max(r,o),c=Math.min(i,a),l=Math.max(i,a),f=t.handleWidth/2;return{left:"y"!==e&&{x1:u-f,x2:u+f,y1:i,y2:a},right:"y"!==e&&{x1:s-f,x2:s+f,y1:i,y2:a},top:"x"!==e&&{x1:r,x2:o,y1:c-f,y2:c+f},bottom:"x"!==e&&{x1:r,x2:o,y1:l-f,y2:l+f}}},getActiveHandles(t,n,e){const r=this.getHandles(n,e),o=["top","bottom","left","right"].reduce(((n,e)=>r[e]&&this.withinBounds(t,r[e])?n.concat(e):n),[]);return o.length&&o},getResizeMutation(t,n){const{x1:e,y1:r,x2:o,y2:i}=t,a={left:{x1:Math.max(e,o),x2:Math.min(e,o),y1:r,y2:i},right:{x1:Math.min(e,o),x2:Math.max(e,o),y1:r,y2:i},top:{y1:Math.max(r,i),y2:Math.min(r,i),x1:e,x2:o},bottom:{y1:Math.min(r,i),y2:Math.max(r,i),x1:e,x2:o}};return n.reduce(((t,n)=>Object.assign(t,a[n])),{})},getMinimumDomain:()=>({x:[0,1/Number.MAX_SAFE_INTEGER],y:[0,1/Number.MAX_SAFE_INTEGER]}),getDefaultBrushArea(t,n,e){const{domain:r,fullDomain:o,scale:i,horizontal:a,allowResize:u}=t,s=u||t.defaultBrushArea?t.defaultBrushArea:"move";if("none"===s)return this.getMinimumDomain();if("disable"===s)return n;if("move"===s){const r=this.getDomainBox(t,o,n),u=t.parentSVG||d(e),s=this.panBox({...t,...r,brushDomain:n,startX:(r.x1+r.x2)/2,startY:(r.y1+r.y2)/2},m(e,u)),c=t.fullDomainBox||this.getDomainBox(t,o);return b({...this.constrainBox(s,c),scale:i,horizontal:a})}return r},getSelectionMutation(t,n,e){const{x:r,y:o}=t,{x1:i,x2:a,y1:u,y2:s}=n;return{x1:"y"!==e?r:i,y1:"x"!==e?o:u,x2:"y"!==e?r:a,y2:"x"!==e?o:s}},panBox(t,e){const{domain:r,startX:o,startY:i}=t,a=this.getDimension(t),u=n()({},t.brushDomain,r),s=n()({},t.fullDomain,r),{x1:c,x2:l,y1:f,y2:h}=t.x1?t:this.getDomainBox(t,s,u),{x:x,y:y}=e,p=o?o-x:0,d=i?i-y:0;return{x1:"y"!==a?Math.min(c,l)-p:Math.min(c,l),x2:"y"!==a?Math.max(c,l)-p:Math.max(c,l),y1:"x"!==a?Math.min(f,h)-d:Math.min(f,h),y2:"x"!==a?Math.max(f,h)-d:Math.max(f,h)}},constrainBox(t,n){const{x1:e,y1:r,x2:o,y2:i}=s(n,Number);return{x1:t.x2>o?o-Math.abs(t.x2-t.x1):Math.max(t.x1,e),y1:t.y2>i?i-Math.abs(t.y2-t.y1):Math.max(t.y1,r),x2:t.x1<e?e+Math.abs(t.x2-t.x1):Math.min(t.x2,o),y2:t.y1<r?r+Math.abs(t.y2-t.y1):Math.min(t.y2,i)}},constrainPoint(t,n){const{x1:e,y1:r,x2:o,y2:i}=s(n,Number);return{x:Math.min(Math.max(t.x,e),o),y:Math.min(Math.max(t.y,r),i)}},hasMoved(t){const{x1:n,x2:e,y1:r,y2:o,mouseMoveThreshold:i}=t,a=this.getDimension(t),u=Math.abs(n-e)>=i,s=Math.abs(r-o)>=i;switch(a){case"x":return u;case"y":return s;default:return u||s}},onMouseDown(t,e){t.preventDefault();const{handleWidth:r,cachedBrushDomain:o,domain:i,allowResize:a,allowDrag:u,allowDraw:s}=e,c=this.getDimension(e),l=a||e.defaultBrushArea?e.defaultBrushArea:"move";if(!a&&!u)return{};const f=e.fullDomainBox||this.getDomainBox(e,i),h=e.parentSVG||d(t),{x:x,y:y}=m(t,h);if(!this.withinBounds({x:x,y:y},f,r))return{};const p=n()({},e.brushDomain,i),v=_()(p,o)?e.currentDomain||p||i:p||i,g=this.getDomainBox(e,i,v),b=a&&this.getActiveHandles({x:x,y:y},e,g);return b?[{target:"parent",mutation:()=>({isSelecting:!0,domainBox:g,fullDomainBox:f,cachedBrushDomain:p,currentDomain:v,parentSVG:h,...this.getResizeMutation(g,b)})}]:this.withinBounds({x:x,y:y},g)&&!_()(i,v)?[{target:"parent",mutation:()=>({isPanning:u,startX:x,startY:y,domainBox:g,fullDomainBox:f,currentDomain:v,cachedBrushDomain:p,parentSVG:h,...g})}]:s?[{target:"parent",mutation:()=>({isSelecting:a||"move"===l,domainBox:g,fullDomainBox:f,parentSVG:h,cachedBrushDomain:p,cachedCurrentDomain:v,currentDomain:this.getMinimumDomain(),...this.getSelectionMutation({x:x,y:y},g,c)})}]:{}},onGlobalMouseMove(t,e){const{scale:r,isPanning:o,isSelecting:i,fullDomainBox:a,onBrushDomainChange:s,allowResize:c,allowDrag:l,horizontal:f,mouseMoveThreshold:h,parentSVG:x}=e,y=this.getDimension(e),{x:p,y:d}=m(t,x);if(!c&&!l||h>0&&!this.hasMoved({...e,x2:p,y2:d}))return{};if(l&&o){const{startX:t,startY:o}=e,i=this.panBox(e,{x:p,y:d}),c=this.constrainBox(i,a),l=b({...c,scale:r,horizontal:f}),h={currentDomain:l,parentSVG:x,startX:i.x2>=a.x2||i.x1<=a.x1?t:p,startY:i.y2>=a.y2||i.y1<=a.y1?o:d,...c};return u(s)&&s(l,n()({},h,e)),[{target:"parent",mutation:()=>h}]}if(c&&i){const{x:t,y:o}=this.constrainPoint({x:"y"!==y?p:e.x2,y:"x"!==y?d:e.y2},a),i=b({x2:t,y2:o,x1:e.x1,y1:e.y1,scale:r,horizontal:f}),c={x2:t,y2:o,currentDomain:i,parentSVG:x};return u(s)&&s(i,n()({},c,e)),[{target:"parent",mutation:()=>c}]}return{}},onGlobalMouseUp(t,e){if(!e.isPanning&&!e.isSelecting)return{};const{x1:r,y1:o,x2:i,y2:a,isPanning:s,isSelecting:c,onBrushDomainChange:l,onBrushDomainChangeEnd:f,onBrushCleared:h,currentDomain:x,allowResize:y,allowDrag:p}=e,d=y||e.defaultBrushArea?e.defaultBrushArea:"move",m={isPanning:!1,isSelecting:!1};if(!y&&(void 0===d||"none"===d)||r!==i&&o!==a)(p&&s||y&&c)&&u(f)&&f(x,n()({},m,e));else{const r=e.cachedCurrentDomain||x,o=this.getDefaultBrushArea(e,r,t);m.currentDomain=o,u(l)&&l(o,n()({},m,e)),u(f)&&f(o,n()({},m,e)),u(h)&&h(o,n()({},m,e))}return[{target:"parent",mutation:()=>m}]}},N={...I,onMouseDown:I.onMouseDown.bind(I),onGlobalMouseUp:I.onGlobalMouseUp.bind(I),onGlobalMouseMove:G()(I.onGlobalMouseMove.bind(I),16,{leading:!0,trailing:!1})},V={allowDrag:!0,allowDraw:!0,allowResize:!0,brushComponent:i().createElement(l,null),brushStyle:{stroke:"transparent",fill:"black",fillOpacity:.1},handleComponent:i().createElement(l,null),handleStyle:{stroke:"transparent",fill:"transparent"},handleWidth:8,mouseMoveThreshold:0},$=t=>{const e={...V,...t},{children:r}=e,o=t=>{const{handleWidth:r,handleStyle:o,handleComponent:a,name:u}=e,s=N.getDomainBox(e,t),{x1:c,x2:l,y1:f,y2:h}=s,{top:x,bottom:y,left:p,right:d}=N.getHandles(e,s),m=Math.abs(l-c)||1,v=Math.abs(h-f)||1,g=a.props&&a.props.style||{},b=n()({},g,o),M=(()=>{const t={yProps:"ns-resize",xProps:"ew-resize"};return!e.allowResize&&e.allowDrag?(t.xProps="move",t.yProps="move"):e.allowResize||e.allowDrag||(t.xProps="auto",t.yProps="auto"),t})(),w={style:b,width:m,height:r,cursor:M.yProps},D={style:b,width:r,height:v,cursor:M.xProps},B={top:x&&Object.assign({x:x.x1,y:x.y1},w),bottom:y&&Object.assign({x:y.x1,y:y.y1},w),left:p&&Object.assign({y:p.y1,x:p.x1},D),right:d&&Object.assign({y:d.y1,x:d.x1},D)},O=["top","bottom","left","right"].reduce(((t,n)=>B[n]?t.concat(i().cloneElement(a,Object.assign({key:`${u}-handle-${n}`},B[n]))):t),[]);return O.length?O:null};return{props:e,children:[...i().Children.toArray(r),...(()=>{const{currentDomain:t,cachedBrushDomain:r}=e,a=n()({},e.brushDomain,e.domain),u=_()(a,r)?n()({},t,a):a,s=(t=>{const{x:r,y:o}=t,{brushStyle:a,brushComponent:u,name:s}=e,c=u.props&&u.props.style,l=e.allowDrag||e.allowResize?"move":"auto";return r[0]!==r[1]&&o[0]!==o[1]?i().cloneElement(u,{key:`${s}-brush`,width:Math.abs(r[1]-r[0])||1,height:Math.abs(o[1]-o[0])||1,x:Math.min(r[0],r[1]),y:Math.min(o[0],o[1]),cursor:l,style:n()({},c,a)}):null})(v(e,u));return s?[s,o(u)]:[]})()]}},k=t=>{const{props:n,children:e}=$(t);return i().createElement(R,n,e)};k.role="container",k.defaultEvents=t=>{const n={...V,...t},e=(t,e)=>(r,o,i,a)=>n.disable||e?.(o)?{}:t(r,{...n,...o},i,a);return[{target:"parent",eventHandlers:{onMouseDown:e(N.onMouseDown),onTouchStart:e(N.onMouseDown),onGlobalMouseMove:e(N.onGlobalMouseMove,(t=>!t.isPanning&&!t.isSelecting)),onGlobalTouchMove:e(N.onGlobalMouseMove,(t=>!t.isPanning&&!t.isSelecting)),onGlobalMouseUp:e(N.onGlobalMouseUp),onGlobalTouchEnd:e(N.onGlobalMouseUp),onGlobalTouchCancel:e(N.onGlobalMouseUp)}}]}}(),o}()}));
2
2
  //# sourceMappingURL=victory-brush-container.min.js.map
@@ -1,71 +1,71 @@
1
- /// <reference types="lodash" />
2
- export declare const BrushHelpers: {
3
- onMouseDown: (evt: any, targetProps: any) => {};
4
- onGlobalMouseUp: (evt: any, targetProps: any) => {};
5
- onGlobalMouseMove: import("lodash").DebouncedFunc<(evt: any, targetProps: any) => {}>;
6
- getDimension(props: any): any;
7
- withinBounds(point: any, bounds: any, padding?: any): boolean;
8
- getDomainBox(props: any, fullDomain: any, selectedDomain?: any): {
9
- x1: number;
10
- x2: number;
11
- y1: number;
12
- y2: number;
13
- };
14
- getHandles(props: any, domainBox: any): {
15
- left: false | {
16
- x1: number;
17
- x2: number;
18
- y1: any;
19
- y2: any;
20
- };
21
- right: false | {
22
- x1: number;
23
- x2: number;
24
- y1: any;
25
- y2: any;
26
- };
27
- top: false | {
28
- x1: any;
29
- x2: any;
30
- y1: number;
31
- y2: number;
32
- };
33
- bottom: false | {
34
- x1: any;
35
- x2: any;
36
- y1: number;
37
- y2: number;
38
- };
39
- };
40
- getActiveHandles(point: any, props: any, domainBox: any): 0 | string[];
41
- getResizeMutation(box: any, handles: any): any;
42
- getMinimumDomain(): {
43
- x: number[];
44
- y: number[];
45
- };
46
- getDefaultBrushArea(targetProps: any, cachedDomain: any, evt: any): any;
47
- getSelectionMutation(point: any, box: any, brushDimension: any): {
48
- x1: any;
49
- y1: any;
50
- x2: any;
51
- y2: any;
52
- };
53
- panBox(props: any, point: any): {
54
- x1: number;
55
- x2: number;
56
- y1: number;
57
- y2: number;
58
- };
59
- constrainBox(box: any, fullDomainBox: any): {
60
- x1: number;
61
- y1: number;
62
- x2: any;
63
- y2: any;
64
- };
65
- constrainPoint(point: any, fullDomainBox: any): {
66
- x: number;
67
- y: number;
68
- };
69
- hasMoved(props: any): boolean;
70
- };
1
+ /// <reference types="lodash" />
2
+ export declare const BrushHelpers: {
3
+ onMouseDown: (evt: any, targetProps: any) => {};
4
+ onGlobalMouseUp: (evt: any, targetProps: any) => {};
5
+ onGlobalMouseMove: import("lodash").DebouncedFunc<(evt: any, targetProps: any) => {}>;
6
+ getDimension(props: any): any;
7
+ withinBounds(point: any, bounds: any, padding?: any): boolean;
8
+ getDomainBox(props: any, fullDomain: any, selectedDomain?: any): {
9
+ x1: number;
10
+ x2: number;
11
+ y1: number;
12
+ y2: number;
13
+ };
14
+ getHandles(props: any, domainBox: any): {
15
+ left: false | {
16
+ x1: number;
17
+ x2: number;
18
+ y1: any;
19
+ y2: any;
20
+ };
21
+ right: false | {
22
+ x1: number;
23
+ x2: number;
24
+ y1: any;
25
+ y2: any;
26
+ };
27
+ top: false | {
28
+ x1: any;
29
+ x2: any;
30
+ y1: number;
31
+ y2: number;
32
+ };
33
+ bottom: false | {
34
+ x1: any;
35
+ x2: any;
36
+ y1: number;
37
+ y2: number;
38
+ };
39
+ };
40
+ getActiveHandles(point: any, props: any, domainBox: any): 0 | string[];
41
+ getResizeMutation(box: any, handles: any): any;
42
+ getMinimumDomain(): {
43
+ x: number[];
44
+ y: number[];
45
+ };
46
+ getDefaultBrushArea(targetProps: any, cachedDomain: any, evt: any): any;
47
+ getSelectionMutation(point: any, box: any, brushDimension: any): {
48
+ x1: any;
49
+ y1: any;
50
+ x2: any;
51
+ y2: any;
52
+ };
53
+ panBox(props: any, point: any): {
54
+ x1: number;
55
+ x2: number;
56
+ y1: number;
57
+ y2: number;
58
+ };
59
+ constrainBox(box: any, fullDomainBox: any): {
60
+ x1: number;
61
+ y1: number;
62
+ x2: any;
63
+ y2: any;
64
+ };
65
+ constrainPoint(point: any, fullDomainBox: any): {
66
+ x: number;
67
+ y: number;
68
+ };
69
+ hasMoved(props: any): boolean;
70
+ };
71
71
  //# sourceMappingURL=brush-helpers.d.ts.map
package/es/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from "./victory-brush-container";
2
- export * from "./brush-helpers";
1
+ export * from "./victory-brush-container";
2
+ export * from "./brush-helpers";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,147 +1,147 @@
1
- import React from "react";
2
- import { DomainTuple, VictoryContainerProps, VictoryEventHandler } from "victory-core";
3
- export interface VictoryBrushContainerProps extends VictoryContainerProps {
4
- allowDrag?: boolean;
5
- allowDraw?: boolean;
6
- allowResize?: boolean;
7
- brushComponent?: React.ReactElement;
8
- brushDimension?: "x" | "y";
9
- brushDomain?: {
10
- x?: DomainTuple;
11
- y?: DomainTuple;
12
- };
13
- brushStyle?: React.CSSProperties;
14
- defaultBrushArea?: "all" | "none" | "disable" | "move";
15
- disable?: boolean;
16
- handleComponent?: React.ReactElement;
17
- handleStyle?: React.CSSProperties;
18
- handleWidth?: number;
19
- onBrushCleared?: (domain: {
20
- x: DomainTuple;
21
- y: DomainTuple;
22
- }, props: VictoryBrushContainerProps) => void;
23
- onBrushDomainChange?: (domain: {
24
- x: DomainTuple;
25
- y: DomainTuple;
26
- }, props: VictoryBrushContainerProps) => void;
27
- onBrushDomainChangeEnd?: (domain: {
28
- x: DomainTuple;
29
- y: DomainTuple;
30
- }, props: VictoryBrushContainerProps) => void;
31
- }
32
- export declare const VICTORY_BRUSH_CONTAINER_DEFAULT_PROPS: {
33
- allowDrag: boolean;
34
- allowDraw: boolean;
35
- allowResize: boolean;
36
- brushComponent: JSX.Element;
37
- brushStyle: {
38
- stroke: string;
39
- fill: string;
40
- fillOpacity: number;
41
- };
42
- handleComponent: JSX.Element;
43
- handleStyle: {
44
- stroke: string;
45
- fill: string;
46
- };
47
- handleWidth: number;
48
- mouseMoveThreshold: number;
49
- };
50
- export declare const useVictoryBrushContainer: (initialProps: VictoryBrushContainerProps) => {
51
- props: {
52
- domain: {
53
- x: DomainTuple;
54
- y: DomainTuple;
55
- };
56
- currentDomain: {
57
- x: DomainTuple;
58
- y: DomainTuple;
59
- } | undefined;
60
- cachedBrushDomain: {
61
- x: DomainTuple;
62
- y: DomainTuple;
63
- } | undefined;
64
- allowDrag: boolean;
65
- allowDraw: boolean;
66
- allowResize: boolean;
67
- brushComponent: JSX.Element;
68
- brushDimension?: "x" | "y" | undefined;
69
- brushDomain?: {
70
- x?: DomainTuple | undefined;
71
- y?: DomainTuple | undefined;
72
- } | undefined;
73
- brushStyle: React.CSSProperties | {
74
- stroke: string;
75
- fill: string;
76
- fillOpacity: number;
77
- };
78
- defaultBrushArea?: "move" | "none" | "disable" | "all" | undefined;
79
- disable?: boolean | undefined;
80
- handleComponent: JSX.Element;
81
- handleStyle: React.CSSProperties | {
82
- stroke: string;
83
- fill: string;
84
- };
85
- handleWidth: number;
86
- onBrushCleared?: ((domain: {
87
- x: DomainTuple;
88
- y: DomainTuple;
89
- }, props: VictoryBrushContainerProps) => void) | undefined;
90
- onBrushDomainChange?: ((domain: {
91
- x: DomainTuple;
92
- y: DomainTuple;
93
- }, props: VictoryBrushContainerProps) => void) | undefined;
94
- onBrushDomainChangeEnd?: ((domain: {
95
- x: DomainTuple;
96
- y: DomainTuple;
97
- }, props: VictoryBrushContainerProps) => void) | undefined;
98
- "aria-describedby"?: string | undefined;
99
- "aria-labelledby"?: string | undefined;
100
- children?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
101
- className?: string | undefined;
102
- containerId?: string | number | undefined;
103
- containerRef?: React.Ref<HTMLElement> | undefined;
104
- desc?: string | undefined;
105
- events?: React.DOMAttributes<any> | undefined;
106
- height?: number | undefined;
107
- name?: string | undefined;
108
- origin?: import("victory-core").OriginType | undefined;
109
- polar?: boolean | undefined;
110
- portalComponent?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
111
- portalZIndex?: number | undefined;
112
- preserveAspectRatio?: string | undefined;
113
- responsive?: boolean | undefined;
114
- role?: string | undefined;
115
- scale?: {
116
- x?: import("victory-core").D3Scale<any> | undefined;
117
- y?: import("victory-core").D3Scale<any> | undefined;
118
- } | undefined;
119
- style?: React.CSSProperties | undefined;
120
- tabIndex?: number | undefined;
121
- theme?: import("victory-core").VictoryThemeDefinition | undefined;
122
- title?: string | undefined;
123
- width?: number | undefined;
124
- ouiaId?: string | number | undefined;
125
- ouiaSafe?: boolean | undefined;
126
- ouiaType?: string | undefined;
127
- mouseMoveThreshold: number;
128
- };
129
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
130
- };
131
- export declare const VictoryBrushContainer: {
132
- (initialProps: VictoryBrushContainerProps): JSX.Element;
133
- role: string;
134
- defaultEvents(initialProps: VictoryBrushContainerProps): {
135
- target: string;
136
- eventHandlers: {
137
- onMouseDown: VictoryEventHandler;
138
- onTouchStart: VictoryEventHandler;
139
- onGlobalMouseMove: VictoryEventHandler;
140
- onGlobalTouchMove: VictoryEventHandler;
141
- onGlobalMouseUp: VictoryEventHandler;
142
- onGlobalTouchEnd: VictoryEventHandler;
143
- onGlobalTouchCancel: VictoryEventHandler;
144
- };
145
- }[];
146
- };
1
+ import React from "react";
2
+ import { DomainTuple, VictoryContainerProps, VictoryEventHandler } from "victory-core";
3
+ export interface VictoryBrushContainerProps extends VictoryContainerProps {
4
+ allowDrag?: boolean;
5
+ allowDraw?: boolean;
6
+ allowResize?: boolean;
7
+ brushComponent?: React.ReactElement;
8
+ brushDimension?: "x" | "y";
9
+ brushDomain?: {
10
+ x?: DomainTuple;
11
+ y?: DomainTuple;
12
+ };
13
+ brushStyle?: React.CSSProperties;
14
+ defaultBrushArea?: "all" | "none" | "disable" | "move";
15
+ disable?: boolean;
16
+ handleComponent?: React.ReactElement;
17
+ handleStyle?: React.CSSProperties;
18
+ handleWidth?: number;
19
+ onBrushCleared?: (domain: {
20
+ x: DomainTuple;
21
+ y: DomainTuple;
22
+ }, props: VictoryBrushContainerProps) => void;
23
+ onBrushDomainChange?: (domain: {
24
+ x: DomainTuple;
25
+ y: DomainTuple;
26
+ }, props: VictoryBrushContainerProps) => void;
27
+ onBrushDomainChangeEnd?: (domain: {
28
+ x: DomainTuple;
29
+ y: DomainTuple;
30
+ }, props: VictoryBrushContainerProps) => void;
31
+ }
32
+ export declare const VICTORY_BRUSH_CONTAINER_DEFAULT_PROPS: {
33
+ allowDrag: boolean;
34
+ allowDraw: boolean;
35
+ allowResize: boolean;
36
+ brushComponent: JSX.Element;
37
+ brushStyle: {
38
+ stroke: string;
39
+ fill: string;
40
+ fillOpacity: number;
41
+ };
42
+ handleComponent: JSX.Element;
43
+ handleStyle: {
44
+ stroke: string;
45
+ fill: string;
46
+ };
47
+ handleWidth: number;
48
+ mouseMoveThreshold: number;
49
+ };
50
+ export declare const useVictoryBrushContainer: (initialProps: VictoryBrushContainerProps) => {
51
+ props: {
52
+ domain: {
53
+ x: DomainTuple;
54
+ y: DomainTuple;
55
+ };
56
+ currentDomain: {
57
+ x: DomainTuple;
58
+ y: DomainTuple;
59
+ } | undefined;
60
+ cachedBrushDomain: {
61
+ x: DomainTuple;
62
+ y: DomainTuple;
63
+ } | undefined;
64
+ allowDrag: boolean;
65
+ allowDraw: boolean;
66
+ allowResize: boolean;
67
+ brushComponent: JSX.Element;
68
+ brushDimension?: "x" | "y" | undefined;
69
+ brushDomain?: {
70
+ x?: DomainTuple | undefined;
71
+ y?: DomainTuple | undefined;
72
+ } | undefined;
73
+ brushStyle: React.CSSProperties | {
74
+ stroke: string;
75
+ fill: string;
76
+ fillOpacity: number;
77
+ };
78
+ defaultBrushArea?: "move" | "none" | "disable" | "all" | undefined;
79
+ disable?: boolean | undefined;
80
+ handleComponent: JSX.Element;
81
+ handleStyle: React.CSSProperties | {
82
+ stroke: string;
83
+ fill: string;
84
+ };
85
+ handleWidth: number;
86
+ onBrushCleared?: ((domain: {
87
+ x: DomainTuple;
88
+ y: DomainTuple;
89
+ }, props: VictoryBrushContainerProps) => void) | undefined;
90
+ onBrushDomainChange?: ((domain: {
91
+ x: DomainTuple;
92
+ y: DomainTuple;
93
+ }, props: VictoryBrushContainerProps) => void) | undefined;
94
+ onBrushDomainChangeEnd?: ((domain: {
95
+ x: DomainTuple;
96
+ y: DomainTuple;
97
+ }, props: VictoryBrushContainerProps) => void) | undefined;
98
+ "aria-describedby"?: string | undefined;
99
+ "aria-labelledby"?: string | undefined;
100
+ children?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
101
+ className?: string | undefined;
102
+ containerId?: string | number | undefined;
103
+ containerRef?: React.Ref<HTMLElement> | undefined;
104
+ desc?: string | undefined;
105
+ events?: React.DOMAttributes<any> | undefined;
106
+ height?: number | undefined;
107
+ name?: string | undefined;
108
+ origin?: import("victory-core").OriginType | undefined;
109
+ polar?: boolean | undefined;
110
+ portalComponent?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
111
+ portalZIndex?: number | undefined;
112
+ preserveAspectRatio?: string | undefined;
113
+ responsive?: boolean | undefined;
114
+ role?: string | undefined;
115
+ scale?: {
116
+ x?: import("victory-core").D3Scale<any> | undefined;
117
+ y?: import("victory-core").D3Scale<any> | undefined;
118
+ } | undefined;
119
+ style?: React.CSSProperties | undefined;
120
+ tabIndex?: number | undefined;
121
+ theme?: import("victory-core").VictoryThemeDefinition | undefined;
122
+ title?: string | undefined;
123
+ width?: number | undefined;
124
+ ouiaId?: string | number | undefined;
125
+ ouiaSafe?: boolean | undefined;
126
+ ouiaType?: string | undefined;
127
+ mouseMoveThreshold: number;
128
+ };
129
+ children: React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
130
+ };
131
+ export declare const VictoryBrushContainer: {
132
+ (initialProps: VictoryBrushContainerProps): JSX.Element;
133
+ role: string;
134
+ defaultEvents(initialProps: VictoryBrushContainerProps): {
135
+ target: string;
136
+ eventHandlers: {
137
+ onMouseDown: VictoryEventHandler;
138
+ onTouchStart: VictoryEventHandler;
139
+ onGlobalMouseMove: VictoryEventHandler;
140
+ onGlobalTouchMove: VictoryEventHandler;
141
+ onGlobalMouseUp: VictoryEventHandler;
142
+ onGlobalTouchEnd: VictoryEventHandler;
143
+ onGlobalTouchCancel: VictoryEventHandler;
144
+ };
145
+ }[];
146
+ };
147
147
  //# sourceMappingURL=victory-brush-container.d.ts.map
@@ -1,71 +1,71 @@
1
- /// <reference types="lodash" />
2
- export declare const BrushHelpers: {
3
- onMouseDown: (evt: any, targetProps: any) => {};
4
- onGlobalMouseUp: (evt: any, targetProps: any) => {};
5
- onGlobalMouseMove: import("lodash").DebouncedFunc<(evt: any, targetProps: any) => {}>;
6
- getDimension(props: any): any;
7
- withinBounds(point: any, bounds: any, padding?: any): boolean;
8
- getDomainBox(props: any, fullDomain: any, selectedDomain?: any): {
9
- x1: number;
10
- x2: number;
11
- y1: number;
12
- y2: number;
13
- };
14
- getHandles(props: any, domainBox: any): {
15
- left: false | {
16
- x1: number;
17
- x2: number;
18
- y1: any;
19
- y2: any;
20
- };
21
- right: false | {
22
- x1: number;
23
- x2: number;
24
- y1: any;
25
- y2: any;
26
- };
27
- top: false | {
28
- x1: any;
29
- x2: any;
30
- y1: number;
31
- y2: number;
32
- };
33
- bottom: false | {
34
- x1: any;
35
- x2: any;
36
- y1: number;
37
- y2: number;
38
- };
39
- };
40
- getActiveHandles(point: any, props: any, domainBox: any): 0 | string[];
41
- getResizeMutation(box: any, handles: any): any;
42
- getMinimumDomain(): {
43
- x: number[];
44
- y: number[];
45
- };
46
- getDefaultBrushArea(targetProps: any, cachedDomain: any, evt: any): any;
47
- getSelectionMutation(point: any, box: any, brushDimension: any): {
48
- x1: any;
49
- y1: any;
50
- x2: any;
51
- y2: any;
52
- };
53
- panBox(props: any, point: any): {
54
- x1: number;
55
- x2: number;
56
- y1: number;
57
- y2: number;
58
- };
59
- constrainBox(box: any, fullDomainBox: any): {
60
- x1: number;
61
- y1: number;
62
- x2: any;
63
- y2: any;
64
- };
65
- constrainPoint(point: any, fullDomainBox: any): {
66
- x: number;
67
- y: number;
68
- };
69
- hasMoved(props: any): boolean;
70
- };
1
+ /// <reference types="lodash" />
2
+ export declare const BrushHelpers: {
3
+ onMouseDown: (evt: any, targetProps: any) => {};
4
+ onGlobalMouseUp: (evt: any, targetProps: any) => {};
5
+ onGlobalMouseMove: import("lodash").DebouncedFunc<(evt: any, targetProps: any) => {}>;
6
+ getDimension(props: any): any;
7
+ withinBounds(point: any, bounds: any, padding?: any): boolean;
8
+ getDomainBox(props: any, fullDomain: any, selectedDomain?: any): {
9
+ x1: number;
10
+ x2: number;
11
+ y1: number;
12
+ y2: number;
13
+ };
14
+ getHandles(props: any, domainBox: any): {
15
+ left: false | {
16
+ x1: number;
17
+ x2: number;
18
+ y1: any;
19
+ y2: any;
20
+ };
21
+ right: false | {
22
+ x1: number;
23
+ x2: number;
24
+ y1: any;
25
+ y2: any;
26
+ };
27
+ top: false | {
28
+ x1: any;
29
+ x2: any;
30
+ y1: number;
31
+ y2: number;
32
+ };
33
+ bottom: false | {
34
+ x1: any;
35
+ x2: any;
36
+ y1: number;
37
+ y2: number;
38
+ };
39
+ };
40
+ getActiveHandles(point: any, props: any, domainBox: any): 0 | string[];
41
+ getResizeMutation(box: any, handles: any): any;
42
+ getMinimumDomain(): {
43
+ x: number[];
44
+ y: number[];
45
+ };
46
+ getDefaultBrushArea(targetProps: any, cachedDomain: any, evt: any): any;
47
+ getSelectionMutation(point: any, box: any, brushDimension: any): {
48
+ x1: any;
49
+ y1: any;
50
+ x2: any;
51
+ y2: any;
52
+ };
53
+ panBox(props: any, point: any): {
54
+ x1: number;
55
+ x2: number;
56
+ y1: number;
57
+ y2: number;
58
+ };
59
+ constrainBox(box: any, fullDomainBox: any): {
60
+ x1: number;
61
+ y1: number;
62
+ x2: any;
63
+ y2: any;
64
+ };
65
+ constrainPoint(point: any, fullDomainBox: any): {
66
+ x: number;
67
+ y: number;
68
+ };
69
+ hasMoved(props: any): boolean;
70
+ };
71
71
  //# sourceMappingURL=brush-helpers.d.ts.map
package/lib/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from "./victory-brush-container";
2
- export * from "./brush-helpers";
1
+ export * from "./victory-brush-container";
2
+ export * from "./brush-helpers";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,147 +1,147 @@
1
- import React from "react";
2
- import { DomainTuple, VictoryContainerProps, VictoryEventHandler } from "victory-core";
3
- export interface VictoryBrushContainerProps extends VictoryContainerProps {
4
- allowDrag?: boolean;
5
- allowDraw?: boolean;
6
- allowResize?: boolean;
7
- brushComponent?: React.ReactElement;
8
- brushDimension?: "x" | "y";
9
- brushDomain?: {
10
- x?: DomainTuple;
11
- y?: DomainTuple;
12
- };
13
- brushStyle?: React.CSSProperties;
14
- defaultBrushArea?: "all" | "none" | "disable" | "move";
15
- disable?: boolean;
16
- handleComponent?: React.ReactElement;
17
- handleStyle?: React.CSSProperties;
18
- handleWidth?: number;
19
- onBrushCleared?: (domain: {
20
- x: DomainTuple;
21
- y: DomainTuple;
22
- }, props: VictoryBrushContainerProps) => void;
23
- onBrushDomainChange?: (domain: {
24
- x: DomainTuple;
25
- y: DomainTuple;
26
- }, props: VictoryBrushContainerProps) => void;
27
- onBrushDomainChangeEnd?: (domain: {
28
- x: DomainTuple;
29
- y: DomainTuple;
30
- }, props: VictoryBrushContainerProps) => void;
31
- }
32
- export declare const VICTORY_BRUSH_CONTAINER_DEFAULT_PROPS: {
33
- allowDrag: boolean;
34
- allowDraw: boolean;
35
- allowResize: boolean;
36
- brushComponent: JSX.Element;
37
- brushStyle: {
38
- stroke: string;
39
- fill: string;
40
- fillOpacity: number;
41
- };
42
- handleComponent: JSX.Element;
43
- handleStyle: {
44
- stroke: string;
45
- fill: string;
46
- };
47
- handleWidth: number;
48
- mouseMoveThreshold: number;
49
- };
50
- export declare const useVictoryBrushContainer: (initialProps: VictoryBrushContainerProps) => {
51
- props: {
52
- domain: {
53
- x: DomainTuple;
54
- y: DomainTuple;
55
- };
56
- currentDomain: {
57
- x: DomainTuple;
58
- y: DomainTuple;
59
- } | undefined;
60
- cachedBrushDomain: {
61
- x: DomainTuple;
62
- y: DomainTuple;
63
- } | undefined;
64
- allowDrag: boolean;
65
- allowDraw: boolean;
66
- allowResize: boolean;
67
- brushComponent: JSX.Element;
68
- brushDimension?: "x" | "y" | undefined;
69
- brushDomain?: {
70
- x?: DomainTuple | undefined;
71
- y?: DomainTuple | undefined;
72
- } | undefined;
73
- brushStyle: React.CSSProperties | {
74
- stroke: string;
75
- fill: string;
76
- fillOpacity: number;
77
- };
78
- defaultBrushArea?: "move" | "none" | "disable" | "all" | undefined;
79
- disable?: boolean | undefined;
80
- handleComponent: JSX.Element;
81
- handleStyle: React.CSSProperties | {
82
- stroke: string;
83
- fill: string;
84
- };
85
- handleWidth: number;
86
- onBrushCleared?: ((domain: {
87
- x: DomainTuple;
88
- y: DomainTuple;
89
- }, props: VictoryBrushContainerProps) => void) | undefined;
90
- onBrushDomainChange?: ((domain: {
91
- x: DomainTuple;
92
- y: DomainTuple;
93
- }, props: VictoryBrushContainerProps) => void) | undefined;
94
- onBrushDomainChangeEnd?: ((domain: {
95
- x: DomainTuple;
96
- y: DomainTuple;
97
- }, props: VictoryBrushContainerProps) => void) | undefined;
98
- "aria-describedby"?: string | undefined;
99
- "aria-labelledby"?: string | undefined;
100
- children?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
101
- className?: string | undefined;
102
- containerId?: string | number | undefined;
103
- containerRef?: React.Ref<HTMLElement> | undefined;
104
- desc?: string | undefined;
105
- events?: React.DOMAttributes<any> | undefined;
106
- height?: number | undefined;
107
- name?: string | undefined;
108
- origin?: import("victory-core").OriginType | undefined;
109
- polar?: boolean | undefined;
110
- portalComponent?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
111
- portalZIndex?: number | undefined;
112
- preserveAspectRatio?: string | undefined;
113
- responsive?: boolean | undefined;
114
- role?: string | undefined;
115
- scale?: {
116
- x?: import("victory-core").D3Scale<any> | undefined;
117
- y?: import("victory-core").D3Scale<any> | undefined;
118
- } | undefined;
119
- style?: React.CSSProperties | undefined;
120
- tabIndex?: number | undefined;
121
- theme?: import("victory-core").VictoryThemeDefinition | undefined;
122
- title?: string | undefined;
123
- width?: number | undefined;
124
- ouiaId?: string | number | undefined;
125
- ouiaSafe?: boolean | undefined;
126
- ouiaType?: string | undefined;
127
- mouseMoveThreshold: number;
128
- };
129
- children: React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
130
- };
131
- export declare const VictoryBrushContainer: {
132
- (initialProps: VictoryBrushContainerProps): JSX.Element;
133
- role: string;
134
- defaultEvents(initialProps: VictoryBrushContainerProps): {
135
- target: string;
136
- eventHandlers: {
137
- onMouseDown: VictoryEventHandler;
138
- onTouchStart: VictoryEventHandler;
139
- onGlobalMouseMove: VictoryEventHandler;
140
- onGlobalTouchMove: VictoryEventHandler;
141
- onGlobalMouseUp: VictoryEventHandler;
142
- onGlobalTouchEnd: VictoryEventHandler;
143
- onGlobalTouchCancel: VictoryEventHandler;
144
- };
145
- }[];
146
- };
1
+ import React from "react";
2
+ import { DomainTuple, VictoryContainerProps, VictoryEventHandler } from "victory-core";
3
+ export interface VictoryBrushContainerProps extends VictoryContainerProps {
4
+ allowDrag?: boolean;
5
+ allowDraw?: boolean;
6
+ allowResize?: boolean;
7
+ brushComponent?: React.ReactElement;
8
+ brushDimension?: "x" | "y";
9
+ brushDomain?: {
10
+ x?: DomainTuple;
11
+ y?: DomainTuple;
12
+ };
13
+ brushStyle?: React.CSSProperties;
14
+ defaultBrushArea?: "all" | "none" | "disable" | "move";
15
+ disable?: boolean;
16
+ handleComponent?: React.ReactElement;
17
+ handleStyle?: React.CSSProperties;
18
+ handleWidth?: number;
19
+ onBrushCleared?: (domain: {
20
+ x: DomainTuple;
21
+ y: DomainTuple;
22
+ }, props: VictoryBrushContainerProps) => void;
23
+ onBrushDomainChange?: (domain: {
24
+ x: DomainTuple;
25
+ y: DomainTuple;
26
+ }, props: VictoryBrushContainerProps) => void;
27
+ onBrushDomainChangeEnd?: (domain: {
28
+ x: DomainTuple;
29
+ y: DomainTuple;
30
+ }, props: VictoryBrushContainerProps) => void;
31
+ }
32
+ export declare const VICTORY_BRUSH_CONTAINER_DEFAULT_PROPS: {
33
+ allowDrag: boolean;
34
+ allowDraw: boolean;
35
+ allowResize: boolean;
36
+ brushComponent: JSX.Element;
37
+ brushStyle: {
38
+ stroke: string;
39
+ fill: string;
40
+ fillOpacity: number;
41
+ };
42
+ handleComponent: JSX.Element;
43
+ handleStyle: {
44
+ stroke: string;
45
+ fill: string;
46
+ };
47
+ handleWidth: number;
48
+ mouseMoveThreshold: number;
49
+ };
50
+ export declare const useVictoryBrushContainer: (initialProps: VictoryBrushContainerProps) => {
51
+ props: {
52
+ domain: {
53
+ x: DomainTuple;
54
+ y: DomainTuple;
55
+ };
56
+ currentDomain: {
57
+ x: DomainTuple;
58
+ y: DomainTuple;
59
+ } | undefined;
60
+ cachedBrushDomain: {
61
+ x: DomainTuple;
62
+ y: DomainTuple;
63
+ } | undefined;
64
+ allowDrag: boolean;
65
+ allowDraw: boolean;
66
+ allowResize: boolean;
67
+ brushComponent: JSX.Element;
68
+ brushDimension?: "x" | "y" | undefined;
69
+ brushDomain?: {
70
+ x?: DomainTuple | undefined;
71
+ y?: DomainTuple | undefined;
72
+ } | undefined;
73
+ brushStyle: React.CSSProperties | {
74
+ stroke: string;
75
+ fill: string;
76
+ fillOpacity: number;
77
+ };
78
+ defaultBrushArea?: "move" | "none" | "disable" | "all" | undefined;
79
+ disable?: boolean | undefined;
80
+ handleComponent: JSX.Element;
81
+ handleStyle: React.CSSProperties | {
82
+ stroke: string;
83
+ fill: string;
84
+ };
85
+ handleWidth: number;
86
+ onBrushCleared?: ((domain: {
87
+ x: DomainTuple;
88
+ y: DomainTuple;
89
+ }, props: VictoryBrushContainerProps) => void) | undefined;
90
+ onBrushDomainChange?: ((domain: {
91
+ x: DomainTuple;
92
+ y: DomainTuple;
93
+ }, props: VictoryBrushContainerProps) => void) | undefined;
94
+ onBrushDomainChangeEnd?: ((domain: {
95
+ x: DomainTuple;
96
+ y: DomainTuple;
97
+ }, props: VictoryBrushContainerProps) => void) | undefined;
98
+ "aria-describedby"?: string | undefined;
99
+ "aria-labelledby"?: string | undefined;
100
+ children?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
101
+ className?: string | undefined;
102
+ containerId?: string | number | undefined;
103
+ containerRef?: React.Ref<HTMLElement> | undefined;
104
+ desc?: string | undefined;
105
+ events?: React.DOMAttributes<any> | undefined;
106
+ height?: number | undefined;
107
+ name?: string | undefined;
108
+ origin?: import("victory-core").OriginType | undefined;
109
+ polar?: boolean | undefined;
110
+ portalComponent?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
111
+ portalZIndex?: number | undefined;
112
+ preserveAspectRatio?: string | undefined;
113
+ responsive?: boolean | undefined;
114
+ role?: string | undefined;
115
+ scale?: {
116
+ x?: import("victory-core").D3Scale<any> | undefined;
117
+ y?: import("victory-core").D3Scale<any> | undefined;
118
+ } | undefined;
119
+ style?: React.CSSProperties | undefined;
120
+ tabIndex?: number | undefined;
121
+ theme?: import("victory-core").VictoryThemeDefinition | undefined;
122
+ title?: string | undefined;
123
+ width?: number | undefined;
124
+ ouiaId?: string | number | undefined;
125
+ ouiaSafe?: boolean | undefined;
126
+ ouiaType?: string | undefined;
127
+ mouseMoveThreshold: number;
128
+ };
129
+ children: React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
130
+ };
131
+ export declare const VictoryBrushContainer: {
132
+ (initialProps: VictoryBrushContainerProps): JSX.Element;
133
+ role: string;
134
+ defaultEvents(initialProps: VictoryBrushContainerProps): {
135
+ target: string;
136
+ eventHandlers: {
137
+ onMouseDown: VictoryEventHandler;
138
+ onTouchStart: VictoryEventHandler;
139
+ onGlobalMouseMove: VictoryEventHandler;
140
+ onGlobalTouchMove: VictoryEventHandler;
141
+ onGlobalMouseUp: VictoryEventHandler;
142
+ onGlobalTouchEnd: VictoryEventHandler;
143
+ onGlobalTouchCancel: VictoryEventHandler;
144
+ };
145
+ }[];
146
+ };
147
147
  //# sourceMappingURL=victory-brush-container.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-brush-container",
3
- "version": "37.0.3-next.0",
3
+ "version": "37.1.0",
4
4
  "description": "Interactive Brush Component for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -22,11 +22,14 @@
22
22
  "dependencies": {
23
23
  "lodash": "^4.17.19",
24
24
  "react-fast-compare": "^3.2.0",
25
- "victory-core": "^37.0.3-next.0"
25
+ "victory-core": "37.1.0"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": ">=16.6.0"
29
29
  },
30
+ "publishConfig": {
31
+ "provenance": true
32
+ },
30
33
  "wireit": {
31
34
  "### THESE WIREIT CONFIGS ARE GENERATED ####": {},
32
35
  "### DO NOT MODIFY THESE MANUALLY ####": {},