12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(f))).replace(/(^|[^\\])h/g,"$1"+f);var p=a?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var v=a?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(v))).replace(/(^|[^\\])s/g,"$1"+v);var m=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(m,3)),m=Math.round(m/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(m)),m=Math.round(m/10);var b=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+m)).replace(/(^|[^\\])TT+/g,"$1"+b)).replace(/(^|[^\\])T/g,"$1"+b.charAt(0));var x=b.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+x)).replace(/(^|[^\\])t/g,"$1"+x.charAt(0));var y=-t.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var A=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(A)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var P=(a?t.getUTCDay():t.getDay())+1;return(e=(e=(e=(e=e.replace(new RegExp(r[0],"g"),r[P])).replace(new RegExp(o[0],"g"),o[P])).replace(new RegExp(s[0],"g"),s[d])).replace(new RegExp(n[0],"g"),n[d])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var a=this.w;void 0!==a.config.xaxis.min&&(t=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(e=a.config.xaxis.max);var s=this.getDate(t),n=this.getDate(e),r=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(n,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(r[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(r[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(r[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(r[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(r[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(r[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(r[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=b.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),L=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return o(t,[{key:"xLabelFormat",value:function(t,e,i,a){var s=this.w;if("datetime"===s.config.xaxis.type&&void 0===s.config.xaxis.labels.formatter&&void 0===s.config.tooltip.x.formatter){var n=new X(this.ctx);return n.formatDate(n.getDate(e),s.config.tooltip.x.format)}return t(e,i,a)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var a=this.w;if(b.isNumber(t))if(0!==a.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:a.globals.yValueDecimal);else{var s=t.toFixed(0);t=t==s?s:t.toFixed(1)}return t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(b.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(b.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minYArr<4?t.toFixed(1):t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,a){void 0!==i.labels.formatter?e.globals.yLabelFormatters[a]=i.labels.formatter:e.globals.yLabelFormatters[a]=function(s){return e.globals.xyCharts?Array.isArray(s)?s.map((function(e){return t.defaultYFormatter(e,i,a)})):t.defaultYFormatter(s,i,a):s}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),C=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"getLabel",value:function(t,e,i,a){var s,n,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",l=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],c=this.w,d=void 0===t[a]?"":t[a],h=d,u=c.globals.xLabelFormatter,f=c.config.xaxis.labels.formatter,p=!1,g=new L(this.ctx),v=d;l&&(h=g.xLabelFormat(u,d,v,{i:a,dateFormatter:new X(this.ctx).formatDate,w:c}),void 0!==f&&(h=f(d,t[a],{i:a,dateFormatter:new X(this.ctx).formatDate,w:c}))),e.length>0?(s=e[a].unit,n=null,e.forEach((function(t){"month"===t.unit?n="year":"day"===t.unit?n="month":"hour"===t.unit?n="day":"minute"===t.unit&&(n="hour")})),p=n===s,i=e[a].position,h=e[a].value):"datetime"===c.config.xaxis.type&&void 0===f&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var m,b=new w(this.ctx);m=c.globals.rotateXLabels&&l?b.getTextRects(h,parseInt(o,10),null,"rotate(".concat(c.config.xaxis.labels.rotate," 0 0)"),!1):b.getTextRects(h,parseInt(o,10));var x=!c.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||r.indexOf(h)>=0&&x)&&(h=""),{x:i,text:h,textRect:m,isBold:p}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var a=this.w,s=a.config.xaxis.tickAmount;return"dataPoints"===s&&(s=Math.round(a.globals.gridWidth/120)),s>i||t%Math.round(i/(s+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,a,s){var n=this.w;if(0===t&&n.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&n.globals.skipLastTimelinelabel&&(e.text=""),n.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var r=s[s.length-1];e.xa.length||a.some((function(t){return Array.isArray(t.seriesName)}))?t:i.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,i=e.config.yaxis[t];if(!i.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!i.showForNullSeries){var a=e.globals.seriesYAxisMap[t],s=new A(this.ctx);return a.every((function(t){return s.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,i,a,s,n,r){var o=this.w,l=new w(this.ctx),c=o.globals.translateY+o.config.yaxis[s].labels.offsetY;if(o.globals.isBarHorizontal?c=0:"heatmap"===o.config.chart.type&&(c+=n/2),a.show&&e>0){!0===o.config.yaxis[s].opposite&&(t+=a.width);for(var d=e;d>=0;d--){var h=l.drawLine(t+i.offsetX-a.width+a.offsetX,c+a.offsetY,t+i.offsetX+a.offsetX,c+a.offsetY,a.color);r.add(h),c+=n}}}}]),t}(),O=function(){function t(e){n(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new P(this.annoCtx),this.axesUtils=new C(this.annoCtx)}return o(t,[{key:"addYaxisAnnotation",value:function(t,e,i){var a,s=this.w,n=t.strokeDashArray,r=this.helpers.getY1Y2("y1",t),o=r.yP,l=r.clipped,c=!0,d=!1,h=t.label.text;if(null===t.y2||void 0===t.y2){if(!l){d=!0;var u=this.annoCtx.graphics.drawLine(0+t.offsetX,o+t.offsetY,this._getYAxisAnnotationWidth(t),o+t.offsetY,t.borderColor,n,t.borderWidth);e.appendChild(u.node),t.id&&u.node.classList.add(t.id)}}else{if(a=(r=this.helpers.getY1Y2("y2",t)).yP,c=r.clipped,a>o){var f=o;o=a,a=f}if(!l||!c){d=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,a+t.offsetY,this._getYAxisAnnotationWidth(t),o-a,0,t.fillColor,t.opacity,1,t.borderColor,n);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(d){var g="right"===t.label.position?s.globals.gridWidth:"center"===t.label.position?s.globals.gridWidth/2:0,v=this.annoCtx.graphics.drawText({x:g+t.label.offsetX,y:(null!=a?a:o)+t.label.offsetY-3,text:h,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});v.attr({rel:i}),e.appendChild(v.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;return e.globals.gridWidth,(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,a){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,i.node,a)})),i}}]),t}(),T=function(){function t(e){n(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new P(this.annoCtx)}return o(t,[{key:"addPointAnnotation",value:function(t,e,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",t),s=a.x,n=a.clipped,r=(a=this.helpers.getY1Y2("y1",t)).yP,o=a.clipped;if(b.isNumber(s)&&!o&&!n){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},c=this.annoCtx.graphics.drawMarker(s+t.marker.offsetX,r+t.marker.offsetY,l);e.appendChild(c.node);var d=t.label.text?t.label.text:"",h=this.annoCtx.graphics.drawText({x:s+t.label.offsetX,y:r+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(h.attr({rel:i}),e.appendChild(h.node),t.customSVG.SVG){var u=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});u.attr({transform:"translate(".concat(s+t.customSVG.offsetX,", ").concat(r+t.customSVG.offsetY,")")}),u.node.innerHTML=t.customSVG.SVG,e.appendChild(u.node)}if(t.image.path){var f=t.image.width?t.image.width:20,p=t.image.height?t.image.height:20;c=this.annoCtx.addImage({x:s+t.image.offsetX-f/2,y:r+t.image.offsetY-p/2,width:f,height:p,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&c.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&c.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&c.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,a){t.addPointAnnotation(e,i.node,a)})),i}}]),t}(),k={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},S=function(){function t(){n(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,radius:2,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return o(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"transparent",locales:[k],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",dateFormatter:function(t){return new Date(t).toDateString()}},png:{filename:void 0},svg:{filename:void 0}},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}},barLabels:{enabled:!1,margin:5,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{width:12,height:12,strokeWidth:0,fillColors:void 0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:5,vertical:2},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",width:8,height:8,radius:2,offsetX:0,offsetY:0,onClick:void 0,onDblClick:void 0,showNullDataPoints:!0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.1}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.5}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),H=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.graphics=new w(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new P(this),this.xAxisAnnotations=new z(this),this.yAxisAnnotations=new O(this),this.pointsAnnotations=new T(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return o(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=t.config.chart.animations.enabled,n=[e,i,a],r=[i.node,e.node,a.node],o=0;o<3;o++)t.globals.dom.elGraphical.add(n[o]),!s||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&r[o].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:r[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,a=t.y,s=t.text,n=t.textAnchor,r=t.foreColor,o=t.fontSize,l=t.fontFamily,c=t.fontWeight,d=t.cssClass,h=t.backgroundColor,u=t.borderWidth,f=t.strokeDashArray,p=t.borderRadius,g=t.borderColor,v=t.appendTo,m=void 0===v?".apexcharts-svg":v,b=t.paddingLeft,x=void 0===b?4:b,y=t.paddingRight,w=void 0===y?4:y,A=t.paddingBottom,P=void 0===A?2:A,z=t.paddingTop,X=void 0===z?2:z,L=this.w,C=this.graphics.drawText({x:i,y:a,text:s,textAnchor:n||"start",fontSize:o||"12px",fontWeight:c||"regular",fontFamily:l||L.config.chart.fontFamily,foreColor:r||L.config.chart.foreColor,cssClass:d}),O=L.globals.dom.baseEl.querySelector(m);O&&O.appendChild(C.node);var T=C.bbox();if(s){var k=this.graphics.drawRect(T.x-x,T.y-X,T.width+x+w,T.height+P+X,p,h||"transparent",1,u,g,f);O.insertBefore(k.node,C.node)}}},{key:"addImage",value:function(t,e){var i=this.w,a=t.path,s=t.x,n=void 0===s?0:s,r=t.y,o=void 0===r?0:r,l=t.width,c=void 0===l?20:l,d=t.height,h=void 0===d?20:d,u=t.appendTo,f=void 0===u?".apexcharts-svg":u,p=i.globals.dom.Paper.image(a);p.size(c,h).move(n,o);var g=i.globals.dom.baseEl.querySelector(f);return g&&g.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,s=t.type,n=t.contextMethod,r=a,o=r.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),c=l.childNodes.length+1,d=new S,h=Object.assign({},"xaxis"===s?d.xAxisAnnotation:"yaxis"===s?d.yAxisAnnotation:d.pointAnnotation),u=b.extend(h,e);switch(s){case"xaxis":this.addXaxisAnnotation(u,l,c);break;case"yaxis":this.addYaxisAnnotation(u,l,c);break;case"point":this.addPointAnnotation(u,l,c)}var f=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(c,"']")),p=this.helpers.addBackgroundToAnno(f,u);return p&&l.insertBefore(p.node,f),i&&o.globals.memory.methodsToExec.push({context:r,id:u.id?u.id:b.randomId(),method:n,label:"addAnnotation",params:e}),a}},{key:"clearAnnotations",value:function(t){var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");e.globals.memory.methodsToExec.map((function(t,i){"addText"!==t.label&&"addAnnotation"!==t.label||e.globals.memory.methodsToExec.splice(i,1)})),i=b.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(e));a&&(i.globals.memory.methodsToExec.map((function(t,a){t.id===e&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),M=function(t){var e,i=t.isTimeline,a=t.ctx,s=t.seriesIndex,n=t.dataPointIndex,r=t.y1,o=t.y2,l=t.w,c=l.globals.seriesRangeStart[s][n],d=l.globals.seriesRangeEnd[s][n],h=l.globals.labels[n],u=l.config.series[s].name?l.config.series[s].name:"",f=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,g={w:l,seriesIndex:s,dataPointIndex:n,start:c,end:d};"function"==typeof p&&(u=p(u,g)),null!==(e=l.config.series[s].data[n])&&void 0!==e&&e.x&&(h=l.config.series[s].data[n].x),i||"datetime"===l.config.xaxis.type&&(h=new L(a).xLabelFormat(l.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new X(a).formatDate,w:l})),"function"==typeof f&&(h=f(h,g)),Number.isFinite(r)&&Number.isFinite(o)&&(c=r,d=o);var v="",m="",b=l.globals.colors[s];if(void 0===l.config.tooltip.x.formatter)if("datetime"===l.config.xaxis.type){var x=new X(a);v=x.formatDate(x.getDate(c),l.config.tooltip.x.format),m=x.formatDate(x.getDate(d),l.config.tooltip.x.format)}else v=c,m=d;else v=l.config.tooltip.x.formatter(c),m=l.config.tooltip.x.formatter(d);return{start:c,end:d,startVal:v,endVal:m,ylabel:h,color:b,seriesName:u}},D=function(t){var e=t.color,i=t.seriesName,a=t.ylabel,s=t.start,n=t.end,r=t.seriesIndex,o=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(r);s=l.yLbFormatter(s),n=l.yLbFormatter(n);var c=l.yLbFormatter(t.w.globals.series[r][o]),d='\n '.concat(s,'\n - \n ').concat(n,"\n ");return'"},W=function(){function t(e){n(this,t),this.opts=e}return o(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){return this.hideYAxis(),b.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var i=e.w.config.series[e.seriesIndex].name;return null!==t?i+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square",radius:2,size:8}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),a(a({},this.bar()),{},{chart:{animations:{easing:"linear",speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:5,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,a=e.dataPointIndex,s=e.w,n=function(){var t=s.globals.seriesRangeStart[i][a];return s.globals.seriesRangeEnd[i][a]-t};return s.globals.comboCharts?"rangeBar"===s.config.series[i].type||"rangeArea"===s.config.series[i].type?n():t:n()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=M(a(a({},t),{},{isTimeline:!0})),i=e.color,s=e.seriesName,n=e.ylabel,r=e.startVal,o=e.endVal;return D(a(a({},t),{},{color:i,seriesName:s,ylabel:n,start:r,end:o}))}(t):function(t){var e=M(t),i=e.color,s=e.seriesName,n=e.ylabel,r=e.start,o=e.end;return D(a(a({},t),{},{color:i,seriesName:s,ylabel:n,start:r,end:o}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,i;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(i=t.plotOptions.bar)&&void 0!==i&&i.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=M(t),i=e.color,s=e.seriesName,n=e.ylabel,r=e.start,o=e.end;return D(a(a({},t),{},{color:i,seriesName:s,ylabel:n,start:r,end:o}))}(t)}}}}},{key:"brush",value:function(t){return b.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return a(a({},t),{},{plotOptions:a(a({},t.plotOptions),{},{bar:a(a({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return b.isNumber(t)?Math.floor(t):t};var a=t.xaxis.labels.formatter,s=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(s=i.map((function(t){return Array.isArray(t)?t:String(t)}))),s&&s.length&&(t.xaxis.labels.formatter=function(t){return b.isNumber(t)?a(s[Math.floor(t)-1]):a(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(t,e,i,a,s){var n=t.globals.seriesCandleO[e][i],r=t.globals.seriesCandleH[e][i],o=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],c=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==s?'\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][i],"\n
"):'"}}]),t}(),N=function(){function t(e){n(this,t),this.opts=e}return o(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,a=new S,n=new W(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),o={};if(i&&"object"===s(i)){var l,c,d,h,u,f,p,g,v,m,x={};x=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?n[i.chart.type]():n.line(),null!==(l=i.plotOptions)&&void 0!==l&&null!==(c=l.bar)&&void 0!==c&&c.isFunnel&&(x=n.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(x=n.stackedBars()),null!==(d=i.chart.brush)&&void 0!==d&&d.enabled&&(x=n.brush(x)),null!==(h=i.plotOptions)&&void 0!==h&&null!==(u=h.line)&&void 0!==u&&u.isSlopeChart&&(x=n.slope()),i.chart.stacked&&"100%"===i.chart.stackType&&(i=n.stacked100(i)),null!==(f=i.plotOptions)&&void 0!==f&&null!==(p=f.bar)&&void 0!==p&&p.isDumbbell&&(i=n.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),(null!==(g=(i=this.checkForCatToNumericXAxis(this.chartType,x,i)).chart.sparkline)&&void 0!==g&&g.enabled||null!==(v=window.Apex.chart)&&void 0!==v&&null!==(m=v.sparkline)&&void 0!==m&&m.enabled)&&(x=n.sparkline(x)),o=b.extend(r,x)}var y=b.extend(o,window.Apex);return r=b.extend(y,i),this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var a,s,n=new W(i),r=("bar"===t||"boxPlot"===t)&&(null===(a=i.plotOptions)||void 0===a||null===(s=a.bar)||void 0===s?void 0:s.horizontal),o="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,l="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,c=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return r||o||!l||"between"===c||(i=n.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new S;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=b.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[b.extend(i.yAxis,t.yaxis)]:t.yaxis=b.extendArray(t.yaxis,i.yAxis);var a=!1;t.yaxis.forEach((function(t){t.logarithmic&&(a=!0)}));var s=t.series;return e&&!s&&(s=e.config.series),a&&s.length!==t.yaxis.length&&s.length&&(t.yaxis=s.map((function(e,a){if(e.name||(s[a].name="series-".concat(a+1)),t.yaxis[a])return t.yaxis[a].seriesName=s[a].name,t.yaxis[a];var n=b.extend(i.yAxis,t.yaxis[0]);return n.show=!1,n}))),a&&s.length>1&&s.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new S;return t.annotations.yaxis=b.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new S;return t.annotations.xaxis=b.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new S;return t.annotations.points=b.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.chart.background||(t.chart.background="#424242"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),B=function(){function t(){n(this,t)}return o(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:t.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=b.extend({},t),e.initialSeries=b.clone(t.series),e.lastXAxis=b.clone(e.initialConfig.xaxis),e.lastYAxis=b.clone(e.initialConfig.yaxis),e}}]),t}(),Z=function(){function t(e){n(this,t),this.opts=e}return o(t,[{key:"init",value:function(){var t=new N(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new B).init(t)}}}]),t}(),j=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0}return o(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,a=parseInt(e.globals.gridWidth,10),s=parseInt(e.globals.gridHeight,10),n=a>s?a:s,r=t.image,o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=n+1,l=n):(o=t.width,l=t.height);var c=document.createElementNS(e.globals.SVGNS,"pattern");w.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var d=document.createElementNS(e.globals.SVGNS,"image");c.appendChild(d),d.setAttributeNS(window.SVG.xlink,"href",r),w.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),d.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(t){var e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(t){var e=this.w;this.opts=t;var i,a,s,n=this.w.config;this.seriesIndex=this.getSeriesIndex(t);var r=this.getFillColors()[this.seriesIndex];void 0!==e.globals.seriesColors[this.seriesIndex]&&(r=e.globals.seriesColors[this.seriesIndex]),"function"==typeof r&&(r=r({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:e}));var o=t.fillType?t.fillType:this.getFillType(this.seriesIndex),l=Array.isArray(n.fill.opacity)?n.fill.opacity[this.seriesIndex]:n.fill.opacity;t.color&&(r=t.color),r||(r="#fff",console.warn("undefined color - ApexCharts"));var c=r;if(-1===r.indexOf("rgb")?r.length<9&&(c=b.hexToRgba(r,l)):r.indexOf("rgba")>-1&&(l=b.getOpacityFromRGBA(r)),t.opacity&&(l=t.opacity),"pattern"===o&&(a=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:a,fillColor:r,fillOpacity:l,defaultColor:c})),"gradient"===o&&(s=this.handleGradientFill({fillConfig:t.fillConfig,fillColor:r,fillOpacity:l,i:this.seriesIndex})),"image"===o){var d=n.fill.image.src,h=t.patternID?t.patternID:"";this.clippedImgArea({opacity:l,image:Array.isArray(d)?t.seriesNumber-1&&(f=b.getOpacityFromRGBA(u));var p=void 0===r.gradient.opacityTo?i:Array.isArray(r.gradient.opacityTo)?r.gradient.opacityTo[n]:r.gradient.opacityTo;if(void 0===r.gradient.gradientToColors||0===r.gradient.gradientToColors.length)o="dark"===r.gradient.shade?d.shadeColor(-1*parseFloat(r.gradient.shadeIntensity),e.indexOf("rgb")>-1?b.rgb2hex(e):e):d.shadeColor(parseFloat(r.gradient.shadeIntensity),e.indexOf("rgb")>-1?b.rgb2hex(e):e);else if(r.gradient.gradientToColors[l.seriesNumber]){var g=r.gradient.gradientToColors[l.seriesNumber];o=g,g.indexOf("rgba")>-1&&(p=b.getOpacityFromRGBA(g))}else o=e;if(r.gradient.gradientFrom&&(u=r.gradient.gradientFrom),r.gradient.gradientTo&&(o=r.gradient.gradientTo),r.gradient.inverseColors){var v=u;u=o,o=v}return u.indexOf("rgb")>-1&&(u=b.rgb2hex(u)),o.indexOf("rgb")>-1&&(o=b.rgb2hex(o)),c.drawGradient(h,u,o,f,p,l.size,r.gradient.stops,r.gradient.colorStops,n)}}]),t}(),R=function(){function t(e,i){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],r=this.w,o=e,l=t,c=null,d=new w(this.ctx),h=r.config.markers.discrete&&r.config.markers.discrete.length;if((r.globals.markers.size[e]>0||n||h)&&(c=d.group({class:n||h?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),Array.isArray(l.x))for(var u=0;u0:r.config.markers.size>0)||n||h){b.isNumber(l.y[u])?p+=" w".concat(b.randomId()):p="apexcharts-nullpoint";var g=this.getMarkerConfig({cssClass:p,seriesIndex:e,dataPointIndex:f});r.config.series[o].data[f]&&(r.config.series[o].data[f].fillColor&&(g.pointFillColor=r.config.series[o].data[f].fillColor),r.config.series[o].data[f].strokeColor&&(g.pointStrokeColor=r.config.series[o].data[f].strokeColor)),a&&(g.pSize=a),(l.x[u]<-r.globals.markers.largestSize||l.x[u]>r.globals.gridWidth+r.globals.markers.largestSize||l.y[u]<-r.globals.markers.largestSize||l.y[u]>r.globals.gridHeight+r.globals.markers.largestSize)&&(g.pSize=0),(s=d.drawMarker(l.x[u],l.y[u],g)).attr("rel",f),s.attr("j",f),s.attr("index",e),s.node.setAttribute("default-marker-size",g.pSize),new y(this.ctx).setSelectionFilter(s,e,f),this.addEvents(s),c&&c.add(s)}else void 0===r.globals.pointsArray[e]&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([l.x[u],l.y[u]])}return c}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,a=t.dataPointIndex,s=void 0===a?null:a,n=t.finishRadius,r=void 0===n?null:n,o=this.w,l=this.getMarkerStyle(i),c=o.globals.markers.size[i],d=o.config.markers;return null!==s&&d.discrete.length&&d.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===s&&(l.pointStrokeColor=t.strokeColor,l.pointFillColor=t.fillColor,c=t.size,l.pointShape=t.shape)})),{pSize:null===r?c:r,pRadius:d.radius,width:Array.isArray(d.width)?d.width[i]:d.width,height:Array.isArray(d.height)?d.height[i]:d.height,pointStrokeWidth:Array.isArray(d.strokeWidth)?d.strokeWidth[i]:d.strokeWidth,pointStrokeColor:l.pointStrokeColor,pointFillColor:l.pointFillColor,shape:l.pointShape||(Array.isArray(d.shape)?d.shape[i]:d.shape),class:e,pointStrokeOpacity:Array.isArray(d.strokeOpacity)?d.strokeOpacity[i]:d.strokeOpacity,pointStrokeDashArray:Array.isArray(d.strokeDashArray)?d.strokeDashArray[i]:d.strokeDashArray,pointFillOpacity:Array.isArray(d.fillOpacity)?d.fillOpacity[i]:d.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new w(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,a=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[t]:a,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),E=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return o(t,[{key:"draw",value:function(t,e,i){var a=this.w,s=new w(this.ctx),n=i.realIndex,r=i.pointsPos,o=i.zRatio,l=i.elParent,c=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(c.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(r.x))for(var d=0;dg.maxBubbleRadius&&(p=g.maxBubbleRadius)}a.config.chart.animations.enabled||(f=p);var v=r.x[d],m=r.y[d];if(f=f||0,null!==m&&void 0!==a.globals.series[n][h]||(u=!1),u){var b=this.drawPoint(v,m,f,p,n,h,e);c.add(b)}l.add(c)}}},{key:"drawPoint",value:function(t,e,i,a,s,n,r){var o=this.w,l=s,c=new x(this.ctx),d=new y(this.ctx),h=new j(this.ctx),u=new R(this.ctx),f=new w(this.ctx),p=u.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:n,finishRadius:"bubble"===o.config.chart.type||o.globals.comboCharts&&o.config.series[s]&&"bubble"===o.config.series[s].type?a:null});a=p.pSize;var g,v=h.fillPath({seriesNumber:s,dataPointIndex:n,color:p.pointFillColor,patternUnits:"objectBoundingBox",value:o.globals.series[s][r]});if("circle"===p.shape?g=f.drawCircle(i):"square"!==p.shape&&"rect"!==p.shape||(g=f.drawRect(0,0,p.width-p.pointStrokeWidth/2,p.height-p.pointStrokeWidth/2,p.pRadius)),o.config.series[l].data[n]&&o.config.series[l].data[n].fillColor&&(v=o.config.series[l].data[n].fillColor),g.attr({x:t-p.width/2-p.pointStrokeWidth/2,y:e-p.height/2-p.pointStrokeWidth/2,cx:t,cy:e,fill:v,"fill-opacity":p.pointFillOpacity,stroke:p.pointStrokeColor,r:a,"stroke-width":p.pointStrokeWidth,"stroke-dasharray":p.pointStrokeDashArray,"stroke-opacity":p.pointStrokeOpacity}),o.config.chart.dropShadow.enabled){var m=o.config.chart.dropShadow;d.dropShadow(g,m,s)}if(!this.initialAnim||o.globals.dataChanged||o.globals.resized)o.globals.animationEnded=!0;else{var b=o.config.chart.animations.speed;c.animateMarker(g,0,"circle"===p.shape?a:{width:p.width,height:p.height},b,o.globals.easing,(function(){window.setTimeout((function(){c.animationCompleted(g)}),100)}))}if(o.globals.dataChanged&&"circle"===p.shape)if(this.dynamicAnim){var A,P,z,X,L=o.config.chart.animations.dynamicAnimation.speed;null!=(X=o.globals.previousPaths[s]&&o.globals.previousPaths[s][r])&&(A=X.x,P=X.y,z=void 0!==X.r?X.r:a);for(var C=0;Co.globals.gridHeight+h&&(e=o.globals.gridHeight+h/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:t,y:e,width:d,height:h});var u=o.globals.dataLabelsRects[a].length-2,f=void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==o.globals.dataLabelsRects[a][u]){var p=o.globals.dataLabelsRects[a][f];(t>p.x+p.width||e>p.y+p.height||e+he.globals.gridWidth+g.textRects.width+30)&&(o="");var v=e.globals.dataLabels.style.colors[n];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(v=e.globals.dataLabels.style.colors[r]),"function"==typeof v&&(v=v({series:e.globals.series,seriesIndex:n,dataPointIndex:r,w:e})),u&&(v=u);var m=h.offsetX,b=h.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(m=0,b=0),e.globals.isSlopeChart&&(0!==r&&(m=-2*h.offsetX+5),0!==r&&r!==e.config.series[n].data.length-1&&(m=0)),g.drawnextLabel){var x=i.drawText({width:100,height:parseInt(h.style.fontSize,10),x:a+m,y:s+b,foreColor:v,textAnchor:l||h.textAnchor,text:o,fontSize:c||h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight||"normal"});if(x.attr({class:"apexcharts-datalabel",cx:a,cy:s}),h.dropShadow.enabled){var A=h.dropShadow;new y(this.ctx).dropShadow(x,A)}d.add(x),void 0===e.globals.lastDrawnDataLabelsIndexes[n]&&(e.globals.lastDrawnDataLabelsIndexes[n]=[]),e.globals.lastDrawnDataLabelsIndexes[n].push(r)}}}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,a=i.config.dataLabels.background,s=a.padding,n=a.padding/2,r=e.width,o=e.height,l=new w(this.ctx).drawRect(e.x-s,e.y-n/2,r+2*s,o+n,a.borderRadius,"transparent"===i.config.chart.background?"#fff":i.config.chart.background,a.opacity,a.borderWidth,a.borderColor);return a.dropShadow.enabled&&new y(this.ctx).dropShadow(l,a.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,s=b.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,t&&(e&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i-1&&(t[i].data=[]);return t}},{key:"toggleSeriesOnHover",value:function(t,e){var i=this.w;e||(e=t.target);var a=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if("mousemove"===t.type){var s=parseInt(e.getAttribute("rel"),10)-1,n=null,r=null,o=null;if(i.globals.axisCharts||"radialBar"===i.config.chart.type)if(i.globals.axisCharts){n=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(s,"']")),r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(s,"']"));var l=i.globals.seriesYAxisReverseMap[s];o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else n=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(s+1,"']"));else n=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(s+1,"'] path"));for(var c=0;c=t.from&&a<=t.to&&s[e].classList.remove(i.legendInactiveClass)}}(a.config.plotOptions.heatmap.colorScale.ranges[r])}else"mouseout"===t.type&&n("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var s=i.config.series.map((function(t,a){return t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(a)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[a].type)>-1)?a:-1})),n="asc"===t?0:s.length-1;"asc"===t?n=0;"asc"===t?n++:n--)if(-1!==s[n]){a=s[n];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,a){for(var s=e[i].childNodes,n={type:a,paths:[],realIndex:e[i].getAttribute("data:realIndex")},r=0;r0)for(var a=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),a=[],s=function(t){var e=function(e){return i[t].getAttribute(e)},s={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};a.push({rect:s,color:i[t].getAttribute("color")})},n=0;n0)for(var a=0;a0?t:[]}))}}]),t}(),F=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new A(this.ctx)}return o(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new I(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new I(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,s="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,n=0;n=5?this.twoDSeries.push(b.parseNumber(t[e].data[n][4])):this.twoDSeries.push(b.parseNumber(t[e].data[n][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var r=new Date(t[e].data[n][0]);r=new Date(r).getTime(),this.twoDSeriesX.push(r)}else this.twoDSeriesX.push(t[e].data[n][0]);for(var o=0;o-1&&(n=this.activeSeriesIndex);for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,n=new X(i),r=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar="rangeBar"===a.chart.type&&s.isBarHorizontal,s.hasXaxisGroups="category"===a.xaxis.type&&a.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=a.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?s.seriesNames.push(t.name):s.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var o=[],l=g(new Set(a.series.map((function(t){return t.group}))));a.series.forEach((function(t,e){var i=l.indexOf(t.group);o[i]||(o[i]=[]),o[i].push(s.seriesNames[e])})),s.seriesGroups=o;for(var c=function(){for(var t=0;t0&&(this.twoDSeriesX=r,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var h=t[d].data.map((function(t){return b.parseNumber(t)}));s.series.push(h)}s.seriesZ.push(this.threeDSeries),void 0!==t[d].color?s.seriesColors.push(t[d].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var a=0;a0?i.labels=e.xaxis.categories:e.labels.length>0?i.labels=e.labels.slice():this.fallbackToCategory?(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric&&(new W(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t))):this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,a=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var s=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),n=s.reduce((function(t,e,i,a){return a[t].length>e.length?t:i}),0),r=0;r0&&s==i.length&&e.push(a)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}]),t}(),q=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),a=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",a*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"fixSvgStringForIe11",value:function(t){if(!b.isIE11())return t.replace(/ /g," ");var e=0,i=t.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,(function(t){return 2==++e?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':t}));return(i=i.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(t){null==t&&(t=1);var e=this.w.globals.dom.Paper.svg();if(1!==t){var i=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(i,t),e=(new XMLSerializer).serializeToString(i)}return this.fixSvgStringForIe11(e)}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){this.cleanup();var t=this.getSvgString(),e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var a=e.w,s=t?t.scale||t.width/a.globals.svgWidth:1;e.cleanup();var n=document.createElement("canvas");n.width=a.globals.svgWidth*s,n.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var r="transparent"===a.config.chart.background?"#fff":a.config.chart.background,o=n.getContext("2d");o.fillStyle=r,o.fillRect(0,0,n.width*s,n.height*s);var l=e.getSvgString(s);if(window.canvg&&b.isIE11()){var c=window.canvg.Canvg.fromString(o,l,{ignoreClear:!0,ignoreDimensions:!0});c.start();var d=n.msToBlob();c.stop(),i({blob:d})}else{var h="data:image/svg+xml,"+encodeURIComponent(l),u=new Image;u.crossOrigin="anonymous",u.onload=function(){if(o.drawImage(u,0,0),n.msToBlob){var t=n.msToBlob();i({blob:t})}else{var e=n.toDataURL("image/png");i({imgURI:e})}},u.src=h}}))}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.filename,".svg")}},{key:"exportToPng",value:function(){var t=this;this.dataURI().then((function(e){var i=e.imgURI,a=e.blob;a?navigator.msSaveOrOpenBlob(a,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,a=t.fileName,s=t.columnDelimiter,n=void 0===s?",":s,r=t.lineDelimiter,o=void 0===r?"\n":r,l=this.w;i||(i=l.config.series);var c,d,h=[],u=[],f="",p=l.globals.series.map((function(t,e){return-1===l.globals.collapsedSeriesIndices.indexOf(e)?t:[]})),v=function(t){return"datetime"===l.config.xaxis.type&&String(t).length>=10},m=Math.max.apply(Math,g(i.map((function(t){return t.data?t.data.length:0})))),x=new F(this.ctx),y=new C(this.ctx),w=function(t){var i="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var a=l.globals.yLabelFormatters[0],s=new I(e.ctx).getActiveConfigSeriesIndex();i=a(l.globals.labels[t],{seriesIndex:s,dataPointIndex:t,w:l})}else i=y.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?i=l.config.xaxis.categories[t]:l.config.labels.length&&(i=l.config.labels[t]))}else i=l.config.labels[t];return null===i?"nullvalue":(Array.isArray(i)&&(i=i.join(" ")),b.isNumber(i)?i:i.split(n).join(""))};h.push(l.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===l.config.chart.type?(h.push("minimum"),h.push("q1"),h.push("median"),h.push("q3"),h.push("maximum")):"candlestick"===l.config.chart.type?(h.push("open"),h.push("high"),h.push("low"),h.push("close")):"rangeBar"===l.config.chart.type?(h.push("minimum"),h.push("maximum")):i.map((function(t,e){var i=(t.name?t.name:"series-".concat(e))+"";l.globals.axisCharts&&h.push(i.split(n).join("")?i.split(n).join(""):"series-".concat(e))})),l.globals.axisCharts||(h.push(l.config.chart.toolbar.export.csv.headerValue),u.push(h.join(n))),l.globals.allSeriesHasEqualX||!l.globals.axisCharts||l.config.xaxis.categories.length||l.config.labels.length?i.map((function(t,e){l.globals.axisCharts?function(t,e){if(h.length&&0===e&&u.push(h.join(n)),t.data){t.data=t.data.length&&t.data||g(Array(m)).map((function(){return""}));for(var a=0;a0&&!a.globals.isBarHorizontal&&(this.xaxisLabels=a.globals.timescaleLabels.slice()),a.config.xaxis.overwriteCategories&&(this.xaxisLabels=a.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===a.config.xaxis.position?this.offY=0:this.offY=a.globals.gridHeight,this.offY=this.offY+a.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===a.config.chart.type&&a.config.plotOptions.bar.horizontal,this.xaxisFontSize=a.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=a.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=a.config.xaxis.labels.style.colors,this.xaxisBorderWidth=a.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=a.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=a.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=a.config.xaxis.axisBorder.height,this.yaxis=a.config.yaxis[0]}return o(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new w(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(a);for(var s=[],n=0;n6&&void 0!==arguments[6]?arguments[6]:{},c=[],d=[],h=this.w,u=l.xaxisFontSize||this.xaxisFontSize,f=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,g=l.fontWeight||h.config.xaxis.labels.style.fontWeight,v=l.cssClass||h.config.xaxis.labels.style.cssClass,m=h.globals.padHorizontal,b=a.length,x="category"===h.config.xaxis.type?h.globals.dataPoints:b;if(0===x&&b>x&&(x=b),s){var y=x>1?x-1:x;r=h.globals.gridWidth/Math.min(y,b-1),m=m+n(0,r)/2+h.config.xaxis.labels.offsetX}else r=h.globals.gridWidth/x,m=m+n(0,r)+h.config.xaxis.labels.offsetX;for(var w=function(s){var l=m-n(s,r)/2+h.config.xaxis.labels.offsetX;0===s&&1===b&&r/2===m&&1===x&&(l=h.globals.gridWidth/2);var y=o.axesUtils.getLabel(a,h.globals.timescaleLabels,l,s,c,u,t),w=28;if(h.globals.rotateXLabels&&t&&(w=22),h.config.xaxis.title.text&&"top"===h.config.xaxis.position&&(w+=parseFloat(h.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(u)+(h.globals.xAxisLabelsHeight-h.globals.xAxisGroupLabelsHeight)+(h.globals.rotateXLabels?10:0)),y=void 0!==h.config.xaxis.tickAmount&&"dataPoints"!==h.config.xaxis.tickAmount&&"datetime"!==h.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(s,y,b):o.axesUtils.checkForOverflowingLabels(s,y,b,c,d),h.config.xaxis.labels.show){var A=e.drawText({x:y.x,y:o.offY+h.config.xaxis.labels.offsetY+w-("top"===h.config.xaxis.position?h.globals.xAxisHeight+h.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:g,fontSize:u,fontFamily:f,foreColor:Array.isArray(p)?t&&h.config.xaxis.convertedCatToNumeric?p[h.globals.minX+s-1]:p[s]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+v});if(i.add(A),A.on("click",(function(t){if("function"==typeof h.config.chart.events.xAxisLabelClick){var e=Object.assign({},h,{labelIndex:s});h.config.chart.events.xAxisLabelClick(t,o.ctx,e)}})),t){var P=document.createElementNS(h.globals.SVGNS,"title");P.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,A.node.appendChild(P),""!==y.text&&(c.push(y.text),d.push(y))}}sa.globals.gridWidth)){var n=this.offY+a.config.xaxis.axisTicks.offsetY;if(e=e+n+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(e=n-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var r=new w(this.ctx).drawLine(t+a.config.xaxis.axisTicks.offsetX,n+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,e+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(r),r.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var s=0;s0){var c=s[s.length-1].getBBox(),d=s[0].getBBox();c.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),d.x+d.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var h=0;h0&&(this.xaxisLabels=i.globals.timescaleLabels.slice())}return o(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new w(this.ctx);null===t&&(t=i.group({class:"apexcharts-grid"}));var a=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),s=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(s),t.add(a),t}},{key:"drawGrid",value:function(){var t=null;return this.w.globals.axisCharts&&(t=this.renderGrid(),this.drawGridArea(t.el)),t}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new w(this.ctx),a=Array.isArray(t.config.stroke.width)?0:t.config.stroke.width;if(Array.isArray(t.config.stroke.width)){var s=0;t.config.stroke.width.forEach((function(t){s=Math.max(s,t)})),a=s}e.dom.elGridRectMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elForecastMask.setAttribute("id","forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(e.cuid));var n=t.config.chart.type,r=0,o=0;("bar"===n||"rangeBar"===n||"candlestick"===n||"boxPlot"===n||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(r=t.config.grid.padding.left,o=t.config.grid.padding.right,e.barPadForNumericAxis>r&&(r=e.barPadForNumericAxis,o=e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(-a/2-r-2,-a/2-2,e.gridWidth+a+o+r+4,e.gridHeight+a+4,0,"#fff");var l=t.globals.markers.largestSize+1;e.dom.elGridRectMarker=i.drawRect(2*-l,2*-l,e.gridWidth+4*l,e.gridHeight+4*l,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var c=e.dom.baseEl.querySelector("defs");c.appendChild(e.dom.elGridRectMask),c.appendChild(e.dom.elForecastMask),c.appendChild(e.dom.elNonForecastMask),c.appendChild(e.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,a=t.y1,s=t.x2,n=t.y2,r=t.xCount,o=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===r-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:i,y1:a,x2:s,y2:n,xCount:r,parent:o});var c=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var d=l.globals.groups;if(d){for(var h=0,u=0;h0&&"datetime"!==t.config.xaxis.type&&(s=e.yAxisScale[a].result.length-1)),this._drawXYLines({xCount:s,tickAmount:l})):(s=l,l=e.xTickAmount,this._drawInvertedXYLines({xCount:s,tickAmount:l}));return this.drawGridBands(s,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/s}}},{key:"drawGridBands",value:function(t,e){var i=this.w;if(void 0!==i.config.grid.row.colors&&i.config.grid.row.colors.length>0)for(var a=0,s=i.globals.gridHeight/e,n=i.globals.gridWidth,r=0,o=0;r=i.config.grid.row.colors.length&&(o=0),this._drawGridBandRect({c:o,x1:0,y1:a,x2:n,y2:s,type:"row"}),a+=i.globals.gridHeight/e;if(void 0!==i.config.grid.column.colors&&i.config.grid.column.colors.length>0)for(var l=i.globals.isBarHorizontal||"on"!==i.config.xaxis.tickPlacement||"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric?t:t-1,c=i.globals.padHorizontal,d=i.globals.padHorizontal+i.globals.gridWidth/l,h=i.globals.gridHeight,u=0,f=0;u=i.config.grid.column.colors.length&&(f=0),this._drawGridBandRect({c:f,x1:c,y1:0,x2:d,y2:h,type:"column"}),c+=i.globals.gridWidth/l}}]),t}(),G=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"niceScale",value:function(t,e){var i,a,s,n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=1e-11,l=this.w,c=l.globals;c.isBarHorizontal?(i=l.config.xaxis,a=Math.max((c.svgWidth-100)/25,2)):(i=l.config.yaxis[r],a=Math.max((c.svgHeight-100)/15,2)),s=void 0!==i.min&&null!==i.min,n=void 0!==i.max&&null!==i.min;var d=void 0!==i.stepSize&&null!==i.stepSize,h=void 0!==i.tickAmount&&null!==i.tickAmount,u=h?i.tickAmount:i.forceNiceScale?c.niceScaleDefaultTicks[Math.min(Math.round(a/2),c.niceScaleDefaultTicks.length-1)]:10;if(c.isMultipleYAxis&&!h&&c.multiAxisTickAmount>0&&(u=c.multiAxisTickAmount,h=!0),u="dataPoints"===u?c.dataPoints-1:Math.abs(Math.round(u)),(t===Number.MIN_VALUE&&0===e||!b.isNumber(t)&&!b.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=b.isNumber(i.min)?i.min:0,e=b.isNumber(i.max)?i.max:t+u,c.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var f=e;e=t,t=f}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var p=[];u<1&&(u=1);var g=u,v=Math.abs(e-t);i.forceNiceScale&&(!s&&t>0&&t/v<.15&&(t=0,s=!0),!n&&e<0&&-e/v<.15&&(e=0,n=!0),v=Math.abs(e-t));var m=v/g,x=m,y=Math.floor(Math.log10(x)),w=Math.pow(10,y),A=Math.ceil(x/w);if(m=x=(A=c.niceScaleAllowedMagMsd[0===c.yValueDecimal?0:1][A])*w,c.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(m=i.stepSize,d=!0):d&&(m=i.stepSize),d&&i.forceNiceScale){var P=Math.floor(Math.log10(m));m*=Math.pow(10,y-P)}if(s&&n){var z=v/g;if(h)if(d)if(0!=b.mod(v,m)){var X=b.getGCD(m,z);m=z/X<10?X:z}else 0==b.mod(m,z)?m=z:(z=m,h=!1);else m=z;else if(d)0==b.mod(v,m)?z=m:m=z;else if(0==b.mod(v,m))z=m;else{z=v/(g=Math.ceil(v/m));var L=b.getGCD(v,m);v/La&&(t=e-m*u,t+=m*Math.floor((C-t)/m))}else if(s)if(h)e=t+m*g;else{var O=e;e=m*Math.ceil(e/m),Math.abs(e-t)/b.getGCD(v,m)>a&&(e=t+m*u,e+=m*Math.ceil((O-e)/m))}}else if(h){var T=m/(e-t>e?1:2),k=T*Math.floor(t/T);Math.abs(k-t)<=T/2?e=(t=k)+m*g:t=(e=T*Math.ceil(e/T))-m*g}else t=m*Math.floor(t/m),e=m*Math.ceil(e/m);v=Math.abs(e-t),m=b.getGCD(v,m),g=Math.round(v/m)}if(h||s||n||(g=Math.ceil((v-o)/(m+o)))>16&&b.getPrimeFactors(g).length<2&&g++,!h&&i.forceNiceScale&&0===c.yValueDecimal&&g>v&&(g=v,m=Math.round(v/g)),g>a&&(!h&&!d||i.forceNiceScale)){var S=b.getPrimeFactors(g),H=S.length-1,M=g;t:for(var D=0;DE);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,n=Math.abs(e-t);"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,n))&&(i=this.w.globals.dataPoints-1),s||(s=n/i),i===Number.MAX_VALUE&&(i=5,s=1);for(var r=[],o=t;i>=0;)r.push(o),o+=s,i-=1;return{result:r,niceMin:r[0],niceMax:r[r.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var a=[],s=Math.ceil(Math.log(e)/Math.log(i)+1),n=Math.floor(Math.log(t)/Math.log(i));n5?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=n.forceNiceScale?this.logarithmicScaleNice(e,i,n.logBase):this.logarithmicScale(e,i,n.logBase)):i!==-Number.MAX_VALUE&&b.isNumber(i)&&e!==Number.MAX_VALUE&&b.isNumber(e)?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.niceScale(e,i,t)):a.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var i=this.w,a=i.globals,s=Math.abs(e-t);return e!==-Number.MAX_VALUE&&b.isNumber(e)?a.xAxisScale=this.linearScale(t,e,i.config.xaxis.tickAmount?i.config.xaxis.tickAmount:s<10&&s>1?s+1:10,0,i.config.xaxis.stepSize):a.xAxisScale=this.linearScale(0,10,10),a.xAxisScale}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config;t.minYArr,t.maxYArr;var i=[],a=[],s=[],n=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){s.push(e),a.push(null)})),e.yaxis.forEach((function(t,e){i[e]=[]}));var r=[];e.yaxis.forEach((function(t,a){var o=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,r){if(e.name===t){var l=r;a===r||n?!n||s.indexOf(r)>-1?i[a].push([a,r]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[r].push([r,a]),l=a),o=!0,-1!==(l=s.indexOf(l))&&s.splice(l,1)}}))}))}o||r.push(a)})),i=i.map((function(t,e){var i=[];return t.forEach((function(t){a[t[1]]=t[0],i.push(t[1])})),i}));for(var o=e.yaxis.length-1,l=0;l0?function(){var l,c,d=Number.MAX_VALUE,h=-Number.MAX_VALUE,u=d,f=h;if(e.chart.stacked)!function(){var t=i.seriesX[a[0]],s=[],n=[],p=[];o.forEach((function(){s.push(t.map((function(){return Number.MIN_VALUE}))),n.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var g=function(t){!l&&e.series[a[t]].type&&(l=e.series[a[t]].type);var d=a[t];c=e.series[d].group?e.series[d].group:"axis-".concat(r),!(i.collapsedSeriesIndices.indexOf(d)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(d)<0)||(i.allSeriesCollapsed=!1,o.forEach((function(t,a){if(e.series[d].group===t)for(var r=0;r=0?n[a][r]+=o:p[a][r]+=o,s[a][r]+=o,u=Math.min(u,o),f=Math.max(f,o)}}))),"bar"!==l&&"column"!==l||i.barGroups.push(c)},v=0;v1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w.config,n=this.w.globals,r=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=t+1);var l=0,c=0,d=void 0;if(n.seriesX.length>=a){var h,u;l=0,c=(d=g(new Set((h=[]).concat.apply(h,g(n.seriesX.slice(t,a)))))).length-1;var f=null===(u=n.brushSource)||void 0===u?void 0:u.w.config.chart.brush;if(s.chart.zoom.enabled&&s.chart.zoom.autoScaleYaxis||null!=f&&f.enabled&&null!=f&&f.autoScaleYaxis){if(s.xaxis.min)for(l=0;ll&&d[c]>s.xaxis.max;c--);}}var p=n.series,v=p,m=p;"candlestick"===s.chart.type?(v=n.seriesCandleL,m=n.seriesCandleH):"boxPlot"===s.chart.type?(v=n.seriesCandleO,m=n.seriesCandleC):n.isRangeData&&(v=n.seriesRangeStart,m=n.seriesRangeEnd);for(var x=t;xv[x][w]&&v[x][w]<0&&(o=v[x][w])}else n.hasNullValues=!0}"bar"!==y&&"column"!==y||(o<0&&r<0&&(r=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,e=Math.min(e,0)))}return"rangeBar"===s.chart.type&&n.seriesRangeStart.length&&n.isBarHorizontal&&(o=e),"bar"===s.chart.type&&(o<0&&r<0&&(r=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:r,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(t.isMultipleYAxis){a=Number.MAX_VALUE;for(var s=0;st.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1)):"dataPoints"===e.xaxis.tickAmount?(t.series.length>1&&(a=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric&&(a=t.maxX-t.minX-1)):a=e.xaxis.tickAmount,t.xTickAmount=a,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var s=[],n=t.minX-1;n0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,a-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var s=e-a[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var i=e.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map((function(t){return t}))]);var a={},s={};i.forEach((function(i){a[i]=[],s[i]=[],t.w.config.series.map((function(t,a){return i.indexOf(e.seriesNames[a])>-1?a:null})).filter((function(t){return null!==t})).forEach((function(n){for(var r=0;r0?a[i][r]+=parseFloat(e.series[n][r])+1e-4:s[i][r]+=parseFloat(e.series[n][r]))}}))})),Object.entries(a).forEach((function(t){var i=p(t,1)[0];a[i].forEach((function(t,n){e.maxY=Math.max(e.maxY,a[i][n]),e.minY=Math.min(e.minY,s[i][n])}))}))}}}]),t}(),K=function(){function t(e,i){n(this,t),this.ctx=e,this.elgrid=i,this.w=e.w;var a=this.w;this.xaxisFontSize=a.config.xaxis.labels.style.fontSize,this.axisFontFamily=a.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=a.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===a.config.chart.type&&a.config.plotOptions.bar.horizontal,this.xAxisoffX=0,"bottom"===a.config.xaxis.position&&(this.xAxisoffX=a.globals.gridHeight),this.drawnLabels=[],this.axesUtils=new C(e)}return o(t,[{key:"drawYaxis",value:function(t){var e=this,i=this.w,a=new w(this.ctx),s=i.config.yaxis[t].labels.style,n=s.fontSize,r=s.fontFamily,o=s.fontWeight,l=a.group({class:"apexcharts-yaxis",rel:t,transform:"translate("+i.globals.translateYAxisX[t]+", 0)"});if(this.axesUtils.isYAxisHidden(t))return l;var c=a.group({class:"apexcharts-yaxis-texts-g"});l.add(c);var d=i.globals.yAxisScale[t].result.length-1,h=i.globals.gridHeight/d,u=i.globals.yLabelFormatters[t],f=i.globals.yAxisScale[t].result.slice();f=this.axesUtils.checkForReversedLabels(t,f);var p="";if(i.config.yaxis[t].labels.show){var g=i.globals.translateY+i.config.yaxis[t].labels.offsetY;i.globals.isBarHorizontal?g=0:"heatmap"===i.config.chart.type&&(g-=h/2),g+=parseInt(i.config.yaxis[t].labels.style.fontSize,10)/3;for(var v=function(l){var v=f[l];v=u(v,l,i);var m=i.config.yaxis[t].labels.padding;i.config.yaxis[t].opposite&&0!==i.config.yaxis.length&&(m*=-1);var b="end";i.config.yaxis[t].opposite&&(b="start"),"left"===i.config.yaxis[t].labels.align?b="start":"center"===i.config.yaxis[t].labels.align?b="middle":"right"===i.config.yaxis[t].labels.align&&(b="end");var x=e.axesUtils.getYAxisForeColor(s.colors,t),y=a.drawText({x:m,y:g,text:v,textAnchor:b,fontSize:n,fontFamily:r,fontWeight:o,maxWidth:i.config.yaxis[t].labels.maxWidth,foreColor:Array.isArray(x)?x[l]:x,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+s.cssClass});l===d&&(p=y),c.add(y);var w=document.createElementNS(i.globals.SVGNS,"title");if(w.textContent=Array.isArray(v)?v.join(" "):v,y.node.appendChild(w),0!==i.config.yaxis[t].labels.rotate){var A=a.rotateAroundCenter(p.node),P=a.rotateAroundCenter(y.node);y.node.setAttribute("transform","rotate(".concat(i.config.yaxis[t].labels.rotate," ").concat(A.x," ").concat(P.y,")"))}g+=h},m=d;m>=0;m--)v(m)}if(void 0!==i.config.yaxis[t].title.text){var b=a.group({class:"apexcharts-yaxis-title"}),x=0;i.config.yaxis[t].opposite&&(x=i.globals.translateYAxisX[t]);var y=a.drawText({x:x,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[t].title.offsetY,text:i.config.yaxis[t].title.text,textAnchor:"end",foreColor:i.config.yaxis[t].title.style.color,fontSize:i.config.yaxis[t].title.style.fontSize,fontWeight:i.config.yaxis[t].title.style.fontWeight,fontFamily:i.config.yaxis[t].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[t].title.style.cssClass});b.add(y),l.add(b)}var A=i.config.yaxis[t].axisBorder,P=31+A.offsetX;if(i.config.yaxis[t].opposite&&(P=-31-A.offsetX),A.show){var z=a.drawLine(P,i.globals.translateY+A.offsetY-2,P,i.globals.gridHeight+i.globals.translateY+A.offsetY+2,A.color,0,A.width);l.add(z)}return i.config.yaxis[t].axisTicks.show&&this.axesUtils.drawYAxisTicks(P,d,A,i.config.yaxis[t].axisTicks,t,h,l),l}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new w(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(s);var n=e.globals.yAxisScale[t].result.length-1,r=e.globals.gridWidth/n+.1,o=r+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,c=e.globals.yAxisScale[t].result.slice(),d=e.globals.timescaleLabels;d.length>0&&(this.xaxisLabels=d.slice(),n=(c=d.slice()).length),c=this.axesUtils.checkForReversedLabels(t,c);var h=d.length;if(e.config.xaxis.labels.show)for(var u=h?0:n;h?u=0;h?u++:u--){var f=c[u];f=l(f,u,e);var p=e.globals.gridWidth+e.globals.padHorizontal-(o-r+e.config.xaxis.labels.offsetX);if(d.length){var g=this.axesUtils.getLabel(c,d,p,u,this.drawnLabels,this.xaxisFontSize);p=g.x,f=g.text,this.drawnLabels.push(g.text),0===u&&e.globals.skipFirstTimelinelabel&&(f=""),u===c.length-1&&e.globals.skipLastTimelinelabel&&(f="")}var v=i.drawText({x:p,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+e.config.xaxis.labels.style.cssClass});s.add(v),v.tspan(f);var m=document.createElementNS(e.globals.SVGNS,"title");m.textContent=f,v.node.appendChild(m),o+=r}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new w(this.ctx),a=e.config.xaxis.axisBorder;if(a.show){var s=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(s-=15);var n=i.drawLine(e.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(n):t.add(n)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new w(this.ctx);if(void 0!==e.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});a.add(s),t.add(a)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new w(this.ctx),s={width:0,height:0},n={width:0,height:0},r=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g"));null!==r&&(s=r.getBoundingClientRect());var o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text"));if(null!==o&&(n=o.getBoundingClientRect()),null!==o){var l=this.xPaddingForYAxisTitle(t,s,n,e);o.setAttribute("x",l.xPos-(e?10:0))}if(null!==o){var c=a.rotateAroundCenter(o);o.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,n=0,r=0,o=10;return void 0===s.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(a?(r=e.width+s.config.yaxis[t].title.offsetX+i.width/2+o/2,0===(n+=1)&&(r-=o/2)):(r=-1*e.width+s.config.yaxis[t].title.offsetX+o/2+i.width/2,s.globals.isBarHorizontal&&(o=25,r=-1*e.width-s.config.yaxis[t].title.offsetX-o)),{xPos:r,padd:o})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,a=0,s=0,n=18,r=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.map((function(o,l){var c=i.globals.ignoreYAxisIndexes.indexOf(l)>-1||!o.show||o.floating||0===t[l].width,d=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(s=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=s-o.labels.offsetX):(s=i.globals.gridWidth+i.globals.translateX+r,c||(r=r+d+20),i.globals.translateYAxisX[l]=s-o.labels.offsetX+20):(a=i.globals.translateX-n,c||(n=n+d+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(e=b.listToArray(e)).forEach((function(e,i){var a=t.config.yaxis[i];if(a&&!a.floating&&void 0!==a.labels.align){var s=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"));n=b.listToArray(n);var r=s.getBoundingClientRect();"left"===a.labels.align?(n.forEach((function(t,e){t.setAttribute("text-anchor","start")})),a.opposite||s.setAttribute("transform","translate(-".concat(r.width,", 0)"))):"center"===a.labels.align?(n.forEach((function(t,e){t.setAttribute("text-anchor","middle")})),s.setAttribute("transform","translate(".concat(r.width/2*(a.opposite?1:-1),", 0)"))):"right"===a.labels.align&&(n.forEach((function(t,e){t.setAttribute("text-anchor","end")})),a.opposite&&s.setAttribute("transform","translate(".concat(r.width,", 0)")))}}))}}]),t}(),J=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.documentEvent=b.bind(this.documentEvent,this)}return o(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var a=i.globals.events[t].indexOf(e);-1!==a&&i.globals.events[t].splice(a,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var a=i.globals.events[t],s=a.length,n=0;n0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=b.extend(k,i);this.w.globals.locale=a.options}}]),t}(),$=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"drawAxis",value:function(t,e){var i,a,s=this,n=this.w.globals,r=this.w.config,o=new U(this.ctx,e),l=new K(this.ctx,e);n.axisCharts&&"radar"!==t&&(n.isBarHorizontal?(a=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),n.dom.elGraphical.add(i),n.dom.elGraphical.add(a)):(i=o.drawXaxis(),n.dom.elGraphical.add(i),r.yaxis.map((function(t,e){if(-1===n.ignoreYAxisIndexes.indexOf(e)&&(a=l.drawYaxis(e),n.dom.Paper.add(a),"back"===s.w.config.grid.position)){var i=n.dom.Paper.children()[1];i.remove(),n.dom.Paper.add(i)}}))))}}]),t}(),tt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new w(this.ctx),i=new y(this.ctx),a=t.config.xaxis.crosshairs.fill.gradient,s=t.config.xaxis.crosshairs.dropShadow,n=t.config.xaxis.crosshairs.fill.type,r=a.colorFrom,o=a.colorTo,l=a.opacityFrom,c=a.opacityTo,d=a.stops,h=s.enabled,u=s.left,f=s.top,p=s.blur,g=s.color,v=s.opacity,m=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===n&&(m=e.drawGradient("vertical",r,o,l,c,null,d,null));var x=e.drawRect();1===t.config.xaxis.crosshairs.width&&(x=e.drawLine());var A=t.globals.gridHeight;(!b.isNumber(A)||A<0)&&(A=0);var P=t.config.xaxis.crosshairs.width;(!b.isNumber(P)||P<0)&&(P=0),x.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:A,width:P,height:A,fill:m,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),h&&(x=i.dropShadow(x,{left:u,top:f,blur:p,color:g,opacity:v})),t.globals.dom.elGraphical.add(x)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new w(this.ctx),i=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var s=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(s)}var n=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,0,0);n.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(n)}}]),t}(),et=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,a=i.config;if(0!==a.responsive.length){var s=a.responsive.slice();s.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var n=new N({}),r=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=s[0].breakpoint,r=window.innerWidth>0?window.innerWidth:screen.width;if(r>a){var o=b.clone(i.globals.initialConfig);o.series=b.clone(i.config.series);var l=A.extendArrayProps(n,o,i);t=b.extend(l,t),t=b.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var c=0;c0&&"function"==typeof i.config.colors[0]&&(i.globals.colors=i.config.series.map((function(t,a){var s=i.config.colors[a];return s||(s=i.config.colors[0]),"function"==typeof s?(e.isColorFn=!0,s({value:i.globals.axisCharts?i.globals.series[a][0]?i.globals.series[a][0]:0:i.globals.series[a],seriesIndex:a,dataPointIndex:a,w:i})):s})))),i.globals.seriesColors.map((function(t,e){t&&(i.globals.colors[e]=t)})),i.config.theme.monochrome.enabled){var s=[],n=i.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(n=i.globals.series[0].length*i.globals.series.length);for(var r=i.config.theme.monochrome.color,o=1/(n/i.config.theme.monochrome.shadeIntensity),l=i.config.theme.monochrome.shadeTo,c=0,d=0;d2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=e||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,i=[];e.config.series.forEach((function(s,n){s.data.forEach((function(s,r){var o;o=e.globals.series[n][r],a=e.config.dataLabels.formatter(o,{ctx:t.dCtx.ctx,seriesIndex:n,dataPointIndex:r,w:e}),i.push(a)}))}));var a=b.getLargestStringFromArr(i),s=new w(this.dCtx.ctx),n=e.config.dataLabels.style,r=s.getTextRects(a,parseInt(n.fontSize),n.fontFamily);return{width:1.05*r.width,height:r.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var a=e.map((function(t,e){return Array.isArray(t)?t.length:1})),s=Math.max.apply(Math,g(a));i=e[a.indexOf(s)]}return i}}]),t}(),nt=function(){function t(e){n(this,t),this.w=e.w,this.dCtx=e}return o(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();t={width:a.width,height:a.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var s=e.globals.xLabelFormatter,n=b.getLargestStringFromArr(i),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(n,i);e.globals.isBarHorizontal&&(r=n=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var o=new L(this.dCtx.ctx),l=n;n=o.xLabelFormat(s,n,l,{i:void 0,dateFormatter:new X(this.dCtx.ctx).formatDate,w:e}),r=o.xLabelFormat(s,r,l,{i:void 0,dateFormatter:new X(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===n||""===String(n).trim())&&(r=n="1");var c=new w(this.dCtx.ctx),d=c.getTextRects(n,e.config.xaxis.labels.style.fontSize),h=d;if(n!==r&&(h=c.getTextRects(r,e.config.xaxis.labels.style.fontSize)),(t={width:d.width>=h.width?d.width:h.width,height:d.height>=h.height?d.height:h.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return c.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};d=u(n),n!==r&&(h=u(r)),t.height=(d.height>h.height?d.height:h.height)/1.5,t.width=d.width>h.width?d.width:h.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var i,a=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,s=e.globals.groups.map((function(t){return t.title})),n=b.getLargestStringFromArr(s),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(n,s),o=new w(this.dCtx.ctx),l=o.getTextRects(n,a),c=l;return n!==r&&(c=o.getTextRects(r,a)),i={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new w(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),a=i.reduce((function(t,e){return void 0===t?0:t.length>e.length?t:e}),0);return 1.05*(t=new w(this.dCtx.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,a=i.globals,s=i.config,n=s.xaxis.type,r=t.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,o){s.yaxis.length>1&&function(t){return-1!==a.collapsedSeriesIndices.indexOf(t)}(o)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var o=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+r/1.75-e.dCtx.yAxisWidthRight,c=o.position-r/1.75+e.dCtx.yAxisWidthLeft,d="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-d&&(a.skipLastTimelinelabel=!0),c<-(t.show&&!t.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type?10:r/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===n?e.dCtx.gridPad.right(null===(a=String(d(e,o)))||void 0===a?void 0:a.length)?t:e}),h),f=u=d(u,o);if(void 0!==u&&0!==u.length||(u=l.niceMax),e.globals.isBarHorizontal){a=0;var p=e.globals.labels.slice();u=b.getLargestStringFromArr(p),u=d(u,{seriesIndex:r,dataPointIndex:-1,w:e}),f=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,p)}var g=new w(t.dCtx.ctx),v="rotate(".concat(n.labels.rotate," 0 0)"),m=g.getTextRects(u,n.labels.style.fontSize,n.labels.style.fontFamily,v,!1),x=m;u!==f&&(x=g.getTextRects(f,n.labels.style.fontSize,n.labels.style.fontFamily,v,!1)),i.push({width:(c>x.width||c>m.width?c:x.width>m.width?x.width:m.width)+a,height:x.height>m.height?x.height:m.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,a){if(e.show&&void 0!==e.title.text){var s=new w(t.dCtx.ctx),n="rotate(".concat(e.title.rotate," 0 0)"),r=s.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,n,!1);i.push({width:r.width,height:r.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,a=0,s=t.globals.yAxisScale.length>1?10:0,n=new C(this.dCtx.ctx),r=function(r,o){var l=t.config.yaxis[o].floating,c=0;r.width>0&&!l?(c=r.width+s,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(c=c-r.width-s)):c=l||n.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?a+=c:i+=c,e+=c};return t.globals.yLabelsCoords.map((function(t,e){r(t,e)})),t.globals.yTitleCoords.map((function(t,e){r(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,e}}]),t}(),ot=function(){function t(e){n(this,t),this.w=e.w,this.dCtx=e}return o(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w,i=e.config,a=e.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var s=function(t){return"bar"===t||"rangeBar"===t||"candlestick"===t||"boxPlot"===t},n=i.chart.type,r=0,o=s(n)?i.series.length:1;if(a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach((function(t){s(t.type)&&(o-=1)})),i.chart.stacked&&(o=1),(s(n)||a.comboBarCount>0)&&a.isXNumeric&&!a.isBarHorizontal&&o>0){var l,c,d=Math.abs(a.initialMaxX-a.initialMinX);d<=3&&(d=a.dataPoints),l=d/t,a.minXDiff&&a.minXDiff/l>0&&(c=a.minXDiff/l),c>t/2&&(c/=2),(r=c*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(r=1),a.barPadForNumericAxis=r}return r}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,a=this.dCtx.isSparkline||!e.globals.axisCharts?0:10;["title","subtitle"].forEach((function(i){void 0!==e.config[i].text?a+=e.config[i].margin:a+=t.dCtx.isSparkline||!e.globals.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||e.globals.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),n=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight=i.gridHeight-s.height-n.height-a,i.translateY=i.translateY+s.height+n.height+a}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,a=new C(this.dCtx.ctx);i.config.yaxis.map((function(s,n){-1!==i.globals.ignoreYAxisIndexes.indexOf(n)||s.floating||a.isYAxisHidden(n)||(s.opposite&&(i.globals.translateX=i.globals.translateX-(e[n].width+t[n].width)-parseInt(i.config.yaxis[n].labels.style.fontSize,10)/1.2-12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),lt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new st(this),this.dimYAxis=new rt(this),this.dimXAxis=new nt(this),this.dimGrid=new ot(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return o(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var a=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,g(e.config.stroke.width)):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=p(e,2),a=i[0],s=i[1];t.gridPad[a]=Math.max(s,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(a/2,this.gridPad.top),this.gridPad.bottom=Math.max(a/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var s=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*s,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:a[i].width,index:i}),e.globals.yTitleCoords.push({width:s[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var n=this.dimXAxis.getxAxisLabelsCoords(),r=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(n,o,r),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,c=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-n.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var d=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,c=i.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,c=0,d=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(n);var h=function(){i.translateX=l+t.datalabelsCoords.width,i.gridHeight=i.svgHeight-t.lgRect.height-c-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(d=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=d,h();break;case"top":i.translateY=this.lgRect.height+d,h();break;case"left":i.translateY=d,i.translateX=this.lgRect.width+l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":i.translateY=d,i.translateX=l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new K(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,a=0;t.config.legend.show&&!t.config.legend.floating&&(a=20);var s="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",n=i.plotOptions[s].offsetY,r=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating)return e.gridHeight=e.svgHeight-i.grid.padding.left+i.grid.padding.right,e.gridWidth=Math.min(e.svgWidth,e.gridHeight),e.translateY=n,void(e.translateX=r+(e.svgWidth-e.gridWidth)/2);switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height-e.goldenPadding,e.gridWidth=e.svgWidth,e.translateY=n-10,e.translateX=r+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height-e.goldenPadding,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+n+10,e.translateX=r+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-a,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=n,e.translateX=r+this.lgRect.width+a;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-a-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=n,e.translateX=r+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var a=this.w,s=a.globals.hasXaxisGroups?2:1,n=i.height+t.height+e.height,r=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,l=a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0;this.xAxisHeight=n*r+s*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightd&&(this.yAxisWidth=d)}}]),t}(),ct=function(){function t(e){n(this,t),this.w=e.w,this.lgCtx=e}return o(t,[{key:"getLegendStyles",value:function(){var t,e,i,a=document.createElement("style");a.setAttribute("type","text/css");var s=(null===(t=this.lgCtx.ctx)||void 0===t||null===(e=t.opts)||void 0===e||null===(i=e.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;s&&a.setAttribute("nonce",s);var n=document.createTextNode("\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n }\n .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: inline-block;\n cursor: pointer;\n margin-right: 3px;\n border-style: solid;\n }\n\n .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\n display: inline-block;\n }\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }");return a.appendChild(n),a}},{key:"getLegendBBox",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(t,e){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var s=null,n=null;a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),n=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),n=parseInt(s.getAttribute("rel"),10)-1),e?[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,n)})):this.hideSeries({seriesEl:s,realIndex:n})}else{var r=a.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(t+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new w(this.lgCtx.ctx).pathMouseDown(r.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(r.members[0].node,l)}r.fire("click")}}},{key:"hideSeries",value:function(t){var e=t.seriesEl,i=t.realIndex,a=this.w,s=a.globals,n=b.clone(a.config.series);if(s.axisCharts){var r=a.config.yaxis[s.seriesYAxisReverseMap[i]];if(r&&r.show&&r.showAlways)s.ancillaryCollapsedSeriesIndices.indexOf(i)<0&&(s.ancillaryCollapsedSeries.push({index:i,data:n[i].data.slice(),type:e.parentNode.className.baseVal.split("-")[1]}),s.ancillaryCollapsedSeriesIndices.push(i));else if(s.collapsedSeriesIndices.indexOf(i)<0){s.collapsedSeries.push({index:i,data:n[i].data.slice(),type:e.parentNode.className.baseVal.split("-")[1]}),s.collapsedSeriesIndices.push(i);var o=s.risingSeries.indexOf(i);s.risingSeries.splice(o,1)}}else s.collapsedSeries.push({index:i,data:n[i]}),s.collapsedSeriesIndices.push(i);for(var l=e.childNodes,c=0;c0){for(var n=0;n1||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),b.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()):this.legendHelpers.appendToForeignObject(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,s=e.globals.colors.slice();if("heatmap"===e.config.chart.type){var n=e.config.plotOptions.heatmap.colorScale.ranges;a=n.map((function(t){return t.name?t.name:t.from+" - "+t.to})),s=n.map((function(t){return t.color}))}else this.isBarsDistributed&&(a=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(a=e.config.legend.customLegendItems);for(var r=e.globals.legendFormatter,o=e.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var c,d=r(a[l],{seriesIndex:l,w:e}),h=!1,u=!1;if(e.globals.collapsedSeries.length>0)for(var f=0;f0)for(var p=0;p0?l-10:0)+(c>0?c-10:0)}a.style.position="absolute",n=n+t+i.config.legend.offsetX,r=r+e+i.config.legend.offsetY,a.style.left=n+"px",a.style.top=r+"px","bottom"===i.config.legend.position?(a.style.top="auto",a.style.bottom=5-i.config.legend.offsetY+"px"):"right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px"),["width","height"].forEach((function(t){a.style[t]&&(a.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=this.legendHelpers.getLegendBBox(),i=new lt(this.ctx),a=i.dimHelpers.getTitleSubtitleCoords("title"),s=i.dimHelpers.getTitleSubtitleCoords("subtitle"),n=0;"bottom"===t.config.legend.position?n=-e.clwh/1.8:"top"===t.config.legend.position&&(n=a.height+s.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,n)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendBBox(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new I(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new I(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,a="true"===t.target.getAttribute("data:collapsed"),s=this.w.config.chart.events.legendClick;"function"==typeof s&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var n=this.w.config.legend.markers.onClick;"function"==typeof n&&t.target.classList.contains("apexcharts-legend-marker")&&(n(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),t}(),ht=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=i.globals.minX,this.maxX=i.globals.maxX}return o(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=e.config.chart.toolbar.offsetY+"px",a.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s\n \n \n\n'),r("zoomOut",this.elZoomOut,'\n');var o=function(i){t.t[i]&&e.config.chart[i].enabled&&n.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'':'',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&e.config.chart.zoom.enabled&&n.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),r("reset",this.elZoomReset,''),this.t.download&&n.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;l0&&e.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:t.globals.gridWidth,maxY:t.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(t.globals.selection);else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,a=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i;t.globals.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,a=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var s={x:i,y:0,width:a,height:t.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(s),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,a=t.width,s=t.height,n=t.translateX,r=void 0===n?0:n,o=t.translateY,l=void 0===o?0:o,c=this.w,d=this.zoomRect,h=this.selectionRect;if(this.dragged||null!==c.globals.selection){var u={transform:"translate("+r+", "+l+")"};c.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),d.attr({x:e,y:i,width:a,height:s,fill:c.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":c.config.chart.zoom.zoomedArea.fill.opacity,stroke:c.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":c.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":c.config.chart.zoom.zoomedArea.stroke.opacity}),w.setAttrs(d.node,u)),c.globals.selectionEnabled&&(h.attr({x:e,y:i,width:a>0?a:0,height:s>0?s:0,fill:c.config.chart.selection.fill.color,"fill-opacity":c.config.chart.selection.fill.opacity,stroke:c.config.chart.selection.stroke.color,"stroke-width":c.config.chart.selection.stroke.width,"stroke-dasharray":c.config.chart.selection.stroke.dashArray,"stroke-opacity":c.config.chart.selection.stroke.opacity}),w.setAttrs(h.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e,i=t.context,a=t.zoomtype,s=this.w,n=i,r=this.gridRect.getBoundingClientRect(),o=n.startX-1,l=n.startY,c=!1,d=!1,h=n.clientX-r.left-o,u=n.clientY-r.top-l;return Math.abs(h+o)>s.globals.gridWidth?h=s.globals.gridWidth-o:n.clientX-r.left<0&&(h=o),o>n.clientX-r.left&&(c=!0,h=Math.abs(h)),l>n.clientY-r.top&&(d=!0,u=Math.abs(u)),e="x"===a?{x:c?o-h:o,y:0,width:h,height:s.globals.gridHeight}:"y"===a?{x:0,y:d?l-u:l,width:s.globals.gridWidth,height:u}:{x:c?o-h:o,y:d?l-u:l,width:h,height:u},n.drawSelectionRect(e),n.selectionDragging("resizing"),e}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w,s=this.xyRatios,n=this.selectionRect,r=0;"resizing"===t&&(r=30);var o=function(t){return parseFloat(n.node.getAttribute(t))},l={x:o("x"),y:o("y"),width:o("width"),height:o("height")};a.globals.selection=l,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,r,o,l=i.gridRect.getBoundingClientRect(),c=n.node.getBoundingClientRect();a.globals.isRangeBar?(t=a.globals.yAxisScale[0].niceMin+(c.left-l.left)*s.invertedYRatio,e=a.globals.yAxisScale[0].niceMin+(c.right-l.left)*s.invertedYRatio,r=0,o=1):(t=a.globals.xAxisScale.niceMin+(c.left-l.left)*s.xRatio,e=a.globals.xAxisScale.niceMin+(c.right-l.left)*s.xRatio,r=a.globals.yAxisScale[0].niceMin+(l.bottom-c.bottom)*s.yRatio[0],o=a.globals.yAxisScale[0].niceMax-(c.top-l.top)*s.yRatio[0]);var d={xaxis:{min:t,max:e},yaxis:{min:r,max:o}};a.config.chart.events.selection(i.ctx,d),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,d)}),r))}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,n=this.xyRatios,r=this.ctx.toolbar;if(s.startX>s.endX){var o=s.startX;s.startX=s.endX,s.endX=o}if(s.startY>s.endY){var l=s.startY;s.startY=s.endY,s.endY=l}var c=void 0,d=void 0;a.globals.isRangeBar?(c=a.globals.yAxisScale[0].niceMin+s.startX*n.invertedYRatio,d=a.globals.yAxisScale[0].niceMin+s.endX*n.invertedYRatio):(c=a.globals.xAxisScale.niceMin+s.startX*n.xRatio,d=a.globals.xAxisScale.niceMin+s.endX*n.xRatio);var h=[],u=[];if(a.config.yaxis.forEach((function(t,e){if(a.globals.seriesYAxisMap[e].length>0){var i=a.globals.seriesYAxisMap[e][0];h.push(a.globals.yAxisScale[e].niceMax-n.yRatio[i]*s.startY),u.push(a.globals.yAxisScale[e].niceMax-n.yRatio[i]*s.endY)}})),s.dragged&&(s.dragX>10||s.dragY>10)&&c!==d)if(a.globals.zoomEnabled){var f=b.clone(a.globals.initialConfig.yaxis),p=b.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(c=Math.floor(c),d=Math.floor(d),c<1&&(c=1,d=a.globals.dataPoints),d-c<2&&(d=c+1)),"xy"!==i&&"x"!==i||(p={min:c,max:d}),"xy"!==i&&"y"!==i||f.forEach((function(t,e){f[e].min=u[e],f[e].max=h[e]})),r){var g=r.getBeforeZoomRange(p,f);g&&(p=g.xaxis?g.xaxis:p,f=g.yaxis?g.yaxis:f)}var v={xaxis:p};a.config.chart.group||(v.yaxis=f),s.ctx.updateHelpers._updateOptions(v,!1,s.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&r.zoomCallback(p,f)}else if(a.globals.selectionEnabled){var m,x=null;m={min:c,max:d},"xy"!==i&&"y"!==i||(x=b.clone(a.config.yaxis)).forEach((function(t,e){x[e].min=u[e],x[e].max=h[e]})),a.globals.selection=s.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(s.ctx,{xaxis:m,yaxis:x})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,a=e;if(void 0!==i.globals.lastClientPosition.x){var s=i.globals.lastClientPosition.x-a.clientX,n=i.globals.lastClientPosition.y-a.clientY;Math.abs(s)>Math.abs(n)&&s>0?this.moveDirection="left":Math.abs(s)>Math.abs(n)&&s<0?this.moveDirection="right":Math.abs(n)>Math.abs(s)&&n>0?this.moveDirection="up":Math.abs(n)>Math.abs(s)&&n<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var r=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(r,o)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,a=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+a,i=t.globals.maxX+a):"right"===this.moveDirection&&(e=t.globals.minX-a,i=t.globals.maxX-a),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,a=this.xyRatios,s=b.clone(i.globals.initialConfig.yaxis),n=a.xRatio,r=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(n=a.invertedYRatio,r=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(t=r+i.globals.gridWidth/15*n,e=o+i.globals.gridWidth/15*n):"right"===this.moveDirection&&(t=r-i.globals.gridWidth/15*n,e=o-i.globals.gridWidth/15*n),i.globals.isRangeBar||(ti.globals.initialMaxX)&&(t=r,e=o);var l={xaxis:{min:t,max:e}};i.config.chart.group||(l.yaxis=s),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var a=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),i}(),ft=function(){function t(e){n(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return o(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,a=t.clientX,s=t.clientY,n=this.w,r=i.getBoundingClientRect(),o=r.width,l=r.height,c=o/(n.globals.dataPoints-1),d=l/n.globals.dataPoints,h=this.hasBars();!n.globals.comboCharts&&!h||n.config.xaxis.convertedCatToNumeric||(c=o/n.globals.dataPoints);var u=a-r.left-n.globals.barPadForNumericAxis,f=s-r.top;u<0||f<0||u>o||f>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):n.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):n.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var p=Math.round(u/c),g=Math.floor(f/d);h&&!n.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(u/c),p-=1);var v=null,m=null,x=n.globals.seriesXvalues.map((function(t){return t.filter((function(t){return b.isNumber(t)}))})),y=n.globals.seriesYvalues.map((function(t){return t.filter((function(t){return b.isNumber(t)}))}));if(n.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),A=u*(w.width/o),P=f*(w.height/l);v=(m=this.closestInMultiArray(A,P,x,y)).index,p=m.j,null!==v&&(x=n.globals.seriesXvalues[v],p=(m=this.closestInArray(A,x)).index)}return n.globals.capturedSeriesIndex=null===v?-1:v,(!p||p<1)&&(p=0),n.globals.isBarHorizontal?n.globals.capturedDataPointIndex=g:n.globals.capturedDataPointIndex=p,{capturedSeries:v,j:n.globals.isBarHorizontal?g:p,hoverX:u,hoverY:f}}},{key:"closestInMultiArray",value:function(t,e,i,a){var s=this.w,n=0,r=null,o=-1;s.globals.series.length>1?n=this.getFirstActiveXArray(i):r=0;var l=i[n][0],c=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var a=Math.abs(t-e);a<=c&&(c=a,o=i)}))})),-1!==o){var d=a[n][o],h=Math.abs(e-d);r=n,a.forEach((function(t,i){var a=Math.abs(e-t[o]);a<=h&&(h=a,r=i)}))}return{index:r,j:o}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,i=0,a=t.map((function(t,e){return t.length>0?e:-1})),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=g(t)).sort((function(t,e){var i=Number(t.getAttribute("data:realIndex")),a=Number(e.getAttribute("data:realIndex"));return ai?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{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(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s";h.forEach((function(i,a){t+=' ').concat(i.attrs.name,"
"),e+="".concat(i.val,"
")})),b.innerHTML=t+"",x.innerHTML=e+""};r?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(b.innerHTML="",x.innerHTML=""):y()}else b.innerHTML="",x.innerHTML="";if(null!==p&&(a[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:""),r&&g[0]){if(l.config.tooltip.hideEmptySeries){var w=a[e].querySelector(".apexcharts-tooltip-marker"),A=a[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(d)?(w.style.display="none",A.style.display="none"):(w.style.display="block",A.style.display="block")}null==d||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display}}},{key:"toggleActiveInactiveSeries",value:function(t){var e=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=e.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");i&&(i.classList.add("apexcharts-active"),i.style.display=e.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,a=this.w,s=this.ctx.series.filteredSeriesX(),n="",r="",o=null,l=null,c={series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a},d=a.globals.ttZFormatter;null===i?l=a.globals.series[e]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(n=s[e][i],0===s[e].length&&(n=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):n=void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var h=n;return n=a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?new L(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new X(this.ctx).formatDate,w:this.w}):a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](h,c):a.globals.xLabelFormatter(h,c),void 0!==a.config.tooltip.x.formatter&&(n=a.globals.ttKeyFormatter(h,c)),a.globals.seriesZ.length>0&&a.globals.seriesZ[e].length>0&&(o=d(a.globals.seriesZ[e][i],a)),r="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(h,c):n,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(n)?n.join(" "):n,xAxisTTVal:Array.isArray(r)?r.join(" "):r,zVal:o}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=t.y1,s=t.y2,n=t.w,r=this.ttCtx.getElTooltip(),o=n.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]),r.innerHTML=o({ctx:this.ctx,series:n.globals.series,seriesIndex:e,dataPointIndex:i,y1:a,y2:s,w:n})}}]),t}(),gt=function(){function t(e){n(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return o(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),n=t-i.xcrosshairsWidth/2,r=a.globals.labels.slice().length;if(null!==e&&(n=a.globals.gridWidth/r*e),null===s||a.globals.isBarHorizontal||(s.setAttribute("x",n),s.setAttribute("x1",n),s.setAttribute("x2",n),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),n<0&&(n=0),n>a.globals.gridWidth&&(n=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=n;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=n+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&w.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&w.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var a,s=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t))t+=e.globals.translateX,a=new w(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=a.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=s+"px"}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=e.globals.translateY+a,n=i.yaxisTTEls[t].getBoundingClientRect().height,r=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(r-=26),s-=n/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=r+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,n=s.getElTooltip(),r=s.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(t)+o+5,c=parseFloat(e)+o/2;if(l>a.globals.gridWidth/2&&(l=l-r.ttWidth-o-10),l>a.globals.gridWidth-r.ttWidth-10&&(l=a.globals.gridWidth-r.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var d=s.getElGrid().getBoundingClientRect();(l=s.e.clientX-d.left)>a.globals.gridWidth/2&&(l-=s.tooltipRect.ttWidth),(c=s.e.clientY+a.globals.translateY-d.top)>a.globals.gridHeight/2&&(c-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||r.ttHeight/2+c>a.globals.gridHeight&&(c=a.globals.gridHeight-r.ttHeight+a.globals.translateY);isNaN(l)||(l+=a.globals.translateX,n.style.left=l+"px",n.style.top=c+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),n=0;n0&&(c.setAttribute("r",o),c.setAttribute("cx",i),c.setAttribute("cy",a)),this.moveXCrosshairs(i),n.fixedTooltip||this.moveTooltip(i,a,o)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,a=i.w,s=0,n=0,r=a.globals.pointsArray;e=new I(this.ctx).getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var o=i.tooltipUtil.getHoverMarkerSize(e);r[e]&&(s=r[e][t][0],n=r[e][t][1]);var l=i.tooltipUtil.getAllMarkers();if(null!==l)for(var c=0;c0?(l[c]&&l[c].setAttribute("r",o),l[c]&&l[c].setAttribute("cy",h)):l[c]&&l[c].setAttribute("r",0)}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,n||a.globals.gridHeight,o)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,n=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(n=new I(this.ctx).getActiveConfigSeriesIndex("desc")+1);var r=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(n,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(n,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(n,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(n,"'] path[j='").concat(t,"']"));r||"number"!=typeof e||(r=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var o=r?parseFloat(r.getAttribute("cx")):0,l=r?parseFloat(r.getAttribute("cy")):0,c=r?parseFloat(r.getAttribute("barWidth")):0,d=a.getElGrid().getBoundingClientRect(),h=r&&(r.classList.contains("apexcharts-candlestick-area")||r.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(r&&!h&&(o-=s%2!=0?c/2:0),r&&h&&i.globals.comboCharts&&(o-=c/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[t-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[t]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?l-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=a.e.clientY-d.top-a.tooltipRect.ttHeight/2:l+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),t}(),vt=function(){function t(e){n(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new gt(e)}return o(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new w(this.ctx),i=new R(this.ctx),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=g(a),t.config.chart.stacked&&a.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w;"bubble"!==s.config.chart.type&&this.newPointSize(t,e);var n=e.getAttribute("cx"),r=e.getAttribute("cy");if(null!==i&&null!==a&&(n=i,r=a),this.tooltipPosition.moveXCrosshairs(n),!this.fixedTooltip){if("radar"===s.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();n=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(n,r,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,a=this.ttCtx,s=t,n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),r=e.config.markers.hover.size,o=0;o=0?t[e].setAttribute("r",i):t[e].setAttribute("r",0)}}}]),t}(),mt=function(){function t(e){n(this,t),this.w=e.w;var i=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!i.globals.isBarHorizontal&&"rangeBar"===i.config.chart.type&&i.config.plotOptions.bar.rangeBarGroupRows}return o(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,s=t.y,n=t.type,r=this.ttCtx,o=this.w;if(e.target.classList.contains("apexcharts-".concat(n,"-rect"))){var l=this.getAttr(e,"i"),c=this.getAttr(e,"j"),d=this.getAttr(e,"cx"),h=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),f=this.getAttr(e,"height");if(r.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:c,shared:!1,e:e}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=c,a=d+r.tooltipRect.ttWidth/2+u,s=h+r.tooltipRect.ttHeight/2-f/2,r.tooltipPosition.moveXCrosshairs(d+u/2),a>o.globals.gridWidth/2&&(a=d-r.tooltipRect.ttWidth/2+u),r.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-p.left-(a>o.globals.gridWidth/2?r.tooltipRect.ttWidth:0),s=o.globals.clientY-p.top-(s>o.globals.gridHeight/2?r.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(t){var e,i,a=t.e,s=t.opt,n=t.x,r=t.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var c=parseInt(s.paths.getAttribute("cx"),10),d=parseInt(s.paths.getAttribute("cy"),10),h=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),e=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=b.findAncestor(s.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,e,i),o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=i,n=c,r=d+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var f=l.getElGrid().getBoundingClientRect();r=l.e.clientY+o.globals.translateY-f.top}h<0&&(r=d),l.marker.enlargeCurrentPoint(i,s.paths,n,r)}return{x:n,y:r}}},{key:"handleBarTooltip",value:function(t){var e,i,a=t.e,s=t.opt,n=this.w,r=this.ttCtx,o=r.getElTooltip(),l=0,c=0,d=0,h=this.getBarTooltipXY({e:a,opt:s});e=h.i;var u=h.barHeight,f=h.j;n.globals.capturedSeriesIndex=e,n.globals.capturedDataPointIndex=f,n.globals.isBarHorizontal&&r.tooltipUtil.hasBars()||!n.config.tooltip.shared?(c=h.x,d=h.y,i=Array.isArray(n.config.stroke.width)?n.config.stroke.width[e]:n.config.stroke.width,l=c):n.globals.comboCharts||n.config.tooltip.shared||(l/=2),isNaN(d)&&(d=n.globals.svgHeight-r.tooltipRect.ttHeight);var p=parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),g=n.globals.isMultipleYAxis?n.config.yaxis[p]&&n.config.yaxis[p].reversed:n.config.yaxis[0].reversed;if(c+r.tooltipRect.ttWidth>n.globals.gridWidth&&!g?c-=r.tooltipRect.ttWidth:c<0&&(c=0),r.w.config.tooltip.followCursor){var v=r.getElGrid().getBoundingClientRect();d=r.e.clientY-v.top}null===r.tooltip&&(r.tooltip=n.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),n.config.tooltip.shared||(n.globals.comboBarCount>0?r.tooltipPosition.moveXCrosshairs(l+i/2):r.tooltipPosition.moveXCrosshairs(l)),!r.fixedTooltip&&(!n.config.tooltip.shared||n.globals.isBarHorizontal&&r.tooltipUtil.hasBars())&&(g&&(c-=r.tooltipRect.ttWidth)<0&&(c=0),!g||n.globals.isBarHorizontal&&r.tooltipUtil.hasBars()||(d=d+u-2*(n.globals.series[e][f]<0?u:0)),d=d+n.globals.translateY-r.tooltipRect.ttHeight/2,o.style.left=c+n.globals.translateX+"px",o.style.top=d+"px")}},{key:"getBarTooltipXY",value:function(t){var e=this,i=t.e,a=t.opt,s=this.w,n=null,r=this.ttCtx,o=0,l=0,c=0,d=0,h=0,u=i.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){var f=i.target,p=f.getBoundingClientRect(),g=a.elGrid.getBoundingClientRect(),v=p.height;h=p.height;var m=p.width,b=parseInt(f.getAttribute("cx"),10),x=parseInt(f.getAttribute("cy"),10);d=parseFloat(f.getAttribute("barWidth"));var y="touchmove"===i.type?i.touches[0].clientX:i.clientX;n=parseInt(f.getAttribute("j"),10),o=parseInt(f.parentNode.getAttribute("rel"),10)-1;var w=f.getAttribute("data-range-y1"),A=f.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(f.parentNode.getAttribute("data:realIndex"),10));var P=function(t){return s.globals.isXNumeric?b-m/2:e.isVerticalGroupedRangeBar?b+m/2:b-r.dataPointsDividedWidth+m/2},z=function(){return x-r.dataPointsDividedHeight+v/2-r.tooltipRect.ttHeight/2};r.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:n,y1:w?parseInt(w,10):null,y2:A?parseInt(A,10):null,shared:!r.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(l=y-g.left+15,c=z()):(l=P(),c=i.clientY-g.top-r.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((l=b)0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var a=this.ttCtx,s=this.w,n=s.globals,r=n.seriesYAxisMap[t];if(a.yaxisTooltips[t]&&r.length>0){var o=n.yLabelFormatters[t],l=a.getElGrid().getBoundingClientRect(),c=r[0];i.yRatio.length>1&&function(t){throw new TypeError('"translationsIndex" is read-only')}();var d=(e-l.top)*i.yRatio[0],h=n.maxYArr[c]-n.minYArr[c],u=n.minYArr[c]+(h-d);s.config.yaxis[t].reversed&&(u=n.maxYArr[c]-(h-d)),a.tooltipPosition.moveYCrosshairs(e-l.top),a.yaxisTooltipText[t].innerHTML=o(u),a.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),xt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.tConfig=i.config.tooltip,this.tooltipUtil=new ft(this),this.tooltipLabels=new pt(this),this.tooltipPosition=new gt(this),this.marker=new vt(this),this.intersect=new mt(this),this.axesTooltip=new bt(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=!i.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return o(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.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(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new U(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,a=[],s=this.getElTooltip(),n=function(n){var r=document.createElement("div");r.classList.add("apexcharts-tooltip-series-group"),r.style.order=i.config.tooltip.inverseOrder?t-n:n+1,e.tConfig.shared&&e.tConfig.enabledOnSeries&&Array.isArray(e.tConfig.enabledOnSeries)&&e.tConfig.enabledOnSeries.indexOf(n)<0&&r.classList.add("apexcharts-tooltip-series-group-hidden");var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[n],r.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(a),l.appendChild(e)})),r.appendChild(l),s.appendChild(r),a.push(r)},r=0;r0&&this.addPathsEventListeners(f,d),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(d)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,s=i.height+10,n=this.tConfig.fixed.offsetX,r=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(n=n+t.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(r=r+t.globals.svgHeight-s-10),e.style.left=n+"px",e.style.top=r+"px",{x:n,y:r,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(t){var e=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(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=function(a){var s={paths:t[a],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[a].addEventListener(e,i.onSeriesHover.bind(i,s),{capture:!1,passive:!0})}))},s=0;s=100?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),100-a))}},{key:"seriesHover",value:function(t,e){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||0===s.globals.dataPoints)||(a.length?a.forEach((function(a){var s=i.getElTooltip(a),n={paths:t.paths,tooltipEl:s,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:n,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,a=t.opt,s=t.e,n=e.w,r=this.getElTooltip();r&&(i.tooltipRect={x:0,y:0,ttWidth:r.getBoundingClientRect().width,ttHeight:r.getBoundingClientRect().height},i.e=s,!i.tooltipUtil.hasBars()||n.globals.comboCharts||i.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new I(e).toggleSeriesOnHover(s,s.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),n.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(t){var e,i,a=t.e,s=t.opt,n=this.w,r=s.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,n.globals.capturedSeriesIndex=-1,n.globals.capturedDataPointIndex=-1,lr.top+r.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!n.config.tooltip.shared){var c=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(s)}var d=this.getElTooltip(),h=this.getElXCrosshairs(),u=n.globals.xyCharts||"bar"===n.config.chart.type&&!n.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||n.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(n.globals.collapsedSeries.length+n.globals.ancillaryCollapsedSeries.length===n.globals.series.length)return;null!==h&&h.classList.add("apexcharts-active");var f=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&f.length&&this.ycrosshairs.classList.add("apexcharts-active"),u&&!this.showOnIntersect)this.handleStickyTooltip(a,o,l,s);else if("heatmap"===n.config.chart.type||"treemap"===n.config.chart.type){var p=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:e,y:i,type:n.config.chart.type});e=p.x,i=p.y,d.style.left=e+"px",d.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:e,y:i});if(this.yaxisTooltips.length)for(var g=0;gl.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(t,o,a,r);else if(this.tooltipUtil.isXoverlap(r)||s.globals.isBarHorizontal){var c=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,c,r,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,i,a){var s=this.w;if(this.tConfig.shared||null!==s.globals.series[e][a]){if(void 0!==s.globals.series[e][a])this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,a,i.ttItems):this.create(t,this,e,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var n=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,n,a,i.ttItems)}}else this.handleMouseOut(i)}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new w(this.ctx),i=t.globals.dom.Paper.select(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,z=this.w,X=e;"mouseup"===t.type&&this.markerClick(t,i,s),null===P&&(P=this.tConfig.shared);var L=this.tooltipUtil.hasMarkers(i),C=this.tooltipUtil.getElBars();if(z.config.legend.tooltipHoverFormatter){var O=z.config.legend.tooltipHoverFormatter,T=Array.from(this.legendLabels);T.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var k=0;k0?X.marker.enlargePoints(s):X.tooltipPosition.moveDynamicPointsOnHover(s);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(C),this.barSeriesHeight>0)){var N=new w(this.ctx),B=z.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(s,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(s,i);for(var Z=0;Z0&&a.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=d*z)),P&&(f=f+u.height/2-b/2-2);var L=this.barCtx.series[s][n]<0,C=l;switch(this.barCtx.isReversed&&(C=l+(L?h:-h),l-=h),v.position){case"center":p=P?L?C-h/2+y:C+h/2-y:L?C-h/2+u.height/2+y:C+h/2+u.height/2-y;break;case"bottom":p=P?L?C-h+y:C+h-y:L?C-h+u.height+b+y:C+h-u.height/2+b-y;break;case"top":p=P?L?C+y:C-y:L?C-u.height/2-y:C+u.height+y}if(this.barCtx.lastActiveBarSerieIndex===r&&m.enabled){var O=new w(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:n}),g.fontSize);e=L?C-O.height/2-y-m.offsetY+18:C+O.height+y+m.offsetY-18,i=A+(a.globals.isXNumeric?d*(a.globals.barGroups.length-1)-d/2:-(d*a.globals.barGroups.length-d/2-2*b))+m.offsetX}return a.config.chart.stacked||(p<0?p=0+b:p+u.height/3>a.globals.gridHeight&&(p=a.globals.gridHeight-b)),{bcx:c,bcy:l,dataLabelsX:f,dataLabelsY:p,totalDataLabelsX:i,totalDataLabelsY:e,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,s=t.j,n=t.realIndex,r=t.columnGroupIndex,o=t.bcy,l=t.barHeight,c=t.barWidth,d=t.textRects,h=t.dataLabelsX,u=t.strokeWidth,f=t.dataLabelsConfig,p=t.barDataLabelsConfig,g=t.barTotalDataLabelsConfig,v=t.offX,m=t.offY,b=e.globals.gridHeight/e.globals.dataPoints;c=Math.abs(c);var x,y,A=(o+=r*l)-(this.barCtx.isRangeBar?0:b)+l/2+d.height/2+m-3,P="start",z=this.barCtx.series[a][s]<0,X=i;switch(this.barCtx.isReversed&&(X=i+(z?-c:c),i=e.globals.gridWidth-c,P=z?"start":"end"),p.position){case"center":h=z?X+c/2-v:Math.max(d.width/2,X-c/2)+v;break;case"bottom":h=z?X+c-u-Math.round(d.width/2)-v:X-c+u+Math.round(d.width/2)+v;break;case"top":h=z?X-u+Math.round(d.width/2)-v:X-u-Math.round(d.width/2)+v}if(this.barCtx.lastActiveBarSerieIndex===n&&g.enabled){var L=new w(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:n,j:s}),f.fontSize);z?(x=X-u-v-g.offsetX,P="end"):x=X+v+g.offsetX+(this.barCtx.isReversed?-(c+u):u),y=A-d.height/2+L.height/2+g.offsetY+u}return e.config.chart.stacked||(h<0?h=h+d.width+u:h+d.width/2>e.globals.gridWidth&&(h=e.globals.gridWidth-d.width-u)),{bcx:i,bcy:o,dataLabelsX:h,dataLabelsY:A,totalDataLabelsX:x,totalDataLabelsY:y,totalDataLabelsAnchor:P}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,s=t.val,n=t.i,r=t.j,o=t.textRects,l=t.barHeight,c=t.barWidth,d=t.dataLabelsConfig,h=this.w,u="rotate(0)";"vertical"===h.config.plotOptions.bar.dataLabels.orientation&&(u="rotate(-90, ".concat(e,", ").concat(i,")"));var f=new V(this.barCtx.ctx),p=new w(this.barCtx.ctx),g=d.formatter,v=null,m=h.globals.collapsedSeriesIndices.indexOf(n)>-1;if(d.enabled&&!m){v=p.group({class:"apexcharts-data-labels",transform:u});var b="";void 0!==s&&(b=g(s,a(a({},h),{},{seriesIndex:n,dataPointIndex:r,w:h}))),!s&&h.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(b="");var x=h.globals.series[n][r]<0,y=h.config.plotOptions.bar.dataLabels.position;"vertical"===h.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(d.textAnchor=x?"end":"start"),"center"===y&&(d.textAnchor="middle"),"bottom"===y&&(d.textAnchor=x?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&cMath.abs(c)&&(b=""):o.height/1.6>Math.abs(l)&&(b=""));var A=a({},d);this.barCtx.isHorizontal&&s<0&&("start"===d.textAnchor?A.textAnchor="end":"end"===d.textAnchor&&(A.textAnchor="start")),f.plotDataLabelsText({x:e,y:i,text:b,i:n,j:r,parent:v,dataLabelsConfig:A,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return v}},{key:"drawTotalDataLabels",value:function(t){var e,i=t.x,a=t.y,s=t.val,n=t.barWidth,r=t.barHeight,o=t.realIndex,l=t.textAnchor,c=t.barTotalDataLabelsConfig,d=this.w,h=new w(this.barCtx.ctx);return c.enabled&&void 0!==i&&void 0!==a&&this.barCtx.lastActiveBarSerieIndex===o&&(e=h.drawText({x:i-(!d.globals.isBarHorizontal&&d.globals.barGroups.length?n*(d.globals.barGroups.length-1)/2:0),y:a-(d.globals.isBarHorizontal&&d.globals.barGroups.length?r*(d.globals.barGroups.length-1)/2:0),foreColor:c.style.color,text:s,textAnchor:l,fontFamily:c.style.fontFamily,fontSize:c.style.fontSize,fontWeight:c.style.fontWeight})),e}}]),t}(),wt=function(){function t(e){n(this,t),this.w=e.w,this.barCtx=e}return o(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,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+=t[i].length),e.globals.isXNumeric)for(var a=0;ae.globals.minX&&e.globals.seriesX[i][a]0&&(a=l.globals.minXDiff/h),(n=a/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(n=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(n=parseInt(this.barCtx.barOptions.columnWidth,10)),r=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(a-n*this.barCtx.seriesLen)/2}return l.globals.barHeight=s,l.globals.barWidth=n,{x:t,y:e,yDivision:i,xDivision:a,barHeight:s,barWidth:n,zeroH:r,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,i,a){var s,n,r,o,l=this.w,c=new j(this.barCtx.ctx),d=null,h=this.barCtx.barOptions.distributed?i:e;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){t[e][i]>=a.from&&t[e][i]<=a.to&&(d=a.color)})),l.config.series[e].data[i]&&l.config.series[e].data[i].fillColor&&(d=l.config.series[e].data[i].fillColor),c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?h:a,dataPointIndex:i,color:d,value:t[e][i],fillConfig:null===(s=l.config.series[e].data[i])||void 0===s?void 0:s.fill,fillType:null!==(n=l.config.series[e].data[i])&&void 0!==n&&null!==(r=n.fill)&&void 0!==r&&r.type?null===(o=l.config.series[e].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[e]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,i){var a=0,s=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"shouldApplyRadius",value:function(t){var e=this.w,i=!1;return e.config.plotOptions.bar.borderRadius>0&&(e.config.chart.stacked&&"last"===e.config.plotOptions.bar.borderRadiusWhenStacked?this.barCtx.lastActiveBarSerieIndex===t&&(i=!0):i=!0),i}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,a=t.x1,s=t.x2,n=t.y1,r=t.y2,o=t.elSeries,l=this.w,c=new w(this.barCtx.ctx),d=new I(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&d===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var h=this.barCtx.barOptions.colors.backgroundBarColors[e],u=c.drawRect(void 0!==a?a:0,void 0!==n?n:0,void 0!==s?s:l.globals.gridWidth,void 0!==r?r:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,h,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,i=t.barWidth,a=t.barXPosition,s=t.y1,n=t.y2,r=t.strokeWidth,o=t.seriesGroup,l=t.realIndex,c=t.i,d=t.j,h=t.w,u=new w(this.barCtx.ctx);(r=Array.isArray(r)?r[l]:r)||(r=0);var f=i,p=a;null!==(e=h.config.series[l].data[d])&&void 0!==e&&e.columnWidthOffset&&(p=a-h.config.series[l].data[d].columnWidthOffset/2,f=i+h.config.series[l].data[d].columnWidthOffset);var g=r/2,v=p+g,m=p+f-g;s+=.001-g,n+=.001+g;var b=u.move(v,s),x=u.move(v,s),y=u.line(m,s);if(h.globals.previousPaths.length>0&&(x=this.barCtx.getPreviousPath(l,d,!1)),b=b+u.line(v,n)+u.line(m,n)+u.line(m,s)+("around"===h.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),x=x+u.line(v,s)+y+y+y+y+y+u.line(v,s)+("around"===h.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),this.shouldApplyRadius(l)&&(b=u.roundPathCorners(b,h.config.plotOptions.bar.borderRadius)),h.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[o]).yArrj.push(n-g),A.yArrjF.push(Math.abs(s-n+r)),A.yArrjVal.push(this.barCtx.series[c][d])}return{pathTo:b,pathFrom:x}}},{key:"getBarpaths",value:function(t){var e,i=t.barYPosition,a=t.barHeight,s=t.x1,n=t.x2,r=t.strokeWidth,o=t.seriesGroup,l=t.realIndex,c=t.i,d=t.j,h=t.w,u=new w(this.barCtx.ctx);(r=Array.isArray(r)?r[l]:r)||(r=0);var f=i,p=a;null!==(e=h.config.series[l].data[d])&&void 0!==e&&e.barHeightOffset&&(f=i-h.config.series[l].data[d].barHeightOffset/2,p=a+h.config.series[l].data[d].barHeightOffset);var g=r/2,v=f+g,m=f+p-g;s+=.001-g,n+=.001+g;var b=u.move(s,v),x=u.move(s,v);h.globals.previousPaths.length>0&&(x=this.barCtx.getPreviousPath(l,d,!1));var y=u.line(s,m);if(b=b+u.line(n,v)+u.line(n,m)+y+("around"===h.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),x=x+u.line(s,v)+y+y+y+y+y+u.line(s,v)+("around"===h.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),this.shouldApplyRadius(l)&&(b=u.roundPathCorners(b,h.config.plotOptions.bar.borderRadius)),h.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[o]).xArrj.push(n+g),A.xArrjF.push(Math.abs(s-n)),A.xArrjVal.push(this.barCtx.series[c][d])}return{pathTo:b,pathFrom:x}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a2&&void 0!==arguments[2]&&!arguments[2]?null:e;return null!=t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?null:e;return null!=t&&(a=e-t/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(t,e,i,s,n,r){var o=this,c=this.w,d=[],h=function(a,s){var n;d.push((l(n={},t,"x"===t?o.getXForValue(a,e,!1):o.getYForValue(a,i,r,!1)),l(n,"attrs",s),n))};if(c.globals.seriesGoals[s]&&c.globals.seriesGoals[s][n]&&Array.isArray(c.globals.seriesGoals[s][n])&&c.globals.seriesGoals[s][n].forEach((function(t){h(t.value,t)})),this.barCtx.barOptions.isDumbbell&&c.globals.seriesRange.length){var u=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:c.globals.colors,f={strokeHeight:"x"===t?0:c.globals.markers.size[s],strokeWidth:"x"===t?c.globals.markers.size[s]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(u[s])?u[s][0]:u[s]};h(c.globals.seriesRangeStart[s][n],f),h(c.globals.seriesRangeEnd[s][n],a(a({},f),{},{strokeColor:Array.isArray(u[s])?u[s][1]:u[s]}))}return d}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,a=t.goalX,s=t.goalY,n=t.barWidth,r=t.barHeight,o=new w(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var c=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(t){if(t.x>=-1&&t.x<=o.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:r/2,a=i+e+r/2;c=o.drawLine(t.x,a-2*e,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(c)}})):Array.isArray(s)&&s.forEach((function(t){if(t.y>=-1&&t.y<=o.w.globals.gridHeight+1){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:n/2,a=e+i+n/2;c=o.drawLine(a-2*i,t.y,a,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(c)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,i=t.currPaths,a=t.color,s=this.w,n=e.x,r=e.x1,o=e.barYPosition,l=i.x,c=i.x1,d=i.barYPosition,h=o+i.barHeight,u=new w(this.barCtx.ctx),f=new b,p=u.move(r,h)+u.line(n,h)+u.line(l,d)+u.line(c,d)+u.line(r,h)+("around"===s.config.plotOptions.bar.borderRadiusApplication?" Z":" z");return u.drawPath({d:p,fill:f.shadeColor(.5,b.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadows"})}},{key:"getZeroValueEncounters",value:function(t){var e,i=t.i,a=t.j,s=this.w,n=0,r=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map((function(t,e){return e})):(null===(e=s.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=s.globals.seriesPercent[t][a];e&&n++,t-1})),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),t}(),At=function(){function t(e,i){n(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.barOptions=a.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=a.config.stroke.width,this.isNullValue=!1,this.isRangeBar=a.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!a.globals.isBarHorizontal&&a.globals.seriesRange.length&&a.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=i,null!==this.xyRatios&&(this.xRatio=i.xRatio,this.yRatio=i.yRatio,this.invertedXRatio=i.invertedXRatio,this.invertedYRatio=i.invertedYRatio,this.baseLineY=i.baseLineY,this.baseLineInvertedY=i.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var s=new I(this.ctx);this.lastActiveBarSerieIndex=s.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var r=s.getBarSeriesIndices(),o=new A(this.ctx);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map((function(t,e){return-1===r.indexOf(e)?e:-1})).filter((function(t){return-1!==t}))),this.barHelpers=new wt(this)}return o(t,[{key:"draw",value:function(t,e){var i=this.w,s=new w(this.ctx),n=new A(this.ctx,i);t=n.getLogSeries(t),this.series=t,this.yRatio=n.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var r=s.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 o=0,l=0;o0&&(this.visibleI=this.visibleI+1);var P=0,z=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[m],this.translationsIndex=m);var X=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var L=this.barHelpers.initialPositions();p=L.y,P=L.barHeight,d=L.yDivision,u=L.zeroW,f=L.x,z=L.barWidth,c=L.xDivision,h=L.zeroH,this.horizontal||v.push(f+z/2);var C=s.group({class:"apexcharts-datalabels","data:realIndex":m});i.globals.delayedElements.push({el:C.node}),C.node.classList.add("apexcharts-element-hidden");var O=s.group({class:"apexcharts-bar-goals-markers"}),T=s.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:T.node}),T.node.classList.add("apexcharts-element-hidden");for(var k=0;k0){var W=this.barHelpers.drawBarShadow({color:"string"==typeof D&&-1===(null==D?void 0:D.indexOf("url"))?D:b.hexToRgba(i.globals.colors[o]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:H});W&&T.add(W)}this.pathArr.push(H);var N=this.barHelpers.drawGoalLine({barXPosition:H.barXPosition,barYPosition:H.barYPosition,goalX:H.goalX,goalY:H.goalY,barHeight:P,barWidth:z});N&&O.add(N),p=H.y,f=H.x,k>0&&v.push(f+z/2),g.push(p),this.renderSeries({realIndex:m,pathFill:D,j:k,i:o,columnGroupIndex:x,pathFrom:H.pathFrom,pathTo:H.pathTo,strokeWidth:S,elSeries:y,x:f,y:p,series:t,barHeight:H.barHeight?H.barHeight:P,barWidth:H.barWidth?H.barWidth:z,elDataLabelsWrap:C,elGoalsMarkers:O,elBarShadows:T,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[m]=v,i.globals.seriesYvalues[m]=g,r.add(y)}return r}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,s=t.j,n=t.i,r=t.columnGroupIndex,o=t.pathFrom,l=t.pathTo,c=t.strokeWidth,d=t.elSeries,h=t.x,u=t.y,f=t.y1,p=t.y2,g=t.series,v=t.barHeight,m=t.barWidth,b=t.barXPosition,x=t.barYPosition,A=t.elDataLabelsWrap,P=t.elGoalsMarkers,z=t.elBarShadows,X=t.visibleSeries,L=t.type,C=this.w,O=new w(this.ctx);if(!a){var T="function"==typeof C.globals.stroke.colors[e]?function(t){var e,i=C.config.stroke.colors;return Array.isArray(i)&&i.length>0&&((e=i[t])||(e=""),"function"==typeof e)?e({value:C.globals.series[t][s],dataPointIndex:s,w:C}):e}(e):C.globals.stroke.colors[e];a=this.barOptions.distributed?C.globals.stroke.colors[s]:T}C.config.series[n].data[s]&&C.config.series[n].data[s].strokeColor&&(a=C.config.series[n].data[s].strokeColor),this.isNullValue&&(i="none");var k=s/C.config.chart.animations.animateGradually.delay*(C.config.chart.animations.speed/C.globals.dataPoints)/2.4,S=O.renderPaths({i:n,j:s,realIndex:e,pathFrom:o,pathTo:l,stroke:a,strokeWidth:c,strokeLineCap:C.config.stroke.lineCap,fill:i,animationDelay:k,initialSpeed:C.config.chart.animations.speed,dataChangeSpeed:C.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(L,"-area")});S.attr("clip-path","url(#gridRectMask".concat(C.globals.cuid,")"));var H=C.config.forecastDataPoints;H.count>0&&s>=C.globals.dataPoints-H.count&&(S.node.setAttribute("stroke-dasharray",H.dashArray),S.node.setAttribute("stroke-width",H.strokeWidth),S.node.setAttribute("fill-opacity",H.fillOpacity)),void 0!==f&&void 0!==p&&(S.attr("data-range-y1",f),S.attr("data-range-y2",p)),new y(this.ctx).setSelectionFilter(S,e,s),d.add(S);var M=new yt(this).handleBarDataLabels({x:h,y:u,y1:f,y2:p,i:n,j:s,series:g,realIndex:e,columnGroupIndex:r,barHeight:v,barWidth:m,barXPosition:b,barYPosition:x,renderedPath:S,visibleSeries:X});return null!==M.dataLabels&&A.add(M.dataLabels),M.totalDataLabels&&A.add(M.totalDataLabels),d.add(A),P&&d.add(P),z&&d.add(z),d}},{key:"drawBarPaths",value:function(t){var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,n=t.zeroW,r=t.x,o=t.y,l=t.yDivision,c=t.elSeries,d=this.w,h=i.i,u=i.j;if(d.globals.isXNumeric)e=(o=(d.globals.seriesX[h][u]-d.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var f=0,p=0;d.globals.seriesPercent.forEach((function(t,e){t[u]&&f++,e0&&(a=this.seriesLen*a/f),e=o+a*this.visibleI,e-=a*p}else e=o+a*this.visibleI;this.isFunnel&&(n-=(this.barHelpers.getXForValue(this.series[h][u],n)-n)/2),r=this.barHelpers.getXForValue(this.series[h][u],n);var g=this.barHelpers.getBarpaths({barYPosition:e,barHeight:a,x1:n,x2:r,strokeWidth:s,series:this.series,realIndex:i.realIndex,i:h,j:u,w:d});return d.globals.isXNumeric||(o+=l),this.barHelpers.barBackground({j:u,i:h,y1:e-a*this.visibleI,y2:a*this.seriesLen,elSeries:c}),{pathTo:g.pathTo,pathFrom:g.pathFrom,x1:n,x:r,y:o,goalX:this.barHelpers.getGoalValues("x",n,null,h,u),barYPosition:e,barHeight:a}}},{key:"drawColumnPaths",value:function(t){var e,i=t.indexes,a=t.x,s=t.y,n=t.xDivision,r=t.barWidth,o=t.zeroH,l=t.strokeWidth,c=t.elSeries,d=this.w,h=i.realIndex,u=i.translationsIndex,f=i.i,p=i.j,g=i.bc;if(d.globals.isXNumeric){var v=this.getBarXForNumericXAxis({x:a,j:p,realIndex:h,barWidth:r});a=v.x,e=v.barXPosition}else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var m=this.barHelpers.getZeroValueEncounters({i:f,j:p}),b=m.nonZeroColumns,x=m.zeroEncounters;b>0&&(r=this.seriesLen*r/b),e=a+r*this.visibleI,e-=r*x}else e=a+r*this.visibleI;s=this.barHelpers.getYForValue(this.series[f][p],o,u);var y=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:r,y1:o,y2:s,strokeWidth:l,series:this.series,realIndex:h,i:f,j:p,w:d});return d.globals.isXNumeric||(a+=n),this.barHelpers.barBackground({bc:g,j:p,i:f,x1:e-l/2-r*this.visibleI,x2:r*this.seriesLen+l/2,elSeries:c}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,f,p,u),barXPosition:e,barWidth:r}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,i=t.barWidth,a=t.realIndex,s=t.j,n=this.w,r=a;return n.globals.seriesX[a].length||(r=n.globals.maxValsInArrayIndex),n.globals.seriesX[r][s]&&(e=(n.globals.seriesX[r][s]-n.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:e+i*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var i,a=this.w,s=0;s0&&parseInt(n.realIndex,10)===parseInt(t,10)&&void 0!==a.globals.previousPaths[s].paths[e]&&(i=a.globals.previousPaths[s].paths[e].d)}return i}}]),t}(),Pt=function(t){c(i,At);var e=f(i);function i(){return n(this,i),e.apply(this,arguments)}return o(i,[{key:"draw",value:function(t,e){var i=this,s=this.w;this.graphics=new w(this.ctx),this.bar=new At(this.ctx,this.xyRatios);var n=new A(this.ctx,s);t=n.getLogSeries(t),this.yRatio=n.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===s.config.chart.stackType&&(t=s.globals.comboCharts?e.map((function(t){return s.globals.seriesPercent[t]})):s.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);for(var r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),o=0,l=0,c=function(n,c){var d=void 0,h=void 0,u=void 0,f=void 0,p=s.globals.comboCharts?e[n]:n,g=i.barHelpers.getGroupIndex(p),v=g.groupIndex,m=g.columnGroupIndex;i.groupCtx=i[s.globals.seriesGroups[v]];var x=[],y=[],w=0;i.yRatio.length>1&&(i.yaxisIndex=s.globals.seriesYAxisReverseMap[p][0],w=p),i.isReversed=s.config.yaxis[i.yaxisIndex]&&s.config.yaxis[i.yaxisIndex].reversed;var A=i.graphics.group({class:"apexcharts-series",seriesName:b.escapeString(s.globals.seriesNames[p]),rel:n+1,"data:realIndex":p});i.ctx.series.addCollapsedClassToSeries(A,p);var P=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),z=i.graphics.group({class:"apexcharts-bar-goals-markers"}),X=0,L=0,C=i.initialPositions(o,l,d,h,u,f,w);l=C.y,X=C.barHeight,h=C.yDivision,f=C.zeroW,o=C.x,L=C.barWidth,d=C.xDivision,u=C.zeroH,s.globals.barHeight=X,s.globals.barWidth=L,i.barHelpers.initializeStackedXYVars(i),1===i.groupCtx.prevY.length&&i.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(i.groupCtx.prevY[0]=i.groupCtx.prevY[0].map((function(){return u})),i.groupCtx.prevYF[0]=i.groupCtx.prevYF[0].map((function(){return 0})));for(var O=0;O1?l=(i=c.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(h).indexOf("%")?l=parseInt(h,10):l*=parseInt(h,10)/100,s=c.globals.gridHeight-this.baseLineY[r]-(this.isReversed?c.globals.gridHeight:0),t=c.globals.padHorizontal+(i-l)/2}var u=c.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:i,barHeight:o/u,barWidth:l/u,zeroH:s,zeroW:n}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,n=t.zeroW,r=t.x,o=t.y,l=t.columnGroupIndex,c=t.seriesGroup,d=t.yDivision,h=t.elSeries,u=this.w,f=o+l*a,p=i.i,g=i.j,v=i.realIndex,m=i.translationsIndex,b=0,x=0;x0){var w=n;this.groupCtx.prevXVal[y-1][g]<0?w=this.series[p][g]>=0?this.groupCtx.prevX[y-1][g]+b-2*(this.isReversed?b:0):this.groupCtx.prevX[y-1][g]:this.groupCtx.prevXVal[y-1][g]>=0&&(w=this.series[p][g]>=0?this.groupCtx.prevX[y-1][g]:this.groupCtx.prevX[y-1][g]-b+2*(this.isReversed?b:0)),e=w}else e=n;r=null===this.series[p][g]?e:e+this.series[p][g]/this.invertedYRatio-2*(this.isReversed?this.series[p][g]/this.invertedYRatio:0);var A=this.barHelpers.getBarpaths({barYPosition:f,barHeight:a,x1:e,x2:r,strokeWidth:s,series:this.series,realIndex:i.realIndex,seriesGroup:c,i:p,j:g,w:u});return this.barHelpers.barBackground({j:g,i:p,y1:f,y2:a,elSeries:h}),o+=d,{pathTo:A.pathTo,pathFrom:A.pathFrom,goalX:this.barHelpers.getGoalValues("x",n,null,p,g,m),barXPosition:e,barYPosition:f,x:r,y:o}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,n=t.barWidth,r=t.zeroH,o=t.columnGroupIndex,l=t.seriesGroup,c=t.elSeries,d=this.w,h=e.i,u=e.j,f=e.bc,p=e.realIndex,g=e.translationsIndex;if(d.globals.isXNumeric){var v=d.globals.seriesX[p][u];v||(v=0),i=(v-d.globals.minX)/this.xRatio-n/2*d.globals.barGroups.length}for(var m,b=i+o*n,x=0,y=0;y0&&!d.globals.isXNumeric||w>0&&d.globals.isXNumeric&&d.globals.seriesX[p-1][u]===d.globals.seriesX[p][u]){var A,P,z,X=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var L=1;L=0?z-x+2*(this.isReversed?x:0):z;break}if((null===(k=this.groupCtx.prevYVal[w-O])||void 0===k?void 0:k[u])>=0){P=this.series[h][u]>=0?z:z+x-2*(this.isReversed?x:0);break}}void 0===P&&(P=d.globals.gridHeight),m=null!==(A=this.groupCtx.prevYF[0])&&void 0!==A&&A.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?r:P}else m=r;a=this.series[h][u]?m-this.series[h][u]/this.yRatio[g]+2*(this.isReversed?this.series[h][u]/this.yRatio[g]:0):m;var S=this.barHelpers.getColumnPaths({barXPosition:b,barWidth:n,y1:m,y2:a,yRatio:this.yRatio[g],strokeWidth:this.strokeWidth,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:h,j:u,w:d});return this.barHelpers.barBackground({bc:f,j:u,i:h,x1:b,x2:n,elSeries:c}),i+=s,{pathTo:S.pathTo,pathFrom:S.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,r,h,u),barXPosition:b,x:d.globals.isXNumeric?i-s:i,y:a}}}]),i}(),zt=function(t){c(i,At);var e=f(i);function i(){return n(this,i),e.apply(this,arguments)}return o(i,[{key:"draw",value:function(t,e,i){var s=this,n=this.w,r=new w(this.ctx),o=n.globals.comboCharts?e:n.config.chart.type,l=new j(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 A(this.ctx,n);t=c.getLogSeries(t),this.series=t,this.yRatio=c.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var d=r.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),h=function(e){s.isBoxPlot="boxPlot"===n.config.chart.type||"boxPlot"===n.config.series[e].type;var o,c,h,u,f=void 0,p=void 0,g=[],v=[],m=n.globals.comboCharts?i[e]:e,x=s.barHelpers.getGroupIndex(m).columnGroupIndex,y=r.group({class:"apexcharts-series",seriesName:b.escapeString(n.globals.seriesNames[m]),rel:e+1,"data:realIndex":m});s.ctx.series.addCollapsedClassToSeries(y,m),t[e].length>0&&(s.visibleI=s.visibleI+1);var w,A,P=0;s.yRatio.length>1&&(s.yaxisIndex=n.globals.seriesYAxisReverseMap[m][0],P=m);var z=s.barHelpers.initialPositions();p=z.y,w=z.barHeight,c=z.yDivision,u=z.zeroW,f=z.x,A=z.barWidth,o=z.xDivision,h=z.zeroH,v.push(f+A/2);for(var X=r.group({class:"apexcharts-datalabels","data:realIndex":m}),L=function(i){var r=s.barHelpers.getStrokeWidth(e,i,m),d=null,b={indexes:{i:e,j:i,realIndex:m,translationsIndex:P},x:f,y:p,strokeWidth:r,elSeries:y};d=s.isHorizontal?s.drawHorizontalBoxPaths(a(a({},b),{},{yDivision:c,barHeight:w,zeroW:u})):s.drawVerticalBoxPaths(a(a({},b),{},{xDivision:o,barWidth:A,zeroH:h})),p=d.y,f=d.x,i>0&&v.push(f+A/2),g.push(p),d.pathTo.forEach((function(a,o){var c=!s.isBoxPlot&&s.candlestickOptions.wick.useFillColor?d.color[o]:n.globals.stroke.colors[e],h=l.fillPath({seriesNumber:m,dataPointIndex:i,color:d.color[o],value:t[e][i]});s.renderSeries({realIndex:m,pathFill:h,lineFill:c,j:i,i:e,pathFrom:d.pathFrom,pathTo:a,strokeWidth:r,elSeries:y,x:f,y:p,series:t,columnGroupIndex:x,barHeight:w,barWidth:A,elDataLabelsWrap:X,visibleSeries:s.visibleI,type:n.config.chart.type})}))},C=0;Cm.c&&(h=!1);var y=Math.min(m.o,m.c),A=Math.max(m.o,m.c),P=m.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[v][d]-o.globals.minX)/this.xRatio-s/2);var z=i+s*this.visibleI;void 0===this.series[c][d]||null===this.series[c][d]?(y=n,A=n):(y=n-y/g,A=n-A/g,b=n-m.h/g,x=n-m.l/g,P=n-m.m/g);var X=l.move(z,n),L=l.move(z+s/2,y);return o.globals.previousPaths.length>0&&(L=this.getPreviousPath(v,d,!0)),X=this.isBoxPlot?[l.move(z,y)+l.line(z+s/2,y)+l.line(z+s/2,b)+l.line(z+s/4,b)+l.line(z+s-s/4,b)+l.line(z+s/2,b)+l.line(z+s/2,y)+l.line(z+s,y)+l.line(z+s,P)+l.line(z,P)+l.line(z,y+r/2),l.move(z,P)+l.line(z+s,P)+l.line(z+s,A)+l.line(z+s/2,A)+l.line(z+s/2,x)+l.line(z+s-s/4,x)+l.line(z+s/4,x)+l.line(z+s/2,x)+l.line(z+s/2,A)+l.line(z,A)+l.line(z,P)+"z"]:[l.move(z,A)+l.line(z+s/2,A)+l.line(z+s/2,b)+l.line(z+s/2,A)+l.line(z+s,A)+l.line(z+s,y)+l.line(z+s/2,y)+l.line(z+s/2,x)+l.line(z+s/2,y)+l.line(z,y)+l.line(z,A-r/2)],L+=l.move(z,y),o.globals.isXNumeric||(i+=a),{pathTo:X,pathFrom:L,x:i,y:A,barXPosition:z,color:this.isBoxPlot?p:h?[u]:[f]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,a=t.yDivision,s=t.barHeight,n=t.zeroW,r=t.strokeWidth,o=this.w,l=new w(this.ctx),c=e.i,d=e.j,h=this.boxOptions.colors.lower;this.isBoxPlot&&(h=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,f=e.realIndex,p=this.getOHLCValue(f,d),g=n,v=n,m=Math.min(p.o,p.c),b=Math.max(p.o,p.c),x=p.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[f][d]-o.globals.minX)/this.invertedXRatio-s/2);var y=i+s*this.visibleI;void 0===this.series[c][d]||null===this.series[c][d]?(m=n,b=n):(m=n+m/u,b=n+b/u,g=n+p.h/u,v=n+p.l/u,x=n+p.m/u);var A=l.move(n,y),P=l.move(m,y+s/2);return o.globals.previousPaths.length>0&&(P=this.getPreviousPath(f,d,!0)),A=[l.move(m,y)+l.line(m,y+s/2)+l.line(g,y+s/2)+l.line(g,y+s/2-s/4)+l.line(g,y+s/2+s/4)+l.line(g,y+s/2)+l.line(m,y+s/2)+l.line(m,y+s)+l.line(x,y+s)+l.line(x,y)+l.line(m+r/2,y),l.move(x,y)+l.line(x,y+s)+l.line(b,y+s)+l.line(b,y+s/2)+l.line(v,y+s/2)+l.line(v,y+s-s/4)+l.line(v,y+s/4)+l.line(v,y+s/2)+l.line(b,y+s/2)+l.line(b,y)+l.line(x,y)+"z"],P+=l.move(m,y),o.globals.isXNumeric||(i+=a),{pathTo:A,pathFrom:P,x:b,y:i,barYPosition:y,color:h}}},{key:"getOHLCValue",value:function(t,e){var i=this.w;return{o:this.isBoxPlot?i.globals.seriesCandleH[t][e]:i.globals.seriesCandleO[t][e],h:this.isBoxPlot?i.globals.seriesCandleO[t][e]:i.globals.seriesCandleH[t][e],m:i.globals.seriesCandleM[t][e],l:this.isBoxPlot?i.globals.seriesCandleC[t][e]:i.globals.seriesCandleL[t][e],c:this.isBoxPlot?i.globals.seriesCandleL[t][e]:i.globals.seriesCandleC[t][e]}}}]),i}(),Xt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,a){var s=this.w,n=1,r=s.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);s.globals.hasNegs||a?n=s.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*r):(1-o.percent/100)*(1.25*r):o.percent<=0?1-(1+o.percent/100)*r:(1-o.percent/100)*r:(n=1-o.percent/100,"treemap"===t&&(n=(1-o.percent/100)*(1.25*r)));var l=o.color,c=new b;return s.config.plotOptions[t].enableShades&&(l="dark"===this.w.config.theme.mode?b.hexToRgba(c.shadeColor(-1*n,o.color),s.config.fill.opacity):b.hexToRgba(c.shadeColor(n,o.color),s.config.fill.opacity)),{color:l,colorProps:o}}},{key:"determineColor",value:function(t,e,i){var a=this.w,s=a.globals.series[e][i],n=a.config.plotOptions[t],r=n.colorScale.inverse?i:e;n.distributed&&"treemap"===a.config.chart.type&&(r=i);var o=a.globals.colors[r],l=null,c=Math.min.apply(Math,g(a.globals.series[e])),d=Math.max.apply(Math,g(a.globals.series[e]));n.distributed||"heatmap"!==t||(c=a.globals.minY,d=a.globals.maxY),void 0!==n.colorScale.min&&(c=n.colorScale.mina.globals.maxY?n.colorScale.max:a.globals.maxY);var h=Math.abs(d)+Math.abs(c),u=100*s/(0===h?h-1e-6:h);return n.colorScale.ranges.length>0&&n.colorScale.ranges.map((function(t,e){if(s>=t.from&&s<=t.to){o=t.color,l=t.foreColor?t.foreColor:null,c=t.from,d=t.to;var i=Math.abs(d)+Math.abs(c);u=100*s/(0===i?i-1e-6:i)}})),{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,a=t.y,s=t.i,n=t.j,r=t.colorProps,o=t.fontSize,l=this.w.config.dataLabels,c=new w(this.ctx),d=new V(this.ctx),h=null;if(l.enabled){h=c.group({class:"apexcharts-data-labels"});var u=l.offsetX,f=l.offsetY,p=i+u,g=a+parseFloat(l.style.fontSize)/3+f;d.plotDataLabelsText({x:p,y:g,text:e,i:s,j:n,color:r.foreColor,parent:h,fontSize:o,dataLabelsConfig:l})}return h}},{key:"addListeners",value:function(t){var e=new w(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),Lt=function(){function t(e,i){n(this,t),this.ctx=e,this.w=e.w,this.xRatio=i.xRatio,this.yRatio=i.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new Xt(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return o(t,[{key:"draw",value:function(t){var e=this.w,i=new w(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var s=e.globals.gridWidth/e.globals.dataPoints,n=e.globals.gridHeight/e.globals.series.length,r=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var c=o?0:l.length-1;o?c=0;o?c++:c--){var d=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:b.escapeString(e.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(d,c),e.config.chart.dropShadow.enabled){var h=e.config.chart.dropShadow;new y(this.ctx).dropShadow(d,h,c)}for(var u=0,f=e.config.plotOptions.heatmap.shadeIntensity,p=0;p-1&&this.pieClicked(h),i.config.dataLabels.enabled){var P=x.x,z=x.y,X=100*f/this.fullAngle+"%";if(0!==f&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(a+r):a+r=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(c=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(c)>this.fullAngle&&(c-=this.fullAngle);var d=Math.PI*(c-90)/180,h=i.centerX+n*Math.cos(l),u=i.centerY+n*Math.sin(l),f=i.centerX+n*Math.cos(d),p=i.centerY+n*Math.sin(d),g=b.polarToCartesian(i.centerX,i.centerY,i.donutSize,c),v=b.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),m=s>180?1:0,x=["M",h,u,"A",n,n,0,m,1,f,p];return e="donut"===i.chartType?[].concat(x,["L",g.x,g.y,"A",i.donutSize,i.donutSize,0,m,0,v.x,v.y,"L",h,u,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(x,["L",i.centerX,i.centerY,"L",h,u]).join(" "):[].concat(x).join(" "),r.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new G(this.ctx),a=new w(this.ctx),s=new Ct(this.ctx),n=a.group(),r=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),c=o.result.length;this.maxY=o.niceMax;for(var d=e.globals.radialSize,h=d/(c-1),u=0;u1&&t.total.show&&(s=t.total.color);var r=n.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=n.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,n),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(n));var l=e===t.total.label;e=t.name.formatter(e,l,n),null!==r&&(r.textContent=e),null!==o&&(o.textContent=i),null!==r&&(r.style.fill=s)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,s,a,t);var n=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==n&&(n.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,a=new w(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(0!==s.strokeWidth){for(var n=[],r=360/i.globals.series.length,o=0;o1)r&&!e.total.showAlways?l({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(e,e.total.label,e.total.formatter(s));else if(l({makeSliceOut:!1,printLabel:!0}),!r)if(s.globals.selectedDataPoints.length&&s.globals.series.length>1)if(s.globals.selectedDataPoints[0].length>0){var c=s.globals.selectedDataPoints[0],d=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(c));this.printDataLabelsInner(d,e)}else n&&s.globals.selectedDataPoints.length&&0===s.globals.selectedDataPoints[0].length&&(n.style.opacity=0);else n&&s.globals.series.length>1&&(n.style.opacity=0)}}]),t}(),Tt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.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.animDur=0;var i=this.w;this.graphics=new w(this.ctx),this.lineColorArr=void 0!==i.globals.stroke.colors?i.globals.stroke.colors:i.globals.colors,this.defaultSize=i.globals.svgHeight0&&(g=e.getPreviousPath(o));for(var v=0;v=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?s-=10:t.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[a].paths[0]&&(i=e.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var a=[],s=0;s=360&&(u=360-Math.abs(this.startAngle)-.1);var f=i.drawPath({d:"",stroke:d,strokeWidth:r*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){var p=c.dropShadow;s.dropShadow(f,p)}l.add(f),f.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(f,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:h,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:e.globals.easing})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new w(this.ctx),a=new j(this.ctx),s=new y(this.ctx),n=i.group(),r=this.getStrokeWidth(t);t.size=t.size-r/2;var o=e.config.plotOptions.radialBar.hollow.background,l=t.size-r*t.series.length-this.margin*t.series.length-r*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,c=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,n,l,o));var d=this.drawHollow({size:c,centerX:t.centerX,centerY:t.centerY,fill:o||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var h=e.config.plotOptions.radialBar.hollow.dropShadow;s.dropShadow(d,h)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var f=null;this.radialDataLabels.show&&(f=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})),"back"===e.config.plotOptions.radialBar.hollow.position&&(n.add(d),f&&n.add(f));var p=!1;e.config.plotOptions.radialBar.inverseOrder&&(p=!0);for(var g=p?t.series.length-1:0;p?g>=0:g100?100:t.series[g])/100,z=Math.round(this.totalAngle*P)+this.startAngle,X=void 0;e.globals.dataChanged&&(A=this.startAngle,X=Math.round(this.totalAngle*b.negToZero(e.globals.previousPaths[g])/100)+A),Math.abs(z)+Math.abs(x)>=360&&(z-=.01),Math.abs(X)+Math.abs(A)>=360&&(X-=.01);var L=z-x,C=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[g]:e.config.stroke.dashArray,O=i.drawPath({d:"",stroke:m,strokeWidth:r,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+g,strokeDashArray:C});if(w.setAttrs(O.node,{"data:angle":L,"data:value":t.series[g]}),e.config.chart.dropShadow.enabled){var T=e.config.chart.dropShadow;s.dropShadow(O,T,g)}if(s.setSelectionFilter(O,0,g),this.addListeners(O,this.radialDataLabels),v.add(O),O.attr({index:0,j:g}),this.barLabels.enabled){var k=b.polarToCartesian(t.centerX,t.centerY,t.size,x),S=this.barLabels.formatter(e.globals.seriesNames[g],{seriesIndex:g,w:e}),H=["apexcharts-radialbar-label"];this.barLabels.onClick||H.push("apexcharts-no-click");var M=this.barLabels.useSeriesColors?e.globals.colors[g]:e.config.chart.foreColor;M||(M=e.config.chart.foreColor);var D=k.x-this.barLabels.margin,W=k.y,N=i.drawText({x:D,y:W,text:S,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:M,cssClass:H.join(" ")});N.on("click",this.onBarLabelClick),N.attr({rel:g+1}),0!==x&&N.attr({"transform-origin":"".concat(D," ").concat(W),transform:"rotate(".concat(x," 0 0)")}),v.add(N)}var B=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(B=e.config.chart.animations.speed),e.globals.dataChanged&&(B=e.config.chart.animations.dynamicAnimation.speed),this.animDur=B/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(O,{centerX:t.centerX,centerY:t.centerY,endAngle:z,startAngle:x,prevEndAngle:X,prevStartAngle:A,size:t.size,i:g,totalItems:2,animBeginArr:this.animBeginArr,dur:B,shouldSetPrevPaths:!0,easing:e.globals.easing})}return{g:n,elHollow:d,dataLabels:f}}},{key:"drawHollow",value:function(t){var e=new w(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,a){var s=this.w,n=new j(this.ctx),r=b.randomId(),o=s.config.plotOptions.radialBar.hollow.image;if(s.config.plotOptions.radialBar.hollow.imageClipped)n.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(s.globals.cuid).concat(r)}),a="url(#pattern".concat(s.globals.cuid).concat(r,")");else{var l=s.config.plotOptions.radialBar.hollow.imageWidth,c=s.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===c){var d=s.globals.dom.Paper.image(o).loaded((function(e){this.move(t.centerX-e.width/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+s.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(d)}else{var h=s.globals.dom.Paper.image(o).loaded((function(e){this.move(t.centerX-l/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-c/2+s.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)}));e.add(h)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,i=this.barLabels.onClick,a=this.w;i&&i(a.globals.seriesNames[e],{w:a,seriesIndex:e})}}]),i}(),St=function(t){c(i,At);var e=f(i);function i(){return n(this,i),e.apply(this,arguments)}return o(i,[{key:"draw",value:function(t,e){var i=this.w,s=new w(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var n=s.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),r=0;r0&&(this.visibleI=this.visibleI+1);var m=0,x=0,y=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[p][0],y=p);var A=this.barHelpers.initialPositions();f=A.y,h=A.zeroW,u=A.x,x=A.barWidth,m=A.barHeight,o=A.xDivision,c=A.yDivision,d=A.zeroH;for(var P=s.group({class:"apexcharts-datalabels","data:realIndex":p}),z=s.group({class:"apexcharts-rangebar-goals-markers"}),X=0;X0}));return this.isHorizontal?(a=u.config.plotOptions.bar.rangeBarGroupRows?n+c*m:n+o*this.visibleI+c*m,b>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(f=u.globals.seriesRange[e][b].overlaps).indexOf(p)>-1&&(a=(o=h.barHeight/f.length)*this.visibleI+c*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+f.indexOf(p))+c*m)):(m>-1&&!u.globals.timescaleLabels.length&&(s=u.config.plotOptions.bar.rangeBarGroupRows?r+d*m:r+l*this.visibleI+d*m),b>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(f=u.globals.seriesRange[e][b].overlaps).indexOf(p)>-1&&(s=(l=h.barWidth/f.length)*this.visibleI+d*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+f.indexOf(p))+d*m)),{barYPosition:a,barXPosition:s,barHeight:o,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.xDivision,s=t.barWidth,n=t.barXPosition,r=t.zeroH,o=this.w,l=e.i,c=e.j,d=e.realIndex,h=e.translationsIndex,u=this.yRatio[h],f=this.getRangeValue(d,c),p=Math.min(f.start,f.end),g=Math.max(f.start,f.end);void 0===this.series[l][c]||null===this.series[l][c]?p=r:(p=r-p/u,g=r-g/u);var v=Math.abs(g-p),m=this.barHelpers.getColumnPaths({barXPosition:n,barWidth:s,y1:p,y2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:d,i:d,j:c,w:o});if(o.globals.isXNumeric){var b=this.getBarXForNumericXAxis({x:i,j:c,realIndex:d,barWidth:s});i=b.x,n=b.barXPosition}else i+=a;return{pathTo:m.pathTo,pathFrom:m.pathFrom,barHeight:v,x:i,y:f.start<0&&f.end<0?p:g,goalY:this.barHelpers.getGoalValues("y",null,r,l,c,h),barXPosition:n}}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,a=t.y1,s=t.y2,n=t.yDivision,r=t.barHeight,o=t.barYPosition,l=t.zeroW,c=this.w,d=e.realIndex,h=e.j,u=l+a/this.invertedYRatio,f=l+s/this.invertedYRatio,p=this.getRangeValue(d,h),g=Math.abs(f-u),v=this.barHelpers.getBarpaths({barYPosition:o,barHeight:r,x1:u,x2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:d,realIndex:d,j:h,w:c});return c.globals.isXNumeric||(i+=n),{pathTo:v.pathTo,pathFrom:v.pathFrom,barWidth:g,x:p.start<0&&p.end<0?u:f,goalX:this.barHelpers.getGoalValues("x",l,null,d,h),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}}]),i}(),Ht=function(){function t(e){n(this,t),this.w=e.w,this.lineCtx=e}return o(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new A(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,s=t.y,n=t.i,r=t.j,o=t.prevY,l=this.w,c=[],d=[];if(0===r){var h=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(h=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),c.push(h),d.push(b.isNumber(e[n][0])?o+l.config.markers.offsetY:null),c.push(a+l.config.markers.offsetX),d.push(b.isNumber(e[n][r+1])?s+l.config.markers.offsetY:null)}else c.push(a+l.config.markers.offsetX),d.push(b.isNumber(e[n][r+1])?s+l.config.markers.offsetY:null);return{x:c,y:d}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,s=this.w,n=0;n0&&parseInt(r.realIndex,10)===parseInt(a,10)&&("line"===r.type?(this.lineCtx.appendPathFrom=!1,e=s.globals.previousPaths[n].paths[0].d):"area"===r.type&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[n].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[n].paths[1]&&(e=s.globals.previousPaths[n].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e,i,a,s=t.i,n=t.realIndex,r=t.series,o=t.prevY,l=t.lineYPosition,c=t.translationsIndex,d=this.w,h=d.config.chart.stacked&&!d.globals.comboCharts||d.config.chart.stacked&&d.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[n])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[n])||void 0===i?void 0:i.type));if(void 0!==(null===(a=r[s])||void 0===a?void 0:a[0]))o=(l=h&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-r[s][0]/this.lineCtx.yRatio[c]+2*(this.lineCtx.isReversed?r[s][0]/this.lineCtx.yRatio[c]:0);else if(h&&s>0&&void 0===r[s][0])for(var u=s-1;u>=0;u--)if(null!==r[u][0]&&void 0!==r[u][0]){o=l=this.lineCtx.prevSeriesY[u][0];break}return{prevY:o,lineYPosition:l}}}]),t}(),Mt=function(t){var e=function(t){for(var e,i,a,s,n=function(t){for(var e=[],i=t[0],a=t[1],s=e[0]=Wt(i,a),n=1,r=t.length-1;n9&&(s=3*a/Math.sqrt(s),n[l]=s*e,n[l+1]=s*i);for(var c=0;c<=r;c++)s=(t[Math.min(r,c+1)][0]-t[Math.max(0,c-1)][0])/(6*(1+n[c]*n[c])),o.push([s||0,n[c]*s||0]);return o}(t),i=t[1],a=t[0],s=[],n=e[1],r=e[0];s.push(a,[a[0]+r[0],a[1]+r[1],i[0]-n[0],i[1]-n[1],i[0],i[1]]);for(var o=2,l=e.length;o1&&a[1].length<6){var s=a[0].length;a[1]=[2*a[0][s-2]-a[0][s-4],2*a[0][s-1]-a[0][s-3]].concat(a[1])}a[0]=a[0].slice(-2)}return a};function Wt(t,e){return(e[1]-t[1])/(e[0]-t[0])}var Nt=function(){function t(e,i,a){n(this,t),this.ctx=e,this.w=e.w,this.xyRatios=i,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||a,this.scatter=new E(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Ht(this),this.markers=new R(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return o(t,[{key:"draw",value:function(t,e,i,s){var n,r=this.w,o=new w(this.ctx),l=r.globals.comboCharts?e:r.config.chart.type,c=o.group({class:"apexcharts-".concat(l,"-series apexcharts-plot-series")}),d=new A(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=d.getLogSeries(t),this.yRatio=d.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var h=[],u=0;u1?f:0;this._initSerieVariables(t,u,f);var g=[],v=[],m=[],b=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,f),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(b=(r.globals.seriesX[f][0]-r.globals.minX)/this.xRatio),m.push(b);var x,y=b,P=void 0,z=y,X=this.zeroY,L=this.zeroY;X=this.lineHelpers.determineFirstPrevY({i:u,realIndex:f,series:t,prevY:X,lineYPosition:0,translationsIndex:p}).prevY,"monotoneCubic"===r.config.stroke.curve&&null===t[u][0]?g.push(null):g.push(X),x=X,"rangeArea"===l&&(P=L=this.lineHelpers.determineFirstPrevY({i:u,realIndex:f,series:s,prevY:L,lineYPosition:0,translationsIndex:p}).prevY,v.push(null!==g[0]?L:null));var C=this._calculatePathsFrom({type:l,series:t,i:u,realIndex:f,translationsIndex:p,prevX:z,prevY:X,prevY2:L}),O=[g[0]],T=[v[0]],k={type:l,series:t,realIndex:f,translationsIndex:p,i:u,x:b,y:1,pX:y,pY:x,pathsFrom:C,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:m,yArrj:g,y2Arrj:v,seriesRangeEnd:s},S=this._iterateOverDataPoints(a(a({},k),{},{iterations:"rangeArea"===l?t[u].length-1:void 0,isRangeStart:!0}));if("rangeArea"===l){for(var H=this._calculatePathsFrom({series:s,i:u,realIndex:f,prevX:z,prevY:L}),M=this._iterateOverDataPoints(a(a({},k),{},{series:s,xArrj:[b],yArrj:O,y2Arrj:T,pY:P,areaPaths:S.areaPaths,pathsFrom:H,iterations:s[u].length-1,isRangeStart:!1})),D=S.linePaths.length/2,W=0;W=0;N--)c.add(h[N]);else for(var B=0;B1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],n=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[n]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[n]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:void 0!==a.config.series[i].zIndex?a.config.series[i].zIndex:i,seriesName:b.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var r=t[e].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":r,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,a,s,n=t.type,r=t.series,o=t.i,l=t.realIndex,c=t.translationsIndex,d=t.prevX,h=t.prevY,u=t.prevY2,f=this.w,p=new w(this.ctx);if(null===r[o][0]){for(var g=0;g0){var v=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:l});a=v.pathFromLine,s=v.pathFromArea}return{prevX:d,prevY:h,linePath:e,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,s=t.i,n=t.paths,r=this.w,o=new w(this.ctx),l=new j(this.ctx);this.prevSeriesY.push(n.yArrj),r.globals.seriesXvalues[i]=n.xArrj,r.globals.seriesYvalues[i]=n.yArrj;var c=r.config.forecastDataPoints;if(c.count>0&&"rangeArea"!==e){var d=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-c.count-1],h=o.drawRect(d,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(h.node);var u=o.drawRect(0,0,d,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(u.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var f={i:s,realIndex:i,animationDelay:s,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var p=l.fillPath({seriesNumber:i}),g=0;g0&&"rangeArea"!==e){var z=o.renderPaths(A);z.node.setAttribute("stroke-dasharray",c.dashArray),c.strokeWidth&&z.node.setAttribute("stroke-width",c.strokeWidth),this.elSeries.add(z),z.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),P.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,i,a=this,s=t.type,n=t.series,r=t.iterations,o=t.realIndex,l=t.translationsIndex,c=t.i,d=t.x,h=t.y,u=t.pX,f=t.pY,p=t.pathsFrom,g=t.linePaths,v=t.areaPaths,m=t.seriesIndex,x=t.lineYPosition,y=t.xArrj,A=t.yArrj,P=t.y2Arrj,z=t.isRangeStart,X=t.seriesRangeEnd,L=this.w,C=new w(this.ctx),O=this.yRatio,T=p.prevY,k=p.linePath,S=p.areaPath,H=p.pathFromLine,M=p.pathFromArea,D=b.isNumber(L.globals.minYArr[o])?L.globals.minYArr[o]:L.globals.minY;r||(r=L.globals.dataPoints>1?L.globals.dataPoints-1:L.globals.dataPoints);var W=function(t,e){return e-t/O[l]+2*(a.isReversed?t/O[l]:0)},N=h,B=L.config.chart.stacked&&!L.globals.comboCharts||L.config.chart.stacked&&L.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[o])||void 0===i?void 0:i.type)),Z=L.config.stroke.curve;Array.isArray(Z)&&(Z=Array.isArray(m)?Z[m[c]]:Z[c]);for(var j,R=0,E=0;E0&&L.globals.collapsedSeries.length0;e--){if(!(L.globals.collapsedSeriesIndices.indexOf((null==m?void 0:m[e])||e)>-1))return e;e--}return 0}(c-1)][E+1]:this.zeroY,V?h=W(D,x):(h=W(n[c][E+1],x),"rangeArea"===s&&(N=W(X[c][E+1],x))),y.push(d),!V||"smooth"!==L.config.stroke.curve&&"monotoneCubic"!==L.config.stroke.curve?(A.push(h),P.push(N)):(A.push(null),P.push(null));var F=this.lineHelpers.calculatePoints({series:n,x:d,y:h,realIndex:o,i:c,j:E,prevY:T}),q=this._createPaths({type:s,series:n,i:c,realIndex:o,j:E,x:d,y:h,y2:N,xArrj:y,yArrj:A,y2Arrj:P,pX:u,pY:f,pathState:R,segmentStartX:j,linePath:k,areaPath:S,linePaths:g,areaPaths:v,curve:Z,isRangeStart:z});v=q.areaPaths,g=q.linePaths,u=q.pX,f=q.pY,R=q.pathState,j=q.segmentStartX,S=q.areaPath,k=q.linePath,!this.appendPathFrom||"monotoneCubic"===Z&&"rangeArea"===s||(H+=C.line(d,this.zeroY),M+=C.line(d,this.zeroY)),this.handleNullDataPoints(n,F,c,E,o),this._handleMarkersAndLabels({type:s,pointsPos:F,i:c,j:E,realIndex:o,isRangeStart:z})}return{yArrj:A,xArrj:y,pathFromArea:M,areaPaths:v,pathFromLine:H,linePaths:g,linePath:k,areaPath:S}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,i=t.pointsPos,a=t.isRangeStart,s=t.i,n=t.j,r=t.realIndex,o=this.w,l=new V(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,n,{realIndex:r,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var c=this.markers.plotChartMarkers(i,r,n+1);null!==c&&this.elPointsMain.add(c)}var d=l.drawDataLabel({type:e,isRangeStart:a,pos:i,i:r,j:n+1});null!==d&&this.elDataLabelsWrap.add(d)}},{key:"_createPaths",value:function(t){var e=t.type,i=t.series,a=t.i;t.realIndex;var s=t.j,n=t.x,r=t.y,o=t.xArrj,l=t.yArrj,c=t.y2,d=t.y2Arrj,h=t.pX,u=t.pY,f=t.pathState,p=t.segmentStartX,g=t.linePath,v=t.areaPath,m=t.linePaths,b=t.areaPaths,x=t.curve,y=t.isRangeStart;this.w;var A,P=new w(this.ctx),z=this.areaBottomY,X="rangeArea"===e,L="rangeArea"===e&&y;switch(x){case"monotoneCubic":var C=y?l:d;switch(f){case 0:if(null===C[s+1])break;f=1;case 1:if(!(X?o.length===i[a].length:s===i[a].length-2))break;case 2:var O=y?o:o.slice().reverse(),T=y?C:C.slice().reverse(),k=(A=T,O.map((function(t,e){return[t,A[e]]})).filter((function(t){return null!==t[1]}))),S=k.length>1?Mt(k):k,H=[];X&&(L?b=k:H=b.reverse());var M=0,D=0;if(function(t,e){for(var i=function(t){var e=[],i=0;return t.forEach((function(t){null!==t?i++:i>0&&(e.push(i),i=0)})),i>0&&e.push(i),e}(t),a=[],s=0,n=0;s4?(e+="C".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]),e+=", ".concat(a[4],", ").concat(a[5])):s>2&&(e+="S".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]))}return e}(t),i=D,a=(D+=t.length)-1;L?g=P.move(k[i][0],k[i][1])+e:X?g=P.move(H[i][0],H[i][1])+P.line(k[i][0],k[i][1])+e+P.line(H[a][0],H[a][1]):(g=P.move(k[i][0],k[i][1])+e,v=g+P.line(k[a][0],z)+P.line(k[i][0],z)+"z",b.push(v)),m.push(g)})),X&&M>1&&!L){var W=m.slice(M).reverse();m.splice(M),W.forEach((function(t){return m.push(t)}))}f=0}break;case"smooth":var N=.35*(n-h);if(null===i[a][s])f=0;else switch(f){case 0:if(p=h,g=L?P.move(h,d[s])+P.line(h,u):P.move(h,u),v=P.move(h,u),f=1,s=i[a].length-2&&(L&&(g+=P.curve(n,r,n,r,n,c)+P.move(n,c)),v+=P.curve(n,r,n,r,n,z)+P.line(p,z)+"z",m.push(g),b.push(v))}}h=n,u=r;break;default:var j=function(t,e,i){var a=[];switch(t){case"stepline":a=P.line(e,null,"H")+P.line(null,i,"V");break;case"linestep":a=P.line(null,i,"V")+P.line(e,null,"H");break;case"straight":a=P.line(e,i)}return a};if(null===i[a][s])f=0;else switch(f){case 0:if(p=h,g=L?P.move(h,d[s])+P.line(h,u):P.move(h,u),v=P.move(h,u),f=1,s=i[a].length-2&&(L&&(g+=P.line(n,c)),v+=P.line(n,z)+P.line(p,z)+"z",m.push(g),b.push(v))}}h=n,u=r}return{linePaths:m,areaPaths:b,pX:h,pY:u,pathState:f,segmentStartX:p,linePath:g,areaPath:v}}},{key:"handleNullDataPoints",value:function(t,e,i,a,s){var n=this.w;if(null===t[i][a]&&n.config.markers.showNullDataPoints||1===t[i].length){var r=this.strokeWidth-n.config.markers.strokeWidth/2;r>0||(r=0);var o=this.markers.plotChartMarkers(e,s,a+1,r,!0);null!==o&&this.elPointsMain.add(o)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,a,s){this.xoffset=e,this.yoffset=i,this.height=s,this.width=a,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],a=this.xoffset,s=this.yoffset,r=n(t)/this.height,o=n(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var a=e/this.height,s=this.width-a;i=new t(this.xoffset+a,this.yoffset,s,this.height)}else{var n=e/this.width,r=this.height-n;i=new t(this.xoffset,this.yoffset+n,this.width,r)}return i}}function e(e,a,s,r,o){r=void 0===r?0:r,o=void 0===o?0:o;var l=i(function(t,e){var i,a=[],s=e/n(t);for(i=0;i=a(s,i))}(e,l=t[0],o)?(e.push(l),i(t.slice(1),e,s,r)):(c=s.cutArea(n(e),r),r.push(s.getCoordinates(e)),i(t,[],c,r)),r;r.push(s.getCoordinates(e))}function a(t,e){var i=Math.min.apply(Math,t),a=Math.max.apply(Math,t),s=n(t);return Math.max(Math.pow(e,2)*a/Math.pow(s,2),Math.pow(s,2)/(Math.pow(e,2)*i))}function s(t){return t&&t.constructor===Array}function n(t){var e,i=0;for(e=0;en-a&&l.width<=r-s){var c=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(c.x," ").concat(c.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,i,a,s,n){var r=new w(this.ctx),o=r.getTextRects(t,e).width+this.w.config.stroke.width+5>s-i&&n-a>s-i?n-a:s-i,l=r.getTextBasedOnMaxWidth({text:t,maxWidth:o,fontSize:e});return t.length!==l.length&&o/e<5?"":l}},{key:"animateTreemap",value:function(t,e,i,a){var s=new x(this.ctx);s.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,(function(){s.animationCompleted(t)}))}}]),t}(),Rt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return o(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,s=this.w;if(s.globals.allSeriesCollapsed)return s.globals.labels=[],s.globals.timescaleLabels=[],[];var n=new X(this.ctx),r=(e-t)/864e5;this.determineInterval(r),s.globals.disableZoomIn=!1,s.globals.disableZoomOut=!1,r<.00011574074074074075?s.globals.disableZoomIn=!0:r>5e4&&(s.globals.disableZoomOut=!0);var o=n.getTimeUnitsfromTimestamp(t,e,this.utc),l=s.globals.gridWidth/r,c=l/24,d=c/60,h=d/60,u=Math.floor(24*r),f=Math.floor(1440*r),p=Math.floor(86400*r),g=Math.floor(r),v=Math.floor(r/30),m=Math.floor(r/365),b={minMillisecond:o.minMillisecond,minSecond:o.minSecond,minMinute:o.minMinute,minHour:o.minHour,minDate:o.minDate,minMonth:o.minMonth,minYear:o.minYear},x={firstVal:b,currentMillisecond:b.minMillisecond,currentSecond:b.minSecond,currentMinute:b.minMinute,currentHour:b.minHour,currentMonthDate:b.minDate,currentDate:b.minDate,currentMonth:b.minMonth,currentYear:b.minYear,daysWidthOnXAxis:l,hoursWidthOnXAxis:c,minutesWidthOnXAxis:d,secondsWidthOnXAxis:h,numberOfSeconds:p,numberOfMinutes:f,numberOfHours:u,numberOfDays:g,numberOfMonths:v,numberOfYears:m};switch(this.tickInterval){case"years":this.generateYearScale(x);break;case"months":case"half_year":this.generateMonthScale(x);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(x);break;case"hours":this.generateHourScale(x);break;case"minutes_fives":case"minutes":this.generateMinuteScale(x);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(x)}var y=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?a(a({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?a(a({},e),{},{value:t.value}):"minute"===t.unit?a(a({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?a(a({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,a=Math.ceil(s.globals.gridWidth/120),n=t.value;void 0!==s.config.xaxis.tickAmount&&(a=s.config.xaxis.tickAmount),y.length>a&&(e=Math.floor(y.length/a));var r=!1,o=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(r=!0);break;case"half_year":e=7,"year"===t.unit&&(r=!0);break;case"months":e=1,"year"===t.unit&&(r=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(r=!0),30===n&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(r=!0),30===n&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(r=!0);break;case"days":e=1,"month"===t.unit&&(r=!0);break;case"hours":"day"===t.unit&&(r=!0);break;case"minutes_fives":case"seconds_fives":n%5!=0&&(o=!0);break;case"seconds_tens":n%10!=0&&(o=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!o)return!0}else if((n%e==0||r)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,a=this.formatDates(t),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new lt(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,n=t.numberOfYears,r=e.minYear,o=0,l=new X(this.ctx),c="year";if(e.minDate>1||e.minMonth>0){var d=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-d+1)*s,r=e.minYear+1,this.timeScaleArray.push({position:o,value:r,unit:c,year:r,month:b.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:o,value:r,unit:c,year:a,month:b.monthMod(i+1)});for(var h=r,u=o,f=0;f1){l=(c.determineDaysOfMonths(a+1,e.minYear)-i+1)*n,o=b.monthMod(a+1);var u=s+h,f=b.monthMod(o),p=o;0===o&&(d="year",p=u,f=1,u+=h+=1),this.timeScaleArray.push({position:l,value:p,unit:d,year:u,month:f})}else this.timeScaleArray.push({position:l,value:o,unit:d,year:s,month:b.monthMod(a)});for(var g=o+1,v=l,m=0,x=1;mr.determineDaysOfMonths(e+1,i)?(c=1,o="month",u=e+=1,e):e},h=(24-e.minHour)*s,u=l,f=d(c,i,a);0===e.minHour&&1===e.minDate?(h=0,u=b.monthMod(e.minMonth),o="month",c=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(h=0,l=e.minDate,u=l,f=d(c=l,i,a)),this.timeScaleArray.push({position:h,value:u,unit:o,year:this._getYear(a,f,0),month:b.monthMod(f),day:c});for(var p=h,g=0;go.determineDaysOfMonths(e+1,s)&&(g=1,e+=1),{month:e,date:g}},d=function(t,e){return t>o.determineDaysOfMonths(e+1,s)?e+=1:e},h=60-(e.minMinute+e.minSecond/60),u=h*n,f=e.minHour+1,p=f;60===h&&(u=0,p=f=e.minHour);var g=i;p>=24&&(p=0,g+=1,l="day");var v=c(g,a).month;v=d(g,v),this.timeScaleArray.push({position:u,value:f,unit:l,day:g,hour:p,year:s,month:b.monthMod(v)}),p++;for(var m=u,x=0;x=24&&(p=0,l="day",v=c(g+=1,v).month,v=d(g,v));var y=this._getYear(s,v,0);m=60*n+m;var w=0===p?g:p;this.timeScaleArray.push({position:m,value:w,unit:l,hour:p,day:g,year:y,month:b.monthMod(v)}),p++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,n=t.currentDate,r=t.currentMonth,o=t.currentYear,l=t.minutesWidthOnXAxis,c=t.secondsWidthOnXAxis,d=t.numberOfMinutes,h=a+1,u=n,f=r,p=o,g=s,v=(60-i-e/1e3)*c,m=0;m=60&&(h=0,24===(g+=1)&&(g=0)),this.timeScaleArray.push({position:v,value:h,unit:"minute",hour:g,minute:h,day:u,year:this._getYear(p,f,0),month:b.monthMod(f)}),v+=l,h++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,n=t.currentDate,r=t.currentMonth,o=t.currentYear,l=t.secondsWidthOnXAxis,c=t.numberOfSeconds,d=i+1,h=a,u=n,f=r,p=o,g=s,v=(1e3-e)/1e3*l,m=0;m=60&&(d=0,++h>=60&&(h=0,24==++g&&(g=0))),this.timeScaleArray.push({position:v,value:d,unit:"second",hour:g,minute:h,second:d,day:u,year:this._getYear(p,f,0),month:b.monthMod(f)}),v+=l,d++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var a=t.value.toString(),s=new X(e.ctx),n=e.createRawDateString(t,a),r=s.getDate(s.parseDate(n));if(e.utc||(r=s.getDate(s.parseDateWithTimezone(n))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(o=l.year),"month"===t.unit&&(o=l.month),"day"===t.unit&&(o=l.day),"hour"===t.unit&&(o=l.hour),"minute"===t.unit&&(o=l.minute),"second"===t.unit&&(o=l.second),a=s.formatDate(r,o)}else a=s.formatDate(r,i.config.xaxis.labels.format);return{dateString:n,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,a=new w(this.ctx),s=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(s=!0,e=a.getTextRects(t[0].value).width);var n=0,r=t.map((function(r,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=s?e:a.getTextRects(t[n].value).width,c=t[n].position;return r.position>c+l+10?(n=o,r):null}return r}));return r.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),Et=function(){function t(e,i){n(this,t),this.ctx=i,this.w=i.w,this.el=e}return o(t,[{key:"setupElements",value:function(){var t=this.w.globals,e=this.w.config,i=e.chart.type;t.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(i)>-1,t.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].indexOf(i)>-1,t.isBarHorizontal=("bar"===e.chart.type||"rangeBar"===e.chart.type||"boxPlot"===e.chart.type)&&e.plotOptions.bar.horizontal,t.chartClass=".apexcharts"+t.chartID,t.dom.baseEl=this.el,t.dom.elWrap=document.createElement("div"),w.setAttrs(t.dom.elWrap,{id:t.chartClass.substring(1),class:"apexcharts-canvas "+t.chartClass.substring(1)}),this.el.appendChild(t.dom.elWrap),t.dom.Paper=new window.SVG.Doc(t.dom.elWrap),t.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(e.chart.offsetX,", ").concat(e.chart.offsetY,")")}),t.dom.Paper.node.style.background="dark"!==e.theme.mode||e.chart.background?e.chart.background:"rgba(0, 0, 0, 0.8)",this.setSVGDimensions(),t.dom.elLegendForeign=document.createElementNS(t.SVGNS,"foreignObject"),w.setAttrs(t.dom.elLegendForeign,{x:0,y:0,width:t.svgWidth,height:t.svgHeight}),t.dom.elLegendWrap=document.createElement("div"),t.dom.elLegendWrap.classList.add("apexcharts-legend"),t.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),t.dom.elLegendForeign.appendChild(t.dom.elLegendWrap),t.dom.Paper.node.appendChild(t.dom.elLegendForeign),t.dom.elGraphical=t.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),t.dom.elDefs=t.dom.Paper.defs(),t.dom.Paper.add(t.dom.elGraphical),t.dom.elGraphical.add(t.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,a=i.config,s=i.globals,n={series:[],i:[]},r={series:[],i:[]},o={series:[],i:[]},l={series:[],i:[]},c={series:[],i:[]},d={series:[],i:[]},h={series:[],i:[]},u={series:[],i:[]},f={series:[],seriesRangeEnd:[],i:[]},p=void 0!==a.chart.type?a.chart.type:"line",v=null,m=0;s.series.forEach((function(e,a){var g=t[a].type||p;switch(g){case"column":case"bar":c.series.push(e),c.i.push(a),i.globals.columnSeries=c;break;case"area":r.series.push(e),r.i.push(a);break;case"line":n.series.push(e),n.i.push(a);break;case"scatter":o.series.push(e),o.i.push(a);break;case"bubble":l.series.push(e),l.i.push(a);break;case"candlestick":d.series.push(e),d.i.push(a);break;case"boxPlot":h.series.push(e),h.i.push(a);break;case"rangeBar":u.series.push(e),u.i.push(a);break;case"rangeArea":f.series.push(s.seriesRangeStart[a]),f.seriesRangeEnd.push(s.seriesRangeEnd[a]),f.i.push(a);break;case"heatmap":case"treemap":case"pie":case"donut":case"polarArea":case"radialBar":case"radar":v=g;break;default:console.warn("You have specified an unrecognized series type (",g,").")}p!==g&&"scatter"!==g&&m++})),m>0&&(null!==v&&console.warn("Chart or series type ",v," can not appear with other chart or series types."),c.series.length>0&&a.plotOptions.bar.horizontal&&(m-=c.length,c={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),s.comboCharts||(s.comboCharts=m>0);var b=new Nt(this.ctx,e),x=new zt(this.ctx,e);this.ctx.pie=new Ot(this.ctx);var y=new kt(this.ctx);this.ctx.rangeBar=new St(this.ctx,e);var w=new Tt(this.ctx),P=[];if(s.comboCharts){var z,X,L=new A(this.ctx);if(r.series.length>0&&(z=P).push.apply(z,g(L.drawSeriesByGroup(r,s.areaGroups,"area",b))),c.series.length>0)if(i.config.chart.stacked){var C=new Pt(this.ctx,e);P.push(C.draw(c.series,c.i))}else this.ctx.bar=new At(this.ctx,e),P.push(this.ctx.bar.draw(c.series,c.i));if(f.series.length>0&&P.push(b.draw(f.series,"rangeArea",f.i,f.seriesRangeEnd)),n.series.length>0&&(X=P).push.apply(X,g(L.drawSeriesByGroup(n,s.lineGroups,"line",b))),d.series.length>0&&P.push(x.draw(d.series,"candlestick",d.i)),h.series.length>0&&P.push(x.draw(h.series,"boxPlot",h.i)),u.series.length>0&&P.push(this.ctx.rangeBar.draw(u.series,u.i)),o.series.length>0){var O=new Nt(this.ctx,e,!0);P.push(O.draw(o.series,"scatter",o.i))}if(l.series.length>0){var T=new Nt(this.ctx,e,!0);P.push(T.draw(l.series,"bubble",l.i))}}else switch(a.chart.type){case"line":P=b.draw(s.series,"line");break;case"area":P=b.draw(s.series,"area");break;case"bar":a.chart.stacked?P=new Pt(this.ctx,e).draw(s.series):(this.ctx.bar=new At(this.ctx,e),P=this.ctx.bar.draw(s.series));break;case"candlestick":P=new zt(this.ctx,e).draw(s.series,"candlestick");break;case"boxPlot":P=new zt(this.ctx,e).draw(s.series,a.chart.type);break;case"rangeBar":P=this.ctx.rangeBar.draw(s.series);break;case"rangeArea":P=b.draw(s.seriesRangeStart,"rangeArea",void 0,s.seriesRangeEnd);break;case"heatmap":P=new Lt(this.ctx,e).draw(s.series);break;case"treemap":P=new jt(this.ctx,e).draw(s.series);break;case"pie":case"donut":case"polarArea":P=this.ctx.pie.draw(s.series);break;case"radialBar":P=y.draw(s.series);break;case"radar":P=w.draw(s.series);break;default:P=b.draw(s.series)}return P}},{key:"setSVGDimensions",value:function(){var t=this.w.globals,e=this.w.config;t.svgWidth=e.chart.width,t.svgHeight=e.chart.height;var i=b.getDimensions(this.el),a=e.chart.width.toString().split(/[0-9]+/g).pop();"%"===a?b.isNumber(i[0])&&(0===i[0].width&&(i=b.getDimensions(this.el.parentNode)),t.svgWidth=i[0]*parseInt(e.chart.width,10)/100):"px"!==a&&""!==a||(t.svgWidth=parseInt(e.chart.width,10));var s=e.chart.height.toString().split(/[0-9]+/g).pop();if("auto"!==t.svgHeight&&""!==t.svgHeight)if("%"===s){var n=b.getDimensions(this.el.parentNode);t.svgHeight=n[1]*parseInt(e.chart.height,10)/100}else t.svgHeight=parseInt(e.chart.height,10);else t.axisCharts?t.svgHeight=t.svgWidth/1.61:t.svgHeight=t.svgWidth/1.2;if(t.svgWidth<0&&(t.svgWidth=0),t.svgHeight<0&&(t.svgHeight=0),w.setAttrs(t.dom.Paper.node,{width:t.svgWidth,height:t.svgHeight}),"%"!==s){var r=e.chart.sparkline.enabled?0:t.axisCharts?e.chart.parentHeightOffset:0;t.dom.Paper.node.parentNode.parentNode.style.minHeight=t.svgHeight+r+"px"}t.dom.elWrap.style.width=t.svgWidth+"px",t.dom.elWrap.style.height=t.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i={transform:"translate("+t.translateX+", "+e+")"};w.setAttrs(t.dom.elGraphical.node,i)}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,a=t.config.chart.sparkline.enabled?1:15;a+=t.config.grid.padding.bottom,"top"!==t.config.legend.position&&"bottom"!==t.config.legend.position||!t.config.legend.show||t.config.legend.floating||(i=new dt(this.ctx).legendHelpers.getLegendBBox().clwh+10);var s=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),n=2.05*t.globals.radialSize;if(s&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var r=b.getBoundingClientRect(s);n=r.bottom;var o=r.bottom-r.top;n=Math.max(2.05*t.globals.radialSize,o)}var l=n+e.translateY+i+a;e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).indexOf("%")>0||(e.dom.elWrap.style.height=l+"px",w.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight=l+"px")}},{key:"coreCalculations",value:function(){new Q(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(t){return[]}))},i=new B,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=e(),a.seriesYvalues=e()}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.globals.isMultipleYAxis=!0,!0}},{key:"xySettings",value:function(){var t=null,e=this.w;if(e.globals.axisCharts){if("back"===e.config.xaxis.crosshairs.position&&new tt(this.ctx).drawXCrosshairs(),"back"===e.config.yaxis[0].crosshairs.position&&new tt(this.ctx).drawYCrosshairs(),"datetime"===e.config.xaxis.type&&void 0===e.config.xaxis.labels.formatter){this.ctx.timeScale=new Rt(this.ctx);var i=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}t=new A(this.ctx).getCalculatedRatios()}return t}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,e){i.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}]),t}(),Vt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(o){var l=[e.ctx];n&&(l=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(l=[e.ctx],e.ctx.w.globals.isExecCalled=!1),l.forEach((function(n,c){var d=n.w;if(d.globals.shouldAnimate=a,i||(d.globals.resized=!0,d.globals.dataChanged=!0,a&&n.series.getPreviousPaths()),t&&"object"===s(t)&&(n.config=new N(t),t=A.extendArrayProps(n.config,t,d),n.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,d.config=b.extend(d.config,t),r&&(d.globals.lastXAxis=t.xaxis?b.clone(t.xaxis):[],d.globals.lastYAxis=t.yaxis?b.clone(t.yaxis):[],d.globals.initialConfig=b.extend({},d.config),d.globals.initialSeries=b.clone(d.config.series),t.series))){for(var h=0;h2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(s){var n,r=i.w;return r.globals.shouldAnimate=e,r.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),r.globals.axisCharts?(0===(n=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(n=[{data:[]}]),r.config.series=n):r.config.series=t.slice(),a&&(r.globals.initialConfig.series=b.clone(r.config.series),r.globals.initialSeries=b.clone(r.config.series)),i.ctx.update().then((function(){s(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var i=this.w,s=i.config.series[e];return a(a({},i.config.series[e]),{},{name:t.name?t.name:null==s?void 0:s.name,color:t.color?t.color:null==s?void 0:s.color,type:t.type?t.type:null==s?void 0:s.type,group:t.group?t.group:null==s?void 0:s.group,data:t.data?t.data:null==s?void 0:s.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.select("".concat(s," path[j='").concat(e,"'], ").concat(s," circle[j='").concat(e,"'], ").concat(s," rect[j='").concat(e,"']")).members[0]:void 0===e&&(a=i.globals.dom.Paper.select("".concat(s," path[j='").concat(t,"']")).members[0],"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),a?(new w(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new W(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;t&&t.xaxis&&(a=t.xaxis),t&&t.yaxis&&(s=t.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;i.config.yaxis.map((function(t,a){i.globals.zoomed||void 0!==s[a]?function(t){void 0!==s[t]&&(i.config.yaxis[t].min=s[t].min,i.config.yaxis[t].max=s[t].max)}(a):void 0!==e.ctx.opts.yaxis[a]&&(t.min=e.ctx.opts.yaxis[a].min,t.max=e.ctx.opts.yaxis[a].max)}))}}]),t}();Bt="undefined"!=typeof window?window:void 0,Zt=function(t,e){var i=(void 0!==this?this:t).SVG=function(t){if(i.supported)return t=new i.Doc(t),i.parser.draw||i.prepare(),t};if(i.ns="http://www.w3.org/2000/svg",i.xmlns="http://www.w3.org/2000/xmlns/",i.xlink="http://www.w3.org/1999/xlink",i.svgjs="http://svgjs.dev",i.supported=!0,!i.supported)return!1;i.did=1e3,i.eid=function(t){return"Svgjs"+h(t)+i.did++},i.create=function(t){var i=e.createElementNS(this.ns,t);return i.setAttribute("id",this.eid(t)),i},i.extend=function(){var t,e;e=(t=[].slice.call(arguments)).pop();for(var a=t.length-1;a>=0;a--)if(t[a])for(var s in e)t[a].prototype[s]=e[s];i.Set&&i.Set.inherit&&i.Set.inherit()},i.invent=function(t){var e="function"==typeof t.create?t.create:function(){this.constructor.call(this,i.create(t.create))};return t.inherit&&(e.prototype=new t.inherit),t.extend&&i.extend(e,t.extend),t.construct&&i.extend(t.parent||i.Container,t.construct),e},i.adopt=function(e){return e?e.instance?e.instance:((a="svg"==e.nodeName?e.parentNode instanceof t.SVGElement?new i.Nested:new i.Doc:"linearGradient"==e.nodeName?new i.Gradient("linear"):"radialGradient"==e.nodeName?new i.Gradient("radial"):i[h(e.nodeName)]?new(i[h(e.nodeName)]):new i.Element(e)).type=e.nodeName,a.node=e,e.instance=a,a instanceof i.Doc&&a.namespace().defs(),a.setData(JSON.parse(e.getAttribute("svgjs:data"))||{}),a):null;var a},i.prepare=function(){var t=e.getElementsByTagName("body")[0],a=(t?new i.Doc(t):i.adopt(e.documentElement).nested()).size(2,0);i.parser={body:t||e.documentElement,draw:a.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:a.polyline().node,path:a.path().node,native:i.create("svg")}},i.parser={native:i.create("svg")},e.addEventListener("DOMContentLoaded",(function(){i.parser.draw||i.prepare()}),!1),i.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},i.utils={map:function(t,e){for(var i=t.length,a=[],s=0;s1?1:t,new i.Color({r:~~(this.r+(this.destination.r-this.r)*t),g:~~(this.g+(this.destination.g-this.g)*t),b:~~(this.b+(this.destination.b-this.b)*t)})):this}}),i.Color.test=function(t){return t+="",i.regex.isHex.test(t)||i.regex.isRgb.test(t)},i.Color.isRgb=function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b},i.Color.isColor=function(t){return i.Color.isRgb(t)||i.Color.test(t)},i.Array=function(t,e){0==(t=(t||[]).valueOf()).length&&e&&(t=e.valueOf()),this.value=this.parse(t)},i.extend(i.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(t){return t=t.valueOf(),Array.isArray(t)?t:this.split(t)}}),i.PointArray=function(t,e){i.Array.call(this,t,e||[[0,0]])},i.PointArray.prototype=new i.Array,i.PointArray.prototype.constructor=i.PointArray;for(var a={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]}},n="mlhvqtcsaz".split(""),r=0,o=n.length;rl);return n},bbox:function(){return i.parser.draw||i.prepare(),i.parser.path.setAttribute("d",this.toString()),i.parser.path.getBBox()}}),i.Number=i.invent({create:function(t,e){this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(i.regex.numberAndUnit))&&(this.value=parseFloat(e[1]),"%"==e[5]?this.value/=100:"s"==e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof i.Number&&(this.value=t.valueOf(),this.unit=t.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(t){return t=new i.Number(t),new i.Number(this+t,this.unit||t.unit)},minus:function(t){return t=new i.Number(t),new i.Number(this-t,this.unit||t.unit)},times:function(t){return t=new i.Number(t),new i.Number(this*t,this.unit||t.unit)},divide:function(t){return t=new i.Number(t),new i.Number(this/t,this.unit||t.unit)},to:function(t){var e=new i.Number(this);return"string"==typeof t&&(e.unit=t),e},morph:function(t){return this.destination=new i.Number(t),t.relative&&(this.destination.value+=this.value),this},at:function(t){return this.destination?new i.Number(this.destination).minus(this).times(t).plus(this):this}}}),i.Element=i.invent({create:function(t){this._stroke=i.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=t)&&(this.type=t.nodeName,this.node.instance=this,this._stroke=t.getAttribute("stroke")||this._stroke)},extend:{x:function(t){return this.attr("x",t)},y:function(t){return this.attr("y",t)},cx:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)},cy:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},width:function(t){return this.attr("width",t)},height:function(t){return this.attr("height",t)},size:function(t,e){var a=f(this,t,e);return this.width(new i.Number(a.width)).height(new i.Number(a.height))},clone:function(t){this.writeDataToDom();var e=v(this.node.cloneNode(!0));return t?t.add(e):this.after(e),e},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(t){return this.after(t).remove(),t},addTo:function(t){return t.put(this)},putIn:function(t){return t.add(this)},id:function(t){return this.attr("id",t)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(i.regex.delimiter)},hasClass:function(t){return-1!=this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!=t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)},reference:function(t){return i.get(this.attr(t))},parent:function(e){var a=this;if(!a.node.parentNode)return null;if(a=i.adopt(a.node.parentNode),!e)return a;for(;a&&a.node instanceof t.SVGElement;){if("string"==typeof e?a.matches(e):a instanceof e)return a;if(!a.node.parentNode||"#document"==a.node.parentNode.nodeName)return null;a=i.adopt(a.node.parentNode)}},doc:function(){return this instanceof i.Doc?this:this.parent(i.Doc)},parents:function(t){var e=[],i=this;do{if(!(i=i.parent(t))||!i.node)break;e.push(i)}while(i.parent);return e},matches:function(t){return function(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector).call(t,e)}(this.node,t)},native:function(){return this.node},svg:function(t){var a=e.createElementNS("http://www.w3.org/2000/svg","svg");if(!(t&&this instanceof i.Parent))return a.appendChild(t=e.createElementNS("http://www.w3.org/2000/svg","svg")),this.writeDataToDom(),t.appendChild(this.node.cloneNode(!0)),a.innerHTML.replace(/^