From a06c4c0a38c958cdf162deb654818e444c1a4343 Mon Sep 17 00:00:00 2001 From: pvictor Date: Tue, 6 Nov 2018 09:04:16 +0100 Subject: [PATCH] update ApexCharts to 2.2.0 --- DESCRIPTION | 3 ++- NAMESPACE | 1 + R/apex-utils.R | 9 +++++++++ inst/examples/pie.R | 6 ++++-- inst/htmlwidgets/apexcharter.yaml | 4 ++-- inst/htmlwidgets/lib/apexcharts-2.2/apexcharts.min.js | 1 + man/ax_labels.Rd | 5 +++++ 7 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 inst/htmlwidgets/lib/apexcharts-2.2/apexcharts.min.js diff --git a/DESCRIPTION b/DESCRIPTION index 0eff25d..a518af1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: apexcharter -Version: 0.0.0.9200 +Version: 0.0.0.9300 Title: Create Interactive Chart with the JavaScript 'ApexCharts' Library Description: Provides an 'htmlwidgets' interface to 'apexcharts.js'. Authors@R: c( @@ -10,6 +10,7 @@ License: MIT + file LICENSE Encoding: UTF-8 LazyData: true ByteCompile: true +Depends: R (>= 2.10) Imports: htmlwidgets, magrittr, diff --git a/NAMESPACE b/NAMESPACE index a5cb4d3..43e8f0c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -11,6 +11,7 @@ export(ax_dataLabels) export(ax_fill) export(ax_grid) export(ax_labels) +export(ax_labels2) export(ax_legend) export(ax_markers) export(ax_plotOptions) diff --git a/R/apex-utils.R b/R/apex-utils.R index ebb14e9..d428143 100644 --- a/R/apex-utils.R +++ b/R/apex-utils.R @@ -217,16 +217,25 @@ ax_grid <- function(ax, #' Alternative axis labels #' #' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param labels A vector to use as labels. #' @param ... Vector. In Axis Charts (line / column), labels can be set instead of setting xaxis categories #' option. While, in pie/donut charts, each label corresponds to value in series array. #' #' @return A \code{apexcharts} \code{htmlwidget} object. #' @export +#' +#' @name ax_labels #' #' @note See \url{https://apexcharts.com/docs/options/labels/} ax_labels <- function(ax, ...) { .ax_opt(ax, "labels", ...) } +#' @rdname ax_labels +#' @export +ax_labels2 <- function(ax, labels) { + .ax_opt2(ax, "labels", l = labels) +} + #' Legend properties diff --git a/inst/examples/pie.R b/inst/examples/pie.R index 4db3e86..8a93921 100644 --- a/inst/examples/pie.R +++ b/inst/examples/pie.R @@ -22,7 +22,8 @@ library(apexcharter) apexchart() %>% ax_chart(type = "pie") %>% - ax_series(23, 45, 56) + ax_series(23, 45, 56) %>% + ax_labels("A", "B", "C") @@ -32,6 +33,7 @@ apexchart() %>% apexchart() %>% ax_chart(type = "donut") %>% - ax_series2(l = c(23, 45, 56)) + ax_series2(c(23, 45, 56)) %>% + ax_labels2(c("A", "B", "C")) diff --git a/inst/htmlwidgets/apexcharter.yaml b/inst/htmlwidgets/apexcharter.yaml index cdbccaa..32681c2 100644 --- a/inst/htmlwidgets/apexcharter.yaml +++ b/inst/htmlwidgets/apexcharter.yaml @@ -1,5 +1,5 @@ dependencies: - name: apexcharts - version: 2.1.8 - src: htmlwidgets/lib/apexcharts-2.1 + version: 2.2.0 + src: htmlwidgets/lib/apexcharts-2.2 script: apexcharts.min.js diff --git a/inst/htmlwidgets/lib/apexcharts-2.2/apexcharts.min.js b/inst/htmlwidgets/lib/apexcharts-2.2/apexcharts.min.js new file mode 100644 index 0000000..942fd39 --- /dev/null +++ b/inst/htmlwidgets/lib/apexcharts-2.2/apexcharts.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("ApexCharts",[],e):"object"==typeof exports?exports.ApexCharts=e():t.ApexCharts=e()}(this,function(){return function(i){var a={};function s(t){if(a[t])return a[t].exports;var e=a[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,s),e.l=!0,e.exports}return s.m=i,s.c=a,s.i=function(t){return t},s.d=function(t,e,i){s.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="",s(s.s=167)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var P=Object.assign||function(t){for(var e=1;e=i){for(var a=e.length-3;0>16&255,i[1]=t>>8&255,i[2]=255&t,i[3]=9===e||5===e?s((t>>24&255)/255*1e4)/1e4:-1}return i}},{key:"getHexColorFromName",value:function(t){var e=document.createElement("div");e.style.color=t;var i=window.getComputedStyle(document.body.appendChild(e)).color.match(/\d+/g).map(function(t){return parseInt(t,10)});return document.body.removeChild(e),3<=i.length&&"#"+((1<<24)+(i[0]<<16)+(i[1]<<8)+i[2]).toString(16).substr(1)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===(void 0===t?"undefined":n(t))&&!Array.isArray(t)&&null!=t}},{key:"extend",value:function(e,i){var a=this;"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;is&&r.globals.seriesX[e][a]"}this.w.globals.easing=t}},{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateCircleRadius",value:function(t,e,i,a,s){e||(e=0),t.attr({r:e}).animate(a,s).attr({r:i})}},{key:"animateCircle",value:function(t,e,i,a,s){t.attr({r:e.r,cx:e.cx,cy:e.cy}).animate(a,s).attr({r:i.r,cx:i.cx,cy:i.cy})}},{key:"animateRect",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.j,a=t.pathFrom,s=t.pathTo,n=t.speed,r=t.delay,o=t.strokeWidth,l=this.w,h=0;l.config.chart.animations.animateGradually.enabled&&(h=l.config.chart.animations.animateGradually.delay),l.config.chart.animations.dynamicAnimation.enabled&&l.globals.dataChanged&&(h=0),this.morphSVG(e,i,a,s,n,o,r*h)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach(function(t){t.el.classList.remove("hidden")})}},{key:"morphSVG",value:function(t,e,i,a,s,n,r){var o=this,l=this.w;i||(i=t.attr("pathFrom")),a||(a=t.attr("pathTo")),(-1=t.from&&i<=t.to&&a[e].classList.remove("legend-mouseover-inactive")}}(i.config.plotOptions.heatmap.colorScale.ranges[n])}else"mouseout"===t.type&&s()}},{key:"getActiveSeriesIndex",value:function(){var i=this.w,t=0;if(1e.length?t:e},0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),e}();e.default=o},function(t,e,i){"use strict";var a=function(){function a(t,e){for(var i=0;i=t.from&&A[r][e]<=t.to&&(s=t.color)});var n=P.fillPath(m,{seriesNumber:C.barOptions.distributed?a:b,color:s});m=C.renderSeries({realIndex:b,pathFill:n,j:e,i:r,pathFrom:f,pathTo:d,strokeWidth:k,elSeries:m,x:p,y:g,series:A,barHeight:y,barWidth:w,elDataLabelsWrap:S,visibleSeries:C.visibleI,type:"bar"})},i=0,a=M.globals.dataPoints;ie.globals.minX&&e.globals.seriesX[i][a]=this.barOptions.colors.backgroundBarColors.length&&(x=0);var y=this.barOptions.colors.backgroundBarColors[x],w=d.drawRect(0,v-i*this.visibleI,u.globals.gridWidth,i*this.seriesLen,0,y,this.barOptions.colors.backgroundBarOpacity);c.add(w),w.node.classList.add("apexcharts-backgroundBar")}return{pathTo:s,pathFrom:n,x:o,y:l,barYPosition:v}}},{key:"drawColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,n=t.pathTo,r=t.pathFrom,o=t.barWidth,l=t.zeroH,h=t.strokeWidth,c=t.elSeries,u=this.w,d=new E.default(this.ctx),f=e.i,p=e.j,g=e.realIndex,x=e.bc;u.globals.isXNumeric&&(i=(u.globals.seriesX[f][p]-u.globals.minX)/this.xRatio-o/2);var v=i+o*this.visibleI;n=d.move(v,l),r=d.move(v,l),0=this.barOptions.colors.backgroundBarColors.length&&(x=0);var y=this.barOptions.colors.backgroundBarColors[x],w=d.drawRect(v-o*this.visibleI,0,o*this.seriesLen,u.globals.gridHeight,0,y,this.barOptions.colors.backgroundBarOpacity);c.add(w),w.node.classList.add("apexcharts-backgroundBar")}return{pathTo:n,pathFrom:r,x:i,y:a,barXPosition:v}}},{key:"getPathFrom",value:function(t,e){2e.globals.gridWidth&&(l=l-o.width-h),{bcx:i,bcy:n,dataLabelsX:l,dataLabelsY:f}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,n=t.j,r=t.dataLabelsConfig,o=this.w,l=new p.default(this.ctx),h=new E.default(this.ctx),c=r.formatter,u=null,d=-1p.x+p.width+2||e>p.y+p.height+2||t+ci.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeighti.config.yaxis[0].labels.maxWidth&&(this.yAxisWidth=i.config.yaxis[0].labels.maxWidth))}},{key:"setGridCoordsForAxisCharts",value:function(t){var i=this.w,e=i.globals,a=this.getyAxisLabelsCoords(),s=this.getxAxisLabelsCoords(),n=this.getyAxisTitleCoords(),r=this.getxAxisTitleCoords();i.globals.yLabelsCoords=[],i.globals.yTitleCoords=[],i.config.yaxis.map(function(t,e){i.globals.yLabelsCoords.push({width:a[e].width,index:e}),i.globals.yTitleCoords.push({width:n[e].width,index:e})}),this.conditionalChecksForAxisCoords(s,r),e.translateXAxisY=i.globals.rotateXLabels?this.xAxisHeight/8:-4,e.translateXAxisX=i.globals.rotateXLabels&&i.globals.isXNumeric&&i.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,this.isBarHorizontal&&(e.rotateXLabels=!1,e.translateXAxisY=parseInt(i.config.xaxis.labels.style.fontSize)/1.5*-1),e.translateXAxisY=e.translateXAxisY+i.config.xaxis.labels.offsetY,e.translateXAxisX=e.translateXAxisX+i.config.xaxis.labels.offsetX;var o=this.yAxisWidth,l=this.xAxisHeight;e.xAxisLabelsHeight=this.xAxisHeight,e.xAxisHeight=this.xAxisHeight;var h=10;switch(i.config.grid.show||(o=0,l=35),this.isSparkline&&(t={height:0,width:0},h=o=l=0),i.config.legend.position){case"bottom":e.translateY=h,e.translateX=o,e.gridHeight=e.svgHeight-t.height-l-(this.isSparkline?0:i.globals.rotateXLabels?10:15),e.gridWidth=e.svgWidth-o;break;case"top":e.translateY=t.height+h,e.translateX=o,e.gridHeight=e.svgHeight-t.height-l-(this.isSparkline?0:i.globals.rotateXLabels?10:15),e.gridWidth=e.svgWidth-o;break;case"left":e.translateY=h,e.translateX=t.width+o,e.gridHeight=e.svgHeight-l-12,e.gridWidth=e.svgWidth-t.width-o;break;case"right":e.translateY=h,e.translateX=o,e.gridHeight=e.svgHeight-l-12,e.gridWidth=e.svgWidth-t.width-o;break;default:throw new Error("Legend position not supported")}e.gridHeight=e.gridHeight-i.config.grid.padding.top-i.config.grid.padding.bottom,e.gridWidth=e.gridWidth-i.config.grid.padding.left-i.config.grid.padding.right,e.translateX=e.translateX+i.config.grid.padding.left,e.translateY=e.translateY+i.config.grid.padding.top,this.isBarHorizontal||this.setGridXPosForDualYAxis(n,a),new u.default(this.ctx).setYAxisXPosition(a,n)}},{key:"setGridCoordsForNonAxisCharts",value:function(t){var e=this.w,i=e.globals,a=0;e.config.legend.show&&!e.config.legend.floating&&(a=4*e.config.legend.markers.size+e.config.legend.itemMargin.horizontal);var s=10;switch("pie"===e.config.chart.type||"donut"===e.config.chart.type?s+=e.config.plotOptions.pie.offsetY:"radialBar"===e.config.chart.type&&(s+=e.config.plotOptions.radialBar.offsetY),e.config.legend.position){case"bottom":i.gridHeight=i.svgHeight-t.height-35,i.gridWidth=i.gridHeight,i.translateY=s-20,i.translateX=(i.svgWidth-i.gridWidth)/2;break;case"top":i.gridHeight=i.svgHeight-t.height-35,i.gridWidth=i.gridHeight,i.translateY=t.height+s,i.translateX=(i.svgWidth-i.gridWidth)/2;break;case"left":i.gridWidth=i.svgWidth-t.width-a,i.gridHeight=i.gridWidth,i.translateY=s,i.translateX=t.width+a;break;case"right":i.gridWidth=i.svgWidth-t.width-a,i.gridHeight=i.gridWidth,i.translateY=s,i.translateX=5;break;default:throw new Error("Legend position not supported")}}},{key:"setGridXPosForDualYAxis",value:function(i,a){var s=this.w;s.config.yaxis.map(function(t,e){-1===s.globals.ignoreYAxisIndexes.indexOf(e)&&!s.config.yaxis[e].floating&&s.config.yaxis[e].show&&t.opposite&&(s.globals.translateX=s.globals.translateX-(a[e].width+i[e].width)-parseInt(s.config.yaxis[e].labels.style.fontSize)/1.2-12)})}},{key:"titleSubtitleOffset",value:function(){var t=this.w,e=t.globals,i=this.isSparkline?0:10;void 0!==t.config.title.text?i+=t.config.title.margin:i+=this.isSparkline?0:5,void 0!==t.config.subtitle.text?i+=t.config.subtitle.margin:i+=this.isSparkline?0:5,t.config.legend.show&&"bottom"===t.config.legend.position&&!t.config.legend.floating&&1e.length?t:e},0);return 1.05*(t=new h.default(this.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"getxAxisLabelsCoords",value:function(){var t=this.w,e=t.globals.labels.slice(),i={width:0,height:0};if(0e.length?t:e},0),r=t.globals.xLabelFormatter;n=new c.default(this.ctx).xLabelFormat(r,n);var o=new h.default(this.ctx),l=o.getTextRects(n,t.config.xaxis.labels.style.fontSize);(i={width:l.width,height:l.height}).width*e.length>t.globals.svgWidth-s-this.yAxisWidth&&0!==t.config.xaxis.labels.rotate?this.isBarHorizontal||(t.globals.rotateXLabels=!0,l=o.getTextRects(n,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,"rotate("+t.config.xaxis.labels.rotate+" 0 0)",!1),i.height=l.height/1.66):t.globals.rotateXLabels=!1}return t.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getyAxisLabelsCoords",value:function(){var n=this,r=this.w,o=[],l=10;return r.config.yaxis.map(function(t,e){if(t.show&&t.labels.show&&r.globals.yAxisScale[e].result.length){var i=r.globals.yLabelFormatters[e],a=i(r.globals.yAxisScale[e].niceMax,-1);if(void 0!==a&&0!==a.length||(a=r.globals.yAxisScale[e].niceMax),n.isBarHorizontal)l=0,a=i(a=r.globals.labels.slice().reduce(function(t,e){return t.length>e.length?t:e},0),-1);var s=new h.default(n.ctx).getTextRects(a,t.labels.style.fontSize);o.push({width:s.width+l,height:s.height})}else o.push({width:0,height:0})}),o}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new h.default(this.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getyAxisTitleCoords",value:function(){var a=this,t=this.w,s=[];return t.config.yaxis.map(function(t,e){if(t.show&&void 0!==t.title.text){var i=new h.default(a.ctx).getTextRects(t.title.text,t.title.style.fontSize,t.title.style.fontFamily,"rotate(-90 0 0)",!1);s.push({width:i.width,height:i.height})}else s.push({width:0,height:0})}),s}},{key:"getTitleSubtitleCoords",value:function(t){var e=this.w,i=0,a=0,s="title"===t?e.config.title.floating:e.config.subtitle.floating,n=e.globals.dom.baseEl.querySelector(".apexcharts-"+t+"-text");if(null!==n&&!s){var r=n.getBoundingClientRect();i=r.width,a=e.globals.axisCharts?r.height+5:r.height}return{width:i,height:a}}},{key:"getLegendsRect",value:function(){var t=this.w,e=t.globals.dom.baseEl.querySelector(".apexcharts-legend"),i=Object.assign({},s.default.getBoundingClientRect(e));return i.height=i.height+t.config.legend.containerMargin.top+t.config.legend.containerMargin.bottom,i.width=i.width+t.config.legend.containerMargin.left+t.config.legend.containerMargin.right,null!==e&&!t.config.legend.floating&&t.config.legend.show?this.lgRect=i:this.lgRect={x:0,y:0,height:0,width:0},this.lgRect}}]),e}();t.exports=r},function(t,e,i){"use strict";var a=function(){function a(t,e){for(var i=0;ii.globals.gridWidth)){var s=this.offY+i.config.xaxis.axisTicks.offsetY,n=s+i.config.xaxis.axisTicks.height;if(i.config.xaxis.axisTicks.show){var r=new k.default(this.ctx).drawLine(t+i.config.xaxis.axisTicks.offsetX,s+i.config.xaxis.offsetY,a+i.config.xaxis.axisTicks.offsetX,n+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);e.add(r),r.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(0t.globals.gridWidth&&s[0].parentNode.removeChild(s[0]);for(var p=0;pdocument.F=Object<\/script>"),t.close(),c=t.F;i--;)delete c[h][r[i]];return c()};t.exports=Object.create||function(t,e){var i;return null!==t?(l[h]=s(t),i=new l,l[h]=null,i[o]=t):i=c(),void 0===e?i:n(i,e)}},function(t,e,i){"use strict";var a=i(65),s=i(37).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return a(t,s)}},function(t,e,i){"use strict";e.f=Object.getOwnPropertySymbols},function(t,e,i){"use strict";var r=i(11),o=i(17),l=i(54)(!1),h=i(41)("IE_PROTO");t.exports=function(t,e){var i,a=o(t),s=0,n=[];for(i in a)i!=h&&r(a,i)&&n.push(i);for(;e.length>s;)r(a,i=e[s++])&&(~l(n,i)||n.push(i));return n}},function(t,e,i){"use strict";t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,i){"use strict";var a=i(7),s=i(8),n=i(39);t.exports=function(t,e){if(a(t),s(e)&&e.constructor===t)return e;var i=n.f(t);return(0,i.resolve)(e),i.promise}},function(t,e,i){"use strict";var s=i(7),n=i(18),r=i(2)("species");t.exports=function(t,e){var i,a=s(t).constructor;return void 0===a||null==(i=s(a)[r])?e:n(i)}},function(t,e,i){"use strict";var a,s,n,r=i(15),o=i(98),l=i(55),h=i(36),c=i(3),u=c.process,d=c.setImmediate,f=c.clearImmediate,p=c.MessageChannel,g=c.Dispatch,x=0,v={},b="onreadystatechange",m=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},y=function(t){m.call(t.data)};d&&f||(d=function(t){for(var e=[],i=1;arguments.length>i;)e.push(arguments[i++]);return v[++x]=function(){o("function"==typeof t?t:Function(t),e)},a(x),x},f=function(t){delete v[t]},"process"==i(19)(u)?a=function(t){u.nextTick(r(m,t,1))}:g&&g.now?a=function(t){g.now(r(m,t,1))}:p?(n=(s=new p).port2,s.port1.onmessage=y,a=r(n.postMessage,n,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(a=function(t){c.postMessage(t+"","*")},c.addEventListener("message",y,!1)):a=b in h("script")?function(t){l.appendChild(h("script"))[b]=function(){l.removeChild(this),m.call(t)}}:function(t){setTimeout(r(m,t,1),0)}),t.exports={set:d,clear:f}},function(t,e,i){"use strict";e.f=i(2)},function(t,e,i){"use strict";var a=i(34),s=i(2)("iterator"),n=i(21);t.exports=i(4).getIteratorMethod=function(t){if(null!=t)return t[s]||t["@@iterator"]||n[a(t)]}},function(t,e,i){"use strict";var a=i(34),s={};s[i(2)("toStringTag")]="z",s+""!="[object z]"&&i(16)(Object.prototype,"toString",function(){return"[object "+a(this)+"]"},!0)},function(t,e,i){"use strict";var a=i(110)(!0);i(60)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,i=this._i;return i>=e.length?{value:void 0,done:!0}:(t=a(e,i),this._i+=t.length,{value:t,done:!1})})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function a(t,e){for(var i=0;ithis.fullAngle?e.endAngle=e.endAngle-(a+r):a+rl[c][u]&&l[c][u]<0&&(r=l[c][u])):s.hasNullValues=!0}return{minY:r,maxY:n,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var i=this.w.globals,t=this.w.config;i.maxY=-Number.MAX_VALUE,i.minY=Number.MIN_VALUE;var a=t.yaxis,e=Number.MAX_VALUE;if(i.isMultipleYAxis)for(var s=0;st.dataPoints&&0!==t.dataPoints&&(r=t.dataPoints-1)):r="dataPoints"===e.xaxis.tickAmount?t.series[t.maxValsInArrayIndex].length-1:e.xaxis.tickAmount,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE?t.xAxisScale=this.scales.linearScale(t.minX,t.maxX,r):(t.xAxisScale=this.scales.linearScale(1,r,r),t.noLabelsProvided&&0i&&(e=Math.floor(v.length/i));var s=!1,n=!1;switch(r.tickInterval){case"half_year":e=7,"year"===t.unit&&(s=!0);break;case"months":e=1,"year"===t.unit&&(s=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(s=!0),30===a&&(n=!0);break;case"months_days":e=10,"month"===t.unit&&(s=!0),30===a&&(n=!0);break;case"week_days":e=8,"month"===t.unit&&(s=!0);break;case"days":e=1,"month"===t.unit&&(s=!0);break;case"hours":"day"===t.unit&&(s=!0);break;case"minutes":a%5!=0&&(n=!0)}if("minutes"===r.tickInterval||"hours"===r.tickInterval){if(!n)return!0}else if((a%e==0||s)&&!n)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(t){var e=this.w,i=this.formatDates(t),a=this.removeOverlappingTS(i);e.globals.timelineLabels=a.slice(),new s.default(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){switch(!0){case 1825a.globals.gridWidth&&(n=a.globals.gridWidth-i.xcrosshairsWidth):null!==e&&(n+=a.globals.gridWidth/r/2),n<0&&(n=0),n>a.globals.gridWidth&&(n=a.globals.gridWidth),null!==s&&(s.setAttribute("x",n),s.classList.add("active")),i.blxaxisTooltip){var o=n;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=n+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&(n.default.setAttrs(e.ycrosshairs,{y1:t,y2:t}),n.default.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t}))}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip){i.xaxisTooltip.classList.add("active");var a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s;s=new n.default(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1")),s=e.globals.translateY+a,n=i.yaxisTTEls[t].getBoundingClientRect().height,r=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(r-=26),s-=n/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=r+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("active")}},{key:"moveTooltip",value:function(t,e){var i=2a.globals.gridWidth/2&&(l=l-r.ttWidth-o-15),l>a.globals.gridWidth-r.ttWidth-10&&(l=a.globals.gridWidth-r.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var c=s.getElGrid().getBoundingClientRect();h=s.e.clientY-c.top-r.ttHeight/2}var u=this.positionChecks(r,l,h);l=u.x,h=u.y,isNaN(l)||(l+=a.globals.translateX,n.style.left=l+"px",n.style.top=h+"px")}},{key:"positionChecks",value:function(t,e,i){var a=this.w;return t.ttHeight+i>a.globals.gridHeight&&(i=a.globals.gridHeight-t.ttHeight+a.globals.translateY),i<0&&(i=0),{x:e,y:i}}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(0r.globals.gridWidth||u>r.globals.gridHeight?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var d=Math.round(c/l);n&&(d=Math.ceil(c/l),d-=1);for(var f,p=null,g=null,x=[],v=0;vr;)n.call(t,a=s[r++])&&e.push(a);return e}},function(t,e,i){"use strict";var d=i(15),f=i(59),p=i(57),g=i(7),x=i(24),v=i(71),b={},m={},a=t.exports=function(t,e,i,a,s){var n,r,o,l,h=s?function(){return t}:v(t),c=d(i,a,e?2:1),u=0;if("function"!=typeof h)throw TypeError(t+" is not iterable!");if(p(h)){for(n=x(t.length);u=t.length?(this._t=void 0,s(1)):s(0,"keys"==e?i:"values"==e?t[i]:[i,t[i]])},"values"),n.Arguments=n.Array,a("keys"),a("values"),a("entries")},function(t,e,i){"use strict";var a=i(5),s=i(92);a(a.P+a.F*!i(109)([].reduce,!0),"Array",{reduce:function(t){return s(this,t,arguments.length,arguments[1],!1)}})},function(t,e,i){"use strict";var a,s,n,r,o=i(22),l=i(3),h=i(15),c=i(34),u=i(5),d=i(8),f=i(18),p=i(90),g=i(97),x=i(68),v=i(69).set,b=i(102)(),m=i(39),y=i(66),w=i(112),k=i(67),S="Promise",A=l.TypeError,C=l.process,M=C&&C.versions,P=M&&M.v8||"",L=l[S],E="process"==c(C),T=function(){},z=s=m.f,X=!!function(){try{var t=L.resolve(1),e=(t.constructor={})[i(2)("species")]=function(t){t(T,T)};return(E||"function"==typeof PromiseRejectionEvent)&&t.then(T)instanceof e&&0!==P.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),O=function(t){var e;return!(!d(t)||"function"!=typeof(e=t.then))&&e},Y=function(c,i){if(!c._n){c._n=!0;var a=c._c;b(function(){for(var l=c._v,h=1==c._s,t=0,e=function(t){var e,i,a,s=h?t.ok:t.fail,n=t.resolve,r=t.reject,o=t.domain;try{s?(h||(2==c._h&&D(c),c._h=1),!0===s?e=l:(o&&o.enter(),e=s(l),o&&(o.exit(),a=!0)),e===t.promise?r(A("Promise-chain cycle")):(i=O(e))?i.call(e,n,r):n(e)):r(l)}catch(t){o&&!a&&o.exit(),r(t)}};a.length>t;)e(a[t++]);c._c=[],c._n=!1,i&&!c._h&&I(c)})}},I=function(n){v.call(l,function(){var t,e,i,a=n._v,s=F(n);if(s&&(t=y(function(){E?C.emit("unhandledRejection",a,n):(e=l.onunhandledrejection)?e({promise:n,reason:a}):(i=l.console)&&i.error&&i.error("Unhandled promise rejection",a)}),n._h=E||F(n)?2:1),n._a=void 0,s&&t.e)throw t.v})},F=function(t){return 1!==t._h&&0===(t._a||t._c).length},D=function(e){v.call(l,function(){var t;E?C.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})})},N=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),Y(e,!0))},R=function t(i){var a,s=this;if(!s._d){s._d=!0,s=s._w||s;try{if(s===i)throw A("Promise can't be resolved itself");(a=O(i))?b(function(){var e={_w:s,_d:!1};try{a.call(i,h(t,e,1),h(N,e,1))}catch(t){N.call(e,t)}}):(s._v=i,s._s=1,Y(s,!1))}catch(t){N.call({_w:s,_d:!1},t)}}};X||(L=function(t){p(this,L,S,"_h"),f(t),a.call(this);try{t(h(R,this,1),h(N,this,1))}catch(t){N.call(this,t)}},(a=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=i(107)(L.prototype,{then:function(t,e){var i=z(x(this,L));return i.ok="function"!=typeof t||t,i.fail="function"==typeof e&&e,i.domain=E?C.domain:void 0,this._c.push(i),this._a&&this._a.push(i),this._s&&Y(this,!1),i.promise},catch:function(t){return this.then(void 0,t)}}),n=function(){var t=new a;this.promise=t,this.resolve=h(R,t,1),this.reject=h(N,t,1)},m.f=z=function(t){return t===L||t===r?new n(t):s(t)}),u(u.G+u.W+u.F*!X,{Promise:L}),i(29)(L,S),i(108)(S),r=i(4)[S],u(u.S+u.F*!X,S,{reject:function(t){var e=z(this);return(0,e.reject)(t),e.promise}}),u(u.S+u.F*(o||!X),S,{resolve:function(t){return k(o&&this===r?L:this,t)}}),u(u.S+u.F*!(X&&i(61)(function(t){L.all(t).catch(T)})),S,{all:function(t){var r=this,e=z(r),o=e.resolve,l=e.reject,i=y(function(){var a=[],s=0,n=1;g(t,!1,function(t){var e=s++,i=!1;a.push(void 0),n++,r.resolve(t).then(function(t){i||(i=!0,a[e]=t,--n||o(a))},l)}),--n||o(a)});return i.e&&l(i.v),e.promise},race:function(t){var e=this,i=z(e),a=i.reject,s=y(function(){g(t,!1,function(t){e.resolve(t).then(i.resolve,a)})});return s.e&&a(s.v),i.promise}})},function(t,e,i){"use strict";var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=i(3),r=i(11),n=i(10),o=i(5),l=i(16),h=i(101).KEY,c=i(20),u=i(42),d=i(29),f=i(25),p=i(2),g=i(70),x=i(45),v=i(96),b=i(58),m=i(7),y=i(8),w=i(17),k=i(44),S=i(23),A=i(62),C=i(105),M=i(104),P=i(9),L=i(28),E=M.f,T=P.f,z=C.f,X=s.Symbol,O=s.JSON,Y=O&&O.stringify,I="prototype",F=p("_hidden"),D=p("toPrimitive"),N={}.propertyIsEnumerable,R=u("symbol-registry"),_=u("symbols"),W=u("op-symbols"),H=Object[I],B="function"==typeof X,j=s.QObject,V=!j||!j[I]||!j[I].findChild,G=n&&c(function(){return 7!=A(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a})?function(t,e,i){var a=E(H,e);a&&delete H[e],T(t,e,i),a&&t!==H&&T(H,e,a)}:T,U=function(t){var e=_[t]=A(X[I]);return e._k=t,e},q=B&&"symbol"==a(X.iterator)?function(t){return"symbol"==(void 0===t?"undefined":a(t))}:function(t){return t instanceof X},Z=function(t,e,i){return t===H&&Z(W,e,i),m(t),e=k(e,!0),m(i),r(_,e)?(i.enumerable?(r(t,F)&&t[F][e]&&(t[F][e]=!1),i=A(i,{enumerable:S(0,!1)})):(r(t,F)||T(t,F,S(1,{})),t[F][e]=!0),G(t,e,i)):T(t,e,i)},$=function(t,e){m(t);for(var i,a=v(e=w(e)),s=0,n=a.length;ss;)r(_,e=i[s++])||e==F||e==h||a.push(e);return a},tt=function(t){for(var e,i=t===H,a=z(i?W:w(t)),s=[],n=0;a.length>n;)!r(_,e=a[n++])||i&&!r(H,e)||s.push(_[e]);return s};B||(l((X=function(){if(this instanceof X)throw TypeError("Symbol is not a constructor!");var i=f(0it;)p(et[it++]);for(var at=L(p.store),st=0;at.length>st;)x(at[st++]);o(o.S+o.F*!B,"Symbol",{for:function(t){return r(R,t+="")?R[t]:R[t]=X(t)},keyFor:function(t){if(!q(t))throw TypeError(t+" is not a symbol!");for(var e in R)if(R[e]===t)return e},useSetter:function(){V=!0},useSimple:function(){V=!1}}),o(o.S+o.F*!B,"Object",{create:function(t,e){return void 0===e?A(t):$(A(t),e)},defineProperty:Z,defineProperties:$,getOwnPropertyDescriptor:Q,getOwnPropertyNames:K,getOwnPropertySymbols:tt}),O&&o(o.S+o.F*(!B||c(function(){var t=X();return"[null]"!=Y([t])||"{}"!=Y({a:t})||"{}"!=Y(Object(t))})),"JSON",{stringify:function(t){for(var e,i,a=[t],s=1;arguments.length>s;)a.push(arguments[s++]);if(i=e=a[1],(y(e)||void 0!==t)&&!q(t))return b(e)||(e=function(t,e){if("function"==typeof i&&(e=i.call(this,t,e)),!q(e))return e}),a[1]=e,Y.apply(O,a)}}),X[I][D]||i(12)(X[I],D,X[I].valueOf),d(X,"Symbol"),d(Math,"Math",!0),d(s.JSON,"JSON",!0)},function(t,e,i){"use strict";var a=i(5),s=i(54)(!0);a(a.P,"Array",{includes:function(t){return s(this,t,1=t.from&&w[n][i]<=t.to&&(a=t.color)});var s=k.fill.fillPath(b,{seriesNumber:e,color:a});b=k.renderSeries({realIndex:g,pathFill:s,j:i,i:n,pathFrom:l,pathTo:o,strokeWidth:y,elSeries:b,x:A,y:C,series:w,barHeight:x,barWidth:v,elDataLabelsWrap:m,type:"bar",visibleSeries:0})},i=0;i=u.config.plotOptions.bar.colors.backgroundBarColors.length&&(v=0);var S=u.config.plotOptions.bar.colors.backgroundBarColors[v],A=this.graphics.drawRect(0,d,u.globals.gridWidth,i,0,S,u.config.plotOptions.bar.colors.backgroundBarOpacity);c.add(A),A.node.classList.add("apexcharts-backgroundBar")}return{pathTo:s,pathFrom:n,x:o,y:l+=h}}},{key:"drawColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,n=t.pathTo,r=t.pathFrom,o=t.barWidth,l=t.zeroH,h=t.strokeWidth,c=t.elSeries,u=this.w,d=e.i,f=e.j,p=e.realIndex,g=e.bc;if(u.globals.isXNumeric){var x=u.globals.seriesX[d][f];x||(x=0),i=(x-u.globals.minX)/this.xRatio-o/2}for(var v=i,b=void 0,m=0,y=0;y=u.config.plotOptions.bar.colors.backgroundBarColors.length&&(g=0);var A=u.config.plotOptions.bar.colors.backgroundBarColors[g],C=this.graphics.drawRect(v,0,o,u.globals.gridHeight,0,A,u.config.plotOptions.bar.colors.backgroundBarOpacity);c.add(C),C.node.classList.add("apexcharts-backgroundBar")}return i+=s,{pathTo:n,pathFrom:r,x:u.globals.isXNumeric?i-s:i,y:a}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;ab.c&&(f=!1);var w=Math.min(b.o,b.c),k=Math.max(b.o,b.c);h.globals.isXNumeric&&(i=(h.globals.seriesX[u][d]-h.globals.minX)/this.xRatio-r/2);var S=i+r*this.visibleI;return c.move(S,o),n=c.move(S,o),0=t.from&&a<=t.to&&(n=t.color,r=t.from,o=t.to,l=Math.abs(o)+Math.abs(r),h=100*a/l)});return{color:n,percent:h}}},{key:"calculateHeatmapDataLabels",value:function(t){var e=t.x,i=t.y,a=t.i,s=t.j,n=(t.series,t.rectHeight),r=t.rectWidth,o=this.w,l=o.config.dataLabels,h=new A.default(this.ctx),c=new b.default(this.ctx),u=l.formatter,d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});var f=l.offsetX,p=l.offsetY,g=e+r/2+f,x=i+n/2+parseInt(l.style.fontSize)/3+p,v=u(o.globals.series[a][s],{seriesIndex:a,dataPointIndex:s,globals:o.globals});c.plotDataLabelsText(g,x,v,a,s,d,l)}return d}},{key:"animateHeatMap",value:function(t,e,i,a,s,n){new r.default(this.ctx).animateRect(t,{x:e+a/2,y:i+s/2,width:0,height:0},{x:e,y:i,width:a,height:s},n)}},{key:"animateHeatColor",value:function(t,e,i,a){t.attr({fill:e}).animate(a).attr({fill:i})}}]),i}();t.exports=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var st=Object.assign||function(t){for(var e=1;ea.globals.gridHeight&&(k=a.globals.gridHeight),g=v/2;var S=a.globals.padHorizontal+g,A=1;a.globals.isXNumeric&&(S=(a.globals.seriesX[b][0]-a.globals.minX)/u),y.push(S);var C=void 0,M=void 0,P=void 0,L=void 0,E=[],T=[],z=s.group({class:"apexcharts-series "+a.globals.seriesNames[b].toString().replace(/ /g,"-")}),X=s.group({class:"apexcharts-series-markers-wrap"}),O=s.group({class:"apexcharts-datalabels"});this.ctx.series.addCollapsedClassToSeries(z,b);var Y=t[x].length===a.globals.dataPoints;z.attr({"data:longestSeries":Y,rel:x+1,"data:realIndex":b}),this.appendPathFrom=!0;var I=S,F=void 0,D=I,N=w,R=0;if(N=this.determineFirstPrevY({i:x,series:t,yRatio:h[this.yaxisIndex],zeroY:w,prevY:N,prevSeriesY:p,lineYPosition:R}).prevY,m.push(N),F=N,null===t[x][0]){for(var _=0;_i.globals.svgWidth&&(u+=1,this.existingWidth=0,y=this.existingWidth+h+o),"bottom"===i.config.legend.position&&(m=i.globals.svgHeight-this.rowHeight),m+=this.rowHeight*u}else{var M=a.getTextRects(k,n),P=M.height;this.rowHeight=P+l,this.textMaxWidthArr.push(M.width);var L=this.getTextMaxWidth()+o;u=v+1,this.existingHeight+P+h>i.globals.svgHeight&&(d+=1,this.existingHeight=0),y=h+d*L,m=this.existingHeight+P}var E={pSize:s,pRadius:i.config.legend.markers.radius,pWidth:i.config.legend.markers.strokeWidth,shape:i.config.legend.markers.shape,pointStrokeColor:i.config.legend.markers.strokeColor,pointFillColor:p[v],pointStrokeOpacity:1,pointFillOpacity:1,class:"apexcharts-legend-point"},T=s/2-1+i.config.legend.markers.strokeWidth,z=a.drawMarker(y-h+i.config.legend.markers.offsetX-4,m-h+T+i.config.legend.markers.offsetY-1,E).attr({rel:v+1,"data:collapsed":S});S&&z.node.classList.add("inactive-legend");var X={x:y,y:m,foreColor:i.config.legend.labels.useSeriesColors?i.globals.colors[v]:i.config.legend.labels.color,text:k,textAnchor:i.config.legend.textAnchor,fontSize:n,fontFamily:r,cssClass:"apexcharts-legend-text"};this.existingWidth=this.existingWidth+w+o+h+5,this.existingHeight=this.existingHeight+this.rowHeight+h/4,c=c+w+h+o;var O=a.drawText(X);i.globals.dom.elLegendWrap.add(O),i.globals.dom.elLegendWrap.add(z),O.node.classList.add("apexcharts-legend-series"),O.attr({rel:v+1,"data:collapsed":S}),S&&O.node.classList.add("inactive-legend"),i.config.legend.onItemClick.toggleDataSeries||O.node.classList.add("no-click")}"heatmap"!==i.config.chart.type&&i.config.legend.onItemClick.toggleDataSeries&&i.globals.dom.elWrap.addEventListener("click",this.onLegendClick,!0),i.config.legend.onItemHover.highlightDataSeries&&(i.globals.dom.elWrap.addEventListener("mousemove",this.onLegendHovered,!0),i.globals.dom.elWrap.addEventListener("mouseout",this.onLegendHovered,!0))}},{key:"getTextMaxWidth",value:function(){for(var t=0,e=0;et.globals.svgHeight&&(n-=(t.globals.svgHeight-i.y+i.height)/8),"top"===t.config.legend.position){var r=new h.default(this.ctx),o=r.getTitleSubtitleCoords("title").height,l=r.getTitleSubtitleCoords("subtitle").height;n=n+(0a.globals.gridWidth||s.clientX-n.left<0)&&(s.hideSelectionRect(this.zoomRect),s.dragged=!1,s.w.globals.mousedown=!1),r>s.clientX-n.left&&(c=-(l=Math.abs(l))),o>s.clientY-n.top&&(u=-(h=Math.abs(h))),d="x"===i?{x:r,y:0,width:l,height:a.globals.gridHeight,translateX:c,translateY:0}:"y"===i?{x:0,y:o,width:a.globals.gridWidth,height:h,translateX:0,translateY:u}:{x:r,y:o,width:l,height:h,translateX:c,translateY:u},s.drawSelectionRect(d),d}},{key:"selectionDragging",value:function(t,e){var r=this,o=this.w,l=this.xyRatios,h=this.selectionRect,i=0;"resizing"===t&&(i=30),"function"==typeof o.config.chart.events.selection&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var t=r.gridRect.getBoundingClientRect(),e=h.node.getBoundingClientRect(),i=o.globals.xAxisScale.niceMin+(e.left-t.left)*l.xRatio,a=o.globals.xAxisScale.niceMin+(e.right-t.left)*l.xRatio,s=o.globals.yAxisScale[0].niceMin+(t.bottom-e.bottom)*l.yRatio[0],n=o.globals.yAxisScale[0].niceMax-(e.top-t.top)*l.yRatio[0];o.config.chart.events.selection(r.ctx,{xaxis:{min:i,max:a},yaxis:{min:s,max:n}})},i))}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,n=this.xyRatios,r=this.ctx.toolbar;if(s.startX>s.endX){var o=s.startX;s.startX=s.endX,s.endX=o}if(s.startY>s.endY){var l=s.startY;s.startY=s.endY,s.endY=l}var h=a.globals.xAxisScale.niceMin+s.startX*n.xRatio,c=a.globals.xAxisScale.niceMin+s.endX*n.xRatio,u=[],d=[];if(a.config.yaxis.forEach(function(t,e){u.push(Math.floor(a.globals.yAxisScale[e].niceMax-n.yRatio[e]*s.startY)),d.push(Math.floor(a.globals.yAxisScale[e].niceMax-n.yRatio[e]*s.endY))}),s.dragged&&(10Math.abs(r)&&0Math.abs(r)&&n<0?s="right":Math.abs(r)>Math.abs(n)&&0Math.abs(n)&&r<0&&(s="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var o=i.globals.minX,l=i.globals.maxX;this.panScrolled(s,o,l)}},{key:"panScrolled",value:function(t,e,i){var a=this.w,s=this.xyRatios;"left"===t?(e=a.globals.minX+a.globals.gridWidth/15*s.xRatio,i=a.globals.maxX+a.globals.gridWidth/15*s.xRatio):"right"===t&&(e=a.globals.minX-a.globals.gridWidth/15*s.xRatio,i=a.globals.maxX-a.globals.gridWidth/15*s.xRatio),(ea.globals.initialmaxX)&&(e=a.globals.minX,i=a.globals.maxX),this.ctx._updateOptions({xaxis:{min:e,max:i}},!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),i}();t.exports=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function a(t,e){for(var i=0;i=a.config.grid.row.colors.length&&(h=0);var c=a.config.grid.row.colors[h],u=s.drawRect(0,n,o,r,0,c,a.config.grid.row.opacity);t.add(u),u.node.classList.add("apexcharts-gridRow"),n+=a.globals.gridHeight/i}if(void 0!==a.config.grid.column.colors&&0=a.config.grid.column.colors.length&&(x=0);var v=a.config.grid.column.colors[x],b=s.drawRect(d,0,f,p,0,v,a.config.grid.column.opacity);b.node.classList.add("apexcharts-gridColumn"),t.add(b),d+=a.globals.gridWidth/e}}},{key:"animateLine",value:function(t,e,i){var a=this.w,s=a.config.chart.animations;if(s&&!a.globals.resized&&!a.globals.dataChanged){var n=s.speed;this.anim.animateLine(t,e,i,n)}}}]),i}();e.default=o},function(t,e,i){"use strict";var a,s=function(){function a(t,e){for(var i=0;i
Open: '+a.globals.seriesCandleO[e][i]+'
High: '+a.globals.seriesCandleH[e][i]+'
Low: '+a.globals.seriesCandleL[e][i]+'
Close: '+a.globals.seriesCandleC[e][i]+"
"}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"area",value:function(){return{stroke:{width:4},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:"brush",value:function(t){return r.default.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(){var i=this;this.opts.dataLabels=this.opts.dataLabels||{},this.opts.dataLabels.formatter=this.opts.dataLabels.formatter||void 0;var t=this.opts.dataLabels.formatter;this.opts.yaxis.forEach(function(t,e){i.opts.yaxis[e].min=0,i.opts.yaxis[e].max=100}),!("bar"!==this.opts.chart.type)&&(this.opts.dataLabels.formatter=t||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t})}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:2,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{zoom:{enabled:!1},toolbar:{show:!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:"pie",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"dark",shadeIntensity:.35,inverseColors:!1,stops:[0,100,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"vertical",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{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},tooltip:{enabled:!1,fillSeriesColor:!0}}}}]),e}();t.exports=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a,s=function(){function a(t,e){for(var i=0;ir.globals.gridWidth/2&&(a=h-n.tooltipRect.ttWidth/2+u),n.w.config.tooltip.followCursor){var f=n.getElGrid().getBoundingClientRect();s=n.e.clientY-f.top+r.globals.translateY/2-10}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,s=t.y,n=this.w,r=this.ttCtx,o=void 0,l=void 0;if(e.target.classList.contains("apexcharts-marker")){var h=parseInt(i.paths.getAttribute("cx")),c=parseInt(i.paths.getAttribute("cy")),u=parseFloat(i.paths.getAttribute("val"));if(l=parseInt(i.paths.getAttribute("rel")),o=parseInt(i.paths.parentNode.parentNode.parentNode.getAttribute("rel"))-1,r.intersect){var d=p.default.findAncestor(i.paths,"apexcharts-series");d&&(o=parseInt(d.getAttribute("data:realIndex")))}if(r.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:o,j:l,shared:!r.intersect&&n.config.tooltip.shared}),r.marker.enlargeCurrentPoint(l,i.paths),a=h,s=c-1.4*r.tooltipRect.ttHeight,r.w.config.tooltip.followCursor){var f=r.getElGrid().getBoundingClientRect();s=r.e.clientY-f.top}u<0&&(s=c)}return{x:a,y:s}}},{key:"handleBarTooltip",value:function(t){var e=t.e,i=t.opt,a=this.w,s=this.ttCtx,n=s.getElTooltip(),r=0,o=0,l=0,h=0,c=void 0;if(s.isBarHorizontal&&s.hasBars()||!a.config.tooltip.shared){var u=this.getBarTooltipXY({e:e,opt:i});o=u.x,l=u.y,h=u.i,c=Array.isArray(a.config.stroke.width)?a.config.stroke.width[h]:a.config.stroke.width,r=o}else a.globals.comboCharts||a.config.tooltip.shared||(r/=2);if(isNaN(l)&&(l=a.globals.svgHeight-s.tooltipRect.ttHeight),o+s.tooltipRect.ttWidth>a.globals.gridWidth?o-=s.tooltipRect.ttWidth:o<0&&(o+=s.tooltipRect.ttWidth),s.w.config.tooltip.followCursor){var d=s.getElGrid().getBoundingClientRect();l=s.e.clientY-d.top}null===s.tooltip&&(s.tooltip=a.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),a.config.tooltip.shared||(a.globals.comboChartsHasBars?s.tooltipPosition.moveXCrosshairs(r+c/2):s.tooltipPosition.moveXCrosshairs(r)),!s.fixedTooltip&&(!a.config.tooltip.shared||s.isBarHorizontal&&s.hasBars())&&(n.style.left=o+a.globals.translateX+"px",s.tooltipRect.ttHeight+l>a.globals.gridHeight?(l=a.globals.gridHeight-s.tooltipRect.ttHeight+a.globals.translateY,n.style.top=l+"px"):n.style.top=l+a.globals.translateY-s.tooltipRect.ttHeight/2+"px")}},{key:"getBarTooltipXY",value:function(t){var e=t.e,i=t.opt,a=this.w,s=null,n=this.ttCtx,r=0,o=0,l=0,h=0,c=e.target.classList;if(c.contains("apexcharts-bar-area")||c.contains("apexcharts-candlestick-area")){var u=e.target,d=u.getBoundingClientRect(),f=i.elGrid.getBoundingClientRect(),p=d.height,g=d.width,x=parseInt(u.getAttribute("cx")),v=parseInt(u.getAttribute("cy"));h=parseFloat(u.getAttribute("barWidth"));var b="touchmove"===e.type?e.touches[0].clientX:e.clientX;s=parseInt(u.getAttribute("j")),r=parseInt(u.parentNode.getAttribute("rel"))-1,a.globals.comboCharts&&(r=parseInt(u.parentNode.getAttribute("data:realIndex"))),n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:r,j:s,shared:!n.showOnIntersect&&a.config.tooltip.shared}),l=a.config.tooltip.followCursor?a.config.plotOptions.bar.horizontal?(o=b-f.left+15,v-n.dataPointsDividedHeight+p/2-n.tooltipRect.ttHeight/2):(o=a.globals.isXNumeric?x-g/2:x-n.dataPointsDividedWidth+g/2,e.clientY-f.top-n.tooltipRect.ttHeight/2-15):a.config.plotOptions.bar.horizontal?((o=x)a.globals.gridWidth)return void o.handleMouseOut(i);if(null!==p){if(null===a.globals.series[p][s])return void i.tooltipEl.classList.remove("active");void 0!==a.globals.series[p][s]?a.config.tooltip.shared&&this.tooltipUtil.isXoverlap(s)&&this.tooltipUtil.isinitialSeriesSameLen()?this.create(o,p,s,i.ttItems):this.create(o,p,s,i.ttItems,!1):this.tooltipUtil.isXoverlap(s)&&o.create(o,0,s,i.ttItems)}else this.tooltipUtil.isXoverlap(s)&&o.create(o,0,s,i.ttItems)}else if("heatmap"===a.config.chart.type){var g=this.intersect.handleHeatTooltip({e:e,opt:i,x:n,y:r});n=g.x,r=g.y,h.style.left=n+"px",h.style.top=r+"px"}else this.hasBars&&this.intersect.handleBarTooltip({e:e,opt:i}),this.hasMarkers&&this.intersect.handleMarkerTooltip({e:e,opt:i,x:n,y:r});if(this.blyaxisTooltip)for(var x=0;xs.globals.gridWidth&&(d=c-u.left-a.ttWidth+o),f<0&&(f=a.ttHeight+20),r.style.left=d+s.globals.translateX+"px",r.style.top=f+"px"}else"mouseout"!==e.type&&"touchend"!==e.type||r.classList.remove("active")}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new d.default(this.ctx),i=t.globals.dom.Paper.select(".apexcharts-bar-area"),a=0;an.maxX-e.width&&(a=n.maxX-e.width),null!=n.minY&&sn.maxY-e.height&&(s=n.maxY-e.height),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:r,y:o},!0):this.el.move(a,s));return i},a.prototype.end=function(t){var e=this.drag(t);this.el.fire("dragend",{event:t,p:e,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(t,e){"function"!=typeof t&&"object"!=(void 0===t?"undefined":c(t))||(e=t,t=!0);var i=this.remember("_draggable")||new a(this);return(t=void 0===t||t)?i.init(e||{},t):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}).call(void 0)},function(t,e,i){"use strict";(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(t,e){return this.add(t,e),!t.attr("in")&&this.autoSetIn&&t.attr("in",this.source),t.attr("result")||t.attr("result",t),t},blend:function(t,e,i){return this.put(new SVG.BlendEffect(t,e,i))},colorMatrix:function(t,e){return this.put(new SVG.ColorMatrixEffect(t,e))},convolveMatrix:function(t){return this.put(new SVG.ConvolveMatrixEffect(t))},componentTransfer:function(t){return this.put(new SVG.ComponentTransferEffect(t))},composite:function(t,e,i){return this.put(new SVG.CompositeEffect(t,e,i))},flood:function(t,e){return this.put(new SVG.FloodEffect(t,e))},offset:function(t,e){return this.put(new SVG.OffsetEffect(t,e))},image:function(t){return this.put(new SVG.ImageEffect(t))},merge:function(){var t=[void 0];for(var e in arguments)t.push(arguments[e]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,t)))},gaussianBlur:function(t,e){return this.put(new SVG.GaussianBlurEffect(t,e))},morphology:function(t,e){return this.put(new SVG.MorphologyEffect(t,e))},diffuseLighting:function(t,e,i){return this.put(new SVG.DiffuseLightingEffect(t,e,i))},displacementMap:function(t,e,i,a,s){return this.put(new SVG.DisplacementMapEffect(t,e,i,a,s))},specularLighting:function(t,e,i,a){return this.put(new SVG.SpecularLightingEffect(t,e,i,a))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(t,e,i,a,s){return this.put(new SVG.TurbulenceEffect(t,e,i,a,s))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(t){var e=this.put(new SVG.Filter);return"function"==typeof t&&t.call(e,e),e}}),SVG.extend(SVG.Container,{filter:function(t){return this.defs().filter(t)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(t){return this.filterer=t instanceof SVG.Element?t:this.doc().filter(t),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(t){return this.filterer&&!0===t&&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(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",t)},result:function(t){return null==t?this.attr("result"):this.attr("result",t)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",t)},result:function(t){return null==t?this.attr("result"):this.attr("result",t)},toString:function(){return this.result()}}});var t={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},diffuseLighting:function(t,e,i){return this.parent()&&this.parent().diffuseLighting(t,e,i).in(this)},displacementMap:function(t,e,i,a){return this.parent()&&this.parent().displacementMap(this,t,e,i,a)},specularLighting:function(t,e,i,a){return this.parent()&&this.parent().specularLighting(t,e,i,a).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,a,s){return this.parent()&&this.parent().turbulence(t,e,i,a,s).in(this)}};SVG.extend(SVG.Effect,t),SVG.extend(SVG.ParentEffect,t),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(t){this.attr("in",t)}}});var e={blend:function(t,e,i){this.attr({in:t,in2:e,mode:i||"normal"})},colorMatrix:function(t,e){"matrix"==t&&(e=s(e)),this.attr({type:t,values:void 0===e?null:e})},convolveMatrix:function(t){t=s(t),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},composite:function(t,e,i){this.attr({in:t,in2:e,operator:i})},flood:function(t,e){this.attr("flood-color",t),null!=e&&this.attr("flood-opacity",e)},offset:function(t,e){this.attr({dx:t,dy:e})},image:function(t){this.attr("href",t,SVG.xlink)},displacementMap:function(t,e,i,a,s){this.attr({in:t,in2:e,scale:i,xChannelSelector:a,yChannelSelector:s})},gaussianBlur:function(t,e){null!=t||null!=e?this.attr("stdDeviation",function(t){if(!Array.isArray(t))return t;for(var e=0,i=t.length,a=[];er.maxX&&(t=r.maxX-s),void 0!==r.minY&&n+er.maxY&&(e=r.maxY-n),[t,e]},e.prototype.checkAspectRatio=function(t){if(!this.options.saveAspectRatio)return t;var e=t.slice(),i=this.parameters.box.width/this.parameters.box.height,a=this.parameters.box.width+t[0],s=this.parameters.box.height-t[1],n=a/s;return nthis.destination.length;)this.destination.push(i);for(;this.value.lengthi.x&&e>i.y&&t/,"").replace(/<\/svg>$/,"");e.innerHTML=""+t.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2>")+"";for(var i=0,a=e.firstChild.childNodes.length;i":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)}},u.morph=function(i){return function(t,e){return new u.MorphObj(t,e).at(i)}},u.Situation=u.invent({create:function(t){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new u.Number(t.duration).valueOf(),this.delay=new u.Number(t.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=t.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),u.FX=u.invent({create:function(t){this._target=t,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(t,e,i){"object"===(void 0===t?"undefined":w(t))&&(e=t.ease,i=t.delay,t=t.duration);var a=new u.Situation({duration:t||1e3,delay:i||0,ease:u.easing[e||"-"]||e});return this.queue(a),this},delay:function(t){var e=new u.Situation({duration:t,delay:0,ease:u.easing["-"]});return this.queue(e)},target:function(t){return t&&t instanceof u.Element?(this._target=t,this):this._target},timeToAbsPos:function(t){return(t-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(t){return this.situation.duration/this._speed*t+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=r.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){r.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(t){return("function"==typeof t||t instanceof u.Situation)&&this.situations.push(t),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof u.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var t,e,i,a=this.situation;if(a.init)return this;for(t in a.animations)for(i=this.target()[t](),Array.isArray(i)||(i=[i]),Array.isArray(a.animations[t])||(a.animations[t]=[a.animations[t]]),e=i.length;e--;)a.animations[t][e]instanceof u.Number&&(i[e]=new u.Number(i[e])),a.animations[t][e]=i[e].morph(a.animations[t][e]);for(t in a.attrs)a.attrs[t]=new u.MorphObj(this.target().attr(t),a.attrs[t]);for(t in a.styles)a.styles[t]=new u.MorphObj(this.target().style(t),a.styles[t]);return a.initialTransformation=this.target().matrixify(),a.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(t,e){var i=this.active;return this.active=!1,e&&this.clearQueue(),t&&this.situation&&(!i&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},reset:function(){if(this.situation){var t=this.situation;this.stop(),this.situation=t,this.atStart()}return this},finish:function(){for(this.stop(!0,!1);this.dequeue().situation&&this.stop(!0,!1););return this.clearQueue().clearCurrent(),this},atStart:function(){return this.at(0,!0)},atEnd:function(){return!0===this.situation.loops&&(this.situation.loops=this.situation.loop+1),"number"==typeof this.situation.loops?this.at(this.situation.loops,!0):this.at(1,!0)},at:function(t,e){var i=this.situation.duration/this._speed;return this.absPos=t,e||(this.situation.reversed&&(this.absPos=1-this.absPos),this.absPos+=this.situation.loop),this.situation.start=+new Date-this.absPos*i,this.situation.finish=this.situation.start+i,this.step(!0)},speed:function(t){return 0===t?this.pause():t?(this._speed=t,this.at(this.absPos,!0)):this._speed},loop:function(t,e){var i=this.last();return i.loops=null==t||t,i.loop=0,e&&(i.reversing=!0),this},pause:function(){return this.paused=!0,this.stopAnimFrame(),this},play:function(){return this.paused?(this.paused=!1,this.at(this.absPos,!0)):this},reverse:function(t){var e=this.last();return e.reversed=void 0===t?!e.reversed:t,this},progress:function(t){return t?this.situation.ease(this.pos):this.pos},after:function(i){var a=this.last();return this.target().on("finished.fx",function t(e){e.detail.situation==a&&(i.call(this,a),this.off("finished.fx",t))}),this._callStart()},during:function(e){var i=this.last(),t=function(t){t.detail.situation==i&&e.call(this,t.detail.pos,u.morph(t.detail.pos),t.detail.eased,i)};return this.target().off("during.fx",t).on("during.fx",t),this.after(function(){this.off("during.fx",t)}),this._callStart()},afterAll:function(i){var t=function t(e){i.call(this),this.off("allfinished.fx",t)};return this.target().off("allfinished.fx",t).on("allfinished.fx",t),this._callStart()},duringAll:function(e){var t=function(t){e.call(this,t.detail.pos,u.morph(t.detail.pos),t.detail.eased,t.detail.situation)};return this.target().off("during.fx",t).on("during.fx",t),this.afterAll(function(){this.off("during.fx",t)}),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(t,e,i){return this.last()[i||"animations"][t]=e,this._callStart()},step:function(t){var e,i,a;(t||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops)?(e=Math.max(this.absPos,0),i=Math.floor(e),!0===this.situation.loops||ithis.lastPos&&n<=s&&(this.situation.once[n].call(this.target(),this.pos,s),delete this.situation.once[n]);return this.active&&this.target().fire("during",{pos:this.pos,eased:s,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=s),this},eachAt:function(){var t,e,i,a=this,s=this.target(),n=this.situation;for(t in n.animations)i=[].concat(n.animations[t]).map(function(t){return"string"!=typeof t&&t.at?t.at(n.ease(a.pos),a.pos):t}),s[t].apply(s,i);for(t in n.attrs)i=[t].concat(n.attrs[t]).map(function(t){return"string"!=typeof t&&t.at?t.at(n.ease(a.pos),a.pos):t}),s.attr.apply(s,i);for(t in n.styles)i=[t].concat(n.styles[t]).map(function(t){return"string"!=typeof t&&t.at?t.at(n.ease(a.pos),a.pos):t}),s.style.apply(s,i);if(n.transforms.length){for(i=n.initialTransformation,t=0,e=n.transforms.length;ta/s?this.height/s:this.width/a,this.x=e,this.y=i,this.width=a,this.height=s)}else t="string"==typeof t?t.match(c).map(function(t){return parseFloat(t)}):Array.isArray(t)?t:"object"===(void 0===t?"undefined":w(t))?[t.x,t.y,t.width,t.height]:4==arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3]},extend:{toString:function(){return this.x+" "+this.y+" "+this.width+" "+this.height},morph:function(t,e,i,a){return this.destination=new u.ViewBox(t,e,i,a),this},at:function(t){return this.destination?new u.ViewBox([this.x+(this.destination.x-this.x)*t,this.y+(this.destination.y-this.y)*t,this.width+(this.destination.width-this.width)*t,this.height+(this.destination.height-this.height)*t]):this}},parent:u.Container,construct:{viewbox:function(t,e,i,a){return 0==arguments.length?new u.ViewBox(this):this.attr("viewBox",new u.ViewBox(t,e,i,a))}}}),["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","touchstart","touchmove","touchleave","touchend","touchcancel"].forEach(function(e){u.Element.prototype[e]=function(t){return u.on(this.node,e,t),this}}),u.listeners=[],u.handlerMap=[],u.listenerId=0,u.on=function(t,e,i,a,s){var n=i.bind(a||t.instance||t),r=(u.handlerMap.indexOf(t)+1||u.handlerMap.push(t))-1,o=e.split(".")[0],l=e.split(".")[1]||"*";u.listeners[r]=u.listeners[r]||{},u.listeners[r][o]=u.listeners[r][o]||{},u.listeners[r][o][l]=u.listeners[r][o][l]||{},i._svgjsListenerId||(i._svgjsListenerId=++u.listenerId),u.listeners[r][o][l][i._svgjsListenerId]=n,t.addEventListener(o,n,s||!1)},u.off=function(t,e,i){var a=u.handlerMap.indexOf(t),s=e&&e.split(".")[0],n=e&&e.split(".")[1],r="";if(-1!=a)if(i){if("function"==typeof i&&(i=i._svgjsListenerId),!i)return;u.listeners[a][s]&&u.listeners[a][s][n||"*"]&&(t.removeEventListener(s,u.listeners[a][s][n||"*"][i],!1),delete u.listeners[a][s][n||"*"][i])}else if(n&&s){if(u.listeners[a][s]&&u.listeners[a][s][n]){for(i in u.listeners[a][s][n])u.off(t,[s,n].join("."),i);delete u.listeners[a][s][n]}}else if(n)for(e in u.listeners[a])for(r in u.listeners[a][e])n===r&&u.off(t,[e,n].join("."));else if(s){if(u.listeners[a][s]){for(r in u.listeners[a][s])u.off(t,[s,r].join("."));delete u.listeners[a][s]}}else{for(e in u.listeners[a])u.off(t,e);delete u.listeners[a],delete u.handlerMap[a]}},u.extend(u.Element,{on:function(t,e,i,a){return u.on(this.node,t,e,i,a),this},off:function(t,e){return u.off(this.node,t,e),this},fire:function(t,e){return t instanceof r.Event?this.node.dispatchEvent(t):this.node.dispatchEvent(t=new u.CustomEvent(t,{detail:e,cancelable:!0})),this._event=t,this},event:function(){return this._event}}),u.Defs=u.invent({create:"defs",inherit:u.Container}),u.G=u.invent({create:"g",inherit:u.Container,extend:{x:function(t){return null==t?this.transform("x"):this.transform({x:t-this.x()},!0)},y:function(t){return null==t?this.transform("y"):this.transform({y:t-this.y()},!0)},cx:function(t){return null==t?this.gbox().cx:this.x(t-this.gbox().width/2)},cy:function(t){return null==t?this.gbox().cy:this.y(t-this.gbox().height/2)},gbox:function(){var t=this.bbox(),e=this.transform();return t.x+=e.x,t.x2+=e.x,t.cx+=e.x,t.y+=e.y,t.y2+=e.y,t.cy+=e.y,t}},construct:{group:function(){return this.put(new u.G)}}}),u.Doc=u.invent({create:function(t){t&&("svg"==(t="string"==typeof t?s.getElementById(t):t).nodeName?this.constructor.call(this,t):(this.constructor.call(this,u.create("svg")),t.appendChild(this.node),this.size("100%","100%")),this.namespace().defs())},inherit:u.Container,extend:{namespace:function(){return this.attr({xmlns:u.ns,version:"1.1"}).attr("xmlns:xlink",u.xlink,u.xmlns).attr("xmlns:svgjs",u.svgjs,u.xmlns)},defs:function(){var t;this._defs||((t=this.node.getElementsByTagName("defs")[0])?this._defs=u.adopt(t):this._defs=new u.Defs,this.node.appendChild(this._defs.node));return this._defs},parent:function(){return this.node.parentNode&&"#document"!=this.node.parentNode.nodeName?this.node.parentNode:null},spof:function(){var t=this.node.getScreenCTM();return t&&this.style("left",-t.e%1+"px").style("top",-t.f%1+"px"),this},remove:function(){return this.parent()&&this.parent().removeChild(this.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,u.parser.draw&&!u.parser.draw.parentNode&&this.node.appendChild(u.parser.draw),this},clone:function(t){this.writeDataToDom();var e=this.node,i=x(e.cloneNode(!0));return t?(t.node||t).appendChild(i.node):e.parentNode.insertBefore(i.node,e.nextSibling),i}}}),u.extend(u.Element,{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},previous:function(){return this.siblings()[this.position()-1]},forward:function(){var t=this.position()+1,e=this.parent();return e.removeElement(this).add(this,t),e instanceof u.Doc&&e.node.appendChild(e.defs().node),this},backward:function(){var t=this.position();return 0