UNPKG

@groww-tech/react-charts

Version:
1 lines 52.1 kB
import{_ as t}from"./tslib.es6-fef9fe46.js";import e,{useMemo as n,useState as r}from"react";import{P as i,i as o}from"./index-aa089771.js";import{c as a,G as u}from"./Group-da8eb18b.js";import"prop-types";var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function l(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}const h=Symbol("implicit");function c(){var t=new Map,e=[],n=[],r=h;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==h)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new Map;for(const r of n){const n=r+"";t.has(n)||t.set(n,e.push(r))}return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return c(e,n).unknown(r)},l.apply(i,arguments),i}function f(){var t,e,n=c().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,u=!1,s=0,h=0,p=.5;function d(){var n=r().length,l=a<o,c=l?a:o,f=l?o:a;t=(f-c)/Math.max(1,n-s+2*h),u&&(t=Math.floor(t)),c+=(f-c-t*(n-s))*p,e=t*(1-s),u&&(c=Math.round(c),e=Math.round(e));var d=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}(n).map(function(e){return c+t*e});return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),d()):r()},n.range=function(t){return arguments.length?([o,a]=t,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(t){return[o,a]=t,o=+o,a=+a,u=!0,d()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(u=!!t,d()):u},n.padding=function(t){return arguments.length?(s=Math.min(1,h=+t),d()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),d()):s},n.paddingOuter=function(t){return arguments.length?(h=+t,d()):h},n.align=function(t){return arguments.length?(p=Math.max(0,Math.min(1,t)),d()):p},n.copy=function(){return f(r(),[o,a]).round(u).paddingInner(s).paddingOuter(h).align(p)},l.apply(d(),arguments)}function p(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function d(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function v(){}var g=.7,y=1/g,m="\\s*([+-]?\\d+)\\s*",w="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",b="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",x=/^#([0-9a-f]{3,8})$/,k=new RegExp("^rgb\\("+[m,m,m]+"\\)$"),M=new RegExp("^rgb\\("+[b,b,b]+"\\)$"),O=new RegExp("^rgba\\("+[m,m,m,w]+"\\)$"),T=new RegExp("^rgba\\("+[b,b,b,w]+"\\)$"),N=new RegExp("^hsl\\("+[w,b,b]+"\\)$"),_=new RegExp("^hsla\\("+[w,b,b,w]+"\\)$"),E={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function C(){return this.rgb().formatHex()}function P(){return this.rgb().formatRgb()}function A(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=x.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?F(e):3===n?new I(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?S(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?S(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=k.exec(t))?new I(e[1],e[2],e[3],1):(e=M.exec(t))?new I(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=O.exec(t))?S(e[1],e[2],e[3],e[4]):(e=T.exec(t))?S(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=N.exec(t))?z(e[1],e[2]/100,e[3]/100,1):(e=_.exec(t))?z(e[1],e[2]/100,e[3]/100,e[4]):E.hasOwnProperty(t)?F(E[t]):"transparent"===t?new I(NaN,NaN,NaN,0):null}function F(t){return new I(t>>16&255,t>>8&255,255&t,1)}function S(t,e,n,r){return r<=0&&(t=e=n=NaN),new I(t,e,n,r)}function j(t){return t instanceof v||(t=A(t)),t?new I((t=t.rgb()).r,t.g,t.b,t.opacity):new I}function U(t,e,n,r){return 1===arguments.length?j(t):new I(t,e,n,null==r?1:r)}function I(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function R(){return"#"+L(this.r)+L(this.g)+L(this.b)}function D(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function L(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function z(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new W(t,e,n,r)}function H(t){if(t instanceof W)return new W(t.h,t.s,t.l,t.opacity);if(t instanceof v||(t=A(t)),!t)return new W;if(t instanceof W)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=e===o?(n-r)/u+6*(n<r):n===o?(r-e)/u+2:(e-n)/u+4,u/=s<.5?o+i:2-o-i,a*=60):u=s>0&&s<1?0:a,new W(a,u,s,t.opacity)}function Y(t,e,n,r){return 1===arguments.length?H(t):new W(t,e,n,null==r?1:r)}function W(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function q(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}p(v,A,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:C,formatHex:C,formatHsl:function(){return H(this).formatHsl()},formatRgb:P,toString:P}),p(I,U,d(v,{brighter:function(t){return t=null==t?y:Math.pow(y,t),new I(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?g:Math.pow(g,t),new I(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:R,formatHex:R,formatRgb:D,toString:D})),p(W,Y,d(v,{brighter:function(t){return t=null==t?y:Math.pow(y,t),new W(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?g:Math.pow(g,t),new W(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new I(q(t>=240?t-240:t+120,i,r),q(t,i,r),q(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var B=Math.PI/180,$=180/Math.PI,G=.96422,V=.82521,Z=4/29,J=6/29,X=3*J*J,K=J*J*J;function Q(t){if(t instanceof et)return new et(t.l,t.a,t.b,t.opacity);if(t instanceof ut)return st(t);t instanceof I||(t=j(t));var e,n,r=ot(t.r),i=ot(t.g),o=ot(t.b),a=nt((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?e=n=a:(e=nt((.4360747*r+.3850649*i+.1430804*o)/G),n=nt((.0139322*r+.0971045*i+.7141733*o)/V)),new et(116*a-16,500*(e-a),200*(a-n),t.opacity)}function tt(t,e,n,r){return 1===arguments.length?Q(t):new et(t,e,n,null==r?1:r)}function et(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function nt(t){return t>K?Math.pow(t,1/3):t/X+Z}function rt(t){return t>J?t*t*t:X*(t-Z)}function it(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ot(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function at(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof ut)return new ut(t.h,t.c,t.l,t.opacity);if(t instanceof et||(t=Q(t)),0===t.a&&0===t.b)return new ut(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*$;return new ut(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new ut(t,e,n,null==r?1:r)}function ut(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function st(t){if(isNaN(t.h))return new et(t.l,0,0,t.opacity);var e=t.h*B;return new et(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}p(et,tt,d(v,{brighter:function(t){return new et(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new et(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new I(it(3.1338561*(e=G*rt(e))-1.6168667*(t=1*rt(t))-.4906146*(n=V*rt(n))),it(-.9787684*e+1.9161415*t+.033454*n),it(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),p(ut,at,d(v,{brighter:function(t){return new ut(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new ut(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return st(this).rgb()}}));var lt=-.14861,ht=1.78277,ct=-.29227,ft=-.90649,pt=1.97294,dt=pt*ft,vt=pt*ht,gt=ht*ct-ft*lt;function yt(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof mt)return new mt(t.h,t.s,t.l,t.opacity);t instanceof I||(t=j(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(gt*r+dt*e-vt*n)/(gt+dt-vt),o=r-i,a=(pt*(n-i)-ct*o)/ft,u=Math.sqrt(a*a+o*o)/(pt*i*(1-i)),s=u?Math.atan2(a,o)*$-120:NaN;return new mt(s<0?s+360:s,u,i,t.opacity)}(t):new mt(t,e,n,null==r?1:r)}function mt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function wt(t){return function(){return t}}function bt(t,e){return function(n){return t+n*e}}function xt(t,e){var n=e-t;return n?bt(t,n>180||n<-180?n-360*Math.round(n/360):n):wt(isNaN(t)?e:t)}function kt(t){return 1===(t=+t)?Mt:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):wt(isNaN(e)?n:e)}}function Mt(t,e){var n=e-t;return n?bt(t,n):wt(isNaN(t)?e:t)}p(mt,yt,d(v,{brighter:function(t){return t=null==t?y:Math.pow(y,t),new mt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?g:Math.pow(g,t),new mt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*B,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new I(255*(e+n*(lt*r+ht*i)),255*(e+n*(ct*r+ft*i)),255*(e+n*(pt*r)),this.opacity)}}));var Ot=function t(e){var n=kt(e);function r(t,e){var r=n((t=U(t)).r,(e=U(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Mt(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Tt(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Nt(t){return function(e,n){var r=t((e=Y(e)).h,(n=Y(n)).h),i=Mt(e.s,n.s),o=Mt(e.l,n.l),a=Mt(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=o(t),e.opacity=a(t),e+""}}}var _t=Nt(xt),Et=Nt(Mt);function Ct(t){return function(e,n){var r=t((e=at(e)).h,(n=at(n)).h),i=Mt(e.c,n.c),o=Mt(e.l,n.l),a=Mt(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=o(t),e.opacity=a(t),e+""}}}var Pt=Ct(xt),At=Ct(Mt);function Ft(t){return function e(n){function r(e,r){var i=t((e=yt(e)).h,(r=yt(r)).h),o=Mt(e.s,r.s),a=Mt(e.l,r.l),u=Mt(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=o(t),e.l=a(Math.pow(t,n)),e.opacity=u(t),e+""}}return n=+n,r.gamma=e,r}(1)}var St=Ft(xt),jt=Ft(Mt),Ut=new Date,It=new Date;function Rt(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,u=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return u;do{u.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return u},i.filter=function(n){return Rt(function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})},n&&(i.count=function(e,r){return Ut.setTime(+e),It.setTime(+r),t(Ut),t(It),Math.floor(n(Ut,It))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t===0}:function(e){return i.count(0,e)%t===0}):i:null}),i}const Dt=1e3,Lt=6e4,zt=36e5,Ht=864e5,Yt=6048e5;var Wt=Rt(function(t){t.setTime(t-t.getMilliseconds())},function(t,e){t.setTime(+t+e*Dt)},function(t,e){return(e-t)/Dt},function(t){return t.getUTCSeconds()}),qt=Rt(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Dt)},function(t,e){t.setTime(+t+e*Lt)},function(t,e){return(e-t)/Lt},function(t){return t.getMinutes()}),Bt=Rt(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Dt-t.getMinutes()*Lt)},function(t,e){t.setTime(+t+e*zt)},function(t,e){return(e-t)/zt},function(t){return t.getHours()}),$t=Rt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Lt)/Ht,t=>t.getDate()-1);function Gt(t){return Rt(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Lt)/Yt})}var Vt=Gt(0);Gt(1),Gt(2),Gt(3),Gt(4),Gt(5),Gt(6);var Zt=Rt(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),Jt=Rt(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});Jt.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Rt(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,n){e.setFullYear(e.getFullYear()+n*t)}):null};var Xt=Rt(function(t){t.setUTCSeconds(0,0)},function(t,e){t.setTime(+t+e*Lt)},function(t,e){return(e-t)/Lt},function(t){return t.getUTCMinutes()}),Kt=Rt(function(t){t.setUTCMinutes(0,0,0)},function(t,e){t.setTime(+t+e*zt)},function(t,e){return(e-t)/zt},function(t){return t.getUTCHours()}),Qt=Rt(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/Ht},function(t){return t.getUTCDate()-1});function te(t){return Rt(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/Yt})}var ee=te(0);te(1),te(2),te(3),te(4),te(5),te(6);var ne=Rt(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCMonth(t.getUTCMonth()+e)},function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),re=Rt(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});re.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Rt(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null};var ie={lab:function(t,e){var n=Mt((t=tt(t)).l,(e=tt(e)).l),r=Mt(t.a,e.a),i=Mt(t.b,e.b),o=Mt(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=o(e),t+""}},hcl:Pt,"hcl-long":At,hsl:_t,"hsl-long":Et,cubehelix:St,"cubehelix-long":jt,rgb:Ot};var oe=new Date(Date.UTC(2020,1,2,3,4,5));var ae={day:$t,hour:Bt,minute:qt,month:Zt,second:Wt,week:Vt,year:Jt},ue={day:Qt,hour:Kt,minute:Xt,month:ne,second:Wt,week:ee,year:re};var se=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"],le={domain:function(t,e){e.domain&&t.domain(e.domain)},nice:function(t,e){if("nice"in e&&void 0!==e.nice&&"nice"in t){var n=e.nice;if("boolean"==typeof n)n&&t.nice();else if("number"==typeof n)t.nice(n);else{var r=t,i=function(t){return"2020-02-02 03:04"===t.tickFormat(1,"%Y-%m-%d %H:%M")(oe)}(r);if("string"==typeof n)r.nice(i?ue[n]:ae[n]);else{var o=n.interval,a=n.step,u=(i?ue[o]:ae[o]).every(a);null!=u&&r.nice(u)}}}},zero:function(t,e){if("zero"in e&&!0===e.zero){var n=t.domain(),r=n[0],i=n[1],o=i<r,a=o?[i,r]:[r,i],u=a[0],s=a[1],l=[Math.min(0,u),Math.max(0,s)];t.domain(o?l.reverse():l)}},interpolate:function(t,e){if("interpolate"in e&&"interpolate"in t&&void 0!==e.interpolate){var n=function(t){switch(t){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return ie[t]}var e=t.type,n=t.gamma,r=ie[e];return void 0===n?r:r.gamma(n)}(e.interpolate);t.interpolate(n)}},round:function(t,e){"round"in e&&void 0!==e.round&&(e.round&&"interpolate"in e&&void 0!==e.interpolate?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",e):"round"in t?t.round(e.round):"interpolate"in t&&e.round&&t.interpolate(Tt))},align:function(t,e){"align"in t&&"align"in e&&void 0!==e.align&&t.align(e.align)},base:function(t,e){"base"in t&&"base"in e&&void 0!==e.base&&t.base(e.base)},clamp:function(t,e){"clamp"in t&&"clamp"in e&&void 0!==e.clamp&&t.clamp(e.clamp)},constant:function(t,e){"constant"in t&&"constant"in e&&void 0!==e.constant&&t.constant(e.constant)},exponent:function(t,e){"exponent"in t&&"exponent"in e&&void 0!==e.exponent&&t.exponent(e.exponent)},padding:function(t,e){"padding"in t&&"padding"in e&&void 0!==e.padding&&t.padding(e.padding),"paddingInner"in t&&"paddingInner"in e&&void 0!==e.paddingInner&&t.paddingInner(e.paddingInner),"paddingOuter"in t&&"paddingOuter"in e&&void 0!==e.paddingOuter&&t.paddingOuter(e.paddingOuter)},range:function(t,e){e.range&&t.range(e.range)},reverse:function(t,e){if(e.reverse){var n=t.range().slice().reverse();t.range(n)}},unknown:function(t,e){"unknown"in t&&"unknown"in e&&void 0!==e.unknown&&t.unknown(e.unknown)}};var he=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=new Set(e),i=se.filter(function(t){return r.has(t)});return function(t,e){return void 0!==e&&i.forEach(function(n){le[n](t,e)}),t}}("domain","range","reverse","align","padding","round");function ce(t){return null==t?void 0:t.toString()}var fe=["from","to","fill","className","innerRef"];function pe(){return pe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},pe.apply(this,arguments)}function de(t){var n=t.from,r=void 0===n?{x:0,y:0}:n,i=t.to,o=void 0===i?{x:1,y:1}:i,u=t.fill,s=void 0===u?"transparent":u,l=t.className,h=t.innerRef,c=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,fe),f=r.x===o.x||r.y===o.y;return e.createElement("line",pe({ref:h,className:a("visx-line",l),x1:r.x,y1:r.y,x2:o.x,y2:o.y,fill:s,shapeRendering:f?"crispEdges":"auto"},c))}var ve=ge;function ge(t,e,n){t instanceof RegExp&&(t=ye(t,n)),e instanceof RegExp&&(e=ye(e,n));var r=me(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function ye(t,e){var n=e.match(t);return n?n[0]:null}function me(t,e,n){var r,i,o,a,u,s=n.indexOf(t),l=n.indexOf(e,s+1),h=s;if(s>=0&&l>0){for(r=[],o=n.length;h>=0&&!u;)h==s?(r.push(h),s=n.indexOf(t,h+1)):1==r.length?u=[r.pop(),l]:((i=r.pop())<o&&(o=i,a=l),l=n.indexOf(e,h+1)),h=s<l&&s>=0?s:l;r.length&&(u=[o,a])}return u}ge.range=me;var we=be;function be(t,e,n){t instanceof RegExp&&(t=xe(t,n)),e instanceof RegExp&&(e=xe(e,n));var r=ke(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function xe(t,e){var n=e.match(t);return n?n[0]:null}function ke(t,e,n){var r,i,o,a,u,s=n.indexOf(t),l=n.indexOf(e,s+1),h=s;if(s>=0&&l>0){if(t===e)return[s,l];for(r=[],o=n.length;h>=0&&!u;)h==s?(r.push(h),s=n.indexOf(t,h+1)):1==r.length?u=[r.pop(),l]:((i=r.pop())<o&&(o=i,a=l),l=n.indexOf(e,h+1)),h=s<l&&s>=0?s:l;r.length&&(u=[o,a])}return u}be.range=ke;var Me=we,Oe=Te;function Te(t,e,n){var r=t;return function(t,e){var n=[],r="string"==typeof e?new RegExp("\\b("+e+")\\("):e;do{var i=r.exec(t);if(!i)return n;if(void 0===i[1])throw new Error("Missing the first couple of parenthesis to get the function identifier in "+e);var o=i[1],a=i.index,u=Me("(",")",t.substring(a));if(!u||u.start!==i[0].length-1)throw new SyntaxError(o+"(): missing closing ')' in the value '"+t+"'");n.push({matches:u,functionIdentifier:o}),t=u.post}while(r.test(t));return n}(t,e).reduce(function(t,i){return t.replace(i.functionIdentifier+"("+i.matches.body+")",function(t,e,n,r,i){return n(Te(t,i,n),e,r)}(i.matches.body,i.functionIdentifier,n,r,e))},t)}var Ne=function(t){this.value=t};Ne.math={isDegree:!0,acos:function(t){return Ne.math.isDegree?180/Math.PI*Math.acos(t):Math.acos(t)},add:function(t,e){return t+e},asin:function(t){return Ne.math.isDegree?180/Math.PI*Math.asin(t):Math.asin(t)},atan:function(t){return Ne.math.isDegree?180/Math.PI*Math.atan(t):Math.atan(t)},acosh:function(t){return Math.log(t+Math.sqrt(t*t-1))},asinh:function(t){return Math.log(t+Math.sqrt(t*t+1))},atanh:function(t){return Math.log((1+t)/(1-t))},C:function(t,e){var n=1,r=t-e,i=e;i<r&&(i=r,r=e);for(var o=i+1;o<=t;o++)n*=o;return n/Ne.math.fact(r)},changeSign:function(t){return-t},cos:function(t){return Ne.math.isDegree&&(t=Ne.math.toRadian(t)),Math.cos(t)},cosh:function(t){return(Math.pow(Math.E,t)+Math.pow(Math.E,-1*t))/2},div:function(t,e){return t/e},fact:function(t){if(t%1!=0)return"NaN";for(var e=1,n=2;n<=t;n++)e*=n;return e},inverse:function(t){return 1/t},log:function(t){return Math.log(t)/Math.log(10)},mod:function(t,e){return t%e},mul:function(t,e){return t*e},P:function(t,e){for(var n=1,r=Math.floor(t)-Math.floor(e)+1;r<=Math.floor(t);r++)n*=r;return n},Pi:function(t,e,n){for(var r=1,i=t;i<=e;i++)r*=Number(n.postfixEval({n:i}));return r},pow10x:function(t){for(var e=1;t--;)e*=10;return e},sigma:function(t,e,n){for(var r=0,i=t;i<=e;i++)r+=Number(n.postfixEval({n:i}));return r},sin:function(t){return Ne.math.isDegree&&(t=Ne.math.toRadian(t)),Math.sin(t)},sinh:function(t){return(Math.pow(Math.E,t)-Math.pow(Math.E,-1*t))/2},sub:function(t,e){return t-e},tan:function(t){return Ne.math.isDegree&&(t=Ne.math.toRadian(t)),Math.tan(t)},tanh:function(t){return Ne.sinha(t)/Ne.cosha(t)},toRadian:function(t){return t*Math.PI/180},and:function(t,e){return t&e}},Ne.Exception=function(t){this.message=t};var _e=Ne;function Ee(t,e){for(var n=0;n<t.length;n++)t[n]+=e;return t}for(var Ce=[{token:"sin",show:"sin",type:0,value:_e.math.sin},{token:"cos",show:"cos",type:0,value:_e.math.cos},{token:"tan",show:"tan",type:0,value:_e.math.tan},{token:"pi",show:"&pi;",type:3,value:"PI"},{token:"(",show:"(",type:4,value:"("},{token:")",show:")",type:5,value:")"},{token:"P",show:"P",type:10,value:_e.math.P},{token:"C",show:"C",type:10,value:_e.math.C},{token:" ",show:" ",type:14,value:" ".anchor},{token:"asin",show:"asin",type:0,value:_e.math.asin},{token:"acos",show:"acos",type:0,value:_e.math.acos},{token:"atan",show:"atan",type:0,value:_e.math.atan},{token:"7",show:"7",type:1,value:"7"},{token:"8",show:"8",type:1,value:"8"},{token:"9",show:"9",type:1,value:"9"},{token:"int",show:"Int",type:0,value:Math.floor},{token:"cosh",show:"cosh",type:0,value:_e.math.cosh},{token:"acosh",show:"acosh",type:0,value:_e.math.acosh},{token:"ln",show:" ln",type:0,value:Math.log},{token:"^",show:"^",type:10,value:Math.pow},{token:"root",show:"root",type:0,value:Math.sqrt},{token:"4",show:"4",type:1,value:"4"},{token:"5",show:"5",type:1,value:"5"},{token:"6",show:"6",type:1,value:"6"},{token:"/",show:"&divide;",type:2,value:_e.math.div},{token:"!",show:"!",type:7,value:_e.math.fact},{token:"tanh",show:"tanh",type:0,value:_e.math.tanh},{token:"atanh",show:"atanh",type:0,value:_e.math.atanh},{token:"Mod",show:" Mod ",type:2,value:_e.math.mod},{token:"1",show:"1",type:1,value:"1"},{token:"2",show:"2",type:1,value:"2"},{token:"3",show:"3",type:1,value:"3"},{token:"*",show:"&times;",type:2,value:_e.math.mul},{token:"sinh",show:"sinh",type:0,value:_e.math.sinh},{token:"asinh",show:"asinh",type:0,value:_e.math.asinh},{token:"e",show:"e",type:3,value:"E"},{token:"log",show:" log",type:0,value:_e.math.log},{token:"0",show:"0",type:1,value:"0"},{token:".",show:".",type:6,value:"."},{token:"+",show:"+",type:9,value:_e.math.add},{token:"-",show:"-",type:9,value:_e.math.sub},{token:",",show:",",type:11,value:","},{token:"Sigma",show:"&Sigma;",type:12,value:_e.math.sigma},{token:"n",show:"n",type:13,value:"n"},{token:"Pi",show:"&Pi;",type:12,value:_e.math.Pi},{token:"pow",show:"pow",type:8,value:Math.pow,numberOfArguments:2},{token:"&",show:"&",type:9,value:_e.math.and}],Pe={0:11,1:0,2:3,3:0,4:0,5:0,6:0,7:11,8:11,9:1,10:10,11:0,12:11,13:0,14:-1,15:11},Ae=0;Ae<Ce.length;Ae++)Ce[Ae].precedence=Pe[Ce[Ae].type];var Fe={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,9:!0,12:!0,13:!0,14:!0,15:!0},Se={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0,13:!0,15:!0},je={0:!0,3:!0,4:!0,8:!0,12:!0,13:!0,15:!0},Ue={},Ie={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,12:!0,13:!0,15:!0},Re={1:!0},De=[[],["1","2","3","7","8","9","4","5","6","+","-","*","/","(",")","^","!","P","C","e","0",".",",","n"," ","&"],["pi","ln","Pi"],["sin","cos","tan","Del","int","Mod","log","pow"],["asin","acos","atan","cosh","root","tanh","sinh"],["acosh","atanh","asinh","Sigma"]];function Le(t,e,n,r){for(var i=0;i<r;i++)if(t[n+i]!==e[i])return!1;return!0}function ze(t,e){for(var n=0;n<e.length;n++)if(e[n].token===t)return n;return-1}function He(t){for(var e,n,r,i=[],o=t.length,a=0;a<o;a++)if(!(a<o-1&&" "===t[a]&&" "===t[a+1])){for(e="",n=t.length-a>De.length-2?De.length-1:t.length-a;n>0;n--)if(void 0!==De[n])for(r=0;r<De[n].length;r++)Le(t,De[n][r],a,n)&&(e=De[n][r],r=De[n].length,n=0);if(a+=e.length-1,""===e)throw new _e.Exception("Can't understand after "+t.slice(a));i.push(Ce[ze(e,Ce)])}return i}_e.tokenTypes={FUNCTION_WITH_ONE_ARG:0,NUMBER:1,BINARY_OPERATOR_HIGH_PRECENDENCE:2,CONSTANT:3,OPENING_PARENTHESIS:4,CLOSING_PARENTHESIS:5,DECIMAL:6,POSTFIX_FUNCTION_WITH_ONE_ARG:7,FUNCTION_WITH_N_ARGS:8,BINARY_OPERATOR_LOW_PRECENDENCE:9,BINARY_OPERATOR_PERMUTATION:10,COMMA:11,EVALUATED_FUNCTION:12,EVALUATED_FUNCTION_PARAMETER:13,SPACE:14},_e.addToken=function(t){for(var e=0;e<t.length;e++){var n=t[e].token.length,r=-1;t[e].type===_e.tokenTypes.FUNCTION_WITH_N_ARGS&&void 0===t[e].numberOfArguments&&(t[e].numberOfArguments=2),De[n]=De[n]||[];for(var i=0;i<De[n].length;i++)if(t[e].token===De[n][i]){r=ze(De[n][i],Ce);break}-1===r?(Ce.push(t[e]),t[e].precedence=Pe[t[e].type],De.length<=t[e].token.length&&(De[t[e].token.length]=[]),De[t[e].token.length].push(t[e].token)):(Ce[r]=t[e],t[e].precedence=Pe[t[e].type])}};var Ye={value:_e.math.changeSign,type:0,pre:21,show:"-"},We={value:")",show:")",type:5,pre:0},qe={value:"(",type:4,pre:0,show:"("};_e.lex=function(t,e){var n,r=[qe],i=[],o=t,a=Fe,u=0,s=Ue,l="";void 0!==e&&_e.addToken(e);var h={},c=He(o);for(n=0;n<c.length;n++){var f=c[n];if(14!==f.type){var p,d=f.token,v=f.type,g=f.value,y=f.precedence,m=f.show,w=r[r.length-1];for(p=i.length;p--&&0===i[p];)if(-1!==[0,2,3,4,5,9,11,12,13].indexOf(v)){if(!0!==a[v])throw new _e.Exception(d+" is not allowed after "+l);r.push(We),a=Se,s=Ie,i.pop()}if(!0!==a[v])throw new _e.Exception(d+" is not allowed after "+l);if(!0===s[v]&&(v=2,g=_e.math.mul,m="&times;",y=3,n-=1),h={value:g,type:v,pre:y,show:m,numberOfArguments:f.numberOfArguments},0===v)a=Fe,s=Ue,Ee(i,2),r.push(h),4!==c[n+1].type&&(r.push(qe),i.push(2));else if(1===v)1===w.type?(w.value+=g,Ee(i,1)):r.push(h),a=Se,s=je;else if(2===v)a=Fe,s=Ue,Ee(i,2),r.push(h);else if(3===v)r.push(h),a=Se,s=Ie;else if(4===v)Ee(i,1),u++,a=Fe,s=Ue,r.push(h);else if(5===v){if(!u)throw new _e.Exception("Closing parenthesis are more than opening one, wait What!!!");u--,a=Se,s=Ie,r.push(h),Ee(i,1)}else if(6===v){if(w.hasDec)throw new _e.Exception("Two decimals are not allowed in one number");1!==w.type&&(w={value:0,type:1,pre:0},r.push(w)),a=Re,Ee(i,1),s=Ue,w.value+=g,w.hasDec=!0}else 7===v&&(a=Se,s=Ie,Ee(i,1),r.push(h));8===v?(a=Fe,s=Ue,Ee(i,f.numberOfArguments+2),r.push(h),4!==c[n+1].type&&(r.push(qe),i.push(f.numberOfArguments+2))):9===v?(9===w.type?w.value===_e.math.add?(w.value=g,w.show=m,Ee(i,1)):w.value===_e.math.sub&&"-"===m&&(w.value=_e.math.add,w.show="+",Ee(i,1)):5!==w.type&&7!==w.type&&1!==w.type&&3!==w.type&&13!==w.type?"-"===d&&(a=Fe,s=Ue,Ee(i,2).push(2),r.push(Ye),r.push(qe)):(r.push(h),Ee(i,2)),a=Fe,s=Ue):10===v?(a=Fe,s=Ue,Ee(i,2),r.push(h)):11===v?(a=Fe,s=Ue,r.push(h)):12===v?(a=Fe,s=Ue,Ee(i,6),r.push(h),4!==c[n+1].type&&(r.push(qe),i.push(6))):13===v&&(a=Se,s=Ie,r.push(h)),Ee(i,-1),l=d}else if(n>0&&n<c.length-1&&1===c[n+1].type&&(1===c[n-1].type||6===c[n-1].type))throw new _e.Exception("Unexpected Space")}for(p=i.length;p--;)r.push(We);if(!0!==a[5])throw new _e.Exception("complete the expression");for(;u--;)r.push(We);return r.push(We),new _e(r)};var Be=_e;Be.prototype.toPostfix=function(){for(var t,e,n,r,i,o=[],a=[{value:"(",type:4,pre:0}],u=this.value,s=1;s<u.length;s++)if(1===u[s].type||3===u[s].type||13===u[s].type)1===u[s].type&&(u[s].value=Number(u[s].value)),o.push(u[s]);else if(4===u[s].type)a.push(u[s]);else if(5===u[s].type)for(;4!==(e=a.pop()).type;)o.push(e);else if(11===u[s].type){for(;4!==(e=a.pop()).type;)o.push(e);a.push(e)}else{r=(t=u[s]).pre,n=(i=a[a.length-1]).pre;var l="Math.pow"==i.value&&"Math.pow"==t.value;if(r>n)a.push(t);else{for(;n>=r&&!l||l&&r<n;)e=a.pop(),i=a[a.length-1],o.push(e),n=i.pre,l="Math.pow"==t.value&&"Math.pow"==i.value;a.push(t)}}return new Be(o)};var $e=Be;$e.prototype.postfixEval=function(t){(t=t||{}).PI=Math.PI,t.E=Math.E;for(var e,n,r,i=[],o=this.value,a=void 0!==t.n,u=0;u<o.length;u++)if(1===o[u].type)i.push({value:o[u].value,type:1});else if(3===o[u].type)i.push({value:t[o[u].value],type:1});else if(0===o[u].type)void 0===i[i.length-1].type?i[i.length-1].value.push(o[u]):i[i.length-1].value=o[u].value(i[i.length-1].value);else if(7===o[u].type)void 0===i[i.length-1].type?i[i.length-1].value.push(o[u]):i[i.length-1].value=o[u].value(i[i.length-1].value);else if(8===o[u].type){for(var s=[],l=0;l<o[u].numberOfArguments;l++)s.push(i.pop().value);i.push({type:1,value:o[u].value.apply(o[u],s.reverse())})}else 10===o[u].type?(e=i.pop(),void 0===(n=i.pop()).type?(n.value=n.concat(e),n.value.push(o[u]),i.push(n)):void 0===e.type?(e.unshift(n),e.push(o[u]),i.push(e)):i.push({type:1,value:o[u].value(n.value,e.value)})):2===o[u].type||9===o[u].type?(e=i.pop(),void 0===(n=i.pop()).type?((n=n.concat(e)).push(o[u]),i.push(n)):void 0===e.type?(e.unshift(n),e.push(o[u]),i.push(e)):i.push({type:1,value:o[u].value(n.value,e.value)})):12===o[u].type?(void 0!==(e=i.pop()).type&&(e=[e]),n=i.pop(),r=i.pop(),i.push({type:1,value:o[u].value(r.value,n.value,new $e(e))})):13===o[u].type&&(a?i.push({value:t[o[u].value],type:3}):i.push([o[u]]));if(i.length>1)throw new $e.Exception("Uncaught Syntax error");return i[0].value>1e15?"Infinity":parseFloat(i[0].value.toFixed(15))},$e.eval=function(t,e,n){return void 0===e?this.lex(t).toPostfix().postfixEval():void 0===n?void 0!==e.length?this.lex(t,e).toPostfix().postfixEval():this.lex(t).toPostfix().postfixEval(e):this.lex(t,e).toPostfix().postfixEval(n)};var Ge=$e;Ge.prototype.formulaEval=function(){for(var t,e,n,r=[],i=this.value,o=0;o<i.length;o++)1===i[o].type||3===i[o].type?r.push({value:3===i[o].type?i[o].show:i[o].value,type:1}):13===i[o].type?r.push({value:i[o].show,type:1}):0===i[o].type?r[r.length-1]={value:i[o].show+("-"!=i[o].show?"(":"")+r[r.length-1].value+("-"!=i[o].show?")":""),type:0}:7===i[o].type?r[r.length-1]={value:(1!=r[r.length-1].type?"(":"")+r[r.length-1].value+(1!=r[r.length-1].type?")":"")+i[o].show,type:7}:10===i[o].type?(t=r.pop(),e=r.pop(),"P"===i[o].show||"C"===i[o].show?r.push({value:"<sup>"+e.value+"</sup>"+i[o].show+"<sub>"+t.value+"</sub>",type:10}):r.push({value:(1!=e.type?"(":"")+e.value+(1!=e.type?")":"")+"<sup>"+t.value+"</sup>",type:1})):2===i[o].type||9===i[o].type?(t=r.pop(),e=r.pop(),r.push({value:(1!=e.type?"(":"")+e.value+(1!=e.type?")":"")+i[o].show+(1!=t.type?"(":"")+t.value+(1!=t.type?")":""),type:i[o].type})):12===i[o].type&&(t=r.pop(),e=r.pop(),n=r.pop(),r.push({value:i[o].show+"("+n.value+","+e.value+","+t.value+")",type:12}));return r[0].value};var Ve,Ze=ve,Je=Oe,Xe=Ge,Ke=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,Qe=function(t,e){function n(t,r,i){if(Ve++>100)throw Ve=0,new Error("Call stack overflow for "+i);if(""===t)throw new Error(r+"(): '"+i+"' must contain a non-whitespace string");t=function(t,e){t=t.replace(/((?:\-[a-z]+\-)?calc)/g,"");var r,i="",o=t;for(;r=Ke.exec(o);){r[0].index>0&&(i+=o.substring(0,r[0].index));var a=Ze("(",")",o.substring([0].index));if(""===a.body)throw new Error("'"+t+"' must contain a non-whitespace string");var u=n(a.body,"",e);i+=a.pre+u,o=a.post}return i+o}(t,i);var o=function(t){var e=[],n=[],r=/[\.0-9]([%a-z]+)/gi,i=r.exec(t);for(;i;)i&&i[1]&&(-1===n.indexOf(i[1].toLowerCase())&&(e.push(i[1]),n.push(i[1].toLowerCase())),i=r.exec(t));return e}(t);if(o.length>1||t.indexOf("var(")>-1)return r+"("+t+")";var a=o[0]||"";"%"===a&&(t=t.replace(/\b[0-9\.]+%/g,function(t){return.01*parseFloat(t.slice(0,-1))}));var u,s=t.replace(new RegExp(a,"gi"),"");try{u=Xe.eval(s)}catch(e){return r+"("+t+")"}return"%"===a&&(u*=100),(r.length||"%"===a)&&(u=Math.round(u*e)/e),u+=a}return Ve=0,e=Math.pow(10,void 0===e?5:e),t=t.replace(/\n+/g," "),Je(t,/((?:\-[a-z]+\-)?calc)\(/,n)};var tn="object"==typeof s&&s&&s.Object===Object&&s,en="object"==typeof self&&self&&self.Object===Object&&self,nn=tn||en||Function("return this")(),rn=nn.Symbol,on=rn,an=Object.prototype,un=an.hasOwnProperty,sn=an.toString,ln=on?on.toStringTag:void 0;var hn=function(t){var e=un.call(t,ln),n=t[ln];try{t[ln]=void 0;var r=!0}catch(t){}var i=sn.call(t);return r&&(e?t[ln]=n:delete t[ln]),i},cn=Object.prototype.toString;var fn=hn,pn=function(t){return cn.call(t)},dn=rn?rn.toStringTag:void 0;var vn=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},gn=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":dn&&dn in Object(t)?fn(t):pn(t)},yn=vn;var mn,wn=function(t){if(!yn(t))return!1;var e=gn(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},bn=nn["__core-js_shared__"],xn=(mn=/[^.]+$/.exec(bn&&bn.keys&&bn.keys.IE_PROTO||""))?"Symbol(src)_1."+mn:"";var kn=function(t){return!!xn&&xn in t},Mn=Function.prototype.toString;var On=wn,Tn=kn,Nn=vn,_n=function(t){if(null!=t){try{return Mn.call(t)}catch(t){}try{return t+""}catch(t){}}return""},En=/^\[object .+?Constructor\]$/,Cn=Function.prototype,Pn=Object.prototype,An=Cn.toString,Fn=Pn.hasOwnProperty,Sn=RegExp("^"+An.call(Fn).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var jn=function(t){return!(!Nn(t)||Tn(t))&&(On(t)?Sn:En).test(_n(t))},Un=function(t,e){return null==t?void 0:t[e]};var In=function(t,e){var n=Un(t,e);return jn(n)?n:void 0},Rn=In(Object,"create"),Dn=Rn;var Ln=function(){this.__data__=Dn?Dn(null):{},this.size=0};var zn=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Hn=Rn,Yn=Object.prototype.hasOwnProperty;var Wn=function(t){var e=this.__data__;if(Hn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Yn.call(e,t)?e[t]:void 0},qn=Rn,Bn=Object.prototype.hasOwnProperty;var $n=Rn;var Gn=Ln,Vn=zn,Zn=Wn,Jn=function(t){var e=this.__data__;return qn?void 0!==e[t]:Bn.call(e,t)},Xn=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=$n&&void 0===e?"__lodash_hash_undefined__":e,this};function Kn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Kn.prototype.clear=Gn,Kn.prototype.delete=Vn,Kn.prototype.get=Zn,Kn.prototype.has=Jn,Kn.prototype.set=Xn;var Qn=Kn;var tr=function(){this.__data__=[],this.size=0};var er=function(t,e){return t===e||t!=t&&e!=e};var nr=function(t,e){for(var n=t.length;n--;)if(er(t[n][0],e))return n;return-1},rr=nr,ir=Array.prototype.splice;var or=nr;var ar=nr;var ur=nr;var sr=tr,lr=function(t){var e=this.__data__,n=rr(e,t);return!(n<0)&&(n==e.length-1?e.pop():ir.call(e,n,1),--this.size,!0)},hr=function(t){var e=this.__data__,n=or(e,t);return n<0?void 0:e[n][1]},cr=function(t){return ar(this.__data__,t)>-1},fr=function(t,e){var n=this.__data__,r=ur(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function pr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}pr.prototype.clear=sr,pr.prototype.delete=lr,pr.prototype.get=hr,pr.prototype.has=cr,pr.prototype.set=fr;var dr=pr,vr=In(nn,"Map"),gr=Qn,yr=dr,mr=vr;var wr=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var br=function(t,e){var n=t.__data__;return wr(e)?n["string"==typeof e?"string":"hash"]:n.map},xr=br;var kr=br;var Mr=br;var Or=br;var Tr=function(){this.size=0,this.__data__={hash:new gr,map:new(mr||yr),string:new gr}},Nr=function(t){var e=xr(this,t).delete(t);return this.size-=e?1:0,e},_r=function(t){return kr(this,t).get(t)},Er=function(t){return Mr(this,t).has(t)},Cr=function(t,e){var n=Or(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Pr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Pr.prototype.clear=Tr,Pr.prototype.delete=Nr,Pr.prototype.get=_r,Pr.prototype.has=Er,Pr.prototype.set=Cr;var Ar=Pr;function Fr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Fr.Cache||Ar),n}Fr.Cache=Ar;var Sr="__react_svg_text_measurement_id";var jr=Fr(function(t,e){try{var n=document.getElementById(Sr);if(!n){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("aria-hidden","true"),r.style.width="0",r.style.height="0",r.style.position="absolute",r.style.top="-100%",r.style.left="-100%",(n=document.createElementNS("http://www.w3.org/2000/svg","text")).setAttribute("id",Sr),r.appendChild(n),document.body.appendChild(r)}return Object.assign(n.style,e),n.textContent=t,n.getComputedTextLength()}catch(t){return null}},function(t,e){return t+"_"+JSON.stringify(e)}),Ur=["verticalAnchor","scaleToFit","angle","width","lineHeight","capHeight","children","style"];function Ir(t){return"number"==typeof t}function Rr(t){return"number"==typeof t&&Number.isFinite(t)||"string"==typeof t}function Dr(t){var e=t.verticalAnchor,r=void 0===e?"end":e,i=t.scaleToFit,o=void 0!==i&&i,a=t.angle,u=t.width,s=t.lineHeight,l=void 0===s?"1em":s,h=t.capHeight,c=void 0===h?"0.71em":h,f=t.children,p=t.style,d=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,Ur),v=d.x,g=void 0===v?0:v,y=d.y,m=void 0===y?0:y,w=!Rr(g)||!Rr(m),b=n(function(){return{wordsWithWidth:(null==f?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/)).map(function(t){return{word:t,wordWidth:jr(t,p)||0}}),spaceWidth:jr(" ",p)||0}},[f,p]),x=b.wordsWithWidth,k=b.spaceWidth,M=n(function(){return w?[]:u||o?x.reduce(function(t,e){var n=e.word,r=e.wordWidth,i=t[t.length-1];if(i&&(null==u||o||(i.width||0)+r+k<u))i.words.push(n),i.width=i.width||0,i.width+=r+k;else{var a={words:[n],width:r};t.push(a)}return t},[]):[{words:null==f?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/)}]},[w,u,o,f,x,k]),O=n(function(){return w?"":Qe("start"===r?"calc("+c+")":"middle"===r?"calc("+(M.length-1)/2+" * -"+l+" + ("+c+" / 2))":"calc("+(M.length-1)+" * -"+l+")")},[w,r,c,M.length,l]),T=n(function(){var t=[];if(w)return"";if(Ir(g)&&Ir(m)&&Ir(u)&&o&&M.length>0){var e=M[0].width||1,n="shrink-only"===o?Math.min(u/e,1):u/e,r=n,i=g-n*g,s=m-r*m;t.push("matrix("+n+", 0, 0, "+r+", "+i+", "+s+")")}return a&&t.push("rotate("+a+", "+g+", "+m+")"),t.length>0?t.join(" "):""},[w,g,m,u,o,M,a]);return{wordsByLines:M,startDy:O,transform:T}}var Lr=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function zr(){return zr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},zr.apply(this,arguments)}var Hr={overflow:"visible"};function Yr(t){var n=t.dx,r=void 0===n?0:n,i=t.dy,o=void 0===i?0:i,a=t.textAnchor,u=void 0===a?"start":a,s=t.innerRef,l=t.innerTextRef;t.verticalAnchor,t.angle;var h=t.lineHeight,c=void 0===h?"1em":h;t.scaleToFit,t.capHeight,t.width;var f=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,Lr),p=f.x,d=void 0===p?0:p,v=f.fontSize,g=Dr(t),y=g.wordsByLines,m=g.startDy,w=g.transform;return e.createElement("svg",{ref:s,x:r,y:o,fontSize:v,style:Hr},y.length>0?e.createElement("text",zr({ref:l,transform:w},f,{textAnchor:u}),y.map(function(t,n){return e.createElement("tspan",{key:n,x:d,dy:0===n?m:c},t.words.join(" "))})):null)}var Wr="top",qr="left",Br="bottom";function $r(){return $r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},$r.apply(this,arguments)}function Gr(t){var n=t.hideTicks,r=t.horizontal,i=t.orientation,o=t.tickClassName,s=t.tickComponent,l=t.tickLabelProps,h=t.tickStroke,c=void 0===h?"#222":h,f=t.tickTransform,p=t.ticks,d=t.strokeWidth,v=t.tickLineProps;return p.map(function(t){var h,p=t.value,g=t.index,y=t.from,m=t.to,w=t.formattedValue,b=null!=(h=l[g])?h:{},x=Math.max(10,"number"==typeof b.fontSize&&b.fontSize||0),k=m.y+(r&&i!==Wr?x:0);return e.createElement(u,{key:"visx-tick-"+p+"-"+g,className:a("visx-axis-tick",o),transform:f},!n&&e.createElement(de,$r({from:y,to:m,stroke:c,strokeWidth:d,strokeLinecap:"square"},v)),s?s($r({},b,{x:m.x,y:k,formattedValue:w})):e.createElement(Yr,$r({x:m.x,y:k},b),w))})}function Vr(){return Vr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Vr.apply(this,arguments)}var Zr={textAnchor:"middle",fontFamily:"Arial",fontSize:10,fill:"#222"};function Jr(t){var n=t.axisFromPoint,r=t.axisLineClassName,i=t.axisToPoint,o=t.hideAxisLine,u=t.hideTicks,s=t.horizontal,l=t.label,h=void 0===l?"":l,c=t.labelClassName,f=t.labelOffset,p=void 0===f?14:f,d=t.labelProps,v=void 0===d?Zr:d,g=t.orientation,y=void 0===g?Br:g,m=t.scale,w=t.stroke,b=void 0===w?"#222":w,x=t.strokeDasharray,k=t.strokeWidth,M=void 0===k?1:k,O=t.tickClassName,T=t.tickComponent,N=t.tickLineProps,_=t.tickLabelProps,E=void 0===_?function(){return Zr}:_,C=t.tickLength,P=void 0===C?8:C,A=t.tickStroke,F=void 0===A?"#222":A,S=t.tickTransform,j=t.ticks,U=t.ticksComponent,I=void 0===U?Gr:U,R=j.map(function(t){var e=t.value,n=t.index;return E(e,n,j)}),D=Math.max.apply(Math,[10].concat(R.map(function(t){return"number"==typeof t.fontSize?t.fontSize:0})));return e.createElement(e.Fragment,null,I({hideTicks:u,horizontal:s,orientation:y,scale:m,tickClassName:O,tickComponent:T,tickLabelProps:R,tickStroke:F,tickTransform:S,ticks:j,strokeWidth:M,tickLineProps:N}),!o&&e.createElement(de,{className:a("visx-axis-line",r),from:n,to:i,stroke:b,strokeWidth:M,strokeDasharray:x}),h&&e.createElement(Yr,Vr({className:a("visx-axis-label",c)},function(t){var e,n,r,i=t.labelOffset,o=t.labelProps,a=t.orientation,u=t.range,s=t.tickLabelFontSize,l=t.tickLength,h=a===qr||a===Wr?-1:1;if(a===Wr||a===Br){var c=a===Br&&"number"==typeof o.fontSize?o.fontSize:0;e=(Number(u[0])+Number(u[u.length-1]))/2,n=h*(l+i+s+c)}else e=h*((Number(u[0])+Number(u[u.length-1]))/2),n=-(l+i),r="rotate("+90*h+")";return{x:e,y:n,transform:r}}({labelOffset:p,labelProps:v,orientation:y,range:m.range(),tickLabelFontSize:D,tickLength:P}),v),h))}function Xr(t,e){var n=t.x,r=t.y;return new i(e?{x:n,y:r}:{x:r,y:n})}function Kr(){return Kr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Kr.apply(this,arguments)}var Qr=["children","axisClassName","hideAxisLine","hideTicks","hideZero","left","numTicks","orientation","rangePadding","scale","tickFormat","tickLength","tickValues","top"];function ti(){return ti=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ti.apply(this,arguments)}function ei(t){var n,r=t.children,i=void 0===r?Jr:r,o=t.axisClassName,s=t.hideAxisLine,l=void 0!==s&&s,h=t.hideTicks,c=void 0!==h&&h,f=t.hideZero,p=void 0!==f&&f,d=t.left,v=void 0===d?0:d,g=t.numTicks,y=void 0===g?10:g,m=t.orientation,w=void 0===m?Br:m,b=t.rangePadding,x=void 0===b?0:b,k=t.scale,M=t.tickFormat,O=t.tickLength,T=void 0===O?8:O,N=t.tickValues,_=t.top,E=void 0===_?0:_,C=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,Qr),P=null!=M?M:function(t){return"tickFormat"in t?t.tickFormat():ce}(k),A=w===qr,F=w===Wr,S=F||w===Br,j=function(t,e){void 0===e&&(e="center");var n=t;if("start"!==e&&"bandwidth"in n){var r=n.bandwidth();return"center"===e&&(r/=2),n.round()&&(r=Math.round(r)),function(t){var e=n(t);return"number"==typeof e?e+r:e}}return t}(k),U=A||F?-1:1,I=k.range(),R=(void 0===(n=x)&&(n=0),"number"==typeof n?{start:n,end:n}:Kr({start:0,end:0},n)),D=Xr({x:Number(I[0])+.5-R.start,y:0},S),L=Xr({x:Number(I[I.length-1])+.5+R.end,y:0},S),z=(null!=N?N:function(t,e){var n=t;return"ticks"in n?n.ticks(e):n.domain().filter(function(t,n,r){return null==e||r.length<=e||n%Math.round((r.length-1)/e)===0})}(k,y)).filter(function(t){return!p||0!==t&&"0"!==t}).map(function(t,e){return{value:t,index:e}}),H=z.map(function(t){var e=t.value,n=t.index,r=function(t){if(("function"==typeof t||"object"==typeof t&&t)&&"valueOf"in t){var e=t.valueOf();if("number"==typeof e)return e}return t}(j(e));return{value:e,index:n,from:Xr({x:r,y:0},S),to:Xr({x:r,y:T*U},S),formattedValue:P(e,n,z)}});return e.createElement(u,{className:a("visx-axis",o),top:E,left:v},i(ti({},C,{axisFromPoint:D,axisToPoint:L,hideAxisLine:l,hideTicks:c,hideZero:p,horizontal:S,numTicks:y,orientation:w,rangePadding:x,scale:k,tickFormat:P,tickLength:T,tickPosition:j,tickSign:U,ticks:H})))}var ni=["axisClassName","labelOffset","tickLabelProps","tickLength"];function ri(){return ri=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ri.apply(this,arguments)}var ii=function(){return{dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"}};function oi(t){var n=t.axisClassName,r=t.labelOffset,i=void 0===r?8:r,o=t.tickLabelProps,u=void 0===o?ii:o,s=t.tickLength,l=void 0===s?8:s,h=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,ni);return e.createElement(ei,ri({axisClassName:a("visx-axis-bottom",n),labelOffset:i,orientation:Br,tickLabelProps:u,tickLength:l},h))}var ai=f