this.wheelDelay&&(this.executeMouseWheelZoom(i),s.globals.lastWheelExecution=r),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){r-s.globals.lastWheelExecution>a.wheelDelay&&(a.executeMouseWheelZoom(i),s.globals.lastWheelExecution=r)},this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(i){var a,s=this.w;this.minX=s.globals.isRangeBar?s.globals.minY:s.globals.minX,this.maxX=s.globals.isRangeBar?s.globals.maxY:s.globals.maxX;var r=(a=this.gridRect)===null||a===void 0?void 0:a.getBoundingClientRect();if(r){var n,l,h,d=(i.clientX-r.left)/r.width,c=this.minX,u=this.maxX,g=u-c;if(i.deltaY<0){var f=c+d*g;l=f-(n=.5*g)/2,h=f+n/2}else l=c-(n=1.5*g)/2,h=u+n/2;if(!s.globals.isRangeBar){l=Math.max(l,s.globals.initialMinX),h=Math.min(h,s.globals.initialMaxX);var p=.01*(s.globals.initialMaxX-s.globals.initialMinX);if(h-l0&&s.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(r,n,l,h,d){return d==="l"||d==="r"?r.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):r.circle(0)},updateHandle:function(r,n){return r.center(n[0],n[1])}}).resize().on("resize",function(){var r=a.globals.zoomEnabled?a.config.chart.zoom.type:a.config.chart.selection.type;i.handleMouseUp({zoomtype:r,isResized:!0})}))}}},{key:"preselectedSelection",value:function(){var i=this.w,a=this.xyRatios;if(!i.globals.zoomEnabled){if(i.globals.selection!==void 0&&i.globals.selection!==null)this.drawSelectionRect(R(R({},i.globals.selection),{},{translateX:i.globals.translateX,translateY:i.globals.translateY}));else if(i.config.chart.selection.xaxis.min!==void 0&&i.config.chart.selection.xaxis.max!==void 0){var s=(i.config.chart.selection.xaxis.min-i.globals.minX)/a.xRatio,r=i.globals.gridWidth-(i.globals.maxX-i.config.chart.selection.xaxis.max)/a.xRatio-s;i.globals.isRangeBar&&(s=(i.config.chart.selection.xaxis.min-i.globals.yAxisScale[0].niceMin)/a.invertedYRatio,r=(i.config.chart.selection.xaxis.max-i.config.chart.selection.xaxis.min)/a.invertedYRatio);var n={x:s,y:0,width:r,height:i.globals.gridHeight,translateX:i.globals.translateX,translateY:i.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(n),this.makeSelectionRectDraggable(),typeof i.config.chart.events.selection=="function"&&i.config.chart.events.selection(this.ctx,{xaxis:{min:i.config.chart.selection.xaxis.min,max:i.config.chart.selection.xaxis.max},yaxis:{}})}}}},{key:"drawSelectionRect",value:function(i){var a=i.x,s=i.y,r=i.width,n=i.height,l=i.translateX,h=l===void 0?0:l,d=i.translateY,c=d===void 0?0:d,u=this.w,g=this.zoomRect,f=this.selectionRect;if(this.dragged||u.globals.selection!==null){var p={transform:"translate("+h+", "+c+")"};u.globals.zoomEnabled&&this.dragged&&(r<0&&(r=1),g.attr({x:a,y:s,width:r,height:n,fill:u.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":u.config.chart.zoom.zoomedArea.fill.opacity,stroke:u.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":u.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":u.config.chart.zoom.zoomedArea.stroke.opacity}),X.setAttrs(g.node,p)),u.globals.selectionEnabled&&(f.attr({x:a,y:s,width:r>0?r:0,height:n>0?n:0,fill:u.config.chart.selection.fill.color,"fill-opacity":u.config.chart.selection.fill.opacity,stroke:u.config.chart.selection.stroke.color,"stroke-width":u.config.chart.selection.stroke.width,"stroke-dasharray":u.config.chart.selection.stroke.dashArray,"stroke-opacity":u.config.chart.selection.stroke.opacity}),X.setAttrs(f.node,p))}}},{key:"hideSelectionRect",value:function(i){i&&i.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(i){var a=i.context,s=i.zoomtype,r=this.w,n=a,l=this.gridRect.getBoundingClientRect(),h=n.startX-1,d=n.startY,c=!1,u=!1,g=n.clientX-l.left-r.globals.barPadForNumericAxis,f=n.clientY-l.top,p=g-h,x=f-d,b={translateX:r.globals.translateX,translateY:r.globals.translateY};return Math.abs(p+h)>r.globals.gridWidth?p=r.globals.gridWidth-h:g<0&&(p=h),h>g&&(c=!0,p=Math.abs(p)),d>f&&(u=!0,x=Math.abs(x)),b=R(R({},b=s==="x"?{x:c?h-p:h,y:0,width:p,height:r.globals.gridHeight}:s==="y"?{x:0,y:u?d-x:d,width:r.globals.gridWidth,height:x}:{x:c?h-p:h,y:u?d-x:d,width:p,height:x}),{},{translateX:r.globals.translateX,translateY:r.globals.translateY}),n.drawSelectionRect(b),n.selectionDragging("resizing"),b}},{key:"selectionDragging",value:function(i,a){var s=this,r=this.w;if(a){a.preventDefault();var n=a.detail,l=n.handler,h=n.box,d=h.x,c=h.y;dthis.constraints.x2&&(d=this.constraints.x2-h.w),h.y2>this.constraints.y2&&(c=this.constraints.y2-h.h),l.move(d,c);var u=this.xyRatios,g=this.selectionRect,f=0;i==="resizing"&&(f=30);var p=function(b){return parseFloat(g.node.getAttribute(b))},x={x:p("x"),y:p("y"),width:p("width"),height:p("height")};r.globals.selection=x,typeof r.config.chart.events.selection=="function"&&r.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var b,m,v,k,y=s.gridRect.getBoundingClientRect(),C=g.node.getBoundingClientRect();r.globals.isRangeBar?(b=r.globals.yAxisScale[0].niceMin+(C.left-y.left)*u.invertedYRatio,m=r.globals.yAxisScale[0].niceMin+(C.right-y.left)*u.invertedYRatio,v=0,k=1):(b=r.globals.xAxisScale.niceMin+(C.left-y.left)*u.xRatio,m=r.globals.xAxisScale.niceMin+(C.right-y.left)*u.xRatio,v=r.globals.yAxisScale[0].niceMin+(y.bottom-C.bottom)*u.yRatio[0],k=r.globals.yAxisScale[0].niceMax-(C.top-y.top)*u.yRatio[0]);var w={xaxis:{min:b,max:m},yaxis:{min:v,max:k}};r.config.chart.events.selection(s.ctx,w),r.config.chart.brush.enabled&&r.config.chart.events.brushScrolled!==void 0&&r.config.chart.events.brushScrolled(s.ctx,w)},f))}}},{key:"selectionDrawn",value:function(i){var a=i.context,s=i.zoomtype,r=this.w,n=a,l=this.xyRatios,h=this.ctx.toolbar;if(n.startX>n.endX){var d=n.startX;n.startX=n.endX,n.endX=d}if(n.startY>n.endY){var c=n.startY;n.startY=n.endY,n.endY=c}var u=void 0,g=void 0;r.globals.isRangeBar?(u=r.globals.yAxisScale[0].niceMin+n.startX*l.invertedYRatio,g=r.globals.yAxisScale[0].niceMin+n.endX*l.invertedYRatio):(u=r.globals.xAxisScale.niceMin+n.startX*l.xRatio,g=r.globals.xAxisScale.niceMin+n.endX*l.xRatio);var f=[],p=[];if(r.config.yaxis.forEach(function(C,w){var A=r.globals.seriesYAxisMap[w][0];f.push(r.globals.yAxisScale[w].niceMax-l.yRatio[A]*n.startY),p.push(r.globals.yAxisScale[w].niceMax-l.yRatio[A]*n.endY)}),n.dragged&&(n.dragX>10||n.dragY>10)&&u!==g){if(r.globals.zoomEnabled){var x=L.clone(r.globals.initialConfig.yaxis),b=L.clone(r.globals.initialConfig.xaxis);if(r.globals.zoomed=!0,r.config.xaxis.convertedCatToNumeric&&(u=Math.floor(u),g=Math.floor(g),u<1&&(u=1,g=r.globals.dataPoints),g-u<2&&(g=u+1)),s!=="xy"&&s!=="x"||(b={min:u,max:g}),s!=="xy"&&s!=="y"||x.forEach(function(C,w){x[w].min=p[w],x[w].max=f[w]}),h){var m=h.getBeforeZoomRange(b,x);m&&(b=m.xaxis?m.xaxis:b,x=m.yaxis?m.yaxis:x)}var v={xaxis:b};r.config.chart.group||(v.yaxis=x),n.ctx.updateHelpers._updateOptions(v,!1,n.w.config.chart.animations.dynamicAnimation.enabled),typeof r.config.chart.events.zoomed=="function"&&h.zoomCallback(b,x)}else if(r.globals.selectionEnabled){var k,y=null;k={min:u,max:g},s!=="xy"&&s!=="y"||(y=L.clone(r.config.yaxis)).forEach(function(C,w){y[w].min=p[w],y[w].max=f[w]}),r.globals.selection=n.selection,typeof r.config.chart.events.selection=="function"&&r.config.chart.events.selection(n.ctx,{xaxis:k,yaxis:y})}}}},{key:"panDragging",value:function(i){var a=i.context,s=this.w,r=a;if(s.globals.lastClientPosition.x!==void 0){var n=s.globals.lastClientPosition.x-r.clientX,l=s.globals.lastClientPosition.y-r.clientY;Math.abs(n)>Math.abs(l)&&n>0?this.moveDirection="left":Math.abs(n)>Math.abs(l)&&n<0?this.moveDirection="right":Math.abs(l)>Math.abs(n)&&l>0?this.moveDirection="up":Math.abs(l)>Math.abs(n)&&l<0&&(this.moveDirection="down")}s.globals.lastClientPosition={x:r.clientX,y:r.clientY};var h=s.globals.isRangeBar?s.globals.minY:s.globals.minX,d=s.globals.isRangeBar?s.globals.maxY:s.globals.maxX;s.config.xaxis.convertedCatToNumeric||r.panScrolled(h,d)}},{key:"delayedPanScrolled",value:function(){var i=this.w,a=i.globals.minX,s=i.globals.maxX,r=(i.globals.maxX-i.globals.minX)/2;this.moveDirection==="left"?(a=i.globals.minX+r,s=i.globals.maxX+r):this.moveDirection==="right"&&(a=i.globals.minX-r,s=i.globals.maxX-r),a=Math.floor(a),s=Math.floor(s),this.updateScrolledChart({xaxis:{min:a,max:s}},a,s)}},{key:"panScrolled",value:function(i,a){var s=this.w,r=this.xyRatios,n=L.clone(s.globals.initialConfig.yaxis),l=r.xRatio,h=s.globals.minX,d=s.globals.maxX;s.globals.isRangeBar&&(l=r.invertedYRatio,h=s.globals.minY,d=s.globals.maxY),this.moveDirection==="left"?(i=h+s.globals.gridWidth/15*l,a=d+s.globals.gridWidth/15*l):this.moveDirection==="right"&&(i=h-s.globals.gridWidth/15*l,a=d-s.globals.gridWidth/15*l),s.globals.isRangeBar||(is.globals.initialMaxX)&&(i=h,a=d);var c={xaxis:{min:i,max:a}};s.config.chart.group||(c.yaxis=n),this.updateScrolledChart(c,i,a)}},{key:"updateScrolledChart",value:function(i,a,s){var r=this.w;this.ctx.updateHelpers._updateOptions(i,!1,!1),typeof r.config.chart.events.scrolled=="function"&&r.config.chart.events.scrolled(this.ctx,{xaxis:{min:a,max:s}})}}]),t}(),ns=function(){function o(e){H(this,o),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return O(o,[{key:"getNearestValues",value:function(e){var t=e.hoverArea,i=e.elGrid,a=e.clientX,s=e.clientY,r=this.w,n=i.getBoundingClientRect(),l=n.width,h=n.height,d=l/(r.globals.dataPoints-1),c=h/r.globals.dataPoints,u=this.hasBars();!r.globals.comboCharts&&!u||r.config.xaxis.convertedCatToNumeric||(d=l/r.globals.dataPoints);var g=a-n.left-r.globals.barPadForNumericAxis,f=s-n.top;g<0||f<0||g>l||f>h?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):r.globals.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):r.globals.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));var p=Math.round(g/d),x=Math.floor(f/c);u&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(g/d),p-=1);var b=null,m=null,v=r.globals.seriesXvalues.map(function(A){return A.filter(function(S){return L.isNumber(S)})}),k=r.globals.seriesYvalues.map(function(A){return A.filter(function(S){return L.isNumber(S)})});if(r.globals.isXNumeric){var y=this.ttCtx.getElGrid().getBoundingClientRect(),C=g*(y.width/l),w=f*(y.height/h);b=(m=this.closestInMultiArray(C,w,v,k)).index,p=m.j,b!==null&&r.globals.hasNullValues&&(v=r.globals.seriesXvalues[b],p=(m=this.closestInArray(C,v)).j)}return r.globals.capturedSeriesIndex=b===null?-1:b,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=x:r.globals.capturedDataPointIndex=p,{capturedSeries:b,j:r.globals.isBarHorizontal?x:p,hoverX:g,hoverY:f}}},{key:"getFirstActiveXArray",value:function(e){for(var t=this.w,i=0,a=e.map(function(r,n){return r.length>0?n:-1}),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0&&arguments[0],i=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");i=ce(i),t&&(i=i.filter(function(s){var r=Number(s.getAttribute("data:realIndex"));return e.w.globals.collapsedSeriesIndices.indexOf(r)===-1})),i.sort(function(s,r){var n=Number(s.getAttribute("data:realIndex")),l=Number(r.getAttribute("data:realIndex"));return ln?-1:0});var a=[];return i.forEach(function(s){a.push(s.querySelector(".apexcharts-marker"))}),a}},{key:"hasMarkers",value:function(e){return this.getElMarkers(e).length>0}},{key:"getPathFromPoint",value:function(e,t){var i=Number(e.getAttribute("cx")),a=Number(e.getAttribute("cy")),s=e.getAttribute("shape");return new X(this.ctx).getMarkerPath(i,a,s,t)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(e){var t=this.w,i=t.config.markers.hover.size;return i===void 0&&(i=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var t=this.w,i=this.ttCtx;i.allTooltipSeriesGroups.length===0&&(i.allTooltipSeriesGroups=t.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s";u.forEach(function(M,P){A+=' ').concat(M.attrs.name,"
"),S+="".concat(M.val,"
")}),v.innerHTML=A+"",k.innerHTML=S+""};n?h.globals.seriesGoals[t][i]&&Array.isArray(h.globals.seriesGoals[t][i])?y():(v.innerHTML="",k.innerHTML=""):y()}else v.innerHTML="",k.innerHTML="";if(p!==null&&(a[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=h.config.tooltip.z.title,a[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=p!==void 0?p:""),n&&x[0]){if(h.config.tooltip.hideEmptySeries){var C=a[t].querySelector(".apexcharts-tooltip-marker"),w=a[t].querySelector(".apexcharts-tooltip-text");parseFloat(c)==0?(C.style.display="none",w.style.display="none"):(C.style.display="block",w.style.display="block")}c==null||h.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||h.globals.collapsedSeriesIndices.indexOf(t)>-1||Array.isArray(d.tConfig.enabledOnSeries)&&d.tConfig.enabledOnSeries.indexOf(t)===-1?x[0].parentNode.style.display="none":x[0].parentNode.style.display=h.config.tooltip.items.display}else Array.isArray(d.tConfig.enabledOnSeries)&&d.tConfig.enabledOnSeries.indexOf(t)===-1&&(x[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(e,t){var i=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(t));a&&(a.classList.add("apexcharts-active"),a.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var t=e.i,i=e.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",n="",l=null,h=null,d={series:a.globals.series,seriesIndex:t,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;i===null?h=a.globals.series[t]:a.globals.isXNumeric&&a.config.chart.type!=="treemap"?(r=s[t][i],s[t].length===0&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=new Gi(this.ctx).isFormatXY()?a.config.series[t].data[i]!==void 0?a.config.series[t].data[i].x:"":a.globals.labels[i]!==void 0?a.globals.labels[i]:"";var u=r;return a.globals.isXNumeric&&a.config.xaxis.type==="datetime"?r=new Pt(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,u,u,{i:void 0,dateFormatter:new de(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](u,d):a.globals.xLabelFormatter(u,d),a.config.tooltip.x.formatter!==void 0&&(r=a.globals.ttKeyFormatter(u,d)),a.globals.seriesZ.length>0&&a.globals.seriesZ[t].length>0&&(l=c(a.globals.seriesZ[t][i],a)),n=typeof a.config.xaxis.tooltip.formatter=="function"?a.globals.xaxisTooltipFormatter(u,d):r,{val:Array.isArray(h)?h.join(" "):h,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:l}}},{key:"handleCustomTooltip",value:function(e){var t=e.i,i=e.j,a=e.y1,s=e.y2,r=e.w,n=this.ttCtx.getElTooltip(),l=r.config.tooltip.custom;Array.isArray(l)&&l[t]&&(l=l[t]);var h=l({ctx:this.ctx,series:r.globals.series,seriesIndex:t,dataPointIndex:i,y1:a,y2:s,w:r});typeof h=="string"?n.innerHTML=h:(h instanceof Element||typeof h.nodeName=="string")&&(n.innerHTML="",n.appendChild(h))}}]),o}(),os=function(){function o(e){H(this,o),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return O(o,[{key:"moveXCrosshairs",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=e-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(t!==null&&(r=a.globals.gridWidth/n*t),s===null||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var l=r;a.config.xaxis.crosshairs.width!=="tickWidth"&&a.config.xaxis.crosshairs.width!=="barWidth"||(l=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(l)}}},{key:"moveYCrosshairs",value:function(e){var t=this.ttCtx;t.ycrosshairs!==null&&X.setAttrs(t.ycrosshairs,{y1:e,y2:e}),t.ycrosshairsHidden!==null&&X.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;if(i.xaxisTooltip!==null&&i.xcrosshairsWidth!==0){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.globals.translateY+1+t.config.xaxis.offsetY;if(e-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e)){e+=t.globals.translateX;var s;s=new X(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=e+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;i.yaxisTTEls===null&&(i.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=t.globals.translateY+a,r=i.yaxisTTEls[e].getBoundingClientRect().height,n=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(n-=26),s-=r/2,t.globals.ignoreYAxisIndexes.indexOf(e)===-1?(i.yaxisTTEls[e].classList.add("apexcharts-active"),i.yaxisTTEls[e].style.top=s+"px",i.yaxisTTEls[e].style.left=n+t.config.yaxis[e].tooltip.offsetX+"px"):i.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),n=s.tooltipRect,l=i!==null?parseFloat(i):1,h=parseFloat(e)+l+5,d=parseFloat(t)+l/2;if(h>a.globals.gridWidth/2&&(h=h-n.ttWidth-l-10),h>a.globals.gridWidth-n.ttWidth-10&&(h=a.globals.gridWidth-n.ttWidth),h<-20&&(h=-20),a.config.tooltip.followCursor){var c=s.getElGrid().getBoundingClientRect();(h=s.e.clientX-c.left)>a.globals.gridWidth/2&&(h-=s.tooltipRect.ttWidth),(d=s.e.clientY+a.globals.translateY-c.top)>a.globals.gridHeight/2&&(d-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+d>a.globals.gridHeight&&(d=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(h)||(h+=a.globals.translateX,r.style.left=h+"px",r.style.top=d+"px")}},{key:"moveMarkers",value:function(e,t){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[e]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),r=0;r0){var f=g.getAttribute("shape"),p=h.getMarkerPath(s,r,f,1.5*c);g.setAttribute("d",p)}this.moveXCrosshairs(s),l.fixedTooltip||this.moveTooltip(s,r,c)}}},{key:"moveDynamicPointsOnHover",value:function(e){var t,i=this.ttCtx,a=i.w,s=0,r=0,n=a.globals.pointsArray,l=new Le(this.ctx),h=new X(this.ctx);t=l.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var d=i.tooltipUtil.getHoverMarkerSize(t);if(n[t]&&(s=n[t][e][0],r=n[t][e][1]),!isNaN(s)){var c=i.tooltipUtil.getAllMarkers();if(c.length)for(var u=0;u0){var m=h.getMarkerPath(s,f,x,d);c[u].setAttribute("d",m)}else c[u].setAttribute("d","")}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,d)}}},{key:"moveStickyTooltipOverBars",value:function(e,t){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new Le(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"']"));n||typeof t!="number"||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(t,"'] path[j='").concat(e,`'],
+ .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='`).concat(t,"'] path[j='").concat(e,`'],
+ .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='`).concat(t,"'] path[j='").concat(e,`'],
+ .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='`).concat(t,"'] path[j='").concat(e,"']")));var l=n?parseFloat(n.getAttribute("cx")):0,h=n?parseFloat(n.getAttribute("cy")):0,d=n?parseFloat(n.getAttribute("barWidth")):0,c=a.getElGrid().getBoundingClientRect(),u=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!u&&(l-=s%2!=0?d/2:0),n&&u&&(l-=d/2)):i.globals.isBarHorizontal||(l=a.xAxisTicksPositions[e-1]+a.dataPointsDividedWidth/2,isNaN(l)&&(l=a.xAxisTicksPositions[e]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?h-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?h=a.e.clientY-c.top-a.tooltipRect.ttHeight/2:h+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(h=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(l),a.fixedTooltip||this.moveTooltip(l,h||i.globals.gridHeight)}}]),o}(),yr=function(){function o(e){H(this,o),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new os(e)}return O(o,[{key:"drawDynamicPoints",value:function(){var e=this.w,t=new X(this.ctx),i=new ct(this.ctx),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=ce(a),e.config.chart.stacked&&a.sort(function(c,u){return parseFloat(c.getAttribute("data:realIndex"))-parseFloat(u.getAttribute("data:realIndex"))});for(var s=0;s2&&arguments[2]!==void 0?arguments[2]:null,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,s=this.w;s.config.chart.type!=="bubble"&&this.newPointSize(e,t);var r=t.getAttribute("cx"),n=t.getAttribute("cy");if(i!==null&&a!==null&&(r=i,n=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if(s.config.chart.type==="radar"){var l=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-l.left}this.tooltipPosition.moveTooltip(r,n,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var t=this.w,i=this,a=this.ttCtx,s=e,r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=t.config.markers.hover.size,l=0;l0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(e[t],i);e[t].setAttribute("d",a)}else e[t].setAttribute("d","M0,0")}}}]),o}(),wr=function(){function o(e){H(this,o),this.w=e.w;var t=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.config.chart.type==="rangeBar"&&t.config.plotOptions.bar.rangeBarGroupRows}return O(o,[{key:"getAttr",value:function(e,t){return parseFloat(e.target.getAttribute(t))}},{key:"handleHeatTreeTooltip",value:function(e){var t=e.e,i=e.opt,a=e.x,s=e.y,r=e.type,n=this.ttCtx,l=this.w;if(t.target.classList.contains("apexcharts-".concat(r,"-rect"))){var h=this.getAttr(t,"i"),d=this.getAttr(t,"j"),c=this.getAttr(t,"cx"),u=this.getAttr(t,"cy"),g=this.getAttr(t,"width"),f=this.getAttr(t,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:h,j:d,shared:!1,e:t}),l.globals.capturedSeriesIndex=h,l.globals.capturedDataPointIndex=d,a=c+n.tooltipRect.ttWidth/2+g,s=u+n.tooltipRect.ttHeight/2-f/2,n.tooltipPosition.moveXCrosshairs(c+g/2),a>l.globals.gridWidth/2&&(a=c-n.tooltipRect.ttWidth/2+g),n.w.config.tooltip.followCursor){var p=l.globals.dom.elWrap.getBoundingClientRect();a=l.globals.clientX-p.left-(a>l.globals.gridWidth/2?n.tooltipRect.ttWidth:0),s=l.globals.clientY-p.top-(s>l.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(e){var t,i,a=e.e,s=e.opt,r=e.x,n=e.y,l=this.w,h=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var d=parseInt(s.paths.getAttribute("cx"),10),c=parseInt(s.paths.getAttribute("cy"),10),u=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),t=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,h.intersect){var g=L.findAncestor(s.paths,"apexcharts-series");g&&(t=parseInt(g.getAttribute("data:realIndex"),10))}if(h.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,j:i,shared:!h.showOnIntersect&&l.config.tooltip.shared,e:a}),a.type==="mouseup"&&h.markerClick(a,t,i),l.globals.capturedSeriesIndex=t,l.globals.capturedDataPointIndex=i,r=d,n=c+l.globals.translateY-1.4*h.tooltipRect.ttHeight,h.w.config.tooltip.followCursor){var f=h.getElGrid().getBoundingClientRect();n=h.e.clientY+l.globals.translateY-f.top}u<0&&(n=c),h.marker.enlargeCurrentPoint(i,s.paths,r,n)}return{x:r,y:n}}},{key:"handleBarTooltip",value:function(e){var t,i,a=e.e,s=e.opt,r=this.w,n=this.ttCtx,l=n.getElTooltip(),h=0,d=0,c=0,u=this.getBarTooltipXY({e:a,opt:s});if(u.j!==null||u.barHeight!==0||u.barWidth!==0){t=u.i;var g=u.j;if(r.globals.capturedSeriesIndex=t,r.globals.capturedDataPointIndex=g,r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!r.config.tooltip.shared?(d=u.x,c=u.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[t]:r.config.stroke.width,h=d):r.globals.comboCharts||r.config.tooltip.shared||(h/=2),isNaN(c)&&(c=r.globals.svgHeight-n.tooltipRect.ttHeight),parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),d+n.tooltipRect.ttWidth>r.globals.gridWidth?d-=n.tooltipRect.ttWidth:d<0&&(d=0),n.w.config.tooltip.followCursor){var f=n.getElGrid().getBoundingClientRect();c=n.e.clientY-f.top}n.tooltip===null&&(n.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?n.tooltipPosition.moveXCrosshairs(h+i/2):n.tooltipPosition.moveXCrosshairs(h)),!n.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(c=c+r.globals.translateY-n.tooltipRect.ttHeight/2,l.style.left=d+r.globals.translateX+"px",l.style.top=c+"px")}}},{key:"getBarTooltipXY",value:function(e){var t=this,i=e.e,a=e.opt,s=this.w,r=null,n=this.ttCtx,l=0,h=0,d=0,c=0,u=0,g=i.target.classList;if(g.contains("apexcharts-bar-area")||g.contains("apexcharts-candlestick-area")||g.contains("apexcharts-boxPlot-area")||g.contains("apexcharts-rangebar-area")){var f=i.target,p=f.getBoundingClientRect(),x=a.elGrid.getBoundingClientRect(),b=p.height;u=p.height;var m=p.width,v=parseInt(f.getAttribute("cx"),10),k=parseInt(f.getAttribute("cy"),10);c=parseFloat(f.getAttribute("barWidth"));var y=i.type==="touchmove"?i.touches[0].clientX:i.clientX;r=parseInt(f.getAttribute("j"),10),l=parseInt(f.parentNode.getAttribute("rel"),10)-1;var C=f.getAttribute("data-range-y1"),w=f.getAttribute("data-range-y2");s.globals.comboCharts&&(l=parseInt(f.parentNode.getAttribute("data:realIndex"),10));var A=function(M){return s.globals.isXNumeric?v-m/2:t.isVerticalGroupedRangeBar?v+m/2:v-n.dataPointsDividedWidth+m/2},S=function(){return k-n.dataPointsDividedHeight+b/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:l,j:r,y1:C?parseInt(C,10):null,y2:w?parseInt(w,10):null,shared:!n.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(h=y-x.left+15,d=S()):(h=A(),d=i.clientY-x.top-n.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((h=v)0&&i.setAttribute("width",t.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,t=this.ttCtx;t.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),t.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,t,i){var a=this.ttCtx,s=this.w,r=s.globals,n=r.seriesYAxisMap[e];if(a.yaxisTooltips[e]&&n.length>0){var l=r.yLabelFormatters[e],h=a.getElGrid().getBoundingClientRect(),d=n[0],c=0;i.yRatio.length>1&&(c=d);var u=(t-h.top)*i.yRatio[c],g=r.maxYArr[d]-r.minYArr[d],f=r.minYArr[d]+(g-u);s.config.yaxis[e].reversed&&(f=r.maxYArr[d]-(g-u)),a.tooltipPosition.moveYCrosshairs(t-h.top),a.yaxisTooltipText[e].innerHTML=l(f),a.tooltipPosition.moveYAxisTooltip(e)}}}]),o}(),ua=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w;var t=this.w;this.tConfig=t.config.tooltip,this.tooltipUtil=new ns(this),this.tooltipLabels=new vr(this),this.tooltipPosition=new os(this),this.marker=new yr(this),this.intersect=new wr(this),this.axesTooltip=new kr(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!t.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return O(o,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl?e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(e){var t=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map(function(r,n){return!!(r.show&&r.tooltip.enabled&&t.globals.axisCharts)}),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),t.config.tooltip.cssClass&&i.classList.add(t.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),t.globals.dom.elWrap.appendChild(i),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new kt(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!t.globals.comboCharts&&!this.tConfig.intersect&&t.config.chart.type!=="rangeBar"||this.tConfig.shared||(this.showOnIntersect=!0),t.config.markers.size!==0&&t.globals.markers.largestSize!==0||this.marker.drawDynamicPoints(this),t.globals.collapsedSeries.length!==t.globals.series.length){this.dataPointsDividedHeight=t.globals.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.globals.gridWidth/t.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=t.globals.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:t.globals.series.length),this.legendLabels=t.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var t=this,i=this.w,a=[],s=this.getElTooltip(),r=function(l){var h=document.createElement("div");h.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(l)),h.style.order=i.config.tooltip.inverseOrder?e-l:l+1;var d=document.createElement("span");d.classList.add("apexcharts-tooltip-marker"),d.style.backgroundColor=i.globals.colors[l],h.appendChild(d);var c=document.createElement("div");c.classList.add("apexcharts-tooltip-text"),c.style.fontFamily=t.tConfig.style.fontFamily||i.config.chart.fontFamily,c.style.fontSize=t.tConfig.style.fontSize,["y","goals","z"].forEach(function(u){var g=document.createElement("div");g.classList.add("apexcharts-tooltip-".concat(u,"-group"));var f=document.createElement("span");f.classList.add("apexcharts-tooltip-text-".concat(u,"-label")),g.appendChild(f);var p=document.createElement("span");p.classList.add("apexcharts-tooltip-text-".concat(u,"-value")),g.appendChild(p),c.appendChild(g)}),h.appendChild(c),s.appendChild(h),a.push(h)},n=0;n0&&this.addPathsEventListeners(f,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,t=this.getElTooltip(),i=t.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,l=this.tConfig.fixed.position.toLowerCase();return l.indexOf("right")>-1&&(r=r+e.globals.svgWidth-a+10),l.indexOf("bottom")>-1&&(n=n+e.globals.svgHeight-s-10),t.style.left=r+"px",t.style.top=n+"px",{x:r,y:n,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(e){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(t,e)}},{key:"addPathsEventListeners",value:function(e,t){for(var i=this,a=function(r){var n={paths:e[r],tooltipEl:t.tooltipEl,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:t.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(l){return e[r].addEventListener(l,i.onSeriesHover.bind(i,n),{capture:!1,passive:!0})})},s=0;s=20?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){i.seriesHover(e,t)},20-a))}},{key:"seriesHover",value:function(e,t){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||s.globals.dataPoints===0)||(a.length?a.forEach(function(r){var n=i.getElTooltip(r),l={paths:e.paths,tooltipEl:n,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:r.w.globals.tooltip.ttItems};r.w.globals.minX===i.w.globals.minX&&r.w.globals.maxX===i.w.globals.maxX&&r.w.globals.tooltip.seriesHoverByContext({chartCtx:r,ttCtx:r.w.globals.tooltip,opt:l,e:t})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}},{key:"seriesHoverByContext",value:function(e){var t=e.chartCtx,i=e.ttCtx,a=e.opt,s=e.e,r=t.w,n=this.getElTooltip(t);n&&(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new Le(t).toggleSeriesOnHover(s,s.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var t,i,a=e.e,s=e.opt,r=this.w,n=s.elGrid.getBoundingClientRect(),l=a.type==="touchmove"?a.touches[0].clientX:a.clientX,h=a.type==="touchmove"?a.touches[0].clientY:a.clientY;if(this.clientY=h,this.clientX=l,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,hn.top+n.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var d=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(d)<0)return void this.handleMouseOut(s)}var c=this.getElTooltip(),u=this.getElXCrosshairs(),g=[];r.config.chart.group&&(g=this.ctx.getSyncedCharts());var f=r.globals.xyCharts||r.config.chart.type==="bar"&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if(a.type==="mousemove"||a.type==="touchmove"||a.type==="mouseup"){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;u!==null&&u.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter(function(m){return m===!0});if(this.ycrosshairs!==null&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),f&&!this.showOnIntersect||g.length>1)this.handleStickyTooltip(a,l,h,s);else if(r.config.chart.type==="heatmap"||r.config.chart.type==="treemap"){var x=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:t,y:i,type:r.config.chart.type});t=x.x,i=x.y,c.style.left=t+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:t,y:i});if(this.yaxisTooltips.length)for(var b=0;bh.width)this.handleMouseOut(a);else if(l!==null)this.handleStickyCapturedSeries(e,l,a,n);else if(this.tooltipUtil.isXoverlap(n)||s.globals.isBarHorizontal){var d=s.globals.series.findIndex(function(c,u){return!s.globals.collapsedSeriesIndices.includes(u)});this.create(e,this,d,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,t,i,a){var s=this.w;if(!this.tConfig.shared&&s.globals.series[t][a]===null)return void this.handleMouseOut(i);if(s.globals.series[t][a]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,a,i.ttItems):this.create(e,this,t,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex(function(n,l){return!s.globals.collapsedSeriesIndices.includes(l)});this.create(e,this,r,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,t=new X(this.ctx),i=e.globals.dom.Paper.find(".apexcharts-bar-area"),a=0;a5&&arguments[5]!==void 0?arguments[5]:null,w=this.w,A=t;e.type==="mouseup"&&this.markerClick(e,i,a),C===null&&(C=this.tConfig.shared);var S=this.tooltipUtil.hasMarkers(i),M=this.tooltipUtil.getElBars(),P=function(){w.globals.markers.largestSize>0?A.marker.enlargePoints(a):A.tooltipPosition.moveDynamicPointsOnHover(a)};if(w.config.legend.tooltipHoverFormatter){var I=w.config.legend.tooltipHoverFormatter,T=Array.from(this.legendLabels);T.forEach(function(oe){var K=oe.getAttribute("data:default-text");oe.innerHTML=decodeURIComponent(K)});for(var z=0;z0)){var G=new X(this.ctx),B=w.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),A.tooltipPosition.moveStickyTooltipOverBars(a,i),A.tooltipUtil.getAllMarkers(!0).length&&P();for(var ee=0;ee0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(g-=d*w)),C&&(g=g+u.height/2-m/2-2);var S=t.globals.series[i][a]<0,M=l;switch(this.barCtx.isReversed&&(M=l+(S?c:-c)),x.position){case"center":f=C?S?M-c/2+k:M+c/2-k:S?M-c/2+u.height/2+k:M+c/2+u.height/2-k;break;case"bottom":f=C?S?M-c+k:M+c-k:S?M-c+u.height+m+k:M+c-u.height/2+m-k;break;case"top":f=C?S?M+k:M-k:S?M-u.height/2-k:M+u.height+k}if(this.barCtx.lastActiveBarSerieIndex===s&&b.enabled){var P=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:a}),p.fontSize);r=S?M-P.height/2-k-b.offsetY+18:M+P.height+k+b.offsetY-18;var I=A;n=y+(t.globals.isXNumeric?-d*t.globals.barGroups.length/2:t.globals.barGroups.length*d/2-(t.globals.barGroups.length-1)*d-I)+b.offsetX}return t.config.chart.stacked||(f<0?f=0+m:f+u.height/3>t.globals.gridHeight&&(f=t.globals.gridHeight-m)),{bcx:h,bcy:l,dataLabelsX:g,dataLabelsY:f,totalDataLabelsX:n,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var t=this.w,i=e.x,a=e.i,s=e.j,r=e.realIndex,n=e.bcy,l=e.barHeight,h=e.barWidth,d=e.textRects,c=e.dataLabelsX,u=e.strokeWidth,g=e.dataLabelsConfig,f=e.barDataLabelsConfig,p=e.barTotalDataLabelsConfig,x=e.offX,b=e.offY,m=t.globals.gridHeight/t.globals.dataPoints;h=Math.abs(h);var v,k,y=n-(this.barCtx.isRangeBar?0:m)+l/2+d.height/2+b-3,C="start",w=t.globals.series[a][s]<0,A=i;switch(this.barCtx.isReversed&&(A=i+(w?-h:h),C=w?"start":"end"),f.position){case"center":c=w?A+h/2-x:Math.max(d.width/2,A-h/2)+x;break;case"bottom":c=w?A+h-u-x:A-h+u+x;break;case"top":c=w?A-u-x:A-u+x}if(this.barCtx.lastActiveBarSerieIndex===r&&p.enabled){var S=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),g.fontSize);w?(v=A-u-x-p.offsetX,C="end"):v=A+x+p.offsetX+(this.barCtx.isReversed?-(h+u):u),k=y-d.height/2+S.height/2+p.offsetY+u}return t.config.chart.stacked||(g.textAnchor==="start"?c-d.width<0?c=w?d.width+u:u:c+d.width>t.globals.gridWidth&&(c=w?t.globals.gridWidth-u:t.globals.gridWidth-d.width-u):g.textAnchor==="middle"?c-d.width/2<0?c=d.width/2+u:c+d.width/2>t.globals.gridWidth&&(c=t.globals.gridWidth-d.width/2-u):g.textAnchor==="end"&&(c<1?c=d.width+u:c+1>t.globals.gridWidth&&(c=t.globals.gridWidth-d.width-u))),{bcx:i,bcy:n,dataLabelsX:c,dataLabelsY:y,totalDataLabelsX:v,totalDataLabelsY:k,totalDataLabelsAnchor:C}}},{key:"drawCalculatedDataLabels",value:function(e){var t=e.x,i=e.y,a=e.val,s=e.i,r=e.j,n=e.textRects,l=e.barHeight,h=e.barWidth,d=e.dataLabelsConfig,c=this.w,u="rotate(0)";c.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(u="rotate(-90, ".concat(t,", ").concat(i,")"));var g=new st(this.barCtx.ctx),f=new X(this.barCtx.ctx),p=d.formatter,x=null,b=c.globals.collapsedSeriesIndices.indexOf(s)>-1;if(d.enabled&&!b){x=f.group({class:"apexcharts-data-labels",transform:u});var m="";a!==void 0&&(m=p(a,R(R({},c),{},{seriesIndex:s,dataPointIndex:r,w:c}))),!a&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(m="");var v=c.globals.series[s][r]<0,k=c.config.plotOptions.bar.dataLabels.position;c.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(k==="top"&&(d.textAnchor=v?"end":"start"),k==="center"&&(d.textAnchor="middle"),k==="bottom"&&(d.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&hMath.abs(h)&&(m=""):n.height/1.6>Math.abs(l)&&(m=""));var y=R({},d);this.barCtx.isHorizontal&&a<0&&(d.textAnchor==="start"?y.textAnchor="end":d.textAnchor==="end"&&(y.textAnchor="start")),g.plotDataLabelsText({x:t,y:i,text:m,i:s,j:r,parent:x,dataLabelsConfig:y,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(e){var t=e.x,i=e.y,a=e.val,s=e.realIndex,r=e.textAnchor,n=e.barTotalDataLabelsConfig;this.w;var l,h=new X(this.barCtx.ctx);return n.enabled&&t!==void 0&&i!==void 0&&this.barCtx.lastActiveBarSerieIndex===s&&(l=h.drawText({x:t,y:i,foreColor:n.style.color,text:a,textAnchor:r,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),l}}]),o}(),Cr=function(){function o(e){H(this,o),this.w=e.w,this.barCtx=e}return O(o,[{key:"initVariables",value:function(e){var t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[i].length),t.globals.isXNumeric)for(var a=0;at.globals.minX&&t.globals.seriesX[i][a]0&&(a=h.globals.minXDiff/u),(r=a/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=h.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?h.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e=h.globals.padHorizontal+L.noExponents(a-r*this.barCtx.seriesLen)/2}return h.globals.barHeight=s,h.globals.barWidth=r,{x:e,y:t,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:n,zeroW:l}}},{key:"initializeStackedPrevVars",value:function(e){e.w.globals.seriesGroups.forEach(function(t){e[t]||(e[t]={}),e[t].prevY=[],e[t].prevX=[],e[t].prevYF=[],e[t].prevXF=[],e[t].prevYVal=[],e[t].prevXVal=[]})}},{key:"initializeStackedXYVars",value:function(e){e.w.globals.seriesGroups.forEach(function(t){e[t]||(e[t]={}),e[t].xArrj=[],e[t].xArrjF=[],e[t].xArrjVal=[],e[t].yArrj=[],e[t].yArrjF=[],e[t].yArrjVal=[]})}},{key:"getPathFillColor",value:function(e,t,i,a){var s,r,n,l,h=this.w,d=this.barCtx.ctx.fill,c=null,u=this.barCtx.barOptions.distributed?i:t,g=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(f){e[t][i]>=f.from&&e[t][i]<=f.to&&(c=f.color,g=!0)}),{color:d.fillPath({seriesNumber:this.barCtx.barOptions.distributed?u:a,dataPointIndex:i,color:c,value:e[t][i],fillConfig:(s=h.config.series[t].data[i])===null||s===void 0?void 0:s.fill,fillType:(r=h.config.series[t].data[i])!==null&&r!==void 0&&(n=r.fill)!==null&&n!==void 0&&n.type?(l=h.config.series[t].data[i])===null||l===void 0?void 0:l.fill.type:Array.isArray(h.config.fill.type)?h.config.fill.type[a]:h.config.fill.type}),useRangeColor:g}}},{key:"getStrokeWidth",value:function(e,t,i){var a=0,s=this.w;return this.barCtx.series[e][t]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"createBorderRadiusArr",value:function(e){var t,i=this.w,a=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,s=e.length,r=0|((t=e[0])===null||t===void 0?void 0:t.length),n=Array.from({length:s},function(){return Array(r).fill(a?"top":"none")});if(a)return n;for(var l=0;l0?(h.push(u),c++):g<0&&(d.push(u),c++)}if(h.length>0&&d.length===0)if(h.length===1)n[h[0]][l]="both";else{var f,p=h[0],x=h[h.length-1],b=pt(h);try{for(b.s();!(f=b.n()).done;){var m=f.value;n[m][l]=m===p?"bottom":m===x?"top":"none"}}catch(Y){b.e(Y)}finally{b.f()}}else if(d.length>0&&h.length===0)if(d.length===1)n[d[0]][l]="both";else{var v,k=Math.max.apply(Math,d),y=Math.min.apply(Math,d),C=pt(d);try{for(C.s();!(v=C.n()).done;){var w=v.value;n[w][l]=w===k?"bottom":w===y?"top":"none"}}catch(Y){C.e(Y)}finally{C.f()}}else if(h.length>0&&d.length>0){var A,S=h[h.length-1],M=pt(h);try{for(M.s();!(A=M.n()).done;){var P=A.value;n[P][l]=P===S?"top":"none"}}catch(Y){M.e(Y)}finally{M.f()}var I,T=Math.max.apply(Math,d),z=pt(d);try{for(z.s();!(I=z.n()).done;){var E=I.value;n[E][l]=E===T?"bottom":"none"}}catch(Y){z.e(Y)}finally{z.f()}}else c===1&&(n[h[0]||d[0]][l]="both")}return n}},{key:"barBackground",value:function(e){var t=e.j,i=e.i,a=e.x1,s=e.x2,r=e.y1,n=e.y2,l=e.elSeries,h=this.w,d=new X(this.barCtx.ctx),c=new Le(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);var u=this.barCtx.barOptions.colors.backgroundBarColors[t],g=d.drawRect(a!==void 0?a:0,r!==void 0?r:0,s!==void 0?s:h.globals.gridWidth,n!==void 0?n:h.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,u,this.barCtx.barOptions.colors.backgroundBarOpacity);l.add(g),g.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var t,i=e.barWidth,a=e.barXPosition,s=e.y1,r=e.y2,n=e.strokeWidth,l=e.isReversed,h=e.series,d=e.seriesGroup,c=e.realIndex,u=e.i,g=e.j,f=e.w,p=new X(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var x=i,b=a;(t=f.config.series[c].data[g])!==null&&t!==void 0&&t.columnWidthOffset&&(b=a-f.config.series[c].data[g].columnWidthOffset/2,x=i+f.config.series[c].data[g].columnWidthOffset);var m=n/2,v=b+m,k=b+x-m,y=(h[u][g]>=0?1:-1)*(l?-1:1);s+=.001-m*y,r+=.001+m*y;var C=p.move(v,s),w=p.move(v,s),A=p.line(k,s);if(f.globals.previousPaths.length>0&&(w=this.barCtx.getPreviousPath(c,g,!1)),C=C+p.line(v,r)+p.line(k,r)+A+(f.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[c][g]==="both"?" Z":" z"),w=w+p.line(v,s)+A+A+A+A+A+p.line(v,s)+(f.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[c][g]==="both"?" Z":" z"),this.arrBorderRadius[c][g]!=="none"&&(C=p.roundPathCorners(C,f.config.plotOptions.bar.borderRadius)),f.config.chart.stacked){var S=this.barCtx;(S=this.barCtx[d]).yArrj.push(r-m*y),S.yArrjF.push(Math.abs(s-r+n*y)),S.yArrjVal.push(this.barCtx.series[u][g])}return{pathTo:C,pathFrom:w}}},{key:"getBarpaths",value:function(e){var t,i=e.barYPosition,a=e.barHeight,s=e.x1,r=e.x2,n=e.strokeWidth,l=e.isReversed,h=e.series,d=e.seriesGroup,c=e.realIndex,u=e.i,g=e.j,f=e.w,p=new X(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var x=i,b=a;(t=f.config.series[c].data[g])!==null&&t!==void 0&&t.barHeightOffset&&(x=i-f.config.series[c].data[g].barHeightOffset/2,b=a+f.config.series[c].data[g].barHeightOffset);var m=n/2,v=x+m,k=x+b-m,y=(h[u][g]>=0?1:-1)*(l?-1:1);s+=.001+m*y,r+=.001-m*y;var C=p.move(s,v),w=p.move(s,v);f.globals.previousPaths.length>0&&(w=this.barCtx.getPreviousPath(c,g,!1));var A=p.line(s,k);if(C=C+p.line(r,v)+p.line(r,k)+A+(f.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[c][g]==="both"?" Z":" z"),w=w+p.line(s,v)+A+A+A+A+A+p.line(s,v)+(f.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[c][g]==="both"?" Z":" z"),this.arrBorderRadius[c][g]!=="none"&&(C=p.roundPathCorners(C,f.config.plotOptions.bar.borderRadius)),f.config.chart.stacked){var S=this.barCtx;(S=this.barCtx[d]).xArrj.push(r+m*y),S.xArrjF.push(Math.abs(s-r-n*y)),S.xArrjVal.push(this.barCtx.series[u][g])}return{pathTo:C,pathFrom:w}}},{key:"checkZeroSeries",value:function(e){for(var t=e.series,i=this.w,a=0;a2&&arguments[2]!==void 0)||arguments[2]?t:null;return e!=null&&(i=t+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(e,t,i){var a=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3]?t:null;return e!=null&&(a=t-e/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(e,t,i,a,s,r){var n=this,l=this.w,h=[],d=function(g,f){var p;h.push((Ht(p={},e,e==="x"?n.getXForValue(g,t,!1):n.getYForValue(g,i,r,!1)),Ht(p,"attrs",f),p))};if(l.globals.seriesGoals[a]&&l.globals.seriesGoals[a][s]&&Array.isArray(l.globals.seriesGoals[a][s])&&l.globals.seriesGoals[a][s].forEach(function(g){d(g.value,g)}),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var c=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,u={strokeHeight:e==="x"?0:l.globals.markers.size[a],strokeWidth:e==="x"?l.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(c[a])?c[a][0]:c[a]};d(l.globals.seriesRangeStart[a][s],u),d(l.globals.seriesRangeEnd[a][s],R(R({},u),{},{strokeColor:Array.isArray(c[a])?c[a][1]:c[a]}))}return h}},{key:"drawGoalLine",value:function(e){var t=e.barXPosition,i=e.barYPosition,a=e.goalX,s=e.goalY,r=e.barWidth,n=e.barHeight,l=new X(this.barCtx.ctx),h=l.group({className:"apexcharts-bar-goals-groups"});h.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:h.node}),h.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var d=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach(function(c){if(c.x>=-1&&c.x<=l.w.globals.gridWidth+1){var u=c.attrs.strokeHeight!==void 0?c.attrs.strokeHeight:n/2,g=i+u+n/2;d=l.drawLine(c.x,g-2*u,c.x,g,c.attrs.strokeColor?c.attrs.strokeColor:void 0,c.attrs.strokeDashArray,c.attrs.strokeWidth?c.attrs.strokeWidth:2,c.attrs.strokeLineCap),h.add(d)}}):Array.isArray(s)&&s.forEach(function(c){if(c.y>=-1&&c.y<=l.w.globals.gridHeight+1){var u=c.attrs.strokeWidth!==void 0?c.attrs.strokeWidth:r/2,g=t+u+r/2;d=l.drawLine(g-2*u,c.y,g,c.y,c.attrs.strokeColor?c.attrs.strokeColor:void 0,c.attrs.strokeDashArray,c.attrs.strokeHeight?c.attrs.strokeHeight:2,c.attrs.strokeLineCap),h.add(d)}}),h}},{key:"drawBarShadow",value:function(e){var t=e.prevPaths,i=e.currPaths,a=e.color,s=this.w,r=t.x,n=t.x1,l=t.barYPosition,h=i.x,d=i.x1,c=i.barYPosition,u=l+i.barHeight,g=new X(this.barCtx.ctx),f=new L,p=g.move(n,u)+g.line(r,u)+g.line(h,c)+g.line(d,c)+g.line(n,u)+(s.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[realIndex][j]==="both"?" Z":" z");return g.drawPath({d:p,fill:f.shadeColor(.5,L.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(e){var t,i=e.i,a=e.j,s=this.w,r=0,n=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map(function(l,h){return h}):((t=s.globals.columnSeries)===null||t===void 0?void 0:t.i.map(function(l){return l}))||[]).forEach(function(l){var h=s.globals.seriesPercent[l][a];h&&r++,l-1}),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),o}(),rt=function(){function o(e,t){H(this,o),this.ctx=e,this.w=e.w;var i=this.w;this.barOptions=i.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=i.config.stroke.width,this.isNullValue=!1,this.isRangeBar=i.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!i.globals.isBarHorizontal&&i.globals.seriesRange.length&&i.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=t,this.xyRatios!==null&&(this.xRatio=t.xRatio,this.yRatio=t.yRatio,this.invertedXRatio=t.invertedXRatio,this.invertedYRatio=t.invertedYRatio,this.baseLineY=t.baseLineY,this.baseLineInvertedY=t.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var a=new Le(this.ctx);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var s=a.getBarSeriesIndices(),r=new he(this.ctx);this.stackedSeriesTotals=r.getStackedSeriesTotals(this.w.config.series.map(function(n,l){return s.indexOf(l)===-1?l:-1}).filter(function(n){return n!==-1})),this.barHelpers=new Cr(this)}return O(o,[{key:"draw",value:function(e,t){var i=this.w,a=new X(this.ctx),s=new he(this.ctx,i);e=s.getLogSeries(e),this.series=e,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var n=0,l=0;n0&&(this.visibleI=this.visibleI+1);var k=0,y=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);var C=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var w=this.barHelpers.initialPositions();f=w.y,k=w.barHeight,d=w.yDivision,u=w.zeroW,g=w.x,y=w.barWidth,h=w.xDivision,c=w.zeroH,this.isHorizontal||x.push(g+y/2);var A=a.group({class:"apexcharts-datalabels","data:realIndex":b});i.globals.delayedElements.push({el:A.node}),A.node.classList.add("apexcharts-element-hidden");var S=a.group({class:"apexcharts-bar-goals-markers"}),M=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");for(var P=0;P0){var Y,F=this.barHelpers.drawBarShadow({color:typeof E.color=="string"&&((Y=E.color)===null||Y===void 0?void 0:Y.indexOf("url"))===-1?E.color:L.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});M.add(F),i.config.chart.dropShadow.enabled&&new ue(this.ctx).dropShadow(F,i.config.chart.dropShadow,b)}this.pathArr.push(T);var W=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:k,barWidth:y});W&&S.add(W),f=T.y,g=T.x,P>0&&x.push(g+y/2),p.push(f),this.renderSeries(R(R({realIndex:b,pathFill:E.color},E.useRangeColor?{lineFill:E.color}:{}),{},{j:P,i:n,columnGroupIndex:m,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:I,elSeries:v,x:g,y:f,series:e,barHeight:Math.abs(T.barHeight?T.barHeight:k),barWidth:Math.abs(T.barWidth?T.barWidth:y),elDataLabelsWrap:A,elGoalsMarkers:S,elBarShadows:M,visibleSeries:this.visibleI,type:"bar"}))}i.globals.seriesXvalues[b]=x,i.globals.seriesYvalues[b]=p,r.add(v)}return r}},{key:"renderSeries",value:function(e){var t=e.realIndex,i=e.pathFill,a=e.lineFill,s=e.j,r=e.i,n=e.columnGroupIndex,l=e.pathFrom,h=e.pathTo,d=e.strokeWidth,c=e.elSeries,u=e.x,g=e.y,f=e.y1,p=e.y2,x=e.series,b=e.barHeight,m=e.barWidth,v=e.barXPosition,k=e.barYPosition,y=e.elDataLabelsWrap,C=e.elGoalsMarkers,w=e.elBarShadows,A=e.visibleSeries,S=e.type,M=e.classes,P=this.w,I=new X(this.ctx);if(!a){var T=typeof P.globals.stroke.colors[t]=="function"?function(W){var _,G=P.config.stroke.colors;return Array.isArray(G)&&G.length>0&&((_=G[W])||(_=""),typeof _=="function")?_({value:P.globals.series[W][s],dataPointIndex:s,w:P}):_}(t):P.globals.stroke.colors[t];a=this.barOptions.distributed?P.globals.stroke.colors[s]:T}P.config.series[r].data[s]&&P.config.series[r].data[s].strokeColor&&(a=P.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var z=s/P.config.chart.animations.animateGradually.delay*(P.config.chart.animations.speed/P.globals.dataPoints)/2.4,E=I.renderPaths({i:r,j:s,realIndex:t,pathFrom:l,pathTo:h,stroke:a,strokeWidth:d,strokeLineCap:P.config.stroke.lineCap,fill:i,animationDelay:z,initialSpeed:P.config.chart.animations.speed,dataChangeSpeed:P.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(S,"-area ").concat(M),chartType:S});E.attr("clip-path","url(#gridRectBarMask".concat(P.globals.cuid,")"));var Y=P.config.forecastDataPoints;Y.count>0&&s>=P.globals.dataPoints-Y.count&&(E.node.setAttribute("stroke-dasharray",Y.dashArray),E.node.setAttribute("stroke-width",Y.strokeWidth),E.node.setAttribute("fill-opacity",Y.fillOpacity)),f!==void 0&&p!==void 0&&(E.attr("data-range-y1",f),E.attr("data-range-y2",p)),new ue(this.ctx).setSelectionFilter(E,t,s),c.add(E);var F=new Ar(this).handleBarDataLabels({x:u,y:g,y1:f,y2:p,i:r,j:s,series:x,realIndex:t,columnGroupIndex:n,barHeight:b,barWidth:m,barXPosition:v,barYPosition:k,renderedPath:E,visibleSeries:A});return F.dataLabels!==null&&y.add(F.dataLabels),F.totalDataLabels&&y.add(F.totalDataLabels),c.add(y),C&&c.add(C),w&&c.add(w),c}},{key:"drawBarPaths",value:function(e){var t,i=e.indexes,a=e.barHeight,s=e.strokeWidth,r=e.zeroW,n=e.x,l=e.y,h=e.yDivision,d=e.elSeries,c=this.w,u=i.i,g=i.j;if(c.globals.isXNumeric)t=(l=(c.globals.seriesX[u][g]-c.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var f=0,p=0;c.globals.seriesPercent.forEach(function(b,m){b[g]&&f++,m0&&(a=this.seriesLen*a/f),t=l+a*this.visibleI,t-=a*p}else t=l+a*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[u][g],r)-r)/2),n=this.barHelpers.getXForValue(this.series[u][g],r);var x=this.barHelpers.getBarpaths({barYPosition:t,barHeight:a,x1:r,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:u,j:g,w:c});return c.globals.isXNumeric||(l+=h),this.barHelpers.barBackground({j:g,i:u,y1:t-a*this.visibleI,y2:a*this.seriesLen,elSeries:d}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x1:r,x:n,y:l,goalX:this.barHelpers.getGoalValues("x",r,null,u,g),barYPosition:t,barHeight:a}}},{key:"drawColumnPaths",value:function(e){var t,i=e.indexes,a=e.x,s=e.y,r=e.xDivision,n=e.barWidth,l=e.zeroH,h=e.strokeWidth,d=e.elSeries,c=this.w,u=i.realIndex,g=i.translationsIndex,f=i.i,p=i.j,x=i.bc;if(c.globals.isXNumeric){var b=this.getBarXForNumericXAxis({x:a,j:p,realIndex:u,barWidth:n});a=b.x,t=b.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var m=this.barHelpers.getZeroValueEncounters({i:f,j:p}),v=m.nonZeroColumns,k=m.zeroEncounters;v>0&&(n=this.seriesLen*n/v),t=a+n*this.visibleI,t-=n*k}else t=a+n*this.visibleI;s=this.barHelpers.getYForValue(this.series[f][p],l,g);var y=this.barHelpers.getColumnPaths({barXPosition:t,barWidth:n,y1:l,y2:s,strokeWidth:h,isReversed:this.isReversed,series:this.series,realIndex:u,i:f,j:p,w:c});return c.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:x,j:p,i:f,x1:t-h/2-n*this.visibleI,x2:n*this.seriesLen+h/2,elSeries:d}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,l,f,p,g),barXPosition:t,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(e){var t=e.x,i=e.barWidth,a=e.realIndex,s=e.j,r=this.w,n=a;return r.globals.seriesX[a].length||(n=r.globals.maxValsInArrayIndex),L.isNumber(r.globals.seriesX[n][s])&&(t=(r.globals.seriesX[n][s]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:t+i*this.visibleI,x:t}}},{key:"getPreviousPath",value:function(e,t){for(var i,a=this.w,s=0;s0&&parseInt(r.realIndex,10)===parseInt(e,10)&&a.globals.previousPaths[s].paths[t]!==void 0&&(i=a.globals.previousPaths[s].paths[t].d)}return i}}]),o}(),ga=function(o){Ct(t,rt);var e=At(t);function t(){return H(this,t),e.apply(this,arguments)}return O(t,[{key:"draw",value:function(i,a){var s=this,r=this.w;this.graphics=new X(this.ctx),this.bar=new rt(this.ctx,this.xyRatios);var n=new he(this.ctx,r);i=n.getLogSeries(i),this.yRatio=n.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i),r.config.chart.stackType==="100%"&&(i=r.globals.comboCharts?a.map(function(f){return r.globals.seriesPercent[f]}):r.globals.seriesPercent.slice()),this.series=i,this.barHelpers.initializeStackedPrevVars(this);for(var l=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),h=0,d=0,c=function(f,p){var x=void 0,b=void 0,m=void 0,v=void 0,k=r.globals.comboCharts?a[f]:f,y=s.barHelpers.getGroupIndex(k),C=y.groupIndex,w=y.columnGroupIndex;s.groupCtx=s[r.globals.seriesGroups[C]];var A=[],S=[],M=0;s.yRatio.length>1&&(s.yaxisIndex=r.globals.seriesYAxisReverseMap[k][0],M=k),s.isReversed=r.config.yaxis[s.yaxisIndex]&&r.config.yaxis[s.yaxisIndex].reversed;var P=s.graphics.group({class:"apexcharts-series",seriesName:L.escapeString(r.globals.seriesNames[k]),rel:f+1,"data:realIndex":k});s.ctx.series.addCollapsedClassToSeries(P,k);var I=s.graphics.group({class:"apexcharts-datalabels","data:realIndex":k}),T=s.graphics.group({class:"apexcharts-bar-goals-markers"}),z=0,E=0,Y=s.initialPositions(h,d,x,b,m,v,M);d=Y.y,z=Y.barHeight,b=Y.yDivision,v=Y.zeroW,h=Y.x,E=Y.barWidth,x=Y.xDivision,m=Y.zeroH,r.globals.barHeight=z,r.globals.barWidth=E,s.barHelpers.initializeStackedXYVars(s),s.groupCtx.prevY.length===1&&s.groupCtx.prevY[0].every(function(pe){return isNaN(pe)})&&(s.groupCtx.prevY[0]=s.groupCtx.prevY[0].map(function(){return m}),s.groupCtx.prevYF[0]=s.groupCtx.prevYF[0].map(function(){return 0}));for(var F=0;F0||s.barHelpers.arrBorderRadius[k][F]==="top"&&r.globals.series[k][F]<0)&&(oe=K),P=s.renderSeries(R(R({realIndex:k,pathFill:ee.color},ee.useRangeColor?{lineFill:ee.color}:{}),{},{j:F,i:f,columnGroupIndex:w,pathFrom:G.pathFrom,pathTo:G.pathTo,strokeWidth:W,elSeries:P,x:h,y:d,series:i,barHeight:z,barWidth:E,elDataLabelsWrap:I,elGoalsMarkers:T,type:"bar",visibleSeries:w,classes:oe}))}r.globals.seriesXvalues[k]=A,r.globals.seriesYvalues[k]=S,s.groupCtx.prevY.push(s.groupCtx.yArrj),s.groupCtx.prevYF.push(s.groupCtx.yArrjF),s.groupCtx.prevYVal.push(s.groupCtx.yArrjVal),s.groupCtx.prevX.push(s.groupCtx.xArrj),s.groupCtx.prevXF.push(s.groupCtx.xArrjF),s.groupCtx.prevXVal.push(s.groupCtx.xArrjVal),l.add(P)},u=0,g=0;u1?c=(s=u.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:String(f).indexOf("%")===-1?c=parseInt(f,10):c*=parseInt(f,10)/100,n=this.isReversed?this.baseLineY[h]:u.globals.gridHeight-this.baseLineY[h],i=u.globals.padHorizontal+(s-c)/2}var p=u.globals.barGroups.length||1;return{x:i,y:a,yDivision:r,xDivision:s,barHeight:d/p,barWidth:c/p,zeroH:n,zeroW:l}}},{key:"drawStackedBarPaths",value:function(i){for(var a,s=i.indexes,r=i.barHeight,n=i.strokeWidth,l=i.zeroW,h=i.x,d=i.y,c=i.columnGroupIndex,u=i.seriesGroup,g=i.yDivision,f=i.elSeries,p=this.w,x=d+c*r,b=s.i,m=s.j,v=s.realIndex,k=s.translationsIndex,y=0,C=0;C0){var A=l;this.groupCtx.prevXVal[w-1][m]<0?A=this.series[b][m]>=0?this.groupCtx.prevX[w-1][m]+y-2*(this.isReversed?y:0):this.groupCtx.prevX[w-1][m]:this.groupCtx.prevXVal[w-1][m]>=0&&(A=this.series[b][m]>=0?this.groupCtx.prevX[w-1][m]:this.groupCtx.prevX[w-1][m]-y+2*(this.isReversed?y:0)),a=A}else a=l;h=this.series[b][m]===null?a:a+this.series[b][m]/this.invertedYRatio-2*(this.isReversed?this.series[b][m]/this.invertedYRatio:0);var S=this.barHelpers.getBarpaths({barYPosition:x,barHeight:r,x1:a,x2:h,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:s.realIndex,seriesGroup:u,i:b,j:m,w:p});return this.barHelpers.barBackground({j:m,i:b,y1:x,y2:r,elSeries:f}),d+=g,{pathTo:S.pathTo,pathFrom:S.pathFrom,goalX:this.barHelpers.getGoalValues("x",l,null,b,m,k),barXPosition:a,barYPosition:x,x:h,y:d}}},{key:"drawStackedColumnPaths",value:function(i){var a=i.indexes,s=i.x,r=i.y,n=i.xDivision,l=i.barWidth,h=i.zeroH,d=i.columnGroupIndex,c=i.seriesGroup,u=i.elSeries,g=this.w,f=a.i,p=a.j,x=a.bc,b=a.realIndex,m=a.translationsIndex;if(g.globals.isXNumeric){var v=g.globals.seriesX[b][p];v||(v=0),s=(v-g.globals.minX)/this.xRatio-l/2*g.globals.barGroups.length}for(var k,y=s+d*l,C=0,w=0;w0&&!g.globals.isXNumeric||A>0&&g.globals.isXNumeric&&g.globals.seriesX[b-1][p]===g.globals.seriesX[b][p]){var S,M,P,I=Math.min(this.yRatio.length+1,b+1);if(this.groupCtx.prevY[A-1]!==void 0&&this.groupCtx.prevY[A-1].length)for(var T=1;T=0?P-C+2*(this.isReversed?C:0):P;break}if(((F=this.groupCtx.prevYVal[A-E])===null||F===void 0?void 0:F[p])>=0){M=this.series[f][p]>=0?P:P+C-2*(this.isReversed?C:0);break}}M===void 0&&(M=g.globals.gridHeight),k=(S=this.groupCtx.prevYF[0])!==null&&S!==void 0&&S.every(function(_){return _===0})&&this.groupCtx.prevYF.slice(1,A).every(function(_){return _.every(function(G){return isNaN(G)})})?h:M}else k=h;r=this.series[f][p]?k-this.series[f][p]/this.yRatio[m]+2*(this.isReversed?this.series[f][p]/this.yRatio[m]:0):k;var W=this.barHelpers.getColumnPaths({barXPosition:y,barWidth:l,y1:k,y2:r,yRatio:this.yRatio[m],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:c,realIndex:a.realIndex,i:f,j:p,w:g});return this.barHelpers.barBackground({bc:x,j:p,i:f,x1:y,x2:l,elSeries:u}),{pathTo:W.pathTo,pathFrom:W.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,h,f,p),barXPosition:y,x:g.globals.isXNumeric?s:s+n,y:r}}}]),t}(),ni=function(o){Ct(t,rt);var e=At(t);function t(){return H(this,t),e.apply(this,arguments)}return O(t,[{key:"draw",value:function(i,a,s){var r=this,n=this.w,l=new X(this.ctx),h=n.globals.comboCharts?a:n.config.chart.type,d=new Te(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=n.config.plotOptions.bar.horizontal;var c=new he(this.ctx,n);i=c.getLogSeries(i),this.series=i,this.yRatio=c.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i);for(var u=l.group({class:"apexcharts-".concat(h,"-series apexcharts-plot-series")}),g=function(p){r.isBoxPlot=n.config.chart.type==="boxPlot"||n.config.series[p].type==="boxPlot";var x,b,m,v,k=void 0,y=void 0,C=[],w=[],A=n.globals.comboCharts?s[p]:p,S=r.barHelpers.getGroupIndex(A).columnGroupIndex,M=l.group({class:"apexcharts-series",seriesName:L.escapeString(n.globals.seriesNames[A]),rel:p+1,"data:realIndex":A});r.ctx.series.addCollapsedClassToSeries(M,A),i[p].length>0&&(r.visibleI=r.visibleI+1);var P,I,T=0;r.yRatio.length>1&&(r.yaxisIndex=n.globals.seriesYAxisReverseMap[A][0],T=A);var z=r.barHelpers.initialPositions();y=z.y,P=z.barHeight,b=z.yDivision,v=z.zeroW,k=z.x,I=z.barWidth,x=z.xDivision,m=z.zeroH,w.push(k+I/2);for(var E=l.group({class:"apexcharts-datalabels","data:realIndex":A}),Y=l.group({class:"apexcharts-bar-goals-markers"}),F=function(_){var G=r.barHelpers.getStrokeWidth(p,_,A),B=null,ee={indexes:{i:p,j:_,realIndex:A,translationsIndex:T},x:k,y,strokeWidth:G,elSeries:M};B=r.isHorizontal?r.drawHorizontalBoxPaths(R(R({},ee),{},{yDivision:b,barHeight:P,zeroW:v})):r.drawVerticalBoxPaths(R(R({},ee),{},{xDivision:x,barWidth:I,zeroH:m})),y=B.y,k=B.x;var oe=r.barHelpers.drawGoalLine({barXPosition:B.barXPosition,barYPosition:B.barYPosition,goalX:B.goalX,goalY:B.goalY,barHeight:P,barWidth:I});oe&&Y.add(oe),_>0&&w.push(k+I/2),C.push(y),B.pathTo.forEach(function(K,pe){var J=!r.isBoxPlot&&r.candlestickOptions.wick.useFillColor?B.color[pe]:n.globals.stroke.colors[p],$=d.fillPath({seriesNumber:A,dataPointIndex:_,color:B.color[pe],value:i[p][_]});r.renderSeries({realIndex:A,pathFill:$,lineFill:J,j:_,i:p,pathFrom:B.pathFrom,pathTo:K,strokeWidth:G,elSeries:M,x:k,y,series:i,columnGroupIndex:S,barHeight:P,barWidth:I,elDataLabelsWrap:E,elGoalsMarkers:Y,visibleSeries:r.visibleI,type:n.config.chart.type})})},W=0;W0&&(z=this.getPreviousPath(x,g,!0)),T=this.isBoxPlot?[c.move(I,S)+c.line(I+n/2,S)+c.line(I+n/2,C)+c.line(I+n/4,C)+c.line(I+n-n/4,C)+c.line(I+n/2,C)+c.line(I+n/2,S)+c.line(I+n,S)+c.line(I+n,P)+c.line(I,P)+c.line(I,S+h/2),c.move(I,P)+c.line(I+n,P)+c.line(I+n,M)+c.line(I+n/2,M)+c.line(I+n/2,w)+c.line(I+n-n/4,w)+c.line(I+n/4,w)+c.line(I+n/2,w)+c.line(I+n/2,M)+c.line(I,M)+c.line(I,P)+"z"]:[c.move(I,M)+c.line(I+n/2,M)+c.line(I+n/2,C)+c.line(I+n/2,M)+c.line(I+n,M)+c.line(I+n,S)+c.line(I+n/2,S)+c.line(I+n/2,w)+c.line(I+n/2,S)+c.line(I,S)+c.line(I,M-h/2)],z+=c.move(I,S),d.globals.isXNumeric||(s+=r),{pathTo:T,pathFrom:z,x:s,y:M,goalY:this.barHelpers.getGoalValues("y",null,l,u,g,a.translationsIndex),barXPosition:I,color:A}}},{key:"drawHorizontalBoxPaths",value:function(i){var a=i.indexes;i.x;var s=i.y,r=i.yDivision,n=i.barHeight,l=i.zeroW,h=i.strokeWidth,d=this.w,c=new X(this.ctx),u=a.i,g=a.j,f=this.boxOptions.colors.lower;this.isBoxPlot&&(f=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var p=this.invertedYRatio,x=a.realIndex,b=this.getOHLCValue(x,g),m=l,v=l,k=Math.min(b.o,b.c),y=Math.max(b.o,b.c),C=b.m;d.globals.isXNumeric&&(s=(d.globals.seriesX[x][g]-d.globals.minX)/this.invertedXRatio-n/2);var w=s+n*this.visibleI;this.series[u][g]===void 0||this.series[u][g]===null?(k=l,y=l):(k=l+k/p,y=l+y/p,m=l+b.h/p,v=l+b.l/p,C=l+b.m/p);var A=c.move(l,w),S=c.move(k,w+n/2);return d.globals.previousPaths.length>0&&(S=this.getPreviousPath(x,g,!0)),A=[c.move(k,w)+c.line(k,w+n/2)+c.line(m,w+n/2)+c.line(m,w+n/2-n/4)+c.line(m,w+n/2+n/4)+c.line(m,w+n/2)+c.line(k,w+n/2)+c.line(k,w+n)+c.line(C,w+n)+c.line(C,w)+c.line(k+h/2,w),c.move(C,w)+c.line(C,w+n)+c.line(y,w+n)+c.line(y,w+n/2)+c.line(v,w+n/2)+c.line(v,w+n-n/4)+c.line(v,w+n/4)+c.line(v,w+n/2)+c.line(y,w+n/2)+c.line(y,w)+c.line(C,w)+"z"],S+=c.move(k,w),d.globals.isXNumeric||(s+=r),{pathTo:A,pathFrom:S,x:y,y:s,goalX:this.barHelpers.getGoalValues("x",l,null,u,g),barYPosition:w,color:f}}},{key:"getOHLCValue",value:function(i,a){var s=this.w,r=new he(this.ctx,s),n=r.getLogValAtSeriesIndex(s.globals.seriesCandleH[i][a],i),l=r.getLogValAtSeriesIndex(s.globals.seriesCandleO[i][a],i),h=r.getLogValAtSeriesIndex(s.globals.seriesCandleM[i][a],i),d=r.getLogValAtSeriesIndex(s.globals.seriesCandleC[i][a],i),c=r.getLogValAtSeriesIndex(s.globals.seriesCandleL[i][a],i);return{o:this.isBoxPlot?n:l,h:this.isBoxPlot?l:n,m:h,l:this.isBoxPlot?d:c,c:this.isBoxPlot?c:d}}}]),t}(),ls=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"checkColorRange",value:function(){var e=this.w,t=!1,i=e.config.plotOptions[e.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map(function(a,s){a.from<=0&&(t=!0)}),t}},{key:"getShadeColor",value:function(e,t,i,a){var s=this.w,r=1,n=s.config.plotOptions[e].shadeIntensity,l=this.determineColor(e,t,i);s.globals.hasNegs||a?r=s.config.plotOptions[e].reverseNegativeShade?l.percent<0?l.percent/100*(1.25*n):(1-l.percent/100)*(1.25*n):l.percent<=0?1-(1+l.percent/100)*n:(1-l.percent/100)*n:(r=1-l.percent/100,e==="treemap"&&(r=(1-l.percent/100)*(1.25*n)));var h=l.color,d=new L;if(s.config.plotOptions[e].enableShades)if(this.w.config.theme.mode==="dark"){var c=d.shadeColor(-1*r,l.color);h=L.hexToRgba(L.isColorHex(c)?c:L.rgb2hex(c),s.config.fill.opacity)}else{var u=d.shadeColor(r,l.color);h=L.hexToRgba(L.isColorHex(u)?u:L.rgb2hex(u),s.config.fill.opacity)}return{color:h,colorProps:l}}},{key:"determineColor",value:function(e,t,i){var a=this.w,s=a.globals.series[t][i],r=a.config.plotOptions[e],n=r.colorScale.inverse?i:t;r.distributed&&a.config.chart.type==="treemap"&&(n=i);var l=a.globals.colors[n],h=null,d=Math.min.apply(Math,ce(a.globals.series[t])),c=Math.max.apply(Math,ce(a.globals.series[t]));r.distributed||e!=="heatmap"||(d=a.globals.minY,c=a.globals.maxY),r.colorScale.min!==void 0&&(d=r.colorScale.mina.globals.maxY?r.colorScale.max:a.globals.maxY);var u=Math.abs(c)+Math.abs(d),g=100*s/(u===0?u-1e-6:u);return r.colorScale.ranges.length>0&&r.colorScale.ranges.map(function(f,p){if(s>=f.from&&s<=f.to){l=f.color,h=f.foreColor?f.foreColor:null,d=f.from,c=f.to;var x=Math.abs(c)+Math.abs(d);g=100*s/(x===0?x-1e-6:x)}}),{color:l,foreColor:h,percent:g}}},{key:"calculateDataLabels",value:function(e){var t=e.text,i=e.x,a=e.y,s=e.i,r=e.j,n=e.colorProps,l=e.fontSize,h=this.w.config.dataLabels,d=new X(this.ctx),c=new st(this.ctx),u=null;if(h.enabled){u=d.group({class:"apexcharts-data-labels"});var g=h.offsetX,f=h.offsetY,p=i+g,x=a+parseFloat(h.style.fontSize)/3+f;c.plotDataLabelsText({x:p,y:x,text:t,i:s,j:r,color:n.foreColor,parent:u,fontSize:l,dataLabelsConfig:h})}return u}},{key:"addListeners",value:function(e){var t=new X(this.ctx);e.node.addEventListener("mouseenter",t.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",t.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",t.pathMouseDown.bind(this,e))}}]),o}(),Sr=function(){function o(e,t){H(this,o),this.ctx=e,this.w=e.w,this.xRatio=t.xRatio,this.yRatio=t.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new ls(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return O(o,[{key:"draw",value:function(e){var t=this.w,i=new X(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(t.globals.cuid,")"));var s=t.globals.gridWidth/t.globals.dataPoints,r=t.globals.gridHeight/t.globals.series.length,n=0,l=!1;this.negRange=this.helpers.checkColorRange();var h=e.slice();t.config.yaxis[0].reversed&&(l=!0,h.reverse());for(var d=l?0:h.length-1;l?d=0;l?d++:d--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:L.escapeString(t.globals.seriesNames[d]),rel:d+1,"data:realIndex":d});if(this.ctx.series.addCollapsedClassToSeries(c,d),t.config.chart.dropShadow.enabled){var u=t.config.chart.dropShadow;new ue(this.ctx).dropShadow(c,u,d)}for(var g=0,f=t.config.plotOptions.heatmap.shadeIntensity,p=0,x=0;x=h[d].length)break;var b=this.helpers.getShadeColor(t.config.chart.type,d,p,this.negRange),m=b.color,v=b.colorProps;t.config.fill.type==="image"&&(m=new Te(this.ctx).fillPath({seriesNumber:d,dataPointIndex:p,opacity:t.globals.hasNegs?v.percent<0?1-(1+v.percent/100):f+v.percent/100:v.percent/100,patternID:L.randomId(),width:t.config.fill.image.width?t.config.fill.image.width:s,height:t.config.fill.image.height?t.config.fill.image.height:r}));var k=this.rectRadius,y=i.drawRect(g,n,s,r,k);if(y.attr({cx:g,cy:n}),y.node.classList.add("apexcharts-heatmap-rect"),c.add(y),y.attr({fill:m,i:d,index:d,j:p,val:e[d][p],"stroke-width":this.strokeWidth,stroke:t.config.plotOptions.heatmap.useFillColorAsStroke?m:t.globals.stroke.colors[0],color:m}),this.helpers.addListeners(y),t.config.chart.animations.enabled&&!t.globals.dataChanged){var C=1;t.globals.resized||(C=t.config.chart.animations.speed),this.animateHeatMap(y,g,n,s,r,C)}if(t.globals.dataChanged){var w=1;if(this.dynamicAnim.enabled&&t.globals.shouldAnimate){w=this.dynamicAnim.speed;var A=t.globals.previousPaths[d]&&t.globals.previousPaths[d][p]&&t.globals.previousPaths[d][p].color;A||(A="rgba(255, 255, 255, 0)"),this.animateHeatColor(y,L.isColorHex(A)?A:L.rgb2hex(A),L.isColorHex(m)?m:L.rgb2hex(m),w)}}var S=(0,t.config.dataLabels.formatter)(t.globals.series[d][p],{value:t.globals.series[d][p],seriesIndex:d,dataPointIndex:p,w:t}),M=this.helpers.calculateDataLabels({text:S,x:g+s/2,y:n+r/2,i:d,j:p,colorProps:v,series:h});M!==null&&c.add(M),g+=s,p++}n+=r,a.add(c)}var P=t.globals.yAxisScale[0].result.slice();return t.config.yaxis[0].reversed?P.unshift(""):P.push(""),t.globals.yAxisScale[0].result=P,a}},{key:"animateHeatMap",value:function(e,t,i,a,s,r){var n=new nt(this.ctx);n.animateRect(e,{x:t+a/2,y:i+s/2,width:0,height:0},{x:t,y:i,width:a,height:s},r,function(){n.animationCompleted(e)})}},{key:"animateHeatColor",value:function(e,t,i,a){e.attr({fill:t}).animate(a).attr({fill:i})}}]),o}(),hs=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w}return O(o,[{key:"drawYAxisTexts",value:function(e,t,i,a){var s=this.w,r=s.config.yaxis[0],n=s.globals.yLabelFormatters[0];return new X(this.ctx).drawText({x:e+r.labels.offsetX,y:t+r.labels.offsetY,text:n(a,i),textAnchor:"middle",fontSize:r.labels.style.fontSize,fontFamily:r.labels.style.fontFamily,foreColor:Array.isArray(r.labels.style.colors)?r.labels.style.colors[i]:r.labels.style.colors})}}]),o}(),cs=function(){function o(e){H(this,o),this.ctx=e,this.w=e.w;var t=this.w;this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=t.globals.stroke.colors!==void 0?t.globals.stroke.colors:t.globals.colors,this.defaultSize=Math.min(t.globals.gridWidth,t.globals.gridHeight),this.centerY=this.defaultSize/2,this.centerX=t.globals.gridWidth/2,t.config.chart.type==="radialBar"?this.fullAngle=360:this.fullAngle=Math.abs(t.config.plotOptions.pie.endAngle-t.config.plotOptions.pie.startAngle),this.initialAngle=t.config.plotOptions.pie.startAngle%this.fullAngle,t.globals.radialSize=this.defaultSize/2.05-t.config.stroke.width-(t.config.chart.sparkline.enabled?0:t.config.chart.dropShadow.blur),this.donutSize=t.globals.radialSize*parseInt(t.config.plotOptions.pie.donut.size,10)/100;var i=t.config.plotOptions.pie.customScale,a=t.globals.gridWidth/2,s=t.globals.gridHeight/2;this.translateX=a-a*i,this.translateY=s-s*i,this.dataLabelsGroup=new X(this.ctx).group({class:"apexcharts-datalabels-group",transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(i,")")}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return O(o,[{key:"draw",value:function(e){var t=this,i=this.w,a=new X(this.ctx),s=a.group({class:"apexcharts-pie"});if(i.globals.noData)return s;for(var r=0,n=0;n-1&&this.pieClicked(u),i.config.dataLabels.enabled){var y=v.x,C=v.y,w=100*f/this.fullAngle+"%";if(f!==0&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?t.endAngle=t.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(d=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(d)>this.fullAngle&&(d-=this.fullAngle);var c=Math.PI*(d-90)/180,u=i.centerX+r*Math.cos(h),g=i.centerY+r*Math.sin(h),f=i.centerX+r*Math.cos(c),p=i.centerY+r*Math.sin(c),x=L.polarToCartesian(i.centerX,i.centerY,i.donutSize,d),b=L.polarToCartesian(i.centerX,i.centerY,i.donutSize,l),m=s>180?1:0,v=["M",u,g,"A",r,r,0,m,1,f,p];return t=i.chartType==="donut"?[].concat(v,["L",x.x,x.y,"A",i.donutSize,i.donutSize,0,m,0,b.x,b.y,"L",u,g,"z"]).join(" "):i.chartType==="pie"||i.chartType==="polarArea"?[].concat(v,["L",i.centerX,i.centerY,"L",u,g]).join(" "):[].concat(v).join(" "),n.roundPathCorners(t,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(e){var t=this.w,i=new as(this.ctx),a=new X(this.ctx),s=new hs(this.ctx),r=a.group(),n=a.group(),l=i.niceScale(0,Math.ceil(this.maxY),0),h=l.result.reverse(),d=l.result.length;this.maxY=l.niceMax;for(var c=t.globals.radialSize,u=c/(d-1),g=0;g1&&e.total.show&&(s=e.total.color);var n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),l=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,e.value.formatter)(i,r),a||typeof e.total.formatter!="function"||(i=e.total.formatter(r));var h=t===e.total.label;t=this.donutDataLabels.total.label?e.name.formatter(t,h,r):"",n!==null&&(n.textContent=t),l!==null&&(l.textContent=i),n!==null&&(n.style.fill=s)}},{key:"printDataLabelsInner",value:function(e,t){var i=this.w,a=e.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(t,s,a,e);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");r!==null&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(e){var t=this,i=this.w,a=new X(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(s.strokeWidth!==0){for(var r=[],n=360/i.globals.series.length,l=0;l0&&(C=t.getPreviousPath(b));for(var w=0;w=10?e.x>0?(i="start",a+=10):e.x<0&&(i="end",a-=10):i="middle",Math.abs(e.y)>=t-10&&(e.y<0?s-=10:e.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(e){for(var t=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(e,10)&&t.globals.previousPaths[a].paths[0]!==void 0&&(i=t.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.dataPointsLen;e=e||[],t=t||[];for(var a=[],s=0;s=360&&(p=360-Math.abs(this.startAngle)-.1);var x=s.drawPath({d:"",stroke:g,strokeWidth:h*parseInt(u.strokeWidth,10)/100,fill:"none",strokeOpacity:u.opacity,classes:"apexcharts-radialbar-area"});if(u.dropShadow.enabled){var b=u.dropShadow;n.dropShadow(x,b)}c.add(x),x.attr("id","apexcharts-radialbarTrack-"+d),this.animatePaths(x,{centerX:i.centerX,centerY:i.centerY,endAngle:p,startAngle:f,size:i.size,i:d,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return r}},{key:"drawArcs",value:function(i){var a=this.w,s=new X(this.ctx),r=new Te(this.ctx),n=new ue(this.ctx),l=s.group(),h=this.getStrokeWidth(i);i.size=i.size-h/2;var d=a.config.plotOptions.radialBar.hollow.background,c=i.size-h*i.series.length-this.margin*i.series.length-h*parseInt(a.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,u=c-a.config.plotOptions.radialBar.hollow.margin;a.config.plotOptions.radialBar.hollow.image!==void 0&&(d=this.drawHollowImage(i,l,c,d));var g=this.drawHollow({size:u,centerX:i.centerX,centerY:i.centerY,fill:d||"transparent"});if(a.config.plotOptions.radialBar.hollow.dropShadow.enabled){var f=a.config.plotOptions.radialBar.hollow.dropShadow;n.dropShadow(g,f)}var p=1;!this.radialDataLabels.total.show&&a.globals.series.length>1&&(p=0);var x=null;if(this.radialDataLabels.show){var b=a.globals.dom.Paper.findOne(".apexcharts-datalabels-group");x=this.renderInnerDataLabels(b,this.radialDataLabels,{hollowSize:c,centerX:i.centerX,centerY:i.centerY,opacity:p})}a.config.plotOptions.radialBar.hollow.position==="back"&&(l.add(g),x&&l.add(x));var m=!1;a.config.plotOptions.radialBar.inverseOrder&&(m=!0);for(var v=m?i.series.length-1:0;m?v>=0:v