=o){var g=c?null:i(s);if(g)return a(g);y=!1,h=n,d=new e}else d=c?[]:v;e:for(;++l=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function SS(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function AS(e){return e.value}function PS(e,t){if(A.isValidElement(e))return A.cloneElement(e,t);if(typeof e=="function")return A.createElement(e,t);t.ref;var r=_S(t,vS);return A.createElement(Zf,r)}var Dv=1,Zt=(function(e){function t(){var r;yS(this,t);for(var n=arguments.length,i=new Array(n),a=0;aDv||Math.abs(i.height-this.lastBoundingBox.height)>Dv)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?ft({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,u=i.verticalAlign,s=i.margin,c=i.chartWidth,f=i.chartHeight,l,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var p=this.getBBoxSnapshot();l={left:((c||0)-p.width)/2}}else l=o==="right"?{right:s&&s.right||0}:{left:s&&s.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(u==="middle"){var y=this.getBBoxSnapshot();h={top:((f||0)-y.height)/2}}else h=u==="bottom"?{bottom:s&&s.bottom||0}:{top:s&&s.top||0};return ft(ft({},l),h)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,u=i.height,s=i.wrapperStyle,c=i.payloadUniqBy,f=i.payload,l=ft(ft({position:"absolute",width:o||"auto",height:u||"auto"},this.getDefaultPosition(s)),s);return A.createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(p){n.wrapperNode=p}},PS(a,ft(ft({},this.props),{},{payload:S0(f,c,AS)})))}}],[{key:"getWithHeight",value:function(n,i){var a=ft(ft({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&L(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])})(N.PureComponent);qa(Zt,"displayName","Legend");qa(Zt,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Hs,qv;function TS(){if(qv)return Hs;qv=1;var e=ni(),t=Qf(),r=Le(),n=e?e.isConcatSpreadable:void 0;function i(a){return r(a)||t(a)||!!(n&&a&&a[n])}return Hs=i,Hs}var Ks,Lv;function T0(){if(Lv)return Ks;Lv=1;var e=v0(),t=TS();function r(n,i,a,o,u){var s=-1,c=n.length;for(a||(a=t),u||(u=[]);++s0&&a(f)?i>1?r(f,i-1,a,o,u):e(u,f):o||(u[u.length]=f)}return u}return Ks=r,Ks}var Gs,Bv;function jS(){if(Bv)return Gs;Bv=1;function e(t){return function(r,n,i){for(var a=-1,o=Object(r),u=i(r),s=u.length;s--;){var c=u[t?s:++a];if(n(o[c],c,o)===!1)break}return r}}return Gs=e,Gs}var Vs,Fv;function ES(){if(Fv)return Vs;Fv=1;var e=jS(),t=e();return Vs=t,Vs}var Xs,zv;function j0(){if(zv)return Xs;zv=1;var e=ES(),t=Da();function r(n,i){return n&&e(n,i,t)}return Xs=r,Xs}var Ys,Uv;function MS(){if(Uv)return Ys;Uv=1;var e=oi();function t(r,n){return function(i,a){if(i==null)return i;if(!e(i))return r(i,a);for(var o=i.length,u=n?o:-1,s=Object(i);(n?u--:++un||u&&s&&f&&!c&&!l||a&&s&&f||!i&&f||!o)return 1;if(!a&&!u&&!l&&r=c)return f;var l=i[a];return f*(l=="desc"?-1:1)}}return r.index-n.index}return tc=t,tc}var rc,Xv;function kS(){if(Xv)return rc;Xv=1;var e=Uf(),t=Wf(),r=lt(),n=E0(),i=$S(),a=m0(),o=IS(),u=Zr(),s=Le();function c(f,l,h){l.length?l=e(l,function(v){return s(v)?function(d){return t(d,v.length===1?v[0]:v)}:v}):l=[u];var p=-1;l=e(l,a(r));var y=n(f,function(v,d,g){var x=e(l,function(w){return w(v)});return{criteria:x,index:++p,value:v}});return i(y,function(v,d){return o(v,d,h)})}return rc=c,rc}var nc,Yv;function NS(){if(Yv)return nc;Yv=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return nc=e,nc}var ic,Zv;function RS(){if(Zv)return ic;Zv=1;var e=NS(),t=Math.max;function r(n,i,a){return i=t(i===void 0?n.length-1:i,0),function(){for(var o=arguments,u=-1,s=t(o.length-i,0),c=Array(s);++u0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return sc=n,sc}var cc,ry;function BS(){if(ry)return cc;ry=1;var e=qS(),t=LS(),r=t(e);return cc=r,cc}var lc,ny;function FS(){if(ny)return lc;ny=1;var e=Zr(),t=RS(),r=BS();function n(i,a){return r(t(i,a,e),i+"")}return lc=n,lc}var fc,iy;function La(){if(iy)return fc;iy=1;var e=Bf(),t=oi(),r=eh(),n=kt();function i(a,o,u){if(!n(u))return!1;var s=typeof o;return(s=="number"?t(u)&&r(o,u.length):s=="string"&&o in u)?e(u[o],a):!1}return fc=i,fc}var hc,ay;function zS(){if(ay)return hc;ay=1;var e=T0(),t=kS(),r=FS(),n=La(),i=r(function(a,o){if(a==null)return[];var u=o.length;return u>1&&n(a,o[0],o[1])?o=[]:u>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return hc=i,hc}var US=zS();const ih=ue(US);function Sn(e){"@babel/helpers - typeof";return Sn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sn(e)}function Ml(){return Ml=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(nn,"-left"),L(r)&&t&&L(t.x)&&r=t.y),"".concat(nn,"-top"),L(n)&&t&&L(t.y)&&nv?Math.max(f,s[n]):Math.max(l,s[n])}function iA(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function aA(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,u=e.useTranslate3d,s=e.viewBox,c,f,l;return o.height>0&&o.width>0&&r?(f=sy({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:s,viewBoxDimension:s.width}),l=sy({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:s,viewBoxDimension:s.height}),c=iA({translateX:f,translateY:l,useTranslate3d:u})):c=rA,{cssProperties:c,cssClasses:nA({translateX:f,translateY:l,coordinate:r})}}function Pr(e){"@babel/helpers - typeof";return Pr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pr(e)}function cy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ly(e){for(var t=1;tfy||Math.abs(n.height-this.state.lastBoundingBox.height)>fy)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,u=i.animationDuration,s=i.animationEasing,c=i.children,f=i.coordinate,l=i.hasPayload,h=i.isAnimationActive,p=i.offset,y=i.position,v=i.reverseDirection,d=i.useTranslate3d,g=i.viewBox,x=i.wrapperStyle,w=aA({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:p,position:y,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:d,viewBox:g}),O=w.cssClasses,m=w.cssProperties,b=ly(ly({transition:h&&a?"transform ".concat(u,"ms ").concat(s):void 0},m),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&l?"visible":"hidden",position:"absolute",top:0,left:0},x);return A.createElement("div",{tabIndex:-1,className:O,style:b,ref:function(S){n.wrapperNode=S}},c)}}])})(N.PureComponent),vA=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Jr={isSsr:vA()};function Tr(e){"@babel/helpers - typeof";return Tr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tr(e)}function hy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dy(e){for(var t=1;t0;return A.createElement(pA,{allowEscapeViewBox:o,animationDuration:u,animationEasing:s,isAnimationActive:h,active:a,coordinate:f,hasPayload:b,offset:p,position:d,reverseDirection:g,useTranslate3d:x,viewBox:w,wrapperStyle:O},AA(c,dy(dy({},this.props),{},{payload:m})))}}])})(N.PureComponent);ah(Ue,"displayName","Tooltip");ah(Ue,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Jr.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var pc,py;function PA(){if(py)return pc;py=1;var e=ct(),t=function(){return e.Date.now()};return pc=t,pc}var vc,vy;function TA(){if(vy)return vc;vy=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return vc=t,vc}var yc,yy;function jA(){if(yy)return yc;yy=1;var e=TA(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return yc=r,yc}var mc,my;function N0(){if(my)return mc;my=1;var e=jA(),t=kt(),r=Xr(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,u=parseInt;function s(c){if(typeof c=="number")return c;if(r(c))return n;if(t(c)){var f=typeof c.valueOf=="function"?c.valueOf():c;c=t(f)?f+"":f}if(typeof c!="string")return c===0?c:+c;c=e(c);var l=a.test(c);return l||o.test(c)?u(c.slice(2),l?2:8):i.test(c)?n:+c}return mc=s,mc}var gc,gy;function EA(){if(gy)return gc;gy=1;var e=kt(),t=PA(),r=N0(),n="Expected a function",i=Math.max,a=Math.min;function o(u,s,c){var f,l,h,p,y,v,d=0,g=!1,x=!1,w=!0;if(typeof u!="function")throw new TypeError(n);s=r(s)||0,e(c)&&(g=!!c.leading,x="maxWait"in c,h=x?i(r(c.maxWait)||0,s):h,w="trailing"in c?!!c.trailing:w);function O(M){var I=f,C=l;return f=l=void 0,d=M,p=u.apply(C,I),p}function m(M){return d=M,y=setTimeout(S,s),g?O(M):p}function b(M){var I=M-v,C=M-d,R=s-I;return x?a(R,h-C):R}function _(M){var I=M-v,C=M-d;return v===void 0||I>=s||I<0||x&&C>=h}function S(){var M=t();if(_(M))return P(M);y=setTimeout(S,b(M))}function P(M){return y=void 0,w&&f?O(M):(f=l=void 0,p)}function $(){y!==void 0&&clearTimeout(y),d=0,f=v=l=y=void 0}function j(){return y===void 0?p:P(t())}function T(){var M=t(),I=_(M);if(f=arguments,l=this,v=M,I){if(y===void 0)return m(v);if(x)return clearTimeout(y),y=setTimeout(S,s),O(v)}return y===void 0&&(y=setTimeout(S,s)),p}return T.cancel=$,T.flush=j,T}return gc=o,gc}var bc,by;function MA(){if(by)return bc;by=1;var e=EA(),t=kt(),r="Expected a function";function n(i,a,o){var u=!0,s=!0;if(typeof i!="function")throw new TypeError(r);return t(o)&&(u="leading"in o?!!o.leading:u,s="trailing"in o?!!o.trailing:s),e(i,a,{leading:u,maxWait:a,trailing:s})}return bc=n,bc}var $A=MA();const R0=ue($A);function Pn(e){"@babel/helpers - typeof";return Pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pn(e)}function xy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vi(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(M=R0(M,v,{trailing:!0,leading:!1}));var I=new ResizeObserver(M),C=m.current.getBoundingClientRect(),R=C.width,D=C.height;return j(R,D),I.observe(m.current),function(){I.disconnect()}},[j,v]);var T=N.useMemo(function(){var M=P.containerWidth,I=P.containerHeight;if(M<0||I<0)return null;nt(Gt(o)||Gt(s),`The width(%s) and height(%s) are both fixed numbers,
- maybe you don't need to use a ResponsiveContainer.`,o,s),nt(!r||r>0,"The aspect(%s) must be greater than zero.",r);var C=Gt(o)?M:o,R=Gt(s)?I:s;r&&r>0&&(C?R=C/r:R&&(C=R*r),h&&R>h&&(R=h)),nt(C>0||R>0,`The width(%s) and height(%s) of chart should be greater than 0,
- please check the style of container, or the props width(%s) and height(%s),
- or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
- height and width.`,C,R,o,s,f,l,r);var D=!Array.isArray(p)&&yt(p.type).endsWith("Chart");return A.Children.map(p,function(B){return A.isValidElement(B)?N.cloneElement(B,vi({width:C,height:R},D?{style:vi({height:"100%",width:"100%",maxHeight:R,maxWidth:C},B.props.style)}:{})):B})},[r,p,s,h,l,f,P,o]);return A.createElement("div",{id:d?"".concat(d):void 0,className:Q("recharts-responsive-container",g),style:vi(vi({},O),{},{width:o,height:s,minWidth:f,minHeight:l,maxHeight:h}),ref:m},T)}),Ba=function(t){return null};Ba.displayName="Cell";function Tn(e){"@babel/helpers - typeof";return Tn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tn(e)}function Oy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kl(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Jr.isSsr)return{width:0,height:0};var n=HA(r),i=JSON.stringify({text:t,copyStyle:n});if(fr.widthCache[i])return fr.widthCache[i];try{var a=document.getElementById(_y);a||(a=document.createElement("span"),a.setAttribute("id",_y),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=kl(kl({},WA),n);Object.assign(a.style,o),a.textContent="".concat(t);var u=a.getBoundingClientRect(),s={width:u.width,height:u.height};return fr.widthCache[i]=s,++fr.cacheCount>UA&&(fr.cacheCount=0,fr.widthCache={}),s}catch{return{width:0,height:0}}},KA=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function jn(e){"@babel/helpers - typeof";return jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jn(e)}function Li(e,t){return YA(e)||XA(e,t)||VA(e,t)||GA()}function GA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VA(e,t){if(e){if(typeof e=="string")return Sy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Sy(e,t)}}function Sy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function lP(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function My(e,t){return pP(e)||dP(e,t)||hP(e,t)||fP()}function fP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hP(e,t){if(e){if(typeof e=="string")return $y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $y(e,t)}}function $y(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return C.reduce(function(R,D){var B=D.word,F=D.width,H=R[R.length-1];if(H&&(i==null||a||H.width+F+nD.width?R:D})};if(!f)return p;for(var v="…",d=function(C){var R=l.slice(0,C),D=B0({breakAll:c,style:s,children:R+v}).wordsWithComputedWidth,B=h(D),F=B.length>o||y(B).width>Number(i);return[F,B]},g=0,x=l.length-1,w=0,O;g<=x&&w<=l.length-1;){var m=Math.floor((g+x)/2),b=m-1,_=d(b),S=My(_,2),P=S[0],$=S[1],j=d(m),T=My(j,1),M=T[0];if(!P&&!M&&(g=m+1),P&&M&&(x=m-1),!P&&M){O=$;break}w++}return O||p},Cy=function(t){var r=ee(t)?[]:t.toString().split(L0);return[{words:r}]},yP=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,u=t.maxLines;if((r||n)&&!Jr.isSsr){var s,c,f=B0({breakAll:o,children:i,style:a});if(f){var l=f.wordsWithComputedWidth,h=f.spaceWidth;s=l,c=h}else return Cy(i);return vP({breakAll:o,children:i,maxLines:u,style:a},s,c,r,n)}return Cy(i)},Iy="#808080",rr=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,u=o===void 0?"1em":o,s=t.capHeight,c=s===void 0?"0.71em":s,f=t.scaleToFit,l=f===void 0?!1:f,h=t.textAnchor,p=h===void 0?"start":h,y=t.verticalAnchor,v=y===void 0?"end":y,d=t.fill,g=d===void 0?Iy:d,x=Ey(t,sP),w=N.useMemo(function(){return yP({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:l,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,l,x.style,x.width]),O=x.dx,m=x.dy,b=x.angle,_=x.className,S=x.breakAll,P=Ey(x,cP);if(!Se(n)||!Se(a))return null;var $=n+(L(O)?O:0),j=a+(L(m)?m:0),T;switch(v){case"start":T=xc("calc(".concat(c,")"));break;case"middle":T=xc("calc(".concat((w.length-1)/2," * -").concat(u," + (").concat(c," / 2))"));break;default:T=xc("calc(".concat(w.length-1," * -").concat(u,")"));break}var M=[];if(l){var I=w[0].width,C=x.width;M.push("scale(".concat((L(C)?C/I:1)/I,")"))}return b&&M.push("rotate(".concat(b,", ").concat($,", ").concat(j,")")),M.length&&(P.transform=M.join(" ")),A.createElement("text",Nl({},X(P,!0),{x:$,y:j,className:Q("recharts-text",_),textAnchor:p,fill:g.includes("url")?Iy:g}),w.map(function(R,D){var B=R.words.join(S?"":" ");return A.createElement("tspan",{x:$,dy:D===0?T:u,key:"".concat(B,"-").concat(D)},B)}))};function Ct(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function mP(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function oh(e){let t,r,n;e.length!==2?(t=Ct,r=(u,s)=>Ct(e(u),s),n=(u,s)=>e(u)-s):(t=e===Ct||e===mP?e:gP,r=e,n=e);function i(u,s,c=0,f=u.length){if(c>>1;r(u[l],s)<0?c=l+1:f=l}while(c>>1;r(u[l],s)<=0?c=l+1:f=l}while(cc&&n(u[l-1],s)>-n(u[l],s)?l-1:l}return{left:i,center:o,right:a}}function gP(){return 0}function F0(e){return e===null?NaN:+e}function*bP(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const xP=oh(Ct),ui=xP.right;oh(F0).center;class ky extends Map{constructor(t,r=_P){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Ny(this,t))}has(t){return super.has(Ny(this,t))}set(t,r){return super.set(wP(this,t),r)}delete(t){return super.delete(OP(this,t))}}function Ny({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function wP({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function OP({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function _P(e){return e!==null&&typeof e=="object"?e.valueOf():e}function SP(e=Ct){if(e===Ct)return z0;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function z0(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const AP=Math.sqrt(50),PP=Math.sqrt(10),TP=Math.sqrt(2);function Bi(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=AP?10:a>=PP?5:a>=TP?2:1;let u,s,c;return i<0?(c=Math.pow(10,-i)/o,u=Math.round(e*c),s=Math.round(t*c),u/ct&&--s,c=-c):(c=Math.pow(10,i)*o,u=Math.round(e/c),s=Math.round(t/c),u*ct&&--s),s0))return[];if(e===t)return[e];const n=t=i))return[];const u=a-i+1,s=new Array(u);if(n)if(o<0)for(let c=0;c=n)&&(r=n);return r}function Dy(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function U0(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?z0:SP(i);n>r;){if(n-r>600){const s=n-r+1,c=t-r+1,f=Math.log(s),l=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*l*(s-l)/s)*(c-s/2<0?-1:1),p=Math.max(r,Math.floor(t-c*l/s+h)),y=Math.min(n,Math.floor(t+(s-c)*l/s+h));U0(e,t,p,y,i)}const a=e[t];let o=r,u=n;for(an(e,r,t),i(e[n],a)>0&&an(e,r,n);o0;)--u}i(e[r],a)===0?an(e,r,u):(++u,an(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function an(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function jP(e,t,r){if(e=Float64Array.from(bP(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Dy(e);if(t>=1)return Ry(e);var n,i=(n-1)*t,a=Math.floor(i),o=Ry(U0(e,a).subarray(0,a+1)),u=Dy(e.subarray(a+1));return o+(u-o)*(i-a)}}function EP(e,t,r=F0){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),u=+r(e[a+1],a+1,e);return o+(u-o)*(i-a)}}function MP(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?mi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?mi(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=CP.exec(e))?new qe(t[1],t[2],t[3],1):(t=IP.exec(e))?new qe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=kP.exec(e))?mi(t[1],t[2],t[3],t[4]):(t=NP.exec(e))?mi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=RP.exec(e))?Wy(t[1],t[2]/100,t[3]/100,1):(t=DP.exec(e))?Wy(t[1],t[2]/100,t[3]/100,t[4]):qy.hasOwnProperty(e)?Fy(qy[e]):e==="transparent"?new qe(NaN,NaN,NaN,0):null}function Fy(e){return new qe(e>>16&255,e>>8&255,e&255,1)}function mi(e,t,r,n){return n<=0&&(e=t=r=NaN),new qe(e,t,r,n)}function BP(e){return e instanceof si||(e=Cn(e)),e?(e=e.rgb(),new qe(e.r,e.g,e.b,e.opacity)):new qe}function Bl(e,t,r,n){return arguments.length===1?BP(e):new qe(e,t,r,n??1)}function qe(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}sh(qe,Bl,H0(si,{brighter(e){return e=e==null?Fi:Math.pow(Fi,e),new qe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Mn:Math.pow(Mn,e),new qe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new qe(Jt(this.r),Jt(this.g),Jt(this.b),zi(this.opacity))},displayable(){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:zy,formatHex:zy,formatHex8:FP,formatRgb:Uy,toString:Uy}));function zy(){return`#${Vt(this.r)}${Vt(this.g)}${Vt(this.b)}`}function FP(){return`#${Vt(this.r)}${Vt(this.g)}${Vt(this.b)}${Vt((isNaN(this.opacity)?1:this.opacity)*255)}`}function Uy(){const e=zi(this.opacity);return`${e===1?"rgb(":"rgba("}${Jt(this.r)}, ${Jt(this.g)}, ${Jt(this.b)}${e===1?")":`, ${e})`}`}function zi(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Vt(e){return e=Jt(e),(e<16?"0":"")+e.toString(16)}function Wy(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new rt(e,t,r,n)}function K0(e){if(e instanceof rt)return new rt(e.h,e.s,e.l,e.opacity);if(e instanceof si||(e=Cn(e)),!e)return new rt;if(e instanceof rt)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,u=a-i,s=(a+i)/2;return u?(t===a?o=(r-n)/u+(r0&&s<1?0:o,new rt(o,u,s,e.opacity)}function zP(e,t,r,n){return arguments.length===1?K0(e):new rt(e,t,r,n??1)}function rt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}sh(rt,zP,H0(si,{brighter(e){return e=e==null?Fi:Math.pow(Fi,e),new rt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Mn:Math.pow(Mn,e),new rt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new qe(wc(e>=240?e-240:e+120,i,n),wc(e,i,n),wc(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new rt(Hy(this.h),gi(this.s),gi(this.l),zi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=zi(this.opacity);return`${e===1?"hsl(":"hsla("}${Hy(this.h)}, ${gi(this.s)*100}%, ${gi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Hy(e){return e=(e||0)%360,e<0?e+360:e}function gi(e){return Math.max(0,Math.min(1,e||0))}function wc(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const ch=e=>()=>e;function UP(e,t){return function(r){return e+r*t}}function WP(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function HP(e){return(e=+e)==1?G0:function(t,r){return r-t?WP(t,r,e):ch(isNaN(t)?r:t)}}function G0(e,t){var r=t-e;return r?UP(e,r):ch(isNaN(e)?t:e)}const Ky=(function e(t){var r=HP(t);function n(i,a){var o=r((i=Bl(i)).r,(a=Bl(a)).r),u=r(i.g,a.g),s=r(i.b,a.b),c=G0(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=u(f),i.b=s(f),i.opacity=c(f),i+""}}return n.gamma=e,n})(1);function KP(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;ir&&(a=t.slice(r,a),u[o]?u[o]+=a:u[++o]=a),(n=n[0])===(i=i[0])?u[o]?u[o]+=i:u[++o]=i:(u[++o]=null,s.push({i:o,x:Ui(n,i)})),r=Oc.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function nT(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?iT:nT,s=c=null,l}function l(h){return h==null||isNaN(h=+h)?a:(s||(s=u(e.map(n),t,r)))(n(o(h)))}return l.invert=function(h){return o(i((c||(c=u(t,e.map(n),Ui)))(h)))},l.domain=function(h){return arguments.length?(e=Array.from(h,Wi),f()):e.slice()},l.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},l.rangeRound=function(h){return t=Array.from(h),r=lh,f()},l.clamp=function(h){return arguments.length?(o=h?!0:Ne,f()):o!==Ne},l.interpolate=function(h){return arguments.length?(r=h,f()):r},l.unknown=function(h){return arguments.length?(a=h,l):a},function(h,p){return n=h,i=p,f()}}function fh(){return Fa()(Ne,Ne)}function aT(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Hi(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function jr(e){return e=Hi(Math.abs(e)),e?e[1]:NaN}function oT(e,t){return function(r,n){for(var i=r.length,a=[],o=0,u=e[0],s=0;i>0&&u>0&&(s+u+1>n&&(u=Math.max(1,n-s)),a.push(r.substring(i-=u,i+u)),!((s+=u+1)>n));)u=e[o=(o+1)%e.length];return a.reverse().join(t)}}function uT(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var sT=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function In(e){if(!(t=sT.exec(e)))throw new Error("invalid format: "+e);var t;return new hh({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}In.prototype=hh.prototype;function hh(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}hh.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function cT(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var Ki;function lT(e,t){var r=Hi(e,t);if(!r)return Ki=void 0,e.toPrecision(t);var n=r[0],i=r[1],a=i-(Ki=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Hi(e,Math.max(0,t+a-1))[0]}function Vy(e,t){var r=Hi(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const Xy={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:aT,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Vy(e*100,t),r:Vy,s:lT,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Yy(e){return e}var Zy=Array.prototype.map,Jy=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function fT(e){var t=e.grouping===void 0||e.thousands===void 0?Yy:oT(Zy.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?Yy:uT(Zy.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",s=e.nan===void 0?"NaN":e.nan+"";function c(l,h){l=In(l);var p=l.fill,y=l.align,v=l.sign,d=l.symbol,g=l.zero,x=l.width,w=l.comma,O=l.precision,m=l.trim,b=l.type;b==="n"?(w=!0,b="g"):Xy[b]||(O===void 0&&(O=12),m=!0,b="g"),(g||p==="0"&&y==="=")&&(g=!0,p="0",y="=");var _=(h&&h.prefix!==void 0?h.prefix:"")+(d==="$"?r:d==="#"&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),S=(d==="$"?n:/[%p]/.test(b)?o:"")+(h&&h.suffix!==void 0?h.suffix:""),P=Xy[b],$=/[defgprs%]/.test(b);O=O===void 0?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function j(T){var M=_,I=S,C,R,D;if(b==="c")I=P(T)+I,T="";else{T=+T;var B=T<0||1/T<0;if(T=isNaN(T)?s:P(Math.abs(T),O),m&&(T=cT(T)),B&&+T==0&&v!=="+"&&(B=!1),M=(B?v==="("?v:u:v==="-"||v==="("?"":v)+M,I=(b==="s"&&!isNaN(T)&&Ki!==void 0?Jy[8+Ki/3]:"")+I+(B&&v==="("?")":""),$){for(C=-1,R=T.length;++CD||D>57){I=(D===46?i+T.slice(C+1):T.slice(C))+I,T=T.slice(0,C);break}}}w&&!g&&(T=t(T,1/0));var F=M.length+T.length+I.length,H=F>1)+M+T+I+H.slice(F);break;default:T=H+M+T+I;break}return a(T)}return j.toString=function(){return l+""},j}function f(l,h){var p=Math.max(-8,Math.min(8,Math.floor(jr(h)/3)))*3,y=Math.pow(10,-p),v=c((l=In(l),l.type="f",l),{suffix:Jy[8+p/3]});return function(d){return v(y*d)}}return{format:c,formatPrefix:f}}var bi,dh,V0;hT({thousands:",",grouping:[3],currency:["$",""]});function hT(e){return bi=fT(e),dh=bi.format,V0=bi.formatPrefix,bi}function dT(e){return Math.max(0,-jr(Math.abs(e)))}function pT(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(jr(t)/3)))*3-jr(Math.abs(e)))}function vT(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,jr(t)-jr(e))+1}function X0(e,t,r,n){var i=ql(e,t,r),a;switch(n=In(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=pT(i,o))&&(n.precision=a),V0(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=vT(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=dT(i))&&(n.precision=a-(n.type==="%")*2);break}}return dh(n)}function Nt(e){var t=e.domain;return e.ticks=function(r){var n=t();return Rl(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return X0(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],u=n[a],s,c,f=10;for(u0;){if(c=Dl(o,u,r),c===s)return n[i]=o,n[a]=u,t(n);if(c>0)o=Math.floor(o/c)*c,u=Math.ceil(u/c)*c;else if(c<0)o=Math.ceil(o*c)/c,u=Math.floor(u*c)/c;else break;s=c}return e},e}function Gi(){var e=fh();return e.copy=function(){return ci(e,Gi())},Qe.apply(e,arguments),Nt(e)}function Y0(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Wi),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return Y0(e).unknown(t)},e=arguments.length?Array.from(e,Wi):[0,1],Nt(r)}function Z0(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return aMath.pow(e,t)}function xT(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function tm(e){return(t,r)=>-e(-t,r)}function ph(e){const t=e(Qy,em),r=t.domain;let n=10,i,a;function o(){return i=xT(n),a=bT(n),r()[0]<0?(i=tm(i),a=tm(a),e(yT,mT)):e(Qy,em),t}return t.base=function(u){return arguments.length?(n=+u,o()):n},t.domain=function(u){return arguments.length?(r(u),o()):r()},t.ticks=u=>{const s=r();let c=s[0],f=s[s.length-1];const l=f0){for(;h<=p;++h)for(y=1;yf)break;g.push(v)}}else for(;h<=p;++h)for(y=n-1;y>=1;--y)if(v=h>0?y/a(-h):y*a(h),!(vf)break;g.push(v)}g.length*2{if(u==null&&(u=10),s==null&&(s=n===10?"s":","),typeof s!="function"&&(!(n%1)&&(s=In(s)).precision==null&&(s.trim=!0),s=dh(s)),u===1/0)return s;const c=Math.max(1,n*u/t.ticks().length);return f=>{let l=f/a(Math.round(i(f)));return l*nr(Z0(r(),{floor:u=>a(Math.floor(i(u))),ceil:u=>a(Math.ceil(i(u)))})),t}function J0(){const e=ph(Fa()).domain([1,10]);return e.copy=()=>ci(e,J0()).base(e.base()),Qe.apply(e,arguments),e}function rm(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function nm(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function vh(e){var t=1,r=e(rm(t),nm(t));return r.constant=function(n){return arguments.length?e(rm(t=+n),nm(t)):t},Nt(r)}function Q0(){var e=vh(Fa());return e.copy=function(){return ci(e,Q0()).constant(e.constant())},Qe.apply(e,arguments)}function im(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function wT(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function OT(e){return e<0?-e*e:e*e}function yh(e){var t=e(Ne,Ne),r=1;function n(){return r===1?e(Ne,Ne):r===.5?e(wT,OT):e(im(r),im(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Nt(t)}function mh(){var e=yh(Fa());return e.copy=function(){return ci(e,mh()).exponent(e.exponent())},Qe.apply(e,arguments),e}function _T(){return mh.apply(null,arguments).exponent(.5)}function am(e){return Math.sign(e)*e*e}function ST(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function ex(){var e=fh(),t=[0,1],r=!1,n;function i(a){var o=ST(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(am(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Wi)).map(am)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return ex(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Qe.apply(i,arguments),Nt(i)}function tx(){var e=[],t=[],r=[],n;function i(){var o=0,u=Math.max(1,t.length);for(r=new Array(u-1);++o0?r[u-1]:e[0],u=r?[n[r-1],t]:[n[c-1],n[c]]},o.unknown=function(s){return arguments.length&&(a=s),o},o.thresholds=function(){return n.slice()},o.copy=function(){return rx().domain([e,t]).range(i).unknown(a)},Qe.apply(Nt(o),arguments)}function nx(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[ui(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return nx().domain(e).range(t).unknown(r)},Qe.apply(i,arguments)}const _c=new Date,Sc=new Date;function Ae(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),u=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,u)=>{const s=[];if(a=i.ceil(a),u=u==null?1:Math.floor(u),!(a