diff --git a/R/apexcharter.R b/R/apexcharter.R index bf445fb..2af498e 100644 --- a/R/apexcharter.R +++ b/R/apexcharter.R @@ -47,7 +47,7 @@ apexcharter <- function(ax_opts = list(), data = NULL, width = NULL, height = NU viewer.defaultWidth = "100%", knitr.figure = FALSE, browser.fill = TRUE, - viewer.suppress = TRUE, + viewer.suppress = FALSE, browser.external = TRUE, padding = 20 ) diff --git a/inst/htmlwidgets/apexcharter.yaml b/inst/htmlwidgets/apexcharter.yaml index 5d7d7a5..ea85fa2 100644 --- a/inst/htmlwidgets/apexcharter.yaml +++ b/inst/htmlwidgets/apexcharter.yaml @@ -1,5 +1,5 @@ dependencies: - name: apexcharts - version: 1.2.4 - src: htmlwidgets/lib/apexcharts-1.2.4 + version: 1.3.8 + src: htmlwidgets/lib/apexcharts-1.3 script: apexcharts.min.js diff --git a/inst/htmlwidgets/lib/apexcharts-1.2.4/apexcharts.min.js b/inst/htmlwidgets/lib/apexcharts-1.2.4/apexcharts.min.js deleted file mode 100644 index 2df8336..0000000 --- a/inst/htmlwidgets/lib/apexcharts-1.2.4/apexcharts.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!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(t){function e(a){if(i[a])return i[a].exports;var s=i[a]={i:a,l:!1,exports:{}};return t[a].call(s.exports,s,s.exports,e),s.l=!0,s.exports}var i={};return e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,a){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:a})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=138)}([function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i4&&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;return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=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,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w,d=c.globals.dom.Paper.rect();return d.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,fill:r,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),d}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w,a=i.globals.dom.Paper.circle(2*t);return null!==e&&a.attr(e),a}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,s=void 0===a?"#a8a8a8":a,r=t.strokeWidth,n=t.fill,o=t.fillOpacity,l=void 0===o?1:o,h=t.strokeOpacity,c=void 0===h?1:h,d=t.classes,u=t.strokeLinecap,f=void 0===u?null:u,p=t.strokeDashArray,g=void 0===p?0:p,x=this.w;return null===f&&(f=x.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 "+x.globals.gridHeight),x.globals.dom.Paper.path(i).attr({fill:n,"fill-opacity":l,stroke:s,"stroke-opacity":c,"stroke-linecap":f,"stroke-width":r,"stroke-dasharray":g,class:d})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=e.globals.dom.Paper.group();return null!==t&&i.attr(t),i}},{key:"move",value:function(t,e){return["M",t,e].join(" ")}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return a=null===i?["L",t,e].join(" "):[i,t].join(" "),a}},{key:"curve",value:function(t,e,i,a,s,r){return["C",t,e,i,a,s,r].join(" ")}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,s,r,n){var o=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l="A";return o&&(l="a"),[l,t,e,i,a,s,r,n].join(" ")}},{key:"renderPaths",value:function(t){var e=t.i,i=t.realIndex,a=t.pathFrom,s=t.pathTo,r=t.stroke,n=t.strokeWidth,o=t.fill,l=t.animationDelay,c=t.initialSpeed,u=t.dataChangeSpeed,f=(t.hideStrokesInChange,t.className),p=t.id,g=this.w,x=new h.default(this.ctx),b=new d.default(this.ctx),v=this.w.config.chart.animations.enabled,m=v&&this.w.config.chart.animations.dynamicAnimation.enabled,y=void 0;y=!(v&&!g.globals.resized||m&&g.globals.dataChanged)?s:a;var w=g.config.stroke.dashArray,k=0;k=Array.isArray(w)?w[i]:g.config.stroke.dashArray;var A=this.drawPath({d:y,stroke:r,strokeWidth:n,fill:o,fillOpacity:1,classes:f,strokeLinecap:"butt",strokeDashArray:k});if(A.attr("id",p+"-"+e),A.attr("index",i),"none"!==g.config.states.normal.filter.type)x.getDefaultFilter(A,g.config.states.normal.filter.type,g.config.states.normal.filter.value);else if(g.config.chart.dropShadow.enabled&&(!g.config.chart.dropShadow.enabledSeries||g.config.chart.dropShadow.enabledSeries&&-1!==g.config.chart.dropShadow.enabledSeries.indexOf(i))){var S=g.config.chart.dropShadow;x.dropShadow(A,S)}return A.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,A)),A.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,A)),A.node.addEventListener("mousedown",this.pathMouseDown.bind(this,A)),A.node.addEventListener("touchstart",this.pathMouseDown.bind(this,A)),A.attr({pathTo:s,pathFrom:a}),!v||g.globals.resized||g.globals.dataChanged||b.animatePathsGradually({el:A,pathFrom:a,pathTo:s,speed:c,delay:l,strokeWidth:n}),m&&g.globals.dataChanged&&b.animatePathsGradually({el:A,pathFrom:a,pathTo:s,speed:u,strokeWidth:n}),A}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments[4];arguments[5];return this.w.globals.dom.Paper.pattern(e,i,function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:a,width:s+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:a,width:s}):"squares"===t?r.rect(e,i).fill("none").stroke({color:a,width:s}):"circles"===t&&r.circle(e).fill("none").stroke({color:a,width:s})})}},{key:"drawGradient",value:function(t,e,i,a,s){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=this.w;e=o.default.hexToRgba(e,a),i=o.default.hexToRgba(i,s);var h=0,c=1,d=1;null!==n&&(h=void 0!==n[0]?n[0]/100:0,c=void 0!==n[1]?n[1]/100:1,d=void 0!==n[2]?n[2]/100:1);var u=!("donut"!==l.config.chart.type&&"pie"!==l.config.chart.type&&"bubble"!==l.config.chart.type),f=l.globals.dom.Paper.gradient(u?"radial":"linear",function(t){t.at(h,e,a),t.at(c,i,s),t.at(d,i,s)});if(u){var p=l.globals.gridWidth/2,g=l.globals.gridHeight/2;"bubble"!==l.config.chart.type?f.attr({gradientUnits:"userSpaceOnUse",cx:p,cy:g,r:r}):f.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?f.from(0,0).to(0,1):"diagonal"===t?f.from(0,0).to(1,1):"horizontal"===t?f.from(0,1).to(1,1):"diagonal2"===t&&f.from(0,1).to(2,2);return f}},{key:"drawText",value:function(t){var e=this.w,i=t.x,a=t.y,s=t.text,r=t.textAnchor,n=t.fontSize,o=t.foreColor,l=t.opacity;r||(r="start"),void 0!==o&&void 0!==o||(o=e.config.chart.foreColor);var h=e.globals.dom.Paper.plain(s).attr({x:i,y:a,"text-anchor":r,"dominate-baseline":"central",class:t.cssClass});return h.node.style.fontSize=n,h.node.style.fill=o,h.node.style.opacity=l,h}},{key:"drawMarker",value:function(t,e,i){t=t||0;var a=i.pSize||0,s=null;if("square"===i.shape){var r=void 0===i.pRadius?a/2:i.pRadius;null===e&&(a=0,r=0);var n=1.2*a+r,o=this.drawRect(n,n,n,n,r);o.attr({x:t-n/2,y:e-n/2,cx:t,cy:e,class:i.class?i.class:"",fill:i.pointFillColor,"fill-opacity":i.pointFillOpacity?i.pointFillOpacity:1,stroke:i.pointStrokeColor,"stroke-width":i.pWidth?i.pWidth:1,"stroke-opacity":i.pointStrokeOpacity?i.pointStrokeOpacity:1}),s=o}else"circle"===i.shape&&(e||(a=0,e=0),s=this.drawCircle(a,{cx:t,cy:e,class:i.class?i.class:"",stroke:i.pointStrokeColor,fill:i.pointFillColor,"fill-opacity":i.pointFillOpacity?i.pointFillOpacity:1,"stroke-width":i.pWidth?i.pWidth:0,"stroke-opacity":i.pointStrokeOpacity?i.pointStrokeOpacity:1}));return s}},{key:"pathMouseEnter",value:function(t){var e=this.w,i=new h.default(this.ctx);if(("none"===e.config.states.active.filter.type||"true"!==t.node.getAttribute("selected"))&&"none"!==e.config.states.hover.filter.type){var a=e.config.states.hover.filter;i.applyFilter(t,a.type,a.value)}}},{key:"pathMouseLeave",value:function(t){var e=this.w,i=new h.default(this.ctx);"none"!==e.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||"none"!==e.config.states.hover.filter.type&&i.getDefaultFilter(t)}},{key:"pathMouseDown",value:function(t,e){var i=this.w,a=new h.default(this.ctx),s=parseInt(t.node.getAttribute("index")),r=parseInt(t.node.getAttribute("j")),n="false";if("true"===t.node.getAttribute("selected")){if(t.node.setAttribute("selected","false"),i.globals.selectedDataPoints[s].includes(r)){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 l=i.globals.dom.Paper.select(".apexcharts-series path").members,c=i.globals.dom.Paper.select(".apexcharts-series circle").members,d=!0,u=!1,f=void 0;try{for(var p,g=l[Symbol.iterator]();!(d=(p=g.next()).done);d=!0){var x=p.value;x.node.setAttribute("selected","false"),a.getDefaultFilter(x)}}catch(t){u=!0,f=t}finally{try{!d&&g.return&&g.return()}finally{if(u)throw f}}var b=!0,v=!1,m=void 0;try{for(var y,w=c[Symbol.iterator]();!(b=(y=w.next()).done);b=!0){var k=y.value;k.node.setAttribute("selected","false"),a.getDefaultFilter(k)}}catch(t){v=!0,m=t}finally{try{!b&&w.return&&w.return()}finally{if(v)throw m}}}t.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 A=i.config.states.active.filter;"none"!==A&&(a.applyFilter(t,A.type,A.value),"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,config:i.config,globals:i.globals}),this.ctx.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,config:i.config,globals:i.globals}]))}else"none"!==i.config.states.active.filter.type&&a.getDefaultFilter(t),"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,config:i.config,globals:i.globals}),this.ctx.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,config:i.config,globals:i.globals}]);void 0!==this.w.config.chart.selection.selectedPoints&&this.w.config.chart.selection.selectedPoints(i.globals.selectedDataPoints)}},{key:"rotateAroundCenter",value:function(t){var e=t.getBBox();return{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e){var i=this.w,a=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,foreColor:"#fff",opacity:0});i.globals.dom.Paper.add(a);var s=a.bbox();return a.node.parentNode.removeChild(a.node),{width:s.width,height:s.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if(t.textContent=e,e.length>0&&t.getSubStringLength(0,e.length)>=i){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i)return void(t.textContent=e.substring(0,a)+"...");t.textContent="..."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}();e.default=u},function(t,e,i){"use strict";function a(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r="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},n=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:void 0;if("#"===e[0]&&"r"===e[0]||(e=this.getHexColorFromName(e)),"number"!=typeof t||t<-1||t>1||"string"!=typeof e||"r"!==e[0]&&"#"!==e[0]||"string"!=typeof i&&void 0!==i)return null;var a=(parseInt,Math.round),s=e.length>9,s="string"==typeof i?i.length>9||"c"===i&&!s:s,r=t<0,t=r?-1*t:t,i=i&&"c"!==i?i:r?"#000000":"#FFFFFF",n=this.sbcRip(e),o=this.sbcRip(i);return n&&o?s?"rgb("+a((o[0]-n[0])*t+n[0])+","+a((o[1]-n[1])*t+n[1])+","+a((o[2]-n[2])*t+n[2])+(n[3]<0&&o[3]<0?")":","+(n[3]>-1&&o[3]>-1?a(1e4*((o[3]-n[3])*t+n[3]))/1e4:o[3]<0?n[3]:o[3])+")"):"#"+(4294967296+16777216*(n[3]>-1&&o[3]>-1?a(255*((o[3]-n[3])*t+n[3])):o[3]>-1?a(255*o[3]):n[3]>-1?a(255*n[3]):255)+65536*a((o[0]-n[0])*t+n[0])+256*a((o[1]-n[1])*t+n[1])+a((o[2]-n[2])*t+n[2])).toString(16).slice(n[3]>-1||o[3]>-1?1:3):null}},{key:"sbcRip",value:function(t){var e=t.length,i=new Object,a=parseInt,s=Math.round;if(e>9){if(t=t.split(","),t.length<3||t.length>4)return null;i[0]=a(t[0].slice(4)),i[1]=a(t[1]),i[2]=a(t[2]),i[3]=t[3]?parseFloat(t[3]):-1}else{if(8===e||6===e||e<4)return null;e<6&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(e>4?t[4]+""+t[4]:"")),t=a(t.slice(1),16),i[0]=t>>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),i.length>=3&&"#"+((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":r(t))&&!Array.isArray(t)&&null!==t}},{key:"extend",value:function(t,e){var i=this;"function"!=typeof Object.assign&&function(){Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i1?(e.shift(),this.addProps(a,e,i)):t[e[0]]=i,t}},{key:"clone",value:function(t){if("[object Array]"===Object.prototype.toString.call(t)){for(var e=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var a=t.indexOf("Edge/");return a>0&&parseInt(t.substring(a+5,t.indexOf(".",a)),10)}}]),t}();o.isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),e.default=o},function(t,e,i){"use strict";var a=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=a)},function(t,e,i){"use strict";var a=i(49)("wks"),s=i(33),r=i(2).Symbol,n="function"==typeof r;(t.exports=function(t){return a[t]||(a[t]=n&&r[t]||(n?r:s)("Symbol."+t))}).store=a},function(t,e,i){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:.5;switch(e){case"none":this.addNormalFilter(t);break;case"lighten":this.addLightenFilter(t,{intensity:i});break;case"darken":this.addDarkenFilter(t,{intensity:i});break;case"desaturate":this.addDesaturateFilter(t,{intensity:i})}}},{key:"addShadow",value:function(t,e){var i=e.blur,a=e.top,s=e.left,r=e.opacity,n=t.flood("black",r).composite(t.sourceAlpha,"in").offset(s,a).gaussianBlur(i).merge(t.source);return t.blend(t.source,n)}},{key:"dropShadow",value:function(t,e){var i=e.top,a=e.left,s=e.blur,r=e.opacity;return t.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),t.filter(function(t){var e=null;e=n.default.isSafari?t.flood("black",r).composite(t.sourceAlpha,"in").offset(a,i).gaussianBlur(s):t.flood("black",r).composite(t.sourceAlpha,"in").offset(a,i).gaussianBlur(s).merge(t.source),t.blend(t.source,e)}),t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),t}}]),t}();e.default=o},function(t,e,i){"use strict";var a=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=a)},function(t,e,i){"use strict";var a=i(12);t.exports=function(t){if(!a(t))throw TypeError(t+" is not an object!");return t}},function(t,e,i){"use strict";var a,s="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};!function(s,r){void 0!==(a=function(){return r(s,s.document)}.call(e,i,e,t))&&(t.exports=a)}("undefined"!=typeof window?window:void 0,function(t,e){function i(t,e,i,a){return i+a.replace(w.regex.dots," .")}function a(t){for(var e=t.slice(0),i=e.length;i--;)Array.isArray(e[i])&&(e[i]=a(e[i]));return e}function r(t,e){return t instanceof e}function n(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector).call(t,e)}function o(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function l(t){return t.charAt(0).toUpperCase()+t.slice(1)}function h(t){return 4==t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}function c(t){var e=t.toString(16);return 1==e.length?"0"+e:e}function d(t,e,i){if(null==e||null==i){var a=t.bbox();null==e?e=a.width/a.height*i:null==i&&(i=a.height/a.width*e)}return{width:e,height:i}}function u(t,e,i){return{x:e*t.a+i*t.c+0,y:e*t.b+i*t.d+0}}function f(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}function p(t){return t instanceof w.Matrix||(t=new w.Matrix(t)),t}function g(t,e){t.cx=null==t.cx?e.bbox().cx:t.cx,t.cy=null==t.cy?e.bbox().cy:t.cy}function x(t){for(var e=0,i=t.length,a="";e=0;i--)e.childNodes[i]instanceof t.SVGElement&&b(e.childNodes[i]);return w.adopt(e).id(w.eid(e.nodeName))}function v(t){return null==t.x&&(t.x=0,t.y=0,t.width=0,t.height=0),t.w=t.width,t.h=t.height,t.x2=t.x+t.width,t.y2=t.y+t.height,t.cx=t.x+t.width/2,t.cy=t.y+t.height/2,t}function m(t){var e=(t||"").toString().match(w.regex.reference);if(e)return e[1]}function y(t){return Math.abs(t)>1e-37?t:0}var w=(this||t).SVG=function(t){if(w.supported)return t=new w.Doc(t),w.parser.draw||w.prepare(),t};if(w.ns="http://www.w3.org/2000/svg",w.xmlns="http://www.w3.org/2000/xmlns/",w.xlink="http://www.w3.org/1999/xlink",w.svgjs="http://svgjs.com/svgjs",w.supported=function(){return!!e.createElementNS&&!!e.createElementNS(w.ns,"svg").createSVGRect}(),!w.supported)return!1;w.did=1e3,w.eid=function(t){return"Svgjs"+l(t)+w.did++},w.create=function(t){var i=e.createElementNS(this.ns,t);return i.setAttribute("id",this.eid(t)),i},w.extend=function(){var t,e,i,a;for(t=[].slice.call(arguments),e=t.pop(),a=t.length-1;a>=0;a--)if(t[a])for(i in e)t[a].prototype[i]=e[i];w.Set&&w.Set.inherit&&w.Set.inherit()},w.invent=function(t){var e="function"==typeof t.create?t.create:function(){this.constructor.call(this,w.create(t.create))};return t.inherit&&(e.prototype=new t.inherit),t.extend&&w.extend(e,t.extend),t.construct&&w.extend(t.parent||w.Container,t.construct),e},w.adopt=function(e){if(!e)return null;if(e.instance)return e.instance;var i;return i="svg"==e.nodeName?e.parentNode instanceof t.SVGElement?new w.Nested:new w.Doc:"linearGradient"==e.nodeName?new w.Gradient("linear"):"radialGradient"==e.nodeName?new w.Gradient("radial"):w[l(e.nodeName)]?new(w[l(e.nodeName)]):new w.Element(e),i.type=e.nodeName,i.node=e,e.instance=i,i instanceof w.Doc&&i.namespace().defs(),i.setData(JSON.parse(e.getAttribute("svgjs:data"))||{}),i},w.prepare=function(){var t=e.getElementsByTagName("body")[0],i=(t?new w.Doc(t):w.adopt(e.documentElement).nested()).size(2,0);w.parser={body:t||e.documentElement,draw:i.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:i.polyline().node,path:i.path().node,native:w.create("svg")}},w.parser={native:w.create("svg")},e.addEventListener("DOMContentLoaded",function(){w.parser.draw||w.prepare()},!1),w.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},w.utils={map:function(t,e){var i,a=t.length,s=[];for(i=0;i1?1:t,new w.Color({r:~~(this.r+(this.destination.r-this.r)*t),g:~~(this.g+(this.destination.g-this.g)*t),b:~~(this.b+(this.destination.b-this.b)*t)})):this}}),w.Color.test=function(t){return t+="",w.regex.isHex.test(t)||w.regex.isRgb.test(t)},w.Color.isRgb=function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b},w.Color.isColor=function(t){return w.Color.isRgb(t)||w.Color.test(t)},w.Array=function(t,e){t=(t||[]).valueOf(),0==t.length&&e&&(t=e.valueOf()),this.value=this.parse(t)},w.extend(w.Array,{morph:function(t){if(this.destination=this.parse(t),this.value.length!=this.destination.length){for(var e=this.value[this.value.length-1],i=this.destination[this.destination.length-1];this.value.length>this.destination.length;)this.destination.push(i);for(;this.value.length=0;a--)this.value[a]=[this.value[a][0]+t,this.value[a][1]+e];return this},size:function(t,e){var i,a=this.bbox();for(i=this.value.length-1;i>=0;i--)a.width&&(this.value[i][0]=(this.value[i][0]-a.x)*t/a.width+a.x),a.height&&(this.value[i][1]=(this.value[i][1]-a.y)*e/a.height+a.y);return this},bbox:function(){return w.parser.poly.setAttribute("points",this.toString()),w.parser.poly.getBBox()}});for(var k={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},A="mlhvqtcsaz".split(""),S=0,C=A.length;S=0;s--)a=this.value[s][0],"M"==a||"L"==a||"T"==a?(this.value[s][1]+=t,this.value[s][2]+=e):"H"==a?this.value[s][1]+=t:"V"==a?this.value[s][1]+=e:"C"==a||"S"==a||"Q"==a?(this.value[s][1]+=t,this.value[s][2]+=e,this.value[s][3]+=t,this.value[s][4]+=e,"C"==a&&(this.value[s][5]+=t,this.value[s][6]+=e)):"A"==a&&(this.value[s][6]+=t,this.value[s][7]+=e);return this},size:function(t,e){var i,a,s=this.bbox();for(i=this.value.length-1;i>=0;i--)a=this.value[i][0],"M"==a||"L"==a||"T"==a?(this.value[i][1]=(this.value[i][1]-s.x)*t/s.width+s.x,this.value[i][2]=(this.value[i][2]-s.y)*e/s.height+s.y):"H"==a?this.value[i][1]=(this.value[i][1]-s.x)*t/s.width+s.x:"V"==a?this.value[i][1]=(this.value[i][1]-s.y)*e/s.height+s.y:"C"==a||"S"==a||"Q"==a?(this.value[i][1]=(this.value[i][1]-s.x)*t/s.width+s.x,this.value[i][2]=(this.value[i][2]-s.y)*e/s.height+s.y,this.value[i][3]=(this.value[i][3]-s.x)*t/s.width+s.x,this.value[i][4]=(this.value[i][4]-s.y)*e/s.height+s.y,"C"==a&&(this.value[i][5]=(this.value[i][5]-s.x)*t/s.width+s.x,this.value[i][6]=(this.value[i][6]-s.y)*e/s.height+s.y)):"A"==a&&(this.value[i][1]=this.value[i][1]*t/s.width,this.value[i][2]=this.value[i][2]*e/s.height,this.value[i][6]=(this.value[i][6]-s.x)*t/s.width+s.x,this.value[i][7]=(this.value[i][7]-s.y)*e/s.height+s.y);return this},equalCommands:function(t){var e,i,a;for(t=new w.PathArray(t),a=this.value.length===t.value.length,e=0,i=this.value.length;a&&eo);return a},bbox:function(){return w.parser.path.setAttribute("d",this.toString()),w.parser.path.getBBox()}}),w.Number=w.invent({create:function(t,e){this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-3.4e38:3.4e38:"string"==typeof t?(e=t.match(w.regex.numberAndUnit))&&(this.value=parseFloat(e[1]),"%"==e[5]?this.value/=100:"s"==e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof w.Number&&(this.value=t.valueOf(),this.unit=t.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(t){return t=new w.Number(t),new w.Number(this+t,this.unit||t.unit)},minus:function(t){return t=new w.Number(t),new w.Number(this-t,this.unit||t.unit)},times:function(t){return t=new w.Number(t),new w.Number(this*t,this.unit||t.unit)},divide:function(t){return t=new w.Number(t),new w.Number(this/t,this.unit||t.unit)},to:function(t){var e=new w.Number(this);return"string"==typeof t&&(e.unit=t),e},morph:function(t){return this.destination=new w.Number(t),t.relative&&(this.destination.value+=this.value),this},at:function(t){return this.destination?new w.Number(this.destination).minus(this).times(t).plus(this):this}}}),w.Element=w.invent({create:function(t){this._stroke=w.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=t)&&(this.type=t.nodeName,this.node.instance=this,this._stroke=t.getAttribute("stroke")||this._stroke)},extend:{x:function(t){return this.attr("x",t)},y:function(t){return this.attr("y",t)},cx:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)},cy:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},width:function(t){return this.attr("width",t)},height:function(t){return this.attr("height",t)},size:function(t,e){var i=d(this,t,e);return this.width(new w.Number(i.width)).height(new w.Number(i.height))},clone:function(t){this.writeDataToDom();var e=b(this.node.cloneNode(!0));return t?t.add(e):this.after(e),e},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(t){return this.after(t).remove(),t},addTo:function(t){return t.put(this)},putIn:function(t){return t.add(this)},id:function(t){return this.attr("id",t)},inside:function(t,e){var i=this.bbox();return t>i.x&&e>i.y&&t/,"").replace(/<\/svg>$/,"");i.innerHTML=""+t.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2>")+"";for(var a=0,s=i.firstChild.childNodes.length;a":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)}},w.morph=function(t){return function(e,i){return new w.MorphObj(e,i).at(t)}},w.Situation=w.invent({create:function(t){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new w.Number(t.duration).valueOf(),this.delay=new w.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={}}}),w.FX=w.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":s(t))&&(e=t.ease,i=t.delay,t=t.duration);var a=new w.Situation({duration:t||1e3,delay:i||0,ease:w.easing[e||"-"]||e});return this.queue(a),this},delay:function(t){var e=new w.Situation({duration:t,delay:0,ease:w.easing["-"]});return this.queue(e)},target:function(t){return t&&t instanceof w.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=t.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){t.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 w.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 w.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 w.Number&&(i[e]=new w.Number(i[e])),a.animations[t][e]=i[e].morph(a.animations[t][e]);for(t in a.attrs)a.attrs[t]=new w.MorphObj(this.target().attr(t),a.attrs[t]);for(t in a.styles)a.styles[t]=new w.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(t){var e=this.last(),i=function i(a){a.detail.situation==e&&(t.call(this,e),this.off("finished.fx",i))};return this.target().on("finished.fx",i),this._callStart()},during:function(t){var e=this.last(),i=function(i){i.detail.situation==e&&t.call(this,i.detail.pos,w.morph(i.detail.pos),i.detail.eased,e)};return this.target().off("during.fx",i).on("during.fx",i),this.after(function(){this.off("during.fx",i)}),this._callStart()},afterAll:function(t){var e=function e(i){t.call(this),this.off("allfinished.fx",e)};return this.target().off("allfinished.fx",e).on("allfinished.fx",e),this._callStart()},duringAll:function(t){var e=function(e){t.call(this,e.detail.pos,w.morph(e.detail.pos),e.detail.eased,e.detail.situation)};return this.target().off("during.fx",e).on("during.fx",e),this.afterAll(function(){this.off("during.fx",e)}),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){if(t||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops){var e,i,a;e=Math.max(this.absPos,0),i=Math.floor(e),!0===this.situation.loops||ithis.lastPos&&r<=s&&(this.situation.once[r].call(this.target(),this.pos,s),delete this.situation.once[r]);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):this},eachAt:function(){var t,e,i,a=this,s=this.target(),r=this.situation;for(t in r.animations)i=[].concat(r.animations[t]).map(function(t){return"string"!=typeof t&&t.at?t.at(r.ease(a.pos),a.pos):t}),s[t].apply(s,i);for(t in r.attrs)i=[t].concat(r.attrs[t]).map(function(t){return"string"!=typeof t&&t.at?t.at(r.ease(a.pos),a.pos):t}),s.attr.apply(s,i);for(t in r.styles)i=[t].concat(r.styles[t]).map(function(t){return"string"!=typeof t&&t.at?t.at(r.ease(a.pos),a.pos):t}),s.style.apply(s,i);if(r.transforms.length){for(i=r.initialTransformation,t=0,e=r.transforms.length;t=0;--e)this[M[e]]=null!=t[M[e]]?t[M[e]]:i[M[e]]},extend:{extract:function(){var t=u(this,0,1),e=u(this,1,0),i=180/Math.PI*Math.atan2(t.y,t.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(i*Math.PI/180)+this.f*Math.sin(i*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(i*Math.PI/180)+this.e*Math.sin(-i*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),skewX:-i,skewY:180/Math.PI*Math.atan2(e.y,e.x),scaleX:Math.sqrt(this.a*this.a+this.b*this.b),scaleY:Math.sqrt(this.c*this.c+this.d*this.d),rotation:i,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new w.Matrix(this)}},clone:function(){return new w.Matrix(this)},morph:function(t){return this.destination=new w.Matrix(t),this},at:function(t){return this.destination?new w.Matrix({a:this.a+(this.destination.a-this.a)*t,b:this.b+(this.destination.b-this.b)*t,c:this.c+(this.destination.c-this.c)*t,d:this.d+(this.destination.d-this.d)*t,e:this.e+(this.destination.e-this.e)*t,f:this.f+(this.destination.f-this.f)*t}):this},multiply:function(t){return new w.Matrix(this.native().multiply(p(t).native()))},inverse:function(){return new w.Matrix(this.native().inverse())},translate:function(t,e){return new w.Matrix(this.native().translate(t||0,e||0))},scale:function(t,e,i,a){return 1==arguments.length?e=t:3==arguments.length&&(a=i,i=e,e=t),this.around(i,a,new w.Matrix(t,0,0,e,0,0))},rotate:function(t,e,i){return t=w.utils.radians(t),this.around(e,i,new w.Matrix(Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0))},flip:function(t,e){return"x"==t?this.scale(-1,1,e,0):"y"==t?this.scale(1,-1,0,e):this.scale(-1,-1,t,null!=e?e:t)},skew:function(t,e,i,a){return 1==arguments.length?e=t:3==arguments.length&&(a=i,i=e,e=t),t=w.utils.radians(t),e=w.utils.radians(e),this.around(i,a,new w.Matrix(1,Math.tan(e),Math.tan(t),1,0,0))},skewX:function(t,e,i){return this.skew(t,0,e,i)},skewY:function(t,e,i){return this.skew(0,t,e,i)},around:function(t,e,i){return this.multiply(new w.Matrix(1,0,0,1,t||0,e||0)).multiply(i).multiply(new w.Matrix(1,0,0,1,-t||0,-e||0))},native:function(){for(var t=w.parser.native.createSVGMatrix(),e=M.length-1;e>=0;e--)t[M[e]]=this[M[e]];return t},toString:function(){return"matrix("+y(this.a)+","+y(this.b)+","+y(this.c)+","+y(this.d)+","+y(this.e)+","+y(this.f)+")"}},parent:w.Element,construct:{ctm:function(){return new w.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof w.Nested){var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new w.Matrix(e)}return new w.Matrix(this.node.getScreenCTM())}}}),w.Point=w.invent({create:function(t,e){var i,a={x:0,y:0};i=Array.isArray(t)?{x:t[0],y:t[1]}:"object"===(void 0===t?"undefined":s(t))?{x:t.x,y:t.y}:null!=t?{x:t,y:null!=e?e:t}:a,this.x=i.x,this.y=i.y},extend:{clone:function(){return new w.Point(this)},morph:function(t,e){return this.destination=new w.Point(t,e),this},at:function(t){return this.destination?new w.Point({x:this.x+(this.destination.x-this.x)*t,y:this.y+(this.destination.y-this.y)*t}):this},native:function(){var t=w.parser.native.createSVGPoint();return t.x=this.x,t.y=this.y,t},transform:function(t){return new w.Point(this.native().matrixTransform(t.native()))}}}),w.extend(w.Element,{point:function(t,e){return new w.Point(t,e).transform(this.screenCTM().inverse())}}),w.extend(w.Element,{attr:function(t,e,i){if(null==t){for(t={},e=this.node.attributes,i=e.length-1;i>=0;i--)t[e[i].nodeName]=w.regex.isNumber.test(e[i].nodeValue)?parseFloat(e[i].nodeValue):e[i].nodeValue;return t}if("object"==(void 0===t?"undefined":s(t)))for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return e=this.node.getAttribute(t),null==e?w.defaults.attrs[t]:w.regex.isNumber.test(e)?parseFloat(e):e;"stroke-width"==t?this.attr("stroke",parseFloat(e)>0?this._stroke:null):"stroke"==t&&(this._stroke=e),"fill"!=t&&"stroke"!=t||(w.regex.isImage.test(e)&&(e=this.doc().defs().image(e,0,0)),e instanceof w.Image&&(e=this.doc().defs().pattern(0,0,function(){this.add(e)}))),"number"==typeof e?e=new w.Number(e):w.Color.isColor(e)?e=new w.Color(e):Array.isArray(e)&&(e=new w.Array(e)),"leading"==t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!=t&&"x"!=t||this.rebuild(t,e)}return this}}),w.extend(w.Element,{transform:function(t,e){var i,a,r=this;if("object"!==(void 0===t?"undefined":s(t)))return i=new w.Matrix(r).extract(),"string"==typeof t?i[t]:i;if(i=new w.Matrix(r),e=!!e||!!t.relative,null!=t.a)i=e?i.multiply(new w.Matrix(t)):new w.Matrix(t);else if(null!=t.rotation)g(t,r),i=e?i.rotate(t.rotation,t.cx,t.cy):i.rotate(t.rotation-i.extract().rotation,t.cx,t.cy);else if(null!=t.scale||null!=t.scaleX||null!=t.scaleY){if(g(t,r),t.scaleX=null!=t.scale?t.scale:null!=t.scaleX?t.scaleX:1,t.scaleY=null!=t.scale?t.scale:null!=t.scaleY?t.scaleY:1,!e){var n=i.extract();t.scaleX=1*t.scaleX/n.scaleX,t.scaleY=1*t.scaleY/n.scaleY}i=i.scale(t.scaleX,t.scaleY,t.cx,t.cy)}else if(null!=t.skew||null!=t.skewX||null!=t.skewY){if(g(t,r),t.skewX=null!=t.skew?t.skew:null!=t.skewX?t.skewX:0,t.skewY=null!=t.skew?t.skew:null!=t.skewY?t.skewY:0,!e){var n=i.extract();i=i.multiply((new w.Matrix).skew(n.skewX,n.skewY,t.cx,t.cy).inverse())}i=i.skew(t.skewX,t.skewY,t.cx,t.cy)}else t.flip?("x"==t.flip||"y"==t.flip?t.offset=null==t.offset?r.bbox()["c"+t.flip]:t.offset:null==t.offset?(a=r.bbox(),t.flip=a.cx,t.offset=a.cy):t.flip=t.offset,i=(new w.Matrix).flip(t.flip,t.offset)):null==t.x&&null==t.y||(e?i=i.translate(t.x,t.y):(null!=t.x&&(i.e=t.x),null!=t.y&&(i.f=t.y)));return this.attr("transform",i)}}),w.extend(w.FX,{transform:function(t,e){var i,a,r=this.target();return"object"!==(void 0===t?"undefined":s(t))?(i=new w.Matrix(r).extract(),"string"==typeof t?i[t]:i):(e=!!e||!!t.relative,null!=t.a?i=new w.Matrix(t):null!=t.rotation?(g(t,r),i=new w.Rotate(t.rotation,t.cx,t.cy)):null!=t.scale||null!=t.scaleX||null!=t.scaleY?(g(t,r),t.scaleX=null!=t.scale?t.scale:null!=t.scaleX?t.scaleX:1,t.scaleY=null!=t.scale?t.scale:null!=t.scaleY?t.scaleY:1,i=new w.Scale(t.scaleX,t.scaleY,t.cx,t.cy)):null!=t.skewX||null!=t.skewY?(g(t,r),t.skewX=null!=t.skewX?t.skewX:0,t.skewY=null!=t.skewY?t.skewY:0,i=new w.Skew(t.skewX,t.skewY,t.cx,t.cy)):t.flip?("x"==t.flip||"y"==t.flip?t.offset=null==t.offset?r.bbox()["c"+t.flip]:t.offset:null==t.offset?(a=r.bbox(),t.flip=a.cx,t.offset=a.cy):t.flip=t.offset,i=(new w.Matrix).flip(t.flip,t.offset)):null==t.x&&null==t.y||(i=new w.Translate(t.x,t.y)),i?(i.relative=e,this.last().transforms.push(i),this._callStart()):this)}}),w.extend(w.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(w.regex.transforms).slice(0,-1).map(function(t){var e=t.trim().split("(");return[e[0],e[1].split(w.regex.delimiter).map(function(t){return parseFloat(t)})]}).reduce(function(t,e){return"matrix"==e[0]?t.multiply(f(e[1])):t[e[0]].apply(t,e[1])},new w.Matrix)},toParent:function(t){if(this==t)return this;var e=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t).untransform().transform(i.multiply(e)),this},toDoc:function(){return this.toParent(this.doc())}}),w.Transformation=w.invent({create:function(t,e){if(arguments.length>1&&"boolean"!=typeof e)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(t))for(var i=0,a=this.arguments.length;i=0},index:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)},get:function(t){return w.adopt(this.node.childNodes[t])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(t,e){var i,a,s=this.children();for(i=0,a=s.length;ia/r?this.height/r:this.width/a,this.x=e,this.y=i,this.width=a,this.height=r)}else t="string"==typeof t?t.match(u).map(function(t){return parseFloat(t)}):Array.isArray(t)?t:"object"==(void 0===t?"undefined":s(t))?[t.x,t.y,t.width,t.height]:4==arguments.length?[].slice.call(arguments):h,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 w.ViewBox(t,e,i,a),this},at:function(t){return this.destination?new w.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:w.Container,construct:{viewbox:function(t,e,i,a){return 0==arguments.length?new w.ViewBox(this):this.attr("viewBox",new w.ViewBox(t,e,i,a))}}}),["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","touchstart","touchmove","touchleave","touchend","touchcancel"].forEach(function(t){w.Element.prototype[t]=function(e){return w.on(this.node,t,e),this}}),w.listeners=[],w.handlerMap=[],w.listenerId=0,w.on=function(t,e,i,a,s){var r=i.bind(a||t.instance||t),n=(w.handlerMap.indexOf(t)+1||w.handlerMap.push(t))-1,o=e.split(".")[0],l=e.split(".")[1]||"*";w.listeners[n]=w.listeners[n]||{},w.listeners[n][o]=w.listeners[n][o]||{},w.listeners[n][o][l]=w.listeners[n][o][l]||{},i._svgjsListenerId||(i._svgjsListenerId=++w.listenerId),w.listeners[n][o][l][i._svgjsListenerId]=r,t.addEventListener(o,r,s||!1)},w.off=function(t,e,i){var a=w.handlerMap.indexOf(t),s=e&&e.split(".")[0],r=e&&e.split(".")[1],n="";if(-1!=a)if(i){if("function"==typeof i&&(i=i._svgjsListenerId),!i)return;w.listeners[a][s]&&w.listeners[a][s][r||"*"]&&(t.removeEventListener(s,w.listeners[a][s][r||"*"][i],!1),delete w.listeners[a][s][r||"*"][i])}else if(r&&s){if(w.listeners[a][s]&&w.listeners[a][s][r]){for(i in w.listeners[a][s][r])w.off(t,[s,r].join("."),i);delete w.listeners[a][s][r]}}else if(r)for(e in w.listeners[a])for(n in w.listeners[a][e])r===n&&w.off(t,[e,r].join("."));else if(s){if(w.listeners[a][s]){for(n in w.listeners[a][s])w.off(t,[s,n].join("."));delete w.listeners[a][s]}}else{for(e in w.listeners[a])w.off(t,e);delete w.listeners[a],delete w.handlerMap[a]}},w.extend(w.Element,{on:function(t,e,i,a){return w.on(this.node,t,e,i,a),this},off:function(t,e){return w.off(this.node,t,e),this},fire:function(e,i){return e instanceof t.Event?this.node.dispatchEvent(e):this.node.dispatchEvent(e=new w.CustomEvent(e,{detail:i,cancelable:!0})),this._event=e,this},event:function(){return this._event}}),w.Defs=w.invent({create:"defs",inherit:w.Container}),w.G=w.invent({create:"g",inherit:w.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 w.G)}}}),w.Doc=w.invent({create:function(t){t&&(t="string"==typeof t?e.getElementById(t):t,"svg"==t.nodeName?this.constructor.call(this,t):(this.constructor.call(this,w.create("svg")),t.appendChild(this.node),this.size("100%","100%")),this.namespace().defs())},inherit:w.Container,extend:{namespace:function(){return this.attr({xmlns:w.ns,version:"1.1"}).attr("xmlns:xlink",w.xlink,w.xmlns).attr("xmlns:svgjs",w.svgjs,w.xmlns)},defs:function(){if(!this._defs){var t;(t=this.node.getElementsByTagName("defs")[0])?this._defs=w.adopt(t):this._defs=new w.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,w.parser.draw.parentNode||this.node.appendChild(w.parser.draw),this},clone:function(t){this.writeDataToDom();var e=this.node,i=b(e.cloneNode(!0));return t?(t.node||t).appendChild(i.node):e.parentNode.insertBefore(i.node,e.nextSibling),i}}}),w.extend(w.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 w.Doc&&e.node.appendChild(e.defs().node),this},backward:function(){var t=this.position();return t>0&&this.parent().removeElement(this).add(this,t-1),this},front:function(){var t=this.parent();return t.node.appendChild(this.node),t instanceof w.Doc&&t.node.appendChild(t.defs().node),this},back:function(){return this.position()>0&&this.parent().removeElement(this).add(this,0),this},before:function(t){t.remove();var e=this.position();return this.parent().add(t,e),this},after:function(t){t.remove();var e=this.position();return this.parent().add(t,e+1),this}}),w.Mask=w.invent({create:function(){this.constructor.call(this,w.create("mask")),this.targets=[]},inherit:w.Container,extend:{remove:function(){for(var t=this.targets.length-1;t>=0;t--)this.targets[t]&&this.targets[t].unmask();return this.targets=[],w.Element.prototype.remove.call(this),this}},construct:{mask:function(){return this.defs().put(new w.Mask)}}}),w.extend(w.Element,{maskWith:function(t){return this.masker=t instanceof w.Mask?t:this.parent().mask().add(t),this.masker.targets.push(this),this.attr("mask",'url("#'+this.masker.attr("id")+'")')},unmask:function(){return delete this.masker,this.attr("mask",null)}}),w.ClipPath=w.invent({create:function(){this.constructor.call(this,w.create("clipPath")),this.targets=[]},inherit:w.Container,extend:{remove:function(){for(var t=this.targets.length-1;t>=0;t--)this.targets[t]&&this.targets[t].unclip();return this.targets=[],this.parent().removeElement(this),this}},construct:{clip:function(){return this.defs().put(new w.ClipPath)}}}),w.extend(w.Element,{clipWith:function(t){return this.clipper=t instanceof w.ClipPath?t:this.parent().clip().add(t),this.clipper.targets.push(this),this.attr("clip-path",'url("#'+this.clipper.attr("id")+'")')},unclip:function(){return delete this.clipper,this.attr("clip-path",null)}}),w.Gradient=w.invent({create:function(t){this.constructor.call(this,w.create(t+"Gradient")),this.type=t},inherit:w.Container,extend:{at:function(t,e,i){return this.put(new w.Stop).update(t,e,i)},update:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this},fill:function(){return"url(#"+this.id()+")"},toString:function(){return this.fill()},attr:function(t,e,i){return"transform"==t&&(t="gradientTransform"),w.Container.prototype.attr.call(this,t,e,i)}},construct:{gradient:function(t,e){return this.defs().gradient(t,e)}}}),w.extend(w.Gradient,w.FX,{from:function(t,e){return"radial"==(this._target||this).type?this.attr({fx:new w.Number(t),fy:new w.Number(e)}):this.attr({x1:new w.Number(t),y1:new w.Number(e)})},to:function(t,e){return"radial"==(this._target||this).type?this.attr({cx:new w.Number(t),cy:new w.Number(e)}):this.attr({x2:new w.Number(t),y2:new w.Number(e)})}}),w.extend(w.Defs,{gradient:function(t,e){return this.put(new w.Gradient(t)).update(e)}}),w.Stop=w.invent({create:"stop",inherit:w.Element,extend:{update:function(t){return("number"==typeof t||t instanceof w.Number)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new w.Number(t.offset)),this}}}),w.Pattern=w.invent({create:"pattern",inherit:w.Container,extend:{fill:function(){return"url(#"+this.id()+")"},update:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this},toString:function(){return this.fill()},attr:function(t,e,i){return"transform"==t&&(t="patternTransform"),w.Container.prototype.attr.call(this,t,e,i)}},construct:{pattern:function(t,e,i){return this.defs().pattern(t,e,i)}}}),w.extend(w.Defs,{pattern:function(t,e,i){return this.put(new w.Pattern).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}}),w.Shape=w.invent({create:function(t){this.constructor.call(this,t)},inherit:w.Element}),w.Bare=w.invent({create:function(t,e){if(this.constructor.call(this,w.create(t)),e)for(var i in e.prototype)"function"==typeof e.prototype[i]&&(this[i]=e.prototype[i])},inherit:w.Element,extend:{words:function(t){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this.node.appendChild(e.createTextNode(t)),this}}}),w.extend(w.Parent,{element:function(t,e){return this.put(new w.Bare(t,e))}}),w.Symbol=w.invent({create:"symbol",inherit:w.Container,construct:{symbol:function(){return this.put(new w.Symbol)}}}),w.Use=w.invent({create:"use",inherit:w.Shape,extend:{element:function(t,e){return this.attr("href",(e||"")+"#"+t,w.xlink)}},construct:{use:function(t,e){return this.put(new w.Use).element(t,e)}}}),w.Rect=w.invent({create:"rect",inherit:w.Shape,construct:{rect:function(t,e){return this.put(new w.Rect).size(t,e)}}}),w.Circle=w.invent({create:"circle",inherit:w.Shape,construct:{circle:function(t){return this.put(new w.Circle).rx(new w.Number(t).divide(2)).move(0,0)}}}),w.extend(w.Circle,w.FX,{rx:function(t){return this.attr("r",t)},ry:function(t){return this.rx(t)}}),w.Ellipse=w.invent({create:"ellipse",inherit:w.Shape,construct:{ellipse:function(t,e){return this.put(new w.Ellipse).size(t,e).move(0,0)}}}),w.extend(w.Ellipse,w.Rect,w.FX,{rx:function(t){return this.attr("rx",t)},ry:function(t){return this.attr("ry",t)}}),w.extend(w.Circle,w.Ellipse,{x:function(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())},y:function(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())},cx:function(t){return null==t?this.attr("cx"):this.attr("cx",t)},cy:function(t){return null==t?this.attr("cy"):this.attr("cy",t)},width:function(t){return null==t?2*this.rx():this.rx(new w.Number(t).divide(2))},height:function(t){return null==t?2*this.ry():this.ry(new w.Number(t).divide(2))},size:function(t,e){var i=d(this,t,e);return this.rx(new w.Number(i.width).divide(2)).ry(new w.Number(i.height).divide(2))}}),w.Line=w.invent({create:"line",inherit:w.Shape,extend:{array:function(){return new w.PointArray([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])},plot:function(t,e,i,a){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:i,y2:a}:new w.PointArray(t).toLine(),this.attr(t))},move:function(t,e){return this.attr(this.array().move(t,e).toLine())},size:function(t,e){var i=d(this,t,e);return this.attr(this.array().size(i.width,i.height).toLine())}},construct:{line:function(t,e,i,a){return w.Line.prototype.plot.apply(this.put(new w.Line),null!=t?[t,e,i,a]:[0,0,0,0])}}}),w.Polyline=w.invent({create:"polyline",inherit:w.Shape,construct:{polyline:function(t){return this.put(new w.Polyline).plot(t||new w.PointArray)}}}),w.Polygon=w.invent({create:"polygon",inherit:w.Shape,construct:{polygon:function(t){return this.put(new w.Polygon).plot(t||new w.PointArray)}}}),w.extend(w.Polyline,w.Polygon,{array:function(){return this._array||(this._array=new w.PointArray(this.attr("points")))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new w.PointArray(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},size:function(t,e){var i=d(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}}),w.extend(w.Line,w.Polyline,w.Polygon,{morphArray:w.PointArray,x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},width:function(t){var e=this.bbox();return null==t?e.width:this.size(t,e.height)},height:function(t){var e=this.bbox();return null==t?e.height:this.size(e.width,t)}}),w.Path=w.invent({create:"path",inherit:w.Shape,extend:{morphArray:w.PathArray,array:function(){return this._array||(this._array=new w.PathArray(this.attr("d")))},plot:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new w.PathArray(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("d",this.array().move(t,e))},x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},size:function(t,e){var i=d(this,t,e);return this.attr("d",this.array().size(i.width,i.height))},width:function(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)},height:function(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}},construct:{path:function(t){return this.put(new w.Path).plot(t||new w.PathArray)}}}),w.Image=w.invent({create:"image",inherit:w.Shape,extend:{load:function(e){if(!e)return this;var i=this,a=new t.Image;return w.on(a,"load",function(){w.off(a);var t=i.parent(w.Pattern);null!==t&&(0==i.width()&&0==i.height()&&i.size(a.width,a.height),t&&0==t.width()&&0==t.height()&&t.size(i.width(),i.height()),"function"==typeof i._loaded&&i._loaded.call(i,{width:a.width,height:a.height,ratio:a.width/a.height,url:e}))}),w.on(a,"error",function(t){w.off(a),"function"==typeof i._error&&i._error.call(i,t)}),this.attr("href",a.src=this.src=e,w.xlink)},loaded:function(t){return this._loaded=t,this},error:function(t){return this._error=t,this}},construct:{image:function(t,e,i){return this.put(new w.Image).load(t).size(e||0,i||e||0)}}}),w.Text=w.invent({create:function(){this.constructor.call(this,w.create("text")),this.dom.leading=new w.Number(1.3),this._rebuild=!0,this._build=!1,this.attr("font-family",w.defaults.attrs["font-family"])},inherit:w.Shape,extend:{x:function(t){return null==t?this.attr("x"):this.attr("x",t)},y:function(t){var e=this.attr("y"),i="number"==typeof e?e-this.bbox().y:0;return null==t?"number"==typeof e?e-i:e:this.attr("y","number"==typeof t.valueOf()?t+i:t)},cx:function(t){return null==t?this.bbox().cx:this.x(t-this.bbox().width/2)},cy:function(t){return null==t?this.bbox().cy:this.y(t-this.bbox().height/2)},text:function(t){if(void 0===t){for(var t="",e=this.node.childNodes,i=0,a=e.length;i=0;e--)null!=i[P[t][e]]&&this.attr(P.prefix(t,P[t][e]),i[P[t][e]]);return this},w.extend(w.Element,w.FX,i)}),w.extend(w.Element,w.FX,{rotate:function(t,e,i){return this.transform({rotation:t,cx:e,cy:i})},skew:function(t,e,i,a){return 1==arguments.length||3==arguments.length?this.transform({skew:t,cx:e,cy:i}):this.transform({skewX:t,skewY:e,cx:i,cy:a})},scale:function(t,e,i,a){return 1==arguments.length||3==arguments.length?this.transform({scale:t,cx:e,cy:i}):this.transform({scaleX:t,scaleY:e,cx:i,cy:a})},translate:function(t,e){return this.transform({x:t,y:e})},flip:function(t,e){return e="number"==typeof t?t:e,this.transform({flip:t||"both",offset:e})},matrix:function(t){return this.attr("transform",new w.Matrix(6==arguments.length?[].slice.call(arguments):t))},opacity:function(t){return this.attr("opacity",t)},dx:function(t){return this.x(new w.Number(t).plus(this instanceof w.FX?0:this.x()),!0)},dy:function(t){return this.y(new w.Number(t).plus(this instanceof w.FX?0:this.y()),!0)},dmove:function(t,e){return this.dx(t).dy(e)}}),w.extend(w.Rect,w.Ellipse,w.Circle,w.Gradient,w.FX,{radius:function(t,e){var i=(this._target||this).type;return"radial"==i||"circle"==i?this.attr("r",new w.Number(t)):this.rx(t).ry(null==e?t:e)}}),w.extend(w.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(t){return this.node.getPointAtLength(t)}}),w.extend(w.Parent,w.Text,w.Tspan,w.FX,{font:function(t,e){if("object"==(void 0===t?"undefined":s(t)))for(e in t)this.font(e,t[e]);return"leading"==t?this.leading(e):"anchor"==t?this.attr("text-anchor",e):"size"==t||"family"==t||"weight"==t||"stretch"==t||"variant"==t||"style"==t?this.attr("font-"+t,e):this.attr(t,e)}}),w.Set=w.invent({create:function(t){Array.isArray(t)?this.members=t:this.clear()},extend:{add:function(){var t,e,i=[].slice.call(arguments);for(t=0,e=i.length;t-1&&this.members.splice(e,1),this},each:function(t){for(var e=0,i=this.members.length;e=0},index:function(t){return this.members.indexOf(t)},get:function(t){return this.members[t]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members},bbox:function(){if(0==this.members.length)return new w.RBox;var t=this.members[0].rbox(this.members[0].doc());return this.each(function(){t=t.merge(this.rbox(this.doc()))}),t}},construct:{set:function(t){return new w.Set(t)}}}),w.FX.Set=w.invent({create:function(t){this.set=t}}),w.Set.inherit=function(){var t,e=[];for(var t in w.Shape.prototype)"function"==typeof w.Shape.prototype[t]&&"function"!=typeof w.Set.prototype[t]&&e.push(t);e.forEach(function(t){w.Set.prototype[t]=function(){for(var e=0,i=this.members.length;e=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory||(this._memory={})}}),w.get=function(t){var i=e.getElementById(m(t)||t);return w.adopt(i)},w.select=function(t,i){return new w.Set(w.utils.map((i||e).querySelectorAll(t),function(t){return w.adopt(t)}))},w.extend(w.Parent,{select:function(t){return w.select(t,this.node)}});var M="abcdef".split("");if("function"!=typeof t.CustomEvent){var T=function(t,i){i=i||{bubbles:!1,cancelable:!1,detail:void 0};var a=e.createEvent("CustomEvent");return a.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),a};T.prototype=t.Event.prototype,w.CustomEvent=T}else w.CustomEvent=t.CustomEvent;return function(e){for(var i=0,a=["moz","webkit"],s=0;ss?a:s,n=t.image,l=0,h=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(l=i.fill.image.width+1,h=i.fill.image.height):(l=r+1,h=r):(l=t.width,h=t.height);var c=document.createElementNS(e.globals.svgNS,"pattern");o.default.setAttrs(c,{id:t.patternID,patternUnits:"userSpaceOnUse",width:l+"px",height:h+"px"});var d=document.createElementNS(e.globals.svgNS,"image");c.appendChild(d),d.setAttributeNS("http://www.w3.org/1999/xlink","href",n),o.default.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:l+"px",height:h+"px"}),d.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(c)}},{key:"fillPath",value:function(t,e){var i=this.w,a=this.w.config,s=new o.default(this.ctx),r=new h.default,n=void 0,l=void 0,c=[],d=function(){return"bar"===i.config.chart.type&&i.config.plotOptions.bar.distributed||"heatmap"===i.config.chart.type?e.seriesNumber:e.seriesNumber%i.globals.series.length},u=Array.isArray(a.fill.opacity)?a.fill.opacity[d()]:a.fill.opacity;i.globals.comboCharts?"line"===i.config.series[d()].type?i.globals.stroke.colors instanceof Array?c=i.globals.stroke.colors:c.push(i.globals.stroke.colors):i.globals.fill.colors instanceof Array?c=i.globals.fill.colors:c.push(i.globals.fill.colors):"line"===a.chart.type?i.globals.stroke.colors instanceof Array?c=i.globals.stroke.colors:c.push(i.globals.stroke.colors):i.globals.fill.colors instanceof Array?c=i.globals.fill.colors:c.push(i.globals.fill.colors),void 0!==e.fillColors&&(c=[],e.fillColors instanceof Array?c=e.fillColors.slice():c.push(e.fillColors));var f=h.default.hexToRgba(c[d()],u),p=c[d()];if("pattern"===a.fill.type){var g=void 0===a.fill.pattern.strokeWidth?Array.isArray(a.stroke.width)?a.stroke.width[d]:a.stroke.width:Array.isArray(a.fill.pattern.strokeWidth)?a.fill.pattern.strokeWidth[d]:a.fill.pattern.strokeWidth,x=p;if(a.fill.pattern.style instanceof Array)if(void 0!==a.fill.pattern.style[e.seriesNumber]){var b=s.drawPattern(a.fill.pattern.style[e.seriesNumber],a.fill.pattern.width,a.fill.pattern.height,x,g,u);n=b}else n=f;else n=s.drawPattern(a.fill.pattern.style,a.fill.pattern.width,a.fill.pattern.height,x,g,u)}if("gradient"===a.fill.type){var v=a.fill.gradient.type,m=void 0,y=void 0,w=void 0===a.fill.gradient.opacityFrom?u:a.fill.gradient.opacityFrom,k=void 0===a.fill.gradient.opacityTo?u:a.fill.gradient.opacityTo;if(m=p,y=void 0===a.fill.gradient.gradientToColors||0===a.fill.gradient.gradientToColors.length?"dark"===a.fill.gradient.shade?r.shadeColor(-1*parseFloat(a.fill.gradient.shadeIntensity),p):r.shadeColor(parseFloat(a.fill.gradient.shadeIntensity),p):a.fill.gradient.gradientToColors[e.seriesNumber],a.fill.gradient.inverseColors){var A=m;m=y,y=A}l=s.drawGradient(v,m,y,w,k,e.size,a.fill.gradient.stops)}var S="none";return a.fill.image.src.length>0&&"image"===a.fill.type?e.seriesNumber-1||e.indexOf("NaN")>-1)&&(e="M 0 "+n.globals.gridHeight,a=1),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 "+n.globals.gridHeight,a=1),t.plot(e).animate(1,n.globals.easing,r).plot(e).animate(a,n.globals.easing,r).plot(i)}},{key:"showDelayedElements",value:function(){var t=this.w,e=t.config.chart.animations,i=e.speed,a=e.animateGradually.enabled,s=e.animateGradually.delay;if(e.enabled&&!t.globals.resized)for(var r=0;r=t.from&&i<=t.to&&a[e].classList.remove("legend-mouseover-inactive")}}(n)}else"mouseout"===t.type&&s()}},{key:"getActiveSeriesIndex",value:function(){var t=this.w,e=0;if(t.globals.series.length>1)for(var i=t.globals.series.map(function(e,i){return e.length>0&&"bar"!==t.config.series[i].type&&"column"!==t.config.series[i].type?i:-1}),a=0;a1)for(var i=t.config.series.map(function(t,e){return t.data&&t.data.length>0?e:-1}),a=0;a0)for(var a=i.length-1;a>=0;a--)t(i,a,"line");var s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-area-series .apexcharts-series");if(s.length>0)for(var r=s.length-1;r>=0;r--)t(s,r,"area");var n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series .apexcharts-series");if(n.length>0)for(var o=0;o0)for(var h=0;h0)for(var p=0;p0)for(var m=0;m0&&(o=this.getxAxisTimeScaleLabelsCoords()),s=this.getxAxisTitleCoords(),r=this.getyAxisTitleCoords(),this.isBarHorizontal,e.config.xaxis.labels.show||(o={height:0,width:0}),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map(function(t,i){e.globals.yLabelsCoords.push({width:n[i].width,index:i}),e.globals.yTitleCoords.push({width:r[i].width,index:i})}),this.xAxisHeight=(o.height+s.height)*e.globals.lineHeightRatio+15,this.xAxisWidth=o.width,this.xAxisHeight-s.height>e.config.xaxis.labels.maxHeight&&(this.xAxisHeight=e.config.xaxis.labels.maxHeight),e.config.xaxis.floating&&(this.xAxisHeight=0),i.xAxisLabelsHeight=this.xAxisHeight,i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.dataXY&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,this.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX,this.isBarHorizontal?(this.yAxisWidth=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15,this.yAxisWidth>e.config.yaxis[0].labels.maxWidth&&(this.yAxisWidth=e.config.yaxis[0].labels.maxWidth)):this.yAxisWidth=this.getTotalYAxisWidth();var l=this.yAxisWidth,h=this.xAxisHeight,c=10;switch(e.config.grid.show||(l=0,h=35),e.config.chart.sparkline.enabled&&(t={height:0,width:0},a=0,h=0,l=0,c=0),e.config.legend.position){case"bottom":i.translateY=c,i.translateX=l,i.gridHeight=i.svgHeight-t.height-h-(e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-a-l;break;case"top":i.translateY=t.height+c,i.translateX=l,i.gridHeight=i.svgHeight-t.height-h-(e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-a-l;break;case"left":i.translateY=c,i.translateX=t.width+l,i.gridHeight=i.svgHeight-h,i.gridWidth=i.svgWidth-t.width-a-l;break;case"right":i.translateY=c,i.translateX=l,i.gridHeight=i.svgHeight-h,i.gridWidth=i.svgWidth-t.width-a-l;break;default:i.translateY=c,i.translateX=l,i.gridHeight=i.svgHeight-t.height-h,i.gridWidth=i.svgWidth-a}var d=0;e.config.chart.scroller.enabled&&e.globals.dataXY&&(d=e.config.chart.scroller.height),i.gridHeight=i.gridHeight-e.config.grid.padding.top-e.config.grid.padding.bottom-d,i.gridWidth=i.gridWidth-e.config.grid.padding.left-e.config.grid.padding.right,i.translateX=i.translateX+e.config.grid.padding.left,i.translateY=i.translateY+e.config.grid.padding.top,this.isBarHorizontal||this.setGridXPosForDualYAxis(r,n),this.setYAxisXPosition(n,r)}},{key:"setGridCoordsForNonAxisCharts",value:function(t){var e=this.w,i=e.globals,a=4*e.config.legend.markers.size+e.config.legend.itemMargin.horizontal,s=15;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,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:i.gridHeight=i.svgHeight-t.height-30,i.gridWidth=i.gridHeight,i.translateY=s,i.translateX=(i.svgWidth-i.gridWidth)/2}}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w;i.config.yaxis.map(function(a,s){i.globals.ignoreYAxisIndexes.includes(s)||i.config.yaxis[s].floating||a.opposite&&(i.globals.translateX=i.globals.translateX-(e[s].width+t[s].width)-parseInt(i.config.yaxis[s].labels.style.fontSize)/1.2)})}},{key:"titleSubtitleOffset",value:function(){var t=this.w,e=t.globals,i=10;void 0!==t.config.title.text?i+=t.config.title.margin:i+=5,void 0!==t.config.subtitle.text?i+=t.config.subtitle.margin:i+=5,t.config.legend.show&&"bottom"===t.config.legend.position&&!t.config.legend.floating&&t.config.series.length>1&&(i+=10);var a=this.getMainTitleCoords(),s=this.getSubTitleCoords();e.gridHeight=e.gridHeight-a.height-s.height-i,e.translateY=e.translateY+a.height+s.height+i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0;return t.globals.yLabelsCoords.map(function(i,a){var s=t.config.yaxis[a].floating;i.width>0&&!s?(e+=i.width,t.globals.ignoreYAxisIndexes.includes(a)&&(e-=i.width)):e+=s?0:5}),t.globals.yTitleCoords.map(function(i,a){var s=t.config.yaxis[a].floating;i.width>0&&!s?(e=e+i.width+parseInt(t.config.yaxis[a].title.style.fontSize),t.globals.ignoreYAxisIndexes.includes(a)&&(e-=i.width)):e+=s?0:5}),e}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t=this.w,e=t.globals.timelineLabels.slice(),i=e.map(function(t){return t.value}),a=i.reduce(function(t,e){if(void 0===t)throw new Error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date");return t.length>e.length?t:e}),s=new o.default(this.ctx),r=s.drawText({x:-200,y:-200,text:a,textAnchor:"start",fontSize:t.config.xaxis.labels.style.fontSize,foreColor:"#fff",opacity:0});t.globals.dom.Paper.add(r);var n=r.node.getBoundingClientRect();return 1.05*n.width*i.length>t.globals.gridWidth&&t.config.xaxis.labels.rotate,t.globals.overlappingXLabels=!0,r.node.parentNode.removeChild(r.node),{width:n.width,height:n.height}}},{key:"getxAxisLabelsCoords",value:function(){var t=this.w,e=t.globals.labels.slice(),i="left"!==t.config.legend.position||"right"!==t.config.legend.position||t.config.legend.floating?0:this.lgRect.width,a=e.reduce(function(t,e){return t.length>e.length?t:e}),s=t.globals.xLabelFormatter;a=new h.default(this.ctx).xLabelFormat(s,a);var r=new o.default(this.ctx),n=r.drawText({x:-200,y:-200,text:a,textAnchor:"start",fontSize:t.config.xaxis.labels.style.fontSize,foreColor:"#fff",opacity:0});t.globals.dom.Paper.add(n);var l=n.node.getBoundingClientRect(),c={width:l.width,height:l.height};return c.width*e.length>t.globals.svgWidth-i-this.yAxisWidth&&0!==t.config.xaxis.labels.rotate?this.isBarHorizontal||(t.globals.rotateXLabels=!0,n.attr("transform","rotate("+t.config.xaxis.labels.rotate+" 0 0)"),l=n.node.getBoundingClientRect(),c.height=l.height/1.65):t.globals.rotateXLabels=!1,n.node.parentNode.removeChild(n.node),{width:c.width,height:c.height}}},{key:"setYAxisXPosition",value:function(t,e){var i=this,a=this.w,s=0,r=0,n=0,o=4;this.multipleYs=!1,a.config.yaxis.length>1&&(this.multipleYs=!0),a.config.yaxis.map(function(l,h){var c=t[h].width+e[h].width,d=new f.default(i.ctx),u=d.xPaddingForYAxisTitle(h,{width:t[h].width},{width:e[h].width},l.opposite);if(a.config.yaxis.length>1?c+=Math.abs(u.padd):void 0===l.title.text?c=c+Math.abs(u.padd)+15:c+=Math.abs(u.padd),l.opposite)r=a.globals.gridWidth+a.globals.translateX+o+26+(a.globals.series.length-a.globals.collapsedSeries.length),o+=c,a.globals.translateYAxisX[h]=r-l.labels.offsetX;else{var p=c;a.globals.ignoreYAxisIndexes.includes(h)&&(p=0),s=i.multipleYs?a.globals.translateX-c-n+5+parseInt(a.config.yaxis[h].labels.style.fontSize)/1.2+l.labels.offsetX+5:a.globals.translateX-c+t[h].width+l.labels.offsetX+2,n+=p,a.globals.translateYAxisX[h]=s}})}},{key:"getyAxisLabelsCoords",value:function(){var t=this,e=this.w,i=[],a=10;return e.config.yaxis.map(function(s,r){if(s.labels.show&&e.globals.yAxisScale[r].result.length){var n=e.globals.yLabelFormatters[r],l=n(e.globals.yAxisScale[r].niceMax);if(t.isBarHorizontal){a=0;l=e.globals.labels.slice().reduce(function(t,e){return t.length>e.length?t:e}),l=n(l)}var h=new o.default(t.ctx),c=h.drawText({x:0,y:0,text:l,textAnchor:"start",fontSize:s.labels.style.fontSize,foreColor:"#fff",opacity:0});e.globals.dom.Paper.add(c);var d=c.node.getBoundingClientRect();c.node.parentNode.removeChild(c.node),i.push({width:d.width+a,height:d.height})}else i.push({width:0,height:0})}),i}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new o.default(this.ctx),s=a.drawText({x:0,y:0,text:t.config.xaxis.title.text,textAnchor:"start",fontSize:t.config.xaxis.title.style.fontSize,foreColor:"#fff",opacity:0});t.globals.dom.Paper.add(s);var r=s.node.getBoundingClientRect();e=r.width,i=r.height,s.node.parentNode.removeChild(s.node)}return{width:e,height:i}}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map(function(a,s){if(void 0!==a.title.text){var r=new o.default(t.ctx),n=r.drawText({x:0,y:0,text:a.title.text,textAnchor:"middle",fontSize:a.title.style.fontSize,foreColor:"#fff",opacity:0});n.attr("transform","rotate(-90 0 0)"),e.globals.dom.Paper.add(n);var l=n.node.getBoundingClientRect();i.push({width:l.width,height:l.height}),n.node.parentNode.removeChild(n.node)}else i.push({width:0,height:0})}),i}},{key:"getMainTitleCoords",value:function(){var t=this.w,e=0,i=0,a=t.globals.dom.baseEl.querySelector(".apexcharts-title-text");if(null!==a&&!t.config.title.floating){var s=a.getBoundingClientRect();e=s.width,i=s.height+5}return{width:e,height:i}}},{key:"getSubTitleCoords",value:function(){var t=this.w,e=0,i=0,a=t.globals.dom.baseEl.querySelector(".apexcharts-subtitle-text");if(null!==a&&!t.config.subtitle.floating){var s=a.getBoundingClientRect();e=s.width,i=s.height+5}return{width:e,height:i}}},{key:"getLegendsRect",value:function(){var t=this.w,e=t.globals.dom.baseEl.querySelector(".apexcharts-legend"),i=Object.assign({},d.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?this.lgRect={x:0,y:0,height:0,width:0}:this.lgRect=i,this.lgRect}}]),t}();t.exports=p},function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0?s:a)(t)}},function(t,e,i){"use strict";var a=i(70),s=i(25);t.exports=function(t){return a(s(t))}},function(t,e,i){"use strict";var a=0,s=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++a+s).toString(36))}},function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;ix.x+x.width+2||e>x.y+x.height+2||t+u3&&void 0!==arguments[3]&&arguments[3],this.w),s=new h.default(this.ctx),r=a.config.dataLabels,n=0,l=0,c=i,d=null;if(r.enabled&&(d=s.group({class:"apexcharts-data-labels"}),t.x instanceof Array))for(var u=0;u0&&(n=o.group({class:"apexcharts-series-markers"})),r.x instanceof Array)for(var c=0;c0){null!==r.y[t]?c+=" w"+(Math.random()+1).toString(36).substring(4):c="apexcharts-nullpoint";var d=a.getMarkerConfig(c,e);s.config.markers.discrete.map(function(t,i){t.i===e&&t.j===h&&(d.pointStrokeColor=t.strokeColor,d.pointFillColor=t.fillColor,d.size=t.size)}),l=o.drawMarker(r.x[t],r.y[t],d),1===i&&0===t&&(h=0),1===i&&1===t&&(h=1),l.attr("rel",h),l.attr("j",h),l.attr("index",e),a.setSelectedPointFilter(l,e,h),a.addEvents(l),n.add(l)}else void 0===s.globals.pointsArray[e]&&(s.globals.pointsArray[e]=[]),s.globals.pointsArray[e].push([r.x[t],r.y[t]])}(c);return n}},{key:"getMarkerConfig",value:function(t,e){var i=this.w,a=this.getMarkerStyle(e),s=i.config.markers.size;return{pSize:s instanceof Array?s[e]:s,pRadius:i.config.markers.radius,pWidth:i.config.markers.strokeWidth,pointStrokeColor:a.pointStrokeColor,pointFillColor:a.pointFillColor,shape:i.config.markers.shape instanceof Array?i.config.markers.shape[e]:i.config.markers.shape,class:t,pointStrokeOpacity:i.config.markers.strokeOpacity,pointFillOpacity:i.config.markers.fillOpacity,seriesIndex:e}}},{key:"addEvents",value:function(t){var e=new h.default(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("touchstart",e.pathMouseDown.bind(this.ctx,t))}},{key:"setSelectedPointFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].includes(i)){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;if("none"!==s){new o.default(this.ctx).applyFilter(t,s.type,s.value)}}}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors;return{pointStrokeColor:e.config.markers.strokeColor,pointFillColor:i instanceof Array?i[t]:i}}}]),t}();t.exports=c},function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=function(){function t(t,e){for(var i=0;i0&&(this.xaxisLabels=i.globals.timelineLabels.slice()),"top"===i.config.xaxis.position?this.offY=0:this.offY=i.globals.gridHeight+1,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.yaxis=i.config.yaxis[0]}return r(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new o.default(this.ctx),i=e.group({class:"apexcharts-xaxis"}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate("+t.globals.translateXAxisX+", "+t.globals.translateXAxisY+")"});i.add(a);for(var s=void 0,r=t.globals.padHorizontal,n=[],l=0;l0&&(x=t.globals.timelineLabels[f].position,p=t.globals.timelineLabels[f].value);var b=28;t.globals.rotateXLabels&&(b=22);var v=e.drawText({x:x,y:this.offY+t.config.xaxis.labels.offsetY+b,text:"",textAnchor:"middle",fontSize:this.xaxisFontSize,foreColor:this.xaxisForeColors[f],cssClass:"apexcharts-xaxis-label "+t.config.xaxis.labels.style.cssClass});a.add(v),v.tspan(p);var m=document.createElementNS(t.globals.svgNS,"title");m.textContent=p,v.node.appendChild(m),r+=s}if(void 0!==t.config.xaxis.title.text){var y=e.group({class:"apexcharts-xaxis-title"}),w=e.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.offY-parseInt(this.xaxisFontSize)+t.globals.xAxisLabelsHeight+t.config.xaxis.title.offsetY,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});y.add(w),i.add(y)}if(t.config.xaxis.axisBorder.show){var k=0;"bar"===t.config.chart.type&&t.globals.dataXY&&(k-=15);var A=e.drawLine(t.globals.padHorizontal+k+t.config.xaxis.axisBorder.offsetX,this.offY,t.globals.gridWidth,this.offY,t.config.xaxis.axisBorder.color,0,t.config.xaxis.axisBorder.strokeWidth);i.add(A)}return i}},{key:"drawXaxisInversed",value:function(t){var e=this.w,i=new o.default(this.ctx),a=i.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),s=i.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g"});a.add(s);for(var r=void 0,n=void 0,l=[],c=0;ci.globals.gridWidth)){var s=this.offY+i.config.xaxis.axisTicks.offsetY,r=s+i.config.xaxis.axisTicks.height;if(i.config.xaxis.axisTicks.show){var n=new o.default(this.ctx),l=n.drawLine(t+i.config.xaxis.axisTicks.offsetX,s,a+i.config.xaxis.axisTicks.offsetX,r,i.config.xaxis.axisTicks.color);e.add(l),l.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timelineLabels.length>0)for(var s=0;s0){var f=a[0].getBBox(),p=a[a.length-1].getBBox();f.x<-25&&a[0].parentNode.removeChild(a[0]),p.x+p.width>t.globals.gridWidth&&a[a.length-1].parentNode.removeChild(a[a.length-1])}if(s.length>0){var g=s[s.length-1].getBBox(),x=s[0].getBBox();g.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),x.x+x.width>t.globals.gridWidth&&s[0].parentNode.removeChild(s[0]);for(var b=0;b=0;u--){var f=i.globals.yAxisScale[e].result[u];f=d(f);var p=20;i.config.yaxis[e].opposite&&(p*=-1),0===i.config.yaxis.length&&(p=20);var g=a.drawText({x:p,y:c+l/10+i.config.yaxis[e].labels.offsetY+1,text:f,textAnchor:i.config.yaxis[e].opposite?"start":"end",fontSize:s,foreColor:i.config.yaxis[e].labels.style.color,cssClass:"apexcharts-yaxis-label "+i.config.yaxis[e].labels.style.cssClass});o.add(g),c+=h}if(void 0!==i.config.yaxis[e].title.text){var x=a.group({class:"apexcharts-yaxis-title"}),b=0;i.config.yaxis[e].opposite&&(b=i.globals.translateYAxisX[e]);var v=a.drawText({x:b,y:i.globals.gridHeight/2+i.globals.translateY,text:i.config.yaxis[e].title.text,textAnchor:"end",foreColor:i.config.yaxis[e].labels.style.color,fontSize:i.config.yaxis[e].title.style.fontSize,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[e].title.style.cssClass});x.add(v),r.add(x)}var m=i.config.yaxis[e].axisBorder;if(m.show){var y=31+m.offsetX;i.config.yaxis[e].opposite&&(y=-31-m.offsetX);var w=a.drawLine(y,i.globals.translateY+m.offsetY-2,y,i.globals.gridHeight+i.globals.translateY+m.offsetY+2,m.color);r.add(w),this.drawAxisTicks(y,l,m,i.config.yaxis[e].axisTicks,e,h,r)}return r}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new n.default(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate("+e.globals.translateXAxisX+", "+e.globals.translateXAxisY+")"});a.add(s);var r=e.globals.yAxisScale[t].result.length-1,o=e.globals.gridWidth/r+.1,l=o+e.config.xaxis.labels.offsetX,h=e.globals.xLabelFormatter;if(e.config.xaxis.labels.show)for(var c=r;c>=0;c--){var d=e.globals.yAxisScale[t].result[c];d=h(d);var u=i.drawText({x:e.globals.gridWidth+e.globals.padHorizontal-(l-o+e.config.xaxis.labels.offsetX),y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30,text:"",textAnchor:"middle",fontSize:this.xaxisFontSize,cssClass:"apexcharts-xaxis-label "+e.config.xaxis.labels.style.cssClass});s.add(u),u.tspan(d);var f=document.createElementNS(e.globals.svgNS,"title");f.textContent=d,u.node.appendChild(f),l+=o}if(void 0!==e.config.xaxis.title.text){var p=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),g=i.drawText({x:e.globals.gridWidth/2,y:this.xAxisoffX+parseInt(this.xaxisFontSize)+parseInt(e.config.xaxis.title.style.fontSize)+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});p.add(g),a.add(p)}var x=e.config.yaxis[t].axisBorder;if(x.show){var b=i.drawLine(e.globals.padHorizontal+x.offsetX,1+x.offsetY,e.globals.padHorizontal+x.offsetX,e.globals.gridHeight+x.offsetY,x.color);a.add(b)}return a}},{key:"drawAxisTicks",value:function(t,e,i,a,s,r,o){var l=this.w,h=new n.default(this.ctx),c=l.globals.translateY;if(a.show){!0===l.config.yaxis[s].opposite&&(t+=a.width);for(var d=e;d>=0;d--){var u=c+e/10+l.config.yaxis[s].labels.offsetY-1;this.isBarHorizontal&&(u=r*d);var f=h.drawLine(t+i.offsetX-a.width+a.offsetX,u+a.offsetY,t+i.offsetX+a.offsetX,u+a.offsetY,i.color);o.add(f),c+=r}}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new n.default(this.ctx),s={width:0,height:0},r={width:0,height:0},o=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='"+t+"'] .apexcharts-yaxis-texts-g");null!==o&&(s=o.getBoundingClientRect());var l=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='"+t+"'] .apexcharts-yaxis-title text");if(null!==l&&(r=l.getBoundingClientRect()),null!==l){var h=this.xPaddingForYAxisTitle(t,s,r,e);l.setAttribute("x",h.xPos)}if(null!==l){var c=a.rotateAroundCenter(l);e?l.setAttribute("transform","rotate(90 "+c.x+" "+c.y+")"):l.setAttribute("transform","rotate(-90 "+c.x+" "+c.y+")")}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,r=0,n=0,o=20;return a?(n=e.width+s.config.yaxis[t].title.offsetX+o+i.width/2-15,0===r&&(n-=15),r+=1):(n=-1*e.width+s.config.yaxis[t].title.offsetX+o+i.width/2-15,this.isBarHorizontal&&(o=25,n=-1*e.width-s.config.yaxis[t].title.offsetX-o)),{xPos:n,padd:o}}}]),t}();t.exports=o},function(t,e,i){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2])||arguments[2],s=["\0","January","February","March","April","May","June","July","August","September","October","November","December"],r=["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],n=["","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o=["","Sun","Mon","Tue","Wed","Thu","Fri","Sat"];t=this.treatAsUtc(t);var l=a?t.getUTCFullYear():t.getFullYear();e=e.replace(/(^|[^\\])yyyy+/g,"$1"+l),e=e.replace(/(^|[^\\])yy/g,"$1"+l.toString().substr(2,2)),e=e.replace(/(^|[^\\])y/g,"$1"+l);var h=(a?t.getUTCMonth():t.getMonth())+1;e=e.replace(/(^|[^\\])MMMM+/g,"$1"+s[0]),e=e.replace(/(^|[^\\])MMM/g,"$1"+r[0]),e=e.replace(/(^|[^\\])MM/g,"$1"+i(h)),e=e.replace(/(^|[^\\])M/g,"$1"+h);var c=a?t.getUTCDate():t.getDate();e=e.replace(/(^|[^\\])dddd+/g,"$1"+n[0]),e=e.replace(/(^|[^\\])ddd/g,"$1"+o[0]),e=e.replace(/(^|[^\\])dd/g,"$1"+i(c)),e=e.replace(/(^|[^\\])d/g,"$1"+c);var d=a?t.getUTCHours():t.getHours();e=e.replace(/(^|[^\\])HH+/g,"$1"+i(d)),e=e.replace(/(^|[^\\])H/g,"$1"+d);var u=d>12?d-12:0===d?12:d;e=e.replace(/(^|[^\\])hh+/g,"$1"+i(u)),e=e.replace(/(^|[^\\])h/g,"$1"+u);var f=a?t.getUTCMinutes():t.getMinutes();e=e.replace(/(^|[^\\])mm+/g,"$1"+i(f)),e=e.replace(/(^|[^\\])m/g,"$1"+f);var p=a?t.getUTCSeconds():t.getSeconds();e=e.replace(/(^|[^\\])ss+/g,"$1"+i(p)),e=e.replace(/(^|[^\\])s/g,"$1"+p);var g=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+i(g,3)),g=Math.round(g/10),e=e.replace(/(^|[^\\])ff/g,"$1"+i(g)),g=Math.round(g/10),e=e.replace(/(^|[^\\])f/g,"$1"+g);var x=d<12?"AM":"PM";e=e.replace(/(^|[^\\])TT+/g,"$1"+x),e=e.replace(/(^|[^\\])T/g,"$1"+x.charAt(0));var b=x.toLowerCase();e=e.replace(/(^|[^\\])tt+/g,"$1"+b),e=e.replace(/(^|[^\\])t/g,"$1"+b.charAt(0));var v=-t.getTimezoneOffset(),m=a||!v?"Z":v>0?"+":"-";if(!a){v=Math.abs(v);var y=Math.floor(v/60),w=v%60;m+=i(y)+":"+i(w)}e=e.replace(/(^|[^\\])K/g,"$1"+m);var k=(a?t.getUTCDay():t.getDay())+1;return e=e.replace(new RegExp(n[0],"g"),n[k]),e=e.replace(new RegExp(o[0],"g"),o[k]),e=e.replace(new RegExp(s[0],"g"),s[h]),e=e.replace(new RegExp(r[0],"g"),r[h]),e=e.replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e){var i=this.w;void 0!==i.config.xaxis.min&&(t=i.config.xaxis.min),void 0!==i.config.xaxis.max&&(e=i.config.xaxis.max);var a=new Date(t).getFullYear(),s=new Date(e).getFullYear(),r=new Date(t).getMonth(),n=new Date(e).getMonth(),o=new Date(t).getDate(),l=new Date(e).getDate(),h=new Date(t).getHours(),c=new Date(e).getHours();return{minMinute:new Date(t).getMinutes(),maxMinute:new Date(e).getMinutes(),minHour:h,maxHour:c,minDate:o,maxDate:l,minMonth:r,maxMonth:n,minYear:a,maxYear:s}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=new n.default(this.ctx).monthMod(t),!0){case this.months30.includes(t):2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.includes(t):default:i=31}return i}}]),t}();e.default=o},function(t,e,i){"use strict";var a=i(3)("unscopables"),s=Array.prototype;void 0==s[a]&&i(8)(s,a,{}),t.exports=function(t){s[a][t]=!0}},function(t,e,i){"use strict";var a=i(32),s=i(52),r=i(84);t.exports=function(t){return function(e,i,n){var o,l=a(e),h=s(l.length),c=r(n,h);if(t&&i!=i){for(;h>c;)if((o=l[c++])!=o)return!0}else for(;h>c;c++)if((t||c in l)&&l[c]===i)return t||c||0;return!t&&-1}}},function(t,e,i){"use strict";t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,i){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,i){"use strict";var a=i(2).document;t.exports=a&&a.documentElement},function(t,e,i){"use strict";var a=i(27),s=i(11),r=i(14),n=i(8),o=i(13),l=i(73),h=i(29),c=i(79),d=i(3)("iterator"),u=!([].keys&&"next"in[].keys()),f=function(){return this};t.exports=function(t,e,i,p,g,x,b){l(i,e,p);var v,m,y,w=function(t){if(!u&&t in C)return C[t];switch(t){case"keys":case"values":return function(){return new i(this,t)}}return function(){return new i(this,t)}},k=e+" Iterator",A="values"==g,S=!1,C=t.prototype,P=C[d]||C["@@iterator"]||g&&C[g],M=P||w(g),T=g?A?w("entries"):M:void 0,L="Array"==e?C.entries||P:P;if(L&&(y=c(L.call(new t)))!==Object.prototype&&y.next&&(h(y,k,!0),a||"function"==typeof y[d]||n(y,d,f)),A&&P&&"values"!==P.name&&(S=!0,M=function(){return P.call(this)}),a&&!b||!u&&!S&&C[d]||n(C,d,M),o[e]=M,o[k]=f,g)if(v={values:A?M:w("values"),keys:x?M:w("keys"),entries:T},b)for(m in v)m in C||r(C,m,v[m]);else s(s.P+s.F*(u||S),e,v);return v}},function(t,e,i){"use strict";var a=i(80),s=i(41);t.exports=Object.keys||function(t){return a(t,s)}},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(6),s=i(12),r=i(28);t.exports=function(t,e){if(a(t),s(e)&&e.constructor===t)return e;var i=r.f(t);return(0,i.resolve)(e),i.promise}},function(t,e,i){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,i){"use strict";var a=i(5),s=i(2),r=s["__core-js_shared__"]||(s["__core-js_shared__"]={});(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:a.version,mode:i(27)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,i){"use strict";var a=i(6),s=i(17),r=i(3)("species");t.exports=function(t,e){var i,n=a(t).constructor;return void 0===n||void 0==(i=a(n)[r])?e:s(i)}},function(t,e,i){"use strict";var a,s,r,n=i(19),o=i(69),l=i(43),h=i(26),c=i(2),d=c.process,u=c.setImmediate,f=c.clearImmediate,p=c.MessageChannel,g=c.Dispatch,x=0,b={},v=function(){var t=+this;if(b.hasOwnProperty(t)){var e=b[t];delete b[t],e()}},m=function(t){v.call(t.data)};u&&f||(u=function(t){for(var e=[],i=1;arguments.length>i;)e.push(arguments[i++]);return b[++x]=function(){o("function"==typeof t?t:Function(t),e)},a(x),x},f=function(t){delete b[t]},"process"==i(18)(d)?a=function(t){d.nextTick(n(v,t,1))}:g&&g.now?a=function(t){g.now(n(v,t,1))}:p?(s=new p,r=s.port2,s.port1.onmessage=m,a=n(r.postMessage,r,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(a=function(t){c.postMessage(t+"","*")},c.addEventListener("message",m,!1)):a="onreadystatechange"in h("script")?function(t){l.appendChild(h("script")).onreadystatechange=function(){l.removeChild(this),v.call(t)}}:function(t){setTimeout(n(v,t,1),0)}),t.exports={set:u,clear:f}},function(t,e,i){"use strict";var a=i(31),s=Math.min;t.exports=function(t){return t>0?s(a(t),9007199254740991):0}},function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0&&(this.seriesLen=this.seriesLen+1,this.totalItems+=t[n].length);0===this.seriesLen&&(this.seriesLen=1);var l=s.group({class:"apexcharts-bar-series apexcharts-plot-series"});l.attr("clip-path","url(#gridRectMask"+a.globals.cuid+")");for(var h=0,c=0;h0&&(i.visibleI=i.visibleI+1);var w=0,k=0,A=0;i.yRatio.length>1&&(i.yaxisIndex=m);var S=i.initialPositions();u=S.y,k=S.barHeight,p=S.yDivision,x=S.zeroW,d=S.x,A=S.barWidth,f=S.xDivision,g=S.zeroH,i.horizontal||v.push(d+A/2);for(var C=s.group({class:"apexcharts-datalabels"}),P=0,M=a.globals.dataPoints;P0&&v.push(d+A/2),b.push(u);var P=i.barOptions.distributed?e:n,M=null;if(i.barOptions.colors.ranges.length>0){i.barOptions.colors.ranges.map(function(i){t[n][e]>=i.from&&t[n][e]<=i.to&&(M=i.color)})}var T=r.fillPath(y,{seriesNumber:i.barOptions.distributed?P:m,color:M}),L=a.globals.stroke.colors[m];i.isNullValue&&(T="none");var z=e/a.config.chart.animations.animateGradually.delay*(a.config.chart.animations.speed/a.globals.dataPoints)/2.4,X=s.renderPaths({i:n,realIndex:m,pathFrom:c,pathTo:h,stroke:L,strokeWidth:w,fill:T,animationDelay:z,initialSpeed:a.config.chart.animations.speed,dataChangeSpeed:a.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-bar-area",id:"apexcharts-bar-area"});i.setSelectedBarFilter(X,m,e),y.add(X);var E=i.calculateBarDataLabels({x:d,y:u,i:n,j:e,series:t,realIndex:m,barHeight:k,barWidth:A,renderedPath:X,visibleSeries:i.visibleI});null!==E&&C.add(E),y.add(C)}(P);a.globals.seriesXvalues[m]=v,a.globals.seriesYvalues[m]=b,l.add(y)}(h,c);return l}},{key:"initialPositions",value:function(){var t=this.w,e=void 0,i=void 0,a=void 0,s=void 0,r=void 0,n=void 0,o=void 0,l=void 0;return this.isHorizontal?(a=t.globals.gridHeight/t.globals.dataPoints,r=a/this.seriesLen,t.globals.dataXY&&(a=t.globals.gridHeight/this.totalItems,r=a/this.seriesLen),r=r*parseInt(this.barOptions.barHeight)/100,l=this.baseLineInvertedY+t.globals.padHorizontal,i=(a-r*this.seriesLen)/2):(s=t.globals.gridWidth/t.globals.dataPoints,n=s/this.seriesLen,t.globals.dataXY?(s=t.globals.gridWidth/(this.totalItems/2),n=s/(this.seriesLen+1)*(parseInt(this.barOptions.columnWidth)/100)):n=n*parseInt(this.barOptions.columnWidth)/100,o=t.globals.gridHeight-this.baseLineY[this.yaxisIndex],e=t.globals.padHorizontal+(s-n*this.seriesLen)/2),{x:e,y:i,yDivision:a,xDivision:s,barHeight:r,barWidth:n,zeroH:o,zeroW:l}}},{key:"drawBarPaths",value:function(t){var e=t.indexes,i=t.barHeight,a=t.strokeWidth,s=t.pathTo,r=t.pathFrom,n=t.zeroW,o=t.x,l=t.y,h=t.yDivision,c=t.elSeries,u=this.w,f=new d.default(this.ctx),p=e.i,g=e.j,x=e.realIndex,b=e.bc;u.globals.dataXY&&(l=(u.globals.seriesX[p][g]-u.globals.minX)/this.invertedXRatio-i);var v=l+i*this.visibleI;s=f.move(n,v),r=f.move(n,v),u.globals.previousPaths.length>0&&(r=this.getPathFrom(x,g,!0)),o=void 0===this.series[p][g]||null===this.series[p][g]?n:n+this.series[p][g]/this.invertedYRatio;var m={barHeight:i,strokeWidth:a,barYPosition:v,x:o,zeroW:n},y=this.barEndingShape(u,m,this.series,p,g);if(s=s+f.line(y.newX,v)+y.path+f.line(n,v+i-a)+f.line(n,v),r=r+f.line(n,v)+y.ending_p_from+f.line(n,v+i-a)+f.line(n,v+i-a)+f.line(n,v),u.globals.dataXY||(l+=h),this.barOptions.colors.backgroundBarColors.length>0&&0===p){b>=this.barOptions.colors.backgroundBarColors.length&&(b=0);var w=this.barOptions.colors.backgroundBarColors[b],k=f.drawRect(0,v-i*this.visibleI,u.globals.gridWidth,i*this.seriesLen,0,w,this.barOptions.colors.backgroundBarOpacity);c.add(k),k.node.classList.add("apexcharts-backgroundBar")}return{pathTo:s,pathFrom:r,x:o,y:l,barYPosition:v}}},{key:"drawColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,r=t.pathTo,n=t.pathFrom,o=t.barWidth,l=t.zeroH,h=t.strokeWidth,c=t.elSeries,u=this.w,f=new d.default(this.ctx),p=e.i,g=e.j,x=e.realIndex,b=e.bc;u.globals.dataXY&&(i=(u.globals.seriesX[p][g]-u.globals.minX)/this.xRatio-o/2);var v=i+o*this.visibleI;r=f.move(v,l),n=f.move(v,l),u.globals.previousPaths.length>0&&(n=this.getPathFrom(x,g,!0)),a=void 0===this.series[p][g]||null===this.series[p][g]?l:l-this.series[p][g]/this.yRatio[this.yaxisIndex];var m={barWidth:o,strokeWidth:h,barXPosition:v,y:a,zeroH:l},y=this.barEndingShape(u,m,this.series,p,g);if(r=r+f.line(v,y.newY)+y.path+f.line(v+o-h,l)+f.line(v,l),n=n+f.line(v,l)+y.ending_p_from+f.line(v+o-h,l)+f.line(v+o-h,l)+f.line(v,l),u.globals.dataXY||(i+=s),this.barOptions.colors.backgroundBarColors.length>0&&0===p){b>=this.barOptions.colors.backgroundBarColors.length&&(b=0);var w=this.barOptions.colors.backgroundBarColors[b],k=f.drawRect(v-o*this.visibleI,0,o*this.seriesLen,u.globals.gridHeight,0,w,this.barOptions.colors.backgroundBarOpacity);c.add(k),k.node.classList.add("apexcharts-backgroundBar")}return{pathTo:r,pathFrom:n,x:i,y:a,barXPosition:v}}},{key:"getPathFrom",value:function(t,e){for(var i=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],this.w),a=void 0,s=0;s0&&parseInt(r.realIndex)===parseInt(t)&&void 0!==i.globals.previousPaths[s].paths[e]&&(a=i.globals.previousPaths[s].paths[e].d)}return a}},{key:"calculateBarDataLabels",value:function(t){var e=t.x,i=t.y,a=t.i,s=t.j,r=t.realIndex,n=t.series,o=t.barHeight,l=t.barWidth,h=t.visibleSeries,c=t.renderedPath,u=this.w,f=new d.default(this.ctx),p=Array.isArray(this.strokeWidth)?this.strokeWidth[r]:this.strokeWidth,g=e+parseFloat(l*h),x=i+parseFloat(o*h),b=u.config.dataLabels.offsetX,v=u.config.dataLabels.offsetY;u.globals.dataXY&&(g=e+parseFloat(l*(h+1))-p,x=i+parseFloat(o*(h+1))-p);var m=null,y=e,w=i,k=u.config.dataLabels,A=this.barOptions.dataLabels,S=u.globals.gridHeight/u.globals.dataPoints,C=u.globals.gridWidth/u.globals.dataPoints,P=0!==Math.abs(u.globals.minY),M=f.getTextRects(u.globals.series[a][s],parseInt(k.style.fontSize));if(this.isHorizontal){w=x-S+o/2+M.height/2+v-3;var T=u.globals.gridWidth-this.baseLineInvertedY,L=n[a][s]/this.invertedYRatio,z=u.globals.gridWidth-T,X=!!(eY&&0!==Math.abs(this.baseLineY[this.yaxisIndex]));switch(A.position){case"center":w=i+E/2+M.height/2-v,P&&(w=O?i+E/2+M.height/2+v:i+E/2+M.height/2-v);break;case"bottom":w=P?O?i+E+M.height+p+v:i+E-M.height/2+p-v:u.globals.gridHeight-M.height/2-v;break;case"top":w=P&&O?i-M.height/2-v:i+M.height+v}c.attr({cy:i,cx:g,j:s,val:n[a][s],barWidth:l}),m=this.drawCalculatedBarDataLabels({x:y,y:w,val:n[a][s],i:r,j:s,dataLabelsConfig:k})}return m}},{key:"drawCalculatedBarDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,r=t.j,n=t.dataLabelsConfig,o=this.w,l=new f.default(this.ctx),h=new d.default(this.ctx),c=n.formatter,u=null;if(n.enabled){u=h.group({class:"apexcharts-data-labels"});var p="";a&&(p=c(a,{seriesIndex:s,dataPointIndex:r,globals:o.globals})),l.plotDataLabelsText(e,i,p,s,r,u,n)}return u}},{key:"barEndingShape",value:function(t,e,i,a,s){var r=new d.default(this.ctx);if(this.isHorizontal){var n=null,o="",l=e.x;if(void 0!==i[a][s]||null!==i[a][s]){var h=i[a][s]<0,c=e.barHeight/2-e.strokeWidth;switch(h&&(c=-e.barHeight/2-e.strokeWidth),t.config.chart.stacked||("arrow"===this.barOptions.endingShape?l=e.x-c:"rounded"===this.barOptions.endingShape&&(l=e.x-c/2)),this.barOptions.endingShape){case"flat":n=r.line(l,e.barYPosition+e.barHeight-e.strokeWidth);break;case"arrow":n=r.line(l+c,e.barYPosition+(e.barHeight-e.strokeWidth)/2)+r.line(l,e.barYPosition+e.barHeight-e.strokeWidth),o=r.line(e.zeroW,e.barYPosition+e.barHeight-e.strokeWidth);break;case"rounded":n=r.quadraticCurve(l+c,e.barYPosition+(e.barHeight-e.strokeWidth)/2,l,e.barYPosition+e.barHeight-e.strokeWidth);break;default:n=r.line(l,e.barYPosition+e.barHeight-e.strokeWidth)}}return{path:n,ending_p_from:o,newX:l}}var u=null,f="",p=e.y;if(void 0!==i[a][s]||null!==i[a][s]){var g=i[a][s]<0,x=e.barWidth/2-e.strokeWidth;switch(g&&(x=-e.barWidth/2-e.strokeWidth),t.config.chart.stacked||("arrow"===this.barOptions.endingShape?p+=x:"rounded"===this.barOptions.endingShape&&(p+=x/2)),this.barOptions.endingShape){case"flat":u=r.line(e.barXPosition+e.barWidth-e.strokeWidth,p);break;case"arrow":u=r.line(e.barXPosition+(e.barWidth-e.strokeWidth)/2,p-x)+r.line(e.barXPosition+e.barWidth-e.strokeWidth,p),f=r.line(e.barXPosition+e.barWidth-e.strokeWidth,e.zeroH);break;case"rounded":u=r.quadraticCurve(e.barXPosition+(e.barWidth-e.strokeWidth)/2,p-x,e.barXPosition+e.barWidth-e.strokeWidth,p);break;default:u=r.line(e.barXPosition+e.barWidth-e.strokeWidth,p)}}return{path:u,ending_p_from:f,newY:p}}},{key:"setSelectedBarFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].includes(i)){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;if("none"!==s){new h.default(this.ctx).applyFilter(t,s.type,s.value)}}}}]),t}();e.default=p},function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;ithis.fullAngle?e.endAngle=e.endAngle-(s+o):s+o360&&(l=360);var c=Math.PI*(l-90)/180,d=e.centerX+s*Math.cos(o),u=e.centerY+s*Math.sin(o),f=e.centerX+s*Math.cos(c),p=e.centerY+s*Math.sin(c),g=h.default.polarToCartesian(e.centerX,e.centerY,e.donutSize,l),x=h.default.polarToCartesian(e.centerX,e.centerY,e.donutSize,n),b=a>180?1:0;return"donut"===r.config.chart.type?["M",d,u,"A",s,s,0,b,1,f,p,"L",g.x,g.y,"A",e.donutSize,e.donutSize,0,b,0,x.x,x.y,"L",d,u,"z"].join(" "):"pie"===r.config.chart.type?["M",d,u,"A",s,s,0,b,1,f,p,"L",e.centerX,e.centerY,"L",d,u].join(" "):["M",d,u,"A",s,s,0,b,1,f,p].join(" ")}}]),t}();e.default=p},function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=function(){function t(t,e){for(var i=0;ir&&(s=Math.floor(y.length/r));var o=!1,l=!1;switch(t.tickInterval){case"half_year":s=7,"year"===i.unit&&(o=!0);break;case"months":s=1,"year"===i.unit&&(o=!0);break;case"months_fortnight":s=15,"year"!==i.unit&&"month"!==i.unit||(o=!0),30===n&&(l=!0);break;case"months_days":s=10,"month"===i.unit&&(o=!0),30===n&&(l=!0);break;case"week_days":s=8,"month"===i.unit&&(o=!0);break;case"days":s=1,"month"===i.unit&&(o=!0);break;case"hours":"day"===i.unit&&(o=!0);break;default:o=!1}if((n%s==0||o)&&!l)return!0}),k=this.formatDates(w),A=this.removeOverlappingTS(k);return e.globals.timelineLabels=A.slice(),new h.default(this.ctx).plotCoords(),w}},{key:"determineInterval",value:function(t){switch(!0){case t>1825:this.tickInterval="years";break;case t>800&&t<=1825:this.tickInterval="half_year";break;case t>180&&t<=800:this.tickInterval="months";break;case t>90&&t<=180:this.tickInterval="months_fortnight";break;case t>60&&t<=90:this.tickInterval="months_days";break;case t>30&&t<=60:this.tickInterval="week_days";break;case t>2&&t<=30:this.tickInterval="days";break;case t<=2:this.tickInterval="hours";break;default:this.tickInterval="days"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,r=t.numberOfYears,n=e.minYear,l=0,h=new o.default(this.ctx);if(e.minDate>1&&e.minMonth>0){var c=h.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);l=(h.determineDaysOfYear(e.minYear)-c+1)*s,n=e.minYear+1,this.timeScaleArray.push({position:l,value:n,unit:"year",year:n,month:this.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:l,value:n,unit:"year",year:a,month:this.monthMod(i+1)});for(var d=n,u=l,f=0;f1){h=(c.determineDaysOfMonths(a+1,e.minYear)-i+1)*r,l=this.monthMod(a+1);var f=s+u,p=this.monthMod(l),g=l;0===l&&(d="year",g=f,p=1,u+=1,f+=u),this.timeScaleArray.push({position:h,value:g,unit:d,year:f,month:p})}else this.timeScaleArray.push({position:h,value:l,unit:d,year:s,month:this.monthMod(a)});for(var x=l+1,b=h,v=0,m=1;vn.determineDaysOfMonths(e+1,i)?(e+=1,f=1,l="month",e):e},c=24-e.minHour,d=c*s,u=e.minDate+1,f=u,p=h(f,i,a);this.timeScaleArray.push({position:d,value:u,unit:l,year:a,month:this.monthMod(p)});for(var g=d,x=0;xl.determineDaysOfMonths(e+1,s)?e+=1:e},d=60-e.minMinute,u=d*r,f=e.minHour+1,p=f+1,g=i,x=c(g,a);this.timeScaleArray.push({position:u,value:f,unit:h,day:g,year:s,month:this.monthMod(x)});for(var b=u,v=0;v=24){p=0,g+=1,h="day";var m=function(t,e){return t>l.determineDaysOfMonths(e+1,s)&&(g=1,e+=1),{month:e,date:g}}(g,x);x=m.month,x=c(g,x)}var y=s+Math.floor(x/12)+0;b=60*r+b;var w=0===p?g:p;this.timeScaleArray.push({position:b,value:w,unit:h,day:g,year:y,month:this.monthMod(x)}),p++}}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map(function(t){var a=t.value.toString(),s=new o.default(e.ctx),r=t.year;if(r+="-"+("0"+t.month.toString()).slice(-2),r+="day"===t.unit?"-"+("0"+a).slice(-2):"-01",r+="hour"===t.unit?"T"+("0"+a).slice(-2)+":00:00":"T00:00:00",r=new Date(Date.parse(r)),void 0===i.config.xaxis.labels.format){var n="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(n=l.year),"month"===t.unit&&(n=l.month),"day"===t.unit&&(n=l.day),"hour"===t.unit&&(n=l.hour),a=s.formatDate(r,n)}else a=s.formatDate(r,i.config.xaxis.labels.format);return{position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}})}},{key:"removeOverlappingTS",value:function(t){var e=new d.default(this.ctx),i=0,a=t.map(function(a,s){if(s>0){var r=e.getTextRects(t[i].value).width,n=t[i].position;return a.position>n+r+10?(i=s,a):null}return a});return a=a.filter(function(t){return null!==t})}},{key:"monthMod",value:function(t){return t%12}}]),t}();e.default=u},function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=function(){function t(t,e){for(var i=0;i1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"===e.chart.type&&e.tooltip.shared&&("barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(console.warn('crosshairs.width = "barWidth" is only supported in single series, not in a multi-series barChart'),e.xaxis.crosshairs.width="tickWidth"),e.plotOptions.bar.horizontal&&(e.states.hover.type="none"),e.tooltip.followCursor||(console.warn("followCursor option in shared columns cannot be turned off"),e.tooltip.followCursor=!0)),Array.isArray(e.stroke.width)&&"line"!==e.chart.type&&"area"!==e.chart.type&&(console.warn("stroke.width option accepts array only for line and area charts. Reverted back to Number"),e.stroke.width=e.stroke.width[0]),e}}]),t}();t.exports=f},function(t,e,i){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=t-i.xcrosshairsWidth/2,r=a.globals.labels.slice().length;if(null!==e&&(s=a.globals.gridWidth/r*e),"tickWidth"===a.config.xaxis.crosshairs.width||"barWidth"===a.config.xaxis.crosshairs.width?(i.isBarShared,s+i.xcrosshairsWidth>a.globals.gridWidth&&(s=a.globals.gridWidth-i.xcrosshairsWidth),s<0&&(s=0)):null!==e&&(s+=a.globals.gridWidth/r/2),null!==i.xcrosshairs&&(i.xcrosshairs.setAttribute("x",s),i.xcrosshairs.classList.add("active")),i.blxaxisTooltip){var n=s;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(n=s+i.xcrosshairsWidth/2),this.moveXAxisTooltip(n)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&(o.default.setAttrs(e.ycrosshairs,{y1:t,y2:t}),o.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;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s=0;s=new o.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,r=i.yaxisTTEls[t].getBoundingClientRect(),n=r.height,o=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(o-=26),s-=n/2,e.globals.ignoreYAxisIndexes.includes(t)?i.yaxisTTEls[t].classList.remove("active"):(i.yaxisTTEls[t].classList.add("active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=o+e.config.yaxis[t].tooltip.offsetX+"px")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.tooltipRect,n=null!==i?parseInt(i):1,o=parseInt(t)+n+5,l=parseInt(e)+n/2;o>a.globals.gridWidth/2&&(o=o-r.ttWidth-n-15),o>a.globals.gridWidth-r.ttWidth-10&&(o=a.globals.gridWidth-r.ttWidth),o<-20&&(o=-20),a.config.tooltip.followCursor&&(l=s.e.clientY-s.seriesBound.top-r.ttHeight/2),r.ttHeight+l>a.globals.gridHeight&&(l=a.globals.gridHeight-r.ttHeight/2-n),isNaN(o)||(o+=a.globals.translateX,s.tooltip.style.left=o+"px",s.tooltip.style.top=l+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.config.markers.size>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='"+t+"'] .apexcharts-marker"),r=0;rn.globals.gridWidth||d>n.globals.gridHeight?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):n.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):n.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var u=Math.round(c/l);r&&(u=Math.ceil(c/l),u-=1);for(var f=null,p=null,g=[],x=[],b=0;b1?r=this.getFirstActiveXArray(i):n=0;var l=a[r][0],h=i[r][0],c=Math.abs(t-h),d=Math.abs(e-l),u=d+c;return a.map(function(s,r){s.map(function(s,l){var h=Math.abs(e-a[r][l]),f=Math.abs(t-i[r][l]),p=f+h;p0?e:-1}),a=0;a0)for(var s=0;s0?t:[]})}},{key:"getBarsHeight",value:function(t){return[].concat(a(t)).reduce(function(t,e){return t+e.getBBox().height},0)}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;se.length?t:e});i.yAxisScale[0].niceMax=r,i.yAxisScale[0].niceMin=r,e.globals.yLabelFormatters[0]=function(t){return t}}if(new y.default(this.ctx).plotCoords(),"heatmap"===e.config.chart.type){i.yAxisScale[0].result.push("");var n=e.globals.gridHeight/e.globals.series.length;a.yaxis[0].labels.offsetY=-n/2}var o=null;if(i.axisCharts){if("back"===a.xaxis.crosshairs.position){new v.default(this.ctx).drawXCrosshairs()}if("back"===a.yaxis[0].crosshairs.position){new v.default(this.ctx).drawYCrosshairs()}if(o=this.core.getCalculatedRatios(),"datetime"===a.xaxis.type&&void 0===a.xaxis.labels.formatter){new T.default(this.ctx).calculateTimeScaleTicks()}}this.core.createGridMask();var l=this.core.plotChartType(t,o);return this.core.shiftGraphPosition(),{elGraph:l,xyRatios:o,elInner:e.globals.dom.elGraphical,dimensions:{plot:{left:e.globals.translateX,top:e.globals.translateY,width:e.globals.gridWidth,height:e.globals.gridHeight}}}}},{key:"mount",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=this,a=new P.default(i.ctx);return new Promise(function(s,r){if(null===i.el||null===t)return r(new Error("Not enough data to display or element not found"));var n=function(){if(i.w.globals.axisCharts){var t=new l.default(i.ctx),a=t.drawYAxisAnnotations(),s=t.drawXAxisAnnotations(),r=t.drawPointAnnotations();e.globals.dom.elGraphical.add(a),e.globals.dom.elGraphical.add(s),e.globals.dom.elGraphical.add(r),e.globals.delayedElements.push({el:s.node,index:0}),e.globals.delayedElements.push({el:a.node,index:0}),e.globals.delayedElements.push({el:r.node,index:0}),t.setOrientations(e.config.annotations.xaxis),t.annotationsBackground()}};if(i.core.drawAxis(e.config.chart.type,t.xyRatios),"back"===e.config.grid.position&&i.core.drawGrid(),"back"===e.config.annotations.position&&n(),new c.default(i.ctx).showDelayedElements(),t.elGraph instanceof Array)for(var o=0;o0){var h=!0,d=!1,u=void 0;try{for(var f,p=e.globals.memory.methodsToExec[Symbol.iterator]();!(h=(f=p.next()).done);h=!0){var g=f.value;g.method(g.params,!1,g.context)}}catch(t){d=!0,u=t}finally{try{!h&&p.return&&p.return()}finally{if(d)throw u}}}s(i)})}},{key:"updateOptions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this,s=this.w;if(a.w.config.chart.animations.dynamicAnimation.enabled=i,!e){s.globals.resized=!0;var n=new P.default(a.ctx);a.w.globals.dataChanged=!0,i&&a.w.globals.initialConfig.chart.animations.dynamicAnimation.enabled&&n.getPreviousPaths()}return t&&"object"===(void 0===t?"undefined":r(t))&&(this.checkResponsiveConfig(),this.responsiveConfigOverrided=!0,s.config=O.default.extend(s.config,t)),s.globals.isDirty=!0,this.update()}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.config.chart.animations.dynamicAnimation.enabled=e;var a=new P.default(i.ctx);return i.w.globals.dataChanged=!0,e&&a.getPreviousPaths(),i.w.config.series=t.slice(),i.w.globals.isDirty=!0,this.update()}},{key:"appendData",value:function(t){var e=this,i=new P.default(e.ctx);e.w.globals.dataChanged=!0,i.getPreviousPaths();for(var a=e.w.config.series.slice(),s=0;s1&&void 0!==arguments[1])||arguments[1],i=arguments[2],a=this;i&&(a=i);var s=a.w,r=new l.default(a.ctx),n=s.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations"),o=n.childNodes.length+1,h=Object.assign({},V.xAxisAnnotation),c=O.default.extend(h,t);r.addXAxisAnnotation(c,n,o),r.setOrientations([c],o);var d=s.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='"+o+"']"),u=r.addBackgroundToAnno(d,c,o);return n.insertBefore(u.node,d),e&&s.globals.memory.methodsToExec.push({context:a,method:a.addXaxisAnnotation,params:t}),i}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments[2],a=this;i&&(a=i);var s=a.w,r=new l.default(a.ctx),n=s.globals.dom.baseEl.querySelector(".apexcharts-yaxis-annotations"),o=n.childNodes.length+1,h=Object.assign({},V.yAxisAnnotation),c=O.default.extend(h,t);r.addYAxisAnnotation(c,n,o);var d=s.globals.dom.baseEl.querySelector(".apexcharts-yaxis-annotations .apexcharts-yaxis-annotation-label[rel='"+o+"']"),u=r.addBackgroundToAnno(d,c,o);return n.insertBefore(u.node,d),e&&s.globals.memory.methodsToExec.push({context:a,method:a.addYaxisAnnotation,params:t}),i}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments[2],a=this;i&&(a=i);var s=a.w,r=new l.default(a.ctx),n=s.globals.dom.baseEl.querySelector(".apexcharts-point-annotations"),o=n.childNodes.length+1,h=Object.assign({},V.pointAnnotation),c=O.default.extend(h,t);r.addPointAnnotation(c,n,o);var d=s.globals.dom.baseEl.querySelector(".apexcharts-point-annotations .apexcharts-point-annotation-label[rel='"+o+"']"),u=r.addBackgroundToAnno(d,c,o);return n.insertBefore(u.node,d),e&&s.globals.memory.methodsToExec.push({context:a,method:a.addPointAnnotation,params:t}),i}},{key:"addText",value:function(t){var e=t.x,i=t.y,a=t.text,s=t.textAnchor,r=t.appendTo,n=void 0===r?".apexcharts-inner":r,o=t.foreColor,l=t.fontSize,h=t.cssClass,c=t.backgroundColor,d=t.borderWidth,u=t.strokeDashArray,f=t.radius,p=t.borderColor,g=t.paddingLeft,x=void 0===g?4:g,b=t.paddingRight,v=void 0===b?4:b,m=t.paddingBottom,y=void 0===m?2:m,w=t.paddingTop,k=void 0===w?2:w,A=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],S=arguments[2],C=this;S&&(C=S);var P=C.w,M=new q.default(C.ctx),T=P.globals.dom.baseEl.querySelector(n),L=M.drawText({x:e,y:i,text:a,textAnchor:s||"start",fontSize:l||"12px",foreColor:o||P.config.chart.foreColor,cssClass:h});T.appendChild(L.node);var z=L.bbox(),X=M.drawRect(z.x-x,z.y-k,z.width+x+v,z.height+y+k,f,c,1,d,p,u);return L.before(X),A&&P.globals.memory.methodsToExec.push({context:C,method:C.addText,params:{x:e,y:i,text:a,textAnchor:s,appendTo:n,foreColor:o,fontSize:l,cssClass:h,backgroundColor:c,borderWidth:d,strokeDashArray:u,radius:f,borderColor:p,paddingLeft:x,paddingRight:v,paddingBottom:y,paddingTop:k}}),S}},{key:"checkResponsiveConfig",value:function(){var t=this.w,e=t.config;if(void 0!==e.responsive)for(var i={},a=0;a0?window.innerWidth:screen.width;if(sm;m++)if((x=e?v(n(p=t[m])[0],p[1]):v(t[m]))===h||x===c)return x}else for(g=b.call(t);!(p=g.next()).done;)if((x=s(g,v,p.value,e))===h||x===c)return x};d.BREAK=h,d.RETURN=c},function(t,e,i){"use strict";t.exports=!i(10)&&!i(42)(function(){return 7!=Object.defineProperty(i(26)("div"),"a",{get:function(){return 7}}).a})},function(t,e,i){"use strict";t.exports=function(t,e,i){var a=void 0===i;switch(e.length){case 0:return a?t():t.call(i);case 1:return a?t(e[0]):t.call(i,e[0]);case 2:return a?t(e[0],e[1]):t.call(i,e[0],e[1]);case 3:return a?t(e[0],e[1],e[2]):t.call(i,e[0],e[1],e[2]);case 4:return a?t(e[0],e[1],e[2],e[3]):t.call(i,e[0],e[1],e[2],e[3])}return t.apply(i,e)}},function(t,e,i){"use strict";var a=i(18);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==a(t)?t.split(""):Object(t)}},function(t,e,i){"use strict";var a=i(13),s=i(3)("iterator"),r=Array.prototype;t.exports=function(t){return void 0!==t&&(a.Array===t||r[s]===t)}},function(t,e,i){"use strict";var a=i(6);t.exports=function(t,e,i,s){try{return s?e(a(i)[0],i[1]):e(i)}catch(e){var r=t.return;throw void 0!==r&&a(r.call(t)),e}}},function(t,e,i){"use strict";var a=i(77),s=i(48),r=i(29),n={};i(8)(n,i(3)("iterator"),function(){return this}),t.exports=function(t,e,i){t.prototype=a(n,{next:s(1,i)}),r(t,e+" Iterator")}},function(t,e,i){"use strict";var a=i(3)("iterator"),s=!1;try{var r=[7][a]();r.return=function(){s=!0},Array.from(r,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!s)return!1;var i=!1;try{var r=[7],n=r[a]();n.next=function(){return{done:i=!0}},r[a]=function(){return n},t(r)}catch(t){}return i}},function(t,e,i){"use strict";t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,i){"use strict";var a=i(2),s=i(51).set,r=a.MutationObserver||a.WebKitMutationObserver,n=a.process,o=a.Promise,l="process"==i(18)(n);t.exports=function(){var t,e,i,h=function(){var a,s;for(l&&(a=n.domain)&&a.exit();t;){s=t.fn,t=t.next;try{s()}catch(a){throw t?i():e=void 0,a}}e=void 0,a&&a.enter()};if(l)i=function(){n.nextTick(h)};else if(!r||a.navigator&&a.navigator.standalone)if(o&&o.resolve){var c=o.resolve(void 0);i=function(){c.then(h)}}else i=function(){s.call(a,h)};else{var d=!0,u=document.createTextNode("");new r(h).observe(u,{characterData:!0}),i=function(){u.data=d=!d}}return function(a){var s={fn:a,next:void 0};e&&(e.next=s),t||(t=s,i()),e=s}}},function(t,e,i){"use strict";var a=i(6),s=i(78),r=i(41),n=i(30)("IE_PROTO"),o=function(){},l=function(){var t,e=i(26)("iframe"),a=r.length;for(e.style.display="none",i(43).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("