!function(oe,E){"object"==typeof exports&&typeof module<"u"?module.exports=E():"function"==typeof define&&define.amd?define(E):(oe=typeof globalThis<"u"?globalThis:oe||self).ApexCharts=E()}(this,function(){"use strict";function oe(v,e){var t=Object.keys(v);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(v);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(v,a).enumerable})),t.push.apply(t,i)}return t}function E(v){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,i=be(v);if(e){var a=be(this).constructor;t=Reflect.construct(i,arguments,a)}else t=i.apply(this,arguments);return Ke(this,t)}}function Ye(v,e){return function(t){if(Array.isArray(t))return t}(v)||function(t,i){var a=null==t?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var s,r,n=[],o=!0,h=!1;try{for(a=a.call(t);!(o=(s=a.next()).done)&&(n.push(s.value),!i||n.length!==i);o=!0);}catch(c){h=!0,r=c}finally{try{o||null==a.return||a.return()}finally{if(h)throw r}}return n}}(v,e)||Fe(v,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(v){return function(e){if(Array.isArray(e))return ke(e)}(v)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(v)||Fe(v)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fe(v,e){if(v){if("string"==typeof v)return ke(v,e);var t=Object.prototype.toString.call(v).slice(8,-1);return"Object"===t&&v.constructor&&(t=v.constructor.name),"Map"===t||"Set"===t?Array.from(v):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ke(v,e):void 0}}function ke(v,e){(null==e||e>v.length)&&(e=v.length);for(var t=0,i=new Array(e);t>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-n)*s)+n)+(Math.round((a-o)*s)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,t){return v.isColorHex(t)?this.shadeHexColor(e,t):this.shadeRGBColor(e,t)}}],[{key:"bind",value:function(e,t){return function(){return e.apply(t,arguments)}}},{key:"isObject",value:function(e){return e&&"object"===B(e)&&!Array.isArray(e)&&null!=e}},{key:"is",value:function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"}},{key:"listToArray",value:function(e){var t,i=[];for(t=0;ts.length?a:s})),t.length>i.length?t:i},0)}},{key:"hexToRgba",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==e.substring(0,1)&&(e="#999999");var i=e.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"x",i=e.toString().slice();return i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,t)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,t,i){if(i>=e.length)for(var a=i-e.length+1;a--;)e.push(void 0);return e.splice(i,0,e.splice(t,1)[0]),e}},{key:"extractNumber",value:function(e){return parseFloat(e.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}},{key:"setELstyles",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e.style.key=t[i])}},{key:"isNumber",value:function(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}},{key:"isFloat",value:function(e){return Number(e)===e&&e%1!=0}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isFirefox",value:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}},{key:"isIE11",value:function(){if(-1!==window.navigator.userAgent.indexOf("MSIE")||window.navigator.appVersion.indexOf("Trident/")>-1)return!0}},{key:"isIE",value:function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var a=e.indexOf("Edge/");return a>0&&parseInt(e.substring(a+5,e.indexOf(".",a)),10)}}]),v}(),ie=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w,this.setEasingFunctions()}return F(v,[{key:"setEasingFunctions",value:function(){var e;if(!this.w.globals.easing){switch(this.w.config.chart.animations.easing){case"linear":e="-";break;case"easein":e="<";break;case"easeout":e=">";break;case"easeinout":default:e="<>";break;case"swing":e=function(t){var i=1.70158;return(t-=1)*t*((i+1)*t+i)+1};break;case"bounce":e=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375};break;case"elastic":e=function(t){return t===!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1}}this.w.globals.easing=e}}},{key:"animateLine",value:function(e,t,i,a){e.attr(t).animate(a).attr(i)}},{key:"animateMarker",value:function(e,t,i,a,s,r){t||(t=0),e.attr({r:t,width:t,height:t}).animate(a,s).attr({r:i,width:i.width,height:i.height}).afterAll(function(){r()})}},{key:"animateCircle",value:function(e,t,i,a,s){e.attr({r:t.r,cx:t.cx,cy:t.cy}).animate(a,s).attr({r:i.r,cx:i.cx,cy:i.cy})}},{key:"animateRect",value:function(e,t,i,a,s){e.attr(t).animate(a).attr(i).afterAll(function(){return s()})}},{key:"animatePathsGradually",value:function(e){var c=this.w,d=0;c.config.chart.animations.animateGradually.enabled&&(d=c.config.chart.animations.animateGradually.delay),c.config.chart.animations.dynamicAnimation.enabled&&c.globals.dataChanged&&"bar"!==c.config.chart.type&&(d=0),this.morphSVG(e.el,e.realIndex,e.j,"line"!==c.config.chart.type||c.globals.comboCharts?e.fill:"stroke",e.pathFrom,e.pathTo,e.speed,e.delay*d)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach(function(e){e.el.classList.remove("apexcharts-element-hidden")})}},{key:"animationCompleted",value:function(e){var t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof t.config.chart.events.animationEnd&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}},{key:"morphSVG",value:function(e,t,i,a,s,r,n,o){var h=this,c=this.w;s||(s=e.attr("pathFrom")),r||(r=e.attr("pathTo"));var d=function(g){return"radar"===c.config.chart.type&&(n=1),"M 0 ".concat(c.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=d()),(!r||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=d()),c.globals.shouldAnimate||(n=1),e.plot(s).animate(1,c.globals.easing,o).plot(s).animate(n,c.globals.easing,o).plot(r).afterAll(function(){P.isNumber(i)?i===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&h.animationCompleted(e):"none"!==a&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&t===c.globals.series.length-1||c.globals.comboCharts)&&h.animationCompleted(e),h.showDelayedElements()})}}]),v}(),_=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w}return F(v,[{key:"getDefaultFilter",value:function(e,t){var i=this.w;e.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),"none"!==i.config.states.normal.filter?this.applyFilter(e,t,i.config.states.normal.filter.type,i.config.states.normal.filter.value):i.config.chart.dropShadow.enabled&&this.dropShadow(e,i.config.chart.dropShadow,t)}},{key:"addNormalFilter",value:function(e,t){var i=this.w;i.config.chart.dropShadow.enabled&&!e.node.classList.contains("apexcharts-marker")&&this.dropShadow(e,i.config.chart.dropShadow,t)}},{key:"addLightenFilter",value:function(e,t,i){var a=this,s=this.w,r=i.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter(function(n){var o=s.config.chart.dropShadow;(o.enabled?a.addShadow(n,t,o):n).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:r}})}),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"addDarkenFilter",value:function(e,t,i){var a=this,s=this.w,r=i.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter(function(n){var o=s.config.chart.dropShadow;(o.enabled?a.addShadow(n,t,o):n).componentTransfer({rgb:{type:"linear",slope:r}})}),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"applyFilter",value:function(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;switch(i){case"none":this.addNormalFilter(e,t);break;case"lighten":this.addLightenFilter(e,t,{intensity:a});break;case"darken":this.addDarkenFilter(e,t,{intensity:a})}}},{key:"addShadow",value:function(e,t,i){var a=i.blur,s=i.top,r=i.left,n=i.color,o=i.opacity,h=e.flood(Array.isArray(n)?n[t]:n,o).composite(e.sourceAlpha,"in").offset(r,s).gaussianBlur(a).merge(e.source);return e.blend(e.source,h)}},{key:"dropShadow",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=t.top,s=t.left,r=t.blur,n=t.color,o=t.opacity,h=t.noUserSpaceOnUse,c=this.w;return e.unfilter(!0),P.isIE()&&"radialBar"===c.config.chart.type||(n=Array.isArray(n)?n[i]:n,e.filter(function(d){var g;g=P.isSafari()||P.isFirefox()||P.isIE()?d.flood(n,o).composite(d.sourceAlpha,"in").offset(s,a).gaussianBlur(r):d.flood(n,o).composite(d.sourceAlpha,"in").offset(s,a).gaussianBlur(r).merge(d.source),d.blend(d.source,g)}),h||e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)),e}},{key:"setSelectionFilter",value:function(e,t,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[t]&&a.globals.selectedDataPoints[t].indexOf(i)>-1){e.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&this.applyFilter(e,t,s.type,s.value)}}},{key:"_scaleFilterSize",value:function(e){!function(t){for(var i in t)t.hasOwnProperty(i)&&e.setAttribute(i,t[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),v}(),T=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w}return F(v,[{key:"roundPathCorners",value:function(e,t){function i(S,C,L){var I=C.x-S.x,M=C.y-S.y,z=Math.sqrt(I*I+M*M);return a(S,C,Math.min(1,L/z))}function a(S,C,L){return{x:S.x+(C.x-S.x)*L,y:S.y+(C.y-S.y)*L}}function s(S,C){S.length>2&&(S[S.length-2]=C.x,S[S.length-1]=C.y)}function r(S){return{x:parseFloat(S[S.length-2]),y:parseFloat(S[S.length-1])}}e.indexOf("NaN")>-1&&(e="");var n=e.split(/[,\s]/).reduce(function(S,C){var L=C.match("([a-zA-Z])(.+)");return L?(S.push(L[1]),S.push(L[2])):S.push(C),S},[]).reduce(function(S,C){return parseFloat(C)==C&&S.length?S[S.length-1].push(C):S.push([C]),S},[]),o=[];if(n.length>1){var h=r(n[0]),c=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(n[n.length-1]=c=["L",h.x,h.y]),o.push(n[0]);for(var d=1;d2&&"L"==p[0]&&f.length>2&&"L"==f[0]){var b,m,w=r(g),k=r(p),l=r(f);b=i(k,w,t),m=i(k,l,t),s(p,b),p.origPoint=k,o.push(p);var u=a(b,k,.5),x=a(k,m,.5),y=["C",u.x,u.y,x.x,x.y,m.x,m.y];y.origPoint=k,o.push(y)}else o.push(p)}if(c){var A=r(o[o.length-1]);o.push(["Z"]),s(o[0],A)}}else o=n;return o.reduce(function(S,C){return S+C.join(" ")+" "},"")}},{key:"drawLine",value:function(e,t,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:e,y1:t,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=this.w.globals.dom.Paper.rect();return d.attr({x:e,y:t,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==h?h:"none","stroke-dasharray":c}),d.node.setAttribute("fill",r),d}},{key:"drawPolygon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(e).attr({fill:a,stroke:t,"stroke-width":i})}},{key:"drawCircle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e<0&&(e=0);var i=this.w.globals.dom.Paper.circle(2*e);return null!==t&&i.attr(t),i}},{key:"drawPath",value:function(e){var t=e.d,i=void 0===t?"":t,a=e.stroke,s=void 0===a?"#a8a8a8":a,r=e.strokeWidth,n=void 0===r?1:r,o=e.fill,h=e.fillOpacity,c=void 0===h?1:h,d=e.strokeOpacity,g=void 0===d?1:d,p=e.classes,f=e.strokeLinecap,b=void 0===f?null:f,m=e.strokeDashArray,w=void 0===m?0:m,k=this.w;return null===b&&(b=k.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(k.globals.gridHeight)),k.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":c,stroke:s,"stroke-opacity":g,"stroke-linecap":b,"stroke-width":n,"stroke-dasharray":w,class:p})}},{key:"group",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w.globals.dom.Paper.group();return null!==e&&t.attr(e),t}},{key:"move",value:function(e,t){return["M",e,t].join(" ")}},{key:"line",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=[" L",e,t].join(" "):"H"===i?a=[" H",e].join(" "):"V"===i&&(a=[" V",t].join(" ")),a}},{key:"curve",value:function(e,t,i,a,s,r){return["C",e,t,i,a,s,r].join(" ")}},{key:"quadraticCurve",value:function(e,t,i,a){return["Q",e,t,i,a].join(" ")}},{key:"arc",value:function(e,t,i,a,s,r,n){var o="A";arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a");var h=[o,e,t,i,a,s,r,n].join(" ");return h}},{key:"renderPaths",value:function(e){var t,i=e.j,a=e.realIndex,s=e.pathFrom,r=e.pathTo,n=e.stroke,o=e.strokeWidth,h=e.strokeLinecap,c=e.fill,d=e.animationDelay,g=e.initialSpeed,p=e.dataChangeSpeed,f=e.className,b=e.shouldClipToGrid,m=void 0===b||b,w=e.bindEventsOnPaths,k=void 0===w||w,l=e.drawShadow,u=void 0===l||l,x=this.w,y=new _(this.ctx),A=new ie(this.ctx),S=this.w.config.chart.animations.enabled,C=S&&this.w.config.chart.animations.dynamicAnimation.enabled,L=!!(S&&!x.globals.resized||C&&x.globals.dataChanged&&x.globals.shouldAnimate);L?t=s:(t=r,x.globals.animationEnded=!0);var M,I=x.config.stroke.dashArray;M=Array.isArray(I)?I[a]:x.config.stroke.dashArray;var z=this.drawPath({d:t,stroke:n,strokeWidth:o,fill:c,fillOpacity:1,classes:f,strokeLinecap:h,strokeDashArray:M});z.attr("index",a),m&&z.attr({"clip-path":"url(#gridRectMask".concat(x.globals.cuid,")")}),"none"!==x.config.states.normal.filter.type?y.getDefaultFilter(z,a):x.config.chart.dropShadow.enabled&&u&&(!x.config.chart.dropShadow.enabledOnSeries||x.config.chart.dropShadow.enabledOnSeries&&-1!==x.config.chart.dropShadow.enabledOnSeries.indexOf(a))&&y.dropShadow(z,x.config.chart.dropShadow,a),k&&(z.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,z)),z.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,z)),z.node.addEventListener("mousedown",this.pathMouseDown.bind(this,z))),z.attr({pathTo:r,pathFrom:s});var R={el:z,j:i,realIndex:a,pathFrom:s,pathTo:r,fill:c,strokeWidth:o,delay:d};return!S||x.globals.resized||x.globals.dataChanged?!x.globals.resized&&x.globals.dataChanged||A.showDelayedElements():A.animatePathsGradually(E(E({},R),{},{speed:g})),x.globals.dataChanged&&C&&L&&A.animatePathsGradually(E(E({},R),{},{speed:p})),z}},{key:"drawPattern",value:function(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(t,i,function(r){"horizontalLines"===e?r.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===e?r.line(0,0,0,t).stroke({color:a,width:s+1}):"slantedLines"===e?r.line(0,0,t,i).stroke({color:a,width:s}):"squares"===e?r.rect(t,i).fill("none").stroke({color:a,width:s}):"circles"===e&&r.circle(t).fill("none").stroke({color:a,width:s})})}},{key:"drawGradient",value:function(e,t,i,a,s){var r,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,h=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,d=this.w;t.length<9&&0===t.indexOf("#")&&(t=P.hexToRgba(t,a)),i.length<9&&0===i.indexOf("#")&&(i=P.hexToRgba(i,s));var g=0,p=1,f=1,b=null;null!==o&&(g=void 0!==o[0]?o[0]/100:0,p=void 0!==o[1]?o[1]/100:1,f=void 0!==o[2]?o[2]/100:1,b=void 0!==o[3]?o[3]/100:null);var m=!("donut"!==d.config.chart.type&&"pie"!==d.config.chart.type&&"polarArea"!==d.config.chart.type&&"bubble"!==d.config.chart.type);if(r=d.globals.dom.Paper.gradient(m?"radial":"linear",null===h||0===h.length?function(l){l.at(g,t,a),l.at(p,i,s),l.at(f,i,s),null!==b&&l.at(b,t,a)}:function(l){(Array.isArray(h[c])?h[c]:h).forEach(function(u){l.at(u.offset/100,u.color,u.opacity)})}),m){var w=d.globals.gridWidth/2,k=d.globals.gridHeight/2;r.attr("bubble"!==d.config.chart.type?{gradientUnits:"userSpaceOnUse",cx:w,cy:k,r:n}:{cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===e?r.from(0,0).to(0,1):"diagonal"===e?r.from(0,0).to(1,1):"horizontal"===e?r.from(0,1).to(1,1):"diagonal2"===e&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(e){var t=e.text,i=e.maxWidth,r=this.getTextRects(t,e.fontSize,e.fontFamily),o=Math.floor(i/(r.width/t.length));return i-1){var o=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var h=i.globals.dom.Paper.select(".apexcharts-series path").members,c=i.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members,d=function(f){Array.prototype.forEach.call(f,function(b){b.node.setAttribute("selected","false"),a.getDefaultFilter(b,s)})};d(h),d(c)}e.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if("true"===n){var g=i.config.states.active.filter;if("none"!==g)a.applyFilter(e,s,g.type,g.value);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var p=i.config.states.hover.filter;a.applyFilter(e,s,p.type,p.value)}}else"none"!==i.config.states.active.filter.type&&("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice?a.getDefaultFilter(e,s):a.applyFilter(e,s,(p=i.config.states.hover.filter).type,p.value));"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}),t&&this.ctx.events.fireEvent("dataPointSelection",[t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(e){var t={};return e&&"function"==typeof e.getBBox&&(t=e.getBBox()),{x:t.x+t.width/2,y:t.y+t.height/2}}},{key:"getTextRects",value:function(e,t,i,a){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,n=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:t,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),r.globals.dom.Paper.add(n);var o=n.bbox();return s||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(e,t,i){if("function"==typeof e.getComputedTextLength&&(e.textContent=t,t.length>0&&e.getComputedTextLength()>=i/1.1)){for(var a=t.length-3;a>0;a-=3)if(e.getSubStringLength(0,a)<=i/1.1)return void(e.textContent=t.substring(0,a)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&e.setAttribute(i,t[i])}}]),v}(),W=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w}return F(v,[{key:"getStackedSeriesTotals",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.w,i=[];if(0===t.globals.series.length)return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null;return null===e?this.w.config.series.reduce(function(t,i){return t+i},0):this.w.globals.series[e].reduce(function(t,i){return t+i},0)}},{key:"isSeriesNull",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===e?this.w.config.series.filter(function(t){return null!==t}):this.w.config.series[e].data.filter(function(t){return null!==t})).length}},{key:"seriesHaveSameValues",value:function(e){return this.w.globals.series[e].every(function(t,i,a){return t===a[0]})}},{key:"getCategoryLabels",value:function(e){var t=this.w,i=e.slice();return t.config.xaxis.convertedCatToNumeric&&(i=e.map(function(a,s){return t.config.xaxis.labels.formatter(a-t.globals.minX+1)})),i}},{key:"getLargestSeries",value:function(){var e=this.w;e.globals.maxValsInArrayIndex=e.globals.series.map(function(t){return t.length}).indexOf(Math.max.apply(Math,e.globals.series.map(function(t){return t.length})))}},{key:"getLargestMarkerSize",value:function(){var e=this.w,t=0;return e.globals.markers.size.forEach(function(i){t=Math.max(t,i)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(function(i){t=Math.max(t,i.size)}),t>0&&(t+=e.config.markers.hover.sizeOffset+1),e.globals.markers.largestSize=t,t}},{key:"getSeriesTotals",value:function(){var e=this.w;e.globals.seriesTotals=e.globals.series.map(function(t,i){var a=0;if(Array.isArray(t))for(var s=0;se&&i.globals.seriesX[s][n]0&&(t=!0),{comboBarCount:i,comboCharts:t}}},{key:"extendArrayProps",value:function(e,t,i){return t.yaxis&&(t=e.extendYAxis(t,i)),t.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),t.annotations.xaxis&&(t=e.extendXAxisAnnotations(t)),t.annotations.points&&(t=e.extendPointAnnotations(t))),t}}]),v}(),me=function(){function v(e){Y(this,v),this.w=e.w,this.annoCtx=e}return F(v,[{key:"setOrientations",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===e.label.orientation){var a=null!==t?t:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==s){var r=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-r.height+4),s.setAttribute("y","top"===e.label.position?parseFloat(s.getAttribute("y"))+r.width:parseFloat(s.getAttribute("y"))-r.width);var n=this.annoCtx.graphics.rotateAroundCenter(s),o=n.x,h=n.y;s.setAttribute("transform","rotate(-90 ".concat(o," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(e,t){var i=this.w;if(!e||void 0===t.label.text||void 0!==t.label.text&&!String(t.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=e.getBoundingClientRect(),r=t.label.style.padding.left,n=t.label.style.padding.right,o=t.label.style.padding.top,h=t.label.style.padding.bottom;"vertical"===t.label.orientation&&(o=t.label.style.padding.left,h=t.label.style.padding.right,r=t.label.style.padding.top,n=t.label.style.padding.bottom);var g=this.annoCtx.graphics.drawRect(s.left-a.left-r-i.globals.barPadForNumericAxis,s.top-a.top-o,s.width+r+n,s.height+o+h,t.label.borderRadius,t.label.style.background,1,t.label.borderWidth,t.label.borderColor,0);return t.id&&g.node.classList.add(t.id),g}},{key:"annotationsBackground",value:function(){var e=this,t=this.w,i=function(a,s,r){var n=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations .apexcharts-").concat(r,"-annotation-label[rel='").concat(s,"']"));if(n){var o=n.parentNode,h=e.addBackgroundToAnno(n,a);h&&(o.insertBefore(h.node,n),a.label.mouseEnter&&h.node.addEventListener("mouseenter",a.label.mouseEnter.bind(e,a)),a.label.mouseLeave&&h.node.addEventListener("mouseleave",a.label.mouseLeave.bind(e,a)),a.label.click&&h.node.addEventListener("click",a.label.click.bind(e,a)))}};t.config.annotations.xaxis.map(function(a,s){i(a,s,"xaxis")}),t.config.annotations.yaxis.map(function(a,s){i(a,s,"yaxis")}),t.config.annotations.points.map(function(a,s){i(a,s,"point")})}},{key:"getY1Y2",value:function(e,t){var i,a="y1"===e?t.y:t.y2,s=this.w;if(this.annoCtx.invertAxis){var r=s.globals.labels.indexOf(a);s.config.xaxis.convertedCatToNumeric&&(r=s.globals.categoryLabels.indexOf(a));var n=s.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(r+1)+")");n&&(i=parseFloat(n.getAttribute("y")))}else{var o;o=s.config.yaxis[t.yAxisIndex].logarithmic?(a=new W(this.annoCtx.ctx).getLogVal(a,t.yAxisIndex))/s.globals.yLogRatio[t.yAxisIndex]:(a-s.globals.minYArr[t.yAxisIndex])/(s.globals.yRange[t.yAxisIndex]/s.globals.gridHeight),i=s.globals.gridHeight-o,!t.marker||null!=t.y||(i=0),s.config.yaxis[t.yAxisIndex]&&s.config.yaxis[t.yAxisIndex].reversed&&(i=o)}return"string"==typeof a&&a.indexOf("px")>-1&&(i=parseFloat(a)),i}},{key:"getX1X2",value:function(e,t){var i=this.w,a=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,s=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,r=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,n=(t.x-a)/(r/i.globals.gridWidth);this.annoCtx.inversedReversedAxis&&(n=(s-t.x)/(r/i.globals.gridWidth)),"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||(n=this.getStringX(t.x));var o=(t.x2-a)/(r/i.globals.gridWidth);return this.annoCtx.inversedReversedAxis&&(o=(s-t.x2)/(r/i.globals.gridWidth)),"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||(o=this.getStringX(t.x2)),null!=t.x||!t.marker||(n=i.globals.gridWidth),"x1"===e&&"string"==typeof t.x&&t.x.indexOf("px")>-1&&(n=parseFloat(t.x)),"x2"===e&&"string"==typeof t.x2&&t.x2.indexOf("px")>-1&&(o=parseFloat(t.x2)),"x1"===e?n:o}},{key:"getStringX",value:function(e){var t=this.w,i=e;t.config.xaxis.convertedCatToNumeric&&t.globals.categoryLabels.length&&(e=t.globals.categoryLabels.indexOf(e)+1);var a=t.globals.labels.indexOf(e),s=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(a+1)+")");return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),v}(),et=function(){function v(e){Y(this,v),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new me(this.annoCtx)}return F(v,[{key:"addXaxisAnnotation",value:function(e,t,i){var a,s=this.w,r=this.helpers.getX1X2("x1",e),n=e.label.text,o=e.strokeDashArray;if(P.isNumber(r)){if(null==e.x2){var h=this.annoCtx.graphics.drawLine(r+e.offsetX,0+e.offsetY,r+e.offsetX,s.globals.gridHeight+e.offsetY,e.borderColor,o,e.borderWidth);t.appendChild(h.node),e.id&&h.node.classList.add(e.id)}else{if((a=this.helpers.getX1X2("x2",e))n){var c=n;n=a,a=c}var d=this.annoCtx.graphics.drawRect(0+e.offsetX,a+e.offsetY,this._getYAxisAnnotationWidth(e),n-a,0,e.fillColor,e.opacity,1,e.borderColor,r);d.node.classList.add("apexcharts-annotation-rect"),d.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),t.appendChild(d.node),e.id&&d.node.classList.add(e.id)}var p=this.annoCtx.graphics.drawText({x:("right"===e.label.position?s.globals.gridWidth:"center"===e.label.position?s.globals.gridWidth/2:0)+e.label.offsetX,y:(a??n)+e.label.offsetY-3,text:o,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});p.attr({rel:i}),t.appendChild(p.node)}},{key:"_getYAxisAnnotationWidth",value:function(e){var t=this.w;return(e.width.indexOf("%")>-1?t.globals.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10))+e.offsetX}},{key:"drawYAxisAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.map(function(a,s){e.addYaxisAnnotation(a,i.node,s)}),i}}]),v}(),it=function(){function v(e){Y(this,v),this.w=e.w,this.annoCtx=e,this.helpers=new me(this.annoCtx)}return F(v,[{key:"addPointAnnotation",value:function(e,t,i){var a=this.helpers.getX1X2("x1",e),s=this.helpers.getY1Y2("y1",e);if(P.isNumber(a)){var r={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:"apexcharts-point-annotation-marker ".concat(e.marker.cssClass," ").concat(e.id?e.id:"")},n=this.annoCtx.graphics.drawMarker(a+e.marker.offsetX,s+e.marker.offsetY,r);t.appendChild(n.node);var o=e.label.text?e.label.text:"",h=this.annoCtx.graphics.drawText({x:a+e.label.offsetX,y:s+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:o,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});if(h.attr({rel:i}),t.appendChild(h.node),e.customSVG.SVG){var c=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});c.attr({transform:"translate(".concat(a+e.customSVG.offsetX,", ").concat(s+e.customSVG.offsetY,")")}),c.node.innerHTML=e.customSVG.SVG,t.appendChild(c.node)}if(e.image.path){var d=e.image.width?e.image.width:20,g=e.image.height?e.image.height:20;n=this.annoCtx.addImage({x:a+e.image.offsetX-d/2,y:s+e.image.offsetY-g/2,width:d,height:g,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&n.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&n.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e)),e.click&&n.node.addEventListener("click",e.click.bind(this,e))}}},{key:"drawPointAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return t.config.annotations.points.map(function(a,s){e.addPointAnnotation(a,i.node,s)}),i}}]),v}(),Re={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"}}},K=function(){function v(){Y(this,v),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount: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: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 F(v,[{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:[Re],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,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},stacked:!1,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(e){return new Date(e).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:{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,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,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(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(t,i){return t+i},0)/e.globals.series.length+"%"}}}},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(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(t,i){return t+i},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(e){return null!==e?e:""},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,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(e){return e?e+": ":""}}},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},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}}}}}]),v}(),at=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w,this.graphics=new T(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new me(this),this.xAxisAnnotations=new et(this),this.yAxisAnnotations=new tt(this),this.pointsAnnotations=new it(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 F(v,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts){for(var t=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=e.config.chart.animations.enabled,r=[t,i,a],n=[i.node,t.node,a.node],o=0;o<3;o++)e.globals.dom.elGraphical.add(r[o]),!s||e.globals.resized||e.globals.dataChanged||"scatter"!==e.config.chart.type&&"bubble"!==e.config.chart.type&&e.globals.dataPoints>1&&n[o].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:n[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map(function(t,i){e.addImage(t,i)})}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map(function(t,i){e.addText(t,i)})}},{key:"addXaxisAnnotation",value:function(e,t,i){this.xAxisAnnotations.addXaxisAnnotation(e,t,i)}},{key:"addYaxisAnnotation",value:function(e,t,i){this.yAxisAnnotations.addYaxisAnnotation(e,t,i)}},{key:"addPointAnnotation",value:function(e,t,i){this.pointsAnnotations.addPointAnnotation(e,t,i)}},{key:"addText",value:function(e,t){var s=e.text,g=e.backgroundColor,p=e.borderWidth,f=e.strokeDashArray,b=e.borderRadius,m=e.borderColor,w=e.appendTo,k=void 0===w?".apexcharts-annotations":w,l=e.paddingLeft,u=void 0===l?4:l,x=e.paddingRight,y=void 0===x?4:x,A=e.paddingBottom,S=void 0===A?2:A,C=e.paddingTop,L=void 0===C?2:C,I=this.w,M=this.graphics.drawText({x:e.x,y:e.y,text:s,textAnchor:e.textAnchor||"start",fontSize:e.fontSize||"12px",fontWeight:e.fontWeight||"regular",fontFamily:e.fontFamily||I.config.chart.fontFamily,foreColor:e.foreColor||I.config.chart.foreColor,cssClass:e.cssClass}),z=I.globals.dom.baseEl.querySelector(k);z&&z.appendChild(M.node);var X=M.bbox();if(s){var R=this.graphics.drawRect(X.x-u,X.y-L,X.width+u+y,X.height+S+L,b,g||"transparent",1,p,m,f);z.insertBefore(R.node,M.node)}}},{key:"addImage",value:function(e,t){var i=this.w,s=e.x,r=void 0===s?0:s,n=e.y,o=void 0===n?0:n,h=e.width,c=void 0===h?20:h,d=e.height,g=void 0===d?20:d,p=e.appendTo,f=void 0===p?".apexcharts-annotations":p,b=i.globals.dom.Paper.image(e.path);b.size(c,g).move(r,o);var m=i.globals.dom.baseEl.querySelector(f);return m&&m.appendChild(b.node),b}},{key:"addXaxisAnnotationExternal",value:function(e,t,i){return this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(e,t,i){return this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(e,t,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(e){var t=e.params,i=e.pushToMemory,a=e.context,s=e.type,r=e.contextMethod,n=a,o=n.w,h=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),c=h.childNodes.length+1,d=new K,g=Object.assign({},"xaxis"===s?d.xAxisAnnotation:"yaxis"===s?d.yAxisAnnotation:d.pointAnnotation),p=P.extend(g,t);switch(s){case"xaxis":this.addXaxisAnnotation(p,h,c);break;case"yaxis":this.addYaxisAnnotation(p,h,c);break;case"point":this.addPointAnnotation(p,h,c)}var f=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(c,"']")),b=this.helpers.addBackgroundToAnno(f,p);return b&&h.insertBefore(b.node,f),i&&o.globals.memory.methodsToExec.push({context:n,id:p.id?p.id:P.randomId(),method:r,label:"addAnnotation",params:t}),a}},{key:"clearAnnotations",value:function(e){var t=e.w,i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");t.globals.memory.methodsToExec.map(function(a,s){"addText"!==a.label&&"addAnnotation"!==a.label||t.globals.memory.methodsToExec.splice(s,1)}),i=P.listToArray(i),Array.prototype.forEach.call(i,function(a){for(;a.firstChild;)a.removeChild(a.firstChild)})}},{key:"removeAnnotation",value:function(e,t){var i=e.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(t));a&&(i.globals.memory.methodsToExec.map(function(s,r){s.id===t&&i.globals.memory.methodsToExec.splice(r,1)}),Array.prototype.forEach.call(a,function(s){s.parentElement.removeChild(s)}))}}]),v}(),V=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return F(v,[{key:"isValidDate",value:function(e){return!isNaN(this.parseDate(e))}},{key:"getTimeStamp",value:function(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}},{key:"getDate",value:function(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}},{key:"parseDate",value:function(e){var t=Date.parse(e);if(!isNaN(t))return this.getTimeStamp(e);var i=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return this.getTimeStamp(i)}},{key:"parseDateWithTimezone",value:function(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(e,t){var i=this.w.globals.locale,a=this.w.config.xaxis.labels.datetimeUTC,s=["\0"].concat(q(i.months)),r=["\x01"].concat(q(i.shortMonths)),n=["\x02"].concat(q(i.days)),o=["\x03"].concat(q(i.shortDays));function h(S,C){var L=S+"";for(C=C||2;L.length12?p-12:0===p?12:p;t=(t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+h(p))).replace(/(^|[^\\])H/g,"$1"+p)).replace(/(^|[^\\])hh+/g,"$1"+h(f))).replace(/(^|[^\\])h/g,"$1"+f);var b=a?e.getUTCMinutes():e.getMinutes();t=(t=t.replace(/(^|[^\\])mm+/g,"$1"+h(b))).replace(/(^|[^\\])m/g,"$1"+b);var m=a?e.getUTCSeconds():e.getSeconds();t=(t=t.replace(/(^|[^\\])ss+/g,"$1"+h(m))).replace(/(^|[^\\])s/g,"$1"+m);var w=a?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,"$1"+h(w,3)),w=Math.round(w/10),t=t.replace(/(^|[^\\])ff/g,"$1"+h(w)),w=Math.round(w/10);var k=p<12?"AM":"PM";t=(t=(t=t.replace(/(^|[^\\])f/g,"$1"+w)).replace(/(^|[^\\])TT+/g,"$1"+k)).replace(/(^|[^\\])T/g,"$1"+k.charAt(0));var l=k.toLowerCase();t=(t=t.replace(/(^|[^\\])tt+/g,"$1"+l)).replace(/(^|[^\\])t/g,"$1"+l.charAt(0));var u=-e.getTimezoneOffset(),x=a||!u?"Z":u>0?"+":"-";if(!a){var y=(u=Math.abs(u))%60;x+=h(Math.floor(u/60))+":"+h(y)}t=t.replace(/(^|[^\\])K/g,"$1"+x);var A=(a?e.getUTCDay():e.getDay())+1;return(t=(t=(t=(t=t.replace(new RegExp(n[0],"g"),n[A])).replace(new RegExp(o[0],"g"),o[A])).replace(new RegExp(s[0],"g"),s[d])).replace(new RegExp(r[0],"g"),r[d])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,t,i){var a=this.w;void 0!==a.config.xaxis.min&&(e=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(t=a.config.xaxis.max);var s=this.getDate(e),r=this.getDate(t),n=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"calculcateLastDaysOfMonth",value:function(e,t,i){return this.determineDaysOfMonths(e,t)-i}},{key:"determineDaysOfYear",value:function(e){var t=365;return this.isLeapYear(e)&&(t=366),t}},{key:"determineRemainingDaysOfYear",value:function(e,t,i){var a=this.daysCntOfYear[t]+i;return t>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(e,t){var i=30;switch(e=P.monthMod(e),!0){case this.months30.indexOf(e)>-1:2===e&&(i=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:default:i=31}return i}}]),v}(),ce=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return F(v,[{key:"xLabelFormat",value:function(e,t,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 r=new V(this.ctx);return r.formatDate(r.getDate(t),s.config.tooltip.x.format)}return e(t,i,a)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map(function(t){return t}):e}},{key:"defaultYFormatter",value:function(e,t,i){var a=this.w;return P.isNumber(e)&&(e=e.toFixed(0!==a.globals.yValueDecimal?void 0!==t.decimalsInFloat?t.decimalsInFloat:a.globals.yValueDecimal:a.globals.maxYArr[i]-a.globals.minYArr[i]<5?1:0)),e}},{key:"setLabelFormatters",value:function(){var e=this,t=this.w;return t.globals.xaxisTooltipFormatter=function(i){return e.defaultGeneralFormatter(i)},t.globals.ttKeyFormatter=function(i){return e.defaultGeneralFormatter(i)},t.globals.ttZFormatter=function(i){return i},t.globals.legendFormatter=function(i){return e.defaultGeneralFormatter(i)},t.globals.xLabelFormatter=void 0!==t.config.xaxis.labels.formatter?t.config.xaxis.labels.formatter:function(i){if(P.isNumber(i)){if(!t.config.xaxis.convertedCatToNumeric&&"numeric"===t.config.xaxis.type){if(P.isNumber(t.config.xaxis.decimalsInFloat))return i.toFixed(t.config.xaxis.decimalsInFloat);var a=t.globals.maxX-t.globals.minX;return i.toFixed(a>0&&a<100?1:0)}return i.toFixed(t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minYArr<4?1:0)}return i},t.globals.ttKeyFormatter="function"==typeof t.config.tooltip.x.formatter?t.config.tooltip.x.formatter:t.globals.xLabelFormatter,"function"==typeof t.config.xaxis.tooltip.formatter&&(t.globals.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||void 0!==t.config.tooltip.y.formatter)&&(t.globals.ttVal=t.config.tooltip.y),void 0!==t.config.tooltip.z.formatter&&(t.globals.ttZFormatter=t.config.tooltip.z.formatter),void 0!==t.config.legend.formatter&&(t.globals.legendFormatter=t.config.legend.formatter),t.config.yaxis.forEach(function(i,a){t.globals.yLabelFormatters[a]=void 0!==i.labels.formatter?i.labels.formatter:function(s){return t.globals.xyCharts?Array.isArray(s)?s.map(function(r){return e.defaultYFormatter(r,i,a)}):e.defaultYFormatter(s,i,a):s}}),t.globals}},{key:"heatmapLabelFormatters",value:function(){var e=this.w;if("heatmap"===e.config.chart.type){e.globals.yAxisScale[0].result=e.globals.seriesNames.slice();var t=e.globals.seriesNames.reduce(function(i,a){return i.length>a.length?i:a},0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}}]),v}(),Ae=function(v){var e,t=v.isTimeline,i=v.ctx,a=v.seriesIndex,s=v.dataPointIndex,r=v.y1,n=v.y2,o=v.w,h=o.globals.seriesRangeStart[a][s],c=o.globals.seriesRangeEnd[a][s],d=o.globals.labels[s],g=o.config.series[a].name?o.config.series[a].name:"",p=o.globals.ttKeyFormatter,f=o.config.tooltip.y.title.formatter,b={w:o,seriesIndex:a,dataPointIndex:s,start:h,end:c};"function"==typeof f&&(g=f(g,b)),null!==(e=o.config.series[a].data[s])&&void 0!==e&&e.x&&(d=o.config.series[a].data[s].x),t||"datetime"===o.config.xaxis.type&&(d=new ce(i).xLabelFormat(o.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new V(i).formatDate,w:o})),"function"==typeof p&&(d=p(d,b)),Number.isFinite(r)&&Number.isFinite(n)&&(h=r,c=n);var m="",w="",k=o.globals.colors[a];if(void 0===o.config.tooltip.x.formatter)if("datetime"===o.config.xaxis.type){var l=new V(i);m=l.formatDate(l.getDate(h),o.config.tooltip.x.format),w=l.formatDate(l.getDate(c),o.config.tooltip.x.format)}else m=h,w=c;else m=o.config.tooltip.x.formatter(h),w=o.config.tooltip.x.formatter(c);return{start:h,end:c,startVal:m,endVal:w,ylabel:d,color:k,seriesName:g}},Se=function(v){var e=v.color,t=v.seriesName,i=v.ylabel,a=v.start,s=v.end,r=v.seriesIndex,n=v.dataPointIndex,o=v.ctx.tooltip.tooltipLabels.getFormatters(r);a=o.yLbFormatter(a),s=o.yLbFormatter(s);var h=o.yLbFormatter(v.w.globals.series[r][n]),c='\n '.concat(a,'\n - \n ').concat(s,"\n ");return'
'+(t||"")+'
'+i+": "+(v.w.globals.comboCharts?"rangeArea"===v.w.config.series[r].type||"rangeBar"===v.w.config.series[r].type?c:"".concat(h,""):c)+"
"},de=function(){function v(e){Y(this,v),this.opts=e}return F(v,[{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(e){return 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,P.extend(e,{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:"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:"candlestick",value:function(){var e=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){return e._getBoxTooltip(t.w,t.seriesIndex,t.dataPointIndex,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var e=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){return e._getBoxTooltip(t.w,t.seriesIndex,t.dataPointIndex,["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(e,t){var i=t.seriesIndex,a=t.dataPointIndex,s=t.w,r=function(){return s.globals.seriesRangeEnd[i][a]-s.globals.seriesRangeStart[i][a]};return s.globals.comboCharts?"rangeBar"===s.config.series[i].type||"rangeArea"===s.config.series[i].type?r():e:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(e){return e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?(a=(i=Ae(E(E({},t=e),{},{isTimeline:!0}))).color,s=i.seriesName,r=i.ylabel,n=i.startVal,o=i.endVal,Se(E(E({},t),{},{color:a,seriesName:s,ylabel:r,start:n,end:o}))):function(t){var i=Ae(t),a=i.color,s=i.seriesName,r=i.ylabel,n=i.start,o=i.end;return Se(E(E({},t),{},{color:a,seriesName:s,ylabel:r,start:n,end:o}))}(e);var t,i,a,s,r,n,o}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(e){var t,i;return null!==(t=e.plotOptions.bar)&&void 0!==t&&t.barHeight||(e.plotOptions.bar.barHeight=2),null!==(i=e.plotOptions.bar)&&void 0!==i&&i.columnWidth||(e.plotOptions.bar.columnWidth=2),e}},{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(e){return a=(i=Ae(t=e)).color,s=i.seriesName,r=i.ylabel,n=i.start,o=i.end,Se(E(E({},t),{},{color:a,seriesName:s,ylabel:r,start:n,end:o}));var t,i,a,s,r,n,o}}}}},{key:"brush",value:function(e){return P.extend(e,{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(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;var t=e.dataLabels.formatter;return e.yaxis.forEach(function(i,a){e.yaxis[a].min=0,e.yaxis[a].max=100}),"bar"===e.chart.type&&(e.dataLabels.formatter=t||function(i){return"number"==typeof i&&i?i.toFixed(0)+"%":i}),e}},{key:"stackedBars",value:function(){var e=this.bar();return E(E({},e),{},{plotOptions:E(E({},e.plotOptions),{},{bar:E(E({},e.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(e){return e.xaxis.convertedCatToNumeric=!0,e}},{key:"convertCatToNumericXaxis",value:function(e,t,i){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(r){return P.isNumber(r)?Math.floor(r):r};var a=e.xaxis.labels.formatter,s=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return i&&i.length&&(s=i.map(function(r){return Array.isArray(r)?r:String(r)})),s&&s.length&&(e.xaxis.labels.formatter=function(r){return P.isNumber(r)?a(s[Math.floor(r)-1]):a(r)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}},{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(e){return e.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(e){return e.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 this.opts.yaxis[0].tickAmount=this.opts.yaxis[0].tickAmount?this.opts.yaxis[0].tickAmount:6,{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.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(e){return e},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(e,t,i,a,s){var r=e.globals.seriesCandleO[t][i],n=e.globals.seriesCandleH[t][i],o=e.globals.seriesCandleM[t][i],h=e.globals.seriesCandleL[t][i],c=e.globals.seriesCandleC[t][i];return e.config.series[t].type&&e.config.series[t].type!==s?'
\n '.concat(e.config.series[t].name?e.config.series[t].name:"series-"+(t+1),": ").concat(e.globals.series[t][i],"\n
"):'
')+"
".concat(a[0],': ')+r+"
"+"
".concat(a[1],': ')+n+"
"+(o?"
".concat(a[2],': ')+o+"
":"")+"
".concat(a[3],': ')+h+"
"+"
".concat(a[4],': ')+c+"
"}}]),v}(),ge=function(){function v(e){Y(this,v),this.opts=e}return F(v,[{key:"init",value:function(e){var t=e.responsiveOverride,i=this.opts,a=new K,s=new de(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),n={};if(i&&"object"===B(i)){var o,h,c,d,g,p,f={};f=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?s[i.chart.type]():s.line(),i.chart.stacked&&"bar"===i.chart.type&&(f=s.stackedBars()),null!==(o=i.chart.brush)&&void 0!==o&&o.enabled&&(f=s.brush(f)),i.chart.stacked&&"100%"===i.chart.stackType&&(i=s.stacked100(i)),null!==(h=i.plotOptions)&&void 0!==h&&null!==(c=h.bar)&&void 0!==c&&c.isDumbbell&&(i=s.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},t||(i.xaxis.convertedCatToNumeric=!1),(null!==(d=(i=this.checkForCatToNumericXAxis(this.chartType,f,i)).chart.sparkline)&&void 0!==d&&d.enabled||null!==(g=window.Apex.chart)&&void 0!==g&&null!==(p=g.sparkline)&&void 0!==p&&p.enabled)&&(f=s.sparkline(f)),n=P.extend(r,f)}var b=P.extend(n,window.Apex);return r=P.extend(b,i),this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(e,t,i){var a,s,r=new de(i);return("bar"===e||"boxPlot"===e)&&(null===(a=i.plotOptions)||void 0===a||null===(s=a.bar)||void 0===s?void 0:s.horizontal)||"pie"===e||"polarArea"===e||"donut"===e||"radar"===e||"radialBar"===e||"heatmap"===e||!("datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type)||"between"===(i.xaxis.tickPlacement?i.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement)||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(e,t){var i=new K;(void 0===e.yaxis||!e.yaxis||Array.isArray(e.yaxis)&&0===e.yaxis.length)&&(e.yaxis={}),e.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(e.yaxis=P.extend(e.yaxis,window.Apex.yaxis)),e.yaxis=e.yaxis.constructor!==Array?[P.extend(i.yAxis,e.yaxis)]:P.extendArray(e.yaxis,i.yAxis);var a=!1;e.yaxis.forEach(function(r){r.logarithmic&&(a=!0)});var s=e.series;return t&&!s&&(s=t.config.series),a&&s.length!==e.yaxis.length&&s.length&&(e.yaxis=s.map(function(r,n){if(r.name||(s[n].name="series-".concat(n+1)),e.yaxis[n])return e.yaxis[n].seriesName=s[n].name,e.yaxis[n];var o=P.extend(i.yAxis,e.yaxis[0]);return o.show=!1,o})),a&&s.length>1&&s.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes. Please make sure to equalize both."),e}},{key:"extendAnnotations",value:function(e){return void 0===e.annotations&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),this.extendPointAnnotations(e)}},{key:"extendYAxisAnnotations",value:function(e){var t=new K;return e.annotations.yaxis=P.extendArray(void 0!==e.annotations.yaxis?e.annotations.yaxis:[],t.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var t=new K;return e.annotations.xaxis=P.extendArray(void 0!==e.annotations.xaxis?e.annotations.xaxis:[],t.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var t=new K;return e.annotations.points=P.extendArray(void 0!==e.annotations.points?e.annotations.points:[],t.pointAnnotation),e}},{key:"checkForDarkTheme",value:function(e){e.theme&&"dark"===e.theme.mode&&(e.tooltip||(e.tooltip={}),"light"!==e.tooltip.theme&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.chart.background||(e.chart.background="#424242"),e.theme.palette||(e.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(e){var t=e;if(t.tooltip.shared&&t.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"===t.chart.type&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1}return"bar"!==t.chart.type&&"rangeBar"!==t.chart.type||t.tooltip.shared&&"barWidth"===t.xaxis.crosshairs.width&&t.series.length>1&&(t.xaxis.crosshairs.width="tickWidth"),"candlestick"!==t.chart.type&&"boxPlot"!==t.chart.type||t.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(t.chart.type," chart is not supported.")),t.yaxis[0].reversed=!1),t}}]),v}(),De=function(){function v(){Y(this,v)}return F(v,[{key:"initGlobalVars",value:function(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0}},{key:"globalVars",value:function(e){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:e.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:[],yAxisSameScaleIndices:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:"pan"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.pan,selectionEnabled:"selection"===e.chart.toolbar.autoSelected&&e.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,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}}},{key:"init",value:function(e){var t=this.globalVars(e);return this.initGlobalVars(t),t.initialConfig=P.extend({},e),t.initialSeries=P.clone(e.series),t.lastXAxis=P.clone(t.initialConfig.xaxis),t.lastYAxis=P.clone(t.initialConfig.yaxis),t}}]),v}(),st=function(){function v(e){Y(this,v),this.opts=e}return F(v,[{key:"init",value:function(){var e=new ge(this.opts).init({responsiveOverride:!1});return{config:e,globals:(new De).init(e)}}}]),v}(),J=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0}return F(v,[{key:"clippedImgArea",value:function(e){var t=this.w,i=t.config,a=parseInt(t.globals.gridWidth,10),s=parseInt(t.globals.gridHeight,10),r=a>s?a:s,n=e.image,o=0,h=0;void 0===e.width&&void 0===e.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,h=i.fill.image.height):(o=r+1,h=r):(o=e.width,h=e.height);var c=document.createElementNS(t.globals.SVGNS,"pattern");T.setAttrs(c,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:o+"px",height:h+"px"});var d=document.createElementNS(t.globals.SVGNS,"image");c.appendChild(d),d.setAttributeNS(window.SVG.xlink,"href",n),T.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:h+"px"}),d.style.opacity=e.opacity,t.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(e){var t=this.w;return this.seriesIndex=("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)&&t.config.plotOptions.bar.distributed||"heatmap"===t.config.chart.type||"treemap"===t.config.chart.type?e.seriesNumber:e.seriesNumber%t.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(e){var t=this.w;this.opts=e;var i,a,s,r=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var n=this.getFillColors()[this.seriesIndex];void 0!==t.globals.seriesColors[this.seriesIndex]&&(n=t.globals.seriesColors[this.seriesIndex]),"function"==typeof n&&(n=n({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:t}));var o=e.fillType?e.fillType:this.getFillType(this.seriesIndex),h=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity;e.color&&(n=e.color);var c=n;if(-1===n.indexOf("rgb")?n.length<9&&(c=P.hexToRgba(n,h)):n.indexOf("rgba")>-1&&(h=P.getOpacityFromRGBA(n)),e.opacity&&(h=e.opacity),"pattern"===o&&(a=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:a,fillColor:n,fillOpacity:h,defaultColor:c})),"gradient"===o&&(s=this.handleGradientFill({fillConfig:e.fillConfig,fillColor:n,fillOpacity:h,i:this.seriesIndex})),"image"===o){var d=r.fill.image.src,g=e.patternID?e.patternID:"";this.clippedImgArea({opacity:h,image:Array.isArray(d)?e.seriesNumber-1&&(p=P.getOpacityFromRGBA(g));var f=void 0===r.gradient.opacityTo?i:Array.isArray(r.gradient.opacityTo)?r.gradient.opacityTo[s]:r.gradient.opacityTo;if(void 0===r.gradient.gradientToColors||0===r.gradient.gradientToColors.length)n=c.shadeColor("dark"===r.gradient.shade?-1*parseFloat(r.gradient.shadeIntensity):parseFloat(r.gradient.shadeIntensity),t.indexOf("rgb")>-1?P.rgb2hex(t):t);else if(r.gradient.gradientToColors[o.seriesNumber]){var b=r.gradient.gradientToColors[o.seriesNumber];n=b,b.indexOf("rgba")>-1&&(f=P.getOpacityFromRGBA(b))}else n=t;if(r.gradient.gradientFrom&&(g=r.gradient.gradientFrom),r.gradient.gradientTo&&(n=r.gradient.gradientTo),r.gradient.inverseColors){var m=g;g=n,n=m}return g.indexOf("rgb")>-1&&(g=P.rgb2hex(g)),n.indexOf("rgb")>-1&&(n=P.rgb2hex(n)),h.drawGradient(d,g,n,p,f,o.size,r.gradient.stops,r.gradient.colorStops,s)}}]),v}(),ue=function(){function v(e,t){Y(this,v),this.ctx=e,this.w=e.w}return F(v,[{key:"setGlobalMarkerSize",value:function(){var e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],n=this.w,o=t,h=e,c=null,d=new T(this.ctx),g=n.config.markers.discrete&&n.config.markers.discrete.length;if((n.globals.markers.size[t]>0||r||g)&&(c=d.group({class:r||g?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(n.globals.cuid,")")),Array.isArray(h.x))for(var p=0;p0:n.config.markers.size>0)||r||g){P.isNumber(h.y[p])?b+=" w".concat(P.randomId()):b="apexcharts-nullpoint";var m=this.getMarkerConfig({cssClass:b,seriesIndex:t,dataPointIndex:f});n.config.series[o].data[f]&&(n.config.series[o].data[f].fillColor&&(m.pointFillColor=n.config.series[o].data[f].fillColor),n.config.series[o].data[f].strokeColor&&(m.pointStrokeColor=n.config.series[o].data[f].strokeColor)),a&&(m.pSize=a),(h.x[p]<0||h.x[p]>n.globals.gridWidth||h.y[p]<0||h.y[p]>n.globals.gridHeight)&&(m.pSize=0),(s=d.drawMarker(h.x[p],h.y[p],m)).attr("rel",f),s.attr("j",f),s.attr("index",t),s.node.setAttribute("default-marker-size",m.pSize),new _(this.ctx).setSelectionFilter(s,t,f),this.addEvents(s),c&&c.add(s)}else void 0===n.globals.pointsArray[t]&&(n.globals.pointsArray[t]=[]),n.globals.pointsArray[t].push([h.x[p],h.y[p]])}return c}},{key:"getMarkerConfig",value:function(e){var t=e.cssClass,i=e.seriesIndex,a=e.dataPointIndex,s=void 0===a?null:a,r=e.finishRadius,n=void 0===r?null:r,o=this.w,h=this.getMarkerStyle(i),c=o.globals.markers.size[i],d=o.config.markers;return null!==s&&d.discrete.length&&d.discrete.map(function(g){g.seriesIndex===i&&g.dataPointIndex===s&&(h.pointStrokeColor=g.strokeColor,h.pointFillColor=g.fillColor,c=g.size,h.pointShape=g.shape)}),{pSize:null===n?c:n,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:h.pointStrokeColor,pointFillColor:h.pointFillColor,shape:h.pointShape||(Array.isArray(d.shape)?d.shape[i]:d.shape),class:t,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(e){var t=this.w,i=new T(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",t.config.markers.onClick),e.node.addEventListener("dblclick",t.config.markers.onDblClick),e.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var t=this.w,i=t.globals.markers.colors,a=t.config.markers.strokeColor||t.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[e]:a,pointFillColor:Array.isArray(i)?i[e]:i}}}]),v}(),He=function(){function v(e){Y(this,v),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 F(v,[{key:"draw",value:function(e,t,i){var a=this.w,s=new T(this.ctx),r=i.realIndex,n=i.pointsPos,o=i.zRatio,h=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(n.x))for(var d=0;dm.maxBubbleRadius&&(b=m.maxBubbleRadius)}a.config.chart.animations.enabled||(f=b);var k=n.y[d];if(f=f||0,null!==k&&void 0!==a.globals.series[r][g]||(p=!1),p){var l=this.drawPoint(n.x[d],k,f,b,r,g,t);c.add(l)}h.add(c)}}},{key:"drawPoint",value:function(e,t,i,a,s,r,n){var o=this.w,h=s,c=new ie(this.ctx),d=new _(this.ctx),g=new J(this.ctx),p=new ue(this.ctx),f=new T(this.ctx),b=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:h,dataPointIndex:r,finishRadius:"bubble"===o.config.chart.type||o.globals.comboCharts&&o.config.series[s]&&"bubble"===o.config.series[s].type?a:null});a=b.pSize;var m,w=g.fillPath({seriesNumber:s,dataPointIndex:r,color:b.pointFillColor,patternUnits:"objectBoundingBox",value:o.globals.series[s][n]});if("circle"===b.shape?m=f.drawCircle(i):"square"!==b.shape&&"rect"!==b.shape||(m=f.drawRect(0,0,b.width-b.pointStrokeWidth/2,b.height-b.pointStrokeWidth/2,b.pRadius)),o.config.series[h].data[r]&&o.config.series[h].data[r].fillColor&&(w=o.config.series[h].data[r].fillColor),m.attr({x:e-b.width/2-b.pointStrokeWidth/2,y:t-b.height/2-b.pointStrokeWidth/2,cx:e,cy:t,fill:w,"fill-opacity":b.pointFillOpacity,stroke:b.pointStrokeColor,r:a,"stroke-width":b.pointStrokeWidth,"stroke-dasharray":b.pointStrokeDashArray,"stroke-opacity":b.pointStrokeOpacity}),o.config.chart.dropShadow.enabled&&d.dropShadow(m,o.config.chart.dropShadow,s),!this.initialAnim||o.globals.dataChanged||o.globals.resized?o.globals.animationEnded=!0:c.animateMarker(m,0,"circle"===b.shape?a:{width:b.width,height:b.height},o.config.chart.animations.speed,o.globals.easing,function(){window.setTimeout(function(){c.animationCompleted(m)},100)}),o.globals.dataChanged&&"circle"===b.shape)if(this.dynamicAnim){var u,x,y,A,S=o.config.chart.animations.dynamicAnimation.speed;null!=(A=o.globals.previousPaths[s]&&o.globals.previousPaths[s][n])&&(u=A.x,x=A.y,y=void 0!==A.r?A.r:a);for(var C=0;Co.globals.gridHeight+g&&(t=o.globals.gridHeight+g/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:e,y:t,width:d,height:g}),void 0!==o.globals.dataLabelsRects[a][o.globals.dataLabelsRects[a].length-2]){var b=o.globals.dataLabelsRects[a][void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0];(e>b.x+b.width+2||t>b.y+b.height+2||e+dt.globals.gridWidth+m.textRects.width+10)&&(o="");var w=t.globals.dataLabels.style.colors[r];(("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(w=t.globals.dataLabels.style.colors[n]),"function"==typeof w&&(w=w({series:t.globals.series,seriesIndex:r,dataPointIndex:n,w:t})),p&&(w=p);var k=g.offsetX,l=g.offsetY;if("bar"!==t.config.chart.type&&"rangeBar"!==t.config.chart.type||(k=0,l=0),m.drawnextLabel){var u=i.drawText({width:100,height:parseInt(g.style.fontSize,10),x:a+k,y:s+l,foreColor:w,textAnchor:h||g.textAnchor,text:o,fontSize:c||g.style.fontSize,fontFamily:g.style.fontFamily,fontWeight:g.style.fontWeight||"normal"});if(u.attr({class:"apexcharts-datalabel",cx:a,cy:s}),g.dropShadow.enabled){var x=g.dropShadow;new _(this.ctx).dropShadow(u,x)}d.add(u),void 0===t.globals.lastDrawnDataLabelsIndexes[r]&&(t.globals.lastDrawnDataLabelsIndexes[r]=[]),t.globals.lastDrawnDataLabelsIndexes[r].push(n)}}}},{key:"addBackgroundToDataLabel",value:function(e,t){var i=this.w,a=i.config.dataLabels.background,s=a.padding,r=a.padding/2,n=t.width,o=t.height,h=new T(this.ctx).drawRect(t.x-s,t.y-r/2,n+2*s,o+r,a.borderRadius,"transparent"===i.config.chart.background?"#fff":i.config.chart.background,a.opacity,a.borderWidth,a.borderColor);return a.dropShadow.enabled&&new _(this.ctx).dropShadow(h,a.dropShadow),h}},{key:"dataLabelsBackground",value:function(){var e=this.w;if("bubble"!==e.config.chart.type)for(var t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,s=P.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,e&&(t&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var t=this.w,i=0;i-1&&(e[i].data=[]);return e}},{key:"toggleSeriesOnHover",value:function(e,t){var i=this.w;t||(t=e.target);var a=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels");if("mousemove"===e.type){var s=parseInt(t.getAttribute("rel"),10)-1,r=null,n=null;i.globals.axisCharts||"radialBar"===i.config.chart.type?i.globals.axisCharts?(r=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(s,"']")),n=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(s,"']"))):r=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(s+1,"']")):r=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(s+1,"'] path"));for(var o=0;o=o.from&&c<=o.to&&s[h].classList.remove(i.legendInactiveClass)}}(a.config.plotOptions.heatmap.colorScale.ranges[n])}else"mouseout"===e.type&&r("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"asc",t=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(n,o){return n.data&&n.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(o)&&(!i.globals.comboCharts||0===t.length||t.length&&t.indexOf(i.config.series[o].type)>-1)?o:-1}),r="asc"===e?0:s.length-1;"asc"===e?r=0;"asc"===e?r++:r--)if(-1!==s[r]){a=s[r];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map(function(e,t){return"bar"===e.type||"column"===e.type?t:-1}).filter(function(e){return-1!==e}):this.w.config.series.map(function(e,t){return t})}},{key:"getPreviousPaths",value:function(){var e=this.w;function t(r,n,o){for(var h=r[n].childNodes,c={type:o,paths:[],realIndex:r[n].getAttribute("data:realIndex")},d=0;d0)for(var a=function(r){for(var n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(r,"'] rect")),o=[],h=function(d){var g=function(f){return n[d].getAttribute(f)},p={x:parseFloat(g("x")),y:parseFloat(g("y")),width:parseFloat(g("width")),height:parseFloat(g("height"))};o.push({rect:p,color:n[d].getAttribute("color")})},c=0;c0)for(var a=0;a0?t:[]})}}]),v}(),Oe=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new W(this.ctx)}return F(v,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),t=new $(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&null!==e[this.activeSeriesIndex].data[0]&&void 0!==e[this.activeSeriesIndex].data[0].x&&null!==e[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var e=this.w.config.series.slice(),t=new $(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&null!=e[this.activeSeriesIndex].data[0]&&e[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(e,t){for(var i=this.w.config,a=this.w.globals,s="boxPlot"===i.chart.type||"boxPlot"===i.series[t].type,r=0;r=5?e[t].data[r][4]:e[t].data[r][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var n=new Date(e[t].data[r][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(e[t].data[r][0]);for(var o=0;o-1&&(r=this.activeSeriesIndex);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.ctx,s=this.w.config,r=this.w.globals,n=new V(a),o=s.labels.length>0?s.labels.slice():s.xaxis.categories.slice();if(r.isRangeBar="rangeBar"===s.chart.type&&r.isBarHorizontal,r.hasXaxisGroups="category"===s.xaxis.type&&s.xaxis.group.groups.length>0,r.hasXaxisGroups&&(r.groups=s.xaxis.group.groups),r.hasSeriesGroups=null===(t=e[0])||void 0===t?void 0:t.group,r.hasSeriesGroups){var h=[],c=q(new Set(e.map(function(f){return f.group})));e.forEach(function(f,b){var m=c.indexOf(f.group);h[m]||(h[m]=[]),h[m].push(f.name)}),r.seriesGroups=h}for(var d=function(){for(var f=0;f0&&(this.twoDSeriesX=o,r.seriesX.push(this.twoDSeriesX))),r.labels.push(this.twoDSeriesX);var p=e[g].data.map(function(f){return P.parseNumber(f)});r.series.push(p)}r.seriesZ.push(this.threeDSeries),r.seriesNames.push(void 0!==e[g].name?e[g].name:"series-"+parseInt(g+1,10)),r.seriesColors.push(void 0!==e[g].color?e[g].color:void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var t=this.w.globals,i=this.w.config;t.series=e.slice(),t.seriesNames=i.labels.slice();for(var a=0;a0?i.labels=t.xaxis.categories:t.labels.length>0?i.labels=t.labels.slice():this.fallbackToCategory?(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map(function(a){a.forEach(function(s){i.labels.indexOf(s.x)<0&&s.x&&i.labels.push(s.x)})}),i.labels=i.labels.filter(function(a,s,r){return r.indexOf(a)===s})),t.xaxis.convertedCatToNumeric&&(new de(t).convertCatToNumericXaxis(t,this.ctx,i.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var t=this.w.globals,i=this.w.config,a=[];if(t.axisCharts){if(t.series.length>0)if(this.isFormatXY())for(var s=i.series.map(function(d,g){return d.data.filter(function(p,f,b){return b.findIndex(function(m){return m.x===p.x})===f})}),r=s.reduce(function(d,g,p,f){return f[d].length>g.length?d:p},0),n=0;n4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",n=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,h=void 0===e[a]?"":e[a],c=h,d=o.globals.xLabelFormatter,g=o.config.xaxis.labels.formatter,p=!1,f=new ce(this.ctx),b=h;n&&(c=f.xLabelFormat(d,h,b,{i:a,dateFormatter:new V(this.ctx).formatDate,w:o}),void 0!==g&&(c=g(h,e[a],{i:a,dateFormatter:new V(this.ctx).formatDate,w:o}))),t.length>0?(m=t[a].unit,w=null,t.forEach(function(x){"month"===x.unit?w="year":"day"===x.unit?w="month":"hour"===x.unit?w="day":"minute"===x.unit&&(w="hour")}),p=w===m,i=t[a].position,c=t[a].value):"datetime"===o.config.xaxis.type&&void 0===g&&(c=""),void 0===c&&(c=""),c=Array.isArray(c)?c:c.toString();var k=new T(this.ctx),l={};l=o.globals.rotateXLabels&&n?k.getTextRects(c,parseInt(r,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):k.getTextRects(c,parseInt(r,10));var u=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(c)&&(0===c.indexOf("NaN")||0===c.toLowerCase().indexOf("invalid")||c.toLowerCase().indexOf("infinity")>=0||s.indexOf(c)>=0&&u)&&(c=""),{x:i,text:c,textRect:l,isBold:p}}},{key:"checkLabelBasedOnTickamount",value:function(e,t,i){var a=this.w,s=a.config.xaxis.tickAmount;return"dataPoints"===s&&(s=Math.round(a.globals.gridWidth/120)),s>i||e%Math.round(i/(s+1))==0||(t.text=""),t}},{key:"checkForOverflowingLabels",value:function(e,t,i,a,s){var r=this.w;if(0===e&&r.globals.skipFirstTimelinelabel&&(t.text=""),e===i-1&&r.globals.skipLastTimelinelabel&&(t.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=s[s.length-1];t.x0){!0===o.config.yaxis[s].opposite&&(e+=a.width);for(var d=t;d>=0;d--){var g=c+t/10+o.config.yaxis[s].labels.offsetY-1;o.globals.isBarHorizontal&&(g=r*d),"heatmap"===o.config.chart.type&&(g+=r/2);var p=h.drawLine(e+i.offsetX-a.width+a.offsetX,g+a.offsetY,e+i.offsetX+a.offsetX,g+a.offsetY,a.color);n.add(p),c+=r}}}}]),v}(),ve=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w}return F(v,[{key:"scaleSvgNode",value:function(e,t){var i=parseFloat(e.getAttributeNS(null,"width")),a=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",i*t),e.setAttributeNS(null,"height",a*t),e.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"fixSvgStringForIe11",value:function(e){if(!P.isIE11())return e.replace(/ /g," ");var t=0,i=e.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,function(a){return 2==++t?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':a});return(i=i.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(e){null==e&&(e=1);var t=this.w.globals.dom.Paper.svg();if(1!==e){var i=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(i,e),t=(new XMLSerializer).serializeToString(i)}return this.fixSvgStringForIe11(t)}},{key:"cleanup",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=e.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,function(s){s.setAttribute("width",0)}),t&&t[0]&&(t[0].setAttribute("x",-500),t[0].setAttribute("x1",-500),t[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 e=this.getSvgString(),t=new Blob([e],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(t)}},{key:"dataURI",value:function(e){var t=this;return new Promise(function(i){var a=t.w,s=e?e.scale||e.width/a.globals.svgWidth:1;t.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*s,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var n="transparent"===a.config.chart.background?"#fff":a.config.chart.background,o=r.getContext("2d");o.fillStyle=n,o.fillRect(0,0,r.width*s,r.height*s);var h=t.getSvgString(s);if(window.canvg&&P.isIE11()){var c=window.canvg.Canvg.fromString(o,h,{ignoreClear:!0,ignoreDimensions:!0});c.start();var d=r.msToBlob();c.stop(),i({blob:d})}else{var g="data:image/svg+xml,"+encodeURIComponent(h),p=new Image;p.crossOrigin="anonymous",p.onload=function(){if(o.drawImage(p,0,0),r.msToBlob){var f=r.msToBlob();i({blob:f})}else{var b=r.toDataURL("image/png");i({imgURI:b})}},p.src=g}})}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.filename,".svg")}},{key:"exportToPng",value:function(){var e=this;this.dataURI().then(function(t){var i=t.imgURI,a=t.blob;a?navigator.msSaveOrOpenBlob(a,e.w.globals.chartID+".png"):e.triggerDownload(i,e.w.config.chart.toolbar.export.png.filename,".png")})}},{key:"exportToCSV",value:function(e){var t=this,i=e.series,a=e.fileName,s=e.columnDelimiter,r=void 0===s?",":s,n=e.lineDelimiter,o=void 0===n?"\n":n,h=this.w;i||(i=h.config.series);var c=[],d=[],g="",p=h.globals.series.map(function(l,u){return-1===h.globals.collapsedSeriesIndices.indexOf(u)?l:[]}),f=Math.max.apply(Math,q(i.map(function(l){return l.data?l.data.length:0}))),b=new Oe(this.ctx),m=new ee(this.ctx),w=function(l){var u="";if(h.globals.axisCharts){if("category"===h.config.xaxis.type||h.config.xaxis.convertedCatToNumeric)if(h.globals.isBarHorizontal){var x=h.globals.yLabelFormatters[0],y=new $(t.ctx).getActiveConfigSeriesIndex();u=x(h.globals.labels[l],{seriesIndex:y,dataPointIndex:l,w:h})}else u=m.getLabel(h.globals.labels,h.globals.timescaleLabels,0,l).text;"datetime"===h.config.xaxis.type&&(h.config.xaxis.categories.length?u=h.config.xaxis.categories[l]:h.config.labels.length&&(u=h.config.labels[l]))}else u=h.config.labels[l];return Array.isArray(u)&&(u=u.join(" ")),P.isNumber(u)?u:u.split(r).join("")};c.push(h.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===h.config.chart.type?(c.push("minimum"),c.push("q1"),c.push("median"),c.push("q3"),c.push("maximum")):"candlestick"===h.config.chart.type?(c.push("open"),c.push("high"),c.push("low"),c.push("close")):"rangeBar"===h.config.chart.type?(c.push("minimum"),c.push("maximum")):i.map(function(l,u){var x=l.name?l.name:"series-".concat(u);h.globals.axisCharts&&c.push(x.split(r).join("")?x.split(r).join(""):"series-".concat(u))}),h.globals.axisCharts||(c.push(h.config.chart.toolbar.export.csv.headerValue),d.push(c.join(r))),i.map(function(l,u){h.globals.axisCharts?function(l,u){if(c.length&&0===u&&d.push(c.join(r)),l.data){l.data=l.data.length&&l.data||q(Array(f)).map(function(){return""});for(var x=0;x=10?h.config.chart.toolbar.export.csv.dateFormatter(y):P.isNumber(y)?y:y.split(r).join(""));for(var A=0;A0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],this.offY="top"===i.config.xaxis.position?0:i.globals.gridHeight+1,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.xaxisBorderWidth=i.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=i.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth=this.xaxisBorderWidth.indexOf("%")>-1?i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}return F(v,[{key:"drawXaxis",value:function(){var e=this.w,t=new T(this.ctx),i=t.group({class:"apexcharts-xaxis",transform:"translate(".concat(e.config.xaxis.offsetX,", ").concat(e.config.xaxis.offsetY,")")}),a=t.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});i.add(a);for(var s=[],r=0;r6&&void 0!==arguments[6]?arguments[6]:{},c=[],d=[],g=this.w,p=h.xaxisFontSize||this.xaxisFontSize,f=h.xaxisFontFamily||this.xaxisFontFamily,b=h.xaxisForeColors||this.xaxisForeColors,m=h.fontWeight||g.config.xaxis.labels.style.fontWeight,w=h.cssClass||g.config.xaxis.labels.style.cssClass,k=g.globals.padHorizontal,l=a.length,u="category"===g.config.xaxis.type?g.globals.dataPoints:l;if(0===u&&l>u&&(u=l),s){var x=u>1?u-1:u;k=k+r(0,n=g.globals.gridWidth/x)/2+g.config.xaxis.labels.offsetX}else k=k+r(0,n=g.globals.gridWidth/u)+g.config.xaxis.labels.offsetX;for(var y=function(S){var C=k-r(S,n)/2+g.config.xaxis.labels.offsetX;0===S&&1===l&&n/2===k&&1===u&&(C=g.globals.gridWidth/2);var L=o.axesUtils.getLabel(a,g.globals.timescaleLabels,C,S,c,p,e),I=28;if(g.globals.rotateXLabels&&e&&(I=22),g.config.xaxis.title.text&&"top"===g.config.xaxis.position&&(I+=parseFloat(g.config.xaxis.title.style.fontSize)+2),e||(I=I+parseFloat(p)+(g.globals.xAxisLabelsHeight-g.globals.xAxisGroupLabelsHeight)+(g.globals.rotateXLabels?10:0)),L=void 0!==g.config.xaxis.tickAmount&&"dataPoints"!==g.config.xaxis.tickAmount&&"datetime"!==g.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(S,L,l):o.axesUtils.checkForOverflowingLabels(S,L,l,c,d),g.config.xaxis.labels.show){var M=t.drawText({x:L.x,y:o.offY+g.config.xaxis.labels.offsetY+I-("top"===g.config.xaxis.position?g.globals.xAxisHeight+g.config.xaxis.axisTicks.height-2:0),text:L.text,textAnchor:"middle",fontWeight:L.isBold?600:m,fontSize:p,fontFamily:f,foreColor:Array.isArray(b)?e&&g.config.xaxis.convertedCatToNumeric?b[g.globals.minX+S-1]:b[S]:b,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+w});if(i.add(M),M.on("click",function(X){if("function"==typeof g.config.chart.events.xAxisLabelClick){var R=Object.assign({},g,{labelIndex:S});g.config.chart.events.xAxisLabelClick(X,o.ctx,R)}}),e){var z=document.createElementNS(g.globals.SVGNS,"title");z.textContent=Array.isArray(L.text)?L.text.join(" "):L.text,M.node.appendChild(z),""!==L.text&&(c.push(L.text),d.push(L))}}Sa.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(t=t+r+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(t=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new T(this.ctx).drawLine(e+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,t+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,t=[],i=this.xaxisLabels.length,a=e.globals.padHorizontal;if(e.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>e.globals.gridWidth&&!e.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var g=0;g0&&(this.xaxisLabels=t.globals.timescaleLabels.slice())}return F(v,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w,i=new T(this.ctx);null===e&&(e=i.group({class:"apexcharts-grid"}));var a=i.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.globals.gridHeight,"transparent"),s=i.drawLine(t.globals.padHorizontal,t.globals.gridHeight,t.globals.gridWidth,t.globals.gridHeight,"transparent");return e.add(s),e.add(a),e}},{key:"drawGrid",value:function(){var e=null;return this.w.globals.axisCharts&&(e=this.renderGrid(),this.drawGridArea(e.el)),e}},{key:"createGridMask",value:function(){var e=this.w,t=e.globals,i=new T(this.ctx),a=Array.isArray(e.config.stroke.width)?0:e.config.stroke.width;if(Array.isArray(e.config.stroke.width)){var s=0;e.config.stroke.width.forEach(function(d){s=Math.max(s,d)}),a=s}t.dom.elGridRectMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(t.cuid)),t.dom.elGridRectMarkerMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(t.cuid)),t.dom.elForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elForecastMask.setAttribute("id","forecastMask".concat(t.cuid)),t.dom.elNonForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(t.cuid));var r=e.config.chart.type,n=0,o=0;("bar"===r||"rangeBar"===r||"candlestick"===r||"boxPlot"===r||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(o=e.config.grid.padding.right,t.barPadForNumericAxis>(n=e.config.grid.padding.left)&&(n=t.barPadForNumericAxis,o=t.barPadForNumericAxis)),t.dom.elGridRect=i.drawRect(-a/2-n-2,-a/2,t.gridWidth+a+o+n+4,t.gridHeight+a,0,"#fff");var h=e.globals.markers.largestSize+1;t.dom.elGridRectMarker=i.drawRect(2*-h,2*-h,t.gridWidth+4*h,t.gridHeight+4*h,0,"#fff"),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);var c=t.dom.baseEl.querySelector("defs");c.appendChild(t.dom.elGridRectMask),c.appendChild(t.dom.elForecastMask),c.appendChild(t.dom.elNonForecastMask),c.appendChild(t.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(e){var t=e.i,i=e.x1,n=e.xCount,h=this.w;if(!(0===t&&h.globals.skipFirstTimelinelabel||t===n-1&&h.globals.skipLastTimelinelabel&&!h.config.xaxis.labels.formatter||"radar"===h.config.chart.type)){h.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:i,y1:e.y1,x2:e.x2,y2:e.y2,xCount:n,parent:e.parent});var c=0;if(h.globals.hasXaxisGroups&&"between"===h.config.xaxis.tickPlacement){var d=h.globals.groups;if(d){for(var g=0,p=0;g2));s++);return!e.globals.isBarHorizontal||this.isRangeBar?(i=this.xaxisLabels.length,this.isRangeBar&&(i--,a=e.globals.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(i=e.config.xaxis.tickAmount)),this._drawXYLines({xCount:i,tickAmount:a})):this._drawInvertedXYLines({xCount:i=a,tickAmount:a=e.globals.xTickAmount}),this.drawGridBands(i,a),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.globals.gridWidth/i}}},{key:"drawGridBands",value:function(e,t){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/t,r=i.globals.gridWidth,n=0,o=0;n=i.config.grid.row.colors.length&&(o=0),this._drawGridBandRect({c:o,x1:0,y1:a,x2:r,y2:s,type:"row"}),a+=i.globals.gridHeight/t;if(void 0!==i.config.grid.column.colors&&i.config.grid.column.colors.length>0)for(var h=i.globals.isBarHorizontal||"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric?e:e-1,c=i.globals.padHorizontal,d=i.globals.padHorizontal+i.globals.gridWidth/h,g=i.globals.gridHeight,p=0,f=0;p=i.config.grid.column.colors.length&&(f=0),this._drawGridBandRect({c:f,x1:c,y1:0,x2:d,y2:g,type:"column"}),c+=i.globals.gridWidth/h}}]),v}(),se=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w}return F(v,[{key:"niceScale",value:function(e,t){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?arguments[4]:void 0,r=this.w,n=Math.abs(t-e);if("dataPoints"===(i=this._adjustTicksForSmallRange(i,a,n))&&(i=r.globals.dataPoints-1),e===Number.MIN_VALUE&&0===t||!P.isNumber(e)&&!P.isNumber(t)||e===Number.MIN_VALUE&&t===-Number.MAX_VALUE)return this.linearScale(e=0,t=i,i);e>t?(console.warn("axis.min cannot be greater than axis.max"),t=e+.1):e===t&&(e=0===e?0:e-.5,t=0===t?2:t+.5);var o=[];n<1&&s&&("candlestick"===r.config.chart.type||"candlestick"===r.config.series[a].type||"boxPlot"===r.config.chart.type||"boxPlot"===r.config.series[a].type||r.globals.isRangeData)&&(t*=1.01);var h=i+1;h<2?h=2:h>2&&(h-=2);var c=n/h,d=Math.floor(P.log10(c)),g=Math.pow(10,d),p=Math.round(c/g);p<1&&(p=1);var f=p*g,b=f*Math.floor(e/f),m=f*Math.ceil(t/f),w=b;if(s&&n>2){for(;o.push(w),!((w+=f)>m););return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}var k=e;(o=[]).push(k);for(var l=Math.abs(t-e)/i,u=0;u<=i;u++)o.push(k+=l);return o[o.length-2]>=t&&o.pop(),{result:o,niceMin:o[0],niceMax:o[o.length-1]}}},{key:"linearScale",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3?arguments[3]:void 0,s=Math.abs(t-e);"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,s))&&(i=this.w.globals.dataPoints-1);var r=s/i;i===Number.MAX_VALUE&&(i=10,r=1);for(var n=[],o=e;i>=0;)n.push(o),o+=r,i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(e,t,i){t<=0&&(t=Math.max(e,i)),e<=0&&(e=Math.min(t,i));for(var a=[],s=Math.ceil(Math.log(t)/Math.log(i)+1),r=Math.floor(Math.log(e)/Math.log(i));r5?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=this.logarithmicScale(t,i,r.logBase),a.yAxisScale[e]=r.forceNiceScale?this.logarithmicScaleNice(t,i,r.logBase):this.logarithmicScale(t,i,r.logBase)):i!==-Number.MAX_VALUE&&P.isNumber(i)?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=void 0===r.min&&void 0===r.max||r.forceNiceScale?this.niceScale(t,i,r.tickAmount?r.tickAmount:n<5&&n>1?n+1:5,e,void 0===s.yaxis[e].max&&void 0===s.yaxis[e].min||s.yaxis[e].forceNiceScale):this.linearScale(t,i,r.tickAmount,e)):a.yAxisScale[e]=this.linearScale(0,5,5)}},{key:"setXScale",value:function(e,t){var i=this.w,a=i.globals,s=i.config.xaxis,r=Math.abs(t-e);return a.xAxisScale=t!==-Number.MAX_VALUE&&P.isNumber(t)?this.linearScale(e,t,s.tickAmount?s.tickAmount:r<5&&r>1?r+1:5,0):this.linearScale(0,5,5),a.xAxisScale}},{key:"setMultipleYScales",value:function(){var e=this,t=this.w.globals,i=this.w.config,a=t.minYArr.concat([]),s=t.maxYArr.concat([]),r=[];i.yaxis.forEach(function(n,o){var h=o;i.series.forEach(function(g,p){g.name===n.seriesName&&(h=p,r.push(o!==p?{index:p,similarIndex:o,alreadyExists:!0}:{index:p}))}),e.setYScaleForIndex(o,a[h],s[h])}),this.sameScaleInMultipleAxes(a,s,r)}},{key:"sameScaleInMultipleAxes",value:function(e,t,i){var a=this,s=this.w.config,r=this.w.globals,n=[];i.forEach(function(b){b.alreadyExists&&(void 0===n[b.index]&&(n[b.index]=[]),n[b.index].push(b.index),n[b.index].push(b.similarIndex))}),r.yAxisSameScaleIndices=n,n.forEach(function(b,m){n.forEach(function(w,k){var l,u;m!==k&&(l=b,u=w,l.filter(function(x){return-1!==u.indexOf(x)})).length>0&&(n[m]=n[m].concat(n[k]))})});var o=n.map(function(b){return b.filter(function(m,w){return b.indexOf(m)===w})}).map(function(b){return b.sort()});n=n.filter(function(b){return!!b});var h=o.slice(),c=h.map(function(b){return JSON.stringify(b)});h=h.filter(function(b,m){return c.indexOf(JSON.stringify(b))===m});var d=[],g=[];e.forEach(function(b,m){h.forEach(function(w,k){w.indexOf(m)>-1&&(void 0===d[k]&&(d[k]=[],g[k]=[]),d[k].push({key:m,value:b}),g[k].push({key:m,value:t[m]}))})});var p=Array.apply(null,Array(h.length)).map(Number.prototype.valueOf,Number.MIN_VALUE),f=Array.apply(null,Array(h.length)).map(Number.prototype.valueOf,-Number.MAX_VALUE);d.forEach(function(b,m){b.forEach(function(w,k){p[m]=Math.min(w.value,p[m])})}),g.forEach(function(b,m){b.forEach(function(w,k){f[m]=Math.max(w.value,f[m])})}),e.forEach(function(b,m){g.forEach(function(w,k){var l=p[k],u=f[k];s.chart.stacked&&(u=0,w.forEach(function(x,y){x.value!==-Number.MAX_VALUE&&(u+=x.value),l!==Number.MIN_VALUE&&(l+=d[k][y].value)})),w.forEach(function(x,y){w[y].key===m&&(void 0!==s.yaxis[m].min&&(l="function"==typeof s.yaxis[m].min?s.yaxis[m].min(r.minY):s.yaxis[m].min),void 0!==s.yaxis[m].max&&(u="function"==typeof s.yaxis[m].max?s.yaxis[m].max(r.maxY):s.yaxis[m].max),a.setYScaleForIndex(m,l,u))})})})}},{key:"autoScaleY",value:function(e,t,i){e||(e=this);var a=e.w;if(a.globals.isMultipleYAxis||a.globals.collapsedSeries.length)return console.warn("autoScaleYaxis is not supported in a multi-yaxis chart."),t;var s=a.globals.seriesX[0],r=a.config.chart.stacked;return t.forEach(function(n,o){for(var h=0,c=0;c=i.xaxis.min){h=c;break}var d,g,p=a.globals.minYArr[o],f=a.globals.maxYArr[o],b=a.globals.stackedSeriesTotals;a.globals.series.forEach(function(m,w){var k=m[h];r?(d=g=k=b[h],b.forEach(function(l,u){s[u]<=i.xaxis.max&&s[u]>=i.xaxis.min&&(l>g&&null!==l&&(g=l),m[u]=i.xaxis.min){var x=l,y=l;a.globals.series.forEach(function(A,S){null!==l&&(x=Math.min(A[u],x),y=Math.max(A[u],y))}),y>g&&null!==y&&(g=y),xp&&(d=p),t.length>1?(t[w].min=void 0===n.min?d:n.min,t[w].max=void 0===n.max?g:n.max):(t[0].min=void 0===n.min?d:n.min,t[0].max=void 0===n.max?g:n.max)})}),t}}]),v}(),Ce=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w,this.scales=new se(e)}return F(v,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(e){var t=arguments.length>1&&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,r=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=e+1);var h=r.series,c=h,d=h;"candlestick"===s.chart.type?(c=r.seriesCandleL,d=r.seriesCandleH):"boxPlot"===s.chart.type?(c=r.seriesCandleO,d=r.seriesCandleC):r.isRangeData&&(c=r.seriesRangeStart,d=r.seriesRangeEnd);for(var g=e;gc[g][p]&&c[g][p]<0&&(o=c[g][p])):r.hasNullValues=!0}}return"rangeBar"===s.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=t),"bar"===s.chart.type&&(o<0&&n<0&&(n=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:n,lowestY:t,highestY:i}}},{key:"setYRange",value:function(){var e=this.w.globals,t=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var i=Number.MAX_VALUE;if(e.isMultipleYAxis)for(var a=0;a=0&&i<=10||void 0!==t.yaxis[0].min||void 0!==t.yaxis[0].max)&&(n=0),e.minY=i-5*n/100,i>0&&e.minY<0&&(e.minY=0),e.maxY=e.maxY+5*n/100}return t.yaxis.forEach(function(o,h){void 0!==o.max&&("number"==typeof o.max?e.maxYArr[h]=o.max:"function"==typeof o.max&&(e.maxYArr[h]=o.max(e.isMultipleYAxis?e.maxYArr[h]:e.maxY)),e.maxY=e.maxYArr[h]),void 0!==o.min&&("number"==typeof o.min?e.minYArr[h]=o.min:"function"==typeof o.min&&(e.minYArr[h]=o.min(e.isMultipleYAxis?e.minYArr[h]===Number.MIN_VALUE?0:e.minYArr[h]:e.minY)),e.minY=e.minYArr[h])}),e.isBarHorizontal&&["min","max"].forEach(function(o){void 0!==t.xaxis[o]&&"number"==typeof t.xaxis[o]&&("min"===o?e.minY=t.xaxis[o]:e.maxY=t.xaxis[o])}),e.isMultipleYAxis?(this.scales.setMultipleYScales(),e.minY=i,e.yAxisScale.forEach(function(o,h){e.minYArr[h]=o.niceMin,e.maxYArr[h]=o.niceMax})):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.yAxisScale[0].niceMin,e.maxYArr[0]=e.yAxisScale[0].niceMax),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}},{key:"setXRange",value:function(){var e=this.w.globals,t=this.w.config,i="numeric"===t.xaxis.type||"datetime"===t.xaxis.type||"category"===t.xaxis.type&&!e.noLabelsProvided||e.noLabelsProvided||e.isXNumeric;if(e.isXNumeric&&function(){for(var n=0;ne.dataPoints&&0!==e.dataPoints&&(a=e.dataPoints-1)):"dataPoints"===t.xaxis.tickAmount?(e.series.length>1&&(a=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric&&(a=e.maxX-e.minX-1)):a=t.xaxis.tickAmount,e.xTickAmount=a,void 0!==t.xaxis.max&&"number"==typeof t.xaxis.max&&(e.maxX=t.xaxis.max),void 0!==t.xaxis.min&&"number"==typeof t.xaxis.min&&(e.minX=t.xaxis.min),void 0!==t.xaxis.range&&(e.minX=e.maxX-t.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(t.xaxis.convertedCatToNumeric&&!e.dataFormatXNumeric){for(var s=[],r=e.minX-1;r0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,a-1),e.seriesX=e.labels.slice());i&&(e.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&e.labels.length&&(e.xTickAmount=e.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}},{key:"setZRange",value:function(){var e=this.w.globals;if(e.isDataXYZ)for(var t=0;t0){var n=s-a[r-1];n>0&&(e.minXDiff=Math.min(n,e.minXDiff))}}),1!==e.dataPoints&&e.minXDiff!==Number.MAX_VALUE||(e.minXDiff=.5)})}},{key:"_setStackedMinMax",value:function(){var e=this,t=this.w.globals;if(t.series.length){var i=t.seriesGroups;i.length||(i=[this.w.config.series.map(function(r){return r.name})]);var a={},s={};i.forEach(function(r){a[r]=[],s[r]=[],e.w.config.series.map(function(n,o){return r.indexOf(n.name)>-1?o:null}).filter(function(n){return null!==n}).forEach(function(n){for(var o=0;o0?a[r][o]+=parseFloat(t.series[n][o])+1e-4:s[r][o]+=parseFloat(t.series[n][o]))})}),Object.entries(a).forEach(function(r){var n=Ye(r,1)[0];a[n].forEach(function(o,h){t.maxY=Math.max(t.maxY,a[n][h]),t.minY=Math.min(t.minY,s[n][h])})})}}}]),v}(),Le=function(){function v(e,t){Y(this,v),this.ctx=e,this.elgrid=t,this.w=e.w;var i=this.w;this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.axisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xAxisoffX=0,"bottom"===i.config.xaxis.position&&(this.xAxisoffX=i.globals.gridHeight),this.drawnLabels=[],this.axesUtils=new ee(e)}return F(v,[{key:"drawYaxis",value:function(e){var t=this,i=this.w,a=new T(this.ctx),s=i.config.yaxis[e].labels.style,r=s.fontSize,n=s.fontFamily,o=s.fontWeight,h=a.group({class:"apexcharts-yaxis",rel:e,transform:"translate("+i.globals.translateYAxisX[e]+", 0)"});if(this.axesUtils.isYAxisHidden(e))return h;var c=a.group({class:"apexcharts-yaxis-texts-g"});h.add(c);var d=i.globals.yAxisScale[e].result.length-1,g=i.globals.gridHeight/d,p=i.globals.translateY,f=i.globals.yLabelFormatters[e],b=i.globals.yAxisScale[e].result.slice();b=this.axesUtils.checkForReversedLabels(e,b);var m="";if(i.config.yaxis[e].labels.show)for(var w=function(C){var L=b[C];L=f(L,C,i);var I=i.config.yaxis[e].labels.padding;i.config.yaxis[e].opposite&&0!==i.config.yaxis.length&&(I*=-1);var M="end";i.config.yaxis[e].opposite&&(M="start"),"left"===i.config.yaxis[e].labels.align?M="start":"center"===i.config.yaxis[e].labels.align?M="middle":"right"===i.config.yaxis[e].labels.align&&(M="end");var z=t.axesUtils.getYAxisForeColor(s.colors,e),X=a.drawText({x:I,y:p+d/10+i.config.yaxis[e].labels.offsetY+1,text:L,textAnchor:M,fontSize:r,fontFamily:n,fontWeight:o,maxWidth:i.config.yaxis[e].labels.maxWidth,foreColor:Array.isArray(z)?z[C]:z,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+s.cssClass});C===d&&(m=X),c.add(X);var R=document.createElementNS(i.globals.SVGNS,"title");if(R.textContent=Array.isArray(L)?L.join(" "):L,X.node.appendChild(R),0!==i.config.yaxis[e].labels.rotate){var D=a.rotateAroundCenter(m.node),H=a.rotateAroundCenter(X.node);X.node.setAttribute("transform","rotate(".concat(i.config.yaxis[e].labels.rotate," ").concat(D.x," ").concat(H.y,")"))}p+=g},k=d;k>=0;k--)w(k);if(void 0!==i.config.yaxis[e].title.text){var l=a.group({class:"apexcharts-yaxis-title"}),u=0;i.config.yaxis[e].opposite&&(u=i.globals.translateYAxisX[e]);var x=a.drawText({x:u,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[e].title.offsetY,text:i.config.yaxis[e].title.text,textAnchor:"end",foreColor:i.config.yaxis[e].title.style.color,fontSize:i.config.yaxis[e].title.style.fontSize,fontWeight:i.config.yaxis[e].title.style.fontWeight,fontFamily:i.config.yaxis[e].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[e].title.style.cssClass});l.add(x),h.add(l)}var y=i.config.yaxis[e].axisBorder,A=31+y.offsetX;if(i.config.yaxis[e].opposite&&(A=-31-y.offsetX),y.show){var S=a.drawLine(A,i.globals.translateY+y.offsetY-2,A,i.globals.gridHeight+i.globals.translateY+y.offsetY+2,y.color,0,y.width);h.add(S)}return i.config.yaxis[e].axisTicks.show&&this.axesUtils.drawYAxisTicks(A,d,y,i.config.yaxis[e].axisTicks,e,g,h),h}},{key:"drawYaxisInversed",value:function(e){var t=this.w,i=new T(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});a.add(s);var r=t.globals.yAxisScale[e].result.length-1,n=t.globals.gridWidth/r+.1,o=n+t.config.xaxis.labels.offsetX,h=t.globals.xLabelFormatter,c=t.globals.yAxisScale[e].result.slice(),d=t.globals.timescaleLabels;d.length>0&&(this.xaxisLabels=d.slice(),r=(c=d.slice()).length),c=this.axesUtils.checkForReversedLabels(e,c);var g=d.length;if(t.config.xaxis.labels.show)for(var p=g?0:r;g?p=0;g?p++:p--){var f=c[p];f=h(f,p,t);var b=t.globals.gridWidth+t.globals.padHorizontal-(o-n+t.config.xaxis.labels.offsetX);if(d.length){var m=this.axesUtils.getLabel(c,d,b,p,this.drawnLabels,this.xaxisFontSize);b=m.x,f=m.text,this.drawnLabels.push(m.text),0===p&&t.globals.skipFirstTimelinelabel&&(f=""),p===c.length-1&&t.globals.skipLastTimelinelabel&&(f="")}var w=i.drawText({x:b,y:this.xAxisoffX+t.config.xaxis.labels.offsetY+30-("top"===t.config.xaxis.position?t.globals.xAxisHeight+t.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:t.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+t.config.xaxis.labels.style.cssClass});s.add(w),w.tspan(f);var k=document.createElementNS(t.globals.SVGNS,"title");k.textContent=f,w.node.appendChild(k),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(e){var t=this.w,i=new T(this.ctx),a=t.config.xaxis.axisBorder;if(a.show){var s=0;"bar"===t.config.chart.type&&t.globals.isXNumeric&&(s-=15);var r=i.drawLine(t.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,t.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(r):e.add(r)}}},{key:"inversedYAxisTitleText",value:function(e){var t=this.w,i=new T(this.ctx);if(void 0!==t.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(t.config.xaxis.title.style.fontSize)+t.config.xaxis.title.offsetY+20,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});a.add(s),e.add(a)}}},{key:"yAxisTitleRotate",value:function(e,t){var i=this.w,a=new T(this.ctx),s={width:0,height:0},r={width:0,height:0},n=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g"));null!==n&&(s=n.getBoundingClientRect());var o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text"));if(null!==o&&(r=o.getBoundingClientRect()),null!==o){var h=this.xPaddingForYAxisTitle(e,s,r,t);o.setAttribute("x",h.xPos-(t?10:0))}if(null!==o){var c=a.rotateAroundCenter(o);o.setAttribute("transform","rotate(".concat(t?-1*i.config.yaxis[e].title.rotate:i.config.yaxis[e].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,t,i,a){var s=this.w,r=0,n=0,o=10;return void 0===s.config.yaxis[e].title.text||e<0?{xPos:n,padd:0}:(a?(n=t.width+s.config.yaxis[e].title.offsetX+i.width/2+o/2,0===(r+=1)&&(n-=o/2)):(n=-1*t.width+s.config.yaxis[e].title.offsetX+o/2+i.width/2,s.globals.isBarHorizontal&&(n=-1*t.width-s.config.yaxis[e].title.offsetX-(o=25))),{xPos:n,padd:o})}},{key:"setYAxisXPosition",value:function(e,t){var i=this.w,a=0,s=0,r=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.map(function(o,h){var c=i.globals.ignoreYAxisIndexes.indexOf(h)>-1||!o.show||o.floating||0===e[h].width,d=e[h].width+t[h].width;o.opposite?i.globals.isBarHorizontal?i.globals.translateYAxisX[h]=(s=i.globals.gridWidth+i.globals.translateX-1)-o.labels.offsetX:(s=i.globals.gridWidth+i.globals.translateX+n,c||(n=n+d+20),i.globals.translateYAxisX[h]=s-o.labels.offsetX+20):(a=i.globals.translateX-r,c||(r=r+d+20),i.globals.translateYAxisX[h]=a+o.labels.offsetX)})}},{key:"setYAxisTextAlignments",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(t=P.listToArray(t)).forEach(function(i,a){var s=e.config.yaxis[a];if(s&&!s.floating&&void 0!==s.labels.align){var r=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(a,"'] .apexcharts-yaxis-texts-g")),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(a,"'] .apexcharts-yaxis-label"));n=P.listToArray(n);var o=r.getBoundingClientRect();"left"===s.labels.align?(n.forEach(function(h,c){h.setAttribute("text-anchor","start")}),s.opposite||r.setAttribute("transform","translate(-".concat(o.width,", 0)"))):"center"===s.labels.align?(n.forEach(function(h,c){h.setAttribute("text-anchor","middle")}),r.setAttribute("transform","translate(".concat(o.width/2*(s.opposite?1:-1),", 0)"))):"right"===s.labels.align&&(n.forEach(function(h,c){h.setAttribute("text-anchor","end")}),s.opposite&&r.setAttribute("transform","translate(".concat(o.width,", 0)")))}})}}]),v}(),rt=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w,this.documentEvent=P.bind(this.documentEvent,this)}return F(v,[{key:"addEventListener",value:function(e,t){var i=this.w;i.globals.events.hasOwnProperty(e)?i.globals.events[e].push(t):i.globals.events[e]=[t]}},{key:"removeEventListener",value:function(e,t){var i=this.w;if(i.globals.events.hasOwnProperty(e)){var a=i.globals.events[e].indexOf(t);-1!==a&&i.globals.events[e].splice(a,1)}}},{key:"fireEvent",value:function(e,t){var i=this.w;if(i.globals.events.hasOwnProperty(e)){t&&t.length||(t=[]);for(var a=i.globals.events[e],s=a.length,r=0;r0&&(t=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=t.filter(function(s){return s.name===e})[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=P.extend(Re,i);this.w.globals.locale=a.options}}]),v}(),ot=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w}return F(v,[{key:"drawAxis",value:function(e,t){var i,a,s=this,r=this.w.globals,n=this.w.config,o=new pe(this.ctx,t),h=new Le(this.ctx,t);r.axisCharts&&"radar"!==e&&(r.isBarHorizontal?(a=h.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),n.yaxis.map(function(c,d){if(-1===r.ignoreYAxisIndexes.indexOf(d)&&(a=h.drawYaxis(d),r.dom.Paper.add(a),"back"===s.w.config.grid.position)){var g=r.dom.Paper.children()[1];g.remove(),r.dom.Paper.add(g)}})))}}]),v}(),Pe=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w}return F(v,[{key:"drawXCrosshairs",value:function(){var e=this.w,t=new T(this.ctx),i=new _(this.ctx),a=e.config.xaxis.crosshairs.fill.gradient,s=e.config.xaxis.crosshairs.dropShadow,g=s.enabled,p=s.left,f=s.top,b=s.blur,m=s.color,w=s.opacity,k=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){"gradient"===e.config.xaxis.crosshairs.fill.type&&(k=t.drawGradient("vertical",a.colorFrom,a.colorTo,a.opacityFrom,a.opacityTo,null,a.stops,null));var l=t.drawRect();1===e.config.xaxis.crosshairs.width&&(l=t.drawLine());var u=e.globals.gridHeight;(!P.isNumber(u)||u<0)&&(u=0);var x=e.config.xaxis.crosshairs.width;(!P.isNumber(x)||x<0)&&(x=0),l.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:u,width:x,height:u,fill:k,filter:"none","fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),g&&(l=i.dropShadow(l,{left:p,top:f,blur:b,color:m,opacity:w})),e.globals.dom.elGraphical.add(l)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,t=new T(this.ctx),i=e.config.yaxis[0].crosshairs,a=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var s=t.drawLine(-a,0,e.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(s)}var r=t.drawLine(-a,0,e.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(r)}}]),v}(),lt=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w}return F(v,[{key:"checkResponsiveConfig",value:function(e){var t=this,i=this.w,a=i.config;if(0!==a.responsive.length){var s=a.responsive.slice();s.sort(function(h,c){return h.breakpoint>c.breakpoint?1:c.breakpoint>h.breakpoint?-1:0}).reverse();var r=new ge({}),n=function(){var h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=s[0].breakpoint,d=window.innerWidth>0?window.innerWidth:screen.width;if(d>c){var g=W.extendArrayProps(r,i.globals.initialConfig,i);h=P.extend(g,h),h=P.extend(i.config,h),t.overrideResponsiveOptions(h)}else for(var p=0;p0&&"function"==typeof t.config.colors[0]&&(t.globals.colors=t.config.series.map(function(p,f){var b=t.config.colors[f];return b||(b=t.config.colors[0]),"function"==typeof b?(e.isColorFn=!0,b({value:t.globals.axisCharts?t.globals.series[f][0]?t.globals.series[f][0]:0:t.globals.series[f],seriesIndex:f,dataPointIndex:f,w:t})):b}))),t.globals.seriesColors.map(function(p,f){p&&(t.globals.colors[f]=p)}),t.config.theme.monochrome.enabled){var a=[],s=t.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(s=t.globals.series[0].length*t.globals.series.length);for(var r=t.config.theme.monochrome.color,n=1/(s/t.config.theme.monochrome.shadeIntensity),o=t.config.theme.monochrome.shadeTo,h=0,c=0;c2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=t||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),e.lengthe.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getLargestStringFromMultiArr",value:function(e,t){var i=e;if(this.w.globals.isMultiLineX){var a=t.map(function(r,n){return Array.isArray(r)?r.length:1}),s=Math.max.apply(Math,q(a));i=t[a.indexOf(s)]}return i}}]),v}(),gt=function(){function v(e){Y(this,v),this.w=e.w,this.dCtx=e}return F(v,[{key:"getxAxisLabelsCoords",value:function(){var e,t=this.w,i=t.globals.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=t.globals.categoryLabels),t.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();e={width:a.width,height:a.height},t.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==t.config.legend.position&&"right"!==t.config.legend.position||t.config.legend.floating?0:this.dCtx.lgRect.width;var s=t.globals.xLabelFormatter,r=P.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);t.globals.isBarHorizontal&&(n=r=t.globals.yAxisScale[0].result.reduce(function(f,b){return f.length>b.length?f:b},0));var o=new ce(this.dCtx.ctx),h=r;r=o.xLabelFormat(s,r,h,{i:void 0,dateFormatter:new V(this.dCtx.ctx).formatDate,w:t}),n=o.xLabelFormat(s,n,h,{i:void 0,dateFormatter:new V(this.dCtx.ctx).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(n=r="1");var c=new T(this.dCtx.ctx),d=c.getTextRects(r,t.config.xaxis.labels.style.fontSize),g=d;if(r!==n&&(g=c.getTextRects(n,t.config.xaxis.labels.style.fontSize)),(e={width:d.width>=g.width?d.width:g.width,height:d.height>=g.height?d.height:g.height}).width*i.length>t.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==t.config.xaxis.labels.rotate||t.config.xaxis.labels.rotateAlways){if(!t.globals.isBarHorizontal){t.globals.rotateXLabels=!0;var p=function(f){return c.getTextRects(f,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,"rotate(".concat(t.config.xaxis.labels.rotate," 0 0)"),!1)};d=p(r),r!==n&&(g=p(n)),e.height=(d.height>g.height?d.height:g.height)/1.5,e.width=d.width>g.width?d.width:g.width}}else t.globals.rotateXLabels=!1}return t.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var e,t=this.w;if(!t.globals.hasXaxisGroups)return{width:0,height:0};var i,a=(null===(e=t.config.xaxis.group.style)||void 0===e?void 0:e.fontSize)||t.config.xaxis.labels.style.fontSize,s=t.globals.groups.map(function(d){return d.title}),r=P.getLargestStringFromArr(s),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),o=new T(this.dCtx.ctx),h=o.getTextRects(r,a),c=h;return r!==n&&(c=o.getTextRects(n,a)),i={width:h.width>=c.width?h.width:c.width,height:h.height>=c.height?h.height:c.height},t.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,t=0,i=0;if(void 0!==e.config.xaxis.title.text){var a=new T(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);t=a.width,i=a.height}return{width:t,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,t=this.w;this.dCtx.timescaleLabels=t.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map(function(s){return s.value}),a=i.reduce(function(s,r){return void 0===s?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):s.length>r.length?s:r},0);return 1.05*(e=new T(this.dCtx.ctx).getTextRects(a,t.config.xaxis.labels.style.fontSize)).width*i.length>t.globals.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var t=this,i=this.w,a=i.globals,s=i.config,r=s.xaxis.type,n=e.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal;s.yaxis.forEach(function(c,d){o?(t.dCtx.gridPad.left1&&-1!==a.collapsedSeriesIndices.indexOf(d)||function(g){if(t.dCtx.timescaleLabels&&t.dCtx.timescaleLabels.length){var b=t.dCtx.timescaleLabels[0].position-n/1.75+t.dCtx.yAxisWidthLeft;t.dCtx.timescaleLabels[t.dCtx.timescaleLabels.length-1].position+n/1.75-t.dCtx.yAxisWidthRight>a.svgWidth-a.translateX-("right"===i.config.legend.position&&t.dCtx.lgRect.width>0?t.dCtx.lgRect.width:0)&&(a.skipLastTimelinelabel=!0),b<-(g.show&&!g.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===r?t.dCtx.gridPad.rightString(o.niceMax).length?d:o.niceMax,p=c(g,{seriesIndex:n,dataPointIndex:-1,w:t}),f=p;if(void 0!==p&&0!==p.length||(p=g),t.globals.isBarHorizontal){a=0;var b=t.globals.labels.slice();p=c(p=P.getLargestStringFromArr(b),{seriesIndex:n,dataPointIndex:-1,w:t}),f=e.dCtx.dimHelpers.getLargestStringFromMultiArr(p,b)}var m=new T(e.dCtx.ctx),w="rotate(".concat(r.labels.rotate," 0 0)"),k=m.getTextRects(p,r.labels.style.fontSize,r.labels.style.fontFamily,w,!1),l=k;p!==f&&(l=m.getTextRects(f,r.labels.style.fontSize,r.labels.style.fontFamily,w,!1)),i.push({width:(h>l.width||h>k.width?h:l.width>k.width?l.width:k.width)+a,height:l.height>k.height?l.height:k.height})}else i.push({width:0,height:0})}),i}},{key:"getyAxisTitleCoords",value:function(){var e=this,i=[];return this.w.config.yaxis.map(function(a,s){if(a.show&&void 0!==a.title.text){var r=new T(e.dCtx.ctx),n="rotate(".concat(a.title.rotate," 0 0)"),o=r.getTextRects(a.title.text,a.title.style.fontSize,a.title.style.fontFamily,n,!1);i.push({width:o.width,height:o.height})}else i.push({width:0,height:0})}),i}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,t=0,i=0,a=0,s=e.globals.yAxisScale.length>1?10:0,r=new ee(this.dCtx.ctx),n=function(o,h){var c=e.config.yaxis[h].floating,d=0;o.width>0&&!c?(d=o.width+s,e.globals.ignoreYAxisIndexes.indexOf(h)>-1&&(d=d-o.width-s)):d=c||r.isYAxisHidden(h)?0:5,e.config.yaxis[h].opposite?a+=d:i+=d,t+=d};return e.globals.yLabelsCoords.map(function(o,h){n(o,h)}),e.globals.yTitleCoords.map(function(o,h){n(o,h)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(t=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,t}}]),v}(),pt=function(){function v(e){Y(this,v),this.w=e.w,this.dCtx=e}return F(v,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var t=this.w;if(t.globals.noData||t.globals.allSeriesCollapsed)return 0;var i=function(c){return"bar"===c||"rangeBar"===c||"candlestick"===c||"boxPlot"===c},a=t.config.chart.type,s=0,r=i(a)?t.config.series.length:1;if(t.globals.comboBarCount>0&&(r=t.globals.comboBarCount),t.globals.collapsedSeries.forEach(function(c){i(c.type)&&(r-=1)}),t.config.chart.stacked&&(r=1),(i(a)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&r>0){var n,o,h=Math.abs(t.globals.initialMaxX-t.globals.initialMinX);h<=3&&(h=t.globals.dataPoints),n=h/e,t.globals.minXDiff&&t.globals.minXDiff/n>0&&(o=t.globals.minXDiff/n),o>e/2&&(o/=2),(s=o/r*parseInt(t.config.plotOptions.bar.columnWidth,10)/100)<1&&(s=1),t.globals.barPadForNumericAxis=s=s/(r>1?1:1.5)+5}return s}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,t=this.w,i=t.globals,a=this.dCtx.isSparkline||!t.globals.axisCharts?0:10;["title","subtitle"].forEach(function(n){a+=void 0!==t.config[n].text?t.config[n].margin:e.dCtx.isSparkline||!t.globals.axisCharts?0:5}),!t.config.legend.show||"bottom"!==t.config.legend.position||t.config.legend.floating||t.globals.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight=i.gridHeight-s.height-r.height-a,i.translateY=i.translateY+s.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(e,t){var i=this.w,a=new ee(this.dCtx.ctx);i.config.yaxis.map(function(s,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||s.floating||a.isYAxisHidden(r)||(s.opposite&&(i.globals.translateX=i.globals.translateX-(t[r].width+e[r].width)-parseInt(i.config.yaxis[r].labels.style.fontSize,10)/1.2-12),i.globals.translateX<2&&(i.globals.translateX=2))})}}]),v}(),ye=function(){function v(e){Y(this,v),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 dt(this),this.dimYAxis=new ut(this),this.dimXAxis=new gt(this),this.dimGrid=new pt(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return F(v,[{key:"plotCoords",value:function(){var e=this,t=this.w,i=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.isSparkline&&(t.config.markers.discrete.length>0||t.config.markers.size>0)&&Object.entries(this.gridPad).forEach(function(s){var r=Ye(s,2);e.gridPad[r[0]]=Math.max(r[1],e.w.globals.markers.largestSize/1.5)}),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 a=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*a,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(a>0?a+4:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,t=this.w,i=t.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();t.globals.yLabelsCoords=[],t.globals.yTitleCoords=[],t.config.yaxis.map(function(p,f){t.globals.yLabelsCoords.push({width:a[f].width,index:f}),t.globals.yTitleCoords.push({width:s[f].width,index:f})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,n),i.translateXAxisY=t.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=t.globals.rotateXLabels&&t.globals.isXNumeric&&t.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,t.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(t.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+t.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+t.config.xaxis.labels.offsetX;var h=this.yAxisWidth,c=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var d=10;("radar"===t.config.chart.type||this.isSparkline)&&(h=0,c=i.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===t.config.chart.type)&&(h=0,c=0,d=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(r);var g=function(){i.translateX=h,i.gridHeight=i.svgHeight-e.lgRect.height-c-(e.isSparkline||"treemap"===t.config.chart.type?0:t.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-h};switch("top"===t.config.xaxis.position&&(d=i.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":i.translateY=d,g();break;case"top":i.translateY=this.lgRect.height+d,g();break;case"left":i.translateY=d,i.translateX=this.lgRect.width+h,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-h;break;case"right":i.translateY=d,i.translateX=h,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-h-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new Le(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=e.config,a=0;e.config.legend.show&&!e.config.legend.floating&&(a=20);var s="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[s].offsetY,n=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating)return t.gridHeight=t.svgHeight-i.grid.padding.left+i.grid.padding.right,t.gridWidth=t.gridHeight,t.translateY=r,void(t.translateX=n+(t.svgWidth-t.gridWidth)/2);switch(i.legend.position){case"bottom":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=r-10,t.translateX=n+(t.svgWidth-t.gridWidth)/2;break;case"top":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=this.lgRect.height+r+10,t.translateX=n+(t.svgWidth-t.gridWidth)/2;break;case"left":t.gridWidth=t.svgWidth-this.lgRect.width-a,t.gridHeight="auto"!==i.chart.height?t.svgHeight:t.gridWidth,t.translateY=r,t.translateX=n+this.lgRect.width+a;break;case"right":t.gridWidth=t.svgWidth-this.lgRect.width-a-5,t.gridHeight="auto"!==i.chart.height?t.svgHeight:t.gridWidth,t.translateY=r,t.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,t,i){var a=this.w;this.xAxisHeight=(i.height+e.height+t.height)*(a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO)+(a.globals.hasXaxisGroups?2:1)*(a.globals.rotateXLabels?22:10)+(a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0),this.xAxisWidth=e.width,this.xAxisHeight-t.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightd&&(this.yAxisWidth=d)}}]),v}(),ft=function(){function v(e){Y(this,v),this.w=e.w,this.lgCtx=e}return F(v,[{key:"getLegendStyles",value:function(){var e=document.createElement("style");e.setAttribute("type","text/css");var t=document.createTextNode("\t\n \t\n .apexcharts-legend {\t\n display: flex;\t\n overflow: auto;\t\n padding: 0 10px;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\t\n flex-wrap: wrap\t\n }\t\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n flex-direction: column;\t\n bottom: 0;\t\n }\t\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 {\t\n justify-content: flex-start;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\t\n justify-content: center; \t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\t\n justify-content: flex-end;\t\n }\t\n .apexcharts-legend-series {\t\n cursor: pointer;\t\n line-height: normal;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{\t\n display: flex;\t\n align-items: center;\t\n }\t\n .apexcharts-legend-text {\t\n position: relative;\t\n font-size: 14px;\t\n }\t\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\t\n pointer-events: none;\t\n }\t\n .apexcharts-legend-marker {\t\n position: relative;\t\n display: inline-block;\t\n cursor: pointer;\t\n margin-right: 3px;\t\n border-style: solid;\n }\t\n \t\n .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\t\n display: inline-block;\t\n }\t\n .apexcharts-legend-series.apexcharts-no-click {\t\n cursor: auto;\t\n }\t\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\t\n display: none !important;\t\n }\t\n .apexcharts-inactive-legend {\t\n opacity: 0.45;\t\n }");return e.appendChild(t),e}},{key:"getLegendBBox",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect();return{clwh:e.height,clww:e.width}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(e,t){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var s=null,r=null;a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),r=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),r=parseInt(s.getAttribute("rel"),10)-1),t?[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach(function(c){i.riseCollapsedSeries(c.cs,c.csi,r)}):this.hideSeries({seriesEl:s,realIndex:r})}else{var n=a.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(e+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var h=a.config.plotOptions.pie.donut.labels;new T(this.lgCtx.ctx).pathMouseDown(n.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(n.members[0].node,h)}n.fire("click")}}},{key:"hideSeries",value:function(e){var t=e.seriesEl,i=e.realIndex,a=this.w,s=P.clone(a.config.series);if(a.globals.axisCharts){var r=!1;if(a.config.yaxis[i]&&a.config.yaxis[i].show&&a.config.yaxis[i].showAlways&&(r=!0,a.globals.ancillaryCollapsedSeriesIndices.indexOf(i)<0&&(a.globals.ancillaryCollapsedSeries.push({index:i,data:s[i].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),a.globals.ancillaryCollapsedSeriesIndices.push(i))),!r){a.globals.collapsedSeries.push({index:i,data:s[i].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),a.globals.collapsedSeriesIndices.push(i);var n=a.globals.risingSeries.indexOf(i);a.globals.risingSeries.splice(n,1)}}else a.globals.collapsedSeries.push({index:i,data:s[i]}),a.globals.collapsedSeriesIndices.push(i);for(var o=t.childNodes,h=0;h0){for(var r=0;r-1&&(e[a].data=[])}:function(i,a){t.globals.collapsedSeriesIndices.indexOf(a)>-1&&(e[a]=0)}),e}}]),v}(),We=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed="bar"===this.w.config.chart.type&&this.w.config.plotOptions.bar.distributed&&1===this.w.config.series.length,this.legendHelpers=new ft(this)}return F(v,[{key:"init",value:function(){var e=this.w,t=e.globals,i=e.config;if((i.legend.showForSingleSeries&&1===t.series.length||this.isBarsDistributed||t.series.length>1||!t.axisCharts)&&i.legend.show){for(;t.dom.elLegendWrap.firstChild;)t.dom.elLegendWrap.removeChild(t.dom.elLegendWrap.firstChild);this.drawLegends(),P.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 e=this,t=this.w,i=t.config.legend.fontFamily,a=t.globals.seriesNames,s=t.globals.colors.slice();if("heatmap"===t.config.chart.type){var r=t.config.plotOptions.heatmap.colorScale.ranges;a=r.map(function(M){return M.name?M.name:M.from+" - "+M.to}),s=r.map(function(M){return M.color})}else this.isBarsDistributed&&(a=t.globals.labels.slice());t.config.legend.customLegendItems.length&&(a=t.config.legend.customLegendItems);for(var n=t.globals.legendFormatter,o=t.config.legend.inverseOrder,h=o?a.length-1:0;o?h>=0:h<=a.length-1;o?h--:h++){var c=n(a[h],{seriesIndex:h,w:t}),d=!1,g=!1;if(t.globals.collapsedSeries.length>0)for(var p=0;p0)for(var f=0;f0?h-10:0)+(c>0?c-10:0)}a.style.position="absolute",n=n+t+i.config.legend.offsetY,a.style.left=(r=r+e+i.config.legend.offsetX)+"px",a.style.top=n+"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(d){a.style[d]&&(a.style[d]=parseInt(i.config.legend[d],10)+"px")})}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.elLegendWrap.style.right=0;var t=this.legendHelpers.getLegendBBox(),i=new ye(this.ctx),a=i.dimHelpers.getTitleSubtitleCoords("title"),s=i.dimHelpers.getTitleSubtitleCoords("subtitle"),r=0;"bottom"===e.config.legend.position?r=-t.clwh/1.8:"top"===e.config.legend.position&&(r=a.height+s.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,r)}},{key:"legendAlignVertical",value:function(){var e=this.w,t=this.legendHelpers.getLegendBBox(),i=0;"left"===e.config.legend.position&&(i=20),"right"===e.config.legend.position&&(i=e.globals.svgWidth-t.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(e){var t=this.w,i=e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker");if("heatmap"===t.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new $(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&i&&new $(this.ctx).toggleSeriesOnHover(e,e.target)}},{key:"onLegendClick",value:function(e){var t=this.w;if(!t.config.legend.customLegendItems.length&&(e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(e.target.getAttribute("rel"),10)-1,a="true"===e.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 r=this.w.config.legend.markers.onClick;"function"==typeof r&&e.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==t.config.chart.type&&"heatmap"!==t.config.chart.type&&!this.isBarsDistributed&&t.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),v}(),Be=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w;var t=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=t.globals.minX,this.maxX=t.globals.maxX}return F(v,[{key:"createToolbar",value:function(){var e=this,t=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=t.config.chart.toolbar.offsetY+"px",a.style.right=3-t.config.chart.toolbar.offsetX+"px",t.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=t.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s\n \n \n\n'),n("zoomOut",this.elZoomOut,'\n \n \n\n');var o=function(d){e.t[d]&&t.config.chart[d].enabled&&r.push({el:"zoom"===d?e.elZoom:e.elSelection,icon:"string"==typeof e.t[d]?e.t[d]:"zoom"===d?'\n \n \n \n':'\n \n \n',title:e.localeValues["zoom"===d?"selectionZoom":"selection"],class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(d,"-icon")})};o("zoom"),o("selection"),this.t.pan&&t.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,'\n \n \n'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var h=0;h0&&a.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:i.globals.gridWidth,maxY:i.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var i=this.w,a=this.xyRatios;if(!i.globals.zoomEnabled)if(null!=i.globals.selection)this.drawSelectionRect(i.globals.selection);else if(void 0!==i.config.chart.selection.xaxis.min&&void 0!==i.config.chart.selection.xaxis.max){var s=(i.config.chart.selection.xaxis.min-i.globals.minX)/a.xRatio;this.drawSelectionRect({x:s,y:0,width:i.globals.gridWidth-(i.globals.maxX-i.config.chart.selection.xaxis.max)/a.xRatio-s,height:i.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0}),this.makeSelectionRectDraggable(),"function"==typeof i.config.chart.events.selection&&i.config.chart.events.selection(this.ctx,{xaxis:{min:i.config.chart.selection.xaxis.min,max:i.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(i){var a=i.x,s=i.y,r=i.width,n=i.height,o=i.translateX,c=i.translateY,g=this.w,p=this.zoomRect,f=this.selectionRect;if(this.dragged||null!==g.globals.selection){var b={transform:"translate("+(void 0===o?0:o)+", "+(void 0===c?0:c)+")"};g.globals.zoomEnabled&&this.dragged&&(r<0&&(r=1),p.attr({x:a,y:s,width:r,height:n,fill:g.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":g.config.chart.zoom.zoomedArea.fill.opacity,stroke:g.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":g.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":g.config.chart.zoom.zoomedArea.stroke.opacity}),T.setAttrs(p.node,b)),g.globals.selectionEnabled&&(f.attr({x:a,y:s,width:r>0?r:0,height:n>0?n:0,fill:g.config.chart.selection.fill.color,"fill-opacity":g.config.chart.selection.fill.opacity,stroke:g.config.chart.selection.stroke.color,"stroke-width":g.config.chart.selection.stroke.width,"stroke-dasharray":g.config.chart.selection.stroke.dashArray,"stroke-opacity":g.config.chart.selection.stroke.opacity}),T.setAttrs(f.node,b))}}},{key:"hideSelectionRect",value:function(i){i&&i.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(i){var b,s=i.zoomtype,r=this.w,n=i.context,o=this.gridRect.getBoundingClientRect(),h=n.startX-1,c=n.startY,d=!1,g=!1,p=n.clientX-o.left-h,f=n.clientY-o.top-c;return Math.abs(p+h)>r.globals.gridWidth?p=r.globals.gridWidth-h:n.clientX-o.left<0&&(p=h),h>n.clientX-o.left&&(d=!0,p=Math.abs(p)),c>n.clientY-o.top&&(g=!0,f=Math.abs(f)),n.drawSelectionRect(b="x"===s?{x:d?h-p:h,y:0,width:p,height:r.globals.gridHeight}:"y"===s?{x:0,y:g?c-f:c,width:r.globals.gridWidth,height:f}:{x:d?h-p:h,y:g?c-f:c,width:p,height:f}),n.selectionDragging("resizing"),b}},{key:"selectionDragging",value:function(i,a){var s=this,r=this.w,n=this.xyRatios,o=this.selectionRect,h=0;"resizing"===i&&(h=30);var c=function(g){return parseFloat(o.node.getAttribute(g))},d={x:c("x"),y:c("y"),width:c("width"),height:c("height")};r.globals.selection=d,"function"==typeof r.config.chart.events.selection&&r.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var g=s.gridRect.getBoundingClientRect(),p=o.node.getBoundingClientRect(),f={xaxis:{min:r.globals.xAxisScale.niceMin+(p.left-g.left)*n.xRatio,max:r.globals.xAxisScale.niceMin+(p.right-g.left)*n.xRatio},yaxis:{min:r.globals.yAxisScale[0].niceMin+(g.bottom-p.bottom)*n.yRatio[0],max:r.globals.yAxisScale[0].niceMax-(p.top-g.top)*n.yRatio[0]}};r.config.chart.events.selection(s.ctx,f),r.config.chart.brush.enabled&&void 0!==r.config.chart.events.brushScrolled&&r.config.chart.events.brushScrolled(s.ctx,f)},h))}},{key:"selectionDrawn",value:function(i){var s=i.zoomtype,r=this.w,n=i.context,o=this.xyRatios,h=this.ctx.toolbar;if(n.startX>n.endX){var c=n.startX;n.startX=n.endX,n.endX=c}if(n.startY>n.endY){var d=n.startY;n.startY=n.endY,n.endY=d}var g=void 0,p=void 0;r.globals.isRangeBar?(g=r.globals.yAxisScale[0].niceMin+n.startX*o.invertedYRatio,p=r.globals.yAxisScale[0].niceMin+n.endX*o.invertedYRatio):(g=r.globals.xAxisScale.niceMin+n.startX*o.xRatio,p=r.globals.xAxisScale.niceMin+n.endX*o.xRatio);var f=[],b=[];if(r.config.yaxis.forEach(function(A,S){f.push(r.globals.yAxisScale[S].niceMax-o.yRatio[S]*n.startY),b.push(r.globals.yAxisScale[S].niceMax-o.yRatio[S]*n.endY)}),n.dragged&&(n.dragX>10||n.dragY>10)&&g!==p)if(r.globals.zoomEnabled){var m=P.clone(r.globals.initialConfig.yaxis),w=P.clone(r.globals.initialConfig.xaxis);if(r.globals.zoomed=!0,r.config.xaxis.convertedCatToNumeric&&(g=Math.floor(g),p=Math.floor(p),g<1&&(g=1,p=r.globals.dataPoints),p-g<2&&(p=g+1)),"xy"!==s&&"x"!==s||(w={min:g,max:p}),"xy"!==s&&"y"!==s||m.forEach(function(A,S){m[S].min=b[S],m[S].max=f[S]}),r.config.chart.zoom.autoScaleYaxis){var k=new se(n.ctx);m=k.autoScaleY(n.ctx,m,{xaxis:w})}if(h){var l=h.getBeforeZoomRange(w,m);l&&(w=l.xaxis?l.xaxis:w,m=l.yaxis?l.yaxis:m)}var u={xaxis:w};r.config.chart.group||(u.yaxis=m),n.ctx.updateHelpers._updateOptions(u,!1,n.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof r.config.chart.events.zoomed&&h.zoomCallback(w,m)}else if(r.globals.selectionEnabled){var x,y=null;x={min:g,max:p},"xy"!==s&&"y"!==s||(y=P.clone(r.config.yaxis)).forEach(function(A,S){y[S].min=b[S],y[S].max=f[S]}),r.globals.selection=n.selection,"function"==typeof r.config.chart.events.selection&&r.config.chart.events.selection(n.ctx,{xaxis:x,yaxis:y})}}},{key:"panDragging",value:function(i){var s=this.w,r=i.context;if(void 0!==s.globals.lastClientPosition.x){var n=s.globals.lastClientPosition.x-r.clientX,o=s.globals.lastClientPosition.y-r.clientY;Math.abs(n)>Math.abs(o)&&n>0?this.moveDirection="left":Math.abs(n)>Math.abs(o)&&n<0?this.moveDirection="right":Math.abs(o)>Math.abs(n)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(n)&&o<0&&(this.moveDirection="down")}s.globals.lastClientPosition={x:r.clientX,y:r.clientY},s.config.xaxis.convertedCatToNumeric||r.panScrolled(s.globals.isRangeBar?s.globals.minY:s.globals.minX,s.globals.isRangeBar?s.globals.maxY:s.globals.maxX)}},{key:"delayedPanScrolled",value:function(){var i=this.w,a=i.globals.minX,s=i.globals.maxX,r=(i.globals.maxX-i.globals.minX)/2;"left"===this.moveDirection?(a=i.globals.minX+r,s=i.globals.maxX+r):"right"===this.moveDirection&&(a=i.globals.minX-r,s=i.globals.maxX-r),a=Math.floor(a),s=Math.floor(s),this.updateScrolledChart({xaxis:{min:a,max:s}},a,s)}},{key:"panScrolled",value:function(i,a){var s=this.w,r=this.xyRatios,n=P.clone(s.globals.initialConfig.yaxis),o=r.xRatio,h=s.globals.minX,c=s.globals.maxX;s.globals.isRangeBar&&(o=r.invertedYRatio,h=s.globals.minY,c=s.globals.maxY),"left"===this.moveDirection?(i=h+s.globals.gridWidth/15*o,a=c+s.globals.gridWidth/15*o):"right"===this.moveDirection&&(i=h-s.globals.gridWidth/15*o,a=c-s.globals.gridWidth/15*o),s.globals.isRangeBar||(is.globals.initialMaxX)&&(i=h,a=c);var d={min:i,max:a};s.config.chart.zoom.autoScaleYaxis&&(n=new se(this.ctx).autoScaleY(this.ctx,n,{xaxis:d}));var g={xaxis:{min:i,max:a}};s.config.chart.group||(g.yaxis=n),this.updateScrolledChart(g,i,a)}},{key:"updateScrolledChart",value:function(i,a,s){var r=this.w;this.ctx.updateHelpers._updateOptions(i,!1,!1),"function"==typeof r.config.chart.events.scrolled&&r.config.chart.events.scrolled(this.ctx,{xaxis:{min:a,max:s}})}}]),t}(Be),Ge=function(){function v(e){Y(this,v),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return F(v,[{key:"getNearestValues",value:function(e){var t=e.hoverArea,a=e.clientX,s=e.clientY,r=this.w,n=e.elGrid.getBoundingClientRect(),o=n.width,h=n.height,c=o/(r.globals.dataPoints-1),d=h/r.globals.dataPoints,g=this.hasBars();!r.globals.comboCharts&&!g||r.config.xaxis.convertedCatToNumeric||(c=o/r.globals.dataPoints);var p=a-n.left-r.globals.barPadForNumericAxis,f=s-n.top;p<0||f<0||p>o||f>h?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):r.globals.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):r.globals.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));var b=Math.round(p/c),m=Math.floor(f/d);g&&!r.config.xaxis.convertedCatToNumeric&&(b=Math.ceil(p/c),b-=1);var w=null,k=null,l=[],u=[];if(r.globals.seriesXvalues.forEach(function(S){l.push([S[0]+1e-6].concat(S))}),r.globals.seriesYvalues.forEach(function(S){u.push([S[0]+1e-6].concat(S))}),l=l.map(function(S){return S.filter(function(C){return P.isNumber(C)})}),u=u.map(function(S){return S.filter(function(C){return P.isNumber(C)})}),r.globals.isXNumeric){var x=this.ttCtx.getElGrid().getBoundingClientRect(),y=p*(x.width/o);w=(k=this.closestInMultiArray(y,f*(x.height/h),l,u)).index,b=k.j,null!==w&&(b=(k=this.closestInArray(y,l=r.globals.seriesXvalues[w])).index)}return r.globals.capturedSeriesIndex=null===w?-1:w,(!b||b<1)&&(b=0),r.globals.capturedDataPointIndex=r.globals.isBarHorizontal?m:b,{capturedSeries:w,j:r.globals.isBarHorizontal?m:b,hoverX:p,hoverY:f}}},{key:"closestInMultiArray",value:function(e,t,i,a){var r=0,n=null,o=-1;this.w.globals.series.length>1?r=this.getFirstActiveXArray(i):n=0;var c=Math.abs(e-i[r][0]);if(i.forEach(function(p){p.forEach(function(f,b){var m=Math.abs(e-f);m0?n:-1}),s=0;s0)for(var a=0;a *"):".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(e=q(e)).sort(function(i,a){var s=Number(i.getAttribute("data:realIndex")),r=Number(a.getAttribute("data:realIndex"));return rs?-1:0});var t=[];return e.forEach(function(i){t.push(i.querySelector(".apexcharts-marker"))}),t}},{key:"hasMarkers",value:function(e){return this.getElMarkers(e).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(e){var t=this.w,i=t.config.markers.hover.size;return void 0===i&&(i=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var t=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=t.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s ').concat(S.attrs.name,""),A+="
".concat(S.val,"
")}),l.innerHTML=y+"",u.innerHTML=A+""};n?h.globals.seriesGoals[t][i]&&Array.isArray(h.globals.seriesGoals[t][i])?x():(l.innerHTML="",u.innerHTML=""):x()}else l.innerHTML="",u.innerHTML="";null!==b&&(a[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=h.config.tooltip.z.title,a[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==b?b:""),n&&m[0]&&(m[0].parentNode.style.display=null==d||h.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||h.globals.collapsedSeriesIndices.indexOf(t)>-1?"none":h.config.tooltip.items.display)}},{key:"toggleActiveInactiveSeries",value:function(e){var t=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=t.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");i&&(i.classList.add("apexcharts-active"),i.style.display=t.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var t=e.i,i=e.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",n="",o=null,h=null,c={series:a.globals.series,seriesIndex:t,dataPointIndex:i,w:a},d=a.globals.ttZFormatter;null===i?h=a.globals.series[t]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(r=s[t][i],0===s[t].length&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var g=r;return r=a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?new ce(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,g,g,{i:void 0,dateFormatter:new V(this.ctx).formatDate,w:this.w}):a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](g,c):a.globals.xLabelFormatter(g,c),void 0!==a.config.tooltip.x.formatter&&(r=a.globals.ttKeyFormatter(g,c)),a.globals.seriesZ.length>0&&a.globals.seriesZ[t].length>0&&(o=d(a.globals.seriesZ[t][i],a)),n="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(g,c):r,{val:Array.isArray(h)?h.join(" "):h,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(e){var t=e.i,i=e.j,a=e.y1,s=e.y2,r=e.w,n=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[t]&&(o=o[t]),n.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:t,dataPointIndex:i,y1:a,y2:s,w:r})}}]),v}(),Ve=function(){function v(e){Y(this,v),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return F(v,[{key:"moveXCrosshairs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=e-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(null!==t&&(r=a.globals.gridWidth/n*t),null===s||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(e){var t=this.ttCtx;null!==t.ycrosshairs&&T.setAttrs(t.ycrosshairs,{y1:e,y2:e}),null!==t.ycrosshairsHidden&&T.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var s,a=i.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.globals.translateY+1+t.config.xaxis.offsetY;e-=i.xaxisTooltip.getBoundingClientRect().width/2,isNaN(e)||(e+=t.globals.translateX,s=new T(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=e+"px",i.xaxisTooltip.style.top=a+"px")}}},{key:"moveYAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=t.globals.translateY+a,r=i.yaxisTTEls[e].getBoundingClientRect().height,n=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(n-=26),s-=r/2,-1===t.globals.ignoreYAxisIndexes.indexOf(e)?(i.yaxisTTEls[e].classList.add("apexcharts-active"),i.yaxisTTEls[e].style.top=s+"px",i.yaxisTTEls[e].style.left=n+t.config.yaxis[e].tooltip.offsetX+"px"):i.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),n=s.tooltipRect,o=null!==i?parseFloat(i):1,h=parseFloat(e)+o+5,c=parseFloat(t)+o/2;if(h>a.globals.gridWidth/2&&(h=h-n.ttWidth-o-10),h>a.globals.gridWidth-n.ttWidth-10&&(h=a.globals.gridWidth-n.ttWidth),h<-20&&(h=-20),a.config.tooltip.followCursor){var d=s.getElGrid().getBoundingClientRect();(h=s.e.clientX-d.left)>a.globals.gridWidth/2&&(h-=s.tooltipRect.ttWidth),(c=s.e.clientY+a.globals.translateY-d.top)>a.globals.gridHeight/2&&(c-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+c>a.globals.gridHeight&&(c=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(h)||(r.style.left=(h+=a.globals.translateX)+"px",r.style.top=c+"px")}},{key:"moveMarkers",value:function(e,t){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[e]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),r=0;r0&&(c.setAttribute("r",o),c.setAttribute("cx",i),c.setAttribute("cy",a)),this.moveXCrosshairs(i),r.fixedTooltip||this.moveTooltip(i,a,o)}}},{key:"moveDynamicPointsOnHover",value:function(e){var t,i=this.ttCtx,a=i.w,s=0,r=0,n=a.globals.pointsArray;t=new $(this.ctx).getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var o=i.tooltipUtil.getHoverMarkerSize(t);n[t]&&(s=n[t][e][0],r=n[t][e][1]);var h=i.tooltipUtil.getAllMarkers();if(null!==h)for(var c=0;c0?(h[c]&&h[c].setAttribute("r",o),h[c]&&h[c].setAttribute("cy",g)):h[c]&&h[c].setAttribute("r",0)}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,o)}},{key:"moveStickyTooltipOverBars",value:function(e,t){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new $(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"']"));n||"number"!=typeof t||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(t,"'] path[j='").concat(e,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(t,"'] path[j='").concat(e,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(t,"'] path[j='").concat(e,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(t,"'] path[j='").concat(e,"']")));var o=n?parseFloat(n.getAttribute("cx")):0,h=n?parseFloat(n.getAttribute("cy")):0,c=n?parseFloat(n.getAttribute("barWidth")):0,d=a.getElGrid().getBoundingClientRect(),g=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!g&&(o-=s%2!=0?c/2:0),n&&g&&i.globals.comboCharts&&(o-=c/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[e-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[e]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?h-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?h=a.e.clientY-d.top-a.tooltipRect.ttHeight/2:h+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(h=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,h||i.globals.gridHeight)}}]),v}(),mt=function(){function v(e){Y(this,v),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new Ve(e)}return F(v,[{key:"drawDynamicPoints",value:function(){var e=this.w,t=new T(this.ctx),i=new ue(this.ctx),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=q(a),e.config.chart.stacked&&a.sort(function(d,g){return parseFloat(d.getAttribute("data:realIndex"))-parseFloat(g.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(e,t);var r=t.getAttribute("cx"),n=t.getAttribute("cy");if(null!==i&&null!==a&&(r=i,n=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===s.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(r,n,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var t=this.w,i=this,a=this.ttCtx,s=e,r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=t.config.markers.hover.size,o=0;o=0?e[t].setAttribute("r",i):e[t].setAttribute("r",0)}}}]),v}(),vt=function(){function v(e){Y(this,v),this.w=e.w,this.ttCtx=e}return F(v,[{key:"getAttr",value:function(e,t){return parseFloat(e.target.getAttribute(t))}},{key:"handleHeatTreeTooltip",value:function(e){var t=e.e,i=e.opt,a=e.x,s=e.y,n=this.ttCtx,o=this.w;if(t.target.classList.contains("apexcharts-".concat(e.type,"-rect"))){var h=this.getAttr(t,"i"),c=this.getAttr(t,"j"),d=this.getAttr(t,"cx"),g=this.getAttr(t,"cy"),p=this.getAttr(t,"width"),f=this.getAttr(t,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:h,j:c,shared:!1,e:t}),o.globals.capturedSeriesIndex=h,o.globals.capturedDataPointIndex=c,a=d+n.tooltipRect.ttWidth/2+p,s=g+n.tooltipRect.ttHeight/2-f/2,n.tooltipPosition.moveXCrosshairs(d+p/2),a>o.globals.gridWidth/2&&(a=d-n.tooltipRect.ttWidth/2+p),n.w.config.tooltip.followCursor){var b=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-b.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),s=o.globals.clientY-b.top-(s>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(e){var t,i,a=e.e,s=e.opt,r=e.x,n=e.y,o=this.w,h=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var c=parseInt(s.paths.getAttribute("cx"),10),d=parseInt(s.paths.getAttribute("cy"),10),g=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),t=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,h.intersect){var p=P.findAncestor(s.paths,"apexcharts-series");p&&(t=parseInt(p.getAttribute("data:realIndex"),10))}if(h.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,j:i,shared:!h.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&h.markerClick(a,t,i),o.globals.capturedSeriesIndex=t,o.globals.capturedDataPointIndex=i,r=c,n=d+o.globals.translateY-1.4*h.tooltipRect.ttHeight,h.w.config.tooltip.followCursor){var f=h.getElGrid().getBoundingClientRect();n=h.e.clientY+o.globals.translateY-f.top}g<0&&(n=d),h.marker.enlargeCurrentPoint(i,s.paths,r,n)}return{x:r,y:n}}},{key:"handleBarTooltip",value:function(e){var t,i,a=e.e,s=e.opt,r=this.w,n=this.ttCtx,o=n.getElTooltip(),h=0,c=0,d=0,g=this.getBarTooltipXY({e:a,opt:s}),p=g.barHeight,f=g.j;r.globals.capturedSeriesIndex=t=g.i,r.globals.capturedDataPointIndex=f,r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!r.config.tooltip.shared?(c=g.x,d=g.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[t]:r.config.stroke.width,h=c):r.globals.comboCharts||r.config.tooltip.shared||(h/=2),isNaN(d)&&(d=r.globals.svgHeight-n.tooltipRect.ttHeight);var b=parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),m=r.globals.isMultipleYAxis?r.config.yaxis[b]&&r.config.yaxis[b].reversed:r.config.yaxis[0].reversed;if(c+n.tooltipRect.ttWidth>r.globals.gridWidth&&!m?c-=n.tooltipRect.ttWidth:c<0&&(c=0),n.w.config.tooltip.followCursor){var w=n.getElGrid().getBoundingClientRect();d=n.e.clientY-w.top}null===n.tooltip&&(n.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||n.tooltipPosition.moveXCrosshairs(r.globals.comboBarCount>0?h+i/2:h),!n.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(m&&(c-=n.tooltipRect.ttWidth)<0&&(c=0),!m||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||(d=d+p-2*(r.globals.series[t][f]<0?p:0)),d=d+r.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=c+r.globals.translateX+"px",o.style.top=d+"px")}},{key:"getBarTooltipXY",value:function(e){var t=e.e,i=e.opt,a=this.w,s=null,r=this.ttCtx,n=0,o=0,h=0,c=0,d=0,g=t.target.classList;if(g.contains("apexcharts-bar-area")||g.contains("apexcharts-candlestick-area")||g.contains("apexcharts-boxPlot-area")||g.contains("apexcharts-rangebar-area")){var p=t.target,f=p.getBoundingClientRect(),b=i.elGrid.getBoundingClientRect(),m=f.height;d=f.height;var w=f.width,k=parseInt(p.getAttribute("cx"),10),l=parseInt(p.getAttribute("cy"),10);c=parseFloat(p.getAttribute("barWidth"));var u="touchmove"===t.type?t.touches[0].clientX:t.clientX;s=parseInt(p.getAttribute("j"),10),n=parseInt(p.parentNode.getAttribute("rel"),10)-1;var x=p.getAttribute("data-range-y1"),y=p.getAttribute("data-range-y2");a.globals.comboCharts&&(n=parseInt(p.parentNode.getAttribute("data:realIndex"),10)),r.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:n,j:s,y1:x?parseInt(x,10):null,y2:y?parseInt(y,10):null,shared:!r.showOnIntersect&&a.config.tooltip.shared,e:t}),a.config.tooltip.followCursor?a.globals.isBarHorizontal?(o=u-b.left+15,h=l-r.dataPointsDividedHeight+m/2-r.tooltipRect.ttHeight/2):(o=a.globals.isXNumeric?k-w/2:k-r.dataPointsDividedWidth+w/2,h=t.clientY-b.top-r.tooltipRect.ttHeight/2-15):a.globals.isBarHorizontal?((o=k)0&&i.setAttribute("width",t.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,t=this.ttCtx;t.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),t.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,t,i){var a=this.ttCtx,s=this.w,r=s.globals.yLabelFormatters[e];if(a.yaxisTooltips[e]){var n=a.getElGrid().getBoundingClientRect(),c=s.globals.minYArr[e]+(s.globals.maxYArr[e]-s.globals.minYArr[e]-(t-n.top)*i.yRatio[e]);a.tooltipPosition.moveYCrosshairs(t-n.top),a.yaxisTooltipText[e].innerHTML=r(c),a.tooltipPosition.moveYAxisTooltip(e)}}}]),v}(),je=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w;var t=this.w;this.tConfig=t.config.tooltip,this.tooltipUtil=new Ge(this),this.tooltipLabels=new bt(this),this.tooltipPosition=new Ve(this),this.marker=new mt(this),this.intersect=new vt(this),this.axesTooltip=new yt(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!t.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return F(v,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl?e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(e){var t=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map(function(r,n){return!!(r.show&&r.tooltip.enabled&&t.globals.axisCharts)}),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),t.config.tooltip.cssClass&&i.classList.add(t.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),t.globals.dom.elWrap.appendChild(i),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new pe(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!t.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==t.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==t.config.markers.size&&0!==t.globals.markers.largestSize||this.marker.drawDynamicPoints(this),t.globals.collapsedSeries.length!==t.globals.series.length){this.dataPointsDividedHeight=t.globals.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.globals.gridWidth/t.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=t.globals.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:t.globals.series.length),this.legendLabels=t.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var t=this,i=this.w,a=[],s=this.getElTooltip(),r=function(o){var h=document.createElement("div");h.classList.add("apexcharts-tooltip-series-group"),h.style.order=i.config.tooltip.inverseOrder?e-o:o+1,t.tConfig.shared&&t.tConfig.enabledOnSeries&&Array.isArray(t.tConfig.enabledOnSeries)&&t.tConfig.enabledOnSeries.indexOf(o)<0&&h.classList.add("apexcharts-tooltip-series-group-hidden");var c=document.createElement("span");c.classList.add("apexcharts-tooltip-marker"),c.style.backgroundColor=i.globals.colors[o],h.appendChild(c);var d=document.createElement("div");d.classList.add("apexcharts-tooltip-text"),d.style.fontFamily=t.tConfig.style.fontFamily||i.config.chart.fontFamily,d.style.fontSize=t.tConfig.style.fontSize,["y","goals","z"].forEach(function(g){var p=document.createElement("div");p.classList.add("apexcharts-tooltip-".concat(g,"-group"));var f=document.createElement("span");f.classList.add("apexcharts-tooltip-text-".concat(g,"-label")),p.appendChild(f);var b=document.createElement("span");b.classList.add("apexcharts-tooltip-text-".concat(g,"-value")),p.appendChild(b),d.appendChild(p)}),h.appendChild(d),s.appendChild(h),a.push(h)},n=0;n0&&this.addPathsEventListeners(f,d),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(d)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,t=this.getElTooltip(),i=t.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+e.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+e.globals.svgHeight-s-10),t.style.left=r+"px",t.style.top=n+"px",{x:r,y:n,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(e){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(t,e)}},{key:"addPathsEventListeners",value:function(e,t){for(var i=this,a=function(r){var n={paths:e[r],tooltipEl:t.tooltipEl,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:t.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(o){return e[r].addEventListener(o,i.onSeriesHover.bind(i,n),{capture:!1,passive:!0})})},s=0;s=100?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){i.seriesHover(e,t)},100-a))}},{key:"seriesHover",value:function(e,t){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||0===s.globals.dataPoints)||(a.length?a.forEach(function(r){var n=i.getElTooltip(r);r.w.globals.minX===i.w.globals.minX&&r.w.globals.maxX===i.w.globals.maxX&&r.w.globals.tooltip.seriesHoverByContext({chartCtx:r,ttCtx:r.w.globals.tooltip,opt:{paths:e.paths,tooltipEl:n,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:r.w.globals.tooltip.ttItems},e:t})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}},{key:"seriesHoverByContext",value:function(e){var t=e.chartCtx,i=e.ttCtx,a=e.opt,s=e.e,r=t.w,n=this.getElTooltip();n&&(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new $(t).toggleSeriesOnHover(s,s.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var t,i,a=e.e,s=e.opt,r=this.w,n=s.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,h="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=h,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,hn.top+n.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var c=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(s)}var d=this.getElTooltip(),g=this.getElXCrosshairs(),p=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==g&&g.classList.add("apexcharts-active");var f=this.yaxisTooltips.filter(function(w){return!0===w});if(null!==this.ycrosshairs&&f.length&&this.ycrosshairs.classList.add("apexcharts-active"),p&&!this.showOnIntersect)this.handleStickyTooltip(a,o,h,s);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var b=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:t,y:i,type:r.config.chart.type});i=b.y,d.style.left=(t=b.x)+"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:t,y:i});if(this.yaxisTooltips.length)for(var m=0;mh.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(e,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||s.globals.isBarHorizontal){var c=s.globals.series.findIndex(function(d,g){return!s.globals.collapsedSeriesIndices.includes(g)});this.create(e,this,c,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,t,i,a){var s=this.w;if(this.tConfig.shared||null!==s.globals.series[t][a]){if(void 0!==s.globals.series[t][a])this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,a,i.ttItems):this.create(e,this,t,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex(function(n,o){return!s.globals.collapsedSeriesIndices.includes(o)});this.create(e,this,r,a,i.ttItems)}}else this.handleMouseOut(i)}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,t=new T(this.ctx),i=e.globals.dom.Paper.select(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,A=this.w,S=t;"mouseup"===e.type&&this.markerClick(e,i,a),null===y&&(y=this.tConfig.shared);var C=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars();if(A.config.legend.tooltipHoverFormatter){var I=A.config.legend.tooltipHoverFormatter,M=Array.from(this.legendLabels);M.forEach(function(ne){var te=ne.getAttribute("data:default-text");ne.innerHTML=decodeURIComponent(te)});for(var z=0;z0?S.marker.enlargePoints(a):S.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var G=new T(this.ctx),N=A.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var j=0;js.globals.gridHeight&&(b=s.globals.gridHeight-l)),{bcx:d,bcy:c,dataLabelsX:t,dataLabelsY:b,totalDataLabelsX:a,totalDataLabelsY:i,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var t=this.w,i=e.x,a=e.i,s=e.j,r=e.realIndex,n=e.groupIndex,o=e.bcy,h=e.barHeight,c=e.barWidth,d=e.textRects,g=e.dataLabelsX,p=e.strokeWidth,f=e.dataLabelsConfig,b=e.barDataLabelsConfig,m=e.barTotalDataLabelsConfig,w=e.offX,k=e.offY,l=t.globals.gridHeight/t.globals.dataPoints;c=Math.abs(c);var u,x,y=(o+=-1!==n?n*h:0)-(this.barCtx.isRangeBar?0:l)+h/2+d.height/2+k-3,A="start",S=this.barCtx.series[a][s]<0,C=i;switch(this.barCtx.isReversed&&(C=i+c-(S?2*c:0),i=t.globals.gridWidth-c),b.position){case"center":g=S?C+c/2-w:Math.max(d.width/2,C-c/2)+w;break;case"bottom":g=S?C+c-p-Math.round(d.width/2)-w:C-c+p+Math.round(d.width/2)+w;break;case"top":g=S?C-p+Math.round(d.width/2)-w:C-p-Math.round(d.width/2)+w}if(this.barCtx.lastActiveBarSerieIndex===r&&m.enabled){var L=new T(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),f.fontSize);S?(u=C-p+Math.round(L.width/2)-w-m.offsetX-15,A="end"):u=C-p-Math.round(L.width/2)+w+m.offsetX+15,x=y+m.offsetY}return t.config.chart.stacked||(g<0?g=g+d.width+p:g+d.width/2>t.globals.gridWidth&&(g=t.globals.gridWidth-d.width-p)),{bcx:i,bcy:o,dataLabelsX:g,dataLabelsY:y,totalDataLabelsX:u,totalDataLabelsY:x,totalDataLabelsAnchor:A}}},{key:"drawCalculatedDataLabels",value:function(e){var t=e.x,i=e.y,a=e.val,s=e.i,r=e.j,n=e.textRects,o=e.barHeight,h=e.barWidth,c=e.dataLabelsConfig,d=this.w,g="rotate(0)";"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&(g="rotate(-90, ".concat(t,", ").concat(i,")"));var p=new ae(this.barCtx.ctx),f=new T(this.barCtx.ctx),b=c.formatter,m=null,w=d.globals.collapsedSeriesIndices.indexOf(s)>-1;if(c.enabled&&!w){m=f.group({class:"apexcharts-data-labels",transform:g});var k="";void 0!==a&&(k=b(a,E(E({},d),{},{seriesIndex:s,dataPointIndex:r,w:d}))),!a&&d.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(k="");var l=d.globals.series[s][r]<0,u=d.config.plotOptions.bar.dataLabels.position;"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&("top"===u&&(c.textAnchor=l?"end":"start"),"center"===u&&(c.textAnchor="middle"),"bottom"===u&&(c.textAnchor=l?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&hMath.abs(h)&&(k=""):n.height/1.6>Math.abs(o)&&(k=""));var x=E({},c);this.barCtx.isHorizontal&&a<0&&("start"===c.textAnchor?x.textAnchor="end":"end"===c.textAnchor&&(x.textAnchor="start")),p.plotDataLabelsText({x:t,y:i,text:k,i:s,j:r,parent:m,dataLabelsConfig:x,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return m}},{key:"drawTotalDataLabels",value:function(e){var t,i=e.x,a=e.y,s=e.val,r=e.realIndex,n=e.textAnchor,o=e.barTotalDataLabelsConfig,h=new T(this.barCtx.ctx);return o.enabled&&void 0!==i&&void 0!==a&&this.barCtx.lastActiveBarSerieIndex===r&&(t=h.drawText({x:i,y:a,foreColor:o.style.color,text:s,textAnchor:n,fontFamily:o.style.fontFamily,fontSize:o.style.fontSize,fontWeight:o.style.fontWeight})),t}}]),v}(),kt=function(){function v(e){Y(this,v),this.w=e.w,this.barCtx=e}return F(v,[{key:"initVariables",value:function(e){var t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[i].length),t.globals.isXNumeric)for(var a=0;at.globals.minX&&t.globals.seriesX[i][a]0&&(a=h.globals.minXDiff/g),(r=a/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=h.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.yaxisIndex]-(this.barCtx.isReversed?h.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.yaxisIndex]:0),e=h.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return{x:e,y:t,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:n,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(e){var t=e.w;t.globals.hasSeriesGroups?t.globals.seriesGroups.forEach(function(i){e[i]||(e[i]={}),e[i].prevY=[],e[i].prevX=[],e[i].prevYF=[],e[i].prevXF=[],e[i].prevYVal=[],e[i].prevXVal=[]}):(e.prevY=[],e.prevX=[],e.prevYF=[],e.prevXF=[],e.prevYVal=[],e.prevXVal=[])}},{key:"initializeStackedXYVars",value:function(e){var t=e.w;t.globals.hasSeriesGroups?t.globals.seriesGroups.forEach(function(i){e[i]||(e[i]={}),e[i].xArrj=[],e[i].xArrjF=[],e[i].xArrjVal=[],e[i].yArrj=[],e[i].yArrjF=[],e[i].yArrjVal=[]}):(e.xArrj=[],e.xArrjF=[],e.xArrjVal=[],e.yArrj=[],e.yArrjF=[],e.yArrjVal=[])}},{key:"getPathFillColor",value:function(e,t,i,a){var s,r,n,o,h=this.w,c=new J(this.barCtx.ctx),d=null,g=this.barCtx.barOptions.distributed?i:t;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(p){e[t][i]>=p.from&&e[t][i]<=p.to&&(d=p.color)}),h.config.series[t].data[i]&&h.config.series[t].data[i].fillColor&&(d=h.config.series[t].data[i].fillColor),c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?g:a,dataPointIndex:i,color:d,value:e[t][i],fillConfig:null===(s=h.config.series[t].data[i])||void 0===s?void 0:s.fill,fillType:null!==(r=h.config.series[t].data[i])&&void 0!==r&&null!==(n=r.fill)&&void 0!==n&&n.type?null===(o=h.config.series[t].data[i])||void 0===o?void 0:o.fill.type:h.config.fill.type})}},{key:"getStrokeWidth",value:function(e,t,i){var a=0,s=this.w;return this.barCtx.isNullValue=!this.barCtx.series[e][t],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(e){var t=this.w,i=!1;return t.config.plotOptions.bar.borderRadius>0&&(t.config.chart.stacked&&"last"===t.config.plotOptions.bar.borderRadiusWhenStacked?this.barCtx.lastActiveBarSerieIndex===e&&(i=!0):i=!0),i}},{key:"barBackground",value:function(e){var t=e.j,i=e.i,a=e.x1,s=e.x2,r=e.y1,n=e.y2,o=e.elSeries,h=this.w,c=new T(this.barCtx.ctx),d=new $(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&d===i){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);var p=c.drawRect(void 0!==a?a:0,void 0!==r?r:0,void 0!==s?s:h.globals.gridWidth,void 0!==n?n:h.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,this.barCtx.barOptions.colors.backgroundBarColors[t],this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(p),p.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var t,i=e.barWidth,a=e.barXPosition,s=e.y1,r=e.y2,n=e.strokeWidth,o=e.seriesGroup,h=e.realIndex,c=e.i,d=e.j,g=e.w,p=new T(this.barCtx.ctx);(n=Array.isArray(n)?n[h]:n)||(n=0);var f=i,b=a;null!==(t=g.config.series[h].data[d])&&void 0!==t&&t.columnWidthOffset&&(b=a-g.config.series[h].data[d].columnWidthOffset/2,f=i+g.config.series[h].data[d].columnWidthOffset);var m=b,w=b+f;r+=.001;var k=p.move(m,s+=.001),l=p.move(m,s),u=p.line(w-n,s);if(g.globals.previousPaths.length>0&&(l=this.barCtx.getPreviousPath(h,d,!1)),k=k+p.line(m,r)+p.line(w-n,r)+p.line(w-n,s)+("around"===g.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),l=l+p.line(m,s)+u+u+u+u+u+p.line(m,s)+("around"===g.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),this.shouldApplyRadius(h)&&(k=p.roundPathCorners(k,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var x=this.barCtx;g.globals.hasSeriesGroups&&o&&(x=this.barCtx[o]),x.yArrj.push(r),x.yArrjF.push(Math.abs(s-r)),x.yArrjVal.push(this.barCtx.series[c][d])}return{pathTo:k,pathFrom:l}}},{key:"getBarpaths",value:function(e){var t,i=e.barYPosition,a=e.barHeight,s=e.x1,r=e.x2,n=e.strokeWidth,o=e.seriesGroup,h=e.realIndex,c=e.i,d=e.j,g=e.w,p=new T(this.barCtx.ctx);(n=Array.isArray(n)?n[h]:n)||(n=0);var f=i,b=a;null!==(t=g.config.series[h].data[d])&&void 0!==t&&t.barHeightOffset&&(f=i-g.config.series[h].data[d].barHeightOffset/2,b=a+g.config.series[h].data[d].barHeightOffset);var m=f,w=f+b;r+=.001;var k=p.move(s+=.001,m),l=p.move(s,m);g.globals.previousPaths.length>0&&(l=this.barCtx.getPreviousPath(h,d,!1));var u=p.line(s,w-n);if(k=k+p.line(r,m)+p.line(r,w-n)+u+("around"===g.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),l=l+p.line(s,m)+u+u+u+u+u+p.line(s,m)+("around"===g.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),this.shouldApplyRadius(h)&&(k=p.roundPathCorners(k,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var x=this.barCtx;g.globals.hasSeriesGroups&&o&&(x=this.barCtx[o]),x.xArrj.push(r),x.xArrjF.push(Math.abs(s-r)),x.xArrjVal.push(this.barCtx.series[c][d])}return{pathTo:k,pathFrom:l}}},{key:"checkZeroSeries",value:function(e){for(var t=e.series,i=this.w,a=0;a2&&void 0!==arguments[2]&&!arguments[2]?null:t;return null!=e&&(i=t+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?null:t;return null!=e&&(i=t-e/this.barCtx.yRatio[this.barCtx.yaxisIndex]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[this.barCtx.yaxisIndex]:0)),i}},{key:"getGoalValues",value:function(e,t,i,a,s){var r=this,n=this.w,o=[],h=function(g,p){var f;o.push((xe(f={},e,"x"===e?r.getXForValue(g,t,!1):r.getYForValue(g,i,!1)),xe(f,"attrs",p),f))};if(n.globals.seriesGoals[a]&&n.globals.seriesGoals[a][s]&&Array.isArray(n.globals.seriesGoals[a][s])&&n.globals.seriesGoals[a][s].forEach(function(g){h(g.value,g)}),this.barCtx.barOptions.isDumbbell&&n.globals.seriesRange.length){var c=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:n.globals.colors,d={strokeHeight:"x"===e?0:n.globals.markers.size[a],strokeWidth:"x"===e?n.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(c[a])?c[a][0]:c[a]};h(n.globals.seriesRangeStart[a][s],d),h(n.globals.seriesRangeEnd[a][s],E(E({},d),{},{strokeColor:Array.isArray(c[a])?c[a][1]:c[a]}))}return o}},{key:"drawGoalLine",value:function(e){var t=e.barXPosition,i=e.barYPosition,a=e.goalX,s=e.goalY,r=e.barWidth,n=e.barHeight,o=new T(this.barCtx.ctx),h=o.group({className:"apexcharts-bar-goals-groups"});h.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:h.node}),h.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var c=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach(function(d){var g=void 0!==d.attrs.strokeHeight?d.attrs.strokeHeight:n/2,p=i+g+n/2;c=o.drawLine(d.x,p-2*g,d.x,p,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeWidth?d.attrs.strokeWidth:2,d.attrs.strokeLineCap),h.add(c)}):Array.isArray(s)&&s.forEach(function(d){var g=void 0!==d.attrs.strokeWidth?d.attrs.strokeWidth:r/2,p=t+g+r/2;c=o.drawLine(p-2*g,d.y,p,d.y,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeHeight?d.attrs.strokeHeight:2,d.attrs.strokeLineCap),h.add(c)}),h}}]),v}(),re=function(){function v(e,t){Y(this,v),this.ctx=e,this.w=e.w;var i=this.w;this.barOptions=i.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=i.config.stroke.width,this.isNullValue=!1,this.isRangeBar=i.globals.seriesRange.length&&this.isHorizontal,this.xyRatios=t,null!==this.xyRatios&&(this.xRatio=t.xRatio,this.initialXRatio=t.initialXRatio,this.yRatio=t.yRatio,this.invertedXRatio=t.invertedXRatio,this.invertedYRatio=t.invertedYRatio,this.baseLineY=t.baseLineY,this.baseLineInvertedY=t.baseLineInvertedY),this.yaxisIndex=0,this.seriesLen=0;var a=new $(this.ctx);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]);var s=a.getBarSeriesIndices(),r=new W(this.ctx);this.stackedSeriesTotals=r.getStackedSeriesTotals(this.w.config.series.map(function(n,o){return-1===s.indexOf(o)?o:-1}).filter(function(n){return-1!==n})),this.barHelpers=new kt(this)}return F(v,[{key:"draw",value:function(e,t){var i=this.w,a=new T(this.ctx),s=new W(this.ctx,i);e=s.getLogSeries(e),this.series=e,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering.");for(var n=0,o=0;n0&&(this.visibleI=this.visibleI+1);var l=0,u=0;this.yRatio.length>1&&(this.yaxisIndex=w),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var x=this.barHelpers.initialPositions();f=x.y,l=x.barHeight,c=x.yDivision,g=x.zeroW,p=x.x,u=x.barWidth,h=x.xDivision,d=x.zeroH,this.horizontal||m.push(p+u/2);for(var y=a.group({class:"apexcharts-datalabels","data:realIndex":w}),A=a.group({class:"apexcharts-bar-goals-markers",style:"pointer-events: none"}),S=0;S0&&m.push(p+u/2),b.push(f);var z=this.barHelpers.getPathFillColor(e,n,S,w);this.renderSeries({realIndex:w,pathFill:z,j:S,i:n,pathFrom:L.pathFrom,pathTo:L.pathTo,strokeWidth:C,elSeries:k,x:p,y:f,series:e,barHeight:L.barHeight?L.barHeight:l,barWidth:L.barWidth?L.barWidth:u,elDataLabelsWrap:y,elGoalsMarkers:A,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[w]=m,i.globals.seriesYvalues[w]=b,r.add(k)}return r}},{key:"renderSeries",value:function(e){var t=e.realIndex,i=e.pathFill,a=e.lineFill,s=e.j,r=e.i,n=e.groupIndex,o=e.pathFrom,h=e.pathTo,c=e.strokeWidth,d=e.elSeries,g=e.x,p=e.y,f=e.y1,b=e.y2,m=e.series,w=e.barHeight,k=e.barWidth,l=e.barYPosition,u=e.elDataLabelsWrap,x=e.elGoalsMarkers,y=e.visibleSeries,A=e.type,S=this.w,C=new T(this.ctx);a||(a=this.barOptions.distributed?S.globals.stroke.colors[s]:S.globals.stroke.colors[t]),S.config.series[r].data[s]&&S.config.series[r].data[s].strokeColor&&(a=S.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var I=C.renderPaths({i:r,j:s,realIndex:t,pathFrom:o,pathTo:h,stroke:a,strokeWidth:c,strokeLineCap:S.config.stroke.lineCap,fill:i,animationDelay:s/S.config.chart.animations.animateGradually.delay*(S.config.chart.animations.speed/S.globals.dataPoints)/2.4,initialSpeed:S.config.chart.animations.speed,dataChangeSpeed:S.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(A,"-area")});I.attr("clip-path","url(#gridRectMask".concat(S.globals.cuid,")"));var M=S.config.forecastDataPoints;M.count>0&&s>=S.globals.dataPoints-M.count&&(I.node.setAttribute("stroke-dasharray",M.dashArray),I.node.setAttribute("stroke-width",M.strokeWidth),I.node.setAttribute("fill-opacity",M.fillOpacity)),void 0!==f&&void 0!==b&&(I.attr("data-range-y1",f),I.attr("data-range-y2",b)),new _(this.ctx).setSelectionFilter(I,t,s),d.add(I);var z=new wt(this).handleBarDataLabels({x:g,y:p,y1:f,y2:b,i:r,j:s,series:m,realIndex:t,groupIndex:n,barHeight:w,barWidth:k,barYPosition:l,renderedPath:I,visibleSeries:y});return null!==z.dataLabels&&u.add(z.dataLabels),z.totalDataLabels&&u.add(z.totalDataLabels),d.add(u),x&&d.add(x),d}},{key:"drawBarPaths",value:function(e){var t,n,i=e.indexes,a=e.barHeight,s=e.strokeWidth,r=e.zeroW,o=e.y,h=e.yDivision,c=e.elSeries,d=this.w,g=i.i,p=i.j;if(d.globals.isXNumeric)t=(o=(d.globals.seriesX[g][p]-d.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var f=0,b=0;d.globals.seriesPercent.forEach(function(w,k){w[p]&&f++,k0&&(a=this.seriesLen*a/f),t=o+a*this.visibleI,t-=a*b}else t=o+a*this.visibleI;n=this.barHelpers.getXForValue(this.series[g][p],r);var m=this.barHelpers.getBarpaths({barYPosition:t,barHeight:a,x1:r,x2:n,strokeWidth:s,series:this.series,realIndex:i.realIndex,i:g,j:p,w:d});return d.globals.isXNumeric||(o+=h),this.barHelpers.barBackground({j:p,i:g,y1:t-a*this.visibleI,y2:a*this.seriesLen,elSeries:c}),{pathTo:m.pathTo,pathFrom:m.pathFrom,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",r,null,g,p),barYPosition:t,barHeight:a}}},{key:"drawColumnPaths",value:function(e){var t,s,i=e.indexes,a=e.x,r=e.xDivision,n=e.barWidth,o=e.zeroH,h=e.strokeWidth,c=e.elSeries,d=this.w,g=i.realIndex,p=i.i,f=i.j,b=i.bc;if(d.globals.isXNumeric){var m=g;d.globals.seriesX[g].length||(m=d.globals.maxValsInArrayIndex),d.globals.seriesX[m][f]&&(a=(d.globals.seriesX[m][f]-d.globals.minX)/this.xRatio-n*this.seriesLen/2),t=a+n*this.visibleI}else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var w=0,k=0;d.globals.seriesPercent.forEach(function(u,x){u[f]&&w++,x0&&(n=this.seriesLen*n/w),t=a+n*this.visibleI,t-=n*k}else t=a+n*this.visibleI;s=this.barHelpers.getYForValue(this.series[p][f],o);var l=this.barHelpers.getColumnPaths({barXPosition:t,barWidth:n,y1:o,y2:s,strokeWidth:h,series:this.series,realIndex:i.realIndex,i:p,j:f,w:d});return d.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:b,j:f,i:p,x1:t-h/2-n*this.visibleI,x2:n*this.seriesLen+h/2,elSeries:c}),{pathTo:l.pathTo,pathFrom:l.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,p,f),barXPosition:t,barWidth:n}}},{key:"getPreviousPath",value:function(e,t){for(var i,a=this.w,s=0;s0&&parseInt(r.realIndex,10)===parseInt(e,10)&&void 0!==a.globals.previousPaths[s].paths[t]&&(i=a.globals.previousPaths[s].paths[t].d)}return i}}]),v}(),_e=function(v){le(t,v);var e=he(t);function t(){return Y(this,t),e.apply(this,arguments)}return F(t,[{key:"draw",value:function(i,a){var s=this,r=this.w;this.graphics=new T(this.ctx),this.bar=new re(this.ctx,this.xyRatios);var n=new W(this.ctx,r);i=n.getLogSeries(i),this.yRatio=n.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i),"100%"===r.config.chart.stackType&&(i=r.globals.seriesPercent.slice()),this.series=i,this.barHelpers.initializeStackedPrevVars(this);for(var o=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),h=0,c=0,d=function(f,b){var m=void 0,w=void 0,k=void 0,l=void 0,u=-1;s.groupCtx=s,r.globals.seriesGroups.forEach(function(N,j){N.indexOf(r.config.series[f].name)>-1&&(u=j)}),-1!==u&&(s.groupCtx=s[r.globals.seriesGroups[u]]);var x=[],y=[],A=r.globals.comboCharts?a[f]:f;s.yRatio.length>1&&(s.yaxisIndex=A),s.isReversed=r.config.yaxis[s.yaxisIndex]&&r.config.yaxis[s.yaxisIndex].reversed;var S=s.graphics.group({class:"apexcharts-series",seriesName:P.escapeString(r.globals.seriesNames[A]),rel:f+1,"data:realIndex":A});s.ctx.series.addCollapsedClassToSeries(S,A);var C=s.graphics.group({class:"apexcharts-datalabels","data:realIndex":A}),L=s.graphics.group({class:"apexcharts-bar-goals-markers",style:"pointer-events: none"}),I=0,M=0,z=s.initialPositions(h,c,m,w,k,l);c=z.y,I=z.barHeight,w=z.yDivision,l=z.zeroW,h=z.x,M=z.barWidth,m=z.xDivision,k=z.zeroH,s.barHelpers.initializeStackedXYVars(s),1===s.groupCtx.prevY.length&&s.groupCtx.prevY[0].every(function(N){return isNaN(N)})&&(s.groupCtx.prevY[0]=s.groupCtx.prevY[0].map(function(N){return k}),s.groupCtx.prevYF[0]=s.groupCtx.prevYF[0].map(function(N){return 0}));for(var X=0;X1?(s=p.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:c*parseInt(p.config.plotOptions.bar.columnWidth,10)/100,null!==(g=p.globals.seriesGroups)&&void 0!==g&&g.length&&(c/=p.globals.seriesGroups.length),-1===String(p.config.plotOptions.bar.columnWidth).indexOf("%")&&(c=parseInt(p.config.plotOptions.bar.columnWidth,10)),n=p.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?p.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),i=p.globals.padHorizontal+(s-c)/2),{x:i,y:a,yDivision:r,xDivision:s,barHeight:h,barWidth:c,zeroH:n,zeroW:o}}},{key:"drawStackedBarPaths",value:function(i){for(var a,h,s=i.indexes,r=i.barHeight,n=i.strokeWidth,o=i.zeroW,c=i.y,d=i.groupIndex,g=i.seriesGroup,p=i.yDivision,f=i.elSeries,b=this.w,m=c+(-1!==d?d*r:0),w=s.i,k=s.j,l=0,u=0;u0){var y=o;this.groupCtx.prevXVal[x-1][k]<0?y=this.series[w][k]>=0?this.groupCtx.prevX[x-1][k]+l-2*(this.isReversed?l:0):this.groupCtx.prevX[x-1][k]:this.groupCtx.prevXVal[x-1][k]>=0&&(y=this.series[w][k]>=0?this.groupCtx.prevX[x-1][k]:this.groupCtx.prevX[x-1][k]-l+2*(this.isReversed?l:0)),a=y}else a=o;var A=this.barHelpers.getBarpaths({barYPosition:m,barHeight:r,x1:a,x2:h=null===this.series[w][k]?a:a+this.series[w][k]/this.invertedYRatio-2*(this.isReversed?this.series[w][k]/this.invertedYRatio:0),strokeWidth:n,series:this.series,realIndex:s.realIndex,seriesGroup:g,i:w,j:k,w:b});return this.barHelpers.barBackground({j:k,i:w,y1:m,y2:r,elSeries:f}),c+=p,{pathTo:A.pathTo,pathFrom:A.pathFrom,goalX:this.barHelpers.getGoalValues("x",o,null,w,k),barYPosition:m,x:h,y:c}}},{key:"drawStackedColumnPaths",value:function(i){var r,a=i.indexes,s=i.x,n=i.xDivision,o=i.barWidth,h=i.zeroH,c=i.groupIndex,d=i.seriesGroup,g=i.elSeries,p=this.w,f=a.i,b=a.j,m=a.bc;if(p.globals.isXNumeric){var w=p.globals.seriesX[f][b];w||(w=0),s=(w-p.globals.minX)/this.xRatio-o/2,p.globals.seriesGroups.length&&(s=(w-p.globals.minX)/this.xRatio-o/2*p.globals.seriesGroups.length)}for(var k,l=s+(-1!==c?c*o:0),u=0,x=0;x0&&!p.globals.isXNumeric||y>0&&p.globals.isXNumeric&&p.globals.seriesX[f-1][b]===p.globals.seriesX[f][b]){var A,S,C,L=Math.min(this.yRatio.length+1,f+1);if(void 0!==this.groupCtx.prevY[y-1]&&this.groupCtx.prevY[y-1].length)for(var I=1;I=0?C-u+2*(this.isReversed?u:0):C;break}if((null===(R=this.groupCtx.prevYVal[y-z])||void 0===R?void 0:R[b])>=0){S=this.series[f][b]>=0?C:C+u-2*(this.isReversed?u:0);break}}void 0===S&&(S=p.globals.gridHeight),k=null!==(A=this.groupCtx.prevYF[0])&&void 0!==A&&A.every(function(H){return 0===H})&&this.groupCtx.prevYF.slice(1,y).every(function(H){return H.every(function(O){return isNaN(O)})})?h:S}else k=h;var D=this.barHelpers.getColumnPaths({barXPosition:l,barWidth:o,y1:k,y2:r=this.series[f][b]?k-this.series[f][b]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[f][b]/this.yRatio[this.yaxisIndex]:0):k,yRatio:this.yRatio[this.yaxisIndex],strokeWidth:this.strokeWidth,series:this.series,seriesGroup:d,realIndex:a.realIndex,i:f,j:b,w:p});return this.barHelpers.barBackground({bc:m,j:b,i:f,x1:l,x2:o,elSeries:g}),s+=n,{pathTo:D.pathTo,pathFrom:D.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,h,f,b),barXPosition:l,x:p.globals.isXNumeric?s-n:s,y:r}}}]),t}(re),Ie=function(v){le(t,v);var e=he(t);function t(){return Y(this,t),e.apply(this,arguments)}return F(t,[{key:"draw",value:function(i,a,s){var r=this,n=this.w,o=new T(this.ctx),h=n.globals.comboCharts?a:n.config.chart.type,c=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 d=new W(this.ctx,n);i=d.getLogSeries(i),this.series=i,this.yRatio=d.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i);for(var g=o.group({class:"apexcharts-".concat(h,"-series apexcharts-plot-series")}),p=function(b){r.isBoxPlot="boxPlot"===n.config.chart.type||"boxPlot"===n.config.series[b].type;var m,w,k,l,L,I,u=void 0,x=void 0,y=[],A=[],S=n.globals.comboCharts?s[b]:b,C=o.group({class:"apexcharts-series",seriesName:P.escapeString(n.globals.seriesNames[S]),rel:b+1,"data:realIndex":S});r.ctx.series.addCollapsedClassToSeries(C,S),i[b].length>0&&(r.visibleI=r.visibleI+1),r.yRatio.length>1&&(r.yaxisIndex=S);var M=r.barHelpers.initialPositions();x=M.y,L=M.barHeight,w=M.yDivision,l=M.zeroW,m=M.xDivision,k=M.zeroH,A.push((u=M.x)+(I=M.barWidth)/2);for(var z=o.group({class:"apexcharts-datalabels","data:realIndex":S}),X=function(D){var H=r.barHelpers.getStrokeWidth(b,D,S),O=null,G={indexes:{i:b,j:D,realIndex:S},x:u,y:x,strokeWidth:H,elSeries:C};O=r.isHorizontal?r.drawHorizontalBoxPaths(E(E({},G),{},{yDivision:w,barHeight:L,zeroW:l})):r.drawVerticalBoxPaths(E(E({},G),{},{xDivision:m,barWidth:I,zeroH:k})),x=O.y,u=O.x,D>0&&A.push(u+I/2),y.push(x),O.pathTo.forEach(function(N,j){var ne=!r.isBoxPlot&&r.candlestickOptions.wick.useFillColor?O.color[j]:n.globals.stroke.colors[b],te=c.fillPath({seriesNumber:S,dataPointIndex:D,color:O.color[j],value:i[b][D]});r.renderSeries({realIndex:S,pathFill:te,lineFill:ne,j:D,i:b,pathFrom:O.pathFrom,pathTo:N,strokeWidth:H,elSeries:C,x:u,y:x,series:i,barHeight:L,barWidth:I,elDataLabelsWrap:z,visibleSeries:r.visibleI,type:n.config.chart.type})})},R=0;Ru.c&&(f=!1);var A=Math.min(u.o,u.c),S=Math.max(u.o,u.c),C=u.m;c.globals.isXNumeric&&(s=(c.globals.seriesX[l][p]-c.globals.minX)/this.xRatio-n/2);var L=s+n*this.visibleI;null==this.series[g][p]?(A=o,S=o):(A=o-A/k,S=o-S/k,x=o-u.h/k,y=o-u.l/k,C=o-u.m/k);var I=d.move(L,o),M=d.move(L+n/2,A);return c.globals.previousPaths.length>0&&(M=this.getPreviousPath(l,p,!0)),I=this.isBoxPlot?[d.move(L,A)+d.line(L+n/2,A)+d.line(L+n/2,x)+d.line(L+n/4,x)+d.line(L+n-n/4,x)+d.line(L+n/2,x)+d.line(L+n/2,A)+d.line(L+n,A)+d.line(L+n,C)+d.line(L,C)+d.line(L,A+h/2),d.move(L,C)+d.line(L+n,C)+d.line(L+n,S)+d.line(L+n/2,S)+d.line(L+n/2,y)+d.line(L+n-n/4,y)+d.line(L+n/4,y)+d.line(L+n/2,y)+d.line(L+n/2,S)+d.line(L,S)+d.line(L,C)+"z"]:[d.move(L,S)+d.line(L+n/2,S)+d.line(L+n/2,x)+d.line(L+n/2,S)+d.line(L+n,S)+d.line(L+n,A)+d.line(L+n/2,A)+d.line(L+n/2,y)+d.line(L+n/2,A)+d.line(L,A)+d.line(L,S-h/2)],M+=d.move(L,A),c.globals.isXNumeric||(s+=r),{pathTo:I,pathFrom:M,x:s,y:S,barXPosition:L,color:this.isBoxPlot?w:f?[b]:[m]}}},{key:"drawHorizontalBoxPaths",value:function(i){var a=i.indexes,s=i.y,r=i.yDivision,n=i.barHeight,o=i.zeroW,h=i.strokeWidth,c=this.w,d=new T(this.ctx),g=a.i,p=a.j,f=this.boxOptions.colors.lower;this.isBoxPlot&&(f=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var b=this.invertedYRatio,m=a.realIndex,w=this.getOHLCValue(m,p),k=o,l=o,u=Math.min(w.o,w.c),x=Math.max(w.o,w.c),y=w.m;c.globals.isXNumeric&&(s=(c.globals.seriesX[m][p]-c.globals.minX)/this.invertedXRatio-n/2);var A=s+n*this.visibleI;null==this.series[g][p]?(u=o,x=o):(u=o+u/b,x=o+x/b,k=o+w.h/b,l=o+w.l/b,y=o+w.m/b);var S=d.move(o,A),C=d.move(u,A+n/2);return c.globals.previousPaths.length>0&&(C=this.getPreviousPath(m,p,!0)),S=[d.move(u,A)+d.line(u,A+n/2)+d.line(k,A+n/2)+d.line(k,A+n/2-n/4)+d.line(k,A+n/2+n/4)+d.line(k,A+n/2)+d.line(u,A+n/2)+d.line(u,A+n)+d.line(y,A+n)+d.line(y,A)+d.line(u+h/2,A),d.move(y,A)+d.line(y,A+n)+d.line(x,A+n)+d.line(x,A+n/2)+d.line(l,A+n/2)+d.line(l,A+n-n/4)+d.line(l,A+n/4)+d.line(l,A+n/2)+d.line(x,A+n/2)+d.line(x,A)+d.line(y,A)+"z"],C+=d.move(u,A),c.globals.isXNumeric||(s+=r),{pathTo:S,pathFrom:C,x,y:s,barYPosition:A,color:f}}},{key:"getOHLCValue",value:function(i,a){var s=this.w;return{o:this.isBoxPlot?s.globals.seriesCandleH[i][a]:s.globals.seriesCandleO[i][a],h:this.isBoxPlot?s.globals.seriesCandleO[i][a]:s.globals.seriesCandleH[i][a],m:s.globals.seriesCandleM[i][a],l:this.isBoxPlot?s.globals.seriesCandleC[i][a]:s.globals.seriesCandleL[i][a],c:this.isBoxPlot?s.globals.seriesCandleL[i][a]:s.globals.seriesCandleC[i][a]}}}]),t}(re),Ue=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w}return F(v,[{key:"checkColorRange",value:function(){var e=this.w,t=!1,i=e.config.plotOptions[e.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map(function(a,s){a.from<=0&&(t=!0)}),t}},{key:"getShadeColor",value:function(e,t,i,a){var s=this.w,r=1,n=s.config.plotOptions[e].shadeIntensity,o=this.determineColor(e,t,i);s.globals.hasNegs||a?r=s.config.plotOptions[e].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):1.25*n*(1-o.percent/100):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(r=1-o.percent/100,"treemap"===e&&(r=1.25*n*(1-o.percent/100)));var h=o.color,c=new P;return s.config.plotOptions[e].enableShades&&(h=P.hexToRgba(c.shadeColor("dark"===this.w.config.theme.mode?-1*r:r,o.color),s.config.fill.opacity)),{color:h,colorProps:o}}},{key:"determineColor",value:function(e,t,i){var a=this.w,s=a.globals.series[t][i],r=a.config.plotOptions[e],n=r.colorScale.inverse?i:t;r.distributed&&"treemap"===a.config.chart.type&&(n=i);var o=a.globals.colors[n],h=null,c=Math.min.apply(Math,q(a.globals.series[t])),d=Math.max.apply(Math,q(a.globals.series[t]));r.distributed||"heatmap"!==e||(c=a.globals.minY,d=a.globals.maxY),void 0!==r.colorScale.min&&(c=r.colorScale.mina.globals.maxY?r.colorScale.max:a.globals.maxY);var g=Math.abs(d)+Math.abs(c),p=100*s/(0===g?g-1e-6:g);return r.colorScale.ranges.length>0&&r.colorScale.ranges.map(function(f,b){if(s>=f.from&&s<=f.to){o=f.color,h=f.foreColor?f.foreColor:null,c=f.from,d=f.to;var m=Math.abs(d)+Math.abs(c);p=100*s/(0===m?m-1e-6:m)}}),{color:o,foreColor:h,percent:p}}},{key:"calculateDataLabels",value:function(e){var t=e.text,i=e.x,a=e.y,s=e.i,r=e.j,n=e.colorProps,o=e.fontSize,h=this.w.config.dataLabels,c=new T(this.ctx),d=new ae(this.ctx),g=null;if(h.enabled){g=c.group({class:"apexcharts-data-labels"});var f=h.offsetY,b=i+h.offsetX,m=a+parseFloat(h.style.fontSize)/3+f;d.plotDataLabelsText({x:b,y:m,text:t,i:s,j:r,color:n.foreColor,parent:g,fontSize:o,dataLabelsConfig:h})}return g}},{key:"addListeners",value:function(e){var t=new T(this.ctx);e.node.addEventListener("mouseenter",t.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",t.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",t.pathMouseDown.bind(this,e))}}]),v}(),At=function(){function v(e,t){Y(this,v),this.ctx=e,this.w=e.w,this.xRatio=t.xRatio,this.yRatio=t.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new Ue(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return F(v,[{key:"draw",value:function(e){var t=this.w,i=new T(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(t.globals.cuid,")"));var s=t.globals.gridWidth/t.globals.dataPoints,r=t.globals.gridHeight/t.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var h=e.slice();t.config.yaxis[0].reversed&&(o=!0,h.reverse());for(var c=o?0:h.length-1;o?c=0;o?c++:c--){var d=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:P.escapeString(t.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(d,c),t.config.chart.dropShadow.enabled){var g=t.config.chart.dropShadow;new _(this.ctx).dropShadow(d,g,c)}for(var p=0,f=t.config.plotOptions.heatmap.shadeIntensity,b=0;b-1&&this.pieClicked(g),i.config.dataLabels.enabled){var x=l.x,y=l.y,A=100*f/this.fullAngle+"%";if(0!==f&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?t.endAngle=t.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(o=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(o)>this.fullAngle&&(o-=this.fullAngle);var h=Math.PI*(o-90)/180,c=t.centerX+s*Math.cos(n),d=t.centerY+s*Math.sin(n),g=t.centerX+s*Math.cos(h),p=t.centerY+s*Math.sin(h),f=P.polarToCartesian(t.centerX,t.centerY,t.donutSize,o),b=P.polarToCartesian(t.centerX,t.centerY,t.donutSize,r),m=a>180?1:0,w=["M",c,d,"A",s,s,0,m,1,g,p];return"donut"===t.chartType?[].concat(w,["L",f.x,f.y,"A",t.donutSize,t.donutSize,0,m,0,b.x,b.y,"L",c,d,"z"]).join(" "):"pie"===t.chartType||"polarArea"===t.chartType?[].concat(w,["L",t.centerX,t.centerY,"L",c,d]).join(" "):[].concat(w).join(" ")}},{key:"drawPolarElements",value:function(e){var t=this.w,i=new se(this.ctx),a=new T(this.ctx),s=new qe(this.ctx),r=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),t.config.yaxis[0].tickAmount,0,!0),h=o.result.reverse(),c=o.result.length;this.maxY=o.niceMax;for(var d=t.globals.radialSize,g=d/(c-1),p=0;p1&&e.total.show&&(s=e.total.color);var n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,e.value.formatter)(i,r),a||"function"!=typeof e.total.formatter||(i=e.total.formatter(r)),t=e.name.formatter(t,t===e.total.label,r),null!==n&&(n.textContent=t),null!==o&&(o.textContent=i),null!==n&&(n.style.fill=s)}},{key:"printDataLabelsInner",value:function(e,t){var i=this.w,a=e.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(t,s,a,e);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(e){var t=this,i=this.w,a=new T(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(0!==s.strokeWidth){for(var r=[],n=360/i.globals.series.length,o=0;o1)n&&!t.total.showAlways?h({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(t,t.total.label,t.total.formatter(s));else if(h({makeSliceOut:!1,printLabel:!0}),!n)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,t)}else r&&s.globals.selectedDataPoints.length&&0===s.globals.selectedDataPoints[0].length&&(r.style.opacity=0);else r&&s.globals.series.length>1&&(r.style.opacity=0)}}]),v}(),St=function(){function v(e){Y(this,v),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 t=this.w;this.graphics=new T(this.ctx),this.lineColorArr=void 0!==t.globals.stroke.colors?t.globals.stroke.colors:t.globals.colors,this.defaultSize=t.globals.svgHeight0&&(y=t.getPreviousPath(w));for(var A=0;A=10?e.x>0?(i="start",a+=10):e.x<0&&(i="end",a-=10):i="middle",Math.abs(e.y)>=t-10&&(e.y<0?s-=10:e.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(e){for(var t=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(e,10)&&void 0!==t.globals.previousPaths[a].paths[0]&&(i=t.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;e=e||[],t=t||[];for(var a=[],s=0;s=360&&(b=360-Math.abs(this.startAngle)-.1);var m=s.drawPath({d:"",stroke:p,strokeWidth:h*parseInt(g.strokeWidth,10)/100,fill:"none",strokeOpacity:g.opacity,classes:"apexcharts-radialbar-area"});g.dropShadow.enabled&&n.dropShadow(m,g.dropShadow),d.add(m),m.attr("id","apexcharts-radialbarTrack-"+c),this.animatePaths(m,{centerX:i.centerX,centerY:i.centerY,endAngle:b,startAngle:f,size:i.size,i:c,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:a.globals.easing})}return r}},{key:"drawArcs",value:function(i){var a=this.w,s=new T(this.ctx),r=new J(this.ctx),n=new _(this.ctx),o=s.group(),h=this.getStrokeWidth(i);i.size=i.size-h/2;var c=a.config.plotOptions.radialBar.hollow.background,d=i.size-h*i.series.length-this.margin*i.series.length-h*parseInt(a.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,g=d-a.config.plotOptions.radialBar.hollow.margin;void 0!==a.config.plotOptions.radialBar.hollow.image&&(c=this.drawHollowImage(i,o,d,c));var p=this.drawHollow({size:g,centerX:i.centerX,centerY:i.centerY,fill:c||"transparent"});a.config.plotOptions.radialBar.hollow.dropShadow.enabled&&n.dropShadow(p,a.config.plotOptions.radialBar.hollow.dropShadow);var b=1;!this.radialDataLabels.total.show&&a.globals.series.length>1&&(b=0);var m=null;this.radialDataLabels.show&&(m=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:d,centerX:i.centerX,centerY:i.centerY,opacity:b})),"back"===a.config.plotOptions.radialBar.hollow.position&&(o.add(p),m&&o.add(m));var w=!1;a.config.plotOptions.radialBar.inverseOrder&&(w=!0);for(var k=w?i.series.length-1:0;w?k>=0:k100?100:i.series[k])/100,S=Math.round(this.totalAngle*A)+this.startAngle,C=void 0;a.globals.dataChanged&&(y=this.startAngle,C=Math.round(this.totalAngle*P.negToZero(a.globals.previousPaths[k])/100)+y),Math.abs(S)+Math.abs(x)>=360&&(S-=.01),Math.abs(C)+Math.abs(y)>=360&&(C-=.01);var L=S-x,I=Array.isArray(a.config.stroke.dashArray)?a.config.stroke.dashArray[k]:a.config.stroke.dashArray,M=s.drawPath({d:"",stroke:u,strokeWidth:h,fill:"none",fillOpacity:a.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+k,strokeDashArray:I});T.setAttrs(M.node,{"data:angle":L,"data:value":i.series[k]}),a.config.chart.dropShadow.enabled&&n.dropShadow(M,a.config.chart.dropShadow,k),n.setSelectionFilter(M,0,k),this.addListeners(M,this.radialDataLabels),l.add(M),M.attr({index:0,j:k});var X=0;!this.initialAnim||a.globals.resized||a.globals.dataChanged||(X=a.config.chart.animations.speed),a.globals.dataChanged&&(X=a.config.chart.animations.dynamicAnimation.speed),this.animDur=X/(1.2*i.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(M,{centerX:i.centerX,centerY:i.centerY,endAngle:S,startAngle:x,prevEndAngle:C,prevStartAngle:y,size:i.size,i:k,totalItems:2,animBeginArr:this.animBeginArr,dur:X,shouldSetPrevPaths:!0,easing:a.globals.easing})}return{g:o,elHollow:p,dataLabels:m}}},{key:"drawHollow",value:function(i){var a=new T(this.ctx).drawCircle(2*i.size);return a.attr({class:"apexcharts-radialbar-hollow",cx:i.centerX,cy:i.centerY,r:i.size,fill:i.fill}),a}},{key:"drawHollowImage",value:function(i,a,s,r){var n=this.w,o=new J(this.ctx),h=P.randomId(),c=n.config.plotOptions.radialBar.hollow.image;if(n.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:s,height:s,image:c,patternID:"pattern".concat(n.globals.cuid).concat(h)}),r="url(#pattern".concat(n.globals.cuid).concat(h,")");else{var d=n.config.plotOptions.radialBar.hollow.imageWidth,g=n.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===d&&void 0===g){var p=n.globals.dom.Paper.image(c).loaded(function(b){this.move(i.centerX-b.width/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-b.height/2+n.config.plotOptions.radialBar.hollow.imageOffsetY)});a.add(p)}else{var f=n.globals.dom.Paper.image(c).loaded(function(b){this.move(i.centerX-d/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-g/2+n.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(d,g)});a.add(f)}}return r}},{key:"getStrokeWidth",value:function(i){return i.size*(100-parseInt(this.w.config.plotOptions.radialBar.hollow.size,10))/100/(i.series.length+1)-this.margin}}]),t}(Ze),Lt=function(v){le(t,v);var e=he(t);function t(){return Y(this,t),e.apply(this,arguments)}return F(t,[{key:"draw",value:function(i,a){var s=this.w,r=new T(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=i,this.seriesRangeStart=s.globals.seriesRangeStart,this.seriesRangeEnd=s.globals.seriesRangeEnd,this.barHelpers.initVariables(i);for(var n=r.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),o=0;o0&&(this.visibleI=this.visibleI+1);var w=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=b);var l=this.barHelpers.initialPositions();p=l.y,d=l.zeroW,g=l.x,k=l.barWidth,h=l.xDivision,c=l.zeroH;for(var u=r.group({class:"apexcharts-datalabels","data:realIndex":b}),x=r.group({class:"apexcharts-rangebar-goals-markers",style:"pointer-events: none"}),y=0;y0});return r=d.config.plotOptions.bar.rangeBarGroupRows?n+h*b:n+o*this.visibleI+h*b,m>-1&&!d.config.plotOptions.bar.rangeBarOverlap&&(g=d.globals.seriesRange[a][m].overlaps).indexOf(p)>-1&&(r=(o=c.barHeight/g.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+g.indexOf(p))+h*b),{barYPosition:r,barHeight:o}}},{key:"drawRangeColumnPaths",value:function(i){var a=i.indexes,s=i.x,r=i.xDivision,n=i.barWidth,o=i.zeroH,h=this.w,c=a.i,d=a.j,g=this.yRatio[this.yaxisIndex],p=a.realIndex,f=this.getRangeValue(p,d),b=Math.min(f.start,f.end),m=Math.max(f.start,f.end);h.globals.isXNumeric&&(s=(h.globals.seriesX[c][d]-h.globals.minX)/this.xRatio-n/2);var w=s+n*this.visibleI;null==this.series[c][d]?b=o:(b=o-b/g,m=o-m/g);var k=Math.abs(m-b),l=this.barHelpers.getColumnPaths({barXPosition:w,barWidth:n,y1:b,y2:m,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:a.realIndex,i:p,j:d,w:h});return h.globals.isXNumeric||(s+=r),{pathTo:l.pathTo,pathFrom:l.pathFrom,barHeight:k,x:s,y:m,goalY:this.barHelpers.getGoalValues("y",null,o,c,d),barXPosition:w}}},{key:"drawRangeBarPaths",value:function(i){var a=i.indexes,s=i.y,o=i.yDivision,h=i.barHeight,c=i.barYPosition,d=i.zeroW,g=this.w,p=d+i.y1/this.invertedYRatio,f=d+i.y2/this.invertedYRatio,b=Math.abs(f-p),m=this.barHelpers.getBarpaths({barYPosition:c,barHeight:h,x1:p,x2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:a.realIndex,realIndex:a.realIndex,j:a.j,w:g});return g.globals.isXNumeric||(s+=o),{pathTo:m.pathTo,pathFrom:m.pathFrom,barWidth:b,x:f,goalX:this.barHelpers.getGoalValues("x",d,null,a.realIndex,a.j),y:s}}},{key:"getRangeValue",value:function(i,a){var s=this.w;return{start:s.globals.seriesRangeStart[i][a],end:s.globals.seriesRangeEnd[i][a]}}}]),t}(re),Pt=function(){function v(e){Y(this,v),this.w=e.w,this.lineCtx=e}return F(v,[{key:"sameValueSeriesFix",value:function(e,t){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[e])&&new W(this.lineCtx.ctx,i).seriesHaveSameValues(e)){var a=t[e].slice();a[a.length-1]=a[a.length-1]+1e-6,t[e]=a}return t}},{key:"calculatePoints",value:function(e){var t=e.series,a=e.x,s=e.y,r=e.i,n=e.j,o=e.prevY,h=this.w,c=[],d=[];if(0===n){var g=this.lineCtx.categoryAxisCorrection+h.config.markers.offsetX;h.globals.isXNumeric&&(g=(h.globals.seriesX[e.realIndex][0]-h.globals.minX)/this.lineCtx.xRatio+h.config.markers.offsetX),c.push(g),d.push(P.isNumber(t[r][0])?o+h.config.markers.offsetY:null),c.push(a+h.config.markers.offsetX),d.push(P.isNumber(t[r][n+1])?s+h.config.markers.offsetY:null)}else c.push(a+h.config.markers.offsetX),d.push(P.isNumber(t[r][n+1])?s+h.config.markers.offsetY:null);return{x:c,y:d}}},{key:"checkPreviousPaths",value:function(e){for(var t=e.pathFromLine,i=e.pathFromArea,a=e.realIndex,s=this.w,r=0;r0&&parseInt(n.realIndex,10)===parseInt(a,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,t=s.globals.previousPaths[r].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(t=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:t,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(e){var t,i=e.i,a=e.series,s=e.prevY,r=e.lineYPosition,n=this.w;if(void 0!==(null===(t=a[i])||void 0===t?void 0:t[0]))s=(r=n.config.chart.stacked&&i>0?this.lineCtx.prevSeriesY[i-1][0]:this.lineCtx.zeroY)-a[i][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]+2*(this.lineCtx.isReversed?a[i][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]:0);else if(n.config.chart.stacked&&i>0&&void 0===a[i][0])for(var o=i-1;o>=0;o--)if(null!=a[o][0]){s=r=this.lineCtx.prevSeriesY[o][0];break}return{prevY:s,lineYPosition:r}}}]),v}(),Me=function(){function v(e,t,i){Y(this,v),this.ctx=e,this.w=e.w,this.xyRatios=t,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||i,this.scatter=new He(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Pt(this),this.markers=new ue(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return F(v,[{key:"draw",value:function(e,t,i,a){var s=this.w,r=new T(this.ctx),n=s.globals.comboCharts?t:s.config.chart.type,o=r.group({class:"apexcharts-".concat(n,"-series apexcharts-plot-series")}),h=new W(this.ctx,s);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=h.getLogSeries(e),this.yRatio=h.getLogYRatios(this.yRatio);for(var c=[],d=0;d0&&(b=(s.globals.seriesX[g][0]-s.globals.minX)/this.xRatio),f.push(b);var m,w=b,k=void 0,l=w,u=this.zeroY,x=this.zeroY;u=this.lineHelpers.determineFirstPrevY({i:d,series:e,prevY:u,lineYPosition:0}).prevY,p.push(u),m=u,"rangeArea"===n&&(k=x=this.lineHelpers.determineFirstPrevY({i:d,series:a,prevY:x,lineYPosition:0}).prevY);var y={type:n,series:e,realIndex:g,i:d,x:b,y:1,pX:w,pY:m,pathsFrom:this._calculatePathsFrom({type:n,series:e,i:d,realIndex:g,prevX:l,prevY:u,prevY2:x}),linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:f,yArrj:p,seriesRangeEnd:a},A=this._iterateOverDataPoints(E(E({},y),{},{iterations:"rangeArea"===n?e[d].length-1:void 0,isRangeStart:!0}));if("rangeArea"===n){var S=this._calculatePathsFrom({series:a,i:d,realIndex:g,prevX:l,prevY:x}),C=this._iterateOverDataPoints(E(E({},y),{},{series:a,pY:k,pathsFrom:S,iterations:a[d].length-1,isRangeStart:!1}));A.linePaths[0]=C.linePath+A.linePath,A.pathFromLine=C.pathFromLine+A.pathFromLine}this._handlePaths({type:n,realIndex:g,i:d,paths:A}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),c.push(this.elSeries)}if(s.config.chart.stacked)for(var L=c.length;L>0;L--)o.add(c[L-1]);else for(var I=0;I1&&(this.yaxisIndex=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]: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",seriesName:P.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}),this.elSeries.attr({"data:longestSeries":e[t].length===a.globals.dataPoints,rel:t+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var t,i,a,s,r=e.type,n=e.series,o=e.i,h=e.realIndex,c=e.prevX,d=e.prevY,g=e.prevY2,p=this.w,f=new T(this.ctx);if(null===n[o][0]){for(var b=0;b0){var m=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:h});a=m.pathFromLine,s=m.pathFromArea}return{prevX:c,prevY:d,linePath:t,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(e){var t=e.type,i=e.realIndex,a=e.i,s=e.paths,r=this.w,n=new T(this.ctx),o=new J(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var h=r.config.forecastDataPoints;if(h.count>0&&"rangeArea"!==t){var c=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-h.count-1],d=n.drawRect(c,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(d.node);var g=n.drawRect(0,0,c,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(g.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var p={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(t)};if("area"===t)for(var f=o.fillPath({seriesNumber:i}),b=0;b0&&"rangeArea"!==t){var A=n.renderPaths(x);A.node.setAttribute("stroke-dasharray",h.dashArray),h.strokeWidth&&A.node.setAttribute("stroke-width",h.strokeWidth),this.elSeries.add(A),A.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),y.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){var t=e.type,i=e.series,a=e.iterations,s=e.realIndex,r=e.i,n=e.x,o=e.y,h=e.pX,c=e.pY,d=e.pathsFrom,g=e.linePaths,p=e.areaPaths,f=e.seriesIndex,b=e.lineYPosition,m=e.xArrj,w=e.yArrj,k=e.isRangeStart,l=e.seriesRangeEnd,u=this.w,x=new T(this.ctx),y=this.yRatio,A=d.prevY,S=d.linePath,C=d.areaPath,L=d.pathFromLine,I=d.pathFromArea,M=P.isNumber(u.globals.minYArr[s])?u.globals.minYArr[s]:u.globals.minY;a||(a=u.globals.dataPoints>1?u.globals.dataPoints-1:u.globals.dataPoints);for(var z=o,X=0;X0&&u.globals.collapsedSeries.length-1){N--;break}return N>=0?N:0}(r-1)][X+1]:this.zeroY,R?o=b-M/y[this.yaxisIndex]+2*(this.isReversed?M/y[this.yaxisIndex]:0):(o=b-i[r][X+1]/y[this.yaxisIndex]+2*(this.isReversed?i[r][X+1]/y[this.yaxisIndex]:0),"rangeArea"===t&&(z=b-l[r][X+1]/y[this.yaxisIndex]+2*(this.isReversed?l[r][X+1]/y[this.yaxisIndex]:0))),m.push(n),w.push(o);var H=this.lineHelpers.calculatePoints({series:i,x:n,y:o,realIndex:s,i:r,j:X,prevY:A}),O=this._createPaths({type:t,series:i,i:r,realIndex:s,j:X,x:n,y:o,y2:z,pX:h,pY:c,linePath:S,areaPath:C,linePaths:g,areaPaths:p,seriesIndex:f,isRangeStart:k});p=O.areaPaths,g=O.linePaths,h=O.pX,c=O.pY,C=O.areaPath,S=O.linePath,this.appendPathFrom&&(L+=x.line(n,this.zeroY),I+=x.line(n,this.zeroY)),this.handleNullDataPoints(i,H,r,X,s),this._handleMarkersAndLabels({type:t,pointsPos:H,i:r,j:X,realIndex:s,isRangeStart:k})}return{yArrj:w,xArrj:m,pathFromArea:I,areaPaths:p,pathFromLine:L,linePaths:g,linePath:S,areaPath:C}}},{key:"_handleMarkersAndLabels",value:function(e){var t=e.type,i=e.pointsPos,a=e.isRangeStart,s=e.i,r=e.j,n=e.realIndex,o=this.w,h=new ae(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,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,n,r+1);null!==c&&this.elPointsMain.add(c)}var d=h.drawDataLabel({type:t,isRangeStart:a,pos:i,i:n,j:r+1});null!==d&&this.elDataLabelsWrap.add(d)}},{key:"_createPaths",value:function(e){var t=e.type,i=e.series,a=e.i,s=e.realIndex,r=e.j,n=e.x,o=e.y,h=e.y2,c=e.pX,d=e.pY,g=e.linePath,p=e.areaPath,f=e.linePaths,b=e.areaPaths,m=e.seriesIndex,w=e.isRangeStart,k=this.w,l=new T(this.ctx),u=k.config.stroke.curve,x=this.areaBottomY;if(Array.isArray(k.config.stroke.curve)&&(u=Array.isArray(m)?k.config.stroke.curve[m[a]]:k.config.stroke.curve[a]),"smooth"===u){var y=.35*(n-c);k.globals.hasNullValues?(null!==i[a][r]&&(null!==i[a][r+1]?(g=l.move(c,d)+l.curve(c+y,d,n-y,o,n+1,o),p=l.move(c+1,d)+l.curve(c+y,d,n-y,o,n+1,o)+l.line(n,x)+l.line(c,x)+"z"):(g=l.move(c,d),p=l.move(c,d)+"z")),f.push(g),b.push(p)):(g+=l.curve(c+y,d,n-y,o,n,o),p+=l.curve(c+y,d,n-y,o,n,o)),c=n,d=o,r===i[a].length-2&&(p=p+l.curve(c,d,n,o,n,x)+l.move(n,o)+"z","rangeArea"===t&&w?g=g+l.curve(c,d,n,o,n,h)+l.move(n,h)+"z":k.globals.hasNullValues||(f.push(g),b.push(p)))}else null===i[a][r+1]&&(g+=l.move(n,o),p=p+l.line(k.globals.isXNumeric?(k.globals.seriesX[s][r]-k.globals.minX)/this.xRatio:n-this.xDivision,x)+l.move(n,o)+"z"),null===i[a][r]&&(g+=l.move(n,o),p+=l.move(n,x)),"stepline"===u?(g=g+l.line(n,null,"H")+l.line(null,o,"V"),p=p+l.line(n,null,"H")+l.line(null,o,"V")):"straight"===u&&(g+=l.line(n,o),p+=l.line(n,o)),r===i[a].length-2&&(p=p+l.line(n,x)+l.move(n,o)+"z","rangeArea"===t&&w?g=g+l.line(n,h)+l.move(n,h)+"z":(f.push(g),b.push(p)));return{linePaths:f,areaPaths:b,pX:c,pY:d,linePath:g,areaPath:p}}},{key:"handleNullDataPoints",value:function(e,t,i,a,s){var r=this.w;if(null===e[i][a]&&r.config.markers.showNullDataPoints||1===e[i].length){var n=this.markers.plotChartMarkers(t,s,a+1,this.strokeWidth-r.config.markers.strokeWidth/2,!0);null!==n&&this.elPointsMain.add(n)}}}]),v}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function v(n,o,h,c){this.xoffset=n,this.yoffset=o,this.height=c,this.width=h,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(d){var g,p=[],f=this.xoffset,b=this.yoffset,m=s(d)/this.height,w=s(d)/this.width;if(this.width>=this.height)for(g=0;g=this.height){var p=d/this.height;g=new v(this.xoffset+p,this.yoffset,this.width-p,this.height)}else{var b=d/this.width;g=new v(this.xoffset,this.yoffset+b,this.width,this.height-b)}return g}}function e(n,o,h,c,d){return c=void 0===c?0:c,d=void 0===d?0:d,function(p){var f,b,m=[];for(f=0;f=i(w,m))?(o.push(g),t(n.slice(1),o,h,c)):(p=h.cutArea(s(o),c),c.push(h.getCoordinates(o)),t(n,[],p,c)),c;c.push(h.getCoordinates(o))}function i(n,o){var h=Math.min.apply(Math,n),c=Math.max.apply(Math,n),d=s(n);return Math.max(Math.pow(o,2)*c/Math.pow(d,2),Math.pow(d,2)/(Math.pow(o,2)*h))}function a(n){return n&&n.constructor===Array}function s(n){var o,h=0;for(o=0;or-a&&h.width<=n-s){var c=o.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(c.x," ").concat(c.y,")"))}}},{key:"animateTreemap",value:function(e,t,i,a){var s=new ie(this.ctx);s.animateRect(e,{x:t.x,y:t.y,width:t.width,height:t.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,function(){s.animationCompleted(e)})}}]),v}(),Tt=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return F(v,[{key:"calculateTimeScaleTicks",value:function(e,t){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new V(this.ctx),r=(t-e)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r<.00011574074074074075?a.globals.disableZoomIn=!0:r>5e4&&(a.globals.disableZoomOut=!0);var n=s.getTimeUnitsfromTimestamp(e,t,this.utc),o=a.globals.gridWidth/r,h=o/24,c=h/60,d=c/60,g=Math.floor(24*r),p=Math.floor(1440*r),f=Math.floor(86400*r),b=Math.floor(r),m=Math.floor(r/30),w=Math.floor(r/365),k={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},l={firstVal:k,currentMillisecond:k.minMillisecond,currentSecond:k.minSecond,currentMinute:k.minMinute,currentHour:k.minHour,currentMonthDate:k.minDate,currentDate:k.minDate,currentMonth:k.minMonth,currentYear:k.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:h,minutesWidthOnXAxis:c,secondsWidthOnXAxis:d,numberOfSeconds:f,numberOfMinutes:p,numberOfHours:g,numberOfDays:b,numberOfMonths:m,numberOfYears:w};switch(this.tickInterval){case"years":this.generateYearScale(l);break;case"months":case"half_year":this.generateMonthScale(l);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(l);break;case"hours":this.generateHourScale(l);break;case"minutes_fives":case"minutes":this.generateMinuteScale(l);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(l)}var u=this.timeScaleArray.map(function(x){var y={position:x.position,unit:x.unit,year:x.year,day:x.day?x.day:1,hour:x.hour?x.hour:0,month:x.month+1};return"month"===x.unit?E(E({},y),{},{day:1,value:x.value+1}):"day"===x.unit||"hour"===x.unit?E(E({},y),{},{value:x.value}):"minute"===x.unit?E(E({},y),{},{value:x.value,minute:x.value}):"second"===x.unit?E(E({},y),{},{value:x.value,minute:x.minute,second:x.second}):x});return u.filter(function(x){var y=1,A=Math.ceil(a.globals.gridWidth/120),S=x.value;void 0!==a.config.xaxis.tickAmount&&(A=a.config.xaxis.tickAmount),u.length>A&&(y=Math.floor(u.length/A));var C=!1,L=!1;switch(i.tickInterval){case"years":"year"===x.unit&&(C=!0);break;case"half_year":y=7,"year"===x.unit&&(C=!0);break;case"months":y=1,"year"===x.unit&&(C=!0);break;case"months_fortnight":y=15,"year"!==x.unit&&"month"!==x.unit||(C=!0),30===S&&(L=!0);break;case"months_days":y=10,"month"===x.unit&&(C=!0),30===S&&(L=!0);break;case"week_days":y=8,"month"===x.unit&&(C=!0);break;case"days":y=1,"month"===x.unit&&(C=!0);break;case"hours":"day"===x.unit&&(C=!0);break;case"minutes_fives":case"seconds_fives":S%5!=0&&(L=!0);break;case"seconds_tens":S%10!=0&&(L=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!L)return!0}else if((S%y==0||C)&&!L)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(e,t){var i=this.w,a=this.formatDates(e),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new ye(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var t=24*e,i=60*t;switch(!0){case e/365>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case t>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(e){var t=e.firstVal,i=e.currentMonth,a=e.currentYear,s=e.daysWidthOnXAxis,r=e.numberOfYears,n=t.minYear,o=0,h=new V(this.ctx),c="year";if(t.minDate>1||t.minMonth>0){var d=h.determineRemainingDaysOfYear(t.minYear,t.minMonth,t.minDate);o=(h.determineDaysOfYear(t.minYear)-d+1)*s,this.timeScaleArray.push({position:o,value:n=t.minYear+1,unit:c,year:n,month:P.monthMod(i+1)})}else 1===t.minDate&&0===t.minMonth&&this.timeScaleArray.push({position:o,value:n,unit:c,year:a,month:P.monthMod(i+1)});for(var g=n,p=o,f=0;f1){h=(c.determineDaysOfMonths(a+1,t.minYear)-i+1)*r,o=P.monthMod(a+1);var p=s+g,f=P.monthMod(o),b=o;0===o&&(d="year",b=p,f=1,p+=g+=1),this.timeScaleArray.push({position:h,value:b,unit:d,year:p,month:f})}else this.timeScaleArray.push({position:h,value:o,unit:d,year:s,month:P.monthMod(a)});for(var m=o+1,w=h,k=0,l=1;kn.determineDaysOfMonths(u+1,x)&&(c=1,o="month",p=u+=1),u},g=(24-t.minHour)*s,p=h,f=d(c,i,a);0===t.minHour&&1===t.minDate?(g=0,p=P.monthMod(t.minMonth),o="month",c=t.minDate,r++):1!==t.minDate&&0===t.minHour&&0===t.minMinute&&(g=0,p=h=t.minDate,f=d(c=h,i,a)),this.timeScaleArray.push({position:g,value:p,unit:o,year:this._getYear(a,f,0),month:P.monthMod(f),day:c});for(var b=g,m=0;mo.determineDaysOfMonths(A+1,s)?A+=1:A},g=60-(t.minMinute+t.minSecond/60),p=g*r,f=t.minHour+1,b=f+1;60===g&&(p=0,b=(f=t.minHour)+1);var y,A,m=i,w=d(m,a);this.timeScaleArray.push({position:p,value:f,unit:h,day:m,hour:b,year:s,month:P.monthMod(w)});for(var k=p,l=0;l=24&&(b=0,h="day",w=(y=m+=1,A=w,y>o.determineDaysOfMonths(A+1,s)&&(m=1,A+=1),{month:A,date:m}).month,w=d(m,w));var u=this._getYear(s,w,0);this.timeScaleArray.push({position:k=60*r+k,value:0===b?m:b,unit:h,hour:b,day:m,year:u,month:P.monthMod(w)}),b++}}},{key:"generateMinuteScale",value:function(e){for(var h=e.minutesWidthOnXAxis,d=e.numberOfMinutes,g=e.currentMinute+1,p=e.currentDate,f=e.currentMonth,b=e.currentYear,m=e.currentHour,w=(60-e.currentSecond-e.currentMillisecond/1e3)*e.secondsWidthOnXAxis,k=0;k=60&&(g=0,24===(m+=1)&&(m=0)),this.timeScaleArray.push({position:w,value:g,unit:"minute",hour:m,minute:g,day:p,year:this._getYear(b,f,0),month:P.monthMod(f)}),w+=h,g++}},{key:"generateSecondScale",value:function(e){for(var h=e.secondsWidthOnXAxis,c=e.numberOfSeconds,d=e.currentSecond+1,g=e.currentMinute,p=e.currentDate,f=e.currentMonth,b=e.currentYear,m=e.currentHour,w=(1e3-e.currentMillisecond)/1e3*h,k=0;k=60&&(d=0,++g>=60&&(g=0,24==++m&&(m=0))),this.timeScaleArray.push({position:w,value:d,unit:"second",hour:m,minute:g,second:d,day:p,year:this._getYear(b,f,0),month:P.monthMod(f)}),w+=h,d++}},{key:"createRawDateString",value:function(e,t){var i=e.year;return 0===e.month&&(e.month=1),i+="-"+("0"+e.month.toString()).slice(-2),i+="day"===e.unit?"day"===e.unit?"-"+("0"+t).slice(-2):"-01":"-"+("0"+(e.day?e.day:"1")).slice(-2),i+="hour"===e.unit?"hour"===e.unit?"T"+("0"+t).slice(-2):"T00":"T"+("0"+(e.hour?e.hour:"0")).slice(-2),i+="minute"===e.unit?":"+("0"+t).slice(-2):":"+(e.minute?("0"+e.minute).slice(-2):"00"),i+="second"===e.unit?":"+("0"+t).slice(-2):":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(e){var t=this,i=this.w;return e.map(function(a){var s=a.value.toString(),r=new V(t.ctx),n=t.createRawDateString(a,s),o=r.getDate(r.parseDate(n));if(t.utc||(o=r.getDate(r.parseDateWithTimezone(n))),void 0===i.config.xaxis.labels.format){var h="dd MMM",c=i.config.xaxis.labels.datetimeFormatter;"year"===a.unit&&(h=c.year),"month"===a.unit&&(h=c.month),"day"===a.unit&&(h=c.day),"hour"===a.unit&&(h=c.hour),"minute"===a.unit&&(h=c.minute),"second"===a.unit&&(h=c.second),s=r.formatDate(o,h)}else s=r.formatDate(o,i.config.xaxis.labels.format);return{dateString:n,position:a.position,value:s,unit:a.unit,year:a.year,month:a.month}})}},{key:"removeOverlappingTS",value:function(e){var t,i=this,a=new T(this.ctx),s=!1;e.length>0&&e[0].value&&e.every(function(o){return o.value.length===e[0].value.length})&&(s=!0,t=a.getTextRects(e[0].value).width);var r=0;return e.map(function(o,h){if(h>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var c=s?t:a.getTextRects(e[r].value).width;return o.position>e[r].position+c+10?(r=h,o):null}return o}).filter(function(o){return null!==o})}},{key:"_getYear",value:function(e,t,i){return e+Math.floor(t/12)+i}}]),v}(),zt=function(){function v(e,t){Y(this,v),this.ctx=t,this.w=t.w,this.el=e}return F(v,[{key:"setupElements",value:function(){var e=this.w.globals,t=this.w.config,i=t.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(i)>-1,e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].indexOf(i)>-1,e.isBarHorizontal=("bar"===t.chart.type||"rangeBar"===t.chart.type||"boxPlot"===t.chart.type)&&t.plotOptions.bar.horizontal,e.chartClass=".apexcharts"+e.chartID,e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),T.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas "+e.chartClass.substring(1)}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=new window.SVG.Doc(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(t.chart.offsetX,", ").concat(t.chart.offsetY,")")}),e.dom.Paper.node.style.background=t.chart.background,this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),T.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(e,t){var i=this.w,a=i.config,s=i.globals,r={series:[],i:[]},n={series:[],i:[]},o={series:[],i:[]},h={series:[],i:[]},c={series:[],i:[]},d={series:[],i:[]},g={series:[],i:[]},p={series:[],i:[]},f={series:[],seriesRangeEnd:[],i:[]};s.series.map(function(A,S){var C=0;void 0!==e[S].type?("column"===e[S].type||"bar"===e[S].type?(s.series.length>1&&a.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),c.series.push(A),c.i.push(S),C++,i.globals.columnSeries=c.series):"area"===e[S].type?(n.series.push(A),n.i.push(S),C++):"line"===e[S].type?(r.series.push(A),r.i.push(S),C++):"scatter"===e[S].type?(o.series.push(A),o.i.push(S)):"bubble"===e[S].type?(h.series.push(A),h.i.push(S),C++):"candlestick"===e[S].type?(d.series.push(A),d.i.push(S),C++):"boxPlot"===e[S].type?(g.series.push(A),g.i.push(S),C++):"rangeBar"===e[S].type?(p.series.push(A),p.i.push(S),C++):"rangeArea"===e[S].type?(f.series.push(s.seriesRangeStart[S]),f.seriesRangeEnd.push(s.seriesRangeEnd[S]),f.i.push(S),C++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble/candlestick/boxPlot/rangeBar/rangeArea"),C>1&&(s.comboCharts=!0)):(r.series.push(A),r.i.push(S))});var b=new Me(this.ctx,t),m=new Ie(this.ctx,t);this.ctx.pie=new Ze(this.ctx);var w=new Ct(this.ctx);this.ctx.rangeBar=new Lt(this.ctx,t);var k=new St(this.ctx),l=[];if(s.comboCharts){if(n.series.length>0&&l.push(b.draw(n.series,"area",n.i)),c.series.length>0)if(i.config.chart.stacked){var u=new _e(this.ctx,t);l.push(u.draw(c.series,c.i))}else this.ctx.bar=new re(this.ctx,t),l.push(this.ctx.bar.draw(c.series,c.i));if(f.series.length>0&&l.push(b.draw(f.series,"rangeArea",f.i,f.seriesRangeEnd)),r.series.length>0&&l.push(b.draw(r.series,"line",r.i)),d.series.length>0&&l.push(m.draw(d.series,"candlestick",d.i)),g.series.length>0&&l.push(m.draw(g.series,"boxPlot",g.i)),p.series.length>0&&l.push(this.ctx.rangeBar.draw(p.series,p.i)),o.series.length>0){var x=new Me(this.ctx,t,!0);l.push(x.draw(o.series,"scatter",o.i))}if(h.series.length>0){var y=new Me(this.ctx,t,!0);l.push(y.draw(h.series,"bubble",h.i))}}else switch(a.chart.type){case"line":l=b.draw(s.series,"line");break;case"area":l=b.draw(s.series,"area");break;case"bar":a.chart.stacked?l=new _e(this.ctx,t).draw(s.series):(this.ctx.bar=new re(this.ctx,t),l=this.ctx.bar.draw(s.series));break;case"candlestick":l=new Ie(this.ctx,t).draw(s.series,"candlestick");break;case"boxPlot":l=new Ie(this.ctx,t).draw(s.series,"boxPlot");break;case"rangeBar":l=this.ctx.rangeBar.draw(s.series);break;case"rangeArea":l=b.draw(s.seriesRangeStart,"rangeArea",void 0,s.seriesRangeEnd);break;case"heatmap":l=new At(this.ctx,t).draw(s.series);break;case"treemap":l=new It(this.ctx,t).draw(s.series);break;case"pie":case"donut":case"polarArea":l=this.ctx.pie.draw(s.series);break;case"radialBar":l=w.draw(s.series);break;case"radar":l=k.draw(s.series);break;default:l=b.draw(s.series)}return l}},{key:"setSVGDimensions",value:function(){var e=this.w.globals,t=this.w.config;e.svgWidth=t.chart.width,e.svgHeight=t.chart.height;var i=P.getDimensions(this.el),a=t.chart.width.toString().split(/[0-9]+/g).pop();"%"===a?P.isNumber(i[0])&&(0===i[0].width&&(i=P.getDimensions(this.el.parentNode)),e.svgWidth=i[0]*parseInt(t.chart.width,10)/100):"px"!==a&&""!==a||(e.svgWidth=parseInt(t.chart.width,10));var s=t.chart.height.toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===s){var r=P.getDimensions(this.el.parentNode);e.svgHeight=r[1]*parseInt(t.chart.height,10)/100}else e.svgHeight=parseInt(t.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;e.svgWidth<0&&(e.svgWidth=0),e.svgHeight<0&&(e.svgHeight=0),T.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==s&&(e.dom.Paper.node.parentNode.parentNode.style.minHeight=e.svgHeight+(t.chart.sparkline.enabled?0:e.axisCharts?t.chart.parentHeightOffset:0)+"px"),e.dom.elWrap.style.width=e.svgWidth+"px",e.dom.elWrap.style.height=e.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals;T.setAttrs(e.dom.elGraphical.node,{transform:"translate("+e.translateX+", "+e.translateY+")"})}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=0,a=e.config.chart.sparkline.enabled?1:15;a+=e.config.grid.padding.bottom,"top"!==e.config.legend.position&&"bottom"!==e.config.legend.position||!e.config.legend.show||e.config.legend.floating||(i=new We(this.ctx).legendHelpers.getLegendBBox().clwh+10);var s=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*e.globals.radialSize;if(s&&!e.config.chart.sparkline.enabled&&0!==e.config.plotOptions.radialBar.startAngle){var n=P.getBoundingClientRect(s);r=n.bottom,r=Math.max(2.05*e.globals.radialSize,n.bottom-n.top)}var h=r+t.translateY+i+a;t.dom.elLegendForeign&&t.dom.elLegendForeign.setAttribute("height",h),e.config.chart.height&&String(e.config.chart.height).indexOf("%")>0||(t.dom.elWrap.style.height=h+"px",T.setAttrs(t.dom.Paper.node,{height:h}),t.dom.Paper.node.parentNode.parentNode.style.minHeight=h+"px")}},{key:"coreCalculations",value:function(){new Ce(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,t=function(){return e.w.config.series.map(function(s){return[]})},i=new De,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=t(),a.seriesYvalues=t()}},{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 e=null,t=this.w;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new Pe(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new Pe(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Tt(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new W(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(e){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var e=this,t=this.w;if(t.config.chart.brush.enabled&&"function"!=typeof t.config.chart.events.selection){var i=t.config.chart.brush.targets||[t.config.chart.brush.target];i.forEach(function(a){var s=ApexCharts.getChartByID(a);s.w.globals.brushSource=e.ctx,"function"!=typeof s.w.config.chart.events.zoomed&&(s.w.config.chart.events.zoomed=function(){e.updateSourceChart(s)}),"function"!=typeof s.w.config.chart.events.scrolled&&(s.w.config.chart.events.scrolled=function(){e.updateSourceChart(s)})}),t.config.chart.events.selection=function(a,s){i.forEach(function(r){var n=ApexCharts.getChartByID(r),o=P.clone(t.config.yaxis);if(t.config.chart.brush.autoScaleYaxis&&1===n.w.globals.series.length){var h=new se(n);o=h.autoScaleY(n,o,s)}var c=n.w.config.yaxis.reduce(function(d,g,p){return[].concat(q(d),[E(E({},n.w.config.yaxis[p]),{},{min:o[0].min,max:o[0].max})])},[]);n.ctx.updateHelpers._updateOptions({xaxis:{min:s.xaxis.min,max:s.xaxis.max},yaxis:c},!1,!1,!1,!1)})}}}}]),v}(),Xt=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w}return F(v,[{key:"_updateOptions",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise(function(n){var o=[t.ctx];s&&(o=t.ctx.getSyncedCharts()),t.ctx.w.globals.isExecCalled&&(o=[t.ctx],t.ctx.w.globals.isExecCalled=!1),o.forEach(function(h,c){var d=h.w;if(d.globals.shouldAnimate=a,i||(d.globals.resized=!0,d.globals.dataChanged=!0,a&&h.series.getPreviousPaths()),e&&"object"===B(e)&&(h.config=new ge(e),e=W.extendArrayProps(h.config,e,d),h.w.globals.chartID!==t.ctx.w.globals.chartID&&delete e.series,d.config=P.extend(d.config,e),r&&(d.globals.lastXAxis=e.xaxis?P.clone(e.xaxis):[],d.globals.lastYAxis=e.yaxis?P.clone(e.yaxis):[],d.globals.initialConfig=P.extend({},d.config),d.globals.initialSeries=P.clone(d.config.series),e.series))){for(var g=0;g2&&void 0!==arguments[2]&&arguments[2];return new Promise(function(s){var r,n=i.w;return n.globals.shouldAnimate=t,n.globals.dataChanged=!0,t&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?(0===(r=e.map(function(o,h){return i._extendSeries(o,h)})).length&&(r=[{data:[]}]),n.config.series=r):n.config.series=e.slice(),a&&(n.globals.initialConfig.series=P.clone(n.config.series),n.globals.initialSeries=P.clone(n.config.series)),i.ctx.update().then(function(){s(i.ctx)})})}},{key:"_extendSeries",value:function(e,t){var i=this.w,a=i.config.series[t];return E(E({},i.config.series[t]),{},{name:e.name?e.name:a&&a.name,color:e.color?e.color:a&&a.color,type:e.type?e.type:a&&a.type,data:e.data?e.data:a&&a.data})}},{key:"toggleDataPointSelection",value:function(e,t){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(e,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.select("".concat(s," path[j='").concat(t,"'], ").concat(s," circle[j='").concat(t,"'], ").concat(s," rect[j='").concat(t,"']")).members[0]:void 0===t&&(a=i.globals.dom.Paper.select("".concat(s," path[j='").concat(e,"']")).members[0],"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(e)),a?(new T(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var t=this.w;if(["min","max"].forEach(function(a){void 0!==e.xaxis[a]&&(t.config.xaxis[a]=e.xaxis[a],t.globals.lastXAxis[a]=e.xaxis[a])}),e.xaxis.categories&&e.xaxis.categories.length&&(t.config.xaxis.categories=e.xaxis.categories),t.config.xaxis.convertedCatToNumeric){var i=new de(e);e=i.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){return e.chart&&e.chart.stacked&&"100%"===e.chart.stackType&&(Array.isArray(e.yaxis)?e.yaxis.forEach(function(t,i){e.yaxis[i].min=0,e.yaxis[i].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"revertDefaultAxisMinMax",value:function(e){var t=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;e&&e.xaxis&&(a=e.xaxis),e&&e.yaxis&&(s=e.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max,i.config.yaxis.map(function(n,o){i.globals.zoomed||void 0!==s[o]?function(n){void 0!==s[n]&&(i.config.yaxis[n].min=s[n].min,i.config.yaxis[n].max=s[n].max)}(o):void 0!==t.ctx.opts.yaxis[o]&&(n.min=t.ctx.opts.yaxis[o].min,n.max=t.ctx.opts.yaxis[o].max)})}}]),v}();Q=typeof window<"u"?window:void 0,fe=function(v,e){var t=(void 0!==this?this:v).SVG=function(l){if(t.supported)return l=new t.Doc(l),t.parser.draw||t.prepare(),l};if(t.ns="http://www.w3.org/2000/svg",t.xmlns="http://www.w3.org/2000/xmlns/",t.xlink="http://www.w3.org/1999/xlink",t.svgjs="http://svgjs.dev",t.supported=!0,!t.supported)return!1;t.did=1e3,t.eid=function(l){return"Svgjs"+c(l)+t.did++},t.create=function(l){var u=e.createElementNS(this.ns,l);return u.setAttribute("id",this.eid(l)),u},t.extend=function(){var l,u;u=(l=[].slice.call(arguments)).pop();for(var x=l.length-1;x>=0;x--)if(l[x])for(var y in u)l[x].prototype[y]=u[y];t.Set&&t.Set.inherit&&t.Set.inherit()},t.invent=function(l){var u="function"==typeof l.create?l.create:function(){this.constructor.call(this,t.create(l.create))};return l.inherit&&(u.prototype=new l.inherit),l.extend&&t.extend(u,l.extend),l.construct&&t.extend(l.parent||t.Container,l.construct),u},t.adopt=function(l){return l?l.instance?l.instance:((u="svg"==l.nodeName?l.parentNode instanceof v.SVGElement?new t.Nested:new t.Doc:"linearGradient"==l.nodeName?new t.Gradient("linear"):"radialGradient"==l.nodeName?new t.Gradient("radial"):t[c(l.nodeName)]?new(t[c(l.nodeName)]):new t.Element(l)).type=l.nodeName,u.node=l,l.instance=u,u instanceof t.Doc&&u.namespace().defs(),u.setData(JSON.parse(l.getAttribute("svgjs:data"))||{}),u):null;var u},t.prepare=function(){var l=e.getElementsByTagName("body")[0],u=(l?new t.Doc(l):t.adopt(e.documentElement).nested()).size(2,0);t.parser={body:l||e.documentElement,draw:u.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:u.polyline().node,path:u.path().node,native:t.create("svg")}},t.parser={native:t.create("svg")},e.addEventListener("DOMContentLoaded",function(){t.parser.draw||t.prepare()},!1),t.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},t.utils={map:function(l,u){for(var x=l.length,y=[],A=0;A1?1:l)),g:~~(this.g+(this.destination.g-this.g)*l),b:~~(this.b+(this.destination.b-this.b)*l)}):this}}),t.Color.test=function(l){return t.regex.isHex.test(l+="")||t.regex.isRgb.test(l)},t.Color.isRgb=function(l){return l&&"number"==typeof l.r&&"number"==typeof l.g&&"number"==typeof l.b},t.Color.isColor=function(l){return t.Color.isRgb(l)||t.Color.test(l)},t.Array=function(l,u){0==(l=(l||[]).valueOf()).length&&u&&(l=u.valueOf()),this.value=this.parse(l)},t.extend(t.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(l){return l=l.valueOf(),Array.isArray(l)?l:this.split(l)}}),t.PointArray=function(l,u){t.Array.call(this,l,u||[[0,0]])},t.PointArray.prototype=new t.Array,t.PointArray.prototype.constructor=t.PointArray;for(var i={M:function(l,u,x){return u.x=x.x=l[0],u.y=x.y=l[1],["M",u.x,u.y]},L:function(l,u){return u.x=l[0],u.y=l[1],["L",l[0],l[1]]},H:function(l,u){return u.x=l[0],["H",l[0]]},V:function(l,u){return u.y=l[0],["V",l[0]]},C:function(l,u){return u.x=l[4],u.y=l[5],["C",l[0],l[1],l[2],l[3],l[4],l[5]]},Q:function(l,u){return u.x=l[2],u.y=l[3],["Q",l[0],l[1],l[2],l[3]]},Z:function(l,u,x){return u.x=x.x,u.y=x.y,["Z"]}},a="mlhvqtcsaz".split(""),s=0,r=a.length;sC);return y},bbox:function(){return t.parser.draw||t.prepare(),t.parser.path.setAttribute("d",this.toString()),t.parser.path.getBBox()}}),t.Number=t.invent({create:function(l,u){this.value=0,this.unit=u||"","number"==typeof l?this.value=isNaN(l)?0:isFinite(l)?l:l<0?-34e37:34e37:"string"==typeof l?(u=l.match(t.regex.numberAndUnit))&&(this.value=parseFloat(u[1]),"%"==u[5]?this.value/=100:"s"==u[5]&&(this.value*=1e3),this.unit=u[5]):l instanceof t.Number&&(this.value=l.valueOf(),this.unit=l.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(l){return l=new t.Number(l),new t.Number(this+l,this.unit||l.unit)},minus:function(l){return l=new t.Number(l),new t.Number(this-l,this.unit||l.unit)},times:function(l){return l=new t.Number(l),new t.Number(this*l,this.unit||l.unit)},divide:function(l){return l=new t.Number(l),new t.Number(this/l,this.unit||l.unit)},to:function(l){var u=new t.Number(this);return"string"==typeof l&&(u.unit=l),u},morph:function(l){return this.destination=new t.Number(l),l.relative&&(this.destination.value+=this.value),this},at:function(l){return this.destination?new t.Number(this.destination).minus(this).times(l).plus(this):this}}}),t.Element=t.invent({create:function(l){this._stroke=t.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=l)&&(this.type=l.nodeName,this.node.instance=this,this._stroke=l.getAttribute("stroke")||this._stroke)},extend:{x:function(l){return this.attr("x",l)},y:function(l){return this.attr("y",l)},cx:function(l){return null==l?this.x()+this.width()/2:this.x(l-this.width()/2)},cy:function(l){return null==l?this.y()+this.height()/2:this.y(l-this.height()/2)},move:function(l,u){return this.x(l).y(u)},center:function(l,u){return this.cx(l).cy(u)},width:function(l){return this.attr("width",l)},height:function(l){return this.attr("height",l)},size:function(l,u){var x=g(this,l,u);return this.width(new t.Number(x.width)).height(new t.Number(x.height))},clone:function(l){this.writeDataToDom();var u=b(this.node.cloneNode(!0));return l?l.add(u):this.after(u),u},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(l){return this.after(l).remove(),l},addTo:function(l){return l.put(this)},putIn:function(l){return l.add(this)},id:function(l){return this.attr("id",l)},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 l=this.attr("class");return null==l?[]:l.trim().split(t.regex.delimiter)},hasClass:function(l){return-1!=this.classes().indexOf(l)},addClass:function(l){if(!this.hasClass(l)){var u=this.classes();u.push(l),this.attr("class",u.join(" "))}return this},removeClass:function(l){return this.hasClass(l)&&this.attr("class",this.classes().filter(function(u){return u!=l}).join(" ")),this},toggleClass:function(l){return this.hasClass(l)?this.removeClass(l):this.addClass(l)},reference:function(l){return t.get(this.attr(l))},parent:function(l){var u=this;if(!u.node.parentNode)return null;if(u=t.adopt(u.node.parentNode),!l)return u;for(;u&&u.node instanceof v.SVGElement;){if("string"==typeof l?u.matches(l):u instanceof l)return u;if(!u.node.parentNode||"#document"==u.node.parentNode.nodeName)return null;u=t.adopt(u.node.parentNode)}},doc:function(){return this instanceof t.Doc?this:this.parent(t.Doc)},parents:function(l){var u=[],x=this;do{if(!(x=x.parent(l))||!x.node)break;u.push(x)}while(x.parent);return u},matches:function(l){return((u=this.node).matches||u.matchesSelector||u.msMatchesSelector||u.mozMatchesSelector||u.webkitMatchesSelector||u.oMatchesSelector).call(u,l);var u},native:function(){return this.node},svg:function(l){var u=e.createElement("svg");if(!(l&&this instanceof t.Parent))return u.appendChild(l=e.createElement("svg")),this.writeDataToDom(),l.appendChild(this.node.cloneNode(!0)),u.innerHTML.replace(/^/,"").replace(/<\/svg>$/,"");u.innerHTML=""+l.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2>")+"";for(var x=0,y=u.firstChild.childNodes.length;x":function(l){return-Math.cos(l*Math.PI)/2+.5},">":function(l){return Math.sin(l*Math.PI/2)},"<":function(l){return 1-Math.cos(l*Math.PI/2)}},t.morph=function(l){return function(u,x){return new t.MorphObj(u,x).at(l)}},t.Situation=t.invent({create:function(l){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new t.Number(l.duration).valueOf(),this.delay=new t.Number(l.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=l.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),t.FX=t.invent({create:function(l){this._target=l,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(l,u,x){"object"===B(l)&&(u=l.ease,x=l.delay,l=l.duration);var y=new t.Situation({duration:l||1e3,delay:x||0,ease:t.easing[u||"-"]||u});return this.queue(y),this},target:function(l){return l&&l instanceof t.Element?(this._target=l,this):this._target},timeToAbsPos:function(l){return(l-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(l){return this.situation.duration/this._speed*l+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=v.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){v.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(l){return("function"==typeof l||l instanceof t.Situation)&&this.situations.push(l),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof t.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var l,u=this.situation;if(u.init)return this;for(var x in u.animations){l=this.target()[x](),Array.isArray(l)||(l=[l]),Array.isArray(u.animations[x])||(u.animations[x]=[u.animations[x]]);for(var y=l.length;y--;)u.animations[x][y]instanceof t.Number&&(l[y]=new t.Number(l[y])),u.animations[x][y]=l[y].morph(u.animations[x][y])}for(var x in u.attrs)u.attrs[x]=new t.MorphObj(this.target().attr(x),u.attrs[x]);for(var x in u.styles)u.styles[x]=new t.MorphObj(this.target().style(x),u.styles[x]);return u.initialTransformation=this.target().matrixify(),u.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(l,u){var x=this.active;return this.active=!1,u&&this.clearQueue(),l&&this.situation&&(!x&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(l){var u=this.last();return this.target().on("finished.fx",function x(y){y.detail.situation==u&&(l.call(this,u),this.off("finished.fx",x))}),this._callStart()},during:function(l){var u=this.last(),x=function(y){y.detail.situation==u&&l.call(this,y.detail.pos,t.morph(y.detail.pos),y.detail.eased,u)};return this.target().off("during.fx",x).on("during.fx",x),this.after(function(){this.off("during.fx",x)}),this._callStart()},afterAll:function(l){var u=function x(y){l.call(this),this.off("allfinished.fx",x)};return this.target().off("allfinished.fx",u).on("allfinished.fx",u),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(l,u,x){return this.last()[x||"animations"][l]=u,this._callStart()},step:function(l){var u,x,y;l||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops?(u=Math.max(this.absPos,0),x=Math.floor(u),!0===this.situation.loops||xthis.lastPos&&S<=A&&(this.situation.once[S].call(this.target(),this.pos,A),delete this.situation.once[S]);return this.active&&this.target().fire("during",{pos:this.pos,eased:A,fx:this,situation:this.situation}),this.situation?(this.eachAt(),1==this.pos&&!this.situation.reversed||this.situation.reversed&&0==this.pos?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=A,this):this},eachAt:function(){var l,u=this,x=this.target(),y=this.situation;for(var A in y.animations)l=[].concat(y.animations[A]).map(function(L){return"string"!=typeof L&&L.at?L.at(y.ease(u.pos),u.pos):L}),x[A].apply(x,l);for(var A in y.attrs)l=[A].concat(y.attrs[A]).map(function(I){return"string"!=typeof I&&I.at?I.at(y.ease(u.pos),u.pos):I}),x.attr.apply(x,l);for(var A in y.styles)l=[A].concat(y.styles[A]).map(function(I){return"string"!=typeof I&&I.at?I.at(y.ease(u.pos),u.pos):I}),x.style.apply(x,l);if(y.transforms.length){l=y.initialTransformation,A=0;for(var S=y.transforms.length;A=0;--x)this[w[x]]=null!=l[w[x]]?l[w[x]]:u[w[x]]},extend:{extract:function(){var l=p(this,0,1);p(this,1,0);var u=180/Math.PI*Math.atan2(l.y,l.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(u*Math.PI/180)+this.f*Math.sin(u*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(u*Math.PI/180)+this.e*Math.sin(-u*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:u,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new t.Matrix(this)}},clone:function(){return new t.Matrix(this)},morph:function(l){return this.destination=new t.Matrix(l),this},multiply:function(l){return new t.Matrix(this.native().multiply((u=l,u instanceof t.Matrix||(u=new t.Matrix(u)),u).native()));var u},inverse:function(){return new t.Matrix(this.native().inverse())},translate:function(l,u){return new t.Matrix(this.native().translate(l||0,u||0))},native:function(){for(var l=t.parser.native.createSVGMatrix(),u=w.length-1;u>=0;u--)l[w[u]]=this[w[u]];return l},toString:function(){return"matrix("+m(this.a)+","+m(this.b)+","+m(this.c)+","+m(this.d)+","+m(this.e)+","+m(this.f)+")"}},parent:t.Element,construct:{ctm:function(){return new t.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof t.Nested){var l=this.rect(1,1),u=l.node.getScreenCTM();return l.remove(),new t.Matrix(u)}return new t.Matrix(this.node.getScreenCTM())}}}),t.Point=t.invent({create:function(l,u){var x;x=Array.isArray(l)?{x:l[0],y:l[1]}:"object"===B(l)?{x:l.x,y:l.y}:null!=l?{x:l,y:u??l}:{x:0,y:0},this.x=x.x,this.y=x.y},extend:{clone:function(){return new t.Point(this)},morph:function(l,u){return this.destination=new t.Point(l,u),this}}}),t.extend(t.Element,{point:function(l,u){return new t.Point(l,u).transform(this.screenCTM().inverse())}}),t.extend(t.Element,{attr:function(l,u,x){if(null==l){for(l={},x=(u=this.node.attributes).length-1;x>=0;x--)l[u[x].nodeName]=t.regex.isNumber.test(u[x].nodeValue)?parseFloat(u[x].nodeValue):u[x].nodeValue;return l}if("object"===B(l))for(var y in l)this.attr(y,l[y]);else if(null===u)this.node.removeAttribute(l);else{if(null==u)return null==(u=this.node.getAttribute(l))?t.defaults.attrs[l]:t.regex.isNumber.test(u)?parseFloat(u):u;"stroke-width"==l?this.attr("stroke",parseFloat(u)>0?this._stroke:null):"stroke"==l&&(this._stroke=u),"fill"!=l&&"stroke"!=l||(t.regex.isImage.test(u)&&(u=this.doc().defs().image(u,0,0)),u instanceof t.Image&&(u=this.doc().defs().pattern(0,0,function(){this.add(u)}))),"number"==typeof u?u=new t.Number(u):t.Color.isColor(u)?u=new t.Color(u):Array.isArray(u)&&(u=new t.Array(u)),"leading"==l?this.leading&&this.leading(u):"string"==typeof x?this.node.setAttributeNS(x,l,u.toString()):this.node.setAttribute(l,u.toString()),!this.rebuild||"font-size"!=l&&"x"!=l||this.rebuild(l,u)}return this}}),t.extend(t.Element,{transform:function(l,u){var x;return"object"!==B(l)?(x=new t.Matrix(this).extract(),"string"==typeof l?x[l]:x):(x=new t.Matrix(this),u=!!u||!!l.relative,null!=l.a&&(x=u?x.multiply(new t.Matrix(l)):new t.Matrix(l)),this.attr("transform",x))}}),t.extend(t.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(t.regex.transforms).slice(0,-1).map(function(l){var u=l.trim().split("(");return[u[0],u[1].split(t.regex.delimiter).map(function(x){return parseFloat(x)})]}).reduce(function(l,u){return"matrix"==u[0]?l.multiply(f(u[1])):l[u[0]].apply(l,u[1])},new t.Matrix)},toParent:function(l){if(this==l)return this;var u=this.screenCTM(),x=l.screenCTM().inverse();return this.addTo(l).untransform().transform(x.multiply(u)),this},toDoc:function(){return this.toParent(this.doc())}}),t.Transformation=t.invent({create:function(l,u){if(arguments.length>1&&"boolean"!=typeof u)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(l))for(var x=0,y=this.arguments.length;x=0},index:function(l){return[].slice.call(this.node.childNodes).indexOf(l.node)},get:function(l){return t.adopt(this.node.childNodes[l])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(l,u){for(var x=this.children(),y=0,A=x.length;y=0;u--)l.childNodes[u]instanceof v.SVGElement&&b(l.childNodes[u]);return t.adopt(l).id(t.eid(l.nodeName))}function m(l){return Math.abs(l)>1e-37?l:0}["fill","stroke"].forEach(function(l){var u={};u[l]=function(x){if(void 0===x)return this;if("string"==typeof x||t.Color.isRgb(x)||x&&"function"==typeof x.fill)this.attr(l,x);else for(var y=n[l].length-1;y>=0;y--)null!=x[n[l][y]]&&this.attr(n.prefix(l,n[l][y]),x[n[l][y]]);return this},t.extend(t.Element,t.FX,u)}),t.extend(t.Element,t.FX,{translate:function(l,u){return this.transform({x:l,y:u})},matrix:function(l){return this.attr("transform",new t.Matrix(6==arguments.length?[].slice.call(arguments):l))},opacity:function(l){return this.attr("opacity",l)},dx:function(l){return this.x(new t.Number(l).plus(this instanceof t.FX?0:this.x()),!0)},dy:function(l){return this.y(new t.Number(l).plus(this instanceof t.FX?0:this.y()),!0)}}),t.extend(t.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(l){return this.node.getPointAtLength(l)}}),t.Set=t.invent({create:function(l){Array.isArray(l)?this.members=l:this.clear()},extend:{add:function(){for(var l=[].slice.call(arguments),u=0,x=l.length;u-1&&this.members.splice(u,1),this},each:function(l){for(var u=0,x=this.members.length;u=0},index:function(l){return this.members.indexOf(l)},get:function(l){return this.members[l]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(l){return new t.Set(l)}}}),t.FX.Set=t.invent({create:function(l){this.set=l}}),t.Set.inherit=function(){var l=[];for(var u in t.Shape.prototype)"function"==typeof t.Shape.prototype[u]&&"function"!=typeof t.Set.prototype[u]&&l.push(u);for(var u in l.forEach(function(y){t.Set.prototype[y]=function(){for(var A=0,S=this.members.length;A=0;l--)delete this.memory()[arguments[l]];return this},memory:function(){return this._memory||(this._memory={})}}),t.get=function(l){var u=e.getElementById(function(x){var y=(x||"").toString().match(t.regex.reference);if(y)return y[1]}(l)||l);return t.adopt(u)},t.select=function(l,u){return new t.Set(t.utils.map((u||e).querySelectorAll(l),function(x){return t.adopt(x)}))},t.extend(t.Parent,{select:function(l){return t.select(l,this.node)}});var w="abcdef".split("");if("function"!=typeof v.CustomEvent){var k=function(l,u){u=u||{bubbles:!1,cancelable:!1,detail:void 0};var x=e.createEvent("CustomEvent");return x.initCustomEvent(l,u.bubbles,u.cancelable,u.detail),x};k.prototype=v.Event.prototype,t.CustomEvent=k}else t.CustomEvent=v.CustomEvent;return t},"function"==typeof define&&define.amd?define(function(){return fe(Q,Q.document)}):"object"===(typeof exports>"u"?"undefined":B(exports))&&typeof module<"u"?module.exports=Q.document?fe(Q,Q.document):function(v){return fe(v,v.document)}:Q.SVG=fe(Q,Q.document),function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(r,n){return this.add(r,n),!r.attr("in")&&this.autoSetIn&&r.attr("in",this.source),r.attr("result")||r.attr("result",r),r},blend:function(r,n,o){return this.put(new SVG.BlendEffect(r,n,o))},colorMatrix:function(r,n){return this.put(new SVG.ColorMatrixEffect(r,n))},convolveMatrix:function(r){return this.put(new SVG.ConvolveMatrixEffect(r))},componentTransfer:function(r){return this.put(new SVG.ComponentTransferEffect(r))},composite:function(r,n,o){return this.put(new SVG.CompositeEffect(r,n,o))},flood:function(r,n){return this.put(new SVG.FloodEffect(r,n))},offset:function(r,n){return this.put(new SVG.OffsetEffect(r,n))},image:function(r){return this.put(new SVG.ImageEffect(r))},merge:function(){var r=[void 0];for(var n in arguments)r.push(arguments[n]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,r)))},gaussianBlur:function(r,n){return this.put(new SVG.GaussianBlurEffect(r,n))},morphology:function(r,n){return this.put(new SVG.MorphologyEffect(r,n))},diffuseLighting:function(r,n,o){return this.put(new SVG.DiffuseLightingEffect(r,n,o))},displacementMap:function(r,n,o,h,c){return this.put(new SVG.DisplacementMapEffect(r,n,o,h,c))},specularLighting:function(r,n,o,h){return this.put(new SVG.SpecularLightingEffect(r,n,o,h))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(r,n,o,h,c){return this.put(new SVG.TurbulenceEffect(r,n,o,h,c))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(r){var n=this.put(new SVG.Filter);return"function"==typeof r&&r.call(n,n),n}}),SVG.extend(SVG.Container,{filter:function(r){return this.defs().filter(r)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(r){return this.filterer=r instanceof SVG.Element?r:this.doc().filter(r),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(r){return this.filterer&&!0===r&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(r){return null==r?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",r)},result:function(r){return null==r?this.attr("result"):this.attr("result",r)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(r){return null==r?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",r)},result:function(r){return null==r?this.attr("result"):this.attr("result",r)},toString:function(){return this.result()}}});var v={blend:function(r,n){return this.parent()&&this.parent().blend(this,r,n)},colorMatrix:function(r,n){return this.parent()&&this.parent().colorMatrix(r,n).in(this)},convolveMatrix:function(r){return this.parent()&&this.parent().convolveMatrix(r).in(this)},componentTransfer:function(r){return this.parent()&&this.parent().componentTransfer(r).in(this)},composite:function(r,n){return this.parent()&&this.parent().composite(this,r,n)},flood:function(r,n){return this.parent()&&this.parent().flood(r,n)},offset:function(r,n){return this.parent()&&this.parent().offset(r,n).in(this)},image:function(r){return this.parent()&&this.parent().image(r)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(r,n){return this.parent()&&this.parent().gaussianBlur(r,n).in(this)},morphology:function(r,n){return this.parent()&&this.parent().morphology(r,n).in(this)},diffuseLighting:function(r,n,o){return this.parent()&&this.parent().diffuseLighting(r,n,o).in(this)},displacementMap:function(r,n,o,h){return this.parent()&&this.parent().displacementMap(this,r,n,o,h)},specularLighting:function(r,n,o,h){return this.parent()&&this.parent().specularLighting(r,n,o,h).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(r,n,o,h,c){return this.parent()&&this.parent().turbulence(r,n,o,h,c).in(this)}};SVG.extend(SVG.Effect,v),SVG.extend(SVG.ParentEffect,v),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(r){this.attr("in",r)}}});var e={blend:function(r,n,o){this.attr({in:r,in2:n,mode:o||"normal"})},colorMatrix:function(r,n){"matrix"==r&&(n=a(n)),this.attr({type:r,values:void 0===n?null:n})},convolveMatrix:function(r){r=a(r),this.attr({order:Math.sqrt(r.split(" ").length),kernelMatrix:r})},composite:function(r,n,o){this.attr({in:r,in2:n,operator:o})},flood:function(r,n){this.attr("flood-color",r),null!=n&&this.attr("flood-opacity",n)},offset:function(r,n){this.attr({dx:r,dy:n})},image:function(r){this.attr("href",r,SVG.xlink)},displacementMap:function(r,n,o,h,c){this.attr({in:r,in2:n,scale:o,xChannelSelector:h,yChannelSelector:c})},gaussianBlur:function(r,n){this.attr("stdDeviation",null!=r||null!=n?function(o){if(!Array.isArray(o))return o;for(var h=0,c=o.length,d=[];h1&&(G*=c=Math.sqrt(c),N*=c),d=(new SVG.Matrix).rotate(j).scale(1/G,1/N).rotate(-j),Z=Z.transform(d),f=(g=[(U=U.transform(d)).x-Z.x,U.y-Z.y])[0]*g[0]+g[1]*g[1],p=Math.sqrt(f),g[0]/=p,g[1]/=p,b=f<4?Math.sqrt(1-f/4):0,ne===te&&(b*=-1),m=new SVG.Point((U.x+Z.x)/2+b*-g[1],(U.y+Z.y)/2+b*g[0]),w=new SVG.Point(Z.x-m.x,Z.y-m.y),k=new SVG.Point(U.x-m.x,U.y-m.y),l=Math.acos(w.x/Math.sqrt(w.x*w.x+w.y*w.y)),w.y<0&&(l*=-1),u=Math.acos(k.x/Math.sqrt(k.x*k.x+k.y*k.y)),k.y<0&&(u*=-1),te&&l>u&&(u+=2*Math.PI),!te&&lr.maxX-t.width&&(n=(a=r.maxX-t.width)-this.startPoints.box.x),null!=r.minY&&sr.maxY-t.height&&(o=(s=r.maxY-t.height)-this.startPoints.box.y),null!=r.snapToGrid&&(a-=a%r.snapToGrid,s-=s%r.snapToGrid,n-=n%r.snapToGrid,o-=o%r.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:n,y:o},!0):this.el.move(a,s));return i},v.prototype.end=function(e){var t=this.drag(e);this.el.fire("dragend",{event:e,p:t,m:this.m,handler:this}),SVG.off(window,"mousemove.drag"),SVG.off(window,"touchmove.drag"),SVG.off(window,"mouseup.drag"),SVG.off(window,"touchend.drag")},SVG.extend(SVG.Element,{draggable:function(e,t){"function"!=typeof e&&"object"!=typeof e||(t=e,e=!0);var i=this.remember("_draggable")||new v(this);return(e=void 0===e||e)?i.init(t||{},e):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}.call(void 0),function(){function v(e){this.el=e,e.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1},this.pointsList={lt:[0,0],rt:["width",0],rb:["width","height"],lb:[0,"height"],t:["width",0],r:["width","height"],b:["width","height"],l:[0,"height"]},this.pointCoord=function(t,i,a){var s="string"!=typeof t?t:i[t];return a?s/2:s},this.pointCoords=function(t,i){var a=this.pointsList[t];return{x:this.pointCoord(a[0],i,"t"===t||"b"===t),y:this.pointCoord(a[1],i,"r"===t||"l"===t)}}}v.prototype.init=function(e,t){var i=this.el.bbox();this.options={};var a=this.el.selectize.defaults.points;for(var s in this.el.selectize.defaults)this.options[s]=this.el.selectize.defaults[s],void 0!==t[s]&&(this.options[s]=t[s]);var r=["points","pointsExclude"];for(var s in r){var n=this.options[r[s]];"string"==typeof n?n=n.length>0?n.split(/\s*,\s*/i):[]:"boolean"==typeof n&&"points"===r[s]&&(n=n?a:[]),this.options[r[s]]=n}this.options.points=[a,this.options.points].reduce(function(o,h){return o.filter(function(c){return h.indexOf(c)>-1})}),this.options.points=[this.options.points,this.options.pointsExclude].reduce(function(o,h){return o.filter(function(c){return h.indexOf(c)<0})}),this.parent=this.el.parent(),this.nested=this.nested||this.parent.group(),this.nested.matrix(new SVG.Matrix(this.el).translate(i.x,i.y)),this.options.deepSelect&&-1!==["line","polyline","polygon"].indexOf(this.el.type)?this.selectPoints(e):this.selectRect(e),this.observe(),this.cleanup()},v.prototype.selectPoints=function(e){return this.pointSelection.isSelected=e,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawPoints()),this},v.prototype.getPointArray=function(){var e=this.el.bbox();return this.el.array().valueOf().map(function(t){return[t[0]-e.x,t[1]-e.y]})},v.prototype.drawPoints=function(){for(var e=this,t=this.getPointArray(),i=0,a=t.length;i0&&this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-n[0]);n=this.checkAspectRatio(n),this.el.move(this.parameters.box.x+n[0],this.parameters.box.y+n[1]).size(this.parameters.box.width-n[0],this.parameters.box.height-n[1])}};break;case"rt":this.calc=function(s,r){var n=this.snapToGrid(s,r,2);if(this.parameters.box.width+n[0]>0&&this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+n[0]);n=this.checkAspectRatio(n,!0),this.el.move(this.parameters.box.x,this.parameters.box.y+n[1]).size(this.parameters.box.width+n[0],this.parameters.box.height-n[1])}};break;case"rb":this.calc=function(s,r){var n=this.snapToGrid(s,r,0);if(this.parameters.box.width+n[0]>0&&this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+n[0]);n=this.checkAspectRatio(n),this.el.move(this.parameters.box.x,this.parameters.box.y).size(this.parameters.box.width+n[0],this.parameters.box.height+n[1])}};break;case"lb":this.calc=function(s,r){var n=this.snapToGrid(s,r,1);if(this.parameters.box.width-n[0]>0&&this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-n[0]);n=this.checkAspectRatio(n,!0),this.el.move(this.parameters.box.x+n[0],this.parameters.box.y).size(this.parameters.box.width-n[0],this.parameters.box.height+n[1])}};break;case"t":this.calc=function(s,r){var n=this.snapToGrid(s,r,2);if(this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y+n[1]).height(this.parameters.box.height-n[1])}};break;case"r":this.calc=function(s,r){var n=this.snapToGrid(s,r,0);if(this.parameters.box.width+n[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).width(this.parameters.box.width+n[0])}};break;case"b":this.calc=function(s,r){var n=this.snapToGrid(s,r,0);if(this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).height(this.parameters.box.height+n[1])}};break;case"l":this.calc=function(s,r){var n=this.snapToGrid(s,r,1);if(this.parameters.box.width-n[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x+n[0],this.parameters.box.y).width(this.parameters.box.width-n[0])}};break;case"rot":this.calc=function(s,r){var n=s+this.parameters.p.x,o=r+this.parameters.p.y,h=Math.atan2(this.parameters.p.y-this.parameters.box.y-this.parameters.box.height/2,this.parameters.p.x-this.parameters.box.x-this.parameters.box.width/2),c=Math.atan2(o-this.parameters.box.y-this.parameters.box.height/2,n-this.parameters.box.x-this.parameters.box.width/2),d=this.parameters.rotation+180*(c-h)/Math.PI+this.options.snapToAngle/2;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(d-d%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(s,r){var n=this.snapToGrid(s,r,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),o=this.el.array().valueOf();o[this.parameters.i][0]=this.parameters.pointCoords[0]+n[0],o[this.parameters.i][1]=this.parameters.pointCoords[1]+n[1],this.el.plot(o)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:e}),SVG.on(window,"touchmove.resize",function(s){t.update(s||window.event)}),SVG.on(window,"touchend.resize",function(){t.done()}),SVG.on(window,"mousemove.resize",function(s){t.update(s||window.event)}),SVG.on(window,"mouseup.resize",function(){t.done()})},v.prototype.update=function(e){if(e){var t=this._extractPosition(e),i=this.transformPoint(t.x,t.y),a=i.x-this.parameters.p.x,s=i.y-this.parameters.p.y;this.lastUpdateCall=[a,s],this.calc(a,s),this.el.fire("resizing",{dx:a,dy:s,event:e})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},v.prototype.done=function(){this.lastUpdateCall=null,SVG.off(window,"mousemove.resize"),SVG.off(window,"mouseup.resize"),SVG.off(window,"touchmove.resize"),SVG.off(window,"touchend.resize"),this.el.fire("resizedone")},v.prototype.snapToGrid=function(e,t,i,a){var s;return s=void 0!==a?[(i+e)%this.options.snapToGrid,(a+t)%this.options.snapToGrid]:[(this.parameters.box.x+e+(1&(i=i??3)?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+t+(2&i?0:this.parameters.box.height))%this.options.snapToGrid],e<0&&(s[0]-=this.options.snapToGrid),t<0&&(s[1]-=this.options.snapToGrid),e-=Math.abs(s[0])n.maxX&&(e=n.maxX-s),void 0!==n.minY&&r+tn.maxY&&(t=n.maxY-r),[e,t]},v.prototype.checkAspectRatio=function(e,t){if(!this.options.saveAspectRatio)return e;var i=e.slice(),a=this.parameters.box.width/this.parameters.box.height,s=this.parameters.box.width+e[0],r=this.parameters.box.height-e[1],n=s/r;return na&&(i[0]=this.parameters.box.width-r*a,t&&(i[0]=-i[0])),i},SVG.extend(SVG.Element,{resize:function(e){return(this.remember("_resizeHandler")||new v(this)).init(e||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}(),void 0===window.Apex&&(window.Apex={});var $e=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w}return F(v,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new ie(this.ctx),this.ctx.axes=new ot(this.ctx),this.ctx.core=new zt(this.ctx.el,this.ctx),this.ctx.config=new ge({}),this.ctx.data=new Oe(this.ctx),this.ctx.grid=new Ne(this.ctx),this.ctx.graphics=new T(this.ctx),this.ctx.coreUtils=new W(this.ctx),this.ctx.crosshairs=new Pe(this.ctx),this.ctx.events=new rt(this.ctx),this.ctx.exports=new ve(this.ctx),this.ctx.localization=new nt(this.ctx),this.ctx.options=new K,this.ctx.responsive=new lt(this.ctx),this.ctx.series=new $(this.ctx),this.ctx.theme=new ht(this.ctx),this.ctx.formatters=new ce(this.ctx),this.ctx.titleSubtitle=new ct(this.ctx),this.ctx.legend=new We(this.ctx),this.ctx.toolbar=new Be(this.ctx),this.ctx.tooltip=new je(this.ctx),this.ctx.dimensions=new ye(this.ctx),this.ctx.updateHelpers=new Xt(this.ctx),this.ctx.zoomPanSelection=new xt(this.ctx),this.ctx.w.globals.tooltip=new je(this.ctx)}}]),v}(),Je=function(){function v(e){Y(this,v),this.ctx=e,this.w=e.w}return F(v,[{key:"clear",value:function(e){var t=e.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:t})}},{key:"killSVG",value:function(e){e.each(function(t,i){this.removeClass("*"),this.off(),this.stop()},!0),e.ungroup(),e.clear()}},{key:"clearDomElements",value:function(e){var t=this,a=this.w.globals.dom.Paper.node;a.parentNode&&a.parentNode.parentNode&&!e.isUpdating&&(a.parentNode.parentNode.style.minHeight="unset");var s=this.w.globals.dom.baseEl;s&&this.ctx.eventList.forEach(function(n){s.removeEventListener(n,t.ctx.events.documentEvent)});var r=this.w.globals.dom;if(null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(r.Paper),r.Paper.remove(),r.elWrap=null,r.elGraphical=null,r.elLegendWrap=null,r.elLegendForeign=null,r.baseEl=null,r.elGridRect=null,r.elGridRectMask=null,r.elGridRectMarkerMask=null,r.elForecastMask=null,r.elNonForecastMask=null,r.elDefs=null}}]),v}(),Te=new WeakMap,Et=function(){function v(e,t){Y(this,v),this.opts=t,this.ctx=this,this.w=new st(t).init(),this.el=e,this.w.globals.cuid=P.randomId(),this.w.globals.chartID=this.w.config.chart.id?P.escapeString(this.w.config.chart.id):this.w.globals.cuid,new $e(this).initModules(),this.create=P.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return F(v,[{key:"render",value:function(){var e=this;return new Promise(function(t,i){if(null!==e.el){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),e.w.config.chart.id&&Apex._chartInstances.push({id:e.w.globals.chartID,group:e.w.config.chart.group,chart:e}),e.setLocale(e.w.config.chart.defaultLocale);var a=e.w.config.chart.events.beforeMount;if("function"==typeof a&&a(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),function(c,d){var g=!1;if(c.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var p=c.getBoundingClientRect();"none"!==c.style.display&&0!==p.width||(g=!0)}var f=new ResizeObserver(function(b){g&&d.call(c,b),g=!0});c.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(c.children).forEach(function(b){return f.observe(b)}):f.observe(c),Te.set(d,f)}(e.el.parentNode,e.parentResizeHandler),!e.css){var s=e.el.getRootNode&&e.el.getRootNode(),r=P.is("ShadowRoot",s),n=e.el.ownerDocument,o=n.getElementById("apexcharts-css");!r&&o||(e.css=document.createElement("style"),e.css.id="apexcharts-css",e.css.textContent='@keyframes opaque {\n 0% {\n opacity: 0\n }\n\n to {\n opacity: 1\n }\n}\n\n@keyframes resizeanim {\n 0%,to {\n opacity: 0\n }\n}\n\n.apexcharts-canvas {\n position: relative;\n user-select: none\n}\n\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0,0,0,.5);\n box-shadow: 0 0 1px rgba(255,255,255,.5);\n -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5)\n}\n\n.apexcharts-inner {\n position: relative\n}\n\n.apexcharts-text tspan {\n font-family: inherit\n}\n\n.legend-mouseover-inactive {\n transition: .15s ease all;\n opacity: .2\n}\n\n.apexcharts-legend-text {\n padding-left: 15px;\n margin-left: -15px;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255,255,255,.96)\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30,30,30,.8)\n}\n\n.apexcharts-tooltip * {\n font-family: inherit\n}\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #eceff1;\n border-bottom: 1px solid #ddd\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0,0,0,.7);\n border-bottom: 1px solid #333\n}\n\n.apexcharts-tooltip-text-goals-value,.apexcharts-tooltip-text-y-value,.apexcharts-tooltip-text-z-value {\n display: inline-block;\n margin-left: 5px;\n font-weight: 600\n}\n\n.apexcharts-tooltip-text-goals-label:empty,.apexcharts-tooltip-text-goals-value:empty,.apexcharts-tooltip-text-y-label:empty,.apexcharts-tooltip-text-y-value:empty,.apexcharts-tooltip-text-z-value:empty,.apexcharts-tooltip-title:empty {\n display: none\n}\n\n.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px\n}\n\n.apexcharts-tooltip-goals-group,.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value {\n display: flex\n}\n\n.apexcharts-tooltip-text-goals-label:not(:empty),.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0;\n margin-right: 10px;\n border-radius: 50%\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px\n}\n\n.apexcharts-tooltip-series-group-hidden {\n opacity: 0;\n height: 0;\n line-height: 0;\n padding: 0!important\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px\n}\n\n.apexcharts-custom-tooltip,.apexcharts-tooltip-box {\n padding: 4px 8px\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0,0,0,.7);\n border: 1px solid rgba(0,0,0,.5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0,0,0,.5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0,0,0,.5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0,0,0,.7);\n border: 1px solid rgba(0,0,0,.5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0,0,0,.5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0,0,0,.5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_boundingRect,.svg_select_points_rot {\n pointer-events: none;\n opacity: 0;\n visibility: hidden\n}\n\n.apexcharts-selection-rect+g .svg_select_boundingRect,.apexcharts-selection-rect+g .svg_select_points_rot {\n opacity: 0;\n visibility: hidden\n}\n\n.apexcharts-selection-rect+g .svg_select_points_l,.apexcharts-selection-rect+g .svg_select_points_r {\n cursor: ew-resize;\n opacity: 1;\n visibility: visible\n}\n\n.svg_select_points {\n fill: #efefef;\n stroke: #333;\n rx: 2\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,.apexcharts-pan-icon,.apexcharts-reset-icon,.apexcharts-selection-icon,.apexcharts-toolbar-custom-icon,.apexcharts-zoom-icon,.apexcharts-zoomin-icon,.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,.apexcharts-reset-icon svg,.apexcharts-zoom-icon svg,.apexcharts-zoomin-icon svg,.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,.apexcharts-theme-dark .apexcharts-pan-icon svg,.apexcharts-theme-dark .apexcharts-reset-icon svg,.apexcharts-theme-dark .apexcharts-selection-icon svg,.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,.apexcharts-theme-dark .apexcharts-zoom-icon svg,.apexcharts-theme-dark .apexcharts-zoomin-icon svg,.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,.apexcharts-theme-light .apexcharts-reset-icon:hover svg,.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,.apexcharts-reset-icon,.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0,0,0,.7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,.apexcharts-datalabel.apexcharts-element-hidden,.apexcharts-hide .apexcharts-series-points {\n opacity: 0\n}\n\n.apexcharts-datalabel,.apexcharts-datalabel-label,.apexcharts-datalabel-value,.apexcharts-datalabels,.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-annotation-rect,.apexcharts-area-series .apexcharts-area,.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,.apexcharts-gridline,.apexcharts-line,.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,.apexcharts-point-annotation-label,.apexcharts-radar-series path,.apexcharts-radar-series polygon,.apexcharts-toolbar svg,.apexcharts-tooltip .apexcharts-marker,.apexcharts-xaxis-annotation-label,.apexcharts-yaxis-annotation-label,.apexcharts-zoom-rect {\n pointer-events: none\n}\n\n.apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,.resize-triggers,.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n',r?s.prepend(e.css):n.head.appendChild(e.css))}var h=e.create(e.w.config.series,{});if(!h)return t(e);e.mount(h).then(function(){"function"==typeof e.w.config.chart.events.mounted&&e.w.config.chart.events.mounted(e,e.w),e.events.fireEvent("mounted",[e,e.w]),t(h)}).catch(function(c){i(c)})}else i(new Error("Element not found"))})}},{key:"create",value:function(e,t){var i=this.w;new $e(this).initModules();var a=this.w.globals;if(a.noData=!1,a.animationEnded=!1,this.responsive.checkResponsiveConfig(t),i.config.xaxis.convertedCatToNumeric&&new de(i.config).convertCatToNumericXaxis(i.config,this.ctx),null===this.el||(this.core.setupElements(),"treemap"===i.config.chart.type&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),0===a.svgWidth))return a.animationEnded=!0,null;var s=W.checkComboSeries(e);a.comboCharts=s.comboCharts,a.comboBarCount=s.comboBarCount;var r=e.every(function(c){return c.data&&0===c.data.length});(0===e.length||r)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(e),this.theme.init(),new ue(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),a.noData&&a.collapsedSeries.length!==a.series.length&&!i.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),a.axisCharts&&(this.core.coreCalculations(),"category"!==i.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX),this.formatters.heatmapLabelFormatters(),new W(this).getLargestMarkerSize(),this.dimensions.plotCoords();var n=this.core.xySettings();this.grid.createGridMask();var o=this.core.plotChartType(e,n),h=new ae(this);return h.bringForward(),i.config.dataLabels.background.enabled&&h.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:o,xyRatios:n,dimensions:{plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}}}}},{key:"mount",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise(function(s,r){if(null===i.el)return r(new Error("Not enough data to display or target element not found"));(null===t||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new Ne(i);var n=i.grid.drawGrid();if(i.annotations=new at(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position&&n&&a.globals.dom.elGraphical.add(n.el),Array.isArray(t.elGraph))for(var o=0;o0&&a.globals.memory.methodsToExec.forEach(function(g){g.method(g.params,!1,g.context)}),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)})}},{key:"destroy",value:function(){var e,t;window.removeEventListener("resize",this.windowResizeHandler),(t=Te.get(e=this.parentResizeHandler))&&(t.disconnect(),Te.delete(e));var i=this.w.config.chart.id;i&&Apex._chartInstances.forEach(function(a,s){a.id===P.escapeString(i)&&Apex._chartInstances.splice(s,1)}),new Je(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w;return n.globals.selection=void 0,e.series&&(this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map(function(o,h){return t.updateHelpers._extendSeries(o,h)})),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,i,a,s,r)}},{key:"updateSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,t,i)}},{key:"appendSeries",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,t,i)}},{key:"appendData",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(e,t)}},{key:"addEventListener",value:function(e,t){this.events.addEventListener(e,t)}},{key:"removeEventListener",value:function(e,t){this.events.removeEventListener(e,t)}},{key:"addXaxisAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(e,t,a)}},{key:"addYaxisAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(e,t,a)}},{key:"addPointAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(e,t,a)}},{key:"clearAnnotations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=this;e&&(t=e),t.annotations.clearAnnotations(t)}},{key:"removeAnnotation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;t&&(i=t),i.annotations.removeAnnotation(i,e)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(e,t){return this.coreUtils.getSeriesTotalsXRange(e,t)}},{key:"getHighestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Ce(this.ctx).getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Ce(this.ctx).getMinYMaxY(e).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(e,t){return this.updateHelpers.toggleDataPointSelection(e,t)}},{key:"zoomX",value:function(e,t){this.ctx.toolbar.zoomUpdateOptions(e,t)}},{key:"setLocale",value:function(e){this.localization.setCurrentLocaleValues(e)}},{key:"dataURI",value:function(e){return new ve(this.ctx).dataURI(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new ve(this.ctx).exportToCSV(e)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var e=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){e.w.globals.resized=!0,e.w.globals.dataChanged=!1,e.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var e=this.w.config.chart.redrawOnWindowResize;"function"==typeof e&&(e=e()),e&&this._windowResize()}}],[{key:"getChartByID",value:function(e){var t=P.escapeString(e),i=Apex._chartInstances.filter(function(a){return a.id===t})[0];return i&&i.chart}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),t=0;t2?s-2:0),n=2;n