carconnect-gatherleads-ui-lib 3.7.0-GL-1521-Modulo-Rendimiento.2 → 3.7.0-GL-1521-Modulo-Rendimiento.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44680,6 +44680,7 @@ const Tle = ({
44680
44680
  {
44681
44681
  className: "fixed inset-0 flex items-center justify-center p-4",
44682
44682
  style: { zIndex: M + 1 },
44683
+ onClick: H,
44683
44684
  children: /* @__PURE__ */ A(
44684
44685
  "div",
44685
44686
  {
@@ -112,4 +112,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
112
112
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vie(e,t){if(e){if(typeof e=="string")return _0(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 _0(e,t)}}function zie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hie(e){if(Array.isArray(e))return _0(e)}function _0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kD(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,MD(n.key),n)}}function Yie(e,t,r){return t&&kD(e.prototype,t),r&&kD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Rie(e,t,r){return t=Tf(t),qie(e,ND()?Reflect.construct(t,r||[],Tf(e).constructor):t.apply(e,r))}function qie(e,t){if(t&&(vo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Uie(e)}function Uie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ND(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ND=function(){return!!e})()}function Tf(e){return Tf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Tf(e)}function Zie(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&T0(e,t)}function T0(e,t){return T0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},T0(e,t)}function Wr(e,t,r){return t=MD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MD(e){var t=Jie(e,"string");return vo(t)=="symbol"?t:t+""}function Jie(e,t){if(vo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cl=(function(e){function t(){var r;Xie(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Rie(this,t,[].concat(a)),Wr(r,"state",{isAnimationFinished:!0,totalLength:0}),Wr(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Wr(r,"getStrokeDasharray",function(o,s,l){var c=l.reduce(function(x,y){return x+y});if(!c)return r.generateSimpleStrokeDasharray(s,o);for(var f=Math.floor(o/c),u=o%c,d=s-o,h=[],g=0,p=0;g<l.length;p+=l[g],++g)if(p+l[g]>u){h=[].concat(yo(l.slice(0,g)),[u-p]);break}var m=h.length%2===0?[0,d]:[d];return[].concat(yo(t.repeat(l,f)),yo(h),m).map(function(x){return"".concat(x,"px")}).join(", ")}),Wr(r,"id",ra("recharts-line-")),Wr(r,"pathRef",function(o){r.mainCurve=o}),Wr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Wr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return Zie(t,e),Yie(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.points,s=i.xAxis,l=i.yAxis,c=i.layout,f=i.children,u=Xt(f,Zi);if(!u)return null;var d=function(p,m){return{x:p.x,y:p.y,value:p.value,errorVal:at(p.payload,m)}},h={clipPath:n?"url(#clipPath-".concat(a,")"):null};return A.createElement(Te,h,u.map(function(g){return A.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:o,xAxis:s,yAxis:l,layout:c,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,f=s.dataKey,u=ge(this.props,!1),d=ge(l,!0),h=c.map(function(p,m){var x=gr(gr(gr({key:"dot-".concat(m),r:3},u),d),{},{index:m,cx:p.x,cy:p.y,value:p.value,dataKey:f,payload:p.payload,points:c});return t.renderDotItem(l,x)}),g={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return A.createElement(Te,ll({className:"recharts-line-dots",key:"dots"},g),h)}},{key:"renderCurveStatically",value:function(n,a,i,o){var s=this.props,l=s.type,c=s.layout,f=s.connectNulls;s.ref;var u=_D(s,Fie),d=gr(gr(gr({},ge(u,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},o),{},{type:l,layout:c,connectNulls:f});return A.createElement(fa,ll({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.strokeDasharray,c=o.isAnimationActive,f=o.animationBegin,u=o.animationDuration,d=o.animationEasing,h=o.animationId,g=o.animateNewValues,p=o.width,m=o.height,x=this.state,y=x.prevPoints,w=x.totalLength;return A.createElement(Or,{begin:f,duration:u,isActive:c,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var b=S.t;if(y){var C=y.length/s.length,O=s.map(function(_,j){var $=Math.floor(j*C);if(y[$]){var N=y[$],D=lt(N.x,_.x),G=lt(N.y,_.y);return gr(gr({},_),{},{x:D(b),y:G(b)})}if(g){var V=lt(p*2,_.x),H=lt(m/2,_.y);return gr(gr({},_),{},{x:V(b),y:H(b)})}return gr(gr({},_),{},{x:_.x,y:_.y})});return i.renderCurveStatically(O,n,a)}var I=lt(0,w),E=I(b),k;if(l){var T="".concat(l).split(/[,\s]+/gim).map(function(_){return parseFloat(_)});k=i.getStrokeDasharray(E,w,T)}else k=i.generateSimpleStrokeDasharray(w,E);return i.renderCurveStatically(s,n,a,{strokeDasharray:k})})}},{key:"renderCurve",value:function(n,a){var i=this.props,o=i.points,s=i.isAnimationActive,l=this.state,c=l.prevPoints,f=l.totalLength;return s&&o&&o.length&&(!c&&f>0||!ca(c,o))?this.renderCurveWithAnimation(n,a):this.renderCurveStatically(o,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,l=a.className,c=a.xAxis,f=a.yAxis,u=a.top,d=a.left,h=a.width,g=a.height,p=a.isAnimationActive,m=a.id;if(i||!s||!s.length)return null;var x=this.state.isAnimationFinished,y=s.length===1,w=Ie("recharts-line",l),S=c&&c.allowDataOverflow,b=f&&f.allowDataOverflow,C=S||b,O=we(m)?this.id:m,I=(n=ge(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},E=I.r,k=E===void 0?3:E,T=I.strokeWidth,_=T===void 0?2:T,j=QI(o)?o:{},$=j.clipDot,N=$===void 0?!0:$,D=k*2+_;return A.createElement(Te,{className:w},S||b?A.createElement("defs",null,A.createElement("clipPath",{id:"clipPath-".concat(O)},A.createElement("rect",{x:S?d:d-h/2,y:b?u:u-g/2,width:S?h:h*2,height:b?g:g*2})),!N&&A.createElement("clipPath",{id:"clipPath-dots-".concat(O)},A.createElement("rect",{x:d-D/2,y:u-D/2,width:h+D,height:g+D}))):null,!y&&this.renderCurve(C,O),this.renderErrorBar(C,O),(y||o)&&this.renderDots(C,N,O),(!p||x)&&Ar.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,a){for(var i=n.length%2!==0?[].concat(yo(n),[0]):n,o=[],s=0;s<a;++s)o=[].concat(yo(o),yo(i));return o}},{key:"renderDotItem",value:function(n,a){var i;if(A.isValidElement(n))i=A.cloneElement(n,a);else if(Se(n))i=n(a);else{var o=a.key,s=_D(a,Lie),l=Ie("recharts-line-dot",typeof n!="boolean"?n.className:"");i=A.createElement(Ks,ll({key:o},s,{className:l}))}return i}}])})(A.PureComponent);Wr(cl,"displayName","Line"),Wr(cl,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Tn.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),Wr(cl,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,o=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,f=t.layout,u=l.map(function(d,h){var g=at(d,o);return f==="horizontal"?{x:Ki({axis:r,ticks:a,bandSize:s,entry:d,index:h}),y:we(g)?null:n.scale(g),value:g,payload:d}:{x:we(g)?null:r.scale(g),y:Ki({axis:n,ticks:i,bandSize:s,entry:d,index:h}),value:g,payload:d}});return gr({points:u,layout:f},c)});var Kie=["layout","type","stroke","connectNulls","isRange","ref"],Qie=["key"],DD;function bo(e){"@babel/helpers - typeof";return bo=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},bo(e)}function jD(e,t){if(e==null)return{};var r=eoe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function eoe(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 Za(){return Za=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Za.apply(this,arguments)}function $D(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function pa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$D(Object(r),!0).forEach(function(n){fn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$D(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function toe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BD(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,LD(n.key),n)}}function roe(e,t,r){return t&&BD(e.prototype,t),r&&BD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function noe(e,t,r){return t=kf(t),aoe(e,FD()?Reflect.construct(t,r||[],kf(e).constructor):t.apply(e,r))}function aoe(e,t){if(t&&(bo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ioe(e)}function ioe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FD=function(){return!!e})()}function kf(e){return kf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},kf(e)}function ooe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k0(e,t)}function k0(e,t){return k0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},k0(e,t)}function fn(e,t,r){return t=LD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LD(e){var t=soe(e,"string");return bo(t)=="symbol"?t:t+""}function soe(e,t){if(bo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ma=(function(e){function t(){var r;toe(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=noe(this,t,[].concat(a)),fn(r,"state",{isAnimationFinished:!0}),fn(r,"id",ra("recharts-area-")),fn(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Se(o)&&o()}),fn(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),Se(o)&&o()}),r}return ooe(t,e),roe(t,[{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var l=this.props,c=l.dot,f=l.points,u=l.dataKey,d=ge(this.props,!1),h=ge(c,!0),g=f.map(function(m,x){var y=pa(pa(pa({key:"dot-".concat(x),r:3},d),h),{},{index:x,cx:m.x,cy:m.y,dataKey:u,value:m.value,payload:m.payload,points:f});return t.renderDotItem(c,y)}),p={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return A.createElement(Te,Za({className:"recharts-area-dots"},p),g)}},{key:"renderHorizontalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,l=o[0].x,c=o[o.length-1].x,f=n*Math.abs(l-c),u=la(o.map(function(d){return d.y||0}));return se(i)&&typeof i=="number"?u=Math.max(i,u):i&&Array.isArray(i)&&i.length&&(u=Math.max(la(i.map(function(d){return d.y||0})),u)),se(u)?A.createElement("rect",{x:l<c?l:l-f,y:0,width:f,height:Math.floor(u+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,l=o[0].y,c=o[o.length-1].y,f=n*Math.abs(l-c),u=la(o.map(function(d){return d.x||0}));return se(i)&&typeof i=="number"?u=Math.max(i,u):i&&Array.isArray(i)&&i.length&&(u=Math.max(la(i.map(function(d){return d.x||0})),u)),se(u)?A.createElement("rect",{x:0,y:l<c?l:l-f,width:u+(s?parseInt("".concat(s),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(n){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,a,i,o){var s=this.props,l=s.layout,c=s.type,f=s.stroke,u=s.connectNulls,d=s.isRange;s.ref;var h=jD(s,Kie);return A.createElement(Te,{clipPath:i?"url(#clipPath-".concat(o,")"):null},A.createElement(fa,Za({},ge(h,!0),{points:n,connectNulls:u,type:c,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),f!=="none"&&A.createElement(fa,Za({},ge(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:u,fill:"none",points:n})),f!=="none"&&d&&A.createElement(fa,Za({},ge(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:u,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.baseLine,c=o.isAnimationActive,f=o.animationBegin,u=o.animationDuration,d=o.animationEasing,h=o.animationId,g=this.state,p=g.prevPoints,m=g.prevBaseLine;return A.createElement(Or,{begin:f,duration:u,isActive:c,easing:d,from:{t:0},to:{t:1},key:"area-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var y=x.t;if(p){var w=p.length/s.length,S=s.map(function(I,E){var k=Math.floor(E*w);if(p[k]){var T=p[k],_=lt(T.x,I.x),j=lt(T.y,I.y);return pa(pa({},I),{},{x:_(y),y:j(y)})}return I}),b;if(se(l)&&typeof l=="number"){var C=lt(m,l);b=C(y)}else if(we(l)||ki(l)){var O=lt(m,0);b=O(y)}else b=l.map(function(I,E){var k=Math.floor(E*w);if(m[k]){var T=m[k],_=lt(T.x,I.x),j=lt(T.y,I.y);return pa(pa({},I),{},{x:_(y),y:j(y)})}return I});return i.renderAreaStatically(S,b,n,a)}return A.createElement(Te,null,A.createElement("defs",null,A.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(y))),A.createElement(Te,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(s,l,n,a)))})}},{key:"renderArea",value:function(n,a){var i=this.props,o=i.points,s=i.baseLine,l=i.isAnimationActive,c=this.state,f=c.prevPoints,u=c.prevBaseLine,d=c.totalLength;return l&&o&&o.length&&(!f&&d>0||!ca(f,o)||!ca(u,s))?this.renderAreaWithAnimation(n,a):this.renderAreaStatically(o,s,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,l=a.className,c=a.top,f=a.left,u=a.xAxis,d=a.yAxis,h=a.width,g=a.height,p=a.isAnimationActive,m=a.id;if(i||!s||!s.length)return null;var x=this.state.isAnimationFinished,y=s.length===1,w=Ie("recharts-area",l),S=u&&u.allowDataOverflow,b=d&&d.allowDataOverflow,C=S||b,O=we(m)?this.id:m,I=(n=ge(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},E=I.r,k=E===void 0?3:E,T=I.strokeWidth,_=T===void 0?2:T,j=QI(o)?o:{},$=j.clipDot,N=$===void 0?!0:$,D=k*2+_;return A.createElement(Te,{className:w},S||b?A.createElement("defs",null,A.createElement("clipPath",{id:"clipPath-".concat(O)},A.createElement("rect",{x:S?f:f-h/2,y:b?c:c-g/2,width:S?h:h*2,height:b?g:g*2})),!N&&A.createElement("clipPath",{id:"clipPath-dots-".concat(O)},A.createElement("rect",{x:f-D/2,y:c-D/2,width:h+D,height:g+D}))):null,y?null:this.renderArea(C,O),(o||y)&&this.renderDots(C,N,O),(!p||x)&&Ar.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:n.points!==a.curPoints||n.baseLine!==a.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])})(A.PureComponent);DD=ma,fn(ma,"displayName","Area"),fn(ma,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Tn.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),fn(ma,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(se(s)&&typeof s=="number")return s;var l=a==="horizontal"?n:r,c=l.scale.domain();if(l.type==="number"){var f=Math.max(c[0],c[1]),u=Math.min(c[0],c[1]);return s==="dataMin"?u:s==="dataMax"||f<0?f:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]}),fn(ma,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,a=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,f=e.dataStartIndex,u=e.displayedData,d=e.offset,h=t.layout,g=c&&c.length,p=DD.getBaseValue(t,r,n,a),m=h==="horizontal",x=!1,y=u.map(function(S,b){var C;g?C=c[f+b]:(C=at(S,l),Array.isArray(C)?x=!0:C=[p,C]);var O=C[1]==null||g&&at(S,l)==null;return m?{x:Ki({axis:n,ticks:i,bandSize:s,entry:S,index:b}),y:O?null:a.scale(C[1]),value:C,payload:S}:{x:O?null:n.scale(C[1]),y:Ki({axis:a,ticks:o,bandSize:s,entry:S,index:b}),value:C,payload:S}}),w;return g||x?w=y.map(function(S){var b=Array.isArray(S.value)?S.value[0]:null;return m?{x:S.x,y:b!=null&&S.y!=null?a.scale(b):null}:{x:b!=null?n.scale(b):null,y:S.y}}):w=m?a.scale(p):n.scale(p),pa({points:y,baseLine:w,layout:h,isRange:x},d)}),fn(ma,"renderDotItem",function(e,t){var r;if(A.isValidElement(e))r=A.cloneElement(e,t);else if(Se(e))r=e(t);else{var n=Ie("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=jD(t,Qie);r=A.createElement(Ks,Za({},i,{key:a,className:n}))}return r});function xo(e){"@babel/helpers - typeof";return xo=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},xo(e)}function loe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function coe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,VD(n.key),n)}}function uoe(e,t,r){return t&&coe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function foe(e,t,r){return t=Nf(t),doe(e,GD()?Reflect.construct(t,r||[],Nf(e).constructor):t.apply(e,r))}function doe(e,t){if(t&&(xo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hoe(e)}function hoe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(GD=function(){return!!e})()}function Nf(e){return Nf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Nf(e)}function poe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N0(e,t)}function N0(e,t){return N0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},N0(e,t)}function WD(e,t,r){return t=VD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VD(e){var t=moe(e,"string");return xo(t)=="symbol"?t:t+""}function moe(e,t){if(xo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Mf=(function(e){function t(){return loe(this,t),foe(this,t,arguments)}return poe(t,e),uoe(t,[{key:"render",value:function(){return null}}])})(P.Component);WD(Mf,"displayName","ZAxis"),WD(Mf,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var goe=["option","isActive"];function ul(){return ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ul.apply(this,arguments)}function voe(e,t){if(e==null)return{};var r=yoe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function yoe(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 boe(e){var t=e.option,r=e.isActive,n=voe(e,goe);return typeof t=="string"?P.createElement(lf,ul({option:P.createElement(Qc,ul({type:t},n)),isActive:r,shapeType:"symbols"},n)):P.createElement(lf,ul({option:t,isActive:r,shapeType:"symbols"},n))}function wo(e){"@babel/helpers - typeof";return wo=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},wo(e)}function fl(){return fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fl.apply(this,arguments)}function zD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Pr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zD(Object(r),!0).forEach(function(n){ga(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HD(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,YD(n.key),n)}}function woe(e,t,r){return t&&HD(e.prototype,t),r&&HD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Soe(e,t,r){return t=Df(t),Coe(e,XD()?Reflect.construct(t,r||[],Df(e).constructor):t.apply(e,r))}function Coe(e,t){if(t&&(wo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Aoe(e)}function Aoe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XD=function(){return!!e})()}function Df(e){return Df=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Df(e)}function Ooe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M0(e,t)}function M0(e,t){return M0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},M0(e,t)}function ga(e,t,r){return t=YD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YD(e){var t=Ioe(e,"string");return wo(t)=="symbol"?t:t+""}function Ioe(e,t){if(wo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jf=(function(e){function t(){var r;xoe(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Soe(this,t,[].concat(a)),ga(r,"state",{isAnimationFinished:!1}),ga(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0})}),ga(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1})}),ga(r,"id",ra("recharts-scatter-")),r}return Ooe(t,e),woe(t,[{key:"renderSymbolsStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.activeShape,l=i.activeIndex,c=ge(this.props,!1);return n.map(function(f,u){var d=l===u,h=d?s:o,g=Pr(Pr({},c),f);return A.createElement(Te,fl({className:"recharts-scatter-symbol",key:"symbol-".concat(f?.cx,"-").concat(f?.cy,"-").concat(f?.size,"-").concat(u)},aa(a.props,f,u),{role:"img"}),A.createElement(boe,fl({option:h,isActive:d,key:"symbol-".concat(u)},g)))})}},{key:"renderSymbolsWithAnimation",value:function(){var n=this,a=this.props,i=a.points,o=a.isAnimationActive,s=a.animationBegin,l=a.animationDuration,c=a.animationEasing,f=a.animationId,u=this.state.prevPoints;return A.createElement(Or,{begin:s,duration:l,isActive:o,easing:c,from:{t:0},to:{t:1},key:"pie-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(d){var h=d.t,g=i.map(function(p,m){var x=u&&u[m];if(x){var y=lt(x.cx,p.cx),w=lt(x.cy,p.cy),S=lt(x.size,p.size);return Pr(Pr({},p),{},{cx:y(h),cy:w(h),size:S(h)})}var b=lt(0,p.size);return Pr(Pr({},p),{},{size:b(h)})});return A.createElement(Te,null,n.renderSymbolsStatically(g))})}},{key:"renderSymbols",value:function(){var n=this.props,a=n.points,i=n.isAnimationActive,o=this.state.prevPoints;return i&&a&&a.length&&(!o||!ca(o,a))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(a)}},{key:"renderErrorBar",value:function(){var n=this.props.isAnimationActive;if(n&&!this.state.isAnimationFinished)return null;var a=this.props,i=a.points,o=a.xAxis,s=a.yAxis,l=a.children,c=Xt(l,Zi);return c?c.map(function(f,u){var d=f.props,h=d.direction,g=d.dataKey;return A.cloneElement(f,{key:"".concat(h,"-").concat(g,"-").concat(i[u]),data:i,xAxis:o,yAxis:s,layout:h==="x"?"vertical":"horizontal",dataPointFormatter:function(m,x){return{x:m.cx,y:m.cy,value:h==="x"?+m.node.x:+m.node.y,errorVal:at(m,x)}}})}):null}},{key:"renderLine",value:function(){var n=this.props,a=n.points,i=n.line,o=n.lineType,s=n.lineJointType,l=ge(this.props,!1),c=ge(i,!1),f,u;if(o==="joint")f=a.map(function(w){return{x:w.cx,y:w.cy}});else if(o==="fitting"){var d=mR(a),h=d.xmin,g=d.xmax,p=d.a,m=d.b,x=function(S){return p*S+m};f=[{x:h,y:x(h)},{x:g,y:x(g)}]}var y=Pr(Pr(Pr({},l),{},{fill:"none",stroke:l&&l.fill},c),{},{points:f});return A.isValidElement(i)?u=A.cloneElement(i,y):Se(i)?u=i(y):u=A.createElement(fa,fl({},y,{type:s})),A.createElement(Te,{className:"recharts-scatter-line",key:"recharts-scatter-line"},u)}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.points,o=n.line,s=n.className,l=n.xAxis,c=n.yAxis,f=n.left,u=n.top,d=n.width,h=n.height,g=n.id,p=n.isAnimationActive;if(a||!i||!i.length)return null;var m=this.state.isAnimationFinished,x=Ie("recharts-scatter",s),y=l&&l.allowDataOverflow,w=c&&c.allowDataOverflow,S=y||w,b=we(g)?this.id:g;return A.createElement(Te,{className:x,clipPath:S?"url(#clipPath-".concat(b,")"):null},y||w?A.createElement("defs",null,A.createElement("clipPath",{id:"clipPath-".concat(b)},A.createElement("rect",{x:y?f:f-d/2,y:w?u:u-h/2,width:y?d:d*2,height:w?h:h*2}))):null,o&&this.renderLine(),this.renderErrorBar(),A.createElement(Te,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!p||m)&&Ar.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}}])})(A.PureComponent);ga(jf,"displayName","Scatter"),ga(jf,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!Tn.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"}),ga(jf,"getComposedData",function(e){var t=e.xAxis,r=e.yAxis,n=e.zAxis,a=e.item,i=e.displayedData,o=e.xAxisTicks,s=e.yAxisTicks,l=e.offset,c=a.props.tooltipType,f=Xt(a.props.children,ps),u=we(t.dataKey)?a.props.dataKey:t.dataKey,d=we(r.dataKey)?a.props.dataKey:r.dataKey,h=n&&n.dataKey,g=n?n.range:Mf.defaultProps.range,p=g&&g[0],m=t.scale.bandwidth?t.scale.bandwidth():0,x=r.scale.bandwidth?r.scale.bandwidth():0,y=i.map(function(w,S){var b=at(w,u),C=at(w,d),O=!we(h)&&at(w,h)||"-",I=[{name:we(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:b,payload:w,dataKey:u,type:c},{name:we(r.dataKey)?a.props.name:r.name||r.dataKey,unit:r.unit||"",value:C,payload:w,dataKey:d,type:c}];O!=="-"&&I.push({name:n.name||n.dataKey,unit:n.unit||"",value:O,payload:w,dataKey:h,type:c});var E=Ki({axis:t,ticks:o,bandSize:m,entry:w,index:S,dataKey:u}),k=Ki({axis:r,ticks:s,bandSize:x,entry:w,index:S,dataKey:d}),T=O!=="-"?n.scale(O):p,_=Math.sqrt(Math.max(T,0)/Math.PI);return Pr(Pr({},w),{},{cx:E,cy:k,x:E-_,y:k-_,xAxis:t,yAxis:r,zAxis:n,width:2*_,height:2*_,size:T,node:{x:b,y:C,z:O},tooltipPayload:I,tooltipPosition:{x:E,y:k},payload:w},f&&f[S]&&f[S].props)});return Pr({points:y},l)});function So(e){"@babel/helpers - typeof";return So=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},So(e)}function Poe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eoe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,UD(n.key),n)}}function _oe(e,t,r){return t&&Eoe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Toe(e,t,r){return t=$f(t),koe(e,RD()?Reflect.construct(t,r||[],$f(e).constructor):t.apply(e,r))}function koe(e,t){if(t&&(So(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Noe(e)}function Noe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(RD=function(){return!!e})()}function $f(e){return $f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$f(e)}function Moe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D0(e,t)}function D0(e,t){return D0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},D0(e,t)}function qD(e,t,r){return t=UD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UD(e){var t=Doe(e,"string");return So(t)=="symbol"?t:t+""}function Doe(e,t){if(So(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(So(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},j0.apply(this,arguments)}function joe(e){var t=e.xAxisId,r=m0(),n=g0(),a=iD(t);return a==null?null:P.createElement(mo,j0({},a,{className:Ie("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return Fn(o,!0)}}))}var Ja=(function(e){function t(){return Poe(this,t),Toe(this,t,arguments)}return Moe(t,e),_oe(t,[{key:"render",value:function(){return P.createElement(joe,this.props)}}])})(P.Component);qD(Ja,"displayName","XAxis"),qD(Ja,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Co(e){"@babel/helpers - typeof";return Co=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},Co(e)}function $oe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Boe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,KD(n.key),n)}}function Foe(e,t,r){return t&&Boe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Loe(e,t,r){return t=Bf(t),Goe(e,ZD()?Reflect.construct(t,r||[],Bf(e).constructor):t.apply(e,r))}function Goe(e,t){if(t&&(Co(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Woe(e)}function Woe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZD=function(){return!!e})()}function Bf(e){return Bf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Bf(e)}function Voe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$0(e,t)}function $0(e,t){return $0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},$0(e,t)}function JD(e,t,r){return t=KD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KD(e){var t=zoe(e,"string");return Co(t)=="symbol"?t:t+""}function zoe(e,t){if(Co(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Co(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function B0(){return B0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B0.apply(this,arguments)}var Hoe=function(t){var r=t.yAxisId,n=m0(),a=g0(),i=oD(r);return i==null?null:P.createElement(mo,B0({},i,{className:Ie("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(s){return Fn(s,!0)}}))},Ka=(function(e){function t(){return $oe(this,t),Loe(this,t,arguments)}return Voe(t,e),Foe(t,[{key:"render",value:function(){return P.createElement(Hoe,this.props)}}])})(P.Component);JD(Ka,"displayName","YAxis"),JD(Ka,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function QD(e){return qoe(e)||Roe(e)||Yoe(e)||Xoe()}function Xoe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
113
113
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yoe(e,t){if(e){if(typeof e=="string")return F0(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 F0(e,t)}}function Roe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qoe(e){if(Array.isArray(e))return F0(e)}function F0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var L0=function(t,r,n,a,i){var o=Xt(t,x0),s=Xt(t,Cf),l=[].concat(QD(o),QD(s)),c=Xt(t,If),f="".concat(a,"Id"),u=a[0],d=r;if(l.length&&(d=l.reduce(function(p,m){if(m.props[f]===n&&un(m.props,"extendDomain")&&se(m.props[u])){var x=m.props[u];return[Math.min(p[0],x),Math.max(p[1],x)]}return p},d)),c.length){var h="".concat(u,"1"),g="".concat(u,"2");d=c.reduce(function(p,m){if(m.props[f]===n&&un(m.props,"extendDomain")&&se(m.props[h])&&se(m.props[g])){var x=m.props[h],y=m.props[g];return[Math.min(p[0],x,y),Math.max(p[1],x,y)]}return p},d)}return i&&i.length&&(d=i.reduce(function(p,m){return se(m)?[Math.min(p[0],m),Math.max(p[1],m)]:p},d)),d},G0={exports:{}},ej;function Uoe(){return ej||(ej=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(l,c,f){this.fn=l,this.context=c,this.once=f||!1}function i(l,c,f,u,d){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new a(f,u||l,d),g=r?r+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],h]:l._events[g].push(h):(l._events[g]=h,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],f,u;if(this._eventsCount===0)return c;for(u in f=this._events)t.call(f,u)&&c.push(r?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},s.prototype.listeners=function(c){var f=r?r+c:c,u=this._events[f];if(!u)return[];if(u.fn)return[u.fn];for(var d=0,h=u.length,g=new Array(h);d<h;d++)g[d]=u[d].fn;return g},s.prototype.listenerCount=function(c){var f=r?r+c:c,u=this._events[f];return u?u.fn?1:u.length:0},s.prototype.emit=function(c,f,u,d,h,g){var p=r?r+c:c;if(!this._events[p])return!1;var m=this._events[p],x=arguments.length,y,w;if(m.fn){switch(m.once&&this.removeListener(c,m.fn,void 0,!0),x){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,f),!0;case 3:return m.fn.call(m.context,f,u),!0;case 4:return m.fn.call(m.context,f,u,d),!0;case 5:return m.fn.call(m.context,f,u,d,h),!0;case 6:return m.fn.call(m.context,f,u,d,h,g),!0}for(w=1,y=new Array(x-1);w<x;w++)y[w-1]=arguments[w];m.fn.apply(m.context,y)}else{var S=m.length,b;for(w=0;w<S;w++)switch(m[w].once&&this.removeListener(c,m[w].fn,void 0,!0),x){case 1:m[w].fn.call(m[w].context);break;case 2:m[w].fn.call(m[w].context,f);break;case 3:m[w].fn.call(m[w].context,f,u);break;case 4:m[w].fn.call(m[w].context,f,u,d);break;default:if(!y)for(b=1,y=new Array(x-1);b<x;b++)y[b-1]=arguments[b];m[w].fn.apply(m[w].context,y)}}return!0},s.prototype.on=function(c,f,u){return i(this,c,f,u,!1)},s.prototype.once=function(c,f,u){return i(this,c,f,u,!0)},s.prototype.removeListener=function(c,f,u,d){var h=r?r+c:c;if(!this._events[h])return this;if(!f)return o(this,h),this;var g=this._events[h];if(g.fn)g.fn===f&&(!d||g.once)&&(!u||g.context===u)&&o(this,h);else{for(var p=0,m=[],x=g.length;p<x;p++)(g[p].fn!==f||d&&!g[p].once||u&&g[p].context!==u)&&m.push(g[p]);m.length?this._events[h]=m.length===1?m[0]:m:o(this,h)}return this},s.prototype.removeAllListeners=function(c){var f;return c?(f=r?r+c:c,this._events[f]&&o(this,f)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(G0)),G0.exports}var Zoe=Uoe();const Joe=Ue(Zoe);var W0=new Joe,V0="recharts.syncMouseEvents";function dl(e){"@babel/helpers - typeof";return dl=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},dl(e)}function Koe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qoe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tj(n.key),n)}}function ese(e,t,r){return t&&Qoe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function z0(e,t,r){return t=tj(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tj(e){var t=tse(e,"string");return dl(t)=="symbol"?t:t+""}function tse(e,t){if(dl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(dl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var rse=(function(){function e(){Koe(this,e),z0(this,"activeIndex",0),z0(this,"coordinateList",[]),z0(this,"layout","horizontal")}return ese(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,o=r.container,s=o===void 0?null:o,l=r.layout,c=l===void 0?null:l,f=r.offset,u=f===void 0?null:f,d=r.mouseHandlerCallback,h=d===void 0?null:d;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=c??this.layout,this.offset=u??this.offset,this.mouseHandlerCallback=h??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,o=a.y,s=a.height,l=this.coordinateList[this.activeIndex].coordinate,c=((r=window)===null||r===void 0?void 0:r.scrollX)||0,f=((n=window)===null||n===void 0?void 0:n.scrollY)||0,u=i+l+c,d=o+this.offset.top+s/2+f;this.mouseHandlerCallback({pageX:u,pageY:d})}}}])})();function nse(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e?.[0],a=e?.[1];if(n&&a&&se(n)&&se(a))return!0}return!1}function ase(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function rj(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,o=et(t,r,n,a),s=et(t,r,n,i);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function ise(e,t,r){var n,a,i,o;if(e==="horizontal")n=t.x,i=n,a=r.top,o=r.top+r.height;else if(e==="vertical")a=t.y,o=a,n=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,c=t.innerRadius,f=t.outerRadius,u=t.angle,d=et(s,l,c,u),h=et(s,l,f,u);n=d.x,a=d.y,i=h.x,o=h.y}else return rj(t);return[{x:n,y:a},{x:i,y:o}]}function hl(e){"@babel/helpers - typeof";return hl=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},hl(e)}function nj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ff(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nj(Object(r),!0).forEach(function(n){ose(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ose(e,t,r){return t=sse(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sse(e){var t=lse(e,"string");return hl(t)=="symbol"?t:t+""}function lse(e,t){if(hl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cse(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,c=e.activeTooltipIndex,f=e.tooltipAxisBandSize,u=e.layout,d=e.chartName,h=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!h||!i||!o||d!=="ScatterChart"&&a!=="axis")return null;var g,p=fa;if(d==="ScatterChart")g=o,p=nre;else if(d==="BarChart")g=ase(u,o,l,f),p=jb;else if(u==="radial"){var m=rj(o),x=m.cx,y=m.cy,w=m.radius,S=m.startAngle,b=m.endAngle;g={cx:x,cy:y,startAngle:S,endAngle:b,innerRadius:w,outerRadius:w},p=rM}else g={points:ise(u,o,l)},p=fa;var C=Ff(Ff(Ff(Ff({stroke:"#ccc",pointerEvents:"none"},l),g),ge(h,!1)),{},{payload:s,payloadIndex:c,className:Ie("recharts-tooltip-cursor",h.className)});return A.isValidElement(h)?A.cloneElement(h,C):A.createElement(p,C)}var use=["item"],fse=["children","className","width","height","style","compact","title","desc"];function Ao(e){"@babel/helpers - typeof";return Ao=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},Ao(e)}function Oo(){return Oo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oo.apply(this,arguments)}function aj(e,t){return pse(e)||hse(e,t)||sj(e,t)||dse()}function dse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
114
114
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hse(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,a=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function pse(e){if(Array.isArray(e))return e}function ij(e,t){if(e==null)return{};var r=mse(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mse(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 gse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vse(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,cj(n.key),n)}}function yse(e,t,r){return t&&vse(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bse(e,t,r){return t=Lf(t),xse(e,oj()?Reflect.construct(t,r||[],Lf(e).constructor):t.apply(e,r))}function xse(e,t){if(t&&(Ao(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wse(e)}function wse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oj=function(){return!!e})()}function Lf(e){return Lf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lf(e)}function Sse(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&H0(e,t)}function H0(e,t){return H0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},H0(e,t)}function Io(e){return Ose(e)||Ase(e)||sj(e)||Cse()}function Cse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
115
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sj(e,t){if(e){if(typeof e=="string")return X0(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 X0(e,t)}}function Ase(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ose(e){if(Array.isArray(e))return X0(e)}function X0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function lj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Q(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lj(Object(r),!0).forEach(function(n){Ae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ae(e,t,r){return t=cj(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cj(e){var t=Ise(e,"string");return Ao(t)=="symbol"?t:t+""}function Ise(e,t){if(Ao(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ao(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pse={xAxis:["bottom","top"],yAxis:["left","right"]},Ese={width:"100%",height:"100%"},uj={x:0,y:0};function Gf(e){return e}var _se=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},Tse=function(t,r,n,a){var i=r.find(function(f){return f&&f.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,s=a.radius;return Q(Q(Q({},a),et(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,c=a.angle;return Q(Q(Q({},a),et(a.cx,a.cy,l,c)),{},{angle:c,radius:l})}return uj},Wf=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,o=(n??[]).reduce(function(s,l){var c=l.props.data;return c&&c.length?[].concat(Io(s),Io(c)):s},[]);return o.length>0?o:t&&t.length&&se(a)&&se(i)?t.slice(a,i+1):[]};function fj(e){return e==="number"?[0,"auto"]:void 0}var Y0=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,s=Wf(r,t);return n<0||!i||!i.length||n>=s.length?null:i.reduce(function(l,c){var f,u=(f=c.props.data)!==null&&f!==void 0?f:r;u&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(u=u.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=u===void 0?s:u;d=Wc(h,o.dataKey,a)}else d=u&&u[n]||s[n];return d?[].concat(Io(l),[GN(c,d)]):l},[])},dj=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=_se(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,f=wK(o,s,c,l);if(f>=0&&c){var u=c[f]&&c[f].value,d=Y0(t,r,f,u),h=Tse(n,s,f,i);return{activeTooltipIndex:f,activeLabel:u,activePayload:d,activeCoordinate:h}}return null},kse=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,f=t.layout,u=t.children,d=t.stackOffset,h=_N(f,i);return n.reduce(function(g,p){var m,x=p.type.defaultProps!==void 0?Q(Q({},p.type.defaultProps),p.props):p.props,y=x.type,w=x.dataKey,S=x.allowDataOverflow,b=x.allowDuplicatedCategory,C=x.scale,O=x.ticks,I=x.includeHidden,E=x[o];if(g[E])return g;var k=Wf(t.data,{graphicalItems:a.filter(function(Y){var U,R=o in Y.props?Y.props[o]:(U=Y.type.defaultProps)===null||U===void 0?void 0:U[o];return R===E}),dataStartIndex:l,dataEndIndex:c}),T=k.length,_,j,$;nse(x.domain,S,y)&&(_=fb(x.domain,null,S),h&&(y==="number"||C!=="auto")&&($=$s(k,w,"category")));var N=fj(y);if(!_||_.length===0){var D,G=(D=x.domain)!==null&&D!==void 0?D:N;if(w){if(_=$s(k,w,y),y==="category"&&h){var V=pR(_);b&&V?(j=_,_=hf(0,T)):b||(_=LN(G,_,p).reduce(function(Y,U){return Y.indexOf(U)>=0?Y:[].concat(Io(Y),[U])},[]))}else if(y==="category")b?_=_.filter(function(Y){return Y!==""&&!we(Y)}):_=LN(G,_,p).reduce(function(Y,U){return Y.indexOf(U)>=0||U===""||we(U)?Y:[].concat(Io(Y),[U])},[]);else if(y==="number"){var H=IK(k,a.filter(function(Y){var U,R,J=o in Y.props?Y.props[o]:(U=Y.type.defaultProps)===null||U===void 0?void 0:U[o],re="hide"in Y.props?Y.props.hide:(R=Y.type.defaultProps)===null||R===void 0?void 0:R.hide;return J===E&&(I||!re)}),w,i,f);H&&(_=H)}h&&(y==="number"||C!=="auto")&&($=$s(k,w,"category"))}else h?_=hf(0,T):s&&s[E]&&s[E].hasStack&&y==="number"?_=d==="expand"?[0,1]:$N(s[E].stackGroups,l,c):_=EN(k,a.filter(function(Y){var U=o in Y.props?Y.props[o]:Y.type.defaultProps[o],R="hide"in Y.props?Y.props.hide:Y.type.defaultProps.hide;return U===E&&(I||!R)}),y,f,!0);if(y==="number")_=L0(u,_,E,i,O),G&&(_=fb(G,_,S));else if(y==="category"&&G){var M=G,z=_.every(function(Y){return M.indexOf(Y)>=0});z&&(_=M)}}return Q(Q({},g),{},Ae({},E,Q(Q({},x),{},{axisType:i,domain:_,categoricalDomain:$,duplicateDomain:j,originalDomain:(m=x.domain)!==null&&m!==void 0?m:N,isCategorical:h,layout:f})))},{})},Nse=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,f=t.layout,u=t.children,d=Wf(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:c}),h=d.length,g=_N(f,i),p=-1;return n.reduce(function(m,x){var y=x.type.defaultProps!==void 0?Q(Q({},x.type.defaultProps),x.props):x.props,w=y[o],S=fj("number");if(!m[w]){p++;var b;return g?b=hf(0,h):s&&s[w]&&s[w].hasStack?(b=$N(s[w].stackGroups,l,c),b=L0(u,b,w,i)):(b=fb(S,EN(d,n.filter(function(C){var O,I,E=o in C.props?C.props[o]:(O=C.type.defaultProps)===null||O===void 0?void 0:O[o],k="hide"in C.props?C.props.hide:(I=C.type.defaultProps)===null||I===void 0?void 0:I.hide;return E===w&&!k}),"number",f),a.defaultProps.allowDataOverflow),b=L0(u,b,w,i)),Q(Q({},m),{},Ae({},w,Q(Q({axisType:i},a.defaultProps),{},{hide:!0,orientation:fr(Pse,"".concat(i,".").concat(p%2),null),domain:b,originalDomain:S,isCategorical:g,layout:f})))}return m},{})},Mse=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,f=t.children,u="".concat(a,"Id"),d=Xt(f,i),h={};return d&&d.length?h=kse(t,{axes:d,graphicalItems:o,axisType:a,axisIdKey:u,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(h=Nse(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:u,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),h},Dse=function(t){var r=na(t),n=Fn(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Yv(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Gu(r,n)}},hj=function(t){var r=t.children,n=t.defaultShowTooltip,a=dr(r,oo),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},jse=function(t){return!t||!t.length?!1:t.some(function(r){var n=En(r&&r.type);return n&&n.indexOf("Bar")>=0})},pj=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},$se=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,c=n.width,f=n.height,u=n.children,d=n.margin||{},h=dr(u,oo),g=dr(u,Ma),p=Object.keys(l).reduce(function(b,C){var O=l[C],I=O.orientation;return!O.mirror&&!O.hide?Q(Q({},b),{},Ae({},I,b[I]+O.width)):b},{left:d.left||0,right:d.right||0}),m=Object.keys(o).reduce(function(b,C){var O=o[C],I=O.orientation;return!O.mirror&&!O.hide?Q(Q({},b),{},Ae({},I,fr(b,"".concat(I))+O.height)):b},{top:d.top||0,bottom:d.bottom||0}),x=Q(Q({},m),p),y=x.bottom;h&&(x.bottom+=h.props.height||oo.defaultProps.height),g&&r&&(x=AK(x,a,n,r));var w=c-x.left-x.right,S=f-x.top-x.bottom;return Q(Q({brushBottom:y},x),{},{width:Math.max(w,0),height:Math.max(S,0)})},Bse=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},R0=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,c=t.legendContent,f=t.formatAxisMap,u=t.defaultProps,d=function(x,y){var w=y.graphicalItems,S=y.stackGroups,b=y.offset,C=y.updateId,O=y.dataStartIndex,I=y.dataEndIndex,E=x.barSize,k=x.layout,T=x.barGap,_=x.barCategoryGap,j=x.maxBarSize,$=pj(k),N=$.numericAxisName,D=$.cateAxisName,G=jse(w),V=[];return w.forEach(function(H,M){var z=Wf(x.data,{graphicalItems:[H],dataStartIndex:O,dataEndIndex:I}),Y=H.type.defaultProps!==void 0?Q(Q({},H.type.defaultProps),H.props):H.props,U=Y.dataKey,R=Y.maxBarSize,J=Y["".concat(N,"Id")],re=Y["".concat(D,"Id")],K={},ne=l.reduce(function(Rt,qt){var dn,Hr,er=y["".concat(qt.axisType,"Map")],L=Y["".concat(qt.axisType,"Id")];er&&er[L]||qt.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?Qt(!1,"Specifying a(n) ".concat(qt.axisType,"Id requires a corresponding ").concat(qt.axisType,"Id on the targeted graphical component ").concat((dn=H==null||(Hr=H.type)===null||Hr===void 0?void 0:Hr.displayName)!==null&&dn!==void 0?dn:"")):Qt());var X=er[L];return Q(Q({},Rt),{},Ae(Ae({},qt.axisType,X),"".concat(qt.axisType,"Ticks"),Fn(X)))},K),q=ne[D],Z=ne["".concat(D,"Ticks")],ie=S&&S[J]&&S[J].hasStack&&jK(H,S[J].stackGroups),B=En(H.type).indexOf("Bar")>=0,ce=Gu(q,Z),ee=[],ve=G&&SK({barSize:E,stackGroups:S,totalSize:Bse(ne,D)});if(B){var Ee,Xe,_t=we(R)?j:R,Wt=(Ee=(Xe=Gu(q,Z,!0))!==null&&Xe!==void 0?Xe:_t)!==null&&Ee!==void 0?Ee:0;ee=CK({barGap:T,barCategoryGap:_,bandSize:Wt!==ce?Wt:ce,sizeList:ve[re],maxBarSize:_t}),Wt!==ce&&(ee=ee.map(function(Rt){return Q(Q({},Rt),{},{position:Q(Q({},Rt.position),{},{offset:Rt.position.offset-Wt/2})})}))}var zr=H&&H.type&&H.type.getComposedData;zr&&V.push({props:Q(Q({},zr(Q(Q({},ne),{},{displayedData:z,props:x,dataKey:U,item:H,bandSize:ce,barPosition:ee,offset:b,stackedData:ie,layout:k,dataStartIndex:O,dataEndIndex:I}))),{},Ae(Ae(Ae({key:H.key||"item-".concat(M)},N,ne[N]),D,ne[D]),"animationId",C)),childIndex:PR(H,x.children),item:H})}),V},h=function(x,y){var w=x.props,S=x.dataStartIndex,b=x.dataEndIndex,C=x.updateId;if(!KI({props:w}))return null;var O=w.children,I=w.layout,E=w.stackOffset,k=w.data,T=w.reverseStackOrder,_=pj(I),j=_.numericAxisName,$=_.cateAxisName,N=Xt(O,n),D=MK(k,N,"".concat(j,"Id"),"".concat($,"Id"),E,T),G=l.reduce(function(Y,U){var R="".concat(U.axisType,"Map");return Q(Q({},Y),{},Ae({},R,Mse(w,Q(Q({},U),{},{graphicalItems:N,stackGroups:U.axisType===j&&D,dataStartIndex:S,dataEndIndex:b}))))},{}),V=$se(Q(Q({},G),{},{props:w,graphicalItems:N}),y?.legendBBox);Object.keys(G).forEach(function(Y){G[Y]=f(w,G[Y],V,Y.replace("Map",""),r)});var H=G["".concat($,"Map")],M=Dse(H),z=d(w,Q(Q({},G),{},{dataStartIndex:S,dataEndIndex:b,updateId:C,graphicalItems:N,stackGroups:D,offset:V}));return Q(Q({formattedGraphicalItems:z,graphicalItems:N,offset:V,stackGroups:D},M),G)},g=(function(m){function x(y){var w,S,b;return gse(this,x),b=bse(this,x,[y]),Ae(b,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ae(b,"accessibilityManager",new rse),Ae(b,"handleLegendBBoxUpdate",function(C){if(C){var O=b.state,I=O.dataStartIndex,E=O.dataEndIndex,k=O.updateId;b.setState(Q({legendBBox:C},h({props:b.props,dataStartIndex:I,dataEndIndex:E,updateId:k},Q(Q({},b.state),{},{legendBBox:C}))))}}),Ae(b,"handleReceiveSyncEvent",function(C,O,I){if(b.props.syncId===C){if(I===b.eventEmitterSymbol&&typeof b.props.syncMethod!="function")return;b.applySyncEvent(O)}}),Ae(b,"handleBrushChange",function(C){var O=C.startIndex,I=C.endIndex;if(O!==b.state.dataStartIndex||I!==b.state.dataEndIndex){var E=b.state.updateId;b.setState(function(){return Q({dataStartIndex:O,dataEndIndex:I},h({props:b.props,dataStartIndex:O,dataEndIndex:I,updateId:E},b.state))}),b.triggerSyncEvent({dataStartIndex:O,dataEndIndex:I})}}),Ae(b,"handleMouseEnter",function(C){var O=b.getMouseInfo(C);if(O){var I=Q(Q({},O),{},{isTooltipActive:!0});b.setState(I),b.triggerSyncEvent(I);var E=b.props.onMouseEnter;Se(E)&&E(I,C)}}),Ae(b,"triggeredAfterMouseMove",function(C){var O=b.getMouseInfo(C),I=O?Q(Q({},O),{},{isTooltipActive:!0}):{isTooltipActive:!1};b.setState(I),b.triggerSyncEvent(I);var E=b.props.onMouseMove;Se(E)&&E(I,C)}),Ae(b,"handleItemMouseEnter",function(C){b.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),Ae(b,"handleItemMouseLeave",function(){b.setState(function(){return{isTooltipActive:!1}})}),Ae(b,"handleMouseMove",function(C){C.persist(),b.throttleTriggeredAfterMouseMove(C)}),Ae(b,"handleMouseLeave",function(C){b.throttleTriggeredAfterMouseMove.cancel();var O={isTooltipActive:!1};b.setState(O),b.triggerSyncEvent(O);var I=b.props.onMouseLeave;Se(I)&&I(O,C)}),Ae(b,"handleOuterEvent",function(C){var O=IR(C),I=fr(b.props,"".concat(O));if(O&&Se(I)){var E,k;/.*touch.*/i.test(O)?k=b.getMouseInfo(C.changedTouches[0]):k=b.getMouseInfo(C),I((E=k)!==null&&E!==void 0?E:{},C)}}),Ae(b,"handleClick",function(C){var O=b.getMouseInfo(C);if(O){var I=Q(Q({},O),{},{isTooltipActive:!0});b.setState(I),b.triggerSyncEvent(I);var E=b.props.onClick;Se(E)&&E(I,C)}}),Ae(b,"handleMouseDown",function(C){var O=b.props.onMouseDown;if(Se(O)){var I=b.getMouseInfo(C);O(I,C)}}),Ae(b,"handleMouseUp",function(C){var O=b.props.onMouseUp;if(Se(O)){var I=b.getMouseInfo(C);O(I,C)}}),Ae(b,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&b.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),Ae(b,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&b.handleMouseDown(C.changedTouches[0])}),Ae(b,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&b.handleMouseUp(C.changedTouches[0])}),Ae(b,"handleDoubleClick",function(C){var O=b.props.onDoubleClick;if(Se(O)){var I=b.getMouseInfo(C);O(I,C)}}),Ae(b,"handleContextMenu",function(C){var O=b.props.onContextMenu;if(Se(O)){var I=b.getMouseInfo(C);O(I,C)}}),Ae(b,"triggerSyncEvent",function(C){b.props.syncId!==void 0&&W0.emit(V0,b.props.syncId,C,b.eventEmitterSymbol)}),Ae(b,"applySyncEvent",function(C){var O=b.props,I=O.layout,E=O.syncMethod,k=b.state.updateId,T=C.dataStartIndex,_=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)b.setState(Q({dataStartIndex:T,dataEndIndex:_},h({props:b.props,dataStartIndex:T,dataEndIndex:_,updateId:k},b.state)));else if(C.activeTooltipIndex!==void 0){var j=C.chartX,$=C.chartY,N=C.activeTooltipIndex,D=b.state,G=D.offset,V=D.tooltipTicks;if(!G)return;if(typeof E=="function")N=E(V,C);else if(E==="value"){N=-1;for(var H=0;H<V.length;H++)if(V[H].value===C.activeLabel){N=H;break}}var M=Q(Q({},G),{},{x:G.left,y:G.top}),z=Math.min(j,M.x+M.width),Y=Math.min($,M.y+M.height),U=V[N]&&V[N].value,R=Y0(b.state,b.props.data,N),J=V[N]?{x:I==="horizontal"?V[N].coordinate:z,y:I==="horizontal"?Y:V[N].coordinate}:uj;b.setState(Q(Q({},C),{},{activeLabel:U,activeCoordinate:J,activePayload:R,activeTooltipIndex:N}))}else b.setState(C)}),Ae(b,"renderCursor",function(C){var O,I=b.state,E=I.isTooltipActive,k=I.activeCoordinate,T=I.activePayload,_=I.offset,j=I.activeTooltipIndex,$=I.tooltipAxisBandSize,N=b.getTooltipEventType(),D=(O=C.props.active)!==null&&O!==void 0?O:E,G=b.props.layout,V=C.key||"_recharts-cursor";return A.createElement(cse,{key:V,activeCoordinate:k,activePayload:T,activeTooltipIndex:j,chartName:r,element:C,isActive:D,layout:G,offset:_,tooltipAxisBandSize:$,tooltipEventType:N})}),Ae(b,"renderPolarAxis",function(C,O,I){var E=fr(C,"type.axisType"),k=fr(b.state,"".concat(E,"Map")),T=C.type.defaultProps,_=T!==void 0?Q(Q({},T),C.props):C.props,j=k&&k[_["".concat(E,"Id")]];return A.cloneElement(C,Q(Q({},j),{},{className:Ie(E,j.className),key:C.key||"".concat(O,"-").concat(I),ticks:Fn(j,!0)}))}),Ae(b,"renderPolarGrid",function(C){var O=C.props,I=O.radialLines,E=O.polarAngles,k=O.polarRadius,T=b.state,_=T.radiusAxisMap,j=T.angleAxisMap,$=na(_),N=na(j),D=N.cx,G=N.cy,V=N.innerRadius,H=N.outerRadius;return A.cloneElement(C,{polarAngles:Array.isArray(E)?E:Fn(N,!0).map(function(M){return M.coordinate}),polarRadius:Array.isArray(k)?k:Fn($,!0).map(function(M){return M.coordinate}),cx:D,cy:G,innerRadius:V,outerRadius:H,key:C.key||"polar-grid",radialLines:I})}),Ae(b,"renderLegend",function(){var C=b.state.formattedGraphicalItems,O=b.props,I=O.children,E=O.width,k=O.height,T=b.props.margin||{},_=E-(T.left||0)-(T.right||0),j=AN({children:I,formattedGraphicalItems:C,legendWidth:_,legendContent:c});if(!j)return null;var $=j.item,N=ij(j,use);return A.cloneElement($,Q(Q({},N),{},{chartWidth:E,chartHeight:k,margin:T,onBBoxUpdate:b.handleLegendBBoxUpdate}))}),Ae(b,"renderTooltip",function(){var C,O=b.props,I=O.children,E=O.accessibilityLayer,k=dr(I,hr);if(!k)return null;var T=b.state,_=T.isTooltipActive,j=T.activeCoordinate,$=T.activePayload,N=T.activeLabel,D=T.offset,G=(C=k.props.active)!==null&&C!==void 0?C:_;return A.cloneElement(k,{viewBox:Q(Q({},D),{},{x:D.left,y:D.top}),active:G,label:N,payload:G?$:[],coordinate:j,accessibilityLayer:E})}),Ae(b,"renderBrush",function(C){var O=b.props,I=O.margin,E=O.data,k=b.state,T=k.offset,_=k.dataStartIndex,j=k.dataEndIndex,$=k.updateId;return A.cloneElement(C,{key:C.key||"_recharts-brush",onChange:Lu(b.handleBrushChange,C.props.onChange),data:E,x:se(C.props.x)?C.props.x:T.left,y:se(C.props.y)?C.props.y:T.top+T.height+T.brushBottom-(I.bottom||0),width:se(C.props.width)?C.props.width:T.width,startIndex:_,endIndex:j,updateId:"brush-".concat($)})}),Ae(b,"renderReferenceElement",function(C,O,I){if(!C)return null;var E=b,k=E.clipPathId,T=b.state,_=T.xAxisMap,j=T.yAxisMap,$=T.offset,N=C.type.defaultProps||{},D=C.props,G=D.xAxisId,V=G===void 0?N.xAxisId:G,H=D.yAxisId,M=H===void 0?N.yAxisId:H;return A.cloneElement(C,{key:C.key||"".concat(O,"-").concat(I),xAxis:_[V],yAxis:j[M],viewBox:{x:$.left,y:$.top,width:$.width,height:$.height},clipPathId:k})}),Ae(b,"renderActivePoints",function(C){var O=C.item,I=C.activePoint,E=C.basePoint,k=C.childIndex,T=C.isRange,_=[],j=O.props.key,$=O.item.type.defaultProps!==void 0?Q(Q({},O.item.type.defaultProps),O.item.props):O.item.props,N=$.activeDot,D=$.dataKey,G=Q(Q({index:k,dataKey:D,cx:I.x,cy:I.y,r:4,fill:cb(O.item),strokeWidth:2,stroke:"#fff",payload:I.payload,value:I.value},ge(N,!1)),Vc(N));return _.push(x.renderActiveDot(N,G,"".concat(j,"-activePoint-").concat(k))),E?_.push(x.renderActiveDot(N,Q(Q({},G),{},{cx:E.x,cy:E.y}),"".concat(j,"-basePoint-").concat(k))):T&&_.push(null),_}),Ae(b,"renderGraphicChild",function(C,O,I){var E=b.filterFormatItem(C,O,I);if(!E)return null;var k=b.getTooltipEventType(),T=b.state,_=T.isTooltipActive,j=T.tooltipAxis,$=T.activeTooltipIndex,N=T.activeLabel,D=b.props.children,G=dr(D,hr),V=E.props,H=V.points,M=V.isRange,z=V.baseLine,Y=E.item.type.defaultProps!==void 0?Q(Q({},E.item.type.defaultProps),E.item.props):E.item.props,U=Y.activeDot,R=Y.hide,J=Y.activeBar,re=Y.activeShape,K=!!(!R&&_&&G&&(U||J||re)),ne={};k!=="axis"&&G&&G.props.trigger==="click"?ne={onClick:Lu(b.handleItemMouseEnter,C.props.onClick)}:k!=="axis"&&(ne={onMouseLeave:Lu(b.handleItemMouseLeave,C.props.onMouseLeave),onMouseEnter:Lu(b.handleItemMouseEnter,C.props.onMouseEnter)});var q=A.cloneElement(C,Q(Q({},E.props),ne));function Z(qt){return typeof j.dataKey=="function"?j.dataKey(qt.payload):null}if(K)if($>=0){var ie,B;if(j.dataKey&&!j.allowDuplicatedCategory){var ce=typeof j.dataKey=="function"?Z:"payload.".concat(j.dataKey.toString());ie=Wc(H,ce,N),B=M&&z&&Wc(z,ce,N)}else ie=H?.[$],B=M&&z&&z[$];if(re||J){var ee=C.props.activeIndex!==void 0?C.props.activeIndex:$;return[A.cloneElement(C,Q(Q(Q({},E.props),ne),{},{activeIndex:ee})),null,null]}if(!we(ie))return[q].concat(Io(b.renderActivePoints({item:E,activePoint:ie,basePoint:B,childIndex:$,isRange:M})))}else{var ve,Ee=(ve=b.getItemByXY(b.state.activeCoordinate))!==null&&ve!==void 0?ve:{graphicalItem:q},Xe=Ee.graphicalItem,_t=Xe.item,Wt=_t===void 0?C:_t,zr=Xe.childIndex,Rt=Q(Q(Q({},E.props),ne),{},{activeIndex:zr});return[A.cloneElement(Wt,Rt),null,null]}return M?[q,null,null]:[q,null]}),Ae(b,"renderCustomized",function(C,O,I){return A.cloneElement(C,Q(Q({key:"recharts-customized-".concat(I)},b.props),b.state))}),Ae(b,"renderMap",{CartesianGrid:{handler:Gf,once:!0},ReferenceArea:{handler:b.renderReferenceElement},ReferenceLine:{handler:Gf},ReferenceDot:{handler:b.renderReferenceElement},XAxis:{handler:Gf},YAxis:{handler:Gf},Brush:{handler:b.renderBrush,once:!0},Bar:{handler:b.renderGraphicChild},Line:{handler:b.renderGraphicChild},Area:{handler:b.renderGraphicChild},Radar:{handler:b.renderGraphicChild},RadialBar:{handler:b.renderGraphicChild},Scatter:{handler:b.renderGraphicChild},Pie:{handler:b.renderGraphicChild},Funnel:{handler:b.renderGraphicChild},Tooltip:{handler:b.renderCursor,once:!0},PolarGrid:{handler:b.renderPolarGrid,once:!0},PolarAngleAxis:{handler:b.renderPolarAxis},PolarRadiusAxis:{handler:b.renderPolarAxis},Customized:{handler:b.renderCustomized}}),b.clipPathId="".concat((w=y.id)!==null&&w!==void 0?w:ra("recharts"),"-clip"),b.throttleTriggeredAfterMouseMove=hT(b.triggeredAfterMouseMove,(S=y.throttleDelay)!==null&&S!==void 0?S:1e3/60),b.state={},b}return Sse(x,m),yse(x,[{key:"componentDidMount",value:function(){var w,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,S=w.children,b=w.data,C=w.height,O=w.layout,I=dr(S,hr);if(I){var E=I.props.defaultIndex;if(!(typeof E!="number"||E<0||E>this.state.tooltipTicks.length-1)){var k=this.state.tooltipTicks[E]&&this.state.tooltipTicks[E].value,T=Y0(this.state,b,E,k),_=this.state.tooltipTicks[E].coordinate,j=(this.state.offset.top+C)/2,$=O==="horizontal",N=$?{x:_,y:j}:{y:_,x:j},D=this.state.formattedGraphicalItems.find(function(V){var H=V.item;return H.type.name==="Scatter"});D&&(N=Q(Q({},N),D.props.points[E].tooltipPosition),T=D.props.points[E].tooltipPayload);var G={activeTooltipIndex:E,isTooltipActive:!0,activeLabel:k,activePayload:T,activeCoordinate:N};this.setState(G),this.renderCursor(I),this.accessibilityManager.setIndex(E)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var b,C;this.accessibilityManager.setDetails({offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(w){Tm([dr(w.children,hr)],[dr(this.props.children,hr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=dr(this.props.children,hr);if(w&&typeof w.props.shared=="boolean"){var S=w.props.shared?"axis":"item";return s.indexOf(S)>=0?S:i}return i}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var S=this.container,b=S.getBoundingClientRect(),C=pZ(b),O={chartX:Math.round(w.pageX-C.left),chartY:Math.round(w.pageY-C.top)},I=b.width/S.offsetWidth||1,E=this.inRange(O.chartX,O.chartY,I);if(!E)return null;var k=this.state,T=k.xAxisMap,_=k.yAxisMap,j=this.getTooltipEventType(),$=dj(this.state,this.props.data,this.props.layout,E);if(j!=="axis"&&T&&_){var N=na(T).scale,D=na(_).scale,G=N&&N.invert?N.invert(O.chartX):null,V=D&&D.invert?D.invert(O.chartY):null;return Q(Q({},O),{},{xValue:G,yValue:V},$)}return $?Q(Q({},O),$):null}},{key:"inRange",value:function(w,S){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,O=w/b,I=S/b;if(C==="horizontal"||C==="vertical"){var E=this.state.offset,k=O>=E.left&&O<=E.left+E.width&&I>=E.top&&I<=E.top+E.height;return k?{x:O,y:I}:null}var T=this.state,_=T.angleAxisMap,j=T.radiusAxisMap;if(_&&j){var $=na(_);return XN({x:O,y:I},$)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,S=this.getTooltipEventType(),b=dr(w,hr),C={};b&&S==="axis"&&(b.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var O=Vc(this.props,this.handleOuterEvent);return Q(Q({},O),C)}},{key:"addListener",value:function(){W0.on(V0,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){W0.removeListener(V0,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,S,b){for(var C=this.state.formattedGraphicalItems,O=0,I=C.length;O<I;O++){var E=C[O];if(E.item===w||E.props.key===w.key||S===En(E.item.type)&&b===E.childIndex)return E}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,S=this.state.offset,b=S.left,C=S.top,O=S.height,I=S.width;return A.createElement("defs",null,A.createElement("clipPath",{id:w},A.createElement("rect",{x:b,y:C,height:O,width:I})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(S,b){var C=aj(b,2),O=C[0],I=C[1];return Q(Q({},S),{},Ae({},O,I.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(S,b){var C=aj(b,2),O=C[0],I=C[1];return Q(Q({},S),{},Ae({},O,I.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[w])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(w){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[w])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(w){var S=this.state,b=S.formattedGraphicalItems,C=S.activeItem;if(b&&b.length)for(var O=0,I=b.length;O<I;O++){var E=b[O],k=E.props,T=E.item,_=T.type.defaultProps!==void 0?Q(Q({},T.type.defaultProps),T.props):T.props,j=En(T.type);if(j==="Bar"){var $=(k.data||[]).find(function(V){return Bte(w,V)});if($)return{graphicalItem:E,payload:$}}else if(j==="RadialBar"){var N=(k.data||[]).find(function(V){return XN(w,V)});if(N)return{graphicalItem:E,payload:N}}else if(cf(E,C)||uf(E,C)||nl(E,C)){var D=one({graphicalItem:E,activeTooltipItem:C,itemData:_.data}),G=_.activeIndex===void 0?D:_.activeIndex;return{graphicalItem:Q(Q({},E),{},{childIndex:G}),payload:nl(E,C)?_.data[D]:E.props.data[D]}}}return null}},{key:"render",value:function(){var w=this;if(!KI(this))return null;var S=this.props,b=S.children,C=S.className,O=S.width,I=S.height,E=S.style,k=S.compact,T=S.title,_=S.desc,j=ij(S,fse),$=ge(j,!1);if(k)return A.createElement(nD,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},A.createElement(Nm,Oo({},$,{width:O,height:I,title:T,desc:_}),this.renderClipPath(),tP(b,this.renderMap)));if(this.props.accessibilityLayer){var N,D;$.tabIndex=(N=this.props.tabIndex)!==null&&N!==void 0?N:0,$.role=(D=this.props.role)!==null&&D!==void 0?D:"application",$.onKeyDown=function(V){w.accessibilityManager.keyboardEvent(V)},$.onFocus=function(){w.accessibilityManager.focus()}}var G=this.parseEventsOfWrapper();return A.createElement(nD,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},A.createElement("div",Oo({className:Ie("recharts-wrapper",C),style:Q({position:"relative",cursor:"default",width:O,height:I},E)},G,{ref:function(H){w.container=H}}),A.createElement(Nm,Oo({},$,{width:O,height:I,title:T,desc:_,style:Ese}),this.renderClipPath(),tP(b,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(A.Component);Ae(g,"displayName",r),Ae(g,"defaultProps",Q({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},u)),Ae(g,"getDerivedStateFromProps",function(m,x){var y=m.dataKey,w=m.data,S=m.children,b=m.width,C=m.height,O=m.layout,I=m.stackOffset,E=m.margin,k=x.dataStartIndex,T=x.dataEndIndex;if(x.updateId===void 0){var _=hj(m);return Q(Q(Q({},_),{},{updateId:0},h(Q(Q({props:m},_),{},{updateId:0}),x)),{},{prevDataKey:y,prevData:w,prevWidth:b,prevHeight:C,prevLayout:O,prevStackOffset:I,prevMargin:E,prevChildren:S})}if(y!==x.prevDataKey||w!==x.prevData||b!==x.prevWidth||C!==x.prevHeight||O!==x.prevLayout||I!==x.prevStackOffset||!Ni(E,x.prevMargin)){var j=hj(m),$={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},N=Q(Q({},dj(x,w,O)),{},{updateId:x.updateId+1}),D=Q(Q(Q({},j),$),N);return Q(Q(Q({},D),h(Q({props:m},D),x)),{},{prevDataKey:y,prevData:w,prevWidth:b,prevHeight:C,prevLayout:O,prevStackOffset:I,prevMargin:E,prevChildren:S})}if(!Tm(S,x.prevChildren)){var G,V,H,M,z=dr(S,oo),Y=z&&(G=(V=z.props)===null||V===void 0?void 0:V.startIndex)!==null&&G!==void 0?G:k,U=z&&(H=(M=z.props)===null||M===void 0?void 0:M.endIndex)!==null&&H!==void 0?H:T,R=Y!==k||U!==T,J=!we(w),re=J&&!R?x.updateId:x.updateId+1;return Q(Q({updateId:re},h(Q(Q({props:m},x),{},{updateId:re,dataStartIndex:Y,dataEndIndex:U}),x)),{},{prevChildren:S,dataStartIndex:Y,dataEndIndex:U})}return null}),Ae(g,"renderActiveDot",function(m,x,y){var w;return A.isValidElement(m)?w=A.cloneElement(m,x):Se(m)?w=m(x):w=A.createElement(Ks,x),A.createElement(Te,{className:"recharts-active-dot",key:y},w)});var p=A.forwardRef(function(x,y){return A.createElement(g,Oo({},x,{ref:y}))});return p.displayName=g.displayName,p},mj=R0({chartName:"BarChart",GraphicalChild:Wn,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ja},{axisType:"yAxis",AxisComp:Ka}],formatAxisMap:X2}),Fse=R0({chartName:"PieChart",GraphicalChild:Gn,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:af},{axisType:"radiusAxis",AxisComp:tf}],formatAxisMap:XK,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),Lse=R0({chartName:"ComposedChart",GraphicalChild:[cl,ma,Wn,jf],axisComponents:[{axisType:"xAxis",AxisComp:Ja},{axisType:"yAxis",AxisComp:Ka},{axisType:"zAxis",AxisComp:Mf}],formatAxisMap:X2});const gj=({content:e,locale:t})=>{if(A.isValidElement(e))return v.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:e});const r=e,n=typeof r.value=="number"?r.value.toLocaleString(t):r.value;return v.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center",children:[v.jsx("span",{className:"text-2xl font-bold text-[#111827]",children:n}),r.label&&v.jsx("span",{className:"text-xs text-[#6B7280]",children:r.label})]})};gj.displayName="GatherDonutChartCenter";const vj=({segments:e,position:t})=>{const r=A.useMemo(()=>e.reduce((a,i)=>a+i.value,0),[e]),n=t==="right";return v.jsx("div",{className:n?"flex flex-col gap-2":"flex flex-wrap items-center justify-center gap-x-4 gap-y-2",children:e.map(a=>{const i=r>0?(a.value/r*100).toFixed(1):"0.0";return v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("div",{className:"h-2.5 w-2.5 flex-shrink-0 rounded-full",style:{backgroundColor:a.color}}),v.jsx("span",{className:"text-xs text-[#6B7280]",children:a.name}),v.jsxs("span",{className:"text-xs font-medium text-[#111827]",children:[i,"%"]})]},a.name)})})};vj.displayName="GatherDonutChartLegend";const q0=({height:e=260,className:t})=>v.jsxs("div",{className:F("flex flex-col items-center",t),children:[v.jsx("div",{className:"animate-pulse rounded-full bg-gray-200",style:{width:e*.7,height:e*.7},"data-testid":"gather-donut-chart-skeleton"}),v.jsx("div",{className:"mt-4 flex gap-4",children:[1,2,3].map(r=>v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("div",{className:"h-2.5 w-2.5 animate-pulse rounded-full bg-gray-200"}),v.jsx("div",{className:"h-3 w-14 animate-pulse rounded bg-gray-200"})]},r))})]});q0.displayName="GatherDonutChartSkeleton";const Gse=60,Wse=90,Vse=2,zse=260,Hse="es-EC",Xse=({active:e,payload:t,locale:r})=>{if(!e||!t?.length)return null;const n=t[0],a=n.payload.parent;return v.jsxs("div",{className:"rounded-md border border-[#E5E7EB] bg-white px-3 py-2 text-xs shadow-md",children:[v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:n.payload.color}}),v.jsx("span",{className:"font-medium text-[#111827]",children:n.name})]}),a&&v.jsx("div",{className:"mt-0.5 text-[#9CA3AF]",children:a}),v.jsx("div",{className:"mt-0.5 text-[#6B7280]",children:n.value.toLocaleString(r)})]})},Yse=(e,t)=>{const r=e.innerRadius??Gse,n=e.outerRadius??Wse,a=e.paddingAngle??Vse;return v.jsx(Gn,{data:e.data,cx:"50%",cy:"50%",innerRadius:r,outerRadius:n,paddingAngle:a,dataKey:"value",nameKey:"name",children:e.data.map((i,o)=>v.jsx(ps,{fill:i.color},`cell-${t}-${o}`))},`ring-${t}`)},yj=({rings:e,centerContent:t,legendPosition:r="bottom",height:n=zse,loading:a=!1,locale:i=Hse,className:o,"data-testid":s})=>{const l=A.useMemo(()=>e[0]?.data??[],[e]);if(a)return v.jsx(q0,{height:n,className:o});const c=r==="right",f=r!=="none";return v.jsxs("div",{className:F(c?"flex items-center gap-4":"flex flex-col",o),"data-testid":s??"gather-donut-chart",children:[v.jsxs("div",{className:F("relative",c?"min-w-0 flex-1":"w-full"),children:[v.jsx(cu,{width:"100%",height:n,children:v.jsxs(Fse,{children:[e.map((u,d)=>Yse(u,d)),v.jsx(hr,{content:v.jsx(Xse,{locale:i})})]})}),t&&v.jsx(gj,{content:t,locale:i})]}),f&&v.jsx("div",{className:c?"":"-mt-4",children:v.jsx(vj,{segments:l,position:c?"right":"bottom"})})]})};yj.displayName="GatherDonutChart";const U0=({active:e,payload:t,label:r,locale:n})=>{if(!e||!t?.length)return null;const a=t.reduce((i,o)=>i+(o.value??0),0);return v.jsxs("div",{className:"rounded-md border border-[#E5E7EB] bg-white px-3 py-2 text-xs shadow-md",children:[v.jsx("div",{className:"mb-1 font-medium text-[#111827]",children:r}),t.map(i=>v.jsxs("div",{className:"flex items-center justify-between gap-3",children:[v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:i.color}}),v.jsx("span",{className:"text-[#6B7280]",children:i.name})]}),v.jsx("span",{className:"font-medium text-[#111827]",children:i.value.toLocaleString(n)})]},i.dataKey)),v.jsxs("div",{className:"mt-1 border-t border-[#E5E7EB] pt-1 text-right font-medium text-[#111827]",children:["Total: ",a.toLocaleString(n)]})]})};U0.displayName="StackedBarChartTooltip";const Z0=({segments:e})=>v.jsx("div",{className:"flex flex-wrap items-center justify-center gap-x-4 gap-y-2 pt-2",children:e.map(t=>v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("div",{className:"h-2.5 w-2.5 flex-shrink-0 rounded-full",style:{backgroundColor:t.color}}),v.jsx("span",{className:"text-xs text-[#6B7280]",children:t.name})]},t.dataKey))});Z0.displayName="StackedBarChartLegend";const J0=({height:e=300,orientation:t="vertical",className:r})=>{if(t==="horizontal"){const i=[.85,.7,.55,.4,.25,.15];return v.jsxs("div",{className:F("flex flex-col",r),children:[v.jsx("div",{className:"flex flex-col justify-center gap-3 px-4",style:{height:e},"data-testid":"gather-stacked-bar-chart-skeleton-horizontal",children:i.map((o,s)=>v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("div",{className:"h-3 w-24 animate-pulse rounded bg-gray-200"}),v.jsx("div",{className:"h-5 animate-pulse rounded-r bg-gray-200",style:{width:`${o*100}%`}})]},s))}),v.jsx("div",{className:"mt-3 flex justify-center gap-4",children:[1,2].map(o=>v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("div",{className:"h-2.5 w-2.5 animate-pulse rounded-full bg-gray-200"}),v.jsx("div",{className:"h-3 w-14 animate-pulse rounded bg-gray-200"})]},o))})]})}const a=[.7,.9,.5,.8,.6,.4,.75];return v.jsxs("div",{className:F("flex flex-col",r),children:[v.jsx("div",{className:"flex items-end justify-around gap-2 px-8",style:{height:e},"data-testid":"gather-stacked-bar-chart-skeleton",children:a.map((i,o)=>v.jsx("div",{className:"w-8 animate-pulse rounded-t bg-gray-200",style:{height:`${i*100}%`}},o))}),v.jsx("div",{className:"mt-3 flex justify-center gap-4",children:[1,2,3].map(i=>v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("div",{className:"h-2.5 w-2.5 animate-pulse rounded-full bg-gray-200"}),v.jsx("div",{className:"h-3 w-14 animate-pulse rounded bg-gray-200"})]},i))})]})};J0.displayName="GatherStackedBarChartSkeleton";const Rse=300,qse="es-EC",Use=160,bj="stack",Zse=(e,t)=>{const r=new Map;for(const n of e){let a=0;for(const i of t){const o=n[i];typeof o=="number"&&(a+=o)}r.set(n.label,a)}return r},xj=({data:e,segments:t,orientation:r="vertical",height:n=Rse,showGrid:a=!0,showEndLabel:i=!1,categoryAxisWidth:o=Use,loading:s=!1,locale:l=qse,className:c,"data-testid":f})=>{const u=r==="horizontal",d=A.useMemo(()=>t.map(p=>p.dataKey),[t]),h=A.useMemo(()=>i&&u?Zse(e,d):new Map,[e,d,i,u]);if(s)return v.jsx(J0,{height:n,orientation:r,className:c});const g=t[t.length-1]?.dataKey;return u?v.jsxs("div",{className:F("flex flex-col",c),"data-testid":f??"gather-stacked-bar-chart-horizontal",children:[v.jsx(cu,{width:"100%",height:n,children:v.jsxs(mj,{data:e,layout:"vertical",children:[a&&v.jsx(_f,{strokeDasharray:"3 3",stroke:"#E5E7EB",horizontal:!1}),v.jsx(Ja,{type:"number",tick:{fill:"#6B7280",fontSize:12},axisLine:!1,tickLine:!1}),v.jsx(Ka,{type:"category",dataKey:"label",tick:{fill:"#374151",fontSize:12},axisLine:!1,tickLine:!1,width:o}),v.jsx(hr,{content:v.jsx(U0,{segments:t,locale:l})}),t.map(p=>{const m=p.dataKey===g;return v.jsx(Wn,{dataKey:p.dataKey,stackId:bj,fill:p.color,name:p.name,radius:p.radius??(m?[0,4,4,0]:[0,0,0,0]),children:i&&m&&v.jsx(Ar,{content:({x,y,width:w,height:S,value:b,index:C})=>{if(typeof x!="number"||typeof y!="number"||typeof w!="number"||typeof S!="number"||C===void 0)return null;const O=e[C];if(!O)return null;const I=h.get(O.label)??b??0;return v.jsx("text",{x:x+w+8,y:y+S/2,fill:"#6B7280",fontSize:11,dominantBaseline:"central","data-testid":`end-label-${C}`,children:I.toLocaleString(l)})}})},p.dataKey)})]})}),v.jsx(Z0,{segments:t})]}):v.jsxs("div",{className:F("flex flex-col",c),"data-testid":f??"gather-stacked-bar-chart",children:[v.jsx(cu,{width:"100%",height:n,children:v.jsxs(mj,{data:e,children:[a&&v.jsx(_f,{strokeDasharray:"3 3",stroke:"#E5E7EB",vertical:!1}),v.jsx(Ja,{dataKey:"label",tick:{fill:"#6B7280",fontSize:12},axisLine:!1,tickLine:!1}),v.jsx(Ka,{tick:{fill:"#6B7280",fontSize:12},axisLine:!1,tickLine:!1}),v.jsx(hr,{content:v.jsx(U0,{segments:t,locale:l})}),t.map(p=>v.jsx(Wn,{dataKey:p.dataKey,stackId:bj,fill:p.color,name:p.name,radius:p.radius??[0,0,0,0]},p.dataKey))]})}),v.jsx(Z0,{segments:t})]})};xj.displayName="GatherStackedBarChart";const Jse=({data:e,series:t,height:r=300,showArea:n=!1,showGrid:a=!0,showDots:i=!1,tooltipFormatter:o,locale:s="es-EC",loading:l=!1,className:c,"data-testid":f})=>{if(l)return v.jsx("div",{className:`animate-pulse rounded-lg bg-ui-background-subtle ${c??""}`,style:{height:r},"data-testid":f?`${f}-skeleton`:void 0});const u=h=>o?o(h):h.toLocaleString(s),d=n&&t.length===1;return v.jsx("div",{className:c,"data-testid":f,style:{width:"100%",height:r},children:v.jsx(cu,{width:"100%",height:"100%",children:v.jsxs(Lse,{data:e,children:[a&&v.jsx(_f,{strokeDasharray:"3 3",stroke:Ei.grid,vertical:!1}),v.jsx(Ja,{dataKey:"label",tick:{fill:Ei.axisTick,fontSize:12},axisLine:!1,tickLine:!1}),v.jsx(Ka,{tick:{fill:Ei.axisTick,fontSize:12},axisLine:!1,tickLine:!1,tickFormatter:h=>h.toLocaleString(s)}),v.jsx(hr,{formatter:(h,g)=>{const p=t.find(m=>m.key===g);return[u(h),p?.label??g]},contentStyle:{borderRadius:"8px",border:`1px solid ${Ei.tooltipBorder}`,fontSize:"12px"}}),t.length>1&&v.jsx(Ma,{formatter:h=>t.find(p=>p.key===h)?.label??h}),t.map(h=>d?v.jsx(ma,{type:"monotone",dataKey:h.key,stroke:h.color,strokeWidth:2,fill:h.color,fillOpacity:.1,dot:i?{r:3,fill:Ei.tooltipBg,stroke:h.color,strokeWidth:2}:!1,activeDot:{r:4,strokeWidth:2}},h.key):v.jsx(cl,{type:"monotone",dataKey:h.key,stroke:h.color,strokeWidth:2,strokeDasharray:h.dashed?"5 5":void 0,dot:i?{r:h.dashed?2.5:3,fill:h.dashed?h.color:Ei.tooltipBg,stroke:h.color,strokeWidth:h.dashed?1:2,opacity:h.dashed?.6:1}:!1,activeDot:{r:4,strokeWidth:2}},h.key))]})})})},Kse={empty:NO.empty,levels:[...NO.levels]},Qse=["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],ele=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],Vr=13,Vf=2,tle=({data:e,year:t,colorScale:r=Kse,onCellClick:n,tooltipFormatter:a,locale:i="es-EC",loading:o=!1,legendPosition:s="center",showAllDayLabels:l=!0,align:c="left",className:f,"data-testid":u})=>{const{dataMap:d,maxValue:h}=A.useMemo(()=>{const y=new Map;let w=0;for(const S of e)y.set(S.date,S.value),S.value>w&&(w=S.value);return{dataMap:y,maxValue:w}},[e]),g=y=>{if(y===0||h===0)return r.empty;const w=y/h,S=Math.min(Math.floor(w*r.levels.length),r.levels.length-1);return r.levels[S]},p=(y,w)=>a?a(y,w):`${new Date(`${y}T12:00:00`).toLocaleDateString(i,{weekday:"short",day:"numeric",month:"short"})}: ${w.toLocaleString(i)} leads`,m=A.useMemo(()=>{const y=[],w=new Date(`${t}-01-01T12:00:00`),S=new Date(`${t}-12-31T12:00:00`),b=w.getDay(),C=new Date(w);C.setDate(C.getDate()-b);let O=0;for(;C<=S||O<53;){const I=[];for(let E=0;E<7;E++){const k=C.toISOString().split("T")[0],T=C.getFullYear()===t;I.push(T?{date:k,value:d.get(k)??0}:null),C.setDate(C.getDate()+1)}if(y.push(I),O++,C.getFullYear()>t&&C.getDay()===0)break}return y},[t,d]),x=A.useMemo(()=>{const y=[];let w=-1;return m.forEach((S,b)=>{for(const C of S)if(C){const O=new Date(`${C.date}T12:00:00`).getMonth();O!==w&&(y.push({label:ele[O],weekStart:b}),w=O);break}}),y},[m]);return o?v.jsx("div",{className:`animate-pulse rounded-lg bg-ui-background-subtle ${f??""}`,style:{height:140},"data-testid":u?`${u}-skeleton`:void 0}):v.jsxs("div",{className:f,"data-testid":u,children:[v.jsxs("div",{className:"flex gap-2",children:[v.jsx("div",{className:"flex flex-col gap-[2px] pt-5",children:Qse.map((y,w)=>v.jsx("div",{className:"text-[10px] leading-none text-ui-text-muted",style:{height:Vr},children:l||w%2===1?y:""},y))}),v.jsx("div",{className:"flex-1 overflow-x-auto pb-2",children:v.jsxs("div",{className:c==="center"?"mx-auto":"",style:{minWidth:`${m.length*(Vr+Vf)}px`,width:"fit-content"},children:[v.jsx("div",{className:"mb-1 flex",style:{height:16,minWidth:`${m.length*(Vr+Vf)}px`},children:x.map((y,w)=>{const b=((x[w+1]?.weekStart??m.length)-y.weekStart)*(Vr+Vf);return v.jsx("div",{className:"text-[10px] text-ui-text-muted",style:{width:b,minWidth:b},children:y.label},`${y.label}-${w}`)})}),v.jsx("div",{className:"flex gap-[2px]",style:{minWidth:`${m.length*(Vr+Vf)}px`},children:m.map((y,w)=>v.jsx("div",{className:"flex flex-col gap-[2px]",children:y.map((S,b)=>v.jsx("div",{className:"cursor-default rounded-sm transition-colors",style:{width:Vr,height:Vr,backgroundColor:S?g(S.value):"transparent"},title:S?p(S.date,S.value):void 0,onClick:()=>S&&n?.(S.date,S.value),"data-testid":S?`heatmap-cell-${S.date}`:void 0},`${w}-${b}`))},w))})]})})]}),v.jsxs("div",{className:`mt-3 flex items-center gap-1 text-[10px] text-ui-text-muted ${s==="left"?"justify-start":s==="right"?"justify-end":"justify-center"}`,children:[v.jsx("span",{children:"Menos"}),v.jsx("div",{className:"rounded-sm",style:{width:Vr,height:Vr,backgroundColor:r.empty}}),r.levels.map((y,w)=>v.jsx("div",{className:"rounded-sm",style:{width:Vr,height:Vr,backgroundColor:y}},w)),v.jsx("span",{children:"Más"})]})]})},wj={default:"bg-gather-gray-100",error:"bg-danger-50",warning:"bg-warning-50",success:"bg-success-50",info:"bg-info-50"},Sj={default:"text-gather-gray-600",error:"text-danger-500",warning:"text-warning-500",success:"text-success-600",info:"text-info-500"},Cj={default:"gather-primary",error:"gather-error",warning:"gather-warning",success:"gather-success",info:"gather-info"},Aj={default:"Confirmar",error:"Eliminar",warning:"Continuar",success:"Aceptar",info:"Entendido"},rle={sm:"w-full max-w-sm",md:"w-full max-w-md",lg:"w-full max-w-lg",xl:"w-full max-w-xl",fullscreen:"w-screen h-screen rounded-none"};function nle(e){const t={className:"h-6 w-6"};switch(e){case"error":return v.jsx(rw,{...t});case"warning":return v.jsx(rw,{...t});case"success":return v.jsx(pF,{...t});case"info":return v.jsx(ew,{...t});default:return v.jsx(mF,{...t})}}const Oj=({open:e,onOpenChange:t,title:r,description:n,children:a,variant:i="default",icon:o,iconContainerClassName:s,showIcon:l=!0,size:c="sm",confirmLabel:f,cancelLabel:u="Cancelar",onConfirm:d,onCancel:h,confirmVariant:g,disableConfirm:p=!1,hideCancelButton:m=!1,hideConfirmButton:x=!1,isLoading:y=!1,loadingText:w,closeOnOverlayClick:S=!0,closeOnEsc:b=!0,className:C,style:O,overlayClassName:I,bodyClassName:E,buttonsClassName:k,zIndex:T=50})=>{const _=A.useRef(null),j=A.useRef(null),$=A.useMemo(()=>f??Aj[i],[f,i]),N=A.useMemo(()=>g??Cj[i],[g,i]),D=A.useMemo(()=>o===null?null:o!==void 0?o:nle(i),[o,i]),G=A.useCallback(()=>{y||(h?h():t(!1))},[y,h,t]),V=A.useCallback(()=>{y||p||d()},[y,p,d]),H=A.useCallback(()=>{S&&!y&&t(!1)},[S,y,t]);if(A.useEffect(()=>{if(!e||!b)return;const Y=U=>{U.key==="Escape"&&!y&&(U.preventDefault(),U.stopPropagation(),t(!1))};return document.addEventListener("keydown",Y),()=>document.removeEventListener("keydown",Y)},[e,b,y,t]),A.useEffect(()=>{if(!(!e||document.body.style.overflow==="hidden"))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]),A.useEffect(()=>{if(!e)return;j.current=document.activeElement;const Y=setTimeout(()=>{_.current?.focus()},50);return()=>{clearTimeout(Y),j.current instanceof HTMLElement&&j.current.focus()}},[e]),!e)return null;const M=T*10,z=v.jsxs("div",{className:"gather-confirm-dialog-root",children:[v.jsx("div",{className:F("fixed inset-0 bg-black/40 transition-opacity duration-200",I),style:{zIndex:M},onClick:H,"aria-hidden":"true"}),v.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",style:{zIndex:M+1},children:v.jsx("div",{ref:_,role:"alertdialog","aria-modal":"true","aria-labelledby":r?"gather-confirm-dialog-title":void 0,"aria-describedby":n?"gather-confirm-dialog-description":void 0,tabIndex:-1,className:F("overflow-hidden rounded-lg border border-gather-gray-200 bg-white shadow-xl",rle[c],C),style:O,onClick:Y=>Y.stopPropagation(),children:v.jsxs("div",{className:F("flex flex-col items-center px-6 py-6 text-center",E),children:[l&&D&&v.jsx("div",{className:F("mb-4 flex h-12 w-12 items-center justify-center rounded-full",wj[i],Sj[i],s),children:D}),r&&v.jsx("h2",{id:"gather-confirm-dialog-title",className:"text-xl font-semibold leading-tight text-gather-gray-900",children:r}),n&&v.jsx("p",{id:"gather-confirm-dialog-description",className:"mt-2 text-sm leading-relaxed text-gather-gray-500",children:n}),a&&v.jsx("div",{className:"mt-3 w-full",children:a}),(!m||!x)&&v.jsxs("div",{className:F("mt-6 flex w-full gap-3",k),children:[!m&&v.jsx(mn,{variant:"gather-outline",onClick:G,disabled:y,className:"h-11 min-w-0 flex-1",children:u}),!x&&v.jsx(mn,{variant:N,onClick:V,disabled:p||y,loading:y,loadingText:w??$,className:"h-11 min-w-0 flex-1",children:$})]})]})})})]});return Qa.createPortal(z,document.body)};Oj.displayName="GatherConfirmDialog";const ct=({className:e,style:t,variant:r="pulse","data-testid":n})=>v.jsx("div",{className:F("rounded bg-secondary-200",r==="pulse"&&"animate-pulse",r==="wave"&&"gather-shimmer-wave relative overflow-hidden",e),style:t,"aria-hidden":"true","data-testid":n});ct.displayName="GatherShimmer";const Ij=({loading:e,skeleton:t,children:r,className:n,"data-testid":a})=>v.jsx("div",{className:F("relative",n),"aria-live":"polite","aria-busy":e,"data-testid":a,children:e?v.jsx("div",{className:"animate-in fade-in duration-200",children:t},"skeleton"):v.jsx("div",{className:"animate-in fade-in duration-200",children:r},"content")});Ij.displayName="GatherPageSkeleton";const ale={emerald:{iconBg:"bg-emerald-50",iconText:"text-emerald-600",badgeBg:"bg-emerald-50",badgeText:"text-emerald-700",badgeRing:"ring-emerald-200",checkBg:"bg-emerald-100",checkIcon:"text-emerald-600"},amber:{iconBg:"bg-amber-50",iconText:"text-amber-600",badgeBg:"bg-amber-50",badgeText:"text-amber-700",badgeRing:"ring-amber-200",checkBg:"bg-amber-100",checkIcon:"text-amber-600"},sky:{iconBg:"bg-sky-50",iconText:"text-sky-600",badgeBg:"bg-sky-50",badgeText:"text-sky-700",badgeRing:"ring-sky-200",checkBg:"bg-sky-100",checkIcon:"text-sky-600"}};function ile(){return v.jsxs("div",{className:"space-y-6 p-6 pb-16",children:[v.jsx(ct,{className:"h-3.5 w-44"}),v.jsx(ct,{className:"h-8 w-52"}),v.jsxs("div",{className:"flex gap-0 border-b border-secondary-200",children:[v.jsx(ct,{className:"h-10 w-28 rounded-none rounded-t"}),v.jsx(ct,{className:"ml-1 h-10 w-28 rounded-none rounded-t"})]}),v.jsx("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-4 mt-2",children:Array.from({length:4}).map((e,t)=>v.jsxs("div",{className:"rounded-lg border border-secondary-200 bg-white p-4 space-y-3",children:[v.jsx(ct,{className:"h-3 w-3/4"}),v.jsx(ct,{className:"h-7 w-1/2"}),v.jsx(ct,{className:"h-3 w-2/3"})]},t))}),v.jsxs("div",{className:"rounded-lg border border-secondary-200 bg-white p-4 space-y-4",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx(ct,{className:"h-5 w-32"}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(ct,{className:"h-8 w-24 rounded-md"}),v.jsx(ct,{className:"h-8 w-24 rounded-md"})]})]}),v.jsxs("div",{className:"flex gap-4 border-b border-secondary-100 pb-2",children:[v.jsx(ct,{className:"h-3.5 flex-[2]"}),v.jsx(ct,{className:"h-3.5 flex-1"}),v.jsx(ct,{className:"h-3.5 flex-1"}),v.jsx(ct,{className:"h-3.5 w-16 shrink-0"})]}),Array.from({length:7}).map((e,t)=>v.jsxs("div",{className:"flex items-center gap-4 border-b border-secondary-50 py-2.5 last:border-b-0",children:[v.jsxs("div",{className:"flex items-center gap-2 flex-[2]",children:[v.jsx(ct,{className:"h-7 w-7 rounded-full shrink-0"}),v.jsxs("div",{className:"space-y-1.5 flex-1",children:[v.jsx(ct,{className:"h-3.5 w-3/4"}),v.jsx(ct,{className:"h-3 w-1/2"})]})]}),v.jsx(ct,{className:"h-3.5 flex-1"}),v.jsx(ct,{className:"h-3.5 flex-1"}),v.jsx(ct,{className:"h-6 w-16 shrink-0 rounded-full"})]},t)),v.jsx("div",{className:"flex items-center justify-center gap-1 pt-2",children:Array.from({length:5}).map((e,t)=>v.jsx(ct,{className:"h-8 w-8 rounded-md"},t))})]})]})}const Pj=({icon:e,colorAccent:t,title:r,description:n,benefits:a,background:i,className:o,"data-testid":s})=>{const l=ale[t];return v.jsxs("div",{className:F("relative min-h-[calc(100vh-3rem)] overflow-hidden bg-secondary-50",o),"data-testid":s,children:[v.jsx("div",{className:"pointer-events-none absolute inset-0 select-none overflow-hidden opacity-50 blur-sm","aria-hidden":"true",children:i??v.jsx(ile,{})}),v.jsx("div",{className:"absolute inset-0 bg-white/50","aria-hidden":"true"}),v.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-6",children:v.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-secondary-200 bg-white p-8 shadow-2xl",children:[v.jsx("div",{className:F("mb-5 inline-flex h-14 w-14 items-center justify-center rounded-2xl",l.iconBg),children:v.jsx("span",{className:l.iconText,children:e})}),v.jsx("div",{className:"mb-3 flex items-center gap-2",children:v.jsxs("span",{className:F("inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-semibold ring-1",l.badgeBg,l.badgeText,l.badgeRing),children:[v.jsx(gF,{className:"h-3 w-3","aria-hidden":"true"}),"MUY PRONTO"]})}),v.jsx("h2",{className:"text-xl font-bold text-text-primary",children:r}),v.jsx("p",{className:"mt-2 text-sm leading-relaxed text-text-muted",children:n}),v.jsx("div",{className:"my-5 border-t border-secondary-200"}),v.jsx("ul",{className:"space-y-2.5",children:a.map((c,f)=>v.jsxs("li",{className:"flex items-start gap-2.5 text-sm text-text-secondary",children:[v.jsx("span",{className:F("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full",l.checkBg),"aria-hidden":"true",children:v.jsx(Qx,{className:F("h-2.5 w-2.5",l.checkIcon),strokeWidth:3})}),c]},f))})]})})]})};Pj.displayName="GatherComingSoonPage",ae.DropdownGatherCalendar=Yh,ae.GATHER_BI_COLORS=SY,ae.GATHER_CONVERSION_CHIP_DEFAULT_NULL_LABEL=wO,ae.GATHER_CONVERSION_CHIP_DEFAULT_THRESHOLDS=xO,ae.GatherBadge=mO,ae.GatherButton=mn,ae.GatherCalendar=_c,ae.GatherCard=gO,ae.GatherCatalogSelector=ap,ae.GatherCheckBox=Uh,ae.GatherCheckboxList=yO,ae.GatherCollapsibleSection=vO,ae.GatherCombobox=rp,ae.GatherComingSoonPage=Pj,ae.GatherConfirmDialog=Oj,ae.GatherConversionChip=CO,ae.GatherDatePicker=pO,ae.GatherDatePickerInput=Rh,ae.GatherDonutChart=yj,ae.GatherDonutChartSkeleton=q0,ae.GatherEmptyState=bO,ae.GatherFormBuilder=YX,ae.GatherHeatmap=tle,ae.GatherInput=Nh,ae.GatherInputSelect=Zh,ae.GatherLabel=hw,ae.GatherLineChart=Jse,ae.GatherLoader=sp,ae.GatherLoaderIcon=op,ae.GatherLoadingDots=xc,ae.GatherMetricCard=jO,ae.GatherMetricCardSkeleton=dp,ae.GatherModal=hO,ae.GatherModalFooter=Mc,ae.GatherModalHeader=ip,ae.GatherMultiSelect=Yd,ae.GatherPageSkeleton=Ij,ae.GatherRadioButton=tp,ae.GatherSectionDivider=lO,ae.GatherSelect=yh,ae.GatherSelectGroup=H3,ae.GatherSelectItem=Wo,ae.GatherSelectLabel=X3,ae.GatherSelectScrollDownButton=bC,ae.GatherSelectScrollUpButton=yC,ae.GatherSelectSeparator=vC,ae.GatherShimmer=ct,ae.GatherStackedBarChart=xj,ae.GatherStackedBarChartSkeleton=J0,ae.GatherSwitch=ud,ae.GatherTable=nw,ae.GatherTableBody=xF,ae.GatherTableCaption=ow,ae.GatherTableFooter=iw,ae.GatherTableHeader=ad,ae.GatherTableRow=aw,ae.GatherTextarea=Jh,ae.GatherTooltip=lp,ae.GatherTreeSelect=kO,ae.VARIANT_BORDER_COLORS=hp,ae.VARIANT_CONFIRM_BUTTON=Cj,ae.VARIANT_DEFAULT_CONFIRM_LABEL=Aj,ae.VARIANT_ICON_BG=wj,ae.VARIANT_ICON_FG=Sj,ae.alphaFilter=WB,ae.alphanumericFilter=VB,ae.cn=F,ae.convertToTimeZoneGatherDatePicker=pn,ae.createColumns=YB,ae.createFlexibleColumns=RB,ae.currencyFormatter=BB,ae.debounce=Cx,ae.deepClone=xl,ae.deepEqual=bl,ae.filterCatalogGroups=uO,ae.filterOptions=cO,ae.flattenFields=Cl,ae.generateValidationRules=qx,ae.generateYearsGatherDatePicker=zx,ae.getAllPaths=yl,ae.getBoundaryGatherDateInTimeZone=Qf,ae.getLayoutClasses=ed,ae.getNestedField=ei,ae.getNormalizeCustomGatherDate=Yx,ae.getNormalizeRangeGatherDate=Rx,ae.getNormalizeToEcuadorRangeGatherDate=$B,ae.getNormalizeToNoonEcuadorGatherDate=jB,ae.getOrderedFields=Ux,ae.getPresetsGatherDatePicker=Hx,ae.getSpecificGatherTimeInTimeZone=Xx,ae.integerFilter=GB,ae.numericFilter=LB,ae.parseCurrency=zB,ae.parseNumeric=XB,ae.parsePercent=HB,ae.percentFormatter=FB,ae.resolveDisplayValue=fO,ae.truncateText=np,ae.useSelectedOption=tx,ae.useTableSort=Ej,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})}));
115
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sj(e,t){if(e){if(typeof e=="string")return X0(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 X0(e,t)}}function Ase(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ose(e){if(Array.isArray(e))return X0(e)}function X0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function lj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Q(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lj(Object(r),!0).forEach(function(n){Ae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ae(e,t,r){return t=cj(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cj(e){var t=Ise(e,"string");return Ao(t)=="symbol"?t:t+""}function Ise(e,t){if(Ao(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ao(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pse={xAxis:["bottom","top"],yAxis:["left","right"]},Ese={width:"100%",height:"100%"},uj={x:0,y:0};function Gf(e){return e}var _se=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},Tse=function(t,r,n,a){var i=r.find(function(f){return f&&f.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,s=a.radius;return Q(Q(Q({},a),et(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,c=a.angle;return Q(Q(Q({},a),et(a.cx,a.cy,l,c)),{},{angle:c,radius:l})}return uj},Wf=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,o=(n??[]).reduce(function(s,l){var c=l.props.data;return c&&c.length?[].concat(Io(s),Io(c)):s},[]);return o.length>0?o:t&&t.length&&se(a)&&se(i)?t.slice(a,i+1):[]};function fj(e){return e==="number"?[0,"auto"]:void 0}var Y0=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,s=Wf(r,t);return n<0||!i||!i.length||n>=s.length?null:i.reduce(function(l,c){var f,u=(f=c.props.data)!==null&&f!==void 0?f:r;u&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(u=u.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=u===void 0?s:u;d=Wc(h,o.dataKey,a)}else d=u&&u[n]||s[n];return d?[].concat(Io(l),[GN(c,d)]):l},[])},dj=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=_se(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,f=wK(o,s,c,l);if(f>=0&&c){var u=c[f]&&c[f].value,d=Y0(t,r,f,u),h=Tse(n,s,f,i);return{activeTooltipIndex:f,activeLabel:u,activePayload:d,activeCoordinate:h}}return null},kse=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,f=t.layout,u=t.children,d=t.stackOffset,h=_N(f,i);return n.reduce(function(g,p){var m,x=p.type.defaultProps!==void 0?Q(Q({},p.type.defaultProps),p.props):p.props,y=x.type,w=x.dataKey,S=x.allowDataOverflow,b=x.allowDuplicatedCategory,C=x.scale,O=x.ticks,I=x.includeHidden,E=x[o];if(g[E])return g;var k=Wf(t.data,{graphicalItems:a.filter(function(Y){var U,R=o in Y.props?Y.props[o]:(U=Y.type.defaultProps)===null||U===void 0?void 0:U[o];return R===E}),dataStartIndex:l,dataEndIndex:c}),T=k.length,_,j,$;nse(x.domain,S,y)&&(_=fb(x.domain,null,S),h&&(y==="number"||C!=="auto")&&($=$s(k,w,"category")));var N=fj(y);if(!_||_.length===0){var D,G=(D=x.domain)!==null&&D!==void 0?D:N;if(w){if(_=$s(k,w,y),y==="category"&&h){var V=pR(_);b&&V?(j=_,_=hf(0,T)):b||(_=LN(G,_,p).reduce(function(Y,U){return Y.indexOf(U)>=0?Y:[].concat(Io(Y),[U])},[]))}else if(y==="category")b?_=_.filter(function(Y){return Y!==""&&!we(Y)}):_=LN(G,_,p).reduce(function(Y,U){return Y.indexOf(U)>=0||U===""||we(U)?Y:[].concat(Io(Y),[U])},[]);else if(y==="number"){var H=IK(k,a.filter(function(Y){var U,R,J=o in Y.props?Y.props[o]:(U=Y.type.defaultProps)===null||U===void 0?void 0:U[o],re="hide"in Y.props?Y.props.hide:(R=Y.type.defaultProps)===null||R===void 0?void 0:R.hide;return J===E&&(I||!re)}),w,i,f);H&&(_=H)}h&&(y==="number"||C!=="auto")&&($=$s(k,w,"category"))}else h?_=hf(0,T):s&&s[E]&&s[E].hasStack&&y==="number"?_=d==="expand"?[0,1]:$N(s[E].stackGroups,l,c):_=EN(k,a.filter(function(Y){var U=o in Y.props?Y.props[o]:Y.type.defaultProps[o],R="hide"in Y.props?Y.props.hide:Y.type.defaultProps.hide;return U===E&&(I||!R)}),y,f,!0);if(y==="number")_=L0(u,_,E,i,O),G&&(_=fb(G,_,S));else if(y==="category"&&G){var M=G,z=_.every(function(Y){return M.indexOf(Y)>=0});z&&(_=M)}}return Q(Q({},g),{},Ae({},E,Q(Q({},x),{},{axisType:i,domain:_,categoricalDomain:$,duplicateDomain:j,originalDomain:(m=x.domain)!==null&&m!==void 0?m:N,isCategorical:h,layout:f})))},{})},Nse=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,f=t.layout,u=t.children,d=Wf(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:c}),h=d.length,g=_N(f,i),p=-1;return n.reduce(function(m,x){var y=x.type.defaultProps!==void 0?Q(Q({},x.type.defaultProps),x.props):x.props,w=y[o],S=fj("number");if(!m[w]){p++;var b;return g?b=hf(0,h):s&&s[w]&&s[w].hasStack?(b=$N(s[w].stackGroups,l,c),b=L0(u,b,w,i)):(b=fb(S,EN(d,n.filter(function(C){var O,I,E=o in C.props?C.props[o]:(O=C.type.defaultProps)===null||O===void 0?void 0:O[o],k="hide"in C.props?C.props.hide:(I=C.type.defaultProps)===null||I===void 0?void 0:I.hide;return E===w&&!k}),"number",f),a.defaultProps.allowDataOverflow),b=L0(u,b,w,i)),Q(Q({},m),{},Ae({},w,Q(Q({axisType:i},a.defaultProps),{},{hide:!0,orientation:fr(Pse,"".concat(i,".").concat(p%2),null),domain:b,originalDomain:S,isCategorical:g,layout:f})))}return m},{})},Mse=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,f=t.children,u="".concat(a,"Id"),d=Xt(f,i),h={};return d&&d.length?h=kse(t,{axes:d,graphicalItems:o,axisType:a,axisIdKey:u,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(h=Nse(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:u,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),h},Dse=function(t){var r=na(t),n=Fn(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Yv(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Gu(r,n)}},hj=function(t){var r=t.children,n=t.defaultShowTooltip,a=dr(r,oo),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},jse=function(t){return!t||!t.length?!1:t.some(function(r){var n=En(r&&r.type);return n&&n.indexOf("Bar")>=0})},pj=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},$se=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,c=n.width,f=n.height,u=n.children,d=n.margin||{},h=dr(u,oo),g=dr(u,Ma),p=Object.keys(l).reduce(function(b,C){var O=l[C],I=O.orientation;return!O.mirror&&!O.hide?Q(Q({},b),{},Ae({},I,b[I]+O.width)):b},{left:d.left||0,right:d.right||0}),m=Object.keys(o).reduce(function(b,C){var O=o[C],I=O.orientation;return!O.mirror&&!O.hide?Q(Q({},b),{},Ae({},I,fr(b,"".concat(I))+O.height)):b},{top:d.top||0,bottom:d.bottom||0}),x=Q(Q({},m),p),y=x.bottom;h&&(x.bottom+=h.props.height||oo.defaultProps.height),g&&r&&(x=AK(x,a,n,r));var w=c-x.left-x.right,S=f-x.top-x.bottom;return Q(Q({brushBottom:y},x),{},{width:Math.max(w,0),height:Math.max(S,0)})},Bse=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},R0=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,c=t.legendContent,f=t.formatAxisMap,u=t.defaultProps,d=function(x,y){var w=y.graphicalItems,S=y.stackGroups,b=y.offset,C=y.updateId,O=y.dataStartIndex,I=y.dataEndIndex,E=x.barSize,k=x.layout,T=x.barGap,_=x.barCategoryGap,j=x.maxBarSize,$=pj(k),N=$.numericAxisName,D=$.cateAxisName,G=jse(w),V=[];return w.forEach(function(H,M){var z=Wf(x.data,{graphicalItems:[H],dataStartIndex:O,dataEndIndex:I}),Y=H.type.defaultProps!==void 0?Q(Q({},H.type.defaultProps),H.props):H.props,U=Y.dataKey,R=Y.maxBarSize,J=Y["".concat(N,"Id")],re=Y["".concat(D,"Id")],K={},ne=l.reduce(function(Rt,qt){var dn,Hr,er=y["".concat(qt.axisType,"Map")],L=Y["".concat(qt.axisType,"Id")];er&&er[L]||qt.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?Qt(!1,"Specifying a(n) ".concat(qt.axisType,"Id requires a corresponding ").concat(qt.axisType,"Id on the targeted graphical component ").concat((dn=H==null||(Hr=H.type)===null||Hr===void 0?void 0:Hr.displayName)!==null&&dn!==void 0?dn:"")):Qt());var X=er[L];return Q(Q({},Rt),{},Ae(Ae({},qt.axisType,X),"".concat(qt.axisType,"Ticks"),Fn(X)))},K),q=ne[D],Z=ne["".concat(D,"Ticks")],ie=S&&S[J]&&S[J].hasStack&&jK(H,S[J].stackGroups),B=En(H.type).indexOf("Bar")>=0,ce=Gu(q,Z),ee=[],ve=G&&SK({barSize:E,stackGroups:S,totalSize:Bse(ne,D)});if(B){var Ee,Xe,_t=we(R)?j:R,Wt=(Ee=(Xe=Gu(q,Z,!0))!==null&&Xe!==void 0?Xe:_t)!==null&&Ee!==void 0?Ee:0;ee=CK({barGap:T,barCategoryGap:_,bandSize:Wt!==ce?Wt:ce,sizeList:ve[re],maxBarSize:_t}),Wt!==ce&&(ee=ee.map(function(Rt){return Q(Q({},Rt),{},{position:Q(Q({},Rt.position),{},{offset:Rt.position.offset-Wt/2})})}))}var zr=H&&H.type&&H.type.getComposedData;zr&&V.push({props:Q(Q({},zr(Q(Q({},ne),{},{displayedData:z,props:x,dataKey:U,item:H,bandSize:ce,barPosition:ee,offset:b,stackedData:ie,layout:k,dataStartIndex:O,dataEndIndex:I}))),{},Ae(Ae(Ae({key:H.key||"item-".concat(M)},N,ne[N]),D,ne[D]),"animationId",C)),childIndex:PR(H,x.children),item:H})}),V},h=function(x,y){var w=x.props,S=x.dataStartIndex,b=x.dataEndIndex,C=x.updateId;if(!KI({props:w}))return null;var O=w.children,I=w.layout,E=w.stackOffset,k=w.data,T=w.reverseStackOrder,_=pj(I),j=_.numericAxisName,$=_.cateAxisName,N=Xt(O,n),D=MK(k,N,"".concat(j,"Id"),"".concat($,"Id"),E,T),G=l.reduce(function(Y,U){var R="".concat(U.axisType,"Map");return Q(Q({},Y),{},Ae({},R,Mse(w,Q(Q({},U),{},{graphicalItems:N,stackGroups:U.axisType===j&&D,dataStartIndex:S,dataEndIndex:b}))))},{}),V=$se(Q(Q({},G),{},{props:w,graphicalItems:N}),y?.legendBBox);Object.keys(G).forEach(function(Y){G[Y]=f(w,G[Y],V,Y.replace("Map",""),r)});var H=G["".concat($,"Map")],M=Dse(H),z=d(w,Q(Q({},G),{},{dataStartIndex:S,dataEndIndex:b,updateId:C,graphicalItems:N,stackGroups:D,offset:V}));return Q(Q({formattedGraphicalItems:z,graphicalItems:N,offset:V,stackGroups:D},M),G)},g=(function(m){function x(y){var w,S,b;return gse(this,x),b=bse(this,x,[y]),Ae(b,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ae(b,"accessibilityManager",new rse),Ae(b,"handleLegendBBoxUpdate",function(C){if(C){var O=b.state,I=O.dataStartIndex,E=O.dataEndIndex,k=O.updateId;b.setState(Q({legendBBox:C},h({props:b.props,dataStartIndex:I,dataEndIndex:E,updateId:k},Q(Q({},b.state),{},{legendBBox:C}))))}}),Ae(b,"handleReceiveSyncEvent",function(C,O,I){if(b.props.syncId===C){if(I===b.eventEmitterSymbol&&typeof b.props.syncMethod!="function")return;b.applySyncEvent(O)}}),Ae(b,"handleBrushChange",function(C){var O=C.startIndex,I=C.endIndex;if(O!==b.state.dataStartIndex||I!==b.state.dataEndIndex){var E=b.state.updateId;b.setState(function(){return Q({dataStartIndex:O,dataEndIndex:I},h({props:b.props,dataStartIndex:O,dataEndIndex:I,updateId:E},b.state))}),b.triggerSyncEvent({dataStartIndex:O,dataEndIndex:I})}}),Ae(b,"handleMouseEnter",function(C){var O=b.getMouseInfo(C);if(O){var I=Q(Q({},O),{},{isTooltipActive:!0});b.setState(I),b.triggerSyncEvent(I);var E=b.props.onMouseEnter;Se(E)&&E(I,C)}}),Ae(b,"triggeredAfterMouseMove",function(C){var O=b.getMouseInfo(C),I=O?Q(Q({},O),{},{isTooltipActive:!0}):{isTooltipActive:!1};b.setState(I),b.triggerSyncEvent(I);var E=b.props.onMouseMove;Se(E)&&E(I,C)}),Ae(b,"handleItemMouseEnter",function(C){b.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),Ae(b,"handleItemMouseLeave",function(){b.setState(function(){return{isTooltipActive:!1}})}),Ae(b,"handleMouseMove",function(C){C.persist(),b.throttleTriggeredAfterMouseMove(C)}),Ae(b,"handleMouseLeave",function(C){b.throttleTriggeredAfterMouseMove.cancel();var O={isTooltipActive:!1};b.setState(O),b.triggerSyncEvent(O);var I=b.props.onMouseLeave;Se(I)&&I(O,C)}),Ae(b,"handleOuterEvent",function(C){var O=IR(C),I=fr(b.props,"".concat(O));if(O&&Se(I)){var E,k;/.*touch.*/i.test(O)?k=b.getMouseInfo(C.changedTouches[0]):k=b.getMouseInfo(C),I((E=k)!==null&&E!==void 0?E:{},C)}}),Ae(b,"handleClick",function(C){var O=b.getMouseInfo(C);if(O){var I=Q(Q({},O),{},{isTooltipActive:!0});b.setState(I),b.triggerSyncEvent(I);var E=b.props.onClick;Se(E)&&E(I,C)}}),Ae(b,"handleMouseDown",function(C){var O=b.props.onMouseDown;if(Se(O)){var I=b.getMouseInfo(C);O(I,C)}}),Ae(b,"handleMouseUp",function(C){var O=b.props.onMouseUp;if(Se(O)){var I=b.getMouseInfo(C);O(I,C)}}),Ae(b,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&b.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),Ae(b,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&b.handleMouseDown(C.changedTouches[0])}),Ae(b,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&b.handleMouseUp(C.changedTouches[0])}),Ae(b,"handleDoubleClick",function(C){var O=b.props.onDoubleClick;if(Se(O)){var I=b.getMouseInfo(C);O(I,C)}}),Ae(b,"handleContextMenu",function(C){var O=b.props.onContextMenu;if(Se(O)){var I=b.getMouseInfo(C);O(I,C)}}),Ae(b,"triggerSyncEvent",function(C){b.props.syncId!==void 0&&W0.emit(V0,b.props.syncId,C,b.eventEmitterSymbol)}),Ae(b,"applySyncEvent",function(C){var O=b.props,I=O.layout,E=O.syncMethod,k=b.state.updateId,T=C.dataStartIndex,_=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)b.setState(Q({dataStartIndex:T,dataEndIndex:_},h({props:b.props,dataStartIndex:T,dataEndIndex:_,updateId:k},b.state)));else if(C.activeTooltipIndex!==void 0){var j=C.chartX,$=C.chartY,N=C.activeTooltipIndex,D=b.state,G=D.offset,V=D.tooltipTicks;if(!G)return;if(typeof E=="function")N=E(V,C);else if(E==="value"){N=-1;for(var H=0;H<V.length;H++)if(V[H].value===C.activeLabel){N=H;break}}var M=Q(Q({},G),{},{x:G.left,y:G.top}),z=Math.min(j,M.x+M.width),Y=Math.min($,M.y+M.height),U=V[N]&&V[N].value,R=Y0(b.state,b.props.data,N),J=V[N]?{x:I==="horizontal"?V[N].coordinate:z,y:I==="horizontal"?Y:V[N].coordinate}:uj;b.setState(Q(Q({},C),{},{activeLabel:U,activeCoordinate:J,activePayload:R,activeTooltipIndex:N}))}else b.setState(C)}),Ae(b,"renderCursor",function(C){var O,I=b.state,E=I.isTooltipActive,k=I.activeCoordinate,T=I.activePayload,_=I.offset,j=I.activeTooltipIndex,$=I.tooltipAxisBandSize,N=b.getTooltipEventType(),D=(O=C.props.active)!==null&&O!==void 0?O:E,G=b.props.layout,V=C.key||"_recharts-cursor";return A.createElement(cse,{key:V,activeCoordinate:k,activePayload:T,activeTooltipIndex:j,chartName:r,element:C,isActive:D,layout:G,offset:_,tooltipAxisBandSize:$,tooltipEventType:N})}),Ae(b,"renderPolarAxis",function(C,O,I){var E=fr(C,"type.axisType"),k=fr(b.state,"".concat(E,"Map")),T=C.type.defaultProps,_=T!==void 0?Q(Q({},T),C.props):C.props,j=k&&k[_["".concat(E,"Id")]];return A.cloneElement(C,Q(Q({},j),{},{className:Ie(E,j.className),key:C.key||"".concat(O,"-").concat(I),ticks:Fn(j,!0)}))}),Ae(b,"renderPolarGrid",function(C){var O=C.props,I=O.radialLines,E=O.polarAngles,k=O.polarRadius,T=b.state,_=T.radiusAxisMap,j=T.angleAxisMap,$=na(_),N=na(j),D=N.cx,G=N.cy,V=N.innerRadius,H=N.outerRadius;return A.cloneElement(C,{polarAngles:Array.isArray(E)?E:Fn(N,!0).map(function(M){return M.coordinate}),polarRadius:Array.isArray(k)?k:Fn($,!0).map(function(M){return M.coordinate}),cx:D,cy:G,innerRadius:V,outerRadius:H,key:C.key||"polar-grid",radialLines:I})}),Ae(b,"renderLegend",function(){var C=b.state.formattedGraphicalItems,O=b.props,I=O.children,E=O.width,k=O.height,T=b.props.margin||{},_=E-(T.left||0)-(T.right||0),j=AN({children:I,formattedGraphicalItems:C,legendWidth:_,legendContent:c});if(!j)return null;var $=j.item,N=ij(j,use);return A.cloneElement($,Q(Q({},N),{},{chartWidth:E,chartHeight:k,margin:T,onBBoxUpdate:b.handleLegendBBoxUpdate}))}),Ae(b,"renderTooltip",function(){var C,O=b.props,I=O.children,E=O.accessibilityLayer,k=dr(I,hr);if(!k)return null;var T=b.state,_=T.isTooltipActive,j=T.activeCoordinate,$=T.activePayload,N=T.activeLabel,D=T.offset,G=(C=k.props.active)!==null&&C!==void 0?C:_;return A.cloneElement(k,{viewBox:Q(Q({},D),{},{x:D.left,y:D.top}),active:G,label:N,payload:G?$:[],coordinate:j,accessibilityLayer:E})}),Ae(b,"renderBrush",function(C){var O=b.props,I=O.margin,E=O.data,k=b.state,T=k.offset,_=k.dataStartIndex,j=k.dataEndIndex,$=k.updateId;return A.cloneElement(C,{key:C.key||"_recharts-brush",onChange:Lu(b.handleBrushChange,C.props.onChange),data:E,x:se(C.props.x)?C.props.x:T.left,y:se(C.props.y)?C.props.y:T.top+T.height+T.brushBottom-(I.bottom||0),width:se(C.props.width)?C.props.width:T.width,startIndex:_,endIndex:j,updateId:"brush-".concat($)})}),Ae(b,"renderReferenceElement",function(C,O,I){if(!C)return null;var E=b,k=E.clipPathId,T=b.state,_=T.xAxisMap,j=T.yAxisMap,$=T.offset,N=C.type.defaultProps||{},D=C.props,G=D.xAxisId,V=G===void 0?N.xAxisId:G,H=D.yAxisId,M=H===void 0?N.yAxisId:H;return A.cloneElement(C,{key:C.key||"".concat(O,"-").concat(I),xAxis:_[V],yAxis:j[M],viewBox:{x:$.left,y:$.top,width:$.width,height:$.height},clipPathId:k})}),Ae(b,"renderActivePoints",function(C){var O=C.item,I=C.activePoint,E=C.basePoint,k=C.childIndex,T=C.isRange,_=[],j=O.props.key,$=O.item.type.defaultProps!==void 0?Q(Q({},O.item.type.defaultProps),O.item.props):O.item.props,N=$.activeDot,D=$.dataKey,G=Q(Q({index:k,dataKey:D,cx:I.x,cy:I.y,r:4,fill:cb(O.item),strokeWidth:2,stroke:"#fff",payload:I.payload,value:I.value},ge(N,!1)),Vc(N));return _.push(x.renderActiveDot(N,G,"".concat(j,"-activePoint-").concat(k))),E?_.push(x.renderActiveDot(N,Q(Q({},G),{},{cx:E.x,cy:E.y}),"".concat(j,"-basePoint-").concat(k))):T&&_.push(null),_}),Ae(b,"renderGraphicChild",function(C,O,I){var E=b.filterFormatItem(C,O,I);if(!E)return null;var k=b.getTooltipEventType(),T=b.state,_=T.isTooltipActive,j=T.tooltipAxis,$=T.activeTooltipIndex,N=T.activeLabel,D=b.props.children,G=dr(D,hr),V=E.props,H=V.points,M=V.isRange,z=V.baseLine,Y=E.item.type.defaultProps!==void 0?Q(Q({},E.item.type.defaultProps),E.item.props):E.item.props,U=Y.activeDot,R=Y.hide,J=Y.activeBar,re=Y.activeShape,K=!!(!R&&_&&G&&(U||J||re)),ne={};k!=="axis"&&G&&G.props.trigger==="click"?ne={onClick:Lu(b.handleItemMouseEnter,C.props.onClick)}:k!=="axis"&&(ne={onMouseLeave:Lu(b.handleItemMouseLeave,C.props.onMouseLeave),onMouseEnter:Lu(b.handleItemMouseEnter,C.props.onMouseEnter)});var q=A.cloneElement(C,Q(Q({},E.props),ne));function Z(qt){return typeof j.dataKey=="function"?j.dataKey(qt.payload):null}if(K)if($>=0){var ie,B;if(j.dataKey&&!j.allowDuplicatedCategory){var ce=typeof j.dataKey=="function"?Z:"payload.".concat(j.dataKey.toString());ie=Wc(H,ce,N),B=M&&z&&Wc(z,ce,N)}else ie=H?.[$],B=M&&z&&z[$];if(re||J){var ee=C.props.activeIndex!==void 0?C.props.activeIndex:$;return[A.cloneElement(C,Q(Q(Q({},E.props),ne),{},{activeIndex:ee})),null,null]}if(!we(ie))return[q].concat(Io(b.renderActivePoints({item:E,activePoint:ie,basePoint:B,childIndex:$,isRange:M})))}else{var ve,Ee=(ve=b.getItemByXY(b.state.activeCoordinate))!==null&&ve!==void 0?ve:{graphicalItem:q},Xe=Ee.graphicalItem,_t=Xe.item,Wt=_t===void 0?C:_t,zr=Xe.childIndex,Rt=Q(Q(Q({},E.props),ne),{},{activeIndex:zr});return[A.cloneElement(Wt,Rt),null,null]}return M?[q,null,null]:[q,null]}),Ae(b,"renderCustomized",function(C,O,I){return A.cloneElement(C,Q(Q({key:"recharts-customized-".concat(I)},b.props),b.state))}),Ae(b,"renderMap",{CartesianGrid:{handler:Gf,once:!0},ReferenceArea:{handler:b.renderReferenceElement},ReferenceLine:{handler:Gf},ReferenceDot:{handler:b.renderReferenceElement},XAxis:{handler:Gf},YAxis:{handler:Gf},Brush:{handler:b.renderBrush,once:!0},Bar:{handler:b.renderGraphicChild},Line:{handler:b.renderGraphicChild},Area:{handler:b.renderGraphicChild},Radar:{handler:b.renderGraphicChild},RadialBar:{handler:b.renderGraphicChild},Scatter:{handler:b.renderGraphicChild},Pie:{handler:b.renderGraphicChild},Funnel:{handler:b.renderGraphicChild},Tooltip:{handler:b.renderCursor,once:!0},PolarGrid:{handler:b.renderPolarGrid,once:!0},PolarAngleAxis:{handler:b.renderPolarAxis},PolarRadiusAxis:{handler:b.renderPolarAxis},Customized:{handler:b.renderCustomized}}),b.clipPathId="".concat((w=y.id)!==null&&w!==void 0?w:ra("recharts"),"-clip"),b.throttleTriggeredAfterMouseMove=hT(b.triggeredAfterMouseMove,(S=y.throttleDelay)!==null&&S!==void 0?S:1e3/60),b.state={},b}return Sse(x,m),yse(x,[{key:"componentDidMount",value:function(){var w,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,S=w.children,b=w.data,C=w.height,O=w.layout,I=dr(S,hr);if(I){var E=I.props.defaultIndex;if(!(typeof E!="number"||E<0||E>this.state.tooltipTicks.length-1)){var k=this.state.tooltipTicks[E]&&this.state.tooltipTicks[E].value,T=Y0(this.state,b,E,k),_=this.state.tooltipTicks[E].coordinate,j=(this.state.offset.top+C)/2,$=O==="horizontal",N=$?{x:_,y:j}:{y:_,x:j},D=this.state.formattedGraphicalItems.find(function(V){var H=V.item;return H.type.name==="Scatter"});D&&(N=Q(Q({},N),D.props.points[E].tooltipPosition),T=D.props.points[E].tooltipPayload);var G={activeTooltipIndex:E,isTooltipActive:!0,activeLabel:k,activePayload:T,activeCoordinate:N};this.setState(G),this.renderCursor(I),this.accessibilityManager.setIndex(E)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var b,C;this.accessibilityManager.setDetails({offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(w){Tm([dr(w.children,hr)],[dr(this.props.children,hr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=dr(this.props.children,hr);if(w&&typeof w.props.shared=="boolean"){var S=w.props.shared?"axis":"item";return s.indexOf(S)>=0?S:i}return i}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var S=this.container,b=S.getBoundingClientRect(),C=pZ(b),O={chartX:Math.round(w.pageX-C.left),chartY:Math.round(w.pageY-C.top)},I=b.width/S.offsetWidth||1,E=this.inRange(O.chartX,O.chartY,I);if(!E)return null;var k=this.state,T=k.xAxisMap,_=k.yAxisMap,j=this.getTooltipEventType(),$=dj(this.state,this.props.data,this.props.layout,E);if(j!=="axis"&&T&&_){var N=na(T).scale,D=na(_).scale,G=N&&N.invert?N.invert(O.chartX):null,V=D&&D.invert?D.invert(O.chartY):null;return Q(Q({},O),{},{xValue:G,yValue:V},$)}return $?Q(Q({},O),$):null}},{key:"inRange",value:function(w,S){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,O=w/b,I=S/b;if(C==="horizontal"||C==="vertical"){var E=this.state.offset,k=O>=E.left&&O<=E.left+E.width&&I>=E.top&&I<=E.top+E.height;return k?{x:O,y:I}:null}var T=this.state,_=T.angleAxisMap,j=T.radiusAxisMap;if(_&&j){var $=na(_);return XN({x:O,y:I},$)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,S=this.getTooltipEventType(),b=dr(w,hr),C={};b&&S==="axis"&&(b.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var O=Vc(this.props,this.handleOuterEvent);return Q(Q({},O),C)}},{key:"addListener",value:function(){W0.on(V0,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){W0.removeListener(V0,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,S,b){for(var C=this.state.formattedGraphicalItems,O=0,I=C.length;O<I;O++){var E=C[O];if(E.item===w||E.props.key===w.key||S===En(E.item.type)&&b===E.childIndex)return E}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,S=this.state.offset,b=S.left,C=S.top,O=S.height,I=S.width;return A.createElement("defs",null,A.createElement("clipPath",{id:w},A.createElement("rect",{x:b,y:C,height:O,width:I})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(S,b){var C=aj(b,2),O=C[0],I=C[1];return Q(Q({},S),{},Ae({},O,I.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(S,b){var C=aj(b,2),O=C[0],I=C[1];return Q(Q({},S),{},Ae({},O,I.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[w])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(w){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[w])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(w){var S=this.state,b=S.formattedGraphicalItems,C=S.activeItem;if(b&&b.length)for(var O=0,I=b.length;O<I;O++){var E=b[O],k=E.props,T=E.item,_=T.type.defaultProps!==void 0?Q(Q({},T.type.defaultProps),T.props):T.props,j=En(T.type);if(j==="Bar"){var $=(k.data||[]).find(function(V){return Bte(w,V)});if($)return{graphicalItem:E,payload:$}}else if(j==="RadialBar"){var N=(k.data||[]).find(function(V){return XN(w,V)});if(N)return{graphicalItem:E,payload:N}}else if(cf(E,C)||uf(E,C)||nl(E,C)){var D=one({graphicalItem:E,activeTooltipItem:C,itemData:_.data}),G=_.activeIndex===void 0?D:_.activeIndex;return{graphicalItem:Q(Q({},E),{},{childIndex:G}),payload:nl(E,C)?_.data[D]:E.props.data[D]}}}return null}},{key:"render",value:function(){var w=this;if(!KI(this))return null;var S=this.props,b=S.children,C=S.className,O=S.width,I=S.height,E=S.style,k=S.compact,T=S.title,_=S.desc,j=ij(S,fse),$=ge(j,!1);if(k)return A.createElement(nD,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},A.createElement(Nm,Oo({},$,{width:O,height:I,title:T,desc:_}),this.renderClipPath(),tP(b,this.renderMap)));if(this.props.accessibilityLayer){var N,D;$.tabIndex=(N=this.props.tabIndex)!==null&&N!==void 0?N:0,$.role=(D=this.props.role)!==null&&D!==void 0?D:"application",$.onKeyDown=function(V){w.accessibilityManager.keyboardEvent(V)},$.onFocus=function(){w.accessibilityManager.focus()}}var G=this.parseEventsOfWrapper();return A.createElement(nD,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},A.createElement("div",Oo({className:Ie("recharts-wrapper",C),style:Q({position:"relative",cursor:"default",width:O,height:I},E)},G,{ref:function(H){w.container=H}}),A.createElement(Nm,Oo({},$,{width:O,height:I,title:T,desc:_,style:Ese}),this.renderClipPath(),tP(b,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(A.Component);Ae(g,"displayName",r),Ae(g,"defaultProps",Q({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},u)),Ae(g,"getDerivedStateFromProps",function(m,x){var y=m.dataKey,w=m.data,S=m.children,b=m.width,C=m.height,O=m.layout,I=m.stackOffset,E=m.margin,k=x.dataStartIndex,T=x.dataEndIndex;if(x.updateId===void 0){var _=hj(m);return Q(Q(Q({},_),{},{updateId:0},h(Q(Q({props:m},_),{},{updateId:0}),x)),{},{prevDataKey:y,prevData:w,prevWidth:b,prevHeight:C,prevLayout:O,prevStackOffset:I,prevMargin:E,prevChildren:S})}if(y!==x.prevDataKey||w!==x.prevData||b!==x.prevWidth||C!==x.prevHeight||O!==x.prevLayout||I!==x.prevStackOffset||!Ni(E,x.prevMargin)){var j=hj(m),$={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},N=Q(Q({},dj(x,w,O)),{},{updateId:x.updateId+1}),D=Q(Q(Q({},j),$),N);return Q(Q(Q({},D),h(Q({props:m},D),x)),{},{prevDataKey:y,prevData:w,prevWidth:b,prevHeight:C,prevLayout:O,prevStackOffset:I,prevMargin:E,prevChildren:S})}if(!Tm(S,x.prevChildren)){var G,V,H,M,z=dr(S,oo),Y=z&&(G=(V=z.props)===null||V===void 0?void 0:V.startIndex)!==null&&G!==void 0?G:k,U=z&&(H=(M=z.props)===null||M===void 0?void 0:M.endIndex)!==null&&H!==void 0?H:T,R=Y!==k||U!==T,J=!we(w),re=J&&!R?x.updateId:x.updateId+1;return Q(Q({updateId:re},h(Q(Q({props:m},x),{},{updateId:re,dataStartIndex:Y,dataEndIndex:U}),x)),{},{prevChildren:S,dataStartIndex:Y,dataEndIndex:U})}return null}),Ae(g,"renderActiveDot",function(m,x,y){var w;return A.isValidElement(m)?w=A.cloneElement(m,x):Se(m)?w=m(x):w=A.createElement(Ks,x),A.createElement(Te,{className:"recharts-active-dot",key:y},w)});var p=A.forwardRef(function(x,y){return A.createElement(g,Oo({},x,{ref:y}))});return p.displayName=g.displayName,p},mj=R0({chartName:"BarChart",GraphicalChild:Wn,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ja},{axisType:"yAxis",AxisComp:Ka}],formatAxisMap:X2}),Fse=R0({chartName:"PieChart",GraphicalChild:Gn,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:af},{axisType:"radiusAxis",AxisComp:tf}],formatAxisMap:XK,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),Lse=R0({chartName:"ComposedChart",GraphicalChild:[cl,ma,Wn,jf],axisComponents:[{axisType:"xAxis",AxisComp:Ja},{axisType:"yAxis",AxisComp:Ka},{axisType:"zAxis",AxisComp:Mf}],formatAxisMap:X2});const gj=({content:e,locale:t})=>{if(A.isValidElement(e))return v.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:e});const r=e,n=typeof r.value=="number"?r.value.toLocaleString(t):r.value;return v.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center",children:[v.jsx("span",{className:"text-2xl font-bold text-[#111827]",children:n}),r.label&&v.jsx("span",{className:"text-xs text-[#6B7280]",children:r.label})]})};gj.displayName="GatherDonutChartCenter";const vj=({segments:e,position:t})=>{const r=A.useMemo(()=>e.reduce((a,i)=>a+i.value,0),[e]),n=t==="right";return v.jsx("div",{className:n?"flex flex-col gap-2":"flex flex-wrap items-center justify-center gap-x-4 gap-y-2",children:e.map(a=>{const i=r>0?(a.value/r*100).toFixed(1):"0.0";return v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("div",{className:"h-2.5 w-2.5 flex-shrink-0 rounded-full",style:{backgroundColor:a.color}}),v.jsx("span",{className:"text-xs text-[#6B7280]",children:a.name}),v.jsxs("span",{className:"text-xs font-medium text-[#111827]",children:[i,"%"]})]},a.name)})})};vj.displayName="GatherDonutChartLegend";const q0=({height:e=260,className:t})=>v.jsxs("div",{className:F("flex flex-col items-center",t),children:[v.jsx("div",{className:"animate-pulse rounded-full bg-gray-200",style:{width:e*.7,height:e*.7},"data-testid":"gather-donut-chart-skeleton"}),v.jsx("div",{className:"mt-4 flex gap-4",children:[1,2,3].map(r=>v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("div",{className:"h-2.5 w-2.5 animate-pulse rounded-full bg-gray-200"}),v.jsx("div",{className:"h-3 w-14 animate-pulse rounded bg-gray-200"})]},r))})]});q0.displayName="GatherDonutChartSkeleton";const Gse=60,Wse=90,Vse=2,zse=260,Hse="es-EC",Xse=({active:e,payload:t,locale:r})=>{if(!e||!t?.length)return null;const n=t[0],a=n.payload.parent;return v.jsxs("div",{className:"rounded-md border border-[#E5E7EB] bg-white px-3 py-2 text-xs shadow-md",children:[v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:n.payload.color}}),v.jsx("span",{className:"font-medium text-[#111827]",children:n.name})]}),a&&v.jsx("div",{className:"mt-0.5 text-[#9CA3AF]",children:a}),v.jsx("div",{className:"mt-0.5 text-[#6B7280]",children:n.value.toLocaleString(r)})]})},Yse=(e,t)=>{const r=e.innerRadius??Gse,n=e.outerRadius??Wse,a=e.paddingAngle??Vse;return v.jsx(Gn,{data:e.data,cx:"50%",cy:"50%",innerRadius:r,outerRadius:n,paddingAngle:a,dataKey:"value",nameKey:"name",children:e.data.map((i,o)=>v.jsx(ps,{fill:i.color},`cell-${t}-${o}`))},`ring-${t}`)},yj=({rings:e,centerContent:t,legendPosition:r="bottom",height:n=zse,loading:a=!1,locale:i=Hse,className:o,"data-testid":s})=>{const l=A.useMemo(()=>e[0]?.data??[],[e]);if(a)return v.jsx(q0,{height:n,className:o});const c=r==="right",f=r!=="none";return v.jsxs("div",{className:F(c?"flex items-center gap-4":"flex flex-col",o),"data-testid":s??"gather-donut-chart",children:[v.jsxs("div",{className:F("relative",c?"min-w-0 flex-1":"w-full"),children:[v.jsx(cu,{width:"100%",height:n,children:v.jsxs(Fse,{children:[e.map((u,d)=>Yse(u,d)),v.jsx(hr,{content:v.jsx(Xse,{locale:i})})]})}),t&&v.jsx(gj,{content:t,locale:i})]}),f&&v.jsx("div",{className:c?"":"-mt-4",children:v.jsx(vj,{segments:l,position:c?"right":"bottom"})})]})};yj.displayName="GatherDonutChart";const U0=({active:e,payload:t,label:r,locale:n})=>{if(!e||!t?.length)return null;const a=t.reduce((i,o)=>i+(o.value??0),0);return v.jsxs("div",{className:"rounded-md border border-[#E5E7EB] bg-white px-3 py-2 text-xs shadow-md",children:[v.jsx("div",{className:"mb-1 font-medium text-[#111827]",children:r}),t.map(i=>v.jsxs("div",{className:"flex items-center justify-between gap-3",children:[v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:i.color}}),v.jsx("span",{className:"text-[#6B7280]",children:i.name})]}),v.jsx("span",{className:"font-medium text-[#111827]",children:i.value.toLocaleString(n)})]},i.dataKey)),v.jsxs("div",{className:"mt-1 border-t border-[#E5E7EB] pt-1 text-right font-medium text-[#111827]",children:["Total: ",a.toLocaleString(n)]})]})};U0.displayName="StackedBarChartTooltip";const Z0=({segments:e})=>v.jsx("div",{className:"flex flex-wrap items-center justify-center gap-x-4 gap-y-2 pt-2",children:e.map(t=>v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("div",{className:"h-2.5 w-2.5 flex-shrink-0 rounded-full",style:{backgroundColor:t.color}}),v.jsx("span",{className:"text-xs text-[#6B7280]",children:t.name})]},t.dataKey))});Z0.displayName="StackedBarChartLegend";const J0=({height:e=300,orientation:t="vertical",className:r})=>{if(t==="horizontal"){const i=[.85,.7,.55,.4,.25,.15];return v.jsxs("div",{className:F("flex flex-col",r),children:[v.jsx("div",{className:"flex flex-col justify-center gap-3 px-4",style:{height:e},"data-testid":"gather-stacked-bar-chart-skeleton-horizontal",children:i.map((o,s)=>v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("div",{className:"h-3 w-24 animate-pulse rounded bg-gray-200"}),v.jsx("div",{className:"h-5 animate-pulse rounded-r bg-gray-200",style:{width:`${o*100}%`}})]},s))}),v.jsx("div",{className:"mt-3 flex justify-center gap-4",children:[1,2].map(o=>v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("div",{className:"h-2.5 w-2.5 animate-pulse rounded-full bg-gray-200"}),v.jsx("div",{className:"h-3 w-14 animate-pulse rounded bg-gray-200"})]},o))})]})}const a=[.7,.9,.5,.8,.6,.4,.75];return v.jsxs("div",{className:F("flex flex-col",r),children:[v.jsx("div",{className:"flex items-end justify-around gap-2 px-8",style:{height:e},"data-testid":"gather-stacked-bar-chart-skeleton",children:a.map((i,o)=>v.jsx("div",{className:"w-8 animate-pulse rounded-t bg-gray-200",style:{height:`${i*100}%`}},o))}),v.jsx("div",{className:"mt-3 flex justify-center gap-4",children:[1,2,3].map(i=>v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("div",{className:"h-2.5 w-2.5 animate-pulse rounded-full bg-gray-200"}),v.jsx("div",{className:"h-3 w-14 animate-pulse rounded bg-gray-200"})]},i))})]})};J0.displayName="GatherStackedBarChartSkeleton";const Rse=300,qse="es-EC",Use=160,bj="stack",Zse=(e,t)=>{const r=new Map;for(const n of e){let a=0;for(const i of t){const o=n[i];typeof o=="number"&&(a+=o)}r.set(n.label,a)}return r},xj=({data:e,segments:t,orientation:r="vertical",height:n=Rse,showGrid:a=!0,showEndLabel:i=!1,categoryAxisWidth:o=Use,loading:s=!1,locale:l=qse,className:c,"data-testid":f})=>{const u=r==="horizontal",d=A.useMemo(()=>t.map(p=>p.dataKey),[t]),h=A.useMemo(()=>i&&u?Zse(e,d):new Map,[e,d,i,u]);if(s)return v.jsx(J0,{height:n,orientation:r,className:c});const g=t[t.length-1]?.dataKey;return u?v.jsxs("div",{className:F("flex flex-col",c),"data-testid":f??"gather-stacked-bar-chart-horizontal",children:[v.jsx(cu,{width:"100%",height:n,children:v.jsxs(mj,{data:e,layout:"vertical",children:[a&&v.jsx(_f,{strokeDasharray:"3 3",stroke:"#E5E7EB",horizontal:!1}),v.jsx(Ja,{type:"number",tick:{fill:"#6B7280",fontSize:12},axisLine:!1,tickLine:!1}),v.jsx(Ka,{type:"category",dataKey:"label",tick:{fill:"#374151",fontSize:12},axisLine:!1,tickLine:!1,width:o}),v.jsx(hr,{content:v.jsx(U0,{segments:t,locale:l})}),t.map(p=>{const m=p.dataKey===g;return v.jsx(Wn,{dataKey:p.dataKey,stackId:bj,fill:p.color,name:p.name,radius:p.radius??(m?[0,4,4,0]:[0,0,0,0]),children:i&&m&&v.jsx(Ar,{content:({x,y,width:w,height:S,value:b,index:C})=>{if(typeof x!="number"||typeof y!="number"||typeof w!="number"||typeof S!="number"||C===void 0)return null;const O=e[C];if(!O)return null;const I=h.get(O.label)??b??0;return v.jsx("text",{x:x+w+8,y:y+S/2,fill:"#6B7280",fontSize:11,dominantBaseline:"central","data-testid":`end-label-${C}`,children:I.toLocaleString(l)})}})},p.dataKey)})]})}),v.jsx(Z0,{segments:t})]}):v.jsxs("div",{className:F("flex flex-col",c),"data-testid":f??"gather-stacked-bar-chart",children:[v.jsx(cu,{width:"100%",height:n,children:v.jsxs(mj,{data:e,children:[a&&v.jsx(_f,{strokeDasharray:"3 3",stroke:"#E5E7EB",vertical:!1}),v.jsx(Ja,{dataKey:"label",tick:{fill:"#6B7280",fontSize:12},axisLine:!1,tickLine:!1}),v.jsx(Ka,{tick:{fill:"#6B7280",fontSize:12},axisLine:!1,tickLine:!1}),v.jsx(hr,{content:v.jsx(U0,{segments:t,locale:l})}),t.map(p=>v.jsx(Wn,{dataKey:p.dataKey,stackId:bj,fill:p.color,name:p.name,radius:p.radius??[0,0,0,0]},p.dataKey))]})}),v.jsx(Z0,{segments:t})]})};xj.displayName="GatherStackedBarChart";const Jse=({data:e,series:t,height:r=300,showArea:n=!1,showGrid:a=!0,showDots:i=!1,tooltipFormatter:o,locale:s="es-EC",loading:l=!1,className:c,"data-testid":f})=>{if(l)return v.jsx("div",{className:`animate-pulse rounded-lg bg-ui-background-subtle ${c??""}`,style:{height:r},"data-testid":f?`${f}-skeleton`:void 0});const u=h=>o?o(h):h.toLocaleString(s),d=n&&t.length===1;return v.jsx("div",{className:c,"data-testid":f,style:{width:"100%",height:r},children:v.jsx(cu,{width:"100%",height:"100%",children:v.jsxs(Lse,{data:e,children:[a&&v.jsx(_f,{strokeDasharray:"3 3",stroke:Ei.grid,vertical:!1}),v.jsx(Ja,{dataKey:"label",tick:{fill:Ei.axisTick,fontSize:12},axisLine:!1,tickLine:!1}),v.jsx(Ka,{tick:{fill:Ei.axisTick,fontSize:12},axisLine:!1,tickLine:!1,tickFormatter:h=>h.toLocaleString(s)}),v.jsx(hr,{formatter:(h,g)=>{const p=t.find(m=>m.key===g);return[u(h),p?.label??g]},contentStyle:{borderRadius:"8px",border:`1px solid ${Ei.tooltipBorder}`,fontSize:"12px"}}),t.length>1&&v.jsx(Ma,{formatter:h=>t.find(p=>p.key===h)?.label??h}),t.map(h=>d?v.jsx(ma,{type:"monotone",dataKey:h.key,stroke:h.color,strokeWidth:2,fill:h.color,fillOpacity:.1,dot:i?{r:3,fill:Ei.tooltipBg,stroke:h.color,strokeWidth:2}:!1,activeDot:{r:4,strokeWidth:2}},h.key):v.jsx(cl,{type:"monotone",dataKey:h.key,stroke:h.color,strokeWidth:2,strokeDasharray:h.dashed?"5 5":void 0,dot:i?{r:h.dashed?2.5:3,fill:h.dashed?h.color:Ei.tooltipBg,stroke:h.color,strokeWidth:h.dashed?1:2,opacity:h.dashed?.6:1}:!1,activeDot:{r:4,strokeWidth:2}},h.key))]})})})},Kse={empty:NO.empty,levels:[...NO.levels]},Qse=["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],ele=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],Vr=13,Vf=2,tle=({data:e,year:t,colorScale:r=Kse,onCellClick:n,tooltipFormatter:a,locale:i="es-EC",loading:o=!1,legendPosition:s="center",showAllDayLabels:l=!0,align:c="left",className:f,"data-testid":u})=>{const{dataMap:d,maxValue:h}=A.useMemo(()=>{const y=new Map;let w=0;for(const S of e)y.set(S.date,S.value),S.value>w&&(w=S.value);return{dataMap:y,maxValue:w}},[e]),g=y=>{if(y===0||h===0)return r.empty;const w=y/h,S=Math.min(Math.floor(w*r.levels.length),r.levels.length-1);return r.levels[S]},p=(y,w)=>a?a(y,w):`${new Date(`${y}T12:00:00`).toLocaleDateString(i,{weekday:"short",day:"numeric",month:"short"})}: ${w.toLocaleString(i)} leads`,m=A.useMemo(()=>{const y=[],w=new Date(`${t}-01-01T12:00:00`),S=new Date(`${t}-12-31T12:00:00`),b=w.getDay(),C=new Date(w);C.setDate(C.getDate()-b);let O=0;for(;C<=S||O<53;){const I=[];for(let E=0;E<7;E++){const k=C.toISOString().split("T")[0],T=C.getFullYear()===t;I.push(T?{date:k,value:d.get(k)??0}:null),C.setDate(C.getDate()+1)}if(y.push(I),O++,C.getFullYear()>t&&C.getDay()===0)break}return y},[t,d]),x=A.useMemo(()=>{const y=[];let w=-1;return m.forEach((S,b)=>{for(const C of S)if(C){const O=new Date(`${C.date}T12:00:00`).getMonth();O!==w&&(y.push({label:ele[O],weekStart:b}),w=O);break}}),y},[m]);return o?v.jsx("div",{className:`animate-pulse rounded-lg bg-ui-background-subtle ${f??""}`,style:{height:140},"data-testid":u?`${u}-skeleton`:void 0}):v.jsxs("div",{className:f,"data-testid":u,children:[v.jsxs("div",{className:"flex gap-2",children:[v.jsx("div",{className:"flex flex-col gap-[2px] pt-5",children:Qse.map((y,w)=>v.jsx("div",{className:"text-[10px] leading-none text-ui-text-muted",style:{height:Vr},children:l||w%2===1?y:""},y))}),v.jsx("div",{className:"flex-1 overflow-x-auto pb-2",children:v.jsxs("div",{className:c==="center"?"mx-auto":"",style:{minWidth:`${m.length*(Vr+Vf)}px`,width:"fit-content"},children:[v.jsx("div",{className:"mb-1 flex",style:{height:16,minWidth:`${m.length*(Vr+Vf)}px`},children:x.map((y,w)=>{const b=((x[w+1]?.weekStart??m.length)-y.weekStart)*(Vr+Vf);return v.jsx("div",{className:"text-[10px] text-ui-text-muted",style:{width:b,minWidth:b},children:y.label},`${y.label}-${w}`)})}),v.jsx("div",{className:"flex gap-[2px]",style:{minWidth:`${m.length*(Vr+Vf)}px`},children:m.map((y,w)=>v.jsx("div",{className:"flex flex-col gap-[2px]",children:y.map((S,b)=>v.jsx("div",{className:"cursor-default rounded-sm transition-colors",style:{width:Vr,height:Vr,backgroundColor:S?g(S.value):"transparent"},title:S?p(S.date,S.value):void 0,onClick:()=>S&&n?.(S.date,S.value),"data-testid":S?`heatmap-cell-${S.date}`:void 0},`${w}-${b}`))},w))})]})})]}),v.jsxs("div",{className:`mt-3 flex items-center gap-1 text-[10px] text-ui-text-muted ${s==="left"?"justify-start":s==="right"?"justify-end":"justify-center"}`,children:[v.jsx("span",{children:"Menos"}),v.jsx("div",{className:"rounded-sm",style:{width:Vr,height:Vr,backgroundColor:r.empty}}),r.levels.map((y,w)=>v.jsx("div",{className:"rounded-sm",style:{width:Vr,height:Vr,backgroundColor:y}},w)),v.jsx("span",{children:"Más"})]})]})},wj={default:"bg-gather-gray-100",error:"bg-danger-50",warning:"bg-warning-50",success:"bg-success-50",info:"bg-info-50"},Sj={default:"text-gather-gray-600",error:"text-danger-500",warning:"text-warning-500",success:"text-success-600",info:"text-info-500"},Cj={default:"gather-primary",error:"gather-error",warning:"gather-warning",success:"gather-success",info:"gather-info"},Aj={default:"Confirmar",error:"Eliminar",warning:"Continuar",success:"Aceptar",info:"Entendido"},rle={sm:"w-full max-w-sm",md:"w-full max-w-md",lg:"w-full max-w-lg",xl:"w-full max-w-xl",fullscreen:"w-screen h-screen rounded-none"};function nle(e){const t={className:"h-6 w-6"};switch(e){case"error":return v.jsx(rw,{...t});case"warning":return v.jsx(rw,{...t});case"success":return v.jsx(pF,{...t});case"info":return v.jsx(ew,{...t});default:return v.jsx(mF,{...t})}}const Oj=({open:e,onOpenChange:t,title:r,description:n,children:a,variant:i="default",icon:o,iconContainerClassName:s,showIcon:l=!0,size:c="sm",confirmLabel:f,cancelLabel:u="Cancelar",onConfirm:d,onCancel:h,confirmVariant:g,disableConfirm:p=!1,hideCancelButton:m=!1,hideConfirmButton:x=!1,isLoading:y=!1,loadingText:w,closeOnOverlayClick:S=!0,closeOnEsc:b=!0,className:C,style:O,overlayClassName:I,bodyClassName:E,buttonsClassName:k,zIndex:T=50})=>{const _=A.useRef(null),j=A.useRef(null),$=A.useMemo(()=>f??Aj[i],[f,i]),N=A.useMemo(()=>g??Cj[i],[g,i]),D=A.useMemo(()=>o===null?null:o!==void 0?o:nle(i),[o,i]),G=A.useCallback(()=>{y||(h?h():t(!1))},[y,h,t]),V=A.useCallback(()=>{y||p||d()},[y,p,d]),H=A.useCallback(()=>{S&&!y&&t(!1)},[S,y,t]);if(A.useEffect(()=>{if(!e||!b)return;const Y=U=>{U.key==="Escape"&&!y&&(U.preventDefault(),U.stopPropagation(),t(!1))};return document.addEventListener("keydown",Y),()=>document.removeEventListener("keydown",Y)},[e,b,y,t]),A.useEffect(()=>{if(!(!e||document.body.style.overflow==="hidden"))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]),A.useEffect(()=>{if(!e)return;j.current=document.activeElement;const Y=setTimeout(()=>{_.current?.focus()},50);return()=>{clearTimeout(Y),j.current instanceof HTMLElement&&j.current.focus()}},[e]),!e)return null;const M=T*10,z=v.jsxs("div",{className:"gather-confirm-dialog-root",children:[v.jsx("div",{className:F("fixed inset-0 bg-black/40 transition-opacity duration-200",I),style:{zIndex:M},onClick:H,"aria-hidden":"true"}),v.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",style:{zIndex:M+1},onClick:H,children:v.jsx("div",{ref:_,role:"alertdialog","aria-modal":"true","aria-labelledby":r?"gather-confirm-dialog-title":void 0,"aria-describedby":n?"gather-confirm-dialog-description":void 0,tabIndex:-1,className:F("overflow-hidden rounded-lg border border-gather-gray-200 bg-white shadow-xl",rle[c],C),style:O,onClick:Y=>Y.stopPropagation(),children:v.jsxs("div",{className:F("flex flex-col items-center px-6 py-6 text-center",E),children:[l&&D&&v.jsx("div",{className:F("mb-4 flex h-12 w-12 items-center justify-center rounded-full",wj[i],Sj[i],s),children:D}),r&&v.jsx("h2",{id:"gather-confirm-dialog-title",className:"text-xl font-semibold leading-tight text-gather-gray-900",children:r}),n&&v.jsx("p",{id:"gather-confirm-dialog-description",className:"mt-2 text-sm leading-relaxed text-gather-gray-500",children:n}),a&&v.jsx("div",{className:"mt-3 w-full",children:a}),(!m||!x)&&v.jsxs("div",{className:F("mt-6 flex w-full gap-3",k),children:[!m&&v.jsx(mn,{variant:"gather-outline",onClick:G,disabled:y,className:"h-11 min-w-0 flex-1",children:u}),!x&&v.jsx(mn,{variant:N,onClick:V,disabled:p||y,loading:y,loadingText:w??$,className:"h-11 min-w-0 flex-1",children:$})]})]})})})]});return Qa.createPortal(z,document.body)};Oj.displayName="GatherConfirmDialog";const ct=({className:e,style:t,variant:r="pulse","data-testid":n})=>v.jsx("div",{className:F("rounded bg-secondary-200",r==="pulse"&&"animate-pulse",r==="wave"&&"gather-shimmer-wave relative overflow-hidden",e),style:t,"aria-hidden":"true","data-testid":n});ct.displayName="GatherShimmer";const Ij=({loading:e,skeleton:t,children:r,className:n,"data-testid":a})=>v.jsx("div",{className:F("relative",n),"aria-live":"polite","aria-busy":e,"data-testid":a,children:e?v.jsx("div",{className:"animate-in fade-in duration-200",children:t},"skeleton"):v.jsx("div",{className:"animate-in fade-in duration-200",children:r},"content")});Ij.displayName="GatherPageSkeleton";const ale={emerald:{iconBg:"bg-emerald-50",iconText:"text-emerald-600",badgeBg:"bg-emerald-50",badgeText:"text-emerald-700",badgeRing:"ring-emerald-200",checkBg:"bg-emerald-100",checkIcon:"text-emerald-600"},amber:{iconBg:"bg-amber-50",iconText:"text-amber-600",badgeBg:"bg-amber-50",badgeText:"text-amber-700",badgeRing:"ring-amber-200",checkBg:"bg-amber-100",checkIcon:"text-amber-600"},sky:{iconBg:"bg-sky-50",iconText:"text-sky-600",badgeBg:"bg-sky-50",badgeText:"text-sky-700",badgeRing:"ring-sky-200",checkBg:"bg-sky-100",checkIcon:"text-sky-600"}};function ile(){return v.jsxs("div",{className:"space-y-6 p-6 pb-16",children:[v.jsx(ct,{className:"h-3.5 w-44"}),v.jsx(ct,{className:"h-8 w-52"}),v.jsxs("div",{className:"flex gap-0 border-b border-secondary-200",children:[v.jsx(ct,{className:"h-10 w-28 rounded-none rounded-t"}),v.jsx(ct,{className:"ml-1 h-10 w-28 rounded-none rounded-t"})]}),v.jsx("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-4 mt-2",children:Array.from({length:4}).map((e,t)=>v.jsxs("div",{className:"rounded-lg border border-secondary-200 bg-white p-4 space-y-3",children:[v.jsx(ct,{className:"h-3 w-3/4"}),v.jsx(ct,{className:"h-7 w-1/2"}),v.jsx(ct,{className:"h-3 w-2/3"})]},t))}),v.jsxs("div",{className:"rounded-lg border border-secondary-200 bg-white p-4 space-y-4",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx(ct,{className:"h-5 w-32"}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(ct,{className:"h-8 w-24 rounded-md"}),v.jsx(ct,{className:"h-8 w-24 rounded-md"})]})]}),v.jsxs("div",{className:"flex gap-4 border-b border-secondary-100 pb-2",children:[v.jsx(ct,{className:"h-3.5 flex-[2]"}),v.jsx(ct,{className:"h-3.5 flex-1"}),v.jsx(ct,{className:"h-3.5 flex-1"}),v.jsx(ct,{className:"h-3.5 w-16 shrink-0"})]}),Array.from({length:7}).map((e,t)=>v.jsxs("div",{className:"flex items-center gap-4 border-b border-secondary-50 py-2.5 last:border-b-0",children:[v.jsxs("div",{className:"flex items-center gap-2 flex-[2]",children:[v.jsx(ct,{className:"h-7 w-7 rounded-full shrink-0"}),v.jsxs("div",{className:"space-y-1.5 flex-1",children:[v.jsx(ct,{className:"h-3.5 w-3/4"}),v.jsx(ct,{className:"h-3 w-1/2"})]})]}),v.jsx(ct,{className:"h-3.5 flex-1"}),v.jsx(ct,{className:"h-3.5 flex-1"}),v.jsx(ct,{className:"h-6 w-16 shrink-0 rounded-full"})]},t)),v.jsx("div",{className:"flex items-center justify-center gap-1 pt-2",children:Array.from({length:5}).map((e,t)=>v.jsx(ct,{className:"h-8 w-8 rounded-md"},t))})]})]})}const Pj=({icon:e,colorAccent:t,title:r,description:n,benefits:a,background:i,className:o,"data-testid":s})=>{const l=ale[t];return v.jsxs("div",{className:F("relative min-h-[calc(100vh-3rem)] overflow-hidden bg-secondary-50",o),"data-testid":s,children:[v.jsx("div",{className:"pointer-events-none absolute inset-0 select-none overflow-hidden opacity-50 blur-sm","aria-hidden":"true",children:i??v.jsx(ile,{})}),v.jsx("div",{className:"absolute inset-0 bg-white/50","aria-hidden":"true"}),v.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-6",children:v.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-secondary-200 bg-white p-8 shadow-2xl",children:[v.jsx("div",{className:F("mb-5 inline-flex h-14 w-14 items-center justify-center rounded-2xl",l.iconBg),children:v.jsx("span",{className:l.iconText,children:e})}),v.jsx("div",{className:"mb-3 flex items-center gap-2",children:v.jsxs("span",{className:F("inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-semibold ring-1",l.badgeBg,l.badgeText,l.badgeRing),children:[v.jsx(gF,{className:"h-3 w-3","aria-hidden":"true"}),"MUY PRONTO"]})}),v.jsx("h2",{className:"text-xl font-bold text-text-primary",children:r}),v.jsx("p",{className:"mt-2 text-sm leading-relaxed text-text-muted",children:n}),v.jsx("div",{className:"my-5 border-t border-secondary-200"}),v.jsx("ul",{className:"space-y-2.5",children:a.map((c,f)=>v.jsxs("li",{className:"flex items-start gap-2.5 text-sm text-text-secondary",children:[v.jsx("span",{className:F("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full",l.checkBg),"aria-hidden":"true",children:v.jsx(Qx,{className:F("h-2.5 w-2.5",l.checkIcon),strokeWidth:3})}),c]},f))})]})})]})};Pj.displayName="GatherComingSoonPage",ae.DropdownGatherCalendar=Yh,ae.GATHER_BI_COLORS=SY,ae.GATHER_CONVERSION_CHIP_DEFAULT_NULL_LABEL=wO,ae.GATHER_CONVERSION_CHIP_DEFAULT_THRESHOLDS=xO,ae.GatherBadge=mO,ae.GatherButton=mn,ae.GatherCalendar=_c,ae.GatherCard=gO,ae.GatherCatalogSelector=ap,ae.GatherCheckBox=Uh,ae.GatherCheckboxList=yO,ae.GatherCollapsibleSection=vO,ae.GatherCombobox=rp,ae.GatherComingSoonPage=Pj,ae.GatherConfirmDialog=Oj,ae.GatherConversionChip=CO,ae.GatherDatePicker=pO,ae.GatherDatePickerInput=Rh,ae.GatherDonutChart=yj,ae.GatherDonutChartSkeleton=q0,ae.GatherEmptyState=bO,ae.GatherFormBuilder=YX,ae.GatherHeatmap=tle,ae.GatherInput=Nh,ae.GatherInputSelect=Zh,ae.GatherLabel=hw,ae.GatherLineChart=Jse,ae.GatherLoader=sp,ae.GatherLoaderIcon=op,ae.GatherLoadingDots=xc,ae.GatherMetricCard=jO,ae.GatherMetricCardSkeleton=dp,ae.GatherModal=hO,ae.GatherModalFooter=Mc,ae.GatherModalHeader=ip,ae.GatherMultiSelect=Yd,ae.GatherPageSkeleton=Ij,ae.GatherRadioButton=tp,ae.GatherSectionDivider=lO,ae.GatherSelect=yh,ae.GatherSelectGroup=H3,ae.GatherSelectItem=Wo,ae.GatherSelectLabel=X3,ae.GatherSelectScrollDownButton=bC,ae.GatherSelectScrollUpButton=yC,ae.GatherSelectSeparator=vC,ae.GatherShimmer=ct,ae.GatherStackedBarChart=xj,ae.GatherStackedBarChartSkeleton=J0,ae.GatherSwitch=ud,ae.GatherTable=nw,ae.GatherTableBody=xF,ae.GatherTableCaption=ow,ae.GatherTableFooter=iw,ae.GatherTableHeader=ad,ae.GatherTableRow=aw,ae.GatherTextarea=Jh,ae.GatherTooltip=lp,ae.GatherTreeSelect=kO,ae.VARIANT_BORDER_COLORS=hp,ae.VARIANT_CONFIRM_BUTTON=Cj,ae.VARIANT_DEFAULT_CONFIRM_LABEL=Aj,ae.VARIANT_ICON_BG=wj,ae.VARIANT_ICON_FG=Sj,ae.alphaFilter=WB,ae.alphanumericFilter=VB,ae.cn=F,ae.convertToTimeZoneGatherDatePicker=pn,ae.createColumns=YB,ae.createFlexibleColumns=RB,ae.currencyFormatter=BB,ae.debounce=Cx,ae.deepClone=xl,ae.deepEqual=bl,ae.filterCatalogGroups=uO,ae.filterOptions=cO,ae.flattenFields=Cl,ae.generateValidationRules=qx,ae.generateYearsGatherDatePicker=zx,ae.getAllPaths=yl,ae.getBoundaryGatherDateInTimeZone=Qf,ae.getLayoutClasses=ed,ae.getNestedField=ei,ae.getNormalizeCustomGatherDate=Yx,ae.getNormalizeRangeGatherDate=Rx,ae.getNormalizeToEcuadorRangeGatherDate=$B,ae.getNormalizeToNoonEcuadorGatherDate=jB,ae.getOrderedFields=Ux,ae.getPresetsGatherDatePicker=Hx,ae.getSpecificGatherTimeInTimeZone=Xx,ae.integerFilter=GB,ae.numericFilter=LB,ae.parseCurrency=zB,ae.parseNumeric=XB,ae.parsePercent=HB,ae.percentFormatter=FB,ae.resolveDisplayValue=fO,ae.truncateText=np,ae.useSelectedOption=tx,ae.useTableSort=Ej,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carconnect-gatherleads-ui-lib",
3
- "version": "3.7.0-GL-1521-Modulo-Rendimiento.2",
3
+ "version": "3.7.0-GL-1521-Modulo-Rendimiento.3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"